../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 .text 000258a8 08020188 08020188 00008188 2**3 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .ARM 00000008 08045a30 08045a30 0002da30 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .init_array 00000004 08045a38 08045a38 0002da38 2**2 CONTENTS, ALLOC, LOAD, DATA 4 .fini_array 00000004 08045a3c 08045a3c 0002da3c 2**2 CONTENTS, ALLOC, LOAD, DATA 5 .data 00000aac 20000000 08045a40 00030000 2**2 CONTENTS, ALLOC, LOAD, DATA 6 .fill 00079b10 080464ec 080464ec 000364ec 2**0 CONTENTS, ALLOC, LOAD, DATA 7 .crc 00000004 080bfffc 080bfffc 000afffc 2**2 CONTENTS, ALLOC, LOAD, DATA 8 .bss 00012f9c 20000aac 080464ec 000b0aac 2**2 ALLOC 9 ._user_heap_stack 00000200 20013a48 08059488 000b0aac 2**0 ALLOC 10 .memory_b1_text 0000f000 10000000 10000000 000b0000 2**0 ALLOC 11 .ARM.attributes 0000002f 00000000 00000000 000b0000 2**0 CONTENTS, READONLY 12 .debug_info 00054fd3 00000000 00000000 000b002f 2**0 CONTENTS, READONLY, DEBUGGING 13 .debug_abbrev 0000d6ba 00000000 00000000 00105002 2**0 CONTENTS, READONLY, DEBUGGING 14 .debug_loc 00028052 00000000 00000000 001126bc 2**0 CONTENTS, READONLY, DEBUGGING 15 .debug_aranges 000032d8 00000000 00000000 0013a710 2**3 CONTENTS, READONLY, DEBUGGING 16 .debug_ranges 00003c38 00000000 00000000 0013d9e8 2**3 CONTENTS, READONLY, DEBUGGING 17 .debug_macro 00021f96 00000000 00000000 00141620 2**0 CONTENTS, READONLY, DEBUGGING 18 .debug_line 000280ab 00000000 00000000 001635b6 2**0 CONTENTS, READONLY, DEBUGGING 19 .debug_str 000823e5 00000000 00000000 0018b661 2**0 CONTENTS, READONLY, DEBUGGING 20 .comment 00000030 00000000 00000000 0020da46 2**0 CONTENTS, READONLY 21 .debug_frame 0000899c 00000000 00000000 0020da78 2**2 CONTENTS, READONLY, DEBUGGING Disassembly of section .text: 08020188 : 8020188: b508 push {r3, lr} 802018a: f640 20ac movw r0, #2732 ; 0xaac 802018e: 4b07 ldr r3, [pc, #28] ; (80201ac ) 8020190: f2c2 0000 movt r0, #8192 ; 0x2000 8020194: 1a1b subs r3, r3, r0 8020196: 2b06 cmp r3, #6 8020198: d800 bhi.n 802019c 802019a: bd08 pop {r3, pc} 802019c: f240 0300 movw r3, #0 80201a0: f2c0 0300 movt r3, #0 80201a4: 2b00 cmp r3, #0 80201a6: d0f8 beq.n 802019a 80201a8: 4798 blx r3 80201aa: e7f6 b.n 802019a 80201ac: 20000aaf .word 0x20000aaf 080201b0 : 80201b0: b508 push {r3, lr} 80201b2: f640 20ac movw r0, #2732 ; 0xaac 80201b6: f640 23ac movw r3, #2732 ; 0xaac 80201ba: f2c2 0000 movt r0, #8192 ; 0x2000 80201be: f2c2 0300 movt r3, #8192 ; 0x2000 80201c2: 1a1b subs r3, r3, r0 80201c4: 109b asrs r3, r3, #2 80201c6: eb03 73d3 add.w r3, r3, r3, lsr #31 80201ca: 1059 asrs r1, r3, #1 80201cc: d100 bne.n 80201d0 80201ce: bd08 pop {r3, pc} 80201d0: f240 0200 movw r2, #0 80201d4: f2c0 0200 movt r2, #0 80201d8: 2a00 cmp r2, #0 80201da: d0f8 beq.n 80201ce 80201dc: 4790 blx r2 80201de: e7f6 b.n 80201ce 080201e0 <__do_global_dtors_aux>: 80201e0: b510 push {r4, lr} 80201e2: f640 24ac movw r4, #2732 ; 0xaac 80201e6: f2c2 0400 movt r4, #8192 ; 0x2000 80201ea: 7823 ldrb r3, [r4, #0] 80201ec: b973 cbnz r3, 802020c <__do_global_dtors_aux+0x2c> 80201ee: f7ff ffcb bl 8020188 80201f2: f240 0300 movw r3, #0 80201f6: f2c0 0300 movt r3, #0 80201fa: b12b cbz r3, 8020208 <__do_global_dtors_aux+0x28> 80201fc: f645 2018 movw r0, #23064 ; 0x5a18 8020200: f6c0 0004 movt r0, #2052 ; 0x804 8020204: f3af 8000 nop.w 8020208: 2301 movs r3, #1 802020a: 7023 strb r3, [r4, #0] 802020c: bd10 pop {r4, pc} 802020e: bf00 nop 08020210 : 8020210: b508 push {r3, lr} 8020212: f240 0300 movw r3, #0 8020216: f2c0 0300 movt r3, #0 802021a: b14b cbz r3, 8020230 802021c: f645 2018 movw r0, #23064 ; 0x5a18 8020220: f640 21b0 movw r1, #2736 ; 0xab0 8020224: f6c0 0004 movt r0, #2052 ; 0x804 8020228: f2c2 0100 movt r1, #8192 ; 0x2000 802022c: f3af 8000 nop.w 8020230: f640 20ac movw r0, #2732 ; 0xaac 8020234: f2c2 0000 movt r0, #8192 ; 0x2000 8020238: 6803 ldr r3, [r0, #0] 802023a: b12b cbz r3, 8020248 802023c: f240 0300 movw r3, #0 8020240: f2c0 0300 movt r3, #0 8020244: b103 cbz r3, 8020248 8020246: 4798 blx r3 8020248: e8bd 4008 ldmia.w sp!, {r3, lr} 802024c: f7ff bfb0 b.w 80201b0 08020250 <__aeabi_drsub>: 8020250: f081 4100 eor.w r1, r1, #2147483648 ; 0x80000000 8020254: e002 b.n 802025c <__adddf3> 8020256: bf00 nop 08020258 <__aeabi_dsub>: 8020258: f083 4300 eor.w r3, r3, #2147483648 ; 0x80000000 0802025c <__adddf3>: 802025c: b530 push {r4, r5, lr} 802025e: ea4f 0441 mov.w r4, r1, lsl #1 8020262: ea4f 0543 mov.w r5, r3, lsl #1 8020266: ea94 0f05 teq r4, r5 802026a: bf08 it eq 802026c: ea90 0f02 teqeq r0, r2 8020270: bf1f itttt ne 8020272: ea54 0c00 orrsne.w ip, r4, r0 8020276: ea55 0c02 orrsne.w ip, r5, r2 802027a: ea7f 5c64 mvnsne.w ip, r4, asr #21 802027e: ea7f 5c65 mvnsne.w ip, r5, asr #21 8020282: f000 80e2 beq.w 802044a <__adddf3+0x1ee> 8020286: ea4f 5454 mov.w r4, r4, lsr #21 802028a: ebd4 5555 rsbs r5, r4, r5, lsr #21 802028e: bfb8 it lt 8020290: 426d neglt r5, r5 8020292: dd0c ble.n 80202ae <__adddf3+0x52> 8020294: 442c add r4, r5 8020296: ea80 0202 eor.w r2, r0, r2 802029a: ea81 0303 eor.w r3, r1, r3 802029e: ea82 0000 eor.w r0, r2, r0 80202a2: ea83 0101 eor.w r1, r3, r1 80202a6: ea80 0202 eor.w r2, r0, r2 80202aa: ea81 0303 eor.w r3, r1, r3 80202ae: 2d36 cmp r5, #54 ; 0x36 80202b0: bf88 it hi 80202b2: bd30 pophi {r4, r5, pc} 80202b4: f011 4f00 tst.w r1, #2147483648 ; 0x80000000 80202b8: ea4f 3101 mov.w r1, r1, lsl #12 80202bc: f44f 1c80 mov.w ip, #1048576 ; 0x100000 80202c0: ea4c 3111 orr.w r1, ip, r1, lsr #12 80202c4: d002 beq.n 80202cc <__adddf3+0x70> 80202c6: 4240 negs r0, r0 80202c8: eb61 0141 sbc.w r1, r1, r1, lsl #1 80202cc: f013 4f00 tst.w r3, #2147483648 ; 0x80000000 80202d0: ea4f 3303 mov.w r3, r3, lsl #12 80202d4: ea4c 3313 orr.w r3, ip, r3, lsr #12 80202d8: d002 beq.n 80202e0 <__adddf3+0x84> 80202da: 4252 negs r2, r2 80202dc: eb63 0343 sbc.w r3, r3, r3, lsl #1 80202e0: ea94 0f05 teq r4, r5 80202e4: f000 80a7 beq.w 8020436 <__adddf3+0x1da> 80202e8: f1a4 0401 sub.w r4, r4, #1 80202ec: f1d5 0e20 rsbs lr, r5, #32 80202f0: db0d blt.n 802030e <__adddf3+0xb2> 80202f2: fa02 fc0e lsl.w ip, r2, lr 80202f6: fa22 f205 lsr.w r2, r2, r5 80202fa: 1880 adds r0, r0, r2 80202fc: f141 0100 adc.w r1, r1, #0 8020300: fa03 f20e lsl.w r2, r3, lr 8020304: 1880 adds r0, r0, r2 8020306: fa43 f305 asr.w r3, r3, r5 802030a: 4159 adcs r1, r3 802030c: e00e b.n 802032c <__adddf3+0xd0> 802030e: f1a5 0520 sub.w r5, r5, #32 8020312: f10e 0e20 add.w lr, lr, #32 8020316: 2a01 cmp r2, #1 8020318: fa03 fc0e lsl.w ip, r3, lr 802031c: bf28 it cs 802031e: f04c 0c02 orrcs.w ip, ip, #2 8020322: fa43 f305 asr.w r3, r3, r5 8020326: 18c0 adds r0, r0, r3 8020328: eb51 71e3 adcs.w r1, r1, r3, asr #31 802032c: f001 4500 and.w r5, r1, #2147483648 ; 0x80000000 8020330: d507 bpl.n 8020342 <__adddf3+0xe6> 8020332: f04f 0e00 mov.w lr, #0 8020336: f1dc 0c00 rsbs ip, ip, #0 802033a: eb7e 0000 sbcs.w r0, lr, r0 802033e: eb6e 0101 sbc.w r1, lr, r1 8020342: f5b1 1f80 cmp.w r1, #1048576 ; 0x100000 8020346: d31b bcc.n 8020380 <__adddf3+0x124> 8020348: f5b1 1f00 cmp.w r1, #2097152 ; 0x200000 802034c: d30c bcc.n 8020368 <__adddf3+0x10c> 802034e: 0849 lsrs r1, r1, #1 8020350: ea5f 0030 movs.w r0, r0, rrx 8020354: ea4f 0c3c mov.w ip, ip, rrx 8020358: f104 0401 add.w r4, r4, #1 802035c: ea4f 5244 mov.w r2, r4, lsl #21 8020360: f512 0f80 cmn.w r2, #4194304 ; 0x400000 8020364: f080 809a bcs.w 802049c <__adddf3+0x240> 8020368: f1bc 4f00 cmp.w ip, #2147483648 ; 0x80000000 802036c: bf08 it eq 802036e: ea5f 0c50 movseq.w ip, r0, lsr #1 8020372: f150 0000 adcs.w r0, r0, #0 8020376: eb41 5104 adc.w r1, r1, r4, lsl #20 802037a: ea41 0105 orr.w r1, r1, r5 802037e: bd30 pop {r4, r5, pc} 8020380: ea5f 0c4c movs.w ip, ip, lsl #1 8020384: 4140 adcs r0, r0 8020386: eb41 0101 adc.w r1, r1, r1 802038a: f411 1f80 tst.w r1, #1048576 ; 0x100000 802038e: f1a4 0401 sub.w r4, r4, #1 8020392: d1e9 bne.n 8020368 <__adddf3+0x10c> 8020394: f091 0f00 teq r1, #0 8020398: bf04 itt eq 802039a: 4601 moveq r1, r0 802039c: 2000 moveq r0, #0 802039e: fab1 f381 clz r3, r1 80203a2: bf08 it eq 80203a4: 3320 addeq r3, #32 80203a6: f1a3 030b sub.w r3, r3, #11 80203aa: f1b3 0220 subs.w r2, r3, #32 80203ae: da0c bge.n 80203ca <__adddf3+0x16e> 80203b0: 320c adds r2, #12 80203b2: dd08 ble.n 80203c6 <__adddf3+0x16a> 80203b4: f102 0c14 add.w ip, r2, #20 80203b8: f1c2 020c rsb r2, r2, #12 80203bc: fa01 f00c lsl.w r0, r1, ip 80203c0: fa21 f102 lsr.w r1, r1, r2 80203c4: e00c b.n 80203e0 <__adddf3+0x184> 80203c6: f102 0214 add.w r2, r2, #20 80203ca: bfd8 it le 80203cc: f1c2 0c20 rsble ip, r2, #32 80203d0: fa01 f102 lsl.w r1, r1, r2 80203d4: fa20 fc0c lsr.w ip, r0, ip 80203d8: bfdc itt le 80203da: ea41 010c orrle.w r1, r1, ip 80203de: 4090 lslle r0, r2 80203e0: 1ae4 subs r4, r4, r3 80203e2: bfa2 ittt ge 80203e4: eb01 5104 addge.w r1, r1, r4, lsl #20 80203e8: 4329 orrge r1, r5 80203ea: bd30 popge {r4, r5, pc} 80203ec: ea6f 0404 mvn.w r4, r4 80203f0: 3c1f subs r4, #31 80203f2: da1c bge.n 802042e <__adddf3+0x1d2> 80203f4: 340c adds r4, #12 80203f6: dc0e bgt.n 8020416 <__adddf3+0x1ba> 80203f8: f104 0414 add.w r4, r4, #20 80203fc: f1c4 0220 rsb r2, r4, #32 8020400: fa20 f004 lsr.w r0, r0, r4 8020404: fa01 f302 lsl.w r3, r1, r2 8020408: ea40 0003 orr.w r0, r0, r3 802040c: fa21 f304 lsr.w r3, r1, r4 8020410: ea45 0103 orr.w r1, r5, r3 8020414: bd30 pop {r4, r5, pc} 8020416: f1c4 040c rsb r4, r4, #12 802041a: f1c4 0220 rsb r2, r4, #32 802041e: fa20 f002 lsr.w r0, r0, r2 8020422: fa01 f304 lsl.w r3, r1, r4 8020426: ea40 0003 orr.w r0, r0, r3 802042a: 4629 mov r1, r5 802042c: bd30 pop {r4, r5, pc} 802042e: fa21 f004 lsr.w r0, r1, r4 8020432: 4629 mov r1, r5 8020434: bd30 pop {r4, r5, pc} 8020436: f094 0f00 teq r4, #0 802043a: f483 1380 eor.w r3, r3, #1048576 ; 0x100000 802043e: bf06 itte eq 8020440: f481 1180 eoreq.w r1, r1, #1048576 ; 0x100000 8020444: 3401 addeq r4, #1 8020446: 3d01 subne r5, #1 8020448: e74e b.n 80202e8 <__adddf3+0x8c> 802044a: ea7f 5c64 mvns.w ip, r4, asr #21 802044e: bf18 it ne 8020450: ea7f 5c65 mvnsne.w ip, r5, asr #21 8020454: d029 beq.n 80204aa <__adddf3+0x24e> 8020456: ea94 0f05 teq r4, r5 802045a: bf08 it eq 802045c: ea90 0f02 teqeq r0, r2 8020460: d005 beq.n 802046e <__adddf3+0x212> 8020462: ea54 0c00 orrs.w ip, r4, r0 8020466: bf04 itt eq 8020468: 4619 moveq r1, r3 802046a: 4610 moveq r0, r2 802046c: bd30 pop {r4, r5, pc} 802046e: ea91 0f03 teq r1, r3 8020472: bf1e ittt ne 8020474: 2100 movne r1, #0 8020476: 2000 movne r0, #0 8020478: bd30 popne {r4, r5, pc} 802047a: ea5f 5c54 movs.w ip, r4, lsr #21 802047e: d105 bne.n 802048c <__adddf3+0x230> 8020480: 0040 lsls r0, r0, #1 8020482: 4149 adcs r1, r1 8020484: bf28 it cs 8020486: f041 4100 orrcs.w r1, r1, #2147483648 ; 0x80000000 802048a: bd30 pop {r4, r5, pc} 802048c: f514 0480 adds.w r4, r4, #4194304 ; 0x400000 8020490: bf3c itt cc 8020492: f501 1180 addcc.w r1, r1, #1048576 ; 0x100000 8020496: bd30 popcc {r4, r5, pc} 8020498: f001 4500 and.w r5, r1, #2147483648 ; 0x80000000 802049c: f045 41fe orr.w r1, r5, #2130706432 ; 0x7f000000 80204a0: f441 0170 orr.w r1, r1, #15728640 ; 0xf00000 80204a4: f04f 0000 mov.w r0, #0 80204a8: bd30 pop {r4, r5, pc} 80204aa: ea7f 5c64 mvns.w ip, r4, asr #21 80204ae: bf1a itte ne 80204b0: 4619 movne r1, r3 80204b2: 4610 movne r0, r2 80204b4: ea7f 5c65 mvnseq.w ip, r5, asr #21 80204b8: bf1c itt ne 80204ba: 460b movne r3, r1 80204bc: 4602 movne r2, r0 80204be: ea50 3401 orrs.w r4, r0, r1, lsl #12 80204c2: bf06 itte eq 80204c4: ea52 3503 orrseq.w r5, r2, r3, lsl #12 80204c8: ea91 0f03 teqeq r1, r3 80204cc: f441 2100 orrne.w r1, r1, #524288 ; 0x80000 80204d0: bd30 pop {r4, r5, pc} 80204d2: bf00 nop 080204d4 <__aeabi_ui2d>: 80204d4: f090 0f00 teq r0, #0 80204d8: bf04 itt eq 80204da: 2100 moveq r1, #0 80204dc: 4770 bxeq lr 80204de: b530 push {r4, r5, lr} 80204e0: f44f 6480 mov.w r4, #1024 ; 0x400 80204e4: f104 0432 add.w r4, r4, #50 ; 0x32 80204e8: f04f 0500 mov.w r5, #0 80204ec: f04f 0100 mov.w r1, #0 80204f0: e750 b.n 8020394 <__adddf3+0x138> 80204f2: bf00 nop 080204f4 <__aeabi_i2d>: 80204f4: f090 0f00 teq r0, #0 80204f8: bf04 itt eq 80204fa: 2100 moveq r1, #0 80204fc: 4770 bxeq lr 80204fe: b530 push {r4, r5, lr} 8020500: f44f 6480 mov.w r4, #1024 ; 0x400 8020504: f104 0432 add.w r4, r4, #50 ; 0x32 8020508: f010 4500 ands.w r5, r0, #2147483648 ; 0x80000000 802050c: bf48 it mi 802050e: 4240 negmi r0, r0 8020510: f04f 0100 mov.w r1, #0 8020514: e73e b.n 8020394 <__adddf3+0x138> 8020516: bf00 nop 08020518 <__aeabi_f2d>: 8020518: 0042 lsls r2, r0, #1 802051a: ea4f 01e2 mov.w r1, r2, asr #3 802051e: ea4f 0131 mov.w r1, r1, rrx 8020522: ea4f 7002 mov.w r0, r2, lsl #28 8020526: bf1f itttt ne 8020528: f012 437f andsne.w r3, r2, #4278190080 ; 0xff000000 802052c: f093 4f7f teqne r3, #4278190080 ; 0xff000000 8020530: f081 5160 eorne.w r1, r1, #939524096 ; 0x38000000 8020534: 4770 bxne lr 8020536: f092 0f00 teq r2, #0 802053a: bf14 ite ne 802053c: f093 4f7f teqne r3, #4278190080 ; 0xff000000 8020540: 4770 bxeq lr 8020542: b530 push {r4, r5, lr} 8020544: f44f 7460 mov.w r4, #896 ; 0x380 8020548: f001 4500 and.w r5, r1, #2147483648 ; 0x80000000 802054c: f021 4100 bic.w r1, r1, #2147483648 ; 0x80000000 8020550: e720 b.n 8020394 <__adddf3+0x138> 8020552: bf00 nop 08020554 <__aeabi_ul2d>: 8020554: ea50 0201 orrs.w r2, r0, r1 8020558: bf08 it eq 802055a: 4770 bxeq lr 802055c: b530 push {r4, r5, lr} 802055e: f04f 0500 mov.w r5, #0 8020562: e00a b.n 802057a <__aeabi_l2d+0x16> 08020564 <__aeabi_l2d>: 8020564: ea50 0201 orrs.w r2, r0, r1 8020568: bf08 it eq 802056a: 4770 bxeq lr 802056c: b530 push {r4, r5, lr} 802056e: f011 4500 ands.w r5, r1, #2147483648 ; 0x80000000 8020572: d502 bpl.n 802057a <__aeabi_l2d+0x16> 8020574: 4240 negs r0, r0 8020576: eb61 0141 sbc.w r1, r1, r1, lsl #1 802057a: f44f 6480 mov.w r4, #1024 ; 0x400 802057e: f104 0432 add.w r4, r4, #50 ; 0x32 8020582: ea5f 5c91 movs.w ip, r1, lsr #22 8020586: f43f aedc beq.w 8020342 <__adddf3+0xe6> 802058a: f04f 0203 mov.w r2, #3 802058e: ea5f 0cdc movs.w ip, ip, lsr #3 8020592: bf18 it ne 8020594: 3203 addne r2, #3 8020596: ea5f 0cdc movs.w ip, ip, lsr #3 802059a: bf18 it ne 802059c: 3203 addne r2, #3 802059e: eb02 02dc add.w r2, r2, ip, lsr #3 80205a2: f1c2 0320 rsb r3, r2, #32 80205a6: fa00 fc03 lsl.w ip, r0, r3 80205aa: fa20 f002 lsr.w r0, r0, r2 80205ae: fa01 fe03 lsl.w lr, r1, r3 80205b2: ea40 000e orr.w r0, r0, lr 80205b6: fa21 f102 lsr.w r1, r1, r2 80205ba: 4414 add r4, r2 80205bc: e6c1 b.n 8020342 <__adddf3+0xe6> 80205be: bf00 nop 080205c0 <__aeabi_dmul>: 80205c0: b570 push {r4, r5, r6, lr} 80205c2: f04f 0cff mov.w ip, #255 ; 0xff 80205c6: f44c 6ce0 orr.w ip, ip, #1792 ; 0x700 80205ca: ea1c 5411 ands.w r4, ip, r1, lsr #20 80205ce: bf1d ittte ne 80205d0: ea1c 5513 andsne.w r5, ip, r3, lsr #20 80205d4: ea94 0f0c teqne r4, ip 80205d8: ea95 0f0c teqne r5, ip 80205dc: f000 f8de bleq 802079c <__aeabi_dmul+0x1dc> 80205e0: 442c add r4, r5 80205e2: ea81 0603 eor.w r6, r1, r3 80205e6: ea21 514c bic.w r1, r1, ip, lsl #21 80205ea: ea23 534c bic.w r3, r3, ip, lsl #21 80205ee: ea50 3501 orrs.w r5, r0, r1, lsl #12 80205f2: bf18 it ne 80205f4: ea52 3503 orrsne.w r5, r2, r3, lsl #12 80205f8: f441 1180 orr.w r1, r1, #1048576 ; 0x100000 80205fc: f443 1380 orr.w r3, r3, #1048576 ; 0x100000 8020600: d038 beq.n 8020674 <__aeabi_dmul+0xb4> 8020602: fba0 ce02 umull ip, lr, r0, r2 8020606: f04f 0500 mov.w r5, #0 802060a: fbe1 e502 umlal lr, r5, r1, r2 802060e: f006 4200 and.w r2, r6, #2147483648 ; 0x80000000 8020612: fbe0 e503 umlal lr, r5, r0, r3 8020616: f04f 0600 mov.w r6, #0 802061a: fbe1 5603 umlal r5, r6, r1, r3 802061e: f09c 0f00 teq ip, #0 8020622: bf18 it ne 8020624: f04e 0e01 orrne.w lr, lr, #1 8020628: f1a4 04ff sub.w r4, r4, #255 ; 0xff 802062c: f5b6 7f00 cmp.w r6, #512 ; 0x200 8020630: f564 7440 sbc.w r4, r4, #768 ; 0x300 8020634: d204 bcs.n 8020640 <__aeabi_dmul+0x80> 8020636: ea5f 0e4e movs.w lr, lr, lsl #1 802063a: 416d adcs r5, r5 802063c: eb46 0606 adc.w r6, r6, r6 8020640: ea42 21c6 orr.w r1, r2, r6, lsl #11 8020644: ea41 5155 orr.w r1, r1, r5, lsr #21 8020648: ea4f 20c5 mov.w r0, r5, lsl #11 802064c: ea40 505e orr.w r0, r0, lr, lsr #21 8020650: ea4f 2ece mov.w lr, lr, lsl #11 8020654: f1b4 0cfd subs.w ip, r4, #253 ; 0xfd 8020658: bf88 it hi 802065a: f5bc 6fe0 cmphi.w ip, #1792 ; 0x700 802065e: d81e bhi.n 802069e <__aeabi_dmul+0xde> 8020660: f1be 4f00 cmp.w lr, #2147483648 ; 0x80000000 8020664: bf08 it eq 8020666: ea5f 0e50 movseq.w lr, r0, lsr #1 802066a: f150 0000 adcs.w r0, r0, #0 802066e: eb41 5104 adc.w r1, r1, r4, lsl #20 8020672: bd70 pop {r4, r5, r6, pc} 8020674: f006 4600 and.w r6, r6, #2147483648 ; 0x80000000 8020678: ea46 0101 orr.w r1, r6, r1 802067c: ea40 0002 orr.w r0, r0, r2 8020680: ea81 0103 eor.w r1, r1, r3 8020684: ebb4 045c subs.w r4, r4, ip, lsr #1 8020688: bfc2 ittt gt 802068a: ebd4 050c rsbsgt r5, r4, ip 802068e: ea41 5104 orrgt.w r1, r1, r4, lsl #20 8020692: bd70 popgt {r4, r5, r6, pc} 8020694: f441 1180 orr.w r1, r1, #1048576 ; 0x100000 8020698: f04f 0e00 mov.w lr, #0 802069c: 3c01 subs r4, #1 802069e: f300 80ab bgt.w 80207f8 <__aeabi_dmul+0x238> 80206a2: f114 0f36 cmn.w r4, #54 ; 0x36 80206a6: bfde ittt le 80206a8: 2000 movle r0, #0 80206aa: f001 4100 andle.w r1, r1, #2147483648 ; 0x80000000 80206ae: bd70 pople {r4, r5, r6, pc} 80206b0: f1c4 0400 rsb r4, r4, #0 80206b4: 3c20 subs r4, #32 80206b6: da35 bge.n 8020724 <__aeabi_dmul+0x164> 80206b8: 340c adds r4, #12 80206ba: dc1b bgt.n 80206f4 <__aeabi_dmul+0x134> 80206bc: f104 0414 add.w r4, r4, #20 80206c0: f1c4 0520 rsb r5, r4, #32 80206c4: fa00 f305 lsl.w r3, r0, r5 80206c8: fa20 f004 lsr.w r0, r0, r4 80206cc: fa01 f205 lsl.w r2, r1, r5 80206d0: ea40 0002 orr.w r0, r0, r2 80206d4: f001 4200 and.w r2, r1, #2147483648 ; 0x80000000 80206d8: f021 4100 bic.w r1, r1, #2147483648 ; 0x80000000 80206dc: eb10 70d3 adds.w r0, r0, r3, lsr #31 80206e0: fa21 f604 lsr.w r6, r1, r4 80206e4: eb42 0106 adc.w r1, r2, r6 80206e8: ea5e 0e43 orrs.w lr, lr, r3, lsl #1 80206ec: bf08 it eq 80206ee: ea20 70d3 biceq.w r0, r0, r3, lsr #31 80206f2: bd70 pop {r4, r5, r6, pc} 80206f4: f1c4 040c rsb r4, r4, #12 80206f8: f1c4 0520 rsb r5, r4, #32 80206fc: fa00 f304 lsl.w r3, r0, r4 8020700: fa20 f005 lsr.w r0, r0, r5 8020704: fa01 f204 lsl.w r2, r1, r4 8020708: ea40 0002 orr.w r0, r0, r2 802070c: f001 4100 and.w r1, r1, #2147483648 ; 0x80000000 8020710: eb10 70d3 adds.w r0, r0, r3, lsr #31 8020714: f141 0100 adc.w r1, r1, #0 8020718: ea5e 0e43 orrs.w lr, lr, r3, lsl #1 802071c: bf08 it eq 802071e: ea20 70d3 biceq.w r0, r0, r3, lsr #31 8020722: bd70 pop {r4, r5, r6, pc} 8020724: f1c4 0520 rsb r5, r4, #32 8020728: fa00 f205 lsl.w r2, r0, r5 802072c: ea4e 0e02 orr.w lr, lr, r2 8020730: fa20 f304 lsr.w r3, r0, r4 8020734: fa01 f205 lsl.w r2, r1, r5 8020738: ea43 0302 orr.w r3, r3, r2 802073c: fa21 f004 lsr.w r0, r1, r4 8020740: f001 4100 and.w r1, r1, #2147483648 ; 0x80000000 8020744: fa21 f204 lsr.w r2, r1, r4 8020748: ea20 0002 bic.w r0, r0, r2 802074c: eb00 70d3 add.w r0, r0, r3, lsr #31 8020750: ea5e 0e43 orrs.w lr, lr, r3, lsl #1 8020754: bf08 it eq 8020756: ea20 70d3 biceq.w r0, r0, r3, lsr #31 802075a: bd70 pop {r4, r5, r6, pc} 802075c: f094 0f00 teq r4, #0 8020760: d10f bne.n 8020782 <__aeabi_dmul+0x1c2> 8020762: f001 4600 and.w r6, r1, #2147483648 ; 0x80000000 8020766: 0040 lsls r0, r0, #1 8020768: eb41 0101 adc.w r1, r1, r1 802076c: f411 1f80 tst.w r1, #1048576 ; 0x100000 8020770: bf08 it eq 8020772: 3c01 subeq r4, #1 8020774: d0f7 beq.n 8020766 <__aeabi_dmul+0x1a6> 8020776: ea41 0106 orr.w r1, r1, r6 802077a: f095 0f00 teq r5, #0 802077e: bf18 it ne 8020780: 4770 bxne lr 8020782: f003 4600 and.w r6, r3, #2147483648 ; 0x80000000 8020786: 0052 lsls r2, r2, #1 8020788: eb43 0303 adc.w r3, r3, r3 802078c: f413 1f80 tst.w r3, #1048576 ; 0x100000 8020790: bf08 it eq 8020792: 3d01 subeq r5, #1 8020794: d0f7 beq.n 8020786 <__aeabi_dmul+0x1c6> 8020796: ea43 0306 orr.w r3, r3, r6 802079a: 4770 bx lr 802079c: ea94 0f0c teq r4, ip 80207a0: ea0c 5513 and.w r5, ip, r3, lsr #20 80207a4: bf18 it ne 80207a6: ea95 0f0c teqne r5, ip 80207aa: d00c beq.n 80207c6 <__aeabi_dmul+0x206> 80207ac: ea50 0641 orrs.w r6, r0, r1, lsl #1 80207b0: bf18 it ne 80207b2: ea52 0643 orrsne.w r6, r2, r3, lsl #1 80207b6: d1d1 bne.n 802075c <__aeabi_dmul+0x19c> 80207b8: ea81 0103 eor.w r1, r1, r3 80207bc: f001 4100 and.w r1, r1, #2147483648 ; 0x80000000 80207c0: f04f 0000 mov.w r0, #0 80207c4: bd70 pop {r4, r5, r6, pc} 80207c6: ea50 0641 orrs.w r6, r0, r1, lsl #1 80207ca: bf06 itte eq 80207cc: 4610 moveq r0, r2 80207ce: 4619 moveq r1, r3 80207d0: ea52 0643 orrsne.w r6, r2, r3, lsl #1 80207d4: d019 beq.n 802080a <__aeabi_dmul+0x24a> 80207d6: ea94 0f0c teq r4, ip 80207da: d102 bne.n 80207e2 <__aeabi_dmul+0x222> 80207dc: ea50 3601 orrs.w r6, r0, r1, lsl #12 80207e0: d113 bne.n 802080a <__aeabi_dmul+0x24a> 80207e2: ea95 0f0c teq r5, ip 80207e6: d105 bne.n 80207f4 <__aeabi_dmul+0x234> 80207e8: ea52 3603 orrs.w r6, r2, r3, lsl #12 80207ec: bf1c itt ne 80207ee: 4610 movne r0, r2 80207f0: 4619 movne r1, r3 80207f2: d10a bne.n 802080a <__aeabi_dmul+0x24a> 80207f4: ea81 0103 eor.w r1, r1, r3 80207f8: f001 4100 and.w r1, r1, #2147483648 ; 0x80000000 80207fc: f041 41fe orr.w r1, r1, #2130706432 ; 0x7f000000 8020800: f441 0170 orr.w r1, r1, #15728640 ; 0xf00000 8020804: f04f 0000 mov.w r0, #0 8020808: bd70 pop {r4, r5, r6, pc} 802080a: f041 41fe orr.w r1, r1, #2130706432 ; 0x7f000000 802080e: f441 0178 orr.w r1, r1, #16252928 ; 0xf80000 8020812: bd70 pop {r4, r5, r6, pc} 08020814 <__aeabi_ddiv>: 8020814: b570 push {r4, r5, r6, lr} 8020816: f04f 0cff mov.w ip, #255 ; 0xff 802081a: f44c 6ce0 orr.w ip, ip, #1792 ; 0x700 802081e: ea1c 5411 ands.w r4, ip, r1, lsr #20 8020822: bf1d ittte ne 8020824: ea1c 5513 andsne.w r5, ip, r3, lsr #20 8020828: ea94 0f0c teqne r4, ip 802082c: ea95 0f0c teqne r5, ip 8020830: f000 f8a7 bleq 8020982 <__aeabi_ddiv+0x16e> 8020834: eba4 0405 sub.w r4, r4, r5 8020838: ea81 0e03 eor.w lr, r1, r3 802083c: ea52 3503 orrs.w r5, r2, r3, lsl #12 8020840: ea4f 3101 mov.w r1, r1, lsl #12 8020844: f000 8088 beq.w 8020958 <__aeabi_ddiv+0x144> 8020848: ea4f 3303 mov.w r3, r3, lsl #12 802084c: f04f 5580 mov.w r5, #268435456 ; 0x10000000 8020850: ea45 1313 orr.w r3, r5, r3, lsr #4 8020854: ea43 6312 orr.w r3, r3, r2, lsr #24 8020858: ea4f 2202 mov.w r2, r2, lsl #8 802085c: ea45 1511 orr.w r5, r5, r1, lsr #4 8020860: ea45 6510 orr.w r5, r5, r0, lsr #24 8020864: ea4f 2600 mov.w r6, r0, lsl #8 8020868: f00e 4100 and.w r1, lr, #2147483648 ; 0x80000000 802086c: 429d cmp r5, r3 802086e: bf08 it eq 8020870: 4296 cmpeq r6, r2 8020872: f144 04fd adc.w r4, r4, #253 ; 0xfd 8020876: f504 7440 add.w r4, r4, #768 ; 0x300 802087a: d202 bcs.n 8020882 <__aeabi_ddiv+0x6e> 802087c: 085b lsrs r3, r3, #1 802087e: ea4f 0232 mov.w r2, r2, rrx 8020882: 1ab6 subs r6, r6, r2 8020884: eb65 0503 sbc.w r5, r5, r3 8020888: 085b lsrs r3, r3, #1 802088a: ea4f 0232 mov.w r2, r2, rrx 802088e: f44f 1080 mov.w r0, #1048576 ; 0x100000 8020892: f44f 2c00 mov.w ip, #524288 ; 0x80000 8020896: ebb6 0e02 subs.w lr, r6, r2 802089a: eb75 0e03 sbcs.w lr, r5, r3 802089e: bf22 ittt cs 80208a0: 1ab6 subcs r6, r6, r2 80208a2: 4675 movcs r5, lr 80208a4: ea40 000c orrcs.w r0, r0, ip 80208a8: 085b lsrs r3, r3, #1 80208aa: ea4f 0232 mov.w r2, r2, rrx 80208ae: ebb6 0e02 subs.w lr, r6, r2 80208b2: eb75 0e03 sbcs.w lr, r5, r3 80208b6: bf22 ittt cs 80208b8: 1ab6 subcs r6, r6, r2 80208ba: 4675 movcs r5, lr 80208bc: ea40 005c orrcs.w r0, r0, ip, lsr #1 80208c0: 085b lsrs r3, r3, #1 80208c2: ea4f 0232 mov.w r2, r2, rrx 80208c6: ebb6 0e02 subs.w lr, r6, r2 80208ca: eb75 0e03 sbcs.w lr, r5, r3 80208ce: bf22 ittt cs 80208d0: 1ab6 subcs r6, r6, r2 80208d2: 4675 movcs r5, lr 80208d4: ea40 009c orrcs.w r0, r0, ip, lsr #2 80208d8: 085b lsrs r3, r3, #1 80208da: ea4f 0232 mov.w r2, r2, rrx 80208de: ebb6 0e02 subs.w lr, r6, r2 80208e2: eb75 0e03 sbcs.w lr, r5, r3 80208e6: bf22 ittt cs 80208e8: 1ab6 subcs r6, r6, r2 80208ea: 4675 movcs r5, lr 80208ec: ea40 00dc orrcs.w r0, r0, ip, lsr #3 80208f0: ea55 0e06 orrs.w lr, r5, r6 80208f4: d018 beq.n 8020928 <__aeabi_ddiv+0x114> 80208f6: ea4f 1505 mov.w r5, r5, lsl #4 80208fa: ea45 7516 orr.w r5, r5, r6, lsr #28 80208fe: ea4f 1606 mov.w r6, r6, lsl #4 8020902: ea4f 03c3 mov.w r3, r3, lsl #3 8020906: ea43 7352 orr.w r3, r3, r2, lsr #29 802090a: ea4f 02c2 mov.w r2, r2, lsl #3 802090e: ea5f 1c1c movs.w ip, ip, lsr #4 8020912: d1c0 bne.n 8020896 <__aeabi_ddiv+0x82> 8020914: f411 1f80 tst.w r1, #1048576 ; 0x100000 8020918: d10b bne.n 8020932 <__aeabi_ddiv+0x11e> 802091a: ea41 0100 orr.w r1, r1, r0 802091e: f04f 0000 mov.w r0, #0 8020922: f04f 4c00 mov.w ip, #2147483648 ; 0x80000000 8020926: e7b6 b.n 8020896 <__aeabi_ddiv+0x82> 8020928: f411 1f80 tst.w r1, #1048576 ; 0x100000 802092c: bf04 itt eq 802092e: 4301 orreq r1, r0 8020930: 2000 moveq r0, #0 8020932: f1b4 0cfd subs.w ip, r4, #253 ; 0xfd 8020936: bf88 it hi 8020938: f5bc 6fe0 cmphi.w ip, #1792 ; 0x700 802093c: f63f aeaf bhi.w 802069e <__aeabi_dmul+0xde> 8020940: ebb5 0c03 subs.w ip, r5, r3 8020944: bf04 itt eq 8020946: ebb6 0c02 subseq.w ip, r6, r2 802094a: ea5f 0c50 movseq.w ip, r0, lsr #1 802094e: f150 0000 adcs.w r0, r0, #0 8020952: eb41 5104 adc.w r1, r1, r4, lsl #20 8020956: bd70 pop {r4, r5, r6, pc} 8020958: f00e 4e00 and.w lr, lr, #2147483648 ; 0x80000000 802095c: ea4e 3111 orr.w r1, lr, r1, lsr #12 8020960: eb14 045c adds.w r4, r4, ip, lsr #1 8020964: bfc2 ittt gt 8020966: ebd4 050c rsbsgt r5, r4, ip 802096a: ea41 5104 orrgt.w r1, r1, r4, lsl #20 802096e: bd70 popgt {r4, r5, r6, pc} 8020970: f441 1180 orr.w r1, r1, #1048576 ; 0x100000 8020974: f04f 0e00 mov.w lr, #0 8020978: 3c01 subs r4, #1 802097a: e690 b.n 802069e <__aeabi_dmul+0xde> 802097c: ea45 0e06 orr.w lr, r5, r6 8020980: e68d b.n 802069e <__aeabi_dmul+0xde> 8020982: ea0c 5513 and.w r5, ip, r3, lsr #20 8020986: ea94 0f0c teq r4, ip 802098a: bf08 it eq 802098c: ea95 0f0c teqeq r5, ip 8020990: f43f af3b beq.w 802080a <__aeabi_dmul+0x24a> 8020994: ea94 0f0c teq r4, ip 8020998: d10a bne.n 80209b0 <__aeabi_ddiv+0x19c> 802099a: ea50 3401 orrs.w r4, r0, r1, lsl #12 802099e: f47f af34 bne.w 802080a <__aeabi_dmul+0x24a> 80209a2: ea95 0f0c teq r5, ip 80209a6: f47f af25 bne.w 80207f4 <__aeabi_dmul+0x234> 80209aa: 4610 mov r0, r2 80209ac: 4619 mov r1, r3 80209ae: e72c b.n 802080a <__aeabi_dmul+0x24a> 80209b0: ea95 0f0c teq r5, ip 80209b4: d106 bne.n 80209c4 <__aeabi_ddiv+0x1b0> 80209b6: ea52 3503 orrs.w r5, r2, r3, lsl #12 80209ba: f43f aefd beq.w 80207b8 <__aeabi_dmul+0x1f8> 80209be: 4610 mov r0, r2 80209c0: 4619 mov r1, r3 80209c2: e722 b.n 802080a <__aeabi_dmul+0x24a> 80209c4: ea50 0641 orrs.w r6, r0, r1, lsl #1 80209c8: bf18 it ne 80209ca: ea52 0643 orrsne.w r6, r2, r3, lsl #1 80209ce: f47f aec5 bne.w 802075c <__aeabi_dmul+0x19c> 80209d2: ea50 0441 orrs.w r4, r0, r1, lsl #1 80209d6: f47f af0d bne.w 80207f4 <__aeabi_dmul+0x234> 80209da: ea52 0543 orrs.w r5, r2, r3, lsl #1 80209de: f47f aeeb bne.w 80207b8 <__aeabi_dmul+0x1f8> 80209e2: e712 b.n 802080a <__aeabi_dmul+0x24a> 080209e4 <__gedf2>: 80209e4: f04f 3cff mov.w ip, #4294967295 80209e8: e006 b.n 80209f8 <__cmpdf2+0x4> 80209ea: bf00 nop 080209ec <__ledf2>: 80209ec: f04f 0c01 mov.w ip, #1 80209f0: e002 b.n 80209f8 <__cmpdf2+0x4> 80209f2: bf00 nop 080209f4 <__cmpdf2>: 80209f4: f04f 0c01 mov.w ip, #1 80209f8: f84d cd04 str.w ip, [sp, #-4]! 80209fc: ea4f 0c41 mov.w ip, r1, lsl #1 8020a00: ea7f 5c6c mvns.w ip, ip, asr #21 8020a04: ea4f 0c43 mov.w ip, r3, lsl #1 8020a08: bf18 it ne 8020a0a: ea7f 5c6c mvnsne.w ip, ip, asr #21 8020a0e: d01b beq.n 8020a48 <__cmpdf2+0x54> 8020a10: b001 add sp, #4 8020a12: ea50 0c41 orrs.w ip, r0, r1, lsl #1 8020a16: bf0c ite eq 8020a18: ea52 0c43 orrseq.w ip, r2, r3, lsl #1 8020a1c: ea91 0f03 teqne r1, r3 8020a20: bf02 ittt eq 8020a22: ea90 0f02 teqeq r0, r2 8020a26: 2000 moveq r0, #0 8020a28: 4770 bxeq lr 8020a2a: f110 0f00 cmn.w r0, #0 8020a2e: ea91 0f03 teq r1, r3 8020a32: bf58 it pl 8020a34: 4299 cmppl r1, r3 8020a36: bf08 it eq 8020a38: 4290 cmpeq r0, r2 8020a3a: bf2c ite cs 8020a3c: 17d8 asrcs r0, r3, #31 8020a3e: ea6f 70e3 mvncc.w r0, r3, asr #31 8020a42: f040 0001 orr.w r0, r0, #1 8020a46: 4770 bx lr 8020a48: ea4f 0c41 mov.w ip, r1, lsl #1 8020a4c: ea7f 5c6c mvns.w ip, ip, asr #21 8020a50: d102 bne.n 8020a58 <__cmpdf2+0x64> 8020a52: ea50 3c01 orrs.w ip, r0, r1, lsl #12 8020a56: d107 bne.n 8020a68 <__cmpdf2+0x74> 8020a58: ea4f 0c43 mov.w ip, r3, lsl #1 8020a5c: ea7f 5c6c mvns.w ip, ip, asr #21 8020a60: d1d6 bne.n 8020a10 <__cmpdf2+0x1c> 8020a62: ea52 3c03 orrs.w ip, r2, r3, lsl #12 8020a66: d0d3 beq.n 8020a10 <__cmpdf2+0x1c> 8020a68: f85d 0b04 ldr.w r0, [sp], #4 8020a6c: 4770 bx lr 8020a6e: bf00 nop 08020a70 <__aeabi_cdrcmple>: 8020a70: 4684 mov ip, r0 8020a72: 4610 mov r0, r2 8020a74: 4662 mov r2, ip 8020a76: 468c mov ip, r1 8020a78: 4619 mov r1, r3 8020a7a: 4663 mov r3, ip 8020a7c: e000 b.n 8020a80 <__aeabi_cdcmpeq> 8020a7e: bf00 nop 08020a80 <__aeabi_cdcmpeq>: 8020a80: b501 push {r0, lr} 8020a82: f7ff ffb7 bl 80209f4 <__cmpdf2> 8020a86: 2800 cmp r0, #0 8020a88: bf48 it mi 8020a8a: f110 0f00 cmnmi.w r0, #0 8020a8e: bd01 pop {r0, pc} 08020a90 <__aeabi_dcmpeq>: 8020a90: f84d ed08 str.w lr, [sp, #-8]! 8020a94: f7ff fff4 bl 8020a80 <__aeabi_cdcmpeq> 8020a98: bf0c ite eq 8020a9a: 2001 moveq r0, #1 8020a9c: 2000 movne r0, #0 8020a9e: f85d fb08 ldr.w pc, [sp], #8 8020aa2: bf00 nop 08020aa4 <__aeabi_dcmplt>: 8020aa4: f84d ed08 str.w lr, [sp, #-8]! 8020aa8: f7ff ffea bl 8020a80 <__aeabi_cdcmpeq> 8020aac: bf34 ite cc 8020aae: 2001 movcc r0, #1 8020ab0: 2000 movcs r0, #0 8020ab2: f85d fb08 ldr.w pc, [sp], #8 8020ab6: bf00 nop 08020ab8 <__aeabi_dcmple>: 8020ab8: f84d ed08 str.w lr, [sp, #-8]! 8020abc: f7ff ffe0 bl 8020a80 <__aeabi_cdcmpeq> 8020ac0: bf94 ite ls 8020ac2: 2001 movls r0, #1 8020ac4: 2000 movhi r0, #0 8020ac6: f85d fb08 ldr.w pc, [sp], #8 8020aca: bf00 nop 08020acc <__aeabi_dcmpge>: 8020acc: f84d ed08 str.w lr, [sp, #-8]! 8020ad0: f7ff ffce bl 8020a70 <__aeabi_cdrcmple> 8020ad4: bf94 ite ls 8020ad6: 2001 movls r0, #1 8020ad8: 2000 movhi r0, #0 8020ada: f85d fb08 ldr.w pc, [sp], #8 8020ade: bf00 nop 08020ae0 <__aeabi_dcmpgt>: 8020ae0: f84d ed08 str.w lr, [sp, #-8]! 8020ae4: f7ff ffc4 bl 8020a70 <__aeabi_cdrcmple> 8020ae8: bf34 ite cc 8020aea: 2001 movcc r0, #1 8020aec: 2000 movcs r0, #0 8020aee: f85d fb08 ldr.w pc, [sp], #8 8020af2: bf00 nop 08020af4 <__aeabi_d2iz>: 8020af4: ea4f 0241 mov.w r2, r1, lsl #1 8020af8: f512 1200 adds.w r2, r2, #2097152 ; 0x200000 8020afc: d215 bcs.n 8020b2a <__aeabi_d2iz+0x36> 8020afe: d511 bpl.n 8020b24 <__aeabi_d2iz+0x30> 8020b00: f46f 7378 mvn.w r3, #992 ; 0x3e0 8020b04: ebb3 5262 subs.w r2, r3, r2, asr #21 8020b08: d912 bls.n 8020b30 <__aeabi_d2iz+0x3c> 8020b0a: ea4f 23c1 mov.w r3, r1, lsl #11 8020b0e: f043 4300 orr.w r3, r3, #2147483648 ; 0x80000000 8020b12: ea43 5350 orr.w r3, r3, r0, lsr #21 8020b16: f011 4f00 tst.w r1, #2147483648 ; 0x80000000 8020b1a: fa23 f002 lsr.w r0, r3, r2 8020b1e: bf18 it ne 8020b20: 4240 negne r0, r0 8020b22: 4770 bx lr 8020b24: f04f 0000 mov.w r0, #0 8020b28: 4770 bx lr 8020b2a: ea50 3001 orrs.w r0, r0, r1, lsl #12 8020b2e: d105 bne.n 8020b3c <__aeabi_d2iz+0x48> 8020b30: f011 4000 ands.w r0, r1, #2147483648 ; 0x80000000 8020b34: bf08 it eq 8020b36: f06f 4000 mvneq.w r0, #2147483648 ; 0x80000000 8020b3a: 4770 bx lr 8020b3c: f04f 0000 mov.w r0, #0 8020b40: 4770 bx lr 8020b42: bf00 nop 08020b44 <__aeabi_d2uiz>: 8020b44: 004a lsls r2, r1, #1 8020b46: d211 bcs.n 8020b6c <__aeabi_d2uiz+0x28> 8020b48: f512 1200 adds.w r2, r2, #2097152 ; 0x200000 8020b4c: d211 bcs.n 8020b72 <__aeabi_d2uiz+0x2e> 8020b4e: d50d bpl.n 8020b6c <__aeabi_d2uiz+0x28> 8020b50: f46f 7378 mvn.w r3, #992 ; 0x3e0 8020b54: ebb3 5262 subs.w r2, r3, r2, asr #21 8020b58: d40e bmi.n 8020b78 <__aeabi_d2uiz+0x34> 8020b5a: ea4f 23c1 mov.w r3, r1, lsl #11 8020b5e: f043 4300 orr.w r3, r3, #2147483648 ; 0x80000000 8020b62: ea43 5350 orr.w r3, r3, r0, lsr #21 8020b66: fa23 f002 lsr.w r0, r3, r2 8020b6a: 4770 bx lr 8020b6c: f04f 0000 mov.w r0, #0 8020b70: 4770 bx lr 8020b72: ea50 3001 orrs.w r0, r0, r1, lsl #12 8020b76: d102 bne.n 8020b7e <__aeabi_d2uiz+0x3a> 8020b78: f04f 30ff mov.w r0, #4294967295 8020b7c: 4770 bx lr 8020b7e: f04f 0000 mov.w r0, #0 8020b82: 4770 bx lr 08020b84 <__aeabi_d2f>: 8020b84: ea4f 0241 mov.w r2, r1, lsl #1 8020b88: f1b2 43e0 subs.w r3, r2, #1879048192 ; 0x70000000 8020b8c: bf24 itt cs 8020b8e: f5b3 1c00 subscs.w ip, r3, #2097152 ; 0x200000 8020b92: f1dc 5cfe rsbscs ip, ip, #532676608 ; 0x1fc00000 8020b96: d90d bls.n 8020bb4 <__aeabi_d2f+0x30> 8020b98: f001 4c00 and.w ip, r1, #2147483648 ; 0x80000000 8020b9c: ea4f 02c0 mov.w r2, r0, lsl #3 8020ba0: ea4c 7050 orr.w r0, ip, r0, lsr #29 8020ba4: f1b2 4f00 cmp.w r2, #2147483648 ; 0x80000000 8020ba8: eb40 0083 adc.w r0, r0, r3, lsl #2 8020bac: bf08 it eq 8020bae: f020 0001 biceq.w r0, r0, #1 8020bb2: 4770 bx lr 8020bb4: f011 4f80 tst.w r1, #1073741824 ; 0x40000000 8020bb8: d121 bne.n 8020bfe <__aeabi_d2f+0x7a> 8020bba: f113 7238 adds.w r2, r3, #48234496 ; 0x2e00000 8020bbe: bfbc itt lt 8020bc0: f001 4000 andlt.w r0, r1, #2147483648 ; 0x80000000 8020bc4: 4770 bxlt lr 8020bc6: f441 1180 orr.w r1, r1, #1048576 ; 0x100000 8020bca: ea4f 5252 mov.w r2, r2, lsr #21 8020bce: f1c2 0218 rsb r2, r2, #24 8020bd2: f1c2 0c20 rsb ip, r2, #32 8020bd6: fa10 f30c lsls.w r3, r0, ip 8020bda: fa20 f002 lsr.w r0, r0, r2 8020bde: bf18 it ne 8020be0: f040 0001 orrne.w r0, r0, #1 8020be4: ea4f 23c1 mov.w r3, r1, lsl #11 8020be8: ea4f 23d3 mov.w r3, r3, lsr #11 8020bec: fa03 fc0c lsl.w ip, r3, ip 8020bf0: ea40 000c orr.w r0, r0, ip 8020bf4: fa23 f302 lsr.w r3, r3, r2 8020bf8: ea4f 0343 mov.w r3, r3, lsl #1 8020bfc: e7cc b.n 8020b98 <__aeabi_d2f+0x14> 8020bfe: ea7f 5362 mvns.w r3, r2, asr #21 8020c02: d107 bne.n 8020c14 <__aeabi_d2f+0x90> 8020c04: ea50 3301 orrs.w r3, r0, r1, lsl #12 8020c08: bf1e ittt ne 8020c0a: f04f 40fe movne.w r0, #2130706432 ; 0x7f000000 8020c0e: f440 0040 orrne.w r0, r0, #12582912 ; 0xc00000 8020c12: 4770 bxne lr 8020c14: f001 4000 and.w r0, r1, #2147483648 ; 0x80000000 8020c18: f040 40fe orr.w r0, r0, #2130706432 ; 0x7f000000 8020c1c: f440 0000 orr.w r0, r0, #8388608 ; 0x800000 8020c20: 4770 bx lr 8020c22: bf00 nop 08020c24 <__aeabi_frsub>: 8020c24: f080 4000 eor.w r0, r0, #2147483648 ; 0x80000000 8020c28: e002 b.n 8020c30 <__addsf3> 8020c2a: bf00 nop 08020c2c <__aeabi_fsub>: 8020c2c: f081 4100 eor.w r1, r1, #2147483648 ; 0x80000000 08020c30 <__addsf3>: 8020c30: 0042 lsls r2, r0, #1 8020c32: bf1f itttt ne 8020c34: ea5f 0341 movsne.w r3, r1, lsl #1 8020c38: ea92 0f03 teqne r2, r3 8020c3c: ea7f 6c22 mvnsne.w ip, r2, asr #24 8020c40: ea7f 6c23 mvnsne.w ip, r3, asr #24 8020c44: d06a beq.n 8020d1c <__addsf3+0xec> 8020c46: ea4f 6212 mov.w r2, r2, lsr #24 8020c4a: ebd2 6313 rsbs r3, r2, r3, lsr #24 8020c4e: bfc1 itttt gt 8020c50: 18d2 addgt r2, r2, r3 8020c52: 4041 eorgt r1, r0 8020c54: 4048 eorgt r0, r1 8020c56: 4041 eorgt r1, r0 8020c58: bfb8 it lt 8020c5a: 425b neglt r3, r3 8020c5c: 2b19 cmp r3, #25 8020c5e: bf88 it hi 8020c60: 4770 bxhi lr 8020c62: f010 4f00 tst.w r0, #2147483648 ; 0x80000000 8020c66: f440 0000 orr.w r0, r0, #8388608 ; 0x800000 8020c6a: f020 407f bic.w r0, r0, #4278190080 ; 0xff000000 8020c6e: bf18 it ne 8020c70: 4240 negne r0, r0 8020c72: f011 4f00 tst.w r1, #2147483648 ; 0x80000000 8020c76: f441 0100 orr.w r1, r1, #8388608 ; 0x800000 8020c7a: f021 417f bic.w r1, r1, #4278190080 ; 0xff000000 8020c7e: bf18 it ne 8020c80: 4249 negne r1, r1 8020c82: ea92 0f03 teq r2, r3 8020c86: d03f beq.n 8020d08 <__addsf3+0xd8> 8020c88: f1a2 0201 sub.w r2, r2, #1 8020c8c: fa41 fc03 asr.w ip, r1, r3 8020c90: eb10 000c adds.w r0, r0, ip 8020c94: f1c3 0320 rsb r3, r3, #32 8020c98: fa01 f103 lsl.w r1, r1, r3 8020c9c: f000 4300 and.w r3, r0, #2147483648 ; 0x80000000 8020ca0: d502 bpl.n 8020ca8 <__addsf3+0x78> 8020ca2: 4249 negs r1, r1 8020ca4: eb60 0040 sbc.w r0, r0, r0, lsl #1 8020ca8: f5b0 0f00 cmp.w r0, #8388608 ; 0x800000 8020cac: d313 bcc.n 8020cd6 <__addsf3+0xa6> 8020cae: f1b0 7f80 cmp.w r0, #16777216 ; 0x1000000 8020cb2: d306 bcc.n 8020cc2 <__addsf3+0x92> 8020cb4: 0840 lsrs r0, r0, #1 8020cb6: ea4f 0131 mov.w r1, r1, rrx 8020cba: f102 0201 add.w r2, r2, #1 8020cbe: 2afe cmp r2, #254 ; 0xfe 8020cc0: d251 bcs.n 8020d66 <__addsf3+0x136> 8020cc2: f1b1 4f00 cmp.w r1, #2147483648 ; 0x80000000 8020cc6: eb40 50c2 adc.w r0, r0, r2, lsl #23 8020cca: bf08 it eq 8020ccc: f020 0001 biceq.w r0, r0, #1 8020cd0: ea40 0003 orr.w r0, r0, r3 8020cd4: 4770 bx lr 8020cd6: 0049 lsls r1, r1, #1 8020cd8: eb40 0000 adc.w r0, r0, r0 8020cdc: f410 0f00 tst.w r0, #8388608 ; 0x800000 8020ce0: f1a2 0201 sub.w r2, r2, #1 8020ce4: d1ed bne.n 8020cc2 <__addsf3+0x92> 8020ce6: fab0 fc80 clz ip, r0 8020cea: f1ac 0c08 sub.w ip, ip, #8 8020cee: ebb2 020c subs.w r2, r2, ip 8020cf2: fa00 f00c lsl.w r0, r0, ip 8020cf6: bfaa itet ge 8020cf8: eb00 50c2 addge.w r0, r0, r2, lsl #23 8020cfc: 4252 neglt r2, r2 8020cfe: 4318 orrge r0, r3 8020d00: bfbc itt lt 8020d02: 40d0 lsrlt r0, r2 8020d04: 4318 orrlt r0, r3 8020d06: 4770 bx lr 8020d08: f092 0f00 teq r2, #0 8020d0c: f481 0100 eor.w r1, r1, #8388608 ; 0x800000 8020d10: bf06 itte eq 8020d12: f480 0000 eoreq.w r0, r0, #8388608 ; 0x800000 8020d16: 3201 addeq r2, #1 8020d18: 3b01 subne r3, #1 8020d1a: e7b5 b.n 8020c88 <__addsf3+0x58> 8020d1c: ea4f 0341 mov.w r3, r1, lsl #1 8020d20: ea7f 6c22 mvns.w ip, r2, asr #24 8020d24: bf18 it ne 8020d26: ea7f 6c23 mvnsne.w ip, r3, asr #24 8020d2a: d021 beq.n 8020d70 <__addsf3+0x140> 8020d2c: ea92 0f03 teq r2, r3 8020d30: d004 beq.n 8020d3c <__addsf3+0x10c> 8020d32: f092 0f00 teq r2, #0 8020d36: bf08 it eq 8020d38: 4608 moveq r0, r1 8020d3a: 4770 bx lr 8020d3c: ea90 0f01 teq r0, r1 8020d40: bf1c itt ne 8020d42: 2000 movne r0, #0 8020d44: 4770 bxne lr 8020d46: f012 4f7f tst.w r2, #4278190080 ; 0xff000000 8020d4a: d104 bne.n 8020d56 <__addsf3+0x126> 8020d4c: 0040 lsls r0, r0, #1 8020d4e: bf28 it cs 8020d50: f040 4000 orrcs.w r0, r0, #2147483648 ; 0x80000000 8020d54: 4770 bx lr 8020d56: f112 7200 adds.w r2, r2, #33554432 ; 0x2000000 8020d5a: bf3c itt cc 8020d5c: f500 0000 addcc.w r0, r0, #8388608 ; 0x800000 8020d60: 4770 bxcc lr 8020d62: f000 4300 and.w r3, r0, #2147483648 ; 0x80000000 8020d66: f043 40fe orr.w r0, r3, #2130706432 ; 0x7f000000 8020d6a: f440 0000 orr.w r0, r0, #8388608 ; 0x800000 8020d6e: 4770 bx lr 8020d70: ea7f 6222 mvns.w r2, r2, asr #24 8020d74: bf16 itet ne 8020d76: 4608 movne r0, r1 8020d78: ea7f 6323 mvnseq.w r3, r3, asr #24 8020d7c: 4601 movne r1, r0 8020d7e: 0242 lsls r2, r0, #9 8020d80: bf06 itte eq 8020d82: ea5f 2341 movseq.w r3, r1, lsl #9 8020d86: ea90 0f01 teqeq r0, r1 8020d8a: f440 0080 orrne.w r0, r0, #4194304 ; 0x400000 8020d8e: 4770 bx lr 08020d90 <__aeabi_ui2f>: 8020d90: f04f 0300 mov.w r3, #0 8020d94: e004 b.n 8020da0 <__aeabi_i2f+0x8> 8020d96: bf00 nop 08020d98 <__aeabi_i2f>: 8020d98: f010 4300 ands.w r3, r0, #2147483648 ; 0x80000000 8020d9c: bf48 it mi 8020d9e: 4240 negmi r0, r0 8020da0: ea5f 0c00 movs.w ip, r0 8020da4: bf08 it eq 8020da6: 4770 bxeq lr 8020da8: f043 4396 orr.w r3, r3, #1258291200 ; 0x4b000000 8020dac: 4601 mov r1, r0 8020dae: f04f 0000 mov.w r0, #0 8020db2: e01c b.n 8020dee <__aeabi_l2f+0x2a> 08020db4 <__aeabi_ul2f>: 8020db4: ea50 0201 orrs.w r2, r0, r1 8020db8: bf08 it eq 8020dba: 4770 bxeq lr 8020dbc: f04f 0300 mov.w r3, #0 8020dc0: e00a b.n 8020dd8 <__aeabi_l2f+0x14> 8020dc2: bf00 nop 08020dc4 <__aeabi_l2f>: 8020dc4: ea50 0201 orrs.w r2, r0, r1 8020dc8: bf08 it eq 8020dca: 4770 bxeq lr 8020dcc: f011 4300 ands.w r3, r1, #2147483648 ; 0x80000000 8020dd0: d502 bpl.n 8020dd8 <__aeabi_l2f+0x14> 8020dd2: 4240 negs r0, r0 8020dd4: eb61 0141 sbc.w r1, r1, r1, lsl #1 8020dd8: ea5f 0c01 movs.w ip, r1 8020ddc: bf02 ittt eq 8020dde: 4684 moveq ip, r0 8020de0: 4601 moveq r1, r0 8020de2: 2000 moveq r0, #0 8020de4: f043 43b6 orr.w r3, r3, #1526726656 ; 0x5b000000 8020de8: bf08 it eq 8020dea: f1a3 5380 subeq.w r3, r3, #268435456 ; 0x10000000 8020dee: f5a3 0300 sub.w r3, r3, #8388608 ; 0x800000 8020df2: fabc f28c clz r2, ip 8020df6: 3a08 subs r2, #8 8020df8: eba3 53c2 sub.w r3, r3, r2, lsl #23 8020dfc: db10 blt.n 8020e20 <__aeabi_l2f+0x5c> 8020dfe: fa01 fc02 lsl.w ip, r1, r2 8020e02: 4463 add r3, ip 8020e04: fa00 fc02 lsl.w ip, r0, r2 8020e08: f1c2 0220 rsb r2, r2, #32 8020e0c: f1bc 4f00 cmp.w ip, #2147483648 ; 0x80000000 8020e10: fa20 f202 lsr.w r2, r0, r2 8020e14: eb43 0002 adc.w r0, r3, r2 8020e18: bf08 it eq 8020e1a: f020 0001 biceq.w r0, r0, #1 8020e1e: 4770 bx lr 8020e20: f102 0220 add.w r2, r2, #32 8020e24: fa01 fc02 lsl.w ip, r1, r2 8020e28: f1c2 0220 rsb r2, r2, #32 8020e2c: ea50 004c orrs.w r0, r0, ip, lsl #1 8020e30: fa21 f202 lsr.w r2, r1, r2 8020e34: eb43 0002 adc.w r0, r3, r2 8020e38: bf08 it eq 8020e3a: ea20 70dc biceq.w r0, r0, ip, lsr #31 8020e3e: 4770 bx lr 08020e40 <__gesf2>: 8020e40: f04f 3cff mov.w ip, #4294967295 8020e44: e006 b.n 8020e54 <__cmpsf2+0x4> 8020e46: bf00 nop 08020e48 <__lesf2>: 8020e48: f04f 0c01 mov.w ip, #1 8020e4c: e002 b.n 8020e54 <__cmpsf2+0x4> 8020e4e: bf00 nop 08020e50 <__cmpsf2>: 8020e50: f04f 0c01 mov.w ip, #1 8020e54: f84d cd04 str.w ip, [sp, #-4]! 8020e58: ea4f 0240 mov.w r2, r0, lsl #1 8020e5c: ea4f 0341 mov.w r3, r1, lsl #1 8020e60: ea7f 6c22 mvns.w ip, r2, asr #24 8020e64: bf18 it ne 8020e66: ea7f 6c23 mvnsne.w ip, r3, asr #24 8020e6a: d011 beq.n 8020e90 <__cmpsf2+0x40> 8020e6c: b001 add sp, #4 8020e6e: ea52 0c53 orrs.w ip, r2, r3, lsr #1 8020e72: bf18 it ne 8020e74: ea90 0f01 teqne r0, r1 8020e78: bf58 it pl 8020e7a: ebb2 0003 subspl.w r0, r2, r3 8020e7e: bf88 it hi 8020e80: 17c8 asrhi r0, r1, #31 8020e82: bf38 it cc 8020e84: ea6f 70e1 mvncc.w r0, r1, asr #31 8020e88: bf18 it ne 8020e8a: f040 0001 orrne.w r0, r0, #1 8020e8e: 4770 bx lr 8020e90: ea7f 6c22 mvns.w ip, r2, asr #24 8020e94: d102 bne.n 8020e9c <__cmpsf2+0x4c> 8020e96: ea5f 2c40 movs.w ip, r0, lsl #9 8020e9a: d105 bne.n 8020ea8 <__cmpsf2+0x58> 8020e9c: ea7f 6c23 mvns.w ip, r3, asr #24 8020ea0: d1e4 bne.n 8020e6c <__cmpsf2+0x1c> 8020ea2: ea5f 2c41 movs.w ip, r1, lsl #9 8020ea6: d0e1 beq.n 8020e6c <__cmpsf2+0x1c> 8020ea8: f85d 0b04 ldr.w r0, [sp], #4 8020eac: 4770 bx lr 8020eae: bf00 nop 08020eb0 <__aeabi_cfrcmple>: 8020eb0: 4684 mov ip, r0 8020eb2: 4608 mov r0, r1 8020eb4: 4661 mov r1, ip 8020eb6: e7ff b.n 8020eb8 <__aeabi_cfcmpeq> 08020eb8 <__aeabi_cfcmpeq>: 8020eb8: b50f push {r0, r1, r2, r3, lr} 8020eba: f7ff ffc9 bl 8020e50 <__cmpsf2> 8020ebe: 2800 cmp r0, #0 8020ec0: bf48 it mi 8020ec2: f110 0f00 cmnmi.w r0, #0 8020ec6: bd0f pop {r0, r1, r2, r3, pc} 08020ec8 <__aeabi_fcmpeq>: 8020ec8: f84d ed08 str.w lr, [sp, #-8]! 8020ecc: f7ff fff4 bl 8020eb8 <__aeabi_cfcmpeq> 8020ed0: bf0c ite eq 8020ed2: 2001 moveq r0, #1 8020ed4: 2000 movne r0, #0 8020ed6: f85d fb08 ldr.w pc, [sp], #8 8020eda: bf00 nop 08020edc <__aeabi_fcmplt>: 8020edc: f84d ed08 str.w lr, [sp, #-8]! 8020ee0: f7ff ffea bl 8020eb8 <__aeabi_cfcmpeq> 8020ee4: bf34 ite cc 8020ee6: 2001 movcc r0, #1 8020ee8: 2000 movcs r0, #0 8020eea: f85d fb08 ldr.w pc, [sp], #8 8020eee: bf00 nop 08020ef0 <__aeabi_fcmple>: 8020ef0: f84d ed08 str.w lr, [sp, #-8]! 8020ef4: f7ff ffe0 bl 8020eb8 <__aeabi_cfcmpeq> 8020ef8: bf94 ite ls 8020efa: 2001 movls r0, #1 8020efc: 2000 movhi r0, #0 8020efe: f85d fb08 ldr.w pc, [sp], #8 8020f02: bf00 nop 08020f04 <__aeabi_fcmpge>: 8020f04: f84d ed08 str.w lr, [sp, #-8]! 8020f08: f7ff ffd2 bl 8020eb0 <__aeabi_cfrcmple> 8020f0c: bf94 ite ls 8020f0e: 2001 movls r0, #1 8020f10: 2000 movhi r0, #0 8020f12: f85d fb08 ldr.w pc, [sp], #8 8020f16: bf00 nop 08020f18 <__aeabi_fcmpgt>: 8020f18: f84d ed08 str.w lr, [sp, #-8]! 8020f1c: f7ff ffc8 bl 8020eb0 <__aeabi_cfrcmple> 8020f20: bf34 ite cc 8020f22: 2001 movcc r0, #1 8020f24: 2000 movcs r0, #0 8020f26: f85d fb08 ldr.w pc, [sp], #8 8020f2a: bf00 nop 08020f2c <__aeabi_uldivmod>: 8020f2c: b94b cbnz r3, 8020f42 <__aeabi_uldivmod+0x16> 8020f2e: b942 cbnz r2, 8020f42 <__aeabi_uldivmod+0x16> 8020f30: 2900 cmp r1, #0 8020f32: bf08 it eq 8020f34: 2800 cmpeq r0, #0 8020f36: d002 beq.n 8020f3e <__aeabi_uldivmod+0x12> 8020f38: f04f 31ff mov.w r1, #4294967295 8020f3c: 4608 mov r0, r1 8020f3e: f000 b83b b.w 8020fb8 <__aeabi_idiv0> 8020f42: b082 sub sp, #8 8020f44: 46ec mov ip, sp 8020f46: e92d 5000 stmdb sp!, {ip, lr} 8020f4a: f000 f81d bl 8020f88 <__gnu_uldivmod_helper> 8020f4e: f8dd e004 ldr.w lr, [sp, #4] 8020f52: b002 add sp, #8 8020f54: bc0c pop {r2, r3} 8020f56: 4770 bx lr 08020f58 <__gnu_ldivmod_helper>: 8020f58: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 8020f5c: 4690 mov r8, r2 8020f5e: 4699 mov r9, r3 8020f60: 4606 mov r6, r0 8020f62: 460f mov r7, r1 8020f64: f000 f82a bl 8020fbc <__divdi3> 8020f68: 9b08 ldr r3, [sp, #32] 8020f6a: fba8 4500 umull r4, r5, r8, r0 8020f6e: fb08 f801 mul.w r8, r8, r1 8020f72: fb00 8209 mla r2, r0, r9, r8 8020f76: 1955 adds r5, r2, r5 8020f78: 1b34 subs r4, r6, r4 8020f7a: eb67 0505 sbc.w r5, r7, r5 8020f7e: e9c3 4500 strd r4, r5, [r3] 8020f82: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8020f86: bf00 nop 08020f88 <__gnu_uldivmod_helper>: 8020f88: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8020f8c: 4690 mov r8, r2 8020f8e: 4606 mov r6, r0 8020f90: 460f mov r7, r1 8020f92: 461d mov r5, r3 8020f94: f000 f9c8 bl 8021328 <__udivdi3> 8020f98: fb00 f305 mul.w r3, r0, r5 8020f9c: fba0 4508 umull r4, r5, r0, r8 8020fa0: fb08 3801 mla r8, r8, r1, r3 8020fa4: 9b06 ldr r3, [sp, #24] 8020fa6: 4445 add r5, r8 8020fa8: 1b34 subs r4, r6, r4 8020faa: eb67 0505 sbc.w r5, r7, r5 8020fae: e9c3 4500 strd r4, r5, [r3] 8020fb2: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8020fb6: bf00 nop 08020fb8 <__aeabi_idiv0>: 8020fb8: 4770 bx lr 8020fba: bf00 nop 08020fbc <__divdi3>: 8020fbc: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8020fc0: 2500 movs r5, #0 8020fc2: 2900 cmp r1, #0 8020fc4: b085 sub sp, #20 8020fc6: 461c mov r4, r3 8020fc8: f2c0 8149 blt.w 802125e <__divdi3+0x2a2> 8020fcc: 2c00 cmp r4, #0 8020fce: f2c0 8141 blt.w 8021254 <__divdi3+0x298> 8020fd2: 468c mov ip, r1 8020fd4: 460f mov r7, r1 8020fd6: 4682 mov sl, r0 8020fd8: 4691 mov r9, r2 8020fda: 4614 mov r4, r2 8020fdc: 4606 mov r6, r0 8020fde: 4619 mov r1, r3 8020fe0: 2b00 cmp r3, #0 8020fe2: d14b bne.n 802107c <__divdi3+0xc0> 8020fe4: 4562 cmp r2, ip 8020fe6: d959 bls.n 802109c <__divdi3+0xe0> 8020fe8: fab2 f382 clz r3, r2 8020fec: b143 cbz r3, 8021000 <__divdi3+0x44> 8020fee: f1c3 0220 rsb r2, r3, #32 8020ff2: fa0c f703 lsl.w r7, ip, r3 8020ff6: fa20 f202 lsr.w r2, r0, r2 8020ffa: 409c lsls r4, r3 8020ffc: 4317 orrs r7, r2 8020ffe: 409e lsls r6, r3 8021000: ea4f 4814 mov.w r8, r4, lsr #16 8021004: 4638 mov r0, r7 8021006: 4641 mov r1, r8 8021008: fa1f f984 uxth.w r9, r4 802100c: f000 fb18 bl 8021640 <__aeabi_uidiv> 8021010: 4641 mov r1, r8 8021012: 4682 mov sl, r0 8021014: 4638 mov r0, r7 8021016: f000 fc41 bl 802189c <__aeabi_uidivmod> 802101a: 0c33 lsrs r3, r6, #16 802101c: fb09 f00a mul.w r0, r9, sl 8021020: ea43 4101 orr.w r1, r3, r1, lsl #16 8021024: 4288 cmp r0, r1 8021026: d90a bls.n 802103e <__divdi3+0x82> 8021028: 1909 adds r1, r1, r4 802102a: f10a 32ff add.w r2, sl, #4294967295 802102e: d205 bcs.n 802103c <__divdi3+0x80> 8021030: 4288 cmp r0, r1 8021032: bf84 itt hi 8021034: f1aa 0a02 subhi.w sl, sl, #2 8021038: 1909 addhi r1, r1, r4 802103a: d800 bhi.n 802103e <__divdi3+0x82> 802103c: 4692 mov sl, r2 802103e: ebc0 0b01 rsb fp, r0, r1 8021042: 4641 mov r1, r8 8021044: 4658 mov r0, fp 8021046: b2b6 uxth r6, r6 8021048: f000 fafa bl 8021640 <__aeabi_uidiv> 802104c: 4641 mov r1, r8 802104e: 4607 mov r7, r0 8021050: 4658 mov r0, fp 8021052: f000 fc23 bl 802189c <__aeabi_uidivmod> 8021056: fb09 f907 mul.w r9, r9, r7 802105a: ea46 4101 orr.w r1, r6, r1, lsl #16 802105e: 4589 cmp r9, r1 8021060: d907 bls.n 8021072 <__divdi3+0xb6> 8021062: 1e7b subs r3, r7, #1 8021064: 190c adds r4, r1, r4 8021066: f080 8157 bcs.w 8021318 <__divdi3+0x35c> 802106a: 3f02 subs r7, #2 802106c: 45a1 cmp r9, r4 802106e: f240 8153 bls.w 8021318 <__divdi3+0x35c> 8021072: ea47 400a orr.w r0, r7, sl, lsl #16 8021076: f04f 0800 mov.w r8, #0 802107a: e004 b.n 8021086 <__divdi3+0xca> 802107c: 4563 cmp r3, ip 802107e: d958 bls.n 8021132 <__divdi3+0x176> 8021080: f04f 0800 mov.w r8, #0 8021084: 4640 mov r0, r8 8021086: 4602 mov r2, r0 8021088: 4643 mov r3, r8 802108a: b115 cbz r5, 8021092 <__divdi3+0xd6> 802108c: 4252 negs r2, r2 802108e: eb63 0343 sbc.w r3, r3, r3, lsl #1 8021092: 4610 mov r0, r2 8021094: 4619 mov r1, r3 8021096: b005 add sp, #20 8021098: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802109c: b922 cbnz r2, 80210a8 <__divdi3+0xec> 802109e: 2001 movs r0, #1 80210a0: 4611 mov r1, r2 80210a2: f000 facd bl 8021640 <__aeabi_uidiv> 80210a6: 4604 mov r4, r0 80210a8: fab4 f384 clz r3, r4 80210ac: 2b00 cmp r3, #0 80210ae: f040 80dc bne.w 802126a <__divdi3+0x2ae> 80210b2: 1b3f subs r7, r7, r4 80210b4: ea4f 4914 mov.w r9, r4, lsr #16 80210b8: fa1f fa84 uxth.w sl, r4 80210bc: f04f 0801 mov.w r8, #1 80210c0: 4649 mov r1, r9 80210c2: 4638 mov r0, r7 80210c4: f000 fabc bl 8021640 <__aeabi_uidiv> 80210c8: 4649 mov r1, r9 80210ca: 4683 mov fp, r0 80210cc: 4638 mov r0, r7 80210ce: f000 fbe5 bl 802189c <__aeabi_uidivmod> 80210d2: 0c33 lsrs r3, r6, #16 80210d4: fb0a f00b mul.w r0, sl, fp 80210d8: ea43 4101 orr.w r1, r3, r1, lsl #16 80210dc: 4288 cmp r0, r1 80210de: d90b bls.n 80210f8 <__divdi3+0x13c> 80210e0: 1909 adds r1, r1, r4 80210e2: f10b 33ff add.w r3, fp, #4294967295 80210e6: f080 8115 bcs.w 8021314 <__divdi3+0x358> 80210ea: 4288 cmp r0, r1 80210ec: bf84 itt hi 80210ee: f1ab 0b02 subhi.w fp, fp, #2 80210f2: 1909 addhi r1, r1, r4 80210f4: f240 810e bls.w 8021314 <__divdi3+0x358> 80210f8: 1a0b subs r3, r1, r0 80210fa: 4649 mov r1, r9 80210fc: 4618 mov r0, r3 80210fe: 9301 str r3, [sp, #4] 8021100: f000 fa9e bl 8021640 <__aeabi_uidiv> 8021104: 9b01 ldr r3, [sp, #4] 8021106: 4649 mov r1, r9 8021108: b2b6 uxth r6, r6 802110a: 4607 mov r7, r0 802110c: 4618 mov r0, r3 802110e: f000 fbc5 bl 802189c <__aeabi_uidivmod> 8021112: fb0a fa07 mul.w sl, sl, r7 8021116: ea46 4101 orr.w r1, r6, r1, lsl #16 802111a: 458a cmp sl, r1 802111c: d906 bls.n 802112c <__divdi3+0x170> 802111e: 1e7b subs r3, r7, #1 8021120: 190c adds r4, r1, r4 8021122: d202 bcs.n 802112a <__divdi3+0x16e> 8021124: 3f02 subs r7, #2 8021126: 45a2 cmp sl, r4 8021128: d800 bhi.n 802112c <__divdi3+0x170> 802112a: 461f mov r7, r3 802112c: ea47 400b orr.w r0, r7, fp, lsl #16 8021130: e7a9 b.n 8021086 <__divdi3+0xca> 8021132: fab3 f483 clz r4, r3 8021136: 2c00 cmp r4, #0 8021138: f000 80e4 beq.w 8021304 <__divdi3+0x348> 802113c: f1c4 0320 rsb r3, r4, #32 8021140: fa01 f104 lsl.w r1, r1, r4 8021144: fa22 fa03 lsr.w sl, r2, r3 8021148: fa2c fb03 lsr.w fp, ip, r3 802114c: ea4a 0a01 orr.w sl, sl, r1 8021150: fa20 f803 lsr.w r8, r0, r3 8021154: fa0c fc04 lsl.w ip, ip, r4 8021158: 4658 mov r0, fp 802115a: ea4f 471a mov.w r7, sl, lsr #16 802115e: ea48 080c orr.w r8, r8, ip 8021162: 4639 mov r1, r7 8021164: fa02 f904 lsl.w r9, r2, r4 8021168: f8cd 900c str.w r9, [sp, #12] 802116c: f000 fa68 bl 8021640 <__aeabi_uidiv> 8021170: 4639 mov r1, r7 8021172: 4681 mov r9, r0 8021174: 4658 mov r0, fp 8021176: f000 fb91 bl 802189c <__aeabi_uidivmod> 802117a: fa1f fc8a uxth.w ip, sl 802117e: ea4f 4318 mov.w r3, r8, lsr #16 8021182: fb0c f009 mul.w r0, ip, r9 8021186: ea43 4301 orr.w r3, r3, r1, lsl #16 802118a: 4298 cmp r0, r3 802118c: d90c bls.n 80211a8 <__divdi3+0x1ec> 802118e: eb13 030a adds.w r3, r3, sl 8021192: f109 31ff add.w r1, r9, #4294967295 8021196: f080 80c3 bcs.w 8021320 <__divdi3+0x364> 802119a: 4298 cmp r0, r3 802119c: bf84 itt hi 802119e: f1a9 0902 subhi.w r9, r9, #2 80211a2: 4453 addhi r3, sl 80211a4: f240 80bc bls.w 8021320 <__divdi3+0x364> 80211a8: 1a1b subs r3, r3, r0 80211aa: 4639 mov r1, r7 80211ac: 4618 mov r0, r3 80211ae: f8cd c008 str.w ip, [sp, #8] 80211b2: 9301 str r3, [sp, #4] 80211b4: f000 fa44 bl 8021640 <__aeabi_uidiv> 80211b8: 9b01 ldr r3, [sp, #4] 80211ba: 4639 mov r1, r7 80211bc: fa1f f888 uxth.w r8, r8 80211c0: 4683 mov fp, r0 80211c2: 4618 mov r0, r3 80211c4: f000 fb6a bl 802189c <__aeabi_uidivmod> 80211c8: f8dd c008 ldr.w ip, [sp, #8] 80211cc: fb0c f30b mul.w r3, ip, fp 80211d0: ea48 4101 orr.w r1, r8, r1, lsl #16 80211d4: 428b cmp r3, r1 80211d6: d90c bls.n 80211f2 <__divdi3+0x236> 80211d8: eb11 010a adds.w r1, r1, sl 80211dc: f10b 30ff add.w r0, fp, #4294967295 80211e0: f080 809c bcs.w 802131c <__divdi3+0x360> 80211e4: 428b cmp r3, r1 80211e6: bf84 itt hi 80211e8: f1ab 0b02 subhi.w fp, fp, #2 80211ec: 4451 addhi r1, sl 80211ee: f240 8095 bls.w 802131c <__divdi3+0x360> 80211f2: 9f03 ldr r7, [sp, #12] 80211f4: ea4b 4009 orr.w r0, fp, r9, lsl #16 80211f8: 1ac9 subs r1, r1, r3 80211fa: fa1f fc80 uxth.w ip, r0 80211fe: b2ba uxth r2, r7 8021200: ea4f 4917 mov.w r9, r7, lsr #16 8021204: 0c07 lsrs r7, r0, #16 8021206: fb02 f80c mul.w r8, r2, ip 802120a: fb02 f207 mul.w r2, r2, r7 802120e: fb09 230c mla r3, r9, ip, r2 8021212: fb09 f907 mul.w r9, r9, r7 8021216: eb03 4318 add.w r3, r3, r8, lsr #16 802121a: 429a cmp r2, r3 802121c: bf88 it hi 802121e: f509 3980 addhi.w r9, r9, #65536 ; 0x10000 8021222: eb09 4913 add.w r9, r9, r3, lsr #16 8021226: 4549 cmp r1, r9 8021228: d310 bcc.n 802124c <__divdi3+0x290> 802122a: fa1f f888 uxth.w r8, r8 802122e: bf14 ite ne 8021230: 2200 movne r2, #0 8021232: 2201 moveq r2, #1 8021234: fa06 f404 lsl.w r4, r6, r4 8021238: eb08 4303 add.w r3, r8, r3, lsl #16 802123c: 429c cmp r4, r3 802123e: bf2c ite cs 8021240: 2300 movcs r3, #0 8021242: f002 0301 andcc.w r3, r2, #1 8021246: 2b00 cmp r3, #0 8021248: f43f af15 beq.w 8021076 <__divdi3+0xba> 802124c: 3801 subs r0, #1 802124e: f04f 0800 mov.w r8, #0 8021252: e718 b.n 8021086 <__divdi3+0xca> 8021254: 4252 negs r2, r2 8021256: eb63 0343 sbc.w r3, r3, r3, lsl #1 802125a: 43ed mvns r5, r5 802125c: e6b9 b.n 8020fd2 <__divdi3+0x16> 802125e: 4240 negs r0, r0 8021260: eb61 0141 sbc.w r1, r1, r1, lsl #1 8021264: f04f 35ff mov.w r5, #4294967295 8021268: e6b0 b.n 8020fcc <__divdi3+0x10> 802126a: 409c lsls r4, r3 802126c: f1c3 0b20 rsb fp, r3, #32 8021270: fa27 f80b lsr.w r8, r7, fp 8021274: fa07 f703 lsl.w r7, r7, r3 8021278: ea4f 4914 mov.w r9, r4, lsr #16 802127c: 4640 mov r0, r8 802127e: 4649 mov r1, r9 8021280: fa26 fb0b lsr.w fp, r6, fp 8021284: 409e lsls r6, r3 8021286: f000 f9db bl 8021640 <__aeabi_uidiv> 802128a: 4649 mov r1, r9 802128c: fa1f fa84 uxth.w sl, r4 8021290: ea4b 0b07 orr.w fp, fp, r7 8021294: 4603 mov r3, r0 8021296: 4640 mov r0, r8 8021298: 9301 str r3, [sp, #4] 802129a: f000 faff bl 802189c <__aeabi_uidivmod> 802129e: 9b01 ldr r3, [sp, #4] 80212a0: ea4f 421b mov.w r2, fp, lsr #16 80212a4: fb0a f003 mul.w r0, sl, r3 80212a8: ea42 4101 orr.w r1, r2, r1, lsl #16 80212ac: 4288 cmp r0, r1 80212ae: d906 bls.n 80212be <__divdi3+0x302> 80212b0: 1e5a subs r2, r3, #1 80212b2: 1909 adds r1, r1, r4 80212b4: d236 bcs.n 8021324 <__divdi3+0x368> 80212b6: 4288 cmp r0, r1 80212b8: d934 bls.n 8021324 <__divdi3+0x368> 80212ba: 3b02 subs r3, #2 80212bc: 1909 adds r1, r1, r4 80212be: 1a0f subs r7, r1, r0 80212c0: 4649 mov r1, r9 80212c2: 4638 mov r0, r7 80212c4: 9301 str r3, [sp, #4] 80212c6: f000 f9bb bl 8021640 <__aeabi_uidiv> 80212ca: 4649 mov r1, r9 80212cc: fa1f fb8b uxth.w fp, fp 80212d0: 4680 mov r8, r0 80212d2: 4638 mov r0, r7 80212d4: f000 fae2 bl 802189c <__aeabi_uidivmod> 80212d8: 9b01 ldr r3, [sp, #4] 80212da: fb0a f708 mul.w r7, sl, r8 80212de: ea4b 4101 orr.w r1, fp, r1, lsl #16 80212e2: 428f cmp r7, r1 80212e4: d90a bls.n 80212fc <__divdi3+0x340> 80212e6: 1909 adds r1, r1, r4 80212e8: f108 32ff add.w r2, r8, #4294967295 80212ec: d205 bcs.n 80212fa <__divdi3+0x33e> 80212ee: 428f cmp r7, r1 80212f0: bf84 itt hi 80212f2: f1a8 0802 subhi.w r8, r8, #2 80212f6: 1909 addhi r1, r1, r4 80212f8: d800 bhi.n 80212fc <__divdi3+0x340> 80212fa: 4690 mov r8, r2 80212fc: 1bcf subs r7, r1, r7 80212fe: ea48 4803 orr.w r8, r8, r3, lsl #16 8021302: e6dd b.n 80210c0 <__divdi3+0x104> 8021304: 2001 movs r0, #1 8021306: 4563 cmp r3, ip 8021308: bf28 it cs 802130a: 4552 cmpcs r2, sl 802130c: 46a0 mov r8, r4 802130e: f67f aeba bls.w 8021086 <__divdi3+0xca> 8021312: e6b5 b.n 8021080 <__divdi3+0xc4> 8021314: 469b mov fp, r3 8021316: e6ef b.n 80210f8 <__divdi3+0x13c> 8021318: 461f mov r7, r3 802131a: e6aa b.n 8021072 <__divdi3+0xb6> 802131c: 4683 mov fp, r0 802131e: e768 b.n 80211f2 <__divdi3+0x236> 8021320: 4689 mov r9, r1 8021322: e741 b.n 80211a8 <__divdi3+0x1ec> 8021324: 4613 mov r3, r2 8021326: e7ca b.n 80212be <__divdi3+0x302> 08021328 <__udivdi3>: 8021328: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802132c: 4606 mov r6, r0 802132e: b083 sub sp, #12 8021330: 460d mov r5, r1 8021332: 4614 mov r4, r2 8021334: 4607 mov r7, r0 8021336: 4688 mov r8, r1 8021338: 2b00 cmp r3, #0 802133a: d14a bne.n 80213d2 <__udivdi3+0xaa> 802133c: 428a cmp r2, r1 802133e: d955 bls.n 80213ec <__udivdi3+0xc4> 8021340: fab2 f382 clz r3, r2 8021344: b14b cbz r3, 802135a <__udivdi3+0x32> 8021346: f1c3 0220 rsb r2, r3, #32 802134a: fa01 f803 lsl.w r8, r1, r3 802134e: fa20 f202 lsr.w r2, r0, r2 8021352: 409c lsls r4, r3 8021354: ea42 0808 orr.w r8, r2, r8 8021358: 409f lsls r7, r3 802135a: 0c25 lsrs r5, r4, #16 802135c: 4640 mov r0, r8 802135e: 4629 mov r1, r5 8021360: fa1f fa84 uxth.w sl, r4 8021364: f000 f96c bl 8021640 <__aeabi_uidiv> 8021368: 4629 mov r1, r5 802136a: 4681 mov r9, r0 802136c: 4640 mov r0, r8 802136e: f000 fa95 bl 802189c <__aeabi_uidivmod> 8021372: 0c3b lsrs r3, r7, #16 8021374: fb0a f009 mul.w r0, sl, r9 8021378: ea43 4101 orr.w r1, r3, r1, lsl #16 802137c: 4288 cmp r0, r1 802137e: d90a bls.n 8021396 <__udivdi3+0x6e> 8021380: 1909 adds r1, r1, r4 8021382: f109 32ff add.w r2, r9, #4294967295 8021386: d205 bcs.n 8021394 <__udivdi3+0x6c> 8021388: 4288 cmp r0, r1 802138a: bf84 itt hi 802138c: f1a9 0902 subhi.w r9, r9, #2 8021390: 1909 addhi r1, r1, r4 8021392: d800 bhi.n 8021396 <__udivdi3+0x6e> 8021394: 4691 mov r9, r2 8021396: ebc0 0801 rsb r8, r0, r1 802139a: 4629 mov r1, r5 802139c: 4640 mov r0, r8 802139e: b2bf uxth r7, r7 80213a0: f000 f94e bl 8021640 <__aeabi_uidiv> 80213a4: 4629 mov r1, r5 80213a6: 4606 mov r6, r0 80213a8: 4640 mov r0, r8 80213aa: f000 fa77 bl 802189c <__aeabi_uidivmod> 80213ae: fb0a fa06 mul.w sl, sl, r6 80213b2: ea47 4101 orr.w r1, r7, r1, lsl #16 80213b6: 458a cmp sl, r1 80213b8: d907 bls.n 80213ca <__udivdi3+0xa2> 80213ba: 1e73 subs r3, r6, #1 80213bc: 190c adds r4, r1, r4 80213be: f080 8122 bcs.w 8021606 <__udivdi3+0x2de> 80213c2: 3e02 subs r6, #2 80213c4: 45a2 cmp sl, r4 80213c6: f240 811e bls.w 8021606 <__udivdi3+0x2de> 80213ca: ea46 4009 orr.w r0, r6, r9, lsl #16 80213ce: 2600 movs r6, #0 80213d0: e058 b.n 8021484 <__udivdi3+0x15c> 80213d2: 428b cmp r3, r1 80213d4: d854 bhi.n 8021480 <__udivdi3+0x158> 80213d6: fab3 f483 clz r4, r3 80213da: 2c00 cmp r4, #0 80213dc: d156 bne.n 802148c <__udivdi3+0x164> 80213de: 428b cmp r3, r1 80213e0: bf28 it cs 80213e2: 4282 cmpcs r2, r0 80213e4: d84c bhi.n 8021480 <__udivdi3+0x158> 80213e6: 4626 mov r6, r4 80213e8: 2001 movs r0, #1 80213ea: e04b b.n 8021484 <__udivdi3+0x15c> 80213ec: b922 cbnz r2, 80213f8 <__udivdi3+0xd0> 80213ee: 2001 movs r0, #1 80213f0: 4611 mov r1, r2 80213f2: f000 f925 bl 8021640 <__aeabi_uidiv> 80213f6: 4604 mov r4, r0 80213f8: fab4 f384 clz r3, r4 80213fc: 2b00 cmp r3, #0 80213fe: f040 80b9 bne.w 8021574 <__udivdi3+0x24c> 8021402: 1b2d subs r5, r5, r4 8021404: ea4f 4814 mov.w r8, r4, lsr #16 8021408: fa1f fa84 uxth.w sl, r4 802140c: 2601 movs r6, #1 802140e: 4641 mov r1, r8 8021410: 4628 mov r0, r5 8021412: f000 f915 bl 8021640 <__aeabi_uidiv> 8021416: 4641 mov r1, r8 8021418: 4681 mov r9, r0 802141a: 4628 mov r0, r5 802141c: f000 fa3e bl 802189c <__aeabi_uidivmod> 8021420: 0c3b lsrs r3, r7, #16 8021422: fb0a f009 mul.w r0, sl, r9 8021426: ea43 4101 orr.w r1, r3, r1, lsl #16 802142a: 4288 cmp r0, r1 802142c: d90b bls.n 8021446 <__udivdi3+0x11e> 802142e: 1909 adds r1, r1, r4 8021430: f109 33ff add.w r3, r9, #4294967295 8021434: f080 80e9 bcs.w 802160a <__udivdi3+0x2e2> 8021438: 4288 cmp r0, r1 802143a: bf84 itt hi 802143c: f1a9 0902 subhi.w r9, r9, #2 8021440: 1909 addhi r1, r1, r4 8021442: f240 80e2 bls.w 802160a <__udivdi3+0x2e2> 8021446: ebc0 0b01 rsb fp, r0, r1 802144a: 4641 mov r1, r8 802144c: 4658 mov r0, fp 802144e: b2bf uxth r7, r7 8021450: f000 f8f6 bl 8021640 <__aeabi_uidiv> 8021454: 4641 mov r1, r8 8021456: 4605 mov r5, r0 8021458: 4658 mov r0, fp 802145a: f000 fa1f bl 802189c <__aeabi_uidivmod> 802145e: fb0a fa05 mul.w sl, sl, r5 8021462: ea47 4101 orr.w r1, r7, r1, lsl #16 8021466: 458a cmp sl, r1 8021468: d907 bls.n 802147a <__udivdi3+0x152> 802146a: 1e6b subs r3, r5, #1 802146c: 190c adds r4, r1, r4 802146e: f080 80ce bcs.w 802160e <__udivdi3+0x2e6> 8021472: 3d02 subs r5, #2 8021474: 45a2 cmp sl, r4 8021476: f240 80ca bls.w 802160e <__udivdi3+0x2e6> 802147a: ea45 4009 orr.w r0, r5, r9, lsl #16 802147e: e001 b.n 8021484 <__udivdi3+0x15c> 8021480: 2600 movs r6, #0 8021482: 4630 mov r0, r6 8021484: 4631 mov r1, r6 8021486: b003 add sp, #12 8021488: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802148c: f1c4 0120 rsb r1, r4, #32 8021490: fa03 f304 lsl.w r3, r3, r4 8021494: fa22 f801 lsr.w r8, r2, r1 8021498: fa25 f701 lsr.w r7, r5, r1 802149c: ea48 0803 orr.w r8, r8, r3 80214a0: fa20 f101 lsr.w r1, r0, r1 80214a4: fa05 f504 lsl.w r5, r5, r4 80214a8: 4638 mov r0, r7 80214aa: ea4f 4918 mov.w r9, r8, lsr #16 80214ae: 430d orrs r5, r1 80214b0: 4649 mov r1, r9 80214b2: fa02 f204 lsl.w r2, r2, r4 80214b6: 9201 str r2, [sp, #4] 80214b8: f000 f8c2 bl 8021640 <__aeabi_uidiv> 80214bc: 4649 mov r1, r9 80214be: 4682 mov sl, r0 80214c0: 4638 mov r0, r7 80214c2: f000 f9eb bl 802189c <__aeabi_uidivmod> 80214c6: fa1f f288 uxth.w r2, r8 80214ca: 0c2f lsrs r7, r5, #16 80214cc: fb02 f00a mul.w r0, r2, sl 80214d0: ea47 4701 orr.w r7, r7, r1, lsl #16 80214d4: 42b8 cmp r0, r7 80214d6: d906 bls.n 80214e6 <__udivdi3+0x1be> 80214d8: eb17 0708 adds.w r7, r7, r8 80214dc: f10a 31ff add.w r1, sl, #4294967295 80214e0: f0c0 809f bcc.w 8021622 <__udivdi3+0x2fa> 80214e4: 468a mov sl, r1 80214e6: 1a3f subs r7, r7, r0 80214e8: 4649 mov r1, r9 80214ea: 4638 mov r0, r7 80214ec: 9200 str r2, [sp, #0] 80214ee: f000 f8a7 bl 8021640 <__aeabi_uidiv> 80214f2: 4649 mov r1, r9 80214f4: b2ad uxth r5, r5 80214f6: 4683 mov fp, r0 80214f8: 4638 mov r0, r7 80214fa: f000 f9cf bl 802189c <__aeabi_uidivmod> 80214fe: 9a00 ldr r2, [sp, #0] 8021500: fb02 f70b mul.w r7, r2, fp 8021504: ea45 4101 orr.w r1, r5, r1, lsl #16 8021508: 428f cmp r7, r1 802150a: d905 bls.n 8021518 <__udivdi3+0x1f0> 802150c: eb11 0108 adds.w r1, r1, r8 8021510: f10b 32ff add.w r2, fp, #4294967295 8021514: d37d bcc.n 8021612 <__udivdi3+0x2ea> 8021516: 4693 mov fp, r2 8021518: 9b01 ldr r3, [sp, #4] 802151a: ea4b 400a orr.w r0, fp, sl, lsl #16 802151e: 1bc9 subs r1, r1, r7 8021520: ea4f 4c10 mov.w ip, r0, lsr #16 8021524: b29d uxth r5, r3 8021526: ea4f 4a13 mov.w sl, r3, lsr #16 802152a: b283 uxth r3, r0 802152c: fb05 f203 mul.w r2, r5, r3 8021530: fb05 f50c mul.w r5, r5, ip 8021534: fb0a 5303 mla r3, sl, r3, r5 8021538: fb0a fa0c mul.w sl, sl, ip 802153c: eb03 4312 add.w r3, r3, r2, lsr #16 8021540: 429d cmp r5, r3 8021542: bf88 it hi 8021544: f50a 3a80 addhi.w sl, sl, #65536 ; 0x10000 8021548: eb0a 4a13 add.w sl, sl, r3, lsr #16 802154c: 4551 cmp r1, sl 802154e: d30e bcc.n 802156e <__udivdi3+0x246> 8021550: b292 uxth r2, r2 8021552: bf14 ite ne 8021554: 2100 movne r1, #0 8021556: 2101 moveq r1, #1 8021558: fa06 f604 lsl.w r6, r6, r4 802155c: eb02 4303 add.w r3, r2, r3, lsl #16 8021560: 429e cmp r6, r3 8021562: bf2c ite cs 8021564: 2600 movcs r6, #0 8021566: f001 0601 andcc.w r6, r1, #1 802156a: 2e00 cmp r6, #0 802156c: d08a beq.n 8021484 <__udivdi3+0x15c> 802156e: 3801 subs r0, #1 8021570: 2600 movs r6, #0 8021572: e787 b.n 8021484 <__udivdi3+0x15c> 8021574: 409c lsls r4, r3 8021576: f1c3 0220 rsb r2, r3, #32 802157a: fa25 fa02 lsr.w sl, r5, r2 802157e: fa26 f902 lsr.w r9, r6, r2 8021582: ea4f 4814 mov.w r8, r4, lsr #16 8021586: 4650 mov r0, sl 8021588: 4641 mov r1, r8 802158a: fa05 f503 lsl.w r5, r5, r3 802158e: fa06 f703 lsl.w r7, r6, r3 8021592: f000 f855 bl 8021640 <__aeabi_uidiv> 8021596: 4641 mov r1, r8 8021598: ea49 0905 orr.w r9, r9, r5 802159c: 4683 mov fp, r0 802159e: 4650 mov r0, sl 80215a0: f000 f97c bl 802189c <__aeabi_uidivmod> 80215a4: fa1f fa84 uxth.w sl, r4 80215a8: ea4f 4319 mov.w r3, r9, lsr #16 80215ac: fb0a f00b mul.w r0, sl, fp 80215b0: ea43 4101 orr.w r1, r3, r1, lsl #16 80215b4: 4288 cmp r0, r1 80215b6: d909 bls.n 80215cc <__udivdi3+0x2a4> 80215b8: 1909 adds r1, r1, r4 80215ba: f10b 33ff add.w r3, fp, #4294967295 80215be: d238 bcs.n 8021632 <__udivdi3+0x30a> 80215c0: 4288 cmp r0, r1 80215c2: bf84 itt hi 80215c4: f1ab 0b02 subhi.w fp, fp, #2 80215c8: 1909 addhi r1, r1, r4 80215ca: d932 bls.n 8021632 <__udivdi3+0x30a> 80215cc: 1a0d subs r5, r1, r0 80215ce: 4641 mov r1, r8 80215d0: 4628 mov r0, r5 80215d2: fa1f f989 uxth.w r9, r9 80215d6: f000 f833 bl 8021640 <__aeabi_uidiv> 80215da: 4641 mov r1, r8 80215dc: 4606 mov r6, r0 80215de: 4628 mov r0, r5 80215e0: f000 f95c bl 802189c <__aeabi_uidivmod> 80215e4: fb0a f506 mul.w r5, sl, r6 80215e8: ea49 4101 orr.w r1, r9, r1, lsl #16 80215ec: 428d cmp r5, r1 80215ee: d906 bls.n 80215fe <__udivdi3+0x2d6> 80215f0: 1e73 subs r3, r6, #1 80215f2: 1909 adds r1, r1, r4 80215f4: d21f bcs.n 8021636 <__udivdi3+0x30e> 80215f6: 428d cmp r5, r1 80215f8: d91d bls.n 8021636 <__udivdi3+0x30e> 80215fa: 3e02 subs r6, #2 80215fc: 1909 adds r1, r1, r4 80215fe: 1b4d subs r5, r1, r5 8021600: ea46 460b orr.w r6, r6, fp, lsl #16 8021604: e703 b.n 802140e <__udivdi3+0xe6> 8021606: 461e mov r6, r3 8021608: e6df b.n 80213ca <__udivdi3+0xa2> 802160a: 4699 mov r9, r3 802160c: e71b b.n 8021446 <__udivdi3+0x11e> 802160e: 461d mov r5, r3 8021610: e733 b.n 802147a <__udivdi3+0x152> 8021612: 428f cmp r7, r1 8021614: bf84 itt hi 8021616: f1ab 0b02 subhi.w fp, fp, #2 802161a: 4441 addhi r1, r8 802161c: f63f af7c bhi.w 8021518 <__udivdi3+0x1f0> 8021620: e779 b.n 8021516 <__udivdi3+0x1ee> 8021622: 42b8 cmp r0, r7 8021624: bf84 itt hi 8021626: f1aa 0a02 subhi.w sl, sl, #2 802162a: 4447 addhi r7, r8 802162c: f63f af5b bhi.w 80214e6 <__udivdi3+0x1be> 8021630: e758 b.n 80214e4 <__udivdi3+0x1bc> 8021632: 469b mov fp, r3 8021634: e7ca b.n 80215cc <__udivdi3+0x2a4> 8021636: 461e mov r6, r3 8021638: e7e1 b.n 80215fe <__udivdi3+0x2d6> 802163a: bf00 nop 802163c: 0000 movs r0, r0 802163e: 0000 movs r0, r0 08021640 <__aeabi_uidiv>: 8021640: 1e4a subs r2, r1, #1 8021642: bf08 it eq 8021644: 4770 bxeq lr 8021646: f0c0 8124 bcc.w 8021892 <__aeabi_uidiv+0x252> 802164a: 4288 cmp r0, r1 802164c: f240 8116 bls.w 802187c <__aeabi_uidiv+0x23c> 8021650: 4211 tst r1, r2 8021652: f000 8117 beq.w 8021884 <__aeabi_uidiv+0x244> 8021656: fab0 f380 clz r3, r0 802165a: fab1 f281 clz r2, r1 802165e: eba2 0303 sub.w r3, r2, r3 8021662: f1c3 031f rsb r3, r3, #31 8021666: a204 add r2, pc, #16 ; (adr r2, 8021678 <__aeabi_uidiv+0x38>) 8021668: eb02 1303 add.w r3, r2, r3, lsl #4 802166c: f04f 0200 mov.w r2, #0 8021670: 469f mov pc, r3 8021672: bf00 nop 8021674: f3af 8000 nop.w 8021678: ebb0 7fc1 cmp.w r0, r1, lsl #31 802167c: bf00 nop 802167e: eb42 0202 adc.w r2, r2, r2 8021682: bf28 it cs 8021684: eba0 70c1 subcs.w r0, r0, r1, lsl #31 8021688: ebb0 7f81 cmp.w r0, r1, lsl #30 802168c: bf00 nop 802168e: eb42 0202 adc.w r2, r2, r2 8021692: bf28 it cs 8021694: eba0 7081 subcs.w r0, r0, r1, lsl #30 8021698: ebb0 7f41 cmp.w r0, r1, lsl #29 802169c: bf00 nop 802169e: eb42 0202 adc.w r2, r2, r2 80216a2: bf28 it cs 80216a4: eba0 7041 subcs.w r0, r0, r1, lsl #29 80216a8: ebb0 7f01 cmp.w r0, r1, lsl #28 80216ac: bf00 nop 80216ae: eb42 0202 adc.w r2, r2, r2 80216b2: bf28 it cs 80216b4: eba0 7001 subcs.w r0, r0, r1, lsl #28 80216b8: ebb0 6fc1 cmp.w r0, r1, lsl #27 80216bc: bf00 nop 80216be: eb42 0202 adc.w r2, r2, r2 80216c2: bf28 it cs 80216c4: eba0 60c1 subcs.w r0, r0, r1, lsl #27 80216c8: ebb0 6f81 cmp.w r0, r1, lsl #26 80216cc: bf00 nop 80216ce: eb42 0202 adc.w r2, r2, r2 80216d2: bf28 it cs 80216d4: eba0 6081 subcs.w r0, r0, r1, lsl #26 80216d8: ebb0 6f41 cmp.w r0, r1, lsl #25 80216dc: bf00 nop 80216de: eb42 0202 adc.w r2, r2, r2 80216e2: bf28 it cs 80216e4: eba0 6041 subcs.w r0, r0, r1, lsl #25 80216e8: ebb0 6f01 cmp.w r0, r1, lsl #24 80216ec: bf00 nop 80216ee: eb42 0202 adc.w r2, r2, r2 80216f2: bf28 it cs 80216f4: eba0 6001 subcs.w r0, r0, r1, lsl #24 80216f8: ebb0 5fc1 cmp.w r0, r1, lsl #23 80216fc: bf00 nop 80216fe: eb42 0202 adc.w r2, r2, r2 8021702: bf28 it cs 8021704: eba0 50c1 subcs.w r0, r0, r1, lsl #23 8021708: ebb0 5f81 cmp.w r0, r1, lsl #22 802170c: bf00 nop 802170e: eb42 0202 adc.w r2, r2, r2 8021712: bf28 it cs 8021714: eba0 5081 subcs.w r0, r0, r1, lsl #22 8021718: ebb0 5f41 cmp.w r0, r1, lsl #21 802171c: bf00 nop 802171e: eb42 0202 adc.w r2, r2, r2 8021722: bf28 it cs 8021724: eba0 5041 subcs.w r0, r0, r1, lsl #21 8021728: ebb0 5f01 cmp.w r0, r1, lsl #20 802172c: bf00 nop 802172e: eb42 0202 adc.w r2, r2, r2 8021732: bf28 it cs 8021734: eba0 5001 subcs.w r0, r0, r1, lsl #20 8021738: ebb0 4fc1 cmp.w r0, r1, lsl #19 802173c: bf00 nop 802173e: eb42 0202 adc.w r2, r2, r2 8021742: bf28 it cs 8021744: eba0 40c1 subcs.w r0, r0, r1, lsl #19 8021748: ebb0 4f81 cmp.w r0, r1, lsl #18 802174c: bf00 nop 802174e: eb42 0202 adc.w r2, r2, r2 8021752: bf28 it cs 8021754: eba0 4081 subcs.w r0, r0, r1, lsl #18 8021758: ebb0 4f41 cmp.w r0, r1, lsl #17 802175c: bf00 nop 802175e: eb42 0202 adc.w r2, r2, r2 8021762: bf28 it cs 8021764: eba0 4041 subcs.w r0, r0, r1, lsl #17 8021768: ebb0 4f01 cmp.w r0, r1, lsl #16 802176c: bf00 nop 802176e: eb42 0202 adc.w r2, r2, r2 8021772: bf28 it cs 8021774: eba0 4001 subcs.w r0, r0, r1, lsl #16 8021778: ebb0 3fc1 cmp.w r0, r1, lsl #15 802177c: bf00 nop 802177e: eb42 0202 adc.w r2, r2, r2 8021782: bf28 it cs 8021784: eba0 30c1 subcs.w r0, r0, r1, lsl #15 8021788: ebb0 3f81 cmp.w r0, r1, lsl #14 802178c: bf00 nop 802178e: eb42 0202 adc.w r2, r2, r2 8021792: bf28 it cs 8021794: eba0 3081 subcs.w r0, r0, r1, lsl #14 8021798: ebb0 3f41 cmp.w r0, r1, lsl #13 802179c: bf00 nop 802179e: eb42 0202 adc.w r2, r2, r2 80217a2: bf28 it cs 80217a4: eba0 3041 subcs.w r0, r0, r1, lsl #13 80217a8: ebb0 3f01 cmp.w r0, r1, lsl #12 80217ac: bf00 nop 80217ae: eb42 0202 adc.w r2, r2, r2 80217b2: bf28 it cs 80217b4: eba0 3001 subcs.w r0, r0, r1, lsl #12 80217b8: ebb0 2fc1 cmp.w r0, r1, lsl #11 80217bc: bf00 nop 80217be: eb42 0202 adc.w r2, r2, r2 80217c2: bf28 it cs 80217c4: eba0 20c1 subcs.w r0, r0, r1, lsl #11 80217c8: ebb0 2f81 cmp.w r0, r1, lsl #10 80217cc: bf00 nop 80217ce: eb42 0202 adc.w r2, r2, r2 80217d2: bf28 it cs 80217d4: eba0 2081 subcs.w r0, r0, r1, lsl #10 80217d8: ebb0 2f41 cmp.w r0, r1, lsl #9 80217dc: bf00 nop 80217de: eb42 0202 adc.w r2, r2, r2 80217e2: bf28 it cs 80217e4: eba0 2041 subcs.w r0, r0, r1, lsl #9 80217e8: ebb0 2f01 cmp.w r0, r1, lsl #8 80217ec: bf00 nop 80217ee: eb42 0202 adc.w r2, r2, r2 80217f2: bf28 it cs 80217f4: eba0 2001 subcs.w r0, r0, r1, lsl #8 80217f8: ebb0 1fc1 cmp.w r0, r1, lsl #7 80217fc: bf00 nop 80217fe: eb42 0202 adc.w r2, r2, r2 8021802: bf28 it cs 8021804: eba0 10c1 subcs.w r0, r0, r1, lsl #7 8021808: ebb0 1f81 cmp.w r0, r1, lsl #6 802180c: bf00 nop 802180e: eb42 0202 adc.w r2, r2, r2 8021812: bf28 it cs 8021814: eba0 1081 subcs.w r0, r0, r1, lsl #6 8021818: ebb0 1f41 cmp.w r0, r1, lsl #5 802181c: bf00 nop 802181e: eb42 0202 adc.w r2, r2, r2 8021822: bf28 it cs 8021824: eba0 1041 subcs.w r0, r0, r1, lsl #5 8021828: ebb0 1f01 cmp.w r0, r1, lsl #4 802182c: bf00 nop 802182e: eb42 0202 adc.w r2, r2, r2 8021832: bf28 it cs 8021834: eba0 1001 subcs.w r0, r0, r1, lsl #4 8021838: ebb0 0fc1 cmp.w r0, r1, lsl #3 802183c: bf00 nop 802183e: eb42 0202 adc.w r2, r2, r2 8021842: bf28 it cs 8021844: eba0 00c1 subcs.w r0, r0, r1, lsl #3 8021848: ebb0 0f81 cmp.w r0, r1, lsl #2 802184c: bf00 nop 802184e: eb42 0202 adc.w r2, r2, r2 8021852: bf28 it cs 8021854: eba0 0081 subcs.w r0, r0, r1, lsl #2 8021858: ebb0 0f41 cmp.w r0, r1, lsl #1 802185c: bf00 nop 802185e: eb42 0202 adc.w r2, r2, r2 8021862: bf28 it cs 8021864: eba0 0041 subcs.w r0, r0, r1, lsl #1 8021868: ebb0 0f01 cmp.w r0, r1 802186c: bf00 nop 802186e: eb42 0202 adc.w r2, r2, r2 8021872: bf28 it cs 8021874: eba0 0001 subcs.w r0, r0, r1 8021878: 4610 mov r0, r2 802187a: 4770 bx lr 802187c: bf0c ite eq 802187e: 2001 moveq r0, #1 8021880: 2000 movne r0, #0 8021882: 4770 bx lr 8021884: fab1 f281 clz r2, r1 8021888: f1c2 021f rsb r2, r2, #31 802188c: fa20 f002 lsr.w r0, r0, r2 8021890: 4770 bx lr 8021892: b108 cbz r0, 8021898 <__aeabi_uidiv+0x258> 8021894: f04f 30ff mov.w r0, #4294967295 8021898: f7ff bb8e b.w 8020fb8 <__aeabi_idiv0> 0802189c <__aeabi_uidivmod>: 802189c: 2900 cmp r1, #0 802189e: d0f8 beq.n 8021892 <__aeabi_uidiv+0x252> 80218a0: e92d 4003 stmdb sp!, {r0, r1, lr} 80218a4: f7ff fecc bl 8021640 <__aeabi_uidiv> 80218a8: e8bd 4006 ldmia.w sp!, {r1, r2, lr} 80218ac: fb02 f300 mul.w r3, r2, r0 80218b0: eba1 0103 sub.w r1, r1, r3 80218b4: 4770 bx lr 80218b6: bf00 nop 080218b8 : 80218b8: 2100 movs r1, #0 80218ba: f001 bde7 b.w 802348c 80218be: bf00 nop 080218c0 : 80218c0: 2100 movs r1, #0 80218c2: 220a movs r2, #10 80218c4: f001 bee2 b.w 802368c 080218c8 <_atoi_r>: 80218c8: 2200 movs r2, #0 80218ca: 230a movs r3, #10 80218cc: f001 be3c b.w 8023548 <_strtol_r> 080218d0 <__libc_init_array>: 80218d0: b570 push {r4, r5, r6, lr} 80218d2: f645 2638 movw r6, #23096 ; 0x5a38 80218d6: f645 2538 movw r5, #23096 ; 0x5a38 80218da: f6c0 0604 movt r6, #2052 ; 0x804 80218de: f6c0 0504 movt r5, #2052 ; 0x804 80218e2: 1b76 subs r6, r6, r5 80218e4: 10b6 asrs r6, r6, #2 80218e6: d007 beq.n 80218f8 <__libc_init_array+0x28> 80218e8: 3d04 subs r5, #4 80218ea: 2400 movs r4, #0 80218ec: f855 3f04 ldr.w r3, [r5, #4]! 80218f0: 3401 adds r4, #1 80218f2: 4798 blx r3 80218f4: 42a6 cmp r6, r4 80218f6: d1f9 bne.n 80218ec <__libc_init_array+0x1c> 80218f8: f645 263c movw r6, #23100 ; 0x5a3c 80218fc: f645 2538 movw r5, #23096 ; 0x5a38 8021900: f6c0 0604 movt r6, #2052 ; 0x804 8021904: f6c0 0504 movt r5, #2052 ; 0x804 8021908: 1b76 subs r6, r6, r5 802190a: f024 f885 bl 8045a18 <_init> 802190e: 10b6 asrs r6, r6, #2 8021910: d008 beq.n 8021924 <__libc_init_array+0x54> 8021912: 3d04 subs r5, #4 8021914: 2400 movs r4, #0 8021916: f855 3f04 ldr.w r3, [r5, #4]! 802191a: 3401 adds r4, #1 802191c: 4798 blx r3 802191e: 42a6 cmp r6, r4 8021920: d1f9 bne.n 8021916 <__libc_init_array+0x46> 8021922: bd70 pop {r4, r5, r6, pc} 8021924: bd70 pop {r4, r5, r6, pc} 8021926: bf00 nop 08021928 : 8021928: 2a03 cmp r2, #3 802192a: b470 push {r4, r5, r6} 802192c: d922 bls.n 8021974 802192e: ea41 0300 orr.w r3, r1, r0 8021932: 079b lsls r3, r3, #30 8021934: d013 beq.n 802195e 8021936: 7805 ldrb r5, [r0, #0] 8021938: 3a01 subs r2, #1 802193a: 780c ldrb r4, [r1, #0] 802193c: 2300 movs r3, #0 802193e: 42a5 cmp r5, r4 8021940: d006 beq.n 8021950 8021942: e01b b.n 802197c 8021944: f810 5f01 ldrb.w r5, [r0, #1]! 8021948: f811 4f01 ldrb.w r4, [r1, #1]! 802194c: 42a5 cmp r5, r4 802194e: d115 bne.n 802197c 8021950: 4293 cmp r3, r2 8021952: f103 0301 add.w r3, r3, #1 8021956: d1f5 bne.n 8021944 8021958: 2000 movs r0, #0 802195a: bc70 pop {r4, r5, r6} 802195c: 4770 bx lr 802195e: 460c mov r4, r1 8021960: 4603 mov r3, r0 8021962: 3104 adds r1, #4 8021964: 3004 adds r0, #4 8021966: 681e ldr r6, [r3, #0] 8021968: 6825 ldr r5, [r4, #0] 802196a: 42ae cmp r6, r5 802196c: d108 bne.n 8021980 802196e: 3a04 subs r2, #4 8021970: 2a03 cmp r2, #3 8021972: d8f4 bhi.n 802195e 8021974: 2a00 cmp r2, #0 8021976: d1de bne.n 8021936 8021978: 4610 mov r0, r2 802197a: e7ee b.n 802195a 802197c: 1b28 subs r0, r5, r4 802197e: e7ec b.n 802195a 8021980: 4621 mov r1, r4 8021982: 4618 mov r0, r3 8021984: 2a00 cmp r2, #0 8021986: d1d6 bne.n 8021936 8021988: e7f6 b.n 8021978 802198a: bf00 nop 0802198c : 802198c: 2a03 cmp r2, #3 802198e: e92d 0ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp} 8021992: d809 bhi.n 80219a8 8021994: b12a cbz r2, 80219a2 8021996: 2300 movs r3, #0 8021998: 5ccc ldrb r4, [r1, r3] 802199a: 54c4 strb r4, [r0, r3] 802199c: 3301 adds r3, #1 802199e: 4293 cmp r3, r2 80219a0: d1fa bne.n 8021998 80219a2: e8bd 0ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp} 80219a6: 4770 bx lr 80219a8: 0783 lsls r3, r0, #30 80219aa: 4402 add r2, r0 80219ac: d00e beq.n 80219cc 80219ae: 1c44 adds r4, r0, #1 80219b0: 1c4d adds r5, r1, #1 80219b2: f815 7c01 ldrb.w r7, [r5, #-1] 80219b6: f004 0603 and.w r6, r4, #3 80219ba: 4623 mov r3, r4 80219bc: 3401 adds r4, #1 80219be: 4629 mov r1, r5 80219c0: 3501 adds r5, #1 80219c2: f804 7c02 strb.w r7, [r4, #-2] 80219c6: 2e00 cmp r6, #0 80219c8: d1f3 bne.n 80219b2 80219ca: e000 b.n 80219ce 80219cc: 4603 mov r3, r0 80219ce: f011 0403 ands.w r4, r1, #3 80219d2: d06d beq.n 8021ab0 80219d4: 1ad7 subs r7, r2, r3 80219d6: 1b0d subs r5, r1, r4 80219d8: 2f03 cmp r7, #3 80219da: 682e ldr r6, [r5, #0] 80219dc: dd19 ble.n 8021a12 80219de: f1c4 0c04 rsb ip, r4, #4 80219e2: ea4f 08c4 mov.w r8, r4, lsl #3 80219e6: 1d1c adds r4, r3, #4 80219e8: ea4f 0ccc mov.w ip, ip, lsl #3 80219ec: f855 7f04 ldr.w r7, [r5, #4]! 80219f0: ebc4 0902 rsb r9, r4, r2 80219f4: 4623 mov r3, r4 80219f6: 3104 adds r1, #4 80219f8: 3404 adds r4, #4 80219fa: f1b9 0f03 cmp.w r9, #3 80219fe: fa26 fa08 lsr.w sl, r6, r8 8021a02: fa07 fb0c lsl.w fp, r7, ip 8021a06: 463e mov r6, r7 8021a08: ea4b 070a orr.w r7, fp, sl 8021a0c: f844 7c08 str.w r7, [r4, #-8] 8021a10: dcec bgt.n 80219ec 8021a12: 429a cmp r2, r3 8021a14: d9c5 bls.n 80219a2 8021a16: 3301 adds r3, #1 8021a18: 3101 adds r1, #1 8021a1a: 3201 adds r2, #1 8021a1c: f811 4c01 ldrb.w r4, [r1, #-1] 8021a20: 3301 adds r3, #1 8021a22: 3101 adds r1, #1 8021a24: 4293 cmp r3, r2 8021a26: f803 4c02 strb.w r4, [r3, #-2] 8021a2a: d1f7 bne.n 8021a1c 8021a2c: e7b9 b.n 80219a2 8021a2e: 680c ldr r4, [r1, #0] 8021a30: 3340 adds r3, #64 ; 0x40 8021a32: 3140 adds r1, #64 ; 0x40 8021a34: f843 4c40 str.w r4, [r3, #-64] 8021a38: f851 4c3c ldr.w r4, [r1, #-60] 8021a3c: f843 4c3c str.w r4, [r3, #-60] 8021a40: f851 4c38 ldr.w r4, [r1, #-56] 8021a44: f843 4c38 str.w r4, [r3, #-56] 8021a48: f851 4c34 ldr.w r4, [r1, #-52] 8021a4c: f843 4c34 str.w r4, [r3, #-52] 8021a50: f851 4c30 ldr.w r4, [r1, #-48] 8021a54: f843 4c30 str.w r4, [r3, #-48] 8021a58: f851 4c2c ldr.w r4, [r1, #-44] 8021a5c: f843 4c2c str.w r4, [r3, #-44] 8021a60: f851 4c28 ldr.w r4, [r1, #-40] 8021a64: f843 4c28 str.w r4, [r3, #-40] 8021a68: f851 4c24 ldr.w r4, [r1, #-36] 8021a6c: f843 4c24 str.w r4, [r3, #-36] 8021a70: f851 4c20 ldr.w r4, [r1, #-32] 8021a74: f843 4c20 str.w r4, [r3, #-32] 8021a78: f851 4c1c ldr.w r4, [r1, #-28] 8021a7c: f843 4c1c str.w r4, [r3, #-28] 8021a80: f851 4c18 ldr.w r4, [r1, #-24] 8021a84: f843 4c18 str.w r4, [r3, #-24] 8021a88: f851 4c14 ldr.w r4, [r1, #-20] 8021a8c: f843 4c14 str.w r4, [r3, #-20] 8021a90: f851 4c10 ldr.w r4, [r1, #-16] 8021a94: f843 4c10 str.w r4, [r3, #-16] 8021a98: f851 4c0c ldr.w r4, [r1, #-12] 8021a9c: f843 4c0c str.w r4, [r3, #-12] 8021aa0: f851 4c08 ldr.w r4, [r1, #-8] 8021aa4: f843 4c08 str.w r4, [r3, #-8] 8021aa8: f851 4c04 ldr.w r4, [r1, #-4] 8021aac: f843 4c04 str.w r4, [r3, #-4] 8021ab0: 1ad4 subs r4, r2, r3 8021ab2: 2c3f cmp r4, #63 ; 0x3f 8021ab4: dcbb bgt.n 8021a2e 8021ab6: e011 b.n 8021adc 8021ab8: 680c ldr r4, [r1, #0] 8021aba: 3310 adds r3, #16 8021abc: 3110 adds r1, #16 8021abe: f843 4c10 str.w r4, [r3, #-16] 8021ac2: f851 4c0c ldr.w r4, [r1, #-12] 8021ac6: f843 4c0c str.w r4, [r3, #-12] 8021aca: f851 4c08 ldr.w r4, [r1, #-8] 8021ace: f843 4c08 str.w r4, [r3, #-8] 8021ad2: f851 4c04 ldr.w r4, [r1, #-4] 8021ad6: f843 4c04 str.w r4, [r3, #-4] 8021ada: 1ad4 subs r4, r2, r3 8021adc: 2c0f cmp r4, #15 8021ade: dceb bgt.n 8021ab8 8021ae0: 2c03 cmp r4, #3 8021ae2: dd96 ble.n 8021a12 8021ae4: 1d1c adds r4, r3, #4 8021ae6: 1d0d adds r5, r1, #4 8021ae8: f855 7c04 ldr.w r7, [r5, #-4] 8021aec: 1b16 subs r6, r2, r4 8021aee: 4623 mov r3, r4 8021af0: 4629 mov r1, r5 8021af2: 3404 adds r4, #4 8021af4: 3504 adds r5, #4 8021af6: 2e03 cmp r6, #3 8021af8: f844 7c08 str.w r7, [r4, #-8] 8021afc: dcf4 bgt.n 8021ae8 8021afe: e788 b.n 8021a12 08021b00 : 8021b00: 2a03 cmp r2, #3 8021b02: b2c9 uxtb r1, r1 8021b04: b470 push {r4, r5, r6} 8021b06: d808 bhi.n 8021b1a 8021b08: b12a cbz r2, 8021b16 8021b0a: 4603 mov r3, r0 8021b0c: 1812 adds r2, r2, r0 8021b0e: f803 1b01 strb.w r1, [r3], #1 8021b12: 4293 cmp r3, r2 8021b14: d1fb bne.n 8021b0e 8021b16: bc70 pop {r4, r5, r6} 8021b18: 4770 bx lr 8021b1a: 0783 lsls r3, r0, #30 8021b1c: 4402 add r2, r0 8021b1e: d009 beq.n 8021b34 8021b20: 1c44 adds r4, r0, #1 8021b22: f004 0503 and.w r5, r4, #3 8021b26: 4623 mov r3, r4 8021b28: f804 1c01 strb.w r1, [r4, #-1] 8021b2c: 3401 adds r4, #1 8021b2e: 2d00 cmp r5, #0 8021b30: d1f7 bne.n 8021b22 8021b32: e000 b.n 8021b36 8021b34: 4603 mov r3, r0 8021b36: 1ad5 subs r5, r2, r3 8021b38: eb01 2401 add.w r4, r1, r1, lsl #8 8021b3c: 2d3f cmp r5, #63 ; 0x3f 8021b3e: eb04 4404 add.w r4, r4, r4, lsl #16 8021b42: dd2c ble.n 8021b9e 8021b44: 601c str r4, [r3, #0] 8021b46: 3340 adds r3, #64 ; 0x40 8021b48: 1ad5 subs r5, r2, r3 8021b4a: f843 4c3c str.w r4, [r3, #-60] 8021b4e: 2d3f cmp r5, #63 ; 0x3f 8021b50: f843 4c38 str.w r4, [r3, #-56] 8021b54: f843 4c34 str.w r4, [r3, #-52] 8021b58: f843 4c30 str.w r4, [r3, #-48] 8021b5c: f843 4c2c str.w r4, [r3, #-44] 8021b60: f843 4c28 str.w r4, [r3, #-40] 8021b64: f843 4c24 str.w r4, [r3, #-36] 8021b68: f843 4c20 str.w r4, [r3, #-32] 8021b6c: f843 4c1c str.w r4, [r3, #-28] 8021b70: f843 4c18 str.w r4, [r3, #-24] 8021b74: f843 4c14 str.w r4, [r3, #-20] 8021b78: f843 4c10 str.w r4, [r3, #-16] 8021b7c: f843 4c0c str.w r4, [r3, #-12] 8021b80: f843 4c08 str.w r4, [r3, #-8] 8021b84: f843 4c04 str.w r4, [r3, #-4] 8021b88: dcdc bgt.n 8021b44 8021b8a: e008 b.n 8021b9e 8021b8c: 601c str r4, [r3, #0] 8021b8e: 3310 adds r3, #16 8021b90: 1ad5 subs r5, r2, r3 8021b92: f843 4c0c str.w r4, [r3, #-12] 8021b96: f843 4c08 str.w r4, [r3, #-8] 8021b9a: f843 4c04 str.w r4, [r3, #-4] 8021b9e: 2d0f cmp r5, #15 8021ba0: dcf4 bgt.n 8021b8c 8021ba2: 2d03 cmp r5, #3 8021ba4: dd08 ble.n 8021bb8 8021ba6: 1d1d adds r5, r3, #4 8021ba8: 1b56 subs r6, r2, r5 8021baa: f845 4c04 str.w r4, [r5, #-4] 8021bae: 2e03 cmp r6, #3 8021bb0: 462b mov r3, r5 8021bb2: f105 0504 add.w r5, r5, #4 8021bb6: dcf7 bgt.n 8021ba8 8021bb8: 429a cmp r2, r3 8021bba: d9ac bls.n 8021b16 8021bbc: 3301 adds r3, #1 8021bbe: 3201 adds r2, #1 8021bc0: f803 1c01 strb.w r1, [r3, #-1] 8021bc4: 3301 adds r3, #1 8021bc6: 4293 cmp r3, r2 8021bc8: d1fa bne.n 8021bc0 8021bca: e7a4 b.n 8021b16 08021bcc : 8021bcc: 0783 lsls r3, r0, #30 8021bce: b570 push {r4, r5, r6, lr} 8021bd0: 4606 mov r6, r0 8021bd2: d114 bne.n 8021bfe 8021bd4: 6803 ldr r3, [r0, #0] 8021bd6: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 8021bda: ea22 0303 bic.w r3, r2, r3 8021bde: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 8021be2: d10c bne.n 8021bfe 8021be4: 1d03 adds r3, r0, #4 8021be6: 461a mov r2, r3 8021be8: f853 4b04 ldr.w r4, [r3], #4 8021bec: f1a4 3501 sub.w r5, r4, #16843009 ; 0x1010101 8021bf0: ea25 0404 bic.w r4, r5, r4 8021bf4: f014 3f80 tst.w r4, #2155905152 ; 0x80808080 8021bf8: d0f5 beq.n 8021be6 8021bfa: 4610 mov r0, r2 8021bfc: e000 b.n 8021c00 8021bfe: 4630 mov r0, r6 8021c00: 7803 ldrb r3, [r0, #0] 8021c02: b12b cbz r3, 8021c10 8021c04: 1c43 adds r3, r0, #1 8021c06: 4618 mov r0, r3 8021c08: 3301 adds r3, #1 8021c0a: 7804 ldrb r4, [r0, #0] 8021c0c: 2c00 cmp r4, #0 8021c0e: d1fa bne.n 8021c06 8021c10: f000 f8f0 bl 8021df4 8021c14: 4630 mov r0, r6 8021c16: bd70 pop {r4, r5, r6, pc} 08021c18 : 8021c18: ea80 0201 eor.w r2, r0, r1 8021c1c: f012 0f03 tst.w r2, #3 8021c20: f040 803a bne.w 8021c98 8021c24: f010 0203 ands.w r2, r0, #3 8021c28: f020 0003 bic.w r0, r0, #3 8021c2c: f021 0103 bic.w r1, r1, #3 8021c30: f850 cb04 ldr.w ip, [r0], #4 8021c34: bf08 it eq 8021c36: f851 3b04 ldreq.w r3, [r1], #4 8021c3a: d00d beq.n 8021c58 8021c3c: f082 0203 eor.w r2, r2, #3 8021c40: ea4f 02c2 mov.w r2, r2, lsl #3 8021c44: f06f 437f mvn.w r3, #4278190080 ; 0xff000000 8021c48: fa23 f202 lsr.w r2, r3, r2 8021c4c: f851 3b04 ldr.w r3, [r1], #4 8021c50: ea4c 0c02 orr.w ip, ip, r2 8021c54: ea43 0302 orr.w r3, r3, r2 8021c58: f1ac 3201 sub.w r2, ip, #16843009 ; 0x1010101 8021c5c: 459c cmp ip, r3 8021c5e: bf01 itttt eq 8021c60: ea22 020c biceq.w r2, r2, ip 8021c64: f012 3f80 tsteq.w r2, #2155905152 ; 0x80808080 8021c68: f850 cb04 ldreq.w ip, [r0], #4 8021c6c: f851 3b04 ldreq.w r3, [r1], #4 8021c70: d0f2 beq.n 8021c58 8021c72: ea4f 600c mov.w r0, ip, lsl #24 8021c76: ea4f 2c1c mov.w ip, ip, lsr #8 8021c7a: 2801 cmp r0, #1 8021c7c: bf28 it cs 8021c7e: ebb0 6f03 cmpcs.w r0, r3, lsl #24 8021c82: bf08 it eq 8021c84: 0a1b lsreq r3, r3, #8 8021c86: d0f4 beq.n 8021c72 8021c88: f003 03ff and.w r3, r3, #255 ; 0xff 8021c8c: ea4f 6010 mov.w r0, r0, lsr #24 8021c90: eba0 0003 sub.w r0, r0, r3 8021c94: 4770 bx lr 8021c96: bf00 nop 08021c98 : 8021c98: f010 0f03 tst.w r0, #3 8021c9c: d00a beq.n 8021cb4 8021c9e: f810 2b01 ldrb.w r2, [r0], #1 8021ca2: f811 3b01 ldrb.w r3, [r1], #1 8021ca6: 2a01 cmp r2, #1 8021ca8: bf28 it cs 8021caa: 429a cmpcs r2, r3 8021cac: d0f4 beq.n 8021c98 8021cae: eba2 0003 sub.w r0, r2, r3 8021cb2: 4770 bx lr 8021cb4: f84d 5d04 str.w r5, [sp, #-4]! 8021cb8: f84d 4d04 str.w r4, [sp, #-4]! 8021cbc: f04f 0201 mov.w r2, #1 8021cc0: ea42 2202 orr.w r2, r2, r2, lsl #8 8021cc4: ea42 4202 orr.w r2, r2, r2, lsl #16 8021cc8: f001 0c03 and.w ip, r1, #3 8021ccc: f021 0103 bic.w r1, r1, #3 8021cd0: f850 4b04 ldr.w r4, [r0], #4 8021cd4: f851 5b04 ldr.w r5, [r1], #4 8021cd8: f1bc 0f02 cmp.w ip, #2 8021cdc: d026 beq.n 8021d2c 8021cde: d84b bhi.n 8021d78 8021ce0: f024 4c7f bic.w ip, r4, #4278190080 ; 0xff000000 8021ce4: ebbc 2f15 cmp.w ip, r5, lsr #8 8021ce8: eba4 0302 sub.w r3, r4, r2 8021cec: ea23 0304 bic.w r3, r3, r4 8021cf0: d10d bne.n 8021d0e 8021cf2: ea13 13c2 ands.w r3, r3, r2, lsl #7 8021cf6: bf08 it eq 8021cf8: f851 5b04 ldreq.w r5, [r1], #4 8021cfc: d10a bne.n 8021d14 8021cfe: ea8c 0c04 eor.w ip, ip, r4 8021d02: ebbc 6f05 cmp.w ip, r5, lsl #24 8021d06: d10c bne.n 8021d22 8021d08: f850 4b04 ldr.w r4, [r0], #4 8021d0c: e7e8 b.n 8021ce0 8021d0e: ea4f 2515 mov.w r5, r5, lsr #8 8021d12: e05c b.n 8021dce 8021d14: f033 437f bics.w r3, r3, #4278190080 ; 0xff000000 8021d18: d152 bne.n 8021dc0 8021d1a: 780d ldrb r5, [r1, #0] 8021d1c: ea4f 6c14 mov.w ip, r4, lsr #24 8021d20: e055 b.n 8021dce 8021d22: ea4f 6c14 mov.w ip, r4, lsr #24 8021d26: f005 05ff and.w r5, r5, #255 ; 0xff 8021d2a: e050 b.n 8021dce 8021d2c: ea4f 4c04 mov.w ip, r4, lsl #16 8021d30: eba4 0302 sub.w r3, r4, r2 8021d34: ea4f 4c1c mov.w ip, ip, lsr #16 8021d38: ea23 0304 bic.w r3, r3, r4 8021d3c: ebbc 4f15 cmp.w ip, r5, lsr #16 8021d40: d117 bne.n 8021d72 8021d42: ea13 13c2 ands.w r3, r3, r2, lsl #7 8021d46: bf08 it eq 8021d48: f851 5b04 ldreq.w r5, [r1], #4 8021d4c: d107 bne.n 8021d5e 8021d4e: ea8c 0c04 eor.w ip, ip, r4 8021d52: ebbc 4f05 cmp.w ip, r5, lsl #16 8021d56: d108 bne.n 8021d6a 8021d58: f850 4b04 ldr.w r4, [r0], #4 8021d5c: e7e6 b.n 8021d2c 8021d5e: 041b lsls r3, r3, #16 8021d60: d12e bne.n 8021dc0 8021d62: 880d ldrh r5, [r1, #0] 8021d64: ea4f 4c14 mov.w ip, r4, lsr #16 8021d68: e031 b.n 8021dce 8021d6a: ea4f 4505 mov.w r5, r5, lsl #16 8021d6e: ea4f 4c14 mov.w ip, r4, lsr #16 8021d72: ea4f 4515 mov.w r5, r5, lsr #16 8021d76: e02a b.n 8021dce 8021d78: f004 0cff and.w ip, r4, #255 ; 0xff 8021d7c: ebbc 6f15 cmp.w ip, r5, lsr #24 8021d80: eba4 0302 sub.w r3, r4, r2 8021d84: ea23 0304 bic.w r3, r3, r4 8021d88: d10d bne.n 8021da6 8021d8a: ea13 13c2 ands.w r3, r3, r2, lsl #7 8021d8e: bf08 it eq 8021d90: f851 5b04 ldreq.w r5, [r1], #4 8021d94: d10a bne.n 8021dac 8021d96: ea8c 0c04 eor.w ip, ip, r4 8021d9a: ebbc 2f05 cmp.w ip, r5, lsl #8 8021d9e: d10a bne.n 8021db6 8021da0: f850 4b04 ldr.w r4, [r0], #4 8021da4: e7e8 b.n 8021d78 8021da6: ea4f 6515 mov.w r5, r5, lsr #24 8021daa: e010 b.n 8021dce 8021dac: f014 0fff tst.w r4, #255 ; 0xff 8021db0: d006 beq.n 8021dc0 8021db2: f851 5b04 ldr.w r5, [r1], #4 8021db6: ea4f 2c14 mov.w ip, r4, lsr #8 8021dba: f025 457f bic.w r5, r5, #4278190080 ; 0xff000000 8021dbe: e006 b.n 8021dce 8021dc0: f04f 0000 mov.w r0, #0 8021dc4: f85d 4b04 ldr.w r4, [sp], #4 8021dc8: f85d 5b04 ldr.w r5, [sp], #4 8021dcc: 4770 bx lr 8021dce: f00c 02ff and.w r2, ip, #255 ; 0xff 8021dd2: f005 00ff and.w r0, r5, #255 ; 0xff 8021dd6: 2801 cmp r0, #1 8021dd8: bf28 it cs 8021dda: 4290 cmpcs r0, r2 8021ddc: bf04 itt eq 8021dde: ea4f 2c1c moveq.w ip, ip, lsr #8 8021de2: 0a2d lsreq r5, r5, #8 8021de4: d0f3 beq.n 8021dce 8021de6: eba2 0000 sub.w r0, r2, r0 8021dea: f85d 4b04 ldr.w r4, [sp], #4 8021dee: f85d 5b04 ldr.w r5, [sp], #4 8021df2: 4770 bx lr 08021df4 : 8021df4: ea80 0201 eor.w r2, r0, r1 8021df8: 4684 mov ip, r0 8021dfa: f012 0f03 tst.w r2, #3 8021dfe: d14f bne.n 8021ea0 8021e00: f011 0f03 tst.w r1, #3 8021e04: d132 bne.n 8021e6c 8021e06: f84d 4d04 str.w r4, [sp, #-4]! 8021e0a: f011 0f04 tst.w r1, #4 8021e0e: f851 3b04 ldr.w r3, [r1], #4 8021e12: d00b beq.n 8021e2c 8021e14: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 8021e18: 439a bics r2, r3 8021e1a: f012 3f80 tst.w r2, #2155905152 ; 0x80808080 8021e1e: bf04 itt eq 8021e20: f84c 3b04 streq.w r3, [ip], #4 8021e24: f851 3b04 ldreq.w r3, [r1], #4 8021e28: d116 bne.n 8021e58 8021e2a: bf00 nop 8021e2c: f851 4b04 ldr.w r4, [r1], #4 8021e30: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 8021e34: 439a bics r2, r3 8021e36: f012 3f80 tst.w r2, #2155905152 ; 0x80808080 8021e3a: f1a4 3201 sub.w r2, r4, #16843009 ; 0x1010101 8021e3e: d10b bne.n 8021e58 8021e40: f84c 3b04 str.w r3, [ip], #4 8021e44: 43a2 bics r2, r4 8021e46: f012 3f80 tst.w r2, #2155905152 ; 0x80808080 8021e4a: bf04 itt eq 8021e4c: f851 3b04 ldreq.w r3, [r1], #4 8021e50: f84c 4b04 streq.w r4, [ip], #4 8021e54: d0ea beq.n 8021e2c 8021e56: 4623 mov r3, r4 8021e58: f80c 3b01 strb.w r3, [ip], #1 8021e5c: f013 0fff tst.w r3, #255 ; 0xff 8021e60: ea4f 2333 mov.w r3, r3, ror #8 8021e64: d1f8 bne.n 8021e58 8021e66: f85d 4b04 ldr.w r4, [sp], #4 8021e6a: 4770 bx lr 8021e6c: f011 0f01 tst.w r1, #1 8021e70: d006 beq.n 8021e80 8021e72: f811 2b01 ldrb.w r2, [r1], #1 8021e76: f80c 2b01 strb.w r2, [ip], #1 8021e7a: 2a00 cmp r2, #0 8021e7c: bf08 it eq 8021e7e: 4770 bxeq lr 8021e80: f011 0f02 tst.w r1, #2 8021e84: d0bf beq.n 8021e06 8021e86: f831 2b02 ldrh.w r2, [r1], #2 8021e8a: f012 0fff tst.w r2, #255 ; 0xff 8021e8e: bf16 itet ne 8021e90: f82c 2b02 strhne.w r2, [ip], #2 8021e94: f88c 2000 strbeq.w r2, [ip] 8021e98: f412 4f7f tstne.w r2, #65280 ; 0xff00 8021e9c: d1b3 bne.n 8021e06 8021e9e: 4770 bx lr 8021ea0: f811 2b01 ldrb.w r2, [r1], #1 8021ea4: f80c 2b01 strb.w r2, [ip], #1 8021ea8: 2a00 cmp r2, #0 8021eaa: d1f9 bne.n 8021ea0 8021eac: 4770 bx lr 8021eae: bf00 nop 08021eb0 : 8021eb0: f020 0103 bic.w r1, r0, #3 8021eb4: f010 0003 ands.w r0, r0, #3 8021eb8: f1c0 0000 rsb r0, r0, #0 8021ebc: f851 3b04 ldr.w r3, [r1], #4 8021ec0: f100 0c04 add.w ip, r0, #4 8021ec4: ea4f 0ccc mov.w ip, ip, lsl #3 8021ec8: f06f 0200 mvn.w r2, #0 8021ecc: bf1c itt ne 8021ece: fa22 f20c lsrne.w r2, r2, ip 8021ed2: 4313 orrne r3, r2 8021ed4: f04f 0c01 mov.w ip, #1 8021ed8: ea4c 2c0c orr.w ip, ip, ip, lsl #8 8021edc: ea4c 4c0c orr.w ip, ip, ip, lsl #16 8021ee0: eba3 020c sub.w r2, r3, ip 8021ee4: ea22 0203 bic.w r2, r2, r3 8021ee8: ea12 12cc ands.w r2, r2, ip, lsl #7 8021eec: bf04 itt eq 8021eee: f851 3b04 ldreq.w r3, [r1], #4 8021ef2: 3004 addeq r0, #4 8021ef4: d0f4 beq.n 8021ee0 8021ef6: f013 0fff tst.w r3, #255 ; 0xff 8021efa: bf1f itttt ne 8021efc: 3001 addne r0, #1 8021efe: f413 4f7f tstne.w r3, #65280 ; 0xff00 8021f02: 3001 addne r0, #1 8021f04: f413 0f7f tstne.w r3, #16711680 ; 0xff0000 8021f08: bf18 it ne 8021f0a: 3001 addne r0, #1 8021f0c: 4770 bx lr 8021f0e: bf00 nop 08021f10 : 8021f10: 0783 lsls r3, r0, #30 8021f12: b470 push {r4, r5, r6} 8021f14: d113 bne.n 8021f3e 8021f16: 6803 ldr r3, [r0, #0] 8021f18: f1a3 3401 sub.w r4, r3, #16843009 ; 0x1010101 8021f1c: ea24 0303 bic.w r3, r4, r3 8021f20: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 8021f24: d10b bne.n 8021f3e 8021f26: 1d03 adds r3, r0, #4 8021f28: 461d mov r5, r3 8021f2a: f853 4b04 ldr.w r4, [r3], #4 8021f2e: f1a4 3601 sub.w r6, r4, #16843009 ; 0x1010101 8021f32: ea26 0404 bic.w r4, r6, r4 8021f36: f014 3f80 tst.w r4, #2155905152 ; 0x80808080 8021f3a: d0f5 beq.n 8021f28 8021f3c: e000 b.n 8021f40 8021f3e: 4605 mov r5, r0 8021f40: 782b ldrb r3, [r5, #0] 8021f42: b12b cbz r3, 8021f50 8021f44: 1c6b adds r3, r5, #1 8021f46: 461d mov r5, r3 8021f48: 3301 adds r3, #1 8021f4a: 782c ldrb r4, [r5, #0] 8021f4c: 2c00 cmp r4, #0 8021f4e: d1fa bne.n 8021f46 8021f50: 3901 subs r1, #1 8021f52: 3d01 subs r5, #1 8021f54: 1e53 subs r3, r2, #1 8021f56: b15a cbz r2, 8021f70 8021f58: f811 4f01 ldrb.w r4, [r1, #1]! 8021f5c: 461a mov r2, r3 8021f5e: f805 4f01 strb.w r4, [r5, #1]! 8021f62: b12c cbz r4, 8021f70 8021f64: 2b00 cmp r3, #0 8021f66: d1f5 bne.n 8021f54 8021f68: 706b strb r3, [r5, #1] 8021f6a: 1e53 subs r3, r2, #1 8021f6c: 2a00 cmp r2, #0 8021f6e: d1f3 bne.n 8021f58 8021f70: bc70 pop {r4, r5, r6} 8021f72: 4770 bx lr 08021f74 : 8021f74: b470 push {r4, r5, r6} 8021f76: 2a00 cmp r2, #0 8021f78: d045 beq.n 8022006 8021f7a: ea41 0300 orr.w r3, r1, r0 8021f7e: f013 0303 ands.w r3, r3, #3 8021f82: d129 bne.n 8021fd8 8021f84: 2a03 cmp r2, #3 8021f86: d927 bls.n 8021fd8 8021f88: 6805 ldr r5, [r0, #0] 8021f8a: 680c ldr r4, [r1, #0] 8021f8c: 42a5 cmp r5, r4 8021f8e: d123 bne.n 8021fd8 8021f90: 1f14 subs r4, r2, #4 8021f92: d03a beq.n 802200a 8021f94: f1a5 3201 sub.w r2, r5, #16843009 ; 0x1010101 8021f98: ea22 0505 bic.w r5, r2, r5 8021f9c: f015 3f80 tst.w r5, #2155905152 ; 0x80808080 8021fa0: d00d beq.n 8021fbe 8021fa2: e03a b.n 802201a 8021fa4: 685b ldr r3, [r3, #4] 8021fa6: 686a ldr r2, [r5, #4] 8021fa8: f1a3 3501 sub.w r5, r3, #16843009 ; 0x1010101 8021fac: 4293 cmp r3, r2 8021fae: ea25 0503 bic.w r5, r5, r3 8021fb2: d12e bne.n 8022012 8021fb4: 3c04 subs r4, #4 8021fb6: d028 beq.n 802200a 8021fb8: f015 3f80 tst.w r5, #2155905152 ; 0x80808080 8021fbc: d127 bne.n 802200e 8021fbe: 460d mov r5, r1 8021fc0: 4603 mov r3, r0 8021fc2: 3104 adds r1, #4 8021fc4: 3004 adds r0, #4 8021fc6: 2c03 cmp r4, #3 8021fc8: d8ec bhi.n 8021fa4 8021fca: 1e66 subs r6, r4, #1 8021fcc: b92c cbnz r4, 8021fda 8021fce: 791c ldrb r4, [r3, #4] 8021fd0: 792a ldrb r2, [r5, #4] 8021fd2: 1aa0 subs r0, r4, r2 8021fd4: bc70 pop {r4, r5, r6} 8021fd6: 4770 bx lr 8021fd8: 1e56 subs r6, r2, #1 8021fda: 7804 ldrb r4, [r0, #0] 8021fdc: 780a ldrb r2, [r1, #0] 8021fde: 4294 cmp r4, r2 8021fe0: d1f7 bne.n 8021fd2 8021fe2: b1c6 cbz r6, 8022016 8021fe4: b18c cbz r4, 802200a 8021fe6: 3601 adds r6, #1 8021fe8: 1c8b adds r3, r1, #2 8021fea: 1989 adds r1, r1, r6 8021fec: e004 b.n 8021ff8 8021fee: 428b cmp r3, r1 8021ff0: f103 0301 add.w r3, r3, #1 8021ff4: d00b beq.n 802200e 8021ff6: b144 cbz r4, 802200a 8021ff8: f813 2c01 ldrb.w r2, [r3, #-1] 8021ffc: f810 4f01 ldrb.w r4, [r0, #1]! 8022000: 4294 cmp r4, r2 8022002: d0f4 beq.n 8021fee 8022004: e7e5 b.n 8021fd2 8022006: 4610 mov r0, r2 8022008: e7e4 b.n 8021fd4 802200a: 4620 mov r0, r4 802200c: e7e2 b.n 8021fd4 802200e: 2000 movs r0, #0 8022010: e7e0 b.n 8021fd4 8022012: 1e66 subs r6, r4, #1 8022014: e7e1 b.n 8021fda 8022016: 4630 mov r0, r6 8022018: e7dc b.n 8021fd4 802201a: 4618 mov r0, r3 802201c: e7da b.n 8021fd4 802201e: bf00 nop 08022020 : 8022020: ea41 0300 orr.w r3, r1, r0 8022024: f013 0f03 tst.w r3, #3 8022028: 4603 mov r3, r0 802202a: b470 push {r4, r5, r6} 802202c: d025 beq.n 802207a 802202e: b1aa cbz r2, 802205c 8022030: 780c ldrb r4, [r1, #0] 8022032: 3a01 subs r2, #1 8022034: f803 4b01 strb.w r4, [r3], #1 8022038: b14c cbz r4, 802204e 802203a: 461c mov r4, r3 802203c: b172 cbz r2, 802205c 802203e: f811 5f01 ldrb.w r5, [r1, #1]! 8022042: 3a01 subs r2, #1 8022044: f804 5b01 strb.w r5, [r4], #1 8022048: 4623 mov r3, r4 802204a: 2d00 cmp r5, #0 802204c: d1f6 bne.n 802203c 802204e: b12a cbz r2, 802205c 8022050: 189a adds r2, r3, r2 8022052: 2100 movs r1, #0 8022054: f803 1b01 strb.w r1, [r3], #1 8022058: 4293 cmp r3, r2 802205a: d1fb bne.n 8022054 802205c: bc70 pop {r4, r5, r6} 802205e: 4770 bx lr 8022060: 460e mov r6, r1 8022062: f851 4b04 ldr.w r4, [r1], #4 8022066: f1a4 3501 sub.w r5, r4, #16843009 ; 0x1010101 802206a: ea25 0504 bic.w r5, r5, r4 802206e: f015 3f80 tst.w r5, #2155905152 ; 0x80808080 8022072: d105 bne.n 8022080 8022074: 3a04 subs r2, #4 8022076: f843 4b04 str.w r4, [r3], #4 802207a: 2a03 cmp r2, #3 802207c: d8f0 bhi.n 8022060 802207e: e7d6 b.n 802202e 8022080: 4631 mov r1, r6 8022082: e7d4 b.n 802202e 08022084 : 8022084: b4f0 push {r4, r5, r6, r7} 8022086: 7804 ldrb r4, [r0, #0] 8022088: 2c00 cmp r4, #0 802208a: d021 beq.n 80220d0 802208c: 780f ldrb r7, [r1, #0] 802208e: 4606 mov r6, r0 8022090: 4630 mov r0, r6 8022092: b1af cbz r7, 80220c0 8022094: 42a7 cmp r7, r4 8022096: d019 beq.n 80220cc 8022098: 1c4b adds r3, r1, #1 802209a: e001 b.n 80220a0 802209c: 4294 cmp r4, r2 802209e: d009 beq.n 80220b4 80220a0: 461d mov r5, r3 80220a2: f813 2b01 ldrb.w r2, [r3], #1 80220a6: 2a00 cmp r2, #0 80220a8: d1f8 bne.n 802209c 80220aa: 7844 ldrb r4, [r0, #1] 80220ac: 3601 adds r6, #1 80220ae: 2c00 cmp r4, #0 80220b0: d1ee bne.n 8022090 80220b2: 782a ldrb r2, [r5, #0] 80220b4: 2a00 cmp r2, #0 80220b6: bf14 ite ne 80220b8: 4630 movne r0, r6 80220ba: 2000 moveq r0, #0 80220bc: bcf0 pop {r4, r5, r6, r7} 80220be: 4770 bx lr 80220c0: 7844 ldrb r4, [r0, #1] 80220c2: 460d mov r5, r1 80220c4: 3601 adds r6, #1 80220c6: 2c00 cmp r4, #0 80220c8: d1e2 bne.n 8022090 80220ca: e7f2 b.n 80220b2 80220cc: 463a mov r2, r7 80220ce: e7f1 b.n 80220b4 80220d0: 4620 mov r0, r4 80220d2: e7f3 b.n 80220bc 080220d4 : 80220d4: e92d 07f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl} 80220d8: 2701 movs r7, #1 80220da: 463c mov r4, r7 80220dc: 2500 movs r5, #0 80220de: f04f 36ff mov.w r6, #4294967295 80220e2: 1963 adds r3, r4, r5 80220e4: eb00 0c06 add.w ip, r0, r6 80220e8: 428b cmp r3, r1 80220ea: d20d bcs.n 8022108 80220ec: f81c c004 ldrb.w ip, [ip, r4] 80220f0: f810 8003 ldrb.w r8, [r0, r3] 80220f4: 45e0 cmp r8, ip 80220f6: d22e bcs.n 8022156 80220f8: 2401 movs r4, #1 80220fa: 461d mov r5, r3 80220fc: 1b9f subs r7, r3, r6 80220fe: 1963 adds r3, r4, r5 8022100: 428b cmp r3, r1 8022102: eb00 0c06 add.w ip, r0, r6 8022106: d3f1 bcc.n 80220ec 8022108: f04f 0a01 mov.w sl, #1 802210c: 2500 movs r5, #0 802210e: 4654 mov r4, sl 8022110: f04f 3cff mov.w ip, #4294967295 8022114: 6017 str r7, [r2, #0] 8022116: 1963 adds r3, r4, r5 8022118: eb00 080c add.w r8, r0, ip 802211c: 4299 cmp r1, r3 802211e: d90e bls.n 802213e 8022120: f818 8004 ldrb.w r8, [r8, r4] 8022124: f810 9003 ldrb.w r9, [r0, r3] 8022128: 45c1 cmp r9, r8 802212a: d91a bls.n 8022162 802212c: 2401 movs r4, #1 802212e: 461d mov r5, r3 8022130: ebcc 0a03 rsb sl, ip, r3 8022134: 1963 adds r3, r4, r5 8022136: 4299 cmp r1, r3 8022138: eb00 080c add.w r8, r0, ip 802213c: d8f0 bhi.n 8022120 802213e: f10c 0001 add.w r0, ip, #1 8022142: 3601 adds r6, #1 8022144: 42b0 cmp r0, r6 8022146: bf3c itt cc 8022148: 46ba movcc sl, r7 802214a: 4630 movcc r0, r6 802214c: f8c2 a000 str.w sl, [r2] 8022150: e8bd 07f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl} 8022154: 4770 bx lr 8022156: d00b beq.n 8022170 8022158: 2701 movs r7, #1 802215a: 462e mov r6, r5 802215c: 463c mov r4, r7 802215e: 19ed adds r5, r5, r7 8022160: e7bf b.n 80220e2 8022162: d009 beq.n 8022178 8022164: f04f 0a01 mov.w sl, #1 8022168: 46ac mov ip, r5 802216a: 4654 mov r4, sl 802216c: 4455 add r5, sl 802216e: e7d2 b.n 8022116 8022170: 42bc cmp r4, r7 8022172: d005 beq.n 8022180 8022174: 3401 adds r4, #1 8022176: e7b4 b.n 80220e2 8022178: 4554 cmp r4, sl 802217a: d005 beq.n 8022188 802217c: 3401 adds r4, #1 802217e: e7ca b.n 8022116 8022180: 4627 mov r7, r4 8022182: 461d mov r5, r3 8022184: 2401 movs r4, #1 8022186: e7ac b.n 80220e2 8022188: 46a2 mov sl, r4 802218a: 461d mov r5, r3 802218c: 2401 movs r4, #1 802218e: e7c2 b.n 8022116 08022190 : 8022190: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8022194: f2ad 4d24 subw sp, sp, #1060 ; 0x424 8022198: 4616 mov r6, r2 802219a: 4680 mov r8, r0 802219c: 460c mov r4, r1 802219e: 4610 mov r0, r2 80221a0: 4619 mov r1, r3 80221a2: aa07 add r2, sp, #28 80221a4: 461d mov r5, r3 80221a6: f7ff ff95 bl 80220d4 80221aa: ab07 add r3, sp, #28 80221ac: f20d 421c addw r2, sp, #1052 ; 0x41c 80221b0: 9003 str r0, [sp, #12] 80221b2: f843 5f04 str.w r5, [r3, #4]! 80221b6: 4293 cmp r3, r2 80221b8: d1fb bne.n 80221b2 80221ba: 1e6f subs r7, r5, #1 80221bc: 2300 movs r3, #0 80221be: a808 add r0, sp, #32 80221c0: b135 cbz r5, 80221d0 80221c2: 5cf2 ldrb r2, [r6, r3] 80221c4: 1af9 subs r1, r7, r3 80221c6: 3301 adds r3, #1 80221c8: 42ab cmp r3, r5 80221ca: f840 1022 str.w r1, [r0, r2, lsl #2] 80221ce: d1f8 bne.n 80221c2 80221d0: 9907 ldr r1, [sp, #28] 80221d2: 4630 mov r0, r6 80221d4: 9a03 ldr r2, [sp, #12] 80221d6: 1871 adds r1, r6, r1 80221d8: f7ff fba6 bl 8021928 80221dc: 2800 cmp r0, #0 80221de: d17f bne.n 80222e0 80221e0: f8dd c00c ldr.w ip, [sp, #12] 80221e4: 4622 mov r2, r4 80221e6: 4682 mov sl, r0 80221e8: 1e6f subs r7, r5, #1 80221ea: f10c 3cff add.w ip, ip, #4294967295 80221ee: f8cd c008 str.w ip, [sp, #8] 80221f2: 44b4 add ip, r6 80221f4: f8cd c014 str.w ip, [sp, #20] 80221f8: f8dd c00c ldr.w ip, [sp, #12] 80221fc: 4604 mov r4, r0 80221fe: 9501 str r5, [sp, #4] 8022200: f1cc 0c01 rsb ip, ip, #1 8022204: f8cd c010 str.w ip, [sp, #16] 8022208: e009 b.n 802221e 802220a: b134 cbz r4, 802221a 802220c: 9a07 ldr r2, [sp, #28] 802220e: 4293 cmp r3, r2 8022210: bf3e ittt cc 8022212: 4604 movcc r4, r0 8022214: 9901 ldrcc r1, [sp, #4] 8022216: ebc2 0301 rsbcc r3, r2, r1 802221a: 449a add sl, r3 802221c: 462a mov r2, r5 802221e: 9b01 ldr r3, [sp, #4] 8022220: eb08 0002 add.w r0, r8, r2 8022224: 2100 movs r1, #0 8022226: eb0a 0503 add.w r5, sl, r3 802222a: 1aaa subs r2, r5, r2 802222c: f002 fa90 bl 8024750 8022230: 2800 cmp r0, #0 8022232: d14f bne.n 80222d4 8022234: 2d00 cmp r5, #0 8022236: d04d beq.n 80222d4 8022238: eb08 0305 add.w r3, r8, r5 802223c: a908 add r1, sp, #32 802223e: f813 3c01 ldrb.w r3, [r3, #-1] 8022242: f851 3023 ldr.w r3, [r1, r3, lsl #2] 8022246: 2b00 cmp r3, #0 8022248: d1df bne.n 802220a 802224a: 9a03 ldr r2, [sp, #12] 802224c: 4294 cmp r4, r2 802224e: bf28 it cs 8022250: 4622 movcs r2, r4 8022252: 42ba cmp r2, r7 8022254: d211 bcs.n 802227a 8022256: eb08 030a add.w r3, r8, sl 802225a: f816 c002 ldrb.w ip, [r6, r2] 802225e: 18b1 adds r1, r6, r2 8022260: 5c98 ldrb r0, [r3, r2] 8022262: 4584 cmp ip, r0 8022264: d006 beq.n 8022274 8022266: e02f b.n 80222c8 8022268: f811 0f01 ldrb.w r0, [r1, #1]! 802226c: f813 c002 ldrb.w ip, [r3, r2] 8022270: 4584 cmp ip, r0 8022272: d129 bne.n 80222c8 8022274: 3201 adds r2, #1 8022276: 42ba cmp r2, r7 8022278: d3f6 bcc.n 8022268 802227a: 9b03 ldr r3, [sp, #12] 802227c: 9802 ldr r0, [sp, #8] 802227e: 429c cmp r4, r3 8022280: bf28 it cs 8022282: 4618 movcs r0, r3 8022284: d218 bcs.n 80222b8 8022286: f8dd c008 ldr.w ip, [sp, #8] 802228a: eb08 030a add.w r3, r8, sl 802228e: f816 100c ldrb.w r1, [r6, ip] 8022292: f813 200c ldrb.w r2, [r3, ip] 8022296: 4291 cmp r1, r2 8022298: f040 8085 bne.w 80223a6 802229c: 9a05 ldr r2, [sp, #20] 802229e: eb06 0b04 add.w fp, r6, r4 80222a2: e006 b.n 80222b2 80222a4: f813 c001 ldrb.w ip, [r3, r1] 80222a8: f812 9d01 ldrb.w r9, [r2, #-1]! 80222ac: 45e1 cmp r9, ip 80222ae: d103 bne.n 80222b8 80222b0: 4608 mov r0, r1 80222b2: 1e41 subs r1, r0, #1 80222b4: 455a cmp r2, fp 80222b6: d1f5 bne.n 80222a4 80222b8: 3401 adds r4, #1 80222ba: 4284 cmp r4, r0 80222bc: d875 bhi.n 80223aa 80222be: 9c07 ldr r4, [sp, #28] 80222c0: 9b01 ldr r3, [sp, #4] 80222c2: 44a2 add sl, r4 80222c4: 1b1c subs r4, r3, r4 80222c6: e7a9 b.n 802221c 80222c8: f8dd c010 ldr.w ip, [sp, #16] 80222cc: 2400 movs r4, #0 80222ce: 44e2 add sl, ip 80222d0: 4492 add sl, r2 80222d2: e7a3 b.n 802221c 80222d4: 2000 movs r0, #0 80222d6: b009 add sp, #36 ; 0x24 80222d8: f50d 6d80 add.w sp, sp, #1024 ; 0x400 80222dc: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80222e0: f8dd c00c ldr.w ip, [sp, #12] 80222e4: f04f 0a00 mov.w sl, #0 80222e8: f8dd b00c ldr.w fp, [sp, #12] 80222ec: f10d 0920 add.w r9, sp, #32 80222f0: ebcc 0305 rsb r3, ip, r5 80222f4: 1e6f subs r7, r5, #1 80222f6: 4563 cmp r3, ip 80222f8: bf38 it cc 80222fa: 4663 movcc r3, ip 80222fc: 4622 mov r2, r4 80222fe: 3301 adds r3, #1 8022300: 9307 str r3, [sp, #28] 8022302: f10c 33ff add.w r3, ip, #4294967295 8022306: 9301 str r3, [sp, #4] 8022308: 9b03 ldr r3, [sp, #12] 802230a: 44b4 add ip, r6 802230c: f8cd c008 str.w ip, [sp, #8] 8022310: f1c3 0301 rsb r3, r3, #1 8022314: 9304 str r3, [sp, #16] 8022316: eb0a 0405 add.w r4, sl, r5 802231a: eb08 0002 add.w r0, r8, r2 802231e: 2100 movs r1, #0 8022320: 1aa2 subs r2, r4, r2 8022322: f002 fa15 bl 8024750 8022326: 2800 cmp r0, #0 8022328: d1d4 bne.n 80222d4 802232a: 2c00 cmp r4, #0 802232c: d0d2 beq.n 80222d4 802232e: eb08 0304 add.w r3, r8, r4 8022332: f813 3c01 ldrb.w r3, [r3, #-1] 8022336: f859 3023 ldr.w r3, [r9, r3, lsl #2] 802233a: bb63 cbnz r3, 8022396 802233c: 45bb cmp fp, r7 802233e: eb08 000a add.w r0, r8, sl 8022342: d215 bcs.n 8022370 8022344: f8dd c008 ldr.w ip, [sp, #8] 8022348: f810 300b ldrb.w r3, [r0, fp] 802234c: f89c 2000 ldrb.w r2, [ip] 8022350: 429a cmp r2, r3 8022352: bf18 it ne 8022354: 465b movne r3, fp 8022356: d121 bne.n 802239c 8022358: 9a02 ldr r2, [sp, #8] 802235a: 465b mov r3, fp 802235c: e005 b.n 802236a 802235e: f812 1f01 ldrb.w r1, [r2, #1]! 8022362: f810 c003 ldrb.w ip, [r0, r3] 8022366: 458c cmp ip, r1 8022368: d118 bne.n 802239c 802236a: 3301 adds r3, #1 802236c: 42bb cmp r3, r7 802236e: d3f6 bcc.n 802235e 8022370: 9b01 ldr r3, [sp, #4] 8022372: 1c5a adds r2, r3, #1 8022374: d0af beq.n 80222d6 8022376: f8dd c004 ldr.w ip, [sp, #4] 802237a: f816 100c ldrb.w r1, [r6, ip] 802237e: f810 200c ldrb.w r2, [r0, ip] 8022382: 4291 cmp r1, r2 8022384: d106 bne.n 8022394 8022386: f113 33ff adds.w r3, r3, #4294967295 802238a: d3a4 bcc.n 80222d6 802238c: 5cf1 ldrb r1, [r6, r3] 802238e: 5cc2 ldrb r2, [r0, r3] 8022390: 4291 cmp r1, r2 8022392: d0f8 beq.n 8022386 8022394: 9b07 ldr r3, [sp, #28] 8022396: 449a add sl, r3 8022398: 4622 mov r2, r4 802239a: e7bc b.n 8022316 802239c: f8dd c010 ldr.w ip, [sp, #16] 80223a0: 44e2 add sl, ip 80223a2: 449a add sl, r3 80223a4: e7f8 b.n 8022398 80223a6: 9803 ldr r0, [sp, #12] 80223a8: e786 b.n 80222b8 80223aa: eb08 000a add.w r0, r8, sl 80223ae: e792 b.n 80222d6 080223b0 : 80223b0: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80223b4: 4680 mov r8, r0 80223b6: 7803 ldrb r3, [r0, #0] 80223b8: b087 sub sp, #28 80223ba: 460e mov r6, r1 80223bc: 2b00 cmp r3, #0 80223be: f000 80f7 beq.w 80225b0 80223c2: 780a ldrb r2, [r1, #0] 80223c4: b19a cbz r2, 80223ee 80223c6: 4684 mov ip, r0 80223c8: 3101 adds r1, #1 80223ca: 2701 movs r7, #1 80223cc: e002 b.n 80223d4 80223ce: f811 2b01 ldrb.w r2, [r1], #1 80223d2: b15a cbz r2, 80223ec 80223d4: 4293 cmp r3, r2 80223d6: bf14 ite ne 80223d8: 2700 movne r7, #0 80223da: f007 0701 andeq.w r7, r7, #1 80223de: f81c 3f01 ldrb.w r3, [ip, #1]! 80223e2: 460d mov r5, r1 80223e4: 2b00 cmp r3, #0 80223e6: d1f2 bne.n 80223ce 80223e8: 782b ldrb r3, [r5, #0] 80223ea: bb03 cbnz r3, 802242e 80223ec: b11f cbz r7, 80223f6 80223ee: 4640 mov r0, r8 80223f0: b007 add sp, #28 80223f2: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80223f6: f108 0001 add.w r0, r8, #1 80223fa: 7831 ldrb r1, [r6, #0] 80223fc: f002 fe92 bl 8025124 8022400: 1bad subs r5, r5, r6 8022402: 2d01 cmp r5, #1 8022404: bf18 it ne 8022406: 2800 cmpne r0, #0 8022408: 4607 mov r7, r0 802240a: bf08 it eq 802240c: 4680 moveq r8, r0 802240e: d0ee beq.n 80223ee 8022410: 44a8 add r8, r5 8022412: 4540 cmp r0, r8 8022414: bf94 ite ls 8022416: ebc0 0408 rsbls r4, r0, r8 802241a: 2401 movhi r4, #1 802241c: 2d1f cmp r5, #31 802241e: d909 bls.n 8022434 8022420: 4621 mov r1, r4 8022422: 4632 mov r2, r6 8022424: 462b mov r3, r5 8022426: f7ff feb3 bl 8022190 802242a: 4680 mov r8, r0 802242c: e7df b.n 80223ee 802242e: f04f 0800 mov.w r8, #0 8022432: e7dc b.n 80223ee 8022434: 4629 mov r1, r5 8022436: aa05 add r2, sp, #20 8022438: 4630 mov r0, r6 802243a: f7ff fe4b bl 80220d4 802243e: 9905 ldr r1, [sp, #20] 8022440: 1871 adds r1, r6, r1 8022442: 9001 str r0, [sp, #4] 8022444: 4630 mov r0, r6 8022446: 9a01 ldr r2, [sp, #4] 8022448: f7ff fa6e bl 8021928 802244c: 2800 cmp r0, #0 802244e: d152 bne.n 80224f6 8022450: 9b01 ldr r3, [sp, #4] 8022452: 4683 mov fp, r0 8022454: 4680 mov r8, r0 8022456: 3b01 subs r3, #1 8022458: 9300 str r3, [sp, #0] 802245a: 18f3 adds r3, r6, r3 802245c: 9303 str r3, [sp, #12] 802245e: 9b01 ldr r3, [sp, #4] 8022460: f1c3 0301 rsb r3, r3, #1 8022464: 9302 str r3, [sp, #8] 8022466: 4622 mov r2, r4 8022468: eb08 0405 add.w r4, r8, r5 802246c: 18b8 adds r0, r7, r2 802246e: 2100 movs r1, #0 8022470: 1aa2 subs r2, r4, r2 8022472: f002 f96d bl 8024750 8022476: 2800 cmp r0, #0 8022478: d1d9 bne.n 802242e 802247a: 2c00 cmp r4, #0 802247c: d0d7 beq.n 802242e 802247e: 9b01 ldr r3, [sp, #4] 8022480: 459b cmp fp, r3 8022482: bf28 it cs 8022484: 465b movcs r3, fp 8022486: 429d cmp r5, r3 8022488: d913 bls.n 80224b2 802248a: 18f9 adds r1, r7, r3 802248c: 5cf0 ldrb r0, [r6, r3] 802248e: 18f2 adds r2, r6, r3 8022490: f811 1008 ldrb.w r1, [r1, r8] 8022494: 4288 cmp r0, r1 8022496: f040 8085 bne.w 80225a4 802249a: eb07 0c08 add.w ip, r7, r8 802249e: e005 b.n 80224ac 80224a0: f812 1f01 ldrb.w r1, [r2, #1]! 80224a4: f81c 0003 ldrb.w r0, [ip, r3] 80224a8: 4288 cmp r0, r1 80224aa: d17b bne.n 80225a4 80224ac: 3301 adds r3, #1 80224ae: 429d cmp r5, r3 80224b0: d8f6 bhi.n 80224a0 80224b2: e89d 000a ldmia.w sp, {r1, r3} 80224b6: 455b cmp r3, fp 80224b8: d97d bls.n 80225b6 80224ba: eb07 0908 add.w r9, r7, r8 80224be: 5c72 ldrb r2, [r6, r1] 80224c0: f819 3001 ldrb.w r3, [r9, r1] 80224c4: 429a cmp r2, r3 80224c6: d176 bne.n 80225b6 80224c8: 9b03 ldr r3, [sp, #12] 80224ca: eb06 0a0b add.w sl, r6, fp 80224ce: e006 b.n 80224de 80224d0: f819 0002 ldrb.w r0, [r9, r2] 80224d4: f813 cd01 ldrb.w ip, [r3, #-1]! 80224d8: 4584 cmp ip, r0 80224da: d103 bne.n 80224e4 80224dc: 4611 mov r1, r2 80224de: 1e4a subs r2, r1, #1 80224e0: 4553 cmp r3, sl 80224e2: d1f5 bne.n 80224d0 80224e4: f10b 0b01 add.w fp, fp, #1 80224e8: 458b cmp fp, r1 80224ea: d866 bhi.n 80225ba 80224ec: 9b05 ldr r3, [sp, #20] 80224ee: 4498 add r8, r3 80224f0: ebc3 0b05 rsb fp, r3, r5 80224f4: e7b7 b.n 8022466 80224f6: 9801 ldr r0, [sp, #4] 80224f8: f04f 0b00 mov.w fp, #0 80224fc: 4622 mov r2, r4 80224fe: 1a2b subs r3, r5, r0 8022500: eb06 0900 add.w r9, r6, r0 8022504: f100 38ff add.w r8, r0, #4294967295 8022508: 4682 mov sl, r0 802250a: 4283 cmp r3, r0 802250c: bf38 it cc 802250e: 4603 movcc r3, r0 8022510: 1839 adds r1, r7, r0 8022512: 3301 adds r3, #1 8022514: 9100 str r1, [sp, #0] 8022516: 9305 str r3, [sp, #20] 8022518: f1c0 0301 rsb r3, r0, #1 802251c: 9302 str r3, [sp, #8] 802251e: eb0b 0405 add.w r4, fp, r5 8022522: 18b8 adds r0, r7, r2 8022524: 2100 movs r1, #0 8022526: 1aa2 subs r2, r4, r2 8022528: f002 f912 bl 8024750 802252c: 2800 cmp r0, #0 802252e: f47f af7e bne.w 802242e 8022532: 2c00 cmp r4, #0 8022534: f43f af7b beq.w 802242e 8022538: 4555 cmp r5, sl 802253a: bf98 it ls 802253c: eb07 000b addls.w r0, r7, fp 8022540: d914 bls.n 802256c 8022542: 9800 ldr r0, [sp, #0] 8022544: f899 2000 ldrb.w r2, [r9] 8022548: f810 300b ldrb.w r3, [r0, fp] 802254c: 429a cmp r2, r3 802254e: d124 bne.n 802259a 8022550: 464a mov r2, r9 8022552: 4653 mov r3, sl 8022554: eb07 000b add.w r0, r7, fp 8022558: e005 b.n 8022566 802255a: f812 1f01 ldrb.w r1, [r2, #1]! 802255e: f810 c003 ldrb.w ip, [r0, r3] 8022562: 458c cmp ip, r1 8022564: d11a bne.n 802259c 8022566: 3301 adds r3, #1 8022568: 429d cmp r5, r3 802256a: d8f6 bhi.n 802255a 802256c: f1b8 3fff cmp.w r8, #4294967295 8022570: 4643 mov r3, r8 8022572: f43f af5a beq.w 802242a 8022576: f816 1008 ldrb.w r1, [r6, r8] 802257a: f810 2008 ldrb.w r2, [r0, r8] 802257e: 4291 cmp r1, r2 8022580: d107 bne.n 8022592 8022582: f113 33ff adds.w r3, r3, #4294967295 8022586: f4ff af50 bcc.w 802242a 802258a: 5cf1 ldrb r1, [r6, r3] 802258c: 5cc2 ldrb r2, [r0, r3] 802258e: 4291 cmp r1, r2 8022590: d0f7 beq.n 8022582 8022592: 9b05 ldr r3, [sp, #20] 8022594: 449b add fp, r3 8022596: 4622 mov r2, r4 8022598: e7c1 b.n 802251e 802259a: 4653 mov r3, sl 802259c: 9a02 ldr r2, [sp, #8] 802259e: 4493 add fp, r2 80225a0: 449b add fp, r3 80225a2: e7f8 b.n 8022596 80225a4: 9902 ldr r1, [sp, #8] 80225a6: f04f 0b00 mov.w fp, #0 80225aa: 4488 add r8, r1 80225ac: 4498 add r8, r3 80225ae: e75a b.n 8022466 80225b0: 460d mov r5, r1 80225b2: 2701 movs r7, #1 80225b4: e718 b.n 80223e8 80225b6: 9901 ldr r1, [sp, #4] 80225b8: e794 b.n 80224e4 80225ba: 44b8 add r8, r7 80225bc: e717 b.n 80223ee 80225be: bf00 nop 080225c0 <_strtod_r>: 80225c0: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80225c4: b09d sub sp, #116 ; 0x74 80225c6: 468c mov ip, r1 80225c8: 4683 mov fp, r0 80225ca: 9210 str r2, [sp, #64] ; 0x40 80225cc: 4662 mov r2, ip 80225ce: 2000 movs r0, #0 80225d0: 2100 movs r1, #0 80225d2: f8cd c05c str.w ip, [sp, #92] ; 0x5c 80225d6: e9cd 0106 strd r0, r1, [sp, #24] 80225da: 4611 mov r1, r2 80225dc: f812 3b01 ldrb.w r3, [r2], #1 80225e0: 2b2d cmp r3, #45 ; 0x2d 80225e2: f200 8147 bhi.w 8022874 <_strtod_r+0x2b4> 80225e6: e8df f013 tbh [pc, r3, lsl #1] 80225ea: 0131 .short 0x0131 80225ec: 01450145 .word 0x01450145 80225f0: 01450145 .word 0x01450145 80225f4: 01450145 .word 0x01450145 80225f8: 01450145 .word 0x01450145 80225fc: 01640164 .word 0x01640164 8022600: 01640164 .word 0x01640164 8022604: 01450164 .word 0x01450164 8022608: 01450145 .word 0x01450145 802260c: 01450145 .word 0x01450145 8022610: 01450145 .word 0x01450145 8022614: 01450145 .word 0x01450145 8022618: 01450145 .word 0x01450145 802261c: 01450145 .word 0x01450145 8022620: 01450145 .word 0x01450145 8022624: 01450145 .word 0x01450145 8022628: 01640145 .word 0x01640145 802262c: 01450145 .word 0x01450145 8022630: 01450145 .word 0x01450145 8022634: 01450145 .word 0x01450145 8022638: 01450145 .word 0x01450145 802263c: 01450145 .word 0x01450145 8022640: 0145012e .word 0x0145012e 8022644: 002e .short 0x002e 8022646: 2501 movs r5, #1 8022648: 9512 str r5, [sp, #72] ; 0x48 802264a: 1c4e adds r6, r1, #1 802264c: 9617 str r6, [sp, #92] ; 0x5c 802264e: 784b ldrb r3, [r1, #1] 8022650: 4699 mov r9, r3 8022652: 469a mov sl, r3 8022654: 2b00 cmp r3, #0 8022656: f000 80fc beq.w 8022852 <_strtod_r+0x292> 802265a: 2b30 cmp r3, #48 ; 0x30 802265c: bf18 it ne 802265e: f04f 0900 movne.w r9, #0 8022662: f000 8110 beq.w 8022886 <_strtod_r+0x2c6> 8022666: 2b2f cmp r3, #47 ; 0x2f 8022668: 461d mov r5, r3 802266a: f04f 0a00 mov.w sl, #0 802266e: f340 84f9 ble.w 8023064 <_strtod_r+0xaa4> 8022672: 2b39 cmp r3, #57 ; 0x39 8022674: f300 84f6 bgt.w 8023064 <_strtod_r+0xaa4> 8022678: 1c72 adds r2, r6, #1 802267a: 4657 mov r7, sl 802267c: 4654 mov r4, sl 802267e: e001 b.n 8022684 <_strtod_r+0xc4> 8022680: 2b39 cmp r3, #57 ; 0x39 8022682: dc18 bgt.n 80226b6 <_strtod_r+0xf6> 8022684: eb07 0187 add.w r1, r7, r7, lsl #2 8022688: 2c08 cmp r4, #8 802268a: eb03 0141 add.w r1, r3, r1, lsl #1 802268e: bfd8 it le 8022690: f1a1 0730 suble.w r7, r1, #48 ; 0x30 8022694: dd07 ble.n 80226a6 <_strtod_r+0xe6> 8022696: eb0a 018a add.w r1, sl, sl, lsl #2 802269a: 2c0f cmp r4, #15 802269c: eb03 0341 add.w r3, r3, r1, lsl #1 80226a0: bfd8 it le 80226a2: f1a3 0a30 suble.w sl, r3, #48 ; 0x30 80226a6: 9217 str r2, [sp, #92] ; 0x5c 80226a8: 4690 mov r8, r2 80226aa: f812 3b01 ldrb.w r3, [r2], #1 80226ae: 3401 adds r4, #1 80226b0: 2b2f cmp r3, #47 ; 0x2f 80226b2: 461d mov r5, r3 80226b4: dce4 bgt.n 8022680 <_strtod_r+0xc0> 80226b6: 4658 mov r0, fp 80226b8: f8cd c010 str.w ip, [sp, #16] 80226bc: f001 fd5a bl 8024174 <_localeconv_r> 80226c0: 6801 ldr r1, [r0, #0] 80226c2: 4658 mov r0, fp 80226c4: 9105 str r1, [sp, #20] 80226c6: f001 fd55 bl 8024174 <_localeconv_r> 80226ca: 6800 ldr r0, [r0, #0] 80226cc: f7ff fbf0 bl 8021eb0 80226d0: 9905 ldr r1, [sp, #20] 80226d2: 4602 mov r2, r0 80226d4: 4640 mov r0, r8 80226d6: f7ff fc4d bl 8021f74 80226da: f8dd c010 ldr.w ip, [sp, #16] 80226de: 4680 mov r8, r0 80226e0: 2800 cmp r0, #0 80226e2: f000 8142 beq.w 802296a <_strtod_r+0x3aa> 80226e6: 2000 movs r0, #0 80226e8: 46a0 mov r8, r4 80226ea: 4601 mov r1, r0 80226ec: 9009 str r0, [sp, #36] ; 0x24 80226ee: f025 0320 bic.w r3, r5, #32 80226f2: 2b45 cmp r3, #69 ; 0x45 80226f4: f040 80df bne.w 80228b6 <_strtod_r+0x2f6> 80226f8: ea48 0300 orr.w r3, r8, r0 80226fc: ea53 0309 orrs.w r3, r3, r9 8022700: f000 811d beq.w 802293e <_strtod_r+0x37e> 8022704: f8dd c05c ldr.w ip, [sp, #92] ; 0x5c 8022708: f10c 0301 add.w r3, ip, #1 802270c: 9317 str r3, [sp, #92] ; 0x5c 802270e: f89c 5001 ldrb.w r5, [ip, #1] 8022712: 2d2b cmp r5, #43 ; 0x2b 8022714: f000 84ab beq.w 802306e <_strtod_r+0xaae> 8022718: 2d2d cmp r5, #45 ; 0x2d 802271a: f000 833d beq.w 8022d98 <_strtod_r+0x7d8> 802271e: 2200 movs r2, #0 8022720: 920a str r2, [sp, #40] ; 0x28 8022722: f1a5 0330 sub.w r3, r5, #48 ; 0x30 8022726: 2b09 cmp r3, #9 8022728: f200 842c bhi.w 8022f84 <_strtod_r+0x9c4> 802272c: 2d30 cmp r5, #48 ; 0x30 802272e: d106 bne.n 802273e <_strtod_r+0x17e> 8022730: 9b17 ldr r3, [sp, #92] ; 0x5c 8022732: 3301 adds r3, #1 8022734: 9317 str r3, [sp, #92] ; 0x5c 8022736: f813 5b01 ldrb.w r5, [r3], #1 802273a: 2d30 cmp r5, #48 ; 0x30 802273c: d0fa beq.n 8022734 <_strtod_r+0x174> 802273e: f1a5 0331 sub.w r3, r5, #49 ; 0x31 8022742: 2b08 cmp r3, #8 8022744: f200 80b7 bhi.w 80228b6 <_strtod_r+0x2f6> 8022748: 9a17 ldr r2, [sp, #92] ; 0x5c 802274a: 3d30 subs r5, #48 ; 0x30 802274c: 950d str r5, [sp, #52] ; 0x34 802274e: 1c53 adds r3, r2, #1 8022750: 9317 str r3, [sp, #92] ; 0x5c 8022752: 7855 ldrb r5, [r2, #1] 8022754: 920b str r2, [sp, #44] ; 0x2c 8022756: 2d2f cmp r5, #47 ; 0x2f 8022758: dd16 ble.n 8022788 <_strtod_r+0x1c8> 802275a: 2d39 cmp r5, #57 ; 0x39 802275c: dc14 bgt.n 8022788 <_strtod_r+0x1c8> 802275e: 1c93 adds r3, r2, #2 8022760: 910c str r1, [sp, #48] ; 0x30 8022762: 9a0d ldr r2, [sp, #52] ; 0x34 8022764: e001 b.n 802276a <_strtod_r+0x1aa> 8022766: 2d39 cmp r5, #57 ; 0x39 8022768: dc0b bgt.n 8022782 <_strtod_r+0x1c2> 802276a: 9317 str r3, [sp, #92] ; 0x5c 802276c: 4619 mov r1, r3 802276e: eb02 0282 add.w r2, r2, r2, lsl #2 8022772: 3301 adds r3, #1 8022774: eb05 0242 add.w r2, r5, r2, lsl #1 8022778: f813 5c01 ldrb.w r5, [r3, #-1] 802277c: 3a30 subs r2, #48 ; 0x30 802277e: 2d2f cmp r5, #47 ; 0x2f 8022780: dcf1 bgt.n 8022766 <_strtod_r+0x1a6> 8022782: 460b mov r3, r1 8022784: 990c ldr r1, [sp, #48] ; 0x30 8022786: 920d str r2, [sp, #52] ; 0x34 8022788: 9a0b ldr r2, [sp, #44] ; 0x2c 802278a: 1a9b subs r3, r3, r2 802278c: 2b08 cmp r3, #8 802278e: bfc8 it gt 8022790: f644 621f movwgt r2, #19999 ; 0x4e1f 8022794: dc05 bgt.n 80227a2 <_strtod_r+0x1e2> 8022796: 9a0d ldr r2, [sp, #52] ; 0x34 8022798: f644 631f movw r3, #19999 ; 0x4e1f 802279c: 429a cmp r2, r3 802279e: bfa8 it ge 80227a0: 461a movge r2, r3 80227a2: 9b0a ldr r3, [sp, #40] ; 0x28 80227a4: b103 cbz r3, 80227a8 <_strtod_r+0x1e8> 80227a6: 4252 negs r2, r2 80227a8: f1b8 0f00 cmp.w r8, #0 80227ac: f000 8088 beq.w 80228c0 <_strtod_r+0x300> 80227b0: 9d09 ldr r5, [sp, #36] ; 0x24 80227b2: 4638 mov r0, r7 80227b4: 2c00 cmp r4, #0 80227b6: bf08 it eq 80227b8: 4644 moveq r4, r8 80227ba: 940a str r4, [sp, #40] ; 0x28 80227bc: 1b52 subs r2, r2, r5 80227be: 9209 str r2, [sp, #36] ; 0x24 80227c0: f7fd fe88 bl 80204d4 <__aeabi_ui2d> 80227c4: f1b8 0f10 cmp.w r8, #16 80227c8: bfb4 ite lt 80227ca: 46c1 movlt r9, r8 80227cc: f04f 0910 movge.w r9, #16 80227d0: f1b9 0f09 cmp.w r9, #9 80227d4: 4602 mov r2, r0 80227d6: 460b mov r3, r1 80227d8: e9cd 2306 strd r2, r3, [sp, #24] 80227dc: dd16 ble.n 802280c <_strtod_r+0x24c> 80227de: f249 6300 movw r3, #38400 ; 0x9600 80227e2: f6c0 0303 movt r3, #2051 ; 0x803 80227e6: eb03 03c9 add.w r3, r3, r9, lsl #3 80227ea: e953 2312 ldrd r2, r3, [r3, #-72] ; 0x48 80227ee: f7fd fee7 bl 80205c0 <__aeabi_dmul> 80227f2: 4604 mov r4, r0 80227f4: 4650 mov r0, sl 80227f6: 460d mov r5, r1 80227f8: f7fd fe6c bl 80204d4 <__aeabi_ui2d> 80227fc: 4602 mov r2, r0 80227fe: 460b mov r3, r1 8022800: 4620 mov r0, r4 8022802: 4629 mov r1, r5 8022804: f7fd fd2a bl 802025c <__adddf3> 8022808: e9cd 0106 strd r0, r1, [sp, #24] 802280c: f1b8 0f0f cmp.w r8, #15 8022810: f300 80f2 bgt.w 80229f8 <_strtod_r+0x438> 8022814: 9c09 ldr r4, [sp, #36] ; 0x24 8022816: 2c00 cmp r4, #0 8022818: f000 80a2 beq.w 8022960 <_strtod_r+0x3a0> 802281c: f340 8591 ble.w 8023342 <_strtod_r+0xd82> 8022820: 9d09 ldr r5, [sp, #36] ; 0x24 8022822: 2d16 cmp r5, #22 8022824: f300 8545 bgt.w 80232b2 <_strtod_r+0xcf2> 8022828: f249 6100 movw r1, #38400 ; 0x9600 802282c: e9dd 2306 ldrd r2, r3, [sp, #24] 8022830: f6c0 0103 movt r1, #2051 ; 0x803 8022834: eb01 01c5 add.w r1, r1, r5, lsl #3 8022838: e9d1 0100 ldrd r0, r1, [r1] 802283c: f7fd fec0 bl 80205c0 <__aeabi_dmul> 8022840: 4681 mov r9, r0 8022842: 468a mov sl, r1 8022844: e009 b.n 802285a <_strtod_r+0x29a> 8022846: 2400 movs r4, #0 8022848: 9412 str r4, [sp, #72] ; 0x48 802284a: e6fe b.n 802264a <_strtod_r+0x8a> 802284c: f04f 0900 mov.w r9, #0 8022850: 46ca mov sl, r9 8022852: 2400 movs r4, #0 8022854: f8cd c05c str.w ip, [sp, #92] ; 0x5c 8022858: 9412 str r4, [sp, #72] ; 0x48 802285a: 9c10 ldr r4, [sp, #64] ; 0x40 802285c: b10c cbz r4, 8022862 <_strtod_r+0x2a2> 802285e: 9b17 ldr r3, [sp, #92] ; 0x5c 8022860: 6023 str r3, [r4, #0] 8022862: 9d12 ldr r5, [sp, #72] ; 0x48 8022864: b10d cbz r5, 802286a <_strtod_r+0x2aa> 8022866: f10a 4a00 add.w sl, sl, #2147483648 ; 0x80000000 802286a: 4648 mov r0, r9 802286c: 4651 mov r1, sl 802286e: b01d add sp, #116 ; 0x74 8022870: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8022874: 2500 movs r5, #0 8022876: 2b30 cmp r3, #48 ; 0x30 8022878: 460e mov r6, r1 802287a: 9512 str r5, [sp, #72] ; 0x48 802287c: bf18 it ne 802287e: f04f 0900 movne.w r9, #0 8022882: f47f aef0 bne.w 8022666 <_strtod_r+0xa6> 8022886: 7873 ldrb r3, [r6, #1] 8022888: 2b58 cmp r3, #88 ; 0x58 802288a: f000 8383 beq.w 8022f94 <_strtod_r+0x9d4> 802288e: 1c72 adds r2, r6, #1 8022890: 2b78 cmp r3, #120 ; 0x78 8022892: f000 837f beq.w 8022f94 <_strtod_r+0x9d4> 8022896: 4616 mov r6, r2 8022898: 9217 str r2, [sp, #92] ; 0x5c 802289a: f812 3b01 ldrb.w r3, [r2], #1 802289e: 2b30 cmp r3, #48 ; 0x30 80228a0: d0f9 beq.n 8022896 <_strtod_r+0x2d6> 80228a2: f04f 0901 mov.w r9, #1 80228a6: 2b00 cmp r3, #0 80228a8: f47f aedd bne.w 8022666 <_strtod_r+0xa6> 80228ac: 4699 mov r9, r3 80228ae: 469a mov sl, r3 80228b0: e7d3 b.n 802285a <_strtod_r+0x29a> 80228b2: 9217 str r2, [sp, #92] ; 0x5c 80228b4: e691 b.n 80225da <_strtod_r+0x1a> 80228b6: 2200 movs r2, #0 80228b8: f1b8 0f00 cmp.w r8, #0 80228bc: f47f af78 bne.w 80227b0 <_strtod_r+0x1f0> 80228c0: ea50 0009 orrs.w r0, r0, r9 80228c4: d14c bne.n 8022960 <_strtod_r+0x3a0> 80228c6: 2900 cmp r1, #0 80228c8: d139 bne.n 802293e <_strtod_r+0x37e> 80228ca: 3d49 subs r5, #73 ; 0x49 80228cc: 2d25 cmp r5, #37 ; 0x25 80228ce: d836 bhi.n 802293e <_strtod_r+0x37e> 80228d0: e8df f015 tbh [pc, r5, lsl #1] 80228d4: 0035026a .word 0x0035026a 80228d8: 00350035 .word 0x00350035 80228dc: 00260035 .word 0x00260035 80228e0: 00350035 .word 0x00350035 80228e4: 00350035 .word 0x00350035 80228e8: 00350035 .word 0x00350035 80228ec: 00350035 .word 0x00350035 80228f0: 00350035 .word 0x00350035 80228f4: 00350035 .word 0x00350035 80228f8: 00350035 .word 0x00350035 80228fc: 00350035 .word 0x00350035 8022900: 00350035 .word 0x00350035 8022904: 00350035 .word 0x00350035 8022908: 00350035 .word 0x00350035 802290c: 00350035 .word 0x00350035 8022910: 00350035 .word 0x00350035 8022914: 0035026a .word 0x0035026a 8022918: 00350035 .word 0x00350035 802291c: 00260035 .word 0x00260035 8022920: 4853 ldr r0, [pc, #332] ; (8022a70 <_strtod_r+0x4b0>) 8022922: 9a17 ldr r2, [sp, #92] ; 0x5c 8022924: f810 1f01 ldrb.w r1, [r0, #1]! 8022928: 4613 mov r3, r2 802292a: b169 cbz r1, 8022948 <_strtod_r+0x388> 802292c: 785b ldrb r3, [r3, #1] 802292e: 3201 adds r2, #1 8022930: 2b40 cmp r3, #64 ; 0x40 8022932: dd02 ble.n 802293a <_strtod_r+0x37a> 8022934: 2b5a cmp r3, #90 ; 0x5a 8022936: bfd8 it le 8022938: 3320 addle r3, #32 802293a: 428b cmp r3, r1 802293c: d0f2 beq.n 8022924 <_strtod_r+0x364> 802293e: f8dd 9018 ldr.w r9, [sp, #24] 8022942: f8dd a01c ldr.w sl, [sp, #28] 8022946: e784 b.n 8022852 <_strtod_r+0x292> 8022948: 1c53 adds r3, r2, #1 802294a: 9317 str r3, [sp, #92] ; 0x5c 802294c: 7853 ldrb r3, [r2, #1] 802294e: 2b28 cmp r3, #40 ; 0x28 8022950: f000 8575 beq.w 802343e <_strtod_r+0xe7e> 8022954: 2300 movs r3, #0 8022956: 9306 str r3, [sp, #24] 8022958: 461c mov r4, r3 802295a: f6cf 74f8 movt r4, #65528 ; 0xfff8 802295e: 9407 str r4, [sp, #28] 8022960: f8dd 9018 ldr.w r9, [sp, #24] 8022964: f8dd a01c ldr.w sl, [sp, #28] 8022968: e777 b.n 802285a <_strtod_r+0x29a> 802296a: 4658 mov r0, fp 802296c: 9d17 ldr r5, [sp, #92] ; 0x5c 802296e: f001 fc01 bl 8024174 <_localeconv_r> 8022972: 6800 ldr r0, [r0, #0] 8022974: f7ff fa9c bl 8021eb0 8022978: f8dd c010 ldr.w ip, [sp, #16] 802297c: 182b adds r3, r5, r0 802297e: 9317 str r3, [sp, #92] ; 0x5c 8022980: 5c2d ldrb r5, [r5, r0] 8022982: 2c00 cmp r4, #0 8022984: f040 819b bne.w 8022cbe <_strtod_r+0x6fe> 8022988: 2d30 cmp r5, #48 ; 0x30 802298a: 4620 mov r0, r4 802298c: d105 bne.n 802299a <_strtod_r+0x3da> 802298e: 3301 adds r3, #1 8022990: 9317 str r3, [sp, #92] ; 0x5c 8022992: 3001 adds r0, #1 8022994: 781d ldrb r5, [r3, #0] 8022996: 2d30 cmp r5, #48 ; 0x30 8022998: d0f9 beq.n 802298e <_strtod_r+0x3ce> 802299a: f1a5 0331 sub.w r3, r5, #49 ; 0x31 802299e: 2b08 cmp r3, #8 80229a0: f200 819a bhi.w 8022cd8 <_strtod_r+0x718> 80229a4: 9e17 ldr r6, [sp, #92] ; 0x5c 80229a6: f04f 0800 mov.w r8, #0 80229aa: 9009 str r0, [sp, #36] ; 0x24 80229ac: f1a5 0130 sub.w r1, r5, #48 ; 0x30 80229b0: 2001 movs r0, #1 80229b2: 960a str r6, [sp, #40] ; 0x28 80229b4: 2900 cmp r1, #0 80229b6: f000 836c beq.w 8023092 <_strtod_r+0xad2> 80229ba: 9a09 ldr r2, [sp, #36] ; 0x24 80229bc: 2801 cmp r0, #1 80229be: 4402 add r2, r0 80229c0: 9209 str r2, [sp, #36] ; 0x24 80229c2: f000 8532 beq.w 802342a <_strtod_r+0xe6a> 80229c6: eb08 0200 add.w r2, r8, r0 80229ca: 4643 mov r3, r8 80229cc: 3a01 subs r2, #1 80229ce: f8cd 802c str.w r8, [sp, #44] ; 0x2c 80229d2: 4690 mov r8, r2 80229d4: e003 b.n 80229de <_strtod_r+0x41e> 80229d6: 006f lsls r7, r5, #1 80229d8: 4543 cmp r3, r8 80229da: f000 834b beq.w 8023074 <_strtod_r+0xab4> 80229de: 3301 adds r3, #1 80229e0: eb07 0587 add.w r5, r7, r7, lsl #2 80229e4: 1e5a subs r2, r3, #1 80229e6: 2a08 cmp r2, #8 80229e8: ddf5 ble.n 80229d6 <_strtod_r+0x416> 80229ea: eb0a 028a add.w r2, sl, sl, lsl #2 80229ee: 2b10 cmp r3, #16 80229f0: bfd8 it le 80229f2: ea4f 0a42 movle.w sl, r2, lsl #1 80229f6: e7ef b.n 80229d8 <_strtod_r+0x418> 80229f8: 9d09 ldr r5, [sp, #36] ; 0x24 80229fa: ebc9 0908 rsb r9, r9, r8 80229fe: eb05 0409 add.w r4, r5, r9 8022a02: 2c00 cmp r4, #0 8022a04: f340 83de ble.w 80231c4 <_strtod_r+0xc04> 8022a08: f014 000f ands.w r0, r4, #15 8022a0c: d00d beq.n 8022a2a <_strtod_r+0x46a> 8022a0e: f249 6100 movw r1, #38400 ; 0x9600 8022a12: e9dd 2306 ldrd r2, r3, [sp, #24] 8022a16: f6c0 0103 movt r1, #2051 ; 0x803 8022a1a: eb01 01c0 add.w r1, r1, r0, lsl #3 8022a1e: e9d1 0100 ldrd r0, r1, [r1] 8022a22: f7fd fdcd bl 80205c0 <__aeabi_dmul> 8022a26: e9cd 0106 strd r0, r1, [sp, #24] 8022a2a: f034 040f bics.w r4, r4, #15 8022a2e: f040 815f bne.w 8022cf0 <_strtod_r+0x730> 8022a32: f8dd 9018 ldr.w r9, [sp, #24] 8022a36: f8dd a01c ldr.w sl, [sp, #28] 8022a3a: 940b str r4, [sp, #44] ; 0x2c 8022a3c: 9700 str r7, [sp, #0] 8022a3e: 4658 mov r0, fp 8022a40: 4631 mov r1, r6 8022a42: 9a0a ldr r2, [sp, #40] ; 0x28 8022a44: 4643 mov r3, r8 8022a46: f001 ff67 bl 8024918 <__s2b> 8022a4a: 9d09 ldr r5, [sp, #36] ; 0x24 8022a4c: 2d00 cmp r5, #0 8022a4e: 9011 str r0, [sp, #68] ; 0x44 8022a50: f2c0 8472 blt.w 8023338 <_strtod_r+0xd78> 8022a54: 2400 movs r4, #0 8022a56: 940d str r4, [sp, #52] ; 0x34 8022a58: 9d09 ldr r5, [sp, #36] ; 0x24 8022a5a: 9c11 ldr r4, [sp, #68] ; 0x44 8022a5c: ea25 75e5 bic.w r5, r5, r5, asr #31 8022a60: f8cd 9024 str.w r9, [sp, #36] ; 0x24 8022a64: 340c adds r4, #12 8022a66: 950e str r5, [sp, #56] ; 0x38 8022a68: 9413 str r4, [sp, #76] ; 0x4c 8022a6a: f8cd a028 str.w sl, [sp, #40] ; 0x28 8022a6e: e073 b.n 8022b58 <_strtod_r+0x598> 8022a70: 080459e3 .word 0x080459e3 8022a74: 9b0f ldr r3, [sp, #60] ; 0x3c 8022a76: 2b00 cmp r3, #0 8022a78: f000 81a8 beq.w 8022dcc <_strtod_r+0x80c> 8022a7c: f04f 0900 mov.w r9, #0 8022a80: 2500 movs r5, #0 8022a82: f8dd c01c ldr.w ip, [sp, #28] 8022a86: 2400 movs r4, #0 8022a88: f6c3 75f0 movt r5, #16368 ; 0x3ff0 8022a8c: f6c3 79f0 movt r9, #16368 ; 0x3ff0 8022a90: f8cd 8030 str.w r8, [sp, #48] ; 0x30 8022a94: f04f 0800 mov.w r8, #0 8022a98: 4643 mov r3, r8 8022a9a: f6c7 78f0 movt r8, #32752 ; 0x7ff0 8022a9e: f6c7 73e0 movt r3, #32736 ; 0x7fe0 8022aa2: ea0c 0808 and.w r8, ip, r8 8022aa6: 4598 cmp r8, r3 8022aa8: f000 81c5 beq.w 8022e36 <_strtod_r+0x876> 8022aac: 9a0b ldr r2, [sp, #44] ; 0x2c 8022aae: f1b8 6fd4 cmp.w r8, #111149056 ; 0x6a00000 8022ab2: bf8c ite hi 8022ab4: 2300 movhi r3, #0 8022ab6: 2301 movls r3, #1 8022ab8: 2a00 cmp r2, #0 8022aba: bf08 it eq 8022abc: 2300 moveq r3, #0 8022abe: b1eb cbz r3, 8022afc <_strtod_r+0x53c> 8022ac0: 980c ldr r0, [sp, #48] ; 0x30 8022ac2: 4649 mov r1, r9 8022ac4: a388 add r3, pc, #544 ; (adr r3, 8022ce8 <_strtod_r+0x728>) 8022ac6: e9d3 2300 ldrd r2, r3, [r3] 8022aca: f7fd fff5 bl 8020ab8 <__aeabi_dcmple> 8022ace: b188 cbz r0, 8022af4 <_strtod_r+0x534> 8022ad0: 980c ldr r0, [sp, #48] ; 0x30 8022ad2: 4649 mov r1, r9 8022ad4: f7fe f836 bl 8020b44 <__aeabi_d2uiz> 8022ad8: 2800 cmp r0, #0 8022ada: f000 8246 beq.w 8022f6a <_strtod_r+0x9aa> 8022ade: f7fd fcf9 bl 80204d4 <__aeabi_ui2d> 8022ae2: 4689 mov r9, r1 8022ae4: 900c str r0, [sp, #48] ; 0x30 8022ae6: 9c0f ldr r4, [sp, #60] ; 0x3c 8022ae8: f109 4300 add.w r3, r9, #2147483648 ; 0x80000000 8022aec: b104 cbz r4, 8022af0 <_strtod_r+0x530> 8022aee: 464b mov r3, r9 8022af0: 9c0c ldr r4, [sp, #48] ; 0x30 8022af2: 461d mov r5, r3 8022af4: f105 63d6 add.w r3, r5, #112197632 ; 0x6b00000 8022af8: ebc8 0503 rsb r5, r8, r3 8022afc: 9809 ldr r0, [sp, #36] ; 0x24 8022afe: 990a ldr r1, [sp, #40] ; 0x28 8022b00: f002 f98a bl 8024e18 <__ulp> 8022b04: 4602 mov r2, r0 8022b06: 460b mov r3, r1 8022b08: 4620 mov r0, r4 8022b0a: 4629 mov r1, r5 8022b0c: f7fd fd58 bl 80205c0 <__aeabi_dmul> 8022b10: 4602 mov r2, r0 8022b12: 460b mov r3, r1 8022b14: 9809 ldr r0, [sp, #36] ; 0x24 8022b16: 990a ldr r1, [sp, #40] ; 0x28 8022b18: f7fd fba0 bl 802025c <__adddf3> 8022b1c: e9cd 0106 strd r0, r1, [sp, #24] 8022b20: 9c07 ldr r4, [sp, #28] 8022b22: 9009 str r0, [sp, #36] ; 0x24 8022b24: 910a str r1, [sp, #40] ; 0x28 8022b26: 9d0b ldr r5, [sp, #44] ; 0x2c 8022b28: b935 cbnz r5, 8022b38 <_strtod_r+0x578> 8022b2a: 2300 movs r3, #0 8022b2c: f6c7 73f0 movt r3, #32752 ; 0x7ff0 8022b30: 4023 ands r3, r4 8022b32: 4598 cmp r8, r3 8022b34: f000 81bc beq.w 8022eb0 <_strtod_r+0x8f0> 8022b38: 4658 mov r0, fp 8022b3a: 9918 ldr r1, [sp, #96] ; 0x60 8022b3c: f001 fe8c bl 8024858 <_Bfree> 8022b40: 4658 mov r0, fp 8022b42: 4651 mov r1, sl 8022b44: f001 fe88 bl 8024858 <_Bfree> 8022b48: 4658 mov r0, fp 8022b4a: 4639 mov r1, r7 8022b4c: f001 fe84 bl 8024858 <_Bfree> 8022b50: 4658 mov r0, fp 8022b52: 4631 mov r1, r6 8022b54: f001 fe80 bl 8024858 <_Bfree> 8022b58: 9c11 ldr r4, [sp, #68] ; 0x44 8022b5a: 4658 mov r0, fp 8022b5c: ad16 add r5, sp, #88 ; 0x58 8022b5e: 6861 ldr r1, [r4, #4] 8022b60: f001 fe44 bl 80247ec <_Balloc> 8022b64: 6923 ldr r3, [r4, #16] 8022b66: 9913 ldr r1, [sp, #76] ; 0x4c 8022b68: 1c9a adds r2, r3, #2 8022b6a: 0092 lsls r2, r2, #2 8022b6c: 4682 mov sl, r0 8022b6e: 300c adds r0, #12 8022b70: f7fe ff0c bl 802198c 8022b74: 9a09 ldr r2, [sp, #36] ; 0x24 8022b76: 9b0a ldr r3, [sp, #40] ; 0x28 8022b78: a819 add r0, sp, #100 ; 0x64 8022b7a: 9500 str r5, [sp, #0] 8022b7c: 9001 str r0, [sp, #4] 8022b7e: 4658 mov r0, fp 8022b80: f002 f9c4 bl 8024f0c <__d2b> 8022b84: 2101 movs r1, #1 8022b86: 9018 str r0, [sp, #96] ; 0x60 8022b88: 4658 mov r0, fp 8022b8a: f001 ff5d bl 8024a48 <__i2b> 8022b8e: 9a16 ldr r2, [sp, #88] ; 0x58 8022b90: 9b19 ldr r3, [sp, #100] ; 0x64 8022b92: f46f 717f mvn.w r1, #1020 ; 0x3fc 8022b96: 2a00 cmp r2, #0 8022b98: bfaa itet ge 8022b9a: 9d0d ldrge r5, [sp, #52] ; 0x34 8022b9c: 9c0e ldrlt r4, [sp, #56] ; 0x38 8022b9e: 18ac addge r4, r5, r2 8022ba0: 9d0b ldr r5, [sp, #44] ; 0x2c 8022ba2: 4607 mov r7, r0 8022ba4: bfb8 it lt 8022ba6: ebc2 0004 rsblt r0, r2, r4 8022baa: ebc5 0202 rsb r2, r5, r2 8022bae: bfb8 it lt 8022bb0: 9c0d ldrlt r4, [sp, #52] ; 0x34 8022bb2: eb02 0503 add.w r5, r2, r3 8022bb6: bfa8 it ge 8022bb8: 980e ldrge r0, [sp, #56] ; 0x38 8022bba: 428d cmp r5, r1 8022bbc: 990d ldr r1, [sp, #52] ; 0x34 8022bbe: bfb4 ite lt 8022bc0: f202 4333 addwlt r3, r2, #1075 ; 0x433 8022bc4: f1c3 0336 rsbge r3, r3, #54 ; 0x36 8022bc8: 18e6 adds r6, r4, r3 8022bca: 18c3 adds r3, r0, r3 8022bcc: 980b ldr r0, [sp, #44] ; 0x2c 8022bce: 181d adds r5, r3, r0 8022bd0: 42a6 cmp r6, r4 8022bd2: bfb4 ite lt 8022bd4: 4633 movlt r3, r6 8022bd6: 4623 movge r3, r4 8022bd8: 42ab cmp r3, r5 8022bda: bfa8 it ge 8022bdc: 462b movge r3, r5 8022bde: 2b00 cmp r3, #0 8022be0: bfc2 ittt gt 8022be2: ebc3 0606 rsbgt r6, r3, r6 8022be6: ebc3 0505 rsbgt r5, r3, r5 8022bea: ebc3 0404 rsbgt r4, r3, r4 8022bee: b189 cbz r1, 8022c14 <_strtod_r+0x654> 8022bf0: 460a mov r2, r1 8022bf2: 4658 mov r0, fp 8022bf4: 4639 mov r1, r7 8022bf6: f001 ffcf bl 8024b98 <__pow5mult> 8022bfa: 9a18 ldr r2, [sp, #96] ; 0x60 8022bfc: 4607 mov r7, r0 8022bfe: 4658 mov r0, fp 8022c00: 4639 mov r1, r7 8022c02: f001 ff2b bl 8024a5c <__multiply> 8022c06: 9918 ldr r1, [sp, #96] ; 0x60 8022c08: 4680 mov r8, r0 8022c0a: 4658 mov r0, fp 8022c0c: f001 fe24 bl 8024858 <_Bfree> 8022c10: f8cd 8060 str.w r8, [sp, #96] ; 0x60 8022c14: 2e00 cmp r6, #0 8022c16: dd05 ble.n 8022c24 <_strtod_r+0x664> 8022c18: 4658 mov r0, fp 8022c1a: 9918 ldr r1, [sp, #96] ; 0x60 8022c1c: 4632 mov r2, r6 8022c1e: f002 f80d bl 8024c3c <__lshift> 8022c22: 9018 str r0, [sp, #96] ; 0x60 8022c24: 9a0e ldr r2, [sp, #56] ; 0x38 8022c26: b122 cbz r2, 8022c32 <_strtod_r+0x672> 8022c28: 4651 mov r1, sl 8022c2a: 4658 mov r0, fp 8022c2c: f001 ffb4 bl 8024b98 <__pow5mult> 8022c30: 4682 mov sl, r0 8022c32: 2d00 cmp r5, #0 8022c34: dd05 ble.n 8022c42 <_strtod_r+0x682> 8022c36: 4651 mov r1, sl 8022c38: 4658 mov r0, fp 8022c3a: 462a mov r2, r5 8022c3c: f001 fffe bl 8024c3c <__lshift> 8022c40: 4682 mov sl, r0 8022c42: 2c00 cmp r4, #0 8022c44: dd05 ble.n 8022c52 <_strtod_r+0x692> 8022c46: 4639 mov r1, r7 8022c48: 4658 mov r0, fp 8022c4a: 4622 mov r2, r4 8022c4c: f001 fff6 bl 8024c3c <__lshift> 8022c50: 4607 mov r7, r0 8022c52: 9918 ldr r1, [sp, #96] ; 0x60 8022c54: 4652 mov r2, sl 8022c56: 4658 mov r0, fp 8022c58: f04f 0800 mov.w r8, #0 8022c5c: f002 f866 bl 8024d2c <__mdiff> 8022c60: 4639 mov r1, r7 8022c62: 68c4 ldr r4, [r0, #12] 8022c64: 4606 mov r6, r0 8022c66: f8c0 800c str.w r8, [r0, #12] 8022c6a: 940f str r4, [sp, #60] ; 0x3c 8022c6c: f002 f840 bl 8024cf0 <__mcmp> 8022c70: 4540 cmp r0, r8 8022c72: f2c0 8213 blt.w 802309c <_strtod_r+0xadc> 8022c76: f000 8261 beq.w 802313c <_strtod_r+0xb7c> 8022c7a: 4630 mov r0, r6 8022c7c: 4639 mov r1, r7 8022c7e: f002 f9a3 bl 8024fc8 <__ratio> 8022c82: 2200 movs r2, #0 8022c84: f04f 4380 mov.w r3, #1073741824 ; 0x40000000 8022c88: 4604 mov r4, r0 8022c8a: 460d mov r5, r1 8022c8c: f7fd ff14 bl 8020ab8 <__aeabi_dcmple> 8022c90: 2800 cmp r0, #0 8022c92: f47f aeef bne.w 8022a74 <_strtod_r+0x4b4> 8022c96: 2300 movs r3, #0 8022c98: 4620 mov r0, r4 8022c9a: f6c3 73e0 movt r3, #16352 ; 0x3fe0 8022c9e: 4629 mov r1, r5 8022ca0: 2200 movs r2, #0 8022ca2: f7fd fc8d bl 80205c0 <__aeabi_dmul> 8022ca6: 9c0f ldr r4, [sp, #60] ; 0x3c 8022ca8: 900c str r0, [sp, #48] ; 0x30 8022caa: 4689 mov r9, r1 8022cac: f101 4300 add.w r3, r1, #2147483648 ; 0x80000000 8022cb0: b104 cbz r4, 8022cb4 <_strtod_r+0x6f4> 8022cb2: 460b mov r3, r1 8022cb4: 9c0c ldr r4, [sp, #48] ; 0x30 8022cb6: 461d mov r5, r3 8022cb8: f8dd c01c ldr.w ip, [sp, #28] 8022cbc: e6ea b.n 8022a94 <_strtod_r+0x4d4> 8022cbe: 4640 mov r0, r8 8022cc0: 46a0 mov r8, r4 8022cc2: 9009 str r0, [sp, #36] ; 0x24 8022cc4: f1a5 0130 sub.w r1, r5, #48 ; 0x30 8022cc8: 2909 cmp r1, #9 8022cca: d803 bhi.n 8022cd4 <_strtod_r+0x714> 8022ccc: 9a17 ldr r2, [sp, #92] ; 0x5c 8022cce: 3001 adds r0, #1 8022cd0: 920a str r2, [sp, #40] ; 0x28 8022cd2: e66f b.n 80229b4 <_strtod_r+0x3f4> 8022cd4: 2101 movs r1, #1 8022cd6: e50a b.n 80226ee <_strtod_r+0x12e> 8022cd8: f04f 0800 mov.w r8, #0 8022cdc: 2101 movs r1, #1 8022cde: f8cd 8024 str.w r8, [sp, #36] ; 0x24 8022ce2: e504 b.n 80226ee <_strtod_r+0x12e> 8022ce4: f3af 8000 nop.w 8022ce8: ffc00000 .word 0xffc00000 8022cec: 41dfffff .word 0x41dfffff 8022cf0: f5b4 7f9a cmp.w r4, #308 ; 0x134 8022cf4: f300 8258 bgt.w 80231a8 <_strtod_r+0xbe8> 8022cf8: 1124 asrs r4, r4, #4 8022cfa: f249 6af0 movw sl, #38640 ; 0x96f0 8022cfe: 2c01 cmp r4, #1 8022d00: f340 8398 ble.w 8023434 <_strtod_r+0xe74> 8022d04: f6c0 0a03 movt sl, #2051 ; 0x803 8022d08: e9dd 2306 ldrd r2, r3, [sp, #24] 8022d0c: f04f 0900 mov.w r9, #0 8022d10: 4655 mov r5, sl 8022d12: f014 0f01 tst.w r4, #1 8022d16: 4610 mov r0, r2 8022d18: 4619 mov r1, r3 8022d1a: ea4f 0464 mov.w r4, r4, asr #1 8022d1e: f109 0901 add.w r9, r9, #1 8022d22: d005 beq.n 8022d30 <_strtod_r+0x770> 8022d24: e9d5 2300 ldrd r2, r3, [r5] 8022d28: f7fd fc4a bl 80205c0 <__aeabi_dmul> 8022d2c: 4602 mov r2, r0 8022d2e: 460b mov r3, r1 8022d30: 3508 adds r5, #8 8022d32: 2c01 cmp r4, #1 8022d34: dced bgt.n 8022d12 <_strtod_r+0x752> 8022d36: 4610 mov r0, r2 8022d38: 4619 mov r1, r3 8022d3a: e9cd 0106 strd r0, r1, [sp, #24] 8022d3e: 9907 ldr r1, [sp, #28] 8022d40: eb0a 09c9 add.w r9, sl, r9, lsl #3 8022d44: f1a1 7154 sub.w r1, r1, #55574528 ; 0x3500000 8022d48: 9107 str r1, [sp, #28] 8022d4a: e9dd 2306 ldrd r2, r3, [sp, #24] 8022d4e: e9d9 0100 ldrd r0, r1, [r9] 8022d52: f7fd fc35 bl 80205c0 <__aeabi_dmul> 8022d56: 2300 movs r3, #0 8022d58: 2200 movs r2, #0 8022d5a: f6c7 73f0 movt r3, #32752 ; 0x7ff0 8022d5e: f6c7 42a0 movt r2, #31904 ; 0x7ca0 8022d62: e9cd 0106 strd r0, r1, [sp, #24] 8022d66: 9907 ldr r1, [sp, #28] 8022d68: 400b ands r3, r1 8022d6a: 4293 cmp r3, r2 8022d6c: f200 821c bhi.w 80231a8 <_strtod_r+0xbe8> 8022d70: 2200 movs r2, #0 8022d72: f6c7 4290 movt r2, #31888 ; 0x7c90 8022d76: 4293 cmp r3, r2 8022d78: f240 8305 bls.w 8023386 <_strtod_r+0xdc6> 8022d7c: f64f 72ff movw r2, #65535 ; 0xffff 8022d80: f04f 30ff mov.w r0, #4294967295 8022d84: 4615 mov r5, r2 8022d86: 2400 movs r4, #0 8022d88: f6c7 75ef movt r5, #32751 ; 0x7fef 8022d8c: 940b str r4, [sp, #44] ; 0x2c 8022d8e: 9507 str r5, [sp, #28] 8022d90: 4681 mov r9, r0 8022d92: 9006 str r0, [sp, #24] 8022d94: 46aa mov sl, r5 8022d96: e651 b.n 8022a3c <_strtod_r+0x47c> 8022d98: 2301 movs r3, #1 8022d9a: 930a str r3, [sp, #40] ; 0x28 8022d9c: f10c 0302 add.w r3, ip, #2 8022da0: 9317 str r3, [sp, #92] ; 0x5c 8022da2: f89c 5002 ldrb.w r5, [ip, #2] 8022da6: e4bc b.n 8022722 <_strtod_r+0x162> 8022da8: 48ab ldr r0, [pc, #684] ; (8023058 <_strtod_r+0xa98>) 8022daa: 9a17 ldr r2, [sp, #92] ; 0x5c 8022dac: f810 1f01 ldrb.w r1, [r0, #1]! 8022db0: 4613 mov r3, r2 8022db2: 2900 cmp r1, #0 8022db4: f000 8311 beq.w 80233da <_strtod_r+0xe1a> 8022db8: 785b ldrb r3, [r3, #1] 8022dba: 3201 adds r2, #1 8022dbc: 2b40 cmp r3, #64 ; 0x40 8022dbe: dd02 ble.n 8022dc6 <_strtod_r+0x806> 8022dc0: 2b5a cmp r3, #90 ; 0x5a 8022dc2: bfd8 it le 8022dc4: 3320 addle r3, #32 8022dc6: 428b cmp r3, r1 8022dc8: d0f0 beq.n 8022dac <_strtod_r+0x7ec> 8022dca: e5b8 b.n 802293e <_strtod_r+0x37e> 8022dcc: 9b06 ldr r3, [sp, #24] 8022dce: f8dd c01c ldr.w ip, [sp, #28] 8022dd2: 2b00 cmp r3, #0 8022dd4: f040 80a6 bne.w 8022f24 <_strtod_r+0x964> 8022dd8: f3cc 0313 ubfx r3, ip, #0, #20 8022ddc: bb03 cbnz r3, 8022e20 <_strtod_r+0x860> 8022dde: 2300 movs r3, #0 8022de0: 4620 mov r0, r4 8022de2: 4629 mov r1, r5 8022de4: 2200 movs r2, #0 8022de6: f6c3 73f0 movt r3, #16368 ; 0x3ff0 8022dea: f8cd c010 str.w ip, [sp, #16] 8022dee: f7fd fe59 bl 8020aa4 <__aeabi_dcmplt> 8022df2: f8dd c010 ldr.w ip, [sp, #16] 8022df6: 2800 cmp r0, #0 8022df8: f040 8246 bne.w 8023288 <_strtod_r+0xcc8> 8022dfc: 2300 movs r3, #0 8022dfe: 2200 movs r2, #0 8022e00: f6c3 73e0 movt r3, #16352 ; 0x3fe0 8022e04: 4620 mov r0, r4 8022e06: 4629 mov r1, r5 8022e08: f7fd fbda bl 80205c0 <__aeabi_dmul> 8022e0c: f8dd c010 ldr.w ip, [sp, #16] 8022e10: 4689 mov r9, r1 8022e12: 4602 mov r2, r0 8022e14: f101 4300 add.w r3, r1, #2147483648 ; 0x80000000 8022e18: 900c str r0, [sp, #48] ; 0x30 8022e1a: 4614 mov r4, r2 8022e1c: 461d mov r5, r3 8022e1e: e639 b.n 8022a94 <_strtod_r+0x4d4> 8022e20: f04f 0900 mov.w r9, #0 8022e24: 2500 movs r5, #0 8022e26: f8cd 9030 str.w r9, [sp, #48] ; 0x30 8022e2a: 2400 movs r4, #0 8022e2c: f6cb 75f0 movt r5, #49136 ; 0xbff0 8022e30: f6c3 79f0 movt r9, #16368 ; 0x3ff0 8022e34: e62e b.n 8022a94 <_strtod_r+0x4d4> 8022e36: f1ac 7c54 sub.w ip, ip, #55574528 ; 0x3500000 8022e3a: 9a09 ldr r2, [sp, #36] ; 0x24 8022e3c: f8cd c01c str.w ip, [sp, #28] 8022e40: 9b0a ldr r3, [sp, #40] ; 0x28 8022e42: e9dd 0106 ldrd r0, r1, [sp, #24] 8022e46: e9cd 4502 strd r4, r5, [sp, #8] 8022e4a: 4614 mov r4, r2 8022e4c: 461d mov r5, r3 8022e4e: e9cd 4514 strd r4, r5, [sp, #80] ; 0x50 8022e52: f001 ffe1 bl 8024e18 <__ulp> 8022e56: 4602 mov r2, r0 8022e58: 460b mov r3, r1 8022e5a: e9dd 0102 ldrd r0, r1, [sp, #8] 8022e5e: f7fd fbaf bl 80205c0 <__aeabi_dmul> 8022e62: 4602 mov r2, r0 8022e64: 460b mov r3, r1 8022e66: e9dd 0106 ldrd r0, r1, [sp, #24] 8022e6a: f7fd f9f7 bl 802025c <__adddf3> 8022e6e: 2300 movs r3, #0 8022e70: f6c7 73f0 movt r3, #32752 ; 0x7ff0 8022e74: f64f 72ff movw r2, #65535 ; 0xffff 8022e78: f6c7 429f movt r2, #31903 ; 0x7c9f 8022e7c: e9cd 0106 strd r0, r1, [sp, #24] 8022e80: 9c07 ldr r4, [sp, #28] 8022e82: 4023 ands r3, r4 8022e84: 4293 cmp r3, r2 8022e86: d976 bls.n 8022f76 <_strtod_r+0x9b6> 8022e88: f64f 73ff movw r3, #65535 ; 0xffff 8022e8c: 9d15 ldr r5, [sp, #84] ; 0x54 8022e8e: f6c7 73ef movt r3, #32751 ; 0x7fef 8022e92: 429d cmp r5, r3 8022e94: f000 8177 beq.w 8023186 <_strtod_r+0xbc6> 8022e98: f64f 71ff movw r1, #65535 ; 0xffff 8022e9c: f04f 33ff mov.w r3, #4294967295 8022ea0: 460a mov r2, r1 8022ea2: 9306 str r3, [sp, #24] 8022ea4: f6c7 72ef movt r2, #32751 ; 0x7fef 8022ea8: 9309 str r3, [sp, #36] ; 0x24 8022eaa: 9207 str r2, [sp, #28] 8022eac: 920a str r2, [sp, #40] ; 0x28 8022eae: e643 b.n 8022b38 <_strtod_r+0x578> 8022eb0: 4649 mov r1, r9 8022eb2: 980c ldr r0, [sp, #48] ; 0x30 8022eb4: f7fd fe1e bl 8020af4 <__aeabi_d2iz> 8022eb8: f7fd fb1c bl 80204f4 <__aeabi_i2d> 8022ebc: 4602 mov r2, r0 8022ebe: 460b mov r3, r1 8022ec0: 980c ldr r0, [sp, #48] ; 0x30 8022ec2: 4649 mov r1, r9 8022ec4: f7fd f9c8 bl 8020258 <__aeabi_dsub> 8022ec8: 9d0f ldr r5, [sp, #60] ; 0x3c 8022eca: 4680 mov r8, r0 8022ecc: 4689 mov r9, r1 8022ece: 2d00 cmp r5, #0 8022ed0: d137 bne.n 8022f42 <_strtod_r+0x982> 8022ed2: 9a06 ldr r2, [sp, #24] 8022ed4: 2a00 cmp r2, #0 8022ed6: d134 bne.n 8022f42 <_strtod_r+0x982> 8022ed8: f3c4 0413 ubfx r4, r4, #0, #20 8022edc: 2c00 cmp r4, #0 8022ede: d130 bne.n 8022f42 <_strtod_r+0x982> 8022ee0: a357 add r3, pc, #348 ; (adr r3, 8023040 <_strtod_r+0xa80>) 8022ee2: e9d3 2300 ldrd r2, r3, [r3] 8022ee6: f7fd fddd bl 8020aa4 <__aeabi_dcmplt> 8022eea: 2800 cmp r0, #0 8022eec: f43f ae24 beq.w 8022b38 <_strtod_r+0x578> 8022ef0: 4654 mov r4, sl 8022ef2: f8dd 9024 ldr.w r9, [sp, #36] ; 0x24 8022ef6: f8dd a028 ldr.w sl, [sp, #40] ; 0x28 8022efa: 4658 mov r0, fp 8022efc: 9918 ldr r1, [sp, #96] ; 0x60 8022efe: f001 fcab bl 8024858 <_Bfree> 8022f02: 4658 mov r0, fp 8022f04: 4621 mov r1, r4 8022f06: f001 fca7 bl 8024858 <_Bfree> 8022f0a: 4658 mov r0, fp 8022f0c: 4639 mov r1, r7 8022f0e: f001 fca3 bl 8024858 <_Bfree> 8022f12: 4658 mov r0, fp 8022f14: 9911 ldr r1, [sp, #68] ; 0x44 8022f16: f001 fc9f bl 8024858 <_Bfree> 8022f1a: 4658 mov r0, fp 8022f1c: 4631 mov r1, r6 8022f1e: f001 fc9b bl 8024858 <_Bfree> 8022f22: e49a b.n 802285a <_strtod_r+0x29a> 8022f24: 2b01 cmp r3, #1 8022f26: f47f af7b bne.w 8022e20 <_strtod_r+0x860> 8022f2a: 4661 mov r1, ip 8022f2c: 2900 cmp r1, #0 8022f2e: f47f af77 bne.w 8022e20 <_strtod_r+0x860> 8022f32: 4654 mov r4, sl 8022f34: f04f 0900 mov.w r9, #0 8022f38: 46ca mov sl, r9 8022f3a: 2322 movs r3, #34 ; 0x22 8022f3c: f8cb 3000 str.w r3, [fp] 8022f40: e7db b.n 8022efa <_strtod_r+0x93a> 8022f42: 4640 mov r0, r8 8022f44: 4649 mov r1, r9 8022f46: a340 add r3, pc, #256 ; (adr r3, 8023048 <_strtod_r+0xa88>) 8022f48: e9d3 2300 ldrd r2, r3, [r3] 8022f4c: f7fd fdaa bl 8020aa4 <__aeabi_dcmplt> 8022f50: 2800 cmp r0, #0 8022f52: d1cd bne.n 8022ef0 <_strtod_r+0x930> 8022f54: 4640 mov r0, r8 8022f56: 4649 mov r1, r9 8022f58: a33d add r3, pc, #244 ; (adr r3, 8023050 <_strtod_r+0xa90>) 8022f5a: e9d3 2300 ldrd r2, r3, [r3] 8022f5e: f7fd fdbf bl 8020ae0 <__aeabi_dcmpgt> 8022f62: 2800 cmp r0, #0 8022f64: f43f ade8 beq.w 8022b38 <_strtod_r+0x578> 8022f68: e7c2 b.n 8022ef0 <_strtod_r+0x930> 8022f6a: f04f 0900 mov.w r9, #0 8022f6e: 900c str r0, [sp, #48] ; 0x30 8022f70: f6c3 79f0 movt r9, #16368 ; 0x3ff0 8022f74: e5b7 b.n 8022ae6 <_strtod_r+0x526> 8022f76: 9906 ldr r1, [sp, #24] 8022f78: f104 7454 add.w r4, r4, #55574528 ; 0x3500000 8022f7c: 9407 str r4, [sp, #28] 8022f7e: 940a str r4, [sp, #40] ; 0x28 8022f80: 9109 str r1, [sp, #36] ; 0x24 8022f82: e5d0 b.n 8022b26 <_strtod_r+0x566> 8022f84: f8cd c05c str.w ip, [sp, #92] ; 0x5c 8022f88: 2200 movs r2, #0 8022f8a: f1b8 0f00 cmp.w r8, #0 8022f8e: f47f ac0f bne.w 80227b0 <_strtod_r+0x1f0> 8022f92: e495 b.n 80228c0 <_strtod_r+0x300> 8022f94: 9d12 ldr r5, [sp, #72] ; 0x48 8022f96: f240 0404 movw r4, #4 8022f9a: f2c2 0400 movt r4, #8192 ; 0x2000 8022f9e: ab18 add r3, sp, #96 ; 0x60 8022fa0: 4658 mov r0, fp 8022fa2: e88d 0028 stmia.w sp, {r3, r5} 8022fa6: a917 add r1, sp, #92 ; 0x5c 8022fa8: 4622 mov r2, r4 8022faa: ab19 add r3, sp, #100 ; 0x64 8022fac: f000 fd1c bl 80239e8 <__gethex> 8022fb0: f010 0707 ands.w r7, r0, #7 8022fb4: 4605 mov r5, r0 8022fb6: bf04 itt eq 8022fb8: 46b9 moveq r9, r7 8022fba: 46ca moveq sl, r9 8022fbc: f43f ac4d beq.w 802285a <_strtod_r+0x29a> 8022fc0: 2f06 cmp r7, #6 8022fc2: f000 816f beq.w 80232a4 <_strtod_r+0xce4> 8022fc6: 9a18 ldr r2, [sp, #96] ; 0x60 8022fc8: b13a cbz r2, 8022fda <_strtod_r+0xa1a> 8022fca: 6821 ldr r1, [r4, #0] 8022fcc: a81a add r0, sp, #104 ; 0x68 8022fce: f002 f845 bl 802505c <__copybits> 8022fd2: 4658 mov r0, fp 8022fd4: 9918 ldr r1, [sp, #96] ; 0x60 8022fd6: f001 fc3f bl 8024858 <_Bfree> 8022fda: 9b19 ldr r3, [sp, #100] ; 0x64 8022fdc: 2f06 cmp r7, #6 8022fde: d80b bhi.n 8022ff8 <_strtod_r+0xa38> 8022fe0: e8df f007 tbb [pc, r7] 8022fe4: 141b203c .word 0x141b203c 8022fe8: 2004 .short 0x2004 8022fea: 3c .byte 0x3c 8022feb: 00 .byte 0x00 8022fec: f06f 4400 mvn.w r4, #2147483648 ; 0x80000000 8022ff0: f04f 30ff mov.w r0, #4294967295 8022ff4: 9407 str r4, [sp, #28] 8022ff6: 9006 str r0, [sp, #24] 8022ff8: 072b lsls r3, r5, #28 8022ffa: f57f acb1 bpl.w 8022960 <_strtod_r+0x3a0> 8022ffe: 9907 ldr r1, [sp, #28] 8023000: f8dd 9018 ldr.w r9, [sp, #24] 8023004: f041 4300 orr.w r3, r1, #2147483648 ; 0x80000000 8023008: 469a mov sl, r3 802300a: e426 b.n 802285a <_strtod_r+0x29a> 802300c: 2100 movs r1, #0 802300e: 9106 str r1, [sp, #24] 8023010: 460a mov r2, r1 8023012: f6c7 72f0 movt r2, #32752 ; 0x7ff0 8023016: 9207 str r2, [sp, #28] 8023018: e7ee b.n 8022ff8 <_strtod_r+0xa38> 802301a: 9b1a ldr r3, [sp, #104] ; 0x68 802301c: 9c1b ldr r4, [sp, #108] ; 0x6c 802301e: 9306 str r3, [sp, #24] 8023020: 9407 str r4, [sp, #28] 8023022: e7e9 b.n 8022ff8 <_strtod_r+0xa38> 8023024: 981a ldr r0, [sp, #104] ; 0x68 8023026: f203 4333 addw r3, r3, #1075 ; 0x433 802302a: 9a1b ldr r2, [sp, #108] ; 0x6c 802302c: f422 1280 bic.w r2, r2, #1048576 ; 0x100000 8023030: 9006 str r0, [sp, #24] 8023032: ea42 5203 orr.w r2, r2, r3, lsl #20 8023036: 9207 str r2, [sp, #28] 8023038: e7de b.n 8022ff8 <_strtod_r+0xa38> 802303a: bf00 nop 802303c: f3af 8000 nop.w 8023040: 94a03595 .word 0x94a03595 8023044: 3fcfffff .word 0x3fcfffff 8023048: 94a03595 .word 0x94a03595 802304c: 3fdfffff .word 0x3fdfffff 8023050: 35afe535 .word 0x35afe535 8023054: 3fe00000 .word 0x3fe00000 8023058: 080459d7 .word 0x080459d7 802305c: 2100 movs r1, #0 802305e: 9107 str r1, [sp, #28] 8023060: 9106 str r1, [sp, #24] 8023062: e7c9 b.n 8022ff8 <_strtod_r+0xa38> 8023064: 46b0 mov r8, r6 8023066: 4657 mov r7, sl 8023068: 4654 mov r4, sl 802306a: f7ff bb24 b.w 80226b6 <_strtod_r+0xf6> 802306e: 2300 movs r3, #0 8023070: 930a str r3, [sp, #40] ; 0x28 8023072: e693 b.n 8022d9c <_strtod_r+0x7dc> 8023074: f8dd 802c ldr.w r8, [sp, #44] ; 0x2c 8023078: eb08 0300 add.w r3, r8, r0 802307c: 3b01 subs r3, #1 802307e: 2b08 cmp r3, #8 8023080: f103 0801 add.w r8, r3, #1 8023084: f300 8172 bgt.w 802336c <_strtod_r+0xdac> 8023088: eb07 0787 add.w r7, r7, r7, lsl #2 802308c: 2000 movs r0, #0 802308e: eb01 0747 add.w r7, r1, r7, lsl #1 8023092: 9d0a ldr r5, [sp, #40] ; 0x28 8023094: 1c6b adds r3, r5, #1 8023096: 9317 str r3, [sp, #92] ; 0x5c 8023098: 786d ldrb r5, [r5, #1] 802309a: e613 b.n 8022cc4 <_strtod_r+0x704> 802309c: 9d0f ldr r5, [sp, #60] ; 0x3c 802309e: 4654 mov r4, sl 80230a0: bb7d cbnz r5, 8023102 <_strtod_r+0xb42> 80230a2: 9806 ldr r0, [sp, #24] 80230a4: bb68 cbnz r0, 8023102 <_strtod_r+0xb42> 80230a6: 9a07 ldr r2, [sp, #28] 80230a8: f3c2 0313 ubfx r3, r2, #0, #20 80230ac: bb4b cbnz r3, 8023102 <_strtod_r+0xb42> 80230ae: 4643 mov r3, r8 80230b0: f6c7 73f0 movt r3, #32752 ; 0x7ff0 80230b4: 4013 ands r3, r2 80230b6: f1b3 6fd6 cmp.w r3, #112197632 ; 0x6b00000 80230ba: d922 bls.n 8023102 <_strtod_r+0xb42> 80230bc: 6973 ldr r3, [r6, #20] 80230be: b913 cbnz r3, 80230c6 <_strtod_r+0xb06> 80230c0: 6933 ldr r3, [r6, #16] 80230c2: 2b01 cmp r3, #1 80230c4: dd1d ble.n 8023102 <_strtod_r+0xb42> 80230c6: 4631 mov r1, r6 80230c8: 2201 movs r2, #1 80230ca: 4658 mov r0, fp 80230cc: f001 fdb6 bl 8024c3c <__lshift> 80230d0: 4639 mov r1, r7 80230d2: 4606 mov r6, r0 80230d4: f001 fe0c bl 8024cf0 <__mcmp> 80230d8: 2800 cmp r0, #0 80230da: dd12 ble.n 8023102 <_strtod_r+0xb42> 80230dc: 9d0b ldr r5, [sp, #44] ; 0x2c 80230de: 2d00 cmp r5, #0 80230e0: f040 8195 bne.w 802340e <_strtod_r+0xe4e> 80230e4: 9807 ldr r0, [sp, #28] 80230e6: f020 4300 bic.w r3, r0, #2147483648 ; 0x80000000 80230ea: 0d1b lsrs r3, r3, #20 80230ec: 051b lsls r3, r3, #20 80230ee: f5a3 1380 sub.w r3, r3, #1048576 ; 0x100000 80230f2: f04f 32ff mov.w r2, #4294967295 80230f6: 9206 str r2, [sp, #24] 80230f8: ea6f 5313 mvn.w r3, r3, lsr #20 80230fc: ea6f 5303 mvn.w r3, r3, lsl #20 8023100: 9307 str r3, [sp, #28] 8023102: 9d0b ldr r5, [sp, #44] ; 0x2c 8023104: 2d00 cmp r5, #0 8023106: f000 80c8 beq.w 802329a <_strtod_r+0xcda> 802310a: 2200 movs r2, #0 802310c: 2300 movs r3, #0 802310e: f6c3 1250 movt r2, #14672 ; 0x3950 8023112: 9314 str r3, [sp, #80] ; 0x50 8023114: 9215 str r2, [sp, #84] ; 0x54 8023116: e9dd 0106 ldrd r0, r1, [sp, #24] 802311a: e9dd 2314 ldrd r2, r3, [sp, #80] ; 0x50 802311e: f7fd fa4f bl 80205c0 <__aeabi_dmul> 8023122: e9cd 0106 strd r0, r1, [sp, #24] 8023126: 468a mov sl, r1 8023128: 9907 ldr r1, [sp, #28] 802312a: 4681 mov r9, r0 802312c: 2900 cmp r1, #0 802312e: f47f aee4 bne.w 8022efa <_strtod_r+0x93a> 8023132: 9a06 ldr r2, [sp, #24] 8023134: 2a00 cmp r2, #0 8023136: f47f aee0 bne.w 8022efa <_strtod_r+0x93a> 802313a: e6fe b.n 8022f3a <_strtod_r+0x97a> 802313c: 9d0f ldr r5, [sp, #60] ; 0x3c 802313e: 4654 mov r4, sl 8023140: f8dd 9024 ldr.w r9, [sp, #36] ; 0x24 8023144: f8dd a028 ldr.w sl, [sp, #40] ; 0x28 8023148: 2d00 cmp r5, #0 802314a: f000 80d3 beq.w 80232f4 <_strtod_r+0xd34> 802314e: 9b07 ldr r3, [sp, #28] 8023150: f64f 72ff movw r2, #65535 ; 0xffff 8023154: f2c0 020f movt r2, #15 8023158: f023 417f bic.w r1, r3, #4278190080 ; 0xff000000 802315c: f421 0170 bic.w r1, r1, #15728640 ; 0xf00000 8023160: 4291 cmp r1, r2 8023162: 9906 ldr r1, [sp, #24] 8023164: f000 8119 beq.w 802339a <_strtod_r+0xdda> 8023168: 07cb lsls r3, r1, #31 802316a: d5ca bpl.n 8023102 <_strtod_r+0xb42> 802316c: 4648 mov r0, r9 802316e: 4651 mov r1, sl 8023170: f001 fe52 bl 8024e18 <__ulp> 8023174: 4602 mov r2, r0 8023176: 460b mov r3, r1 8023178: 4648 mov r0, r9 802317a: 4651 mov r1, sl 802317c: f7fd f86e bl 802025c <__adddf3> 8023180: e9cd 0106 strd r0, r1, [sp, #24] 8023184: e7bd b.n 8023102 <_strtod_r+0xb42> 8023186: 9814 ldr r0, [sp, #80] ; 0x50 8023188: 3001 adds r0, #1 802318a: f47f ae85 bne.w 8022e98 <_strtod_r+0x8d8> 802318e: 2000 movs r0, #0 8023190: 4654 mov r4, sl 8023192: 4601 mov r1, r0 8023194: 2322 movs r3, #34 ; 0x22 8023196: f6c7 71f0 movt r1, #32752 ; 0x7ff0 802319a: f8cb 3000 str.w r3, [fp] 802319e: 9107 str r1, [sp, #28] 80231a0: 4681 mov r9, r0 80231a2: 9006 str r0, [sp, #24] 80231a4: 468a mov sl, r1 80231a6: e6a8 b.n 8022efa <_strtod_r+0x93a> 80231a8: 2300 movs r3, #0 80231aa: 2500 movs r5, #0 80231ac: 461c mov r4, r3 80231ae: 9506 str r5, [sp, #24] 80231b0: f6c7 74f0 movt r4, #32752 ; 0x7ff0 80231b4: 2322 movs r3, #34 ; 0x22 80231b6: 9407 str r4, [sp, #28] 80231b8: 46a9 mov r9, r5 80231ba: f8cb 3000 str.w r3, [fp] 80231be: 46a2 mov sl, r4 80231c0: f7ff bb4b b.w 802285a <_strtod_r+0x29a> 80231c4: f43f ac35 beq.w 8022a32 <_strtod_r+0x472> 80231c8: 4264 negs r4, r4 80231ca: f014 020f ands.w r2, r4, #15 80231ce: d00d beq.n 80231ec <_strtod_r+0xc2c> 80231d0: f249 6300 movw r3, #38400 ; 0x9600 80231d4: e9dd 0106 ldrd r0, r1, [sp, #24] 80231d8: f6c0 0303 movt r3, #2051 ; 0x803 80231dc: eb03 03c2 add.w r3, r3, r2, lsl #3 80231e0: e9d3 2300 ldrd r2, r3, [r3] 80231e4: f7fd fb16 bl 8020814 <__aeabi_ddiv> 80231e8: e9cd 0106 strd r0, r1, [sp, #24] 80231ec: 1124 asrs r4, r4, #4 80231ee: f43f ac20 beq.w 8022a32 <_strtod_r+0x472> 80231f2: 2c1f cmp r4, #31 80231f4: dc40 bgt.n 8023278 <_strtod_r+0xcb8> 80231f6: f014 0f10 tst.w r4, #16 80231fa: bf14 ite ne 80231fc: 256a movne r5, #106 ; 0x6a 80231fe: 2500 moveq r5, #0 8023200: 2c00 cmp r4, #0 8023202: 950b str r5, [sp, #44] ; 0x2c 8023204: dd17 ble.n 8023236 <_strtod_r+0xc76> 8023206: f249 55c8 movw r5, #38344 ; 0x95c8 802320a: e9dd 2306 ldrd r2, r3, [sp, #24] 802320e: f6c0 0503 movt r5, #2051 ; 0x803 8023212: f014 0f01 tst.w r4, #1 8023216: 4610 mov r0, r2 8023218: 4619 mov r1, r3 802321a: d005 beq.n 8023228 <_strtod_r+0xc68> 802321c: e9d5 2300 ldrd r2, r3, [r5] 8023220: f7fd f9ce bl 80205c0 <__aeabi_dmul> 8023224: 4602 mov r2, r0 8023226: 460b mov r3, r1 8023228: 3508 adds r5, #8 802322a: 1064 asrs r4, r4, #1 802322c: d1f1 bne.n 8023212 <_strtod_r+0xc52> 802322e: 4610 mov r0, r2 8023230: 4619 mov r1, r3 8023232: e9cd 0106 strd r0, r1, [sp, #24] 8023236: 9c0b ldr r4, [sp, #44] ; 0x2c 8023238: b18c cbz r4, 802325e <_strtod_r+0xc9e> 802323a: 9a07 ldr r2, [sp, #28] 802323c: f3c2 530a ubfx r3, r2, #20, #11 8023240: f1c3 036b rsb r3, r3, #107 ; 0x6b 8023244: 2b00 cmp r3, #0 8023246: dd0a ble.n 802325e <_strtod_r+0xc9e> 8023248: 2b1f cmp r3, #31 802324a: f340 810a ble.w 8023462 <_strtod_r+0xea2> 802324e: 2100 movs r1, #0 8023250: 2b34 cmp r3, #52 ; 0x34 8023252: 9106 str r1, [sp, #24] 8023254: f340 810d ble.w 8023472 <_strtod_r+0xeb2> 8023258: f04f 725c mov.w r2, #57671680 ; 0x3700000 802325c: 9207 str r2, [sp, #28] 802325e: 9d06 ldr r5, [sp, #24] 8023260: 2200 movs r2, #0 8023262: 9c07 ldr r4, [sp, #28] 8023264: 2300 movs r3, #0 8023266: 4628 mov r0, r5 8023268: 46a9 mov r9, r5 802326a: 4621 mov r1, r4 802326c: 46a2 mov sl, r4 802326e: f7fd fc0f bl 8020a90 <__aeabi_dcmpeq> 8023272: 2800 cmp r0, #0 8023274: f43f abe2 beq.w 8022a3c <_strtod_r+0x47c> 8023278: f04f 0900 mov.w r9, #0 802327c: 2322 movs r3, #34 ; 0x22 802327e: 46ca mov sl, r9 8023280: f8cb 3000 str.w r3, [fp] 8023284: f7ff bae9 b.w 802285a <_strtod_r+0x29a> 8023288: 9a0f ldr r2, [sp, #60] ; 0x3c 802328a: 2300 movs r3, #0 802328c: 4699 mov r9, r3 802328e: f6cb 73e0 movt r3, #49120 ; 0xbfe0 8023292: f6c3 79e0 movt r9, #16352 ; 0x3fe0 8023296: 920c str r2, [sp, #48] ; 0x30 8023298: e5bf b.n 8022e1a <_strtod_r+0x85a> 802329a: f8dd 9018 ldr.w r9, [sp, #24] 802329e: f8dd a01c ldr.w sl, [sp, #28] 80232a2: e62a b.n 8022efa <_strtod_r+0x93a> 80232a4: f04f 0900 mov.w r9, #0 80232a8: 3601 adds r6, #1 80232aa: 46ca mov sl, r9 80232ac: 9617 str r6, [sp, #92] ; 0x5c 80232ae: f7ff bad4 b.w 802285a <_strtod_r+0x29a> 80232b2: 9c09 ldr r4, [sp, #36] ; 0x24 80232b4: f1c8 0325 rsb r3, r8, #37 ; 0x25 80232b8: 429c cmp r4, r3 80232ba: f73f ab9d bgt.w 80229f8 <_strtod_r+0x438> 80232be: f1c8 080f rsb r8, r8, #15 80232c2: f249 6400 movw r4, #38400 ; 0x9600 80232c6: f6c0 0403 movt r4, #2051 ; 0x803 80232ca: e9dd 2306 ldrd r2, r3, [sp, #24] 80232ce: eb04 01c8 add.w r1, r4, r8, lsl #3 80232d2: e9d1 0100 ldrd r0, r1, [r1] 80232d6: f7fd f973 bl 80205c0 <__aeabi_dmul> 80232da: 9d09 ldr r5, [sp, #36] ; 0x24 80232dc: ebc8 0805 rsb r8, r8, r5 80232e0: eb04 04c8 add.w r4, r4, r8, lsl #3 80232e4: e9d4 2300 ldrd r2, r3, [r4] 80232e8: f7fd f96a bl 80205c0 <__aeabi_dmul> 80232ec: 4681 mov r9, r0 80232ee: 468a mov sl, r1 80232f0: f7ff bab3 b.w 802285a <_strtod_r+0x29a> 80232f4: 9907 ldr r1, [sp, #28] 80232f6: f3c1 0313 ubfx r3, r1, #0, #20 80232fa: 2b00 cmp r3, #0 80232fc: d141 bne.n 8023382 <_strtod_r+0xdc2> 80232fe: 9b06 ldr r3, [sp, #24] 8023300: 2b00 cmp r3, #0 8023302: f43f aeeb beq.w 80230dc <_strtod_r+0xb1c> 8023306: 07da lsls r2, r3, #31 8023308: f57f aefb bpl.w 8023102 <_strtod_r+0xb42> 802330c: 4648 mov r0, r9 802330e: 4651 mov r1, sl 8023310: f001 fd82 bl 8024e18 <__ulp> 8023314: 4602 mov r2, r0 8023316: 460b mov r3, r1 8023318: 4648 mov r0, r9 802331a: 4651 mov r1, sl 802331c: f7fc ff9c bl 8020258 <__aeabi_dsub> 8023320: 4602 mov r2, r0 8023322: 460b mov r3, r1 8023324: e9cd 2306 strd r2, r3, [sp, #24] 8023328: 2200 movs r2, #0 802332a: 2300 movs r3, #0 802332c: f7fd fbb0 bl 8020a90 <__aeabi_dcmpeq> 8023330: 2800 cmp r0, #0 8023332: f47f adff bne.w 8022f34 <_strtod_r+0x974> 8023336: e6e4 b.n 8023102 <_strtod_r+0xb42> 8023338: 9d09 ldr r5, [sp, #36] ; 0x24 802333a: 426d negs r5, r5 802333c: 950d str r5, [sp, #52] ; 0x34 802333e: f7ff bb8b b.w 8022a58 <_strtod_r+0x498> 8023342: 9c09 ldr r4, [sp, #36] ; 0x24 8023344: f114 0f16 cmn.w r4, #22 8023348: f6ff ab56 blt.w 80229f8 <_strtod_r+0x438> 802334c: f249 6300 movw r3, #38400 ; 0x9600 8023350: e9dd 0106 ldrd r0, r1, [sp, #24] 8023354: f6c0 0303 movt r3, #2051 ; 0x803 8023358: eba3 03c4 sub.w r3, r3, r4, lsl #3 802335c: e9d3 2300 ldrd r2, r3, [r3] 8023360: f7fd fa58 bl 8020814 <__aeabi_ddiv> 8023364: 4681 mov r9, r0 8023366: 468a mov sl, r1 8023368: f7ff ba77 b.w 802285a <_strtod_r+0x29a> 802336c: 2000 movs r0, #0 802336e: f1b8 0f10 cmp.w r8, #16 8023372: f73f ae8e bgt.w 8023092 <_strtod_r+0xad2> 8023376: eb0a 0a8a add.w sl, sl, sl, lsl #2 802337a: 2000 movs r0, #0 802337c: eb01 0a4a add.w sl, r1, sl, lsl #1 8023380: e687 b.n 8023092 <_strtod_r+0xad2> 8023382: 9b06 ldr r3, [sp, #24] 8023384: e7bf b.n 8023306 <_strtod_r+0xd46> 8023386: f101 7154 add.w r1, r1, #55574528 ; 0x3500000 802338a: 2400 movs r4, #0 802338c: 9107 str r1, [sp, #28] 802338e: 468a mov sl, r1 8023390: 940b str r4, [sp, #44] ; 0x2c 8023392: f8dd 9018 ldr.w r9, [sp, #24] 8023396: f7ff bb51 b.w 8022a3c <_strtod_r+0x47c> 802339a: 9d0b ldr r5, [sp, #44] ; 0x2c 802339c: b1d5 cbz r5, 80233d4 <_strtod_r+0xe14> 802339e: 2200 movs r2, #0 80233a0: f6c7 72f0 movt r2, #32752 ; 0x7ff0 80233a4: 401a ands r2, r3 80233a6: f1b2 6fd4 cmp.w r2, #111149056 ; 0x6a00000 80233aa: d813 bhi.n 80233d4 <_strtod_r+0xe14> 80233ac: 0d12 lsrs r2, r2, #20 80233ae: f04f 30ff mov.w r0, #4294967295 80233b2: f1c2 026b rsb r2, r2, #107 ; 0x6b 80233b6: fa00 f202 lsl.w r2, r0, r2 80233ba: 4291 cmp r1, r2 80233bc: f47f aed4 bne.w 8023168 <_strtod_r+0xba8> 80233c0: 2200 movs r2, #0 80233c2: 2000 movs r0, #0 80233c4: f6c7 72f0 movt r2, #32752 ; 0x7ff0 80233c8: 9006 str r0, [sp, #24] 80233ca: 401a ands r2, r3 80233cc: f502 1280 add.w r2, r2, #1048576 ; 0x100000 80233d0: 9207 str r2, [sp, #28] 80233d2: e696 b.n 8023102 <_strtod_r+0xb42> 80233d4: f04f 32ff mov.w r2, #4294967295 80233d8: e7ef b.n 80233ba <_strtod_r+0xdfa> 80233da: 4c2a ldr r4, [pc, #168] ; (8023484 <_strtod_r+0xec4>) 80233dc: 4611 mov r1, r2 80233de: 9217 str r2, [sp, #92] ; 0x5c 80233e0: f814 0f01 ldrb.w r0, [r4, #1]! 80233e4: 460b mov r3, r1 80233e6: b310 cbz r0, 802342e <_strtod_r+0xe6e> 80233e8: 785b ldrb r3, [r3, #1] 80233ea: 3101 adds r1, #1 80233ec: 2b40 cmp r3, #64 ; 0x40 80233ee: dd02 ble.n 80233f6 <_strtod_r+0xe36> 80233f0: 2b5a cmp r3, #90 ; 0x5a 80233f2: bfd8 it le 80233f4: 3320 addle r3, #32 80233f6: 4283 cmp r3, r0 80233f8: d0f2 beq.n 80233e0 <_strtod_r+0xe20> 80233fa: 3201 adds r2, #1 80233fc: 9217 str r2, [sp, #92] ; 0x5c 80233fe: 2500 movs r5, #0 8023400: 9506 str r5, [sp, #24] 8023402: 4628 mov r0, r5 8023404: f6c7 70f0 movt r0, #32752 ; 0x7ff0 8023408: 9007 str r0, [sp, #28] 802340a: f7ff baa9 b.w 8022960 <_strtod_r+0x3a0> 802340e: 9907 ldr r1, [sp, #28] 8023410: f021 4300 bic.w r3, r1, #2147483648 ; 0x80000000 8023414: 0d1b lsrs r3, r3, #20 8023416: 051b lsls r3, r3, #20 8023418: f1b3 6fd6 cmp.w r3, #112197632 ; 0x6b00000 802341c: f63f ae67 bhi.w 80230ee <_strtod_r+0xb2e> 8023420: f1b3 7f5c cmp.w r3, #57671680 ; 0x3700000 8023424: f63f ae71 bhi.w 802310a <_strtod_r+0xb4a> 8023428: e584 b.n 8022f34 <_strtod_r+0x974> 802342a: 4643 mov r3, r8 802342c: e627 b.n 802307e <_strtod_r+0xabe> 802342e: 3101 adds r1, #1 8023430: 9117 str r1, [sp, #92] ; 0x5c 8023432: e7e4 b.n 80233fe <_strtod_r+0xe3e> 8023434: f04f 0900 mov.w r9, #0 8023438: f6c0 0a03 movt sl, #2051 ; 0x803 802343c: e47f b.n 8022d3e <_strtod_r+0x77e> 802343e: a817 add r0, sp, #92 ; 0x5c 8023440: 4911 ldr r1, [pc, #68] ; (8023488 <_strtod_r+0xec8>) 8023442: aa1a add r2, sp, #104 ; 0x68 8023444: f000 fd7e bl 8023f44 <__hexnan> 8023448: 2805 cmp r0, #5 802344a: f47f aa83 bne.w 8022954 <_strtod_r+0x394> 802344e: 9b1b ldr r3, [sp, #108] ; 0x6c 8023450: 9a1a ldr r2, [sp, #104] ; 0x68 8023452: f043 43ff orr.w r3, r3, #2139095040 ; 0x7f800000 8023456: f443 03e0 orr.w r3, r3, #7340032 ; 0x700000 802345a: 9307 str r3, [sp, #28] 802345c: 9206 str r2, [sp, #24] 802345e: f7ff ba7f b.w 8022960 <_strtod_r+0x3a0> 8023462: f04f 32ff mov.w r2, #4294967295 8023466: 9c06 ldr r4, [sp, #24] 8023468: fa02 f303 lsl.w r3, r2, r3 802346c: 401c ands r4, r3 802346e: 9406 str r4, [sp, #24] 8023470: e6f5 b.n 802325e <_strtod_r+0xc9e> 8023472: f04f 31ff mov.w r1, #4294967295 8023476: 3b20 subs r3, #32 8023478: fa01 f303 lsl.w r3, r1, r3 802347c: 4013 ands r3, r2 802347e: 9307 str r3, [sp, #28] 8023480: e6ed b.n 802325e <_strtod_r+0xc9e> 8023482: bf00 nop 8023484: 080459db .word 0x080459db 8023488: 20000018 .word 0x20000018 0802348c : 802348c: f240 032c movw r3, #44 ; 0x2c 8023490: 460a mov r2, r1 8023492: f2c2 0300 movt r3, #8192 ; 0x2000 8023496: 4601 mov r1, r0 8023498: 6818 ldr r0, [r3, #0] 802349a: f7ff b891 b.w 80225c0 <_strtod_r> 802349e: bf00 nop 080234a0 : 80234a0: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 80234a4: f240 062c movw r6, #44 ; 0x2c 80234a8: f2c2 0600 movt r6, #8192 ; 0x2000 80234ac: 460a mov r2, r1 80234ae: 4601 mov r1, r0 80234b0: f04f 0801 mov.w r8, #1 80234b4: 6830 ldr r0, [r6, #0] 80234b6: f7ff f883 bl 80225c0 <_strtod_r> 80234ba: 460d mov r5, r1 80234bc: 4604 mov r4, r0 80234be: f7fd fb61 bl 8020b84 <__aeabi_d2f> 80234c2: 2100 movs r1, #0 80234c4: 4607 mov r7, r0 80234c6: f7fd fcff bl 8020ec8 <__aeabi_fcmpeq> 80234ca: b908 cbnz r0, 80234d0 80234cc: f04f 0800 mov.w r8, #0 80234d0: 4620 mov r0, r4 80234d2: 4629 mov r1, r5 80234d4: 2200 movs r2, #0 80234d6: 2300 movs r3, #0 80234d8: f04f 0901 mov.w r9, #1 80234dc: f7fd fad8 bl 8020a90 <__aeabi_dcmpeq> 80234e0: b108 cbz r0, 80234e6 80234e2: f04f 0900 mov.w r9, #0 80234e6: ea08 0809 and.w r8, r8, r9 80234ea: f018 0fff tst.w r8, #255 ; 0xff 80234ee: d116 bne.n 802351e 80234f0: f64f 71ff movw r1, #65535 ; 0xffff 80234f4: 4638 mov r0, r7 80234f6: f6c7 717f movt r1, #32639 ; 0x7f7f 80234fa: f7fd fd0d bl 8020f18 <__aeabi_fcmpgt> 80234fe: b9a0 cbnz r0, 802352a 8023500: 4638 mov r0, r7 8023502: f46f 0100 mvn.w r1, #8388608 ; 0x800000 8023506: f7fd fce9 bl 8020edc <__aeabi_fcmplt> 802350a: b158 cbz r0, 8023524 802350c: 4620 mov r0, r4 802350e: 4629 mov r1, r5 8023510: f04f 32ff mov.w r2, #4294967295 8023514: f46f 1380 mvn.w r3, #1048576 ; 0x100000 8023518: f7fd fac4 bl 8020aa4 <__aeabi_dcmplt> 802351c: b910 cbnz r0, 8023524 802351e: 6833 ldr r3, [r6, #0] 8023520: 2222 movs r2, #34 ; 0x22 8023522: 601a str r2, [r3, #0] 8023524: 4638 mov r0, r7 8023526: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 802352a: f64f 73ff movw r3, #65535 ; 0xffff 802352e: 4620 mov r0, r4 8023530: 4629 mov r1, r5 8023532: f04f 32ff mov.w r2, #4294967295 8023536: f6c7 73ef movt r3, #32751 ; 0x7fef 802353a: f7fd fad1 bl 8020ae0 <__aeabi_dcmpgt> 802353e: 2800 cmp r0, #0 8023540: d0ed beq.n 802351e 8023542: e7dd b.n 8023500 8023544: f3af 8000 nop.w 08023548 <_strtol_r>: 8023548: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802354c: f240 0400 movw r4, #0 8023550: f2c2 0400 movt r4, #8192 ; 0x2000 8023554: b085 sub sp, #20 8023556: 4699 mov r9, r3 8023558: 460b mov r3, r1 802355a: f8d4 8000 ldr.w r8, [r4] 802355e: 9102 str r1, [sp, #8] 8023560: 9003 str r0, [sp, #12] 8023562: 461c mov r4, r3 8023564: f814 5b01 ldrb.w r5, [r4], #1 8023568: eb08 0105 add.w r1, r8, r5 802356c: 4623 mov r3, r4 802356e: 7849 ldrb r1, [r1, #1] 8023570: f001 0108 and.w r1, r1, #8 8023574: b2c9 uxtb r1, r1 8023576: 2900 cmp r1, #0 8023578: d1f3 bne.n 8023562 <_strtol_r+0x1a> 802357a: 2d2d cmp r5, #45 ; 0x2d 802357c: d07b beq.n 8023676 <_strtol_r+0x12e> 802357e: 2d2b cmp r5, #43 ; 0x2b 8023580: bf05 ittet eq 8023582: 4624 moveq r4, r4 8023584: 460b moveq r3, r1 8023586: 460b movne r3, r1 8023588: f814 5b01 ldrbeq.w r5, [r4], #1 802358c: f039 0110 bics.w r1, r9, #16 8023590: d112 bne.n 80235b8 <_strtol_r+0x70> 8023592: f1d9 0001 rsbs r0, r9, #1 8023596: bf38 it cc 8023598: 2000 movcc r0, #0 802359a: 2d30 cmp r5, #48 ; 0x30 802359c: d004 beq.n 80235a8 <_strtol_r+0x60> 802359e: b158 cbz r0, 80235b8 <_strtol_r+0x70> 80235a0: f04f 090a mov.w r9, #10 80235a4: 46cb mov fp, r9 80235a6: e008 b.n 80235ba <_strtol_r+0x72> 80235a8: 7821 ldrb r1, [r4, #0] 80235aa: f001 01df and.w r1, r1, #223 ; 0xdf 80235ae: 2958 cmp r1, #88 ; 0x58 80235b0: d065 beq.n 802367e <_strtol_r+0x136> 80235b2: b108 cbz r0, 80235b8 <_strtol_r+0x70> 80235b4: f04f 0908 mov.w r9, #8 80235b8: 46cb mov fp, r9 80235ba: 2b00 cmp r3, #0 80235bc: 4659 mov r1, fp 80235be: bf0c ite eq 80235c0: f06f 4600 mvneq.w r6, #2147483648 ; 0x80000000 80235c4: f04f 4600 movne.w r6, #2147483648 ; 0x80000000 80235c8: e88d 000c stmia.w sp, {r2, r3} 80235cc: 4630 mov r0, r6 80235ce: 2700 movs r7, #0 80235d0: f7fe f964 bl 802189c <__aeabi_uidivmod> 80235d4: 4630 mov r0, r6 80235d6: 468a mov sl, r1 80235d8: 4659 mov r1, fp 80235da: f7fe f831 bl 8021640 <__aeabi_uidiv> 80235de: 46bc mov ip, r7 80235e0: e89d 000c ldmia.w sp, {r2, r3} 80235e4: e016 b.n 8023614 <_strtol_r+0xcc> 80235e6: 3d30 subs r5, #48 ; 0x30 80235e8: 45a9 cmp r9, r5 80235ea: dd25 ble.n 8023638 <_strtol_r+0xf0> 80235ec: 4584 cmp ip, r0 80235ee: bf94 ite ls 80235f0: 2100 movls r1, #0 80235f2: 2101 movhi r1, #1 80235f4: ea51 77d7 orrs.w r7, r1, r7, lsr #31 80235f8: d129 bne.n 802364e <_strtol_r+0x106> 80235fa: 4555 cmp r5, sl 80235fc: bfd4 ite le 80235fe: 2100 movle r1, #0 8023600: 2101 movgt r1, #1 8023602: 4584 cmp ip, r0 8023604: bf18 it ne 8023606: 2100 movne r1, #0 8023608: bb09 cbnz r1, 802364e <_strtol_r+0x106> 802360a: fb0b 5c0c mla ip, fp, ip, r5 802360e: 2701 movs r7, #1 8023610: f814 5b01 ldrb.w r5, [r4], #1 8023614: eb08 0105 add.w r1, r8, r5 8023618: 7849 ldrb r1, [r1, #1] 802361a: f001 0604 and.w r6, r1, #4 802361e: b2f6 uxtb r6, r6 8023620: 2e00 cmp r6, #0 8023622: d1e0 bne.n 80235e6 <_strtol_r+0x9e> 8023624: f011 0103 ands.w r1, r1, #3 8023628: d006 beq.n 8023638 <_strtol_r+0xf0> 802362a: 2901 cmp r1, #1 802362c: bf14 ite ne 802362e: 2157 movne r1, #87 ; 0x57 8023630: 2137 moveq r1, #55 ; 0x37 8023632: 1a6d subs r5, r5, r1 8023634: 45a9 cmp r9, r5 8023636: dcd9 bgt.n 80235ec <_strtol_r+0xa4> 8023638: 1c79 adds r1, r7, #1 802363a: d00b beq.n 8023654 <_strtol_r+0x10c> 802363c: b9c3 cbnz r3, 8023670 <_strtol_r+0x128> 802363e: 4660 mov r0, ip 8023640: b112 cbz r2, 8023648 <_strtol_r+0x100> 8023642: b997 cbnz r7, 802366a <_strtol_r+0x122> 8023644: 9b02 ldr r3, [sp, #8] 8023646: 6013 str r3, [r2, #0] 8023648: b005 add sp, #20 802364a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802364e: f04f 37ff mov.w r7, #4294967295 8023652: e7dd b.n 8023610 <_strtol_r+0xc8> 8023654: 9903 ldr r1, [sp, #12] 8023656: 2b00 cmp r3, #0 8023658: bf0c ite eq 802365a: f06f 4000 mvneq.w r0, #2147483648 ; 0x80000000 802365e: f04f 4000 movne.w r0, #2147483648 ; 0x80000000 8023662: 2322 movs r3, #34 ; 0x22 8023664: 600b str r3, [r1, #0] 8023666: 2a00 cmp r2, #0 8023668: d0ee beq.n 8023648 <_strtol_r+0x100> 802366a: 3c01 subs r4, #1 802366c: 9402 str r4, [sp, #8] 802366e: e7e9 b.n 8023644 <_strtol_r+0xfc> 8023670: f1cc 0c00 rsb ip, ip, #0 8023674: e7e3 b.n 802363e <_strtol_r+0xf6> 8023676: f814 5b01 ldrb.w r5, [r4], #1 802367a: 2301 movs r3, #1 802367c: e786 b.n 802358c <_strtol_r+0x44> 802367e: f04f 0910 mov.w r9, #16 8023682: 7865 ldrb r5, [r4, #1] 8023684: 46cb mov fp, r9 8023686: 3402 adds r4, #2 8023688: e797 b.n 80235ba <_strtol_r+0x72> 802368a: bf00 nop 0802368c : 802368c: b430 push {r4, r5} 802368e: f240 042c movw r4, #44 ; 0x2c 8023692: f2c2 0400 movt r4, #8192 ; 0x2000 8023696: 460d mov r5, r1 8023698: 4613 mov r3, r2 802369a: 4601 mov r1, r0 802369c: 462a mov r2, r5 802369e: 6820 ldr r0, [r4, #0] 80236a0: bc30 pop {r4, r5} 80236a2: f7ff bf51 b.w 8023548 <_strtol_r> 80236a6: bf00 nop 080236a8 <_malloc_trim_r>: 80236a8: b5f8 push {r3, r4, r5, r6, r7, lr} 80236aa: f240 149c movw r4, #412 ; 0x19c 80236ae: f2c2 0400 movt r4, #8192 ; 0x2000 80236b2: 460f mov r7, r1 80236b4: 4605 mov r5, r0 80236b6: f001 f895 bl 80247e4 <__malloc_lock> 80236ba: 68a3 ldr r3, [r4, #8] 80236bc: 685e ldr r6, [r3, #4] 80236be: f026 0603 bic.w r6, r6, #3 80236c2: f606 73ef addw r3, r6, #4079 ; 0xfef 80236c6: 1bdf subs r7, r3, r7 80236c8: 0b3f lsrs r7, r7, #12 80236ca: 3f01 subs r7, #1 80236cc: 033f lsls r7, r7, #12 80236ce: f5b7 5f80 cmp.w r7, #4096 ; 0x1000 80236d2: db07 blt.n 80236e4 <_malloc_trim_r+0x3c> 80236d4: 2100 movs r1, #0 80236d6: 4628 mov r0, r5 80236d8: f001 fd10 bl 80250fc <_sbrk_r> 80236dc: 68a3 ldr r3, [r4, #8] 80236de: 199b adds r3, r3, r6 80236e0: 4298 cmp r0, r3 80236e2: d004 beq.n 80236ee <_malloc_trim_r+0x46> 80236e4: 4628 mov r0, r5 80236e6: f001 f87f bl 80247e8 <__malloc_unlock> 80236ea: 2000 movs r0, #0 80236ec: bdf8 pop {r3, r4, r5, r6, r7, pc} 80236ee: 4279 negs r1, r7 80236f0: 4628 mov r0, r5 80236f2: f001 fd03 bl 80250fc <_sbrk_r> 80236f6: 3001 adds r0, #1 80236f8: d010 beq.n 802371c <_malloc_trim_r+0x74> 80236fa: f640 23cc movw r3, #2764 ; 0xacc 80236fe: 68a1 ldr r1, [r4, #8] 8023700: f2c2 0300 movt r3, #8192 ; 0x2000 8023704: 1bf6 subs r6, r6, r7 8023706: 4628 mov r0, r5 8023708: f046 0601 orr.w r6, r6, #1 802370c: 681a ldr r2, [r3, #0] 802370e: 604e str r6, [r1, #4] 8023710: 1bd7 subs r7, r2, r7 8023712: 601f str r7, [r3, #0] 8023714: f001 f868 bl 80247e8 <__malloc_unlock> 8023718: 2001 movs r0, #1 802371a: bdf8 pop {r3, r4, r5, r6, r7, pc} 802371c: 2100 movs r1, #0 802371e: 4628 mov r0, r5 8023720: f001 fcec bl 80250fc <_sbrk_r> 8023724: 68a3 ldr r3, [r4, #8] 8023726: 1ac2 subs r2, r0, r3 8023728: 2a0f cmp r2, #15 802372a: dddb ble.n 80236e4 <_malloc_trim_r+0x3c> 802372c: f240 54a4 movw r4, #1444 ; 0x5a4 8023730: f640 21cc movw r1, #2764 ; 0xacc 8023734: f2c2 0400 movt r4, #8192 ; 0x2000 8023738: f2c2 0100 movt r1, #8192 ; 0x2000 802373c: f042 0201 orr.w r2, r2, #1 8023740: 605a str r2, [r3, #4] 8023742: 6823 ldr r3, [r4, #0] 8023744: 1ac0 subs r0, r0, r3 8023746: 6008 str r0, [r1, #0] 8023748: e7cc b.n 80236e4 <_malloc_trim_r+0x3c> 802374a: bf00 nop 0802374c <_free_r>: 802374c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8023750: 460e mov r6, r1 8023752: 4680 mov r8, r0 8023754: 2900 cmp r1, #0 8023756: d05c beq.n 8023812 <_free_r+0xc6> 8023758: f001 f844 bl 80247e4 <__malloc_lock> 802375c: f240 159c movw r5, #412 ; 0x19c 8023760: f856 1c04 ldr.w r1, [r6, #-4] 8023764: f2c2 0500 movt r5, #8192 ; 0x2000 8023768: f1a6 0408 sub.w r4, r6, #8 802376c: f021 0301 bic.w r3, r1, #1 8023770: 68af ldr r7, [r5, #8] 8023772: 18e2 adds r2, r4, r3 8023774: 4297 cmp r7, r2 8023776: 6850 ldr r0, [r2, #4] 8023778: f020 0003 bic.w r0, r0, #3 802377c: d067 beq.n 802384e <_free_r+0x102> 802377e: f011 0101 ands.w r1, r1, #1 8023782: 6050 str r0, [r2, #4] 8023784: d035 beq.n 80237f2 <_free_r+0xa6> 8023786: 2100 movs r1, #0 8023788: 1816 adds r6, r2, r0 802378a: 6876 ldr r6, [r6, #4] 802378c: f016 0f01 tst.w r6, #1 8023790: d106 bne.n 80237a0 <_free_r+0x54> 8023792: 181b adds r3, r3, r0 8023794: 6890 ldr r0, [r2, #8] 8023796: 2900 cmp r1, #0 8023798: d04d beq.n 8023836 <_free_r+0xea> 802379a: 68d2 ldr r2, [r2, #12] 802379c: 60c2 str r2, [r0, #12] 802379e: 6090 str r0, [r2, #8] 80237a0: f043 0201 orr.w r2, r3, #1 80237a4: 50e3 str r3, [r4, r3] 80237a6: 6062 str r2, [r4, #4] 80237a8: b9f1 cbnz r1, 80237e8 <_free_r+0x9c> 80237aa: f5b3 7f00 cmp.w r3, #512 ; 0x200 80237ae: d332 bcc.n 8023816 <_free_r+0xca> 80237b0: 0a5a lsrs r2, r3, #9 80237b2: 2a04 cmp r2, #4 80237b4: d86c bhi.n 8023890 <_free_r+0x144> 80237b6: 0998 lsrs r0, r3, #6 80237b8: 3038 adds r0, #56 ; 0x38 80237ba: 0041 lsls r1, r0, #1 80237bc: eb05 0581 add.w r5, r5, r1, lsl #2 80237c0: f240 119c movw r1, #412 ; 0x19c 80237c4: f2c2 0100 movt r1, #8192 ; 0x2000 80237c8: 68aa ldr r2, [r5, #8] 80237ca: 42aa cmp r2, r5 80237cc: d06b beq.n 80238a6 <_free_r+0x15a> 80237ce: 6851 ldr r1, [r2, #4] 80237d0: f021 0103 bic.w r1, r1, #3 80237d4: 428b cmp r3, r1 80237d6: d202 bcs.n 80237de <_free_r+0x92> 80237d8: 6892 ldr r2, [r2, #8] 80237da: 4295 cmp r5, r2 80237dc: d1f7 bne.n 80237ce <_free_r+0x82> 80237de: 68d3 ldr r3, [r2, #12] 80237e0: 60e3 str r3, [r4, #12] 80237e2: 60a2 str r2, [r4, #8] 80237e4: 60d4 str r4, [r2, #12] 80237e6: 609c str r4, [r3, #8] 80237e8: 4640 mov r0, r8 80237ea: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} 80237ee: f000 bffb b.w 80247e8 <__malloc_unlock> 80237f2: f856 6c08 ldr.w r6, [r6, #-8] 80237f6: f105 0c08 add.w ip, r5, #8 80237fa: 1ba4 subs r4, r4, r6 80237fc: 199b adds r3, r3, r6 80237fe: 68a6 ldr r6, [r4, #8] 8023800: 4566 cmp r6, ip 8023802: d043 beq.n 802388c <_free_r+0x140> 8023804: f8d4 c00c ldr.w ip, [r4, #12] 8023808: f8c6 c00c str.w ip, [r6, #12] 802380c: f8cc 6008 str.w r6, [ip, #8] 8023810: e7ba b.n 8023788 <_free_r+0x3c> 8023812: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8023816: 08db lsrs r3, r3, #3 8023818: 2101 movs r1, #1 802381a: 6868 ldr r0, [r5, #4] 802381c: eb05 02c3 add.w r2, r5, r3, lsl #3 8023820: 109b asrs r3, r3, #2 8023822: fa01 f303 lsl.w r3, r1, r3 8023826: 60e2 str r2, [r4, #12] 8023828: 6891 ldr r1, [r2, #8] 802382a: 4318 orrs r0, r3 802382c: 6068 str r0, [r5, #4] 802382e: 60a1 str r1, [r4, #8] 8023830: 60cc str r4, [r1, #12] 8023832: 6094 str r4, [r2, #8] 8023834: e7d8 b.n 80237e8 <_free_r+0x9c> 8023836: 4e29 ldr r6, [pc, #164] ; (80238dc <_free_r+0x190>) 8023838: 42b0 cmp r0, r6 802383a: d1ae bne.n 802379a <_free_r+0x4e> 802383c: 616c str r4, [r5, #20] 802383e: f043 0201 orr.w r2, r3, #1 8023842: 612c str r4, [r5, #16] 8023844: 60e0 str r0, [r4, #12] 8023846: 60a0 str r0, [r4, #8] 8023848: 6062 str r2, [r4, #4] 802384a: 50e3 str r3, [r4, r3] 802384c: e7cc b.n 80237e8 <_free_r+0x9c> 802384e: 18c0 adds r0, r0, r3 8023850: 07cb lsls r3, r1, #31 8023852: d407 bmi.n 8023864 <_free_r+0x118> 8023854: f856 3c08 ldr.w r3, [r6, #-8] 8023858: 1ae4 subs r4, r4, r3 802385a: 18c0 adds r0, r0, r3 802385c: 68a2 ldr r2, [r4, #8] 802385e: 68e3 ldr r3, [r4, #12] 8023860: 60d3 str r3, [r2, #12] 8023862: 609a str r2, [r3, #8] 8023864: f240 52a8 movw r2, #1448 ; 0x5a8 8023868: f040 0301 orr.w r3, r0, #1 802386c: f2c2 0200 movt r2, #8192 ; 0x2000 8023870: 6063 str r3, [r4, #4] 8023872: 60ac str r4, [r5, #8] 8023874: 6813 ldr r3, [r2, #0] 8023876: 4298 cmp r0, r3 8023878: d3b6 bcc.n 80237e8 <_free_r+0x9c> 802387a: f640 23c8 movw r3, #2760 ; 0xac8 802387e: 4640 mov r0, r8 8023880: f2c2 0300 movt r3, #8192 ; 0x2000 8023884: 6819 ldr r1, [r3, #0] 8023886: f7ff ff0f bl 80236a8 <_malloc_trim_r> 802388a: e7ad b.n 80237e8 <_free_r+0x9c> 802388c: 2101 movs r1, #1 802388e: e77b b.n 8023788 <_free_r+0x3c> 8023890: f102 005b add.w r0, r2, #91 ; 0x5b 8023894: 0041 lsls r1, r0, #1 8023896: 2a14 cmp r2, #20 8023898: d990 bls.n 80237bc <_free_r+0x70> 802389a: 2a54 cmp r2, #84 ; 0x54 802389c: d80c bhi.n 80238b8 <_free_r+0x16c> 802389e: 0b18 lsrs r0, r3, #12 80238a0: 306e adds r0, #110 ; 0x6e 80238a2: 0041 lsls r1, r0, #1 80238a4: e78a b.n 80237bc <_free_r+0x70> 80238a6: 2601 movs r6, #1 80238a8: 684d ldr r5, [r1, #4] 80238aa: 1080 asrs r0, r0, #2 80238ac: 4613 mov r3, r2 80238ae: fa06 f000 lsl.w r0, r6, r0 80238b2: 4305 orrs r5, r0 80238b4: 604d str r5, [r1, #4] 80238b6: e793 b.n 80237e0 <_free_r+0x94> 80238b8: f5b2 7faa cmp.w r2, #340 ; 0x154 80238bc: d803 bhi.n 80238c6 <_free_r+0x17a> 80238be: 0bd8 lsrs r0, r3, #15 80238c0: 3077 adds r0, #119 ; 0x77 80238c2: 0041 lsls r1, r0, #1 80238c4: e77a b.n 80237bc <_free_r+0x70> 80238c6: f240 5154 movw r1, #1364 ; 0x554 80238ca: 428a cmp r2, r1 80238cc: d803 bhi.n 80238d6 <_free_r+0x18a> 80238ce: 0c98 lsrs r0, r3, #18 80238d0: 307c adds r0, #124 ; 0x7c 80238d2: 0041 lsls r1, r0, #1 80238d4: e772 b.n 80237bc <_free_r+0x70> 80238d6: 21fc movs r1, #252 ; 0xfc 80238d8: 207e movs r0, #126 ; 0x7e 80238da: e76f b.n 80237bc <_free_r+0x70> 80238dc: 200001a4 .word 0x200001a4 080238e0 : 80238e0: 6902 ldr r2, [r0, #16] 80238e2: 114b asrs r3, r1, #5 80238e4: e92d 01f0 stmdb sp!, {r4, r5, r6, r7, r8} 80238e8: 4293 cmp r3, r2 80238ea: f100 0714 add.w r7, r0, #20 80238ee: da2d bge.n 802394c 80238f0: 3304 adds r3, #4 80238f2: eb00 0282 add.w r2, r0, r2, lsl #2 80238f6: 3214 adds r2, #20 80238f8: f011 011f ands.w r1, r1, #31 80238fc: eb00 0383 add.w r3, r0, r3, lsl #2 8023900: f103 0c04 add.w ip, r3, #4 8023904: d029 beq.n 802395a 8023906: 685c ldr r4, [r3, #4] 8023908: f10c 0304 add.w r3, ip, #4 802390c: 429a cmp r2, r3 802390e: f1c1 0820 rsb r8, r1, #32 8023912: fa24 f401 lsr.w r4, r4, r1 8023916: d938 bls.n 802398a 8023918: 463d mov r5, r7 802391a: 681e ldr r6, [r3, #0] 802391c: fa06 f608 lsl.w r6, r6, r8 8023920: 4334 orrs r4, r6 8023922: f845 4b04 str.w r4, [r5], #4 8023926: f853 4b04 ldr.w r4, [r3], #4 802392a: 429a cmp r2, r3 802392c: fa24 f401 lsr.w r4, r4, r1 8023930: d8f3 bhi.n 802391a 8023932: ebcc 0302 rsb r3, ip, r2 8023936: 3b05 subs r3, #5 8023938: f023 0303 bic.w r3, r3, #3 802393c: 18c3 adds r3, r0, r3 802393e: 3318 adds r3, #24 8023940: 601c str r4, [r3, #0] 8023942: b1e4 cbz r4, 802397e 8023944: 3304 adds r3, #4 8023946: 1bdf subs r7, r3, r7 8023948: 10bf asrs r7, r7, #2 802394a: e01a b.n 8023982 802394c: 2300 movs r3, #0 802394e: 6103 str r3, [r0, #16] 8023950: 2300 movs r3, #0 8023952: 6143 str r3, [r0, #20] 8023954: e8bd 01f0 ldmia.w sp!, {r4, r5, r6, r7, r8} 8023958: 4770 bx lr 802395a: 4562 cmp r2, ip 802395c: bf84 itt hi 802395e: 4663 movhi r3, ip 8023960: 4639 movhi r1, r7 8023962: d9f3 bls.n 802394c 8023964: f853 4b04 ldr.w r4, [r3], #4 8023968: 429a cmp r2, r3 802396a: f841 4b04 str.w r4, [r1], #4 802396e: d8f9 bhi.n 8023964 8023970: ea6f 030c mvn.w r3, ip 8023974: 189b adds r3, r3, r2 8023976: f023 0303 bic.w r3, r3, #3 802397a: 18c3 adds r3, r0, r3 802397c: 3318 adds r3, #24 802397e: 1bdf subs r7, r3, r7 8023980: 10bf asrs r7, r7, #2 8023982: 6107 str r7, [r0, #16] 8023984: 2f00 cmp r7, #0 8023986: d1e5 bne.n 8023954 8023988: e7e2 b.n 8023950 802398a: 463b mov r3, r7 802398c: e7d8 b.n 8023940 802398e: bf00 nop 08023990 <__hexdig_init>: 8023990: f645 10f8 movw r0, #23032 ; 0x59f8 8023994: f643 1348 movw r3, #14664 ; 0x3948 8023998: f6c0 0004 movt r0, #2052 ; 0x804 802399c: 2110 movs r1, #16 802399e: 2230 movs r2, #48 ; 0x30 80239a0: f2c2 0301 movt r3, #8193 ; 0x2001 80239a4: 5499 strb r1, [r3, r2] 80239a6: 3101 adds r1, #1 80239a8: f810 2f01 ldrb.w r2, [r0, #1]! 80239ac: b2c9 uxtb r1, r1 80239ae: 2a00 cmp r2, #0 80239b0: d1f8 bne.n 80239a4 <__hexdig_init+0x14> 80239b2: f645 10f0 movw r0, #23024 ; 0x59f0 80239b6: 211a movs r1, #26 80239b8: f6c0 0004 movt r0, #2052 ; 0x804 80239bc: 2261 movs r2, #97 ; 0x61 80239be: 5499 strb r1, [r3, r2] 80239c0: 3101 adds r1, #1 80239c2: f810 2f01 ldrb.w r2, [r0, #1]! 80239c6: b2c9 uxtb r1, r1 80239c8: 2a00 cmp r2, #0 80239ca: d1f8 bne.n 80239be <__hexdig_init+0x2e> 80239cc: f645 10e8 movw r0, #23016 ; 0x59e8 80239d0: 211a movs r1, #26 80239d2: f6c0 0004 movt r0, #2052 ; 0x804 80239d6: 2241 movs r2, #65 ; 0x41 80239d8: 5499 strb r1, [r3, r2] 80239da: 3101 adds r1, #1 80239dc: f810 2f01 ldrb.w r2, [r0, #1]! 80239e0: b2c9 uxtb r1, r1 80239e2: 2a00 cmp r2, #0 80239e4: d1f8 bne.n 80239d8 <__hexdig_init+0x48> 80239e6: 4770 bx lr 080239e8 <__gethex>: 80239e8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80239ec: b08b sub sp, #44 ; 0x2c 80239ee: 4688 mov r8, r1 80239f0: f643 1648 movw r6, #14664 ; 0x3948 80239f4: 9206 str r2, [sp, #24] 80239f6: f2c2 0601 movt r6, #8193 ; 0x2001 80239fa: 9309 str r3, [sp, #36] ; 0x24 80239fc: 9007 str r0, [sp, #28] 80239fe: f000 fbb9 bl 8024174 <_localeconv_r> 8023a02: 6800 ldr r0, [r0, #0] 8023a04: 9002 str r0, [sp, #8] 8023a06: f7fe fa53 bl 8021eb0 8023a0a: 9b02 ldr r3, [sp, #8] 8023a0c: 181a adds r2, r3, r0 8023a0e: f896 3030 ldrb.w r3, [r6, #48] ; 0x30 8023a12: 9003 str r0, [sp, #12] 8023a14: f812 ac01 ldrb.w sl, [r2, #-1] 8023a18: 2b00 cmp r3, #0 8023a1a: f000 810e beq.w 8023c3a <__gethex+0x252> 8023a1e: f8d8 3000 ldr.w r3, [r8] 8023a22: 1c9d adds r5, r3, #2 8023a24: 789a ldrb r2, [r3, #2] 8023a26: 2a30 cmp r2, #48 ; 0x30 8023a28: f040 8200 bne.w 8023e2c <__gethex+0x444> 8023a2c: 3303 adds r3, #3 8023a2e: 2700 movs r7, #0 8023a30: 461d mov r5, r3 8023a32: f813 2b01 ldrb.w r2, [r3], #1 8023a36: 3701 adds r7, #1 8023a38: 2a30 cmp r2, #48 ; 0x30 8023a3a: d0f9 beq.n 8023a30 <__gethex+0x48> 8023a3c: f816 b002 ldrb.w fp, [r6, r2] 8023a40: f643 1948 movw r9, #14664 ; 0x3948 8023a44: f2c2 0901 movt r9, #8193 ; 0x2001 8023a48: f1bb 0f00 cmp.w fp, #0 8023a4c: f000 80f8 beq.w 8023c40 <__gethex+0x258> 8023a50: 782b ldrb r3, [r5, #0] 8023a52: f04f 0b00 mov.w fp, #0 8023a56: f819 4003 ldrb.w r4, [r9, r3] 8023a5a: 2c00 cmp r4, #0 8023a5c: f000 8200 beq.w 8023e60 <__gethex+0x478> 8023a60: 1c6a adds r2, r5, #1 8023a62: 4614 mov r4, r2 8023a64: 3201 adds r2, #1 8023a66: 7823 ldrb r3, [r4, #0] 8023a68: 5cf3 ldrb r3, [r6, r3] 8023a6a: 2b00 cmp r3, #0 8023a6c: d1f9 bne.n 8023a62 <__gethex+0x7a> 8023a6e: 4699 mov r9, r3 8023a70: 4620 mov r0, r4 8023a72: 9902 ldr r1, [sp, #8] 8023a74: 9a03 ldr r2, [sp, #12] 8023a76: f7fe fa7d bl 8021f74 8023a7a: b1e8 cbz r0, 8023ab8 <__gethex+0xd0> 8023a7c: 7823 ldrb r3, [r4, #0] 8023a7e: f1bb 0f00 cmp.w fp, #0 8023a82: f000 81c1 beq.w 8023e08 <__gethex+0x420> 8023a86: ebc4 0b0b rsb fp, r4, fp 8023a8a: ea4f 028b mov.w r2, fp, lsl #2 8023a8e: 9205 str r2, [sp, #20] 8023a90: 2b50 cmp r3, #80 ; 0x50 8023a92: f000 809b beq.w 8023bcc <__gethex+0x1e4> 8023a96: 2b70 cmp r3, #112 ; 0x70 8023a98: f000 8098 beq.w 8023bcc <__gethex+0x1e4> 8023a9c: 4622 mov r2, r4 8023a9e: f8c8 2000 str.w r2, [r8] 8023aa2: f1b9 0f00 cmp.w r9, #0 8023aa6: d00d beq.n 8023ac4 <__gethex+0xdc> 8023aa8: 2f00 cmp r7, #0 8023aaa: bf0c ite eq 8023aac: 2706 moveq r7, #6 8023aae: 2700 movne r7, #0 8023ab0: 4638 mov r0, r7 8023ab2: b00b add sp, #44 ; 0x2c 8023ab4: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8023ab8: f1bb 0f00 cmp.w fp, #0 8023abc: f000 81be beq.w 8023e3c <__gethex+0x454> 8023ac0: 7823 ldrb r3, [r4, #0] 8023ac2: e7e0 b.n 8023a86 <__gethex+0x9e> 8023ac4: 1b63 subs r3, r4, r5 8023ac6: 4649 mov r1, r9 8023ac8: 3b01 subs r3, #1 8023aca: 2b07 cmp r3, #7 8023acc: dd03 ble.n 8023ad6 <__gethex+0xee> 8023ace: 105b asrs r3, r3, #1 8023ad0: 3101 adds r1, #1 8023ad2: 2b07 cmp r3, #7 8023ad4: dcfb bgt.n 8023ace <__gethex+0xe6> 8023ad6: 9807 ldr r0, [sp, #28] 8023ad8: f000 fe88 bl 80247ec <_Balloc> 8023adc: 42a5 cmp r5, r4 8023ade: f100 0314 add.w r3, r0, #20 8023ae2: 9004 str r0, [sp, #16] 8023ae4: 9308 str r3, [sp, #32] 8023ae6: f080 81db bcs.w 8023ea0 <__gethex+0x4b8> 8023aea: 469b mov fp, r3 8023aec: 9b03 ldr r3, [sp, #12] 8023aee: f04f 0800 mov.w r8, #0 8023af2: 4647 mov r7, r8 8023af4: f1c3 0c01 rsb ip, r3, #1 8023af8: e00f b.n 8023b1a <__gethex+0x132> 8023afa: 2f20 cmp r7, #32 8023afc: d05f beq.n 8023bbe <__gethex+0x1d6> 8023afe: 463a mov r2, r7 8023b00: 3704 adds r7, #4 8023b02: f814 3c01 ldrb.w r3, [r4, #-1] 8023b06: 464c mov r4, r9 8023b08: 42a5 cmp r5, r4 8023b0a: 5cf3 ldrb r3, [r6, r3] 8023b0c: f003 030f and.w r3, r3, #15 8023b10: fa03 f302 lsl.w r3, r3, r2 8023b14: ea48 0803 orr.w r8, r8, r3 8023b18: d219 bcs.n 8023b4e <__gethex+0x166> 8023b1a: f814 3c01 ldrb.w r3, [r4, #-1] 8023b1e: f104 39ff add.w r9, r4, #4294967295 8023b22: 4553 cmp r3, sl 8023b24: d1e9 bne.n 8023afa <__gethex+0x112> 8023b26: eb09 030c add.w r3, r9, ip 8023b2a: 429d cmp r5, r3 8023b2c: d8e5 bhi.n 8023afa <__gethex+0x112> 8023b2e: 4618 mov r0, r3 8023b30: 9902 ldr r1, [sp, #8] 8023b32: 9a03 ldr r2, [sp, #12] 8023b34: 9301 str r3, [sp, #4] 8023b36: f8cd c000 str.w ip, [sp] 8023b3a: f7fe fa1b bl 8021f74 8023b3e: 9b01 ldr r3, [sp, #4] 8023b40: f8dd c000 ldr.w ip, [sp] 8023b44: 2800 cmp r0, #0 8023b46: d1d8 bne.n 8023afa <__gethex+0x112> 8023b48: 461c mov r4, r3 8023b4a: 42a5 cmp r5, r4 8023b4c: d3e5 bcc.n 8023b1a <__gethex+0x132> 8023b4e: 9b08 ldr r3, [sp, #32] 8023b50: 4640 mov r0, r8 8023b52: f84b 8b04 str.w r8, [fp], #4 8023b56: 9904 ldr r1, [sp, #16] 8023b58: ebc3 0b0b rsb fp, r3, fp 8023b5c: ea4f 03ab mov.w r3, fp, asr #2 8023b60: 610b str r3, [r1, #16] 8023b62: 015d lsls r5, r3, #5 8023b64: f000 ff24 bl 80249b0 <__hi0bits> 8023b68: 9a06 ldr r2, [sp, #24] 8023b6a: 6814 ldr r4, [r2, #0] 8023b6c: 1a28 subs r0, r5, r0 8023b6e: 42a0 cmp r0, r4 8023b70: f300 8125 bgt.w 8023dbe <__gethex+0x3d6> 8023b74: f2c0 814b blt.w 8023e0e <__gethex+0x426> 8023b78: 2500 movs r5, #0 8023b7a: 9806 ldr r0, [sp, #24] 8023b7c: 9905 ldr r1, [sp, #20] 8023b7e: 6883 ldr r3, [r0, #8] 8023b80: 4299 cmp r1, r3 8023b82: f300 80f6 bgt.w 8023d72 <__gethex+0x38a> 8023b86: 9806 ldr r0, [sp, #24] 8023b88: 9905 ldr r1, [sp, #20] 8023b8a: 6843 ldr r3, [r0, #4] 8023b8c: 4299 cmp r1, r3 8023b8e: f280 8100 bge.w 8023d92 <__gethex+0x3aa> 8023b92: 1a5e subs r6, r3, r1 8023b94: 42b4 cmp r4, r6 8023b96: dc76 bgt.n 8023c86 <__gethex+0x29e> 8023b98: 68c2 ldr r2, [r0, #12] 8023b9a: 2a02 cmp r2, #2 8023b9c: f000 816f beq.w 8023e7e <__gethex+0x496> 8023ba0: 2a03 cmp r2, #3 8023ba2: f000 8198 beq.w 8023ed6 <__gethex+0x4ee> 8023ba6: 2a01 cmp r2, #1 8023ba8: f000 8186 beq.w 8023eb8 <__gethex+0x4d0> 8023bac: 9807 ldr r0, [sp, #28] 8023bae: 2750 movs r7, #80 ; 0x50 8023bb0: 9904 ldr r1, [sp, #16] 8023bb2: f000 fe51 bl 8024858 <_Bfree> 8023bb6: 9814 ldr r0, [sp, #80] ; 0x50 8023bb8: 2300 movs r3, #0 8023bba: 6003 str r3, [r0, #0] 8023bbc: e778 b.n 8023ab0 <__gethex+0xc8> 8023bbe: f84b 8b04 str.w r8, [fp], #4 8023bc2: f04f 0800 mov.w r8, #0 8023bc6: 2704 movs r7, #4 8023bc8: 4642 mov r2, r8 8023bca: e79a b.n 8023b02 <__gethex+0x11a> 8023bcc: 7863 ldrb r3, [r4, #1] 8023bce: 2b2b cmp r3, #43 ; 0x2b 8023bd0: f000 80f2 beq.w 8023db8 <__gethex+0x3d0> 8023bd4: 2b2d cmp r3, #45 ; 0x2d 8023bd6: f000 80ea beq.w 8023dae <__gethex+0x3c6> 8023bda: 1c60 adds r0, r4, #1 8023bdc: f04f 0b00 mov.w fp, #0 8023be0: 5cf1 ldrb r1, [r6, r3] 8023be2: f643 1348 movw r3, #14664 ; 0x3948 8023be6: f2c2 0301 movt r3, #8193 ; 0x2001 8023bea: 2900 cmp r1, #0 8023bec: f43f af56 beq.w 8023a9c <__gethex+0xb4> 8023bf0: 2919 cmp r1, #25 8023bf2: f73f af53 bgt.w 8023a9c <__gethex+0xb4> 8023bf6: f890 c001 ldrb.w ip, [r0, #1] 8023bfa: 3910 subs r1, #16 8023bfc: 1c42 adds r2, r0, #1 8023bfe: f813 300c ldrb.w r3, [r3, ip] 8023c02: b193 cbz r3, 8023c2a <__gethex+0x242> 8023c04: 2b19 cmp r3, #25 8023c06: dc10 bgt.n 8023c2a <__gethex+0x242> 8023c08: 3002 adds r0, #2 8023c0a: e001 b.n 8023c10 <__gethex+0x228> 8023c0c: 2b19 cmp r3, #25 8023c0e: dc0c bgt.n 8023c2a <__gethex+0x242> 8023c10: 4602 mov r2, r0 8023c12: eb01 0181 add.w r1, r1, r1, lsl #2 8023c16: 3001 adds r0, #1 8023c18: f892 c000 ldrb.w ip, [r2] 8023c1c: eb03 0141 add.w r1, r3, r1, lsl #1 8023c20: 3910 subs r1, #16 8023c22: f816 300c ldrb.w r3, [r6, ip] 8023c26: 2b00 cmp r3, #0 8023c28: d1f0 bne.n 8023c0c <__gethex+0x224> 8023c2a: f1bb 0f00 cmp.w fp, #0 8023c2e: d000 beq.n 8023c32 <__gethex+0x24a> 8023c30: 4249 negs r1, r1 8023c32: 9b05 ldr r3, [sp, #20] 8023c34: 185b adds r3, r3, r1 8023c36: 9305 str r3, [sp, #20] 8023c38: e731 b.n 8023a9e <__gethex+0xb6> 8023c3a: f7ff fea9 bl 8023990 <__hexdig_init> 8023c3e: e6ee b.n 8023a1e <__gethex+0x36> 8023c40: 4628 mov r0, r5 8023c42: 9902 ldr r1, [sp, #8] 8023c44: 9a03 ldr r2, [sp, #12] 8023c46: f7fe f995 bl 8021f74 8023c4a: 2800 cmp r0, #0 8023c4c: f040 809a bne.w 8023d84 <__gethex+0x39c> 8023c50: 9803 ldr r0, [sp, #12] 8023c52: 182c adds r4, r5, r0 8023c54: 5c2b ldrb r3, [r5, r0] 8023c56: f819 2003 ldrb.w r2, [r9, r3] 8023c5a: 2a00 cmp r2, #0 8023c5c: f000 80e8 beq.w 8023e30 <__gethex+0x448> 8023c60: 2b30 cmp r3, #48 ; 0x30 8023c62: f040 8108 bne.w 8023e76 <__gethex+0x48e> 8023c66: 1c63 adds r3, r4, #1 8023c68: 461d mov r5, r3 8023c6a: f813 2b01 ldrb.w r2, [r3], #1 8023c6e: 2a30 cmp r2, #48 ; 0x30 8023c70: d0fa beq.n 8023c68 <__gethex+0x280> 8023c72: 5cb3 ldrb r3, [r6, r2] 8023c74: 2b00 cmp r3, #0 8023c76: f040 80ff bne.w 8023e78 <__gethex+0x490> 8023c7a: f04f 0901 mov.w r9, #1 8023c7e: 46a3 mov fp, r4 8023c80: 464f mov r7, r9 8023c82: 462c mov r4, r5 8023c84: e6f4 b.n 8023a70 <__gethex+0x88> 8023c86: 1e77 subs r7, r6, #1 8023c88: 2d00 cmp r5, #0 8023c8a: f040 80e7 bne.w 8023e5c <__gethex+0x474> 8023c8e: 2f00 cmp r7, #0 8023c90: dd04 ble.n 8023c9c <__gethex+0x2b4> 8023c92: 9804 ldr r0, [sp, #16] 8023c94: 4639 mov r1, r7 8023c96: f001 fa05 bl 80250a4 <__any_on> 8023c9a: 4605 mov r5, r0 8023c9c: 9908 ldr r1, [sp, #32] 8023c9e: 117b asrs r3, r7, #5 8023ca0: 2201 movs r2, #1 8023ca2: f007 071f and.w r7, r7, #31 8023ca6: 9804 ldr r0, [sp, #16] 8023ca8: 1ba4 subs r4, r4, r6 8023caa: f851 3023 ldr.w r3, [r1, r3, lsl #2] 8023cae: fa02 f207 lsl.w r2, r2, r7 8023cb2: 4631 mov r1, r6 8023cb4: 421a tst r2, r3 8023cb6: bf18 it ne 8023cb8: f045 0502 orrne.w r5, r5, #2 8023cbc: f7ff fe10 bl 80238e0 8023cc0: 9b06 ldr r3, [sp, #24] 8023cc2: 2702 movs r7, #2 8023cc4: 685b ldr r3, [r3, #4] 8023cc6: 9305 str r3, [sp, #20] 8023cc8: 2d00 cmp r5, #0 8023cca: d069 beq.n 8023da0 <__gethex+0x3b8> 8023ccc: 9806 ldr r0, [sp, #24] 8023cce: 68c3 ldr r3, [r0, #12] 8023cd0: 2b02 cmp r3, #2 8023cd2: f000 80ea beq.w 8023eaa <__gethex+0x4c2> 8023cd6: 2b03 cmp r3, #3 8023cd8: d05d beq.n 8023d96 <__gethex+0x3ae> 8023cda: 2b01 cmp r3, #1 8023cdc: d15e bne.n 8023d9c <__gethex+0x3b4> 8023cde: 07aa lsls r2, r5, #30 8023ce0: d55c bpl.n 8023d9c <__gethex+0x3b4> 8023ce2: 9908 ldr r1, [sp, #32] 8023ce4: 680b ldr r3, [r1, #0] 8023ce6: 432b orrs r3, r5 8023ce8: 07db lsls r3, r3, #31 8023cea: d557 bpl.n 8023d9c <__gethex+0x3b4> 8023cec: 9b04 ldr r3, [sp, #16] 8023cee: 2600 movs r6, #0 8023cf0: 9904 ldr r1, [sp, #16] 8023cf2: 691d ldr r5, [r3, #16] 8023cf4: 9b08 ldr r3, [sp, #32] 8023cf6: eb01 0085 add.w r0, r1, r5, lsl #2 8023cfa: 3014 adds r0, #20 8023cfc: 4619 mov r1, r3 8023cfe: f853 2b04 ldr.w r2, [r3], #4 8023d02: f1b2 3fff cmp.w r2, #4294967295 8023d06: f040 80eb bne.w 8023ee0 <__gethex+0x4f8> 8023d0a: 4298 cmp r0, r3 8023d0c: f843 6c04 str.w r6, [r3, #-4] 8023d10: d8f4 bhi.n 8023cfc <__gethex+0x314> 8023d12: 9a04 ldr r2, [sp, #16] 8023d14: 6893 ldr r3, [r2, #8] 8023d16: 429d cmp r5, r3 8023d18: bfb8 it lt 8023d1a: 462b movlt r3, r5 8023d1c: f280 80f9 bge.w 8023f12 <__gethex+0x52a> 8023d20: 9904 ldr r1, [sp, #16] 8023d22: eb01 0283 add.w r2, r1, r3, lsl #2 8023d26: 3301 adds r3, #1 8023d28: 610b str r3, [r1, #16] 8023d2a: 2301 movs r3, #1 8023d2c: 6153 str r3, [r2, #20] 8023d2e: 2f02 cmp r7, #2 8023d30: f000 80d9 beq.w 8023ee6 <__gethex+0x4fe> 8023d34: 9904 ldr r1, [sp, #16] 8023d36: 690b ldr r3, [r1, #16] 8023d38: 429d cmp r5, r3 8023d3a: db0e blt.n 8023d5a <__gethex+0x372> 8023d3c: f014 041f ands.w r4, r4, #31 8023d40: f000 80ac beq.w 8023e9c <__gethex+0x4b4> 8023d44: 9b04 ldr r3, [sp, #16] 8023d46: eb03 0585 add.w r5, r3, r5, lsl #2 8023d4a: 6928 ldr r0, [r5, #16] 8023d4c: f000 fe30 bl 80249b0 <__hi0bits> 8023d50: f1c4 0320 rsb r3, r4, #32 8023d54: 4298 cmp r0, r3 8023d56: f280 80a1 bge.w 8023e9c <__gethex+0x4b4> 8023d5a: 9804 ldr r0, [sp, #16] 8023d5c: 2101 movs r1, #1 8023d5e: f7ff fdbf bl 80238e0 8023d62: 9a06 ldr r2, [sp, #24] 8023d64: 9805 ldr r0, [sp, #20] 8023d66: 6893 ldr r3, [r2, #8] 8023d68: 3001 adds r0, #1 8023d6a: 9005 str r0, [sp, #20] 8023d6c: 4298 cmp r0, r3 8023d6e: f340 8095 ble.w 8023e9c <__gethex+0x4b4> 8023d72: 9807 ldr r0, [sp, #28] 8023d74: 27a3 movs r7, #163 ; 0xa3 8023d76: 9904 ldr r1, [sp, #16] 8023d78: f000 fd6e bl 8024858 <_Bfree> 8023d7c: 9a14 ldr r2, [sp, #80] ; 0x50 8023d7e: 2300 movs r3, #0 8023d80: 6013 str r3, [r2, #0] 8023d82: e695 b.n 8023ab0 <__gethex+0xc8> 8023d84: 782b ldrb r3, [r5, #0] 8023d86: 462c mov r4, r5 8023d88: f8cd b014 str.w fp, [sp, #20] 8023d8c: f04f 0901 mov.w r9, #1 8023d90: e67e b.n 8023a90 <__gethex+0xa8> 8023d92: 2701 movs r7, #1 8023d94: e798 b.n 8023cc8 <__gethex+0x2e0> 8023d96: 9b15 ldr r3, [sp, #84] ; 0x54 8023d98: 2b00 cmp r3, #0 8023d9a: d1a7 bne.n 8023cec <__gethex+0x304> 8023d9c: f047 0710 orr.w r7, r7, #16 8023da0: 9b04 ldr r3, [sp, #16] 8023da2: 9814 ldr r0, [sp, #80] ; 0x50 8023da4: 6003 str r3, [r0, #0] 8023da6: 9b05 ldr r3, [sp, #20] 8023da8: 9809 ldr r0, [sp, #36] ; 0x24 8023daa: 6003 str r3, [r0, #0] 8023dac: e680 b.n 8023ab0 <__gethex+0xc8> 8023dae: f04f 0b01 mov.w fp, #1 8023db2: 78a3 ldrb r3, [r4, #2] 8023db4: 1ca0 adds r0, r4, #2 8023db6: e713 b.n 8023be0 <__gethex+0x1f8> 8023db8: f04f 0b00 mov.w fp, #0 8023dbc: e7f9 b.n 8023db2 <__gethex+0x3ca> 8023dbe: 1b06 subs r6, r0, r4 8023dc0: 9804 ldr r0, [sp, #16] 8023dc2: 4631 mov r1, r6 8023dc4: f001 f96e bl 80250a4 <__any_on> 8023dc8: 4605 mov r5, r0 8023dca: b1a8 cbz r0, 8023df8 <__gethex+0x410> 8023dcc: 1e73 subs r3, r6, #1 8023dce: 9804 ldr r0, [sp, #16] 8023dd0: 2501 movs r5, #1 8023dd2: f003 011f and.w r1, r3, #31 8023dd6: 115a asrs r2, r3, #5 8023dd8: fa05 f101 lsl.w r1, r5, r1 8023ddc: eb00 0282 add.w r2, r0, r2, lsl #2 8023de0: 6952 ldr r2, [r2, #20] 8023de2: 4211 tst r1, r2 8023de4: d008 beq.n 8023df8 <__gethex+0x410> 8023de6: 42ab cmp r3, r5 8023de8: dd05 ble.n 8023df6 <__gethex+0x40e> 8023dea: 9804 ldr r0, [sp, #16] 8023dec: 1eb1 subs r1, r6, #2 8023dee: f001 f959 bl 80250a4 <__any_on> 8023df2: 2503 movs r5, #3 8023df4: b900 cbnz r0, 8023df8 <__gethex+0x410> 8023df6: 2502 movs r5, #2 8023df8: 9804 ldr r0, [sp, #16] 8023dfa: 4631 mov r1, r6 8023dfc: f7ff fd70 bl 80238e0 8023e00: 9b05 ldr r3, [sp, #20] 8023e02: 199b adds r3, r3, r6 8023e04: 9305 str r3, [sp, #20] 8023e06: e6b8 b.n 8023b7a <__gethex+0x192> 8023e08: f8cd b014 str.w fp, [sp, #20] 8023e0c: e640 b.n 8023a90 <__gethex+0xa8> 8023e0e: 1a25 subs r5, r4, r0 8023e10: 9904 ldr r1, [sp, #16] 8023e12: 462a mov r2, r5 8023e14: 9807 ldr r0, [sp, #28] 8023e16: f000 ff11 bl 8024c3c <__lshift> 8023e1a: 9b05 ldr r3, [sp, #20] 8023e1c: 1b5b subs r3, r3, r5 8023e1e: 2500 movs r5, #0 8023e20: 9305 str r3, [sp, #20] 8023e22: 9004 str r0, [sp, #16] 8023e24: f100 0314 add.w r3, r0, #20 8023e28: 9308 str r3, [sp, #32] 8023e2a: e6a6 b.n 8023b7a <__gethex+0x192> 8023e2c: 2700 movs r7, #0 8023e2e: e605 b.n 8023a3c <__gethex+0x54> 8023e30: 9205 str r2, [sp, #20] 8023e32: f04f 0901 mov.w r9, #1 8023e36: e62b b.n 8023a90 <__gethex+0xa8> 8023e38: 462c mov r4, r5 8023e3a: 4681 mov r9, r0 8023e3c: 9903 ldr r1, [sp, #12] 8023e3e: eb04 0b01 add.w fp, r4, r1 8023e42: 5c63 ldrb r3, [r4, r1] 8023e44: 5cf2 ldrb r2, [r6, r3] 8023e46: 2a00 cmp r2, #0 8023e48: d07a beq.n 8023f40 <__gethex+0x558> 8023e4a: f10b 0201 add.w r2, fp, #1 8023e4e: 4614 mov r4, r2 8023e50: f812 3b01 ldrb.w r3, [r2], #1 8023e54: 5cf1 ldrb r1, [r6, r3] 8023e56: 2900 cmp r1, #0 8023e58: d1f9 bne.n 8023e4e <__gethex+0x466> 8023e5a: e614 b.n 8023a86 <__gethex+0x9e> 8023e5c: 2501 movs r5, #1 8023e5e: e71d b.n 8023c9c <__gethex+0x2b4> 8023e60: 4628 mov r0, r5 8023e62: 9902 ldr r1, [sp, #8] 8023e64: 9a03 ldr r2, [sp, #12] 8023e66: f7fe f885 bl 8021f74 8023e6a: 2800 cmp r0, #0 8023e6c: d0e4 beq.n 8023e38 <__gethex+0x450> 8023e6e: 46a1 mov r9, r4 8023e70: 462c mov r4, r5 8023e72: 46cb mov fp, r9 8023e74: e602 b.n 8023a7c <__gethex+0x94> 8023e76: 4625 mov r5, r4 8023e78: 46a3 mov fp, r4 8023e7a: 2701 movs r7, #1 8023e7c: e5f0 b.n 8023a60 <__gethex+0x78> 8023e7e: 9815 ldr r0, [sp, #84] ; 0x54 8023e80: 2800 cmp r0, #0 8023e82: f47f ae93 bne.w 8023bac <__gethex+0x1c4> 8023e86: 9a09 ldr r2, [sp, #36] ; 0x24 8023e88: 2762 movs r7, #98 ; 0x62 8023e8a: 9804 ldr r0, [sp, #16] 8023e8c: 9908 ldr r1, [sp, #32] 8023e8e: 6013 str r3, [r2, #0] 8023e90: 2301 movs r3, #1 8023e92: 9a14 ldr r2, [sp, #80] ; 0x50 8023e94: 6103 str r3, [r0, #16] 8023e96: 600b str r3, [r1, #0] 8023e98: 6010 str r0, [r2, #0] 8023e9a: e609 b.n 8023ab0 <__gethex+0xc8> 8023e9c: 2721 movs r7, #33 ; 0x21 8023e9e: e77f b.n 8023da0 <__gethex+0x3b8> 8023ea0: f8dd b020 ldr.w fp, [sp, #32] 8023ea4: f04f 0800 mov.w r8, #0 8023ea8: e651 b.n 8023b4e <__gethex+0x166> 8023eaa: 9a15 ldr r2, [sp, #84] ; 0x54 8023eac: f1c2 0301 rsb r3, r2, #1 8023eb0: 2b00 cmp r3, #0 8023eb2: f43f af73 beq.w 8023d9c <__gethex+0x3b4> 8023eb6: e719 b.n 8023cec <__gethex+0x304> 8023eb8: 42a6 cmp r6, r4 8023eba: f47f ae77 bne.w 8023bac <__gethex+0x1c4> 8023ebe: 2c01 cmp r4, #1 8023ec0: dde1 ble.n 8023e86 <__gethex+0x49e> 8023ec2: 9804 ldr r0, [sp, #16] 8023ec4: 1e61 subs r1, r4, #1 8023ec6: f001 f8ed bl 80250a4 <__any_on> 8023eca: 2800 cmp r0, #0 8023ecc: f43f ae6e beq.w 8023bac <__gethex+0x1c4> 8023ed0: 9a06 ldr r2, [sp, #24] 8023ed2: 6853 ldr r3, [r2, #4] 8023ed4: e7d7 b.n 8023e86 <__gethex+0x49e> 8023ed6: 9915 ldr r1, [sp, #84] ; 0x54 8023ed8: 2900 cmp r1, #0 8023eda: f43f ae67 beq.w 8023bac <__gethex+0x1c4> 8023ede: e7d2 b.n 8023e86 <__gethex+0x49e> 8023ee0: 3201 adds r2, #1 8023ee2: 600a str r2, [r1, #0] 8023ee4: e723 b.n 8023d2e <__gethex+0x346> 8023ee6: 9a06 ldr r2, [sp, #24] 8023ee8: 2722 movs r7, #34 ; 0x22 8023eea: 6813 ldr r3, [r2, #0] 8023eec: 3b01 subs r3, #1 8023eee: 42a3 cmp r3, r4 8023ef0: f47f af56 bne.w 8023da0 <__gethex+0x3b8> 8023ef4: 1163 asrs r3, r4, #5 8023ef6: 9804 ldr r0, [sp, #16] 8023ef8: 2201 movs r2, #1 8023efa: f004 041f and.w r4, r4, #31 8023efe: eb00 0383 add.w r3, r0, r3, lsl #2 8023f02: fa02 f204 lsl.w r2, r2, r4 8023f06: 695b ldr r3, [r3, #20] 8023f08: 421a tst r2, r3 8023f0a: bf14 ite ne 8023f0c: 2721 movne r7, #33 ; 0x21 8023f0e: 2722 moveq r7, #34 ; 0x22 8023f10: e746 b.n 8023da0 <__gethex+0x3b8> 8023f12: 6851 ldr r1, [r2, #4] 8023f14: 9807 ldr r0, [sp, #28] 8023f16: 3101 adds r1, #1 8023f18: f000 fc68 bl 80247ec <_Balloc> 8023f1c: 4606 mov r6, r0 8023f1e: 9804 ldr r0, [sp, #16] 8023f20: f100 010c add.w r1, r0, #12 8023f24: 6903 ldr r3, [r0, #16] 8023f26: f106 000c add.w r0, r6, #12 8023f2a: 1c9a adds r2, r3, #2 8023f2c: 0092 lsls r2, r2, #2 8023f2e: f7fd fd2d bl 802198c 8023f32: 9904 ldr r1, [sp, #16] 8023f34: 9807 ldr r0, [sp, #28] 8023f36: 9604 str r6, [sp, #16] 8023f38: f000 fc8e bl 8024858 <_Bfree> 8023f3c: 6933 ldr r3, [r6, #16] 8023f3e: e6ef b.n 8023d20 <__gethex+0x338> 8023f40: 465c mov r4, fp 8023f42: e5a0 b.n 8023a86 <__gethex+0x9e> 08023f44 <__hexnan>: 8023f44: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8023f48: f643 1848 movw r8, #14664 ; 0x3948 8023f4c: f2c2 0801 movt r8, #8193 ; 0x2001 8023f50: b085 sub sp, #20 8023f52: 460c mov r4, r1 8023f54: 4692 mov sl, r2 8023f56: f898 3030 ldrb.w r3, [r8, #48] ; 0x30 8023f5a: 9002 str r0, [sp, #8] 8023f5c: 2b00 cmp r3, #0 8023f5e: f000 80ad beq.w 80240bc <__hexnan+0x178> 8023f62: 6823 ldr r3, [r4, #0] 8023f64: 115a asrs r2, r3, #5 8023f66: f013 031f ands.w r3, r3, #31 8023f6a: 9303 str r3, [sp, #12] 8023f6c: eb0a 0282 add.w r2, sl, r2, lsl #2 8023f70: 9200 str r2, [sp, #0] 8023f72: d001 beq.n 8023f78 <__hexnan+0x34> 8023f74: 3204 adds r2, #4 8023f76: 9200 str r2, [sp, #0] 8023f78: 9a00 ldr r2, [sp, #0] 8023f7a: 2300 movs r3, #0 8023f7c: 4699 mov r9, r3 8023f7e: 9900 ldr r1, [sp, #0] 8023f80: 46cb mov fp, r9 8023f82: 464e mov r6, r9 8023f84: f842 3c04 str.w r3, [r2, #-4] 8023f88: 3904 subs r1, #4 8023f8a: 9b02 ldr r3, [sp, #8] 8023f8c: 9101 str r1, [sp, #4] 8023f8e: f8dd c004 ldr.w ip, [sp, #4] 8023f92: 6819 ldr r1, [r3, #0] 8023f94: 4664 mov r4, ip 8023f96: 784b ldrb r3, [r1, #1] 8023f98: 2b00 cmp r3, #0 8023f9a: d033 beq.n 8024004 <__hexnan+0xc0> 8023f9c: f818 2003 ldrb.w r2, [r8, r3] 8023fa0: 2a00 cmp r2, #0 8023fa2: d16f bne.n 8024084 <__hexnan+0x140> 8023fa4: 2b20 cmp r3, #32 8023fa6: f200 8083 bhi.w 80240b0 <__hexnan+0x16c> 8023faa: 455e cmp r6, fp 8023fac: dd26 ble.n 8023ffc <__hexnan+0xb8> 8023fae: f1b9 0f07 cmp.w r9, #7 8023fb2: bfcc ite gt 8023fb4: 2300 movgt r3, #0 8023fb6: 2301 movle r3, #1 8023fb8: 4564 cmp r4, ip 8023fba: bf28 it cs 8023fbc: 2300 movcs r3, #0 8023fbe: b193 cbz r3, 8023fe6 <__hexnan+0xa2> 8023fc0: f1c9 0908 rsb r9, r9, #8 8023fc4: 6822 ldr r2, [r4, #0] 8023fc6: 4623 mov r3, r4 8023fc8: ea4f 0989 mov.w r9, r9, lsl #2 8023fcc: f1c9 0720 rsb r7, r9, #32 8023fd0: 6858 ldr r0, [r3, #4] 8023fd2: fa00 f507 lsl.w r5, r0, r7 8023fd6: 4315 orrs r5, r2 8023fd8: fa20 f209 lsr.w r2, r0, r9 8023fdc: 601d str r5, [r3, #0] 8023fde: f843 2f04 str.w r2, [r3, #4]! 8023fe2: 459c cmp ip, r3 8023fe4: d8f4 bhi.n 8023fd0 <__hexnan+0x8c> 8023fe6: 4554 cmp r4, sl 8023fe8: bf98 it ls 8023fea: f04f 0908 movls.w r9, #8 8023fee: d905 bls.n 8023ffc <__hexnan+0xb8> 8023ff0: 2200 movs r2, #0 8023ff2: 3c04 subs r4, #4 8023ff4: 6022 str r2, [r4, #0] 8023ff6: 46b3 mov fp, r6 8023ff8: 46a4 mov ip, r4 8023ffa: 4691 mov r9, r2 8023ffc: 3101 adds r1, #1 8023ffe: 784b ldrb r3, [r1, #1] 8024000: 2b00 cmp r3, #0 8024002: d1cb bne.n 8023f9c <__hexnan+0x58> 8024004: 2e00 cmp r6, #0 8024006: d055 beq.n 80240b4 <__hexnan+0x170> 8024008: f1b9 0f07 cmp.w r9, #7 802400c: bfcc ite gt 802400e: 2300 movgt r3, #0 8024010: 2301 movle r3, #1 8024012: 4564 cmp r4, ip 8024014: bf28 it cs 8024016: 2300 movcs r3, #0 8024018: b193 cbz r3, 8024040 <__hexnan+0xfc> 802401a: f1c9 0908 rsb r9, r9, #8 802401e: 6822 ldr r2, [r4, #0] 8024020: 4623 mov r3, r4 8024022: ea4f 0989 mov.w r9, r9, lsl #2 8024026: f1c9 0520 rsb r5, r9, #32 802402a: 6859 ldr r1, [r3, #4] 802402c: fa01 f005 lsl.w r0, r1, r5 8024030: 4310 orrs r0, r2 8024032: fa21 f209 lsr.w r2, r1, r9 8024036: 6018 str r0, [r3, #0] 8024038: f843 2f04 str.w r2, [r3, #4]! 802403c: 4563 cmp r3, ip 802403e: d3f4 bcc.n 802402a <__hexnan+0xe6> 8024040: 45a2 cmp sl, r4 8024042: d23e bcs.n 80240c2 <__hexnan+0x17e> 8024044: 9801 ldr r0, [sp, #4] 8024046: 4652 mov r2, sl 8024048: f854 1b04 ldr.w r1, [r4], #4 802404c: 4613 mov r3, r2 802404e: 42a0 cmp r0, r4 8024050: f843 1b04 str.w r1, [r3], #4 8024054: 461a mov r2, r3 8024056: d2f7 bcs.n 8024048 <__hexnan+0x104> 8024058: 9901 ldr r1, [sp, #4] 802405a: 2200 movs r2, #0 802405c: f843 2b04 str.w r2, [r3], #4 8024060: 4299 cmp r1, r3 8024062: d2fb bcs.n 802405c <__hexnan+0x118> 8024064: 9900 ldr r1, [sp, #0] 8024066: f851 3c04 ldr.w r3, [r1, #-4] 802406a: b94b cbnz r3, 8024080 <__hexnan+0x13c> 802406c: 9b01 ldr r3, [sp, #4] 802406e: 459a cmp sl, r3 8024070: d102 bne.n 8024078 <__hexnan+0x134> 8024072: e038 b.n 80240e6 <__hexnan+0x1a2> 8024074: 459a cmp sl, r3 8024076: d037 beq.n 80240e8 <__hexnan+0x1a4> 8024078: f853 2d04 ldr.w r2, [r3, #-4]! 802407c: 2a00 cmp r2, #0 802407e: d0f9 beq.n 8024074 <__hexnan+0x130> 8024080: 2005 movs r0, #5 8024082: e018 b.n 80240b6 <__hexnan+0x172> 8024084: f109 0901 add.w r9, r9, #1 8024088: 3601 adds r6, #1 802408a: f1b9 0f08 cmp.w r9, #8 802408e: dc07 bgt.n 80240a0 <__hexnan+0x15c> 8024090: 6823 ldr r3, [r4, #0] 8024092: 011b lsls r3, r3, #4 8024094: f002 020f and.w r2, r2, #15 8024098: 3101 adds r1, #1 802409a: 431a orrs r2, r3 802409c: 6022 str r2, [r4, #0] 802409e: e7ae b.n 8023ffe <__hexnan+0xba> 80240a0: 4554 cmp r4, sl 80240a2: d9ab bls.n 8023ffc <__hexnan+0xb8> 80240a4: 2300 movs r3, #0 80240a6: 3c04 subs r4, #4 80240a8: 6023 str r3, [r4, #0] 80240aa: f04f 0901 mov.w r9, #1 80240ae: e7f1 b.n 8024094 <__hexnan+0x150> 80240b0: 2b29 cmp r3, #41 ; 0x29 80240b2: d01d beq.n 80240f0 <__hexnan+0x1ac> 80240b4: 2004 movs r0, #4 80240b6: b005 add sp, #20 80240b8: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80240bc: f7ff fc68 bl 8023990 <__hexdig_init> 80240c0: e74f b.n 8023f62 <__hexnan+0x1e> 80240c2: 9a03 ldr r2, [sp, #12] 80240c4: 2a00 cmp r2, #0 80240c6: d0cd beq.n 8024064 <__hexnan+0x120> 80240c8: 9a00 ldr r2, [sp, #0] 80240ca: 9903 ldr r1, [sp, #12] 80240cc: f852 3c04 ldr.w r3, [r2, #-4] 80240d0: f1c1 0220 rsb r2, r1, #32 80240d4: f04f 31ff mov.w r1, #4294967295 80240d8: fa21 f202 lsr.w r2, r1, r2 80240dc: 4013 ands r3, r2 80240de: 9a00 ldr r2, [sp, #0] 80240e0: f842 3c04 str.w r3, [r2, #-4] 80240e4: e7c1 b.n 802406a <__hexnan+0x126> 80240e6: 4653 mov r3, sl 80240e8: 2201 movs r2, #1 80240ea: 2005 movs r0, #5 80240ec: 601a str r2, [r3, #0] 80240ee: e7e2 b.n 80240b6 <__hexnan+0x172> 80240f0: 9b02 ldr r3, [sp, #8] 80240f2: 3102 adds r1, #2 80240f4: 6019 str r1, [r3, #0] 80240f6: 2e00 cmp r6, #0 80240f8: d186 bne.n 8024008 <__hexnan+0xc4> 80240fa: e7db b.n 80240b4 <__hexnan+0x170> 080240fc <_setlocale_r>: 80240fc: b510 push {r4, lr} 80240fe: 4614 mov r4, r2 8024100: b13a cbz r2, 8024112 <_setlocale_r+0x16> 8024102: f645 2108 movw r1, #23048 ; 0x5a08 8024106: 4610 mov r0, r2 8024108: f6c0 0104 movt r1, #2052 ; 0x804 802410c: f7fd fd84 bl 8021c18 8024110: b920 cbnz r0, 802411c <_setlocale_r+0x20> 8024112: f645 2004 movw r0, #23044 ; 0x5a04 8024116: f6c0 0004 movt r0, #2052 ; 0x804 802411a: bd10 pop {r4, pc} 802411c: f645 2104 movw r1, #23044 ; 0x5a04 8024120: 4620 mov r0, r4 8024122: f6c0 0104 movt r1, #2052 ; 0x804 8024126: f7fd fd77 bl 8021c18 802412a: 2800 cmp r0, #0 802412c: d0f1 beq.n 8024112 <_setlocale_r+0x16> 802412e: f645 2110 movw r1, #23056 ; 0x5a10 8024132: 4620 mov r0, r4 8024134: f6c0 0104 movt r1, #2052 ; 0x804 8024138: f7fd fd6e bl 8021c18 802413c: f645 2304 movw r3, #23044 ; 0x5a04 8024140: f6c0 0304 movt r3, #2052 ; 0x804 8024144: 2800 cmp r0, #0 8024146: bf0c ite eq 8024148: 4618 moveq r0, r3 802414a: 2000 movne r0, #0 802414c: bd10 pop {r4, pc} 802414e: bf00 nop 08024150 <__locale_charset>: 8024150: f240 1020 movw r0, #288 ; 0x120 8024154: f2c2 0000 movt r0, #8192 ; 0x2000 8024158: 4770 bx lr 802415a: bf00 nop 0802415c <__locale_mb_cur_max>: 802415c: f240 1320 movw r3, #288 ; 0x120 8024160: f2c2 0300 movt r3, #8192 ; 0x2000 8024164: 6a18 ldr r0, [r3, #32] 8024166: 4770 bx lr 08024168 <__locale_msgcharset>: 8024168: 4800 ldr r0, [pc, #0] ; (802416c <__locale_msgcharset+0x4>) 802416a: 4770 bx lr 802416c: 20000144 .word 0x20000144 08024170 <__locale_cjk_lang>: 8024170: 2000 movs r0, #0 8024172: 4770 bx lr 08024174 <_localeconv_r>: 8024174: 4800 ldr r0, [pc, #0] ; (8024178 <_localeconv_r+0x4>) 8024176: 4770 bx lr 8024178: 20000164 .word 0x20000164 0802417c : 802417c: f240 032c movw r3, #44 ; 0x2c 8024180: 460a mov r2, r1 8024182: f2c2 0300 movt r3, #8192 ; 0x2000 8024186: 4601 mov r1, r0 8024188: 6818 ldr r0, [r3, #0] 802418a: f7ff bfb7 b.w 80240fc <_setlocale_r> 802418e: bf00 nop 08024190 : 8024190: 4800 ldr r0, [pc, #0] ; (8024194 ) 8024192: 4770 bx lr 8024194: 20000164 .word 0x20000164 08024198 : 8024198: f240 032c movw r3, #44 ; 0x2c 802419c: 4601 mov r1, r0 802419e: f2c2 0300 movt r3, #8192 ; 0x2000 80241a2: 6818 ldr r0, [r3, #0] 80241a4: f000 b808 b.w 80241b8 <_malloc_r> 080241a8 : 80241a8: f240 032c movw r3, #44 ; 0x2c 80241ac: 4601 mov r1, r0 80241ae: f2c2 0300 movt r3, #8192 ; 0x2000 80241b2: 6818 ldr r0, [r3, #0] 80241b4: f7ff baca b.w 802374c <_free_r> 080241b8 <_malloc_r>: 80241b8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80241bc: f101 040b add.w r4, r1, #11 80241c0: 2c16 cmp r4, #22 80241c2: b083 sub sp, #12 80241c4: 4607 mov r7, r0 80241c6: d930 bls.n 802422a <_malloc_r+0x72> 80241c8: f024 0407 bic.w r4, r4, #7 80241cc: 0fe3 lsrs r3, r4, #31 80241ce: 428c cmp r4, r1 80241d0: bf2c ite cs 80241d2: 4619 movcs r1, r3 80241d4: f043 0101 orrcc.w r1, r3, #1 80241d8: 2900 cmp r1, #0 80241da: d12f bne.n 802423c <_malloc_r+0x84> 80241dc: 4638 mov r0, r7 80241de: f000 fb01 bl 80247e4 <__malloc_lock> 80241e2: f5b4 7ffc cmp.w r4, #504 ; 0x1f8 80241e6: d22e bcs.n 8024246 <_malloc_r+0x8e> 80241e8: ea4f 0cd4 mov.w ip, r4, lsr #3 80241ec: f240 169c movw r6, #412 ; 0x19c 80241f0: f2c2 0600 movt r6, #8192 ; 0x2000 80241f4: eb06 02cc add.w r2, r6, ip, lsl #3 80241f8: 68d3 ldr r3, [r2, #12] 80241fa: 4293 cmp r3, r2 80241fc: f000 8211 beq.w 8024622 <_malloc_r+0x46a> 8024200: 6859 ldr r1, [r3, #4] 8024202: f103 0808 add.w r8, r3, #8 8024206: 68da ldr r2, [r3, #12] 8024208: 4638 mov r0, r7 802420a: f021 0403 bic.w r4, r1, #3 802420e: 6899 ldr r1, [r3, #8] 8024210: 191b adds r3, r3, r4 8024212: 685c ldr r4, [r3, #4] 8024214: 60ca str r2, [r1, #12] 8024216: f044 0401 orr.w r4, r4, #1 802421a: 6091 str r1, [r2, #8] 802421c: 605c str r4, [r3, #4] 802421e: f000 fae3 bl 80247e8 <__malloc_unlock> 8024222: 4640 mov r0, r8 8024224: b003 add sp, #12 8024226: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802422a: 2300 movs r3, #0 802422c: 2410 movs r4, #16 802422e: 428c cmp r4, r1 8024230: bf2c ite cs 8024232: 4619 movcs r1, r3 8024234: f043 0101 orrcc.w r1, r3, #1 8024238: 2900 cmp r1, #0 802423a: d0cf beq.n 80241dc <_malloc_r+0x24> 802423c: 230c movs r3, #12 802423e: f04f 0800 mov.w r8, #0 8024242: 603b str r3, [r7, #0] 8024244: e7ed b.n 8024222 <_malloc_r+0x6a> 8024246: ea5f 2c54 movs.w ip, r4, lsr #9 802424a: bf04 itt eq 802424c: ea4f 0cd4 moveq.w ip, r4, lsr #3 8024250: ea4f 054c moveq.w r5, ip, lsl #1 8024254: f040 808f bne.w 8024376 <_malloc_r+0x1be> 8024258: f240 169c movw r6, #412 ; 0x19c 802425c: f2c2 0600 movt r6, #8192 ; 0x2000 8024260: eb06 0585 add.w r5, r6, r5, lsl #2 8024264: 68eb ldr r3, [r5, #12] 8024266: 429d cmp r5, r3 8024268: d106 bne.n 8024278 <_malloc_r+0xc0> 802426a: e00d b.n 8024288 <_malloc_r+0xd0> 802426c: 2a00 cmp r2, #0 802426e: f280 8155 bge.w 802451c <_malloc_r+0x364> 8024272: 68db ldr r3, [r3, #12] 8024274: 429d cmp r5, r3 8024276: d007 beq.n 8024288 <_malloc_r+0xd0> 8024278: 6859 ldr r1, [r3, #4] 802427a: f021 0103 bic.w r1, r1, #3 802427e: 1b0a subs r2, r1, r4 8024280: 2a0f cmp r2, #15 8024282: ddf3 ble.n 802426c <_malloc_r+0xb4> 8024284: f10c 3cff add.w ip, ip, #4294967295 8024288: f10c 0c01 add.w ip, ip, #1 802428c: f240 129c movw r2, #412 ; 0x19c 8024290: 6933 ldr r3, [r6, #16] 8024292: f2c2 0200 movt r2, #8192 ; 0x2000 8024296: f102 0e08 add.w lr, r2, #8 802429a: 4573 cmp r3, lr 802429c: bf08 it eq 802429e: f8d2 9004 ldreq.w r9, [r2, #4] 80242a2: d022 beq.n 80242ea <_malloc_r+0x132> 80242a4: 6858 ldr r0, [r3, #4] 80242a6: f020 0003 bic.w r0, r0, #3 80242aa: 1b01 subs r1, r0, r4 80242ac: 290f cmp r1, #15 80242ae: f300 8184 bgt.w 80245ba <_malloc_r+0x402> 80242b2: 2900 cmp r1, #0 80242b4: f8c2 e014 str.w lr, [r2, #20] 80242b8: f8c2 e010 str.w lr, [r2, #16] 80242bc: da66 bge.n 802438c <_malloc_r+0x1d4> 80242be: f5b0 7f00 cmp.w r0, #512 ; 0x200 80242c2: f080 814e bcs.w 8024562 <_malloc_r+0x3aa> 80242c6: 08c1 lsrs r1, r0, #3 80242c8: f04f 0801 mov.w r8, #1 80242cc: eb02 00c1 add.w r0, r2, r1, lsl #3 80242d0: 1089 asrs r1, r1, #2 80242d2: fa08 f801 lsl.w r8, r8, r1 80242d6: 6851 ldr r1, [r2, #4] 80242d8: 6885 ldr r5, [r0, #8] 80242da: 60d8 str r0, [r3, #12] 80242dc: ea48 0901 orr.w r9, r8, r1 80242e0: f8c2 9004 str.w r9, [r2, #4] 80242e4: 609d str r5, [r3, #8] 80242e6: 60eb str r3, [r5, #12] 80242e8: 6083 str r3, [r0, #8] 80242ea: 2201 movs r2, #1 80242ec: ea4f 03ac mov.w r3, ip, asr #2 80242f0: fa02 f303 lsl.w r3, r2, r3 80242f4: 454b cmp r3, r9 80242f6: d854 bhi.n 80243a2 <_malloc_r+0x1ea> 80242f8: ea19 0f03 tst.w r9, r3 80242fc: d10d bne.n 802431a <_malloc_r+0x162> 80242fe: 4093 lsls r3, r2 8024300: f02c 0c03 bic.w ip, ip, #3 8024304: ea19 0f03 tst.w r9, r3 8024308: f10c 0c04 add.w ip, ip, #4 802430c: d105 bne.n 802431a <_malloc_r+0x162> 802430e: 005b lsls r3, r3, #1 8024310: f10c 0c04 add.w ip, ip, #4 8024314: ea19 0f03 tst.w r9, r3 8024318: d0f9 beq.n 802430e <_malloc_r+0x156> 802431a: eb06 09cc add.w r9, r6, ip, lsl #3 802431e: 46e0 mov r8, ip 8024320: 4648 mov r0, r9 8024322: 68c2 ldr r2, [r0, #12] 8024324: 4290 cmp r0, r2 8024326: d107 bne.n 8024338 <_malloc_r+0x180> 8024328: e15b b.n 80245e2 <_malloc_r+0x42a> 802432a: 2900 cmp r1, #0 802432c: f280 8183 bge.w 8024636 <_malloc_r+0x47e> 8024330: 68d2 ldr r2, [r2, #12] 8024332: 4290 cmp r0, r2 8024334: f000 8155 beq.w 80245e2 <_malloc_r+0x42a> 8024338: 6855 ldr r5, [r2, #4] 802433a: f025 0503 bic.w r5, r5, #3 802433e: 1b29 subs r1, r5, r4 8024340: 290f cmp r1, #15 8024342: ddf2 ble.n 802432a <_malloc_r+0x172> 8024344: 4690 mov r8, r2 8024346: 1913 adds r3, r2, r4 8024348: 68d5 ldr r5, [r2, #12] 802434a: f044 0001 orr.w r0, r4, #1 802434e: f858 4f08 ldr.w r4, [r8, #8]! 8024352: f041 0c01 orr.w ip, r1, #1 8024356: 6050 str r0, [r2, #4] 8024358: 4638 mov r0, r7 802435a: f8c3 c004 str.w ip, [r3, #4] 802435e: 60e5 str r5, [r4, #12] 8024360: 60ac str r4, [r5, #8] 8024362: 6173 str r3, [r6, #20] 8024364: 6133 str r3, [r6, #16] 8024366: f8c3 e00c str.w lr, [r3, #12] 802436a: f8c3 e008 str.w lr, [r3, #8] 802436e: 5059 str r1, [r3, r1] 8024370: f000 fa3a bl 80247e8 <__malloc_unlock> 8024374: e755 b.n 8024222 <_malloc_r+0x6a> 8024376: f1bc 0f04 cmp.w ip, #4 802437a: f200 80de bhi.w 802453a <_malloc_r+0x382> 802437e: ea4f 1c94 mov.w ip, r4, lsr #6 8024382: f10c 0c38 add.w ip, ip, #56 ; 0x38 8024386: ea4f 054c mov.w r5, ip, lsl #1 802438a: e765 b.n 8024258 <_malloc_r+0xa0> 802438c: 181a adds r2, r3, r0 802438e: f103 0808 add.w r8, r3, #8 8024392: 4638 mov r0, r7 8024394: 6853 ldr r3, [r2, #4] 8024396: f043 0301 orr.w r3, r3, #1 802439a: 6053 str r3, [r2, #4] 802439c: f000 fa24 bl 80247e8 <__malloc_unlock> 80243a0: e73f b.n 8024222 <_malloc_r+0x6a> 80243a2: 68b5 ldr r5, [r6, #8] 80243a4: 686b ldr r3, [r5, #4] 80243a6: f023 0a03 bic.w sl, r3, #3 80243aa: 4554 cmp r4, sl 80243ac: d804 bhi.n 80243b8 <_malloc_r+0x200> 80243ae: ebc4 030a rsb r3, r4, sl 80243b2: 2b0f cmp r3, #15 80243b4: f300 80a4 bgt.w 8024500 <_malloc_r+0x348> 80243b8: f640 29c8 movw r9, #2760 ; 0xac8 80243bc: f8d6 1408 ldr.w r1, [r6, #1032] ; 0x408 80243c0: f2c2 0900 movt r9, #8192 ; 0x2000 80243c4: eb05 020a add.w r2, r5, sl 80243c8: 3101 adds r1, #1 80243ca: f8d9 3000 ldr.w r3, [r9] 80243ce: 4423 add r3, r4 80243d0: bf08 it eq 80243d2: f103 0b10 addeq.w fp, r3, #16 80243d6: d006 beq.n 80243e6 <_malloc_r+0x22e> 80243d8: f503 5380 add.w r3, r3, #4096 ; 0x1000 80243dc: 330f adds r3, #15 80243de: f423 637f bic.w r3, r3, #4080 ; 0xff0 80243e2: f023 0b0f bic.w fp, r3, #15 80243e6: 4638 mov r0, r7 80243e8: 4659 mov r1, fp 80243ea: 9201 str r2, [sp, #4] 80243ec: f000 fe86 bl 80250fc <_sbrk_r> 80243f0: 9a01 ldr r2, [sp, #4] 80243f2: 1c41 adds r1, r0, #1 80243f4: 4680 mov r8, r0 80243f6: f000 8168 beq.w 80246ca <_malloc_r+0x512> 80243fa: 4282 cmp r2, r0 80243fc: f200 8131 bhi.w 8024662 <_malloc_r+0x4aa> 8024400: f8d9 3004 ldr.w r3, [r9, #4] 8024404: 4542 cmp r2, r8 8024406: 445b add r3, fp 8024408: f8c9 3004 str.w r3, [r9, #4] 802440c: f000 8166 beq.w 80246dc <_malloc_r+0x524> 8024410: f8d6 1408 ldr.w r1, [r6, #1032] ; 0x408 8024414: f240 109c movw r0, #412 ; 0x19c 8024418: f2c2 0000 movt r0, #8192 ; 0x2000 802441c: 3101 adds r1, #1 802441e: bf17 itett ne 8024420: ebc2 0208 rsbne r2, r2, r8 8024424: f8c0 8408 streq.w r8, [r0, #1032] ; 0x408 8024428: 189b addne r3, r3, r2 802442a: f8c9 3004 strne.w r3, [r9, #4] 802442e: f018 0307 ands.w r3, r8, #7 8024432: 4638 mov r0, r7 8024434: bf1f itttt ne 8024436: f1c3 0208 rsbne r2, r3, #8 802443a: f5c3 5380 rsbne r3, r3, #4096 ; 0x1000 802443e: 4490 addne r8, r2 8024440: f103 0208 addne.w r2, r3, #8 8024444: eb08 030b add.w r3, r8, fp 8024448: bf08 it eq 802444a: f44f 5280 moveq.w r2, #4096 ; 0x1000 802444e: 051b lsls r3, r3, #20 8024450: 0d1b lsrs r3, r3, #20 8024452: ebc3 0b02 rsb fp, r3, r2 8024456: 4659 mov r1, fp 8024458: f000 fe50 bl 80250fc <_sbrk_r> 802445c: 1c43 adds r3, r0, #1 802445e: f000 8149 beq.w 80246f4 <_malloc_r+0x53c> 8024462: ebc8 0100 rsb r1, r8, r0 8024466: 4459 add r1, fp 8024468: f041 0101 orr.w r1, r1, #1 802446c: f8d9 3004 ldr.w r3, [r9, #4] 8024470: 42b5 cmp r5, r6 8024472: f640 22c8 movw r2, #2760 ; 0xac8 8024476: f8c6 8008 str.w r8, [r6, #8] 802447a: 445b add r3, fp 802447c: f2c2 0200 movt r2, #8192 ; 0x2000 8024480: f8c8 1004 str.w r1, [r8, #4] 8024484: f8c9 3004 str.w r3, [r9, #4] 8024488: d018 beq.n 80244bc <_malloc_r+0x304> 802448a: f1ba 0f0f cmp.w sl, #15 802448e: f240 810b bls.w 80246a8 <_malloc_r+0x4f0> 8024492: f1aa 000c sub.w r0, sl, #12 8024496: 6869 ldr r1, [r5, #4] 8024498: f020 0007 bic.w r0, r0, #7 802449c: f04f 0c05 mov.w ip, #5 80244a0: eb05 0e00 add.w lr, r5, r0 80244a4: 280f cmp r0, #15 80244a6: f001 0101 and.w r1, r1, #1 80244aa: ea40 0101 orr.w r1, r0, r1 80244ae: 6069 str r1, [r5, #4] 80244b0: f8ce c004 str.w ip, [lr, #4] 80244b4: f8ce c008 str.w ip, [lr, #8] 80244b8: f200 8120 bhi.w 80246fc <_malloc_r+0x544> 80244bc: f640 22c8 movw r2, #2760 ; 0xac8 80244c0: f8d9 102c ldr.w r1, [r9, #44] ; 0x2c 80244c4: f2c2 0200 movt r2, #8192 ; 0x2000 80244c8: 68b5 ldr r5, [r6, #8] 80244ca: 428b cmp r3, r1 80244cc: f8d9 1030 ldr.w r1, [r9, #48] ; 0x30 80244d0: bf88 it hi 80244d2: 62d3 strhi r3, [r2, #44] ; 0x2c 80244d4: f640 22c8 movw r2, #2760 ; 0xac8 80244d8: f2c2 0200 movt r2, #8192 ; 0x2000 80244dc: 428b cmp r3, r1 80244de: bf88 it hi 80244e0: 6313 strhi r3, [r2, #48] ; 0x30 80244e2: 686a ldr r2, [r5, #4] 80244e4: f022 0203 bic.w r2, r2, #3 80244e8: 4294 cmp r4, r2 80244ea: ebc4 0302 rsb r3, r4, r2 80244ee: d801 bhi.n 80244f4 <_malloc_r+0x33c> 80244f0: 2b0f cmp r3, #15 80244f2: dc05 bgt.n 8024500 <_malloc_r+0x348> 80244f4: 4638 mov r0, r7 80244f6: f04f 0800 mov.w r8, #0 80244fa: f000 f975 bl 80247e8 <__malloc_unlock> 80244fe: e690 b.n 8024222 <_malloc_r+0x6a> 8024500: 192a adds r2, r5, r4 8024502: f043 0301 orr.w r3, r3, #1 8024506: f044 0401 orr.w r4, r4, #1 802450a: 4638 mov r0, r7 802450c: 606c str r4, [r5, #4] 802450e: f105 0808 add.w r8, r5, #8 8024512: 6053 str r3, [r2, #4] 8024514: 60b2 str r2, [r6, #8] 8024516: f000 f967 bl 80247e8 <__malloc_unlock> 802451a: e682 b.n 8024222 <_malloc_r+0x6a> 802451c: 1859 adds r1, r3, r1 802451e: 68da ldr r2, [r3, #12] 8024520: 689c ldr r4, [r3, #8] 8024522: 4638 mov r0, r7 8024524: 684d ldr r5, [r1, #4] 8024526: f103 0808 add.w r8, r3, #8 802452a: f045 0501 orr.w r5, r5, #1 802452e: 60e2 str r2, [r4, #12] 8024530: 6094 str r4, [r2, #8] 8024532: 604d str r5, [r1, #4] 8024534: f000 f958 bl 80247e8 <__malloc_unlock> 8024538: e673 b.n 8024222 <_malloc_r+0x6a> 802453a: f1bc 0f14 cmp.w ip, #20 802453e: bf9c itt ls 8024540: f10c 0c5b addls.w ip, ip, #91 ; 0x5b 8024544: ea4f 054c movls.w r5, ip, lsl #1 8024548: f67f ae86 bls.w 8024258 <_malloc_r+0xa0> 802454c: f1bc 0f54 cmp.w ip, #84 ; 0x54 8024550: f200 8093 bhi.w 802467a <_malloc_r+0x4c2> 8024554: ea4f 3c14 mov.w ip, r4, lsr #12 8024558: f10c 0c6e add.w ip, ip, #110 ; 0x6e 802455c: ea4f 054c mov.w r5, ip, lsl #1 8024560: e67a b.n 8024258 <_malloc_r+0xa0> 8024562: 0a42 lsrs r2, r0, #9 8024564: 2a04 cmp r2, #4 8024566: d975 bls.n 8024654 <_malloc_r+0x49c> 8024568: 2a14 cmp r2, #20 802456a: bf9c itt ls 802456c: f102 095b addls.w r9, r2, #91 ; 0x5b 8024570: ea4f 0549 movls.w r5, r9, lsl #1 8024574: d908 bls.n 8024588 <_malloc_r+0x3d0> 8024576: 2a54 cmp r2, #84 ; 0x54 8024578: f200 80c9 bhi.w 802470e <_malloc_r+0x556> 802457c: ea4f 3910 mov.w r9, r0, lsr #12 8024580: f109 096e add.w r9, r9, #110 ; 0x6e 8024584: ea4f 0549 mov.w r5, r9, lsl #1 8024588: eb06 0585 add.w r5, r6, r5, lsl #2 802458c: f240 189c movw r8, #412 ; 0x19c 8024590: f2c2 0800 movt r8, #8192 ; 0x2000 8024594: 68aa ldr r2, [r5, #8] 8024596: 42aa cmp r2, r5 8024598: d079 beq.n 802468e <_malloc_r+0x4d6> 802459a: 6851 ldr r1, [r2, #4] 802459c: f021 0103 bic.w r1, r1, #3 80245a0: 4288 cmp r0, r1 80245a2: d202 bcs.n 80245aa <_malloc_r+0x3f2> 80245a4: 6892 ldr r2, [r2, #8] 80245a6: 4295 cmp r5, r2 80245a8: d1f7 bne.n 802459a <_malloc_r+0x3e2> 80245aa: 68d0 ldr r0, [r2, #12] 80245ac: f8d6 9004 ldr.w r9, [r6, #4] 80245b0: 60d8 str r0, [r3, #12] 80245b2: 609a str r2, [r3, #8] 80245b4: 60d3 str r3, [r2, #12] 80245b6: 6083 str r3, [r0, #8] 80245b8: e697 b.n 80242ea <_malloc_r+0x132> 80245ba: 191d adds r5, r3, r4 80245bc: f041 0601 orr.w r6, r1, #1 80245c0: 6155 str r5, [r2, #20] 80245c2: f044 0401 orr.w r4, r4, #1 80245c6: 6115 str r5, [r2, #16] 80245c8: 4638 mov r0, r7 80245ca: 605c str r4, [r3, #4] 80245cc: f103 0808 add.w r8, r3, #8 80245d0: f8c5 e00c str.w lr, [r5, #12] 80245d4: f8c5 e008 str.w lr, [r5, #8] 80245d8: 606e str r6, [r5, #4] 80245da: 5069 str r1, [r5, r1] 80245dc: f000 f904 bl 80247e8 <__malloc_unlock> 80245e0: e61f b.n 8024222 <_malloc_r+0x6a> 80245e2: f108 0801 add.w r8, r8, #1 80245e6: 3008 adds r0, #8 80245e8: f018 0f03 tst.w r8, #3 80245ec: f47f ae99 bne.w 8024322 <_malloc_r+0x16a> 80245f0: 464a mov r2, r9 80245f2: f01c 0f03 tst.w ip, #3 80245f6: f1a2 0108 sub.w r1, r2, #8 80245fa: f10c 3cff add.w ip, ip, #4294967295 80245fe: f000 809e beq.w 802473e <_malloc_r+0x586> 8024602: 6812 ldr r2, [r2, #0] 8024604: 428a cmp r2, r1 8024606: d0f4 beq.n 80245f2 <_malloc_r+0x43a> 8024608: 6872 ldr r2, [r6, #4] 802460a: 005b lsls r3, r3, #1 802460c: 4293 cmp r3, r2 802460e: f63f aec8 bhi.w 80243a2 <_malloc_r+0x1ea> 8024612: 2b00 cmp r3, #0 8024614: f43f aec5 beq.w 80243a2 <_malloc_r+0x1ea> 8024618: 421a tst r2, r3 802461a: f000 8095 beq.w 8024748 <_malloc_r+0x590> 802461e: 46c4 mov ip, r8 8024620: e67b b.n 802431a <_malloc_r+0x162> 8024622: f103 0208 add.w r2, r3, #8 8024626: 695b ldr r3, [r3, #20] 8024628: 429a cmp r2, r3 802462a: bf08 it eq 802462c: f10c 0c02 addeq.w ip, ip, #2 8024630: f43f ae2c beq.w 802428c <_malloc_r+0xd4> 8024634: e5e4 b.n 8024200 <_malloc_r+0x48> 8024636: 4690 mov r8, r2 8024638: 1955 adds r5, r2, r5 802463a: 68d3 ldr r3, [r2, #12] 802463c: 4638 mov r0, r7 802463e: f858 2f08 ldr.w r2, [r8, #8]! 8024642: 6869 ldr r1, [r5, #4] 8024644: 60d3 str r3, [r2, #12] 8024646: f041 0101 orr.w r1, r1, #1 802464a: 609a str r2, [r3, #8] 802464c: 6069 str r1, [r5, #4] 802464e: f000 f8cb bl 80247e8 <__malloc_unlock> 8024652: e5e6 b.n 8024222 <_malloc_r+0x6a> 8024654: ea4f 1990 mov.w r9, r0, lsr #6 8024658: f109 0938 add.w r9, r9, #56 ; 0x38 802465c: ea4f 0549 mov.w r5, r9, lsl #1 8024660: e792 b.n 8024588 <_malloc_r+0x3d0> 8024662: 42b5 cmp r5, r6 8024664: f240 139c movw r3, #412 ; 0x19c 8024668: f2c2 0300 movt r3, #8192 ; 0x2000 802466c: f43f aec8 beq.w 8024400 <_malloc_r+0x248> 8024670: 689d ldr r5, [r3, #8] 8024672: 686a ldr r2, [r5, #4] 8024674: f022 0203 bic.w r2, r2, #3 8024678: e736 b.n 80244e8 <_malloc_r+0x330> 802467a: f5bc 7faa cmp.w ip, #340 ; 0x154 802467e: d819 bhi.n 80246b4 <_malloc_r+0x4fc> 8024680: ea4f 3cd4 mov.w ip, r4, lsr #15 8024684: f10c 0c77 add.w ip, ip, #119 ; 0x77 8024688: ea4f 054c mov.w r5, ip, lsl #1 802468c: e5e4 b.n 8024258 <_malloc_r+0xa0> 802468e: 2501 movs r5, #1 8024690: f8d8 1004 ldr.w r1, [r8, #4] 8024694: ea4f 09a9 mov.w r9, r9, asr #2 8024698: 4610 mov r0, r2 802469a: fa05 f509 lsl.w r5, r5, r9 802469e: ea45 0901 orr.w r9, r5, r1 80246a2: f8c8 9004 str.w r9, [r8, #4] 80246a6: e783 b.n 80245b0 <_malloc_r+0x3f8> 80246a8: 2301 movs r3, #1 80246aa: 4645 mov r5, r8 80246ac: f8c8 3004 str.w r3, [r8, #4] 80246b0: 2200 movs r2, #0 80246b2: e719 b.n 80244e8 <_malloc_r+0x330> 80246b4: f240 5354 movw r3, #1364 ; 0x554 80246b8: 459c cmp ip, r3 80246ba: d80b bhi.n 80246d4 <_malloc_r+0x51c> 80246bc: ea4f 4c94 mov.w ip, r4, lsr #18 80246c0: f10c 0c7c add.w ip, ip, #124 ; 0x7c 80246c4: ea4f 054c mov.w r5, ip, lsl #1 80246c8: e5c6 b.n 8024258 <_malloc_r+0xa0> 80246ca: 68b5 ldr r5, [r6, #8] 80246cc: 686a ldr r2, [r5, #4] 80246ce: f022 0203 bic.w r2, r2, #3 80246d2: e709 b.n 80244e8 <_malloc_r+0x330> 80246d4: 25fc movs r5, #252 ; 0xfc 80246d6: f04f 0c7e mov.w ip, #126 ; 0x7e 80246da: e5bd b.n 8024258 <_malloc_r+0xa0> 80246dc: 0511 lsls r1, r2, #20 80246de: 0d09 lsrs r1, r1, #20 80246e0: 2900 cmp r1, #0 80246e2: f47f ae95 bne.w 8024410 <_malloc_r+0x258> 80246e6: 68b2 ldr r2, [r6, #8] 80246e8: eb0b 010a add.w r1, fp, sl 80246ec: f041 0101 orr.w r1, r1, #1 80246f0: 6051 str r1, [r2, #4] 80246f2: e6e3 b.n 80244bc <_malloc_r+0x304> 80246f4: 2101 movs r1, #1 80246f6: f04f 0b00 mov.w fp, #0 80246fa: e6b7 b.n 802446c <_malloc_r+0x2b4> 80246fc: 4638 mov r0, r7 80246fe: f105 0108 add.w r1, r5, #8 8024702: 9201 str r2, [sp, #4] 8024704: f7ff f822 bl 802374c <_free_r> 8024708: 9a01 ldr r2, [sp, #4] 802470a: 6853 ldr r3, [r2, #4] 802470c: e6d6 b.n 80244bc <_malloc_r+0x304> 802470e: f5b2 7faa cmp.w r2, #340 ; 0x154 8024712: d806 bhi.n 8024722 <_malloc_r+0x56a> 8024714: ea4f 39d0 mov.w r9, r0, lsr #15 8024718: f109 0977 add.w r9, r9, #119 ; 0x77 802471c: ea4f 0549 mov.w r5, r9, lsl #1 8024720: e732 b.n 8024588 <_malloc_r+0x3d0> 8024722: f240 5154 movw r1, #1364 ; 0x554 8024726: 25fc movs r5, #252 ; 0xfc 8024728: 428a cmp r2, r1 802472a: f04f 097e mov.w r9, #126 ; 0x7e 802472e: bf9e ittt ls 8024730: ea4f 4990 movls.w r9, r0, lsr #18 8024734: f109 097c addls.w r9, r9, #124 ; 0x7c 8024738: ea4f 0549 movls.w r5, r9, lsl #1 802473c: e724 b.n 8024588 <_malloc_r+0x3d0> 802473e: 6872 ldr r2, [r6, #4] 8024740: ea22 0203 bic.w r2, r2, r3 8024744: 6072 str r2, [r6, #4] 8024746: e760 b.n 802460a <_malloc_r+0x452> 8024748: 005b lsls r3, r3, #1 802474a: f108 0804 add.w r8, r8, #4 802474e: e763 b.n 8024618 <_malloc_r+0x460> 08024750 : 8024750: 0783 lsls r3, r0, #30 8024752: b2c9 uxtb r1, r1 8024754: b470 push {r4, r5, r6} 8024756: d040 beq.n 80247da 8024758: 1e54 subs r4, r2, #1 802475a: 2a00 cmp r2, #0 802475c: d03f beq.n 80247de 802475e: 7803 ldrb r3, [r0, #0] 8024760: 428b cmp r3, r1 8024762: d021 beq.n 80247a8 8024764: 1c43 adds r3, r0, #1 8024766: e004 b.n 8024772 8024768: b304 cbz r4, 80247ac 802476a: 7802 ldrb r2, [r0, #0] 802476c: 3c01 subs r4, #1 802476e: 428a cmp r2, r1 8024770: d01a beq.n 80247a8 8024772: f013 0f03 tst.w r3, #3 8024776: 4618 mov r0, r3 8024778: f103 0301 add.w r3, r3, #1 802477c: d1f4 bne.n 8024768 802477e: 2c03 cmp r4, #3 8024780: d816 bhi.n 80247b0 8024782: 1e65 subs r5, r4, #1 8024784: b194 cbz r4, 80247ac 8024786: 7803 ldrb r3, [r0, #0] 8024788: 428b cmp r3, r1 802478a: d00d beq.n 80247a8 802478c: 1c42 adds r2, r0, #1 802478e: 2300 movs r3, #0 8024790: e002 b.n 8024798 8024792: 7804 ldrb r4, [r0, #0] 8024794: 428c cmp r4, r1 8024796: d007 beq.n 80247a8 8024798: 429d cmp r5, r3 802479a: 4610 mov r0, r2 802479c: f103 0301 add.w r3, r3, #1 80247a0: f102 0201 add.w r2, r2, #1 80247a4: d1f5 bne.n 8024792 80247a6: 2000 movs r0, #0 80247a8: bc70 pop {r4, r5, r6} 80247aa: 4770 bx lr 80247ac: 4620 mov r0, r4 80247ae: e7fb b.n 80247a8 80247b0: ea41 2601 orr.w r6, r1, r1, lsl #8 80247b4: ea46 4606 orr.w r6, r6, r6, lsl #16 80247b8: 4602 mov r2, r0 80247ba: 3004 adds r0, #4 80247bc: 6813 ldr r3, [r2, #0] 80247be: 4073 eors r3, r6 80247c0: f1a3 3501 sub.w r5, r3, #16843009 ; 0x1010101 80247c4: ea25 0303 bic.w r3, r5, r3 80247c8: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 80247cc: d103 bne.n 80247d6 80247ce: 3c04 subs r4, #4 80247d0: 2c03 cmp r4, #3 80247d2: d8f1 bhi.n 80247b8 80247d4: e7d5 b.n 8024782 80247d6: 4610 mov r0, r2 80247d8: e7d3 b.n 8024782 80247da: 4614 mov r4, r2 80247dc: e7cf b.n 802477e 80247de: 4610 mov r0, r2 80247e0: e7e2 b.n 80247a8 80247e2: bf00 nop 080247e4 <__malloc_lock>: 80247e4: 4770 bx lr 80247e6: bf00 nop 080247e8 <__malloc_unlock>: 80247e8: 4770 bx lr 80247ea: bf00 nop 080247ec <_Balloc>: 80247ec: b570 push {r4, r5, r6, lr} 80247ee: 4606 mov r6, r0 80247f0: 6a44 ldr r4, [r0, #36] ; 0x24 80247f2: 460d mov r5, r1 80247f4: b15c cbz r4, 802480e <_Balloc+0x22> 80247f6: 68e2 ldr r2, [r4, #12] 80247f8: b19a cbz r2, 8024822 <_Balloc+0x36> 80247fa: f852 0025 ldr.w r0, [r2, r5, lsl #2] 80247fe: b1e0 cbz r0, 802483a <_Balloc+0x4e> 8024800: 6801 ldr r1, [r0, #0] 8024802: f842 1025 str.w r1, [r2, r5, lsl #2] 8024806: 2200 movs r2, #0 8024808: 6102 str r2, [r0, #16] 802480a: 60c2 str r2, [r0, #12] 802480c: bd70 pop {r4, r5, r6, pc} 802480e: 2010 movs r0, #16 8024810: f7ff fcc2 bl 8024198 8024814: 2300 movs r3, #0 8024816: 4604 mov r4, r0 8024818: 6270 str r0, [r6, #36] ; 0x24 802481a: 6043 str r3, [r0, #4] 802481c: 6083 str r3, [r0, #8] 802481e: 6003 str r3, [r0, #0] 8024820: 60c3 str r3, [r0, #12] 8024822: 2221 movs r2, #33 ; 0x21 8024824: 4630 mov r0, r6 8024826: 2104 movs r1, #4 8024828: f000 fcfc bl 8025224 <_calloc_r> 802482c: 6a73 ldr r3, [r6, #36] ; 0x24 802482e: 60e0 str r0, [r4, #12] 8024830: 68da ldr r2, [r3, #12] 8024832: 2a00 cmp r2, #0 8024834: d1e1 bne.n 80247fa <_Balloc+0xe> 8024836: 2000 movs r0, #0 8024838: bd70 pop {r4, r5, r6, pc} 802483a: 2301 movs r3, #1 802483c: 4630 mov r0, r6 802483e: 4619 mov r1, r3 8024840: fa03 f405 lsl.w r4, r3, r5 8024844: 1d62 adds r2, r4, #5 8024846: 0092 lsls r2, r2, #2 8024848: f000 fcec bl 8025224 <_calloc_r> 802484c: 2800 cmp r0, #0 802484e: d0f2 beq.n 8024836 <_Balloc+0x4a> 8024850: 6045 str r5, [r0, #4] 8024852: 6084 str r4, [r0, #8] 8024854: e7d7 b.n 8024806 <_Balloc+0x1a> 8024856: bf00 nop 08024858 <_Bfree>: 8024858: b530 push {r4, r5, lr} 802485a: 4604 mov r4, r0 802485c: 6a45 ldr r5, [r0, #36] ; 0x24 802485e: b083 sub sp, #12 8024860: b155 cbz r5, 8024878 <_Bfree+0x20> 8024862: b139 cbz r1, 8024874 <_Bfree+0x1c> 8024864: 6a63 ldr r3, [r4, #36] ; 0x24 8024866: 684a ldr r2, [r1, #4] 8024868: 68db ldr r3, [r3, #12] 802486a: f853 0022 ldr.w r0, [r3, r2, lsl #2] 802486e: 6008 str r0, [r1, #0] 8024870: f843 1022 str.w r1, [r3, r2, lsl #2] 8024874: b003 add sp, #12 8024876: bd30 pop {r4, r5, pc} 8024878: 2010 movs r0, #16 802487a: 9101 str r1, [sp, #4] 802487c: f7ff fc8c bl 8024198 8024880: 9901 ldr r1, [sp, #4] 8024882: 6260 str r0, [r4, #36] ; 0x24 8024884: 6045 str r5, [r0, #4] 8024886: 6085 str r5, [r0, #8] 8024888: 6005 str r5, [r0, #0] 802488a: 60c5 str r5, [r0, #12] 802488c: e7e9 b.n 8024862 <_Bfree+0xa> 802488e: bf00 nop 08024890 <__multadd>: 8024890: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8024894: 4688 mov r8, r1 8024896: f8d1 a010 ldr.w sl, [r1, #16] 802489a: b082 sub sp, #8 802489c: 4681 mov r9, r0 802489e: f101 0514 add.w r5, r1, #20 80248a2: 2400 movs r4, #0 80248a4: 682f ldr r7, [r5, #0] 80248a6: 3401 adds r4, #1 80248a8: b2be uxth r6, r7 80248aa: 0c3f lsrs r7, r7, #16 80248ac: fb02 3606 mla r6, r2, r6, r3 80248b0: fb02 f307 mul.w r3, r2, r7 80248b4: eb03 4316 add.w r3, r3, r6, lsr #16 80248b8: b2b6 uxth r6, r6 80248ba: eb06 4603 add.w r6, r6, r3, lsl #16 80248be: 0c1b lsrs r3, r3, #16 80248c0: 45a2 cmp sl, r4 80248c2: f845 6b04 str.w r6, [r5], #4 80248c6: dced bgt.n 80248a4 <__multadd+0x14> 80248c8: b153 cbz r3, 80248e0 <__multadd+0x50> 80248ca: f8d8 2008 ldr.w r2, [r8, #8] 80248ce: 4592 cmp sl, r2 80248d0: da0a bge.n 80248e8 <__multadd+0x58> 80248d2: eb08 028a add.w r2, r8, sl, lsl #2 80248d6: f10a 0101 add.w r1, sl, #1 80248da: f8c8 1010 str.w r1, [r8, #16] 80248de: 6153 str r3, [r2, #20] 80248e0: 4640 mov r0, r8 80248e2: b002 add sp, #8 80248e4: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 80248e8: f8d8 1004 ldr.w r1, [r8, #4] 80248ec: 4648 mov r0, r9 80248ee: 9301 str r3, [sp, #4] 80248f0: 3101 adds r1, #1 80248f2: f7ff ff7b bl 80247ec <_Balloc> 80248f6: f8d8 2010 ldr.w r2, [r8, #16] 80248fa: f108 010c add.w r1, r8, #12 80248fe: 3202 adds r2, #2 8024900: 0092 lsls r2, r2, #2 8024902: 4604 mov r4, r0 8024904: 300c adds r0, #12 8024906: f7fd f841 bl 802198c 802490a: 4641 mov r1, r8 802490c: 4648 mov r0, r9 802490e: 46a0 mov r8, r4 8024910: f7ff ffa2 bl 8024858 <_Bfree> 8024914: 9b01 ldr r3, [sp, #4] 8024916: e7dc b.n 80248d2 <__multadd+0x42> 08024918 <__s2b>: 8024918: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 802491c: f648 6539 movw r5, #36409 ; 0x8e39 8024920: 461f mov r7, r3 8024922: f6c3 05e3 movt r5, #14563 ; 0x38e3 8024926: 3308 adds r3, #8 8024928: 4606 mov r6, r0 802492a: 460c mov r4, r1 802492c: 4690 mov r8, r2 802492e: fb85 1003 smull r1, r0, r5, r3 8024932: 17db asrs r3, r3, #31 8024934: ebc3 0060 rsb r0, r3, r0, asr #1 8024938: 2801 cmp r0, #1 802493a: dd37 ble.n 80249ac <__s2b+0x94> 802493c: 2501 movs r5, #1 802493e: 2100 movs r1, #0 8024940: 006d lsls r5, r5, #1 8024942: 3101 adds r1, #1 8024944: 42a8 cmp r0, r5 8024946: dcfb bgt.n 8024940 <__s2b+0x28> 8024948: 4630 mov r0, r6 802494a: f7ff ff4f bl 80247ec <_Balloc> 802494e: 9b08 ldr r3, [sp, #32] 8024950: 6143 str r3, [r0, #20] 8024952: 2301 movs r3, #1 8024954: f1b8 0f09 cmp.w r8, #9 8024958: 4601 mov r1, r0 802495a: 6103 str r3, [r0, #16] 802495c: dd22 ble.n 80249a4 <__s2b+0x8c> 802495e: f104 0909 add.w r9, r4, #9 8024962: 4444 add r4, r8 8024964: 464d mov r5, r9 8024966: f815 3b01 ldrb.w r3, [r5], #1 802496a: 220a movs r2, #10 802496c: 4630 mov r0, r6 802496e: 3b30 subs r3, #48 ; 0x30 8024970: f7ff ff8e bl 8024890 <__multadd> 8024974: 42a5 cmp r5, r4 8024976: 4601 mov r1, r0 8024978: d1f5 bne.n 8024966 <__s2b+0x4e> 802497a: eb09 0408 add.w r4, r9, r8 802497e: 3c08 subs r4, #8 8024980: 4547 cmp r7, r8 8024982: dd0c ble.n 802499e <__s2b+0x86> 8024984: ebc8 0707 rsb r7, r8, r7 8024988: 19e7 adds r7, r4, r7 802498a: f814 3b01 ldrb.w r3, [r4], #1 802498e: 220a movs r2, #10 8024990: 4630 mov r0, r6 8024992: 3b30 subs r3, #48 ; 0x30 8024994: f7ff ff7c bl 8024890 <__multadd> 8024998: 42bc cmp r4, r7 802499a: 4601 mov r1, r0 802499c: d1f5 bne.n 802498a <__s2b+0x72> 802499e: 4608 mov r0, r1 80249a0: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 80249a4: 340a adds r4, #10 80249a6: f04f 0809 mov.w r8, #9 80249aa: e7e9 b.n 8024980 <__s2b+0x68> 80249ac: 2100 movs r1, #0 80249ae: e7cb b.n 8024948 <__s2b+0x30> 080249b0 <__hi0bits>: 80249b0: 4603 mov r3, r0 80249b2: 2000 movs r0, #0 80249b4: 0c1a lsrs r2, r3, #16 80249b6: d101 bne.n 80249bc <__hi0bits+0xc> 80249b8: 041b lsls r3, r3, #16 80249ba: 2010 movs r0, #16 80249bc: f013 4f7f tst.w r3, #4278190080 ; 0xff000000 80249c0: d101 bne.n 80249c6 <__hi0bits+0x16> 80249c2: 3008 adds r0, #8 80249c4: 021b lsls r3, r3, #8 80249c6: f013 4f70 tst.w r3, #4026531840 ; 0xf0000000 80249ca: d101 bne.n 80249d0 <__hi0bits+0x20> 80249cc: 3004 adds r0, #4 80249ce: 011b lsls r3, r3, #4 80249d0: f013 4f40 tst.w r3, #3221225472 ; 0xc0000000 80249d4: d101 bne.n 80249da <__hi0bits+0x2a> 80249d6: 3002 adds r0, #2 80249d8: 009b lsls r3, r3, #2 80249da: 2b00 cmp r3, #0 80249dc: db02 blt.n 80249e4 <__hi0bits+0x34> 80249de: 005b lsls r3, r3, #1 80249e0: d401 bmi.n 80249e6 <__hi0bits+0x36> 80249e2: 2020 movs r0, #32 80249e4: 4770 bx lr 80249e6: 3001 adds r0, #1 80249e8: 4770 bx lr 80249ea: bf00 nop 080249ec <__lo0bits>: 80249ec: 6803 ldr r3, [r0, #0] 80249ee: 4602 mov r2, r0 80249f0: f013 0007 ands.w r0, r3, #7 80249f4: d007 beq.n 8024a06 <__lo0bits+0x1a> 80249f6: 07d9 lsls r1, r3, #31 80249f8: d41f bmi.n 8024a3a <__lo0bits+0x4e> 80249fa: 0798 lsls r0, r3, #30 80249fc: d41f bmi.n 8024a3e <__lo0bits+0x52> 80249fe: 089b lsrs r3, r3, #2 8024a00: 2002 movs r0, #2 8024a02: 6013 str r3, [r2, #0] 8024a04: 4770 bx lr 8024a06: b299 uxth r1, r3 8024a08: b909 cbnz r1, 8024a0e <__lo0bits+0x22> 8024a0a: 0c1b lsrs r3, r3, #16 8024a0c: 2010 movs r0, #16 8024a0e: f013 0fff tst.w r3, #255 ; 0xff 8024a12: d101 bne.n 8024a18 <__lo0bits+0x2c> 8024a14: 3008 adds r0, #8 8024a16: 0a1b lsrs r3, r3, #8 8024a18: 0719 lsls r1, r3, #28 8024a1a: d101 bne.n 8024a20 <__lo0bits+0x34> 8024a1c: 3004 adds r0, #4 8024a1e: 091b lsrs r3, r3, #4 8024a20: 0799 lsls r1, r3, #30 8024a22: d101 bne.n 8024a28 <__lo0bits+0x3c> 8024a24: 3002 adds r0, #2 8024a26: 089b lsrs r3, r3, #2 8024a28: 07d9 lsls r1, r3, #31 8024a2a: d404 bmi.n 8024a36 <__lo0bits+0x4a> 8024a2c: 085b lsrs r3, r3, #1 8024a2e: d101 bne.n 8024a34 <__lo0bits+0x48> 8024a30: 2020 movs r0, #32 8024a32: 4770 bx lr 8024a34: 3001 adds r0, #1 8024a36: 6013 str r3, [r2, #0] 8024a38: 4770 bx lr 8024a3a: 2000 movs r0, #0 8024a3c: 4770 bx lr 8024a3e: 085b lsrs r3, r3, #1 8024a40: 2001 movs r0, #1 8024a42: 6013 str r3, [r2, #0] 8024a44: 4770 bx lr 8024a46: bf00 nop 08024a48 <__i2b>: 8024a48: b510 push {r4, lr} 8024a4a: 460c mov r4, r1 8024a4c: 2101 movs r1, #1 8024a4e: f7ff fecd bl 80247ec <_Balloc> 8024a52: 2201 movs r2, #1 8024a54: 6144 str r4, [r0, #20] 8024a56: 6102 str r2, [r0, #16] 8024a58: bd10 pop {r4, pc} 8024a5a: bf00 nop 08024a5c <__multiply>: 8024a5c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8024a60: 460c mov r4, r1 8024a62: 690e ldr r6, [r1, #16] 8024a64: b085 sub sp, #20 8024a66: 6915 ldr r5, [r2, #16] 8024a68: 4617 mov r7, r2 8024a6a: 42ae cmp r6, r5 8024a6c: da04 bge.n 8024a78 <__multiply+0x1c> 8024a6e: 4632 mov r2, r6 8024a70: 463c mov r4, r7 8024a72: 462e mov r6, r5 8024a74: 460f mov r7, r1 8024a76: 4615 mov r5, r2 8024a78: 68a3 ldr r3, [r4, #8] 8024a7a: eb06 0805 add.w r8, r6, r5 8024a7e: 6861 ldr r1, [r4, #4] 8024a80: 4598 cmp r8, r3 8024a82: bfc8 it gt 8024a84: 3101 addgt r1, #1 8024a86: f7ff feb1 bl 80247ec <_Balloc> 8024a8a: eb00 0988 add.w r9, r0, r8, lsl #2 8024a8e: f100 0314 add.w r3, r0, #20 8024a92: f109 0914 add.w r9, r9, #20 8024a96: 9001 str r0, [sp, #4] 8024a98: 2000 movs r0, #0 8024a9a: 454b cmp r3, r9 8024a9c: d203 bcs.n 8024aa6 <__multiply+0x4a> 8024a9e: f843 0b04 str.w r0, [r3], #4 8024aa2: 4599 cmp r9, r3 8024aa4: d8fb bhi.n 8024a9e <__multiply+0x42> 8024aa6: eb07 0585 add.w r5, r7, r5, lsl #2 8024aaa: eb04 0686 add.w r6, r4, r6, lsl #2 8024aae: 3714 adds r7, #20 8024ab0: 3514 adds r5, #20 8024ab2: 3414 adds r4, #20 8024ab4: 3614 adds r6, #20 8024ab6: 42af cmp r7, r5 8024ab8: d257 bcs.n 8024b6a <__multiply+0x10e> 8024aba: 9a01 ldr r2, [sp, #4] 8024abc: f8cd 9008 str.w r9, [sp, #8] 8024ac0: 46a9 mov r9, r5 8024ac2: f8cd 800c str.w r8, [sp, #12] 8024ac6: f102 0c18 add.w ip, r2, #24 8024aca: 46a0 mov r8, r4 8024acc: f857 4b04 ldr.w r4, [r7], #4 8024ad0: b2a0 uxth r0, r4 8024ad2: b1f0 cbz r0, 8024b12 <__multiply+0xb6> 8024ad4: 4642 mov r2, r8 8024ad6: f1ac 0304 sub.w r3, ip, #4 8024ada: 2400 movs r4, #0 8024adc: f852 1b04 ldr.w r1, [r2], #4 8024ae0: 681d ldr r5, [r3, #0] 8024ae2: fa1f fa81 uxth.w sl, r1 8024ae6: 0c09 lsrs r1, r1, #16 8024ae8: fa1f fb85 uxth.w fp, r5 8024aec: 0c2d lsrs r5, r5, #16 8024aee: fb00 ba0a mla sl, r0, sl, fp 8024af2: fb00 5101 mla r1, r0, r1, r5 8024af6: 4454 add r4, sl 8024af8: eb01 4114 add.w r1, r1, r4, lsr #16 8024afc: b2a4 uxth r4, r4 8024afe: ea44 4501 orr.w r5, r4, r1, lsl #16 8024b02: 0c0c lsrs r4, r1, #16 8024b04: 4296 cmp r6, r2 8024b06: f843 5b04 str.w r5, [r3], #4 8024b0a: d8e7 bhi.n 8024adc <__multiply+0x80> 8024b0c: 601c str r4, [r3, #0] 8024b0e: f857 4c04 ldr.w r4, [r7, #-4] 8024b12: 0c24 lsrs r4, r4, #16 8024b14: d021 beq.n 8024b5a <__multiply+0xfe> 8024b16: f85c 1c04 ldr.w r1, [ip, #-4] 8024b1a: 4642 mov r2, r8 8024b1c: 4663 mov r3, ip 8024b1e: 2500 movs r5, #0 8024b20: 4608 mov r0, r1 8024b22: f8b2 a000 ldrh.w sl, [r2] 8024b26: 0c00 lsrs r0, r0, #16 8024b28: b289 uxth r1, r1 8024b2a: 469b mov fp, r3 8024b2c: fb04 000a mla r0, r4, sl, r0 8024b30: 1945 adds r5, r0, r5 8024b32: ea41 4105 orr.w r1, r1, r5, lsl #16 8024b36: f843 1c04 str.w r1, [r3, #-4] 8024b3a: f853 0b04 ldr.w r0, [r3], #4 8024b3e: f852 1b04 ldr.w r1, [r2], #4 8024b42: fa1f fa80 uxth.w sl, r0 8024b46: 0c09 lsrs r1, r1, #16 8024b48: fb04 a101 mla r1, r4, r1, sl 8024b4c: eb01 4115 add.w r1, r1, r5, lsr #16 8024b50: 0c0d lsrs r5, r1, #16 8024b52: 4296 cmp r6, r2 8024b54: d8e5 bhi.n 8024b22 <__multiply+0xc6> 8024b56: f8cb 1000 str.w r1, [fp] 8024b5a: 45b9 cmp r9, r7 8024b5c: f10c 0c04 add.w ip, ip, #4 8024b60: d8b4 bhi.n 8024acc <__multiply+0x70> 8024b62: f8dd 9008 ldr.w r9, [sp, #8] 8024b66: f8dd 800c ldr.w r8, [sp, #12] 8024b6a: f1b8 0f00 cmp.w r8, #0 8024b6e: dd0b ble.n 8024b88 <__multiply+0x12c> 8024b70: f859 3c04 ldr.w r3, [r9, #-4] 8024b74: f1a9 0904 sub.w r9, r9, #4 8024b78: b11b cbz r3, 8024b82 <__multiply+0x126> 8024b7a: e005 b.n 8024b88 <__multiply+0x12c> 8024b7c: f859 3d04 ldr.w r3, [r9, #-4]! 8024b80: b913 cbnz r3, 8024b88 <__multiply+0x12c> 8024b82: f1b8 0801 subs.w r8, r8, #1 8024b86: d1f9 bne.n 8024b7c <__multiply+0x120> 8024b88: 9b01 ldr r3, [sp, #4] 8024b8a: 4618 mov r0, r3 8024b8c: f8c3 8010 str.w r8, [r3, #16] 8024b90: b005 add sp, #20 8024b92: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8024b96: bf00 nop 08024b98 <__pow5mult>: 8024b98: f012 0303 ands.w r3, r2, #3 8024b9c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8024ba0: 4614 mov r4, r2 8024ba2: 4680 mov r8, r0 8024ba4: 460f mov r7, r1 8024ba6: d128 bne.n 8024bfa <__pow5mult+0x62> 8024ba8: 10a4 asrs r4, r4, #2 8024baa: d01a beq.n 8024be2 <__pow5mult+0x4a> 8024bac: f8d8 5024 ldr.w r5, [r8, #36] ; 0x24 8024bb0: 2d00 cmp r5, #0 8024bb2: d02e beq.n 8024c12 <__pow5mult+0x7a> 8024bb4: 68ae ldr r6, [r5, #8] 8024bb6: b92e cbnz r6, 8024bc4 <__pow5mult+0x2c> 8024bb8: e036 b.n 8024c28 <__pow5mult+0x90> 8024bba: 1064 asrs r4, r4, #1 8024bbc: d011 beq.n 8024be2 <__pow5mult+0x4a> 8024bbe: 6835 ldr r5, [r6, #0] 8024bc0: b195 cbz r5, 8024be8 <__pow5mult+0x50> 8024bc2: 462e mov r6, r5 8024bc4: 07e0 lsls r0, r4, #31 8024bc6: d5f8 bpl.n 8024bba <__pow5mult+0x22> 8024bc8: 4639 mov r1, r7 8024bca: 4632 mov r2, r6 8024bcc: 4640 mov r0, r8 8024bce: f7ff ff45 bl 8024a5c <__multiply> 8024bd2: 4639 mov r1, r7 8024bd4: 4605 mov r5, r0 8024bd6: 4640 mov r0, r8 8024bd8: f7ff fe3e bl 8024858 <_Bfree> 8024bdc: 1064 asrs r4, r4, #1 8024bde: 462f mov r7, r5 8024be0: d1ed bne.n 8024bbe <__pow5mult+0x26> 8024be2: 4638 mov r0, r7 8024be4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8024be8: 4631 mov r1, r6 8024bea: 4632 mov r2, r6 8024bec: 4640 mov r0, r8 8024bee: f7ff ff35 bl 8024a5c <__multiply> 8024bf2: 6030 str r0, [r6, #0] 8024bf4: 4606 mov r6, r0 8024bf6: 6005 str r5, [r0, #0] 8024bf8: e7e4 b.n 8024bc4 <__pow5mult+0x2c> 8024bfa: f249 52f0 movw r2, #38384 ; 0x95f0 8024bfe: 1e5d subs r5, r3, #1 8024c00: f6c0 0203 movt r2, #2051 ; 0x803 8024c04: 2300 movs r3, #0 8024c06: f852 2025 ldr.w r2, [r2, r5, lsl #2] 8024c0a: f7ff fe41 bl 8024890 <__multadd> 8024c0e: 4607 mov r7, r0 8024c10: e7ca b.n 8024ba8 <__pow5mult+0x10> 8024c12: 2010 movs r0, #16 8024c14: f7ff fac0 bl 8024198 8024c18: 2300 movs r3, #0 8024c1a: 4605 mov r5, r0 8024c1c: f8c8 0024 str.w r0, [r8, #36] ; 0x24 8024c20: 6043 str r3, [r0, #4] 8024c22: 6083 str r3, [r0, #8] 8024c24: 6003 str r3, [r0, #0] 8024c26: 60c3 str r3, [r0, #12] 8024c28: 4640 mov r0, r8 8024c2a: f240 2171 movw r1, #625 ; 0x271 8024c2e: f7ff ff0b bl 8024a48 <__i2b> 8024c32: 2300 movs r3, #0 8024c34: 60a8 str r0, [r5, #8] 8024c36: 4606 mov r6, r0 8024c38: 6003 str r3, [r0, #0] 8024c3a: e7c3 b.n 8024bc4 <__pow5mult+0x2c> 08024c3c <__lshift>: 8024c3c: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8024c40: 4693 mov fp, r2 8024c42: 690a ldr r2, [r1, #16] 8024c44: 460f mov r7, r1 8024c46: ea4f 156b mov.w r5, fp, asr #5 8024c4a: 688b ldr r3, [r1, #8] 8024c4c: eb05 0a02 add.w sl, r5, r2 8024c50: 4681 mov r9, r0 8024c52: f10a 0601 add.w r6, sl, #1 8024c56: 6849 ldr r1, [r1, #4] 8024c58: 429e cmp r6, r3 8024c5a: dd03 ble.n 8024c64 <__lshift+0x28> 8024c5c: 005b lsls r3, r3, #1 8024c5e: 3101 adds r1, #1 8024c60: 429e cmp r6, r3 8024c62: dcfb bgt.n 8024c5c <__lshift+0x20> 8024c64: 4648 mov r0, r9 8024c66: f7ff fdc1 bl 80247ec <_Balloc> 8024c6a: 2d00 cmp r5, #0 8024c6c: 4680 mov r8, r0 8024c6e: f100 0414 add.w r4, r0, #20 8024c72: dd0a ble.n 8024c8a <__lshift+0x4e> 8024c74: 2300 movs r3, #0 8024c76: 461a mov r2, r3 8024c78: 3301 adds r3, #1 8024c7a: f844 2b04 str.w r2, [r4], #4 8024c7e: 42ab cmp r3, r5 8024c80: d1fa bne.n 8024c78 <__lshift+0x3c> 8024c82: eb08 0383 add.w r3, r8, r3, lsl #2 8024c86: f103 0414 add.w r4, r3, #20 8024c8a: 6938 ldr r0, [r7, #16] 8024c8c: f107 0514 add.w r5, r7, #20 8024c90: eb07 0080 add.w r0, r7, r0, lsl #2 8024c94: 3014 adds r0, #20 8024c96: f01b 0b1f ands.w fp, fp, #31 8024c9a: d01c beq.n 8024cd6 <__lshift+0x9a> 8024c9c: f1cb 0320 rsb r3, fp, #32 8024ca0: 2200 movs r2, #0 8024ca2: 6829 ldr r1, [r5, #0] 8024ca4: fa01 f10b lsl.w r1, r1, fp 8024ca8: 430a orrs r2, r1 8024caa: f844 2b04 str.w r2, [r4], #4 8024cae: f855 2b04 ldr.w r2, [r5], #4 8024cb2: 42a8 cmp r0, r5 8024cb4: fa22 f203 lsr.w r2, r2, r3 8024cb8: d8f3 bhi.n 8024ca2 <__lshift+0x66> 8024cba: 6022 str r2, [r4, #0] 8024cbc: b10a cbz r2, 8024cc2 <__lshift+0x86> 8024cbe: f10a 0602 add.w r6, sl, #2 8024cc2: 4648 mov r0, r9 8024cc4: 3e01 subs r6, #1 8024cc6: 4639 mov r1, r7 8024cc8: f8c8 6010 str.w r6, [r8, #16] 8024ccc: f7ff fdc4 bl 8024858 <_Bfree> 8024cd0: 4640 mov r0, r8 8024cd2: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8024cd6: f855 3b04 ldr.w r3, [r5], #4 8024cda: 42a8 cmp r0, r5 8024cdc: f844 3b04 str.w r3, [r4], #4 8024ce0: d9ef bls.n 8024cc2 <__lshift+0x86> 8024ce2: f855 3b04 ldr.w r3, [r5], #4 8024ce6: 42a8 cmp r0, r5 8024ce8: f844 3b04 str.w r3, [r4], #4 8024cec: d8f3 bhi.n 8024cd6 <__lshift+0x9a> 8024cee: e7e8 b.n 8024cc2 <__lshift+0x86> 08024cf0 <__mcmp>: 8024cf0: 4603 mov r3, r0 8024cf2: 690a ldr r2, [r1, #16] 8024cf4: 6900 ldr r0, [r0, #16] 8024cf6: b430 push {r4, r5} 8024cf8: 1a80 subs r0, r0, r2 8024cfa: d10f bne.n 8024d1c <__mcmp+0x2c> 8024cfc: 3204 adds r2, #4 8024cfe: f103 0514 add.w r5, r3, #20 8024d02: 0092 lsls r2, r2, #2 8024d04: 189b adds r3, r3, r2 8024d06: 1889 adds r1, r1, r2 8024d08: 3304 adds r3, #4 8024d0a: 3104 adds r1, #4 8024d0c: f853 2d04 ldr.w r2, [r3, #-4]! 8024d10: f851 4d04 ldr.w r4, [r1, #-4]! 8024d14: 42a2 cmp r2, r4 8024d16: d103 bne.n 8024d20 <__mcmp+0x30> 8024d18: 429d cmp r5, r3 8024d1a: d3f7 bcc.n 8024d0c <__mcmp+0x1c> 8024d1c: bc30 pop {r4, r5} 8024d1e: 4770 bx lr 8024d20: 4294 cmp r4, r2 8024d22: bf94 ite ls 8024d24: 2001 movls r0, #1 8024d26: f04f 30ff movhi.w r0, #4294967295 8024d2a: e7f7 b.n 8024d1c <__mcmp+0x2c> 08024d2c <__mdiff>: 8024d2c: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8024d30: 468b mov fp, r1 8024d32: 4604 mov r4, r0 8024d34: 4611 mov r1, r2 8024d36: 4658 mov r0, fp 8024d38: 4691 mov r9, r2 8024d3a: f7ff ffd9 bl 8024cf0 <__mcmp> 8024d3e: 1e05 subs r5, r0, #0 8024d40: d061 beq.n 8024e06 <__mdiff+0xda> 8024d42: bfbc itt lt 8024d44: 465b movlt r3, fp 8024d46: 46cb movlt fp, r9 8024d48: 4620 mov r0, r4 8024d4a: bfb8 it lt 8024d4c: 4699 movlt r9, r3 8024d4e: f8db 1004 ldr.w r1, [fp, #4] 8024d52: bfac ite ge 8024d54: f04f 0800 movge.w r8, #0 8024d58: f04f 0801 movlt.w r8, #1 8024d5c: f7ff fd46 bl 80247ec <_Balloc> 8024d60: f8db 7010 ldr.w r7, [fp, #16] 8024d64: f109 0514 add.w r5, r9, #20 8024d68: f8d9 3010 ldr.w r3, [r9, #16] 8024d6c: f10b 0614 add.w r6, fp, #20 8024d70: 2400 movs r4, #0 8024d72: eb0b 0c87 add.w ip, fp, r7, lsl #2 8024d76: eb09 0983 add.w r9, r9, r3, lsl #2 8024d7a: f10c 0c14 add.w ip, ip, #20 8024d7e: f109 0914 add.w r9, r9, #20 8024d82: f100 0a14 add.w sl, r0, #20 8024d86: f8c0 800c str.w r8, [r0, #12] 8024d8a: f856 8b04 ldr.w r8, [r6], #4 8024d8e: 4653 mov r3, sl 8024d90: f855 ab04 ldr.w sl, [r5], #4 8024d94: 4632 mov r2, r6 8024d96: fa1f f188 uxth.w r1, r8 8024d9a: 1909 adds r1, r1, r4 8024d9c: fa1f fb8a uxth.w fp, sl 8024da0: ebcb 0101 rsb r1, fp, r1 8024da4: ea4f 441a mov.w r4, sl, lsr #16 8024da8: ebc4 4418 rsb r4, r4, r8, lsr #16 8024dac: eb04 4421 add.w r4, r4, r1, asr #16 8024db0: b289 uxth r1, r1 8024db2: ea41 4104 orr.w r1, r1, r4, lsl #16 8024db6: 1424 asrs r4, r4, #16 8024db8: 45a9 cmp r9, r5 8024dba: f843 1b04 str.w r1, [r3], #4 8024dbe: 469a mov sl, r3 8024dc0: d8e3 bhi.n 8024d8a <__mdiff+0x5e> 8024dc2: 45b4 cmp ip, r6 8024dc4: 4698 mov r8, r3 8024dc6: d914 bls.n 8024df2 <__mdiff+0xc6> 8024dc8: f852 5b04 ldr.w r5, [r2], #4 8024dcc: b2a9 uxth r1, r5 8024dce: 0c2d lsrs r5, r5, #16 8024dd0: 190c adds r4, r1, r4 8024dd2: eb05 4524 add.w r5, r5, r4, asr #16 8024dd6: b2a4 uxth r4, r4 8024dd8: ea44 4105 orr.w r1, r4, r5, lsl #16 8024ddc: 142c asrs r4, r5, #16 8024dde: 4594 cmp ip, r2 8024de0: f843 1b04 str.w r1, [r3], #4 8024de4: d8f0 bhi.n 8024dc8 <__mdiff+0x9c> 8024de6: 43f3 mvns r3, r6 8024de8: 4463 add r3, ip 8024dea: f023 0303 bic.w r3, r3, #3 8024dee: 3304 adds r3, #4 8024df0: 4443 add r3, r8 8024df2: 3b04 subs r3, #4 8024df4: b921 cbnz r1, 8024e00 <__mdiff+0xd4> 8024df6: f853 2d04 ldr.w r2, [r3, #-4]! 8024dfa: 3f01 subs r7, #1 8024dfc: 2a00 cmp r2, #0 8024dfe: d0fa beq.n 8024df6 <__mdiff+0xca> 8024e00: 6107 str r7, [r0, #16] 8024e02: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8024e06: 4620 mov r0, r4 8024e08: 4629 mov r1, r5 8024e0a: f7ff fcef bl 80247ec <_Balloc> 8024e0e: 2301 movs r3, #1 8024e10: 6145 str r5, [r0, #20] 8024e12: 6103 str r3, [r0, #16] 8024e14: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 08024e18 <__ulp>: 8024e18: 2300 movs r3, #0 8024e1a: f6c7 73f0 movt r3, #32752 ; 0x7ff0 8024e1e: 400b ands r3, r1 8024e20: f1a3 7350 sub.w r3, r3, #54525952 ; 0x3400000 8024e24: 2b00 cmp r3, #0 8024e26: dd02 ble.n 8024e2e <__ulp+0x16> 8024e28: 4619 mov r1, r3 8024e2a: 2000 movs r0, #0 8024e2c: 4770 bx lr 8024e2e: 425b negs r3, r3 8024e30: 2100 movs r1, #0 8024e32: 151b asrs r3, r3, #20 8024e34: 2b13 cmp r3, #19 8024e36: dd0b ble.n 8024e50 <__ulp+0x38> 8024e38: 2b32 cmp r3, #50 ; 0x32 8024e3a: dd02 ble.n 8024e42 <__ulp+0x2a> 8024e3c: 2301 movs r3, #1 8024e3e: 4618 mov r0, r3 8024e40: 4770 bx lr 8024e42: 2201 movs r2, #1 8024e44: f1c3 0333 rsb r3, r3, #51 ; 0x33 8024e48: fa02 f303 lsl.w r3, r2, r3 8024e4c: 4618 mov r0, r3 8024e4e: 4770 bx lr 8024e50: f44f 2200 mov.w r2, #524288 ; 0x80000 8024e54: 2000 movs r0, #0 8024e56: fa42 f103 asr.w r1, r2, r3 8024e5a: 4770 bx lr 08024e5c <__b2d>: 8024e5c: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 8024e60: f100 0814 add.w r8, r0, #20 8024e64: 6906 ldr r6, [r0, #16] 8024e66: 4689 mov r9, r1 8024e68: 3604 adds r6, #4 8024e6a: eb00 0686 add.w r6, r0, r6, lsl #2 8024e6e: 4634 mov r4, r6 8024e70: 4637 mov r7, r6 8024e72: f854 5b04 ldr.w r5, [r4], #4 8024e76: 4628 mov r0, r5 8024e78: f7ff fd9a bl 80249b0 <__hi0bits> 8024e7c: 280a cmp r0, #10 8024e7e: f1c0 0320 rsb r3, r0, #32 8024e82: f8c9 3000 str.w r3, [r9] 8024e86: dc18 bgt.n 8024eba <__b2d+0x5e> 8024e88: 45b0 cmp r8, r6 8024e8a: f1c0 010b rsb r1, r0, #11 8024e8e: fa25 f701 lsr.w r7, r5, r1 8024e92: bf38 it cc 8024e94: f854 4c08 ldrcc.w r4, [r4, #-8] 8024e98: f047 577f orr.w r7, r7, #1069547520 ; 0x3fc00000 8024e9c: f447 1340 orr.w r3, r7, #3145728 ; 0x300000 8024ea0: bf34 ite cc 8024ea2: fa24 f101 lsrcc.w r1, r4, r1 8024ea6: 2100 movcs r1, #0 8024ea8: 3015 adds r0, #21 8024eaa: fa05 f500 lsl.w r5, r5, r0 8024eae: ea41 0205 orr.w r2, r1, r5 8024eb2: 4610 mov r0, r2 8024eb4: 4619 mov r1, r3 8024eb6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8024eba: 2100 movs r1, #0 8024ebc: 45b0 cmp r8, r6 8024ebe: d202 bcs.n 8024ec6 <__b2d+0x6a> 8024ec0: f854 1c08 ldr.w r1, [r4, #-8] 8024ec4: 1f37 subs r7, r6, #4 8024ec6: f1b0 040b subs.w r4, r0, #11 8024eca: d018 beq.n 8024efe <__b2d+0xa2> 8024ecc: fa05 f504 lsl.w r5, r5, r4 8024ed0: f1c0 002b rsb r0, r0, #43 ; 0x2b 8024ed4: 4547 cmp r7, r8 8024ed6: f045 557f orr.w r5, r5, #1069547520 ; 0x3fc00000 8024eda: fa21 f600 lsr.w r6, r1, r0 8024ede: f445 1540 orr.w r5, r5, #3145728 ; 0x300000 8024ee2: ea45 0306 orr.w r3, r5, r6 8024ee6: bf88 it hi 8024ee8: f857 5c04 ldrhi.w r5, [r7, #-4] 8024eec: fa01 f104 lsl.w r1, r1, r4 8024ef0: bf8c ite hi 8024ef2: fa25 f000 lsrhi.w r0, r5, r0 8024ef6: 2000 movls r0, #0 8024ef8: ea40 0201 orr.w r2, r0, r1 8024efc: e7d9 b.n 8024eb2 <__b2d+0x56> 8024efe: f045 557f orr.w r5, r5, #1069547520 ; 0x3fc00000 8024f02: 460a mov r2, r1 8024f04: f445 1340 orr.w r3, r5, #3145728 ; 0x300000 8024f08: e7d3 b.n 8024eb2 <__b2d+0x56> 8024f0a: bf00 nop 08024f0c <__d2b>: 8024f0c: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 8024f10: b083 sub sp, #12 8024f12: 2101 movs r1, #1 8024f14: 461d mov r5, r3 8024f16: 4614 mov r4, r2 8024f18: 9f0a ldr r7, [sp, #40] ; 0x28 8024f1a: f7ff fc67 bl 80247ec <_Balloc> 8024f1e: f3c5 560a ubfx r6, r5, #20, #11 8024f22: f025 437f bic.w r3, r5, #4278190080 ; 0xff000000 8024f26: 46a9 mov r9, r5 8024f28: f423 0370 bic.w r3, r3, #15728640 ; 0xf00000 8024f2c: 4680 mov r8, r0 8024f2e: b10e cbz r6, 8024f34 <__d2b+0x28> 8024f30: f443 1380 orr.w r3, r3, #1048576 ; 0x100000 8024f34: 9301 str r3, [sp, #4] 8024f36: 2c00 cmp r4, #0 8024f38: d024 beq.n 8024f84 <__d2b+0x78> 8024f3a: a802 add r0, sp, #8 8024f3c: f840 4d08 str.w r4, [r0, #-8]! 8024f40: 4668 mov r0, sp 8024f42: f7ff fd53 bl 80249ec <__lo0bits> 8024f46: 9b01 ldr r3, [sp, #4] 8024f48: 2800 cmp r0, #0 8024f4a: d131 bne.n 8024fb0 <__d2b+0xa4> 8024f4c: 9a00 ldr r2, [sp, #0] 8024f4e: f8c8 2014 str.w r2, [r8, #20] 8024f52: 2b00 cmp r3, #0 8024f54: bf0c ite eq 8024f56: 2401 moveq r4, #1 8024f58: 2402 movne r4, #2 8024f5a: f8c8 3018 str.w r3, [r8, #24] 8024f5e: f8c8 4010 str.w r4, [r8, #16] 8024f62: b9e6 cbnz r6, 8024f9e <__d2b+0x92> 8024f64: eb08 0384 add.w r3, r8, r4, lsl #2 8024f68: f2a0 4032 subw r0, r0, #1074 ; 0x432 8024f6c: 6038 str r0, [r7, #0] 8024f6e: 6918 ldr r0, [r3, #16] 8024f70: f7ff fd1e bl 80249b0 <__hi0bits> 8024f74: 9b0b ldr r3, [sp, #44] ; 0x2c 8024f76: ebc0 1044 rsb r0, r0, r4, lsl #5 8024f7a: 6018 str r0, [r3, #0] 8024f7c: 4640 mov r0, r8 8024f7e: b003 add sp, #12 8024f80: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 8024f84: a801 add r0, sp, #4 8024f86: f7ff fd31 bl 80249ec <__lo0bits> 8024f8a: 2301 movs r3, #1 8024f8c: 461c mov r4, r3 8024f8e: f8c8 3010 str.w r3, [r8, #16] 8024f92: 9b01 ldr r3, [sp, #4] 8024f94: f8c8 3014 str.w r3, [r8, #20] 8024f98: 3020 adds r0, #32 8024f9a: 2e00 cmp r6, #0 8024f9c: d0e2 beq.n 8024f64 <__d2b+0x58> 8024f9e: 9a0b ldr r2, [sp, #44] ; 0x2c 8024fa0: f2a6 4933 subw r9, r6, #1075 ; 0x433 8024fa4: f1c0 0335 rsb r3, r0, #53 ; 0x35 8024fa8: 4448 add r0, r9 8024faa: 6038 str r0, [r7, #0] 8024fac: 6013 str r3, [r2, #0] 8024fae: e7e5 b.n 8024f7c <__d2b+0x70> 8024fb0: f1c0 0120 rsb r1, r0, #32 8024fb4: 9a00 ldr r2, [sp, #0] 8024fb6: fa03 f101 lsl.w r1, r3, r1 8024fba: fa23 f300 lsr.w r3, r3, r0 8024fbe: 430a orrs r2, r1 8024fc0: 9301 str r3, [sp, #4] 8024fc2: f8c8 2014 str.w r2, [r8, #20] 8024fc6: e7c4 b.n 8024f52 <__d2b+0x46> 08024fc8 <__ratio>: 8024fc8: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 8024fcc: b083 sub sp, #12 8024fce: 4688 mov r8, r1 8024fd0: 4669 mov r1, sp 8024fd2: 4606 mov r6, r0 8024fd4: f7ff ff42 bl 8024e5c <__b2d> 8024fd8: 460d mov r5, r1 8024fda: 4604 mov r4, r0 8024fdc: a901 add r1, sp, #4 8024fde: 4640 mov r0, r8 8024fe0: f7ff ff3c bl 8024e5c <__b2d> 8024fe4: 462f mov r7, r5 8024fe6: 460b mov r3, r1 8024fe8: 4602 mov r2, r0 8024fea: f8d8 1010 ldr.w r1, [r8, #16] 8024fee: 4699 mov r9, r3 8024ff0: 6930 ldr r0, [r6, #16] 8024ff2: 4626 mov r6, r4 8024ff4: 4690 mov r8, r2 8024ff6: ebc1 0e00 rsb lr, r1, r0 8024ffa: e89d 0003 ldmia.w sp, {r0, r1} 8024ffe: 1a40 subs r0, r0, r1 8025000: eb00 114e add.w r1, r0, lr, lsl #5 8025004: 2900 cmp r1, #0 8025006: bfc9 itett gt 8025008: eb05 5701 addgt.w r7, r5, r1, lsl #20 802500c: eba3 5901 suble.w r9, r3, r1, lsl #20 8025010: 4624 movgt r4, r4 8025012: 463d movgt r5, r7 8025014: bfdc itt le 8025016: 4612 movle r2, r2 8025018: 464b movle r3, r9 802501a: 4620 mov r0, r4 802501c: 4629 mov r1, r5 802501e: f7fb fbf9 bl 8020814 <__aeabi_ddiv> 8025022: b003 add sp, #12 8025024: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 08025028 <_mprec_log10>: 8025028: 2817 cmp r0, #23 802502a: b510 push {r4, lr} 802502c: 4604 mov r4, r0 802502e: dd0c ble.n 802504a <_mprec_log10+0x22> 8025030: 2100 movs r1, #0 8025032: 2000 movs r0, #0 8025034: f6c3 71f0 movt r1, #16368 ; 0x3ff0 8025038: 2300 movs r3, #0 802503a: 2200 movs r2, #0 802503c: f2c4 0324 movt r3, #16420 ; 0x4024 8025040: f7fb fabe bl 80205c0 <__aeabi_dmul> 8025044: 3c01 subs r4, #1 8025046: d1f7 bne.n 8025038 <_mprec_log10+0x10> 8025048: bd10 pop {r4, pc} 802504a: f249 53f0 movw r3, #38384 ; 0x95f0 802504e: f6c0 0303 movt r3, #2051 ; 0x803 8025052: eb03 03c0 add.w r3, r3, r0, lsl #3 8025056: e9d3 0104 ldrd r0, r1, [r3, #16] 802505a: bd10 pop {r4, pc} 0802505c <__copybits>: 802505c: b470 push {r4, r5, r6} 802505e: 3901 subs r1, #1 8025060: 6915 ldr r5, [r2, #16] 8025062: f102 0314 add.w r3, r2, #20 8025066: 114e asrs r6, r1, #5 8025068: 3601 adds r6, #1 802506a: eb02 0585 add.w r5, r2, r5, lsl #2 802506e: 3514 adds r5, #20 8025070: eb00 0686 add.w r6, r0, r6, lsl #2 8025074: 42ab cmp r3, r5 8025076: d20c bcs.n 8025092 <__copybits+0x36> 8025078: 4601 mov r1, r0 802507a: f853 4b04 ldr.w r4, [r3], #4 802507e: 429d cmp r5, r3 8025080: f841 4b04 str.w r4, [r1], #4 8025084: d8f9 bhi.n 802507a <__copybits+0x1e> 8025086: 1aab subs r3, r5, r2 8025088: 3b15 subs r3, #21 802508a: f023 0303 bic.w r3, r3, #3 802508e: 3304 adds r3, #4 8025090: 18c0 adds r0, r0, r3 8025092: 4286 cmp r6, r0 8025094: d904 bls.n 80250a0 <__copybits+0x44> 8025096: 2300 movs r3, #0 8025098: f840 3b04 str.w r3, [r0], #4 802509c: 4286 cmp r6, r0 802509e: d8fb bhi.n 8025098 <__copybits+0x3c> 80250a0: bc70 pop {r4, r5, r6} 80250a2: 4770 bx lr 080250a4 <__any_on>: 80250a4: b430 push {r4, r5} 80250a6: 114b asrs r3, r1, #5 80250a8: 6904 ldr r4, [r0, #16] 80250aa: f100 0214 add.w r2, r0, #20 80250ae: 429c cmp r4, r3 80250b0: bfb8 it lt 80250b2: 4623 movlt r3, r4 80250b4: db00 blt.n 80250b8 <__any_on+0x14> 80250b6: dc11 bgt.n 80250dc <__any_on+0x38> 80250b8: 3304 adds r3, #4 80250ba: eb00 0083 add.w r0, r0, r3, lsl #2 80250be: 1d03 adds r3, r0, #4 80250c0: 429a cmp r2, r3 80250c2: d218 bcs.n 80250f6 <__any_on+0x52> 80250c4: f853 3c04 ldr.w r3, [r3, #-4] 80250c8: b92b cbnz r3, 80250d6 <__any_on+0x32> 80250ca: 4282 cmp r2, r0 80250cc: d213 bcs.n 80250f6 <__any_on+0x52> 80250ce: f850 3d04 ldr.w r3, [r0, #-4]! 80250d2: 2b00 cmp r3, #0 80250d4: d0f9 beq.n 80250ca <__any_on+0x26> 80250d6: 2001 movs r0, #1 80250d8: bc30 pop {r4, r5} 80250da: 4770 bx lr 80250dc: f011 011f ands.w r1, r1, #31 80250e0: d0ea beq.n 80250b8 <__any_on+0x14> 80250e2: eb00 0483 add.w r4, r0, r3, lsl #2 80250e6: 6964 ldr r4, [r4, #20] 80250e8: fa24 f501 lsr.w r5, r4, r1 80250ec: fa05 f101 lsl.w r1, r5, r1 80250f0: 42a1 cmp r1, r4 80250f2: d1f0 bne.n 80250d6 <__any_on+0x32> 80250f4: e7e0 b.n 80250b8 <__any_on+0x14> 80250f6: 2000 movs r0, #0 80250f8: e7ee b.n 80250d8 <__any_on+0x34> 80250fa: bf00 nop 080250fc <_sbrk_r>: 80250fc: b538 push {r3, r4, r5, lr} 80250fe: f643 1444 movw r4, #14660 ; 0x3944 8025102: f2c2 0401 movt r4, #8193 ; 0x2001 8025106: 4605 mov r5, r0 8025108: 4608 mov r0, r1 802510a: 2300 movs r3, #0 802510c: 6023 str r3, [r4, #0] 802510e: f014 f993 bl 8039438 <_sbrk> 8025112: 1c43 adds r3, r0, #1 8025114: d000 beq.n 8025118 <_sbrk_r+0x1c> 8025116: bd38 pop {r3, r4, r5, pc} 8025118: 6823 ldr r3, [r4, #0] 802511a: 2b00 cmp r3, #0 802511c: d0fb beq.n 8025116 <_sbrk_r+0x1a> 802511e: 602b str r3, [r5, #0] 8025120: bd38 pop {r3, r4, r5, pc} 8025122: bf00 nop 08025124 : 8025124: b2c9 uxtb r1, r1 8025126: b4f0 push {r4, r5, r6, r7} 8025128: 2900 cmp r1, #0 802512a: d04b beq.n 80251c4 802512c: 0783 lsls r3, r0, #30 802512e: d00f beq.n 8025150 8025130: 7803 ldrb r3, [r0, #0] 8025132: 2b00 cmp r3, #0 8025134: d073 beq.n 802521e 8025136: 4299 cmp r1, r3 8025138: d042 beq.n 80251c0 802513a: 1c43 adds r3, r0, #1 802513c: e005 b.n 802514a 802513e: f813 2b01 ldrb.w r2, [r3], #1 8025142: 2a00 cmp r2, #0 8025144: d03b beq.n 80251be 8025146: 4291 cmp r1, r2 8025148: d03a beq.n 80251c0 802514a: 079a lsls r2, r3, #30 802514c: 4618 mov r0, r3 802514e: d1f6 bne.n 802513e 8025150: 6803 ldr r3, [r0, #0] 8025152: ea41 2701 orr.w r7, r1, r1, lsl #8 8025156: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 802515a: ea47 4707 orr.w r7, r7, r7, lsl #16 802515e: ea22 0203 bic.w r2, r2, r3 8025162: f012 3f80 tst.w r2, #2155905152 ; 0x80808080 8025166: d11c bne.n 80251a2 8025168: 407b eors r3, r7 802516a: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 802516e: ea22 0303 bic.w r3, r2, r3 8025172: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 8025176: d114 bne.n 80251a2 8025178: 1d02 adds r2, r0, #4 802517a: e002 b.n 8025182 802517c: f014 3f80 tst.w r4, #2155905152 ; 0x80808080 8025180: d10f bne.n 80251a2 8025182: 4610 mov r0, r2 8025184: f852 3b04 ldr.w r3, [r2], #4 8025188: f1a3 3601 sub.w r6, r3, #16843009 ; 0x1010101 802518c: ea87 0403 eor.w r4, r7, r3 8025190: ea26 0303 bic.w r3, r6, r3 8025194: f1a4 3501 sub.w r5, r4, #16843009 ; 0x1010101 8025198: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 802519c: ea25 0404 bic.w r4, r5, r4 80251a0: d0ec beq.n 802517c 80251a2: 7803 ldrb r3, [r0, #0] 80251a4: 2b00 cmp r3, #0 80251a6: d03a beq.n 802521e 80251a8: 4299 cmp r1, r3 80251aa: d009 beq.n 80251c0 80251ac: 1c43 adds r3, r0, #1 80251ae: e001 b.n 80251b4 80251b0: 4291 cmp r1, r2 80251b2: d005 beq.n 80251c0 80251b4: 4618 mov r0, r3 80251b6: f813 2b01 ldrb.w r2, [r3], #1 80251ba: 2a00 cmp r2, #0 80251bc: d1f8 bne.n 80251b0 80251be: 4610 mov r0, r2 80251c0: bcf0 pop {r4, r5, r6, r7} 80251c2: 4770 bx lr 80251c4: 0781 lsls r1, r0, #30 80251c6: d00d beq.n 80251e4 80251c8: 7803 ldrb r3, [r0, #0] 80251ca: 2b00 cmp r3, #0 80251cc: d0f8 beq.n 80251c0 80251ce: 1c43 adds r3, r0, #1 80251d0: e002 b.n 80251d8 80251d2: 7802 ldrb r2, [r0, #0] 80251d4: 2a00 cmp r2, #0 80251d6: d0f3 beq.n 80251c0 80251d8: f013 0f03 tst.w r3, #3 80251dc: 4618 mov r0, r3 80251de: f103 0301 add.w r3, r3, #1 80251e2: d1f6 bne.n 80251d2 80251e4: 6803 ldr r3, [r0, #0] 80251e6: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 80251ea: ea22 0303 bic.w r3, r2, r3 80251ee: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 80251f2: d10a bne.n 802520a 80251f4: 1d02 adds r2, r0, #4 80251f6: 4610 mov r0, r2 80251f8: f852 1b04 ldr.w r1, [r2], #4 80251fc: f1a1 3401 sub.w r4, r1, #16843009 ; 0x1010101 8025200: ea24 0101 bic.w r1, r4, r1 8025204: f011 3f80 tst.w r1, #2155905152 ; 0x80808080 8025208: d0f5 beq.n 80251f6 802520a: 7803 ldrb r3, [r0, #0] 802520c: 2b00 cmp r3, #0 802520e: d0d7 beq.n 80251c0 8025210: 1c43 adds r3, r0, #1 8025212: 4618 mov r0, r3 8025214: 3301 adds r3, #1 8025216: 7802 ldrb r2, [r0, #0] 8025218: 2a00 cmp r2, #0 802521a: d1fa bne.n 8025212 802521c: e7d0 b.n 80251c0 802521e: 4618 mov r0, r3 8025220: e7ce b.n 80251c0 8025222: bf00 nop 08025224 <_calloc_r>: 8025224: b510 push {r4, lr} 8025226: fb01 f102 mul.w r1, r1, r2 802522a: f7fe ffc5 bl 80241b8 <_malloc_r> 802522e: 4604 mov r4, r0 8025230: b170 cbz r0, 8025250 <_calloc_r+0x2c> 8025232: f850 2c04 ldr.w r2, [r0, #-4] 8025236: f022 0203 bic.w r2, r2, #3 802523a: 3a04 subs r2, #4 802523c: 2a24 cmp r2, #36 ; 0x24 802523e: d81c bhi.n 802527a <_calloc_r+0x56> 8025240: 2a13 cmp r2, #19 8025242: bf98 it ls 8025244: 4603 movls r3, r0 8025246: d805 bhi.n 8025254 <_calloc_r+0x30> 8025248: 2200 movs r2, #0 802524a: 601a str r2, [r3, #0] 802524c: 605a str r2, [r3, #4] 802524e: 609a str r2, [r3, #8] 8025250: 4620 mov r0, r4 8025252: bd10 pop {r4, pc} 8025254: 2100 movs r1, #0 8025256: 2a1b cmp r2, #27 8025258: 6001 str r1, [r0, #0] 802525a: bf98 it ls 802525c: f100 0308 addls.w r3, r0, #8 8025260: 6041 str r1, [r0, #4] 8025262: d9f1 bls.n 8025248 <_calloc_r+0x24> 8025264: 2a24 cmp r2, #36 ; 0x24 8025266: 6081 str r1, [r0, #8] 8025268: 60c1 str r1, [r0, #12] 802526a: bf11 iteee ne 802526c: f100 0310 addne.w r3, r0, #16 8025270: 6101 streq r1, [r0, #16] 8025272: f100 0318 addeq.w r3, r0, #24 8025276: 6141 streq r1, [r0, #20] 8025278: e7e6 b.n 8025248 <_calloc_r+0x24> 802527a: 2100 movs r1, #0 802527c: f7fc fc40 bl 8021b00 8025280: 4620 mov r0, r4 8025282: bd10 pop {r4, pc} 08025284 : 8025284: f021 4100 bic.w r1, r1, #2147483648 ; 0x80000000 8025288: 4770 bx lr 802528a: bf00 nop 0802528c : { /* 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; 802528c: f040 60bf orr.w r0, r0, #100139008 ; 0x5f80000 8025290: 4b02 ldr r3, [pc, #8] ; (802529c ) 8025292: f440 3000 orr.w r0, r0, #131072 ; 0x20000 8025296: 60d8 str r0, [r3, #12] 8025298: 4770 bx lr 802529a: bf00 nop 802529c: e000ed00 .word 0xe000ed00 080252a0 : /* 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) 80252a0: 78c3 ldrb r3, [r0, #3] 80252a2: b30b cbz r3, 80252e8 { /* Compute the Corresponding IRQ Priority --------------------------------*/ tmppriority = (0x700 - ((SCB->AIRCR) & (uint32_t)0x700))>> 0x08; 80252a4: 4b16 ldr r3, [pc, #88] ; (8025300 ) tmppre = (0x4 - tmppriority); tmpsub = tmpsub >> tmppriority; tmppriority = NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; 80252a6: 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; 80252a8: 68db ldr r3, [r3, #12] 80252aa: 43db mvns r3, r3 80252ac: f3c3 2302 ubfx r3, r3, #8, #3 tmppre = (0x4 - tmppriority); 80252b0: f1c3 0204 rsb r2, r3, #4 tmpsub = tmpsub >> tmppriority; tmppriority = NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; 80252b4: b2d2 uxtb r2, r2 80252b6: 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; 80252ba: 210f movs r1, #15 80252bc: fa41 f303 asr.w r3, r1, r3 tmppriority = NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; tmppriority |= (uint8_t)(NVIC_InitStruct->NVIC_IRQChannelSubPriority & tmpsub); 80252c0: 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; 80252c2: b2d2 uxtb r2, r2 tmppriority |= (uint8_t)(NVIC_InitStruct->NVIC_IRQChannelSubPriority & tmpsub); 80252c4: 400b ands r3, r1 80252c6: 431a orrs r2, r3 tmppriority = tmppriority << 0x04; NVIC->IP[NVIC_InitStruct->NVIC_IRQChannel] = tmppriority; 80252c8: 7803 ldrb r3, [r0, #0] 80252ca: f103 4360 add.w r3, r3, #3758096384 ; 0xe0000000 80252ce: 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; 80252d2: 0112 lsls r2, r2, #4 NVIC->IP[NVIC_InitStruct->NVIC_IRQChannel] = tmppriority; 80252d4: f883 2300 strb.w r2, [r3, #768] ; 0x300 /* Enable the Selected IRQ Channels --------------------------------------*/ NVIC->ISER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = 80252d8: 7803 ldrb r3, [r0, #0] (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 80252da: 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] = 80252dc: 0959 lsrs r1, r3, #5 (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 80252de: f003 031f and.w r3, r3, #31 80252e2: fa02 f303 lsl.w r3, r2, r3 80252e6: e007 b.n 80252f8 } else { /* Disable the Selected IRQ Channels -------------------------------------*/ NVIC->ICER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = 80252e8: 7803 ldrb r3, [r0, #0] (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 80252ea: 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] = 80252ec: 0959 lsrs r1, r3, #5 (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 80252ee: f003 031f and.w r3, r3, #31 80252f2: 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] = 80252f6: 3120 adds r1, #32 80252f8: 4a02 ldr r2, [pc, #8] ; (8025304 ) 80252fa: f842 3021 str.w r3, [r2, r1, lsl #2] 80252fe: 4770 bx lr 8025300: e000ed00 .word 0xe000ed00 8025304: e000e100 .word 0xe000e100 08025308 : { /* Check the parameters */ assert_param(IS_NVIC_VECTTAB(NVIC_VectTab)); assert_param(IS_NVIC_OFFSET(Offset)); SCB->VTOR = NVIC_VectTab | (Offset & (uint32_t)0x1FFFFF80); 8025308: f021 4160 bic.w r1, r1, #3758096384 ; 0xe0000000 802530c: f021 017f bic.w r1, r1, #127 ; 0x7f 8025310: 4b01 ldr r3, [pc, #4] ; (8025318 ) 8025312: 4308 orrs r0, r1 8025314: 6098 str r0, [r3, #8] 8025316: 4770 bx lr 8025318: e000ed00 .word 0xe000ed00 0802531c : * @retval None */ void CRC_ResetDR(void) { /* Reset CRC generator */ CRC->CR = CRC_CR_RESET; 802531c: 4b01 ldr r3, [pc, #4] ; (8025324 ) 802531e: 2201 movs r2, #1 8025320: 609a str r2, [r3, #8] 8025322: 4770 bx lr 8025324: 40023000 .word 0x40023000 08025328 : * @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) { 8025328: b510 push {r4, lr} uint32_t index = 0; for(index = 0; index < BufferLength; index++) 802532a: 2300 movs r3, #0 802532c: 4c05 ldr r4, [pc, #20] ; (8025344 ) 802532e: e003 b.n 8025338 { CRC->DR = pBuffer[index]; 8025330: 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++) 8025334: 3301 adds r3, #1 { CRC->DR = pBuffer[index]; 8025336: 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++) 8025338: 428b cmp r3, r1 802533a: d1f9 bne.n 8025330 { CRC->DR = pBuffer[index]; } return (CRC->DR); 802533c: 4b01 ldr r3, [pc, #4] ; (8025344 ) 802533e: 6818 ldr r0, [r3, #0] } 8025340: bd10 pop {r4, pc} 8025342: bf00 nop 8025344: 40023000 .word 0x40023000 08025348 : * @param None * @retval None */ void FLASH_Unlock(void) { if((FLASH->CR & FLASH_CR_LOCK) != RESET) 8025348: 4b04 ldr r3, [pc, #16] ; (802535c ) 802534a: 691a ldr r2, [r3, #16] 802534c: 2a00 cmp r2, #0 802534e: da04 bge.n 802535a { /* Authorize the FLASH Registers access */ FLASH->KEYR = FLASH_KEY1; 8025350: 4a03 ldr r2, [pc, #12] ; (8025360 ) 8025352: 605a str r2, [r3, #4] FLASH->KEYR = FLASH_KEY2; 8025354: f102 3288 add.w r2, r2, #2290649224 ; 0x88888888 8025358: 605a str r2, [r3, #4] 802535a: 4770 bx lr 802535c: 40023c00 .word 0x40023c00 8025360: 45670123 .word 0x45670123 08025364 : * @retval None */ void FLASH_Lock(void) { /* Set the LOCK Bit to lock the FLASH Registers access */ FLASH->CR |= FLASH_CR_LOCK; 8025364: 4b02 ldr r3, [pc, #8] ; (8025370 ) 8025366: 691a ldr r2, [r3, #16] 8025368: f042 4200 orr.w r2, r2, #2147483648 ; 0x80000000 802536c: 611a str r2, [r3, #16] 802536e: 4770 bx lr 8025370: 40023c00 .word 0x40023c00 08025374 : { /* Check the parameters */ assert_param(IS_FLASH_CLEAR_FLAG(FLASH_FLAG)); /* Clear the flags */ FLASH->SR = FLASH_FLAG; 8025374: 4b01 ldr r3, [pc, #4] ; (802537c ) 8025376: 60d8 str r0, [r3, #12] 8025378: 4770 bx lr 802537a: bf00 nop 802537c: 40023c00 .word 0x40023c00 08025380 : */ FLASH_Status FLASH_GetStatus(void) { FLASH_Status flashstatus = FLASH_COMPLETE; if((FLASH->SR & FLASH_FLAG_BSY) == FLASH_FLAG_BSY) 8025380: 4b0b ldr r3, [pc, #44] ; (80253b0 ) 8025382: 68da ldr r2, [r3, #12] 8025384: 03d0 lsls r0, r2, #15 8025386: d40d bmi.n 80253a4 { flashstatus = FLASH_BUSY; } else { if((FLASH->SR & FLASH_FLAG_WRPERR) != (uint32_t)0x00) 8025388: 68da ldr r2, [r3, #12] 802538a: 06d1 lsls r1, r2, #27 802538c: d40c bmi.n 80253a8 { flashstatus = FLASH_ERROR_WRP; } else { if((FLASH->SR & (uint32_t)0xEF) != (uint32_t)0x00) 802538e: 68da ldr r2, [r3, #12] 8025390: f012 0fef tst.w r2, #239 ; 0xef 8025394: d10a bne.n 80253ac { flashstatus = FLASH_ERROR_PROGRAM; } else { if((FLASH->SR & FLASH_FLAG_OPERR) != (uint32_t)0x00) 8025396: 68db ldr r3, [r3, #12] 8025398: f013 0f02 tst.w r3, #2 { flashstatus = FLASH_ERROR_OPERATION; 802539c: bf0c ite eq 802539e: 2008 moveq r0, #8 80253a0: 2007 movne r0, #7 80253a2: 4770 bx lr { FLASH_Status flashstatus = FLASH_COMPLETE; if((FLASH->SR & FLASH_FLAG_BSY) == FLASH_FLAG_BSY) { flashstatus = FLASH_BUSY; 80253a4: 2001 movs r0, #1 80253a6: 4770 bx lr } else { if((FLASH->SR & FLASH_FLAG_WRPERR) != (uint32_t)0x00) { flashstatus = FLASH_ERROR_WRP; 80253a8: 2005 movs r0, #5 80253aa: 4770 bx lr } else { if((FLASH->SR & (uint32_t)0xEF) != (uint32_t)0x00) { flashstatus = FLASH_ERROR_PROGRAM; 80253ac: 2006 movs r0, #6 } } } /* Return the FLASH Status */ return flashstatus; } 80253ae: 4770 bx lr 80253b0: 40023c00 .word 0x40023c00 080253b4 : * @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) { 80253b4: b507 push {r0, r1, r2, lr} __IO FLASH_Status status = FLASH_COMPLETE; 80253b6: 2308 movs r3, #8 80253b8: 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(); 80253bc: f7ff ffe0 bl 8025380 80253c0: 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) 80253c4: f89d 3007 ldrb.w r3, [sp, #7] 80253c8: 2b01 cmp r3, #1 80253ca: d0f7 beq.n 80253bc { status = FLASH_GetStatus(); } /* Return the operation status */ return status; 80253cc: f89d 0007 ldrb.w r0, [sp, #7] } 80253d0: bd0e pop {r1, r2, r3, pc} 80253d2: 0000 movs r0, r0 080253d4 : * @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) { 80253d4: b570 push {r4, r5, r6, lr} 80253d6: 4605 mov r5, r0 80253d8: 460e mov r6, r1 /* Check the parameters */ assert_param(IS_FLASH_ADDRESS(Address)); /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 80253da: f7ff ffeb bl 80253b4 if(status == FLASH_COMPLETE) 80253de: 2808 cmp r0, #8 80253e0: d111 bne.n 8025406 { /* if the previous operation is completed, proceed to program the new data */ FLASH->CR &= CR_PSIZE_MASK; 80253e2: 4c09 ldr r4, [pc, #36] ; (8025408 ) 80253e4: 6923 ldr r3, [r4, #16] 80253e6: f423 7340 bic.w r3, r3, #768 ; 0x300 80253ea: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_PSIZE_BYTE; 80253ec: 6923 ldr r3, [r4, #16] 80253ee: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_CR_PG; 80253f0: 6923 ldr r3, [r4, #16] 80253f2: f043 0301 orr.w r3, r3, #1 80253f6: 6123 str r3, [r4, #16] *(__IO uint8_t*)Address = Data; 80253f8: 702e strb r6, [r5, #0] /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 80253fa: f7ff ffdb bl 80253b4 /* if the program operation is completed, disable the PG Bit */ FLASH->CR &= (~FLASH_CR_PG); 80253fe: 6923 ldr r3, [r4, #16] 8025400: f023 0301 bic.w r3, r3, #1 8025404: 6123 str r3, [r4, #16] } /* Return the Program Status */ return status; } 8025406: bd70 pop {r4, r5, r6, pc} 8025408: 40023c00 .word 0x40023c00 0802540c : * @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) { 802540c: b570 push {r4, r5, r6, lr} 802540e: 4605 mov r5, r0 8025410: 460e mov r6, r1 /* Check the parameters */ assert_param(IS_FLASH_ADDRESS(Address)); /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 8025412: f7ff ffcf bl 80253b4 if(status == FLASH_COMPLETE) 8025416: 2808 cmp r0, #8 8025418: d113 bne.n 8025442 { /* if the previous operation is completed, proceed to program the new data */ FLASH->CR &= CR_PSIZE_MASK; 802541a: 4c0a ldr r4, [pc, #40] ; (8025444 ) 802541c: 6923 ldr r3, [r4, #16] 802541e: f423 7340 bic.w r3, r3, #768 ; 0x300 8025422: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_PSIZE_WORD; 8025424: 6923 ldr r3, [r4, #16] 8025426: f443 7300 orr.w r3, r3, #512 ; 0x200 802542a: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_CR_PG; 802542c: 6923 ldr r3, [r4, #16] 802542e: f043 0301 orr.w r3, r3, #1 8025432: 6123 str r3, [r4, #16] *(__IO uint32_t*)Address = Data; 8025434: 602e str r6, [r5, #0] /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 8025436: f7ff ffbd bl 80253b4 /* if the program operation is completed, disable the PG Bit */ FLASH->CR &= (~FLASH_CR_PG); 802543a: 6923 ldr r3, [r4, #16] 802543c: f023 0301 bic.w r3, r3, #1 8025440: 6123 str r3, [r4, #16] } /* Return the Program Status */ return status; } 8025442: bd70 pop {r4, r5, r6, pc} 8025444: 40023c00 .word 0x40023c00 08025448 : * * @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) { 8025448: b570 push {r4, r5, r6, lr} 802544a: 4606 mov r6, r0 /* Check the parameters */ assert_param(IS_FLASH_SECTOR(FLASH_Sector)); assert_param(IS_VOLTAGERANGE(VoltageRange)); if(VoltageRange == VoltageRange_1) 802544c: b141 cbz r1, 8025460 { tmp_psize = FLASH_PSIZE_BYTE; } else if(VoltageRange == VoltageRange_2) 802544e: 2901 cmp r1, #1 8025450: d008 beq.n 8025464 { tmp_psize = FLASH_PSIZE_HALF_WORD; } else if(VoltageRange == VoltageRange_3) { tmp_psize = FLASH_PSIZE_WORD; 8025452: 2902 cmp r1, #2 8025454: bf14 ite ne 8025456: f44f 7540 movne.w r5, #768 ; 0x300 802545a: f44f 7500 moveq.w r5, #512 ; 0x200 802545e: e003 b.n 8025468 assert_param(IS_FLASH_SECTOR(FLASH_Sector)); assert_param(IS_VOLTAGERANGE(VoltageRange)); if(VoltageRange == VoltageRange_1) { tmp_psize = FLASH_PSIZE_BYTE; 8025460: 460d mov r5, r1 8025462: e001 b.n 8025468 } else if(VoltageRange == VoltageRange_2) { tmp_psize = FLASH_PSIZE_HALF_WORD; 8025464: f44f 7580 mov.w r5, #256 ; 0x100 else { tmp_psize = FLASH_PSIZE_DOUBLE_WORD; } /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 8025468: f7ff ffa4 bl 80253b4 if(status == FLASH_COMPLETE) 802546c: 2808 cmp r0, #8 802546e: d11e bne.n 80254ae { /* if the previous operation is completed, proceed to erase the sector */ FLASH->CR &= CR_PSIZE_MASK; 8025470: 4c0f ldr r4, [pc, #60] ; (80254b0 ) 8025472: 6923 ldr r3, [r4, #16] 8025474: f423 7340 bic.w r3, r3, #768 ; 0x300 8025478: 6123 str r3, [r4, #16] FLASH->CR |= tmp_psize; 802547a: 6921 ldr r1, [r4, #16] 802547c: 430d orrs r5, r1 802547e: 6125 str r5, [r4, #16] FLASH->CR &= SECTOR_MASK; 8025480: 6923 ldr r3, [r4, #16] 8025482: f023 03f8 bic.w r3, r3, #248 ; 0xf8 8025486: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_CR_SER | FLASH_Sector; 8025488: 6923 ldr r3, [r4, #16] 802548a: f043 0302 orr.w r3, r3, #2 802548e: 431e orrs r6, r3 8025490: 6126 str r6, [r4, #16] FLASH->CR |= FLASH_CR_STRT; 8025492: 6923 ldr r3, [r4, #16] 8025494: f443 3380 orr.w r3, r3, #65536 ; 0x10000 8025498: 6123 str r3, [r4, #16] /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 802549a: f7ff ff8b bl 80253b4 /* if the erase operation is completed, disable the SER Bit */ FLASH->CR &= (~FLASH_CR_SER); 802549e: 6923 ldr r3, [r4, #16] 80254a0: f023 0302 bic.w r3, r3, #2 80254a4: 6123 str r3, [r4, #16] FLASH->CR &= SECTOR_MASK; 80254a6: 6923 ldr r3, [r4, #16] 80254a8: f023 03f8 bic.w r3, r3, #248 ; 0xf8 80254ac: 6123 str r3, [r4, #16] } /* Return the Erase Status */ return status; } 80254ae: bd70 pop {r4, r5, r6, pc} 80254b0: 40023c00 .word 0x40023c00 080254b4 : * @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) { 80254b4: b508 push {r3, lr} /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); if (GPIOx == GPIOA) 80254b6: 4b2c ldr r3, [pc, #176] ; (8025568 ) 80254b8: 4298 cmp r0, r3 80254ba: d105 bne.n 80254c8 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOA, ENABLE); 80254bc: 2001 movs r0, #1 80254be: 4601 mov r1, r0 80254c0: f000 f974 bl 80257ac RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOA, DISABLE); 80254c4: 2001 movs r0, #1 80254c6: e048 b.n 802555a } else if (GPIOx == GPIOB) 80254c8: 4b28 ldr r3, [pc, #160] ; (802556c ) 80254ca: 4298 cmp r0, r3 80254cc: d105 bne.n 80254da { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOB, ENABLE); 80254ce: 2002 movs r0, #2 80254d0: 2101 movs r1, #1 80254d2: f000 f96b bl 80257ac RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOB, DISABLE); 80254d6: 2002 movs r0, #2 80254d8: e03f b.n 802555a } else if (GPIOx == GPIOC) 80254da: 4b25 ldr r3, [pc, #148] ; (8025570 ) 80254dc: 4298 cmp r0, r3 80254de: d105 bne.n 80254ec { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOC, ENABLE); 80254e0: 2004 movs r0, #4 80254e2: 2101 movs r1, #1 80254e4: f000 f962 bl 80257ac RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOC, DISABLE); 80254e8: 2004 movs r0, #4 80254ea: e036 b.n 802555a } else if (GPIOx == GPIOD) 80254ec: 4b21 ldr r3, [pc, #132] ; (8025574 ) 80254ee: 4298 cmp r0, r3 80254f0: d105 bne.n 80254fe { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOD, ENABLE); 80254f2: 2008 movs r0, #8 80254f4: 2101 movs r1, #1 80254f6: f000 f959 bl 80257ac RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOD, DISABLE); 80254fa: 2008 movs r0, #8 80254fc: e02d b.n 802555a } else if (GPIOx == GPIOE) 80254fe: 4b1e ldr r3, [pc, #120] ; (8025578 ) 8025500: 4298 cmp r0, r3 8025502: d105 bne.n 8025510 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOE, ENABLE); 8025504: 2010 movs r0, #16 8025506: 2101 movs r1, #1 8025508: f000 f950 bl 80257ac RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOE, DISABLE); 802550c: 2010 movs r0, #16 802550e: e024 b.n 802555a } else if (GPIOx == GPIOF) 8025510: 4b1a ldr r3, [pc, #104] ; (802557c ) 8025512: 4298 cmp r0, r3 8025514: d105 bne.n 8025522 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOF, ENABLE); 8025516: 2020 movs r0, #32 8025518: 2101 movs r1, #1 802551a: f000 f947 bl 80257ac RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOF, DISABLE); 802551e: 2020 movs r0, #32 8025520: e01b b.n 802555a } else if (GPIOx == GPIOG) 8025522: 4b17 ldr r3, [pc, #92] ; (8025580 ) 8025524: 4298 cmp r0, r3 8025526: d105 bne.n 8025534 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOG, ENABLE); 8025528: 2040 movs r0, #64 ; 0x40 802552a: 2101 movs r1, #1 802552c: f000 f93e bl 80257ac RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOG, DISABLE); 8025530: 2040 movs r0, #64 ; 0x40 8025532: e012 b.n 802555a } else if (GPIOx == GPIOH) 8025534: 4b13 ldr r3, [pc, #76] ; (8025584 ) 8025536: 4298 cmp r0, r3 8025538: d105 bne.n 8025546 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOH, ENABLE); 802553a: 2080 movs r0, #128 ; 0x80 802553c: 2101 movs r1, #1 802553e: f000 f935 bl 80257ac RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOH, DISABLE); 8025542: 2080 movs r0, #128 ; 0x80 8025544: e009 b.n 802555a } else { if (GPIOx == GPIOI) 8025546: 4b10 ldr r3, [pc, #64] ; (8025588 ) 8025548: 4298 cmp r0, r3 802554a: d10b bne.n 8025564 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, ENABLE); 802554c: f44f 7080 mov.w r0, #256 ; 0x100 8025550: 2101 movs r1, #1 8025552: f000 f92b bl 80257ac RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, DISABLE); 8025556: f44f 7080 mov.w r0, #256 ; 0x100 802555a: 2100 movs r1, #0 } } } 802555c: e8bd 4008 ldmia.w sp!, {r3, lr} else { if (GPIOx == GPIOI) { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, ENABLE); RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, DISABLE); 8025560: f000 b924 b.w 80257ac 8025564: bd08 pop {r3, pc} 8025566: bf00 nop 8025568: 40020000 .word 0x40020000 802556c: 40020400 .word 0x40020400 8025570: 40020800 .word 0x40020800 8025574: 40020c00 .word 0x40020c00 8025578: 40021000 .word 0x40021000 802557c: 40021400 .word 0x40021400 8025580: 40021800 .word 0x40021800 8025584: 40021c00 .word 0x40021c00 8025588: 40022000 .word 0x40022000 0802558c : * @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) { 802558c: 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; 8025590: 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++) 8025592: 2300 movs r3, #0 { pos = ((uint32_t)0x01) << pinpos; 8025594: 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)); 8025598: f04f 0803 mov.w r8, #3 /* -------------------------Configure the port pins---------------- */ /*-- GPIO Mode Configuration --*/ for (pinpos = 0x00; pinpos < 0x10; pinpos++) { pos = ((uint32_t)0x01) << pinpos; 802559c: fa0c f203 lsl.w r2, ip, r3 /* Get the port pins position */ currentpin = (GPIO_InitStruct->GPIO_Pin) & pos; 80255a0: ea02 0507 and.w r5, r2, r7 if (currentpin == pos) 80255a4: 4295 cmp r5, r2 80255a6: d131 bne.n 802560c * @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) 80255a8: 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)); 80255aa: 6806 ldr r6, [r0, #0] 80255ac: fa08 f402 lsl.w r4, r8, r2 80255b0: 43e4 mvns r4, r4 80255b2: 4026 ands r6, r4 80255b4: 6006 str r6, [r0, #0] GPIOx->MODER |= (((uint32_t)GPIO_InitStruct->GPIO_Mode) << (pinpos * 2)); 80255b6: 790e ldrb r6, [r1, #4] 80255b8: f8d0 9000 ldr.w r9, [r0] 80255bc: fa06 fa02 lsl.w sl, r6, r2 if ((GPIO_InitStruct->GPIO_Mode == GPIO_Mode_OUT) || (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_AF)) 80255c0: 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)); 80255c2: ea4a 0909 orr.w r9, sl, r9 if ((GPIO_InitStruct->GPIO_Mode == GPIO_Mode_OUT) || (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_AF)) 80255c6: 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)); 80255c8: f8c0 9000 str.w r9, [r0] if ((GPIO_InitStruct->GPIO_Mode == GPIO_Mode_OUT) || (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_AF)) 80255cc: d815 bhi.n 80255fa { /* Check Speed mode parameters */ assert_param(IS_GPIO_SPEED(GPIO_InitStruct->GPIO_Speed)); /* Speed mode configuration */ GPIOx->OSPEEDR &= ~(GPIO_OSPEEDER_OSPEEDR0 << (pinpos * 2)); 80255ce: 6886 ldr r6, [r0, #8] GPIOx->OSPEEDR |= ((uint32_t)(GPIO_InitStruct->GPIO_Speed) << (pinpos * 2)); 80255d0: 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)); 80255d4: 4026 ands r6, r4 80255d6: 6086 str r6, [r0, #8] GPIOx->OSPEEDR |= ((uint32_t)(GPIO_InitStruct->GPIO_Speed) << (pinpos * 2)); 80255d8: 6886 ldr r6, [r0, #8] 80255da: fa09 f902 lsl.w r9, r9, r2 80255de: ea49 0606 orr.w r6, r9, r6 80255e2: 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)) ; 80255e4: 6846 ldr r6, [r0, #4] 80255e6: ea26 0505 bic.w r5, r6, r5 80255ea: 6045 str r5, [r0, #4] GPIOx->OTYPER |= (uint16_t)(((uint16_t)GPIO_InitStruct->GPIO_OType) << ((uint16_t)pinpos)); 80255ec: 798d ldrb r5, [r1, #6] 80255ee: 6846 ldr r6, [r0, #4] 80255f0: 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; } 80255f4: 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)); 80255f6: 4335 orrs r5, r6 80255f8: 6045 str r5, [r0, #4] } /* Pull-up Pull down resistor configuration*/ GPIOx->PUPDR &= ~(GPIO_PUPDR_PUPDR0 << ((uint16_t)pinpos * 2)); 80255fa: 68c5 ldr r5, [r0, #12] 80255fc: 402c ands r4, r5 80255fe: 60c4 str r4, [r0, #12] GPIOx->PUPDR |= (((uint32_t)GPIO_InitStruct->GPIO_PuPd) << (pinpos * 2)); 8025600: 79cd ldrb r5, [r1, #7] 8025602: 68c4 ldr r4, [r0, #12] 8025604: fa05 f202 lsl.w r2, r5, r2 8025608: 4322 orrs r2, r4 802560a: 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++) 802560c: 3301 adds r3, #1 802560e: 2b10 cmp r3, #16 8025610: d1c4 bne.n 802559c /* 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)); } } } 8025612: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 08025616 : { /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); assert_param(IS_GPIO_PIN(GPIO_Pin)); GPIOx->BSRRL = GPIO_Pin; 8025616: 8301 strh r1, [r0, #24] 8025618: 4770 bx lr 0802561a : { /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); assert_param(IS_GPIO_PIN(GPIO_Pin)); GPIOx->BSRRH = GPIO_Pin; 802561a: 8341 strh r1, [r0, #26] 802561c: 4770 bx lr 0802561e : /* 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)) ; 802561e: 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)) ; 8025622: 08c9 lsrs r1, r1, #3 8025624: 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) { 8025626: 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)) ; 8025628: 009b lsls r3, r3, #2 GPIOx->AFR[GPIO_PinSource >> 0x03] &= ~((uint32_t)0xF << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; 802562a: f850 5021 ldr.w r5, [r0, r1, lsl #2] 802562e: 240f movs r4, #15 8025630: fa04 f403 lsl.w r4, r4, r3 8025634: ea25 0404 bic.w r4, r5, r4 8025638: f840 4021 str.w r4, [r0, r1, lsl #2] temp_2 = GPIOx->AFR[GPIO_PinSource >> 0x03] | temp; 802563c: 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)) ; 8025640: 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; 8025644: 4314 orrs r4, r2 GPIOx->AFR[GPIO_PinSource >> 0x03] = temp_2; 8025646: f840 4021 str.w r4, [r0, r1, lsl #2] 802564a: bd30 pop {r4, r5, pc} 0802564c : void PWR_BackupAccessCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); *(__IO uint32_t *) CR_DBP_BB = (uint32_t)NewState; 802564c: 4b01 ldr r3, [pc, #4] ; (8025654 ) 802564e: 6018 str r0, [r3, #0] 8025650: 4770 bx lr 8025652: bf00 nop 8025654: 420e0020 .word 0x420e0020 08025658 : /* 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; 8025658: 4b06 ldr r3, [pc, #24] ; (8025674 ) 802565a: 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) 802565c: 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; 802565e: 701a strb r2, [r3, #0] /* Reset LSEBYP bit */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_OFF; 8025660: 701a strb r2, [r3, #0] /* Configure LSE (RCC_LSE_OFF is already covered by the code section above) */ switch (RCC_LSE) 8025662: d002 beq.n 802566a 8025664: 2804 cmp r0, #4 8025666: d104 bne.n 8025672 8025668: e001 b.n 802566e { case RCC_LSE_ON: /* Set LSEON bit */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_ON; 802566a: 7018 strb r0, [r3, #0] break; 802566c: 4770 bx lr case RCC_LSE_Bypass: /* Set LSEBYP and LSEON bits */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_Bypass | RCC_LSE_ON; 802566e: 2205 movs r2, #5 8025670: 701a strb r2, [r3, #0] 8025672: 4770 bx lr 8025674: 40023870 .word 0x40023870 08025678 : void RCC_LSICmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); *(__IO uint32_t *) CSR_LSION_BB = (uint32_t)NewState; 8025678: 4b01 ldr r3, [pc, #4] ; (8025680 ) 802567a: 6018 str r0, [r3, #0] 802567c: 4770 bx lr 802567e: bf00 nop 8025680: 42470e80 .word 0x42470e80 08025684 : 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; 8025684: 4b1e ldr r3, [pc, #120] ; (8025700 ) 8025686: 689a ldr r2, [r3, #8] 8025688: f002 020c and.w r2, r2, #12 switch (tmp) 802568c: 2a04 cmp r2, #4 * configuration based on this function will be incorrect. * * @retval None */ void RCC_GetClocksFreq(RCC_ClocksTypeDef* RCC_Clocks) { 802568e: 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) 8025690: d003 beq.n 802569a 8025692: 2a08 cmp r2, #8 8025694: d003 beq.n 802569e 8025696: 4b1b ldr r3, [pc, #108] ; (8025704 ) 8025698: e018 b.n 80256cc { 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; 802569a: 4b1b ldr r3, [pc, #108] ; (8025708 ) 802569c: e016 b.n 80256cc 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; 802569e: 6859 ldr r1, [r3, #4] pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; 80256a0: 685a ldr r2, [r3, #4] if (pllsource != 0) 80256a2: f411 0f80 tst.w r1, #4194304 ; 0x400000 { /* HSE used as PLL clock source */ pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); 80256a6: 6859 ldr r1, [r3, #4] 80256a8: bf14 ite ne 80256aa: 4b17 ldrne r3, [pc, #92] ; (8025708 ) } else { /* HSI used as PLL clock source */ pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); 80256ac: 4b15 ldreq r3, [pc, #84] ; (8025704 ) /* 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; 80256ae: 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); 80256b2: fbb3 f3f2 udiv r3, r3, r2 } pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; 80256b6: 4a12 ldr r2, [pc, #72] ; (8025700 ) 80256b8: 6852 ldr r2, [r2, #4] 80256ba: 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); 80256be: 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; 80256c2: 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); 80256c4: 434b muls r3, r1 } pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; 80256c6: 0052 lsls r2, r2, #1 RCC_Clocks->SYSCLK_Frequency = pllvco/pllp; 80256c8: fbb3 f3f2 udiv r3, r3, r2 break; } /* Compute HCLK, PCLK1 and PCLK2 clocks frequencies ------------------------*/ /* Get HCLK prescaler */ tmp = RCC->CFGR & RCC_CFGR_HPRE; 80256cc: 490c ldr r1, [pc, #48] ; (8025700 ) /* 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; 80256ce: 6003 str r3, [r0, #0] break; } /* Compute HCLK, PCLK1 and PCLK2 clocks frequencies ------------------------*/ /* Get HCLK prescaler */ tmp = RCC->CFGR & RCC_CFGR_HPRE; 80256d0: 688b ldr r3, [r1, #8] tmp = tmp >> 4; presc = APBAHBPrescTable[tmp]; 80256d2: 4a0e ldr r2, [pc, #56] ; (802570c ) } /* Compute HCLK, PCLK1 and PCLK2 clocks frequencies ------------------------*/ /* Get HCLK prescaler */ tmp = RCC->CFGR & RCC_CFGR_HPRE; tmp = tmp >> 4; 80256d4: f3c3 1303 ubfx r3, r3, #4, #4 presc = APBAHBPrescTable[tmp]; 80256d8: 5cd4 ldrb r4, [r2, r3] /* HCLK clock frequency */ RCC_Clocks->HCLK_Frequency = RCC_Clocks->SYSCLK_Frequency >> presc; 80256da: 6803 ldr r3, [r0, #0] 80256dc: fa23 f304 lsr.w r3, r3, r4 80256e0: 6043 str r3, [r0, #4] /* Get PCLK1 prescaler */ tmp = RCC->CFGR & RCC_CFGR_PPRE1; 80256e2: 688c ldr r4, [r1, #8] tmp = tmp >> 10; 80256e4: f3c4 2482 ubfx r4, r4, #10, #3 presc = APBAHBPrescTable[tmp]; 80256e8: 5d14 ldrb r4, [r2, r4] /* PCLK1 clock frequency */ RCC_Clocks->PCLK1_Frequency = RCC_Clocks->HCLK_Frequency >> presc; 80256ea: fa23 f404 lsr.w r4, r3, r4 80256ee: 6084 str r4, [r0, #8] /* Get PCLK2 prescaler */ tmp = RCC->CFGR & RCC_CFGR_PPRE2; 80256f0: 6889 ldr r1, [r1, #8] tmp = tmp >> 13; 80256f2: f3c1 3142 ubfx r1, r1, #13, #3 presc = APBAHBPrescTable[tmp]; 80256f6: 5c52 ldrb r2, [r2, r1] /* PCLK2 clock frequency */ RCC_Clocks->PCLK2_Frequency = RCC_Clocks->HCLK_Frequency >> presc; 80256f8: fa23 f302 lsr.w r3, r3, r2 80256fc: 60c3 str r3, [r0, #12] 80256fe: bd10 pop {r4, pc} 8025700: 40023800 .word 0x40023800 8025704: 00f42400 .word 0x00f42400 8025708: 017d7840 .word 0x017d7840 802570c: 200005ac .word 0x200005ac 08025710 : uint32_t tmpreg = 0; /* Check the parameters */ assert_param(IS_RCC_RTCCLK_SOURCE(RCC_RTCCLKSource)); if ((RCC_RTCCLKSource & 0x00000300) == 0x00000300) 8025710: f400 7340 and.w r3, r0, #768 ; 0x300 8025714: f5b3 7f40 cmp.w r3, #768 ; 0x300 8025718: 4b08 ldr r3, [pc, #32] ; (802573c ) 802571a: d108 bne.n 802572e { /* If HSE is selected as RTC clock source, configure HSE division factor for RTC clock */ tmpreg = RCC->CFGR; 802571c: 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); 802571e: 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; 8025722: f421 11f8 bic.w r1, r1, #2031616 ; 0x1f0000 /* Configure HSE division factor for RTC clock */ tmpreg |= (RCC_RTCCLKSource & 0xFFFFCFF); 8025726: f422 7240 bic.w r2, r2, #768 ; 0x300 802572a: 430a orrs r2, r1 /* Store the new value */ RCC->CFGR = tmpreg; 802572c: 609a str r2, [r3, #8] } /* Select the RTC clock source */ RCC->BDCR |= (RCC_RTCCLKSource & 0x00000FFF); 802572e: 6f1a ldr r2, [r3, #112] ; 0x70 8025730: 0500 lsls r0, r0, #20 8025732: ea42 5010 orr.w r0, r2, r0, lsr #20 8025736: 6718 str r0, [r3, #112] ; 0x70 8025738: 4770 bx lr 802573a: bf00 nop 802573c: 40023800 .word 0x40023800 08025740 : void RCC_RTCCLKCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); *(__IO uint32_t *) BDCR_RTCEN_BB = (uint32_t)NewState; 8025740: 4b01 ldr r3, [pc, #4] ; (8025748 ) 8025742: 6018 str r0, [r3, #0] 8025744: 4770 bx lr 8025746: bf00 nop 8025748: 42470e3c .word 0x42470e3c 0802574c : * @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) { 802574c: 4b04 ldr r3, [pc, #16] ; (8025760 ) assert_param(IS_RCC_AHB1_CLOCK_PERIPH(RCC_AHB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->AHB1ENR |= RCC_AHB1Periph; 802574e: 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) 8025750: b109 cbz r1, 8025756 { RCC->AHB1ENR |= RCC_AHB1Periph; 8025752: 4310 orrs r0, r2 8025754: e001 b.n 802575a } else { RCC->AHB1ENR &= ~RCC_AHB1Periph; 8025756: ea22 0000 bic.w r0, r2, r0 802575a: 6318 str r0, [r3, #48] ; 0x30 802575c: 4770 bx lr 802575e: bf00 nop 8025760: 40023800 .word 0x40023800 08025764 : * @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) { 8025764: 4b04 ldr r3, [pc, #16] ; (8025778 ) assert_param(IS_RCC_AHB2_PERIPH(RCC_AHB2Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->AHB2ENR |= RCC_AHB2Periph; 8025766: 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) 8025768: b109 cbz r1, 802576e { RCC->AHB2ENR |= RCC_AHB2Periph; 802576a: 4310 orrs r0, r2 802576c: e001 b.n 8025772 } else { RCC->AHB2ENR &= ~RCC_AHB2Periph; 802576e: ea22 0000 bic.w r0, r2, r0 8025772: 6358 str r0, [r3, #52] ; 0x34 8025774: 4770 bx lr 8025776: bf00 nop 8025778: 40023800 .word 0x40023800 0802577c : * @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) { 802577c: 4b04 ldr r3, [pc, #16] ; (8025790 ) assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->APB1ENR |= RCC_APB1Periph; 802577e: 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) 8025780: b109 cbz r1, 8025786 { RCC->APB1ENR |= RCC_APB1Periph; 8025782: 4310 orrs r0, r2 8025784: e001 b.n 802578a } else { RCC->APB1ENR &= ~RCC_APB1Periph; 8025786: ea22 0000 bic.w r0, r2, r0 802578a: 6418 str r0, [r3, #64] ; 0x40 802578c: 4770 bx lr 802578e: bf00 nop 8025790: 40023800 .word 0x40023800 08025794 : * @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) { 8025794: 4b04 ldr r3, [pc, #16] ; (80257a8 ) assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->APB2ENR |= RCC_APB2Periph; 8025796: 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) 8025798: b109 cbz r1, 802579e { RCC->APB2ENR |= RCC_APB2Periph; 802579a: 4310 orrs r0, r2 802579c: e001 b.n 80257a2 } else { RCC->APB2ENR &= ~RCC_APB2Periph; 802579e: ea22 0000 bic.w r0, r2, r0 80257a2: 6458 str r0, [r3, #68] ; 0x44 80257a4: 4770 bx lr 80257a6: bf00 nop 80257a8: 40023800 .word 0x40023800 080257ac : * @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) { 80257ac: 4b04 ldr r3, [pc, #16] ; (80257c0 ) assert_param(IS_RCC_AHB1_RESET_PERIPH(RCC_AHB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->AHB1RSTR |= RCC_AHB1Periph; 80257ae: 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) 80257b0: b109 cbz r1, 80257b6 { RCC->AHB1RSTR |= RCC_AHB1Periph; 80257b2: 4310 orrs r0, r2 80257b4: e001 b.n 80257ba } else { RCC->AHB1RSTR &= ~RCC_AHB1Periph; 80257b6: ea22 0000 bic.w r0, r2, r0 80257ba: 6118 str r0, [r3, #16] 80257bc: 4770 bx lr 80257be: bf00 nop 80257c0: 40023800 .word 0x40023800 080257c4 : * @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) { 80257c4: 4b04 ldr r3, [pc, #16] ; (80257d8 ) /* Check the parameters */ assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->APB1RSTR |= RCC_APB1Periph; 80257c6: 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) 80257c8: b109 cbz r1, 80257ce { RCC->APB1RSTR |= RCC_APB1Periph; 80257ca: 4310 orrs r0, r2 80257cc: e001 b.n 80257d2 } else { RCC->APB1RSTR &= ~RCC_APB1Periph; 80257ce: ea22 0000 bic.w r0, r2, r0 80257d2: 6218 str r0, [r3, #32] 80257d4: 4770 bx lr 80257d6: bf00 nop 80257d8: 40023800 .word 0x40023800 080257dc : * @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) { 80257dc: 4b04 ldr r3, [pc, #16] ; (80257f0 ) /* 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; 80257de: 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) 80257e0: b109 cbz r1, 80257e6 { RCC->APB2RSTR |= RCC_APB2Periph; 80257e2: 4310 orrs r0, r2 80257e4: e001 b.n 80257ea } else { RCC->APB2RSTR &= ~RCC_APB2Periph; 80257e6: ea22 0000 bic.w r0, r2, r0 80257ea: 6258 str r0, [r3, #36] ; 0x24 80257ec: 4770 bx lr 80257ee: bf00 nop 80257f0: 40023800 .word 0x40023800 080257f4 : /* Check the parameters */ assert_param(IS_RCC_FLAG(RCC_FLAG)); /* Get the RCC register index */ tmp = RCC_FLAG >> 5; 80257f4: 0943 lsrs r3, r0, #5 if (tmp == 1) /* The flag to check is in CR register */ 80257f6: 2b01 cmp r3, #1 80257f8: 4a07 ldr r2, [pc, #28] ; (8025818 ) 80257fa: d101 bne.n 8025800 { statusreg = RCC->CR; 80257fc: 6813 ldr r3, [r2, #0] 80257fe: e003 b.n 8025808 } else if (tmp == 2) /* The flag to check is in BDCR register */ 8025800: 2b02 cmp r3, #2 { statusreg = RCC->BDCR; 8025802: bf0c ite eq 8025804: 6f13 ldreq r3, [r2, #112] ; 0x70 } else /* The flag to check is in CSR register */ { statusreg = RCC->CSR; 8025806: 6f53 ldrne r3, [r2, #116] ; 0x74 } /* Get the flag position */ tmp = RCC_FLAG & FLAG_MASK; if ((statusreg & ((uint32_t)1 << tmp)) != (uint32_t)RESET) 8025808: f000 001f and.w r0, r0, #31 802580c: fa23 f000 lsr.w r0, r3, r0 { bitstatus = RESET; } /* Return the flag status */ return bitstatus; } 8025810: f000 0001 and.w r0, r0, #1 8025814: 4770 bx lr 8025816: bf00 nop 8025818: 40023800 .word 0x40023800 0802581c : * @param NewState: new state of the RNG peripheral. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RNG_Cmd(FunctionalState NewState) { 802581c: 4b04 ldr r3, [pc, #16] ; (8025830 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the RNG */ RNG->CR |= RNG_CR_RNGEN; 802581e: 681a ldr r2, [r3, #0] void RNG_Cmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8025820: b110 cbz r0, 8025828 { /* Enable the RNG */ RNG->CR |= RNG_CR_RNGEN; 8025822: f042 0204 orr.w r2, r2, #4 8025826: e001 b.n 802582c } else { /* Disable the RNG */ RNG->CR &= ~RNG_CR_RNGEN; 8025828: f022 0204 bic.w r2, r2, #4 802582c: 601a str r2, [r3, #0] 802582e: 4770 bx lr 8025830: 50060800 .word 0x50060800 08025834 : * @retval 32-bit random number. */ uint32_t RNG_GetRandomNumber(void) { /* Return the 32 bit random number from the DR register */ return RNG->DR; 8025834: 4b01 ldr r3, [pc, #4] ; (802583c ) 8025836: 6898 ldr r0, [r3, #8] } 8025838: 4770 bx lr 802583a: bf00 nop 802583c: 50060800 .word 0x50060800 08025840 : * @param Value: Byte to be converted. * @retval Converted byte */ static uint8_t RTC_ByteToBcd2(uint8_t Value) { uint8_t bcdhigh = 0; 8025840: 2300 movs r3, #0 while (Value >= 10) 8025842: e003 b.n 802584c { bcdhigh++; 8025844: 3301 adds r3, #1 Value -= 10; 8025846: 380a subs r0, #10 { uint8_t bcdhigh = 0; while (Value >= 10) { bcdhigh++; 8025848: b2db uxtb r3, r3 Value -= 10; 802584a: b2c0 uxtb r0, r0 */ static uint8_t RTC_ByteToBcd2(uint8_t Value) { uint8_t bcdhigh = 0; while (Value >= 10) 802584c: 2809 cmp r0, #9 802584e: d8f9 bhi.n 8025844 { bcdhigh++; Value -= 10; } return ((uint8_t)(bcdhigh << 4) | Value); 8025850: ea40 1003 orr.w r0, r0, r3, lsl #4 } 8025854: b2c0 uxtb r0, r0 8025856: 4770 bx lr 08025858 : * @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; 8025858: 0902 lsrs r2, r0, #4 return (tmp + (Value & (uint8_t)0x0F)); 802585a: f000 030f and.w r3, r0, #15 802585e: 200a movs r0, #10 8025860: fb00 3002 mla r0, r0, r2, r3 } 8025864: b2c0 uxtb r0, r0 8025866: 4770 bx lr 08025868 : * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC is in Init mode * - ERROR: RTC is not in Init mode */ ErrorStatus RTC_EnterInitMode(void) { 8025868: b082 sub sp, #8 __IO uint32_t initcounter = 0x00; 802586a: 2300 movs r3, #0 802586c: 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) 802586e: 4b0d ldr r3, [pc, #52] ; (80258a4 ) 8025870: 68da ldr r2, [r3, #12] 8025872: 0650 lsls r0, r2, #25 8025874: d413 bmi.n 802589e { /* Set the Initialization mode */ RTC->ISR = (uint32_t)RTC_INIT_MASK; 8025876: f04f 32ff mov.w r2, #4294967295 802587a: 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; 802587c: 68da ldr r2, [r3, #12] initcounter++; 802587e: 9901 ldr r1, [sp, #4] 8025880: 3101 adds r1, #1 8025882: 9101 str r1, [sp, #4] } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); 8025884: 9901 ldr r1, [sp, #4] 8025886: 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; 802588a: f002 0240 and.w r2, r2, #64 ; 0x40 initcounter++; } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); 802588e: d001 beq.n 8025894 8025890: 2a00 cmp r2, #0 8025892: d0f3 beq.n 802587c if ((RTC->ISR & RTC_ISR_INITF) != RESET) 8025894: 4b03 ldr r3, [pc, #12] ; (80258a4 ) 8025896: 68d8 ldr r0, [r3, #12] { status = SUCCESS; 8025898: f3c0 1080 ubfx r0, r0, #6, #1 802589c: e000 b.n 80258a0 status = ERROR; } } else { status = SUCCESS; 802589e: 2001 movs r0, #1 } return (status); } 80258a0: b002 add sp, #8 80258a2: 4770 bx lr 80258a4: 40002800 .word 0x40002800 080258a8 : * @retval None */ void RTC_ExitInitMode(void) { /* Exit Initialization mode */ RTC->ISR &= (uint32_t)~RTC_ISR_INIT; 80258a8: 4b02 ldr r3, [pc, #8] ; (80258b4 ) 80258aa: 68da ldr r2, [r3, #12] 80258ac: f022 0280 bic.w r2, r2, #128 ; 0x80 80258b0: 60da str r2, [r3, #12] 80258b2: 4770 bx lr 80258b4: 40002800 .word 0x40002800 080258b8 : * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC registers are initialized * - ERROR: RTC registers are not initialized */ ErrorStatus RTC_Init(RTC_InitTypeDef* RTC_InitStruct) { 80258b8: 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; 80258ba: 4c0f ldr r4, [pc, #60] ; (80258f8 ) 80258bc: 23ca movs r3, #202 ; 0xca 80258be: 6263 str r3, [r4, #36] ; 0x24 RTC->WPR = 0x53; 80258c0: 2353 movs r3, #83 ; 0x53 80258c2: 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) { 80258c4: 4605 mov r5, r0 /* Disable the write protection for RTC registers */ RTC->WPR = 0xCA; RTC->WPR = 0x53; /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) 80258c6: f7ff ffcf bl 8025868 80258ca: b188 cbz r0, 80258f0 status = ERROR; } else { /* Clear RTC CR FMT Bit */ RTC->CR &= ((uint32_t)~(RTC_CR_FMT)); 80258cc: 68a3 ldr r3, [r4, #8] 80258ce: f023 0340 bic.w r3, r3, #64 ; 0x40 80258d2: 60a3 str r3, [r4, #8] /* Set RTC_CR register */ RTC->CR |= ((uint32_t)(RTC_InitStruct->RTC_HourFormat)); 80258d4: 68a2 ldr r2, [r4, #8] 80258d6: 682b ldr r3, [r5, #0] 80258d8: 4313 orrs r3, r2 80258da: 60a3 str r3, [r4, #8] /* Configure the RTC PRER */ RTC->PRER = (uint32_t)(RTC_InitStruct->RTC_SynchPrediv); 80258dc: 68ab ldr r3, [r5, #8] 80258de: 6123 str r3, [r4, #16] RTC->PRER |= (uint32_t)(RTC_InitStruct->RTC_AsynchPrediv << 16); 80258e0: 6923 ldr r3, [r4, #16] 80258e2: 686a ldr r2, [r5, #4] 80258e4: ea43 4302 orr.w r3, r3, r2, lsl #16 80258e8: 6123 str r3, [r4, #16] /* Exit Initialization mode */ RTC_ExitInitMode(); 80258ea: f7ff ffdd bl 80258a8 status = SUCCESS; 80258ee: 2001 movs r0, #1 } /* Enable the write protection for RTC registers */ RTC->WPR = 0xFF; 80258f0: 4b01 ldr r3, [pc, #4] ; (80258f8 ) 80258f2: 22ff movs r2, #255 ; 0xff 80258f4: 625a str r2, [r3, #36] ; 0x24 return status; } 80258f6: bd38 pop {r3, r4, r5, pc} 80258f8: 40002800 .word 0x40002800 080258fc : * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC registers are synchronised * - ERROR: RTC registers are not synchronised */ ErrorStatus RTC_WaitForSynchro(void) { 80258fc: b082 sub sp, #8 __IO uint32_t synchrocounter = 0; 80258fe: 2300 movs r3, #0 8025900: 9301 str r3, [sp, #4] ErrorStatus status = ERROR; uint32_t synchrostatus = 0x00; /* Disable the write protection for RTC registers */ RTC->WPR = 0xCA; 8025902: 4b0e ldr r3, [pc, #56] ; (802593c ) 8025904: 22ca movs r2, #202 ; 0xca 8025906: 625a str r2, [r3, #36] ; 0x24 RTC->WPR = 0x53; 8025908: 2253 movs r2, #83 ; 0x53 802590a: 625a str r2, [r3, #36] ; 0x24 /* Clear RSF flag */ RTC->ISR &= (uint32_t)RTC_RSF_MASK; 802590c: 68da ldr r2, [r3, #12] 802590e: f022 02a0 bic.w r2, r2, #160 ; 0xa0 8025912: 60da str r2, [r3, #12] /* Wait the registers to be synchronised */ do { synchrostatus = RTC->ISR & RTC_ISR_RSF; 8025914: 68d9 ldr r1, [r3, #12] synchrocounter++; 8025916: 9a01 ldr r2, [sp, #4] 8025918: 3201 adds r2, #1 802591a: 9201 str r2, [sp, #4] } while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00)); 802591c: 9a01 ldr r2, [sp, #4] 802591e: 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; 8025922: f001 0120 and.w r1, r1, #32 8025926: 4a05 ldr r2, [pc, #20] ; (802593c ) synchrocounter++; } while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00)); 8025928: d001 beq.n 802592e 802592a: 2900 cmp r1, #0 802592c: d0f2 beq.n 8025914 if ((RTC->ISR & RTC_ISR_RSF) != RESET) 802592e: 68d0 ldr r0, [r2, #12] { status = ERROR; } /* Enable the write protection for RTC registers */ RTC->WPR = 0xFF; 8025930: 23ff movs r3, #255 ; 0xff 8025932: 6253 str r3, [r2, #36] ; 0x24 return (status); } 8025934: f3c0 1040 ubfx r0, r0, #5, #1 8025938: b002 add sp, #8 802593a: 4770 bx lr 802593c: 40002800 .word 0x40002800 08025940 : * @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) { 8025940: b5f8 push {r3, r4, r5, r6, r7, lr} 8025942: 4b24 ldr r3, [pc, #144] ; (80259d4 ) 8025944: 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) 8025946: 689b ldr r3, [r3, #8] ErrorStatus status = ERROR; /* Check the parameters */ assert_param(IS_RTC_FORMAT(RTC_Format)); if (RTC_Format == RTC_Format_BIN) 8025948: b920 cbnz r0, 8025954 { if ((RTC->CR & RTC_CR_FMT) != (uint32_t)RESET) 802594a: f013 0340 ands.w r3, r3, #64 ; 0x40 802594e: d12e bne.n 80259ae assert_param(IS_RTC_HOUR12(RTC_TimeStruct->RTC_Hours)); assert_param(IS_RTC_H12(RTC_TimeStruct->RTC_H12)); } else { RTC_TimeStruct->RTC_H12 = 0x00; 8025950: 70cb strb r3, [r1, #3] 8025952: e02c b.n 80259ae 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) 8025954: f013 0340 ands.w r3, r3, #64 ; 0x40 8025958: d11e bne.n 8025998 assert_param(IS_RTC_HOUR12(tmpreg)); assert_param(IS_RTC_H12(RTC_TimeStruct->RTC_H12)); } else { RTC_TimeStruct->RTC_H12 = 0x00; 802595a: 70cb strb r3, [r1, #3] 802595c: e01c b.n 8025998 ((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; 802595e: 4c1d ldr r4, [pc, #116] ; (80259d4 ) 8025960: 23ca movs r3, #202 ; 0xca 8025962: 6263 str r3, [r4, #36] ; 0x24 RTC->WPR = 0x53; 8025964: 2353 movs r3, #83 ; 0x53 8025966: 6263 str r3, [r4, #36] ; 0x24 /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) 8025968: f7ff ff7e bl 8025868 802596c: b180 cbz r0, 8025990 status = ERROR; } else { /* Set the RTC_TR register */ RTC->TR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK); 802596e: f005 357f and.w r5, r5, #2139062143 ; 0x7f7f7f7f 8025972: f025 45fe bic.w r5, r5, #2130706432 ; 0x7f000000 8025976: 6025 str r5, [r4, #0] /* Exit Initialization mode */ RTC_ExitInitMode(); 8025978: f7ff ff96 bl 80258a8 /* If RTC_CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */ if ((RTC->CR & RTC_CR_BYPSHAD) == RESET) 802597c: 68a3 ldr r3, [r4, #8] 802597e: 0699 lsls r1, r3, #26 8025980: d405 bmi.n 802598e { if (RTC_WaitForSynchro() == ERROR) 8025982: f7ff ffbb bl 80258fc RTC->WPR = 0x53; /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) { status = ERROR; 8025986: 3000 adds r0, #0 8025988: bf18 it ne 802598a: 2001 movne r0, #1 802598c: e000 b.n 8025990 status = SUCCESS; } } else { status = SUCCESS; 802598e: 2001 movs r0, #1 } } /* Enable the write protection for RTC registers */ RTC->WPR = 0xFF; 8025990: 4b10 ldr r3, [pc, #64] ; (80259d4 ) 8025992: 22ff movs r2, #255 ; 0xff 8025994: 625a str r2, [r3, #36] ; 0x24 8025996: 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) | \ 8025998: 7865 ldrb r5, [r4, #1] } /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = (((uint32_t)(RTC_TimeStruct->RTC_Hours) << 16) | \ 802599a: 7823 ldrb r3, [r4, #0] ((uint32_t)(RTC_TimeStruct->RTC_Minutes) << 8) | \ 802599c: 022d lsls r5, r5, #8 } /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = (((uint32_t)(RTC_TimeStruct->RTC_Hours) << 16) | \ 802599e: ea45 4503 orr.w r5, r5, r3, lsl #16 ((uint32_t)(RTC_TimeStruct->RTC_Minutes) << 8) | \ ((uint32_t)RTC_TimeStruct->RTC_Seconds) | \ 80259a2: 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) | \ 80259a4: 431d orrs r5, r3 ((uint32_t)RTC_TimeStruct->RTC_Seconds) | \ ((uint32_t)(RTC_TimeStruct->RTC_H12) << 16)); 80259a6: 78e3 ldrb r3, [r4, #3] } /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = (((uint32_t)(RTC_TimeStruct->RTC_Hours) << 16) | \ 80259a8: ea45 4503 orr.w r5, r5, r3, lsl #16 80259ac: e7d7 b.n 802595e ((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) | \ 80259ae: 7820 ldrb r0, [r4, #0] 80259b0: f7ff ff46 bl 8025840 80259b4: 4607 mov r7, r0 ((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Minutes) << 8) | \ 80259b6: 7860 ldrb r0, [r4, #1] 80259b8: f7ff ff42 bl 8025840 80259bc: 4606 mov r6, r0 ((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Seconds)) | \ 80259be: 78a0 ldrb r0, [r4, #2] 80259c0: f7ff ff3e bl 8025840 (((uint32_t)RTC_TimeStruct->RTC_H12) << 16)); 80259c4: 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) | \ 80259c6: ea40 4005 orr.w r0, r0, r5, lsl #16 ((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Minutes) << 8) | \ 80259ca: 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) | \ 80259ce: ea45 2506 orr.w r5, r5, r6, lsl #8 80259d2: e7c4 b.n 802595e 80259d4: 40002800 .word 0x40002800 080259d8 : /* Check the parameters */ assert_param(IS_RTC_FORMAT(RTC_Format)); /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->TR & RTC_TR_RESERVED_MASK); 80259d8: 4b0f ldr r3, [pc, #60] ; (8025a18 ) 80259da: 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) { 80259dc: 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); 80259de: f3c3 4205 ubfx r2, r3, #16, #6 RTC_TimeStruct->RTC_Minutes = (uint8_t)((tmpreg & (RTC_TR_MNT | RTC_TR_MNU)) >>8); 80259e2: f3c3 2606 ubfx r6, r3, #8, #7 RTC_TimeStruct->RTC_Seconds = (uint8_t)(tmpreg & (RTC_TR_ST | RTC_TR_SU)); 80259e6: f003 057f and.w r5, r3, #127 ; 0x7f RTC_TimeStruct->RTC_H12 = (uint8_t)((tmpreg & (RTC_TR_PM)) >> 16); 80259ea: f403 0380 and.w r3, r3, #4194304 ; 0x400000 80259ee: 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) { 80259f0: 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); 80259f2: 700a strb r2, [r1, #0] RTC_TimeStruct->RTC_Minutes = (uint8_t)((tmpreg & (RTC_TR_MNT | RTC_TR_MNU)) >>8); 80259f4: 704e strb r6, [r1, #1] RTC_TimeStruct->RTC_Seconds = (uint8_t)(tmpreg & (RTC_TR_ST | RTC_TR_SU)); 80259f6: 708d strb r5, [r1, #2] RTC_TimeStruct->RTC_H12 = (uint8_t)((tmpreg & (RTC_TR_PM)) >> 16); 80259f8: 70cb strb r3, [r1, #3] /* Check the input parameters format */ if (RTC_Format == RTC_Format_BIN) 80259fa: b958 cbnz r0, 8025a14 { /* Convert the structure parameters to Binary format */ RTC_TimeStruct->RTC_Hours = (uint8_t)RTC_Bcd2ToByte(RTC_TimeStruct->RTC_Hours); 80259fc: 4610 mov r0, r2 80259fe: f7ff ff2b bl 8025858 8025a02: 7020 strb r0, [r4, #0] RTC_TimeStruct->RTC_Minutes = (uint8_t)RTC_Bcd2ToByte(RTC_TimeStruct->RTC_Minutes); 8025a04: 4630 mov r0, r6 8025a06: f7ff ff27 bl 8025858 8025a0a: 7060 strb r0, [r4, #1] RTC_TimeStruct->RTC_Seconds = (uint8_t)RTC_Bcd2ToByte(RTC_TimeStruct->RTC_Seconds); 8025a0c: 4628 mov r0, r5 8025a0e: f7ff ff23 bl 8025858 8025a12: 70a0 strb r0, [r4, #2] 8025a14: bd70 pop {r4, r5, r6, pc} 8025a16: bf00 nop 8025a18: 40002800 .word 0x40002800 08025a1c : * @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) { 8025a1c: b5f8 push {r3, r4, r5, r6, r7, lr} 8025a1e: 460c mov r4, r1 8025a20: 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)) 8025a22: 2800 cmp r0, #0 8025a24: d138 bne.n 8025a98 8025a26: f003 0210 and.w r2, r3, #16 8025a2a: b2d2 uxtb r2, r2 8025a2c: b30a cbz r2, 8025a72 { RTC_DateStruct->RTC_Month = (RTC_DateStruct->RTC_Month & (uint32_t)~(0x10)) + 0x0A; 8025a2e: f023 0310 bic.w r3, r3, #16 8025a32: 330a adds r3, #10 8025a34: 704b strb r3, [r1, #1] 8025a36: e01c b.n 8025a72 ((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; 8025a38: 4c1c ldr r4, [pc, #112] ; (8025aac ) 8025a3a: 23ca movs r3, #202 ; 0xca 8025a3c: 6263 str r3, [r4, #36] ; 0x24 RTC->WPR = 0x53; 8025a3e: 2353 movs r3, #83 ; 0x53 8025a40: 6263 str r3, [r4, #36] ; 0x24 /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) 8025a42: f7ff ff11 bl 8025868 8025a46: b180 cbz r0, 8025a6a status = ERROR; } else { /* Set the RTC_DR register */ RTC->DR = (uint32_t)(tmpreg & RTC_DR_RESERVED_MASK); 8025a48: f025 457f bic.w r5, r5, #4278190080 ; 0xff000000 8025a4c: f025 05c0 bic.w r5, r5, #192 ; 0xc0 8025a50: 6065 str r5, [r4, #4] /* Exit Initialization mode */ RTC_ExitInitMode(); 8025a52: f7ff ff29 bl 80258a8 /* If RTC_CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */ if ((RTC->CR & RTC_CR_BYPSHAD) == RESET) 8025a56: 68a3 ldr r3, [r4, #8] 8025a58: 0698 lsls r0, r3, #26 8025a5a: d405 bmi.n 8025a68 { if (RTC_WaitForSynchro() == ERROR) 8025a5c: f7ff ff4e bl 80258fc RTC->WPR = 0x53; /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) { status = ERROR; 8025a60: 3000 adds r0, #0 8025a62: bf18 it ne 8025a64: 2001 movne r0, #1 8025a66: e000 b.n 8025a6a status = SUCCESS; } } else { status = SUCCESS; 8025a68: 2001 movs r0, #1 } } /* Enable the write protection for RTC registers */ RTC->WPR = 0xFF; 8025a6a: 4b10 ldr r3, [pc, #64] ; (8025aac ) 8025a6c: 22ff movs r2, #255 ; 0xff 8025a6e: 625a str r2, [r3, #36] ; 0x24 8025a70: 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) | \ 8025a72: 78e0 ldrb r0, [r4, #3] 8025a74: f7ff fee4 bl 8025840 8025a78: 4607 mov r7, r0 ((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Month) << 8) | \ 8025a7a: 7860 ldrb r0, [r4, #1] 8025a7c: f7ff fee0 bl 8025840 8025a80: 4606 mov r6, r0 ((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Date)) | \ 8025a82: 78a0 ldrb r0, [r4, #2] 8025a84: f7ff fedc bl 8025840 ((uint32_t)RTC_DateStruct->RTC_WeekDay << 13)); 8025a88: 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) | \ 8025a8a: ea40 3045 orr.w r0, r0, r5, lsl #13 ((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Month) << 8) | \ 8025a8e: 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) | \ 8025a92: ea45 2506 orr.w r5, r5, r6, lsl #8 8025a96: e7cf b.n 8025a38 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) | \ 8025a98: 78cd ldrb r5, [r1, #3] (((uint32_t)RTC_DateStruct->RTC_Month) << 8) | \ ((uint32_t)RTC_DateStruct->RTC_Date) | \ 8025a9a: 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) | \ 8025a9c: 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) | \ 8025a9e: 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)); 8025aa2: 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) | \ 8025aa4: 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) | \ 8025aa6: ea45 3543 orr.w r5, r5, r3, lsl #13 8025aaa: e7c5 b.n 8025a38 8025aac: 40002800 .word 0x40002800 08025ab0 : /* Check the parameters */ assert_param(IS_RTC_FORMAT(RTC_Format)); /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->DR & RTC_DR_RESERVED_MASK); 8025ab0: 4b0e ldr r3, [pc, #56] ; (8025aec ) 8025ab2: 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) { 8025ab4: 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); 8025ab6: f3c3 4207 ubfx r2, r3, #16, #8 RTC_DateStruct->RTC_Month = (uint8_t)((tmpreg & (RTC_DR_MT | RTC_DR_MU)) >> 8); 8025aba: f3c3 2604 ubfx r6, r3, #8, #5 RTC_DateStruct->RTC_Date = (uint8_t)(tmpreg & (RTC_DR_DT | RTC_DR_DU)); 8025abe: f003 053f and.w r5, r3, #63 ; 0x3f RTC_DateStruct->RTC_WeekDay = (uint8_t)((tmpreg & (RTC_DR_WDU)) >> 13); 8025ac2: 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) { 8025ac6: 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); 8025ac8: 70ca strb r2, [r1, #3] RTC_DateStruct->RTC_Month = (uint8_t)((tmpreg & (RTC_DR_MT | RTC_DR_MU)) >> 8); 8025aca: 704e strb r6, [r1, #1] RTC_DateStruct->RTC_Date = (uint8_t)(tmpreg & (RTC_DR_DT | RTC_DR_DU)); 8025acc: 708d strb r5, [r1, #2] RTC_DateStruct->RTC_WeekDay = (uint8_t)((tmpreg & (RTC_DR_WDU)) >> 13); 8025ace: 700b strb r3, [r1, #0] /* Check the input parameters format */ if (RTC_Format == RTC_Format_BIN) 8025ad0: b958 cbnz r0, 8025aea { /* Convert the structure parameters to Binary format */ RTC_DateStruct->RTC_Year = (uint8_t)RTC_Bcd2ToByte(RTC_DateStruct->RTC_Year); 8025ad2: 4610 mov r0, r2 8025ad4: f7ff fec0 bl 8025858 8025ad8: 70e0 strb r0, [r4, #3] RTC_DateStruct->RTC_Month = (uint8_t)RTC_Bcd2ToByte(RTC_DateStruct->RTC_Month); 8025ada: 4630 mov r0, r6 8025adc: f7ff febc bl 8025858 8025ae0: 7060 strb r0, [r4, #1] RTC_DateStruct->RTC_Date = (uint8_t)RTC_Bcd2ToByte(RTC_DateStruct->RTC_Date); 8025ae2: 4628 mov r0, r5 8025ae4: f7ff feb8 bl 8025858 8025ae8: 70a0 strb r0, [r4, #2] 8025aea: bd70 pop {r4, r5, r6, pc} 8025aec: 40002800 .word 0x40002800 08025af0 : * 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) { 8025af0: b082 sub sp, #8 __IO uint32_t tmp = 0; 8025af2: 2300 movs r3, #0 8025af4: 9301 str r3, [sp, #4] /* Check the parameters */ assert_param(IS_RTC_BKP(RTC_BKP_DR)); tmp = RTC_BASE + 0x50; 8025af6: 4b05 ldr r3, [pc, #20] ; (8025b0c ) 8025af8: 9301 str r3, [sp, #4] tmp += (RTC_BKP_DR * 4); 8025afa: 9b01 ldr r3, [sp, #4] 8025afc: eb03 0080 add.w r0, r3, r0, lsl #2 8025b00: 9001 str r0, [sp, #4] /* Write the specified register */ *(__IO uint32_t *)tmp = (uint32_t)Data; 8025b02: 9b01 ldr r3, [sp, #4] 8025b04: 6019 str r1, [r3, #0] } 8025b06: b002 add sp, #8 8025b08: 4770 bx lr 8025b0a: bf00 nop 8025b0c: 40002850 .word 0x40002850 08025b10 : * 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) { 8025b10: b082 sub sp, #8 __IO uint32_t tmp = 0; 8025b12: 2300 movs r3, #0 8025b14: 9301 str r3, [sp, #4] /* Check the parameters */ assert_param(IS_RTC_BKP(RTC_BKP_DR)); tmp = RTC_BASE + 0x50; 8025b16: 4b05 ldr r3, [pc, #20] ; (8025b2c ) 8025b18: 9301 str r3, [sp, #4] tmp += (RTC_BKP_DR * 4); 8025b1a: 9b01 ldr r3, [sp, #4] 8025b1c: eb03 0080 add.w r0, r3, r0, lsl #2 8025b20: 9001 str r0, [sp, #4] /* Read the specified register */ return (*(__IO uint32_t *)tmp); 8025b22: 9b01 ldr r3, [sp, #4] 8025b24: 6818 ldr r0, [r3, #0] } 8025b26: b002 add sp, #8 8025b28: 4770 bx lr 8025b2a: bf00 nop 8025b2c: 40002850 .word 0x40002850 08025b30 : /* 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)); 8025b30: 4b0a ldr r3, [pc, #40] ; (8025b5c ) 8025b32: 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) { 8025b34: 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))); 8025b36: 689c ldr r4, [r3, #8] /* Get the Interrupt pending bit */ tmpreg = (uint32_t)((RTC->ISR & (uint32_t)(RTC_IT >> 4))); 8025b38: 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)); 8025b3a: f002 0204 and.w r2, r2, #4 /* Get the Interrupt enable Status */ enablestatus = (uint32_t)((RTC->CR & RTC_IT) | (tmpreg & (RTC_IT >> 15))); 8025b3e: ea02 32d0 and.w r2, r2, r0, lsr #15 8025b42: 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)) 8025b46: 4313 orrs r3, r2 8025b48: d006 beq.n 8025b58 /* 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))); 8025b4a: b28b uxth r3, r1 /* Get the status of the Interrupt */ if ((enablestatus != (uint32_t)RESET) && ((tmpreg & 0x0000FFFF) != (uint32_t)RESET)) 8025b4c: ea13 1310 ands.w r3, r3, r0, lsr #4 { bitstatus = SET; 8025b50: bf0c ite eq 8025b52: 2000 moveq r0, #0 8025b54: 2001 movne r0, #1 8025b56: bd10 pop {r4, pc} } else { bitstatus = RESET; 8025b58: 4618 mov r0, r3 } return bitstatus; } 8025b5a: bd10 pop {r4, pc} 8025b5c: 40002800 .word 0x40002800 08025b60 : /* 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))); 8025b60: 4b05 ldr r3, [pc, #20] ; (8025b78 ) 8025b62: 68da ldr r2, [r3, #12] 8025b64: f3c0 100f ubfx r0, r0, #4, #16 8025b68: f040 0080 orr.w r0, r0, #128 ; 0x80 8025b6c: f002 0280 and.w r2, r2, #128 ; 0x80 8025b70: ea62 0200 orn r2, r2, r0 8025b74: 60da str r2, [r3, #12] 8025b76: 4770 bx lr 8025b78: 40002800 .word 0x40002800 08025b7c : */ 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; 8025b7c: 4b01 ldr r3, [pc, #4] ; (8025b84 ) 8025b7e: 6018 str r0, [r3, #0] 8025b80: 4770 bx lr 8025b82: bf00 nop 8025b84: 422700dc .word 0x422700dc 08025b88 : { /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); /* Clear the IT pending Bit */ TIMx->SR = (uint16_t)~TIM_IT; 8025b88: 43c9 mvns r1, r1 8025b8a: 8201 strh r1, [r0, #16] 8025b8c: 4770 bx lr 8025b8e: 0000 movs r0, r0 08025b90 : * @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) { 8025b90: b508 push {r3, lr} /* Check the parameters */ assert_param(IS_USART_ALL_PERIPH(USARTx)); if (USARTx == USART1) 8025b92: 4b23 ldr r3, [pc, #140] ; (8025c20 ) 8025b94: 4298 cmp r0, r3 8025b96: d105 bne.n 8025ba4 { RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART1, ENABLE); 8025b98: 2010 movs r0, #16 8025b9a: 2101 movs r1, #1 8025b9c: f7ff fe1e bl 80257dc RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART1, DISABLE); 8025ba0: 2010 movs r0, #16 8025ba2: e037 b.n 8025c14 } else if (USARTx == USART2) 8025ba4: 4b1f ldr r3, [pc, #124] ; (8025c24 ) 8025ba6: 4298 cmp r0, r3 8025ba8: d107 bne.n 8025bba { RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART2, ENABLE); 8025baa: f44f 3000 mov.w r0, #131072 ; 0x20000 8025bae: 2101 movs r1, #1 8025bb0: f7ff fe08 bl 80257c4 RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART2, DISABLE); 8025bb4: f44f 3000 mov.w r0, #131072 ; 0x20000 8025bb8: e009 b.n 8025bce } else if (USARTx == USART3) 8025bba: 4b1b ldr r3, [pc, #108] ; (8025c28 ) 8025bbc: 4298 cmp r0, r3 8025bbe: d10b bne.n 8025bd8 { RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART3, ENABLE); 8025bc0: f44f 2080 mov.w r0, #262144 ; 0x40000 8025bc4: 2101 movs r1, #1 8025bc6: f7ff fdfd bl 80257c4 RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART3, DISABLE); 8025bca: f44f 2080 mov.w r0, #262144 ; 0x40000 8025bce: 2100 movs r1, #0 { RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, DISABLE); } } } 8025bd0: 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); 8025bd4: f7ff bdf6 b.w 80257c4 } else if (USARTx == UART4) 8025bd8: 4b14 ldr r3, [pc, #80] ; (8025c2c ) 8025bda: 4298 cmp r0, r3 8025bdc: d107 bne.n 8025bee { RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART4, ENABLE); 8025bde: f44f 2000 mov.w r0, #524288 ; 0x80000 8025be2: 2101 movs r1, #1 8025be4: f7ff fdee bl 80257c4 RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART4, DISABLE); 8025be8: f44f 2000 mov.w r0, #524288 ; 0x80000 8025bec: e7ef b.n 8025bce } else if (USARTx == UART5) 8025bee: 4b10 ldr r3, [pc, #64] ; (8025c30 ) 8025bf0: 4298 cmp r0, r3 8025bf2: d107 bne.n 8025c04 { RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART5, ENABLE); 8025bf4: f44f 1080 mov.w r0, #1048576 ; 0x100000 8025bf8: 2101 movs r1, #1 8025bfa: f7ff fde3 bl 80257c4 RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART5, DISABLE); 8025bfe: f44f 1080 mov.w r0, #1048576 ; 0x100000 8025c02: e7e4 b.n 8025bce } else { if (USARTx == USART6) 8025c04: 4b0b ldr r3, [pc, #44] ; (8025c34 ) 8025c06: 4298 cmp r0, r3 8025c08: d109 bne.n 8025c1e { RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, ENABLE); 8025c0a: 2020 movs r0, #32 8025c0c: 2101 movs r1, #1 8025c0e: f7ff fde5 bl 80257dc RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, DISABLE); 8025c12: 2020 movs r0, #32 8025c14: 2100 movs r1, #0 } } } 8025c16: e8bd 4008 ldmia.w sp!, {r3, lr} else { if (USARTx == USART6) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, DISABLE); 8025c1a: f7ff bddf b.w 80257dc 8025c1e: bd08 pop {r3, pc} 8025c20: 40011000 .word 0x40011000 8025c24: 40004400 .word 0x40004400 8025c28: 40004800 .word 0x40004800 8025c2c: 40004c00 .word 0x40004c00 8025c30: 40005000 .word 0x40005000 8025c34: 40011400 .word 0x40011400 08025c38 : { assert_param(IS_USART_1236_PERIPH(USARTx)); } /*---------------------------- USART CR2 Configuration -----------------------*/ tmpreg = USARTx->CR2; 8025c38: 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; 8025c3a: 88ca ldrh r2, [r1, #6] { assert_param(IS_USART_1236_PERIPH(USARTx)); } /*---------------------------- USART CR2 Configuration -----------------------*/ tmpreg = USARTx->CR2; 8025c3c: b29b uxth r3, r3 /* Clear STOP[13:12] bits */ tmpreg &= (uint32_t)~((uint32_t)USART_CR2_STOP); 8025c3e: 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) { 8025c42: 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; 8025c44: 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) { 8025c46: 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; 8025c48: 8203 strh r3, [r0, #16] /*---------------------------- USART CR1 Configuration -----------------------*/ tmpreg = USARTx->CR1; 8025c4a: 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 | 8025c4c: 8909 ldrh r1, [r1, #8] 8025c4e: 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); 8025c50: 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 | 8025c54: 430a orrs r2, r1 8025c56: 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); 8025c58: f023 030c bic.w r3, r3, #12 8025c5c: 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 | 8025c5e: 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); 8025c60: 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 | 8025c62: b292 uxth r2, r2 USART_InitStruct->USART_Mode; /* Write to USART CR1 */ USARTx->CR1 = (uint16_t)tmpreg; 8025c64: 4313 orrs r3, r2 8025c66: 8183 strh r3, [r0, #12] /*---------------------------- USART CR3 Configuration -----------------------*/ tmpreg = USARTx->CR3; 8025c68: 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; 8025c6a: 89aa ldrh r2, [r5, #12] /* Write to USART CR1 */ USARTx->CR1 = (uint16_t)tmpreg; /*---------------------------- USART CR3 Configuration -----------------------*/ tmpreg = USARTx->CR3; 8025c6c: b29b uxth r3, r3 /* Clear CTSE and RTSE bits */ tmpreg &= (uint32_t)~((uint32_t)CR3_CLEAR_MASK); 8025c6e: 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; 8025c72: 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) { 8025c74: 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; 8025c76: 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) { 8025c78: 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); 8025c7a: 4668 mov r0, sp 8025c7c: f7ff fd02 bl 8025684 if ((USARTx == USART1) || (USARTx == USART6)) 8025c80: 4b19 ldr r3, [pc, #100] ; (8025ce8 ) 8025c82: 429c cmp r4, r3 8025c84: d003 beq.n 8025c8e 8025c86: f503 6380 add.w r3, r3, #1024 ; 0x400 8025c8a: 429c cmp r4, r3 8025c8c: d101 bne.n 8025c92 { apbclock = RCC_ClocksStatus.PCLK2_Frequency; 8025c8e: 9b03 ldr r3, [sp, #12] 8025c90: e000 b.n 8025c94 } else { apbclock = RCC_ClocksStatus.PCLK1_Frequency; 8025c92: 9b02 ldr r3, [sp, #8] } /* Determine the integer part */ if ((USARTx->CR1 & USART_CR1_OVER8) != 0) 8025c94: 89a2 ldrh r2, [r4, #12] 8025c96: b212 sxth r2, r2 8025c98: 2a00 cmp r2, #0 8025c9a: f04f 0119 mov.w r1, #25 8025c9e: 682a ldr r2, [r5, #0] { /* Integer part computing in case Oversampling mode is 8 Samples */ integerdivider = ((25 * apbclock) / (2 * (USART_InitStruct->USART_BaudRate))); 8025ca0: fb01 f103 mul.w r1, r1, r3 { apbclock = RCC_ClocksStatus.PCLK1_Frequency; } /* Determine the integer part */ if ((USARTx->CR1 & USART_CR1_OVER8) != 0) 8025ca4: da01 bge.n 8025caa { /* Integer part computing in case Oversampling mode is 8 Samples */ integerdivider = ((25 * apbclock) / (2 * (USART_InitStruct->USART_BaudRate))); 8025ca6: 0052 lsls r2, r2, #1 8025ca8: e000 b.n 8025cac } 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))); 8025caa: 0092 lsls r2, r2, #2 } tmpreg = (integerdivider / 100) << 4; 8025cac: 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))); 8025cae: fbb1 f1f2 udiv r1, r1, r2 } tmpreg = (integerdivider / 100) << 4; 8025cb2: fbb1 f2f3 udiv r2, r1, r3 8025cb6: 0112 lsls r2, r2, #4 /* Determine the fractional part */ fractionaldivider = integerdivider - (100 * (tmpreg >> 4)); 8025cb8: 0910 lsrs r0, r2, #4 8025cba: fb03 1110 mls r1, r3, r0, r1 /* Implement the fractional part in the register */ if ((USARTx->CR1 & USART_CR1_OVER8) != 0) 8025cbe: 89a0 ldrh r0, [r4, #12] 8025cc0: b200 sxth r0, r0 8025cc2: 2800 cmp r0, #0 8025cc4: da06 bge.n 8025cd4 { tmpreg |= ((((fractionaldivider * 8) + 50) / 100)) & ((uint8_t)0x07); 8025cc6: 00c9 lsls r1, r1, #3 8025cc8: 3132 adds r1, #50 ; 0x32 8025cca: fbb1 f3f3 udiv r3, r1, r3 8025cce: f003 0307 and.w r3, r3, #7 8025cd2: e005 b.n 8025ce0 } else /* if ((USARTx->CR1 & USART_CR1_OVER8) == 0) */ { tmpreg |= ((((fractionaldivider * 16) + 50) / 100)) & ((uint8_t)0x0F); 8025cd4: 0109 lsls r1, r1, #4 8025cd6: 3132 adds r1, #50 ; 0x32 8025cd8: fbb1 f3f3 udiv r3, r1, r3 8025cdc: f003 030f and.w r3, r3, #15 8025ce0: 431a orrs r2, r3 } /* Write to USART BRR register */ USARTx->BRR = (uint16_t)tmpreg; 8025ce2: 8122 strh r2, [r4, #8] } 8025ce4: b005 add sp, #20 8025ce6: bd30 pop {r4, r5, pc} 8025ce8: 40011000 .word 0x40011000 08025cec : 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; 8025cec: 8983 ldrh r3, [r0, #12] { /* Check the parameters */ assert_param(IS_USART_ALL_PERIPH(USARTx)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8025cee: b119 cbz r1, 8025cf8 { /* Enable the selected USART by setting the UE bit in the CR1 register */ USARTx->CR1 |= USART_CR1_UE; 8025cf0: b29b uxth r3, r3 8025cf2: f443 5300 orr.w r3, r3, #8192 ; 0x2000 8025cf6: e003 b.n 8025d00 } else { /* Disable the selected USART by clearing the UE bit in the CR1 register */ USARTx->CR1 &= (uint16_t)~((uint16_t)USART_CR1_UE); 8025cf8: f423 5300 bic.w r3, r3, #8192 ; 0x2000 8025cfc: 041b lsls r3, r3, #16 8025cfe: 0c1b lsrs r3, r3, #16 8025d00: 8183 strh r3, [r0, #12] 8025d02: 4770 bx lr 08025d04 : } usartxbase = (uint32_t)USARTx; /* Get the USART register index */ usartreg = (((uint8_t)USART_IT) >> 0x05); 8025d04: 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) { 8025d08: 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); 8025d0a: 2401 movs r4, #1 8025d0c: f001 011f and.w r1, r1, #31 if (usartreg == 0x01) /* The IT is in CR1 register */ 8025d10: 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); 8025d12: fa04 f101 lsl.w r1, r4, r1 if (usartreg == 0x01) /* The IT is in CR1 register */ 8025d16: d101 bne.n 8025d1c { usartxbase += 0x0C; 8025d18: 300c adds r0, #12 8025d1a: e004 b.n 8025d26 } else if (usartreg == 0x02) /* The IT is in CR2 register */ 8025d1c: 2b02 cmp r3, #2 8025d1e: d101 bne.n 8025d24 { usartxbase += 0x10; 8025d20: 3010 adds r0, #16 8025d22: e000 b.n 8025d26 } else /* The IT is in CR3 register */ { usartxbase += 0x14; 8025d24: 3014 adds r0, #20 } if (NewState != DISABLE) { *(__IO uint32_t*)usartxbase |= itmask; 8025d26: 6803 ldr r3, [r0, #0] } else /* The IT is in CR3 register */ { usartxbase += 0x14; } if (NewState != DISABLE) 8025d28: b10a cbz r2, 8025d2e { *(__IO uint32_t*)usartxbase |= itmask; 8025d2a: 4319 orrs r1, r3 8025d2c: e001 b.n 8025d32 } else { *(__IO uint32_t*)usartxbase &= ~itmask; 8025d2e: ea23 0101 bic.w r1, r3, r1 8025d32: 6001 str r1, [r0, #0] 8025d34: bd10 pop {r4, pc} 08025d36 : * @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) { 8025d36: b510 push {r4, lr} { assert_param(IS_USART_1236_PERIPH(USARTx)); } /* Get the USART register index */ usartreg = (((uint8_t)USART_IT) >> 0x05); 8025d38: f3c1 1442 ubfx r4, r1, #5, #3 /* Get the interrupt position */ itmask = USART_IT & IT_MASK; itmask = (uint32_t)0x01 << itmask; 8025d3c: 2201 movs r2, #1 8025d3e: f001 031f and.w r3, r1, #31 if (usartreg == 0x01) /* The IT is in CR1 register */ 8025d42: 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; 8025d44: fa02 f203 lsl.w r2, r2, r3 if (usartreg == 0x01) /* The IT is in CR1 register */ 8025d48: d101 bne.n 8025d4e { itmask &= USARTx->CR1; 8025d4a: 8983 ldrh r3, [r0, #12] 8025d4c: e003 b.n 8025d56 } else if (usartreg == 0x02) /* The IT is in CR2 register */ 8025d4e: 2c02 cmp r4, #2 { itmask &= USARTx->CR2; 8025d50: bf0c ite eq 8025d52: 8a03 ldrheq r3, [r0, #16] } else /* The IT is in CR3 register */ { itmask &= USARTx->CR3; 8025d54: 8a83 ldrhne r3, [r0, #20] 8025d56: b29b uxth r3, r3 8025d58: 4013 ands r3, r2 } bitpos = USART_IT >> 0x08; bitpos = (uint32_t)0x01 << bitpos; bitpos &= USARTx->SR; 8025d5a: 8802 ldrh r2, [r0, #0] 8025d5c: b292 uxth r2, r2 if ((itmask != (uint16_t)RESET)&&(bitpos != (uint16_t)RESET)) 8025d5e: b143 cbz r3, 8025d72 { itmask &= USARTx->CR3; } bitpos = USART_IT >> 0x08; bitpos = (uint32_t)0x01 << bitpos; 8025d60: 2301 movs r3, #1 8025d62: 0a09 lsrs r1, r1, #8 8025d64: fa03 f101 lsl.w r1, r3, r1 bitpos &= USARTx->SR; if ((itmask != (uint16_t)RESET)&&(bitpos != (uint16_t)RESET)) 8025d68: 4211 tst r1, r2 { bitstatus = SET; 8025d6a: bf0c ite eq 8025d6c: 2000 moveq r0, #0 8025d6e: 2001 movne r0, #1 8025d70: bd10 pop {r4, pc} } else { bitstatus = RESET; 8025d72: 4618 mov r0, r3 } return bitstatus; } 8025d74: bd10 pop {r4, pc} 08025d76 : { assert_param(IS_USART_1236_PERIPH(USARTx)); } bitpos = USART_IT >> 0x08; itmask = ((uint16_t)0x01 << (uint16_t)bitpos); 8025d76: 0a09 lsrs r1, r1, #8 8025d78: 2301 movs r3, #1 8025d7a: fa03 f301 lsl.w r3, r3, r1 USARTx->SR = (uint16_t)~itmask; 8025d7e: 43db mvns r3, r3 8025d80: 8003 strh r3, [r0, #0] 8025d82: 4770 bx lr 08025d84 : 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; 8025d84: 4b35 ldr r3, [pc, #212] ; (8025e5c ) 8025d86: 681a ldr r2, [r3, #0] 8025d88: f042 0201 orr.w r2, r2, #1 8025d8c: 601a str r2, [r3, #0] /* Reset CFGR register */ RCC->CFGR = 0x00000000; 8025d8e: 2200 movs r2, #0 8025d90: 609a str r2, [r3, #8] /* Reset HSEON, CSSON and PLLON bits */ RCC->CR &= (uint32_t)0xFEF6FFFF; 8025d92: 6819 ldr r1, [r3, #0] 8025d94: f021 7184 bic.w r1, r1, #17301504 ; 0x1080000 8025d98: f421 3180 bic.w r1, r1, #65536 ; 0x10000 8025d9c: 6019 str r1, [r3, #0] /* Reset PLLCFGR register */ RCC->PLLCFGR = 0x24003010; 8025d9e: 4930 ldr r1, [pc, #192] ; (8025e60 ) 8025da0: 6059 str r1, [r3, #4] /* Reset HSEBYP bit */ RCC->CR &= (uint32_t)0xFFFBFFFF; 8025da2: 6819 ldr r1, [r3, #0] * SystemFrequency variable. * @param None * @retval None */ void SystemInit(void) { 8025da4: b082 sub sp, #8 /* Reset PLLCFGR register */ RCC->PLLCFGR = 0x24003010; /* Reset HSEBYP bit */ RCC->CR &= (uint32_t)0xFFFBFFFF; 8025da6: f421 2180 bic.w r1, r1, #262144 ; 0x40000 8025daa: 6019 str r1, [r3, #0] /* Disable all interrupts */ RCC->CIR = 0x00000000; 8025dac: 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; 8025dae: 9200 str r2, [sp, #0] 8025db0: 9201 str r2, [sp, #4] /* Enable HSE */ RCC->CR |= ((uint32_t)RCC_CR_HSEON); 8025db2: 681a ldr r2, [r3, #0] 8025db4: f442 3280 orr.w r2, r2, #65536 ; 0x10000 8025db8: 601a str r2, [r3, #0] /* Wait till HSE is ready and if Time out is reached exit */ do { HSEStatus = RCC->CR & RCC_CR_HSERDY; 8025dba: 681a ldr r2, [r3, #0] 8025dbc: f402 3200 and.w r2, r2, #131072 ; 0x20000 8025dc0: 9201 str r2, [sp, #4] StartUpCounter++; 8025dc2: 9a00 ldr r2, [sp, #0] 8025dc4: 3201 adds r2, #1 8025dc6: 9200 str r2, [sp, #0] } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT)); 8025dc8: 9a01 ldr r2, [sp, #4] 8025dca: b91a cbnz r2, 8025dd4 8025dcc: 9a00 ldr r2, [sp, #0] 8025dce: f5b2 6fa0 cmp.w r2, #1280 ; 0x500 8025dd2: d1f2 bne.n 8025dba if ((RCC->CR & RCC_CR_HSERDY) != RESET) 8025dd4: 4b21 ldr r3, [pc, #132] ; (8025e5c ) 8025dd6: 681b ldr r3, [r3, #0] 8025dd8: f413 3300 ands.w r3, r3, #131072 ; 0x20000 { HSEStatus = (uint32_t)0x01; 8025ddc: bf18 it ne 8025dde: 2301 movne r3, #1 } else { HSEStatus = (uint32_t)0x00; 8025de0: 9301 str r3, [sp, #4] } if (HSEStatus == (uint32_t)0x01) 8025de2: 9b01 ldr r3, [sp, #4] 8025de4: 2b01 cmp r3, #1 8025de6: d133 bne.n 8025e50 { /* Select regulator voltage output Scale 1 mode, System frequency up to 168 MHz */ RCC->APB1ENR |= RCC_APB1ENR_PWREN; 8025de8: 4b1c ldr r3, [pc, #112] ; (8025e5c ) 8025dea: 6c1a ldr r2, [r3, #64] ; 0x40 8025dec: f042 5280 orr.w r2, r2, #268435456 ; 0x10000000 8025df0: 641a str r2, [r3, #64] ; 0x40 PWR->CR |= PWR_CR_VOS; 8025df2: 4a1c ldr r2, [pc, #112] ; (8025e64 ) 8025df4: 6811 ldr r1, [r2, #0] 8025df6: f441 4180 orr.w r1, r1, #16384 ; 0x4000 8025dfa: 6011 str r1, [r2, #0] /* HCLK = SYSCLK / 1*/ RCC->CFGR |= RCC_CFGR_HPRE_DIV1; 8025dfc: 689a ldr r2, [r3, #8] 8025dfe: 609a str r2, [r3, #8] /* PCLK2 = HCLK / 2*/ RCC->CFGR |= RCC_CFGR_PPRE2_DIV2; 8025e00: 689a ldr r2, [r3, #8] 8025e02: f442 4200 orr.w r2, r2, #32768 ; 0x8000 8025e06: 609a str r2, [r3, #8] /* PCLK1 = HCLK / 4*/ RCC->CFGR |= RCC_CFGR_PPRE1_DIV4; 8025e08: 689a ldr r2, [r3, #8] 8025e0a: f442 52a0 orr.w r2, r2, #5120 ; 0x1400 8025e0e: 609a str r2, [r3, #8] /* Configure the main PLL */ RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | 8025e10: 4a15 ldr r2, [pc, #84] ; (8025e68 ) 8025e12: 605a str r2, [r3, #4] (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24); /* Enable the main PLL */ RCC->CR |= RCC_CR_PLLON; 8025e14: 681a ldr r2, [r3, #0] 8025e16: f042 7280 orr.w r2, r2, #16777216 ; 0x1000000 8025e1a: 601a str r2, [r3, #0] /* Wait till the main PLL is ready */ while((RCC->CR & RCC_CR_PLLRDY) == 0) 8025e1c: 6819 ldr r1, [r3, #0] 8025e1e: 4a0f ldr r2, [pc, #60] ; (8025e5c ) 8025e20: 0189 lsls r1, r1, #6 8025e22: d5fb bpl.n 8025e1c { } /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ FLASH->ACR = FLASH_ACR_ICEN |FLASH_ACR_DCEN |FLASH_ACR_LATENCY_5WS; 8025e24: 4b11 ldr r3, [pc, #68] ; (8025e6c ) 8025e26: f240 6105 movw r1, #1541 ; 0x605 8025e2a: 6019 str r1, [r3, #0] /* Select the main PLL as system clock source */ RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW)); 8025e2c: 6893 ldr r3, [r2, #8] 8025e2e: f023 0303 bic.w r3, r3, #3 8025e32: 6093 str r3, [r2, #8] RCC->CFGR |= RCC_CFGR_SW_PLL; 8025e34: 6893 ldr r3, [r2, #8] 8025e36: f043 0302 orr.w r3, r3, #2 8025e3a: 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); 8025e3c: 6891 ldr r1, [r2, #8] 8025e3e: 4b07 ldr r3, [pc, #28] ; (8025e5c ) 8025e40: f001 010c and.w r1, r1, #12 8025e44: 2908 cmp r1, #8 8025e46: d1f9 bne.n 8025e3c { } /* Добавил переход на внутренний генератор в случае отказа HSE */ RCC->CR|=RCC_CR_CSSON; 8025e48: 681a ldr r2, [r3, #0] 8025e4a: f442 2200 orr.w r2, r2, #524288 ; 0x80000 8025e4e: 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 */ 8025e50: 4b07 ldr r3, [pc, #28] ; (8025e70 ) 8025e52: f04f 6200 mov.w r2, #134217728 ; 0x8000000 8025e56: 609a str r2, [r3, #8] #endif } 8025e58: b002 add sp, #8 8025e5a: 4770 bx lr 8025e5c: 40023800 .word 0x40023800 8025e60: 24003010 .word 0x24003010 8025e64: 40007000 .word 0x40007000 8025e68: 07405419 .word 0x07405419 8025e6c: 40023c00 .word 0x40023c00 8025e70: e000ed00 .word 0xe000ed00 08025e74 : 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; 8025e74: 004b lsls r3, r1, #1 port->MODER &= ~(GPIO_MODER_MASK << shift); 8025e76: 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) { 8025e78: b570 push {r4, r5, r6, lr} uint8_t shift; shift = pin * 2; port->MODER &= ~(GPIO_MODER_MASK << shift); 8025e7a: 2403 movs r4, #3 8025e7c: 6805 ldr r5, [r0, #0] 8025e7e: fa04 f403 lsl.w r4, r4, r3 8025e82: 43e4 mvns r4, r4 8025e84: 4025 ands r5, r4 8025e86: 6005 str r5, [r0, #0] port->MODER |= (uint32_t)((conf >> GPIO_MODE_CFG_SHIFT) & GPIO_MODER_MASK) << shift; 8025e88: 6806 ldr r6, [r0, #0] 8025e8a: f002 0503 and.w r5, r2, #3 8025e8e: fa05 f503 lsl.w r5, r5, r3 8025e92: 4335 orrs r5, r6 8025e94: 6005 str r5, [r0, #0] port->OTYPER &= ~(GPIO_TYPER_MASK << pin); 8025e96: 6846 ldr r6, [r0, #4] 8025e98: 2501 movs r5, #1 8025e9a: fa05 f501 lsl.w r5, r5, r1 8025e9e: ea26 0505 bic.w r5, r6, r5 8025ea2: 6045 str r5, [r0, #4] port->OTYPER |= (uint32_t)((conf >> GPIO_TYPE_CFG_SHIFT) & GPIO_TYPER_MASK) << pin; 8025ea4: 6845 ldr r5, [r0, #4] 8025ea6: f3c2 0680 ubfx r6, r2, #2, #1 8025eaa: fa06 f101 lsl.w r1, r6, r1 8025eae: 4329 orrs r1, r5 8025eb0: 6041 str r1, [r0, #4] port->OSPEEDR &= ~(GPIO_SPEEDR_MASK << shift); 8025eb2: 6881 ldr r1, [r0, #8] 8025eb4: 4021 ands r1, r4 8025eb6: 6081 str r1, [r0, #8] port->OSPEEDR |= (uint32_t)((conf >> GPIO_SPEED_CFG_SHIFT) & GPIO_SPEEDR_MASK) << shift; 8025eb8: 6885 ldr r5, [r0, #8] 8025eba: f3c2 1101 ubfx r1, r2, #4, #2 8025ebe: fa01 f103 lsl.w r1, r1, r3 8025ec2: 4329 orrs r1, r5 8025ec4: 6081 str r1, [r0, #8] port->PUPDR &= ~(GPIO_PUPDR_MASK << shift); 8025ec6: 68c1 ldr r1, [r0, #12] 8025ec8: 400c ands r4, r1 8025eca: 60c4 str r4, [r0, #12] port->PUPDR |= (uint32_t)((conf >> GPIO_PUPD_CFG_SHIFT) & GPIO_PUPDR_MASK) << shift; 8025ecc: 68c1 ldr r1, [r0, #12] 8025ece: f3c2 1281 ubfx r2, r2, #6, #2 8025ed2: fa02 f303 lsl.w r3, r2, r3 8025ed6: 430b orrs r3, r1 8025ed8: 60c3 str r3, [r0, #12] 8025eda: bd70 pop {r4, r5, r6, pc} 08025edc : } void gpio_connect_af(gpio_t id, uint8_t af_n) { 8025edc: b510 push {r4, lr} gpio_pindef_t *pin = &gpio_pins[id]; 8025ede: 4b13 ldr r3, [pc, #76] ; (8025f2c ) 8025ee0: 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); 8025ee4: 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) { 8025ee8: 7912 ldrb r2, [r2, #4] 8025eea: 2a07 cmp r2, #7 8025eec: d80e bhi.n 8025f0c shift = pin->pin * 4; 8025eee: 0092 lsls r2, r2, #2 pin->port->AFR[0] &= ~((uint32_t)GPIO_AFR_MASK << shift); 8025ef0: 6a1c ldr r4, [r3, #32] 8025ef2: b2d2 uxtb r2, r2 8025ef4: 200f movs r0, #15 8025ef6: fa00 f002 lsl.w r0, r0, r2 8025efa: ea24 0000 bic.w r0, r4, r0 8025efe: 6218 str r0, [r3, #32] pin->port->AFR[0] |= af_n << shift; 8025f00: 6a18 ldr r0, [r3, #32] 8025f02: fa01 f202 lsl.w r2, r1, r2 8025f06: 4302 orrs r2, r0 8025f08: 621a str r2, [r3, #32] 8025f0a: bd10 pop {r4, pc} } else { shift = (pin->pin - 8) * 4; 8025f0c: 3a08 subs r2, #8 8025f0e: 0092 lsls r2, r2, #2 pin->port->AFR[1] &= ~((uint32_t)GPIO_AFR_MASK << shift); 8025f10: 6a5c ldr r4, [r3, #36] ; 0x24 8025f12: b2d2 uxtb r2, r2 8025f14: 200f movs r0, #15 8025f16: fa00 f002 lsl.w r0, r0, r2 8025f1a: ea24 0000 bic.w r0, r4, r0 8025f1e: 6258 str r0, [r3, #36] ; 0x24 pin->port->AFR[1] |= af_n << shift; 8025f20: 6a58 ldr r0, [r3, #36] ; 0x24 8025f22: fa01 f202 lsl.w r2, r1, r2 8025f26: 4302 orrs r2, r0 8025f28: 625a str r2, [r3, #36] ; 0x24 8025f2a: bd10 pop {r4, pc} 8025f2c: 200005c0 .word 0x200005c0 08025f30 : } } } void gpio_set(gpio_t pin, bool value) { if (gpio_pins[pin].flags & GPIO_INV) 8025f30: 4b0e ldr r3, [pc, #56] ; (8025f6c ) 8025f32: eb03 02c0 add.w r2, r3, r0, lsl #3 8025f36: 88d2 ldrh r2, [r2, #6] 8025f38: f002 0210 and.w r2, r2, #16 8025f3c: b292 uxth r2, r2 8025f3e: b10a cbz r2, 8025f44 value = !value; 8025f40: f081 0101 eor.w r1, r1, #1 8025f44: 00c2 lsls r2, r0, #3 if (value) 8025f46: b141 cbz r1, 8025f5a gpio_pins[pin].port->BSRRL = 1 << gpio_pins[pin].pin; 8025f48: f853 1030 ldr.w r1, [r3, r0, lsl #3] 8025f4c: 189b adds r3, r3, r2 8025f4e: 2201 movs r2, #1 8025f50: 791b ldrb r3, [r3, #4] 8025f52: fa02 f303 lsl.w r3, r2, r3 8025f56: 830b strh r3, [r1, #24] 8025f58: 4770 bx lr else gpio_pins[pin].port->BSRRH = 1 << gpio_pins[pin].pin; 8025f5a: f853 1030 ldr.w r1, [r3, r0, lsl #3] 8025f5e: 189b adds r3, r3, r2 8025f60: 2201 movs r2, #1 8025f62: 791b ldrb r3, [r3, #4] 8025f64: fa02 f303 lsl.w r3, r2, r3 8025f68: 834b strh r3, [r1, #26] 8025f6a: 4770 bx lr 8025f6c: 200005c0 .word 0x200005c0 08025f70 : } /* * TODO add analog flag and setup ADC pins in a proper way */ static void gpio_set_config(gpio_t id) { 8025f70: b570 push {r4, r5, r6, lr} gpio_pindef_t *pin = &gpio_pins[id]; 8025f72: 4e1e ldr r6, [pc, #120] ; (8025fec ) 8025f74: 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) { 8025f78: 4604 mov r4, r0 gpio_pindef_t *pin = &gpio_pins[id]; if (pin->flags & GPIO_AF) { 8025f7a: 88e9 ldrh r1, [r5, #6] 8025f7c: f401 7300 and.w r3, r1, #512 ; 0x200 8025f80: b29b uxth r3, r3 8025f82: b13b cbz r3, 8025f94 uint8_t af_n = (uint8_t)(pin->flags >> _GPIO_AF_SHIFT); gpio_connect_af(id, af_n); 8025f84: 0a89 lsrs r1, r1, #10 8025f86: f7ff ffa9 bl 8025edc gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_AF_CFG | 8025f8a: f856 0034 ldr.w r0, [r6, r4, lsl #3] 8025f8e: 7929 ldrb r1, [r5, #4] 8025f90: 2232 movs r2, #50 ; 0x32 8025f92: e005 b.n 8025fa0 GPIO_SPEED_HIGH_CFG); } else if (pin->flags & GPIO_IN) 8025f94: 07cb lsls r3, r1, #31 8025f96: d507 bpl.n 8025fa8 gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_IN_CFG | 8025f98: f856 0030 ldr.w r0, [r6, r0, lsl #3] 8025f9c: 7929 ldrb r1, [r5, #4] 8025f9e: 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); } } 8025fa0: 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 | 8025fa4: f7ff bf66 b.w 8025e74 GPIO_SPEED_HIGH_CFG); else if (pin->flags & GPIO_IN_PU) { 8025fa8: f001 0302 and.w r3, r1, #2 8025fac: b29b uxth r3, r3 8025fae: b123 cbz r3, 8025fba gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_IN_CFG | GPIO_PU_CFG | 8025fb0: f856 0030 ldr.w r0, [r6, r0, lsl #3] 8025fb4: 7929 ldrb r1, [r5, #4] 8025fb6: 2270 movs r2, #112 ; 0x70 8025fb8: e00d b.n 8025fd6 GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); } else if (pin->flags & GPIO_OUT) { 8025fba: f001 0304 and.w r3, r1, #4 8025fbe: b29b uxth r3, r3 8025fc0: b19b cbz r3, 8025fea gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_OUT_CFG | 8025fc2: f001 0120 and.w r1, r1, #32 8025fc6: b28a uxth r2, r1 8025fc8: f856 0030 ldr.w r0, [r6, r0, lsl #3] 8025fcc: 7929 ldrb r1, [r5, #4] 8025fce: 2a00 cmp r2, #0 8025fd0: bf0c ite eq 8025fd2: 2231 moveq r2, #49 ; 0x31 8025fd4: 2235 movne r2, #53 ; 0x35 8025fd6: f7ff ff4d bl 8025e74 ((pin->flags & GPIO_OD) ? GPIO_TYPE_OD_CFG : GPIO_TYPE_PP_CFG) | GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); 8025fda: 88e9 ldrh r1, [r5, #6] 8025fdc: 4620 mov r0, r4 8025fde: f3c1 01c0 ubfx r1, r1, #3, #1 } } 8025fe2: 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); 8025fe6: f7ff bfa3 b.w 8025f30 8025fea: bd70 pop {r4, r5, r6, pc} 8025fec: 200005c0 .word 0x200005c0 08025ff0 : } } void gpio_init(void) { 8025ff0: b538 push {r3, r4, r5, lr} uint32_t i; GPIO_DeInit(GPIOA); 8025ff2: 4812 ldr r0, [pc, #72] ; (802603c ) GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); } } void gpio_init(void) { 8025ff4: 4d12 ldr r5, [pc, #72] ; (8026040 ) uint32_t i; GPIO_DeInit(GPIOA); 8025ff6: f7ff fa5d bl 80254b4 GPIO_DeInit(GPIOB); 8025ffa: 4812 ldr r0, [pc, #72] ; (8026044 ) 8025ffc: f7ff fa5a bl 80254b4 GPIO_DeInit(GPIOC); 8026000: 4811 ldr r0, [pc, #68] ; (8026048 ) 8026002: f7ff fa57 bl 80254b4 GPIO_DeInit(GPIOD); 8026006: 4811 ldr r0, [pc, #68] ; (802604c ) 8026008: f7ff fa54 bl 80254b4 GPIO_DeInit(GPIOE); 802600c: 4810 ldr r0, [pc, #64] ; (8026050 ) 802600e: f7ff fa51 bl 80254b4 // configure clocks RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN | RCC_AHB1ENR_GPIOBEN | 8026012: 4b10 ldr r3, [pc, #64] ; (8026054 ) 8026014: 6b1a ldr r2, [r3, #48] ; 0x30 8026016: f042 021f orr.w r2, r2, #31 802601a: 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++) { 802601c: 2400 movs r4, #0 GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); } } void gpio_init(void) { 802601e: 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) 8026022: 88db ldrh r3, [r3, #6] 8026024: f003 0380 and.w r3, r3, #128 ; 0x80 8026028: b29b uxth r3, r3 802602a: b913 cbnz r3, 8026032 continue; else { gpio_set_config(i); 802602c: b2e0 uxtb r0, r4 802602e: f7ff ff9f bl 8025f70 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++) { 8026032: 3401 adds r4, #1 8026034: 2c11 cmp r4, #17 8026036: d1f2 bne.n 802601e continue; else { gpio_set_config(i); } } } 8026038: bd38 pop {r3, r4, r5, pc} 802603a: bf00 nop 802603c: 40020000 .word 0x40020000 8026040: 200005c0 .word 0x200005c0 8026044: 40020400 .word 0x40020400 8026048: 40020800 .word 0x40020800 802604c: 40020c00 .word 0x40020c00 8026050: 40021000 .word 0x40021000 8026054: 40023800 .word 0x40023800 08026058 : 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; 8026058: 4a06 ldr r2, [pc, #24] ; (8026074 ) 802605a: f852 3030 ldr.w r3, [r2, r0, lsl #3] 802605e: eb02 02c0 add.w r2, r2, r0, lsl #3 8026062: 6959 ldr r1, [r3, #20] 8026064: 7912 ldrb r2, [r2, #4] 8026066: 2001 movs r0, #1 8026068: fa00 f202 lsl.w r2, r0, r2 802606c: 404a eors r2, r1 802606e: 615a str r2, [r3, #20] 8026070: 4770 bx lr 8026072: bf00 nop 8026074: 200005c0 .word 0x200005c0 08026078 : } bool gpio_get(gpio_t pin) { bool value; if (gpio_pins[pin].flags & GPIO_NOINIT) { 8026078: 490e ldr r1, [pc, #56] ; (80260b4 ) 802607a: 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) { 802607e: b510 push {r4, lr} bool value; if (gpio_pins[pin].flags & GPIO_NOINIT) { 8026080: 88d3 ldrh r3, [r2, #6] 8026082: f003 0480 and.w r4, r3, #128 ; 0x80 8026086: b2a4 uxth r4, r4 8026088: b994 cbnz r4, 80260b0 return false; } else { value = (gpio_pins[pin].port->IDR & (1 << gpio_pins[pin].pin)) >> gpio_pins[pin].pin; 802608a: f851 1030 ldr.w r1, [r1, r0, lsl #3] 802608e: 7912 ldrb r2, [r2, #4] 8026090: 6908 ldr r0, [r1, #16] 8026092: 2101 movs r1, #1 8026094: fa01 f102 lsl.w r1, r1, r2 8026098: 4001 ands r1, r0 return (gpio_pins[pin].flags & GPIO_INV) ? !value : value; 802609a: 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; 802609e: 40d1 lsrs r1, r2 return (gpio_pins[pin].flags & GPIO_INV) ? !value : value; 80260a0: 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; 80260a2: bf0c ite eq 80260a4: 2000 moveq r0, #0 80260a6: 2001 movne r0, #1 return (gpio_pins[pin].flags & GPIO_INV) ? !value : value; 80260a8: b11b cbz r3, 80260b2 80260aa: f080 0001 eor.w r0, r0, #1 80260ae: bd10 pop {r4, pc} } bool gpio_get(gpio_t pin) { bool value; if (gpio_pins[pin].flags & GPIO_NOINIT) { return false; 80260b0: 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; } } 80260b2: bd10 pop {r4, pc} 80260b4: 200005c0 .word 0x200005c0 080260b8 : #include "rng.h" #include "stm32f4xx.h" void RNG_Init(void) { 80260b8: b508 push {r3, lr} RCC_AHB2PeriphClockCmd(RCC_AHB2Periph_RNG,ENABLE); 80260ba: 2040 movs r0, #64 ; 0x40 80260bc: 2101 movs r1, #1 80260be: f7ff fb51 bl 8025764 RNG_Cmd(ENABLE); 80260c2: 2001 movs r0, #1 } 80260c4: e8bd 4008 ldmia.w sp!, {r3, lr} void RNG_Init(void) { RCC_AHB2PeriphClockCmd(RCC_AHB2Periph_RNG,ENABLE); RNG_Cmd(ENABLE); 80260c8: f7ff bba8 b.w 802581c 080260cc : } uint32_t GetRandomNumber(void) { return RNG_GetRandomNumber();; 80260cc: f7ff bbb2 b.w 8025834 080260d0 : /* Устанавливаем новое время */ 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) { 80260d0: 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) { 80260d4: 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) { 80260d6: 4603 mov r3, r0 80260d8: 460e mov r6, r1 80260da: 79c0 ldrb r0, [r0, #7] TM_RTC_t tmp; /* Check date and time validation */ if (format == TM_RTC_Format_BCD) { 80260dc: d137 bne.n 802614e tmp.date = TM_RTC_BCD2BIN(data->date); tmp.month = TM_RTC_BCD2BIN(data->month); 80260de: 7a1c ldrb r4, [r3, #8] tmp.year = TM_RTC_BCD2BIN(data->year); 80260e0: 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); 80260e2: 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); 80260e6: 220a movs r2, #10 80260e8: 0901 lsrs r1, r0, #4 80260ea: f000 000f and.w r0, r0, #15 80260ee: fb02 0001 mla r0, r2, r1, r0 tmp.month = TM_RTC_BCD2BIN(data->month); 80260f2: 0921 lsrs r1, r4, #4 80260f4: f004 040f and.w r4, r4, #15 80260f8: fb02 4101 mla r1, r2, r1, r4 tmp.year = TM_RTC_BCD2BIN(data->year); 80260fc: 092c lsrs r4, r5, #4 80260fe: f005 050f and.w r5, r5, #15 8026102: fb02 5404 mla r4, r2, r4, r5 tmp.hours = TM_RTC_BCD2BIN(data->hours); 8026106: 795d ldrb r5, [r3, #5] 8026108: ea4f 1c15 mov.w ip, r5, lsr #4 802610c: f005 050f and.w r5, r5, #15 8026110: fb02 5c0c mla ip, r2, ip, r5 tmp.minutes = TM_RTC_BCD2BIN(data->minutes); 8026114: 791d ldrb r5, [r3, #4] 8026116: 092f lsrs r7, r5, #4 8026118: f005 050f and.w r5, r5, #15 802611c: fb02 5707 mla r7, r2, r7, r5 tmp.seconds = TM_RTC_BCD2BIN(data->seconds); 8026120: ea4f 1518 mov.w r5, r8, lsr #4 8026124: f008 080f and.w r8, r8, #15 8026128: fb02 8505 mla r5, r2, r5, r8 tmp.day = TM_RTC_BCD2BIN(data->day); 802612c: f893 8006 ldrb.w r8, [r3, #6] 8026130: ea4f 1918 mov.w r9, r8, lsr #4 8026134: f008 080f and.w r8, r8, #15 8026138: 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); 802613c: b2c0 uxtb r0, r0 tmp.month = TM_RTC_BCD2BIN(data->month); 802613e: b2c9 uxtb r1, r1 tmp.year = TM_RTC_BCD2BIN(data->year); 8026140: b2e4 uxtb r4, r4 tmp.hours = TM_RTC_BCD2BIN(data->hours); 8026142: fa5f fc8c uxtb.w ip, ip tmp.minutes = TM_RTC_BCD2BIN(data->minutes); 8026146: b2ff uxtb r7, r7 tmp.seconds = TM_RTC_BCD2BIN(data->seconds); 8026148: b2ed uxtb r5, r5 tmp.day = TM_RTC_BCD2BIN(data->day); 802614a: b2d2 uxtb r2, r2 802614c: e006 b.n 802615c } else { tmp.date = data->date; tmp.month = data->month; 802614e: 7a19 ldrb r1, [r3, #8] tmp.year = data->year; 8026150: 7a5c ldrb r4, [r3, #9] tmp.hours = data->hours; 8026152: f893 c005 ldrb.w ip, [r3, #5] tmp.minutes = data->minutes; 8026156: 791f ldrb r7, [r3, #4] tmp.seconds = data->seconds; 8026158: 781d ldrb r5, [r3, #0] tmp.day = data->day; 802615a: 799a ldrb r2, [r3, #6] } /* Check year and month */ if ( 802615c: 2c63 cmp r4, #99 ; 0x63 802615e: d86c bhi.n 802623a tmp.year > 99 || 8026160: 2900 cmp r1, #0 8026162: d06a beq.n 802623a tmp.month == 0 || 8026164: 290c cmp r1, #12 8026166: d868 bhi.n 802623a tmp.month > 12 || 8026168: 2800 cmp r0, #0 802616a: d066 beq.n 802623a tmp.date == 0 || tmp.date > TM_RTC_Months[TM_RTC_LEAP_YEAR(2000 + tmp.year) ? 1 : 0][tmp.month - 1] || 802616c: f014 0f03 tst.w r4, #3 8026170: d10a bne.n 8026188 8026172: f504 69fa add.w r9, r4, #2000 ; 0x7d0 8026176: f04f 0864 mov.w r8, #100 ; 0x64 802617a: fb99 faf8 sdiv sl, r9, r8 802617e: fb08 981a mls r8, r8, sl, r9 8026182: f1b8 0f00 cmp.w r8, #0 8026186: d10c bne.n 80261a2 8026188: f504 64fa add.w r4, r4, #2000 ; 0x7d0 802618c: f44f 78c8 mov.w r8, #400 ; 0x190 8026190: fb94 f9f8 sdiv r9, r4, r8 8026194: fb08 4419 mls r4, r8, r9, r4 8026198: f1d4 0401 rsbs r4, r4, #1 802619c: bf38 it cc 802619e: 2400 movcc r4, #0 80261a0: e000 b.n 80261a4 80261a2: 2401 movs r4, #1 80261a4: f8df 80a8 ldr.w r8, [pc, #168] ; 8026250 80261a8: f04f 090c mov.w r9, #12 80261ac: fb09 8404 mla r4, r9, r4, r8 80261b0: 1861 adds r1, r4, r1 /* Check year and month */ if ( tmp.year > 99 || tmp.month == 0 || tmp.month > 12 || tmp.date == 0 || 80261b2: f811 1c01 ldrb.w r1, [r1, #-1] 80261b6: 4281 cmp r1, r0 80261b8: d33f bcc.n 802623a tmp.date > TM_RTC_Months[TM_RTC_LEAP_YEAR(2000 + tmp.year) ? 1 : 0][tmp.month - 1] || 80261ba: f1bc 0f17 cmp.w ip, #23 80261be: d83c bhi.n 802623a tmp.hours > 23 || 80261c0: 2f3b cmp r7, #59 ; 0x3b 80261c2: d83a bhi.n 802623a tmp.minutes > 59 || 80261c4: 2d3b cmp r5, #59 ; 0x3b 80261c6: d838 bhi.n 802623a tmp.seconds > 59 || 80261c8: 2a00 cmp r2, #0 80261ca: d036 beq.n 802623a tmp.day == 0 || 80261cc: 2a07 cmp r2, #7 80261ce: d834 bhi.n 802623a /* Invalid date */ return TM_RTC_Result_Error; } /* Fill time */ RTC_TimeStruct.RTC_Hours = data->hours; 80261d0: 795a ldrb r2, [r3, #5] 80261d2: 4d1b ldr r5, [pc, #108] ; (8026240 ) RTC_TimeStruct.RTC_Minutes = data->minutes; RTC_TimeStruct.RTC_Seconds = data->seconds; /* Fill date */ RTC_DateStruct.RTC_Date = data->date; 80261d4: 4c1b ldr r4, [pc, #108] ; (8026244 ) /* Invalid date */ return TM_RTC_Result_Error; } /* Fill time */ RTC_TimeStruct.RTC_Hours = data->hours; 80261d6: 702a strb r2, [r5, #0] RTC_TimeStruct.RTC_Minutes = data->minutes; 80261d8: 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; 80261da: 481b ldr r0, [pc, #108] ; (8026248 ) return TM_RTC_Result_Error; } /* Fill time */ RTC_TimeStruct.RTC_Hours = data->hours; RTC_TimeStruct.RTC_Minutes = data->minutes; 80261dc: 706a strb r2, [r5, #1] RTC_TimeStruct.RTC_Seconds = data->seconds; 80261de: 781a ldrb r2, [r3, #0] 80261e0: 70aa strb r2, [r5, #2] /* Fill date */ RTC_DateStruct.RTC_Date = data->date; 80261e2: 79da ldrb r2, [r3, #7] 80261e4: 70a2 strb r2, [r4, #2] RTC_DateStruct.RTC_Month = data->month; 80261e6: 7a1a ldrb r2, [r3, #8] 80261e8: 7062 strb r2, [r4, #1] RTC_DateStruct.RTC_Year = data->year; 80261ea: 7a5a ldrb r2, [r3, #9] RTC_DateStruct.RTC_WeekDay = data->day; 80261ec: 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; 80261ee: 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; 80261f0: 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; 80261f2: 2700 movs r7, #0 RTC_InitStruct.RTC_AsynchPrediv = RTC_ASYNC_PREDIV; 80261f4: 6042 str r2, [r0, #4] RTC_InitStruct.RTC_SynchPrediv = RTC_SYNC_PREDIV; 80261f6: 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; 80261fa: 7023 strb r3, [r4, #0] /* Set the RTC time base to 1s and hours format to 24h */ RTC_InitStruct.RTC_HourFormat = RTC_HourFormat_24; 80261fc: 6007 str r7, [r0, #0] RTC_InitStruct.RTC_AsynchPrediv = RTC_ASYNC_PREDIV; RTC_InitStruct.RTC_SynchPrediv = RTC_SYNC_PREDIV; 80261fe: 6082 str r2, [r0, #8] RTC_Init(&RTC_InitStruct); 8026200: f7ff fb5a bl 80258b8 /* Set time */ if (format == TM_RTC_Format_BCD) { 8026204: 2e01 cmp r6, #1 8026206: d105 bne.n 8026214 RTC_SetTime(RTC_Format_BCD, &RTC_TimeStruct); 8026208: 4630 mov r0, r6 802620a: 4629 mov r1, r5 802620c: f7ff fb98 bl 8025940 RTC_SetTime(RTC_Format_BIN, &RTC_TimeStruct); } /* Set date */ if (format == TM_RTC_Format_BCD) { RTC_SetDate(RTC_Format_BCD, &RTC_DateStruct); 8026210: 4630 mov r0, r6 8026212: e004 b.n 802621e /* Set time */ if (format == TM_RTC_Format_BCD) { RTC_SetTime(RTC_Format_BCD, &RTC_TimeStruct); } else { RTC_SetTime(RTC_Format_BIN, &RTC_TimeStruct); 8026214: 4638 mov r0, r7 8026216: 4629 mov r1, r5 8026218: f7ff fb92 bl 8025940 /* Set date */ if (format == TM_RTC_Format_BCD) { RTC_SetDate(RTC_Format_BCD, &RTC_DateStruct); } else { RTC_SetDate(RTC_Format_BIN, &RTC_DateStruct); 802621c: 4638 mov r0, r7 802621e: 4621 mov r1, r4 8026220: f7ff fbfc bl 8025a1c } if (TM_RTC_Status != RTC_STATUS_ZERO) { 8026224: 4b09 ldr r3, [pc, #36] ; (802624c ) 8026226: 6818 ldr r0, [r3, #0] 8026228: b140 cbz r0, 802623c /* Write backup registers */ RTC_WriteBackupRegister(RTC_STATUS_REG, RTC_STATUS_TIME_OK); 802622a: 2013 movs r0, #19 802622c: f244 3121 movw r1, #17185 ; 0x4321 8026230: f7ff fc5e bl 8025af0 } /* Return OK */ return TM_RTC_Result_Ok; 8026234: 2000 movs r0, #0 8026236: 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; 802623a: 2001 movs r0, #1 RTC_WriteBackupRegister(RTC_STATUS_REG, RTC_STATUS_TIME_OK); } /* Return OK */ return TM_RTC_Result_Ok; } 802623c: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 8026240: 2000c80c .word 0x2000c80c 8026244: 2000c81c .word 0x2000c81c 8026248: 2000c810 .word 0x2000c810 802624c: 20000afc .word 0x20000afc 8026250: 20000648 .word 0x20000648 08026254 : TM_RTC_Result_t TM_RTC_SetDateTimeString(char* str) { 8026254: b530 push {r4, r5, lr} TM_RTC_t tmp; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026256: 2200 movs r2, #0 /* Return OK */ return TM_RTC_Result_Ok; } TM_RTC_Result_t TM_RTC_SetDateTimeString(char* str) { 8026258: b085 sub sp, #20 TM_RTC_t tmp; uint8_t i = 0; 802625a: 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)); 802625c: 250a movs r5, #10 TM_RTC_t tmp; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802625e: e006 b.n 802626e tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026260: fb05 1202 mla r2, r5, r2, r1 8026264: 3a30 subs r2, #48 ; 0x30 i++; 8026266: 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)); 8026268: f002 02ff and.w r2, r2, #255 ; 0xff i++; 802626c: b2db uxtb r3, r3 TM_RTC_t tmp; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802626e: 5cc1 ldrb r1, [r0, r3] 8026270: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026274: 2c09 cmp r4, #9 8026276: d9f3 bls.n 8026260 tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 8026278: 3301 adds r3, #1 802627a: f88d 2007 strb.w r2, [sp, #7] 802627e: b2db uxtb r3, r3 /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026280: 2200 movs r2, #0 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026282: 250a movs r5, #10 } i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026284: e006 b.n 8026294 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026286: fb05 1202 mla r2, r5, r2, r1 802628a: 3a30 subs r2, #48 ; 0x30 i++; 802628c: 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)); 802628e: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026292: b2db uxtb r3, r3 } i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026294: 5cc1 ldrb r1, [r0, r3] 8026296: f1a1 0430 sub.w r4, r1, #48 ; 0x30 802629a: 2c09 cmp r4, #9 802629c: d9f3 bls.n 8026286 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 802629e: 3301 adds r3, #1 80262a0: f88d 2008 strb.w r2, [sp, #8] 80262a4: b2db uxtb r3, r3 /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80262a6: 2200 movs r2, #0 tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80262a8: 250a movs r5, #10 } i++; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80262aa: e006 b.n 80262ba tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80262ac: fb05 1202 mla r2, r5, r2, r1 80262b0: 3a30 subs r2, #48 ; 0x30 i++; 80262b2: 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)); 80262b4: f002 02ff and.w r2, r2, #255 ; 0xff i++; 80262b8: b2db uxtb r3, r3 } i++; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80262ba: 5cc1 ldrb r1, [r0, r3] 80262bc: f1a1 0430 sub.w r4, r1, #48 ; 0x30 80262c0: 2c09 cmp r4, #9 80262c2: d9f3 bls.n 80262ac tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 80262c4: 3301 adds r3, #1 80262c6: f88d 2009 strb.w r2, [sp, #9] 80262ca: b2db uxtb r3, r3 /* Get day in a week */ tmp.day = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80262cc: 2200 movs r2, #0 tmp.day = tmp.day * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80262ce: 250a movs r5, #10 } i++; /* Get day in a week */ tmp.day = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80262d0: e006 b.n 80262e0 tmp.day = tmp.day * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80262d2: fb05 1202 mla r2, r5, r2, r1 80262d6: 3a30 subs r2, #48 ; 0x30 i++; 80262d8: 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)); 80262da: f002 02ff and.w r2, r2, #255 ; 0xff i++; 80262de: b2db uxtb r3, r3 } i++; /* Get day in a week */ tmp.day = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80262e0: 5cc1 ldrb r1, [r0, r3] 80262e2: f1a1 0430 sub.w r4, r1, #48 ; 0x30 80262e6: 2c09 cmp r4, #9 80262e8: d9f3 bls.n 80262d2 tmp.day = tmp.day * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 80262ea: 3301 adds r3, #1 80262ec: f88d 2006 strb.w r2, [sp, #6] 80262f0: b2db uxtb r3, r3 /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80262f2: 2200 movs r2, #0 tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80262f4: 250a movs r5, #10 } i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80262f6: e006 b.n 8026306 tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80262f8: fb05 1202 mla r2, r5, r2, r1 80262fc: 3a30 subs r2, #48 ; 0x30 i++; 80262fe: 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)); 8026300: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026304: b2db uxtb r3, r3 } i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026306: 5cc1 ldrb r1, [r0, r3] 8026308: f1a1 0430 sub.w r4, r1, #48 ; 0x30 802630c: 2c09 cmp r4, #9 802630e: d9f3 bls.n 80262f8 tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 8026310: 3301 adds r3, #1 8026312: f88d 2005 strb.w r2, [sp, #5] 8026316: b2db uxtb r3, r3 /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026318: 2200 movs r2, #0 tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802631a: 250a movs r5, #10 } i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802631c: e006 b.n 802632c tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802631e: fb05 1202 mla r2, r5, r2, r1 8026322: 3a30 subs r2, #48 ; 0x30 i++; 8026324: 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)); 8026326: f002 02ff and.w r2, r2, #255 ; 0xff i++; 802632a: b2db uxtb r3, r3 } i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802632c: 5cc1 ldrb r1, [r0, r3] 802632e: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026332: 2c09 cmp r4, #9 8026334: d9f3 bls.n 802631e tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 8026336: 3301 adds r3, #1 8026338: f88d 2004 strb.w r2, [sp, #4] 802633c: b2db uxtb r3, r3 /* Get seconds */ tmp.seconds = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802633e: 2200 movs r2, #0 tmp.seconds = tmp.seconds * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026340: 250a movs r5, #10 } i++; /* Get seconds */ tmp.seconds = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026342: e006 b.n 8026352 tmp.seconds = tmp.seconds * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026344: fb05 1202 mla r2, r5, r2, r1 8026348: 3a30 subs r2, #48 ; 0x30 i++; 802634a: 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)); 802634c: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026350: b2db uxtb r3, r3 } i++; /* Get seconds */ tmp.seconds = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026352: 5cc1 ldrb r1, [r0, r3] 8026354: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026358: 2c09 cmp r4, #9 802635a: d9f3 bls.n 8026344 802635c: a804 add r0, sp, #16 i++; } i++; /* Return status from set date time function */ return TM_RTC_SetDateTime(&tmp, TM_RTC_Format_BIN); 802635e: 2100 movs r1, #0 8026360: f800 2d10 strb.w r2, [r0, #-16]! 8026364: 4668 mov r0, sp 8026366: f7ff feb3 bl 80260d0 } 802636a: b005 add sp, #20 802636c: bd30 pop {r4, r5, pc} 0802636e : 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) { 802636e: b508 push {r3, lr} if (source == TM_RTC_ClockSource_Internal) { 8026370: b950 cbnz r0, 8026388 /* Enable the LSI OSC */ RCC_LSICmd(ENABLE); 8026372: 2001 movs r0, #1 8026374: f7ff f980 bl 8025678 /* Wait till LSI is ready */ while (RCC_GetFlagStatus(RCC_FLAG_LSIRDY) == RESET); 8026378: 2061 movs r0, #97 ; 0x61 802637a: f7ff fa3b bl 80257f4 802637e: 2800 cmp r0, #0 8026380: d0fa beq.n 8026378 /* Select the RTC Clock Source */ RCC_RTCCLKConfig(RCC_RTCCLKSource_LSI); 8026382: f44f 7000 mov.w r0, #512 ; 0x200 8026386: e00a b.n 802639e } else if (source == TM_RTC_ClockSource_External) { 8026388: 2801 cmp r0, #1 802638a: d10a bne.n 80263a2 /* Enable the LSE OSC */ RCC_LSEConfig(RCC_LSE_ON); 802638c: f7ff f964 bl 8025658 /* Wait till LSE is ready */ while (RCC_GetFlagStatus(RCC_FLAG_LSERDY) == RESET); 8026390: 2041 movs r0, #65 ; 0x41 8026392: f7ff fa2f bl 80257f4 8026396: 2800 cmp r0, #0 8026398: d0fa beq.n 8026390 /* Select the RTC Clock Source */ RCC_RTCCLKConfig(RCC_RTCCLKSource_LSE); 802639a: f44f 7080 mov.w r0, #256 ; 0x100 802639e: f7ff f9b7 bl 8025710 } /* Enable the RTC Clock */ RCC_RTCCLKCmd(ENABLE); 80263a2: 2001 movs r0, #1 80263a4: f7ff f9cc bl 8025740 /* Wait for register synchronization */ RTC_WaitForSynchro(); 80263a8: f7ff faa8 bl 80258fc /* Write status */ RTC_WriteBackupRegister(RTC_STATUS_REG, RTC_STATUS_INIT_OK); 80263ac: 2013 movs r0, #19 80263ae: f241 2134 movw r1, #4660 ; 0x1234 } 80263b2: e8bd 4008 ldmia.w sp!, {r3, lr} /* Wait for register synchronization */ RTC_WaitForSynchro(); /* Write status */ RTC_WriteBackupRegister(RTC_STATUS_REG, RTC_STATUS_INIT_OK); 80263b6: f7ff bb9b b.w 8025af0 80263ba: 0000 movs r0, r0 080263bc : /* Enable wakeup command */ RTC_WakeUpCmd(ENABLE); } } uint32_t TM_RTC_GetUnixTimeStamp(TM_RTC_t* data) { 80263bc: 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); 80263c0: 7a42 ldrb r2, [r0, #9] 80263c2: f240 73b2 movw r3, #1970 ; 0x7b2 80263c6: f502 62fa add.w r2, r2, #2000 ; 0x7d0 80263ca: 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); 80263cc: f44f 75c8 mov.w r5, #400 ; 0x190 80263d0: 2664 movs r6, #100 ; 0x64 80263d2: 079c lsls r4, r3, #30 80263d4: d108 bne.n 80263e8 80263d6: fbb3 f4f6 udiv r4, r3, r6 80263da: fb06 3414 mls r4, r6, r4, r3 80263de: b2a4 uxth r4, r4 80263e0: b114 cbz r4, 80263e8 80263e2: f44f 74b7 mov.w r4, #366 ; 0x16e 80263e6: e008 b.n 80263fa 80263e8: fbb3 f4f5 udiv r4, r3, r5 80263ec: fb05 3414 mls r4, r5, r4, r3 80263f0: b2a4 uxth r4, r4 80263f2: 2c00 cmp r4, #0 80263f4: d0f5 beq.n 80263e2 80263f6: 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++) { 80263fa: 3301 adds r3, #1 80263fc: b29b uxth r3, r3 80263fe: 4293 cmp r3, r2 days += TM_RTC_DAYS_IN_YEAR(i); 8026400: 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++) { 8026402: d3e6 bcc.n 80263d2 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]; 8026404: 2364 movs r3, #100 ; 0x64 8026406: fbb2 f7f3 udiv r7, r2, r3 802640a: fb03 2317 mls r3, r3, r7, r2 802640e: b29f uxth r7, r3 8026410: f44f 73c8 mov.w r3, #400 ; 0x190 8026414: fbb2 f4f3 udiv r4, r2, r3 8026418: fb03 2414 mls r4, r3, r4, r2 802641c: b2a4 uxth r4, r4 802641e: f1d4 0401 rsbs r4, r4, #1 8026422: bf38 it cc 8026424: 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++) { 8026426: 7a06 ldrb r6, [r0, #8] days += TM_RTC_Months[TM_RTC_LEAP_YEAR(year)][i - 1]; 8026428: f8df c058 ldr.w ip, [pc, #88] ; 8026484 802642c: 2300 movs r3, #0 802642e: f002 0203 and.w r2, r2, #3 8026432: f04f 080c mov.w r8, #12 8026436: e00c b.n 8026452 8026438: b922 cbnz r2, 8026444 802643a: 2f00 cmp r7, #0 802643c: bf0c ite eq 802643e: 4625 moveq r5, r4 8026440: 2501 movne r5, #1 8026442: e000 b.n 8026446 8026444: 4625 mov r5, r4 8026446: fb08 3505 mla r5, r8, r5, r3 802644a: 3301 adds r3, #1 802644c: f81c 5005 ldrb.w r5, [ip, r5] 8026450: 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++) { 8026452: 1c5d adds r5, r3, #1 8026454: b2ad uxth r5, r5 8026456: 42b5 cmp r5, r6 8026458: d3ee bcc.n 8026438 days += TM_RTC_Months[TM_RTC_LEAP_YEAR(year)][i - 1]; } /* Day starts with 1 */ days += data->date - 1; 802645a: 79c3 ldrb r3, [r0, #7] seconds = days * TM_RTC_SECONDS_PER_DAY; seconds += data->hours * TM_RTC_SECONDS_PER_HOUR; 802645c: 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; 802645e: 3b01 subs r3, #1 8026460: 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; 8026462: 7903 ldrb r3, [r0, #4] 8026464: 009a lsls r2, r3, #2 8026466: 019b lsls r3, r3, #6 8026468: 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; 802646a: f44f 6361 mov.w r3, #3600 ; 0xe10 802646e: fb03 2304 mla r3, r3, r4, r2 seconds += data->minutes * TM_RTC_SECONDS_PER_MINUTE; seconds += data->seconds; 8026472: 7802 ldrb r2, [r0, #0] /* seconds = days * 86400; */ return seconds; } 8026474: 4802 ldr r0, [pc, #8] ; (8026480 ) } /* 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; 8026476: 189b adds r3, r3, r2 seconds += data->seconds; /* seconds = days * 86400; */ return seconds; } 8026478: fb00 3001 mla r0, r0, r1, r3 802647c: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8026480: 00015180 .word 0x00015180 8026484: 20000648 .word 0x20000648 08026488 : /* 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) { 8026488: b538 push {r3, r4, r5, lr} 802648a: 4604 mov r4, r0 uint32_t unix; /* Get time */ if (format == TM_RTC_Format_BIN) { 802648c: 460d mov r5, r1 802648e: b909 cbnz r1, 8026494 RTC_GetTime(RTC_Format_BIN, &RTC_TimeStruct); 8026490: 4608 mov r0, r1 8026492: e000 b.n 8026496 } else { RTC_GetTime(RTC_Format_BCD, &RTC_TimeStruct); 8026494: 2001 movs r0, #1 8026496: 4911 ldr r1, [pc, #68] ; (80264dc ) 8026498: f7ff fa9e bl 80259d8 } /* Format hours */ data->hours = RTC_TimeStruct.RTC_Hours; 802649c: 4b0f ldr r3, [pc, #60] ; (80264dc ) 802649e: 781a ldrb r2, [r3, #0] 80264a0: 7162 strb r2, [r4, #5] data->minutes = RTC_TimeStruct.RTC_Minutes; 80264a2: 785a ldrb r2, [r3, #1] data->seconds = RTC_TimeStruct.RTC_Seconds; 80264a4: 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; 80264a6: 7122 strb r2, [r4, #4] data->seconds = RTC_TimeStruct.RTC_Seconds; 80264a8: 7023 strb r3, [r4, #0] /* Get subseconds */ data->subseconds = RTC->SSR; 80264aa: 4b0d ldr r3, [pc, #52] ; (80264e0 ) 80264ac: 6a9b ldr r3, [r3, #40] ; 0x28 80264ae: 8063 strh r3, [r4, #2] /* Get date */ if (format == TM_RTC_Format_BIN) { 80264b0: b90d cbnz r5, 80264b6 RTC_GetDate(RTC_Format_BIN, &RTC_DateStruct); 80264b2: 4628 mov r0, r5 80264b4: e000 b.n 80264b8 } else { RTC_GetDate(RTC_Format_BCD, &RTC_DateStruct); 80264b6: 2001 movs r0, #1 80264b8: 490a ldr r1, [pc, #40] ; (80264e4 ) 80264ba: f7ff faf9 bl 8025ab0 } /* Format date */ data->year = RTC_DateStruct.RTC_Year; 80264be: 4b09 ldr r3, [pc, #36] ; (80264e4 ) 80264c0: 78da ldrb r2, [r3, #3] 80264c2: 7262 strb r2, [r4, #9] data->month = RTC_DateStruct.RTC_Month; 80264c4: 785a ldrb r2, [r3, #1] 80264c6: 7222 strb r2, [r4, #8] data->date = RTC_DateStruct.RTC_Date; 80264c8: 789a ldrb r2, [r3, #2] data->day = RTC_DateStruct.RTC_WeekDay; 80264ca: 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; 80264cc: 71e2 strb r2, [r4, #7] data->day = RTC_DateStruct.RTC_WeekDay; 80264ce: 71a3 strb r3, [r4, #6] /* Calculate unix offset */ unix = TM_RTC_GetUnixTimeStamp(data); 80264d0: 4620 mov r0, r4 80264d2: f7ff ff73 bl 80263bc data->unix = unix; 80264d6: 60e0 str r0, [r4, #12] 80264d8: bd38 pop {r3, r4, r5, pc} 80264da: bf00 nop 80264dc: 2000c80c .word 0x2000c80c 80264e0: 40002800 .word 0x40002800 80264e4: 2000c81c .word 0x2000c81c 080264e8 : } } uint32_t TM_RTC_Init(TM_RTC_ClockSource_t source) { 80264e8: 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); 80264ea: 2101 movs r1, #1 } } uint32_t TM_RTC_Init(TM_RTC_ClockSource_t source) { 80264ec: b085 sub sp, #20 80264ee: 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); 80264f0: f04f 5080 mov.w r0, #268435456 ; 0x10000000 80264f4: f7ff f942 bl 802577c /* Allow access to BKP Domain */ PWR_BackupAccessCmd(ENABLE); 80264f8: 2001 movs r0, #1 80264fa: f7ff f8a7 bl 802564c /* Get RTC status */ status = RTC_ReadBackupRegister(RTC_STATUS_REG); 80264fe: 2013 movs r0, #19 8026500: f7ff fb06 bl 8025b10 if (status == RTC_STATUS_TIME_OK) 8026504: f244 3321 movw r3, #17185 ; 0x4321 8026508: 4298 cmp r0, r3 802650a: 4e25 ldr r6, [pc, #148] ; (80265a0 ) 802650c: d113 bne.n 8026536 { TM_RTC_Status = RTC_STATUS_TIME_OK; 802650e: 6030 str r0, [r6, #0] /* Start internal clock if we choose internal clock */ if (source == TM_RTC_ClockSource_Internal) 8026510: b915 cbnz r5, 8026518 TM_RTC_Config(TM_RTC_ClockSource_Internal); 8026512: 4628 mov r0, r5 8026514: f7ff ff2b bl 802636e /* Wait for RTC APB registers synchronisation (needed after start-up from Reset) */ RTC_WaitForSynchro(); 8026518: f7ff f9f0 bl 80258fc /* Clear interrupt flags */ RTC_ClearITPendingBit(RTC_IT_WUT); 802651c: f44f 4080 mov.w r0, #16384 ; 0x4000 8026520: f7ff fb1e bl 8025b60 EXTI->PR = 0x00400000; 8026524: 4b1f ldr r3, [pc, #124] ; (80265a4 ) 8026526: f44f 0280 mov.w r2, #4194304 ; 0x400000 802652a: 615a str r2, [r3, #20] /* Get date and time */ TM_RTC_GetDateTime(&datatime, TM_RTC_Format_BIN); 802652c: 4668 mov r0, sp 802652e: 2100 movs r1, #0 8026530: f7ff ffaa bl 8026488 8026534: e02f b.n 8026596 } else if (status == RTC_STATUS_INIT_OK) 8026536: f241 2734 movw r7, #4660 ; 0x1234 802653a: 42b8 cmp r0, r7 802653c: d10f bne.n 802655e { TM_RTC_Status = RTC_STATUS_INIT_OK; 802653e: 6030 str r0, [r6, #0] /* Start internal clock if we choose internal clock */ if (source == TM_RTC_ClockSource_Internal) 8026540: b915 cbnz r5, 8026548 TM_RTC_Config(TM_RTC_ClockSource_Internal); 8026542: 4628 mov r0, r5 8026544: f7ff ff13 bl 802636e /* Wait for RTC APB registers synchronisation (needed after start-up from Reset) */ RTC_WaitForSynchro(); 8026548: f7ff f9d8 bl 80258fc /* Clear interrupt flags */ RTC_ClearITPendingBit(RTC_IT_WUT); 802654c: f44f 4080 mov.w r0, #16384 ; 0x4000 8026550: f7ff fb06 bl 8025b60 EXTI->PR = 0x00400000; 8026554: 4b13 ldr r3, [pc, #76] ; (80265a4 ) 8026556: f44f 0280 mov.w r2, #4194304 ; 0x400000 802655a: 615a str r2, [r3, #20] 802655c: e01b b.n 8026596 /* Get date and time */ //TM_RTC_GetDateTime(&datatime, TM_RTC_Format_BIN); } else { TM_RTC_Status = RTC_STATUS_ZERO; 802655e: 2400 movs r4, #0 /* Return status = 0 -> RTC Never initialized before */ stat = RTC_STATUS_ZERO; /* Config RTC */ TM_RTC_Config(source); 8026560: 4628 mov r0, r5 /* Get date and time */ //TM_RTC_GetDateTime(&datatime, TM_RTC_Format_BIN); } else { TM_RTC_Status = RTC_STATUS_ZERO; 8026562: 6034 str r4, [r6, #0] /* Return status = 0 -> RTC Never initialized before */ stat = RTC_STATUS_ZERO; /* Config RTC */ TM_RTC_Config(source); 8026564: f7ff ff03 bl 802636e datatime.day = 1; datatime.month = 1; datatime.year = 0; datatime.hours = 0; datatime.minutes = 0; datatime.seconds = 0; 8026568: a804 add r0, sp, #16 stat = RTC_STATUS_ZERO; /* Config RTC */ TM_RTC_Config(source); /* Set date and time */ datatime.date = 1; 802656a: 2301 movs r3, #1 datatime.day = 1; datatime.month = 1; datatime.year = 0; datatime.hours = 0; datatime.minutes = 0; datatime.seconds = 0; 802656c: f800 4d10 strb.w r4, [r0, #-16]! /* Set date and time */ TM_RTC_SetDateTime(&datatime, TM_RTC_Format_BIN); 8026570: 4621 mov r1, r4 8026572: 4668 mov r0, sp stat = RTC_STATUS_ZERO; /* Config RTC */ TM_RTC_Config(source); /* Set date and time */ datatime.date = 1; 8026574: f88d 3007 strb.w r3, [sp, #7] datatime.day = 1; 8026578: f88d 3006 strb.w r3, [sp, #6] datatime.month = 1; 802657c: f88d 3008 strb.w r3, [sp, #8] datatime.year = 0; 8026580: f88d 4009 strb.w r4, [sp, #9] datatime.hours = 0; 8026584: f88d 4005 strb.w r4, [sp, #5] datatime.minutes = 0; 8026588: f88d 4004 strb.w r4, [sp, #4] datatime.seconds = 0; /* Set date and time */ TM_RTC_SetDateTime(&datatime, TM_RTC_Format_BIN); 802658c: f7ff fda0 bl 80260d0 /* Initialized OK */ TM_RTC_Status = RTC_STATUS_INIT_OK; 8026590: 6037 str r7, [r6, #0] } /* If first time initialized */ if (stat == RTC_STATUS_ZERO) return 0; 8026592: 4620 mov r0, r4 8026594: e001 b.n 802659a return TM_RTC_Status; 8026596: 4b02 ldr r3, [pc, #8] ; (80265a0 ) 8026598: 6818 ldr r0, [r3, #0] } 802659a: b005 add sp, #20 802659c: bdf0 pop {r4, r5, r6, r7, pc} 802659e: bf00 nop 80265a0: 20000afc .word 0x20000afc 80265a4: 40013c00 .word 0x40013c00 080265a8 : uint16_t year; /* Store unix time to unix in struct */ data->unix = unix; /* Get seconds from unix */ data->seconds = unix % 60; 80265a8: 233c movs r3, #60 ; 0x3c /* seconds = days * 86400; */ return seconds; } void TM_RTC_GetDateTimeFromUnix(TM_RTC_t* data, uint32_t unix) { 80265aa: 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; 80265ac: fbb1 f4f3 udiv r4, r1, r3 /* Go to minutes */ unix /= 60; /* Get minutes */ data->minutes = unix % 60; 80265b0: 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; 80265b4: 60c1 str r1, [r0, #12] /* Get seconds from unix */ data->seconds = unix % 60; 80265b6: fb03 1114 mls r1, r3, r4, r1 80265ba: 7001 strb r1, [r0, #0] /* Go to minutes */ unix /= 60; /* Get minutes */ data->minutes = unix % 60; 80265bc: fb03 4312 mls r3, r3, r2, r4 /* Go to hours */ unix /= 60; /* Get hours */ data->hours = unix % 24; 80265c0: 2118 movs r1, #24 /* Get seconds from unix */ data->seconds = unix % 60; /* Go to minutes */ unix /= 60; /* Get minutes */ data->minutes = unix % 60; 80265c2: 7103 strb r3, [r0, #4] /* Go to hours */ unix /= 60; /* Get hours */ data->hours = unix % 24; 80265c4: fbb2 f3f1 udiv r3, r2, r1 80265c8: fb01 2213 mls r2, r1, r3, r2 80265cc: 7142 strb r2, [r0, #5] /* Go to days */ unix /= 24; /* Get week day */ /* Monday is day one */ data->day = (unix + 3) % 7 + 1; 80265ce: 1cd9 adds r1, r3, #3 80265d0: 2207 movs r2, #7 80265d2: fbb1 f4f2 udiv r4, r1, r2 80265d6: fb02 1214 mls r2, r2, r4, r1 80265da: 3201 adds r2, #1 80265dc: 7182 strb r2, [r0, #6] /* Get year */ year = 1970; while (1) { if (TM_RTC_LEAP_YEAR(year)) { if (unix >= 366) { 80265de: f240 156d movw r5, #365 ; 0x16d /* Get week day */ /* Monday is day one */ data->day = (unix + 3) % 7 + 1; /* Get year */ year = 1970; 80265e2: f240 72b2 movw r2, #1970 ; 0x7b2 while (1) { if (TM_RTC_LEAP_YEAR(year)) { 80265e6: f44f 71c8 mov.w r1, #400 ; 0x190 80265ea: 2464 movs r4, #100 ; 0x64 80265ec: f012 0603 ands.w r6, r2, #3 80265f0: d105 bne.n 80265fe 80265f2: fbb2 f7f4 udiv r7, r2, r4 80265f6: fb04 2717 mls r7, r4, r7, r2 80265fa: b2bf uxth r7, r7 80265fc: b92f cbnz r7, 802660a 80265fe: fbb2 f7f1 udiv r7, r2, r1 8026602: fb01 2717 mls r7, r1, r7, r2 8026606: b2bf uxth r7, r7 8026608: b927 cbnz r7, 8026614 if (unix >= 366) { 802660a: 42ab cmp r3, r5 802660c: d90b bls.n 8026626 unix -= 366; 802660e: f5a3 73b7 sub.w r3, r3, #366 ; 0x16e /* Get year */ year = 1970; while (1) { if (TM_RTC_LEAP_YEAR(year)) { if (unix >= 366) { 8026612: e005 b.n 8026620 unix -= 366; } else { break; } } else if (unix >= 365) { 8026614: f5b3 7fb6 cmp.w r3, #364 ; 0x16c 8026618: d905 bls.n 8026626 unix -= 365; 802661a: f46f 76b6 mvn.w r6, #364 ; 0x16c 802661e: 199b adds r3, r3, r6 } else { break; } year++; 8026620: 3201 adds r2, #1 8026622: b292 uxth r2, r2 } 8026624: e7e2 b.n 80265ec /* Get year in xx format */ data->year = (uint8_t) (year - 2000); 8026626: f102 0130 add.w r1, r2, #48 ; 0x30 802662a: 7241 strb r1, [r0, #9] /* Get month */ for (data->month = 0; data->month < 12; data->month++) { 802662c: 2100 movs r1, #0 802662e: 7201 strb r1, [r0, #8] if (TM_RTC_LEAP_YEAR(year) && unix >= (uint32_t)TM_RTC_Months[1][data->month]) { 8026630: 2164 movs r1, #100 ; 0x64 8026632: fbb2 f7f1 udiv r7, r2, r1 8026636: fb01 2117 mls r1, r1, r7, r2 802663a: b28f uxth r7, r1 802663c: f44f 71c8 mov.w r1, #400 ; 0x190 8026640: fbb2 f4f1 udiv r4, r2, r1 8026644: fb01 2214 mls r2, r1, r4, r2 8026648: b292 uxth r2, r2 unix -= TM_RTC_Months[1][data->month]; } else if (unix >= (uint32_t)TM_RTC_Months[0][data->month]) { 802664a: 4c0c ldr r4, [pc, #48] ; (802667c ) year++; } /* Get year in xx format */ data->year = (uint8_t) (year - 2000); /* Get month */ for (data->month = 0; data->month < 12; data->month++) { 802664c: e012 b.n 8026674 if (TM_RTC_LEAP_YEAR(year) && unix >= (uint32_t)TM_RTC_Months[1][data->month]) { 802664e: b906 cbnz r6, 8026652 8026650: b907 cbnz r7, 8026654 8026652: b922 cbnz r2, 802665e 8026654: 1865 adds r5, r4, r1 8026656: 7b2d ldrb r5, [r5, #12] 8026658: 42ab cmp r3, r5 802665a: d300 bcc.n 802665e 802665c: e007 b.n 802666e unix -= TM_RTC_Months[1][data->month]; } else if (unix >= (uint32_t)TM_RTC_Months[0][data->month]) { 802665e: 5c65 ldrb r5, [r4, r1] 8026660: 42ab cmp r3, r5 8026662: d204 bcs.n 802666e break; } } /* Get month */ /* Month starts with 1 */ data->month++; 8026664: 3101 adds r1, #1 /* Get date */ /* Date starts with 1 */ data->date = unix + 1; 8026666: 3301 adds r3, #1 break; } } /* Get month */ /* Month starts with 1 */ data->month++; 8026668: 7201 strb r1, [r0, #8] /* Get date */ /* Date starts with 1 */ data->date = unix + 1; 802666a: 71c3 strb r3, [r0, #7] 802666c: 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++) { 802666e: 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]; 8026670: 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++) { 8026672: 7201 strb r1, [r0, #8] 8026674: 7a01 ldrb r1, [r0, #8] 8026676: 290b cmp r1, #11 8026678: d9e9 bls.n 802664e 802667a: e7f3 b.n 8026664 802667c: 20000648 .word 0x20000648 08026680 : * @brief Кореектировака времени. * @param Часовой пояс * @retval */ void TM_RTC_Correction(float utc) { 8026680: b510 push {r4, lr} 8026682: b088 sub sp, #32 8026684: 4604 mov r4, r0 TM_RTC_t newData; int utcSec; uint32_t unixTime; /* Получаем текущее время */ TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8026686: 2100 movs r1, #0 8026688: 4668 mov r0, sp 802668a: f7ff fefd bl 8026488 /* Рассчитываем поправку */ utcSec = (int)(3600.0*utc); 802668e: 4620 mov r0, r4 8026690: f7f9 ff42 bl 8020518 <__aeabi_f2d> 8026694: a308 add r3, pc, #32 ; (adr r3, 80266b8 ) 8026696: e9d3 2300 ldrd r2, r3, [r3] 802669a: f7f9 ff91 bl 80205c0 <__aeabi_dmul> 802669e: f7fa fa29 bl 8020af4 <__aeabi_d2iz> unixTime = data.unix + utcSec; 80266a2: 9903 ldr r1, [sp, #12] 80266a4: 1841 adds r1, r0, r1 /* Устанавливаем новое время */ TM_RTC_GetDateTimeFromUnix(&newData, unixTime); 80266a6: a804 add r0, sp, #16 80266a8: f7ff ff7e bl 80265a8 TM_RTC_SetDateTime(&newData, TM_RTC_Format_BIN); 80266ac: a804 add r0, sp, #16 80266ae: 2100 movs r1, #0 80266b0: f7ff fd0e bl 80260d0 } 80266b4: b008 add sp, #32 80266b6: bd10 pop {r4, pc} 80266b8: 00000000 .word 0x00000000 80266bc: 40ac2000 .word 0x40ac2000 080266c0 : return TM_RTC_Status; } void TM_RTC_SetDataTimeUnix(uint32_t unixTime) { 80266c0: b51f push {r0, r1, r2, r3, r4, lr} 80266c2: 4601 mov r1, r0 TM_RTC_t data; TM_RTC_GetDateTimeFromUnix(&data, unixTime); 80266c4: 4668 mov r0, sp 80266c6: f7ff ff6f bl 80265a8 TM_RTC_SetDateTime(&data, TM_RTC_Format_BIN); 80266ca: 4668 mov r0, sp 80266cc: 2100 movs r1, #0 80266ce: f7ff fcff bl 80260d0 } 80266d2: b005 add sp, #20 80266d4: bd00 pop {pc} 080266d6 : /* Read data from backup register */ return *(uint32_t *)((&RTC->BKP0R) + 4 * location); } /* Callbacks */ __weak void TM_RTC_RequestHandler(void) { 80266d6: 4770 bx lr 080266d8 : /* If user needs this function, then they should be defined separatelly in your project */ } __weak void TM_RTC_AlarmAHandler(void) { 80266d8: 4770 bx lr 080266da : /* If user needs this function, then they should be defined separatelly in your project */ } __weak void TM_RTC_AlarmBHandler(void) { 80266da: 4770 bx lr 080266dc : /* If user needs this function, then they should be defined separatelly in your project */ } /* Private RTC IRQ handlers */ void RTC_WKUP_IRQHandler(void) { 80266dc: b508 push {r3, lr} /* Check for RTC interrupt */ if (RTC_GetITStatus(RTC_IT_WUT) != RESET) { 80266de: f44f 4080 mov.w r0, #16384 ; 0x4000 80266e2: f7ff fa25 bl 8025b30 80266e6: b128 cbz r0, 80266f4 /* Clear interrupt flags */ RTC_ClearITPendingBit(RTC_IT_WUT); 80266e8: f44f 4080 mov.w r0, #16384 ; 0x4000 80266ec: f7ff fa38 bl 8025b60 /* Call user function */ TM_RTC_RequestHandler(); 80266f0: f7ff fff1 bl 80266d6 } /* Clear EXTI line 22 bit */ EXTI->PR = 0x00400000; 80266f4: 4b02 ldr r3, [pc, #8] ; (8026700 ) 80266f6: f44f 0280 mov.w r2, #4194304 ; 0x400000 80266fa: 615a str r2, [r3, #20] 80266fc: bd08 pop {r3, pc} 80266fe: bf00 nop 8026700: 40013c00 .word 0x40013c00 08026704 : } void RTC_Alarm_IRQHandler(void) { 8026704: b508 push {r3, lr} /* RTC Alarm A check */ if (RTC_GetITStatus(RTC_IT_ALRA) != RESET) { 8026706: f44f 5080 mov.w r0, #4096 ; 0x1000 802670a: f7ff fa11 bl 8025b30 802670e: b128 cbz r0, 802671c /* Clear RTC Alarm A interrupt flag */ RTC_ClearITPendingBit(RTC_IT_ALRA); 8026710: f44f 5080 mov.w r0, #4096 ; 0x1000 8026714: f7ff fa24 bl 8025b60 /* Call user function for Alarm A */ TM_RTC_AlarmAHandler(); 8026718: f7ff ffde bl 80266d8 } /* RTC Alarm B check */ if (RTC_GetITStatus(RTC_IT_ALRB) != RESET) { 802671c: f44f 5000 mov.w r0, #8192 ; 0x2000 8026720: f7ff fa06 bl 8025b30 8026724: b128 cbz r0, 8026732 /* Clear RTC Alarm A interrupt flag */ RTC_ClearITPendingBit(RTC_IT_ALRB); 8026726: f44f 5000 mov.w r0, #8192 ; 0x2000 802672a: f7ff fa19 bl 8025b60 /* Call user function for Alarm B */ TM_RTC_AlarmBHandler(); 802672e: f7ff ffd4 bl 80266da } /* Clear EXTI line 17 bit */ EXTI->PR = 0x00020000; 8026732: 4b02 ldr r3, [pc, #8] ; (802673c ) 8026734: f44f 3200 mov.w r2, #131072 ; 0x20000 8026738: 615a str r2, [r3, #20] 802673a: bd08 pop {r3, pc} 802673c: 40013c00 .word 0x40013c00 08026740 : /** * @brief Установливает время срабатывания профилактики сульфатации */ void RTC_SetProfTime(char *str) { 8026740: b530 push {r4, r5, lr} uint32_t unixTime; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026742: 2200 movs r2, #0 /** * @brief Установливает время срабатывания профилактики сульфатации */ void RTC_SetProfTime(char *str) { 8026744: b085 sub sp, #20 TM_RTC_t tmp; uint32_t unixTime; uint8_t i = 0; 8026746: 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)); 8026748: 250a movs r5, #10 uint32_t unixTime; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802674a: e006 b.n 802675a tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802674c: fb05 1202 mla r2, r5, r2, r1 8026750: 3a30 subs r2, #48 ; 0x30 i++; 8026752: 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)); 8026754: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026758: b2db uxtb r3, r3 uint32_t unixTime; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802675a: 5cc1 ldrb r1, [r0, r3] 802675c: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026760: 2c09 cmp r4, #9 8026762: d9f3 bls.n 802674c tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 8026764: 3301 adds r3, #1 8026766: f88d 2007 strb.w r2, [sp, #7] 802676a: b2db uxtb r3, r3 /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802676c: 2200 movs r2, #0 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802676e: 250a movs r5, #10 } i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026770: e006 b.n 8026780 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026772: fb05 1202 mla r2, r5, r2, r1 8026776: 3a30 subs r2, #48 ; 0x30 i++; 8026778: 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)); 802677a: f002 02ff and.w r2, r2, #255 ; 0xff i++; 802677e: b2db uxtb r3, r3 } i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026780: 5cc1 ldrb r1, [r0, r3] 8026782: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026786: 2c09 cmp r4, #9 8026788: d9f3 bls.n 8026772 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } //i++; i+=3; 802678a: 3303 adds r3, #3 802678c: f88d 2008 strb.w r2, [sp, #8] 8026790: b2db uxtb r3, r3 /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026792: 2200 movs r2, #0 tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026794: 250a movs r5, #10 //i++; i+=3; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026796: e006 b.n 80267a6 tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026798: fb05 1202 mla r2, r5, r2, r1 802679c: 3a30 subs r2, #48 ; 0x30 i++; 802679e: 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)); 80267a0: f002 02ff and.w r2, r2, #255 ; 0xff i++; 80267a4: b2db uxtb r3, r3 //i++; i+=3; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80267a6: 5cc1 ldrb r1, [r0, r3] 80267a8: f1a1 0430 sub.w r4, r1, #48 ; 0x30 80267ac: 2c09 cmp r4, #9 80267ae: d9f3 bls.n 8026798 tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; i++; 80267b0: 3302 adds r3, #2 80267b2: f88d 2009 strb.w r2, [sp, #9] 80267b6: b2db uxtb r3, r3 /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80267b8: 2200 movs r2, #0 tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80267ba: 250a movs r5, #10 i++; i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80267bc: e006 b.n 80267cc tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80267be: fb05 1202 mla r2, r5, r2, r1 80267c2: 3a30 subs r2, #48 ; 0x30 i++; 80267c4: 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)); 80267c6: f002 02ff and.w r2, r2, #255 ; 0xff i++; 80267ca: b2db uxtb r3, r3 i++; i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80267cc: 5cc1 ldrb r1, [r0, r3] 80267ce: f1a1 0430 sub.w r4, r1, #48 ; 0x30 80267d2: 2c09 cmp r4, #9 80267d4: d9f3 bls.n 80267be tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 80267d6: 3301 adds r3, #1 80267d8: f88d 2005 strb.w r2, [sp, #5] 80267dc: b2db uxtb r3, r3 /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80267de: 2200 movs r2, #0 tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80267e0: 250a movs r5, #10 } i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80267e2: e006 b.n 80267f2 tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80267e4: fb05 1202 mla r2, r5, r2, r1 80267e8: 3a30 subs r2, #48 ; 0x30 i++; 80267ea: 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)); 80267ec: f002 02ff and.w r2, r2, #255 ; 0xff i++; 80267f0: b2db uxtb r3, r3 } i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80267f2: 5cc1 ldrb r1, [r0, r3] 80267f4: f1a1 0430 sub.w r4, r1, #48 ; 0x30 80267f8: 2c09 cmp r4, #9 80267fa: d9f3 bls.n 80267e4 i++; } i++; /* Get seconds */ tmp.seconds = 0; 80267fc: 2300 movs r3, #0 80267fe: f88d 3000 strb.w r3, [sp] /* Устанавливаем +1 для профилактики */ tmp.year += 1; 8026802: f89d 3009 ldrb.w r3, [sp, #9] 8026806: f88d 2004 strb.w r2, [sp, #4] 802680a: 3301 adds r3, #1 unixTime = TM_RTC_GetUnixTimeStamp(&tmp); 802680c: 4668 mov r0, sp /* Get seconds */ tmp.seconds = 0; /* Устанавливаем +1 для профилактики */ tmp.year += 1; 802680e: f88d 3009 strb.w r3, [sp, #9] unixTime = TM_RTC_GetUnixTimeStamp(&tmp); 8026812: f7ff fdd3 bl 80263bc if (location > 18) { return; } /* Write data to backup register */ *(uint32_t *)((&RTC->BKP0R) + 4 * location) = value; 8026816: 4b02 ldr r3, [pc, #8] ; (8026820 ) 8026818: 6018 str r0, [r3, #0] /* Устанавливаем +1 для профилактики */ tmp.year += 1; unixTime = TM_RTC_GetUnixTimeStamp(&tmp); TM_RTC_WriteBackupRegister(RTC_BKP_DR0, unixTime); 802681a: b005 add sp, #20 802681c: bd30 pop {r4, r5, pc} 802681e: bf00 nop 8026820: 40002850 .word 0x40002850 08026824 : //static TN_MUTEX spi_mutex; static uint8_t spi_tx_rx(uint8_t byte) { while (!(SPI2->SR & SPI_SR_TXE)) {} 8026824: 4907 ldr r1, [pc, #28] ; (8026844 ) 8026826: 890a ldrh r2, [r1, #8] 8026828: 4b06 ldr r3, [pc, #24] ; (8026844 ) 802682a: f002 0202 and.w r2, r2, #2 802682e: b292 uxth r2, r2 8026830: 2a00 cmp r2, #0 8026832: d0f8 beq.n 8026826 SPI2->DR = byte; 8026834: 8198 strh r0, [r3, #12] while (!(SPI2->SR & SPI_SR_RXNE)) {} 8026836: 891a ldrh r2, [r3, #8] 8026838: 07d2 lsls r2, r2, #31 802683a: d5fc bpl.n 8026836 return SPI2->DR; 802683c: 4b01 ldr r3, [pc, #4] ; (8026844 ) 802683e: 8998 ldrh r0, [r3, #12] } 8026840: b2c0 uxtb r0, r0 8026842: 4770 bx lr 8026844: 40003800 .word 0x40003800 08026848 : status = spi_tx_rx(0); } while (status & SR_WIP); SPI_FLASH_CS_H(); } static inline void send_addr(int addr) { 8026848: b510 push {r4, lr} 802684a: 4604 mov r4, r0 spi_tx_rx((addr >> 16) & 0xFF); 802684c: f3c0 4007 ubfx r0, r0, #16, #8 8026850: f7ff ffe8 bl 8026824 spi_tx_rx((addr >> 8) & 0xFF); 8026854: f3c4 2007 ubfx r0, r4, #8, #8 8026858: f7ff ffe4 bl 8026824 spi_tx_rx(addr & 0xFF); 802685c: b2e0 uxtb r0, r4 } 802685e: 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); 8026862: f7ff bfdf b.w 8026824 08026866 : } static int spi_flash_read_sfdp(int addr, void *buf, size_t len) { 8026866: b570 push {r4, r5, r6, lr} 8026868: 4605 mov r5, r0 802686a: 460c mov r4, r1 SPI_FLASH_CS_L(); 802686c: 2005 movs r0, #5 802686e: 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) { 8026870: 4616 mov r6, r2 SPI_FLASH_CS_L(); 8026872: f7ff fb5d bl 8025f30 spi_tx_rx(CMD_RDSFDP); 8026876: 205a movs r0, #90 ; 0x5a 8026878: f7ff ffd4 bl 8026824 send_addr(addr); 802687c: 4628 mov r0, r5 802687e: f7ff ffe3 bl 8026848 spi_tx_rx(0); 8026882: 2000 movs r0, #0 8026884: f7ff ffce bl 8026824 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) { 8026888: 19a6 adds r6, r4, r6 SPI_FLASH_CS_L(); spi_tx_rx(CMD_RDSFDP); send_addr(addr); spi_tx_rx(0); while (len--) 802688a: e004 b.n 8026896 *((uint8_t *)buf++) = spi_tx_rx(0); 802688c: 2000 movs r0, #0 802688e: f7ff ffc9 bl 8026824 8026892: f804 0b01 strb.w r0, [r4], #1 static int spi_flash_read_sfdp(int addr, void *buf, size_t len) { SPI_FLASH_CS_L(); spi_tx_rx(CMD_RDSFDP); send_addr(addr); spi_tx_rx(0); while (len--) 8026896: 42b4 cmp r4, r6 8026898: d1f8 bne.n 802688c *((uint8_t *)buf++) = spi_tx_rx(0); SPI_FLASH_CS_H(); 802689a: 2005 movs r0, #5 802689c: 2101 movs r1, #1 802689e: f7ff fb47 bl 8025f30 return 0; } 80268a2: 2000 movs r0, #0 80268a4: bd70 pop {r4, r5, r6, pc} 080268a6 : spi_flash_desc_t spi_flash_desc; static inline void wait_write_enable(void) { uint8_t status; // spi_cs_down(); SPI_FLASH_CS_L(); 80268a6: 2005 movs r0, #5 #define SR_WEL (1 << 1) #define SR_SRWD (1 << 7) spi_flash_desc_t spi_flash_desc; static inline void wait_write_enable(void) { 80268a8: b508 push {r3, lr} uint8_t status; // spi_cs_down(); SPI_FLASH_CS_L(); 80268aa: 2100 movs r1, #0 80268ac: f7ff fb40 bl 8025f30 spi_tx_rx(CMD_RDSR); 80268b0: 2005 movs r0, #5 80268b2: f7ff ffb7 bl 8026824 do { status = spi_tx_rx(0); 80268b6: 2000 movs r0, #0 80268b8: f7ff ffb4 bl 8026824 } while (!(status & SR_WEL)); 80268bc: f000 0002 and.w r0, r0, #2 80268c0: b2c0 uxtb r0, r0 80268c2: 2800 cmp r0, #0 80268c4: d0f7 beq.n 80268b6 // spi_cs_up(); SPI_FLASH_CS_H(); 80268c6: 2005 movs r0, #5 80268c8: 2101 movs r1, #1 } 80268ca: 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(); 80268ce: f7ff bb2f b.w 8025f30 080268d2 : } static inline void wait_write_end(void) { uint8_t status; SPI_FLASH_CS_L(); 80268d2: 2005 movs r0, #5 } while (!(status & SR_WEL)); // spi_cs_up(); SPI_FLASH_CS_H(); } static inline void wait_write_end(void) { 80268d4: b508 push {r3, lr} uint8_t status; SPI_FLASH_CS_L(); 80268d6: 2100 movs r1, #0 80268d8: f7ff fb2a bl 8025f30 spi_tx_rx(CMD_RDSR); 80268dc: 2005 movs r0, #5 80268de: f7ff ffa1 bl 8026824 do { status = spi_tx_rx(0); 80268e2: 2000 movs r0, #0 80268e4: f7ff ff9e bl 8026824 } while (status & SR_WIP); 80268e8: 07c1 lsls r1, r0, #31 80268ea: d4fa bmi.n 80268e2 SPI_FLASH_CS_H(); 80268ec: 2005 movs r0, #5 80268ee: 2101 movs r1, #1 } 80268f0: 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(); 80268f4: f7ff bb1c b.w 8025f30 080268f8 : *((uint8_t *)buf++) = 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) { 80268f8: b570 push {r4, r5, r6, lr} 80268fa: 4605 mov r5, r0 80268fc: 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(); 80268fe: 2005 movs r0, #5 8026900: 2100 movs r1, #0 *((uint8_t *)buf++) = 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) { 8026902: 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(); 8026904: f7ff fb14 bl 8025f30 spi_tx_rx(CMD_READ); 8026908: 2003 movs r0, #3 802690a: f7ff ff8b bl 8026824 send_addr(addr); 802690e: 4628 mov r0, r5 8026910: f7ff ff9a bl 8026848 *((uint8_t *)buf++) = 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) { 8026914: 19a6 adds r6, r4, r6 // return ret; SPI_FLASH_CS_L(); spi_tx_rx(CMD_READ); send_addr(addr); while (len--) 8026916: e004 b.n 8026922 *((uint8_t *)buf++) = spi_tx_rx(0); 8026918: 2000 movs r0, #0 802691a: f7ff ff83 bl 8026824 802691e: f804 0b01 strb.w r0, [r4], #1 // return ret; SPI_FLASH_CS_L(); spi_tx_rx(CMD_READ); send_addr(addr); while (len--) 8026922: 42b4 cmp r4, r6 8026924: d1f8 bne.n 8026918 *((uint8_t *)buf++) = spi_tx_rx(0); SPI_FLASH_CS_H(); 8026926: 2005 movs r0, #5 8026928: 2101 movs r1, #1 802692a: f7ff fb01 bl 8025f30 // tn_mutex_unlock(&spi_mutex); return len; } 802692e: f04f 30ff mov.w r0, #4294967295 8026932: bd70 pop {r4, r5, r6, pc} 08026934 : // 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) 8026934: 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) { 8026936: b570 push {r4, r5, r6, lr} 8026938: 4615 mov r5, 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) 802693a: 18d2 adds r2, r2, r3 802693c: 2aff cmp r2, #255 ; 0xff len = 0x100 - (addr & 0xFF); 802693e: bf88 it hi 8026940: f5c3 7580 rsbhi r5, r3, #256 ; 0x100 return len; } #define TIMEOUT 10000 uint16_t spi_flash_pp(int addr, const void *buf, size_t len, uint32_t timeout) { 8026944: 4604 mov r4, r0 8026946: 460e mov r6, r1 ssize_t ret = 0; if ((addr & 0xFF) + len > 0xFF) len = 0x100 - (addr & 0xFF); ret = len; SPI_FLASH_CS_L(); 8026948: 2005 movs r0, #5 802694a: 2100 movs r1, #0 802694c: f7ff faf0 bl 8025f30 spi_tx_rx(CMD_WREN); 8026950: 2006 movs r0, #6 8026952: f7ff ff67 bl 8026824 SPI_FLASH_CS_H(); 8026956: 2005 movs r0, #5 8026958: 2101 movs r1, #1 802695a: f7ff fae9 bl 8025f30 wait_write_enable(); 802695e: f7ff ffa2 bl 80268a6 SPI_FLASH_CS_L(); 8026962: 2100 movs r1, #0 8026964: 2005 movs r0, #5 8026966: f7ff fae3 bl 8025f30 spi_tx_rx(CMD_PP); 802696a: 2002 movs r0, #2 802696c: f7ff ff5a bl 8026824 send_addr(addr); 8026970: 4620 mov r0, r4 8026972: f7ff ff69 bl 8026848 while (len--) 8026976: 2400 movs r4, #0 8026978: e003 b.n 8026982 spi_tx_rx(*((uint8_t *)buf++)); 802697a: 5d30 ldrb r0, [r6, r4] 802697c: f7ff ff52 bl 8026824 8026980: 3401 adds r4, #1 wait_write_enable(); SPI_FLASH_CS_L(); spi_tx_rx(CMD_PP); send_addr(addr); while (len--) 8026982: 42ac cmp r4, r5 8026984: d1f9 bne.n 802697a spi_tx_rx(*((uint8_t *)buf++)); SPI_FLASH_CS_H(); 8026986: 2005 movs r0, #5 8026988: 2101 movs r1, #1 802698a: f7ff fad1 bl 8025f30 wait_write_end(); 802698e: f7ff ffa0 bl 80268d2 // tn_mutex_unlock(&spi_mutex); return ret; } 8026992: b2a0 uxth r0, r4 8026994: bd70 pop {r4, r5, r6, pc} 08026996 : ssize_t spi_flash_write(int addr, const void *buf, size_t len, uint32_t timeout) { 8026996: b5f8 push {r3, r4, r5, r6, r7, lr} 8026998: 4607 mov r7, r0 802699a: 460e mov r6, r1 802699c: 4615 mov r5, r2 int ret = 0, offset = 0; 802699e: 2400 movs r4, #0 do { ret = spi_flash_pp(addr + offset, buf + offset, len - offset, 0); 80269a0: 1938 adds r0, r7, r4 80269a2: 1931 adds r1, r6, r4 80269a4: 1b2a subs r2, r5, r4 80269a6: 2300 movs r3, #0 80269a8: f7ff ffc4 bl 8026934 offset += ret; 80269ac: 1824 adds r4, r4, r0 } while (len - offset); 80269ae: 42a5 cmp r5, r4 80269b0: d1f6 bne.n 80269a0 return 0; } 80269b2: 2000 movs r0, #0 80269b4: bdf8 pop {r3, r4, r5, r6, r7, pc} 080269b6 : wait_write_end(); return 0; } int spi_flash_erase_sector(int addr, uint32_t timeout) { 80269b6: 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(); 80269b8: 2100 movs r1, #0 wait_write_end(); return 0; } int spi_flash_erase_sector(int addr, uint32_t timeout) { 80269ba: 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(); 80269bc: 2005 movs r0, #5 80269be: f7ff fab7 bl 8025f30 spi_tx_rx(CMD_WREN); 80269c2: 2006 movs r0, #6 80269c4: f7ff ff2e bl 8026824 SPI_FLASH_CS_H(); 80269c8: 2005 movs r0, #5 80269ca: 2101 movs r1, #1 80269cc: f7ff fab0 bl 8025f30 wait_write_enable(); 80269d0: f7ff ff69 bl 80268a6 SPI_FLASH_CS_L(); 80269d4: 2100 movs r1, #0 80269d6: 2005 movs r0, #5 80269d8: f7ff faaa bl 8025f30 spi_tx_rx(CMD_SE); 80269dc: 2020 movs r0, #32 80269de: f7ff ff21 bl 8026824 send_addr(addr); 80269e2: 4620 mov r0, r4 80269e4: f7ff ff30 bl 8026848 SPI_FLASH_CS_H(); 80269e8: 2005 movs r0, #5 80269ea: 2101 movs r1, #1 80269ec: f7ff faa0 bl 8025f30 wait_write_end(); 80269f0: f7ff ff6f bl 80268d2 // tn_mutex_unlock(&spi_mutex); return 0; } 80269f4: 2000 movs r0, #0 80269f6: bd10 pop {r4, pc} 080269f8 : bool spi_flash_init(void) { 80269f8: b530 push {r4, r5, lr} uint32_t i, ptable, bitsize = 0; uint8_t tmp[4]; spi_flash_desc.present = false; 80269fa: 4b48 ldr r3, [pc, #288] ; (8026b1c ) // tn_mutex_unlock(&spi_mutex); return 0; } bool spi_flash_init(void) { uint32_t i, ptable, bitsize = 0; 80269fc: 2400 movs r4, #0 // tn_mutex_unlock(&spi_mutex); return 0; } bool spi_flash_init(void) { 80269fe: b085 sub sp, #20 uint32_t i, ptable, bitsize = 0; uint8_t tmp[4]; spi_flash_desc.present = false; 8026a00: 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; 8026a02: 4b47 ldr r3, [pc, #284] ; (8026b20 ) // tn_mutex_unlock(&spi_mutex); return 0; } bool spi_flash_init(void) { uint32_t i, ptable, bitsize = 0; 8026a04: 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; 8026a06: 6c1a ldr r2, [r3, #64] ; 0x40 8026a08: f442 4280 orr.w r2, r2, #16384 ; 0x4000 8026a0c: 641a str r2, [r3, #64] ; 0x40 RCC->APB1RSTR |= RCC_APB1RSTR_SPI2RST; 8026a0e: 6a1a ldr r2, [r3, #32] 8026a10: f442 4200 orr.w r2, r2, #32768 ; 0x8000 8026a14: 621a str r2, [r3, #32] RCC->APB1RSTR &= ~RCC_APB1RSTR_SPI2RST; 8026a16: 6a1a ldr r2, [r3, #32] 8026a18: f422 4200 bic.w r2, r2, #32768 ; 0x8000 8026a1c: 621a str r2, [r3, #32] SPI2->CR1 &= ~SPI_CR1_SPE; 8026a1e: 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); 8026a22: 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; 8026a24: 881a ldrh r2, [r3, #0] 8026a26: f022 0240 bic.w r2, r2, #64 ; 0x40 8026a2a: 0412 lsls r2, r2, #16 8026a2c: 0c12 lsrs r2, r2, #16 8026a2e: 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; 8026a30: f44f 7241 mov.w r2, #772 ; 0x304 8026a34: 801a strh r2, [r3, #0] SPI2->CR2 = 0;//SPI_CR2_SSOE; 8026a36: 809c strh r4, [r3, #4] SPI2->CR1 |= SPI_CR1_SPE; 8026a38: 881a ldrh r2, [r3, #0] 8026a3a: b292 uxth r2, r2 8026a3c: f042 0240 orr.w r2, r2, #64 ; 0x40 8026a40: 801a strh r2, [r3, #0] spi_flash_desc.present = false; spi_init_(); // check SFDP magic spi_flash_read_sfdp(0, tmp, 4); 8026a42: 4620 mov r0, r4 8026a44: 2204 movs r2, #4 8026a46: 4629 mov r1, r5 8026a48: f7ff ff0d bl 8026866 if (!(tmp[0] == 0x53 && tmp[1] == 0x46 && 8026a4c: f89d 300c ldrb.w r3, [sp, #12] 8026a50: 2b53 cmp r3, #83 ; 0x53 8026a52: d001 beq.n 8026a58 tmp[2] == 0x44 && tmp[3] == 0x50)) return 0; 8026a54: 2000 movs r0, #0 8026a56: e05e b.n 8026b16 spi_init_(); // check SFDP magic spi_flash_read_sfdp(0, tmp, 4); if (!(tmp[0] == 0x53 && tmp[1] == 0x46 && 8026a58: f89d 300d ldrb.w r3, [sp, #13] 8026a5c: 2b46 cmp r3, #70 ; 0x46 8026a5e: d1f9 bne.n 8026a54 8026a60: f89d 300e ldrb.w r3, [sp, #14] 8026a64: 2b44 cmp r3, #68 ; 0x44 8026a66: d1f5 bne.n 8026a54 8026a68: f89d 300f ldrb.w r3, [sp, #15] 8026a6c: 2b50 cmp r3, #80 ; 0x50 8026a6e: d1f1 bne.n 8026a54 tmp[2] == 0x44 && tmp[3] == 0x50)) return 0; // get parameter headers count spi_flash_read_sfdp(0x06, tmp, 1); 8026a70: 2006 movs r0, #6 8026a72: 4629 mov r1, r5 8026a74: 2201 movs r2, #1 8026a76: f7ff fef6 bl 8026866 // find first jedec pheader (with ID == 0) for (ptable = 0x08, i = 0; i <= tmp[0]; i++, ptable += 8) { 8026a7a: 2308 movs r3, #8 8026a7c: e01a b.n 8026ab4 spi_flash_read_sfdp(ptable, tmp, 1); 8026a7e: 9801 ldr r0, [sp, #4] 8026a80: 4629 mov r1, r5 8026a82: 2201 movs r2, #1 8026a84: f7ff feef bl 8026866 if (tmp[0] == 0) 8026a88: f89d 300c ldrb.w r3, [sp, #12] 8026a8c: b97b cbnz r3, 8026aae break; } // read ptable pointer from pheader spi_flash_read_sfdp(ptable + 4, &ptable, 3); 8026a8e: a904 add r1, sp, #16 8026a90: 2203 movs r2, #3 8026a92: f851 0d0c ldr.w r0, [r1, #-12]! 8026a96: 3004 adds r0, #4 8026a98: f7ff fee5 bl 8026866 // get flash density (size in bits) if (spi_flash_read_sfdp(ptable + 4, &bitsize, 4) < 0 || !bitsize) 8026a9c: 9801 ldr r0, [sp, #4] 8026a9e: 2204 movs r2, #4 8026aa0: 3004 adds r0, #4 8026aa2: a902 add r1, sp, #8 8026aa4: f7ff fedf bl 8026866 8026aa8: 2800 cmp r0, #0 8026aaa: da09 bge.n 8026ac0 8026aac: e7d2 b.n 8026a54 // 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) { 8026aae: 9b01 ldr r3, [sp, #4] 8026ab0: 3401 adds r4, #1 8026ab2: 3308 adds r3, #8 8026ab4: 9301 str r3, [sp, #4] 8026ab6: f89d 300c ldrb.w r3, [sp, #12] 8026aba: 429c cmp r4, r3 8026abc: d9df bls.n 8026a7e 8026abe: e7e6 b.n 8026a8e // 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) 8026ac0: 9b02 ldr r3, [sp, #8] 8026ac2: 2b00 cmp r3, #0 8026ac4: d0c6 beq.n 8026a54 8026ac6: 2400 movs r4, #0 return 0; // find smallest available sector for (i = 0; i < 4; i++) { tmp[0] = 0; 8026ac8: 4625 mov r5, r4 if (spi_flash_read_sfdp(ptable + 0x1C + i*2, &tmp, 2) >= 0 && 8026aca: 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; 8026acc: f88d 500c strb.w r5, [sp, #12] if (spi_flash_read_sfdp(ptable + 0x1C + i*2, &tmp, 2) >= 0 && 8026ad0: 301c adds r0, #28 8026ad2: 2202 movs r2, #2 8026ad4: 1900 adds r0, r0, r4 8026ad6: a903 add r1, sp, #12 8026ad8: f7ff fec5 bl 8026866 8026adc: 2800 cmp r0, #0 8026ade: db11 blt.n 8026b04 tmp[0]) { 8026ae0: 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 && 8026ae4: b172 cbz r2, 8026b04 tmp[0]) { spi_flash_desc.sector_size = 1 << tmp[0]; 8026ae6: 4b0d ldr r3, [pc, #52] ; (8026b1c ) 8026ae8: 2101 movs r1, #1 8026aea: fa01 f102 lsl.w r1, r1, r2 8026aee: 6059 str r1, [r3, #4] spi_flash_desc.sector_erase_op = tmp[1]; 8026af0: f89d 100d ldrb.w r1, [sp, #13] 8026af4: 7219 strb r1, [r3, #8] spi_flash_desc.sector_count = (bitsize + 1) >> (3 + tmp[0]); 8026af6: 9902 ldr r1, [sp, #8] 8026af8: 3203 adds r2, #3 8026afa: 3101 adds r1, #1 8026afc: fa21 f202 lsr.w r2, r1, r2 8026b00: 815a strh r2, [r3, #10] break; 8026b02: e002 b.n 8026b0a 8026b04: 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++) { 8026b06: 2c08 cmp r4, #8 8026b08: d1df bne.n 8026aca 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) 8026b0a: 4b04 ldr r3, [pc, #16] ; (8026b1c ) 8026b0c: 685a ldr r2, [r3, #4] 8026b0e: 2a00 cmp r2, #0 8026b10: d0a0 beq.n 8026a54 return 0; spi_flash_desc.present = true; 8026b12: 2001 movs r0, #1 8026b14: 7018 strb r0, [r3, #0] return 1; } 8026b16: b005 add sp, #20 8026b18: bd30 pop {r4, r5, pc} 8026b1a: bf00 nop 8026b1c: 2000c83c .word 0x2000c83c 8026b20: 40023800 .word 0x40023800 08026b24 : #include void GetSTM32IDStr(char* str, uint8_t* len) { 8026b24: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8026b28: b08a sub sp, #40 ; 0x28 uint8_t i; char TempStr[33]; memset(TempStr, 0, 33); 8026b2a: ac01 add r4, sp, #4 #include void GetSTM32IDStr(char* str, uint8_t* len) { 8026b2c: 4607 mov r7, r0 8026b2e: 460e mov r6, r1 uint8_t i; char TempStr[33]; memset(TempStr, 0, 33); 8026b30: 4620 mov r0, r4 8026b32: 2100 movs r1, #0 8026b34: 2221 movs r2, #33 ; 0x21 8026b36: f7fa ffe3 bl 8021b00 8026b3a: 4d0e ldr r5, [pc, #56] ; (8026b74 ) for(i = 0; i < 12; i++) 8026b3c: f8df 803c ldr.w r8, [pc, #60] ; 8026b7c { sprintf(TempStr, "%02X", STM32_UUID[i]); 8026b40: f815 2f01 ldrb.w r2, [r5, #1]! 8026b44: 490c ldr r1, [pc, #48] ; (8026b78 ) 8026b46: 4620 mov r0, r4 8026b48: f000 fe64 bl 8027814 *len = strlen(TempStr); 8026b4c: 4620 mov r0, r4 8026b4e: f7fb f9af bl 8021eb0 8026b52: 4602 mov r2, r0 8026b54: 7030 strb r0, [r6, #0] strncat(str, TempStr, *len); 8026b56: 4621 mov r1, r4 8026b58: 4638 mov r0, r7 8026b5a: b2d2 uxtb r2, r2 8026b5c: f7fb f9d8 bl 8021f10 { uint8_t i; char TempStr[33]; memset(TempStr, 0, 33); for(i = 0; i < 12; i++) 8026b60: 4545 cmp r5, r8 8026b62: d1ed bne.n 8026b40 { sprintf(TempStr, "%02X", STM32_UUID[i]); *len = strlen(TempStr); strncat(str, TempStr, *len); } *len = strlen(str); 8026b64: 4638 mov r0, r7 8026b66: f7fb f9a3 bl 8021eb0 8026b6a: 7030 strb r0, [r6, #0] } 8026b6c: b00a add sp, #40 ; 0x28 8026b6e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8026b72: bf00 nop 8026b74: 1fff7a0f .word 0x1fff7a0f 8026b78: 08039718 .word 0x08039718 8026b7c: 1fff7a1b .word 0x1fff7a1b 08026b80 : \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 */ 8026b80: f000 0007 and.w r0, r0, #7 uint32_t PreemptPriorityBits; uint32_t SubPriorityBits; PreemptPriorityBits = ((7 - PriorityGroupTmp) > __NVIC_PRIO_BITS) ? __NVIC_PRIO_BITS : 7 - PriorityGroupTmp; 8026b84: f1c0 0307 rsb r3, r0, #7 SubPriorityBits = ((PriorityGroupTmp + __NVIC_PRIO_BITS) < 7) ? 0 : PriorityGroupTmp - 7 + __NVIC_PRIO_BITS; 8026b88: 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; 8026b8a: 2b04 cmp r3, #4 8026b8c: bf28 it cs 8026b8e: 2304 movcs r3, #4 SubPriorityBits = ((PriorityGroupTmp + __NVIC_PRIO_BITS) < 7) ? 0 : PriorityGroupTmp - 7 + __NVIC_PRIO_BITS; 8026b90: 2a06 cmp r2, #6 8026b92: d901 bls.n 8026b98 8026b94: 3803 subs r0, #3 8026b96: e000 b.n 8026b9a 8026b98: 2000 movs r0, #0 return ( ((PreemptPriority & ((1 << (PreemptPriorityBits)) - 1)) << SubPriorityBits) | 8026b9a: 2201 movs r2, #1 8026b9c: fa02 f303 lsl.w r3, r2, r3 8026ba0: 3b01 subs r3, #1 8026ba2: f003 0305 and.w r3, r3, #5 ((SubPriority & ((1 << (SubPriorityBits )) - 1))) ); } 8026ba6: fa03 f000 lsl.w r0, r3, r0 8026baa: 4770 bx lr 08026bac : uint32_t ups_tx_fifo[UPS_RBUF_SIZE]; SemaphoreHandle_t xSem_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) { 8026bac: 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; 8026bae: 4d34 ldr r5, [pc, #208] ; (8026c80 ) uint32_t ups_tx_fifo[UPS_RBUF_SIZE]; SemaphoreHandle_t xSem_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) { 8026bb0: 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; 8026bb4: 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) 8026bb6: 2a09 cmp r2, #9 8026bb8: bf0c ite eq 8026bba: f44f 5280 moveq.w r2, #4096 ; 0x1000 8026bbe: 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; 8026bc0: 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; 8026bc2: 80ee strh r6, [r5, #6] USART_InitStructure.USART_Parity = parity; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; 8026bc4: 2600 movs r6, #0 uint32_t ups_tx_fifo[UPS_RBUF_SIZE]; SemaphoreHandle_t xSem_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) { 8026bc6: 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; 8026bc8: 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; 8026bca: 6029 str r1, [r5, #0] USART_InitStructure.USART_WordLength = wordlen_tmp; 8026bcc: 80aa strh r2, [r5, #4] USART_InitStructure.USART_StopBits = stop; USART_InitStructure.USART_Parity = parity; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; 8026bce: 81ae strh r6, [r5, #12] USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx; USART_DeInit(uart); 8026bd0: f7fe ffde bl 8025b90 if (uart == USART1) { 8026bd4: 4b2b ldr r3, [pc, #172] ; (8026c84 ) 8026bd6: 429c cmp r4, r3 8026bd8: d111 bne.n 8026bfe RCC->APB2ENR |= RCC_APB2Periph_USART1; 8026bda: f503 3394 add.w r3, r3, #75776 ; 0x12800 8026bde: 6c5a ldr r2, [r3, #68] ; 0x44 8026be0: f042 0210 orr.w r2, r2, #16 8026be4: 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 */ 8026be6: 4b28 ldr r3, [pc, #160] ; (8026c88 ) 8026be8: 68d8 ldr r0, [r3, #12] NVIC_SetPriority(USART1_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 0x05, 0)); 8026bea: f3c0 2002 ubfx r0, r0, #8, #3 8026bee: f7ff ffc7 bl 8026b80 __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 */ 8026bf2: 4b26 ldr r3, [pc, #152] ; (8026c8c ) 8026bf4: 0100 lsls r0, r0, #4 8026bf6: 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 */ 8026bfa: 2220 movs r2, #32 8026bfc: e028 b.n 8026c50 USART_Cmd(USART1, ENABLE); USART_ITConfig(USART1, USART_IT_RXNE, ENABLE); USART_ITConfig(USART1, USART_IT_TXE, DISABLE); } if (uart == USART2) { 8026bfe: 4b24 ldr r3, [pc, #144] ; (8026c90 ) 8026c00: 429c cmp r4, r3 8026c02: d111 bne.n 8026c28 RCC->APB1ENR |= RCC_APB1Periph_USART2; 8026c04: f503 33fa add.w r3, r3, #128000 ; 0x1f400 8026c08: 6c1a ldr r2, [r3, #64] ; 0x40 8026c0a: f442 3200 orr.w r2, r2, #131072 ; 0x20000 8026c0e: 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 */ 8026c10: 4b1d ldr r3, [pc, #116] ; (8026c88 ) 8026c12: 68d8 ldr r0, [r3, #12] NVIC_SetPriority(USART2_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 0x05, 0)); 8026c14: f3c0 2002 ubfx r0, r0, #8, #3 8026c18: f7ff ffb2 bl 8026b80 __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 */ 8026c1c: 4b1b ldr r3, [pc, #108] ; (8026c8c ) 8026c1e: 0100 lsls r0, r0, #4 8026c20: 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 */ 8026c24: 2240 movs r2, #64 ; 0x40 8026c26: e013 b.n 8026c50 USART_Cmd(USART2, ENABLE); USART_ITConfig(USART2, USART_IT_RXNE, ENABLE); USART_ITConfig(USART2, USART_IT_TXE, DISABLE); } if (uart == USART3) { 8026c28: 4b1a ldr r3, [pc, #104] ; (8026c94 ) 8026c2a: 429c cmp r4, r3 8026c2c: d127 bne.n 8026c7e RCC->APB1ENR |= RCC_APB1Periph_USART3; 8026c2e: f503 33f8 add.w r3, r3, #126976 ; 0x1f000 8026c32: 6c1a ldr r2, [r3, #64] ; 0x40 8026c34: f442 2280 orr.w r2, r2, #262144 ; 0x40000 8026c38: 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 */ 8026c3a: 4b13 ldr r3, [pc, #76] ; (8026c88 ) 8026c3c: 68d8 ldr r0, [r3, #12] NVIC_SetPriority(USART3_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 0x05, 0)); 8026c3e: f3c0 2002 ubfx r0, r0, #8, #3 8026c42: f7ff ff9d bl 8026b80 __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 */ 8026c46: 4b11 ldr r3, [pc, #68] ; (8026c8c ) 8026c48: 0100 lsls r0, r0, #4 8026c4a: 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 */ 8026c4e: 2280 movs r2, #128 ; 0x80 8026c50: 605a str r2, [r3, #4] NVIC_EnableIRQ(USART3_IRQn); USART_Init(USART3, &USART_InitStructure); 8026c52: 4620 mov r0, r4 8026c54: 4629 mov r1, r5 8026c56: f7fe ffef bl 8025c38 USART_Cmd(USART3, ENABLE); 8026c5a: 4620 mov r0, r4 8026c5c: 2101 movs r1, #1 8026c5e: f7ff f845 bl 8025cec USART_ITConfig(USART3, USART_IT_RXNE, ENABLE); 8026c62: 4620 mov r0, r4 8026c64: 2201 movs r2, #1 8026c66: f240 5125 movw r1, #1317 ; 0x525 8026c6a: f7ff f84b bl 8025d04 USART_ITConfig(USART3, USART_IT_TXE, DISABLE); 8026c6e: 4620 mov r0, r4 8026c70: f240 7127 movw r1, #1831 ; 0x727 8026c74: 4632 mov r2, r6 } } 8026c76: 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); 8026c7a: f7ff b843 b.w 8025d04 8026c7e: bd70 pop {r4, r5, r6, pc} 8026c80: 2000cb88 .word 0x2000cb88 8026c84: 40011000 .word 0x40011000 8026c88: e000ed00 .word 0xe000ed00 8026c8c: e000e100 .word 0xe000e100 8026c90: 40004400 .word 0x40004400 8026c94: 40004800 .word 0x40004800 08026c98 : } } void InitUSART(void) { 8026c98: b507 push {r0, r1, r2, lr} xSem_rx_buf = xSemaphoreCreateCounting( UPS_RBUF_SIZE, 0 ); 8026c9a: 2100 movs r1, #0 8026c9c: 2064 movs r0, #100 ; 0x64 8026c9e: f003 fbe6 bl 802a46e 8026ca2: 4b0a ldr r3, [pc, #40] ; (8026ccc ) rbuf32_init(&ups_tx_rbuf, ups_tx_fifo, UPS_RBUF_SIZE); 8026ca4: 490a ldr r1, [pc, #40] ; (8026cd0 ) USART_ITConfig(USART3, USART_IT_TXE, DISABLE); } } void InitUSART(void) { xSem_rx_buf = xSemaphoreCreateCounting( UPS_RBUF_SIZE, 0 ); 8026ca6: 6018 str r0, [r3, #0] rbuf32_init(&ups_tx_rbuf, ups_tx_fifo, UPS_RBUF_SIZE); 8026ca8: 2264 movs r2, #100 ; 0x64 8026caa: 480a ldr r0, [pc, #40] ; (8026cd4 ) 8026cac: f002 f9f8 bl 80290a0 rbuf32_init(&ups_rx_rbuf, ups_rx_fifo, UPS_RBUF_SIZE); 8026cb0: 2264 movs r2, #100 ; 0x64 8026cb2: 4809 ldr r0, [pc, #36] ; (8026cd8 ) 8026cb4: 4909 ldr r1, [pc, #36] ; (8026cdc ) 8026cb6: f002 f9f3 bl 80290a0 uart_hw_init(UPS_USART, UPS_USART_BAUD, UPS_USART_WORD_LEN, UPS_USART_PARITY, UPS_USART_STOP_BIT); 8026cba: 2300 movs r3, #0 8026cbc: 9300 str r3, [sp, #0] 8026cbe: 4808 ldr r0, [pc, #32] ; (8026ce0 ) 8026cc0: f44f 6116 mov.w r1, #2400 ; 0x960 8026cc4: 2208 movs r2, #8 8026cc6: f7ff ff71 bl 8026bac } 8026cca: bd0e pop {r1, r2, r3, pc} 8026ccc: 2000cb98 .word 0x2000cb98 8026cd0: 2000c858 .word 0x2000c858 8026cd4: 2000cb78 .word 0x2000cb78 8026cd8: 2000c848 .word 0x2000c848 8026cdc: 2000c9e8 .word 0x2000c9e8 8026ce0: 40004400 .word 0x40004400 08026ce4 : } int ups_send_block(void *data, uint8_t len) { int i = 0; uint32_t s_temp = 0; UPS_USART->CR1 &= ~USART_CR1_TXEIE; 8026ce4: 4a0f ldr r2, [pc, #60] ; (8026d24 ) 8026ce6: 8993 ldrh r3, [r2, #12] 8026ce8: f023 0380 bic.w r3, r3, #128 ; 0x80 8026cec: 041b lsls r3, r3, #16 8026cee: 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) { 8026cf0: b570 push {r4, r5, r6, lr} 8026cf2: 4606 mov r6, r0 8026cf4: 460d mov r5, r1 int i = 0; uint32_t s_temp = 0; UPS_USART->CR1 &= ~USART_CR1_TXEIE; 8026cf6: 8193 strh r3, [r2, #12] } UPS_USART->CR1 |= USART_CR1_TXEIE; } int ups_send_block(void *data, uint8_t len) { int i = 0; 8026cf8: 2400 movs r4, #0 uint32_t s_temp = 0; UPS_USART->CR1 &= ~USART_CR1_TXEIE; //DBG printf("STOP \r\n"); while (i < len) { 8026cfa: e008 b.n 8026d0e if (!rbuf_isfull(&ups_tx_rbuf)) { 8026cfc: 480a ldr r0, [pc, #40] ; (8026d28 ) 8026cfe: f002 f9d5 bl 80290ac 8026d02: b930 cbnz r0, 8026d12 s_temp = ((uint8_t *)data)[i++]; 8026d04: 5d31 ldrb r1, [r6, r4] rbuf32_put(&ups_tx_rbuf, s_temp); 8026d06: 4808 ldr r0, [pc, #32] ; (8026d28 ) 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++]; 8026d08: 3401 adds r4, #1 rbuf32_put(&ups_tx_rbuf, s_temp); 8026d0a: f002 f9f0 bl 80290ee 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) { 8026d0e: 42ac cmp r4, r5 8026d10: dbf4 blt.n 8026cfc rbuf32_put(&ups_tx_rbuf, s_temp); } else break; } UPS_USART->CR1 |= USART_CR1_TXEIE; 8026d12: 4b04 ldr r3, [pc, #16] ; (8026d24 ) 8026d14: 899a ldrh r2, [r3, #12] 8026d16: b292 uxth r2, r2 8026d18: f042 0280 orr.w r2, r2, #128 ; 0x80 8026d1c: 819a strh r2, [r3, #12] return i; } 8026d1e: 4620 mov r0, r4 8026d20: bd70 pop {r4, r5, r6, pc} 8026d22: bf00 nop 8026d24: 40004400 .word 0x40004400 8026d28: 2000cb78 .word 0x2000cb78 08026d2c : int ups_getchar(unsigned int timeout) { int res; res = xSemaphoreTake( xSem_rx_buf, (TickType_t)timeout ); 8026d2c: 4b09 ldr r3, [pc, #36] ; (8026d54 ) } UPS_USART->CR1 |= USART_CR1_TXEIE; return i; } int ups_getchar(unsigned int timeout) { 8026d2e: b507 push {r0, r1, r2, lr} int res; res = xSemaphoreTake( xSem_rx_buf, (TickType_t)timeout ); 8026d30: 2100 movs r1, #0 } UPS_USART->CR1 |= USART_CR1_TXEIE; return i; } int ups_getchar(unsigned int timeout) { 8026d32: 4602 mov r2, r0 int res; res = xSemaphoreTake( xSem_rx_buf, (TickType_t)timeout ); 8026d34: 6818 ldr r0, [r3, #0] 8026d36: 460b mov r3, r1 8026d38: f003 fcef bl 802a71a 8026d3c: 9001 str r0, [sp, #4] if (res == pdFALSE) { 8026d3e: b128 cbz r0, 8026d4c return -1; } rbuf32_get(&ups_rx_rbuf, &res); 8026d40: 4805 ldr r0, [pc, #20] ; (8026d58 ) 8026d42: a901 add r1, sp, #4 8026d44: f002 f9be bl 80290c4 // DBG printf("STOP \r\n"); // DBG printf("wr: %d 0x%x\r\n", rs485_rx_rbuf.read_index,res); return res; 8026d48: 9801 ldr r0, [sp, #4] 8026d4a: e001 b.n 8026d50 int ups_getchar(unsigned int timeout) { int res; res = xSemaphoreTake( xSem_rx_buf, (TickType_t)timeout ); if (res == pdFALSE) { return -1; 8026d4c: f04f 30ff mov.w r0, #4294967295 } rbuf32_get(&ups_rx_rbuf, &res); // DBG printf("STOP \r\n"); // DBG printf("wr: %d 0x%x\r\n", rs485_rx_rbuf.read_index,res); return res; } 8026d50: bd0e pop {r1, r2, r3, pc} 8026d52: bf00 nop 8026d54: 2000cb98 .word 0x2000cb98 8026d58: 2000c848 .word 0x2000c848 08026d5c : portYIELD_FROM_ISR(xHigherPriorityTaskWoken); } } void USART1_IRQHandler(void) { 8026d5c: 4770 bx lr 8026d5e: 0000 movs r0, r0 08026d60 : } void USART2_IRQHandler(void) { 8026d60: b513 push {r0, r1, r4, lr} inline void rs232_irq_handler(void) { uint32_t c = 0; 8026d62: 2300 movs r3, #0 8026d64: 9301 str r3, [sp, #4] static BaseType_t xHigherPriorityTaskWoken = pdFALSE; if ((UPS_USART->SR & USART_SR_ORE)) { 8026d66: 4b26 ldr r3, [pc, #152] ; (8026e00 ) 8026d68: 881a ldrh r2, [r3, #0] 8026d6a: f002 0208 and.w r2, r2, #8 8026d6e: b292 uxth r2, r2 8026d70: b112 cbz r2, 8026d78 c = (uint32_t)UPS_USART->DR; 8026d72: 889b ldrh r3, [r3, #4] 8026d74: b29b uxth r3, r3 8026d76: 9301 str r3, [sp, #4] //DBG printf("overrunRS485\r\n"); } if (USART_GetITStatus(UPS_USART, USART_IT_TXE) != RESET) { 8026d78: 4c21 ldr r4, [pc, #132] ; (8026e00 ) 8026d7a: f240 7127 movw r1, #1831 ; 0x727 8026d7e: 4620 mov r0, r4 8026d80: f7fe ffd9 bl 8025d36 8026d84: b1c0 cbz r0, 8026db8 if(rbuf32_get(&ups_tx_rbuf, &c)) { 8026d86: 481f ldr r0, [pc, #124] ; (8026e04 ) 8026d88: a901 add r1, sp, #4 8026d8a: f002 f99b bl 80290c4 8026d8e: b118 cbz r0, 8026d98 UPS_USART->DR = (uint16_t)c; 8026d90: f8bd 3004 ldrh.w r3, [sp, #4] 8026d94: 80a3 strh r3, [r4, #4] 8026d96: e00a b.n 8026dae //DBG printf("wr: %d 0x%x\r\n", rs485_tx_rbuf.read_index,c); } else { UPS_USART->CR1 &= ~USART_CR1_TXEIE; 8026d98: 89a3 ldrh r3, [r4, #12] 8026d9a: f023 0380 bic.w r3, r3, #128 ; 0x80 8026d9e: 041b lsls r3, r3, #16 8026da0: 0c1b lsrs r3, r3, #16 8026da2: 81a3 strh r3, [r4, #12] UPS_USART->CR1 |= USART_CR1_RXNEIE; 8026da4: 89a3 ldrh r3, [r4, #12] 8026da6: b29b uxth r3, r3 8026da8: f043 0320 orr.w r3, r3, #32 8026dac: 81a3 strh r3, [r4, #12] } USART_ClearITPendingBit(UPS_USART, USART_IT_TXE); 8026dae: 4814 ldr r0, [pc, #80] ; (8026e00 ) 8026db0: f240 7127 movw r1, #1831 ; 0x727 8026db4: f7fe ffdf bl 8025d76 } if(USART_GetITStatus(UPS_USART, USART_IT_RXNE) != RESET) 8026db8: 4c11 ldr r4, [pc, #68] ; (8026e00 ) 8026dba: f240 5125 movw r1, #1317 ; 0x525 8026dbe: 4620 mov r0, r4 8026dc0: f7fe ffb9 bl 8025d36 8026dc4: b1d8 cbz r0, 8026dfe { c = (uint32_t)UPS_USART->DR; 8026dc6: 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)) 8026dc8: 480f ldr r0, [pc, #60] ; (8026e08 ) } USART_ClearITPendingBit(UPS_USART, USART_IT_TXE); } if(USART_GetITStatus(UPS_USART, USART_IT_RXNE) != RESET) { c = (uint32_t)UPS_USART->DR; 8026dca: b29b uxth r3, r3 8026dcc: 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)) 8026dce: f002 f96d bl 80290ac 8026dd2: b918 cbnz r0, 8026ddc rbuf32_put(&ups_rx_rbuf, c); 8026dd4: 480c ldr r0, [pc, #48] ; (8026e08 ) 8026dd6: 9901 ldr r1, [sp, #4] 8026dd8: f002 f989 bl 80290ee USART_ClearITPendingBit(UPS_USART, USART_IT_RXNE); 8026ddc: 4808 ldr r0, [pc, #32] ; (8026e00 ) xSemaphoreGiveFromISR(xSem_rx_buf, &xHigherPriorityTaskWoken); 8026dde: 4c0b ldr r4, [pc, #44] ; (8026e0c ) { 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); 8026de0: f240 5125 movw r1, #1317 ; 0x525 8026de4: f7fe ffc7 bl 8025d76 xSemaphoreGiveFromISR(xSem_rx_buf, &xHigherPriorityTaskWoken); 8026de8: 4b09 ldr r3, [pc, #36] ; (8026e10 ) 8026dea: 4621 mov r1, r4 8026dec: 6818 ldr r0, [r3, #0] 8026dee: f003 fc62 bl 802a6b6 portYIELD_FROM_ISR(xHigherPriorityTaskWoken); 8026df2: 6823 ldr r3, [r4, #0] 8026df4: b11b cbz r3, 8026dfe 8026df6: 4b07 ldr r3, [pc, #28] ; (8026e14 ) 8026df8: f04f 5280 mov.w r2, #268435456 ; 0x10000000 8026dfc: 601a str r2, [r3, #0] } void USART2_IRQHandler(void) { rs232_irq_handler(); } 8026dfe: bd1c pop {r2, r3, r4, pc} 8026e00: 40004400 .word 0x40004400 8026e04: 2000cb78 .word 0x2000cb78 8026e08: 2000c848 .word 0x2000c848 8026e0c: 20000b00 .word 0x20000b00 8026e10: 2000cb98 .word 0x2000cb98 8026e14: e000ed04 .word 0xe000ed04 08026e18 : void USART3_IRQHandler(void) { 8026e18: 4770 bx lr 8026e1a: 0000 movs r0, r0 08026e1c : /** * @brief Задача инициализации. Запускает основные задачи девайса и умирает. * @retval */ void InitTask(void *params) { 8026e1c: b51f push {r0, r1, r2, r3, r4, lr} // ----------------------------------------------------------------------------- #ifdef LED_ENABLE LED_Init(); /* Простая мигалка для подтверждения живучести контроллера */ xTaskCreate(vTaskLedBlink, "LED_Blink", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL);//&xTaskToKill 8026e1e: 2400 movs r4, #0 void InitTask(void *params) { // ----------------------------------------------------------------------------- // xTaskCreate(vTaskWdt, "WDT", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL); // ----------------------------------------------------------------------------- InitUSART(); 8026e20: f7ff ff3a bl 8026c98 ups_megatec_init(); 8026e24: f002 f904 bl 8029030 // ----------------------------------------------------------------------------- // RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE); /* SETTINGS_SetDefaultDebug(); SETTINGS_Save();*/ SETTINGS_Load(); 8026e28: f001 fd80 bl 802892c set_mode_jumper(); 8026e2c: f001 fea8 bl 8028b80 #endif // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- #ifdef LED_ENABLE LED_Init(); 8026e30: f001 fe02 bl 8028a38 /* Простая мигалка для подтверждения живучести контроллера */ xTaskCreate(vTaskLedBlink, "LED_Blink", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL);//&xTaskToKill 8026e34: 2280 movs r2, #128 ; 0x80 8026e36: 4623 mov r3, r4 8026e38: 4934 ldr r1, [pc, #208] ; (8026f0c ) 8026e3a: 9400 str r4, [sp, #0] 8026e3c: 9401 str r4, [sp, #4] 8026e3e: 9402 str r4, [sp, #8] 8026e40: 9403 str r4, [sp, #12] 8026e42: 4833 ldr r0, [pc, #204] ; (8026f10 ) 8026e44: f003 fdc2 bl 802a9cc #endif // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- #ifdef BUTTON_ENABLE BUTTON_Init(); 8026e48: f001 fe52 bl 8028af0 xTaskCreate(vTaskButtons, "Buttons", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL); 8026e4c: 2280 movs r2, #128 ; 0x80 8026e4e: 4623 mov r3, r4 8026e50: 4930 ldr r1, [pc, #192] ; (8026f14 ) 8026e52: 9400 str r4, [sp, #0] 8026e54: 9401 str r4, [sp, #4] 8026e56: 9402 str r4, [sp, #8] 8026e58: 9403 str r4, [sp, #12] 8026e5a: 482f ldr r0, [pc, #188] ; (8026f18 ) 8026e5c: f003 fdb6 bl 802a9cc //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); // Так было 8026e60: 2001 movs r0, #1 8026e62: f7ff fb41 bl 80264e8 // TM_RTC_Init(TM_RTC_ClockSource_Internal); // TODO Уточнить источинк тактирования #endif // ----------------------------------------------------------------------------- /* UDP for net settings */ UDP_netsetting_init(); 8026e66: f011 fe55 bl 8038b14 // ----------------------------------------------------------------------------- #ifdef UPS_ENABLE /* UPS_Init(); xTaskCreate(UPS_TaskParsing, "UPS_Parsing", 2*configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL); xTaskCreate(UPS_TaskState, "UPS_State", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL);*/ xTaskCreate(UPS_Monitor, "UPS_Monitor", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL); 8026e6a: 2280 movs r2, #128 ; 0x80 8026e6c: 4623 mov r3, r4 8026e6e: 492b ldr r1, [pc, #172] ; (8026f1c ) 8026e70: 9400 str r4, [sp, #0] 8026e72: 9401 str r4, [sp, #4] 8026e74: 9402 str r4, [sp, #8] 8026e76: 9403 str r4, [sp, #12] 8026e78: 4829 ldr r0, [pc, #164] ; (8026f20 ) 8026e7a: f003 fda7 bl 802a9cc #endif // ----------------------------------------------------------------------------- /* Random number generator */ RNG_Init(); 8026e7e: f7ff f91b bl 80260b8 // ----------------------------------------------------------------------------- #ifdef NET_ENABLE ETH_BSP_Config(); 8026e82: f011 fe59 bl 8038b38 LwIP_Init(); 8026e86: f010 fe9d bl 8037bc4 #ifdef WEB_SERVER_ENABLE HTTP_Init(); 8026e8a: f004 ff67 bl 802bd5c #endif #ifdef SNMP_ENABLE SNMP_Init(); 8026e8e: f011 f9db bl 8038248 xTaskCreate(SNMP_SysUpTimeTask, "snmpSysUpTime", configMINIMAL_STACK_SIZE, 8026e92: 2280 movs r2, #128 ; 0x80 8026e94: 4623 mov r3, r4 8026e96: 9400 str r4, [sp, #0] 8026e98: 9401 str r4, [sp, #4] 8026e9a: 9402 str r4, [sp, #8] 8026e9c: 9403 str r4, [sp, #12] 8026e9e: 4921 ldr r1, [pc, #132] ; (8026f24 ) 8026ea0: 4821 ldr r0, [pc, #132] ; (8026f28 ) 8026ea2: f003 fd93 bl 802a9cc NULL, tskIDLE_PRIORITY, NULL); xTaskCreate(snmp_trap_tread, "snmpTrapTest", 3*configMINIMAL_STACK_SIZE, 8026ea6: 4623 mov r3, r4 8026ea8: 4920 ldr r1, [pc, #128] ; (8026f2c ) 8026eaa: 9400 str r4, [sp, #0] 8026eac: f44f 72c0 mov.w r2, #384 ; 0x180 8026eb0: 9401 str r4, [sp, #4] 8026eb2: 9402 str r4, [sp, #8] 8026eb4: 9403 str r4, [sp, #12] 8026eb6: 481e ldr r0, [pc, #120] ; (8026f30 ) 8026eb8: f003 fd88 bl 802a9cc #endif #endif // ----------------------------------------------------------------------------- /* SNTP */ SNTP_Init(); 8026ebc: f011 fa62 bl 8038384 xTaskCreate(vTaskOnceSynchro, "sntpOnceSinhro", 2*configMINIMAL_STACK_SIZE, 8026ec0: 4b1c ldr r3, [pc, #112] ; (8026f34 ) 8026ec2: 9400 str r4, [sp, #0] 8026ec4: 9301 str r3, [sp, #4] 8026ec6: 9402 str r4, [sp, #8] 8026ec8: 4623 mov r3, r4 8026eca: 9403 str r4, [sp, #12] 8026ecc: 491a ldr r1, [pc, #104] ; (8026f38 ) 8026ece: 481b ldr r0, [pc, #108] ; (8026f3c ) 8026ed0: f44f 7280 mov.w r2, #256 ; 0x100 8026ed4: f003 fd7a bl 802a9cc NULL, tskIDLE_PRIORITY, &xHandleSntpOnceSinhro); xTaskCreate(vTaskPeriodicSynchro, "sntpPeriodicSinhro", 2*configMINIMAL_STACK_SIZE, 8026ed8: 4919 ldr r1, [pc, #100] ; (8026f40 ) 8026eda: 9400 str r4, [sp, #0] 8026edc: f44f 7280 mov.w r2, #256 ; 0x100 8026ee0: 4623 mov r3, r4 8026ee2: 9401 str r4, [sp, #4] 8026ee4: 9402 str r4, [sp, #8] 8026ee6: 9403 str r4, [sp, #12] 8026ee8: 4816 ldr r0, [pc, #88] ; (8026f44 ) 8026eea: f003 fd6f bl 802a9cc //TEST_IO(); /* Контроль успешной загрузки. Сброс флага bootry */ /* Сброс флага и сохранение нового значения во флеш памяти происходт после некоторой задержки для запуска всех задач */ vTaskDelay(4000); 8026eee: f44f 607a mov.w r0, #4000 ; 0xfa0 8026ef2: f004 f805 bl 802af00 SETTINGS_ResetBootTry(); 8026ef6: f001 fd4f bl 8028998 /* if (!dhcp) SNMP_SendUserTrap(DEVICE_REBOOTED); printf("Hello world\r\n");*/ vTaskDelete(NULL); 8026efa: 4620 mov r0, r4 8026efc: f003 fe3e bl 802ab7c taskYIELD(); } 8026f00: b004 add sp, #16 8026f02: e8bd 4010 ldmia.w sp!, {r4, lr} SNMP_SendUserTrap(DEVICE_REBOOTED); printf("Hello world\r\n");*/ vTaskDelete(NULL); taskYIELD(); 8026f06: f004 bbfd b.w 802b704 8026f0a: bf00 nop 8026f0c: 0803971d .word 0x0803971d 8026f10: 08028a5d .word 0x08028a5d 8026f14: 08039727 .word 0x08039727 8026f18: 08028b6d .word 0x08028b6d 8026f1c: 0803972f .word 0x0803972f 8026f20: 08029771 .word 0x08029771 8026f24: 0803973b .word 0x0803973b 8026f28: 08038021 .word 0x08038021 8026f2c: 08039749 .word 0x08039749 8026f30: 0803816d .word 0x0803816d 8026f34: 20000b04 .word 0x20000b04 8026f38: 08039756 .word 0x08039756 8026f3c: 08038451 .word 0x08038451 8026f40: 08039765 .word 0x08039765 8026f44: 08038409 .word 0x08038409 08026f48
: void vApplicationTickHook(void) { } int main() { 8026f48: b51f push {r0, r1, r2, r3, r4, lr} 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"); 8026f4a: b672 cpsid i //TIM_Cmd(TIM13, DISABLE); //TIM_ClearITPendingBit(TIM13, TIM_IT_Update); __disable_irq(); NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x20000); 8026f4c: f04f 6000 mov.w r0, #134217728 ; 0x8000000 8026f50: f44f 3100 mov.w r1, #131072 ; 0x20000 8026f54: f7fe f9d8 bl 8025308 __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 */ 8026f58: 4a18 ldr r2, [pc, #96] ; (8026fbc ) 8026f5a: 68d1 ldr r1, [r2, #12] reg_value &= ~(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk); /* clear bits to change */ 8026f5c: f64f 03ff movw r3, #63743 ; 0xf8ff 8026f60: 400b ands r3, r1 reg_value = (reg_value | 8026f62: f043 63bf orr.w r3, r3, #100139008 ; 0x5f80000 8026f66: 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; 8026f6a: 60d3 str r3, [r2, #12] NVIC_SetPriorityGrouping(0); NVIC_PriorityGroupConfig( NVIC_PriorityGroup_4 ); 8026f6c: f44f 7040 mov.w r0, #768 ; 0x300 8026f70: f7fe f98c bl 802528c 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"); 8026f74: b662 cpsie i __enable_irq(); //WDG_Init(); RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE); 8026f76: 2101 movs r1, #1 8026f78: f44f 5080 mov.w r0, #4096 ; 0x1000 8026f7c: f7fe fbe6 bl 802574c /* Clear flash error flags if were set */ FLASH_ClearFlag(FLASH_FLAG_PGPERR); 8026f80: 2040 movs r0, #64 ; 0x40 8026f82: f7fe f9f7 bl 8025374 FLASH_ClearFlag(FLASH_FLAG_PGSERR); 8026f86: 2080 movs r0, #128 ; 0x80 log_init(false); //log_test(); //spi_flash_test(); // NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); xTaskCreate( InitTask, "InitTask", 1000, NULL, tskIDLE_PRIORITY, NULL); 8026f88: 2400 movs r4, #0 RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE); /* Clear flash error flags if were set */ FLASH_ClearFlag(FLASH_FLAG_PGPERR); FLASH_ClearFlag(FLASH_FLAG_PGSERR); 8026f8a: f7fe f9f3 bl 8025374 gpio_init(); 8026f8e: f7ff f82f bl 8025ff0 spi_flash_init(); 8026f92: f7ff fd31 bl 80269f8 log_init(false); 8026f96: 2000 movs r0, #0 8026f98: f002 fc32 bl 8029800 //log_test(); //spi_flash_test(); // NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); xTaskCreate( InitTask, "InitTask", 1000, NULL, tskIDLE_PRIORITY, NULL); 8026f9c: 4908 ldr r1, [pc, #32] ; (8026fc0 ) 8026f9e: 9400 str r4, [sp, #0] 8026fa0: f44f 727a mov.w r2, #1000 ; 0x3e8 8026fa4: 4623 mov r3, r4 8026fa6: 9401 str r4, [sp, #4] 8026fa8: 9402 str r4, [sp, #8] 8026faa: 9403 str r4, [sp, #12] 8026fac: 4805 ldr r0, [pc, #20] ; (8026fc4 ) 8026fae: f003 fd0d bl 802a9cc vTaskStartScheduler(); 8026fb2: f003 fe3d bl 802ac30 /*while(1) { }*/ } 8026fb6: 4620 mov r0, r4 8026fb8: b004 add sp, #16 8026fba: bd10 pop {r4, pc} 8026fbc: e000ed00 .word 0xe000ed00 8026fc0: 08039778 .word 0x08039778 8026fc4: 08026e1d .word 0x08026e1d 08026fc8 : * @brief This function handles NMI exception. * @param None * @retval None */ void NMI_Handler(void) { 8026fc8: 4770 bx lr 8026fca: 0000 movs r0, r0 08026fcc : } void HardFault_Output(uint32_t *sp) { 8026fcc: 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]; 8026fd0: e890 0808 ldmia.w r0, {r3, fp} uint32_t r2 = sp[2]; 8026fd4: f8d0 a008 ldr.w sl, [r0, #8] uint32_t r3 = sp[3]; 8026fd8: f8d0 900c ldr.w r9, [r0, #12] uint32_t r12 = sp[4]; 8026fdc: f8d0 8010 ldr.w r8, [r0, #16] uint32_t lr = sp[5]; 8026fe0: 6947 ldr r7, [r0, #20] uint32_t pc = sp[6]; 8026fe2: 6986 ldr r6, [r0, #24] uint32_t psr = sp[7]; 8026fe4: 69c5 ldr r5, [r0, #28] printf("HardFault:\n\r"); 8026fe6: 9301 str r3, [sp, #4] void NMI_Handler(void) { } void HardFault_Output(uint32_t *sp) { 8026fe8: 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"); 8026fea: 4816 ldr r0, [pc, #88] ; (8027044 ) 8026fec: f000 fbc6 bl 802777c /* Print CFSR register */ /* Print CPU registers */ printf("\n\rRegisters:\n\r"); 8026ff0: 4815 ldr r0, [pc, #84] ; (8027048 ) 8026ff2: f000 fbc3 bl 802777c printf("SP 0x%08lx\n\r", (uint32_t)sp); 8026ff6: 4815 ldr r0, [pc, #84] ; (802704c ) 8026ff8: 4621 mov r1, r4 8026ffa: f000 fbbf bl 802777c printf("R0 0x%08lx\n\r", r0); 8026ffe: 9b01 ldr r3, [sp, #4] 8027000: 4813 ldr r0, [pc, #76] ; (8027050 ) 8027002: 4619 mov r1, r3 8027004: f000 fbba bl 802777c printf("R1 0x%08lx\n\r", r1); 8027008: 4812 ldr r0, [pc, #72] ; (8027054 ) 802700a: 4659 mov r1, fp 802700c: f000 fbb6 bl 802777c printf("R2 0x%08lx\n\r", r2); 8027010: 4811 ldr r0, [pc, #68] ; (8027058 ) 8027012: 4651 mov r1, sl 8027014: f000 fbb2 bl 802777c printf("R3 0x%08lx\n\r", r3); 8027018: 4810 ldr r0, [pc, #64] ; (802705c ) 802701a: 4649 mov r1, r9 802701c: f000 fbae bl 802777c printf("R12 0x%08lx\n\r", r12); 8027020: 480f ldr r0, [pc, #60] ; (8027060 ) 8027022: 4641 mov r1, r8 8027024: f000 fbaa bl 802777c printf("LR 0x%08lx\n\r", lr); 8027028: 480e ldr r0, [pc, #56] ; (8027064 ) 802702a: 4639 mov r1, r7 802702c: f000 fba6 bl 802777c printf("PC 0x%08lx\n\r", pc); 8027030: 480d ldr r0, [pc, #52] ; (8027068 ) 8027032: 4631 mov r1, r6 8027034: f000 fba2 bl 802777c printf("PSR 0x%08lx\n\r", psr); 8027038: 480c ldr r0, [pc, #48] ; (802706c ) 802703a: 4629 mov r1, r5 802703c: f000 fb9e bl 802777c 8027040: e7fe b.n 8027040 8027042: bf00 nop 8027044: 08039781 .word 0x08039781 8027048: 0803978e .word 0x0803978e 802704c: 0803979d .word 0x0803979d 8027050: 080397b3 .word 0x080397b3 8027054: 080397c9 .word 0x080397c9 8027058: 080397df .word 0x080397df 802705c: 080397f5 .word 0x080397f5 8027060: 0803980b .word 0x0803980b 8027064: 08039821 .word 0x08039821 8027068: 08039837 .word 0x08039837 802706c: 0803984d .word 0x0803984d 08027070 : * @retval None */ __attribute__( (naked) ) void HardFault_Handler(void) { __asm volatile 8027070: f01e 0f04 tst.w lr, #4 8027074: bf0c ite eq 8027076: f3ef 8008 mrseq r0, MSP 802707a: f3ef 8009 mrsne r0, PSP 802707e: f8df 1004 ldr.w r1, [pc, #4] ; 8027084 8027082: 4708 bx r1 08027084 : 8027084: 08026fcd .word 0x08026fcd 08027088 : * @brief This function handles Memory Manage exception. * @param None * @retval None */ void MemManage_Handler(void) { 8027088: e7fe b.n 8027088 802708a: 0000 movs r0, r0 0802708c : } } void TIM8_UP_TIM13_IRQHandler(void) { TIM_ClearITPendingBit(TIM13, TIM_IT_Update); 802708c: 4801 ldr r0, [pc, #4] ; (8027094 ) 802708e: 2101 movs r1, #1 8027090: f7fe bd7a b.w 8025b88 8027094: 40001c00 .word 0x40001c00 08027098 : * @brief This function handles Bus Fault exception. * @param None * @retval None */ void BusFault_Handler(void) { 8027098: e7fe b.n 8027098 0802709a : * @brief This function handles Usage Fault exception. * @param None * @retval None */ void UsageFault_Handler(void) { 802709a: e7fe b.n 802709a 0802709c : * @brief This function handles Debug Monitor exception. * @param None * @retval None */ void DebugMon_Handler(void) { 802709c: 4770 bx lr 0802709e : /*void PPP_IRQHandler(void) { }*/ void SDIO_IRQHandler(void) { 802709e: 4770 bx lr 080270a0 : * @brief This function handles ethernet DMA interrupt request. * @param None * @retval None */ void ETH_IRQHandler(void) { 80270a0: b507 push {r0, r1, r2, lr} portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; 80270a2: 2300 movs r3, #0 /* Frame received */ if ( ETH_GetDMAFlagStatus(ETH_DMA_FLAG_R) == SET) 80270a4: 2040 movs r0, #64 ; 0x40 * @param None * @retval None */ void ETH_IRQHandler(void) { portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; 80270a6: 9301 str r3, [sp, #4] /* Frame received */ if ( ETH_GetDMAFlagStatus(ETH_DMA_FLAG_R) == SET) 80270a8: f011 ffe4 bl 8039074 80270ac: 2801 cmp r0, #1 80270ae: d104 bne.n 80270ba { /* Give the semaphore to wakeup LwIP task */ xSemaphoreGiveFromISR( s_xSemaphore, &xHigherPriorityTaskWoken ); 80270b0: 4b09 ldr r3, [pc, #36] ; (80270d8 ) 80270b2: a901 add r1, sp, #4 80270b4: 6818 ldr r0, [r3, #0] 80270b6: f003 fafe bl 802a6b6 } /* Clear the interrupt flags. */ /* Clear the Eth DMA Rx IT pending bits */ ETH_DMAClearITPendingBit(ETH_DMA_IT_R); 80270ba: 2040 movs r0, #64 ; 0x40 80270bc: f011 fff0 bl 80390a0 ETH_DMAClearITPendingBit(ETH_DMA_IT_NIS); 80270c0: f44f 3080 mov.w r0, #65536 ; 0x10000 80270c4: f011 ffec bl 80390a0 // Switch tasks if necessary. */ if( xHigherPriorityTaskWoken != pdFALSE ) 80270c8: 9b01 ldr r3, [sp, #4] 80270ca: b11b cbz r3, 80270d4 { portEND_SWITCHING_ISR( xHigherPriorityTaskWoken ); 80270cc: 4b03 ldr r3, [pc, #12] ; (80270dc ) 80270ce: f04f 5280 mov.w r2, #268435456 ; 0x10000000 80270d2: 601a str r2, [r3, #0] } } 80270d4: bd0e pop {r1, r2, r3, pc} 80270d6: bf00 nop 80270d8: 2000c7c8 .word 0x2000c7c8 80270dc: e000ed04 .word 0xe000ed04 080270e0 : #ifdef PRINTF_LONG_LONG_SUPPORT static void _TFP_GCC_NO_INLINE_ ulli2a( unsigned long long int num, struct param *p) { 80270e0: 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) 80270e4: 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; 80270e6: 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) { 80270ea: 4681 mov r9, r0 80270ec: 468a mov sl, r1 80270ee: 4690 mov r8, r2 int n = 0; unsigned long long int d = 1; char *bf = p->bf; while (num / d >= p->base) 80270f0: 461e mov r6, r3 80270f2: 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; 80270f4: 2401 movs r4, #1 80270f6: 2500 movs r5, #0 char *bf = p->bf; while (num / d >= p->base) 80270f8: e006 b.n 8027108 d *= p->base; 80270fa: fb04 f307 mul.w r3, r4, r7 80270fe: fb06 3305 mla r3, r6, r5, r3 8027102: fba4 4506 umull r4, r5, r4, r6 8027106: 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) 8027108: 4648 mov r0, r9 802710a: 4651 mov r1, sl 802710c: 4622 mov r2, r4 802710e: 462b mov r3, r5 8027110: f7f9 ff0c bl 8020f2c <__aeabi_uldivmod> 8027114: 42b9 cmp r1, r7 8027116: bf08 it eq 8027118: 42b0 cmpeq r0, r6 802711a: d2ee bcs.n 80270fa 802711c: 2600 movs r6, #0 802711e: e02d b.n 802717c d *= p->base; while (d != 0) { int dgt = num / d; 8027120: 4622 mov r2, r4 8027122: 462b mov r3, r5 8027124: 4648 mov r0, r9 8027126: 4651 mov r1, sl 8027128: f7f9 ff00 bl 8020f2c <__aeabi_uldivmod> num %= d; 802712c: 4651 mov r1, sl 802712e: 4622 mov r2, r4 8027130: 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; 8027132: 4607 mov r7, r0 num %= d; 8027134: 4648 mov r0, r9 8027136: f7f9 fef9 bl 8020f2c <__aeabi_uldivmod> d /= p->base; 802713a: 4620 mov r0, r4 802713c: 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; 802713e: 4691 mov r9, r2 8027140: 469a mov sl, r3 d /= p->base; 8027142: f8d8 200c ldr.w r2, [r8, #12] 8027146: 2300 movs r3, #0 8027148: f7f9 fef0 bl 8020f2c <__aeabi_uldivmod> 802714c: 4604 mov r4, r0 802714e: 460d mov r5, r1 if (n || dgt > 0 || d == 0) { 8027150: b926 cbnz r6, 802715c 8027152: 2f00 cmp r7, #0 8027154: dc02 bgt.n 802715c 8027156: ea54 0305 orrs.w r3, r4, r5 802715a: d1e1 bne.n 8027120 *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); 802715c: 2f09 cmp r7, #9 802715e: b2fa uxtb r2, r7 8027160: dd07 ble.n 8027172 8027162: f898 3000 ldrb.w r3, [r8] 8027166: f013 0f04 tst.w r3, #4 802716a: bf0c ite eq 802716c: 2357 moveq r3, #87 ; 0x57 802716e: 2337 movne r3, #55 ; 0x37 8027170: e000 b.n 8027174 8027172: 2330 movs r3, #48 ; 0x30 8027174: 189b adds r3, r3, r2 8027176: f80b 3b01 strb.w r3, [fp], #1 ++n; 802717a: 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) { 802717c: ea54 0305 orrs.w r3, r4, r5 8027180: d1ce bne.n 8027120 if (n || dgt > 0 || d == 0) { *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); ++n; } } *bf = 0; 8027182: 2300 movs r3, #0 8027184: f88b 3000 strb.w r3, [fp] 8027188: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 0802718c : } #endif #ifdef PRINTF_LONG_SUPPORT static void uli2a(unsigned long int num, struct param *p) { 802718c: b570 push {r4, r5, r6, lr} int n = 0; unsigned long int d = 1; char *bf = p->bf; while (num / d >= p->base) 802718e: 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; 8027190: 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; 8027192: 2301 movs r3, #1 char *bf = p->bf; while (num / d >= p->base) 8027194: e000 b.n 8027198 d *= p->base; 8027196: 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) 8027198: fbb0 f5f3 udiv r5, r0, r3 802719c: 4295 cmp r5, r2 802719e: d2fa bcs.n 8027196 80271a0: 2500 movs r5, #0 80271a2: e01a b.n 80271da d *= p->base; while (d != 0) { int dgt = num / d; num %= d; d /= p->base; 80271a4: 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; 80271a6: fbb0 f2f3 udiv r2, r0, r3 num %= d; 80271aa: fb03 0012 mls r0, r3, r2, r0 d /= p->base; 80271ae: fbb3 f3f6 udiv r3, r3, r6 if (n || dgt > 0 || d == 0) { 80271b2: b91d cbnz r5, 80271bc 80271b4: 2a00 cmp r2, #0 80271b6: dc01 bgt.n 80271bc 80271b8: 2b00 cmp r3, #0 80271ba: d1f3 bne.n 80271a4 *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); 80271bc: 2a09 cmp r2, #9 80271be: b2d6 uxtb r6, r2 80271c0: dd06 ble.n 80271d0 80271c2: 780a ldrb r2, [r1, #0] 80271c4: f012 0f04 tst.w r2, #4 80271c8: bf0c ite eq 80271ca: 2257 moveq r2, #87 ; 0x57 80271cc: 2237 movne r2, #55 ; 0x37 80271ce: e000 b.n 80271d2 80271d0: 2230 movs r2, #48 ; 0x30 80271d2: 1992 adds r2, r2, r6 80271d4: f804 2b01 strb.w r2, [r4], #1 ++n; 80271d8: 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) { 80271da: 2b00 cmp r3, #0 80271dc: d1e2 bne.n 80271a4 if (n || dgt > 0 || d == 0) { *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); ++n; } } *bf = 0; 80271de: 7023 strb r3, [r4, #0] 80271e0: bd70 pop {r4, r5, r6, pc} 080271e2 : uli2a(num, p); } #endif static void ui2a(unsigned int num, struct param *p) { 80271e2: b570 push {r4, r5, r6, lr} int n = 0; unsigned int d = 1; char *bf = p->bf; while (num / d >= p->base) 80271e4: 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; 80271e6: 690c ldr r4, [r1, #16] #endif static void ui2a(unsigned int num, struct param *p) { int n = 0; unsigned int d = 1; 80271e8: 2301 movs r3, #1 char *bf = p->bf; while (num / d >= p->base) 80271ea: e000 b.n 80271ee d *= p->base; 80271ec: 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) 80271ee: fbb0 f5f3 udiv r5, r0, r3 80271f2: 4295 cmp r5, r2 80271f4: d2fa bcs.n 80271ec 80271f6: 2500 movs r5, #0 80271f8: e01a b.n 8027230 d *= p->base; while (d != 0) { int dgt = num / d; num %= d; d /= p->base; 80271fa: 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; 80271fc: fbb0 f2f3 udiv r2, r0, r3 num %= d; 8027200: fb03 0012 mls r0, r3, r2, r0 d /= p->base; 8027204: fbb3 f3f6 udiv r3, r3, r6 if (n || dgt > 0 || d == 0) { 8027208: b91d cbnz r5, 8027212 802720a: 2a00 cmp r2, #0 802720c: dc01 bgt.n 8027212 802720e: 2b00 cmp r3, #0 8027210: d1f3 bne.n 80271fa *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); 8027212: 2a09 cmp r2, #9 8027214: b2d6 uxtb r6, r2 8027216: dd06 ble.n 8027226 8027218: 780a ldrb r2, [r1, #0] 802721a: f012 0f04 tst.w r2, #4 802721e: bf0c ite eq 8027220: 2257 moveq r2, #87 ; 0x57 8027222: 2237 movne r2, #55 ; 0x37 8027224: e000 b.n 8027228 8027226: 2230 movs r2, #48 ; 0x30 8027228: 1992 adds r2, r2, r6 802722a: f804 2b01 strb.w r2, [r4], #1 ++n; 802722e: 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) { 8027230: 2b00 cmp r3, #0 8027232: d1e2 bne.n 80271fa if (n || dgt > 0 || d == 0) { *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); ++n; } } *bf = 0; 8027234: 7023 strb r3, [r4, #0] 8027236: bd70 pop {r4, r5, r6, pc} 08027238 : } static void putchw(void *putp, putcf putf, struct param *p) { 8027238: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} char ch; int n = p->width; char *bf = p->bf; 802723c: 6913 ldr r3, [r2, #16] } static void putchw(void *putp, putcf putf, struct param *p) { char ch; int n = p->width; 802723e: 6854 ldr r4, [r2, #4] } static void putchw(void *putp, putcf putf, struct param *p) { 8027240: 4606 mov r6, r0 8027242: 460f mov r7, r1 8027244: 4615 mov r5, r2 char ch; int n = p->width; char *bf = p->bf; /* Number of filling characters */ while (*bf++ && n > 0) 8027246: e000 b.n 802724a n--; 8027248: 3c01 subs r4, #1 char ch; int n = p->width; char *bf = p->bf; /* Number of filling characters */ while (*bf++ && n > 0) 802724a: f813 2b01 ldrb.w r2, [r3], #1 802724e: b912 cbnz r2, 8027256 n--; if (p->sign) 8027250: 7a2b ldrb r3, [r5, #8] 8027252: b91b cbnz r3, 802725c 8027254: e003 b.n 802725e char ch; int n = p->width; char *bf = p->bf; /* Number of filling characters */ while (*bf++ && n > 0) 8027256: 2c00 cmp r4, #0 8027258: dcf6 bgt.n 8027248 802725a: e7f9 b.n 8027250 n--; if (p->sign) n--; 802725c: 3c01 subs r4, #1 if (p->alt && p->base == 16) 802725e: 782b ldrb r3, [r5, #0] 8027260: 0799 lsls r1, r3, #30 8027262: d507 bpl.n 8027274 8027264: 68eb ldr r3, [r5, #12] 8027266: 2b10 cmp r3, #16 8027268: d101 bne.n 802726e n -= 2; 802726a: 3c02 subs r4, #2 802726c: e002 b.n 8027274 else if (p->alt && p->base == 8) 802726e: 2b08 cmp r3, #8 n--; 8027270: bf08 it eq 8027272: 3c01 subeq r4, #1 /* Fill with space to align to the right, before alternate or sign */ if (!p->lz && !p->align_left) { 8027274: 782b ldrb r3, [r5, #0] 8027276: f013 0f09 tst.w r3, #9 802727a: d10d bne.n 8027298 802727c: 46a0 mov r8, r4 802727e: e004 b.n 802728a while (n-- > 0) putf(putp, ' '); 8027280: 4630 mov r0, r6 8027282: 2120 movs r1, #32 8027284: 47b8 blx r7 8027286: 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) 802728a: f1b8 0f00 cmp.w r8, #0 802728e: dcf7 bgt.n 8027280 return neg ? -fvalue : fvalue; } static void putchw(void *putp, putcf putf, struct param *p) 8027290: 1e63 subs r3, r4, #1 8027292: ea24 74e4 bic.w r4, r4, r4, asr #31 8027296: 1b1c subs r4, r3, r4 while (n-- > 0) putf(putp, ' '); } /* print sign */ if (p->sign) 8027298: 7a29 ldrb r1, [r5, #8] 802729a: b109 cbz r1, 80272a0 putf(putp, p->sign); 802729c: 4630 mov r0, r6 802729e: 47b8 blx r7 /* Alternate */ if (p->alt && p->base == 16) { 80272a0: 782b ldrb r3, [r5, #0] 80272a2: 079a lsls r2, r3, #30 80272a4: d512 bpl.n 80272cc 80272a6: 68eb ldr r3, [r5, #12] 80272a8: 2b10 cmp r3, #16 80272aa: d10a bne.n 80272c2 putf(putp, '0'); 80272ac: 2130 movs r1, #48 ; 0x30 80272ae: 4630 mov r0, r6 80272b0: 47b8 blx r7 putf(putp, (p->uc ? 'X' : 'x')); 80272b2: 782b ldrb r3, [r5, #0] 80272b4: f013 0f04 tst.w r3, #4 80272b8: 4630 mov r0, r6 80272ba: bf0c ite eq 80272bc: 2178 moveq r1, #120 ; 0x78 80272be: 2158 movne r1, #88 ; 0x58 80272c0: e003 b.n 80272ca } else if (p->alt && p->base == 8) { 80272c2: 2b08 cmp r3, #8 80272c4: d102 bne.n 80272cc putf(putp, '0'); 80272c6: 4630 mov r0, r6 80272c8: 2130 movs r1, #48 ; 0x30 80272ca: 47b8 blx r7 } /* Fill with zeros, after alternate or sign */ if (p->lz) { 80272cc: 782b ldrb r3, [r5, #0] 80272ce: 07db lsls r3, r3, #31 80272d0: d50d bpl.n 80272ee 80272d2: 46a0 mov r8, r4 80272d4: e004 b.n 80272e0 while (n-- > 0) putf(putp, '0'); 80272d6: 4630 mov r0, r6 80272d8: 2130 movs r1, #48 ; 0x30 80272da: 47b8 blx r7 80272dc: f108 38ff add.w r8, r8, #4294967295 putf(putp, '0'); } /* Fill with zeros, after alternate or sign */ if (p->lz) { while (n-- > 0) 80272e0: f1b8 0f00 cmp.w r8, #0 80272e4: dcf7 bgt.n 80272d6 return neg ? -fvalue : fvalue; } static void putchw(void *putp, putcf putf, struct param *p) 80272e6: 1e63 subs r3, r4, #1 80272e8: ea24 74e4 bic.w r4, r4, r4, asr #31 80272ec: 1b1c subs r4, r3, r4 while (n-- > 0) putf(putp, '0'); } /* Put actual buffer */ bf = p->bf; 80272ee: f8d5 8010 ldr.w r8, [r5, #16] while ((ch = *bf++)) 80272f2: e001 b.n 80272f8 putf(putp, ch); 80272f4: 4630 mov r0, r6 80272f6: 47b8 blx r7 putf(putp, '0'); } /* Put actual buffer */ bf = p->bf; while ((ch = *bf++)) 80272f8: f818 1b01 ldrb.w r1, [r8], #1 80272fc: 2900 cmp r1, #0 80272fe: d1f9 bne.n 80272f4 putf(putp, ch); /* Fill with space to align to the left, after string */ if (!p->lz && p->align_left) { 8027300: 782b ldrb r3, [r5, #0] 8027302: f003 0309 and.w r3, r3, #9 8027306: 2b08 cmp r3, #8 8027308: d106 bne.n 8027318 802730a: e003 b.n 8027314 while (n-- > 0) putf(putp, ' '); 802730c: 4630 mov r0, r6 802730e: 2120 movs r1, #32 8027310: 47b8 blx r7 8027312: 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) 8027314: 2c00 cmp r4, #0 8027316: dcf9 bgt.n 802730c 8027318: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 0802731c <_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) 802731c: 6883 ldr r3, [r0, #8] 802731e: 6802 ldr r2, [r0, #0] 8027320: 4293 cmp r3, r2 data->dest[data->num_chars] = c; 8027322: bf3c itt cc 8027324: 6842 ldrcc r2, [r0, #4] 8027326: 54d1 strbcc r1, [r2, r3] data->num_chars ++; 8027328: 6883 ldr r3, [r0, #8] 802732a: 3301 adds r3, #1 802732c: 6083 str r3, [r0, #8] 802732e: 4770 bx lr 08027330 <_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; 8027330: e890 000c ldmia.w r0, {r2, r3} 8027334: 54d1 strb r1, [r2, r3] 8027336: 3301 adds r3, #1 8027338: 6043 str r3, [r0, #4] 802733a: 4770 bx lr 0802733c : putf(putp, ' '); } } void tfp_format(void *putp, putcf putf, const char *fmt, va_list va) { 802733c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8027340: b09b sub sp, #108 ; 0x6c 8027342: 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; 8027344: aa04 add r2, sp, #16 putf(putp, ' '); } } void tfp_format(void *putp, putcf putf, const char *fmt, va_list va) { 8027346: 4605 mov r5, r0 8027348: 460e mov r6, r1 802734a: 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; 802734c: 920e str r2, [sp, #56] ; 0x38 while ((ch = *(fmt++))) { 802734e: e208 b.n 8027762 if (ch != '%') { 8027350: 2925 cmp r1, #37 ; 0x25 8027352: d000 beq.n 8027356 8027354: e13a b.n 80275cc #endif /* Init parameter struct */ p.lz = 0; p.alt = 0; p.width = 0; p.align_left = 0; 8027356: 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; 802735a: 2300 movs r3, #0 p.align_left = 0; 802735c: f002 02fc and.w r2, r2, #252 ; 0xfc 8027360: f363 02c3 bfi r2, r3, #3, #1 8027364: f88d 2028 strb.w r2, [sp, #40] ; 0x28 p.sign = 0; p.prec = 2; 8027368: 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; 802736a: b2d2 uxtb r2, r2 802736c: f002 0c01 and.w ip, r2, #1 8027370: f3c2 0040 ubfx r0, r2, #1, #1 p.alt = 0; p.width = 0; 8027374: 930b str r3, [sp, #44] ; 0x2c p.align_left = 0; p.sign = 0; 8027376: f88d 3030 strb.w r3, [sp, #48] ; 0x30 p.prec = 2; 802737a: f88d 103c strb.w r1, [sp, #60] ; 0x3c 802737e: f3c2 02c0 ubfx r2, r2, #3, #1 /* Flags */ while ((ch = *(fmt++))) { 8027382: e012 b.n 80273aa switch (ch) { 8027384: 292d cmp r1, #45 ; 0x2d 8027386: d00f beq.n 80273a8 8027388: d804 bhi.n 8027394 802738a: 2923 cmp r1, #35 ; 0x23 802738c: d008 beq.n 80273a0 802738e: 292b cmp r1, #43 ; 0x2b 8027390: d10f bne.n 80273b2 8027392: e007 b.n 80273a4 8027394: 2930 cmp r1, #48 ; 0x30 8027396: d000 beq.n 802739a 8027398: e00b b.n 80273b2 case '-': p.align_left = 1; continue; case '0': p.lz = 1; 802739a: f04f 0c01 mov.w ip, #1 continue; 802739e: e004 b.n 80273aa case '#': p.alt = 1; 80273a0: 2001 movs r0, #1 continue; 80273a2: e002 b.n 80273aa case '+': p.sign = 1; 80273a4: 2301 movs r3, #1 continue; 80273a6: e000 b.n 80273aa /* Flags */ while ((ch = *(fmt++))) { switch (ch) { case '-': p.align_left = 1; 80273a8: 2201 movs r2, #1 p.align_left = 0; p.sign = 0; p.prec = 2; /* Flags */ while ((ch = *(fmt++))) { 80273aa: f817 1b01 ldrb.w r1, [r7], #1 80273ae: 2900 cmp r1, #0 80273b0: d1e8 bne.n 8027384 80273b2: f89d 8028 ldrb.w r8, [sp, #40] ; 0x28 80273b6: f88d 3030 strb.w r3, [sp, #48] ; 0x30 80273ba: f36c 0800 bfi r8, ip, #0, #1 80273be: 46c4 mov ip, r8 80273c0: f360 0c41 bfi ip, r0, #1, #1 80273c4: 4660 mov r0, ip } break; } /* Width */ if (ch >= '0' && ch <= '9') { 80273c6: f1a1 0330 sub.w r3, r1, #48 ; 0x30 80273ca: f362 00c3 bfi r0, r2, #3, #1 80273ce: 2b09 cmp r3, #9 80273d0: f88d 0028 strb.w r0, [sp, #40] ; 0x28 80273d4: d81d bhi.n 8027412 80273d6: e004 b.n 80273e2 unsigned int num = 0; int digit; while ((digit = a2d(ch)) >= 0) { if (digit > base) break; num = num * base + digit; 80273d8: fb00 3202 mla r2, r0, r2, r3 ch = *p++; 80273dc: f817 1b01 ldrb.w r1, [r7], #1 80273e0: e001 b.n 80273e6 } break; } /* Width */ if (ch >= '0' && ch <= '9') { 80273e2: 2200 movs r2, #0 unsigned int num = 0; int digit; while ((digit = a2d(ch)) >= 0) { if (digit > base) break; num = num * base + digit; 80273e4: 200a movs r0, #10 ui2a(num, p); } static int a2d(char ch) { if (ch >= '0' && ch <= '9') 80273e6: f1a1 0330 sub.w r3, r1, #48 ; 0x30 80273ea: fa5f fc83 uxtb.w ip, r3 80273ee: f1bc 0f09 cmp.w ip, #9 80273f2: d9f1 bls.n 80273d8 return ch - '0'; else if (ch >= 'a' && ch <= 'f') 80273f4: f1a1 0361 sub.w r3, r1, #97 ; 0x61 80273f8: 2b05 cmp r3, #5 80273fa: d802 bhi.n 8027402 return ch - 'a' + 10; 80273fc: f1a1 0357 sub.w r3, r1, #87 ; 0x57 8027400: e1b5 b.n 802776e else if (ch >= 'A' && ch <= 'F') 8027402: f1a1 0341 sub.w r3, r1, #65 ; 0x41 8027406: 2b05 cmp r3, #5 8027408: d802 bhi.n 8027410 return ch - 'A' + 10; 802740a: f1a1 0337 sub.w r3, r1, #55 ; 0x37 802740e: e1ae b.n 802776e break; num = num * base + digit; ch = *p++; } *src = p; *nump = num; 8027410: 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 == '.') { 8027412: 292e cmp r1, #46 ; 0x2e 8027414: d10e bne.n 8027434 //p.lz = 1; /* zero-padding */ /* ignore actual 0-fill size: */ ch = *(fmt++); if (ch >= '0' && ch <= '9') 8027416: 783a ldrb r2, [r7, #0] 8027418: 3a30 subs r2, #48 ; 0x30 802741a: 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++); 802741c: 1c7b adds r3, r7, #1 if (ch >= '0' && ch <= '9') 802741e: 2a09 cmp r2, #9 p.prec = ch - '0'; 8027420: bf98 it ls 8027422: f88d 203c strbls.w r2, [sp, #60] ; 0x3c do { ch = *(fmt++); 8027426: f813 1b01 ldrb.w r1, [r3], #1 } while (ch >= '0' && ch <= '9'); 802742a: f1a1 0230 sub.w r2, r1, #48 ; 0x30 802742e: 2a09 cmp r2, #9 ch = *(fmt++); if (ch >= '0' && ch <= '9') p.prec = ch - '0'; do { ch = *(fmt++); 8027430: 461f mov r7, r3 } while (ch >= '0' && ch <= '9'); 8027432: d9f8 bls.n 8027426 } #ifdef PRINTF_SIZE_T_SUPPORT # ifdef PRINTF_LONG_SUPPORT if (ch == 'z') { 8027434: 297a cmp r1, #122 ; 0x7a 8027436: d102 bne.n 802743e ch = *(fmt++); 8027438: f817 1b01 ldrb.w r1, [r7], #1 802743c: e005 b.n 802744a } else # endif #endif #ifdef PRINTF_LONG_SUPPORT if (ch == 'l') { 802743e: 296c cmp r1, #108 ; 0x6c 8027440: d109 bne.n 8027456 ch = *(fmt++); 8027442: 7839 ldrb r1, [r7, #0] lng = 1; #ifdef PRINTF_LONG_LONG_SUPPORT if (ch == 'l') { 8027444: 296c cmp r1, #108 ; 0x6c 8027446: d002 beq.n 802744e # endif #endif #ifdef PRINTF_LONG_SUPPORT if (ch == 'l') { ch = *(fmt++); 8027448: 3701 adds r7, #1 lng = 1; 802744a: 2301 movs r3, #1 802744c: e004 b.n 8027458 #ifdef PRINTF_LONG_LONG_SUPPORT if (ch == 'l') { ch = *(fmt++); 802744e: 7879 ldrb r1, [r7, #1] lng = 2; 8027450: 2302 movs r3, #2 if (ch == 'l') { ch = *(fmt++); lng = 1; #ifdef PRINTF_LONG_LONG_SUPPORT if (ch == 'l') { ch = *(fmt++); 8027452: 3702 adds r7, #2 8027454: e000 b.n 8027458 while ((ch = *(fmt++))) { if (ch != '%') { putf(putp, ch); } else { #ifdef PRINTF_LONG_SUPPORT char lng = 0; /* 1 for long, 2 for long long */ 8027456: 2300 movs r3, #0 lng = 2; } #endif } #endif switch (ch) { 8027458: 2969 cmp r1, #105 ; 0x69 802745a: d036 beq.n 80274ca 802745c: d816 bhi.n 802748c 802745e: 2963 cmp r1, #99 ; 0x63 8027460: f000 80a1 beq.w 80275a6 8027464: d80c bhi.n 8027480 8027466: 2946 cmp r1, #70 ; 0x46 8027468: f000 80b3 beq.w 80275d2 802746c: d806 bhi.n 802747c 802746e: 2900 cmp r1, #0 8027470: f000 8181 beq.w 8027776 8027474: 2925 cmp r1, #37 ; 0x25 8027476: f040 8174 bne.w 8027762 802747a: e0a7 b.n 80275cc 802747c: 2958 cmp r1, #88 ; 0x58 802747e: e012 b.n 80274a6 8027480: 2964 cmp r1, #100 ; 0x64 8027482: d022 beq.n 80274ca 8027484: 2966 cmp r1, #102 ; 0x66 8027486: f040 816c bne.w 8027762 802748a: e0a2 b.n 80275d2 802748c: 2973 cmp r1, #115 ; 0x73 802748e: f000 8090 beq.w 80275b2 8027492: d805 bhi.n 80274a0 8027494: 296f cmp r1, #111 ; 0x6f 8027496: d078 beq.n 802758a 8027498: 2970 cmp r1, #112 ; 0x70 802749a: f040 8162 bne.w 8027762 802749e: e040 b.n 8027522 80274a0: 2975 cmp r1, #117 ; 0x75 80274a2: d003 beq.n 80274ac 80274a4: 2978 cmp r1, #120 ; 0x78 80274a6: f040 815c bne.w 8027762 80274aa: e041 b.n 8027530 case 0: goto abort; case 'u': p.base = 10; 80274ac: 220a movs r2, #10 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 80274ae: 2b02 cmp r3, #2 #endif switch (ch) { case 0: goto abort; case 'u': p.base = 10; 80274b0: 920d str r2, [sp, #52] ; 0x34 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 80274b2: d107 bne.n 80274c4 ulli2a(va_arg(va, unsigned long long int), &p); 80274b4: 3407 adds r4, #7 80274b6: f024 0307 bic.w r3, r4, #7 80274ba: f103 0408 add.w r4, r3, #8 80274be: e9d3 0100 ldrd r0, r1, [r3] 80274c2: e017 b.n 80274f4 else #endif if (1 == lng) uli2a(va_arg(va, unsigned long int), &p); 80274c4: 6820 ldr r0, [r4, #0] 80274c6: a90a add r1, sp, #40 ; 0x28 80274c8: e04f b.n 802756a ui2a(va_arg(va, unsigned int), &p); putchw(putp, putf, &p); break; case 'd': case 'i': p.base = 10; 80274ca: 220a movs r2, #10 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 80274cc: 2b02 cmp r3, #2 ui2a(va_arg(va, unsigned int), &p); putchw(putp, putf, &p); break; case 'd': case 'i': p.base = 10; 80274ce: 920d str r2, [sp, #52] ; 0x34 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 80274d0: d112 bne.n 80274f8 lli2a(va_arg(va, long long int), &p); 80274d2: 3407 adds r4, #7 80274d4: f024 0307 bic.w r3, r4, #7 80274d8: e9d3 0100 ldrd r0, r1, [r3] 80274dc: f103 0408 add.w r4, r3, #8 *bf = 0; } static void lli2a(long long int num, struct param *p) { if (num < 0) { 80274e0: 2800 cmp r0, #0 80274e2: f171 0300 sbcs.w r3, r1, #0 80274e6: da05 bge.n 80274f4 num = -num; p->sign = '-'; 80274e8: 232d movs r3, #45 ; 0x2d } static void lli2a(long long int num, struct param *p) { if (num < 0) { num = -num; 80274ea: 4240 negs r0, r0 80274ec: eb61 0141 sbc.w r1, r1, r1, lsl #1 p->sign = '-'; 80274f0: f88d 3030 strb.w r3, [sp, #48] ; 0x30 } ulli2a(num, p); 80274f4: aa0a add r2, sp, #40 ; 0x28 80274f6: e033 b.n 8027560 #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) lli2a(va_arg(va, long long int), &p); else #endif if (1 == lng) 80274f8: 2b01 cmp r3, #1 li2a(va_arg(va, long int), &p); 80274fa: 6820 ldr r0, [r4, #0] 80274fc: 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) 8027500: d107 bne.n 8027512 *bf = 0; } static void li2a(long num, struct param *p) { if (num < 0) { 8027502: 2800 cmp r0, #0 8027504: da03 bge.n 802750e num = -num; p->sign = '-'; 8027506: 232d movs r3, #45 ; 0x2d } static void li2a(long num, struct param *p) { if (num < 0) { num = -num; 8027508: 4240 negs r0, r0 p->sign = '-'; 802750a: f88d 3030 strb.w r3, [sp, #48] ; 0x30 } uli2a(num, p); 802750e: a90a add r1, sp, #40 ; 0x28 8027510: e02f b.n 8027572 *bf = 0; } static void i2a(int num, struct param *p) { if (num < 0) { 8027512: 2800 cmp r0, #0 8027514: da03 bge.n 802751e num = -num; p->sign = '-'; 8027516: 232d movs r3, #45 ; 0x2d } static void i2a(int num, struct param *p) { if (num < 0) { num = -num; 8027518: 4240 negs r0, r0 p->sign = '-'; 802751a: f88d 3030 strb.w r3, [sp, #48] ; 0x30 } ui2a(num, p); 802751e: a90a add r1, sp, #40 ; 0x28 8027520: e02a b.n 8027578 i2a(va_arg(va, int), &p); putchw(putp, putf, &p); break; #ifdef SIZEOF_POINTER case 'p': p.alt = 1; 8027522: f89d 3028 ldrb.w r3, [sp, #40] ; 0x28 8027526: f043 0302 orr.w r3, r3, #2 802752a: f88d 3028 strb.w r3, [sp, #40] ; 0x28 # if defined(SIZEOF_INT) && SIZEOF_POINTER <= SIZEOF_INT lng = 0; 802752e: 2300 movs r3, #0 lng = 2; # endif #endif case 'x': case 'X': p.base = 16; 8027530: 2210 movs r2, #16 p.uc = (ch == 'X')?1:0; 8027532: f1b1 0e58 subs.w lr, r1, #88 ; 0x58 8027536: f1de 0100 rsbs r1, lr, #0 802753a: f89d 0028 ldrb.w r0, [sp, #40] ; 0x28 lng = 2; # endif #endif case 'x': case 'X': p.base = 16; 802753e: 920d str r2, [sp, #52] ; 0x34 p.uc = (ch == 'X')?1:0; 8027540: eb51 010e adcs.w r1, r1, lr 8027544: aa1a add r2, sp, #104 ; 0x68 8027546: f361 0082 bfi r0, r1, #2, #1 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 802754a: 2b02 cmp r3, #2 # endif #endif case 'x': case 'X': p.base = 16; p.uc = (ch == 'X')?1:0; 802754c: f802 0d40 strb.w r0, [r2, #-64]! #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 8027550: d109 bne.n 8027566 ulli2a(va_arg(va, unsigned long long int), &p); 8027552: 3407 adds r4, #7 8027554: f024 0307 bic.w r3, r4, #7 8027558: e9d3 0100 ldrd r0, r1, [r3] 802755c: f103 0408 add.w r4, r3, #8 8027560: f7ff fdbe bl 80270e0 8027564: e00b b.n 802757e else #endif if (1 == lng) uli2a(va_arg(va, unsigned long int), &p); 8027566: 6820 ldr r0, [r4, #0] 8027568: 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) 802756a: 2b01 cmp r3, #1 802756c: f104 0804 add.w r8, r4, #4 8027570: d102 bne.n 8027578 uli2a(va_arg(va, unsigned long int), &p); 8027572: f7ff fe0b bl 802718c 8027576: e001 b.n 802757c else #endif ui2a(va_arg(va, unsigned int), &p); 8027578: f7ff fe33 bl 80271e2 802757c: 4644 mov r4, r8 putchw(putp, putf, &p); 802757e: 4628 mov r0, r5 8027580: 4631 mov r1, r6 8027582: aa0a add r2, sp, #40 ; 0x28 8027584: f7ff fe58 bl 8027238 break; 8027588: e0eb b.n 8027762 case 'o': p.base = 8; 802758a: 2308 movs r3, #8 ui2a(va_arg(va, unsigned int), &p); 802758c: 6820 ldr r0, [r4, #0] #endif ui2a(va_arg(va, unsigned int), &p); putchw(putp, putf, &p); break; case 'o': p.base = 8; 802758e: 930d str r3, [sp, #52] ; 0x34 ui2a(va_arg(va, unsigned int), &p); 8027590: a90a add r1, sp, #40 ; 0x28 8027592: f7ff fe26 bl 80271e2 putchw(putp, putf, &p); 8027596: 4628 mov r0, r5 8027598: 4631 mov r1, r6 802759a: 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); 802759c: f104 0804 add.w r8, r4, #4 putchw(putp, putf, &p); 80275a0: f7ff fe4a bl 8027238 80275a4: e010 b.n 80275c8 break; case 'c': putf(putp, (char)(va_arg(va, int))); 80275a6: 4628 mov r0, r5 80275a8: 7821 ldrb r1, [r4, #0] 80275aa: f104 0804 add.w r8, r4, #4 80275ae: 47b0 blx r6 80275b0: e00a b.n 80275c8 break; case 's': p.bf = va_arg(va, char *); 80275b2: 6823 ldr r3, [r4, #0] putchw(putp, putf, &p); 80275b4: aa0a add r2, sp, #40 ; 0x28 80275b6: 4628 mov r0, r5 80275b8: 4631 mov r1, r6 break; case 'c': putf(putp, (char)(va_arg(va, int))); break; case 's': p.bf = va_arg(va, char *); 80275ba: 930e str r3, [sp, #56] ; 0x38 putchw(putp, putf, &p); 80275bc: f7ff fe3c bl 8027238 p.bf = bf; 80275c0: aa04 add r2, sp, #16 break; case 'c': putf(putp, (char)(va_arg(va, int))); break; case 's': p.bf = va_arg(va, char *); 80275c2: f104 0804 add.w r8, r4, #4 putchw(putp, putf, &p); p.bf = bf; 80275c6: 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 *); 80275c8: 4644 mov r4, r8 putchw(putp, putf, &p); p.bf = bf; break; 80275ca: e0ca b.n 8027762 case '%': putf(putp, ch); 80275cc: 4628 mov r0, r5 80275ce: 47b0 blx r6 break; 80275d0: e0c7 b.n 8027762 case 'f': case 'F': fval = va_arg(va, double); 80275d2: 3407 adds r4, #7 80275d4: f024 0307 bic.w r3, r4, #7 80275d8: f103 0408 add.w r4, r3, #8 80275dc: e893 0404 ldmia.w r3, {r2, sl} 80275e0: 9200 str r2, [sp, #0] sign = 0; if (fval < 0) 80275e2: 4610 mov r0, r2 80275e4: 4651 mov r1, sl 80275e6: 2200 movs r2, #0 80275e8: 2300 movs r3, #0 80275ea: f7f9 fa5b bl 8020aa4 <__aeabi_dcmplt> 80275ee: b138 cbz r0, 8027600 { sign = 1; p.width--; 80275f0: 9b0b ldr r3, [sp, #44] ; 0x2c 80275f2: 3b01 subs r3, #1 80275f4: 930b str r3, [sp, #44] ; 0x2c fval = - fval; 80275f6: f10a 4a00 add.w sl, sl, #2147483648 ; 0x80000000 case 'F': fval = va_arg(va, double); sign = 0; if (fval < 0) { sign = 1; 80275fa: f04f 0b01 mov.w fp, #1 80275fe: e009 b.n 8027614 p.width--; fval = - fval; } else if (p.sign) { 8027600: f89d 3030 ldrb.w r3, [sp, #48] ; 0x30 8027604: b12b cbz r3, 8027612 sign = 2; p.width--; 8027606: 9b0b ldr r3, [sp, #44] ; 0x2c 8027608: 3b01 subs r3, #1 802760a: 930b str r3, [sp, #44] ; 0x2c sign = 1; p.width--; fval = - fval; } else if (p.sign) { sign = 2; 802760c: f04f 0b02 mov.w fp, #2 8027610: e000 b.n 8027614 putf(putp, ch); break; case 'f': case 'F': fval = va_arg(va, double); sign = 0; 8027612: 469b mov fp, r3 else if (p.sign) { sign = 2; p.width--; } fpart = (int)fval; 8027614: 4651 mov r1, sl 8027616: 9800 ldr r0, [sp, #0] 8027618: f7f9 fa6c bl 8020af4 <__aeabi_d2iz> fiter = 0; 802761c: 2200 movs r2, #0 else if (p.sign) { sign = 2; p.width--; } fpart = (int)fval; 802761e: 9001 str r0, [sp, #4] 8027620: 4680 mov r8, r0 fiter = 0; while (fpart != 0) { temp_buffer[fiter++] = fpart % 10; 8027622: 210a movs r1, #10 } fpart = (int)fval; fiter = 0; while (fpart != 0) 8027624: e008 b.n 8027638 { temp_buffer[fiter++] = fpart % 10; 8027626: fb98 f0f1 sdiv r0, r8, r1 802762a: ab10 add r3, sp, #64 ; 0x40 802762c: fb01 8810 mls r8, r1, r0, r8 8027630: f843 8022 str.w r8, [r3, r2, lsl #2] 8027634: 3201 adds r2, #1 fpart = fpart / 10; 8027636: 4680 mov r8, r0 } fpart = (int)fval; fiter = 0; while (fpart != 0) 8027638: f1b8 0f00 cmp.w r8, #0 802763c: d1f3 bne.n 8027626 temp_buffer[fiter++] = fpart % 10; fpart = fpart / 10; } fiter--; if (fiter == -1) 802763e: f102 39ff add.w r9, r2, #4294967295 8027642: b912 cbnz r2, 802764a p.width--; 8027644: 9a0b ldr r2, [sp, #44] ; 0x2c 8027646: 3a01 subs r2, #1 8027648: 920b str r2, [sp, #44] ; 0x2c /* Leading zeros */ if (p.lz) { 802764a: f89d 2028 ldrb.w r2, [sp, #40] ; 0x28 802764e: 07d0 lsls r0, r2, #31 8027650: d51b bpl.n 802768a if (sign == 1) 8027652: f1bb 0f01 cmp.w fp, #1 8027656: d102 bne.n 802765e putf(putp, '-'); 8027658: 4628 mov r0, r5 802765a: 212d movs r1, #45 ; 0x2d 802765c: e007 b.n 802766e else if (sign == 2) 802765e: f1bb 0f02 cmp.w fp, #2 8027662: d105 bne.n 8027670 putf(putp, '+'); 8027664: 4628 mov r0, r5 8027666: 212b movs r1, #43 ; 0x2b 8027668: e001 b.n 802766e while (p.width-- > p.prec + fiter + 2) { putf(putp, '0'); 802766a: 4628 mov r0, r5 802766c: 2130 movs r1, #48 ; 0x30 802766e: 47b0 blx r6 if (sign == 1) putf(putp, '-'); else if (sign == 2) putf(putp, '+'); while (p.width-- > p.prec + fiter + 2) 8027670: f89d 203c ldrb.w r2, [sp, #60] ; 0x3c 8027674: 9b0b ldr r3, [sp, #44] ; 0x2c 8027676: 444a add r2, r9 8027678: 3202 adds r2, #2 802767a: 1e59 subs r1, r3, #1 802767c: 4293 cmp r3, r2 802767e: 910b str r1, [sp, #44] ; 0x2c 8027680: dcf3 bgt.n 802766a 8027682: e017 b.n 80276b4 else { while (p.width-- > p.prec + fiter + 2) { putf(putp, ' '); 8027684: 4628 mov r0, r5 8027686: 2120 movs r1, #32 8027688: 47b0 blx r6 } } else { while (p.width-- > p.prec + fiter + 2) 802768a: f89d 103c ldrb.w r1, [sp, #60] ; 0x3c 802768e: 9a0b ldr r2, [sp, #44] ; 0x2c 8027690: 4449 add r1, r9 8027692: 3102 adds r1, #2 8027694: 1e50 subs r0, r2, #1 8027696: 428a cmp r2, r1 8027698: 900b str r0, [sp, #44] ; 0x2c 802769a: dcf3 bgt.n 8027684 { putf(putp, ' '); } if (sign == 1) 802769c: f1bb 0f01 cmp.w fp, #1 80276a0: d102 bne.n 80276a8 putf(putp, '-'); 80276a2: 4628 mov r0, r5 80276a4: 212d movs r1, #45 ; 0x2d 80276a6: e004 b.n 80276b2 else if (sign == 2) 80276a8: f1bb 0f02 cmp.w fp, #2 80276ac: d102 bne.n 80276b4 putf(putp, '+'); 80276ae: 4628 mov r0, r5 80276b0: 212b movs r1, #43 ; 0x2b 80276b2: 47b0 blx r6 } if (fiter == -1) 80276b4: f1b9 3fff cmp.w r9, #4294967295 80276b8: d102 bne.n 80276c0 putf(putp, '0'); 80276ba: 4628 mov r0, r5 80276bc: 2130 movs r1, #48 ; 0x30 80276be: e007 b.n 80276d0 while (fiter > -1) { putf(putp, '0' + (temp_buffer[fiter--])); 80276c0: ab10 add r3, sp, #64 ; 0x40 80276c2: 4628 mov r0, r5 80276c4: f853 1029 ldr.w r1, [r3, r9, lsl #2] 80276c8: 3130 adds r1, #48 ; 0x30 80276ca: f109 39ff add.w r9, r9, #4294967295 80276ce: b2c9 uxtb r1, r1 80276d0: 47b0 blx r6 } if (fiter == -1) putf(putp, '0'); while (fiter > -1) 80276d2: f1b9 3fff cmp.w r9, #4294967295 80276d6: d1f3 bne.n 80276c0 { putf(putp, '0' + (temp_buffer[fiter--])); } putf(putp, '.'); 80276d8: 4628 mov r0, r5 80276da: 212e movs r1, #46 ; 0x2e 80276dc: 47b0 blx r6 ffactor = 1; 80276de: f04f 0901 mov.w r9, #1 while (p.prec-- > 0) 80276e2: e01d b.n 8027720 { ffactor *= 10; 80276e4: 230a movs r3, #10 fpart = (int)((fval - (int)fval)*ffactor); 80276e6: 9801 ldr r0, [sp, #4] putf(putp, '.'); ffactor = 1; while (p.prec-- > 0) { ffactor *= 10; 80276e8: fb03 f909 mul.w r9, r3, r9 fpart = (int)((fval - (int)fval)*ffactor); 80276ec: f7f8 ff02 bl 80204f4 <__aeabi_i2d> 80276f0: 4602 mov r2, r0 80276f2: 460b mov r3, r1 80276f4: 9800 ldr r0, [sp, #0] 80276f6: 4651 mov r1, sl 80276f8: f7f8 fdae bl 8020258 <__aeabi_dsub> 80276fc: e9cd 0102 strd r0, r1, [sp, #8] 8027700: 4648 mov r0, r9 8027702: f7f8 fef7 bl 80204f4 <__aeabi_i2d> 8027706: 4602 mov r2, r0 8027708: 460b mov r3, r1 802770a: e9dd 0102 ldrd r0, r1, [sp, #8] 802770e: f7f8 ff57 bl 80205c0 <__aeabi_dmul> 8027712: f7f9 f9ef bl 8020af4 <__aeabi_d2iz> if (fpart == 0) 8027716: 4680 mov r8, r0 8027718: b910 cbnz r0, 8027720 putf(putp, '0'); 802771a: 4628 mov r0, r5 802771c: 2130 movs r1, #48 ; 0x30 802771e: 47b0 blx r6 putf(putp, '0' + (temp_buffer[fiter--])); } putf(putp, '.'); ffactor = 1; while (p.prec-- > 0) 8027720: f89d 303c ldrb.w r3, [sp, #60] ; 0x3c 8027724: 1e5a subs r2, r3, #1 8027726: f88d 203c strb.w r2, [sp, #60] ; 0x3c 802772a: 2b00 cmp r3, #0 802772c: d1da bne.n 80276e4 putf(putp, '0'); } fiter = 0; while (fpart != 0) { temp_buffer[fiter++] = fpart % 10; 802772e: 220a movs r2, #10 8027730: e008 b.n 8027744 8027732: fb98 f1f2 sdiv r1, r8, r2 8027736: a810 add r0, sp, #64 ; 0x40 8027738: fb02 8811 mls r8, r2, r1, r8 802773c: f840 8023 str.w r8, [r0, r3, lsl #2] 8027740: 3301 adds r3, #1 fpart = fpart / 10; 8027742: 4688 mov r8, r1 fpart = (int)((fval - (int)fval)*ffactor); if (fpart == 0) putf(putp, '0'); } fiter = 0; while (fpart != 0) 8027744: f1b8 0f00 cmp.w r8, #0 8027748: d1f3 bne.n 8027732 802774a: 4698 mov r8, r3 temp_buffer[fiter++] = fpart % 10; fpart = fpart / 10; } fiter--; while (fiter > -1) 802774c: e006 b.n 802775c { putf(putp, '0' + (temp_buffer[fiter--])); 802774e: ab10 add r3, sp, #64 ; 0x40 8027750: 4628 mov r0, r5 8027752: f853 1028 ldr.w r1, [r3, r8, lsl #2] 8027756: 3130 adds r1, #48 ; 0x30 8027758: b2c9 uxtb r1, r1 802775a: 47b0 blx r6 temp_buffer[fiter++] = fpart % 10; fpart = fpart / 10; } fiter--; while (fiter > -1) 802775c: f118 38ff adds.w r8, r8, #4294967295 8027760: d2f5 bcs.n 802774e char bf[12]; /* int = 32b on some architectures */ #endif char ch; p.bf = bf; while ((ch = *(fmt++))) { 8027762: f817 1b01 ldrb.w r1, [r7], #1 8027766: 2900 cmp r1, #0 8027768: f47f adf2 bne.w 8027350 802776c: e003 b.n 8027776 { const char *p = *src; unsigned int num = 0; int digit; while ((digit = a2d(ch)) >= 0) { if (digit > base) 802776e: 2b0a cmp r3, #10 8027770: f77f ae32 ble.w 80273d8 8027774: e64c b.n 8027410 break; } } } abort:; } 8027776: b01b add sp, #108 ; 0x6c 8027778: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0802777c : stdout_putf = putf; stdout_putp = putp; } void tfp_printf(char *fmt, ...) { 802777c: b40f push {r0, r1, r2, r3} 802777e: b507 push {r0, r1, r2, lr} va_list va; va_start(va, fmt); tfp_format(stdout_putp, stdout_putf, fmt, va); 8027780: 4906 ldr r1, [pc, #24] ; (802779c ) stdout_putf = putf; stdout_putp = putp; } void tfp_printf(char *fmt, ...) { 8027782: ab04 add r3, sp, #16 va_list va; va_start(va, fmt); tfp_format(stdout_putp, stdout_putf, fmt, va); 8027784: 6808 ldr r0, [r1, #0] 8027786: 4906 ldr r1, [pc, #24] ; (80277a0 ) stdout_putf = putf; stdout_putp = putp; } void tfp_printf(char *fmt, ...) { 8027788: f853 2b04 ldr.w r2, [r3], #4 va_list va; va_start(va, fmt); tfp_format(stdout_putp, stdout_putf, fmt, va); 802778c: 6809 ldr r1, [r1, #0] } void tfp_printf(char *fmt, ...) { va_list va; va_start(va, fmt); 802778e: 9301 str r3, [sp, #4] tfp_format(stdout_putp, stdout_putf, fmt, va); 8027790: f7ff fdd4 bl 802733c va_end(va); } 8027794: e8bd 400e ldmia.w sp!, {r1, r2, r3, lr} 8027798: b004 add sp, #16 802779a: 4770 bx lr 802779c: 20000b0c .word 0x20000b0c 80277a0: 20000b08 .word 0x20000b08 080277a4 : data->dest[data->num_chars] = c; data->num_chars ++; } int tfp_vsnprintf(char *str, size_t size, const char *format, va_list ap) { 80277a4: b51f push {r0, r1, r2, r3, r4, lr} 80277a6: 2400 movs r4, #0 struct _vsnprintf_putcf_data data; if (size < 1) 80277a8: b181 cbz r1, 80277cc return 0; data.dest = str; data.dest_capacity = size-1; 80277aa: 3901 subs r1, #1 struct _vsnprintf_putcf_data data; if (size < 1) return 0; data.dest = str; 80277ac: 9002 str r0, [sp, #8] data.dest_capacity = size-1; 80277ae: 9101 str r1, [sp, #4] data.num_chars = 0; tfp_format(&data, _vsnprintf_putcf, format, ap); 80277b0: a801 add r0, sp, #4 80277b2: 4908 ldr r1, [pc, #32] ; (80277d4 ) if (size < 1) return 0; data.dest = str; data.dest_capacity = size-1; data.num_chars = 0; 80277b4: 9403 str r4, [sp, #12] tfp_format(&data, _vsnprintf_putcf, format, ap); 80277b6: f7ff fdc1 bl 802733c if (data.num_chars < data.dest_capacity) 80277ba: 9903 ldr r1, [sp, #12] 80277bc: 9b01 ldr r3, [sp, #4] 80277be: 9a02 ldr r2, [sp, #8] 80277c0: 4299 cmp r1, r3 data.dest[data.num_chars] = '\0'; 80277c2: bf34 ite cc 80277c4: 5454 strbcc r4, [r2, r1] else data.dest[data.dest_capacity] = '\0'; 80277c6: 54d4 strbcs r4, [r2, r3] return data.num_chars; 80277c8: 9803 ldr r0, [sp, #12] 80277ca: e000 b.n 80277ce int tfp_vsnprintf(char *str, size_t size, const char *format, va_list ap) { struct _vsnprintf_putcf_data data; if (size < 1) return 0; 80277cc: 4608 mov r0, r1 data.dest[data.num_chars] = '\0'; else data.dest[data.dest_capacity] = '\0'; return data.num_chars; } 80277ce: b004 add sp, #16 80277d0: bd10 pop {r4, pc} 80277d2: bf00 nop 80277d4: 0802731d .word 0x0802731d 080277d8 : int tfp_snprintf(char *str, size_t size, const char *format, ...) { 80277d8: b40c push {r2, r3} 80277da: b507 push {r0, r1, r2, lr} 80277dc: ab04 add r3, sp, #16 80277de: f853 2b04 ldr.w r2, [r3], #4 va_list ap; int retval; va_start(ap, format); 80277e2: 9301 str r3, [sp, #4] retval = tfp_vsnprintf(str, size, format, ap); 80277e4: f7ff ffde bl 80277a4 va_end(ap); return retval; } 80277e8: e8bd 400e ldmia.w sp!, {r1, r2, r3, lr} 80277ec: b002 add sp, #8 80277ee: 4770 bx lr 080277f0 : 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) { 80277f0: b537 push {r0, r1, r2, r4, r5, lr} 80277f2: 460d mov r5, r1 80277f4: 4613 mov r3, r2 struct _vsprintf_putcf_data data; data.dest = str; 80277f6: 9000 str r0, [sp, #0] data.num_chars = 0; 80277f8: 2400 movs r4, #0 tfp_format(&data, _vsprintf_putcf, format, ap); 80277fa: 4668 mov r0, sp 80277fc: 462a mov r2, r5 80277fe: 4904 ldr r1, [pc, #16] ; (8027810 ) int tfp_vsprintf(char *str, const char *format, va_list ap) { struct _vsprintf_putcf_data data; data.dest = str; data.num_chars = 0; 8027800: 9401 str r4, [sp, #4] tfp_format(&data, _vsprintf_putcf, format, ap); 8027802: f7ff fd9b bl 802733c data.dest[data.num_chars] = '\0'; 8027806: e89d 000c ldmia.w sp, {r2, r3} 802780a: 54d4 strb r4, [r2, r3] return data.num_chars; } 802780c: 9801 ldr r0, [sp, #4] 802780e: bd3e pop {r1, r2, r3, r4, r5, pc} 8027810: 08027331 .word 0x08027331 08027814 : int tfp_sprintf(char *str, const char *format, ...) { 8027814: b40e push {r1, r2, r3} 8027816: b503 push {r0, r1, lr} 8027818: aa03 add r2, sp, #12 802781a: f852 1b04 ldr.w r1, [r2], #4 va_list ap; int retval; va_start(ap, format); 802781e: 9201 str r2, [sp, #4] retval = tfp_vsprintf(str, format, ap); 8027820: f7ff ffe6 bl 80277f0 va_end(ap); return retval; } 8027824: e8bd 400c ldmia.w sp!, {r2, r3, lr} 8027828: b003 add sp, #12 802782a: 4770 bx lr 0802782c : /** * @brief */ void GetInputFreqStr(char *str, uint8_t *len) { 802782c: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", UPS.Freq_in); 802782e: 4b08 ldr r3, [pc, #32] ; (8027850 ) /** * @brief */ void GetInputFreqStr(char *str, uint8_t *len) { 8027830: 4604 mov r4, r0 sprintf(str, "%0.1f", UPS.Freq_in); 8027832: 6818 ldr r0, [r3, #0] /** * @brief */ void GetInputFreqStr(char *str, uint8_t *len) { 8027834: 460d mov r5, r1 sprintf(str, "%0.1f", UPS.Freq_in); 8027836: f7f8 fe6f bl 8020518 <__aeabi_f2d> 802783a: 4602 mov r2, r0 802783c: 460b mov r3, r1 802783e: 4620 mov r0, r4 8027840: 4904 ldr r1, [pc, #16] ; (8027854 ) 8027842: f7ff ffe7 bl 8027814 *len = strlen(str); 8027846: 4620 mov r0, r4 8027848: f7fa fb32 bl 8021eb0 802784c: 7028 strb r0, [r5, #0] 802784e: bd38 pop {r3, r4, r5, pc} 8027850: 2000cba4 .word 0x2000cba4 8027854: 08039863 .word 0x08039863 08027858 : /** * @brief */ void GetOutputFreqStr(char *str, uint8_t *len) { 8027858: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", UPS.Freq_in); 802785a: 4b08 ldr r3, [pc, #32] ; (802787c ) /** * @brief */ void GetOutputFreqStr(char *str, uint8_t *len) { 802785c: 4604 mov r4, r0 sprintf(str, "%0.1f", UPS.Freq_in); 802785e: 6818 ldr r0, [r3, #0] /** * @brief */ void GetOutputFreqStr(char *str, uint8_t *len) { 8027860: 460d mov r5, r1 sprintf(str, "%0.1f", UPS.Freq_in); 8027862: f7f8 fe59 bl 8020518 <__aeabi_f2d> 8027866: 4602 mov r2, r0 8027868: 460b mov r3, r1 802786a: 4620 mov r0, r4 802786c: 4904 ldr r1, [pc, #16] ; (8027880 ) 802786e: f7ff ffd1 bl 8027814 *len = strlen(str); 8027872: 4620 mov r0, r4 8027874: f7fa fb1c bl 8021eb0 8027878: 7028 strb r0, [r5, #0] 802787a: bd38 pop {r3, r4, r5, pc} 802787c: 2000cba4 .word 0x2000cba4 8027880: 08039863 .word 0x08039863 08027884 : /** * @brief */ void GetInputVoltageStr(char *str, uint8_t *len) { 8027884: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", UPS.VAC_in); 8027886: 4b08 ldr r3, [pc, #32] ; (80278a8 ) /** * @brief */ void GetInputVoltageStr(char *str, uint8_t *len) { 8027888: 4604 mov r4, r0 sprintf(str, "%0.1f", UPS.VAC_in); 802788a: 6858 ldr r0, [r3, #4] /** * @brief */ void GetInputVoltageStr(char *str, uint8_t *len) { 802788c: 460d mov r5, r1 sprintf(str, "%0.1f", UPS.VAC_in); 802788e: f7f8 fe43 bl 8020518 <__aeabi_f2d> 8027892: 4602 mov r2, r0 8027894: 460b mov r3, r1 8027896: 4620 mov r0, r4 8027898: 4904 ldr r1, [pc, #16] ; (80278ac ) 802789a: f7ff ffbb bl 8027814 *len = strlen(str); 802789e: 4620 mov r0, r4 80278a0: f7fa fb06 bl 8021eb0 80278a4: 7028 strb r0, [r5, #0] 80278a6: bd38 pop {r3, r4, r5, pc} 80278a8: 2000cba4 .word 0x2000cba4 80278ac: 08039863 .word 0x08039863 080278b0 : /** * @brief */ void GetOutputVoltageStr(char *str, uint8_t *len) { 80278b0: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", UPS.VAC_out); 80278b2: 4b08 ldr r3, [pc, #32] ; (80278d4 ) /** * @brief */ void GetOutputVoltageStr(char *str, uint8_t *len) { 80278b4: 4604 mov r4, r0 sprintf(str, "%0.1f", UPS.VAC_out); 80278b6: 6898 ldr r0, [r3, #8] /** * @brief */ void GetOutputVoltageStr(char *str, uint8_t *len) { 80278b8: 460d mov r5, r1 sprintf(str, "%0.1f", UPS.VAC_out); 80278ba: f7f8 fe2d bl 8020518 <__aeabi_f2d> 80278be: 4602 mov r2, r0 80278c0: 460b mov r3, r1 80278c2: 4620 mov r0, r4 80278c4: 4904 ldr r1, [pc, #16] ; (80278d8 ) 80278c6: f7ff ffa5 bl 8027814 *len = strlen(str); 80278ca: 4620 mov r0, r4 80278cc: f7fa faf0 bl 8021eb0 80278d0: 7028 strb r0, [r5, #0] 80278d2: bd38 pop {r3, r4, r5, pc} 80278d4: 2000cba4 .word 0x2000cba4 80278d8: 08039863 .word 0x08039863 080278dc : /** * @brief */ void GetPowerStr(char *str, uint8_t *len) { 80278dc: b538 push {r3, r4, r5, lr} sprintf(str, "%d", UPS.Load); 80278de: 4b06 ldr r3, [pc, #24] ; (80278f8 ) /** * @brief */ void GetPowerStr(char *str, uint8_t *len) { 80278e0: 4605 mov r5, r0 80278e2: 460c mov r4, r1 sprintf(str, "%d", UPS.Load); 80278e4: 7c1a ldrb r2, [r3, #16] 80278e6: 4905 ldr r1, [pc, #20] ; (80278fc ) 80278e8: f7ff ff94 bl 8027814 *len = strlen(str); 80278ec: 4628 mov r0, r5 80278ee: f7fa fadf bl 8021eb0 80278f2: 7020 strb r0, [r4, #0] 80278f4: bd38 pop {r3, r4, r5, pc} 80278f6: bf00 nop 80278f8: 2000cba4 .word 0x2000cba4 80278fc: 08039869 .word 0x08039869 08027900 : /** * @brief */ void GetBatCapacityStr(char *str, uint8_t *len) { 8027900: b538 push {r3, r4, r5, lr} sprintf(str, "%d", UPS.SOC); 8027902: 4b06 ldr r3, [pc, #24] ; (802791c ) /** * @brief */ void GetBatCapacityStr(char *str, uint8_t *len) { 8027904: 4605 mov r5, r0 8027906: 460c mov r4, r1 sprintf(str, "%d", UPS.SOC); 8027908: 7c5a ldrb r2, [r3, #17] 802790a: 4905 ldr r1, [pc, #20] ; (8027920 ) 802790c: f7ff ff82 bl 8027814 *len = strlen(str); 8027910: 4628 mov r0, r5 8027912: f7fa facd bl 8021eb0 8027916: 7020 strb r0, [r4, #0] 8027918: bd38 pop {r3, r4, r5, pc} 802791a: bf00 nop 802791c: 2000cba4 .word 0x2000cba4 8027920: 08039869 .word 0x08039869 08027924 : /** * @brief */ void GetRuntimeStr(char *str, uint8_t *len) { 8027924: b538 push {r3, r4, r5, lr} sprintf(str, "%d", UPS.work_time); 8027926: 4b06 ldr r3, [pc, #24] ; (8027940 ) /** * @brief */ void GetRuntimeStr(char *str, uint8_t *len) { 8027928: 4605 mov r5, r0 802792a: 460c mov r4, r1 sprintf(str, "%d", UPS.work_time); 802792c: 7c9a ldrb r2, [r3, #18] 802792e: 4905 ldr r1, [pc, #20] ; (8027944 ) 8027930: f7ff ff70 bl 8027814 *len = strlen(str); 8027934: 4628 mov r0, r5 8027936: f7fa fabb bl 8021eb0 802793a: 7020 strb r0, [r4, #0] 802793c: bd38 pop {r3, r4, r5, pc} 802793e: bf00 nop 8027940: 2000cba4 .word 0x2000cba4 8027944: 08039869 .word 0x08039869 08027948 : /** * @brief */ void GetInternalTempStr(char *str, uint8_t *len) { 8027948: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", UPS.Temp); 802794a: 4b08 ldr r3, [pc, #32] ; (802796c ) /** * @brief */ void GetInternalTempStr(char *str, uint8_t *len) { 802794c: 4604 mov r4, r0 sprintf(str, "%0.1f", UPS.Temp); 802794e: 68d8 ldr r0, [r3, #12] /** * @brief */ void GetInternalTempStr(char *str, uint8_t *len) { 8027950: 460d mov r5, r1 sprintf(str, "%0.1f", UPS.Temp); 8027952: f7f8 fde1 bl 8020518 <__aeabi_f2d> 8027956: 4602 mov r2, r0 8027958: 460b mov r3, r1 802795a: 4620 mov r0, r4 802795c: 4904 ldr r1, [pc, #16] ; (8027970 ) 802795e: f7ff ff59 bl 8027814 *len = strlen(str); 8027962: 4620 mov r0, r4 8027964: f7fa faa4 bl 8021eb0 8027968: 7028 strb r0, [r5, #0] 802796a: bd38 pop {r3, r4, r5, pc} 802796c: 2000cba4 .word 0x2000cba4 8027970: 08039863 .word 0x08039863 08027974 : /** * @brief */ void GetAlarmMonitorStr(char *str, uint8_t *len) { 8027974: b538 push {r3, r4, r5, lr} sprintf(str, "%d", UPS.Alarm); 8027976: 4b06 ldr r3, [pc, #24] ; (8027990 ) /** * @brief */ void GetAlarmMonitorStr(char *str, uint8_t *len) { 8027978: 4605 mov r5, r0 802797a: 460c mov r4, r1 sprintf(str, "%d", UPS.Alarm); 802797c: 7d1a ldrb r2, [r3, #20] 802797e: 4905 ldr r1, [pc, #20] ; (8027994 ) 8027980: f7ff ff48 bl 8027814 *len = strlen(str); 8027984: 4628 mov r0, r5 8027986: f7fa fa93 bl 8021eb0 802798a: 7020 strb r0, [r4, #0] 802798c: bd38 pop {r3, r4, r5, pc} 802798e: bf00 nop 8027990: 2000cba4 .word 0x2000cba4 8027994: 08039869 .word 0x08039869 08027998 : /** * @brief */ void GetConnectMonitorStr(char *str, uint8_t *len) { 8027998: b538 push {r3, r4, r5, lr} sprintf(str, "%d", UPS.Present); 802799a: 4b06 ldr r3, [pc, #24] ; (80279b4 ) /** * @brief */ void GetConnectMonitorStr(char *str, uint8_t *len) { 802799c: 4605 mov r5, r0 802799e: 460c mov r4, r1 sprintf(str, "%d", UPS.Present); 80279a0: f893 202c ldrb.w r2, [r3, #44] ; 0x2c 80279a4: 4904 ldr r1, [pc, #16] ; (80279b8 ) 80279a6: f7ff ff35 bl 8027814 *len = strlen(str); 80279aa: 4628 mov r0, r5 80279ac: f7fa fa80 bl 8021eb0 80279b0: 7020 strb r0, [r4, #0] 80279b2: bd38 pop {r3, r4, r5, pc} 80279b4: 2000cba4 .word 0x2000cba4 80279b8: 08039869 .word 0x08039869 080279bc : /** * @brief Индикация аварийных ситуаций */ void GetAlarmStr(char *str, uint8_t *len) { 80279bc: b538 push {r3, r4, r5, lr} sprintf(str, "%d", UPS.Status); 80279be: 4b06 ldr r3, [pc, #24] ; (80279d8 ) /** * @brief Индикация аварийных ситуаций */ void GetAlarmStr(char *str, uint8_t *len) { 80279c0: 4605 mov r5, r0 80279c2: 460c mov r4, r1 sprintf(str, "%d", UPS.Status); 80279c4: 7cda ldrb r2, [r3, #19] 80279c6: 4905 ldr r1, [pc, #20] ; (80279dc ) 80279c8: f7ff ff24 bl 8027814 *len = strlen(str); 80279cc: 4628 mov r0, r5 80279ce: f7fa fa6f bl 8021eb0 80279d2: 7020 strb r0, [r4, #0] 80279d4: bd38 pop {r3, r4, r5, pc} 80279d6: bf00 nop 80279d8: 2000cba4 .word 0x2000cba4 80279dc: 08039869 .word 0x08039869 080279e0 : /** * @brief Дата (Ready for PRS!) */ void GetDateStr(char *str, uint8_t *len) { 80279e0: b530 push {r4, r5, lr} 80279e2: b087 sub sp, #28 80279e4: 4604 mov r4, r0 80279e6: 460d mov r5, r1 TM_RTC_t data; uint16_t sys_year ; TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 80279e8: a802 add r0, sp, #8 80279ea: 2100 movs r1, #0 80279ec: f7fe fd4c bl 8026488 sys_year = 2000 + data.year; sprintf(str, "%04i-%02i-%02i", sys_year, data.month, data.date); 80279f0: 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; 80279f4: f89d 2011 ldrb.w r2, [sp, #17] sprintf(str, "%04i-%02i-%02i", sys_year, data.month, data.date); 80279f8: f89d 3010 ldrb.w r3, [sp, #16] 80279fc: 9100 str r1, [sp, #0] 80279fe: f502 62fa add.w r2, r2, #2000 ; 0x7d0 8027a02: 4905 ldr r1, [pc, #20] ; (8027a18 ) 8027a04: 4620 mov r0, r4 8027a06: f7ff ff05 bl 8027814 *len = strlen(str); 8027a0a: 4620 mov r0, r4 8027a0c: f7fa fa50 bl 8021eb0 8027a10: 7028 strb r0, [r5, #0] } 8027a12: b007 add sp, #28 8027a14: bd30 pop {r4, r5, pc} 8027a16: bf00 nop 8027a18: 0803986c .word 0x0803986c 08027a1c : /** * @brief Время (Ready for PRS!) */ void GetTimeStr(char *str, uint8_t *len) { 8027a1c: b530 push {r4, r5, lr} 8027a1e: b085 sub sp, #20 8027a20: 4604 mov r4, r0 8027a22: 460d mov r5, r1 TM_RTC_t data; TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8027a24: 4668 mov r0, sp 8027a26: 2100 movs r1, #0 8027a28: f7fe fd2e bl 8026488 sprintf(str, "%02i:%02i", data.hours, data.minutes); 8027a2c: 4906 ldr r1, [pc, #24] ; (8027a48 ) 8027a2e: f89d 2005 ldrb.w r2, [sp, #5] 8027a32: f89d 3004 ldrb.w r3, [sp, #4] 8027a36: 4620 mov r0, r4 8027a38: f7ff feec bl 8027814 *len = strlen(str); 8027a3c: 4620 mov r0, r4 8027a3e: f7fa fa37 bl 8021eb0 8027a42: 7028 strb r0, [r5, #0] } 8027a44: b005 add sp, #20 8027a46: bd30 pop {r4, r5, pc} 8027a48: 080398b5 .word 0x080398b5 08027a4c : /** * @brief Время (Ready for PRS!) */ void GetUnixTimeStr(char *str, uint8_t *len) { 8027a4c: b530 push {r4, r5, lr} 8027a4e: b085 sub sp, #20 8027a50: 4604 mov r4, r0 8027a52: 460d mov r5, r1 TM_RTC_t data; TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8027a54: 4668 mov r0, sp 8027a56: 2100 movs r1, #0 8027a58: f7fe fd16 bl 8026488 sprintf(str, "%d", data.unix); 8027a5c: 4905 ldr r1, [pc, #20] ; (8027a74 ) 8027a5e: 9a03 ldr r2, [sp, #12] 8027a60: 4620 mov r0, r4 8027a62: f7ff fed7 bl 8027814 *len = strlen(str); 8027a66: 4620 mov r0, r4 8027a68: f7fa fa22 bl 8021eb0 8027a6c: 7028 strb r0, [r5, #0] } 8027a6e: b005 add sp, #20 8027a70: bd30 pop {r4, r5, pc} 8027a72: bf00 nop 8027a74: 08039869 .word 0x08039869 08027a78 : /** * @brief Состояние SNTP (Ready for PRS!) */ void GetSntpStateStr(char *str, uint8_t *len) { 8027a78: b538 push {r3, r4, r5, lr} if (sSettings.sSNTP.sntpEnable) 8027a7a: 4b08 ldr r3, [pc, #32] ; (8027a9c ) 8027a7c: f893 3340 ldrb.w r3, [r3, #832] ; 0x340 /** * @brief Состояние SNTP (Ready for PRS!) */ void GetSntpStateStr(char *str, uint8_t *len) { 8027a80: 460c mov r4, r1 8027a82: 4605 mov r5, r0 if (sSettings.sSNTP.sntpEnable) { sprintf(str, "%s", "1"); //авто 8027a84: 4906 ldr r1, [pc, #24] ; (8027aa0 ) /** * @brief Состояние SNTP (Ready for PRS!) */ void GetSntpStateStr(char *str, uint8_t *len) { if (sSettings.sSNTP.sntpEnable) 8027a86: b10b cbz r3, 8027a8c { sprintf(str, "%s", "1"); //авто 8027a88: 4a06 ldr r2, [pc, #24] ; (8027aa4 ) 8027a8a: e000 b.n 8027a8e *len = strlen(str); } else { sprintf(str, "%s", "0"); //ручной 8027a8c: 4a06 ldr r2, [pc, #24] ; (8027aa8 ) 8027a8e: f7ff fec1 bl 8027814 *len = strlen(str); 8027a92: 4628 mov r0, r5 8027a94: f7fa fa0c bl 8021eb0 8027a98: 7020 strb r0, [r4, #0] 8027a9a: bd38 pop {r3, r4, r5, pc} 8027a9c: 2000cfc0 .word 0x2000cfc0 8027aa0: 0803987b .word 0x0803987b 8027aa4: 08039b52 .word 0x08039b52 8027aa8: 0803990d .word 0x0803990d 08027aac : /** * @brief IP адрес SNTP сервера (Ready for PRS!) */ void GetSntpServerIpStr(char *str, uint8_t *len) { 8027aac: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSNTP.ip); 8027aae: 4a05 ldr r2, [pc, #20] ; (8027ac4 ) /** * @brief IP адрес SNTP сервера (Ready for PRS!) */ void GetSntpServerIpStr(char *str, uint8_t *len) { 8027ab0: 4605 mov r5, r0 8027ab2: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSNTP.ip); 8027ab4: 4904 ldr r1, [pc, #16] ; (8027ac8 ) 8027ab6: f7ff fead bl 8027814 *len = strlen(str); 8027aba: 4628 mov r0, r5 8027abc: f7fa f9f8 bl 8021eb0 8027ac0: 7020 strb r0, [r4, #0] 8027ac2: bd38 pop {r3, r4, r5, pc} 8027ac4: 2000d301 .word 0x2000d301 8027ac8: 0803987b .word 0x0803987b 08027acc : /** * @brief Часовой пояс контроллера (Ready for PRS!) */ void GetSntpTimeZoneStr(char *str, uint8_t *len) { 8027acc: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", sSettings.sSNTP.timeZone); 8027ace: 4b09 ldr r3, [pc, #36] ; (8027af4 ) /** * @brief Часовой пояс контроллера (Ready for PRS!) */ void GetSntpTimeZoneStr(char *str, uint8_t *len) { 8027ad0: 4604 mov r4, r0 sprintf(str, "%0.1f", sSettings.sSNTP.timeZone); 8027ad2: f8d3 0370 ldr.w r0, [r3, #880] ; 0x370 /** * @brief Часовой пояс контроллера (Ready for PRS!) */ void GetSntpTimeZoneStr(char *str, uint8_t *len) { 8027ad6: 460d mov r5, r1 sprintf(str, "%0.1f", sSettings.sSNTP.timeZone); 8027ad8: f7f8 fd1e bl 8020518 <__aeabi_f2d> 8027adc: 4602 mov r2, r0 8027ade: 460b mov r3, r1 8027ae0: 4620 mov r0, r4 8027ae2: 4905 ldr r1, [pc, #20] ; (8027af8 ) 8027ae4: f7ff fe96 bl 8027814 *len = strlen(str); 8027ae8: 4620 mov r0, r4 8027aea: f7fa f9e1 bl 8021eb0 8027aee: 7028 strb r0, [r5, #0] 8027af0: bd38 pop {r3, r4, r5, pc} 8027af2: bf00 nop 8027af4: 2000cfc0 .word 0x2000cfc0 8027af8: 08039863 .word 0x08039863 08027afc : /** * @brief Дата последней синхронизации SNTP (Ready for PRS!) */ void GetSntpLastDataStr(char *str, uint8_t *len) { 8027afc: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSNTP.data); 8027afe: 4a05 ldr r2, [pc, #20] ; (8027b14 ) /** * @brief Дата последней синхронизации SNTP (Ready for PRS!) */ void GetSntpLastDataStr(char *str, uint8_t *len) { 8027b00: 4605 mov r5, r0 8027b02: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSNTP.data); 8027b04: 4904 ldr r1, [pc, #16] ; (8027b18 ) 8027b06: f7ff fe85 bl 8027814 *len = strlen(str); 8027b0a: 4628 mov r0, r5 8027b0c: f7fa f9d0 bl 8021eb0 8027b10: 7020 strb r0, [r4, #0] 8027b12: bd38 pop {r3, r4, r5, pc} 8027b14: 2000d311 .word 0x2000d311 8027b18: 0803987b .word 0x0803987b 08027b1c : /** * @brief Тип действий при срабатывание сухих контактов */ void GetDINTypeActStr(char *str, uint8_t *len, uint8_t num) { 8027b1c: b538 push {r3, r4, r5, lr} sprintf(str, "%d", sSettings.sInOuts.din_type_act[num]); 8027b1e: 4b07 ldr r3, [pc, #28] ; (8027b3c ) 8027b20: 189a adds r2, r3, r2 /** * @brief Тип действий при срабатывание сухих контактов */ void GetDINTypeActStr(char *str, uint8_t *len, uint8_t num) { 8027b22: 4605 mov r5, r0 8027b24: 460c mov r4, r1 sprintf(str, "%d", sSettings.sInOuts.din_type_act[num]); 8027b26: f892 2376 ldrb.w r2, [r2, #886] ; 0x376 8027b2a: 4905 ldr r1, [pc, #20] ; (8027b40 ) 8027b2c: f7ff fe72 bl 8027814 *len = strlen(str); 8027b30: 4628 mov r0, r5 8027b32: f7fa f9bd bl 8021eb0 8027b36: 7020 strb r0, [r4, #0] 8027b38: bd38 pop {r3, r4, r5, pc} 8027b3a: bf00 nop 8027b3c: 2000cfc0 .word 0x2000cfc0 8027b40: 08039869 .word 0x08039869 08027b44 : /** * @brief Состояние сухого контакта */ void GetDINStatusStr(char *str, uint8_t *len, uint8_t num) { sprintf(str, "%d", get_state_din_outs(DIN1+num)); 8027b44: 3206 adds r2, #6 /** * @brief Состояние сухого контакта */ void GetDINStatusStr(char *str, uint8_t *len, uint8_t num) { 8027b46: b538 push {r3, r4, r5, lr} 8027b48: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DIN1+num)); 8027b4a: b2d0 uxtb r0, r2 /** * @brief Состояние сухого контакта */ void GetDINStatusStr(char *str, uint8_t *len, uint8_t num) { 8027b4c: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DIN1+num)); 8027b4e: f001 f821 bl 8028b94 8027b52: 4905 ldr r1, [pc, #20] ; (8027b68 ) 8027b54: 4602 mov r2, r0 8027b56: 4620 mov r0, r4 8027b58: f7ff fe5c bl 8027814 *len = strlen(str); 8027b5c: 4620 mov r0, r4 8027b5e: f7fa f9a7 bl 8021eb0 8027b62: 7028 strb r0, [r5, #0] 8027b64: bd38 pop {r3, r4, r5, pc} 8027b66: bf00 nop 8027b68: 08039869 .word 0x08039869 08027b6c : /** * @brief Состояние сухого контакта */ void GetDIN0StatusStr(char *str, uint8_t *len) { 8027b6c: b538 push {r3, r4, r5, lr} 8027b6e: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DIN1)); 8027b70: 2006 movs r0, #6 /** * @brief Состояние сухого контакта */ void GetDIN0StatusStr(char *str, uint8_t *len) { 8027b72: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DIN1)); 8027b74: f001 f80e bl 8028b94 8027b78: 4904 ldr r1, [pc, #16] ; (8027b8c ) 8027b7a: 4602 mov r2, r0 8027b7c: 4620 mov r0, r4 8027b7e: f7ff fe49 bl 8027814 *len = strlen(str); 8027b82: 4620 mov r0, r4 8027b84: f7fa f994 bl 8021eb0 8027b88: 7028 strb r0, [r5, #0] 8027b8a: bd38 pop {r3, r4, r5, pc} 8027b8c: 08039869 .word 0x08039869 08027b90 : /** * @brief Источник срабатывания реле */ void GetROTypeActStr(char *str, uint8_t *len, uint8_t num) { 8027b90: b538 push {r3, r4, r5, lr} sprintf(str, "%d", sSettings.sInOuts.ro_type_source[num]); 8027b92: 4b07 ldr r3, [pc, #28] ; (8027bb0 ) 8027b94: 189a adds r2, r3, r2 /** * @brief Источник срабатывания реле */ void GetROTypeActStr(char *str, uint8_t *len, uint8_t num) { 8027b96: 4605 mov r5, r0 8027b98: 460c mov r4, r1 sprintf(str, "%d", sSettings.sInOuts.ro_type_source[num]); 8027b9a: f892 2374 ldrb.w r2, [r2, #884] ; 0x374 8027b9e: 4905 ldr r1, [pc, #20] ; (8027bb4 ) 8027ba0: f7ff fe38 bl 8027814 *len = strlen(str); 8027ba4: 4628 mov r0, r5 8027ba6: f7fa f983 bl 8021eb0 8027baa: 7020 strb r0, [r4, #0] 8027bac: bd38 pop {r3, r4, r5, pc} 8027bae: bf00 nop 8027bb0: 2000cfc0 .word 0x2000cfc0 8027bb4: 08039869 .word 0x08039869 08027bb8 : /** * @brief Состояние релейного выхода */ void GetDOUTStatusStr(char *str, uint8_t *len, uint8_t num) { sprintf(str, "%d", get_state_din_outs(DOUT1+num)); 8027bb8: 3207 adds r2, #7 /** * @brief Состояние релейного выхода */ void GetDOUTStatusStr(char *str, uint8_t *len, uint8_t num) { 8027bba: b538 push {r3, r4, r5, lr} 8027bbc: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DOUT1+num)); 8027bbe: b2d0 uxtb r0, r2 /** * @brief Состояние релейного выхода */ void GetDOUTStatusStr(char *str, uint8_t *len, uint8_t num) { 8027bc0: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DOUT1+num)); 8027bc2: f000 ffe7 bl 8028b94 8027bc6: 4905 ldr r1, [pc, #20] ; (8027bdc ) 8027bc8: 4602 mov r2, r0 8027bca: 4620 mov r0, r4 8027bcc: f7ff fe22 bl 8027814 *len = strlen(str); 8027bd0: 4620 mov r0, r4 8027bd2: f7fa f96d bl 8021eb0 8027bd6: 7028 strb r0, [r5, #0] 8027bd8: bd38 pop {r3, r4, r5, pc} 8027bda: bf00 nop 8027bdc: 08039869 .word 0x08039869 08027be0 : /** * @brief Состояние релейного выхода */ void GetDOUT0StatusStr(char *str, uint8_t *len) { 8027be0: b538 push {r3, r4, r5, lr} 8027be2: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DOUT1)); 8027be4: 2007 movs r0, #7 /** * @brief Состояние релейного выхода */ void GetDOUT0StatusStr(char *str, uint8_t *len) { 8027be6: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DOUT1)); 8027be8: f000 ffd4 bl 8028b94 8027bec: 4904 ldr r1, [pc, #16] ; (8027c00 ) 8027bee: 4602 mov r2, r0 8027bf0: 4620 mov r0, r4 8027bf2: f7ff fe0f bl 8027814 *len = strlen(str); 8027bf6: 4620 mov r0, r4 8027bf8: f7fa f95a bl 8021eb0 8027bfc: 7028 strb r0, [r5, #0] 8027bfe: bd38 pop {r3, r4, r5, pc} 8027c00: 08039869 .word 0x08039869 08027c04 : /** * @brief Состояние релейного выхода */ void GetDOUT1StatusStr(char *str, uint8_t *len) { 8027c04: b538 push {r3, r4, r5, lr} 8027c06: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DOUT2)); 8027c08: 2008 movs r0, #8 /** * @brief Состояние релейного выхода */ void GetDOUT1StatusStr(char *str, uint8_t *len) { 8027c0a: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DOUT2)); 8027c0c: f000 ffc2 bl 8028b94 8027c10: 4904 ldr r1, [pc, #16] ; (8027c24 ) 8027c12: 4602 mov r2, r0 8027c14: 4620 mov r0, r4 8027c16: f7ff fdfd bl 8027814 *len = strlen(str); 8027c1a: 4620 mov r0, r4 8027c1c: f7fa f948 bl 8021eb0 8027c20: 7028 strb r0, [r5, #0] 8027c22: bd38 pop {r3, r4, r5, pc} 8027c24: 08039869 .word 0x08039869 08027c28 : /** * @brief Время работы устройства */ void GetWorkTimeStr(char *str, uint8_t *len) { 8027c28: b57f push {r0, r1, r2, r3, r4, r5, r6, lr} 8027c2a: 4604 mov r4, r0 u32_t tick; uint16_t day; uint8_t hour; uint8_t min; snmp_get_sysuptime(&tick); 8027c2c: a803 add r0, sp, #12 /** * @brief Время работы устройства */ void GetWorkTimeStr(char *str, uint8_t *len) { 8027c2e: 460e mov r6, r1 u32_t tick; uint16_t day; uint8_t hour; uint8_t min; snmp_get_sysuptime(&tick); 8027c30: f00c fc92 bl 8034558 day = tick/8640000; 8027c34: 9803 ldr r0, [sp, #12] tick = tick%8640000; 8027c36: 4b0c ldr r3, [pc, #48] ; (8027c68 ) hour = tick/360000; tick = tick%360000; 8027c38: 4d0c ldr r5, [pc, #48] ; (8027c6c ) snmp_get_sysuptime(&tick); day = tick/8640000; tick = tick%8640000; 8027c3a: fbb0 f2f3 udiv r2, r0, r3 8027c3e: fb03 0012 mls r0, r3, r2, r0 hour = tick/360000; tick = tick%360000; 8027c42: fbb0 f3f5 udiv r3, r0, r5 8027c46: fb05 0013 mls r0, r5, r3, r0 min = tick/6000; 8027c4a: f241 7170 movw r1, #6000 ; 0x1770 day = tick/8640000; tick = tick%8640000; hour = tick/360000; tick = tick%360000; 8027c4e: 9003 str r0, [sp, #12] min = tick/6000; 8027c50: fbb0 f0f1 udiv r0, r0, r1 sprintf(str, "%d дн. %d ч. %d мин.", day, hour, min); 8027c54: 9000 str r0, [sp, #0] 8027c56: 4906 ldr r1, [pc, #24] ; (8027c70 ) 8027c58: 4620 mov r0, r4 8027c5a: f7ff fddb bl 8027814 *len = strlen(str); 8027c5e: 4620 mov r0, r4 8027c60: f7fa f926 bl 8021eb0 8027c64: 7030 strb r0, [r6, #0] } 8027c66: bd7f pop {r0, r1, r2, r3, r4, r5, r6, pc} 8027c68: 0083d600 .word 0x0083d600 8027c6c: 00057e40 .word 0x00057e40 8027c70: 0803987e .word 0x0803987e 08027c74 : /** * @brief Модель устройства */ void GetModelStr(char *str, uint8_t *len) { 8027c74: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sSnmp.sysName); 8027c76: 4c07 ldr r4, [pc, #28] ; (8027c94 ) /** * @brief Модель устройства */ void GetModelStr(char *str, uint8_t *len) { 8027c78: 4605 mov r5, r0 *len = strlen(sSettings.sSnmp.sysName); 8027c7a: 4620 mov r0, r4 /** * @brief Модель устройства */ void GetModelStr(char *str, uint8_t *len) { 8027c7c: 460e mov r6, r1 *len = strlen(sSettings.sSnmp.sysName); 8027c7e: f7fa f917 bl 8021eb0 8027c82: 4602 mov r2, r0 8027c84: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sSnmp.sysName, *len); 8027c86: 4621 mov r1, r4 8027c88: 4628 mov r0, r5 8027c8a: b2d2 uxtb r2, r2 } 8027c8c: 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); 8027c90: f7fa b9c6 b.w 8022020 8027c94: 2000d1eb .word 0x2000d1eb 08027c98 : /** * @brief Дата производства */ void GetProductionDataStr(char *str, uint8_t *len) { 8027c98: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.productionData); 8027c9a: 4c07 ldr r4, [pc, #28] ; (8027cb8 ) /** * @brief Дата производства */ void GetProductionDataStr(char *str, uint8_t *len) { 8027c9c: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.productionData); 8027c9e: 4620 mov r0, r4 /** * @brief Дата производства */ void GetProductionDataStr(char *str, uint8_t *len) { 8027ca0: 460e mov r6, r1 *len = strlen(sSettings.sInfo.productionData); 8027ca2: f7fa f905 bl 8021eb0 8027ca6: 4602 mov r2, r0 8027ca8: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.productionData, *len); 8027caa: 4621 mov r1, r4 8027cac: 4628 mov r0, r5 8027cae: b2d2 uxtb r2, r2 } 8027cb0: 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); 8027cb4: f7fa b9b4 b.w 8022020 8027cb8: 2000d024 .word 0x2000d024 08027cbc : /** * @brief Версия ПО */ void GetVersionStr(char *str, uint8_t *len) // + { 8027cbc: b570 push {r4, r5, r6, lr} *len = strlen(VERSION); 8027cbe: 4c07 ldr r4, [pc, #28] ; (8027cdc ) /** * @brief Версия ПО */ void GetVersionStr(char *str, uint8_t *len) // + { 8027cc0: 4605 mov r5, r0 *len = strlen(VERSION); 8027cc2: 4620 mov r0, r4 /** * @brief Версия ПО */ void GetVersionStr(char *str, uint8_t *len) // + { 8027cc4: 460e mov r6, r1 *len = strlen(VERSION); 8027cc6: f7fa f8f3 bl 8021eb0 8027cca: 4602 mov r2, r0 8027ccc: 7030 strb r0, [r6, #0] strncpy(str, VERSION, *len); 8027cce: 4621 mov r1, r4 8027cd0: 4628 mov r0, r5 8027cd2: b2d2 uxtb r2, r2 } 8027cd4: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief Версия ПО */ void GetVersionStr(char *str, uint8_t *len) // + { *len = strlen(VERSION); strncpy(str, VERSION, *len); 8027cd8: f7fa b9a2 b.w 8022020 8027cdc: 08039899 .word 0x08039899 08027ce0 : /** * @brief MAC адрес устройства */ void GetMacStr(char *str, uint8_t *len) { 8027ce0: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.mac); 8027ce2: 4c07 ldr r4, [pc, #28] ; (8027d00 ) /** * @brief MAC адрес устройства */ void GetMacStr(char *str, uint8_t *len) { 8027ce4: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.mac); 8027ce6: 4620 mov r0, r4 /** * @brief MAC адрес устройства */ void GetMacStr(char *str, uint8_t *len) { 8027ce8: 460e mov r6, r1 *len = strlen(sSettings.sInfo.mac); 8027cea: f7fa f8e1 bl 8021eb0 8027cee: 4602 mov r2, r0 8027cf0: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.mac, *len); 8027cf2: 4621 mov r1, r4 8027cf4: 4628 mov r0, r5 8027cf6: b2d2 uxtb r2, r2 } 8027cf8: 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); 8027cfc: f7fa b990 b.w 8022020 8027d00: 2000d04c .word 0x2000d04c 08027d04 : /** * @brief Серийный номер устройства */ void GetSerialNumberStr(char *str, uint8_t *len) { 8027d04: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.serialNumber); 8027d06: 4c07 ldr r4, [pc, #28] ; (8027d24 ) /** * @brief Серийный номер устройства */ void GetSerialNumberStr(char *str, uint8_t *len) { 8027d08: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.serialNumber); 8027d0a: 4620 mov r0, r4 /** * @brief Серийный номер устройства */ void GetSerialNumberStr(char *str, uint8_t *len) { 8027d0c: 460e mov r6, r1 *len = strlen(sSettings.sInfo.serialNumber); 8027d0e: f7fa f8cf bl 8021eb0 8027d12: 4602 mov r2, r0 8027d14: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.serialNumber, *len); 8027d16: 4621 mov r1, r4 8027d18: 4628 mov r0, r5 8027d1a: b2d2 uxtb r2, r2 } 8027d1c: 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); 8027d20: f7fa b97e b.w 8022020 8027d24: 2000d05e .word 0x2000d05e 08027d28 : /** * @brief Владелец устройства */ void GetOwnerStr(char *str, uint8_t *len) { 8027d28: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sSnmp.sysContact); 8027d2a: 4c07 ldr r4, [pc, #28] ; (8027d48 ) /** * @brief Владелец устройства */ void GetOwnerStr(char *str, uint8_t *len) { 8027d2c: 4605 mov r5, r0 *len = strlen(sSettings.sSnmp.sysContact); 8027d2e: 4620 mov r0, r4 /** * @brief Владелец устройства */ void GetOwnerStr(char *str, uint8_t *len) { 8027d30: 460e mov r6, r1 *len = strlen(sSettings.sSnmp.sysContact); 8027d32: f7fa f8bd bl 8021eb0 8027d36: 4602 mov r2, r0 8027d38: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sSnmp.sysContact, *len); 8027d3a: 4621 mov r1, r4 8027d3c: 4628 mov r0, r5 8027d3e: b2d2 uxtb r2, r2 } 8027d40: 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); 8027d44: f7fa b96c b.w 8022020 8027d48: 2000d1b9 .word 0x2000d1b9 08027d4c : /** * @brief Местоположение устройства */ void GetLocationStr(char *str, uint8_t *len) { 8027d4c: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sSnmp.sysLocation); 8027d4e: 4c07 ldr r4, [pc, #28] ; (8027d6c ) /** * @brief Местоположение устройства */ void GetLocationStr(char *str, uint8_t *len) { 8027d50: 4605 mov r5, r0 *len = strlen(sSettings.sSnmp.sysLocation); 8027d52: 4620 mov r0, r4 /** * @brief Местоположение устройства */ void GetLocationStr(char *str, uint8_t *len) { 8027d54: 460e mov r6, r1 *len = strlen(sSettings.sSnmp.sysLocation); 8027d56: f7fa f8ab bl 8021eb0 8027d5a: 4602 mov r2, r0 8027d5c: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sSnmp.sysLocation, *len); 8027d5e: 4621 mov r1, r4 8027d60: 4628 mov r0, r5 8027d62: b2d2 uxtb r2, r2 } 8027d64: 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); 8027d68: f7fa b95a b.w 8022020 8027d6c: 2000d1ff .word 0x2000d1ff 08027d70 : /** * @brief Комментарии */ void GetCommentsStr(char *str, uint8_t *len) { 8027d70: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.comments); 8027d72: 4c07 ldr r4, [pc, #28] ; (8027d90 ) /** * @brief Комментарии */ void GetCommentsStr(char *str, uint8_t *len) { 8027d74: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.comments); 8027d76: 4620 mov r0, r4 /** * @brief Комментарии */ void GetCommentsStr(char *str, uint8_t *len) { 8027d78: 460e mov r6, r1 *len = strlen(sSettings.sInfo.comments); 8027d7a: f7fa f899 bl 8021eb0 8027d7e: 4602 mov r2, r0 8027d80: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.comments, *len); 8027d82: 4621 mov r1, r4 8027d84: 4628 mov r0, r5 8027d86: b2d2 uxtb r2, r2 } 8027d88: 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); 8027d8c: f7fa b948 b.w 8022020 8027d90: 2000d06e .word 0x2000d06e 08027d94 : /** * @brief Модель UPS */ void GetUPSModelStr(char *str, uint8_t *len) { 8027d94: b570 push {r4, r5, r6, lr} *len = strlen(UPS.model); 8027d96: 4c07 ldr r4, [pc, #28] ; (8027db4 ) /** * @brief Модель UPS */ void GetUPSModelStr(char *str, uint8_t *len) { 8027d98: 4605 mov r5, r0 *len = strlen(UPS.model); 8027d9a: 4620 mov r0, r4 /** * @brief Модель UPS */ void GetUPSModelStr(char *str, uint8_t *len) { 8027d9c: 460e mov r6, r1 *len = strlen(UPS.model); 8027d9e: f7fa f887 bl 8021eb0 8027da2: 4602 mov r2, r0 8027da4: 7030 strb r0, [r6, #0] strncpy(str, UPS.model, *len); 8027da6: 4621 mov r1, r4 8027da8: 4628 mov r0, r5 8027daa: b2d2 uxtb r2, r2 } 8027dac: 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); 8027db0: f7fa b936 b.w 8022020 8027db4: 2000cbb9 .word 0x2000cbb9 08027db8 : /** * @brief Версия UPS ПО */ void GetUPSVersionStr(char *str, uint8_t *len) // + { 8027db8: b570 push {r4, r5, r6, lr} *len = strlen(UPS.vertion); 8027dba: 4c07 ldr r4, [pc, #28] ; (8027dd8 ) /** * @brief Версия UPS ПО */ void GetUPSVersionStr(char *str, uint8_t *len) // + { 8027dbc: 4605 mov r5, r0 *len = strlen(UPS.vertion); 8027dbe: 4620 mov r0, r4 /** * @brief Версия UPS ПО */ void GetUPSVersionStr(char *str, uint8_t *len) // + { 8027dc0: 460e mov r6, r1 *len = strlen(UPS.vertion); 8027dc2: f7fa f875 bl 8021eb0 8027dc6: 4602 mov r2, r0 8027dc8: 7030 strb r0, [r6, #0] strncpy(str, UPS.vertion, *len); 8027dca: 4621 mov r1, r4 8027dcc: 4628 mov r0, r5 8027dce: b2d2 uxtb r2, r2 } 8027dd0: 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); 8027dd4: f7fa b924 b.w 8022020 8027dd8: 2000cbc4 .word 0x2000cbc4 08027ddc : // ************************************************************************** // // Настройки аутентификации void GetUserLogin(uint8_t user_id, char *str, uint8_t *len) { 8027ddc: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sAuth[user_id].login); 8027dde: 4b08 ldr r3, [pc, #32] ; (8027e00 ) // ************************************************************************** // // Настройки аутентификации void GetUserLogin(uint8_t user_id, char *str, uint8_t *len) { 8027de0: 4615 mov r5, r2 sprintf(str, "%s", sSettings.sAuth[user_id].login); 8027de2: 2217 movs r2, #23 8027de4: fb02 3200 mla r2, r2, r0, r3 // ************************************************************************** // // Настройки аутентификации void GetUserLogin(uint8_t user_id, char *str, uint8_t *len) { 8027de8: 460c mov r4, r1 sprintf(str, "%s", sSettings.sAuth[user_id].login); 8027dea: 4608 mov r0, r1 8027dec: 3202 adds r2, #2 8027dee: 4905 ldr r1, [pc, #20] ; (8027e04 ) 8027df0: f7ff fd10 bl 8027814 *len = strlen(str); 8027df4: 4620 mov r0, r4 8027df6: f7fa f85b bl 8021eb0 8027dfa: 7028 strb r0, [r5, #0] 8027dfc: bd38 pop {r3, r4, r5, pc} 8027dfe: bf00 nop 8027e00: 2000d2d0 .word 0x2000d2d0 8027e04: 0803987b .word 0x0803987b 08027e08 : } void GetUserPassword(uint8_t user_id, char *str, uint8_t *len) { 8027e08: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sAuth[user_id].password); 8027e0a: 4b08 ldr r3, [pc, #32] ; (8027e2c ) sprintf(str, "%s", sSettings.sAuth[user_id].login); *len = strlen(str); } void GetUserPassword(uint8_t user_id, char *str, uint8_t *len) { 8027e0c: 4615 mov r5, r2 sprintf(str, "%s", sSettings.sAuth[user_id].password); 8027e0e: 2217 movs r2, #23 8027e10: 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) { 8027e14: 460c mov r4, r1 sprintf(str, "%s", sSettings.sAuth[user_id].password); 8027e16: 4608 mov r0, r1 8027e18: 3205 adds r2, #5 8027e1a: 4905 ldr r1, [pc, #20] ; (8027e30 ) 8027e1c: f7ff fcfa bl 8027814 *len = strlen(str); 8027e20: 4620 mov r0, r4 8027e22: f7fa f845 bl 8021eb0 8027e26: 7028 strb r0, [r5, #0] 8027e28: bd38 pop {r3, r4, r5, pc} 8027e2a: bf00 nop 8027e2c: 2000d2d8 .word 0x2000d2d8 8027e30: 0803987b .word 0x0803987b 08027e34 : *len = strlen(str); } void GetUserLevelInt(uint8_t user_id, uint8_t *value) { *value = sSettings.sAuth[user_id].level; 8027e34: 4b03 ldr r3, [pc, #12] ; (8027e44 ) 8027e36: 2217 movs r2, #23 8027e38: fb02 3000 mla r0, r2, r0, r3 8027e3c: f890 3311 ldrb.w r3, [r0, #785] ; 0x311 8027e40: 700b strb r3, [r1, #0] 8027e42: 4770 bx lr 8027e44: 2000cfc0 .word 0x2000cfc0 08027e48 : * @brief Текущий IP адрес */ void GetIpStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027e48: 4a08 ldr r2, [pc, #32] ; (8027e6c ) /** * @brief Текущий IP адрес */ void GetIpStr(char *str, uint8_t *len) { 8027e4a: b538 push {r3, r4, r5, lr} /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027e4c: f892 3120 ldrb.w r3, [r2, #288] ; 0x120 /** * @brief Текущий IP адрес */ void GetIpStr(char *str, uint8_t *len) { 8027e50: 460c mov r4, r1 8027e52: 4605 mov r5, r0 /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) sprintf(str, "%s", sSettings.sWebTempParams.ip); 8027e54: 4906 ldr r1, [pc, #24] ; (8027e70 ) * @brief Текущий IP адрес */ void GetIpStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027e56: b10b cbz r3, 8027e5c sprintf(str, "%s", sSettings.sWebTempParams.ip); 8027e58: 3233 adds r2, #51 ; 0x33 8027e5a: e000 b.n 8027e5e else sprintf(str, "%s", sSettings.sWebParams.ip); 8027e5c: 3202 adds r2, #2 8027e5e: f7ff fcd9 bl 8027814 *len = strlen(str); 8027e62: 4628 mov r0, r5 8027e64: f7fa f824 bl 8021eb0 8027e68: 7020 strb r0, [r4, #0] 8027e6a: bd38 pop {r3, r4, r5, pc} 8027e6c: 2000cfc0 .word 0x2000cfc0 8027e70: 0803987b .word 0x0803987b 08027e74 : * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027e74: 4a08 ldr r2, [pc, #32] ; (8027e98 ) /** * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { 8027e76: b538 push {r3, r4, r5, lr} /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027e78: f892 3120 ldrb.w r3, [r2, #288] ; 0x120 /** * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { 8027e7c: 460c mov r4, r1 8027e7e: 4605 mov r5, r0 /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) sprintf(str, "%s", sSettings.sWebTempParams.gate); 8027e80: 4906 ldr r1, [pc, #24] ; (8027e9c ) * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027e82: b10b cbz r3, 8027e88 sprintf(str, "%s", sSettings.sWebTempParams.gate); 8027e84: 3243 adds r2, #67 ; 0x43 8027e86: e000 b.n 8027e8a else sprintf(str, "%s", sSettings.sWebParams.gate); 8027e88: 3212 adds r2, #18 8027e8a: f7ff fcc3 bl 8027814 *len = strlen(str); 8027e8e: 4628 mov r0, r5 8027e90: f7fa f80e bl 8021eb0 8027e94: 7020 strb r0, [r4, #0] 8027e96: bd38 pop {r3, r4, r5, pc} 8027e98: 2000cfc0 .word 0x2000cfc0 8027e9c: 0803987b .word 0x0803987b 08027ea0 : * @brief Текущая маска подсети */ void GetMaskStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027ea0: 4a08 ldr r2, [pc, #32] ; (8027ec4 ) /** * @brief Текущая маска подсети */ void GetMaskStr(char *str, uint8_t *len) { 8027ea2: b538 push {r3, r4, r5, lr} /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027ea4: f892 3120 ldrb.w r3, [r2, #288] ; 0x120 /** * @brief Текущая маска подсети */ void GetMaskStr(char *str, uint8_t *len) { 8027ea8: 460c mov r4, r1 8027eaa: 4605 mov r5, r0 /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) sprintf(str, "%s", sSettings.sWebTempParams.mask); 8027eac: 4906 ldr r1, [pc, #24] ; (8027ec8 ) * @brief Текущая маска подсети */ void GetMaskStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027eae: b10b cbz r3, 8027eb4 sprintf(str, "%s", sSettings.sWebTempParams.mask); 8027eb0: 3253 adds r2, #83 ; 0x53 8027eb2: e000 b.n 8027eb6 else sprintf(str, "%s", sSettings.sWebParams.mask); 8027eb4: 3222 adds r2, #34 ; 0x22 8027eb6: f7ff fcad bl 8027814 *len = strlen(str); 8027eba: 4628 mov r0, r5 8027ebc: f7f9 fff8 bl 8021eb0 8027ec0: 7020 strb r0, [r4, #0] 8027ec2: bd38 pop {r3, r4, r5, pc} 8027ec4: 2000cfc0 .word 0x2000cfc0 8027ec8: 0803987b .word 0x0803987b 08027ecc : * @brief Настройка DHCP */ void GetDhcpStateStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027ecc: 4b08 ldr r3, [pc, #32] ; (8027ef0 ) 8027ece: f893 2120 ldrb.w r2, [r3, #288] ; 0x120 8027ed2: b112 cbz r2, 8027eda { if (sSettings.sWebTempParams.dhcpEnable) 8027ed4: f893 3063 ldrb.w r3, [r3, #99] ; 0x63 8027ed8: e001 b.n 8027ede else *str = '0'; } else { if (sSettings.sWebParams.dhcpEnable) 8027eda: f893 3032 ldrb.w r3, [r3, #50] ; 0x32 8027ede: b10b cbz r3, 8027ee4 *str = '1'; 8027ee0: 2331 movs r3, #49 ; 0x31 8027ee2: e000 b.n 8027ee6 else *str = '0'; 8027ee4: 2330 movs r3, #48 ; 0x30 8027ee6: 7003 strb r3, [r0, #0] } *len = 1; 8027ee8: 2301 movs r3, #1 8027eea: 700b strb r3, [r1, #0] 8027eec: 4770 bx lr 8027eee: bf00 nop 8027ef0: 2000cfc0 .word 0x2000cfc0 08027ef4 : /** * @brief Настройка DHCP */ void GetDhcpStateUDP(char *str, uint8_t *len) { 8027ef4: b538 push {r3, r4, r5, lr} /* Если сейчас временные настройки или был загружен файл конфигурации */ if (sSettings.sFlags.netsettingsChanged) 8027ef6: 4b0c ldr r3, [pc, #48] ; (8027f28 ) 8027ef8: f893 2120 ldrb.w r2, [r3, #288] ; 0x120 /** * @brief Настройка DHCP */ void GetDhcpStateUDP(char *str, uint8_t *len) { 8027efc: 4604 mov r4, r0 8027efe: 460d mov r5, r1 /* Если сейчас временные настройки или был загружен файл конфигурации */ if (sSettings.sFlags.netsettingsChanged) 8027f00: b152 cbz r2, 8027f18 { if (sSettings.sWebTempParams.dhcpEnable) 8027f02: f893 3063 ldrb.w r3, [r3, #99] ; 0x63 sprintf(str, "%s", "True"); 8027f06: 4620 mov r0, r4 8027f08: 4908 ldr r1, [pc, #32] ; (8027f2c ) void GetDhcpStateUDP(char *str, uint8_t *len) { /* Если сейчас временные настройки или был загружен файл конфигурации */ if (sSettings.sFlags.netsettingsChanged) { if (sSettings.sWebTempParams.dhcpEnable) 8027f0a: b10b cbz r3, 8027f10 sprintf(str, "%s", "True"); 8027f0c: 4a08 ldr r2, [pc, #32] ; (8027f30 ) 8027f0e: e000 b.n 8027f12 else sprintf(str, "%s", "False"); 8027f10: 4a08 ldr r2, [pc, #32] ; (8027f34 ) 8027f12: f7ff fc7f bl 8027814 8027f16: e002 b.n 8027f1e } else { if (sSettings.sWebParams.dhcpEnable) 8027f18: f893 3032 ldrb.w r3, [r3, #50] ; 0x32 8027f1c: e7f3 b.n 8027f06 sprintf(str, "%s", "True"); else sprintf(str, "%s", "False"); } *len = strlen(str); 8027f1e: 4620 mov r0, r4 8027f20: f7f9 ffc6 bl 8021eb0 8027f24: 7028 strb r0, [r5, #0] 8027f26: bd38 pop {r3, r4, r5, pc} 8027f28: 2000cfc0 .word 0x2000cfc0 8027f2c: 0803987b .word 0x0803987b 8027f30: 08040c95 .word 0x08040c95 8027f34: 0803989d .word 0x0803989d 08027f38 : /** * @brief Текущее community для чтения */ void GetReadCommunity(char *str, uint8_t *len) { 8027f38: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.readCommunity); 8027f3a: 4a05 ldr r2, [pc, #20] ; (8027f50 ) /** * @brief Текущее community для чтения */ void GetReadCommunity(char *str, uint8_t *len) { 8027f3c: 4605 mov r5, r0 8027f3e: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.readCommunity); 8027f40: 4904 ldr r1, [pc, #16] ; (8027f54 ) 8027f42: f7ff fc67 bl 8027814 *len = strlen(str); 8027f46: 4628 mov r0, r5 8027f48: f7f9 ffb2 bl 8021eb0 8027f4c: 7020 strb r0, [r4, #0] 8027f4e: bd38 pop {r3, r4, r5, pc} 8027f50: 2000d191 .word 0x2000d191 8027f54: 0803987b .word 0x0803987b 08027f58 : /** * @brief Текущее community для записи */ void GetWriteCommunity(char *str, uint8_t *len) { 8027f58: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.writeCommunity); 8027f5a: 4a05 ldr r2, [pc, #20] ; (8027f70 ) /** * @brief Текущее community для записи */ void GetWriteCommunity(char *str, uint8_t *len) { 8027f5c: 4605 mov r5, r0 8027f5e: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.writeCommunity); 8027f60: 4904 ldr r1, [pc, #16] ; (8027f74 ) 8027f62: f7ff fc57 bl 8027814 *len = strlen(str); 8027f66: 4628 mov r0, r5 8027f68: f7f9 ffa2 bl 8021eb0 8027f6c: 7020 strb r0, [r4, #0] 8027f6e: bd38 pop {r3, r4, r5, pc} 8027f70: 2000d1a5 .word 0x2000d1a5 8027f74: 0803987b .word 0x0803987b 08027f78 : /** * @brief IP SNMP менеджера */ void GetManagerIp(char *str, uint8_t *len) { 8027f78: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP); 8027f7a: 4a05 ldr r2, [pc, #20] ; (8027f90 ) /** * @brief IP SNMP менеджера */ void GetManagerIp(char *str, uint8_t *len) { 8027f7c: 4605 mov r5, r0 8027f7e: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP); 8027f80: 4904 ldr r1, [pc, #16] ; (8027f94 ) 8027f82: f7ff fc47 bl 8027814 *len = strlen(str); 8027f86: 4628 mov r0, r5 8027f88: f7f9 ff92 bl 8021eb0 8027f8c: 7020 strb r0, [r4, #0] 8027f8e: bd38 pop {r3, r4, r5, pc} 8027f90: 2000d26d .word 0x2000d26d 8027f94: 0803987b .word 0x0803987b 08027f98 : } void GetManagerIp2(char *str, uint8_t *len) { 8027f98: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP2); 8027f9a: 4a05 ldr r2, [pc, #20] ; (8027fb0 ) sprintf(str, "%s", sSettings.sSnmp.managerIP); *len = strlen(str); } void GetManagerIp2(char *str, uint8_t *len) { 8027f9c: 4605 mov r5, r0 8027f9e: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP2); 8027fa0: 4904 ldr r1, [pc, #16] ; (8027fb4 ) 8027fa2: f7ff fc37 bl 8027814 *len = strlen(str); 8027fa6: 4628 mov r0, r5 8027fa8: f7f9 ff82 bl 8021eb0 8027fac: 7020 strb r0, [r4, #0] 8027fae: bd38 pop {r3, r4, r5, pc} 8027fb0: 2000d281 .word 0x2000d281 8027fb4: 0803987b .word 0x0803987b 08027fb8 : } void GetManagerIp3(char *str, uint8_t *len) { 8027fb8: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP3); 8027fba: 4a05 ldr r2, [pc, #20] ; (8027fd0 ) sprintf(str, "%s", sSettings.sSnmp.managerIP2); *len = strlen(str); } void GetManagerIp3(char *str, uint8_t *len) { 8027fbc: 4605 mov r5, r0 8027fbe: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP3); 8027fc0: 4904 ldr r1, [pc, #16] ; (8027fd4 ) 8027fc2: f7ff fc27 bl 8027814 *len = strlen(str); 8027fc6: 4628 mov r0, r5 8027fc8: f7f9 ff72 bl 8021eb0 8027fcc: 7020 strb r0, [r4, #0] 8027fce: bd38 pop {r3, r4, r5, pc} 8027fd0: 2000d295 .word 0x2000d295 8027fd4: 0803987b .word 0x0803987b 08027fd8 : } void GetManagerIp4(char *str, uint8_t *len) { 8027fd8: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP4); 8027fda: 4a05 ldr r2, [pc, #20] ; (8027ff0 ) sprintf(str, "%s", sSettings.sSnmp.managerIP3); *len = strlen(str); } void GetManagerIp4(char *str, uint8_t *len) { 8027fdc: 4605 mov r5, r0 8027fde: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP4); 8027fe0: 4904 ldr r1, [pc, #16] ; (8027ff4 ) 8027fe2: f7ff fc17 bl 8027814 *len = strlen(str); 8027fe6: 4628 mov r0, r5 8027fe8: f7f9 ff62 bl 8021eb0 8027fec: 7020 strb r0, [r4, #0] 8027fee: bd38 pop {r3, r4, r5, pc} 8027ff0: 2000d2a9 .word 0x2000d2a9 8027ff4: 0803987b .word 0x0803987b 08027ff8 : } void GetManagerIp5(char *str, uint8_t *len) { 8027ff8: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP5); 8027ffa: 4a05 ldr r2, [pc, #20] ; (8028010 ) sprintf(str, "%s", sSettings.sSnmp.managerIP4); *len = strlen(str); } void GetManagerIp5(char *str, uint8_t *len) { 8027ffc: 4605 mov r5, r0 8027ffe: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP5); 8028000: 4904 ldr r1, [pc, #16] ; (8028014 ) 8028002: f7ff fc07 bl 8027814 *len = strlen(str); 8028006: 4628 mov r0, r5 8028008: f7f9 ff52 bl 8021eb0 802800c: 7020 strb r0, [r4, #0] 802800e: bd38 pop {r3, r4, r5, pc} 8028010: 2000d2bd .word 0x2000d2bd 8028014: 0803987b .word 0x0803987b 08028018 : /** * @brief Текущий IP адрес */ void GetRDSIpStr(char *str, uint8_t *len) { 8028018: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sRADIUS.ServerIP); 802801a: 4a05 ldr r2, [pc, #20] ; (8028030 ) /** * @brief Текущий IP адрес */ void GetRDSIpStr(char *str, uint8_t *len) { 802801c: 4605 mov r5, r0 802801e: 460c mov r4, r1 sprintf(str, "%s", sSettings.sRADIUS.ServerIP); 8028020: 4904 ldr r1, [pc, #16] ; (8028034 ) 8028022: f7ff fbf7 bl 8027814 *len = strlen(str); 8028026: 4628 mov r0, r5 8028028: f7f9 ff42 bl 8021eb0 802802c: 7020 strb r0, [r4, #0] 802802e: bd38 pop {r3, r4, r5, pc} 8028030: 2000d339 .word 0x2000d339 8028034: 0803987b .word 0x0803987b 08028038 : /** * @brief Текущий Порт */ void GetRDSPortStr(char *str, uint8_t *len) { 8028038: b538 push {r3, r4, r5, lr} sprintf(str, "%d", sSettings.sRADIUS.port); 802803a: 4b06 ldr r3, [pc, #24] ; (8028054 ) /** * @brief Текущий Порт */ void GetRDSPortStr(char *str, uint8_t *len) { 802803c: 4605 mov r5, r0 802803e: 460c mov r4, r1 sprintf(str, "%d", sSettings.sRADIUS.port); 8028040: f8d3 239c ldr.w r2, [r3, #924] ; 0x39c 8028044: 4904 ldr r1, [pc, #16] ; (8028058 ) 8028046: f7ff fbe5 bl 8027814 *len = strlen(str); 802804a: 4628 mov r0, r5 802804c: f7f9 ff30 bl 8021eb0 8028050: 7020 strb r0, [r4, #0] 8028052: bd38 pop {r3, r4, r5, pc} 8028054: 2000cfc0 .word 0x2000cfc0 8028058: 08039869 .word 0x08039869 0802805c : /** * @brief Текущий Код access */ void GetRDSKeyAccesstStr(char *str, uint8_t *len) { 802805c: b538 push {r3, r4, r5, lr} sprintf(str, "%d", sSettings.sRADIUS.key_access); 802805e: 4b06 ldr r3, [pc, #24] ; (8028078 ) /** * @brief Текущий Код access */ void GetRDSKeyAccesstStr(char *str, uint8_t *len) { 8028060: 4605 mov r5, r0 8028062: 460c mov r4, r1 sprintf(str, "%d", sSettings.sRADIUS.key_access); 8028064: f8d3 23a0 ldr.w r2, [r3, #928] ; 0x3a0 8028068: 4904 ldr r1, [pc, #16] ; (802807c ) 802806a: f7ff fbd3 bl 8027814 *len = strlen(str); 802806e: 4628 mov r0, r5 8028070: f7f9 ff1e bl 8021eb0 8028074: 7020 strb r0, [r4, #0] 8028076: bd38 pop {r3, r4, r5, pc} 8028078: 2000cfc0 .word 0x2000cfc0 802807c: 08039869 .word 0x08039869 08028080 : /** * @brief Текущая пароль RADIUS */ void GetRDSPasswordkStr(char *str, uint8_t *len) { 8028080: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sRADIUS.rds_password); 8028082: 4a05 ldr r2, [pc, #20] ; (8028098 ) /** * @brief Текущая пароль RADIUS */ void GetRDSPasswordkStr(char *str, uint8_t *len) { 8028084: 4605 mov r5, r0 8028086: 460c mov r4, r1 sprintf(str, "%s", sSettings.sRADIUS.rds_password); 8028088: 4904 ldr r1, [pc, #16] ; (802809c ) 802808a: f7ff fbc3 bl 8027814 *len = strlen(str); 802808e: 4628 mov r0, r5 8028090: f7f9 ff0e bl 8021eb0 8028094: 7020 strb r0, [r4, #0] 8028096: bd38 pop {r3, r4, r5, pc} 8028098: 2000d349 .word 0x2000d349 802809c: 0803987b .word 0x0803987b 080280a0 : /** * @brief Настройка вкл/ выкл RADIUS сервера */ void GetRDSEnableStateStr(char *str, uint8_t *len) { if (sSettings.sRADIUS.RDSEnable) 80280a0: 4b05 ldr r3, [pc, #20] ; (80280b8 ) 80280a2: f893 339a ldrb.w r3, [r3, #922] ; 0x39a 80280a6: b10b cbz r3, 80280ac *str = '1'; 80280a8: 2331 movs r3, #49 ; 0x31 80280aa: e000 b.n 80280ae else *str = '0'; 80280ac: 2330 movs r3, #48 ; 0x30 80280ae: 7003 strb r3, [r0, #0] *len = 1; 80280b0: 2301 movs r3, #1 80280b2: 700b strb r3, [r1, #0] 80280b4: 4770 bx lr 80280b6: bf00 nop 80280b8: 2000cfc0 .word 0x2000cfc0 080280bc : /** * @brief Настройка вкл/ выкл авторизации */ void GetAuthEnableStateStr(char *str, uint8_t *len) { if (sSettings.sRADIUS.Auth_enable) 80280bc: 4b05 ldr r3, [pc, #20] ; (80280d4 ) 80280be: f893 3378 ldrb.w r3, [r3, #888] ; 0x378 80280c2: b10b cbz r3, 80280c8 *str = '1'; 80280c4: 2331 movs r3, #49 ; 0x31 80280c6: e000 b.n 80280ca else *str = '0'; 80280c8: 2330 movs r3, #48 ; 0x30 80280ca: 7003 strb r3, [r0, #0] *len = 1; 80280cc: 2301 movs r3, #1 80280ce: 700b strb r3, [r1, #0] 80280d0: 4770 bx lr 80280d2: bf00 nop 80280d4: 2000cfc0 .word 0x2000cfc0 080280d8 : /** * @brief Вернуть признак изменения сетевых параметров */ void GetWebReinitFlag(char *str, uint8_t *len) { 80280d8: b538 push {r3, r4, r5, lr} if (sSettings.sFlags.netsettingsChanged) 80280da: 4b08 ldr r3, [pc, #32] ; (80280fc ) 80280dc: f893 3120 ldrb.w r3, [r3, #288] ; 0x120 /** * @brief Вернуть признак изменения сетевых параметров */ void GetWebReinitFlag(char *str, uint8_t *len) { 80280e0: 460c mov r4, r1 80280e2: 4605 mov r5, r0 if (sSettings.sFlags.netsettingsChanged) { sprintf(str, "%s", "true"); 80280e4: 4906 ldr r1, [pc, #24] ; (8028100 ) /** * @brief Вернуть признак изменения сетевых параметров */ void GetWebReinitFlag(char *str, uint8_t *len) { if (sSettings.sFlags.netsettingsChanged) 80280e6: b10b cbz r3, 80280ec { sprintf(str, "%s", "true"); 80280e8: 4a06 ldr r2, [pc, #24] ; (8028104 ) 80280ea: e000 b.n 80280ee *len = strlen(str); } else { sprintf(str, "%s", "false"); 80280ec: 4a06 ldr r2, [pc, #24] ; (8028108 ) 80280ee: f7ff fb91 bl 8027814 *len = strlen(str); 80280f2: 4628 mov r0, r5 80280f4: f7f9 fedc bl 8021eb0 80280f8: 7020 strb r0, [r4, #0] 80280fa: bd38 pop {r3, r4, r5, pc} 80280fc: 2000cfc0 .word 0x2000cfc0 8028100: 0803987b .word 0x0803987b 8028104: 080398a3 .word 0x080398a3 8028108: 080398a8 .word 0x080398a8 0802810c : * @brief Установить признак обновления ПО. */ void SetLoadMode(void) { /* Set loadMode = 1 */ RTC_WriteBackupRegister(RTC_BKP_DR1, 1); 802810c: 2001 movs r0, #1 /** * @brief Установить признак обновления ПО. */ void SetLoadMode(void) { 802810e: b508 push {r3, lr} /* Set loadMode = 1 */ RTC_WriteBackupRegister(RTC_BKP_DR1, 1); 8028110: 4601 mov r1, r0 8028112: f7fd fced bl 8025af0 /* Set bootTry = 0 */ RTC_WriteBackupRegister(RTC_BKP_DR2, 0); 8028116: 2002 movs r0, #2 8028118: 2100 movs r1, #0 } 802811a: 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); 802811e: f7fd bce7 b.w 8025af0 8028122: 0000 movs r0, r0 08028124 : /** * @brief Установить признак изменения сетевых параметров */ void SetWebReinitFlag(bool value) { sSettings.sFlags.netsettingsChanged = value; 8028124: 4b01 ldr r3, [pc, #4] ; (802812c ) 8028126: f883 0120 strb.w r0, [r3, #288] ; 0x120 802812a: 4770 bx lr 802812c: 2000cfc0 .word 0x2000cfc0 08028130 : /** * @brief Установить флаг подтверждения сетевых настроек пользователем */ void SetConfirmWebParamsFlag(void) { fConfirmWebParams = true; 8028130: 4b01 ldr r3, [pc, #4] ; (8028138 ) 8028132: 2201 movs r2, #1 8028134: 701a strb r2, [r3, #0] 8028136: 4770 bx lr 8028138: 20000b10 .word 0x20000b10 0802813c : // Сетевые параметры /** * @brief IP адрес */ void SetIPStr(char *str) { 802813c: 4601 mov r1, r0 //strcpy(sSettings.sWebParams.ip, str); strcpy(sSettings.sWebTempParams.ip, str); 802813e: 4801 ldr r0, [pc, #4] ; (8028144 ) 8028140: f7f9 be58 b.w 8021df4 8028144: 2000cff3 .word 0x2000cff3 08028148 : /** * @brief Шлюз */ void SetGatewayStr(char *str) { 8028148: 4601 mov r1, r0 //strcpy(sSettings.sWebParams.gate, str); strcpy(sSettings.sWebTempParams.gate, str); 802814a: 4801 ldr r0, [pc, #4] ; (8028150 ) 802814c: f7f9 be52 b.w 8021df4 8028150: 2000d003 .word 0x2000d003 08028154 : /** * @brief Текущая маска подсети */ void SetMaskStr(char *str) { 8028154: 4601 mov r1, r0 //strcpy(sSettings.sWebParams.mask, str); strcpy(sSettings.sWebTempParams.mask, str); 8028156: 4801 ldr r0, [pc, #4] ; (802815c ) 8028158: f7f9 be4c b.w 8021df4 802815c: 2000d013 .word 0x2000d013 08028160 : /** * @brief Настройка DHCP */ void SetDhcpStateStr(char *str) { 8028160: b508 push {r3, lr} if (strncmp(str, "on", 2) == 0) 8028162: 4906 ldr r1, [pc, #24] ; (802817c ) 8028164: 2202 movs r2, #2 8028166: f7f9 ff05 bl 8021f74 802816a: 4b05 ldr r3, [pc, #20] ; (8028180 ) 802816c: b908 cbnz r0, 8028172 //sSettings.sWebParams.dhcpEnable = 1; sSettings.sWebTempParams.dhcpEnable = 1; 802816e: 2201 movs r2, #1 8028170: e000 b.n 8028174 else //sSettings.sWebParams.dhcpEnable = 0; sSettings.sWebTempParams.dhcpEnable = 0; 8028172: 2200 movs r2, #0 8028174: f883 2063 strb.w r2, [r3, #99] ; 0x63 8028178: bd08 pop {r3, pc} 802817a: bf00 nop 802817c: 080398ae .word 0x080398ae 8028180: 2000cfc0 .word 0x2000cfc0 08028184 : /** * @brief Настройка DHCP */ void SetUDPDhcpStateStr(char *str) { 8028184: b510 push {r4, lr} if (strncmp(str, "True", 4) == 0) 8028186: 490a ldr r1, [pc, #40] ; (80281b0 ) 8028188: 2204 movs r2, #4 /** * @brief Настройка DHCP */ void SetUDPDhcpStateStr(char *str) { 802818a: 4604 mov r4, r0 if (strncmp(str, "True", 4) == 0) 802818c: f7f9 fef2 bl 8021f74 8028190: b920 cbnz r0, 802819c sSettings.sWebTempParams.dhcpEnable = 1; 8028192: 4b08 ldr r3, [pc, #32] ; (80281b4 ) 8028194: 2201 movs r2, #1 8028196: f883 2063 strb.w r2, [r3, #99] ; 0x63 802819a: bd10 pop {r4, pc} else if (strncmp(str, "False", 5) == 0) 802819c: 4620 mov r0, r4 802819e: 4906 ldr r1, [pc, #24] ; (80281b8 ) 80281a0: 2205 movs r2, #5 80281a2: f7f9 fee7 bl 8021f74 80281a6: b910 cbnz r0, 80281ae sSettings.sWebTempParams.dhcpEnable = 0; 80281a8: 4b02 ldr r3, [pc, #8] ; (80281b4 ) 80281aa: f883 0063 strb.w r0, [r3, #99] ; 0x63 80281ae: bd10 pop {r4, pc} 80281b0: 08040c95 .word 0x08040c95 80281b4: 2000cfc0 .word 0x2000cfc0 80281b8: 0803989d .word 0x0803989d 080281bc : /** * @brief Community для чтения */ void SetReadCommunity(char *str) { 80281bc: 4601 mov r1, r0 strcpy(sSettings.sSnmp.readCommunity, str); 80281be: 4801 ldr r0, [pc, #4] ; (80281c4 ) 80281c0: f7f9 be18 b.w 8021df4 80281c4: 2000d191 .word 0x2000d191 080281c8 : /** * @brief Community для записи */ void SetWriteCommunity(char *str) { 80281c8: 4601 mov r1, r0 strcpy(sSettings.sSnmp.writeCommunity, str); 80281ca: 4801 ldr r0, [pc, #4] ; (80281d0 ) 80281cc: f7f9 be12 b.w 8021df4 80281d0: 2000d1a5 .word 0x2000d1a5 080281d4 : /** * @brief IP SNMP менеджера */ void SetManagerIp(char *str) { 80281d4: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP, str); 80281d6: 4c05 ldr r4, [pc, #20] ; (80281ec ) /** * @brief IP SNMP менеджера */ void SetManagerIp(char *str) { 80281d8: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP, str); 80281da: 4620 mov r0, r4 80281dc: f7f9 fe0a bl 8021df4 SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 80281e0: 4620 mov r0, r4 } 80281e2: e8bd 4010 ldmia.w sp!, {r4, lr} * @brief IP SNMP менеджера */ void SetManagerIp(char *str) { strcpy(sSettings.sSnmp.managerIP, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 80281e6: f00f bfb3 b.w 8038150 80281ea: bf00 nop 80281ec: 2000d26d .word 0x2000d26d 080281f0 : } void SetManagerIp2(char *str) { 80281f0: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP2, str); 80281f2: 4c05 ldr r4, [pc, #20] ; (8028208 ) strcpy(sSettings.sSnmp.managerIP, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP); } void SetManagerIp2(char *str) { 80281f4: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP2, str); 80281f6: 4620 mov r0, r4 80281f8: f7f9 fdfc bl 8021df4 SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); 80281fc: 4620 mov r0, r4 } 80281fe: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp2(char *str) { strcpy(sSettings.sSnmp.managerIP2, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); 8028202: f00f bfa5 b.w 8038150 8028206: bf00 nop 8028208: 2000d281 .word 0x2000d281 0802820c : } void SetManagerIp3(char *str) { 802820c: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP3, str); 802820e: 4c05 ldr r4, [pc, #20] ; (8028224 ) strcpy(sSettings.sSnmp.managerIP2, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); } void SetManagerIp3(char *str) { 8028210: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP3, str); 8028212: 4620 mov r0, r4 8028214: f7f9 fdee bl 8021df4 SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); 8028218: 4620 mov r0, r4 } 802821a: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp3(char *str) { strcpy(sSettings.sSnmp.managerIP3, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); 802821e: f00f bf97 b.w 8038150 8028222: bf00 nop 8028224: 2000d295 .word 0x2000d295 08028228 : } void SetManagerIp4(char *str) { 8028228: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP4, str); 802822a: 4c05 ldr r4, [pc, #20] ; (8028240 ) strcpy(sSettings.sSnmp.managerIP3, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); } void SetManagerIp4(char *str) { 802822c: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP4, str); 802822e: 4620 mov r0, r4 8028230: f7f9 fde0 bl 8021df4 SNMP_SetManagerIP(sSettings.sSnmp.managerIP4); 8028234: 4620 mov r0, r4 } 8028236: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp4(char *str) { strcpy(sSettings.sSnmp.managerIP4, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP4); 802823a: f00f bf89 b.w 8038150 802823e: bf00 nop 8028240: 2000d2a9 .word 0x2000d2a9 08028244 : } void SetManagerIp5(char *str) { 8028244: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP5, str); 8028246: 4c05 ldr r4, [pc, #20] ; (802825c ) strcpy(sSettings.sSnmp.managerIP4, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP4); } void SetManagerIp5(char *str) { 8028248: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP5, str); 802824a: 4620 mov r0, r4 802824c: f7f9 fdd2 bl 8021df4 SNMP_SetManagerIP(sSettings.sSnmp.managerIP5); 8028250: 4620 mov r0, r4 } 8028252: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp5(char *str) { strcpy(sSettings.sSnmp.managerIP5, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP5); 8028256: f00f bf7b b.w 8038150 802825a: bf00 nop 802825c: 2000d2bd .word 0x2000d2bd 08028260 : /** * @brief Установить владельца */ void SetOwner(char *str) { 8028260: b510 push {r4, lr} strcpy(sSettings.sSnmp.sysContact, str); 8028262: 4c06 ldr r4, [pc, #24] ; (802827c ) /** * @brief Установить владельца */ void SetOwner(char *str) { 8028264: 4601 mov r1, r0 strcpy(sSettings.sSnmp.sysContact, str); 8028266: 4620 mov r0, r4 8028268: f7f9 fdc4 bl 8021df4 SNMP_SetSysContact(sSettings.sSnmp.sysContact); 802826c: 4620 mov r0, r4 802826e: f00f ff45 bl 80380fc SNMP_SetObjDescr(); } 8028272: e8bd 4010 ldmia.w sp!, {r4, lr} */ void SetOwner(char *str) { strcpy(sSettings.sSnmp.sysContact, str); SNMP_SetSysContact(sSettings.sSnmp.sysContact); SNMP_SetObjDescr(); 8028276: f00f bf01 b.w 803807c 802827a: bf00 nop 802827c: 2000d1b9 .word 0x2000d1b9 08028280 : /** * @brief Установить местоположение */ void SetLocation(char *str) { 8028280: b510 push {r4, lr} strcpy(sSettings.sSnmp.sysLocation, str); 8028282: 4c05 ldr r4, [pc, #20] ; (8028298 ) /** * @brief Установить местоположение */ void SetLocation(char *str) { 8028284: 4601 mov r1, r0 strcpy(sSettings.sSnmp.sysLocation, str); 8028286: 4620 mov r0, r4 8028288: f7f9 fdb4 bl 8021df4 SNMP_SetSysLocation(sSettings.sSnmp.sysLocation); 802828c: 4620 mov r0, r4 } 802828e: e8bd 4010 ldmia.w sp!, {r4, lr} * @brief Установить местоположение */ void SetLocation(char *str) { strcpy(sSettings.sSnmp.sysLocation, str); SNMP_SetSysLocation(sSettings.sSnmp.sysLocation); 8028292: f00f bf4f b.w 8038134 8028296: bf00 nop 8028298: 2000d1ff .word 0x2000d1ff 0802829c : /** * @brief Установить комментарий */ void SetComment(char *str) { 802829c: 4601 mov r1, r0 strcpy(sSettings.sInfo.comments, str); 802829e: 4801 ldr r0, [pc, #4] ; (80282a4 ) 80282a0: f7f9 bda8 b.w 8021df4 80282a4: 2000d06e .word 0x2000d06e 080282a8 : // Сетевые параметры RADIUS сервера /** * @brief IP адрес */ void SetRDSIpStr(char *str) { 80282a8: 4601 mov r1, r0 strcpy(sSettings.sRADIUS.ServerIP, str); 80282aa: 4801 ldr r0, [pc, #4] ; (80282b0 ) 80282ac: f7f9 bda2 b.w 8021df4 80282b0: 2000d339 .word 0x2000d339 080282b4 : /** * @brief Порт */ void SetRDSPortStr(char *str) { 80282b4: b508 push {r3, lr} sSettings.sRADIUS.port = atoi(str); 80282b6: f7f9 fb03 bl 80218c0 80282ba: 4b02 ldr r3, [pc, #8] ; (80282c4 ) 80282bc: f8c3 039c str.w r0, [r3, #924] ; 0x39c 80282c0: bd08 pop {r3, pc} 80282c2: bf00 nop 80282c4: 2000cfc0 .word 0x2000cfc0 080282c8 : /** * @brief Код access */ void SetRDSKeyAccesstStr(char *str) { 80282c8: b508 push {r3, lr} sSettings.sRADIUS.key_access = atoi(str); 80282ca: f7f9 faf9 bl 80218c0 80282ce: 4b02 ldr r3, [pc, #8] ; (80282d8 ) 80282d0: f8c3 03a0 str.w r0, [r3, #928] ; 0x3a0 80282d4: bd08 pop {r3, pc} 80282d6: bf00 nop 80282d8: 2000cfc0 .word 0x2000cfc0 080282dc : /** * @brief пароль RADIUS */ void SetRDSPasswordkStr(char *str) { 80282dc: 4601 mov r1, r0 strcpy(sSettings.sRADIUS.rds_password, str); 80282de: 4801 ldr r0, [pc, #4] ; (80282e4 ) 80282e0: f7f9 bd88 b.w 8021df4 80282e4: 2000d349 .word 0x2000d349 080282e8 : /** * @brief Настройка вкл/ выкл RADIUS сервера */ void SetRDSEnableStateStr(char *str) { 80282e8: b508 push {r3, lr} if (strncmp(str, "on", 2) == 0) 80282ea: 4906 ldr r1, [pc, #24] ; (8028304 ) 80282ec: 2202 movs r2, #2 80282ee: f7f9 fe41 bl 8021f74 80282f2: 4b05 ldr r3, [pc, #20] ; (8028308 ) 80282f4: b908 cbnz r0, 80282fa sSettings.sRADIUS.RDSEnable = 1; 80282f6: 2201 movs r2, #1 80282f8: e000 b.n 80282fc else sSettings.sRADIUS.RDSEnable = 0; 80282fa: 2200 movs r2, #0 80282fc: f883 239a strb.w r2, [r3, #922] ; 0x39a 8028300: bd08 pop {r3, pc} 8028302: bf00 nop 8028304: 080398ae .word 0x080398ae 8028308: 2000cfc0 .word 0x2000cfc0 0802830c : /** * @brief Настройка вкл/ выкл авторизации */ void SetAuthEnableStateStr(char *str) { 802830c: b508 push {r3, lr} if (strncmp(str, "on", 2) == 0) 802830e: 4906 ldr r1, [pc, #24] ; (8028328 ) 8028310: 2202 movs r2, #2 8028312: f7f9 fe2f bl 8021f74 8028316: 4b05 ldr r3, [pc, #20] ; (802832c ) 8028318: b908 cbnz r0, 802831e sSettings.sRADIUS.Auth_enable = 1; 802831a: 2201 movs r2, #1 802831c: e000 b.n 8028320 else sSettings.sRADIUS.Auth_enable = 0; 802831e: 2200 movs r2, #0 8028320: f883 2378 strb.w r2, [r3, #888] ; 0x378 8028324: bd08 pop {r3, pc} 8028326: bf00 nop 8028328: 080398ae .word 0x080398ae 802832c: 2000cfc0 .word 0x2000cfc0 08028330 : /** * @brief Дата */ void SetDateStr(char *str) { 8028330: b510 push {r4, lr} 8028332: b08c sub sp, #48 ; 0x30 8028334: 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); 8028336: 2100 movs r1, #0 8028338: 2212 movs r2, #18 802833a: a807 add r0, sp, #28 802833c: f7f9 fbe0 bl 8021b00 memset(str_time, 0, 9); 8028340: 2100 movs r1, #0 8028342: 2209 movs r2, #9 8028344: 4668 mov r0, sp 8028346: f7f9 fbdb bl 8021b00 str += 2; strncpy(str_data, (str + 6), 2); 802834a: f104 0108 add.w r1, r4, #8 802834e: 2202 movs r2, #2 8028350: a807 add r0, sp, #28 8028352: f7f9 fe65 bl 8022020 strncat(str_data, (str + 2), 4); 8028356: 1d21 adds r1, r4, #4 8028358: 2204 movs r2, #4 802835a: a807 add r0, sp, #28 802835c: f7f9 fdd8 bl 8021f10 strncat(str_data, str, 2); 8028360: 2202 movs r2, #2 8028362: 1ca1 adds r1, r4, #2 8028364: a807 add r0, sp, #28 8028366: f7f9 fdd3 bl 8021f10 TM_RTC_GetDateTime(&tmp_data, TM_RTC_Format_BIN); 802836a: a803 add r0, sp, #12 802836c: 2100 movs r1, #0 802836e: f7fe f88b bl 8026488 sprintf(str_time, "-01-%02i:%02i", tmp_data.hours, tmp_data.minutes); 8028372: f89d 2011 ldrb.w r2, [sp, #17] 8028376: f89d 3010 ldrb.w r3, [sp, #16] 802837a: 4908 ldr r1, [pc, #32] ; (802839c ) 802837c: 4668 mov r0, sp 802837e: f7ff fa49 bl 8027814 len = strlen(str_time); 8028382: 4668 mov r0, sp 8028384: f7f9 fd94 bl 8021eb0 strncat(str_data, str_time, len); 8028388: 4669 mov r1, sp 802838a: b2c2 uxtb r2, r0 802838c: a807 add r0, sp, #28 802838e: f7f9 fdbf bl 8021f10 TM_RTC_SetDateTimeString(&str_data); 8028392: a807 add r0, sp, #28 8028394: f7fd ff5e bl 8026254 } 8028398: b00c add sp, #48 ; 0x30 802839a: bd10 pop {r4, pc} 802839c: 080398b1 .word 0x080398b1 080283a0 : /** * @brief Время */ void SetTimeStr(char *str) { 80283a0: b510 push {r4, lr} 80283a2: b090 sub sp, #64 ; 0x40 80283a4: 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); 80283a6: 2100 movs r1, #0 80283a8: 2212 movs r2, #18 80283aa: a80b add r0, sp, #44 ; 0x2c 80283ac: f7f9 fba8 bl 8021b00 memset(str_date, 0, 14); 80283b0: 220e movs r2, #14 80283b2: 2100 movs r1, #0 80283b4: a803 add r0, sp, #12 80283b6: f7f9 fba3 bl 8021b00 TM_RTC_GetDateTime(&tmp_data, TM_RTC_Format_BIN); 80283ba: a807 add r0, sp, #28 80283bc: 2100 movs r1, #0 80283be: f7fe f863 bl 8026488 sprintf(str_date, "%02i-%02i-%02i-01-", tmp_data.date, tmp_data.month, tmp_data.year); 80283c2: f89d 1025 ldrb.w r1, [sp, #37] ; 0x25 80283c6: f89d 3024 ldrb.w r3, [sp, #36] ; 0x24 80283ca: f89d 2023 ldrb.w r2, [sp, #35] ; 0x23 80283ce: 9100 str r1, [sp, #0] 80283d0: a803 add r0, sp, #12 80283d2: 490a ldr r1, [pc, #40] ; (80283fc ) 80283d4: f7ff fa1e bl 8027814 len = strlen(str_date); 80283d8: a803 add r0, sp, #12 80283da: f7f9 fd69 bl 8021eb0 strncat(str_data, str_date, len); 80283de: a903 add r1, sp, #12 80283e0: b2c2 uxtb r2, r0 80283e2: a80b add r0, sp, #44 ; 0x2c 80283e4: f7f9 fd94 bl 8021f10 strncat(str_data, str, 5); 80283e8: a80b add r0, sp, #44 ; 0x2c 80283ea: 4621 mov r1, r4 80283ec: 2205 movs r2, #5 80283ee: f7f9 fd8f bl 8021f10 TM_RTC_SetDateTimeString(&str_data); 80283f2: a80b add r0, sp, #44 ; 0x2c 80283f4: f7fd ff2e bl 8026254 } 80283f8: b010 add sp, #64 ; 0x40 80283fa: bd10 pop {r4, pc} 80283fc: 080398bf .word 0x080398bf 08028400 : /** * @brief Состояние SNTP */ void SetSntpStateStr(char *str) { 8028400: b538 push {r3, r4, r5, lr} bool old_sntpEnable = sSettings.sSNTP.sntpEnable; 8028402: 4c0d ldr r4, [pc, #52] ; (8028438 ) if (strncmp(str, "1", 1) == 0){ 8028404: 490d ldr r1, [pc, #52] ; (802843c ) /** * @brief Состояние SNTP */ void SetSntpStateStr(char *str) { bool old_sntpEnable = sSettings.sSNTP.sntpEnable; 8028406: f894 5340 ldrb.w r5, [r4, #832] ; 0x340 if (strncmp(str, "1", 1) == 0){ 802840a: 2201 movs r2, #1 802840c: f7f9 fdb2 bl 8021f74 8028410: b948 cbnz r0, 8028426 sSettings.sSNTP.sntpEnable = true; 8028412: 2001 movs r0, #1 8028414: f884 0340 strb.w r0, [r4, #832] ; 0x340 if(old_sntpEnable != sSettings.sSNTP.sntpEnable){ 8028418: b965 cbnz r5, 8028434 SNTP_Enable(sSettings.sSNTP.sntpEnable); 802841a: f00f ff81 bl 8038320 } else{ sSettings.sSNTP.sntpEnable = false; SNTP_Enable(sSettings.sSNTP.sntpEnable); } } 802841e: 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(); 8028422: f00f bfbf b.w 80383a4 } } else{ sSettings.sSNTP.sntpEnable = false; 8028426: 2000 movs r0, #0 8028428: f884 0340 strb.w r0, [r4, #832] ; 0x340 SNTP_Enable(sSettings.sSNTP.sntpEnable); } } 802842c: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} SNTP_Poll(); } } else{ sSettings.sSNTP.sntpEnable = false; SNTP_Enable(sSettings.sSNTP.sntpEnable); 8028430: f00f bf76 b.w 8038320 8028434: bd38 pop {r3, r4, r5, pc} 8028436: bf00 nop 8028438: 2000cfc0 .word 0x2000cfc0 802843c: 08039b52 .word 0x08039b52 08028440 : /** * @brief IP адрес SNTP сервера */ void SetSntpServerIpStr(char *str) { 8028440: 4601 mov r1, r0 strcpy(sSettings.sSNTP.ip, str); 8028442: 4801 ldr r0, [pc, #4] ; (8028448 ) 8028444: f7f9 bcd6 b.w 8021df4 8028448: 2000d301 .word 0x2000d301 0802844c : /** * @brief Часовой пояс контроллера */ void SetSntpTimeZoneStr(char *str) { 802844c: b570 push {r4, r5, r6, lr} float newUtc; newUtc = atof(str); 802844e: f7f9 fa33 bl 80218b8 8028452: f7f8 fb97 bl 8020b84 <__aeabi_d2f> if (sSettings.sSNTP.timeZone > 0) 8028456: 4b27 ldr r3, [pc, #156] ; (80284f4 ) 8028458: f8d3 4370 ldr.w r4, [r3, #880] ; 0x370 */ void SetSntpTimeZoneStr(char *str) { float newUtc; newUtc = atof(str); 802845c: 4606 mov r6, r0 if (sSettings.sSNTP.timeZone > 0) 802845e: 2100 movs r1, #0 8028460: 4620 mov r0, r4 8028462: f7f8 fd59 bl 8020f18 <__aeabi_fcmpgt> 8028466: b100 cbz r0, 802846a 8028468: e033 b.n 80284d2 { TM_RTC_Correction(newUtc - sSettings.sSNTP.timeZone); } } else if (sSettings.sSNTP.timeZone < 0) 802846a: 4620 mov r0, r4 802846c: 2100 movs r1, #0 802846e: f7f8 fd35 bl 8020edc <__aeabi_fcmplt> 8028472: 2800 cmp r0, #0 8028474: d032 beq.n 80284dc { if (newUtc >= 0) 8028476: 4630 mov r0, r6 8028478: 2100 movs r1, #0 802847a: f7f8 fd43 bl 8020f04 <__aeabi_fcmpge> 802847e: b170 cbz r0, 802849e { TM_RTC_Correction(newUtc + fabs(sSettings.sSNTP.timeZone)); 8028480: 4620 mov r0, r4 8028482: f7f8 f849 bl 8020518 <__aeabi_f2d> 8028486: f7fc fefd bl 8025284 802848a: 4604 mov r4, r0 802848c: 460d mov r5, r1 802848e: 4630 mov r0, r6 8028490: f7f8 f842 bl 8020518 <__aeabi_f2d> 8028494: 4622 mov r2, r4 8028496: 462b mov r3, r5 8028498: f7f7 fee0 bl 802025c <__adddf3> 802849c: e016 b.n 80284cc } else { if (newUtc >= sSettings.sSNTP.timeZone) 802849e: 4630 mov r0, r6 80284a0: 4621 mov r1, r4 80284a2: f7f8 fd2f bl 8020f04 <__aeabi_fcmpge> 80284a6: b1a0 cbz r0, 80284d2 TM_RTC_Correction(fabs(sSettings.sSNTP.timeZone) - fabs(newUtc)); 80284a8: 4620 mov r0, r4 80284aa: f7f8 f835 bl 8020518 <__aeabi_f2d> 80284ae: f7fc fee9 bl 8025284 80284b2: 4604 mov r4, r0 80284b4: 4630 mov r0, r6 80284b6: 460d mov r5, r1 80284b8: f7f8 f82e bl 8020518 <__aeabi_f2d> 80284bc: f7fc fee2 bl 8025284 80284c0: 4602 mov r2, r0 80284c2: 460b mov r3, r1 80284c4: 4620 mov r0, r4 80284c6: 4629 mov r1, r5 80284c8: f7f7 fec6 bl 8020258 <__aeabi_dsub> 80284cc: f7f8 fb5a bl 8020b84 <__aeabi_d2f> 80284d0: e00a b.n 80284e8 else TM_RTC_Correction(newUtc - sSettings.sSNTP.timeZone); 80284d2: 4630 mov r0, r6 80284d4: 4621 mov r1, r4 80284d6: f7f8 fba9 bl 8020c2c <__aeabi_fsub> 80284da: e005 b.n 80284e8 } } else if (sSettings.sSNTP.timeZone == 0) 80284dc: 4620 mov r0, r4 80284de: 2100 movs r1, #0 80284e0: f7f8 fcf2 bl 8020ec8 <__aeabi_fcmpeq> 80284e4: b110 cbz r0, 80284ec { TM_RTC_Correction(newUtc); 80284e6: 4630 mov r0, r6 80284e8: f7fe f8ca bl 8026680 } sSettings.sSNTP.timeZone = newUtc; // atof(str); 80284ec: 4b01 ldr r3, [pc, #4] ; (80284f4 ) 80284ee: f8c3 6370 str.w r6, [r3, #880] ; 0x370 80284f2: bd70 pop {r4, r5, r6, pc} 80284f4: 2000cfc0 .word 0x2000cfc0 080284f8 : /** * @brief Тип действий при срабатывание сухих контактов */ void SetDINTypeActStr(char *str, uint8_t num) { 80284f8: b510 push {r4, lr} 80284fa: 460c mov r4, r1 sSettings.sInOuts.din_type_act[num] = atoi(str); 80284fc: f7f9 f9e0 bl 80218c0 8028500: 4902 ldr r1, [pc, #8] ; (802850c ) 8028502: 1909 adds r1, r1, r4 8028504: f881 0376 strb.w r0, [r1, #886] ; 0x376 8028508: bd10 pop {r4, pc} 802850a: bf00 nop 802850c: 2000cfc0 .word 0x2000cfc0 08028510 : /** * @brief */ void SetROStr(char *str, uint8_t num) { 8028510: b510 push {r4, lr} 8028512: 460c mov r4, r1 set_state_douts((DOUT1+num), atoi(str)); 8028514: f7f9 f9d4 bl 80218c0 8028518: 1de3 adds r3, r4, #7 802851a: b2c1 uxtb r1, r0 802851c: b2d8 uxtb r0, r3 } 802851e: e8bd 4010 ldmia.w sp!, {r4, lr} /** * @brief */ void SetROStr(char *str, uint8_t num) { set_state_douts((DOUT1+num), atoi(str)); 8028522: f000 bb39 b.w 8028b98 08028526 : /** * @brief */ void SetROInt(uint8_t val, uint8_t num) { 8028526: 4603 mov r3, r0 set_state_douts((DOUT1+num), val); 8028528: 3107 adds r1, #7 802852a: b2c8 uxtb r0, r1 802852c: 4619 mov r1, r3 802852e: f000 bb33 b.w 8028b98 8028532: 0000 movs r0, r0 08028534 : /** * @brief Источник срабатывания реле */ void SetROTypeActStr(char *str, uint8_t num) { 8028534: b510 push {r4, lr} 8028536: 460c mov r4, r1 sSettings.sInOuts.ro_type_source[num] = atoi(str); 8028538: f7f9 f9c2 bl 80218c0 802853c: 4b04 ldr r3, [pc, #16] ; (8028550 ) 802853e: 191b adds r3, r3, r4 SetROInt(0, num); 8028540: 4621 mov r1, r4 /** * @brief Источник срабатывания реле */ void SetROTypeActStr(char *str, uint8_t num) { sSettings.sInOuts.ro_type_source[num] = atoi(str); 8028542: f883 0374 strb.w r0, [r3, #884] ; 0x374 SetROInt(0, num); 8028546: 2000 movs r0, #0 } 8028548: 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); 802854c: f7ff bfeb b.w 8028526 8028550: 2000cfc0 .word 0x2000cfc0 08028554 : /** * @brief Установить параметры обновления ПО по умолчанию */ void SETTINGS_SetBootParamsDef(void) { sSettings.bootParams.loadMode = 0; 8028554: 4b02 ldr r3, [pc, #8] ; (8028560 ) 8028556: 2200 movs r2, #0 8028558: 701a strb r2, [r3, #0] sSettings.bootParams.bootTry = 0; 802855a: 705a strb r2, [r3, #1] 802855c: 4770 bx lr 802855e: bf00 nop 8028560: 2000cfc0 .word 0x2000cfc0 08028564 : /** * @brief Установить параметры сетевого подключения по умолчанию */ void SETTINGS_SetWebParamsDef(void) { 8028564: b510 push {r4, lr} strcpy(sSettings.sWebParams.ip, "192.168.1.2"); 8028566: 4c09 ldr r4, [pc, #36] ; (802858c ) 8028568: 4909 ldr r1, [pc, #36] ; (8028590 ) 802856a: 4620 mov r0, r4 802856c: f7f9 fc42 bl 8021df4 strcpy(sSettings.sWebParams.gate, "192.168.1.1"); 8028570: 4908 ldr r1, [pc, #32] ; (8028594 ) 8028572: f104 0010 add.w r0, r4, #16 8028576: f7f9 fc3d bl 8021df4 strcpy(sSettings.sWebParams.mask, "255.255.255.0"); 802857a: f104 0020 add.w r0, r4, #32 802857e: 4906 ldr r1, [pc, #24] ; (8028598 ) 8028580: f7f9 fc38 bl 8021df4 sSettings.sWebParams.dhcpEnable = 1; 8028584: 2201 movs r2, #1 8028586: f884 2030 strb.w r2, [r4, #48] ; 0x30 802858a: bd10 pop {r4, pc} 802858c: 2000cfc2 .word 0x2000cfc2 8028590: 080398d2 .word 0x080398d2 8028594: 080398de .word 0x080398de 8028598: 080398ea .word 0x080398ea 0802859c : /** * @brief Установить временные параметры сетевого подключения по умолчанию */ void SETTINGS_SetTempWebParamsDef(void) { 802859c: b510 push {r4, lr} strcpy(sSettings.sWebParams.ip, "192.168.1.2"); 802859e: 4c09 ldr r4, [pc, #36] ; (80285c4 ) 80285a0: 4909 ldr r1, [pc, #36] ; (80285c8 ) 80285a2: 4620 mov r0, r4 80285a4: f7f9 fc26 bl 8021df4 strcpy(sSettings.sWebParams.gate, "192.168.1.1"); 80285a8: 4908 ldr r1, [pc, #32] ; (80285cc ) 80285aa: f104 0010 add.w r0, r4, #16 80285ae: f7f9 fc21 bl 8021df4 strcpy(sSettings.sWebParams.mask, "255.255.255.0"); 80285b2: f104 0020 add.w r0, r4, #32 80285b6: 4906 ldr r1, [pc, #24] ; (80285d0 ) 80285b8: f7f9 fc1c bl 8021df4 sSettings.sWebParams.dhcpEnable = 1; 80285bc: 2201 movs r2, #1 80285be: f884 2030 strb.w r2, [r4, #48] ; 0x30 80285c2: bd10 pop {r4, pc} 80285c4: 2000cfc2 .word 0x2000cfc2 80285c8: 080398d2 .word 0x080398d2 80285cc: 080398de .word 0x080398de 80285d0: 080398ea .word 0x080398ea 080285d4 : /** * @brief Установить параметры SNMP по умолчанию */ void SETTINGS_SetSnmpDef(void) { 80285d4: b570 push {r4, r5, r6, lr} strcpy(sSettings.sSnmp.sysDescr, ""); 80285d6: 4c1e ldr r4, [pc, #120] ; (8028650 ) 80285d8: 4d1e ldr r5, [pc, #120] ; (8028654 ) strcpy(sSettings.sSnmp.readCommunity, "public"); 80285da: 4e1f ldr r6, [pc, #124] ; (8028658 ) /** * @brief Установить параметры SNMP по умолчанию */ void SETTINGS_SetSnmpDef(void) { strcpy(sSettings.sSnmp.sysDescr, ""); 80285dc: 4629 mov r1, r5 80285de: 4620 mov r0, r4 80285e0: f7f9 fc08 bl 8021df4 strcpy(sSettings.sSnmp.readCommunity, "public"); 80285e4: 4631 mov r1, r6 80285e6: f104 00a0 add.w r0, r4, #160 ; 0xa0 80285ea: f7f9 fc03 bl 8021df4 strcpy(sSettings.sSnmp.writeCommunity, "public"); 80285ee: 4631 mov r1, r6 80285f0: f104 00b4 add.w r0, r4, #180 ; 0xb4 80285f4: f7f9 fbfe bl 8021df4 strcpy(sSettings.sSnmp.sysContact, ""); 80285f8: 4629 mov r1, r5 80285fa: f104 00c8 add.w r0, r4, #200 ; 0xc8 80285fe: f7f9 fbf9 bl 8021df4 strcpy(sSettings.sSnmp.sysName, "BT-6702"); 8028602: f104 00fa add.w r0, r4, #250 ; 0xfa 8028606: 4915 ldr r1, [pc, #84] ; (802865c ) 8028608: f7f9 fbf4 bl 8021df4 strcpy(sSettings.sSnmp.sysLocation, ""); 802860c: 4629 mov r1, r5 strcpy(sSettings.sSnmp.managerIP, "0.0.0.0"); 802860e: 4d14 ldr r5, [pc, #80] ; (8028660 ) strcpy(sSettings.sSnmp.sysDescr, ""); strcpy(sSettings.sSnmp.readCommunity, "public"); strcpy(sSettings.sSnmp.writeCommunity, "public"); strcpy(sSettings.sSnmp.sysContact, ""); strcpy(sSettings.sSnmp.sysName, "BT-6702"); strcpy(sSettings.sSnmp.sysLocation, ""); 8028610: f504 7087 add.w r0, r4, #270 ; 0x10e 8028614: f7f9 fbee bl 8021df4 strcpy(sSettings.sSnmp.managerIP, "0.0.0.0"); 8028618: 4629 mov r1, r5 802861a: f504 70be add.w r0, r4, #380 ; 0x17c 802861e: f7f9 fbe9 bl 8021df4 strcpy(sSettings.sSnmp.managerIP2, "0.0.0.0"); 8028622: 4629 mov r1, r5 8028624: f504 70c8 add.w r0, r4, #400 ; 0x190 8028628: f7f9 fbe4 bl 8021df4 strcpy(sSettings.sSnmp.managerIP3, "0.0.0.0"); 802862c: 4629 mov r1, r5 802862e: f504 70d2 add.w r0, r4, #420 ; 0x1a4 8028632: f7f9 fbdf bl 8021df4 strcpy(sSettings.sSnmp.managerIP4, "0.0.0.0"); 8028636: 4629 mov r1, r5 8028638: f504 70dc add.w r0, r4, #440 ; 0x1b8 802863c: f7f9 fbda bl 8021df4 strcpy(sSettings.sSnmp.managerIP5, "0.0.0.0"); 8028640: f504 70e6 add.w r0, r4, #460 ; 0x1cc 8028644: 4629 mov r1, r5 } 8028646: 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"); 802864a: f7f9 bbd3 b.w 8021df4 802864e: bf00 nop 8028650: 2000d0f1 .word 0x2000d0f1 8028654: 08040f86 .word 0x08040f86 8028658: 080398f8 .word 0x080398f8 802865c: 080398ff .word 0x080398ff 8028660: 08039907 .word 0x08039907 08028664 : /** * @brief Установить Информацию об устройстве по умолчанию */ void SETTINGS_SetInfoDef(void) { 8028664: b510 push {r4, lr} strcpy(sSettings.sInfo.productionData, "09.10.2015"); 8028666: 4c0b ldr r4, [pc, #44] ; (8028694 ) 8028668: 490b ldr r1, [pc, #44] ; (8028698 ) 802866a: 4620 mov r0, r4 802866c: f7f9 fbc2 bl 8021df4 strcpy(sSettings.sInfo.mac, DEVICE_MAC); 8028670: f104 0028 add.w r0, r4, #40 ; 0x28 8028674: 4909 ldr r1, [pc, #36] ; (802869c ) 8028676: f7f9 fbbd bl 8021df4 strcpy(sSettings.sInfo.serialNumber, "KN-03-00003"); 802867a: f104 003a add.w r0, r4, #58 ; 0x3a 802867e: 4908 ldr r1, [pc, #32] ; (80286a0 ) 8028680: f7f9 fbb8 bl 8021df4 strcpy(sSettings.sInfo.comments, ""); 8028684: 4907 ldr r1, [pc, #28] ; (80286a4 ) 8028686: f104 004a add.w r0, r4, #74 ; 0x4a } 802868a: e8bd 4010 ldmia.w sp!, {r4, lr} void SETTINGS_SetInfoDef(void) { strcpy(sSettings.sInfo.productionData, "09.10.2015"); strcpy(sSettings.sInfo.mac, DEVICE_MAC); strcpy(sSettings.sInfo.serialNumber, "KN-03-00003"); strcpy(sSettings.sInfo.comments, ""); 802868e: f7f9 bbb1 b.w 8021df4 8028692: bf00 nop 8028694: 2000d024 .word 0x2000d024 8028698: 0803990f .word 0x0803990f 802869c: 0803991a .word 0x0803991a 80286a0: 0803992c .word 0x0803992c 80286a4: 08040f86 .word 0x08040f86 080286a8 : /** * @brief Установить значение сервисных настроек по умолчанию */ void SETTINGS_SetServiceDef(void) { 80286a8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 80286ac: 4d14 ldr r5, [pc, #80] ; (8028700 ) 80286ae: 2400 movs r4, #0 } /** * @brief Установить значение сервисных настроек по умолчанию */ void SETTINGS_SetServiceDef(void) 80286b0: 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; 80286b2: 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) { 80286b6: f014 03ff ands.w r3, r4, #255 ; 0xff 80286ba: d108 bne.n 80286ce /* 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"); 80286bc: 4911 ldr r1, [pc, #68] ; (8028704 ) 80286be: 4812 ldr r0, [pc, #72] ; (8028708 ) 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; 80286c0: f885 3311 strb.w r3, [r5, #785] ; 0x311 strcpy(sSettings.sAuth[user_id].login, "admin"); 80286c4: f7f9 fb96 bl 8021df4 strcpy(sSettings.sAuth[user_id].password, "12345"); 80286c8: 4810 ldr r0, [pc, #64] ; (802870c ) 80286ca: 4911 ldr r1, [pc, #68] ; (8028710 ) 80286cc: e010 b.n 80286f0 } /** * @brief Установить значение сервисных настроек по умолчанию */ void SETTINGS_SetServiceDef(void) 80286ce: fb07 f604 mul.w r6, r7, r4 80286d2: 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"); 80286d4: f506 7044 add.w r0, r6, #784 ; 0x310 80286d8: 1828 adds r0, r5, r0 80286da: 490e ldr r1, [pc, #56] ; (8028714 ) strcpy(sSettings.sAuth[user_id].login, "admin"); strcpy(sSettings.sAuth[user_id].password, "12345"); break; case 1: default: sSettings.sAuth[user_id].level = USER; 80286dc: f883 8311 strb.w r8, [r3, #785] ; 0x311 strcpy(sSettings.sAuth[user_id].login, "user"); 80286e0: 3002 adds r0, #2 strcpy(sSettings.sAuth[user_id].password, "1234"); 80286e2: 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"); 80286e6: f7f9 fb85 bl 8021df4 strcpy(sSettings.sAuth[user_id].password, "1234"); 80286ea: 19a8 adds r0, r5, r6 80286ec: 490a ldr r1, [pc, #40] ; (8028718 ) 80286ee: 3005 adds r0, #5 80286f0: 3401 adds r4, #1 80286f2: f7f9 fb7f bl 8021df4 */ void SETTINGS_SetServiceDef(void) { uint8_t user_id; for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { 80286f6: 2c02 cmp r4, #2 80286f8: d1dd bne.n 80286b6 strcpy(sSettings.sAuth[user_id].login, "user"); strcpy(sSettings.sAuth[user_id].password, "1234"); break; } } } 80286fa: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80286fe: bf00 nop 8028700: 2000cfc0 .word 0x2000cfc0 8028704: 08039938 .word 0x08039938 8028708: 2000d2d2 .word 0x2000d2d2 802870c: 2000d2dd .word 0x2000d2dd 8028710: 0803993e .word 0x0803993e 8028714: 08039944 .word 0x08039944 8028718: 08039949 .word 0x08039949 0802871c : /** * @brief Установить параметры SNTP по умолчанию */ void SETTINGS_SetSntpDef(void) { 802871c: b510 push {r4, lr} sSettings.sSNTP.sntpEnable = true; 802871e: 4c08 ldr r4, [pc, #32] ; (8028740 ) strcpy(sSettings.sSNTP.ip, "88.147.254.235"); 8028720: 4908 ldr r1, [pc, #32] ; (8028744 ) 8028722: 4809 ldr r0, [pc, #36] ; (8028748 ) /** * @brief Установить параметры SNTP по умолчанию */ void SETTINGS_SetSntpDef(void) { sSettings.sSNTP.sntpEnable = true; 8028724: 2301 movs r3, #1 8028726: f884 3340 strb.w r3, [r4, #832] ; 0x340 strcpy(sSettings.sSNTP.ip, "88.147.254.235"); 802872a: f7f9 fb63 bl 8021df4 sSettings.sSNTP.timeZone = 3.0; 802872e: 4b07 ldr r3, [pc, #28] ; (802874c ) strcpy(sSettings.sSNTP.data, "none"); 8028730: 4807 ldr r0, [pc, #28] ; (8028750 ) 8028732: 4908 ldr r1, [pc, #32] ; (8028754 ) */ void SETTINGS_SetSntpDef(void) { sSettings.sSNTP.sntpEnable = true; strcpy(sSettings.sSNTP.ip, "88.147.254.235"); sSettings.sSNTP.timeZone = 3.0; 8028734: f8c4 3370 str.w r3, [r4, #880] ; 0x370 strcpy(sSettings.sSNTP.data, "none"); } 8028738: 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"); 802873c: f7f9 bb5a b.w 8021df4 8028740: 2000cfc0 .word 0x2000cfc0 8028744: 0803994e .word 0x0803994e 8028748: 2000d301 .word 0x2000d301 802874c: 40400000 .word 0x40400000 8028750: 2000d311 .word 0x2000d311 8028754: 0803995d .word 0x0803995d 08028758 : /** * @brief Установить параметры настроек сухих контактов / реле по умолчанию */ void SETTINGS_SetINOUTSDef(void) { sSettings.sInOuts.ro_type_source[0] = CRITICAL; 8028758: 4b05 ldr r3, [pc, #20] ; (8028770 ) 802875a: 2201 movs r2, #1 802875c: f883 2374 strb.w r2, [r3, #884] ; 0x374 sSettings.sInOuts.ro_type_source[1] = SNMP_SET; 8028760: 2203 movs r2, #3 8028762: f883 2375 strb.w r2, [r3, #885] ; 0x375 sSettings.sInOuts.din_type_act[0] = SNMP_TRAP; 8028766: 2202 movs r2, #2 8028768: f883 2376 strb.w r2, [r3, #886] ; 0x376 802876c: 4770 bx lr 802876e: bf00 nop 8028770: 2000cfc0 .word 0x2000cfc0 08028774 : /** * @brief Установить параметры RADIUS по умолчанию */ void SETTINGS_SetRADIUSDef(void) { 8028774: b510 push {r4, lr} sSettings.sRADIUS.Auth_enable = true; 8028776: 4c0b ldr r4, [pc, #44] ; (80287a4 ) sSettings.sRADIUS.RDSEnable = true; strcpy(sSettings.sRADIUS.ServerIP, "127.0.0.1"); 8028778: 490b ldr r1, [pc, #44] ; (80287a8 ) 802877a: 480c ldr r0, [pc, #48] ; (80287ac ) /** * @brief Установить параметры RADIUS по умолчанию */ void SETTINGS_SetRADIUSDef(void) { sSettings.sRADIUS.Auth_enable = true; 802877c: 2301 movs r3, #1 802877e: f884 3378 strb.w r3, [r4, #888] ; 0x378 sSettings.sRADIUS.RDSEnable = true; 8028782: f884 339a strb.w r3, [r4, #922] ; 0x39a strcpy(sSettings.sRADIUS.ServerIP, "127.0.0.1"); 8028786: f7f9 fb35 bl 8021df4 sSettings.sRADIUS.port = 1227; 802878a: f240 43cb movw r3, #1227 ; 0x4cb sSettings.sRADIUS.key_access = 123; strcpy(sSettings.sRADIUS.rds_password, "12345"); 802878e: 4808 ldr r0, [pc, #32] ; (80287b0 ) 8028790: 4908 ldr r1, [pc, #32] ; (80287b4 ) void SETTINGS_SetRADIUSDef(void) { sSettings.sRADIUS.Auth_enable = true; sSettings.sRADIUS.RDSEnable = true; strcpy(sSettings.sRADIUS.ServerIP, "127.0.0.1"); sSettings.sRADIUS.port = 1227; 8028792: f8c4 339c str.w r3, [r4, #924] ; 0x39c sSettings.sRADIUS.key_access = 123; 8028796: 237b movs r3, #123 ; 0x7b 8028798: f8c4 33a0 str.w r3, [r4, #928] ; 0x3a0 strcpy(sSettings.sRADIUS.rds_password, "12345"); } 802879c: e8bd 4010 ldmia.w sp!, {r4, lr} sSettings.sRADIUS.Auth_enable = true; sSettings.sRADIUS.RDSEnable = true; strcpy(sSettings.sRADIUS.ServerIP, "127.0.0.1"); sSettings.sRADIUS.port = 1227; sSettings.sRADIUS.key_access = 123; strcpy(sSettings.sRADIUS.rds_password, "12345"); 80287a0: f7f9 bb28 b.w 8021df4 80287a4: 2000cfc0 .word 0x2000cfc0 80287a8: 08039962 .word 0x08039962 80287ac: 2000d339 .word 0x2000d339 80287b0: 2000d349 .word 0x2000d349 80287b4: 0803993e .word 0x0803993e 080287b8 : */ void SETTINGS_ReadFromFlash(uint8_t *data, uint32_t size) { uint32_t baseAddress = SETTINGS_SECTOR; for (uint32_t i = 0; i < size; i++) 80287b8: 2300 movs r3, #0 80287ba: e006 b.n 80287ca *data++ = (*(uint32_t*)baseAddress++);; 80287bc: f103 6200 add.w r2, r3, #134217728 ; 0x8000000 80287c0: f502 4280 add.w r2, r2, #16384 ; 0x4000 80287c4: 6812 ldr r2, [r2, #0] 80287c6: 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++) 80287c8: 3301 adds r3, #1 80287ca: 428b cmp r3, r1 80287cc: d1f6 bne.n 80287bc *data++ = (*(uint32_t*)baseAddress++);; } 80287ce: 4770 bx lr 080287d0 : */ void SETTINGS_EraseFlashSector(void) { FLASH_Status status; if ((status = FLASH_EraseSector(FLASH_Sector_1, VoltageRange_3)) != FLASH_COMPLETE) { 80287d0: 2008 movs r0, #8 80287d2: 2102 movs r1, #2 80287d4: f7fc be38 b.w 8025448 080287d8 : /** * @brief * @retval */ uint32_t SETTINGS_GetCRC(void) { 80287d8: b508 push {r3, lr} CRC_ResetDR(); 80287da: f7fc fd9f bl 802531c return CRC_CalcBlockCRC((uint32_t*)&sSettings, sizeof(sSettings)/4 - 1); 80287de: 4803 ldr r0, [pc, #12] ; (80287ec ) 80287e0: 21e9 movs r1, #233 ; 0xe9 } 80287e2: 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); 80287e6: f7fc bd9f b.w 8025328 80287ea: bf00 nop 80287ec: 2000cfc0 .word 0x2000cfc0 080287f0 : /** * @brief */ void SETTINGS_WriteToFlash(uint8_t *data, uint32_t size) { 80287f0: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 80287f4: 4606 mov r6, r0 80287f6: 468a mov sl, r1 uint32_t baseAddress = SETTINGS_SECTOR; uint32_t checkCrc = 0; uint32_t crc = SETTINGS_GetCRC(); 80287f8: f7ff ffee bl 80287d8 /** * @brief */ void SETTINGS_WriteToFlash(uint8_t *data, uint32_t size) { uint32_t baseAddress = SETTINGS_SECTOR; 80287fc: 4c17 ldr r4, [pc, #92] ; (802885c ) uint32_t checkCrc = 0; uint32_t crc = SETTINGS_GetCRC(); 80287fe: 4680 mov r8, r0 8028800: 2703 movs r7, #3 FLASH_Status status; for (uint8_t i = 0; i < 3; i++) { fAlarm = 0; FLASH_Unlock(); 8028802: f7fc fda1 bl 8025348 8028806: 4635 mov r5, r6 SETTINGS_EraseFlashSector(); 8028808: f7ff ffe2 bl 80287d0 } /** * @brief */ void SETTINGS_WriteToFlash(uint8_t *data, uint32_t size) 802880c: eb04 0b0a add.w fp, r4, sl fAlarm = 0; FLASH_Unlock(); SETTINGS_EraseFlashSector(); for (uint32_t i = 0; i < size; i++) 8028810: e00a b.n 8028828 if ((status = FLASH_ProgramByte(baseAddress++, *data++)) != FLASH_COMPLETE) { 8028812: f815 1b01 ldrb.w r1, [r5], #1 8028816: 4620 mov r0, r4 8028818: f7fc fddc bl 80253d4 802881c: f104 0901 add.w r9, r4, #1 8028820: 2808 cmp r0, #8 8028822: 462e mov r6, r5 8028824: 464c mov r4, r9 8028826: d102 bne.n 802882e fAlarm = 0; FLASH_Unlock(); SETTINGS_EraseFlashSector(); for (uint32_t i = 0; i < size; i++) 8028828: 455c cmp r4, fp 802882a: 462e mov r6, r5 802882c: d1f1 bne.n 8028812 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) { 802882e: 4641 mov r1, r8 8028830: 480b ldr r0, [pc, #44] ; (8028860 ) 8028832: f7fc fdeb bl 802540c DBG printf("FLASH_ProgramWord error: status = %d\r\n", status); } FLASH_Lock(); 8028836: f7fc fd95 bl 8025364 /* Считываем что записали */ SETTINGS_ReadFromFlash((uint8_t*)&sSettings, sizeof(sSettings)); 802883a: 480a ldr r0, [pc, #40] ; (8028864 ) 802883c: f44f 716a mov.w r1, #936 ; 0x3a8 8028840: f7ff ffba bl 80287b8 checkCrc = SETTINGS_GetCRC(); 8028844: f7ff ffc8 bl 80287d8 /* Проверяем CRC того что было записано */ if (checkCrc == crc) 8028848: 4540 cmp r0, r8 802884a: d004 beq.n 8028856 802884c: 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++) 802884e: f017 07ff ands.w r7, r7, #255 ; 0xff 8028852: d1d6 bne.n 8028802 8028854: e7fe b.n 8028854 8028856: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 802885a: bf00 nop 802885c: 08004000 .word 0x08004000 8028860: 08005f9c .word 0x08005f9c 8028864: 2000cfc0 .word 0x2000cfc0 08028868 : /** * @brief * @retval */ uint32_t SETTINGS_GetCritSecCRC(void) { 8028868: b508 push {r3, lr} CRC_ResetDR(); 802886a: f7fc fd57 bl 802531c uint32_t critsec_len = (uint32_t)((uint8_t *)(&sSettings.CritSecCRC) - (uint8_t *)&sSettings) / 4; return CRC_CalcBlockCRC((uint32_t *)&sSettings, critsec_len); 802886e: 4803 ldr r0, [pc, #12] ; (802887c ) 8028870: 2147 movs r1, #71 ; 0x47 } 8028872: 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); 8028876: f7fc bd57 b.w 8025328 802887a: bf00 nop 802887c: 2000cfc0 .word 0x2000cfc0 08028880 : /** * @brief Запись структуры настроек во flesh */ void SETTINGS_Save(void) { 8028880: b508 push {r3, lr} /* Calc critical section CRC and store to the settings structure */ sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028882: f7ff fff1 bl 8028868 8028886: 4b05 ldr r3, [pc, #20] ; (802889c ) SETTINGS_WriteToFlash((uint8_t*)&sSettings, sizeof(sSettings)); 8028888: 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(); 802888c: f8c3 011c str.w r0, [r3, #284] ; 0x11c SETTINGS_WriteToFlash((uint8_t*)&sSettings, sizeof(sSettings)); 8028890: 4618 mov r0, r3 } 8028892: 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)); 8028896: f7ff bfab b.w 80287f0 802889a: bf00 nop 802889c: 2000cfc0 .word 0x2000cfc0 080288a0 : /** * @brief Установка настроек для отладки */ void SETTINGS_SetDefaultDebug(void) { 80288a0: b510 push {r4, lr} /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 80288a2: 4c0e ldr r4, [pc, #56] ; (80288dc ) /** * @brief Установка настроек для отладки */ void SETTINGS_SetDefaultDebug(void) { SETTINGS_SetWebParamsDef(); 80288a4: f7ff fe5e bl 8028564 SETTINGS_SetTempWebParamsDef(); 80288a8: f7ff fe78 bl 802859c SETTINGS_SetSnmpDef(); 80288ac: f7ff fe92 bl 80285d4 SETTINGS_SetBootParamsDef(); 80288b0: f7ff fe50 bl 8028554 /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 80288b4: 2300 movs r3, #0 80288b6: f884 3120 strb.w r3, [r4, #288] ; 0x120 SETTINGS_SetWebParamsDef(); SETTINGS_SetTempWebParamsDef(); SETTINGS_SetSnmpDef(); SETTINGS_SetBootParamsDef(); SETTINGS_SetFlagsDef(); SETTINGS_SetServiceDef(); 80288ba: f7ff fef5 bl 80286a8 SETTINGS_SetSntpDef(); 80288be: f7ff ff2d bl 802871c SETTINGS_SetINOUTSDef(); 80288c2: f7ff ff49 bl 8028758 SETTINGS_SetRADIUSDef(); 80288c6: f7ff ff55 bl 8028774 //SETTINGS_SetInfoDef(); sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 80288ca: f7ff ffcd bl 8028868 sSettings.controlWorld = SETTINGS_CONTROL_WORD; 80288ce: 4b04 ldr r3, [pc, #16] ; (80288e0 ) SETTINGS_SetSntpDef(); SETTINGS_SetINOUTSDef(); SETTINGS_SetRADIUSDef(); //SETTINGS_SetInfoDef(); sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 80288d0: f8c4 011c str.w r0, [r4, #284] ; 0x11c sSettings.controlWorld = SETTINGS_CONTROL_WORD; 80288d4: f8c4 33a4 str.w r3, [r4, #932] ; 0x3a4 80288d8: bd10 pop {r4, pc} 80288da: bf00 nop 80288dc: 2000cfc0 .word 0x2000cfc0 80288e0: 075bcd15 .word 0x075bcd15 080288e4 : /** * @brief Сброс всех настроек в значения по умолчанию */ void SETTINGS_SetAllDefault(void) { 80288e4: b510 push {r4, lr} /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 80288e6: 4c0f ldr r4, [pc, #60] ; (8028924 ) /** * @brief Сброс всех настроек в значения по умолчанию */ void SETTINGS_SetAllDefault(void) { SETTINGS_SetBootParamsDef(); 80288e8: f7ff fe34 bl 8028554 SETTINGS_SetWebParamsDef(); 80288ec: f7ff fe3a bl 8028564 SETTINGS_SetTempWebParamsDef(); 80288f0: f7ff fe54 bl 802859c SETTINGS_SetSnmpDef(); 80288f4: f7ff fe6e bl 80285d4 SETTINGS_SetInfoDef(); 80288f8: f7ff feb4 bl 8028664 /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 80288fc: 2300 movs r3, #0 80288fe: f884 3120 strb.w r3, [r4, #288] ; 0x120 SETTINGS_SetWebParamsDef(); SETTINGS_SetTempWebParamsDef(); SETTINGS_SetSnmpDef(); SETTINGS_SetInfoDef(); SETTINGS_SetFlagsDef(); SETTINGS_SetServiceDef(); 8028902: f7ff fed1 bl 80286a8 SETTINGS_SetSntpDef(); 8028906: f7ff ff09 bl 802871c SETTINGS_SetINOUTSDef(); 802890a: f7ff ff25 bl 8028758 SETTINGS_SetRADIUSDef(); 802890e: f7ff ff31 bl 8028774 sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028912: f7ff ffa9 bl 8028868 sSettings.controlWorld = SETTINGS_CONTROL_WORD; 8028916: 4b04 ldr r3, [pc, #16] ; (8028928 ) SETTINGS_SetServiceDef(); SETTINGS_SetSntpDef(); SETTINGS_SetINOUTSDef(); SETTINGS_SetRADIUSDef(); sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028918: f8c4 011c str.w r0, [r4, #284] ; 0x11c sSettings.controlWorld = SETTINGS_CONTROL_WORD; 802891c: f8c4 33a4 str.w r3, [r4, #932] ; 0x3a4 8028920: bd10 pop {r4, pc} 8028922: bf00 nop 8028924: 2000cfc0 .word 0x2000cfc0 8028928: 075bcd15 .word 0x075bcd15 0802892c : /** * @brief Загрузка структуры настроек из flesh */ void SETTINGS_Load(void) { 802892c: b510 push {r4, lr} uint32_t loadCRC; // CRC из flash uint32_t newCRC; // CRC загруженной структуры настроек SETTINGS_ReadFromFlash((uint8_t*)&sSettings, sizeof(sSettings)); 802892e: 4809 ldr r0, [pc, #36] ; (8028954 ) 8028930: f44f 716a mov.w r1, #936 ; 0x3a8 8028934: f7ff ff40 bl 80287b8 /* Считываем CRC из флеш памяти */ loadCRC = (*(uint32_t*)CRC_ADDRESS); 8028938: 4b07 ldr r3, [pc, #28] ; (8028958 ) 802893a: 681c ldr r4, [r3, #0] /* Рассчитываем CRC для структуры настроек */ newCRC = SETTINGS_GetCRC(); 802893c: f7ff ff4c bl 80287d8 if (loadCRC != newCRC) { 8028940: 4284 cmp r4, r0 8028942: d005 beq.n 8028950 SETTINGS_SetAllDefault(); 8028944: f7ff ffce bl 80288e4 SETTINGS_Save(); } } 8028948: e8bd 4010 ldmia.w sp!, {r4, lr} /* Рассчитываем CRC для структуры настроек */ newCRC = SETTINGS_GetCRC(); if (loadCRC != newCRC) { SETTINGS_SetAllDefault(); SETTINGS_Save(); 802894c: f7ff bf98 b.w 8028880 8028950: bd10 pop {r4, pc} 8028952: bf00 nop 8028954: 2000cfc0 .word 0x2000cfc0 8028958: 08005f9c .word 0x08005f9c 0802895c : /** * @brief Сброс всех настроек в значения по умолчанию кроме сетевых настроек */ void SETTINGS_SetPartDefault(void) { 802895c: b510 push {r4, lr} /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 802895e: 4c0c ldr r4, [pc, #48] ; (8028990 ) /** * @brief Сброс всех настроек в значения по умолчанию кроме сетевых настроек */ void SETTINGS_SetPartDefault(void) { SETTINGS_SetBootParamsDef(); 8028960: f7ff fdf8 bl 8028554 SETTINGS_SetSnmpDef(); 8028964: f7ff fe36 bl 80285d4 /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8028968: 2300 movs r3, #0 802896a: f884 3120 strb.w r3, [r4, #288] ; 0x120 void SETTINGS_SetPartDefault(void) { SETTINGS_SetBootParamsDef(); SETTINGS_SetSnmpDef(); SETTINGS_SetFlagsDef(); SETTINGS_SetServiceDef(); 802896e: f7ff fe9b bl 80286a8 SETTINGS_SetSntpDef(); 8028972: f7ff fed3 bl 802871c SETTINGS_SetINOUTSDef(); 8028976: f7ff feef bl 8028758 SETTINGS_SetRADIUSDef(); 802897a: f7ff fefb bl 8028774 sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 802897e: f7ff ff73 bl 8028868 sSettings.controlWorld = SETTINGS_CONTROL_WORD; 8028982: 4b04 ldr r3, [pc, #16] ; (8028994 ) SETTINGS_SetServiceDef(); SETTINGS_SetSntpDef(); SETTINGS_SetINOUTSDef(); SETTINGS_SetRADIUSDef(); sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028984: f8c4 011c str.w r0, [r4, #284] ; 0x11c sSettings.controlWorld = SETTINGS_CONTROL_WORD; 8028988: f8c4 33a4 str.w r3, [r4, #932] ; 0x3a4 802898c: bd10 pop {r4, pc} 802898e: bf00 nop 8028990: 2000cfc0 .word 0x2000cfc0 8028994: 075bcd15 .word 0x075bcd15 08028998 : /** * @brief Сброс флага boottry в регистре RTC */ void SETTINGS_ResetBootTry(void) { uint8_t bootTry = RTC_ReadBackupRegister(RTC_BKP_DR2); 8028998: 2002 movs r0, #2 /** * @brief Сброс флага boottry в регистре RTC */ void SETTINGS_ResetBootTry(void) { 802899a: b508 push {r3, lr} uint8_t bootTry = RTC_ReadBackupRegister(RTC_BKP_DR2); 802899c: f7fd f8b8 bl 8025b10 if (bootTry > 0 ) 80289a0: f010 0fff tst.w r0, #255 ; 0xff 80289a4: d014 beq.n 80289d0 { bootTry = 0; RTC_WriteBackupRegister(RTC_BKP_DR2, 0); 80289a6: 2002 movs r0, #2 80289a8: 2100 movs r1, #0 80289aa: f7fd f8a1 bl 8025af0 /* Check FW update flag */ if (RTC_ReadBackupRegister(RTC_BKP_DR3)) { 80289ae: 2003 movs r0, #3 80289b0: f7fd f8ae bl 8025b10 80289b4: b160 cbz r0, 80289d0 /* Отправка трапа об успешном обновлении ПО */ SNMP_SendUserTrap(FW_VERSION_UPDATED); 80289b6: 2002 movs r0, #2 80289b8: f00f fb40 bl 803803c log_event_data(LOG_UPDATE_SOFT, "Успешно"); 80289bc: 2002 movs r0, #2 80289be: 4905 ldr r1, [pc, #20] ; (80289d4 ) 80289c0: f000 ffe6 bl 8029990 /* Clear FW update flag */ RTC_WriteBackupRegister(RTC_BKP_DR3, 0); 80289c4: 2003 movs r0, #3 80289c6: 2100 movs r1, #0 //taskENTER_CRITICAL(); SETTINGS_Save(); //taskEXIT_CRITICAL(); } */ } 80289c8: e8bd 4008 ldmia.w sp!, {r3, lr} /* Отправка трапа об успешном обновлении ПО */ SNMP_SendUserTrap(FW_VERSION_UPDATED); log_event_data(LOG_UPDATE_SOFT, "Успешно"); /* Clear FW update flag */ RTC_WriteBackupRegister(RTC_BKP_DR3, 0); 80289cc: f7fd b890 b.w 8025af0 80289d0: bd08 pop {r3, pc} 80289d2: bf00 nop 80289d4: 0803996c .word 0x0803996c 080289d8 : /** * @brief Преобразует mac адрес строкового формата в массив uint8_t * @param mac - буфер для вывода mac адреса */ void SETTINGS_GetMac(uint8_t *mac) { 80289d8: b573 push {r0, r1, r4, r5, r6, lr} char dummy[2]; char *macPtr = sSettings.sInfo.mac; for (uint8_t i = 0; i < 6; i++) { strncpy(dummy, macPtr+i*3, 2); 80289da: 4e0a ldr r6, [pc, #40] ; (8028a04 ) /** * @brief Преобразует mac адрес строкового формата в массив uint8_t * @param mac - буфер для вывода mac адреса */ void SETTINGS_GetMac(uint8_t *mac) 80289dc: 1e45 subs r5, r0, #1 80289de: 2400 movs r4, #0 char dummy[2]; char *macPtr = sSettings.sInfo.mac; for (uint8_t i = 0; i < 6; i++) { strncpy(dummy, macPtr+i*3, 2); 80289e0: 1931 adds r1, r6, r4 80289e2: 318c adds r1, #140 ; 0x8c 80289e4: 2202 movs r2, #2 80289e6: a801 add r0, sp, #4 80289e8: f7f9 fb1a bl 8022020 mac[i] = (uint8_t)strtol(dummy, NULL, 16); 80289ec: 2100 movs r1, #0 80289ee: 2210 movs r2, #16 80289f0: a801 add r0, sp, #4 80289f2: f7fa fe4b bl 802368c 80289f6: 3403 adds r4, #3 void SETTINGS_GetMac(uint8_t *mac) { char dummy[2]; char *macPtr = sSettings.sInfo.mac; for (uint8_t i = 0; i < 6; i++) 80289f8: 2c12 cmp r4, #18 { strncpy(dummy, macPtr+i*3, 2); mac[i] = (uint8_t)strtol(dummy, NULL, 16); 80289fa: f805 0f01 strb.w r0, [r5, #1]! void SETTINGS_GetMac(uint8_t *mac) { char dummy[2]; char *macPtr = sSettings.sInfo.mac; for (uint8_t i = 0; i < 6; i++) 80289fe: d1ef bne.n 80289e0 { strncpy(dummy, macPtr+i*3, 2); mac[i] = (uint8_t)strtol(dummy, NULL, 16); } } 8028a00: bd7c pop {r2, r3, r4, r5, r6, pc} 8028a02: bf00 nop 8028a04: 2000cfc0 .word 0x2000cfc0 08028a08 : /** * @brief Установить дату производства */ void SETTINGS_SetProDate(char *proDate, uint8_t len) { 8028a08: b570 push {r4, r5, r6, lr} memset(sSettings.sInfo.productionData, 0, 40); 8028a0a: 4c07 ldr r4, [pc, #28] ; (8028a28 ) /** * @brief Установить дату производства */ void SETTINGS_SetProDate(char *proDate, uint8_t len) { 8028a0c: 4606 mov r6, r0 8028a0e: 460d mov r5, r1 memset(sSettings.sInfo.productionData, 0, 40); 8028a10: 2228 movs r2, #40 ; 0x28 8028a12: 2100 movs r1, #0 8028a14: 4620 mov r0, r4 8028a16: f7f9 f873 bl 8021b00 memcpy(sSettings.sInfo.productionData, proDate, len); 8028a1a: 4620 mov r0, r4 8028a1c: 4631 mov r1, r6 8028a1e: 462a mov r2, r5 } 8028a20: 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); 8028a24: f7f8 bfb2 b.w 802198c 8028a28: 2000d024 .word 0x2000d024 08028a2c : /** * @brief */ void LED_On(gpio_t pin) { gpio_set(pin, 1); 8028a2c: 2101 movs r1, #1 8028a2e: f7fd ba7f b.w 8025f30 08028a32 : /** * @brief */ void LED_Off(gpio_t pin) { gpio_set(pin, 0); 8028a32: 2100 movs r1, #0 8028a34: f7fd ba7c b.w 8025f30 08028a38 : /** * @brief * @retval */ void LED_Init(void) { 8028a38: b508 push {r3, lr} LED_Off(LED_INIT_R); 8028a3a: 2009 movs r0, #9 8028a3c: f7ff fff9 bl 8028a32 LED_Off(LED_INIT_G); 8028a40: 200a movs r0, #10 8028a42: f7ff fff6 bl 8028a32 LED_Off(LED_MAJOR_R); 8028a46: 200b movs r0, #11 8028a48: f7ff fff3 bl 8028a32 LED_Off(LED_MINOR_G); 8028a4c: 200c movs r0, #12 8028a4e: f7ff fff0 bl 8028a32 LED_Off(LED_MINOR_R); 8028a52: 200d movs r0, #13 } 8028a54: 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); 8028a58: f7ff bfeb b.w 8028a32 08028a5c : /** * @brief Задача простой мигалки */ void vTaskLedBlink(void *arg) { 8028a5c: 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; 8028a5e: 4e0e ldr r6, [pc, #56] ; (8028a98 ) LED_Off(LED_INIT_R); LED_Toggle(LED_INIT_G); } start_status_old = start_status; vTaskDelay(statusLedFreq); 8028a60: 4d0e ldr r5, [pc, #56] ; (8028a9c ) * @brief Задача простой мигалки */ void vTaskLedBlink(void *arg) { uint8_t start_status = 0; uint8_t start_status_old = 0; 8028a62: 2300 movs r3, #0 start_status = (UPS.Status >> 7) & 0x01; for (;;) { start_status = (UPS.Status >> 7) & 0x01; 8028a64: 7cf4 ldrb r4, [r6, #19] /* Просто отражает состояние контроллера - "живой" */ if((UPS.Status >> 7) & 0x01){ 8028a66: 09e4 lsrs r4, r4, #7 8028a68: d009 beq.n 8028a7e if(start_status_old != start_status) 8028a6a: 42a3 cmp r3, r4 8028a6c: d002 beq.n 8028a74 LED_Off(LED_INIT_G); 8028a6e: 200a movs r0, #10 8028a70: f7ff ffdf bl 8028a32 /** * @brief Изменить состояние LED */ void LED_Toggle(gpio_t pin) { gpio_invert_output(pin); 8028a74: 200a movs r0, #10 8028a76: f7fd faef bl 8026058 8028a7a: 2009 movs r0, #9 8028a7c: e005 b.n 8028a8a LED_Off(LED_INIT_G); LED_Toggle(LED_INIT_G); LED_Toggle(LED_INIT_R); } else{ if(start_status_old != start_status) 8028a7e: 42a3 cmp r3, r4 8028a80: d002 beq.n 8028a88 LED_Off(LED_INIT_R); 8028a82: 2009 movs r0, #9 8028a84: f7ff ffd5 bl 8028a32 /** * @brief Изменить состояние LED */ void LED_Toggle(gpio_t pin) { gpio_invert_output(pin); 8028a88: 200a movs r0, #10 8028a8a: f7fd fae5 bl 8026058 LED_Off(LED_INIT_R); LED_Toggle(LED_INIT_G); } start_status_old = start_status; vTaskDelay(statusLedFreq); 8028a8e: 8828 ldrh r0, [r5, #0] 8028a90: f002 fa36 bl 802af00 uint8_t start_status = 0; uint8_t start_status_old = 0; start_status = (UPS.Status >> 7) & 0x01; for (;;) { start_status = (UPS.Status >> 7) & 0x01; 8028a94: 4623 mov r3, r4 LED_Toggle(LED_INIT_G); } start_status_old = start_status; vTaskDelay(statusLedFreq); } 8028a96: e7e5 b.n 8028a64 8028a98: 2000cba4 .word 0x2000cba4 8028a9c: 20000660 .word 0x20000660 08028aa0 : /** * @brief Изменить состояние LED */ void LED_Toggle(gpio_t pin) { gpio_invert_output(pin); 8028aa0: f7fd bada b.w 8026058 08028aa4 : /** * @brief */ void LED_SetStatusLedFreq(uint16_t freq) { statusLedFreq = freq; 8028aa4: 4b01 ldr r3, [pc, #4] ; (8028aac ) 8028aa6: 8018 strh r0, [r3, #0] 8028aa8: 4770 bx lr 8028aaa: bf00 nop 8028aac: 20000660 .word 0x20000660 08028ab0 : /** * @brief Заглушка */ void BUTTON_VoidHandler(void) { 8028ab0: 4770 bx lr 8028ab2: 0000 movs r0, r0 08028ab4 : /** * @brief Хендлер кнопки DEFAULT. Сброс всех настроек, сохранение и перезагрузка */ void BUTTON_DEF_DownHandler(void) { 8028ab4: b508 push {r3, lr} //taskENTER_CRITICAL(); SNMP_SendUserTrap(DEVICE_RESTORED); 8028ab6: 2003 movs r0, #3 8028ab8: f00f fac0 bl 803803c log_event_data(LOG_SYSTEM_DEFCONFIG, "Администратор"); 8028abc: 4909 ldr r1, [pc, #36] ; (8028ae4 ) 8028abe: 2001 movs r0, #1 8028ac0: f000 ff66 bl 8029990 vTaskDelay(500); 8028ac4: f44f 70fa mov.w r0, #500 ; 0x1f4 8028ac8: f002 fa1a bl 802af00 SETTINGS_SetDefaultDebug(); 8028acc: f7ff fee8 bl 80288a0 SETTINGS_Save(); 8028ad0: f7ff fed6 bl 8028880 vTaskDelay(1010); 8028ad4: f240 30f2 movw r0, #1010 ; 0x3f2 8028ad8: f002 fa12 bl 802af00 Reboot(); //taskEXIT_CRITICAL(); } 8028adc: e8bd 4008 ldmia.w sp!, {r3, lr} vTaskDelay(500); SETTINGS_SetDefaultDebug(); SETTINGS_Save(); vTaskDelay(1010); Reboot(); 8028ae0: f000 bac0 b.w 8029064 8028ae4: 08039980 .word 0x08039980 08028ae8 : /** * @brief Возвращает сотояние ключа */ BUTTON_STATE_t BUTTON_GetState(BUTTON_NO_FIX_t *button) { return (BUTTON_STATE_t)gpio_get(button->id_pin); 8028ae8: 7800 ldrb r0, [r0, #0] 8028aea: f7fd bac5 b.w 8026078 8028aee: 0000 movs r0, r0 08028af0 : /** * @brief * @retval */ void BUTTON_Init(void) { 8028af0: b510 push {r4, lr} defButton.id_pin = KEY_DEF; 8028af2: 4c09 ldr r4, [pc, #36] ; (8028b18 ) 8028af4: 230f movs r3, #15 8028af6: 7023 strb r3, [r4, #0] defButton.timeDelay = 5; 8028af8: 2305 movs r3, #5 8028afa: 8063 strh r3, [r4, #2] defButton.pressHandler = BUTTON_VoidHandler; 8028afc: 4b07 ldr r3, [pc, #28] ; (8028b1c ) 8028afe: 60a3 str r3, [r4, #8] defButton.unpressHandler = BUTTON_DEF_DownHandler; 8028b00: 4b07 ldr r3, [pc, #28] ; (8028b20 ) defButton.counterActivation = 0; defButton.timeActivation = 40; 8028b02: 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; 8028b04: 60e3 str r3, [r4, #12] defButton.counterActivation = 0; defButton.timeActivation = 40; defButton.fActivation = false; defButton.stateOld = BUTTON_GetState(&defButton); 8028b06: 4620 mov r0, r4 { defButton.id_pin = KEY_DEF; defButton.timeDelay = 5; defButton.pressHandler = BUTTON_VoidHandler; defButton.unpressHandler = BUTTON_DEF_DownHandler; defButton.counterActivation = 0; 8028b08: 2300 movs r3, #0 8028b0a: 6163 str r3, [r4, #20] defButton.timeActivation = 40; 8028b0c: 8322 strh r2, [r4, #24] defButton.fActivation = false; 8028b0e: 76a3 strb r3, [r4, #26] defButton.stateOld = BUTTON_GetState(&defButton); 8028b10: f7ff ffea bl 8028ae8 8028b14: 71a0 strb r0, [r4, #6] 8028b16: bd10 pop {r4, pc} 8028b18: 2000d368 .word 0x2000d368 8028b1c: 08028ab1 .word 0x08028ab1 8028b20: 08028ab5 .word 0x08028ab5 08028b24 : время нажатия. * @param *button: указатель на структуру типа BUTTON_NO_FIX * @retval нет */ void BUTTON_DellayHandler(BUTTON_NO_FIX_t *button) { 8028b24: b510 push {r4, lr} 8028b26: 4604 mov r4, r0 /* Кнопка нажата. Ведем отсчет времени удержания */ if (gpio_get(button->id_pin) == 0) // определяем текущее (новое) состояние кнопки 8028b28: 7800 ldrb r0, [r0, #0] 8028b2a: f7fd faa5 bl 8026078 8028b2e: 6963 ldr r3, [r4, #20] 8028b30: b950 cbnz r0, 8028b48 { button->counterActivation++; button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) 8028b32: 8b22 ldrh r2, [r4, #24] { /* Кнопка нажата. Ведем отсчет времени удержания */ if (gpio_get(button->id_pin) == 0) // определяем текущее (новое) состояние кнопки { button->counterActivation++; button->fActivation = false; 8028b34: 76a0 strb r0, [r4, #26] void BUTTON_DellayHandler(BUTTON_NO_FIX_t *button) { /* Кнопка нажата. Ведем отсчет времени удержания */ if (gpio_get(button->id_pin) == 0) // определяем текущее (новое) состояние кнопки { button->counterActivation++; 8028b36: 3301 adds r3, #1 button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) 8028b38: 4293 cmp r3, r2 void BUTTON_DellayHandler(BUTTON_NO_FIX_t *button) { /* Кнопка нажата. Ведем отсчет времени удержания */ if (gpio_get(button->id_pin) == 0) // определяем текущее (новое) состояние кнопки { button->counterActivation++; 8028b3a: 6163 str r3, [r4, #20] button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) 8028b3c: d914 bls.n 8028b68 LED_SetStatusLedFreq(100); 8028b3e: 2064 movs r0, #100 ; 0x64 } else button->counterActivation = 0; } } 8028b40: e8bd 4010 ldmia.w sp!, {r4, lr} button->counterActivation++; button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) LED_SetStatusLedFreq(100); 8028b44: f7ff bfae b.w 8028aa4 } /* Кнопку отжата. Если до этого она была нажата нужное время - вызываем хендлер */ else { if ((button->counterActivation > button->timeActivation) 8028b48: 8b22 ldrh r2, [r4, #24] 8028b4a: 4293 cmp r3, r2 8028b4c: d90a bls.n 8028b64 && button->fActivation == false) 8028b4e: 7ea3 ldrb r3, [r4, #26] 8028b50: b943 cbnz r3, 8028b64 { button->fActivation = true; 8028b52: 2301 movs r3, #1 8028b54: 76a3 strb r3, [r4, #26] LED_SetStatusLedFreq(1000); 8028b56: f44f 707a mov.w r0, #1000 ; 0x3e8 8028b5a: f7ff ffa3 bl 8028aa4 button->unpressHandler(); 8028b5e: 68e3 ldr r3, [r4, #12] 8028b60: 4798 blx r3 8028b62: bd10 pop {r4, pc} } else button->counterActivation = 0; 8028b64: 2300 movs r3, #0 8028b66: 6163 str r3, [r4, #20] 8028b68: bd10 pop {r4, pc} 8028b6a: 0000 movs r0, r0 08028b6c : /** * @brief Опрос кнопок */ void vTaskButtons(void *pvParameters) { 8028b6c: b508 push {r3, lr} for (;;) { BUTTON_DellayHandler(&defButton); 8028b6e: 4803 ldr r0, [pc, #12] ; (8028b7c ) 8028b70: f7ff ffd8 bl 8028b24 vTaskDelay(100); //20 8028b74: 2064 movs r0, #100 ; 0x64 8028b76: f002 f9c3 bl 802af00 8028b7a: e7f8 b.n 8028b6e 8028b7c: 2000d368 .word 0x2000d368 08028b80 : #include "gpio.h" bool value_jumper; void set_mode_jumper(void) { 8028b80: b508 push {r3, lr} value_jumper = gpio_get(MODE_JUMPER); 8028b82: 200e movs r0, #14 8028b84: f7fd fa78 bl 8026078 8028b88: 4b01 ldr r3, [pc, #4] ; (8028b90 ) 8028b8a: 7018 strb r0, [r3, #0] 8028b8c: bd08 pop {r3, pc} 8028b8e: bf00 nop 8028b90: 2000d384 .word 0x2000d384 08028b94 : /* 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); 8028b94: f7fd ba70 b.w 8026078 08028b98 : return res; } void set_state_douts(gpio_t pin, uint8_t value) { gpio_set(pin, value); 8028b98: 3100 adds r1, #0 8028b9a: bf18 it ne 8028b9c: 2101 movne r1, #1 8028b9e: f7fd b9c7 b.w 8025f30 8028ba2: 0000 movs r0, r0 08028ba4 : extern bool flUpdateLog; void init_UPS_value(void) { 8028ba4: b538 push {r3, r4, r5, lr} UPS.Freq_in = 0; 8028ba6: 4c10 ldr r4, [pc, #64] ; (8028be8 ) UPS.VAC_in = 0; UPS.VAC_out = 0; UPS.Temp = 0; UPS.Load = 0; 8028ba8: 2500 movs r5, #0 extern bool flUpdateLog; void init_UPS_value(void) { UPS.Freq_in = 0; 8028baa: 2300 movs r3, #0 UPS.Alarm = 0; UPS.cnt_err_ups = 0; UPS.Flag_Present = false; UPS.Present = false; memset(UPS.model, 0, 11); 8028bac: 4629 mov r1, r5 8028bae: 220b movs r2, #11 8028bb0: f104 0015 add.w r0, r4, #21 extern bool flUpdateLog; void init_UPS_value(void) { UPS.Freq_in = 0; 8028bb4: 6023 str r3, [r4, #0] UPS.VAC_in = 0; 8028bb6: 6063 str r3, [r4, #4] UPS.VAC_out = 0; 8028bb8: 60a3 str r3, [r4, #8] UPS.Temp = 0; 8028bba: 60e3 str r3, [r4, #12] UPS.Load = 0; 8028bbc: 7425 strb r5, [r4, #16] UPS.SOC = 0; 8028bbe: 7465 strb r5, [r4, #17] UPS.work_time = 0; 8028bc0: 74a5 strb r5, [r4, #18] UPS.Status = 0; 8028bc2: 74e5 strb r5, [r4, #19] UPS.Alarm = 0; 8028bc4: 7525 strb r5, [r4, #20] UPS.cnt_err_ups = 0; 8028bc6: f884 502b strb.w r5, [r4, #43] ; 0x2b UPS.Flag_Present = false; 8028bca: f884 502d strb.w r5, [r4, #45] ; 0x2d UPS.Present = false; 8028bce: f884 502c strb.w r5, [r4, #44] ; 0x2c memset(UPS.model, 0, 11); 8028bd2: f7f8 ff95 bl 8021b00 memset(UPS.vertion, 0, 11); 8028bd6: f104 0020 add.w r0, r4, #32 8028bda: 4629 mov r1, r5 8028bdc: 220b movs r2, #11 } 8028bde: 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); 8028be2: f7f8 bf8d b.w 8021b00 8028be6: bf00 nop 8028be8: 2000cba4 .word 0x2000cba4 08028bec : } void send_MegaTec_cmd(cmdMegaTecEnums_t command) { 8028bec: b510 push {r4, lr} if(command == ups_test_time){ 8028bee: 2803 cmp r0, #3 memset(UPS.model, 0, 11); memset(UPS.vertion, 0, 11); } void send_MegaTec_cmd(cmdMegaTecEnums_t command) { 8028bf0: b086 sub sp, #24 if(command == ups_test_time){ 8028bf2: d10d bne.n 8028c10 uint8_t req[10]; memset(req, 0, 10); 8028bf4: 2100 movs r1, #0 8028bf6: 220a movs r2, #10 8028bf8: a803 add r0, sp, #12 8028bfa: f7f8 ff81 bl 8021b00 sprintf(req, "%s%d\r", MegaTecCMD[command], TimeParam); 8028bfe: 4b18 ldr r3, [pc, #96] ; (8028c60 ) 8028c00: 4918 ldr r1, [pc, #96] ; (8028c64 ) 8028c02: 68da ldr r2, [r3, #12] 8028c04: 4b18 ldr r3, [pc, #96] ; (8028c68 ) 8028c06: a803 add r0, sp, #12 8028c08: 881b ldrh r3, [r3, #0] 8028c0a: f7fe fe03 bl 8027814 8028c0e: e015 b.n 8028c3c ups_send_block(req, strlen(req)); } else if(command == ups_shutdown){ 8028c10: 2805 cmp r0, #5 8028c12: d022 beq.n 8028c5a } else if(command == ups_shutdown_restore){ 8028c14: 2806 cmp r0, #6 8028c16: 4c12 ldr r4, [pc, #72] ; (8028c60 ) 8028c18: d116 bne.n 8028c48 uint8_t req[10]; memset(req, 0, 10); 8028c1a: 2100 movs r1, #0 8028c1c: 220a movs r2, #10 8028c1e: a803 add r0, sp, #12 8028c20: f7f8 ff6e bl 8021b00 sprintf(req, "%s.%d%s%d\r", MegaTecCMD[command-1], TimeParam, MegaTecCMD[command], TimeParam2); 8028c24: 69a2 ldr r2, [r4, #24] 8028c26: 4b10 ldr r3, [pc, #64] ; (8028c68 ) 8028c28: 4910 ldr r1, [pc, #64] ; (8028c6c ) 8028c2a: 881b ldrh r3, [r3, #0] 8028c2c: 9200 str r2, [sp, #0] 8028c2e: 4a10 ldr r2, [pc, #64] ; (8028c70 ) 8028c30: 8812 ldrh r2, [r2, #0] 8028c32: 9201 str r2, [sp, #4] 8028c34: a803 add r0, sp, #12 8028c36: 6962 ldr r2, [r4, #20] 8028c38: f7fe fdec bl 8027814 ups_send_block(req, strlen(req)); 8028c3c: a803 add r0, sp, #12 8028c3e: f7f9 f937 bl 8021eb0 8028c42: b2c1 uxtb r1, r0 8028c44: a803 add r0, sp, #12 8028c46: e006 b.n 8028c56 } else{ ups_send_block(MegaTecCMD[command], strlen(MegaTecCMD[command])); 8028c48: f854 4020 ldr.w r4, [r4, r0, lsl #2] 8028c4c: 4620 mov r0, r4 8028c4e: f7f9 f92f bl 8021eb0 8028c52: b2c1 uxtb r1, r0 8028c54: 4620 mov r0, r4 8028c56: f7fe f845 bl 8026ce4 } } 8028c5a: b006 add sp, #24 8028c5c: bd10 pop {r4, pc} 8028c5e: bf00 nop 8028c60: 20000664 .word 0x20000664 8028c64: 080399a0 .word 0x080399a0 8028c68: 20000b48 .word 0x20000b48 8028c6c: 0803999b .word 0x0803999b 8028c70: 20000b12 .word 0x20000b12 08028c74 : bool ups_megatec_rx_pdu(void) { 8028c74: b510 push {r4, lr} int c = 0; ups_pdu.len = 0; 8028c76: 4c0e ldr r4, [pc, #56] ; (8028cb0 ) 8028c78: 2000 movs r0, #0 8028c7a: 8660 strh r0, [r4, #50] ; 0x32 while ((ups_pdu.len < UPS_PDU_MAX_LEN) && (c != 0x0d)) { 8028c7c: e00d b.n 8028c9a c = ups_getchar(500);//portMAX_DELAY 8028c7e: f44f 70fa mov.w r0, #500 ; 0x1f4 8028c82: f7fe f853 bl 8026d2c if(c < 0) 8028c86: 2800 cmp r0, #0 8028c88: da03 bge.n 8028c92 { ups_pdu.len = 0; 8028c8a: 4b09 ldr r3, [pc, #36] ; (8028cb0 ) 8028c8c: 2200 movs r2, #0 8028c8e: 865a strh r2, [r3, #50] ; 0x32 break; 8028c90: e008 b.n 8028ca4 } ups_pdu.data[ups_pdu.len++] = c; 8028c92: 8e63 ldrh r3, [r4, #50] ; 0x32 8028c94: 54e0 strb r0, [r4, r3] 8028c96: 3301 adds r3, #1 8028c98: 8663 strh r3, [r4, #50] ; 0x32 { int c = 0; ups_pdu.len = 0; while ((ups_pdu.len < UPS_PDU_MAX_LEN) && (c != 0x0d)) { 8028c9a: 8e63 ldrh r3, [r4, #50] ; 0x32 8028c9c: 2b31 cmp r3, #49 ; 0x31 8028c9e: d801 bhi.n 8028ca4 8028ca0: 280d cmp r0, #13 8028ca2: d1ec bne.n 8028c7e break; } ups_pdu.data[ups_pdu.len++] = c; } if (ups_pdu.len == 0) 8028ca4: 4b02 ldr r3, [pc, #8] ; (8028cb0 ) 8028ca6: 8e58 ldrh r0, [r3, #50] ; 0x32 return false; return true; } 8028ca8: 3000 adds r0, #0 8028caa: bf18 it ne 8028cac: 2001 movne r0, #1 8028cae: bd10 pop {r4, pc} 8028cb0: 20000b14 .word 0x20000b14 08028cb4 : void ups_status_response(char *data) { 8028cb4: 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] != '(') 8028cb8: 7803 ldrb r3, [r0, #0] 8028cba: 2b28 cmp r3, #40 ; 0x28 return true; } void ups_status_response(char *data) { 8028cbc: 4604 mov r4, r0 uint8_t i; char *endValue; char value[10]; uint8_t len = 0; if(data[0] != '(') 8028cbe: f040 80da bne.w 8028e76 return; UPS.Present = true; 8028cc2: 4b6e ldr r3, [pc, #440] ; (8028e7c ) 8028cc4: 2201 movs r2, #1 8028cc6: f883 202c strb.w r2, [r3, #44] ; 0x2c UPS.Flag_Present = true; 8028cca: f883 202d strb.w r2, [r3, #45] ; 0x2d UPS.cnt_err_ups = 0; 8028cce: 2200 movs r2, #0 8028cd0: f883 202b strb.w r2, [r3, #43] ; 0x2b if(flUpdateLog){ 8028cd4: 4b6a ldr r3, [pc, #424] ; (8028e80 ) 8028cd6: 7819 ldrb r1, [r3, #0] 8028cd8: b111 cbz r1, 8028ce0 flUpdateLog = false; 8028cda: 701a strb r2, [r3, #0] log_add(data); 8028cdc: f000 fe68 bl 80299b0 } data++; 8028ce0: 3401 adds r4, #1 memset(value, 0, 10); 8028ce2: 220a movs r2, #10 8028ce4: 2100 movs r1, #0 8028ce6: a801 add r0, sp, #4 8028ce8: f7f8 ff0a bl 8021b00 endValue = strpbrk(data," "); 8028cec: 4620 mov r0, r4 8028cee: 4965 ldr r1, [pc, #404] ; (8028e84 ) 8028cf0: f7f9 f9c8 bl 8022084 len = endValue - data; 8028cf4: 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); } 8028cf6: b2c6 uxtb r6, r0 data++; memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028cf8: 4632 mov r2, r6 8028cfa: 4621 mov r1, r4 8028cfc: a801 add r0, sp, #4 8028cfe: f7f9 f98f bl 8022020 data += (len + 1); UPS.VAC_in = atof(value); 8028d02: a801 add r0, sp, #4 8028d04: f7f8 fdd8 bl 80218b8 8028d08: f7f7 ff3c bl 8020b84 <__aeabi_d2f> memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8028d0c: 3601 adds r6, #1 8028d0e: 19a6 adds r6, r4, r6 UPS.VAC_in = atof(value); 8028d10: 4c5a ldr r4, [pc, #360] ; (8028e7c ) //TODO memset(value, 0, 10); 8028d12: 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); 8028d14: 6060 str r0, [r4, #4] //TODO memset(value, 0, 10); 8028d16: 2100 movs r1, #0 8028d18: a801 add r0, sp, #4 8028d1a: f7f8 fef1 bl 8021b00 endValue = strpbrk(data," "); 8028d1e: 4630 mov r0, r6 8028d20: 4958 ldr r1, [pc, #352] ; (8028e84 ) 8028d22: f7f9 f9af bl 8022084 len = endValue - data; 8028d26: 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); } 8028d28: b2c5 uxtb r5, r0 //TODO memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028d2a: 4631 mov r1, r6 8028d2c: 462a mov r2, r5 8028d2e: a801 add r0, sp, #4 data += (len + 1); 8028d30: 3501 adds r5, #1 //TODO memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028d32: f7f9 f975 bl 8022020 data += (len + 1); 8028d36: 1975 adds r5, r6, r5 memset(value, 0, 10); 8028d38: 220a movs r2, #10 8028d3a: 2100 movs r1, #0 8028d3c: a801 add r0, sp, #4 8028d3e: f7f8 fedf bl 8021b00 endValue = strpbrk(data," "); 8028d42: 4628 mov r0, r5 8028d44: 494f ldr r1, [pc, #316] ; (8028e84 ) 8028d46: f7f9 f99d bl 8022084 len = endValue - data; 8028d4a: 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); } 8028d4c: fa5f f880 uxtb.w r8, r0 data += (len + 1); memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028d50: 4642 mov r2, r8 8028d52: 4629 mov r1, r5 8028d54: a801 add r0, sp, #4 8028d56: f7f9 f963 bl 8022020 data += (len + 1); UPS.VAC_out = atof(value); 8028d5a: a801 add r0, sp, #4 8028d5c: f7f8 fdac bl 80218b8 8028d60: f7f7 ff10 bl 8020b84 <__aeabi_d2f> memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8028d64: f108 0801 add.w r8, r8, #1 8028d68: 44a8 add r8, r5 UPS.VAC_out = atof(value); memset(value, 0, 10); 8028d6a: 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); 8028d6c: 60a0 str r0, [r4, #8] memset(value, 0, 10); 8028d6e: 2100 movs r1, #0 8028d70: a801 add r0, sp, #4 8028d72: f7f8 fec5 bl 8021b00 endValue = strpbrk(data," "); 8028d76: 4943 ldr r1, [pc, #268] ; (8028e84 ) 8028d78: 4640 mov r0, r8 8028d7a: f7f9 f983 bl 8022084 len = endValue - data; 8028d7e: 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); } 8028d82: b2c7 uxtb r7, r0 UPS.VAC_out = atof(value); memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028d84: 463a mov r2, r7 8028d86: 4641 mov r1, r8 8028d88: a801 add r0, sp, #4 8028d8a: f7f9 f949 bl 8022020 data += (len + 1); UPS.Load = atoi(value); 8028d8e: a801 add r0, sp, #4 8028d90: f7f8 fd96 bl 80218c0 memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8028d94: 3701 adds r7, #1 8028d96: 4447 add r7, r8 UPS.Load = atoi(value); memset(value, 0, 10); 8028d98: 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); 8028d9a: 7420 strb r0, [r4, #16] memset(value, 0, 10); 8028d9c: 2100 movs r1, #0 8028d9e: a801 add r0, sp, #4 8028da0: f7f8 feae bl 8021b00 endValue = strpbrk(data," "); 8028da4: 4937 ldr r1, [pc, #220] ; (8028e84 ) 8028da6: 4638 mov r0, r7 8028da8: f7f9 f96c bl 8022084 len = endValue - data; 8028dac: 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); } 8028dae: b2c6 uxtb r6, r0 UPS.Load = atoi(value); memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028db0: 4632 mov r2, r6 8028db2: 4639 mov r1, r7 8028db4: a801 add r0, sp, #4 8028db6: f7f9 f933 bl 8022020 data += (len + 1); UPS.Freq_in = atof(value); 8028dba: a801 add r0, sp, #4 8028dbc: f7f8 fd7c bl 80218b8 8028dc0: f7f7 fee0 bl 8020b84 <__aeabi_d2f> memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8028dc4: 3601 adds r6, #1 8028dc6: 19be adds r6, r7, r6 UPS.Freq_in = atof(value); 8028dc8: 6020 str r0, [r4, #0] //TODO memset(value, 0, 10); 8028dca: 220a movs r2, #10 8028dcc: 2100 movs r1, #0 8028dce: a801 add r0, sp, #4 8028dd0: f7f8 fe96 bl 8021b00 endValue = strpbrk(data," "); 8028dd4: 4630 mov r0, r6 8028dd6: 492b ldr r1, [pc, #172] ; (8028e84 ) 8028dd8: f7f9 f954 bl 8022084 len = endValue - data; 8028ddc: 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); } 8028dde: b2c5 uxtb r5, r0 //TODO memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028de0: 462a mov r2, r5 8028de2: 4631 mov r1, r6 8028de4: a801 add r0, sp, #4 8028de6: f7f9 f91b bl 8022020 data += (len + 1); UPS.SOC = 100*(atof(value)); 8028dea: a801 add r0, sp, #4 8028dec: f7f8 fd64 bl 80218b8 8028df0: 4b25 ldr r3, [pc, #148] ; (8028e88 ) 8028df2: 2200 movs r2, #0 8028df4: f7f7 fbe4 bl 80205c0 <__aeabi_dmul> 8028df8: f7f7 fea4 bl 8020b44 <__aeabi_d2uiz> //TODO memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8028dfc: 3501 adds r5, #1 8028dfe: 1975 adds r5, r6, r5 UPS.SOC = 100*(atof(value)); 8028e00: 7460 strb r0, [r4, #17] memset(value, 0, 10); 8028e02: 220a movs r2, #10 8028e04: 2100 movs r1, #0 8028e06: a801 add r0, sp, #4 8028e08: f7f8 fe7a bl 8021b00 endValue = strpbrk(data," "); 8028e0c: 4628 mov r0, r5 8028e0e: 491d ldr r1, [pc, #116] ; (8028e84 ) 8028e10: f7f9 f938 bl 8022084 len = endValue - data; 8028e14: 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); } 8028e16: b2c6 uxtb r6, r0 UPS.SOC = 100*(atof(value)); memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028e18: 4632 mov r2, r6 8028e1a: 4629 mov r1, r5 8028e1c: a801 add r0, sp, #4 8028e1e: f7f9 f8ff bl 8022020 data += (len + 1); UPS.Temp = atof(value); 8028e22: a801 add r0, sp, #4 8028e24: f7f8 fd48 bl 80218b8 8028e28: f7f7 feac bl 8020b84 <__aeabi_d2f> memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8028e2c: 3601 adds r6, #1 8028e2e: 19ad adds r5, r5, r6 UPS.Temp = atof(value); 8028e30: 60e0 str r0, [r4, #12] memset(value, 0, 10); 8028e32: 220a movs r2, #10 8028e34: 2100 movs r1, #0 8028e36: a801 add r0, sp, #4 8028e38: f7f8 fe62 bl 8021b00 endValue = strpbrk(data,"\r"); 8028e3c: 4913 ldr r1, [pc, #76] ; (8028e8c ) 8028e3e: 4628 mov r0, r5 8028e40: f7f9 f920 bl 8022084 len = endValue - data; 8028e44: 1b40 subs r0, r0, r5 8028e46: b2c4 uxtb r4, r0 strncpy(value, data, len); 8028e48: 4629 mov r1, r5 8028e4a: a801 add r0, sp, #4 8028e4c: 4622 mov r2, r4 8028e4e: f7f9 f8e7 bl 8022020 uint8_t stat = 0; for(i = 0; i < len; i ++) 8028e52: 2300 movs r3, #0 memset(value, 0, 10); endValue = strpbrk(data,"\r"); len = endValue - data; strncpy(value, data, len); uint8_t stat = 0; 8028e54: 4619 mov r1, r3 for(i = 0; i < len; i ++) 8028e56: e009 b.n 8028e6c { stat |= (value[i] - 0x30) << (7-i); 8028e58: aa01 add r2, sp, #4 return false; return true; } void ups_status_response(char *data) 8028e5a: 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); 8028e5e: 5c9a ldrb r2, [r3, r2] 8028e60: 3a30 subs r2, #48 ; 0x30 8028e62: fa02 f200 lsl.w r2, r2, r0 8028e66: 4311 orrs r1, r2 8028e68: b2c9 uxtb r1, r1 8028e6a: 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 ++) 8028e6c: b2da uxtb r2, r3 8028e6e: 42a2 cmp r2, r4 8028e70: d3f2 bcc.n 8028e58 { stat |= (value[i] - 0x30) << (7-i); } UPS.Status = stat; 8028e72: 4b02 ldr r3, [pc, #8] ; (8028e7c ) 8028e74: 74d9 strb r1, [r3, #19] } 8028e76: e8bd 81ff ldmia.w sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, pc} 8028e7a: bf00 nop 8028e7c: 2000cba4 .word 0x2000cba4 8028e80: 20000bb8 .word 0x20000bb8 8028e84: 080399a6 .word 0x080399a6 8028e88: 40590000 .word 0x40590000 8028e8c: 08045951 .word 0x08045951 08028e90 : void ups_info_response(char *data) { 8028e90: b538 push {r3, r4, r5, lr} uint8_t i = 0; char *endValue; uint8_t len = 0; if(data[0] != '#') 8028e92: 7803 ldrb r3, [r0, #0] 8028e94: 2b23 cmp r3, #35 ; 0x23 8028e96: d131 bne.n 8028efc return; UPS.Present = true; 8028e98: 4b19 ldr r3, [pc, #100] ; (8028f00 ) 8028e9a: 2201 movs r2, #1 8028e9c: f883 202c strb.w r2, [r3, #44] ; 0x2c UPS.Flag_Present = true; 8028ea0: f883 202d strb.w r2, [r3, #45] ; 0x2d UPS.cnt_err_ups = 0; data++; data += 16; 8028ea4: 3011 adds r0, #17 if(data[0] != '#') return; UPS.Present = true; UPS.Flag_Present = true; UPS.cnt_err_ups = 0; 8028ea6: 2200 movs r2, #0 8028ea8: f883 202b strb.w r2, [r3, #43] ; 0x2b data++; data += 16; while(data[0] == ' '){ 8028eac: 4603 mov r3, r0 8028eae: 461c mov r4, r3 stat |= (value[i] - 0x30) << (7-i); } UPS.Status = stat; } void ups_info_response(char *data) 8028eb0: 1a1a subs r2, r3, r0 data++; data += 16; while(data[0] == ' '){ 8028eb2: 7821 ldrb r1, [r4, #0] 8028eb4: 3301 adds r3, #1 8028eb6: 2920 cmp r1, #32 stat |= (value[i] - 0x30) << (7-i); } UPS.Status = stat; } void ups_info_response(char *data) 8028eb8: b2d2 uxtb r2, r2 data++; data += 16; while(data[0] == ' '){ 8028eba: d0f8 beq.n 8028eae data ++; i ++; } if(i < 11){ 8028ebc: 2a0a cmp r2, #10 8028ebe: d80d bhi.n 8028edc endValue = strpbrk(data," "); 8028ec0: 4620 mov r0, r4 8028ec2: 4910 ldr r1, [pc, #64] ; (8028f04 ) 8028ec4: f7f9 f8de bl 8022084 len = endValue - data; 8028ec8: 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); } 8028eca: b2c5 uxtb r5, r0 i ++; } if(i < 11){ endValue = strpbrk(data," "); len = endValue - data; strncpy(UPS.model, data, len); 8028ecc: 4621 mov r1, r4 8028ece: 462a mov r2, r5 8028ed0: 480d ldr r0, [pc, #52] ; (8028f08 ) data += (len + 1); 8028ed2: 3501 adds r5, #1 i ++; } if(i < 11){ endValue = strpbrk(data," "); len = endValue - data; strncpy(UPS.model, data, len); 8028ed4: f7f9 f8a4 bl 8022020 data += (len + 1); 8028ed8: 1964 adds r4, r4, r5 8028eda: e003 b.n 8028ee4 } else { strcpy(UPS.model, "RTMP II"); 8028edc: 480a ldr r0, [pc, #40] ; (8028f08 ) 8028ede: 490b ldr r1, [pc, #44] ; (8028f0c ) 8028ee0: f7f8 ff88 bl 8021df4 } endValue = strpbrk(data,"\r"); 8028ee4: 4620 mov r0, r4 8028ee6: 490a ldr r1, [pc, #40] ; (8028f10 ) 8028ee8: f7f9 f8cc bl 8022084 len = endValue - data; 8028eec: 1b02 subs r2, r0, r4 strncpy(UPS.vertion, data, len); 8028eee: 4809 ldr r0, [pc, #36] ; (8028f14 ) 8028ef0: 4621 mov r1, r4 8028ef2: b2d2 uxtb r2, r2 } 8028ef4: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} strcpy(UPS.model, "RTMP II"); } endValue = strpbrk(data,"\r"); len = endValue - data; strncpy(UPS.vertion, data, len); 8028ef8: f7f9 b892 b.w 8022020 8028efc: bd38 pop {r3, r4, r5, pc} 8028efe: bf00 nop 8028f00: 2000cba4 .word 0x2000cba4 8028f04: 080399a6 .word 0x080399a6 8028f08: 2000cbb9 .word 0x2000cbb9 8028f0c: 080399a8 .word 0x080399a8 8028f10: 08045951 .word 0x08045951 8028f14: 2000cbc4 .word 0x2000cbc4 08028f18 : } return -1; } void request_task(void) { 8028f18: b5f8 push {r3, r4, r5, r6, r7, lr} for(;;) { if(UPS.Present == true){ 8028f1a: 4c26 ldr r4, [pc, #152] ; (8028fb4 ) memset(UPS.model, 0, 11); memset(UPS.vertion, 0, 11); } } } if(megatec_send){ 8028f1c: 4e26 ldr r6, [pc, #152] ; (8028fb8 ) if(UPS.Flag_Present == false) { if(UPS.cnt_err_ups != 2) UPS.cnt_err_ups++; else{ UPS.Freq_in = 0; 8028f1e: 2700 movs r7, #0 void request_task(void) { for(;;) { if(UPS.Present == true){ 8028f20: f894 302c ldrb.w r3, [r4, #44] ; 0x2c 8028f24: b1fb cbz r3, 8028f66 if(UPS.Flag_Present == false) 8028f26: f894 502d ldrb.w r5, [r4, #45] ; 0x2d 8028f2a: b9e5 cbnz r5, 8028f66 { if(UPS.cnt_err_ups != 2) 8028f2c: f894 302b ldrb.w r3, [r4, #43] ; 0x2b 8028f30: 2b02 cmp r3, #2 8028f32: d003 beq.n 8028f3c UPS.cnt_err_ups++; 8028f34: 3301 adds r3, #1 8028f36: f884 302b strb.w r3, [r4, #43] ; 0x2b 8028f3a: e014 b.n 8028f66 UPS.work_time = 0; UPS.Status = 0; UPS.Alarm = 0; UPS.Present = false; memset(UPS.model, 0, 11); 8028f3c: 4629 mov r1, r5 8028f3e: 220b movs r2, #11 8028f40: 481e ldr r0, [pc, #120] ; (8028fbc ) if(UPS.Flag_Present == false) { if(UPS.cnt_err_ups != 2) UPS.cnt_err_ups++; else{ UPS.Freq_in = 0; 8028f42: 6027 str r7, [r4, #0] UPS.VAC_in = 0; 8028f44: 6067 str r7, [r4, #4] UPS.VAC_out = 0; 8028f46: 60a7 str r7, [r4, #8] UPS.Temp = 0; 8028f48: 60e7 str r7, [r4, #12] UPS.Load = 0; 8028f4a: 7425 strb r5, [r4, #16] UPS.SOC = 0; 8028f4c: 7465 strb r5, [r4, #17] UPS.work_time = 0; 8028f4e: 74a5 strb r5, [r4, #18] UPS.Status = 0; 8028f50: 74e5 strb r5, [r4, #19] UPS.Alarm = 0; 8028f52: 7525 strb r5, [r4, #20] UPS.Present = false; 8028f54: f884 502c strb.w r5, [r4, #44] ; 0x2c memset(UPS.model, 0, 11); 8028f58: f7f8 fdd2 bl 8021b00 memset(UPS.vertion, 0, 11); 8028f5c: 4818 ldr r0, [pc, #96] ; (8028fc0 ) 8028f5e: 4629 mov r1, r5 8028f60: 220b movs r2, #11 8028f62: f7f8 fdcd bl 8021b00 } } } if(megatec_send){ 8028f66: 7833 ldrb r3, [r6, #0] 8028f68: b16b cbz r3, 8028f86 megatec_send= false; 8028f6a: 2000 movs r0, #0 8028f6c: 7030 strb r0, [r6, #0] UPS.Flag_Present = false; 8028f6e: f884 002d strb.w r0, [r4, #45] ; 0x2d send_MegaTec_cmd(ups_status_req); 8028f72: f7ff fe3b bl 8028bec if (ups_megatec_rx_pdu()) 8028f76: f7ff fe7d bl 8028c74 8028f7a: b110 cbz r0, 8028f82 void ups_megatec_process_pdu(cmdMegaTecEnums_t command) { switch(command) { case ups_status_req: ups_status_response(ups_pdu.data); 8028f7c: 4811 ldr r0, [pc, #68] ; (8028fc4 ) 8028f7e: f7ff fe99 bl 8028cb4 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; 8028f82: 2301 movs r3, #1 8028f84: 7033 strb r3, [r6, #0] } //vTaskDelay(100); if(megatec_send){ 8028f86: 7833 ldrb r3, [r6, #0] 8028f88: b173 cbz r3, 8028fa8 megatec_send = false; 8028f8a: 2300 movs r3, #0 UPS.Flag_Present = false; send_MegaTec_cmd(ups_info); 8028f8c: 2009 movs r0, #9 megatec_send=true; } //vTaskDelay(100); if(megatec_send){ megatec_send = false; 8028f8e: 7033 strb r3, [r6, #0] UPS.Flag_Present = false; 8028f90: f884 302d strb.w r3, [r4, #45] ; 0x2d send_MegaTec_cmd(ups_info); 8028f94: f7ff fe2a bl 8028bec if (ups_megatec_rx_pdu()) 8028f98: f7ff fe6c bl 8028c74 8028f9c: b110 cbz r0, 8028fa4 { case ups_status_req: ups_status_response(ups_pdu.data); break; case ups_info: ups_info_response(ups_pdu.data); 8028f9e: 4809 ldr r0, [pc, #36] ; (8028fc4 ) 8028fa0: f7ff ff76 bl 8028e90 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; 8028fa4: 2301 movs r3, #1 8028fa6: 7033 strb r3, [r6, #0] } vTaskDelay(1000); 8028fa8: f44f 707a mov.w r0, #1000 ; 0x3e8 8028fac: f001 ffa8 bl 802af00 } 8028fb0: e7b6 b.n 8028f20 8028fb2: bf00 nop 8028fb4: 2000cba4 .word 0x2000cba4 8028fb8: 20000662 .word 0x20000662 8028fbc: 2000cbb9 .word 0x2000cbb9 8028fc0: 2000cbc4 .word 0x2000cbc4 8028fc4: 20000b14 .word 0x20000b14 08028fc8 : break; } } int ups_metac_service_pdu(cmdMegaTecEnums_t command) { 8028fc8: b570 push {r4, r5, r6, lr} 8028fca: 4606 mov r6, r0 while(!megatec_send) 8028fcc: 4c14 ldr r4, [pc, #80] ; (8029020 ) 8028fce: e002 b.n 8028fd6 { vTaskDelay(50); 8028fd0: 2032 movs r0, #50 ; 0x32 8028fd2: f001 ff95 bl 802af00 } } int ups_metac_service_pdu(cmdMegaTecEnums_t command) { while(!megatec_send) 8028fd6: 7823 ldrb r3, [r4, #0] 8028fd8: 4d11 ldr r5, [pc, #68] ; (8029020 ) 8028fda: 2b00 cmp r3, #0 8028fdc: d0f8 beq.n 8028fd0 { vTaskDelay(50); } megatec_send = false; 8028fde: 2300 movs r3, #0 send_MegaTec_cmd(command); 8028fe0: 4630 mov r0, r6 { while(!megatec_send) { vTaskDelay(50); } megatec_send = false; 8028fe2: 702b strb r3, [r5, #0] send_MegaTec_cmd(command); 8028fe4: f7ff fe02 bl 8028bec if (ups_megatec_rx_pdu()) 8028fe8: f7ff fe44 bl 8028c74 8028fec: b190 cbz r0, 8029014 { megatec_send = true; 8028fee: 2401 movs r4, #1 if(strncmp(ups_pdu.data, "ACK", 3) == 0) 8028ff0: 480c ldr r0, [pc, #48] ; (8029024 ) 8028ff2: 490d ldr r1, [pc, #52] ; (8029028 ) } megatec_send = false; send_MegaTec_cmd(command); if (ups_megatec_rx_pdu()) { megatec_send = true; 8028ff4: 702c strb r4, [r5, #0] if(strncmp(ups_pdu.data, "ACK", 3) == 0) 8028ff6: 2203 movs r2, #3 8028ff8: f7f8 ffbc bl 8021f74 8028ffc: b168 cbz r0, 802901a return 1; else if(strncmp(ups_pdu.data, "NCK", 3) == 0) 8028ffe: 490b ldr r1, [pc, #44] ; (802902c ) 8029000: 4808 ldr r0, [pc, #32] ; (8029024 ) 8029002: 2203 movs r2, #3 8029004: f7f8 ffb6 bl 8021f74 return 0; 8029008: 2800 cmp r0, #0 802900a: bf14 ite ne 802900c: f04f 30ff movne.w r0, #4294967295 8029010: 2000 moveq r0, #0 8029012: bd70 pop {r4, r5, r6, pc} } return -1; 8029014: f04f 30ff mov.w r0, #4294967295 8029018: 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; 802901a: 4620 mov r0, r4 else if(strncmp(ups_pdu.data, "NCK", 3) == 0) return 0; } return -1; } 802901c: bd70 pop {r4, r5, r6, pc} 802901e: bf00 nop 8029020: 20000662 .word 0x20000662 8029024: 20000b14 .word 0x20000b14 8029028: 080399b0 .word 0x080399b0 802902c: 080399b4 .word 0x080399b4 08029030 : vTaskDelay(1000); } } void ups_megatec_init(void) { 8029030: b51f push {r0, r1, r2, r3, r4, lr} init_UPS_value(); 8029032: f7ff fdb7 bl 8028ba4 UPS.Present = true; 8029036: 4b08 ldr r3, [pc, #32] ; (8029058 ) xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); 8029038: 4908 ldr r1, [pc, #32] ; (802905c ) 802903a: 4809 ldr r0, [pc, #36] ; (8029060 ) } } void ups_megatec_init(void) { init_UPS_value(); UPS.Present = true; 802903c: 2201 movs r2, #1 802903e: f883 202c strb.w r2, [r3, #44] ; 0x2c xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); 8029042: 2300 movs r3, #0 8029044: 9300 str r3, [sp, #0] 8029046: 9301 str r3, [sp, #4] 8029048: 9302 str r3, [sp, #8] 802904a: 9303 str r3, [sp, #12] 802904c: f44f 7280 mov.w r2, #256 ; 0x100 8029050: f001 fcbc bl 802a9cc } 8029054: b005 add sp, #20 8029056: bd00 pop {pc} 8029058: 2000cba4 .word 0x2000cba4 802905c: 080399b8 .word 0x080399b8 8029060: 08028f19 .word 0x08028f19 08029064 : #include "trap_api.h" #include #include "FreeRTOS.h" #include "task.h" void Reboot(void) { 8029064: b508 push {r3, lr} SNMP_SendUserTrap(DEVICE_REBOOTED); 8029066: 2004 movs r0, #4 8029068: f00e ffe8 bl 803803c log_event_data(LOG_SYSTEM_BOOT, "Администратор"); 802906c: 2000 movs r0, #0 802906e: 4909 ldr r1, [pc, #36] ; (8029094 ) 8029070: f000 fc8e bl 8029990 vTaskDelay(1010); 8029074: f240 30f2 movw r0, #1010 ; 0x3f2 8029078: f001 ff42 bl 802af00 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"); 802907c: 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) | 8029080: 4a05 ldr r2, [pc, #20] ; (8029098 ) 8029082: 4b06 ldr r3, [pc, #24] ; (802909c ) 8029084: 68d1 ldr r1, [r2, #12] 8029086: f401 61e0 and.w r1, r1, #1792 ; 0x700 802908a: 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) | 802908c: 60d3 str r3, [r2, #12] 802908e: f3bf 8f4f dsb sy 8029092: e7fe b.n 8029092 8029094: 08039980 .word 0x08039980 8029098: e000ed00 .word 0xe000ed00 802909c: 05fa0004 .word 0x05fa0004 080290a0 : #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; 80290a0: 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; 80290a2: e880 0006 stmia.w r0, {r1, r2} rbuf32->read_index = 0; 80290a6: 6083 str r3, [r0, #8] rbuf32->write_index = 0; 80290a8: 60c3 str r3, [r0, #12] 80290aa: 4770 bx lr 080290ac : return full_space; } bool rbuf_isfull(rbuf_t *rbuf) { int r_tmp; if (rbuf->write_index == (rbuf->size - 1)) { 80290ac: 6842 ldr r2, [r0, #4] 80290ae: 68c3 ldr r3, [r0, #12] 80290b0: 6880 ldr r0, [r0, #8] 80290b2: 1e51 subs r1, r2, #1 80290b4: 428b cmp r3, r1 r_tmp = rbuf->read_index + rbuf->size; 80290b6: bf08 it eq 80290b8: 1810 addeq r0, r2, r0 } else r_tmp = rbuf->read_index; if (r_tmp - rbuf->write_index == 1) 80290ba: 1ac0 subs r0, r0, r3 return true; else return false; } 80290bc: 1e42 subs r2, r0, #1 80290be: 4250 negs r0, r2 80290c0: 4150 adcs r0, r2 80290c2: 4770 bx lr 080290c4 : rbuf64->read_index = 0; rbuf64->write_index = 0; } bool rbuf_isempty(rbuf_t *rbuf) { if (rbuf->read_index == rbuf->write_index) 80290c4: 6883 ldr r3, [r0, #8] 80290c6: 68c2 ldr r2, [r0, #12] 80290c8: 4293 cmp r3, r2 80290ca: d105 bne.n 80290d8 80290cc: e002 b.n 80290d4 /* 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; 80290ce: 2300 movs r3, #0 80290d0: 6083 str r3, [r0, #8] 80290d2: e00a b.n 80290ea return true; } else return false; 80290d4: 2000 movs r0, #0 80290d6: 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++]; 80290d8: 6802 ldr r2, [r0, #0] 80290da: f852 2023 ldr.w r2, [r2, r3, lsl #2] 80290de: 600a str r2, [r1, #0] /* swap the read pointer */ if (rbuf32->read_index == (rbuf32->size)) 80290e0: 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++]; 80290e2: 3301 adds r3, #1 /* swap the read pointer */ if (rbuf32->read_index == (rbuf32->size)) 80290e4: 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++]; 80290e6: 6083 str r3, [r0, #8] /* swap the read pointer */ if (rbuf32->read_index == (rbuf32->size)) 80290e8: d0f1 beq.n 80290ce rbuf32->read_index = 0; return true; 80290ea: 2001 movs r0, #1 } else return false; } 80290ec: 4770 bx lr 080290ee : /* * 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) { 80290ee: b538 push {r3, r4, r5, lr} 80290f0: 4604 mov r4, r0 80290f2: 460d mov r5, r1 if(!rbuf_isfull(rbuf32)) 80290f4: f7ff ffda bl 80290ac 80290f8: b950 cbnz r0, 8029110 { rbuf32->buf_ptr[rbuf32->write_index++] = data; 80290fa: 68e3 ldr r3, [r4, #12] 80290fc: 6822 ldr r2, [r4, #0] 80290fe: f842 5023 str.w r5, [r2, r3, lsl #2] /* swap the write pointer */ if (rbuf32->write_index == (rbuf32->size)) 8029102: 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; 8029104: 3301 adds r3, #1 /* swap the write pointer */ if (rbuf32->write_index == (rbuf32->size)) 8029106: 4293 cmp r3, r2 */ bool rbuf32_put(rbuf_t *rbuf32, uint32_t data) { if(!rbuf_isfull(rbuf32)) { rbuf32->buf_ptr[rbuf32->write_index++] = data; 8029108: 60e3 str r3, [r4, #12] /* swap the write pointer */ if (rbuf32->write_index == (rbuf32->size)) 802910a: d103 bne.n 8029114 rbuf32->write_index = 0; 802910c: 60e0 str r0, [r4, #12] 802910e: e001 b.n 8029114 return true; } else return false; 8029110: 2000 movs r0, #0 8029112: 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)) 8029114: 2001 movs r0, #1 rbuf32->write_index = 0; return true; } else return false; } 8029116: bd38 pop {r3, r4, r5, pc} 08029118 : #include #include /* Converts a hex character to its integer value */ char from_hex(char ch) { return isdigit(ch) ? ch - '0' : tolower(ch) - 'a' + 10; 8029118: 4b08 ldr r3, [pc, #32] ; (802913c ) 802911a: 681b ldr r3, [r3, #0] 802911c: 181b adds r3, r3, r0 802911e: 785b ldrb r3, [r3, #1] 8029120: f003 0204 and.w r2, r3, #4 8029124: b2d2 uxtb r2, r2 8029126: b10a cbz r2, 802912c 8029128: 3830 subs r0, #48 ; 0x30 802912a: e005 b.n 8029138 802912c: f003 0303 and.w r3, r3, #3 8029130: 2b01 cmp r3, #1 8029132: bf08 it eq 8029134: 3020 addeq r0, #32 8029136: 3857 subs r0, #87 ; 0x57 8029138: b2c0 uxtb r0, r0 } 802913a: 4770 bx lr 802913c: 20000000 .word 0x20000000 08029140 : 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) { 8029140: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8029144: 4607 mov r7, r0 8029146: 460e mov r6, r1 char *pstr = inbuf, *buf = outbuf, *pbuf = buf; 8029148: 4604 mov r4, r0 802914a: 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++ = ' '; 802914c: 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) { 8029150: e01e b.n 8029190 if (*pstr == '%') { 8029152: 2b25 cmp r3, #37 ; 0x25 8029154: d112 bne.n 802917c if (pstr[1] && pstr[2]) { 8029156: 7868 ldrb r0, [r5, #1] 8029158: b1c0 cbz r0, 802918c 802915a: f895 8002 ldrb.w r8, [r5, #2] 802915e: f1b8 0f00 cmp.w r8, #0 8029162: d013 beq.n 802918c *pbuf++ = from_hex(pstr[1]) << 4 | from_hex(pstr[2]); 8029164: f7ff ffd8 bl 8029118 8029168: 4682 mov sl, r0 802916a: 4640 mov r0, r8 802916c: f7ff ffd4 bl 8029118 8029170: ea40 100a orr.w r0, r0, sl, lsl #4 8029174: f804 0b01 strb.w r0, [r4], #1 pstr += 2; 8029178: 3502 adds r5, #2 802917a: e007 b.n 802918c } } else if (*pstr == '+') { 802917c: 2b2b cmp r3, #43 ; 0x2b 802917e: f104 0201 add.w r2, r4, #1 *pbuf++ = ' '; 8029182: bf0c ite eq 8029184: f884 9000 strbeq.w r9, [r4] } else { *pbuf++ = *pstr; 8029188: 7023 strbne r3, [r4, #0] 802918a: 4614 mov r4, r2 } pstr++; 802918c: 3501 adds r5, #1 outlen--; 802918e: 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) { 8029190: 782b ldrb r3, [r5, #0] 8029192: b10b cbz r3, 8029198 8029194: 2e01 cmp r6, #1 8029196: d8dc bhi.n 8029152 *pbuf++ = *pstr; } pstr++; outlen--; } *pbuf = '\0'; 8029198: 2300 movs r3, #0 802919a: 7023 strb r3, [r4, #0] return buf; } 802919c: 4638 mov r0, r7 802919e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 80291a2: 0000 movs r0, r0 080291a4 : /** * @brief Мониторинг бита DI0 state */ void UPS_DI0Monitor(void) { 80291a4: b510 push {r4, lr} static bool isValueRecv = false; static uint8_t DI0OldState = 0; uint8_t DI0StateCurrent; DI0StateCurrent = get_state_din_outs(DIN1); 80291a6: 2006 movs r0, #6 80291a8: f7ff fcf4 bl 8028b94 if (!isValueRecv) { 80291ac: 4a16 ldr r2, [pc, #88] ; (8029208 ) 80291ae: 4b17 ldr r3, [pc, #92] ; (802920c ) 80291b0: 7811 ldrb r1, [r2, #0] { static bool isValueRecv = false; static uint8_t DI0OldState = 0; uint8_t DI0StateCurrent; DI0StateCurrent = get_state_din_outs(DIN1); 80291b2: 4604 mov r4, r0 if (!isValueRecv) { 80291b4: b961 cbnz r1, 80291d0 isValueRecv = true; 80291b6: 2101 movs r1, #1 80291b8: 7011 strb r1, [r2, #0] DI0OldState = DI0StateCurrent; 80291ba: 7018 strb r0, [r3, #0] if (!DI0StateCurrent){ 80291bc: bb18 cbnz r0, 8029206 log_event_data(LOG_ALARM_DIO, "Авария"); 80291be: 2007 movs r0, #7 80291c0: 4913 ldr r1, [pc, #76] ; (8029210 ) 80291c2: f000 fbe5 bl 8029990 SNMP_SendUserTrap(DI0_ALARM); 80291c6: 2006 movs r0, #6 } } } DI0OldState = DI0StateCurrent; } 80291c8: e8bd 4010 ldmia.w sp!, {r4, lr} if (!isValueRecv) { isValueRecv = true; DI0OldState = DI0StateCurrent; if (!DI0StateCurrent){ log_event_data(LOG_ALARM_DIO, "Авария"); SNMP_SendUserTrap(DI0_ALARM); 80291cc: f00e bf36 b.w 803803c } return; } if (!DI0StateCurrent) 80291d0: b910 cbnz r0, 80291d8 flCriticalAlarm = true; 80291d2: 4a10 ldr r2, [pc, #64] ; (8029214 ) 80291d4: 2101 movs r1, #1 80291d6: 7011 strb r1, [r2, #0] // Значение параметра изменилось if (DI0StateCurrent != DI0OldState) 80291d8: 781b ldrb r3, [r3, #0] 80291da: 42a3 cmp r3, r4 80291dc: d011 beq.n 8029202 { if(sSettings.sInOuts.din_type_act[0] == SNMP_TRAP) 80291de: 4b0e ldr r3, [pc, #56] ; (8029218 ) 80291e0: f893 3376 ldrb.w r3, [r3, #886] ; 0x376 80291e4: 2b02 cmp r3, #2 80291e6: d10c bne.n 8029202 { if (DI0StateCurrent){ log_event_data(LOG_ALARM_DIO, "Норма"); 80291e8: 2007 movs r0, #7 // Значение параметра изменилось if (DI0StateCurrent != DI0OldState) { if(sSettings.sInOuts.din_type_act[0] == SNMP_TRAP) { if (DI0StateCurrent){ 80291ea: b124 cbz r4, 80291f6 log_event_data(LOG_ALARM_DIO, "Норма"); 80291ec: 490b ldr r1, [pc, #44] ; (802921c ) 80291ee: f000 fbcf bl 8029990 SNMP_SendUserTrap(DI0_NORM); 80291f2: 2005 movs r0, #5 80291f4: e003 b.n 80291fe } else{ log_event_data(LOG_ALARM_DIO, "Авария"); 80291f6: 4906 ldr r1, [pc, #24] ; (8029210 ) 80291f8: f000 fbca bl 8029990 SNMP_SendUserTrap(DI0_ALARM); 80291fc: 2006 movs r0, #6 80291fe: f00e ff1d bl 803803c } } } DI0OldState = DI0StateCurrent; 8029202: 4b02 ldr r3, [pc, #8] ; (802920c ) 8029204: 701c strb r4, [r3, #0] 8029206: bd10 pop {r4, pc} 8029208: 20000b4e .word 0x20000b4e 802920c: 20000b4b .word 0x20000b4b 8029210: 080399e3 .word 0x080399e3 8029214: 20000b55 .word 0x20000b55 8029218: 2000cfc0 .word 0x2000cfc0 802921c: 080399f0 .word 0x080399f0 08029220 : /** * @brief Мониторинг бита CriticalAlarm */ void UPS_CriticalAlarmMonitor(void) { 8029220: b570 push {r4, r5, r6, lr} 8029222: b086 sub sp, #24 static uint8_t OldRO2type_Sourse = 0; uint8_t CurrRO2type_Sourse = 0; uint8_t CurrRO1type_Sourse = 0; char str[20]; memset(str, 0, 20); 8029224: 2100 movs r1, #0 8029226: a801 add r0, sp, #4 8029228: 2214 movs r2, #20 802922a: f7f8 fc69 bl 8021b00 CurrRO1type_Sourse = sSettings.sInOuts.ro_type_source[0]; 802922e: 4b3f ldr r3, [pc, #252] ; (802932c ) 8029230: f893 5374 ldrb.w r5, [r3, #884] ; 0x374 CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; 8029234: f893 6375 ldrb.w r6, [r3, #885] ; 0x375 CriticalAlarmCurrent = flCriticalAlarm; 8029238: 4b3d ldr r3, [pc, #244] ; (8029330 ) 802923a: 781c ldrb r4, [r3, #0] if (!isValueRecv) { 802923c: 4b3d ldr r3, [pc, #244] ; (8029334 ) 802923e: 7819 ldrb r1, [r3, #0] 8029240: bb29 cbnz r1, 802928e isValueRecv = true; 8029242: 2201 movs r2, #1 8029244: 701a strb r2, [r3, #0] CriticalAlarmOldState = CriticalAlarmCurrent; 8029246: 4b3c ldr r3, [pc, #240] ; (8029338 ) 8029248: 701c strb r4, [r3, #0] OldRO0type_Sourse = CurrRO1type_Sourse; 802924a: 4b3c ldr r3, [pc, #240] ; (802933c ) 802924c: 701d strb r5, [r3, #0] OldRO2type_Sourse = CurrRO2type_Sourse; 802924e: 4b3c ldr r3, [pc, #240] ; (8029340 ) if(OldRO0type_Sourse == CRITICAL){ 8029250: 4295 cmp r5, r2 if (!isValueRecv) { isValueRecv = true; CriticalAlarmOldState = CriticalAlarmCurrent; OldRO0type_Sourse = CurrRO1type_Sourse; OldRO2type_Sourse = CurrRO2type_Sourse; 8029252: 701e strb r6, [r3, #0] if(OldRO0type_Sourse == CRITICAL){ 8029254: d10a bne.n 802926c if(CriticalAlarmCurrent){ 8029256: b14c cbz r4, 802926c SetROInt(1, 0); 8029258: 4628 mov r0, r5 802925a: f7ff f964 bl 8028526 SNMP_SendUserTrap(DO0_TOGGLED); 802925e: 2007 movs r0, #7 8029260: f00e feec bl 803803c log_event_data(LOG_DO0_STATE, "Замкнуто"); 8029264: 2008 movs r0, #8 8029266: 4937 ldr r1, [pc, #220] ; (8029344 ) 8029268: f000 fb92 bl 8029990 } } if(OldRO2type_Sourse == CRITICAL){ 802926c: 4b34 ldr r3, [pc, #208] ; (8029340 ) 802926e: 7818 ldrb r0, [r3, #0] 8029270: 2801 cmp r0, #1 8029272: d159 bne.n 8029328 if(CriticalAlarmCurrent){ 8029274: 2c00 cmp r4, #0 8029276: d057 beq.n 8029328 SetROInt(1, 0); 8029278: 2100 movs r1, #0 802927a: f7ff f954 bl 8028526 SNMP_SendUserTrap(DO1_TOGGLED); 802927e: 2008 movs r0, #8 8029280: f00e fedc bl 803803c log_event_data(LOG_DO1_STATE, "Замкнуто"); 8029284: 2009 movs r0, #9 8029286: 492f ldr r1, [pc, #188] ; (8029344 ) 8029288: f000 fb82 bl 8029990 802928c: e04c b.n 8029328 } } return; } if(CriticalAlarmCurrent){ 802928e: b154 cbz r4, 80292a6 if (UPS.Present) 8029290: 4b2d ldr r3, [pc, #180] ; (8029348 ) 8029292: f893 302c ldrb.w r3, [r3, #44] ; 0x2c LED_Toggle(LED_MAJOR_R); 8029296: 200b movs r0, #11 } return; } if(CriticalAlarmCurrent){ if (UPS.Present) 8029298: b113 cbz r3, 80292a0 LED_Toggle(LED_MAJOR_R); 802929a: f7ff fc01 bl 8028aa0 802929e: e005 b.n 80292ac else LED_On(LED_MAJOR_R); 80292a0: f7ff fbc4 bl 8028a2c 80292a4: e002 b.n 80292ac } else{ LED_Off(LED_MAJOR_R); 80292a6: 200b movs r0, #11 80292a8: f7ff fbc3 bl 8028a32 } // Значение параметра изменилось if (CriticalAlarmCurrent != CriticalAlarmOldState) 80292ac: 4b22 ldr r3, [pc, #136] ; (8029338 ) 80292ae: 781b ldrb r3, [r3, #0] 80292b0: 42a3 cmp r3, r4 80292b2: d033 beq.n 802931c { if(OldRO0type_Sourse == CRITICAL){ 80292b4: 4b21 ldr r3, [pc, #132] ; (802933c ) 80292b6: 7818 ldrb r0, [r3, #0] 80292b8: 2801 cmp r0, #1 80292ba: d115 bne.n 80292e8 if(CriticalAlarmCurrent){ 80292bc: b12c cbz r4, 80292ca SetROInt(1, 0); 80292be: 2100 movs r1, #0 80292c0: f7ff f931 bl 8028526 strcat(str, "Замкнуто"); 80292c4: a801 add r0, sp, #4 80292c6: 491f ldr r1, [pc, #124] ; (8029344 ) 80292c8: e005 b.n 80292d6 } else{ SetROInt(0, 0); 80292ca: 4620 mov r0, r4 80292cc: 4621 mov r1, r4 80292ce: f7ff f92a bl 8028526 strcat(str, "Разомкнуто"); 80292d2: 491e ldr r1, [pc, #120] ; (802934c ) 80292d4: a801 add r0, sp, #4 80292d6: f7f8 fc79 bl 8021bcc } SNMP_SendUserTrap(DO0_TOGGLED); 80292da: 2007 movs r0, #7 80292dc: f00e feae bl 803803c log_event_data(LOG_DO0_STATE, str); 80292e0: 2008 movs r0, #8 80292e2: a901 add r1, sp, #4 80292e4: f000 fb54 bl 8029990 } if(OldRO2type_Sourse == CRITICAL){ 80292e8: 4b15 ldr r3, [pc, #84] ; (8029340 ) 80292ea: 7818 ldrb r0, [r3, #0] 80292ec: 2801 cmp r0, #1 80292ee: d115 bne.n 802931c if(CriticalAlarmCurrent){ 80292f0: b12c cbz r4, 80292fe SetROInt(1, 0); 80292f2: 2100 movs r1, #0 80292f4: f7ff f917 bl 8028526 strcat(str, "Замкнуто"); 80292f8: a801 add r0, sp, #4 80292fa: 4912 ldr r1, [pc, #72] ; (8029344 ) 80292fc: e005 b.n 802930a } else{ SetROInt(0, 0); 80292fe: 4620 mov r0, r4 8029300: 4621 mov r1, r4 8029302: f7ff f910 bl 8028526 strcat(str, "Разомкнуто"); 8029306: 4911 ldr r1, [pc, #68] ; (802934c ) 8029308: a801 add r0, sp, #4 802930a: f7f8 fc5f bl 8021bcc } SNMP_SendUserTrap(DO1_TOGGLED); 802930e: 2008 movs r0, #8 8029310: f00e fe94 bl 803803c log_event_data(LOG_DO1_STATE, str); 8029314: 2009 movs r0, #9 8029316: a901 add r1, sp, #4 8029318: f000 fb3a bl 8029990 SNMP_SendUserTrap(DO1_TOGGLED); log_event_data(LOG_DO1_STATE, str); } } OldRO0type_Sourse = CurrRO1type_Sourse; 802931c: 4b07 ldr r3, [pc, #28] ; (802933c ) 802931e: 701d strb r5, [r3, #0] OldRO2type_Sourse = CurrRO2type_Sourse; 8029320: 4b07 ldr r3, [pc, #28] ; (8029340 ) 8029322: 701e strb r6, [r3, #0] CriticalAlarmOldState = CriticalAlarmCurrent; 8029324: 4b04 ldr r3, [pc, #16] ; (8029338 ) 8029326: 701c strb r4, [r3, #0] } 8029328: b006 add sp, #24 802932a: bd70 pop {r4, r5, r6, pc} 802932c: 2000cfc0 .word 0x2000cfc0 8029330: 20000b55 .word 0x20000b55 8029334: 20000b53 .word 0x20000b53 8029338: 20000b54 .word 0x20000b54 802933c: 20000b5c .word 0x20000b5c 8029340: 20000b4a .word 0x20000b4a 8029344: 080399fb .word 0x080399fb 8029348: 2000cba4 .word 0x2000cba4 802934c: 08039a0c .word 0x08039a0c 08029350 : /** * @brief Мониторинг бита NonCriticalAlarm */ void UPS_NonCriticalAlarmMonitor(void) { 8029350: b5f0 push {r4, r5, r6, r7, lr} 8029352: b087 sub sp, #28 static uint8_t OldRO0type_Sourse = 0; static uint8_t OldRO2type_Sourse = 0; uint8_t CurrRO2type_Sourse = 0; uint8_t CurrRO1type_Sourse = 0; char str[20]; memset(str, 0, 20); 8029354: 2100 movs r1, #0 8029356: 2214 movs r2, #20 8029358: a801 add r0, sp, #4 802935a: f7f8 fbd1 bl 8021b00 CurrRO1type_Sourse = sSettings.sInOuts.ro_type_source[0]; CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; NonCriticalAlarmCurrent = flNonCriticalAlarm; if (!isValueRecv) { 802935e: 4f38 ldr r7, [pc, #224] ; (8029440 ) uint8_t CurrRO2type_Sourse = 0; uint8_t CurrRO1type_Sourse = 0; char str[20]; memset(str, 0, 20); CurrRO1type_Sourse = sSettings.sInOuts.ro_type_source[0]; 8029360: 4b38 ldr r3, [pc, #224] ; (8029444 ) CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; NonCriticalAlarmCurrent = flNonCriticalAlarm; if (!isValueRecv) { 8029362: 7839 ldrb r1, [r7, #0] uint8_t CurrRO2type_Sourse = 0; uint8_t CurrRO1type_Sourse = 0; char str[20]; memset(str, 0, 20); CurrRO1type_Sourse = sSettings.sInOuts.ro_type_source[0]; 8029364: f893 5374 ldrb.w r5, [r3, #884] ; 0x374 CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; 8029368: f893 6375 ldrb.w r6, [r3, #885] ; 0x375 NonCriticalAlarmCurrent = flNonCriticalAlarm; 802936c: 4b36 ldr r3, [pc, #216] ; (8029448 ) 802936e: 4a37 ldr r2, [pc, #220] ; (802944c ) 8029370: 781c ldrb r4, [r3, #0] 8029372: 4b37 ldr r3, [pc, #220] ; (8029450 ) if (!isValueRecv) { 8029374: bb19 cbnz r1, 80293be isValueRecv = true; NonCriticalAlarmOldState = NonCriticalAlarmCurrent; OldRO0type_Sourse = CurrRO1type_Sourse; 8029376: 701d strb r5, [r3, #0] OldRO2type_Sourse = CurrRO2type_Sourse; 8029378: 4b36 ldr r3, [pc, #216] ; (8029454 ) CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; NonCriticalAlarmCurrent = flNonCriticalAlarm; if (!isValueRecv) { isValueRecv = true; NonCriticalAlarmOldState = NonCriticalAlarmCurrent; 802937a: 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; 802937c: 2001 movs r0, #1 NonCriticalAlarmOldState = NonCriticalAlarmCurrent; OldRO0type_Sourse = CurrRO1type_Sourse; OldRO2type_Sourse = CurrRO2type_Sourse; if(OldRO0type_Sourse == NON_CRITICAL){ 802937e: 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; 8029380: 7038 strb r0, [r7, #0] NonCriticalAlarmOldState = NonCriticalAlarmCurrent; OldRO0type_Sourse = CurrRO1type_Sourse; OldRO2type_Sourse = CurrRO2type_Sourse; 8029382: 701e strb r6, [r3, #0] if(OldRO0type_Sourse == NON_CRITICAL){ 8029384: d109 bne.n 802939a if(NonCriticalAlarmCurrent){ 8029386: b144 cbz r4, 802939a SetROInt(1, 0); 8029388: f7ff f8cd bl 8028526 SNMP_SendUserTrap(DO0_TOGGLED); 802938c: 2007 movs r0, #7 802938e: f00e fe55 bl 803803c log_event_data(LOG_DO0_STATE, "Замкнуто"); 8029392: 2008 movs r0, #8 8029394: 4930 ldr r1, [pc, #192] ; (8029458 ) 8029396: f000 fafb bl 8029990 } } if(OldRO2type_Sourse == NON_CRITICAL){ 802939a: 4b2e ldr r3, [pc, #184] ; (8029454 ) 802939c: 781b ldrb r3, [r3, #0] 802939e: 2b02 cmp r3, #2 80293a0: d14b bne.n 802943a if(NonCriticalAlarmCurrent){ 80293a2: 2c00 cmp r4, #0 80293a4: d049 beq.n 802943a SetROInt(1, 0); 80293a6: 2100 movs r1, #0 80293a8: 2001 movs r0, #1 80293aa: f7ff f8bc bl 8028526 SNMP_SendUserTrap(DO1_TOGGLED); 80293ae: 2008 movs r0, #8 80293b0: f00e fe44 bl 803803c log_event_data(LOG_DO1_STATE, "Замкнуто"); 80293b4: 2009 movs r0, #9 80293b6: 4928 ldr r1, [pc, #160] ; (8029458 ) 80293b8: f000 faea bl 8029990 80293bc: e03d b.n 802943a } return; } // Значение параметра изменилось if (NonCriticalAlarmCurrent != NonCriticalAlarmOldState) 80293be: 7812 ldrb r2, [r2, #0] 80293c0: 42a2 cmp r2, r4 80293c2: d034 beq.n 802942e { if(OldRO0type_Sourse == NON_CRITICAL){ 80293c4: 781b ldrb r3, [r3, #0] 80293c6: 2b02 cmp r3, #2 80293c8: d116 bne.n 80293f8 if(NonCriticalAlarmCurrent){ 80293ca: b134 cbz r4, 80293da SetROInt(1, 0); 80293cc: 2001 movs r0, #1 80293ce: 2100 movs r1, #0 80293d0: f7ff f8a9 bl 8028526 strcat(str, "Замкнуто"); 80293d4: a801 add r0, sp, #4 80293d6: 4920 ldr r1, [pc, #128] ; (8029458 ) 80293d8: e005 b.n 80293e6 } else{ SetROInt(0, 0); 80293da: 4620 mov r0, r4 80293dc: 4621 mov r1, r4 80293de: f7ff f8a2 bl 8028526 strcat(str, "Разомкнуто"); 80293e2: 491e ldr r1, [pc, #120] ; (802945c ) 80293e4: a801 add r0, sp, #4 80293e6: f7f8 fbf1 bl 8021bcc } SNMP_SendUserTrap(DO0_TOGGLED); 80293ea: 2007 movs r0, #7 80293ec: f00e fe26 bl 803803c log_event_data(LOG_DO0_STATE, str); 80293f0: 2008 movs r0, #8 80293f2: a901 add r1, sp, #4 80293f4: f000 facc bl 8029990 } if(OldRO2type_Sourse == NON_CRITICAL){ 80293f8: 4b16 ldr r3, [pc, #88] ; (8029454 ) 80293fa: 781b ldrb r3, [r3, #0] 80293fc: 2b02 cmp r3, #2 80293fe: d116 bne.n 802942e if(NonCriticalAlarmCurrent){ 8029400: b134 cbz r4, 8029410 SetROInt(1, 1); 8029402: 2001 movs r0, #1 8029404: 4601 mov r1, r0 8029406: f7ff f88e bl 8028526 strcat(str, "Разомкнуто"); 802940a: a801 add r0, sp, #4 802940c: 4913 ldr r1, [pc, #76] ; (802945c ) 802940e: e005 b.n 802941c } else{ SetROInt(0, 1); 8029410: 4620 mov r0, r4 8029412: 2101 movs r1, #1 8029414: f7ff f887 bl 8028526 strcat(str, "Замкнуто"); 8029418: 490f ldr r1, [pc, #60] ; (8029458 ) 802941a: a801 add r0, sp, #4 802941c: f7f8 fbd6 bl 8021bcc } SNMP_SendUserTrap(DO1_TOGGLED); 8029420: 2008 movs r0, #8 8029422: f00e fe0b bl 803803c log_event_data(LOG_DO1_STATE, str); 8029426: 2009 movs r0, #9 8029428: a901 add r1, sp, #4 802942a: f000 fab1 bl 8029990 SNMP_SendUserTrap(DO1_TOGGLED); log_event_data(LOG_DO1_STATE, str); } } OldRO0type_Sourse = CurrRO1type_Sourse; 802942e: 4b08 ldr r3, [pc, #32] ; (8029450 ) 8029430: 701d strb r5, [r3, #0] OldRO2type_Sourse = CurrRO2type_Sourse; 8029432: 4b08 ldr r3, [pc, #32] ; (8029454 ) 8029434: 701e strb r6, [r3, #0] NonCriticalAlarmOldState = NonCriticalAlarmCurrent; 8029436: 4b05 ldr r3, [pc, #20] ; (802944c ) 8029438: 701c strb r4, [r3, #0] } 802943a: b007 add sp, #28 802943c: bdf0 pop {r4, r5, r6, r7, pc} 802943e: bf00 nop 8029440: 20000b56 .word 0x20000b56 8029444: 2000cfc0 .word 0x2000cfc0 8029448: 20000b59 .word 0x20000b59 802944c: 20000b5a .word 0x20000b5a 8029450: 20000b5e .word 0x20000b5e 8029454: 20000b4f .word 0x20000b4f 8029458: 080399fb .word 0x080399fb 802945c: 08039a0c .word 0x08039a0c 08029460 : /** * @brief Мониторинг бита LainFail */ void UPS_LineFailMonitor(void) { 8029460: b538 push {r3, r4, r5, lr} static bool isValueRecv = false; static uint8_t lineFailOldState = 0; uint8_t lineFailCurrent; lineFailCurrent = (UPS.Status >> 7) & 0x01; 8029462: 4b15 ldr r3, [pc, #84] ; (80294b8 ) 8029464: 4d15 ldr r5, [pc, #84] ; (80294bc ) 8029466: 7cdc ldrb r4, [r3, #19] if (!isValueRecv) { 8029468: 4b15 ldr r3, [pc, #84] ; (80294c0 ) 802946a: 781a ldrb r2, [r3, #0] { static bool isValueRecv = false; static uint8_t lineFailOldState = 0; uint8_t lineFailCurrent; lineFailCurrent = (UPS.Status >> 7) & 0x01; 802946c: 09e4 lsrs r4, r4, #7 if (!isValueRecv) { 802946e: b962 cbnz r2, 802948a isValueRecv = true; 8029470: 2201 movs r2, #1 8029472: 701a strb r2, [r3, #0] lineFailOldState = lineFailCurrent; 8029474: 702c strb r4, [r5, #0] if (lineFailCurrent){ 8029476: b1ec cbz r4, 80294b4 log_event_data(LOG_ALARM_LINE, "Авария"); 8029478: 200b movs r0, #11 802947a: 4912 ldr r1, [pc, #72] ; (80294c4 ) 802947c: f000 fa88 bl 8029990 SNMP_SendUserTrap(LINE_ALARM); 8029480: 200b movs r0, #11 SNMP_SendUserTrap(LINE_NORM); } } lineFailOldState = lineFailCurrent; } 8029482: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} if (!isValueRecv) { isValueRecv = true; lineFailOldState = lineFailCurrent; if (lineFailCurrent){ log_event_data(LOG_ALARM_LINE, "Авария"); SNMP_SendUserTrap(LINE_ALARM); 8029486: f00e bdd9 b.w 803803c } return; } if (lineFailCurrent) 802948a: b114 cbz r4, 8029492 flCriticalAlarm = true; 802948c: 4b0e ldr r3, [pc, #56] ; (80294c8 ) 802948e: 2201 movs r2, #1 8029490: 701a strb r2, [r3, #0] // Значение параметра изменилось if (lineFailCurrent != lineFailOldState) 8029492: 782b ldrb r3, [r5, #0] 8029494: 42a3 cmp r3, r4 8029496: d00c beq.n 80294b2 { if (lineFailCurrent){ log_event_data(LOG_ALARM_LINE, "Авария"); 8029498: 200b movs r0, #11 flCriticalAlarm = true; // Значение параметра изменилось if (lineFailCurrent != lineFailOldState) { if (lineFailCurrent){ 802949a: b124 cbz r4, 80294a6 log_event_data(LOG_ALARM_LINE, "Авария"); 802949c: 4909 ldr r1, [pc, #36] ; (80294c4 ) 802949e: f000 fa77 bl 8029990 SNMP_SendUserTrap(LINE_ALARM); 80294a2: 200b movs r0, #11 80294a4: e003 b.n 80294ae } else{ log_event_data(LOG_ALARM_LINE, "Норма"); 80294a6: 4909 ldr r1, [pc, #36] ; (80294cc ) 80294a8: f000 fa72 bl 8029990 SNMP_SendUserTrap(LINE_NORM); 80294ac: 200c movs r0, #12 80294ae: f00e fdc5 bl 803803c } } lineFailOldState = lineFailCurrent; 80294b2: 702c strb r4, [r5, #0] 80294b4: bd38 pop {r3, r4, r5, pc} 80294b6: bf00 nop 80294b8: 2000cba4 .word 0x2000cba4 80294bc: 20000b52 .word 0x20000b52 80294c0: 20000b50 .word 0x20000b50 80294c4: 080399e3 .word 0x080399e3 80294c8: 20000b55 .word 0x20000b55 80294cc: 080399f0 .word 0x080399f0 080294d0 : /** * @brief Мониторинг бита LowBat */ void UPS_LowBatMonitor(void) { 80294d0: b538 push {r3, r4, r5, lr} static bool isValueRecv = false; static uint8_t lowBatOldState = 0; uint8_t lowBatCurrent; if((UPS.Status >> 7) & 0x01) 80294d2: 4b17 ldr r3, [pc, #92] ; (8029530 ) 80294d4: 4d17 ldr r5, [pc, #92] ; (8029534 ) 80294d6: 7cdb ldrb r3, [r3, #19] 80294d8: 09dc lsrs r4, r3, #7 lowBatCurrent = (UPS.Status >> 6) & 0x01; 80294da: bf18 it ne 80294dc: f3c3 1480 ubfxne r4, r3, #6, #1 else lowBatCurrent = 0; if (!isValueRecv) { 80294e0: 4b15 ldr r3, [pc, #84] ; (8029538 ) 80294e2: 781a ldrb r2, [r3, #0] 80294e4: b962 cbnz r2, 8029500 isValueRecv = true; 80294e6: 2201 movs r2, #1 80294e8: 701a strb r2, [r3, #0] lowBatOldState = lowBatCurrent; 80294ea: 702c strb r4, [r5, #0] if (lowBatCurrent){ 80294ec: b1f4 cbz r4, 802952c log_event_data(LOG_ALARM_LOW_BAT, "Авария"); 80294ee: 200c movs r0, #12 80294f0: 4912 ldr r1, [pc, #72] ; (802953c ) 80294f2: f000 fa4d bl 8029990 SNMP_SendUserTrap(LOW_BAT_ALARM); 80294f6: 200d movs r0, #13 log_event_data(LOG_ALARM_LOW_BAT, "Норма"); } } lowBatOldState = lowBatCurrent; } 80294f8: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} if (!isValueRecv) { isValueRecv = true; lowBatOldState = lowBatCurrent; if (lowBatCurrent){ log_event_data(LOG_ALARM_LOW_BAT, "Авария"); SNMP_SendUserTrap(LOW_BAT_ALARM); 80294fc: f00e bd9e b.w 803803c } return; } if (lowBatCurrent) 8029500: b114 cbz r4, 8029508 flNonCriticalAlarm = true; 8029502: 4b0f ldr r3, [pc, #60] ; (8029540 ) 8029504: 2201 movs r2, #1 8029506: 701a strb r2, [r3, #0] // Значение параметра изменилось if (lowBatCurrent != lowBatOldState) 8029508: 782b ldrb r3, [r5, #0] 802950a: 42a3 cmp r3, r4 802950c: d00d beq.n 802952a { if (lowBatCurrent){ 802950e: b12c cbz r4, 802951c SNMP_SendUserTrap(LOW_BAT_ALARM); 8029510: 200d movs r0, #13 8029512: f00e fd93 bl 803803c log_event_data(LOG_ALARM_LOW_BAT, "Авария"); 8029516: 200c movs r0, #12 8029518: 4908 ldr r1, [pc, #32] ; (802953c ) 802951a: e004 b.n 8029526 } else{ SNMP_SendUserTrap(LOW_BAT_NORM); 802951c: 200e movs r0, #14 802951e: f00e fd8d bl 803803c log_event_data(LOG_ALARM_LOW_BAT, "Норма"); 8029522: 4908 ldr r1, [pc, #32] ; (8029544 ) 8029524: 200c movs r0, #12 8029526: f000 fa33 bl 8029990 } } lowBatOldState = lowBatCurrent; 802952a: 702c strb r4, [r5, #0] 802952c: bd38 pop {r3, r4, r5, pc} 802952e: bf00 nop 8029530: 2000cba4 .word 0x2000cba4 8029534: 20000b58 .word 0x20000b58 8029538: 20000b4d .word 0x20000b4d 802953c: 080399e3 .word 0x080399e3 8029540: 20000b59 .word 0x20000b59 8029544: 080399f0 .word 0x080399f0 08029548 : /** * @brief Мониторинг нагрузки */ void UPS_PowerMonitor(void) { 8029548: b538 push {r3, r4, r5, lr} float load; static uint8_t stateCurrent = HYST_IDLE; load = UPS.Load; 802954a: 4c20 ldr r4, [pc, #128] ; (80295cc ) 802954c: 7c20 ldrb r0, [r4, #16] 802954e: f7f7 fc1f bl 8020d90 <__aeabi_ui2f> /* Отслеживается переход через верхнюю границу */ if (load > UPS_LOAD) 8029552: 491f ldr r1, [pc, #124] ; (80295d0 ) void UPS_PowerMonitor(void) { float load; static uint8_t stateCurrent = HYST_IDLE; load = UPS.Load; 8029554: 4605 mov r5, r0 /* Отслеживается переход через верхнюю границу */ if (load > UPS_LOAD) 8029556: f7f7 fcdf bl 8020f18 <__aeabi_fcmpgt> 802955a: b1c0 cbz r0, 802958e { flCriticalAlarm = true; 802955c: 4b1d ldr r3, [pc, #116] ; (80295d4 ) 802955e: 2501 movs r5, #1 8029560: 701d strb r5, [r3, #0] UPS.Alarm = (UPS.Alarm & 0x0e) | (1 << 0); 8029562: 7d23 ldrb r3, [r4, #20] 8029564: f003 030e and.w r3, r3, #14 8029568: 432b orrs r3, r5 802956a: 7523 strb r3, [r4, #20] if (stateCurrent == HYST_IDLE) 802956c: 4c1a ldr r4, [pc, #104] ; (80295d8 ) 802956e: 7823 ldrb r3, [r4, #0] 8029570: 2b00 cmp r3, #0 8029572: d12a bne.n 80295ca { LED_On(LED_MINOR_R); 8029574: 200d movs r0, #13 8029576: f7ff fa59 bl 8028a2c LED_On(LED_MINOR_G); 802957a: 200c movs r0, #12 802957c: f7ff fa56 bl 8028a2c stateCurrent = HYST_UP; log_event_data(LOG_ALARM_POWER, "Авария"); 8029580: 200d movs r0, #13 8029582: 4916 ldr r1, [pc, #88] ; (80295dc ) UPS.Alarm = (UPS.Alarm & 0x0e) | (1 << 0); if (stateCurrent == HYST_IDLE) { LED_On(LED_MINOR_R); LED_On(LED_MINOR_G); stateCurrent = HYST_UP; 8029584: 7025 strb r5, [r4, #0] log_event_data(LOG_ALARM_POWER, "Авария"); 8029586: f000 fa03 bl 8029990 // Отправка трапа о завышении SNMP_SendUserTrap(POWER_ALARM); 802958a: 200f movs r0, #15 802958c: e019 b.n 80295c2 } } /* Отслеживается нормализация */ else if (load < (UPS_LOAD - UPS_LOAD_HIST)) 802958e: 4628 mov r0, r5 8029590: 4913 ldr r1, [pc, #76] ; (80295e0 ) 8029592: f7f7 fca3 bl 8020edc <__aeabi_fcmplt> 8029596: b1c0 cbz r0, 80295ca { UPS.Alarm = (UPS.Alarm & 0x0e); 8029598: 7d23 ldrb r3, [r4, #20] 802959a: f003 030e and.w r3, r3, #14 802959e: 7523 strb r3, [r4, #20] if (stateCurrent == HYST_UP) 80295a0: 4c0d ldr r4, [pc, #52] ; (80295d8 ) 80295a2: 7823 ldrb r3, [r4, #0] 80295a4: 2b01 cmp r3, #1 80295a6: d110 bne.n 80295ca { LED_Off(LED_MINOR_R); 80295a8: 200d movs r0, #13 80295aa: f7ff fa42 bl 8028a32 LED_Off(LED_MINOR_G); 80295ae: 200c movs r0, #12 80295b0: f7ff fa3f bl 8028a32 stateCurrent = HYST_IDLE; 80295b4: 2300 movs r3, #0 log_event_data(LOG_ALARM_POWER, "Норма"); 80295b6: 200d movs r0, #13 80295b8: 490a ldr r1, [pc, #40] ; (80295e4 ) UPS.Alarm = (UPS.Alarm & 0x0e); if (stateCurrent == HYST_UP) { LED_Off(LED_MINOR_R); LED_Off(LED_MINOR_G); stateCurrent = HYST_IDLE; 80295ba: 7023 strb r3, [r4, #0] log_event_data(LOG_ALARM_POWER, "Норма"); 80295bc: f000 f9e8 bl 8029990 // Отправка трапа о нормализации SNMP_SendUserTrap(POWER_NORM); 80295c0: 2010 movs r0, #16 } } } 80295c2: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} LED_Off(LED_MINOR_G); stateCurrent = HYST_IDLE; log_event_data(LOG_ALARM_POWER, "Норма"); // Отправка трапа о нормализации SNMP_SendUserTrap(POWER_NORM); 80295c6: f00e bd39 b.w 803803c 80295ca: bd38 pop {r3, r4, r5, pc} 80295cc: 2000cba4 .word 0x2000cba4 80295d0: 428c0000 .word 0x428c0000 80295d4: 20000b55 .word 0x20000b55 80295d8: 20000b5f .word 0x20000b5f 80295dc: 080399e3 .word 0x080399e3 80295e0: 428a0000 .word 0x428a0000 80295e4: 080399f0 .word 0x080399f0 080295e8 : /** * @brief Мониторинг температуры */ void UPS_TemperatureMonitor(void) { 80295e8: b538 push {r3, r4, r5, lr} float temperature; static uint8_t stateCurrent = HYST_IDLE; temperature = UPS.Temp; 80295ea: 4c19 ldr r4, [pc, #100] ; (8029650 ) /* Отслеживается переход через верхнюю границу */ if (temperature > UPS_TEMPERATURE) 80295ec: 4919 ldr r1, [pc, #100] ; (8029654 ) void UPS_TemperatureMonitor(void) { float temperature; static uint8_t stateCurrent = HYST_IDLE; temperature = UPS.Temp; 80295ee: 68e5 ldr r5, [r4, #12] /* Отслеживается переход через верхнюю границу */ if (temperature > UPS_TEMPERATURE) 80295f0: 4628 mov r0, r5 80295f2: f7f7 fc91 bl 8020f18 <__aeabi_fcmpgt> 80295f6: b190 cbz r0, 802961e { flCriticalAlarm = true; 80295f8: 4b17 ldr r3, [pc, #92] ; (8029658 ) 80295fa: 2201 movs r2, #1 80295fc: 701a strb r2, [r3, #0] UPS.Alarm = (UPS.Alarm & 0x0d) | (1 << 1); 80295fe: 7d23 ldrb r3, [r4, #20] 8029600: f003 030d and.w r3, r3, #13 8029604: f043 0302 orr.w r3, r3, #2 8029608: 7523 strb r3, [r4, #20] if (stateCurrent == HYST_IDLE) 802960a: 4b14 ldr r3, [pc, #80] ; (802965c ) 802960c: 7819 ldrb r1, [r3, #0] 802960e: b9f1 cbnz r1, 802964e { stateCurrent = HYST_UP; log_event_data(LOG_ALARM_TEMP, "Авария"); 8029610: 200a movs r0, #10 8029612: 4913 ldr r1, [pc, #76] ; (8029660 ) { flCriticalAlarm = true; UPS.Alarm = (UPS.Alarm & 0x0d) | (1 << 1); if (stateCurrent == HYST_IDLE) { stateCurrent = HYST_UP; 8029614: 701a strb r2, [r3, #0] log_event_data(LOG_ALARM_TEMP, "Авария"); 8029616: f000 f9bb bl 8029990 // Отправка трапа о завышении SNMP_SendUserTrap(BATTERY_TEMPERATURE_ALARM); 802961a: 200a movs r0, #10 802961c: e013 b.n 8029646 } } /* Отслеживается нормализация */ else if (temperature < (UPS_TEMPERATURE - UPS_TEMPERATURE_HIST)) 802961e: 4628 mov r0, r5 8029620: 4910 ldr r1, [pc, #64] ; (8029664 ) 8029622: f7f7 fc5b bl 8020edc <__aeabi_fcmplt> 8029626: b190 cbz r0, 802964e { UPS.Alarm = (UPS.Alarm & 0x0d); 8029628: 7d23 ldrb r3, [r4, #20] 802962a: f003 030d and.w r3, r3, #13 802962e: 7523 strb r3, [r4, #20] if (stateCurrent == HYST_UP) 8029630: 4b0a ldr r3, [pc, #40] ; (802965c ) 8029632: 781a ldrb r2, [r3, #0] 8029634: 2a01 cmp r2, #1 8029636: d10a bne.n 802964e { stateCurrent = HYST_IDLE; 8029638: 2200 movs r2, #0 log_event_data(LOG_ALARM_TEMP, "Норма"); 802963a: 200a movs r0, #10 802963c: 490a ldr r1, [pc, #40] ; (8029668 ) else if (temperature < (UPS_TEMPERATURE - UPS_TEMPERATURE_HIST)) { UPS.Alarm = (UPS.Alarm & 0x0d); if (stateCurrent == HYST_UP) { stateCurrent = HYST_IDLE; 802963e: 701a strb r2, [r3, #0] log_event_data(LOG_ALARM_TEMP, "Норма"); 8029640: f000 f9a6 bl 8029990 // Отправка трапа о нормализации SNMP_SendUserTrap(BATTERY_TEMPERATURE_NORM); 8029644: 2009 movs r0, #9 } } } 8029646: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} { stateCurrent = HYST_IDLE; log_event_data(LOG_ALARM_TEMP, "Норма"); // Отправка трапа о нормализации SNMP_SendUserTrap(BATTERY_TEMPERATURE_NORM); 802964a: f00e bcf7 b.w 803803c 802964e: bd38 pop {r3, r4, r5, pc} 8029650: 2000cba4 .word 0x2000cba4 8029654: 42200000 .word 0x42200000 8029658: 20000b55 .word 0x20000b55 802965c: 20000b51 .word 0x20000b51 8029660: 080399e3 .word 0x080399e3 8029664: 421c0000 .word 0x421c0000 8029668: 080399f0 .word 0x080399f0 0802966c : /** * @brief Мониторинг параметра upsParams.connect */ void UPS_ConnectMonitor(void) { 802966c: b538 push {r3, r4, r5, lr} static bool isValueRecv = false; static uint8_t connectOldState = 0; uint8_t connectCurrent; connectCurrent = UPS.Present; 802966e: 4b19 ldr r3, [pc, #100] ; (80296d4 ) 8029670: 4d19 ldr r5, [pc, #100] ; (80296d8 ) UPS.Alarm = (UPS.Alarm & 0x0b) | ((connectCurrent^1) << 2); 8029672: 7d1a ldrb r2, [r3, #20] { static bool isValueRecv = false; static uint8_t connectOldState = 0; uint8_t connectCurrent; connectCurrent = UPS.Present; 8029674: f893 402c ldrb.w r4, [r3, #44] ; 0x2c UPS.Alarm = (UPS.Alarm & 0x0b) | ((connectCurrent^1) << 2); 8029678: f002 020b and.w r2, r2, #11 802967c: f084 0101 eor.w r1, r4, #1 8029680: ea42 0281 orr.w r2, r2, r1, lsl #2 8029684: 751a strb r2, [r3, #20] if (!isValueRecv) { 8029686: 4b15 ldr r3, [pc, #84] ; (80296dc ) 8029688: 781a ldrb r2, [r3, #0] 802968a: b962 cbnz r2, 80296a6 isValueRecv = true; 802968c: 2201 movs r2, #1 802968e: 701a strb r2, [r3, #0] connectOldState = connectCurrent; 8029690: 702c strb r4, [r5, #0] if (!connectCurrent){ 8029692: b9ec cbnz r4, 80296d0 log_event_data(LOG_ALARM_UPS, "Авария"); 8029694: 200e movs r0, #14 8029696: 4912 ldr r1, [pc, #72] ; (80296e0 ) 8029698: f000 f97a bl 8029990 SNMP_SendUserTrap(CONNECT_MONITOR_ALARM); 802969c: 2011 movs r0, #17 SNMP_SendUserTrap(CONNECT_MONITOR_ALARM); } } connectOldState = connectCurrent; } 802969e: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} if (!isValueRecv) { isValueRecv = true; connectOldState = connectCurrent; if (!connectCurrent){ log_event_data(LOG_ALARM_UPS, "Авария"); SNMP_SendUserTrap(CONNECT_MONITOR_ALARM); 80296a2: f00e bccb b.w 803803c } return; } if (!connectCurrent) 80296a6: b914 cbnz r4, 80296ae flCriticalAlarm = true; 80296a8: 4b0e ldr r3, [pc, #56] ; (80296e4 ) 80296aa: 2201 movs r2, #1 80296ac: 701a strb r2, [r3, #0] // Значение параметра изменилось if (connectCurrent != connectOldState) 80296ae: 782b ldrb r3, [r5, #0] 80296b0: 42a3 cmp r3, r4 80296b2: d00c beq.n 80296ce { if (connectCurrent){ log_event_data(LOG_ALARM_UPS, "Норма"); 80296b4: 200e movs r0, #14 if (!connectCurrent) flCriticalAlarm = true; // Значение параметра изменилось if (connectCurrent != connectOldState) { if (connectCurrent){ 80296b6: b124 cbz r4, 80296c2 log_event_data(LOG_ALARM_UPS, "Норма"); 80296b8: 490b ldr r1, [pc, #44] ; (80296e8 ) 80296ba: f000 f969 bl 8029990 SNMP_SendUserTrap(CONNECT_MONITOR_NORM); 80296be: 2012 movs r0, #18 80296c0: e003 b.n 80296ca } else{ log_event_data(LOG_ALARM_UPS, "Авария"); 80296c2: 4907 ldr r1, [pc, #28] ; (80296e0 ) 80296c4: f000 f964 bl 8029990 SNMP_SendUserTrap(CONNECT_MONITOR_ALARM); 80296c8: 2011 movs r0, #17 80296ca: f00e fcb7 bl 803803c } } connectOldState = connectCurrent; 80296ce: 702c strb r4, [r5, #0] 80296d0: bd38 pop {r3, r4, r5, pc} 80296d2: bf00 nop 80296d4: 2000cba4 .word 0x2000cba4 80296d8: 20000b5b .word 0x20000b5b 80296dc: 20000b5d .word 0x20000b5d 80296e0: 080399e3 .word 0x080399e3 80296e4: 20000b55 .word 0x20000b55 80296e8: 080399f0 .word 0x080399f0 080296ec : /** * @brief Мониторинг параметра upsParams.connect */ void UPS_BatteryConnectMonitor(void) { 80296ec: b538 push {r3, r4, r5, lr} static bool isValueRecv = false; static uint8_t AKBconnectOldState = 0; uint8_t AKBconnectCurrent; if(((UPS.Status >> 7) & 0x01) == 0) 80296ee: 4b1a ldr r3, [pc, #104] ; (8029758 ) 80296f0: 4d1a ldr r5, [pc, #104] ; (802975c ) 80296f2: 7cdc ldrb r4, [r3, #19] 80296f4: 09e2 lsrs r2, r4, #7 AKBconnectCurrent = (UPS.Status >> 6) & 0x01; else{ AKBconnectCurrent = 0; } UPS.Alarm = (UPS.Alarm & 0x07) | (AKBconnectCurrent << 3); 80296f6: 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; 80296f8: bf08 it eq 80296fa: f3c4 1480 ubfxeq r4, r4, #6, #1 else{ AKBconnectCurrent = 0; } UPS.Alarm = (UPS.Alarm & 0x07) | (AKBconnectCurrent << 3); 80296fe: f002 0207 and.w r2, r2, #7 uint8_t AKBconnectCurrent; if(((UPS.Status >> 7) & 0x01) == 0) AKBconnectCurrent = (UPS.Status >> 6) & 0x01; else{ AKBconnectCurrent = 0; 8029702: bf18 it ne 8029704: 2400 movne r4, #0 } UPS.Alarm = (UPS.Alarm & 0x07) | (AKBconnectCurrent << 3); 8029706: ea42 02c4 orr.w r2, r2, r4, lsl #3 802970a: 751a strb r2, [r3, #20] if (!isValueRecv) { 802970c: 4b14 ldr r3, [pc, #80] ; (8029760 ) 802970e: 781a ldrb r2, [r3, #0] 8029710: b962 cbnz r2, 802972c isValueRecv = true; 8029712: 2201 movs r2, #1 8029714: 701a strb r2, [r3, #0] AKBconnectOldState = AKBconnectCurrent; 8029716: 702c strb r4, [r5, #0] if (AKBconnectCurrent){ 8029718: b1ec cbz r4, 8029756 log_event_data(LOG_ALARM_AKB, "Авария"); 802971a: 200f movs r0, #15 802971c: 4911 ldr r1, [pc, #68] ; (8029764 ) 802971e: f000 f937 bl 8029990 SNMP_SendUserTrap(BATTERY_CONNECT_ALARM); 8029722: 2013 movs r0, #19 SNMP_SendUserTrap(BATTERY_CONNECT_ALARM); } } AKBconnectOldState = AKBconnectCurrent; } 8029724: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} if (!isValueRecv) { isValueRecv = true; AKBconnectOldState = AKBconnectCurrent; if (AKBconnectCurrent){ log_event_data(LOG_ALARM_AKB, "Авария"); SNMP_SendUserTrap(BATTERY_CONNECT_ALARM); 8029728: f00e bc88 b.w 803803c } return; } if (AKBconnectCurrent) 802972c: b114 cbz r4, 8029734 flCriticalAlarm = true; 802972e: 4b0e ldr r3, [pc, #56] ; (8029768 ) 8029730: 2201 movs r2, #1 8029732: 701a strb r2, [r3, #0] // Значение параметра изменилось if (AKBconnectCurrent != AKBconnectOldState) 8029734: 782b ldrb r3, [r5, #0] 8029736: 42a3 cmp r3, r4 8029738: d00c beq.n 8029754 { if (!AKBconnectCurrent){ log_event_data(LOG_ALARM_AKB, "Норма"); 802973a: 200f movs r0, #15 if (AKBconnectCurrent) flCriticalAlarm = true; // Значение параметра изменилось if (AKBconnectCurrent != AKBconnectOldState) { if (!AKBconnectCurrent){ 802973c: b924 cbnz r4, 8029748 log_event_data(LOG_ALARM_AKB, "Норма"); 802973e: 490b ldr r1, [pc, #44] ; (802976c ) 8029740: f000 f926 bl 8029990 SNMP_SendUserTrap(BATTERY_CONNECT_NORM); 8029744: 2014 movs r0, #20 8029746: e003 b.n 8029750 } else{ log_event_data(LOG_ALARM_AKB, "Авария"); 8029748: 4906 ldr r1, [pc, #24] ; (8029764 ) 802974a: f000 f921 bl 8029990 SNMP_SendUserTrap(BATTERY_CONNECT_ALARM); 802974e: 2013 movs r0, #19 8029750: f00e fc74 bl 803803c } } AKBconnectOldState = AKBconnectCurrent; 8029754: 702c strb r4, [r5, #0] 8029756: bd38 pop {r3, r4, r5, pc} 8029758: 2000cba4 .word 0x2000cba4 802975c: 20000b57 .word 0x20000b57 8029760: 20000b4c .word 0x20000b4c 8029764: 080399e3 .word 0x080399e3 8029768: 20000b55 .word 0x20000b55 802976c: 080399f0 .word 0x080399f0 08029770 : /** * @brief Задача мониторинга параметров UPS */ void UPS_Monitor(void *params) { 8029770: b570 push {r4, r5, r6, lr} vTaskDelay(5000); 8029772: f241 3088 movw r0, #5000 ; 0x1388 8029776: f001 fbc3 bl 802af00 for (;;) { flCriticalAlarm = false; 802977a: 4d10 ldr r5, [pc, #64] ; (80297bc ) flNonCriticalAlarm = false; 802977c: 4e10 ldr r6, [pc, #64] ; (80297c0 ) void UPS_Monitor(void *params) { vTaskDelay(5000); for (;;) { flCriticalAlarm = false; 802977e: 2400 movs r4, #0 flNonCriticalAlarm = false; // Проверяем флаг подключения UPS if (UPS.Present) 8029780: 4b10 ldr r3, [pc, #64] ; (80297c4 ) void UPS_Monitor(void *params) { vTaskDelay(5000); for (;;) { flCriticalAlarm = false; 8029782: 702c strb r4, [r5, #0] flNonCriticalAlarm = false; // Проверяем флаг подключения UPS if (UPS.Present) 8029784: f893 302c ldrb.w r3, [r3, #44] ; 0x2c { vTaskDelay(5000); for (;;) { flCriticalAlarm = false; flNonCriticalAlarm = false; 8029788: 7034 strb r4, [r6, #0] // Проверяем флаг подключения UPS if (UPS.Present) 802978a: b14b cbz r3, 80297a0 { UPS_LineFailMonitor(); 802978c: f7ff fe68 bl 8029460 UPS_LowBatMonitor(); 8029790: f7ff fe9e bl 80294d0 UPS_PowerMonitor(); 8029794: f7ff fed8 bl 8029548 UPS_TemperatureMonitor(); 8029798: f7ff ff26 bl 80295e8 UPS_BatteryConnectMonitor(); 802979c: f7ff ffa6 bl 80296ec } UPS_ConnectMonitor(); 80297a0: f7ff ff64 bl 802966c UPS_DI0Monitor(); 80297a4: f7ff fcfe bl 80291a4 UPS_CriticalAlarmMonitor(); 80297a8: f7ff fd3a bl 8029220 UPS_NonCriticalAlarmMonitor(); 80297ac: f7ff fdd0 bl 8029350 vTaskDelay(1000); 80297b0: f44f 707a mov.w r0, #1000 ; 0x3e8 80297b4: f001 fba4 bl 802af00 } 80297b8: e7e2 b.n 8029780 80297ba: bf00 nop 80297bc: 20000b55 .word 0x20000b55 80297c0: 20000b59 .word 0x20000b59 80297c4: 2000cba4 .word 0x2000cba4 080297c8 : } 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); 80297c8: 4608 mov r0, r1 80297ca: 4611 mov r1, r2 80297cc: 461a mov r2, r3 80297ce: 2300 movs r3, #0 80297d0: f7fd b892 b.w 80268f8 080297d4 : } 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); 80297d4: 4608 mov r0, r1 80297d6: 4611 mov r1, r2 80297d8: 461a mov r2, r3 80297da: 2300 movs r3, #0 80297dc: f7fd b8db b.w 8026996 080297e0 : #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); 80297e0: 4608 mov r0, r1 80297e2: 2100 movs r1, #0 80297e4: f7fd b8e7 b.w 80269b6 080297e8 : static struct ringfs fs2; static SemaphoreHandle_t log_mutex; void log_task(void) { 80297e8: b508 push {r3, lr} for(;;){ flUpdateLog = true; 80297ea: 4c04 ldr r4, [pc, #16] ; (80297fc ) 80297ec: 2501 movs r5, #1 vTaskDelay(500);//LOG_TIME 80297ee: f44f 70fa mov.w r0, #500 ; 0x1f4 static SemaphoreHandle_t log_mutex; void log_task(void) { for(;;){ flUpdateLog = true; 80297f2: 7025 strb r5, [r4, #0] vTaskDelay(500);//LOG_TIME 80297f4: f001 fb84 bl 802af00 80297f8: e7f9 b.n 80297ee 80297fa: bf00 nop 80297fc: 20000bb8 .word 0x20000bb8 08029800 : /*log_entry_t entry; log_fetch(&entry, portMAX_DELAY);*/ } } void log_init(bool format) { 8029800: b51f push {r0, r1, r2, r3, r4, lr} DBG printf(">>> Event log\n"); if (!spi_flash_desc.present) 8029802: 4b22 ldr r3, [pc, #136] ; (802988c ) 8029804: 781a ldrb r2, [r3, #0] /*log_entry_t entry; log_fetch(&entry, portMAX_DELAY);*/ } } void log_init(bool format) { 8029806: 4604 mov r4, r0 DBG printf(">>> Event log\n"); if (!spi_flash_desc.present) 8029808: 2a00 cmp r2, #0 802980a: d03e beq.n 802988a return; ringfs_flash.sector_size = spi_flash_desc.sector_size; 802980c: 685a ldr r2, [r3, #4] ringfs_flash.sector_count = spi_flash_desc.sector_count/2 - LOG_FLASH_SECTOR_OFFSET; 802980e: 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; 8029810: 491f ldr r1, [pc, #124] ; (8029890 ) 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)); 8029812: 4820 ldr r0, [pc, #128] ; (8029894 ) 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; 8029814: 600a str r2, [r1, #0] ringfs_flash.sector_count = spi_flash_desc.sector_count/2 - LOG_FLASH_SECTOR_OFFSET; 8029816: 085b lsrs r3, r3, #1 8029818: 3b04 subs r3, #4 802981a: 608b str r3, [r1, #8] ringfs_init(&fs, &ringfs_flash, LOG_ENTRY_VERSION, sizeof(log_entry_t)); 802981c: 2201 movs r2, #1 802981e: 2337 movs r3, #55 ; 0x37 8029820: f000 fb87 bl 8029f32 if (format || ringfs_scan(&fs) != 0) 8029824: b11c cbz r4, 802982e ringfs_format(&fs); 8029826: 481b ldr r0, [pc, #108] ; (8029894 ) 8029828: f000 fb8d bl 8029f46 802982c: e004 b.n 8029838 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) 802982e: 4819 ldr r0, [pc, #100] ; (8029894 ) 8029830: f000 fc6b bl 802a10a 8029834: 2800 cmp r0, #0 8029836: d1f6 bne.n 8029826 ringfs_format(&fs); ringfs_flash2.sector_size = spi_flash_desc.sector_size; 8029838: 4b14 ldr r3, [pc, #80] ; (802988c ) 802983a: 4917 ldr r1, [pc, #92] ; (8029898 ) 802983c: 685a ldr r2, [r3, #4] ringfs_flash2.sector_count = spi_flash_desc.sector_count/2 - LOG_FLASH_SECTOR_OFFSET; 802983e: 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; 8029840: 600a str r2, [r1, #0] ringfs_flash2.sector_count = spi_flash_desc.sector_count/2 - LOG_FLASH_SECTOR_OFFSET; 8029842: 085b lsrs r3, r3, #1 8029844: 3b04 subs r3, #4 8029846: 608b str r3, [r1, #8] ringfs_init(&fs2, &ringfs_flash2, LOG_ENTRY_VERSION, sizeof(log_entry_t)); 8029848: 4814 ldr r0, [pc, #80] ; (802989c ) 802984a: 2201 movs r2, #1 802984c: 2337 movs r3, #55 ; 0x37 802984e: f000 fb70 bl 8029f32 if (format || ringfs_scan(&fs2) != 0) 8029852: b11c cbz r4, 802985c ringfs_format(&fs2); 8029854: 4811 ldr r0, [pc, #68] ; (802989c ) 8029856: f000 fb76 bl 8029f46 802985a: e004 b.n 8029866 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) 802985c: 480f ldr r0, [pc, #60] ; (802989c ) 802985e: f000 fc54 bl 802a10a 8029862: 2800 cmp r0, #0 8029864: d1f6 bne.n 8029854 ringfs_format(&fs2); fLogInit = true; 8029866: 4b0e ldr r3, [pc, #56] ; (80298a0 ) 8029868: 2001 movs r0, #1 802986a: 7018 strb r0, [r3, #0] log_mutex = xSemaphoreCreateMutex(); 802986c: f000 feaf bl 802a5ce 8029870: 4b0c ldr r3, [pc, #48] ; (80298a4 ) xTaskCreate(log_task, ( char * ) "log_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); 8029872: 490d ldr r1, [pc, #52] ; (80298a8 ) if (format || ringfs_scan(&fs2) != 0) ringfs_format(&fs2); fLogInit = true; log_mutex = xSemaphoreCreateMutex(); 8029874: 6018 str r0, [r3, #0] xTaskCreate(log_task, ( char * ) "log_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); 8029876: 2300 movs r3, #0 8029878: 9300 str r3, [sp, #0] 802987a: 9301 str r3, [sp, #4] 802987c: 9302 str r3, [sp, #8] 802987e: 9303 str r3, [sp, #12] 8029880: 480a ldr r0, [pc, #40] ; (80298ac ) 8029882: f44f 7280 mov.w r2, #256 ; 0x100 8029886: f001 f8a1 bl 802a9cc } 802988a: bd1f pop {r0, r1, r2, r3, r4, pc} 802988c: 2000c83c .word 0x2000c83c 8029890: 200006a8 .word 0x200006a8 8029894: 20000b8c .word 0x20000b8c 8029898: 20000690 .word 0x20000690 802989c: 20000b60 .word 0x20000b60 80298a0: 20000bc0 .word 0x20000bc0 80298a4: 20000bbc .word 0x20000bbc 80298a8: 08039a21 .word 0x08039a21 80298ac: 080297e9 .word 0x080297e9 080298b0 : } return 0; } int log_append(log_entry_t *entry) { 80298b0: b530 push {r4, r5, lr} int ret; TM_RTC_t data; ret = xSemaphoreTake( log_mutex, portMAX_DELAY ); 80298b2: 4b12 ldr r3, [pc, #72] ; (80298fc ) 80298b4: 2100 movs r1, #0 } return 0; } int log_append(log_entry_t *entry) { 80298b6: b085 sub sp, #20 80298b8: 4604 mov r4, r0 int ret; TM_RTC_t data; ret = xSemaphoreTake( log_mutex, portMAX_DELAY ); 80298ba: f04f 32ff mov.w r2, #4294967295 80298be: 6818 ldr r0, [r3, #0] 80298c0: 460b mov r3, r1 80298c2: f000 ff2a bl 802a71a if (ret == pdFALSE) 80298c6: 4605 mov r5, r0 80298c8: b1a8 cbz r0, 80298f6 return ret; if (!entry->timestamp){ 80298ca: 6821 ldr r1, [r4, #0] 80298cc: b921 cbnz r1, 80298d8 TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 80298ce: 4668 mov r0, sp 80298d0: f7fc fdda bl 8026488 entry->timestamp = data.unix; 80298d4: 9b03 ldr r3, [sp, #12] 80298d6: 6023 str r3, [r4, #0] } if(entry->type == LOG_VALUE) 80298d8: 7923 ldrb r3, [r4, #4] 80298da: 2b10 cmp r3, #16 ringfs_append(&fs, entry); 80298dc: bf0c ite eq 80298de: 4808 ldreq r0, [pc, #32] ; (8029900 ) else ringfs_append(&fs2, entry); 80298e0: 4808 ldrne r0, [pc, #32] ; (8029904 ) 80298e2: 4621 mov r1, r4 80298e4: f000 fb62 bl 8029fac xSemaphoreGive(log_mutex); 80298e8: 4b04 ldr r3, [pc, #16] ; (80298fc ) 80298ea: 2100 movs r1, #0 80298ec: 6818 ldr r0, [r3, #0] 80298ee: 460a mov r2, r1 80298f0: 460b mov r3, r1 80298f2: f000 fdd2 bl 802a49a return ret; } 80298f6: 4628 mov r0, r5 80298f8: b005 add sp, #20 80298fa: bd30 pop {r4, r5, pc} 80298fc: 20000bbc .word 0x20000bbc 8029900: 20000b8c .word 0x20000b8c 8029904: 20000b60 .word 0x20000b60 08029908 : int log_fetch(log_entry_t *entry, uint32_t timeout) { 8029908: b570 push {r4, r5, r6, lr} int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 802990a: 4e0d ldr r6, [pc, #52] ; (8029940 ) ringfs_append(&fs2, entry); xSemaphoreGive(log_mutex); return ret; } int log_fetch(log_entry_t *entry, uint32_t timeout) { 802990c: 460a mov r2, r1 int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 802990e: 2100 movs r1, #0 ringfs_append(&fs2, entry); xSemaphoreGive(log_mutex); return ret; } int log_fetch(log_entry_t *entry, uint32_t timeout) { 8029910: 4605 mov r5, r0 int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 8029912: 460b mov r3, r1 8029914: 6830 ldr r0, [r6, #0] 8029916: f000 ff00 bl 802a71a if (ret == pdFALSE) 802991a: 4604 mov r4, r0 802991c: b170 cbz r0, 802993c return ret; if(entry->type == LOG_VALUE) 802991e: 792b ldrb r3, [r5, #4] 8029920: 2b10 cmp r3, #16 ret = ringfs_fetch(&fs, entry); 8029922: bf0c ite eq 8029924: 4807 ldreq r0, [pc, #28] ; (8029944 ) else ret = ringfs_fetch(&fs2, entry); 8029926: 4808 ldrne r0, [pc, #32] ; (8029948 ) 8029928: 4629 mov r1, r5 802992a: f000 fba9 bl 802a080 xSemaphoreGive(log_mutex); 802992e: 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); 8029930: 4604 mov r4, r0 xSemaphoreGive(log_mutex); 8029932: 460a mov r2, r1 8029934: 6830 ldr r0, [r6, #0] 8029936: 460b mov r3, r1 8029938: f000 fdaf bl 802a49a return ret; } 802993c: 4620 mov r0, r4 802993e: bd70 pop {r4, r5, r6, pc} 8029940: 20000bbc .word 0x20000bbc 8029944: 20000b8c .word 0x20000b8c 8029948: 20000b60 .word 0x20000b60 0802994c : int log_rewind(log_entry_t *entry, uint32_t timeout) { 802994c: b570 push {r4, r5, r6, lr} int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 802994e: 4d0d ldr r5, [pc, #52] ; (8029984 ) ret = ringfs_fetch(&fs2, entry); xSemaphoreGive(log_mutex); return ret; } int log_rewind(log_entry_t *entry, uint32_t timeout) { 8029950: 460a mov r2, r1 int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 8029952: 2100 movs r1, #0 ret = ringfs_fetch(&fs2, entry); xSemaphoreGive(log_mutex); return ret; } int log_rewind(log_entry_t *entry, uint32_t timeout) { 8029954: 4606 mov r6, r0 int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 8029956: 460b mov r3, r1 8029958: 6828 ldr r0, [r5, #0] 802995a: f000 fede bl 802a71a if (ret == pdFALSE) 802995e: 4604 mov r4, r0 8029960: b168 cbz r0, 802997e return ret; if(entry->type == LOG_VALUE) 8029962: 7933 ldrb r3, [r6, #4] 8029964: 2b10 cmp r3, #16 ret = ringfs_rewind(&fs); 8029966: bf0c ite eq 8029968: 4807 ldreq r0, [pc, #28] ; (8029988 ) else ret = ringfs_rewind(&fs2); 802996a: 4808 ldrne r0, [pc, #32] ; (802998c ) 802996c: f000 fbc2 bl 802a0f4 xSemaphoreGive(log_mutex); 8029970: 2100 movs r1, #0 if (ret == pdFALSE) return ret; if(entry->type == LOG_VALUE) ret = ringfs_rewind(&fs); else ret = ringfs_rewind(&fs2); 8029972: 4604 mov r4, r0 xSemaphoreGive(log_mutex); 8029974: 460a mov r2, r1 8029976: 6828 ldr r0, [r5, #0] 8029978: 460b mov r3, r1 802997a: f000 fd8e bl 802a49a return ret; } 802997e: 4620 mov r0, r4 8029980: bd70 pop {r4, r5, r6, pc} 8029982: bf00 nop 8029984: 20000bbc .word 0x20000bbc 8029988: 20000b8c .word 0x20000b8c 802998c: 20000b60 .word 0x20000b60 08029990 : xSemaphoreGive(log_mutex); return ret; } void log_event_data(log_type_t type, char *data) { 8029990: b500 push {lr} 8029992: b08f sub sp, #60 ; 0x3c log_entry_t entry_data; entry_data.timestamp = 0; 8029994: 2300 movs r3, #0 8029996: 9300 str r3, [sp, #0] entry_data.type = type; strncpy(entry_data.data, data, 50); 8029998: 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; 802999a: f88d 0004 strb.w r0, [sp, #4] strncpy(entry_data.data, data, 50); 802999e: 2232 movs r2, #50 ; 0x32 80299a0: 1d58 adds r0, r3, #5 80299a2: f7f8 fb3d bl 8022020 log_append(&entry_data); 80299a6: 4668 mov r0, sp 80299a8: f7ff ff82 bl 80298b0 } 80299ac: b00f add sp, #60 ; 0x3c 80299ae: bd00 pop {pc} 080299b0 : void log_add(char *log_data) { 80299b0: b530 push {r4, r5, lr} 80299b2: b08f sub sp, #60 ; 0x3c 80299b4: 4605 mov r5, r0 char buf_value[50]; uint8_t i, len; memset(buf_value, 0, 50); 80299b6: 2100 movs r1, #0 80299b8: 2232 movs r2, #50 ; 0x32 80299ba: a801 add r0, sp, #4 80299bc: f7f8 f8a0 bl 8021b00 len = strlen(log_data); 80299c0: 4628 mov r0, r5 80299c2: f7f8 fa75 bl 8021eb0 80299c6: b2c4 uxtb r4, r0 strncpy(buf_value, log_data, len); 80299c8: 4629 mov r1, r5 80299ca: a801 add r0, sp, #4 80299cc: 4622 mov r2, r4 80299ce: f7f8 fb27 bl 8022020 buf_value[0] = '\"'; 80299d2: 2322 movs r3, #34 ; 0x22 80299d4: f88d 3004 strb.w r3, [sp, #4] for(i = 0; i < len; i++) { if(buf_value[i] == ' ') buf_value[i] = ';'; 80299d8: 203b movs r0, #59 ; 0x3b len = strlen(log_data); strncpy(buf_value, log_data, len); buf_value[0] = '\"'; for(i = 0; i < len; i++) 80299da: 2300 movs r3, #0 80299dc: e004 b.n 80299e8 { if(buf_value[i] == ' ') 80299de: 5cca ldrb r2, [r1, r3] 80299e0: 2a20 cmp r2, #32 buf_value[i] = ';'; 80299e2: bf08 it eq 80299e4: 54c8 strbeq r0, [r1, r3] 80299e6: 3301 adds r3, #1 len = strlen(log_data); strncpy(buf_value, log_data, len); buf_value[0] = '\"'; for(i = 0; i < len; i++) 80299e8: b2da uxtb r2, r3 80299ea: 42a2 cmp r2, r4 80299ec: a901 add r1, sp, #4 80299ee: d3f6 bcc.n 80299de { if(buf_value[i] == ' ') buf_value[i] = ';'; } buf_value[len - 1] = ';'; 80299f0: ab0e add r3, sp, #56 ; 0x38 80299f2: 191c adds r4, r3, r4 if(fs.write.slot>67) { log_entry_t entry_data; entry_data.timestamp = 0; log_event_data(LOG_VALUE, buf_value); 80299f4: 2010 movs r0, #16 for(i = 0; i < len; i++) { if(buf_value[i] == ' ') buf_value[i] = ';'; } buf_value[len - 1] = ';'; 80299f6: 233b movs r3, #59 ; 0x3b 80299f8: f804 3c35 strb.w r3, [r4, #-53] if(fs.write.slot>67) { log_entry_t entry_data; entry_data.timestamp = 0; log_event_data(LOG_VALUE, buf_value); 80299fc: f7ff ffc8 bl 8029990 } else log_event_data(LOG_VALUE, buf_value); } 8029a00: b00f add sp, #60 ; 0x3c 8029a02: bd30 pop {r4, r5, pc} 08029a04 : * @brief Возвращает true если журнал проинициализирован */ bool LOG_IsInit() { return fLogInit; } 8029a04: 4b01 ldr r3, [pc, #4] ; (8029a0c ) 8029a06: 7818 ldrb r0, [r3, #0] 8029a08: 4770 bx lr 8029a0a: bf00 nop 8029a0c: 20000bc0 .word 0x20000bc0 08029a10 : /** * @brief Возвращает общее количество страниц */ uint32_t LOG_GetPageCount(void) { 8029a10: b508 push {r3, lr} return (((ringfs_count_estimate(&fs)) / 10) + 1); 8029a12: 4804 ldr r0, [pc, #16] ; (8029a24 ) 8029a14: f000 fab8 bl 8029f88 8029a18: 230a movs r3, #10 8029a1a: fb90 f0f3 sdiv r0, r0, r3 } 8029a1e: 3001 adds r0, #1 8029a20: bd08 pop {r3, pc} 8029a22: bf00 nop 8029a24: 20000b8c .word 0x20000b8c 08029a28 : uint32_t LOG_GetTotalSTRCount(void) { return ringfs_count_estimate(&fs); 8029a28: 4801 ldr r0, [pc, #4] ; (8029a30 ) 8029a2a: f000 baad b.w 8029f88 8029a2e: bf00 nop 8029a30: 20000b8c .word 0x20000b8c 08029a34 : } void LOG_GetPage(char *str, uint32_t page) { 8029a34: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 8029a38: b09d sub sp, #116 ; 0x74 8029a3a: 460d mov r5, r1 8029a3c: 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); 8029a3e: f7ff fff3 bl 8029a28 memset(buf, 0, 20); 8029a42: 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); 8029a44: 4604 mov r4, r0 memset(buf, 0, 20); 8029a46: 2214 movs r2, #20 8029a48: a809 add r0, sp, #36 ; 0x24 for(i=0; i < 10; i++){ fs.cursor_position = start - 10*(page-1) - 1 - i; 8029a4a: 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); 8029a4e: f7f8 f857 bl 8021b00 for(i=0; i < 10; i++){ fs.cursor_position = start - 10*(page-1) - 1 - i; 8029a52: fb08 4805 mla r8, r8, r5, r4 8029a56: 4c29 ldr r4, [pc, #164] ; (8029afc ) 8029a58: f108 0809 add.w r8, r8, #9 8029a5c: 2500 movs r5, #0 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); strncat(str, entry.data, strlen(entry.data)); 8029a5e: 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) 8029a62: 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) 8029a66: 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; 8029a68: 62a3 str r3, [r4, #40] ; 0x28 if(fs.cursor_position < 0) 8029a6a: db43 blt.n 8029af4 break; else{ fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; 8029a6c: f8d4 900c ldr.w r9, [r4, #12] 8029a70: 6920 ldr r0, [r4, #16] 8029a72: 6821 ldr r1, [r4, #0] 8029a74: fb93 f2f9 sdiv r2, r3, r9 8029a78: eb02 0e00 add.w lr, r2, r0 8029a7c: 6888 ldr r0, [r1, #8] 8029a7e: fb9e fcf0 sdiv ip, lr, r0 8029a82: fb00 e01c mls r0, r0, ip, lr fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; 8029a86: 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; 8029a8a: 6220 str r0, [r4, #32] fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; 8029a8c: 6263 str r3, [r4, #36] ; 0x24 } entry.type = LOG_VALUE; log_fetch(&entry, portMAX_DELAY); 8029a8e: 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; 8029a92: 2310 movs r3, #16 log_fetch(&entry, portMAX_DELAY); 8029a94: 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; 8029a96: f88d 303c strb.w r3, [sp, #60] ; 0x3c log_fetch(&entry, portMAX_DELAY); 8029a9a: f7ff ff35 bl 8029908 strncat(str, entry.data, strlen(entry.data)); 8029a9e: 4638 mov r0, r7 8029aa0: f7f8 fa06 bl 8021eb0 8029aa4: 4639 mov r1, r7 8029aa6: 4602 mov r2, r0 8029aa8: 4630 mov r0, r6 8029aaa: f7f8 fa31 bl 8021f10 TM_RTC_GetDateTimeFromUnix(&rtc_data, entry.timestamp); 8029aae: a805 add r0, sp, #20 8029ab0: 990e ldr r1, [sp, #56] ; 0x38 8029ab2: f7fc fd79 bl 80265a8 sprintf(buf, "%02i.%02i.%02i %02i:%02i:%02i", rtc_data.date, rtc_data.month, 8029ab6: f89d 101d ldrb.w r1, [sp, #29] 8029aba: f89d 201b ldrb.w r2, [sp, #27] 8029abe: 9100 str r1, [sp, #0] 8029ac0: f89d 1019 ldrb.w r1, [sp, #25] 8029ac4: f89d 301c ldrb.w r3, [sp, #28] 8029ac8: 9101 str r1, [sp, #4] 8029aca: f89d 1018 ldrb.w r1, [sp, #24] 8029ace: 9102 str r1, [sp, #8] 8029ad0: f89d 1014 ldrb.w r1, [sp, #20] 8029ad4: a809 add r0, sp, #36 ; 0x24 8029ad6: 9103 str r1, [sp, #12] 8029ad8: 4909 ldr r1, [pc, #36] ; (8029b00 ) 8029ada: f7fd fe9b bl 8027814 rtc_data.year, rtc_data.hours, rtc_data.minutes, rtc_data.seconds); strcat(str, buf); 8029ade: a909 add r1, sp, #36 ; 0x24 8029ae0: 4630 mov r0, r6 8029ae2: f7f8 f873 bl 8021bcc 8029ae6: 3501 adds r5, #1 strcat(str, "\","); 8029ae8: 4630 mov r0, r6 8029aea: 4906 ldr r1, [pc, #24] ; (8029b04 ) 8029aec: f7f8 f86e bl 8021bcc 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++){ 8029af0: 2d0a cmp r5, #10 8029af2: d1b6 bne.n 8029a62 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, "\","); } } 8029af4: b01d add sp, #116 ; 0x74 8029af6: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 8029afa: bf00 nop 8029afc: 20000b8c .word 0x20000b8c 8029b00: 08039a2a .word 0x08039a2a 8029b04: 08039a48 .word 0x08039a48 08029b08 : uint32_t LOG_GetData(int ptr, char *str, uint32_t size, bool start) { 8029b08: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8029b0c: b09c sub sp, #112 ; 0x70 8029b0e: 4690 mov r8, r2 TM_RTC_t rtc_data; log_entry_t entry; char buf[20]; uint8_t i; entry.type = LOG_VALUE; 8029b10: 2210 movs r2, #16 strcat(str, "\","); } } uint32_t LOG_GetData(int ptr, char *str, uint32_t size, bool start) { 8029b12: 4605 mov r5, r0 8029b14: 460c mov r4, r1 TM_RTC_t rtc_data; log_entry_t entry; char buf[20]; uint8_t i; entry.type = LOG_VALUE; 8029b16: f88d 203c strb.w r2, [sp, #60] ; 0x3c if(start) 8029b1a: b123 cbz r3, 8029b26 log_rewind(&entry, portMAX_DELAY); 8029b1c: a80e add r0, sp, #56 ; 0x38 8029b1e: f04f 31ff mov.w r1, #4294967295 8029b22: f7ff ff13 bl 802994c fs.cursor_position = ptr/STRING_SIZE; 8029b26: 4b29 ldr r3, [pc, #164] ; (8029bcc ) 8029b28: 2040 movs r0, #64 ; 0x40 8029b2a: fb95 f0f0 sdiv r0, r5, r0 fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; 8029b2e: 681e ldr r6, [r3, #0] 8029b30: 68dd ldr r5, [r3, #12] 8029b32: 691f ldr r7, [r3, #16] 8029b34: 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; 8029b36: 6298 str r0, [r3, #40] ; 0x28 fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; 8029b38: fb90 f1f5 sdiv r1, r0, r5 8029b3c: 19cf adds r7, r1, r7 8029b3e: fb97 f2f6 sdiv r2, r7, r6 8029b42: fb06 7612 mls r6, r6, r2, r7 fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; 8029b46: 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; 8029b4a: 621e str r6, [r3, #32] fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; 8029b4c: 6258 str r0, [r3, #36] ; 0x24 for(i = 0; i < size/STRING_SIZE; i++) 8029b4e: ea4f 1798 mov.w r7, r8, lsr #6 8029b52: 2500 movs r5, #0 { log_fetch(&entry, portMAX_DELAY); strncat(str, &entry.data[1], (strlen(entry.data) - 1)); 8029b54: 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++) 8029b58: e02f b.n 8029bba { log_fetch(&entry, portMAX_DELAY); 8029b5a: f04f 31ff mov.w r1, #4294967295 8029b5e: a80e add r0, sp, #56 ; 0x38 8029b60: f7ff fed2 bl 8029908 strncat(str, &entry.data[1], (strlen(entry.data) - 1)); 8029b64: 4630 mov r0, r6 8029b66: f7f8 f9a3 bl 8021eb0 8029b6a: f10d 013e add.w r1, sp, #62 ; 0x3e 8029b6e: 1e42 subs r2, r0, #1 8029b70: 4620 mov r0, r4 8029b72: f7f8 f9cd bl 8021f10 TM_RTC_GetDateTimeFromUnix(&rtc_data, entry.timestamp); 8029b76: a805 add r0, sp, #20 8029b78: 990e ldr r1, [sp, #56] ; 0x38 8029b7a: f7fc fd15 bl 80265a8 sprintf(buf, "%02i.%02i.%02i %02i:%02i:%02i", rtc_data.date, rtc_data.month, 8029b7e: f89d 101d ldrb.w r1, [sp, #29] 8029b82: f89d 201b ldrb.w r2, [sp, #27] 8029b86: 9100 str r1, [sp, #0] 8029b88: f89d 1019 ldrb.w r1, [sp, #25] 8029b8c: f89d 301c ldrb.w r3, [sp, #28] 8029b90: 9101 str r1, [sp, #4] 8029b92: f89d 1018 ldrb.w r1, [sp, #24] 8029b96: 9102 str r1, [sp, #8] 8029b98: f89d 1014 ldrb.w r1, [sp, #20] 8029b9c: a809 add r0, sp, #36 ; 0x24 8029b9e: 9103 str r1, [sp, #12] 8029ba0: 490b ldr r1, [pc, #44] ; (8029bd0 ) 8029ba2: f7fd fe37 bl 8027814 rtc_data.year, rtc_data.hours, rtc_data.minutes, rtc_data.seconds); strcat(str, buf); 8029ba6: a909 add r1, sp, #36 ; 0x24 8029ba8: 4620 mov r0, r4 8029baa: f7f8 f80f bl 8021bcc strcat(str, "\n"); 8029bae: 4620 mov r0, r4 8029bb0: 4908 ldr r1, [pc, #32] ; (8029bd4 ) 8029bb2: f7f8 f80b bl 8021bcc 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++) 8029bb6: 3501 adds r5, #1 8029bb8: b2ed uxtb r5, r5 8029bba: 42bd cmp r5, r7 8029bbc: d3cd bcc.n 8029b5a 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); 8029bbe: 4620 mov r0, r4 8029bc0: f7f8 f976 bl 8021eb0 } 8029bc4: b01c add sp, #112 ; 0x70 8029bc6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8029bca: bf00 nop 8029bcc: 20000b8c .word 0x20000b8c 8029bd0: 08039a2a .word 0x08039a2a 8029bd4: 08040f85 .word 0x08040f85 08029bd8 : /** * @brief Возвращает общее количество страниц */ uint32_t History_GetPageCount(void) { 8029bd8: b508 push {r3, lr} return (((ringfs_count_estimate(&fs2)) / 10) + 1); 8029bda: 4804 ldr r0, [pc, #16] ; (8029bec ) 8029bdc: f000 f9d4 bl 8029f88 8029be0: 230a movs r3, #10 8029be2: fb90 f0f3 sdiv r0, r0, r3 } 8029be6: 3001 adds r0, #1 8029be8: bd08 pop {r3, pc} 8029bea: bf00 nop 8029bec: 20000b60 .word 0x20000b60 08029bf0 : uint32_t History_GetTotalSTRCount(void) { return ringfs_count_estimate(&fs2); 8029bf0: 4801 ldr r0, [pc, #4] ; (8029bf8 ) 8029bf2: f000 b9c9 b.w 8029f88 8029bf6: bf00 nop 8029bf8: 20000b60 .word 0x20000b60 08029bfc : } void History_GetPage(char *str, uint32_t page) { 8029bfc: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 8029c00: b09d sub sp, #116 ; 0x74 8029c02: 460e mov r6, r1 8029c04: 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); 8029c06: f7ff fff3 bl 8029bf0 memset(buf, 0, 20); 8029c0a: 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); 8029c0c: 4605 mov r5, r0 memset(buf, 0, 20); 8029c0e: 2214 movs r2, #20 8029c10: a809 add r0, sp, #36 ; 0x24 for(i=0; i < 10; i++){ fs2.cursor_position = start - 10*(page-1) - 1 - i; 8029c12: 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); 8029c16: f7f7 ff73 bl 8021b00 for(i=0; i < 10; i++){ fs2.cursor_position = start - 10*(page-1) - 1 - i; 8029c1a: fb09 5906 mla r9, r9, r6, r5 8029c1e: 4d36 ldr r5, [pc, #216] ; (8029cf8 ) 8029c20: f109 0909 add.w r9, r9, #9 8029c24: 2600 movs r6, #0 entry.type = LOG_LOGIN; log_fetch(&entry, portMAX_DELAY); strcat(str, "\""); strncat(str, logsStrShortRu[entry.type], (strlen(logsStrShortRu[entry.type]) )); strcat(str, ";"); strncat(str, entry.data, (strlen(entry.data) )); 8029c26: 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) 8029c2a: 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) 8029c2e: 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; 8029c30: 62ab str r3, [r5, #40] ; 0x28 if(fs2.cursor_position < 0) 8029c32: db5e blt.n 8029cf2 break; else{ fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs.slots_per_sector)%fs2.flash->sector_count; 8029c34: 4a31 ldr r2, [pc, #196] ; (8029cfc ) 8029c36: 68d1 ldr r1, [r2, #12] 8029c38: 692a ldr r2, [r5, #16] 8029c3a: fb93 f1f1 sdiv r1, r3, r1 8029c3e: 1889 adds r1, r1, r2 8029c40: 682a ldr r2, [r5, #0] 8029c42: 6892 ldr r2, [r2, #8] 8029c44: fb91 f0f2 sdiv r0, r1, r2 8029c48: fb02 1210 mls r2, r2, r0, r1 8029c4c: 622a str r2, [r5, #32] fs2.cursor.slot = fs2.cursor_position%fs2.slots_per_sector; 8029c4e: 68ea ldr r2, [r5, #12] 8029c50: fb93 f1f2 sdiv r1, r3, r2 8029c54: fb02 3311 mls r3, r2, r1, r3 8029c58: 626b str r3, [r5, #36] ; 0x24 } entry.type = LOG_LOGIN; log_fetch(&entry, portMAX_DELAY); 8029c5a: 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; 8029c5e: 2304 movs r3, #4 log_fetch(&entry, portMAX_DELAY); 8029c60: 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; 8029c62: f88d 303c strb.w r3, [sp, #60] ; 0x3c log_fetch(&entry, portMAX_DELAY); 8029c66: f7ff fe4f bl 8029908 strcat(str, "\""); 8029c6a: 4925 ldr r1, [pc, #148] ; (8029d00 ) 8029c6c: 4620 mov r0, r4 8029c6e: f7f7 ffad bl 8021bcc strncat(str, logsStrShortRu[entry.type], (strlen(logsStrShortRu[entry.type]) )); 8029c72: 4b24 ldr r3, [pc, #144] ; (8029d04 ) 8029c74: f89d 203c ldrb.w r2, [sp, #60] ; 0x3c 8029c78: f853 8022 ldr.w r8, [r3, r2, lsl #2] 8029c7c: 4640 mov r0, r8 8029c7e: f7f8 f917 bl 8021eb0 8029c82: 4641 mov r1, r8 8029c84: 4602 mov r2, r0 8029c86: 4620 mov r0, r4 8029c88: f7f8 f942 bl 8021f10 strcat(str, ";"); 8029c8c: 491e ldr r1, [pc, #120] ; (8029d08 ) 8029c8e: 4620 mov r0, r4 8029c90: f7f7 ff9c bl 8021bcc strncat(str, entry.data, (strlen(entry.data) )); 8029c94: 4638 mov r0, r7 8029c96: f7f8 f90b bl 8021eb0 8029c9a: 4639 mov r1, r7 8029c9c: 4602 mov r2, r0 8029c9e: 4620 mov r0, r4 8029ca0: f7f8 f936 bl 8021f10 strcat(str, ";"); 8029ca4: 4918 ldr r1, [pc, #96] ; (8029d08 ) 8029ca6: 4620 mov r0, r4 8029ca8: f7f7 ff90 bl 8021bcc TM_RTC_GetDateTimeFromUnix(&rtc_data, entry.timestamp); 8029cac: a805 add r0, sp, #20 8029cae: 990e ldr r1, [sp, #56] ; 0x38 8029cb0: f7fc fc7a bl 80265a8 sprintf(buf, "%02i.%02i.%02i %02i:%02i:%02i", rtc_data.date, rtc_data.month, 8029cb4: f89d 101d ldrb.w r1, [sp, #29] 8029cb8: f89d 201b ldrb.w r2, [sp, #27] 8029cbc: 9100 str r1, [sp, #0] 8029cbe: f89d 1019 ldrb.w r1, [sp, #25] 8029cc2: f89d 301c ldrb.w r3, [sp, #28] 8029cc6: 9101 str r1, [sp, #4] 8029cc8: f89d 1018 ldrb.w r1, [sp, #24] 8029ccc: 9102 str r1, [sp, #8] 8029cce: f89d 1014 ldrb.w r1, [sp, #20] 8029cd2: a809 add r0, sp, #36 ; 0x24 8029cd4: 9103 str r1, [sp, #12] 8029cd6: 490d ldr r1, [pc, #52] ; (8029d0c ) 8029cd8: f7fd fd9c bl 8027814 rtc_data.year, rtc_data.hours, rtc_data.minutes, rtc_data.seconds); strcat(str, buf); 8029cdc: a909 add r1, sp, #36 ; 0x24 8029cde: 4620 mov r0, r4 8029ce0: f7f7 ff74 bl 8021bcc 8029ce4: 3601 adds r6, #1 strcat(str, "\","); 8029ce6: 4620 mov r0, r4 8029ce8: 4909 ldr r1, [pc, #36] ; (8029d10 ) 8029cea: f7f7 ff6f bl 8021bcc 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++){ 8029cee: 2e0a cmp r6, #10 8029cf0: d19b bne.n 8029c2a 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, "\","); } } 8029cf2: b01d add sp, #116 ; 0x74 8029cf4: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 8029cf8: 20000b60 .word 0x20000b60 8029cfc: 20000b8c .word 0x20000b8c 8029d00: 08044b3f .word 0x08044b3f 8029d04: 200006c0 .word 0x200006c0 8029d08: 08045955 .word 0x08045955 8029d0c: 08039a2a .word 0x08039a2a 8029d10: 08039a48 .word 0x08039a48 08029d14 : uint32_t History_GetData(int ptr, char *str, uint32_t size, bool start) { 8029d14: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8029d18: f5ad 6d8b sub.w sp, sp, #1112 ; 0x458 8029d1c: 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; 8029d1e: 2204 movs r2, #4 strcat(str, "\","); } } uint32_t History_GetData(int ptr, char *str, uint32_t size, bool start) { 8029d20: 4604 mov r4, r0 8029d22: 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; 8029d24: f88d 203c strb.w r2, [sp, #60] ; 0x3c if(start) 8029d28: b123 cbz r3, 8029d34 log_rewind(&entry, portMAX_DELAY); 8029d2a: a80e add r0, sp, #56 ; 0x38 8029d2c: f04f 31ff mov.w r1, #4294967295 8029d30: f7ff fe0c bl 802994c fs2.cursor_position = ptr/STRING_SIZE_HISTORY; 8029d34: 4b42 ldr r3, [pc, #264] ; (8029e40 ) 8029d36: 2164 movs r1, #100 ; 0x64 fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs2.slots_per_sector)%fs2.flash->sector_count; 8029d38: 68de ldr r6, [r3, #12] 8029d3a: 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; 8029d3c: fb94 f4f1 sdiv r4, r4, r1 fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs2.slots_per_sector)%fs2.flash->sector_count; 8029d40: fb94 f0f6 sdiv r0, r4, r6 8029d44: eb00 0e07 add.w lr, r0, r7 8029d48: 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; 8029d4a: 629c str r4, [r3, #40] ; 0x28 fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs2.slots_per_sector)%fs2.flash->sector_count; 8029d4c: 68bf ldr r7, [r7, #8] 8029d4e: fb9e f2f7 sdiv r2, lr, r7 fs2.cursor.slot = fs2.cursor_position%fs2.slots_per_sector; 8029d52: 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; 8029d56: fb07 e712 mls r7, r7, r2, lr fs2.cursor.slot = fs2.cursor_position%fs2.slots_per_sector; 8029d5a: 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; 8029d5c: 621f str r7, [r3, #32] fs2.cursor.slot = fs2.cursor_position%fs2.slots_per_sector; for(i = 0; i < size/STRING_SIZE_HISTORY; i++) 8029d5e: fbb8 f8f1 udiv r8, r8, r1 8029d62: 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, ";"); strncat(temp_str, entry.data, (strlen(entry.data))); 8029d64: 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++) 8029d68: e05f b.n 8029e2a { memset(temp_str, 0, 100); 8029d6a: 2264 movs r2, #100 ; 0x64 8029d6c: 2100 movs r1, #0 8029d6e: a81c add r0, sp, #112 ; 0x70 8029d70: f7f7 fec6 bl 8021b00 log_fetch(&entry, portMAX_DELAY); 8029d74: f04f 31ff mov.w r1, #4294967295 8029d78: a80e add r0, sp, #56 ; 0x38 8029d7a: f7ff fdc5 bl 8029908 strncat(temp_str, logsStrShortRu[entry.type], (strlen(logsStrShortRu[entry.type]))); 8029d7e: 4b31 ldr r3, [pc, #196] ; (8029e44 ) 8029d80: f89d 203c ldrb.w r2, [sp, #60] ; 0x3c 8029d84: f853 7022 ldr.w r7, [r3, r2, lsl #2] 8029d88: 4638 mov r0, r7 8029d8a: f7f8 f891 bl 8021eb0 8029d8e: 4639 mov r1, r7 8029d90: 4602 mov r2, r0 8029d92: a81c add r0, sp, #112 ; 0x70 8029d94: f7f8 f8bc bl 8021f10 strcat(temp_str, ";"); 8029d98: 492b ldr r1, [pc, #172] ; (8029e48 ) 8029d9a: a81c add r0, sp, #112 ; 0x70 8029d9c: f7f7 ff16 bl 8021bcc strncat(temp_str, entry.data, (strlen(entry.data))); 8029da0: 4630 mov r0, r6 8029da2: f7f8 f885 bl 8021eb0 8029da6: 4631 mov r1, r6 8029da8: 4602 mov r2, r0 8029daa: a81c add r0, sp, #112 ; 0x70 8029dac: f7f8 f8b0 bl 8021f10 strcat(temp_str, ";"); 8029db0: 4925 ldr r1, [pc, #148] ; (8029e48 ) 8029db2: a81c add r0, sp, #112 ; 0x70 8029db4: f7f7 ff0a bl 8021bcc TM_RTC_GetDateTimeFromUnix(&rtc_data, entry.timestamp); 8029db8: a805 add r0, sp, #20 8029dba: 990e ldr r1, [sp, #56] ; 0x38 8029dbc: f7fc fbf4 bl 80265a8 sprintf(buf, "%02i.%02i.%02i %02i:%02i:%02i", rtc_data.date, rtc_data.month, 8029dc0: f89d 101d ldrb.w r1, [sp, #29] 8029dc4: f89d 301c ldrb.w r3, [sp, #28] 8029dc8: 9100 str r1, [sp, #0] 8029dca: f89d 1019 ldrb.w r1, [sp, #25] 8029dce: f89d 201b ldrb.w r2, [sp, #27] 8029dd2: 9101 str r1, [sp, #4] 8029dd4: f89d 1018 ldrb.w r1, [sp, #24] 8029dd8: 9102 str r1, [sp, #8] 8029dda: f89d 1014 ldrb.w r1, [sp, #20] 8029dde: a809 add r0, sp, #36 ; 0x24 8029de0: 9103 str r1, [sp, #12] 8029de2: 491a ldr r1, [pc, #104] ; (8029e4c ) 8029de4: f7fd fd16 bl 8027814 rtc_data.year, rtc_data.hours, rtc_data.minutes, rtc_data.seconds); strcat(temp_str, buf); 8029de8: a909 add r1, sp, #36 ; 0x24 8029dea: a81c add r0, sp, #112 ; 0x70 8029dec: f7f7 feee bl 8021bcc len = strlen(temp_str); 8029df0: a81c add r0, sp, #112 ; 0x70 8029df2: f7f8 f85d bl 8021eb0 if (len <= STRING_SIZE_HISTORY - 1) 8029df6: b283 uxth r3, r0 8029df8: 2b63 cmp r3, #99 ; 0x63 8029dfa: d80c bhi.n 8029e16 strncat(str, temp_str, STRING_SIZE_HISTORY); } return strlen(str); } 8029dfc: 461a mov r2, r3 len = strlen(temp_str); if (len <= STRING_SIZE_HISTORY - 1) { memset(&temp_str[len], ' ', STRING_SIZE_HISTORY - len - 1); 8029dfe: ab1c add r3, sp, #112 ; 0x70 8029e00: 1898 adds r0, r3, r2 8029e02: 2120 movs r1, #32 8029e04: f1c2 0263 rsb r2, r2, #99 ; 0x63 8029e08: f7f7 fe7a bl 8021b00 strcat(temp_str, "\n"); 8029e0c: a81c add r0, sp, #112 ; 0x70 8029e0e: 4910 ldr r1, [pc, #64] ; (8029e50 ) 8029e10: f7f7 fedc bl 8021bcc 8029e14: e002 b.n 8029e1c } else { temp_str[STRING_SIZE - 1] = 0xa; 8029e16: 230a movs r3, #10 8029e18: f88d 30af strb.w r3, [sp, #175] ; 0xaf } strncat(str, temp_str, STRING_SIZE_HISTORY); 8029e1c: 4628 mov r0, r5 8029e1e: a91c add r1, sp, #112 ; 0x70 8029e20: 2264 movs r2, #100 ; 0x64 8029e22: f7f8 f875 bl 8021f10 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++) 8029e26: 3401 adds r4, #1 8029e28: b2e4 uxtb r4, r4 8029e2a: 4544 cmp r4, r8 8029e2c: d39d bcc.n 8029d6a temp_str[STRING_SIZE - 1] = 0xa; } strncat(str, temp_str, STRING_SIZE_HISTORY); } return strlen(str); 8029e2e: 4628 mov r0, r5 8029e30: f7f8 f83e bl 8021eb0 } 8029e34: b016 add sp, #88 ; 0x58 8029e36: f50d 6d80 add.w sp, sp, #1024 ; 0x400 8029e3a: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8029e3e: bf00 nop 8029e40: 20000b60 .word 0x20000b60 8029e44: 200006c0 .word 0x200006c0 8029e48: 08045955 .word 0x08045955 8029e4c: 08039a2a .word 0x08039a2a 8029e50: 08040f85 .word 0x08040f85 08029e54 <_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; 8029e54: 6803 ldr r3, [r0, #0] 8029e56: 680a ldr r2, [r1, #0] struct slot_header { uint32_t status; }; static int _slot_address(struct ringfs *fs, struct ringfs_loc *loc) { 8029e58: 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; 8029e5a: 685c ldr r4, [r3, #4] 8029e5c: 18a2 adds r2, r4, r2 8029e5e: 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; 8029e60: 6883 ldr r3, [r0, #8] 8029e62: 6848 ldr r0, [r1, #4] 8029e64: 3304 adds r3, #4 8029e66: 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) + 8029e68: fb04 3002 mla r0, r4, r2, r3 (sizeof(struct slot_header) + fs->object_size) * loc->slot; } 8029e6c: 3008 adds r0, #8 8029e6e: bd10 pop {r4, pc} 08029e70 <_slot_get_status>: static int _slot_get_status(struct ringfs *fs, struct ringfs_loc *loc, uint32_t *status) { 8029e70: b570 push {r4, r5, r6, lr} return fs->flash->read(fs->flash, 8029e72: 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) { 8029e74: 4616 mov r6, r2 return fs->flash->read(fs->flash, 8029e76: f7ff ffed bl 8029e54 <_slot_address> 8029e7a: 6965 ldr r5, [r4, #20] 8029e7c: 4601 mov r1, r0 8029e7e: 4632 mov r2, r6 8029e80: 4620 mov r0, r4 8029e82: 2304 movs r3, #4 8029e84: 47a8 blx r5 _slot_address(fs, loc) + offsetof(struct slot_header, status), status, sizeof(*status)); } 8029e86: bd70 pop {r4, r5, r6, pc} 08029e88 <_slot_set_status>: static int _slot_set_status(struct ringfs *fs, struct ringfs_loc *loc, uint32_t status) { 8029e88: b573 push {r0, r1, r4, r5, r6, lr} 8029e8a: ac02 add r4, sp, #8 return fs->flash->program(fs->flash, 8029e8c: 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) { 8029e8e: f844 2d04 str.w r2, [r4, #-4]! return fs->flash->program(fs->flash, 8029e92: f7ff ffdf bl 8029e54 <_slot_address> 8029e96: 692e ldr r6, [r5, #16] 8029e98: 4601 mov r1, r0 8029e9a: 4622 mov r2, r4 8029e9c: 4628 mov r0, r5 8029e9e: 2304 movs r3, #4 8029ea0: 47b0 blx r6 _slot_address(fs, loc) + offsetof(struct slot_header, status), &status, sizeof(status)); } 8029ea2: bd7c pop {r2, r3, r4, r5, r6, pc} 08029ea4 <_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, 8029ea4: 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; 8029ea6: 6843 ldr r3, [r0, #4] 8029ea8: 18cb adds r3, r1, r3 8029eaa: 6801 ldr r1, [r0, #0] } static int _sector_get_status(struct ringfs *fs, int sector, uint32_t *status) { 8029eac: b510 push {r4, lr} return fs->flash->read(fs->flash, 8029eae: 4359 muls r1, r3 8029eb0: 6944 ldr r4, [r0, #20] 8029eb2: 2304 movs r3, #4 8029eb4: 47a0 blx r4 _sector_address(fs, sector) + offsetof(struct sector_header, status), status, sizeof(*status)); } 8029eb6: bd10 pop {r4, pc} 08029eb8 <_sector_set_status>: static int _sector_set_status(struct ringfs *fs, int sector, uint32_t status) { 8029eb8: b513 push {r0, r1, r4, lr} return fs->flash->program(fs->flash, 8029eba: 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) { 8029ebc: ab02 add r3, sp, #8 return fs->flash->program(fs->flash, 8029ebe: 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) { 8029ec0: 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; 8029ec4: 6842 ldr r2, [r0, #4] 8029ec6: 188a adds r2, r1, r2 8029ec8: 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, 8029eca: 4351 muls r1, r2 8029ecc: 461a mov r2, r3 8029ece: 2304 movs r3, #4 8029ed0: 47a0 blx r4 _sector_address(fs, sector) + offsetof(struct sector_header, status), &status, sizeof(status)); } 8029ed2: bd1c pop {r2, r3, r4, pc} 08029ed4 <_sector_free>: static int _sector_free(struct ringfs *fs, int sector) { 8029ed4: 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; 8029ed6: 6803 ldr r3, [r0, #0] 8029ed8: 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) { 8029eda: 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; 8029edc: 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); 8029ede: 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; 8029ee2: 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) { 8029ee4: 460e mov r6, r1 int sector_addr = _sector_address(fs, sector); _sector_set_status(fs, sector, SECTOR_ERASING); 8029ee6: f7ff ffe7 bl 8029eb8 <_sector_set_status> fs->flash->sector_erase(fs->flash, sector_addr); 8029eea: 6820 ldr r0, [r4, #0] 8029eec: 4629 mov r1, r5 8029eee: 68c3 ldr r3, [r0, #12] 8029ef0: 4798 blx r3 fs->flash->program(fs->flash, 8029ef2: 4622 mov r2, r4 8029ef4: 1d29 adds r1, r5, #4 8029ef6: f852 0b04 ldr.w r0, [r2], #4 8029efa: 2304 movs r3, #4 8029efc: 6907 ldr r7, [r0, #16] 8029efe: 47b8 blx r7 sector_addr + offsetof(struct sector_header, version), &fs->version, sizeof(fs->version)); _sector_set_status(fs, sector, SECTOR_FREE); 8029f00: 4620 mov r0, r4 8029f02: 4631 mov r1, r6 8029f04: f06f 02ff mvn.w r2, #255 ; 0xff 8029f08: f7ff ffd6 bl 8029eb8 <_sector_set_status> return 0; } 8029f0c: 2000 movs r0, #0 8029f0e: bdf8 pop {r3, r4, r5, r6, r7, pc} 08029f10 <_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++; 8029f10: 684b ldr r3, [r1, #4] if (loc->slot >= fs->slots_per_sector) 8029f12: 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++; 8029f14: 3301 adds r3, #1 if (loc->slot >= fs->slots_per_sector) 8029f16: 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++; 8029f18: 604b str r3, [r1, #4] if (loc->slot >= fs->slots_per_sector) 8029f1a: db09 blt.n 8029f30 <_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) 8029f1c: 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++; 8029f1e: 680a ldr r2, [r1, #0] if (loc->sector >= fs->flash->sector_count) 8029f20: 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++; 8029f22: 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; 8029f24: 2300 movs r3, #0 loc->sector++; if (loc->sector >= fs->flash->sector_count) 8029f26: 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; 8029f28: e881 000c stmia.w r1, {r2, r3} loc->sector++; if (loc->sector >= fs->flash->sector_count) loc->sector = 0; 8029f2c: bfa8 it ge 8029f2e: 600b strge r3, [r1, #0] 8029f30: 4770 bx lr 08029f32 : 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; 8029f32: e880 000e stmia.w r0, {r1, r2, r3} /* Precalculate commonly used values. */ fs->slots_per_sector = (fs->flash->sector_size - sizeof(struct sector_header)) / 8029f36: 680a ldr r2, [r1, #0] (sizeof(struct slot_header) + fs->object_size); 8029f38: 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)) / 8029f3a: 3a08 subs r2, #8 8029f3c: fbb2 f3f3 udiv r3, r2, r3 8029f40: 60c3 str r3, [r0, #12] (sizeof(struct slot_header) + fs->object_size); return 0; } 8029f42: 2000 movs r0, #0 8029f44: 4770 bx lr 08029f46 : int ringfs_format(struct ringfs *fs) { 8029f46: b538 push {r3, r4, r5, lr} 8029f48: 4604 mov r4, r0 /* Mark all sectors to prevent half-erased filesystems. */ for (int sector=0; sectorflash->sector_count; sector++) 8029f4a: 2500 movs r5, #0 8029f4c: e005 b.n 8029f5a _sector_set_status(fs, sector, SECTOR_FORMATTING); 8029f4e: 4629 mov r1, r5 8029f50: 4620 mov r0, r4 8029f52: 2200 movs r2, #0 8029f54: f7ff ffb0 bl 8029eb8 <_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++) 8029f58: 3501 adds r5, #1 8029f5a: 6823 ldr r3, [r4, #0] 8029f5c: 689b ldr r3, [r3, #8] 8029f5e: 429d cmp r5, r3 8029f60: dbf5 blt.n 8029f4e 8029f62: 2500 movs r5, #0 8029f64: e004 b.n 8029f70 _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); 8029f66: 4629 mov r1, r5 8029f68: 4620 mov r0, r4 8029f6a: f7ff ffb3 bl 8029ed4 <_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++) 8029f6e: 3501 adds r5, #1 8029f70: 6823 ldr r3, [r4, #0] 8029f72: 689b ldr r3, [r3, #8] 8029f74: 429d cmp r5, r3 8029f76: dbf6 blt.n 8029f66 _sector_free(fs, sector); /* Start reading & writing at the first sector. */ fs->read.sector = 0; 8029f78: 2000 movs r0, #0 8029f7a: 6120 str r0, [r4, #16] fs->read.slot = 0; 8029f7c: 6160 str r0, [r4, #20] fs->write.sector = 0; 8029f7e: 61a0 str r0, [r4, #24] fs->write.slot = 0; 8029f80: 61e0 str r0, [r4, #28] fs->cursor.sector = 0; 8029f82: 6220 str r0, [r4, #32] fs->cursor.slot = 0; 8029f84: 6260 str r0, [r4, #36] ; 0x24 return 0; } 8029f86: bd38 pop {r3, r4, r5, pc} 08029f88 : 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) % 8029f88: 6803 ldr r3, [r0, #0] 8029f8a: 6981 ldr r1, [r0, #24] 8029f8c: 6902 ldr r2, [r0, #16] 8029f8e: 689b ldr r3, [r3, #8] 8029f90: 1a8a subs r2, r1, r2 8029f92: 18d2 adds r2, r2, r3 8029f94: fb92 f1f3 sdiv r1, r2, r3 8029f98: fb03 2311 mls r3, r3, r1, r2 { return fs->slots_per_sector * (fs->flash->sector_count - 1); } int ringfs_count_estimate(struct ringfs *fs) { 8029f9c: 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; 8029f9e: 69c1 ldr r1, [r0, #28] 8029fa0: 68c4 ldr r4, [r0, #12] 8029fa2: 6940 ldr r0, [r0, #20] 8029fa4: fb04 1103 mla r1, r4, r3, r1 } 8029fa8: 1a08 subs r0, r1, r0 8029faa: bd10 pop {r4, pc} 08029fac : * - 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; 8029fac: 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) { 8029fae: 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; 8029fb0: 6985 ldr r5, [r0, #24] 8029fb2: 689b ldr r3, [r3, #8] 8029fb4: 3501 adds r5, #1 8029fb6: fb95 f2f3 sdiv r2, r5, r3 8029fba: 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) { 8029fbe: 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); 8029fc0: aa01 add r2, sp, #4 8029fc2: 4629 mov r1, r5 int ringfs_cursor_position(struct ringfs *fs) { return fs->cursor_position; } int ringfs_append(struct ringfs *fs, const void *object) { 8029fc4: 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); 8029fc6: f7ff ff6d bl 8029ea4 <_sector_get_status> if (status != SECTOR_FREE) { 8029fca: 9b01 ldr r3, [sp, #4] 8029fcc: f513 7f80 cmn.w r3, #256 ; 0x100 8029fd0: d01b beq.n 802a00a /* Next sector must be freed. But first... */ /* Move the read & cursor heads out of the way. */ if (fs->read.sector == next_sector) 8029fd2: 6923 ldr r3, [r4, #16] 8029fd4: 42ab cmp r3, r5 8029fd6: d108 bne.n 8029fea /** 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) 8029fd8: 6821 ldr r1, [r4, #0] 8029fda: 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++; 8029fdc: 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; 8029fde: 2300 movs r3, #0 loc->sector++; if (loc->sector >= fs->flash->sector_count) 8029fe0: 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++; 8029fe2: 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; 8029fe4: 6163 str r3, [r4, #20] loc->sector++; if (loc->sector >= fs->flash->sector_count) loc->sector = 0; 8029fe6: bfa8 it ge 8029fe8: 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) 8029fea: 6a23 ldr r3, [r4, #32] 8029fec: 42ab cmp r3, r5 8029fee: d108 bne.n 802a002 /** 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) 8029ff0: 6821 ldr r1, [r4, #0] 8029ff2: 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++; 8029ff4: 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; 8029ff6: 2300 movs r3, #0 loc->sector++; if (loc->sector >= fs->flash->sector_count) 8029ff8: 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++; 8029ffa: 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; 8029ffc: 6263 str r3, [r4, #36] ; 0x24 loc->sector++; if (loc->sector >= fs->flash->sector_count) loc->sector = 0; 8029ffe: bfa8 it ge 802a000: 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); 802a002: 4620 mov r0, r4 802a004: 4629 mov r1, r5 802a006: f7ff ff65 bl 8029ed4 <_sector_free> } /* Now we can make sure the current write sector is writable. */ _sector_get_status(fs, fs->write.sector, &status); 802a00a: 4620 mov r0, r4 802a00c: 69a1 ldr r1, [r4, #24] 802a00e: aa01 add r2, sp, #4 802a010: f7ff ff48 bl 8029ea4 <_sector_get_status> if (status == SECTOR_FREE) { 802a014: 9b01 ldr r3, [sp, #4] 802a016: f513 7f80 cmn.w r3, #256 ; 0x100 802a01a: d105 bne.n 802a028 /* Free sector. Mark as used. */ _sector_set_status(fs, fs->write.sector, SECTOR_IN_USE); 802a01c: 4620 mov r0, r4 802a01e: 69a1 ldr r1, [r4, #24] 802a020: 4a15 ldr r2, [pc, #84] ; (802a078 ) 802a022: f7ff ff49 bl 8029eb8 <_sector_set_status> 802a026: e008 b.n 802a03a } else if (status != SECTOR_IN_USE) { 802a028: f513 3f80 cmn.w r3, #65536 ; 0x10000 802a02c: d005 beq.n 802a03a printf("ringfs_append: corrupted filesystem\r\n"); 802a02e: 4813 ldr r0, [pc, #76] ; (802a07c ) 802a030: f7fd fba4 bl 802777c return -1; 802a034: f04f 30ff mov.w r0, #4294967295 802a038: e01d b.n 802a076 } /* Preallocate slot. */ _slot_set_status(fs, &fs->write, SLOT_RESERVED); 802a03a: f104 0518 add.w r5, r4, #24 802a03e: f06f 02ff mvn.w r2, #255 ; 0xff 802a042: 4629 mov r1, r5 802a044: 4620 mov r0, r4 802a046: f7ff ff1f bl 8029e88 <_slot_set_status> /* Write object. */ fs->flash->program(fs->flash, _slot_address(fs, &fs->write) + sizeof(struct slot_header), 802a04a: 4629 mov r1, r5 802a04c: 4620 mov r0, r4 802a04e: f7ff ff01 bl 8029e54 <_slot_address> /* Preallocate slot. */ _slot_set_status(fs, &fs->write, SLOT_RESERVED); /* Write object. */ fs->flash->program(fs->flash, 802a052: 6826 ldr r6, [r4, #0] 802a054: 68a3 ldr r3, [r4, #8] 802a056: f8d6 c010 ldr.w ip, [r6, #16] _slot_address(fs, &fs->write) + sizeof(struct slot_header), 802a05a: 1d01 adds r1, r0, #4 /* Preallocate slot. */ _slot_set_status(fs, &fs->write, SLOT_RESERVED); /* Write object. */ fs->flash->program(fs->flash, 802a05c: 463a mov r2, r7 802a05e: 4630 mov r0, r6 802a060: 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); 802a062: 4629 mov r1, r5 802a064: 4a04 ldr r2, [pc, #16] ; (802a078 ) 802a066: 4620 mov r0, r4 802a068: f7ff ff0e bl 8029e88 <_slot_set_status> /* Advance the write head. */ _loc_advance_slot(fs, &fs->write); 802a06c: 4620 mov r0, r4 802a06e: 4629 mov r1, r5 802a070: f7ff ff4e bl 8029f10 <_loc_advance_slot> return 0; 802a074: 2000 movs r0, #0 } 802a076: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 802a078: ffff0000 .word 0xffff0000 802a07c: 08039c4a .word 0x08039c4a 0802a080 : int ringfs_fetch(struct ringfs *fs, void *object) { 802a080: e92d 41f3 stmdb sp!, {r0, r1, r4, r5, r6, r7, r8, lr} 802a084: 4604 mov r4, r0 802a086: 4688 mov r8, r1 /* Advance forward in search of a valid slot. */ while (!_loc_equal(&fs->cursor, &fs->write)) { 802a088: f100 0520 add.w r5, r0, #32 802a08c: e021 b.n 802a0d2 uint32_t status; _slot_get_status(fs, &fs->cursor, &status); 802a08e: 4620 mov r0, r4 802a090: 4629 mov r1, r5 802a092: aa01 add r2, sp, #4 802a094: f7ff feec bl 8029e70 <_slot_get_status> if (status == SLOT_VALID) { 802a098: 9b01 ldr r3, [sp, #4] 802a09a: f513 3f80 cmn.w r3, #65536 ; 0x10000 802a09e: d114 bne.n 802a0ca fs->flash->read(fs->flash, _slot_address(fs, &fs->cursor) + sizeof(struct slot_header), 802a0a0: 4629 mov r1, r5 802a0a2: 4620 mov r0, r4 802a0a4: f7ff fed6 bl 8029e54 <_slot_address> uint32_t status; _slot_get_status(fs, &fs->cursor, &status); if (status == SLOT_VALID) { fs->flash->read(fs->flash, 802a0a8: 6827 ldr r7, [r4, #0] 802a0aa: 68a3 ldr r3, [r4, #8] 802a0ac: f8d7 c014 ldr.w ip, [r7, #20] _slot_address(fs, &fs->cursor) + sizeof(struct slot_header), 802a0b0: 1d01 adds r1, r0, #4 uint32_t status; _slot_get_status(fs, &fs->cursor, &status); if (status == SLOT_VALID) { fs->flash->read(fs->flash, 802a0b2: 4642 mov r2, r8 802a0b4: 4638 mov r0, r7 802a0b6: 47e0 blx ip _slot_address(fs, &fs->cursor) + sizeof(struct slot_header), object, fs->object_size); _loc_advance_slot(fs, &fs->cursor); 802a0b8: 4620 mov r0, r4 802a0ba: 4629 mov r1, r5 802a0bc: f7ff ff28 bl 8029f10 <_loc_advance_slot> fs->cursor_position++; 802a0c0: 6aa3 ldr r3, [r4, #40] ; 0x28 802a0c2: 3301 adds r3, #1 802a0c4: 62a3 str r3, [r4, #40] ; 0x28 return 0; 802a0c6: 4630 mov r0, r6 802a0c8: e012 b.n 802a0f0 } _loc_advance_slot(fs, &fs->cursor); 802a0ca: 4620 mov r0, r4 802a0cc: 4629 mov r1, r5 802a0ce: f7ff ff1f bl 8029f10 <_loc_advance_slot> * @{ */ static bool _loc_equal(struct ringfs_loc *a, struct ringfs_loc *b) { return (a->sector == b->sector) && (a->slot == b->slot); 802a0d2: 6a22 ldr r2, [r4, #32] 802a0d4: 69a3 ldr r3, [r4, #24] 802a0d6: 429a cmp r2, r3 802a0d8: d105 bne.n 802a0e6 802a0da: 6a66 ldr r6, [r4, #36] ; 0x24 802a0dc: 69e3 ldr r3, [r4, #28] 802a0de: 1af1 subs r1, r6, r3 802a0e0: 424e negs r6, r1 802a0e2: 414e adcs r6, r1 802a0e4: e000 b.n 802a0e8 802a0e6: 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)) { 802a0e8: 2e00 cmp r6, #0 802a0ea: d0d0 beq.n 802a08e } _loc_advance_slot(fs, &fs->cursor); } return -1; 802a0ec: f04f 30ff mov.w r0, #4294967295 } 802a0f0: e8bd 81fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, pc} 0802a0f4 : return 0; } int ringfs_rewind(struct ringfs *fs) { fs->cursor = fs->read; 802a0f4: f100 0110 add.w r1, r0, #16 fs->cursor_position = 0; return 0; } int ringfs_rewind(struct ringfs *fs) { 802a0f8: 4603 mov r3, r0 fs->cursor = fs->read; 802a0fa: f100 0220 add.w r2, r0, #32 802a0fe: c903 ldmia r1, {r0, r1} 802a100: e882 0003 stmia.w r2, {r0, r1} fs->cursor_position = 0; 802a104: 2000 movs r0, #0 802a106: 6298 str r0, [r3, #40] ; 0x28 return 0; } 802a108: 4770 bx lr 0802a10a : return 0; } int ringfs_scan(struct ringfs *fs) { 802a10a: 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; 802a10e: 6803 ldr r3, [r0, #0] 802a110: 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++) { 802a112: 2500 movs r5, #0 return 0; } int ringfs_scan(struct ringfs *fs) { 802a114: b085 sub sp, #20 802a116: 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; 802a118: 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; 802a11a: 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; 802a11c: 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; 802a11e: 46a9 mov r9, r5 return 0; } int ringfs_scan(struct ringfs *fs) { uint32_t previous_sector_status = SECTOR_FREE; 802a120: 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++) { 802a124: e031 b.n 802a18a uint32_t version; }; static int _sector_address(struct ringfs *fs, int sector_offset) { return (fs->flash->sector_offset + sector_offset) * fs->flash->sector_size; 802a126: 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)); 802a128: 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; 802a12c: eb05 0b03 add.w fp, r5, r3 802a130: 6803 ldr r3, [r0, #0] 802a132: 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)); 802a136: 4659 mov r1, fp 802a138: 2308 movs r3, #8 802a13a: aa02 add r2, sp, #8 802a13c: 47e0 blx ip /* Detect partially-formatted partitions. */ if (header.status == SECTOR_FORMATTING) { 802a13e: 9b02 ldr r3, [sp, #8] 802a140: 2b00 cmp r3, #0 802a142: d06b beq.n 802a21c 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) { 802a144: f1b3 4f7f cmp.w r3, #4278190080 ; 0xff000000 802a148: d001 beq.n 802a14e 802a14a: 3301 adds r3, #1 802a14c: d106 bne.n 802a15c _sector_free(fs, addr); 802a14e: 4620 mov r0, r4 802a150: 4659 mov r1, fp 802a152: f7ff febf bl 8029ed4 <_sector_free> header.status = SECTOR_FREE; 802a156: f06f 03ff mvn.w r3, #255 ; 0xff 802a15a: 9302 str r3, [sp, #8] } /* Detect corrupted sectors. */ if (header.status != SECTOR_FREE && header.status != SECTOR_IN_USE) { 802a15c: 9b02 ldr r3, [sp, #8] 802a15e: f513 7f80 cmn.w r3, #256 ; 0x100 802a162: d002 beq.n 802a16a 802a164: f513 3f80 cmn.w r3, #65536 ; 0x10000 802a168: d158 bne.n 802a21c 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) { 802a16a: 6862 ldr r2, [r4, #4] 802a16c: 9903 ldr r1, [sp, #12] 802a16e: 4291 cmp r1, r2 802a170: d154 bne.n 802a21c 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) 802a172: f513 7f80 cmn.w r3, #256 ; 0x100 802a176: d05b beq.n 802a230 free_seen = true; /* Record the presence of a IN_USE sector. */ if (header.status == SECTOR_IN_USE) 802a178: f513 3f80 cmn.w r3, #65536 ; 0x10000 802a17c: d103 bne.n 802a186 802a17e: e050 b.n 802a222 fs->cursor.slot = 0; return 0; } int ringfs_scan(struct ringfs *fs) 802a180: 1e6e subs r6, r5, #1 return -1; } /* Record the presence of a FREE sector. */ if (header.status == SECTOR_FREE) free_seen = true; 802a182: 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++) { 802a186: 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) { 802a188: 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++) { 802a18a: 6820 ldr r0, [r4, #0] 802a18c: 6883 ldr r3, [r0, #8] 802a18e: 429d cmp r5, r3 802a190: dbc9 blt.n 802a126 previous_sector_status = header.status; } /* Detect the lack of a FREE sector. */ if (!free_seen) { 802a192: f1b8 0f00 cmp.w r8, #0 802a196: d041 beq.n 802a21c return -1; } /* Start writing at the first sector if the filesystem is empty. */ if (!used_seen) { write_sector = 0; 802a198: f1ba 0f00 cmp.w sl, #0 802a19c: bf08 it eq 802a19e: 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; 802a1a0: 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; 802a1a2: 61a6 str r6, [r4, #24] fs->write.slot = 0; 802a1a4: 61e3 str r3, [r4, #28] while (fs->write.sector == write_sector) { uint32_t status; _slot_get_status(fs, &fs->write, &status); 802a1a6: 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) { 802a1aa: e00b b.n 802a1c4 uint32_t status; _slot_get_status(fs, &fs->write, &status); 802a1ac: 4620 mov r0, r4 802a1ae: 4629 mov r1, r5 802a1b0: aa01 add r2, sp, #4 802a1b2: f7ff fe5d bl 8029e70 <_slot_get_status> if (status == SLOT_ERASED) 802a1b6: 9b01 ldr r3, [sp, #4] 802a1b8: 3301 adds r3, #1 802a1ba: d006 beq.n 802a1ca break; _loc_advance_slot(fs, &fs->write); 802a1bc: 4620 mov r0, r4 802a1be: 4629 mov r1, r5 802a1c0: f7ff fea6 bl 8029f10 <_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) { 802a1c4: 69a3 ldr r3, [r4, #24] 802a1c6: 42b3 cmp r3, r6 802a1c8: d0f0 beq.n 802a1ac /* 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; 802a1ca: 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; 802a1cc: f8c4 9010 str.w r9, [r4, #16] fs->read.slot = 0; 802a1d0: 6163 str r3, [r4, #20] while (!_loc_equal(&fs->read, &fs->write)) { 802a1d2: f104 0510 add.w r5, r4, #16 802a1d6: e00c b.n 802a1f2 uint32_t status; _slot_get_status(fs, &fs->read, &status); 802a1d8: 4620 mov r0, r4 802a1da: 4629 mov r1, r5 802a1dc: aa01 add r2, sp, #4 802a1de: f7ff fe47 bl 8029e70 <_slot_get_status> if (status == SLOT_VALID) 802a1e2: 9b01 ldr r3, [sp, #4] 802a1e4: f513 3f80 cmn.w r3, #65536 ; 0x10000 802a1e8: d013 beq.n 802a212 break; _loc_advance_slot(fs, &fs->read); 802a1ea: 4620 mov r0, r4 802a1ec: 4629 mov r1, r5 802a1ee: f7ff fe8f bl 8029f10 <_loc_advance_slot> * @{ */ static bool _loc_equal(struct ringfs_loc *a, struct ringfs_loc *b) { return (a->sector == b->sector) && (a->slot == b->slot); 802a1f2: 6922 ldr r2, [r4, #16] 802a1f4: 69a3 ldr r3, [r4, #24] 802a1f6: 429a cmp r2, r3 802a1f8: d108 bne.n 802a20c 802a1fa: 69e3 ldr r3, [r4, #28] 802a1fc: 6962 ldr r2, [r4, #20] 802a1fe: ebb2 0e03 subs.w lr, r2, r3 802a202: f1de 0300 rsbs r3, lr, #0 802a206: eb53 030e adcs.w r3, r3, lr 802a20a: e000 b.n 802a20e 802a20c: 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)) { 802a20e: 2b00 cmp r3, #0 802a210: d0e2 beq.n 802a1d8 _loc_advance_slot(fs, &fs->read); } /* Move the read cursor to the read head position. */ ringfs_rewind(fs); 802a212: 4620 mov r0, r4 802a214: f7ff ff6e bl 802a0f4 return 0; 802a218: 2000 movs r0, #0 802a21a: e00d b.n 802a238 } /* Detect the lack of a FREE sector. */ if (!free_seen) { DBG printf("ringfs_scan: invariant violated: no FREE sector found\r\n"); return -1; 802a21c: f04f 30ff mov.w r0, #4294967295 802a220: e00a b.n 802a238 /* 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) 802a222: f517 7f80 cmn.w r7, #256 ; 0x100 802a226: bf08 it eq 802a228: 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; 802a22a: f04f 0a01 mov.w sl, #1 802a22e: e7aa b.n 802a186 /* 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) 802a230: f517 3f80 cmn.w r7, #65536 ; 0x10000 802a234: d0a4 beq.n 802a180 802a236: e7a4 b.n 802a182 /* Move the read cursor to the read head position. */ ringfs_rewind(fs); return 0; } 802a238: b005 add sp, #20 802a23a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0802a23e : 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. */ 802a23e: f100 0308 add.w r3, r0, #8 802a242: 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; 802a244: 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. */ 802a248: 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. */ 802a24a: 6103 str r3, [r0, #16] pxList->uxNumberOfItems = ( UBaseType_t ) 0U; 802a24c: 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; 802a24e: 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; 802a250: 6003 str r3, [r0, #0] 802a252: 4770 bx lr 0802a254 : /*-----------------------------------------------------------*/ void vListInitialiseItem( ListItem_t * const pxItem ) { /* Make sure the list item is not recorded as being on a list. */ pxItem->pvContainer = NULL; 802a254: 2300 movs r3, #0 802a256: 6103 str r3, [r0, #16] 802a258: 4770 bx lr 0802a25a : } /*-----------------------------------------------------------*/ void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem ) { ListItem_t * const pxIndex = pxList->pxIndex; 802a25a: 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; 802a25c: 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; 802a25e: 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; 802a260: 604b str r3, [r1, #4] pxNewListItem->pxPrevious = pxIndex->pxPrevious; 802a262: 608a str r2, [r1, #8] pxIndex->pxPrevious->pxNext = pxNewListItem; 802a264: 689a ldr r2, [r3, #8] pxIndex->pxPrevious = pxNewListItem; 802a266: 6099 str r1, [r3, #8] /* Remember which list the item is in. */ pxNewListItem->pvContainer = ( void * ) pxList; ( pxList->uxNumberOfItems )++; 802a268: 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; 802a26a: 6051 str r1, [r2, #4] pxIndex->pxPrevious = pxNewListItem; /* Remember which list the item is in. */ pxNewListItem->pvContainer = ( void * ) pxList; ( pxList->uxNumberOfItems )++; 802a26c: 3301 adds r3, #1 802a26e: 6003 str r3, [r0, #0] 802a270: 4770 bx lr 0802a272 : /*-----------------------------------------------------------*/ void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) { ListItem_t *pxIterator; const TickType_t xValueOfInsertion = pxNewListItem->xItemValue; 802a272: 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 ) 802a274: 1c53 adds r3, r2, #1 ( pxList->uxNumberOfItems )++; } /*-----------------------------------------------------------*/ void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) { 802a276: 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 ) 802a278: d101 bne.n 802a27e { pxIterator = pxList->xListEnd.pxPrevious; 802a27a: 6903 ldr r3, [r0, #16] 802a27c: e007 b.n 802a28e 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. */ 802a27e: f100 0308 add.w r3, r0, #8 802a282: e000 b.n 802a286 802a284: 4623 mov r3, r4 802a286: 685c ldr r4, [r3, #4] 802a288: 6825 ldr r5, [r4, #0] 802a28a: 4295 cmp r5, r2 802a28c: d9fa bls.n 802a284 /* There is nothing to do here, just iterating to the wanted insertion position. */ } } pxNewListItem->pxNext = pxIterator->pxNext; 802a28e: 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; 802a290: 6108 str r0, [r1, #16] /* There is nothing to do here, just iterating to the wanted insertion position. */ } } pxNewListItem->pxNext = pxIterator->pxNext; 802a292: 604a str r2, [r1, #4] pxNewListItem->pxNext->pxPrevious = pxNewListItem; 802a294: 6091 str r1, [r2, #8] pxNewListItem->pxPrevious = pxIterator; pxIterator->pxNext = pxNewListItem; 802a296: 6059 str r1, [r3, #4] } } pxNewListItem->pxNext = pxIterator->pxNext; pxNewListItem->pxNext->pxPrevious = pxNewListItem; pxNewListItem->pxPrevious = pxIterator; 802a298: 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 )++; 802a29a: 6803 ldr r3, [r0, #0] 802a29c: 3301 adds r3, #1 802a29e: 6003 str r3, [r0, #0] 802a2a0: bd30 pop {r4, r5, pc} 0802a2a2 : { /* 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; 802a2a2: 6841 ldr r1, [r0, #4] 802a2a4: 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; 802a2a6: 6903 ldr r3, [r0, #16] pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious; 802a2a8: 608a str r2, [r1, #8] pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext; 802a2aa: 6882 ldr r2, [r0, #8] 802a2ac: 6051 str r1, [r2, #4] /* Make sure the index is left pointing to a valid item. */ if( pxList->pxIndex == pxItemToRemove ) 802a2ae: 6859 ldr r1, [r3, #4] 802a2b0: 4281 cmp r1, r0 { pxList->pxIndex = pxItemToRemove->pxPrevious; 802a2b2: bf08 it eq 802a2b4: 605a streq r2, [r3, #4] else { mtCOVERAGE_TEST_MARKER(); } pxItemToRemove->pvContainer = NULL; 802a2b6: 2200 movs r2, #0 802a2b8: 6102 str r2, [r0, #16] ( pxList->uxNumberOfItems )--; 802a2ba: 6818 ldr r0, [r3, #0] 802a2bc: 3801 subs r0, #1 802a2be: 6018 str r0, [r3, #0] return pxList->uxNumberOfItems; } 802a2c0: 4770 bx lr 0802a2c2 : } } /*-----------------------------------------------------------*/ static void prvUnlockQueue( Queue_t * const pxQueue ) { 802a2c2: b538 push {r3, r4, r5, lr} 802a2c4: 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 ) 802a2c6: 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(); 802a2ca: f001 fa2f bl 802b72c { /* See if data was added to the queue while it was locked. */ while( pxQueue->xTxLock > queueLOCKED_UNMODIFIED ) 802a2ce: e00a b.n 802a2e6 } #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 ) 802a2d0: 6a63 ldr r3, [r4, #36] ; 0x24 802a2d2: b15b cbz r3, 802a2ec { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 802a2d4: 4628 mov r0, r5 802a2d6: f000 ff1d bl 802b114 802a2da: b108 cbz r0, 802a2e0 { /* The task waiting has a higher priority so record that a context switch is required. */ vTaskMissedYield(); 802a2dc: f000 ff94 bl 802b208 break; } } #endif /* configUSE_QUEUE_SETS */ --( pxQueue->xTxLock ); 802a2e0: 6ca3 ldr r3, [r4, #72] ; 0x48 802a2e2: 3b01 subs r3, #1 802a2e4: 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 ) 802a2e6: 6ca3 ldr r3, [r4, #72] ; 0x48 802a2e8: 2b00 cmp r3, #0 802a2ea: dcf1 bgt.n 802a2d0 #endif /* configUSE_QUEUE_SETS */ --( pxQueue->xTxLock ); } pxQueue->xTxLock = queueUNLOCKED; 802a2ec: f04f 33ff mov.w r3, #4294967295 802a2f0: 64a3 str r3, [r4, #72] ; 0x48 } taskEXIT_CRITICAL(); 802a2f2: f001 fa47 bl 802b784 { while( pxQueue->xRxLock > queueLOCKED_UNMODIFIED ) { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 802a2f6: f104 0510 add.w r5, r4, #16 pxQueue->xTxLock = queueUNLOCKED; } taskEXIT_CRITICAL(); /* Do the same for the Rx lock. */ taskENTER_CRITICAL(); 802a2fa: f001 fa17 bl 802b72c { while( pxQueue->xRxLock > queueLOCKED_UNMODIFIED ) 802a2fe: e00a b.n 802a316 { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 802a300: 6923 ldr r3, [r4, #16] 802a302: b15b cbz r3, 802a31c { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 802a304: 4628 mov r0, r5 802a306: f000 ff05 bl 802b114 802a30a: b108 cbz r0, 802a310 { vTaskMissedYield(); 802a30c: f000 ff7c bl 802b208 else { mtCOVERAGE_TEST_MARKER(); } --( pxQueue->xRxLock ); 802a310: 6c63 ldr r3, [r4, #68] ; 0x44 802a312: 3b01 subs r3, #1 802a314: 6463 str r3, [r4, #68] ; 0x44 taskEXIT_CRITICAL(); /* Do the same for the Rx lock. */ taskENTER_CRITICAL(); { while( pxQueue->xRxLock > queueLOCKED_UNMODIFIED ) 802a316: 6c63 ldr r3, [r4, #68] ; 0x44 802a318: 2b00 cmp r3, #0 802a31a: dcf1 bgt.n 802a300 { break; } } pxQueue->xRxLock = queueUNLOCKED; 802a31c: f04f 33ff mov.w r3, #4294967295 802a320: 6463 str r3, [r4, #68] ; 0x44 } taskEXIT_CRITICAL(); } 802a322: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} } } pxQueue->xRxLock = queueUNLOCKED; } taskEXIT_CRITICAL(); 802a326: f001 ba2d b.w 802b784 0802a32a : } /*-----------------------------------------------------------*/ static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer ) { if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) 802a32a: 6c02 ldr r2, [r0, #64] ; 0x40 return xReturn; } /*-----------------------------------------------------------*/ static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer ) { 802a32c: b530 push {r4, r5, lr} 802a32e: 4603 mov r3, r0 if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) 802a330: b16a cbz r2, 802a34e { pxQueue->u.pcReadFrom += pxQueue->uxItemSize; 802a332: 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. */ 802a334: 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; 802a336: 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. */ 802a338: 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; 802a33a: 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; 802a33c: bf24 itt cs 802a33e: 6804 ldrcs r4, [r0, #0] 802a340: 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. */ 802a342: 4608 mov r0, r1 802a344: 68d9 ldr r1, [r3, #12] } } 802a346: 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. */ 802a34a: f7f7 bb1f b.w 802198c 802a34e: bd30 pop {r4, r5, pc} 0802a350 : #endif /* configUSE_TRACE_FACILITY */ /*-----------------------------------------------------------*/ static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition ) { 802a350: b538 push {r3, r4, r5, lr} 802a352: 4615 mov r5, r2 BaseType_t xReturn = pdFALSE; if( pxQueue->uxItemSize == ( UBaseType_t ) 0 ) 802a354: 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 ) { 802a356: 4604 mov r4, r0 BaseType_t xReturn = pdFALSE; if( pxQueue->uxItemSize == ( UBaseType_t ) 0 ) 802a358: b93a cbnz r2, 802a36a { #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 802a35a: 6805 ldr r5, [r0, #0] 802a35c: b105 cbz r5, 802a360 802a35e: e028 b.n 802a3b2 { /* The mutex is no longer being held. */ xReturn = xTaskPriorityDisinherit( ( void * ) pxQueue->pxMutexHolder ); 802a360: 6840 ldr r0, [r0, #4] 802a362: f000 ffb3 bl 802b2cc pxQueue->pxMutexHolder = NULL; 802a366: 6065 str r5, [r4, #4] 802a368: e024 b.n 802a3b4 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_MUTEXES */ } else if( xPosition == queueSEND_TO_BACK ) 802a36a: b96d cbnz r5, 802a388 { ( 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. */ 802a36c: 6880 ldr r0, [r0, #8] 802a36e: f7f7 fb0d bl 802198c pxQueue->pcWriteTo += pxQueue->uxItemSize; 802a372: 68a2 ldr r2, [r4, #8] 802a374: 6c23 ldr r3, [r4, #64] ; 0x40 802a376: 18d3 adds r3, r2, r3 if( pxQueue->pcWriteTo >= pxQueue->pcTail ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 802a378: 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; 802a37a: 60a3 str r3, [r4, #8] if( pxQueue->pcWriteTo >= pxQueue->pcTail ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 802a37c: 4293 cmp r3, r2 802a37e: d318 bcc.n 802a3b2 { pxQueue->pcWriteTo = pxQueue->pcHead; 802a380: 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; 802a382: 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; 802a384: 60a3 str r3, [r4, #8] 802a386: e015 b.n 802a3b4 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. */ 802a388: 68c0 ldr r0, [r0, #12] 802a38a: f7f7 faff bl 802198c pxQueue->u.pcReadFrom -= pxQueue->uxItemSize; 802a38e: 6c23 ldr r3, [r4, #64] ; 0x40 802a390: 68e2 ldr r2, [r4, #12] if( pxQueue->u.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 802a392: 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; 802a394: 425b negs r3, r3 802a396: 18d2 adds r2, r2, r3 if( pxQueue->u.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 802a398: 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; 802a39a: 60e2 str r2, [r4, #12] if( pxQueue->u.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 802a39c: d202 bcs.n 802a3a4 { pxQueue->u.pcReadFrom = ( pxQueue->pcTail - pxQueue->uxItemSize ); 802a39e: 6862 ldr r2, [r4, #4] 802a3a0: 18d3 adds r3, r2, r3 802a3a2: 60e3 str r3, [r4, #12] else { mtCOVERAGE_TEST_MARKER(); } if( xPosition == queueOVERWRITE ) 802a3a4: 2d02 cmp r5, #2 802a3a6: d104 bne.n 802a3b2 { if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 ) 802a3a8: 6ba3 ldr r3, [r4, #56] ; 0x38 802a3aa: b113 cbz r3, 802a3b2 { /* 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 ); 802a3ac: 6ba3 ldr r3, [r4, #56] ; 0x38 802a3ae: 3b01 subs r3, #1 802a3b0: 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; 802a3b2: 2000 movs r0, #0 { mtCOVERAGE_TEST_MARKER(); } } ++( pxQueue->uxMessagesWaiting ); 802a3b4: 6ba3 ldr r3, [r4, #56] ; 0x38 802a3b6: 3301 adds r3, #1 802a3b8: 63a3 str r3, [r4, #56] ; 0x38 return xReturn; } 802a3ba: bd38 pop {r3, r4, r5, pc} 0802a3bc : } \ taskEXIT_CRITICAL() /*-----------------------------------------------------------*/ BaseType_t xQueueGenericReset( QueueHandle_t xQueue, BaseType_t xNewQueue ) { 802a3bc: b538 push {r3, r4, r5, lr} 802a3be: 460d mov r5, r1 Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802a3c0: 4604 mov r4, r0 802a3c2: b910 cbnz r0, 802a3ca 802a3c4: f001 f9aa bl 802b71c 802a3c8: e7fe b.n 802a3c8 taskENTER_CRITICAL(); 802a3ca: f001 f9af bl 802b72c { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); 802a3ce: 6823 ldr r3, [r4, #0] 802a3d0: 6be0 ldr r0, [r4, #60] ; 0x3c 802a3d2: 6c22 ldr r2, [r4, #64] ; 0x40 pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; pxQueue->pcWriteTo = pxQueue->pcHead; 802a3d4: 60a3 str r3, [r4, #8] configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); 802a3d6: 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 ); 802a3da: 3801 subs r0, #1 802a3dc: fb02 3300 mla r3, r2, r0, r3 configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); 802a3e0: 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 ); 802a3e2: 60e3 str r3, [r4, #12] configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; 802a3e4: 2100 movs r1, #0 pxQueue->pcWriteTo = pxQueue->pcHead; pxQueue->u.pcReadFrom = pxQueue->pcHead + ( ( pxQueue->uxLength - ( UBaseType_t ) 1U ) * pxQueue->uxItemSize ); pxQueue->xRxLock = queueUNLOCKED; 802a3e6: f04f 33ff mov.w r3, #4294967295 configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; 802a3ea: 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; 802a3ec: 6463 str r3, [r4, #68] ; 0x44 pxQueue->xTxLock = queueUNLOCKED; 802a3ee: 64a3 str r3, [r4, #72] ; 0x48 if( xNewQueue == pdFALSE ) 802a3f0: b955 cbnz r5, 802a408 /* 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 ) 802a3f2: 6923 ldr r3, [r4, #16] 802a3f4: b183 cbz r3, 802a418 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) == pdTRUE ) 802a3f6: f104 0010 add.w r0, r4, #16 802a3fa: f000 fe8b bl 802b114 802a3fe: 2801 cmp r0, #1 802a400: d10a bne.n 802a418 { queueYIELD_IF_USING_PREEMPTION(); 802a402: f001 f97f bl 802b704 802a406: e007 b.n 802a418 } } else { /* Ensure the event queues start in the correct state. */ vListInitialise( &( pxQueue->xTasksWaitingToSend ) ); 802a408: f104 0010 add.w r0, r4, #16 802a40c: f7ff ff17 bl 802a23e vListInitialise( &( pxQueue->xTasksWaitingToReceive ) ); 802a410: f104 0024 add.w r0, r4, #36 ; 0x24 802a414: f7ff ff13 bl 802a23e } } taskEXIT_CRITICAL(); 802a418: f001 f9b4 bl 802b784 /* A value is returned for calling semantic consistency with previous versions. */ return pdPASS; } 802a41c: 2001 movs r0, #1 802a41e: bd38 pop {r3, r4, r5, pc} 0802a420 : /*-----------------------------------------------------------*/ QueueHandle_t xQueueGenericCreate( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType ) { 802a420: b5f8 push {r3, r4, r5, r6, r7, lr} 802a422: 460d mov r5, r1 802a424: 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 ); 802a426: 4606 mov r6, r0 802a428: b910 cbnz r0, 802a430 802a42a: f001 f977 bl 802b71c 802a42e: e7fe b.n 802a42e if( uxItemSize == ( UBaseType_t ) 0 ) 802a430: b111 cbz r1, 802a438 } 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. */ 802a432: 4348 muls r0, r1 802a434: 3001 adds r0, #1 802a436: e000 b.n 802a43a configASSERT( uxQueueLength > ( UBaseType_t ) 0 ); if( uxItemSize == ( UBaseType_t ) 0 ) { /* There is not going to be a queue storage area. */ xQueueSizeInBytes = ( size_t ) 0; 802a438: 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 ); 802a43a: 3054 adds r0, #84 ; 0x54 802a43c: f001 fa84 bl 802b948 if( pcAllocatedBuffer != NULL ) 802a440: 4604 mov r4, r0 802a442: b138 cbz r0, 802a454 { 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 ) 802a444: b90d cbnz r5, 802a44a { /* 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; 802a446: 6020 str r0, [r4, #0] 802a448: e007 b.n 802a45a } 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 ); 802a44a: f100 0354 add.w r3, r0, #84 ; 0x54 802a44e: 6003 str r3, [r0, #0] 802a450: e003 b.n 802a45a 802a452: e7fe b.n 802a452 else { mtCOVERAGE_TEST_MARKER(); } configASSERT( xReturn ); 802a454: f001 f962 bl 802b71c 802a458: e7fb b.n 802a452 pxNewQueue->pcHead = pcAllocatedBuffer + sizeof( Queue_t ); } /* Initialise the queue members as described above where the queue type is defined. */ pxNewQueue->uxLength = uxQueueLength; 802a45a: 63e6 str r6, [r4, #60] ; 0x3c pxNewQueue->uxItemSize = uxItemSize; 802a45c: 6425 str r5, [r4, #64] ; 0x40 ( void ) xQueueGenericReset( pxNewQueue, pdTRUE ); 802a45e: 4620 mov r0, r4 802a460: 2101 movs r1, #1 802a462: f7ff ffab bl 802a3bc #if ( configUSE_TRACE_FACILITY == 1 ) { pxNewQueue->ucQueueType = ucQueueType; 802a466: f884 7050 strb.w r7, [r4, #80] ; 0x50 } configASSERT( xReturn ); return xReturn; } 802a46a: 4620 mov r0, r4 802a46c: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802a46e : /*-----------------------------------------------------------*/ #if ( configUSE_COUNTING_SEMAPHORES == 1 ) QueueHandle_t xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount ) { 802a46e: b510 push {r4, lr} 802a470: 460c mov r4, r1 QueueHandle_t xHandle; configASSERT( uxMaxCount != 0 ); 802a472: b910 cbnz r0, 802a47a 802a474: f001 f952 bl 802b71c 802a478: e7fe b.n 802a478 configASSERT( uxInitialCount <= uxMaxCount ); 802a47a: 4281 cmp r1, r0 802a47c: d902 bls.n 802a484 802a47e: f001 f94d bl 802b71c 802a482: e7fe b.n 802a482 xHandle = xQueueGenericCreate( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_COUNTING_SEMAPHORE ); 802a484: 2100 movs r1, #0 802a486: 2202 movs r2, #2 802a488: f7ff ffca bl 802a420 if( xHandle != NULL ) 802a48c: b110 cbz r0, 802a494 { ( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount; 802a48e: 6384 str r4, [r0, #56] ; 0x38 802a490: bd10 pop {r4, pc} 802a492: e7fe b.n 802a492 else { traceCREATE_COUNTING_SEMAPHORE_FAILED(); } configASSERT( xHandle ); 802a494: f001 f942 bl 802b71c 802a498: e7fb b.n 802a492 0802a49a : #endif /* configUSE_COUNTING_SEMAPHORES */ /*-----------------------------------------------------------*/ BaseType_t xQueueGenericSend( QueueHandle_t xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, const BaseType_t xCopyPosition ) { 802a49a: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 802a49e: b085 sub sp, #20 802a4a0: 460f mov r7, r1 802a4a2: 9201 str r2, [sp, #4] 802a4a4: 461d mov r5, r3 BaseType_t xEntryTimeSet = pdFALSE, xYieldRequired; TimeOut_t xTimeOut; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802a4a6: 4604 mov r4, r0 802a4a8: b910 cbnz r0, 802a4b0 802a4aa: f001 f937 bl 802b71c 802a4ae: e7fe b.n 802a4ae configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802a4b0: 2900 cmp r1, #0 802a4b2: d17b bne.n 802a5ac 802a4b4: 6c03 ldr r3, [r0, #64] ; 0x40 802a4b6: 2b00 cmp r3, #0 802a4b8: d078 beq.n 802a5ac 802a4ba: e074 b.n 802a5a6 802a4bc: e7fe b.n 802a4bc configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 802a4be: 6be3 ldr r3, [r4, #60] ; 0x3c 802a4c0: 2b01 cmp r3, #1 802a4c2: d176 bne.n 802a5b2 802a4c4: e078 b.n 802a5b8 802a4c6: e7fe b.n 802a4c6 #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 802a4c8: 9e01 ldr r6, [sp, #4] 802a4ca: b126 cbz r6, 802a4d6 802a4cc: e079 b.n 802a5c2 802a4ce: e7fe b.n 802a4ce 802a4d0: 2601 movs r6, #1 802a4d2: e002 b.n 802a4da 802a4d4: 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 ); 802a4d6: 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(); 802a4da: f001 f927 bl 802b72c { /* 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 ) ) 802a4de: 6ba2 ldr r2, [r4, #56] ; 0x38 802a4e0: 6be3 ldr r3, [r4, #60] ; 0x3c 802a4e2: 429a cmp r2, r3 802a4e4: d301 bcc.n 802a4ea 802a4e6: 2d02 cmp r5, #2 802a4e8: d115 bne.n 802a516 { traceQUEUE_SEND( pxQueue ); xYieldRequired = prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition ); 802a4ea: 4620 mov r0, r4 802a4ec: 4639 mov r1, r7 802a4ee: 462a mov r2, r5 802a4f0: f7ff ff2e bl 802a350 } #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 ) 802a4f4: 6a63 ldr r3, [r4, #36] ; 0x24 802a4f6: b143 cbz r3, 802a50a { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) == pdTRUE ) 802a4f8: f104 0024 add.w r0, r4, #36 ; 0x24 802a4fc: f000 fe0a bl 802b114 802a500: 2801 cmp r0, #1 802a502: d104 bne.n 802a50e { /* 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(); 802a504: f001 f8fe bl 802b704 802a508: e001 b.n 802a50e else { mtCOVERAGE_TEST_MARKER(); } } else if( xYieldRequired != pdFALSE ) 802a50a: 2800 cmp r0, #0 802a50c: d1fa bne.n 802a504 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_QUEUE_SETS */ taskEXIT_CRITICAL(); 802a50e: f001 f939 bl 802b784 return pdPASS; 802a512: 2001 movs r0, #1 802a514: e058 b.n 802a5c8 } else { if( xTicksToWait == ( TickType_t ) 0 ) 802a516: f8dd 9004 ldr.w r9, [sp, #4] 802a51a: f1b9 0f00 cmp.w r9, #0 802a51e: d102 bne.n 802a526 { /* The queue was full and no block time is specified (or the block time has expired) so leave now. */ taskEXIT_CRITICAL(); 802a520: f001 f930 bl 802b784 802a524: e03d b.n 802a5a2 /* Return to the original privilege level before exiting the function. */ traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; } else if( xEntryTimeSet == pdFALSE ) 802a526: b916 cbnz r6, 802a52e { /* The queue was full and a block time was specified so configure the timeout structure. */ vTaskSetTimeOutState( &xTimeOut ); 802a528: a802 add r0, sp, #8 802a52a: f000 fe2f bl 802b18c /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); 802a52e: f001 f929 bl 802b784 /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); 802a532: f000 fbab bl 802ac8c prvLockQueue( pxQueue ); 802a536: f001 f8f9 bl 802b72c 802a53a: 6c63 ldr r3, [r4, #68] ; 0x44 802a53c: 3301 adds r3, #1 802a53e: bf08 it eq 802a540: f8c4 8044 streq.w r8, [r4, #68] ; 0x44 802a544: 6ca3 ldr r3, [r4, #72] ; 0x48 802a546: 3301 adds r3, #1 802a548: bf08 it eq 802a54a: f8c4 8048 streq.w r8, [r4, #72] ; 0x48 802a54e: f001 f919 bl 802b784 /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 802a552: a802 add r0, sp, #8 802a554: a901 add r1, sp, #4 802a556: f000 fe29 bl 802b1ac 802a55a: b9e8 cbnz r0, 802a598 static BaseType_t prvIsQueueFull( const Queue_t *pxQueue ) { BaseType_t xReturn; taskENTER_CRITICAL(); 802a55c: f001 f8e6 bl 802b72c { if( pxQueue->uxMessagesWaiting == pxQueue->uxLength ) 802a560: f8d4 9038 ldr.w r9, [r4, #56] ; 0x38 802a564: 6be6 ldr r6, [r4, #60] ; 0x3c else { xReturn = pdFALSE; } } taskEXIT_CRITICAL(); 802a566: f001 f90d bl 802b784 prvLockQueue( pxQueue ); /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) { if( prvIsQueueFull( pxQueue ) != pdFALSE ) 802a56a: 45b1 cmp r9, r6 802a56c: d10e bne.n 802a58c { traceBLOCKING_ON_QUEUE_SEND( pxQueue ); vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait ); 802a56e: f104 0010 add.w r0, r4, #16 802a572: 9901 ldr r1, [sp, #4] 802a574: f000 fd72 bl 802b05c /* 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 ); 802a578: 4620 mov r0, r4 802a57a: f7ff fea2 bl 802a2c2 /* 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 ) 802a57e: f000 fc21 bl 802adc4 802a582: 2800 cmp r0, #0 802a584: d1a4 bne.n 802a4d0 { portYIELD_WITHIN_API(); 802a586: f001 f8bd bl 802b704 802a58a: e7a1 b.n 802a4d0 } } else { /* Try again. */ prvUnlockQueue( pxQueue ); 802a58c: 4620 mov r0, r4 802a58e: f7ff fe98 bl 802a2c2 ( void ) xTaskResumeAll(); 802a592: f000 fc17 bl 802adc4 802a596: e79b b.n 802a4d0 } } else { /* The timeout has expired. */ prvUnlockQueue( pxQueue ); 802a598: 4620 mov r0, r4 802a59a: f7ff fe92 bl 802a2c2 ( void ) xTaskResumeAll(); 802a59e: f000 fc11 bl 802adc4 /* Return to the original privilege level before exiting the function. */ traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; 802a5a2: 2000 movs r0, #0 802a5a4: e010 b.n 802a5c8 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 ) ) ); 802a5a6: f001 f8b9 bl 802b71c 802a5aa: e787 b.n 802a4bc configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 802a5ac: 2d02 cmp r5, #2 802a5ae: d103 bne.n 802a5b8 802a5b0: e785 b.n 802a4be 802a5b2: f001 f8b3 bl 802b71c 802a5b6: e786 b.n 802a4c6 #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 802a5b8: f000 fe2c bl 802b214 802a5bc: 2800 cmp r0, #0 802a5be: d189 bne.n 802a4d4 802a5c0: e782 b.n 802a4c8 802a5c2: f001 f8ab bl 802b71c 802a5c6: e782 b.n 802a4ce function. */ traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; } } } 802a5c8: b005 add sp, #20 802a5ca: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 0802a5ce : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) QueueHandle_t xQueueCreateMutex( const uint8_t ucQueueType ) { 802a5ce: b570 push {r4, r5, r6, lr} 802a5d0: 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 ) ); 802a5d2: 2054 movs r0, #84 ; 0x54 802a5d4: f001 f9b8 bl 802b948 if( pxNewQueue != NULL ) 802a5d8: 4604 mov r4, r0 802a5da: b108 cbz r0, 802a5e0 802a5dc: e003 b.n 802a5e6 802a5de: e7fe b.n 802a5de else { traceCREATE_MUTEX_FAILED(); } configASSERT( pxNewQueue ); 802a5e0: f001 f89c bl 802b71c 802a5e4: e7fb b.n 802a5de /* 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; 802a5e6: 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; 802a5e8: 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; 802a5ea: 63c3 str r3, [r0, #60] ; 0x3c pxNewQueue->uxItemSize = ( UBaseType_t ) 0U; pxNewQueue->xRxLock = queueUNLOCKED; 802a5ec: 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; 802a5f0: 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; 802a5f2: 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; 802a5f4: 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; 802a5f6: 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; 802a5f8: 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; 802a5fa: 6085 str r5, [r0, #8] pxNewQueue->u.pcReadFrom = NULL; 802a5fc: 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; 802a5fe: 6405 str r5, [r0, #64] ; 0x40 pxNewQueue->xRxLock = queueUNLOCKED; pxNewQueue->xTxLock = queueUNLOCKED; #if ( configUSE_TRACE_FACILITY == 1 ) { pxNewQueue->ucQueueType = ucQueueType; 802a600: f880 6050 strb.w r6, [r0, #80] ; 0x50 pxNewQueue->pxQueueSetContainer = NULL; } #endif /* Ensure the event queues start with the correct state. */ vListInitialise( &( pxNewQueue->xTasksWaitingToSend ) ); 802a604: 3010 adds r0, #16 802a606: f7ff fe1a bl 802a23e vListInitialise( &( pxNewQueue->xTasksWaitingToReceive ) ); 802a60a: f104 0024 add.w r0, r4, #36 ; 0x24 802a60e: f7ff fe16 bl 802a23e traceCREATE_MUTEX( pxNewQueue ); /* Start with the semaphore in the expected state. */ ( void ) xQueueGenericSend( pxNewQueue, NULL, ( TickType_t ) 0U, queueSEND_TO_BACK ); 802a612: 4620 mov r0, r4 802a614: 4629 mov r1, r5 802a616: 462a mov r2, r5 802a618: 462b mov r3, r5 802a61a: f7ff ff3e bl 802a49a traceCREATE_MUTEX_FAILED(); } configASSERT( pxNewQueue ); return pxNewQueue; } 802a61e: 4620 mov r0, r4 802a620: bd70 pop {r4, r5, r6, pc} 0802a622 : #endif /* configUSE_ALTERNATIVE_API */ /*-----------------------------------------------------------*/ BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue, const void * const pvItemToQueue, BaseType_t * const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition ) { 802a622: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802a626: 460f mov r7, r1 802a628: 4616 mov r6, r2 802a62a: 461d mov r5, r3 BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802a62c: 4604 mov r4, r0 802a62e: b910 cbnz r0, 802a636 802a630: f001 f874 bl 802b71c 802a634: e7fe b.n 802a634 configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802a636: bb41 cbnz r1, 802a68a 802a638: 6c03 ldr r3, [r0, #64] ; 0x40 802a63a: b333 cbz r3, 802a68a 802a63c: e022 b.n 802a684 802a63e: e7fe b.n 802a63e configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 802a640: 6be3 ldr r3, [r4, #60] ; 0x3c 802a642: 2b01 cmp r3, #1 802a644: d124 bne.n 802a690 802a646: e026 b.n 802a696 802a648: e7fe b.n 802a648 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 ) ) 802a64a: 2d02 cmp r5, #2 802a64c: d118 bne.n 802a680 /* 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 ); 802a64e: 4620 mov r0, r4 802a650: 4639 mov r1, r7 802a652: 462a mov r2, r5 802a654: f7ff fe7c bl 802a350 /* 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 ) 802a658: 6ca3 ldr r3, [r4, #72] ; 0x48 802a65a: 3301 adds r3, #1 802a65c: d10b bne.n 802a676 } } } #else /* configUSE_QUEUE_SETS */ { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 802a65e: 6a63 ldr r3, [r4, #36] ; 0x24 802a660: b903 cbnz r3, 802a664 802a662: e00b b.n 802a67c { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 802a664: f104 0024 add.w r0, r4, #36 ; 0x24 802a668: f000 fd54 bl 802b114 802a66c: b130 cbz r0, 802a67c { /* The task waiting has a higher priority so record that a context switch is required. */ if( pxHigherPriorityTaskWoken != NULL ) 802a66e: b12e cbz r6, 802a67c { *pxHigherPriorityTaskWoken = pdTRUE; 802a670: 2401 movs r4, #1 802a672: 6034 str r4, [r6, #0] 802a674: e019 b.n 802a6aa } else { /* Increment the lock count so the task that unlocks the queue knows that data was posted while it was locked. */ ++( pxQueue->xTxLock ); 802a676: 6ca3 ldr r3, [r4, #72] ; 0x48 802a678: 3301 adds r3, #1 802a67a: 64a3 str r3, [r4, #72] ; 0x48 } xReturn = pdPASS; 802a67c: 2401 movs r4, #1 802a67e: e014 b.n 802a6aa } else { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; 802a680: 2400 movs r4, #0 802a682: e012 b.n 802a6aa BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802a684: f001 f84a bl 802b71c 802a688: e7d9 b.n 802a63e configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 802a68a: 2d02 cmp r5, #2 802a68c: d103 bne.n 802a696 802a68e: e7d7 b.n 802a640 802a690: f001 f844 bl 802b71c 802a694: e7d8 b.n 802a648 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(); 802a696: f001 f911 bl 802b8bc /* 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(); 802a69a: f001 f83f bl 802b71c { if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) 802a69e: 6ba2 ldr r2, [r4, #56] ; 0x38 802a6a0: 6be3 ldr r3, [r4, #60] ; 0x3c 802a6a2: 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(); 802a6a4: 4680 mov r8, r0 { if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) 802a6a6: d2d0 bcs.n 802a64a 802a6a8: e7d1 b.n 802a64e { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); 802a6aa: 4640 mov r0, r8 802a6ac: f001 f866 bl 802b77c return xReturn; } 802a6b0: 4620 mov r0, r4 802a6b2: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 0802a6b6 : /*-----------------------------------------------------------*/ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue, BaseType_t * const pxHigherPriorityTaskWoken ) { 802a6b6: b5f8 push {r3, r4, r5, r6, r7, lr} 802a6b8: 460d mov r5, r1 BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802a6ba: 4604 mov r4, r0 802a6bc: b910 cbnz r0, 802a6c4 802a6be: f001 f82d bl 802b71c 802a6c2: e7fe b.n 802a6c2 /* xQueueGenericSendFromISR() should be used in the item size is not 0. */ configASSERT( pxQueue->uxItemSize == 0 ); 802a6c4: 6c06 ldr r6, [r0, #64] ; 0x40 802a6c6: b116 cbz r6, 802a6ce 802a6c8: f001 f828 bl 802b71c 802a6cc: e7fe b.n 802a6cc 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(); 802a6ce: f001 f8f5 bl 802b8bc /* 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(); 802a6d2: f001 f823 bl 802b71c { /* 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 ) 802a6d6: 6ba2 ldr r2, [r4, #56] ; 0x38 802a6d8: 6be3 ldr r3, [r4, #60] ; 0x3c 802a6da: 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(); 802a6dc: 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 ) 802a6de: d216 bcs.n 802a70e 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 ); 802a6e0: 6ba3 ldr r3, [r4, #56] ; 0x38 802a6e2: 3301 adds r3, #1 802a6e4: 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 ) 802a6e6: 6ca3 ldr r3, [r4, #72] ; 0x48 802a6e8: 3301 adds r3, #1 802a6ea: d10b bne.n 802a704 } } } #else /* configUSE_QUEUE_SETS */ { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 802a6ec: 6a63 ldr r3, [r4, #36] ; 0x24 802a6ee: b903 cbnz r3, 802a6f2 802a6f0: e00b b.n 802a70a { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 802a6f2: f104 0024 add.w r0, r4, #36 ; 0x24 802a6f6: f000 fd0d bl 802b114 802a6fa: b130 cbz r0, 802a70a { /* The task waiting has a higher priority so record that a context switch is required. */ if( pxHigherPriorityTaskWoken != NULL ) 802a6fc: b12d cbz r5, 802a70a { *pxHigherPriorityTaskWoken = pdTRUE; 802a6fe: 2401 movs r4, #1 802a700: 602c str r4, [r5, #0] 802a702: e005 b.n 802a710 } else { /* Increment the lock count so the task that unlocks the queue knows that data was posted while it was locked. */ ++( pxQueue->xTxLock ); 802a704: 6ca3 ldr r3, [r4, #72] ; 0x48 802a706: 3301 adds r3, #1 802a708: 64a3 str r3, [r4, #72] ; 0x48 } xReturn = pdPASS; 802a70a: 2401 movs r4, #1 802a70c: e000 b.n 802a710 } else { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; 802a70e: 4634 mov r4, r6 } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); 802a710: 4638 mov r0, r7 802a712: f001 f833 bl 802b77c return xReturn; } 802a716: 4620 mov r0, r4 802a718: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802a71a : /*-----------------------------------------------------------*/ BaseType_t xQueueGenericReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait, const BaseType_t xJustPeeking ) { 802a71a: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 802a71e: b085 sub sp, #20 802a720: 460e mov r6, r1 802a722: 9201 str r2, [sp, #4] 802a724: 4699 mov r9, r3 BaseType_t xEntryTimeSet = pdFALSE; TimeOut_t xTimeOut; int8_t *pcOriginalReadPosition; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802a726: 4604 mov r4, r0 802a728: b910 cbnz r0, 802a730 802a72a: f000 fff7 bl 802b71c 802a72e: e7fe b.n 802a72e configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802a730: 2900 cmp r1, #0 802a732: f040 8089 bne.w 802a848 802a736: 6c03 ldr r3, [r0, #64] ; 0x40 802a738: 2b00 cmp r3, #0 802a73a: f000 8085 beq.w 802a848 802a73e: e080 b.n 802a842 802a740: e7fe b.n 802a740 #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 802a742: 9d01 ldr r5, [sp, #4] 802a744: b125 cbz r5, 802a750 802a746: e085 b.n 802a854 802a748: e7fe b.n 802a748 802a74a: 2501 movs r5, #1 802a74c: e001 b.n 802a752 802a74e: 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 ); 802a750: 2700 movs r7, #0 statements within the function itself. This is done in the interest of execution time efficiency. */ for( ;; ) { taskENTER_CRITICAL(); 802a752: f000 ffeb bl 802b72c { /* 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 ) 802a756: 6ba3 ldr r3, [r4, #56] ; 0x38 802a758: b33b cbz r3, 802a7aa { /* Remember the read position in case the queue is only being peeked. */ pcOriginalReadPosition = pxQueue->u.pcReadFrom; prvCopyDataFromQueue( pxQueue, pvBuffer ); 802a75a: 4620 mov r0, r4 802a75c: 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; 802a75e: 68e5 ldr r5, [r4, #12] prvCopyDataFromQueue( pxQueue, pvBuffer ); 802a760: f7ff fde3 bl 802a32a if( xJustPeeking == pdFALSE ) 802a764: f1b9 0f00 cmp.w r9, #0 802a768: d112 bne.n 802a790 { traceQUEUE_RECEIVE( pxQueue ); /* Actually removing data, not just peeking. */ --( pxQueue->uxMessagesWaiting ); 802a76a: 6ba3 ldr r3, [r4, #56] ; 0x38 802a76c: 3b01 subs r3, #1 802a76e: 63a3 str r3, [r4, #56] ; 0x38 #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 802a770: 6823 ldr r3, [r4, #0] 802a772: b913 cbnz r3, 802a77a { /* 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. */ 802a774: f000 fde8 bl 802b348 802a778: 6060 str r0, [r4, #4] mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_MUTEXES */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 802a77a: 6923 ldr r3, [r4, #16] 802a77c: b18b cbz r3, 802a7a2 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) == pdTRUE ) 802a77e: f104 0010 add.w r0, r4, #16 802a782: f000 fcc7 bl 802b114 802a786: 2801 cmp r0, #1 802a788: d10b bne.n 802a7a2 { queueYIELD_IF_USING_PREEMPTION(); 802a78a: f000 ffbb bl 802b704 802a78e: e008 b.n 802a7a2 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 ) 802a790: 6a63 ldr r3, [r4, #36] ; 0x24 { traceQUEUE_PEEK( pxQueue ); /* The data is not being removed, so reset the read pointer. */ pxQueue->u.pcReadFrom = pcOriginalReadPosition; 802a792: 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 ) 802a794: b12b cbz r3, 802a7a2 { /* 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 ) 802a796: f104 0024 add.w r0, r4, #36 ; 0x24 802a79a: f000 fcbb bl 802b114 802a79e: 2800 cmp r0, #0 802a7a0: d1f3 bne.n 802a78a { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 802a7a2: f000 ffef bl 802b784 return pdPASS; 802a7a6: 2001 movs r0, #1 802a7a8: e057 b.n 802a85a } else { if( xTicksToWait == ( TickType_t ) 0 ) 802a7aa: f8dd 8004 ldr.w r8, [sp, #4] 802a7ae: f1b8 0f00 cmp.w r8, #0 802a7b2: d102 bne.n 802a7ba { /* The queue was empty and no block time is specified (or the block time has expired) so leave now. */ taskEXIT_CRITICAL(); 802a7b4: f000 ffe6 bl 802b784 802a7b8: e041 b.n 802a83e traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; } else if( xEntryTimeSet == pdFALSE ) 802a7ba: b915 cbnz r5, 802a7c2 { /* The queue was empty and a block time was specified so configure the timeout structure. */ vTaskSetTimeOutState( &xTimeOut ); 802a7bc: a802 add r0, sp, #8 802a7be: f000 fce5 bl 802b18c /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); 802a7c2: f000 ffdf bl 802b784 /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); 802a7c6: f000 fa61 bl 802ac8c prvLockQueue( pxQueue ); 802a7ca: f000 ffaf bl 802b72c 802a7ce: 6c63 ldr r3, [r4, #68] ; 0x44 802a7d0: 3301 adds r3, #1 802a7d2: bf08 it eq 802a7d4: 6467 streq r7, [r4, #68] ; 0x44 802a7d6: 6ca3 ldr r3, [r4, #72] ; 0x48 802a7d8: 3301 adds r3, #1 802a7da: bf08 it eq 802a7dc: 64a7 streq r7, [r4, #72] ; 0x48 802a7de: f000 ffd1 bl 802b784 /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 802a7e2: a802 add r0, sp, #8 802a7e4: a901 add r1, sp, #4 802a7e6: f000 fce1 bl 802b1ac 802a7ea: bb18 cbnz r0, 802a834 static BaseType_t prvIsQueueEmpty( const Queue_t *pxQueue ) { BaseType_t xReturn; taskENTER_CRITICAL(); 802a7ec: f000 ff9e bl 802b72c { if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 ) 802a7f0: 6ba5 ldr r5, [r4, #56] ; 0x38 else { xReturn = pdFALSE; } } taskEXIT_CRITICAL(); 802a7f2: f000 ffc7 bl 802b784 prvLockQueue( pxQueue ); /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) { if( prvIsQueueEmpty( pxQueue ) != pdFALSE ) 802a7f6: b9bd cbnz r5, 802a828 { traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue ); #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 802a7f8: 6823 ldr r3, [r4, #0] 802a7fa: b933 cbnz r3, 802a80a { taskENTER_CRITICAL(); 802a7fc: f000 ff96 bl 802b72c { vTaskPriorityInherit( ( void * ) pxQueue->pxMutexHolder ); 802a800: 6860 ldr r0, [r4, #4] 802a802: f000 fd17 bl 802b234 } taskEXIT_CRITICAL(); 802a806: f000 ffbd bl 802b784 mtCOVERAGE_TEST_MARKER(); } } #endif vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); 802a80a: f104 0024 add.w r0, r4, #36 ; 0x24 802a80e: 9901 ldr r1, [sp, #4] 802a810: f000 fc24 bl 802b05c prvUnlockQueue( pxQueue ); 802a814: 4620 mov r0, r4 802a816: f7ff fd54 bl 802a2c2 if( xTaskResumeAll() == pdFALSE ) 802a81a: f000 fad3 bl 802adc4 802a81e: 2800 cmp r0, #0 802a820: d193 bne.n 802a74a { portYIELD_WITHIN_API(); 802a822: f000 ff6f bl 802b704 802a826: e790 b.n 802a74a } } else { /* Try again. */ prvUnlockQueue( pxQueue ); 802a828: 4620 mov r0, r4 802a82a: f7ff fd4a bl 802a2c2 ( void ) xTaskResumeAll(); 802a82e: f000 fac9 bl 802adc4 802a832: e78a b.n 802a74a } } else { prvUnlockQueue( pxQueue ); 802a834: 4620 mov r0, r4 802a836: f7ff fd44 bl 802a2c2 ( void ) xTaskResumeAll(); 802a83a: f000 fac3 bl 802adc4 traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; 802a83e: 2000 movs r0, #0 802a840: e00b b.n 802a85a TimeOut_t xTimeOut; int8_t *pcOriginalReadPosition; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802a842: f000 ff6b bl 802b71c 802a846: e77b b.n 802a740 #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 802a848: f000 fce4 bl 802b214 802a84c: 2800 cmp r0, #0 802a84e: f47f af7e bne.w 802a74e 802a852: e776 b.n 802a742 802a854: f000 ff62 bl 802b71c 802a858: e776 b.n 802a748 ( void ) xTaskResumeAll(); traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; } } } 802a85a: b005 add sp, #20 802a85c: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 0802a860 : /*-----------------------------------------------------------*/ BaseType_t xQueueReceiveFromISR( QueueHandle_t xQueue, void * const pvBuffer, BaseType_t * const pxHigherPriorityTaskWoken ) { 802a860: b5f8 push {r3, r4, r5, r6, r7, lr} 802a862: 460e mov r6, r1 802a864: 4615 mov r5, r2 BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802a866: 4604 mov r4, r0 802a868: b910 cbnz r0, 802a870 802a86a: f000 ff57 bl 802b71c 802a86e: e7fe b.n 802a86e configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802a870: bb09 cbnz r1, 802a8b6 802a872: 6c03 ldr r3, [r0, #64] ; 0x40 802a874: b1fb cbz r3, 802a8b6 802a876: e01b b.n 802a8b0 802a878: e7fe b.n 802a878 /* Cannot block in an ISR, so check there is data available. */ if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 ) { traceQUEUE_RECEIVE_FROM_ISR( pxQueue ); prvCopyDataFromQueue( pxQueue, pvBuffer ); 802a87a: 4620 mov r0, r4 802a87c: 4631 mov r1, r6 802a87e: f7ff fd54 bl 802a32a --( pxQueue->uxMessagesWaiting ); 802a882: 6ba3 ldr r3, [r4, #56] ; 0x38 802a884: 3b01 subs r3, #1 802a886: 63a3 str r3, [r4, #56] ; 0x38 /* If the queue is locked the event list will not be modified. Instead update the lock count so the task that unlocks the queue will know that an ISR has removed data while the queue was locked. */ if( pxQueue->xRxLock == queueUNLOCKED ) 802a888: 6c63 ldr r3, [r4, #68] ; 0x44 802a88a: 3301 adds r3, #1 802a88c: d10b bne.n 802a8a6 { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 802a88e: 6923 ldr r3, [r4, #16] 802a890: b903 cbnz r3, 802a894 802a892: e00b b.n 802a8ac { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 802a894: f104 0010 add.w r0, r4, #16 802a898: f000 fc3c bl 802b114 802a89c: b130 cbz r0, 802a8ac { /* The task waiting has a higher priority than us so force a context switch. */ if( pxHigherPriorityTaskWoken != NULL ) 802a89e: b12d cbz r5, 802a8ac { *pxHigherPriorityTaskWoken = pdTRUE; 802a8a0: 2401 movs r4, #1 802a8a2: 602c str r4, [r5, #0] 802a8a4: e010 b.n 802a8c8 } else { /* Increment the lock count so the task that unlocks the queue knows that data was removed while it was locked. */ ++( pxQueue->xRxLock ); 802a8a6: 6c63 ldr r3, [r4, #68] ; 0x44 802a8a8: 3301 adds r3, #1 802a8aa: 6463 str r3, [r4, #68] ; 0x44 } xReturn = pdPASS; 802a8ac: 2401 movs r4, #1 802a8ae: e00b b.n 802a8c8 BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802a8b0: f000 ff34 bl 802b71c 802a8b4: e7e0 b.n 802a878 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(); 802a8b6: f001 f801 bl 802b8bc uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 802a8ba: f000 ff2f bl 802b71c { /* Cannot block in an ISR, so check there is data available. */ if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 ) 802a8be: 6ba3 ldr r3, [r4, #56] ; 0x38 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(); uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 802a8c0: 4607 mov r7, r0 { /* Cannot block in an ISR, so check there is data available. */ if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 ) 802a8c2: 2b00 cmp r3, #0 802a8c4: d1d9 bne.n 802a87a xReturn = pdPASS; } else { xReturn = pdFAIL; 802a8c6: 461c mov r4, r3 traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue ); } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); 802a8c8: 4638 mov r0, r7 802a8ca: f000 ff57 bl 802b77c return xReturn; } 802a8ce: 4620 mov r0, r4 802a8d0: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802a8d2 : return xReturn; } /*-----------------------------------------------------------*/ UBaseType_t uxQueueMessagesWaiting( const QueueHandle_t xQueue ) { 802a8d2: b510 push {r4, lr} UBaseType_t uxReturn; configASSERT( xQueue ); 802a8d4: 4604 mov r4, r0 802a8d6: b910 cbnz r0, 802a8de 802a8d8: f000 ff20 bl 802b71c 802a8dc: e7fe b.n 802a8dc taskENTER_CRITICAL(); 802a8de: f000 ff25 bl 802b72c { uxReturn = ( ( Queue_t * ) xQueue )->uxMessagesWaiting; 802a8e2: 6ba4 ldr r4, [r4, #56] ; 0x38 } taskEXIT_CRITICAL(); 802a8e4: f000 ff4e bl 802b784 return uxReturn; } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ 802a8e8: 4620 mov r0, r4 802a8ea: bd10 pop {r4, pc} 0802a8ec : /*-----------------------------------------------------------*/ UBaseType_t uxQueueSpacesAvailable( const QueueHandle_t xQueue ) { 802a8ec: b510 push {r4, lr} UBaseType_t uxReturn; Queue_t *pxQueue; pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802a8ee: 4604 mov r4, r0 802a8f0: b910 cbnz r0, 802a8f8 802a8f2: f000 ff13 bl 802b71c 802a8f6: e7fe b.n 802a8f6 taskENTER_CRITICAL(); 802a8f8: f000 ff18 bl 802b72c { uxReturn = pxQueue->uxLength - pxQueue->uxMessagesWaiting; 802a8fc: 6ba3 ldr r3, [r4, #56] ; 0x38 802a8fe: 6be4 ldr r4, [r4, #60] ; 0x3c 802a900: 1ae4 subs r4, r4, r3 } taskEXIT_CRITICAL(); 802a902: f000 ff3f bl 802b784 return uxReturn; } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ 802a906: 4620 mov r0, r4 802a908: bd10 pop {r4, pc} 0802a90a : return uxReturn; } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ /*-----------------------------------------------------------*/ void vQueueDelete( QueueHandle_t xQueue ) { 802a90a: b508 push {r3, lr} Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802a90c: b910 cbnz r0, 802a914 802a90e: f000 ff05 bl 802b71c 802a912: e7fe b.n 802a912 { vQueueUnregisterQueue( pxQueue ); } #endif vPortFree( pxQueue ); } 802a914: e8bd 4008 ldmia.w sp!, {r3, lr} #if ( configQUEUE_REGISTRY_SIZE > 0 ) { vQueueUnregisterQueue( pxQueue ); } #endif vPortFree( pxQueue ); 802a918: f001 b89c b.w 802ba54 0802a91c : /*-----------------------------------------------------------*/ #if ( configUSE_TIMERS == 1 ) void vQueueWaitForMessageRestricted( QueueHandle_t xQueue, TickType_t xTicksToWait ) { 802a91c: b538 push {r3, r4, r5, lr} 802a91e: 4604 mov r4, r0 802a920: 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 ); 802a922: f000 ff03 bl 802b72c 802a926: 6c63 ldr r3, [r4, #68] ; 0x44 802a928: 3301 adds r3, #1 802a92a: d101 bne.n 802a930 802a92c: 2300 movs r3, #0 802a92e: 6463 str r3, [r4, #68] ; 0x44 802a930: 6ca3 ldr r3, [r4, #72] ; 0x48 802a932: 3301 adds r3, #1 802a934: d101 bne.n 802a93a 802a936: 2300 movs r3, #0 802a938: 64a3 str r3, [r4, #72] ; 0x48 802a93a: f000 ff23 bl 802b784 if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0U ) 802a93e: 6ba3 ldr r3, [r4, #56] ; 0x38 802a940: b923 cbnz r3, 802a94c { /* There is nothing in the queue, block for the specified period. */ vTaskPlaceOnEventListRestricted( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); 802a942: f104 0024 add.w r0, r4, #36 ; 0x24 802a946: 4629 mov r1, r5 802a948: f000 fbbc bl 802b0c4 } else { mtCOVERAGE_TEST_MARKER(); } prvUnlockQueue( pxQueue ); 802a94c: 4620 mov r0, r4 } 802a94e: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} } else { mtCOVERAGE_TEST_MARKER(); } prvUnlockQueue( pxQueue ); 802a952: f7ff bcb6 b.w 802a2c2 802a956: 0000 movs r0, r0 0802a958 : static void prvResetNextTaskUnblockTime( void ) { TCB_t *pxTCB; if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 802a958: 4a06 ldr r2, [pc, #24] ; (802a974 ) 802a95a: 6813 ldr r3, [r2, #0] 802a95c: 6819 ldr r1, [r3, #0] 802a95e: 4b06 ldr r3, [pc, #24] ; (802a978 ) 802a960: b911 cbnz r1, 802a968 /* 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; 802a962: f04f 32ff mov.w r2, #4294967295 802a966: e003 b.n 802a970 { /* 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 ); 802a968: 6812 ldr r2, [r2, #0] 802a96a: 68d2 ldr r2, [r2, #12] xNextTaskUnblockTime = listGET_LIST_ITEM_VALUE( &( ( pxTCB )->xGenericListItem ) ); 802a96c: 68d2 ldr r2, [r2, #12] 802a96e: 6852 ldr r2, [r2, #4] 802a970: 601a str r2, [r3, #0] 802a972: 4770 bx lr 802a974: 20000bc8 .word 0x20000bc8 802a978: 20000700 .word 0x20000700 0802a97c : /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake ) { /* The list item will be inserted in wake time order. */ listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake ); 802a97c: 4b0e ldr r3, [pc, #56] ; (802a9b8 ) 802a97e: 681a ldr r2, [r3, #0] #endif /* vTaskDelete */ } /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake ) { 802a980: b510 push {r4, lr} /* The list item will be inserted in wake time order. */ listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake ); 802a982: 6050 str r0, [r2, #4] if( xTimeToWake < xTickCount ) 802a984: 4a0d ldr r2, [pc, #52] ; (802a9bc ) 802a986: 6812 ldr r2, [r2, #0] 802a988: 4290 cmp r0, r2 #endif /* vTaskDelete */ } /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake ) { 802a98a: 4604 mov r4, r0 /* The list item will be inserted in wake time order. */ listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake ); if( xTimeToWake < xTickCount ) 802a98c: d207 bcs.n 802a99e { /* Wake time has overflowed. Place this item in the overflow list. */ vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xGenericListItem ) ); 802a98e: 4a0c ldr r2, [pc, #48] ; (802a9c0 ) 802a990: 6810 ldr r0, [r2, #0] 802a992: 6819 ldr r1, [r3, #0] 802a994: 3104 adds r1, #4 else { mtCOVERAGE_TEST_MARKER(); } } } 802a996: 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 ) ); 802a99a: f7ff bc6a b.w 802a272 } else { /* The wake time has not overflowed, so the current block list is used. */ vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xGenericListItem ) ); 802a99e: 4a09 ldr r2, [pc, #36] ; (802a9c4 ) 802a9a0: 6810 ldr r0, [r2, #0] 802a9a2: 6819 ldr r1, [r3, #0] 802a9a4: 3104 adds r1, #4 802a9a6: f7ff fc64 bl 802a272 /* 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 ) 802a9aa: 4b07 ldr r3, [pc, #28] ; (802a9c8 ) 802a9ac: 681a ldr r2, [r3, #0] 802a9ae: 4294 cmp r4, r2 { xNextTaskUnblockTime = xTimeToWake; 802a9b0: bf38 it cc 802a9b2: 601c strcc r4, [r3, #0] 802a9b4: bd10 pop {r4, pc} 802a9b6: bf00 nop 802a9b8: 20000c78 .word 0x20000c78 802a9bc: 20000c94 .word 0x20000c94 802a9c0: 20000c98 .word 0x20000c98 802a9c4: 20000bc8 .word 0x20000bc8 802a9c8: 20000700 .word 0x20000700 0802a9cc : #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. */ { 802a9cc: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 802a9d0: 9d0a ldr r5, [sp, #40] ; 0x28 802a9d2: f8dd 802c ldr.w r8, [sp, #44] ; 0x2c 802a9d6: 9e0c ldr r6, [sp, #48] ; 0x30 802a9d8: 460f mov r7, r1 802a9da: 4693 mov fp, r2 802a9dc: 469a mov sl, r3 BaseType_t xReturn; TCB_t * pxNewTCB; StackType_t *pxTopOfStack; configASSERT( pxTaskCode ); 802a9de: 4681 mov r9, r0 802a9e0: b910 cbnz r0, 802a9e8 802a9e2: f000 fe9b bl 802b71c 802a9e6: e7fe b.n 802a9e6 configASSERT( ( ( uxPriority & ( ~portPRIVILEGE_BIT ) ) < configMAX_PRIORITIES ) ); 802a9e8: 2d04 cmp r5, #4 802a9ea: d902 bls.n 802a9f2 802a9ec: f000 fe96 bl 802b71c 802a9f0: e7fe b.n 802a9f0 #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. */ 802a9f2: b936 cbnz r6, 802aa02 802a9f4: 0090 lsls r0, r2, #2 802a9f6: f000 ffa7 bl 802b948 if( pxStack != NULL ) 802a9fa: 4606 mov r6, r0 802a9fc: 2800 cmp r0, #0 802a9fe: f000 809e beq.w 802ab3e { /* 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 ) ); 802aa02: 205c movs r0, #92 ; 0x5c 802aa04: f000 ffa0 bl 802b948 if( pxNewTCB != NULL ) 802aa08: 4604 mov r4, r0 802aa0a: b178 cbz r0, 802aa2c { /* Store the stack location in the TCB. */ pxNewTCB->pxStack = pxStack; 802aa0c: 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 ) ); 802aa0e: ea4f 028b mov.w r2, fp, lsl #2 802aa12: 4630 mov r0, r6 802aa14: 21a5 movs r1, #165 ; 0xa5 802aa16: f7f7 f873 bl 8021b00 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 ); 802aa1a: 6b23 ldr r3, [r4, #48] ; 0x30 802aa1c: f10b 3bff add.w fp, fp, #4294967295 802aa20: 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. */ 802aa24: 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++ ) 802aa28: 2600 movs r6, #0 802aa2a: e003 b.n 802aa34 } else { /* The stack cannot be used as the TCB was not created. Free it again. */ vPortFree( pxStack ); 802aa2c: 4630 mov r0, r6 802aa2e: f001 f811 bl 802ba54 802aa32: e084 b.n 802ab3e 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. */ 802aa34: 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 ]; 802aa36: 5dba ldrb r2, [r7, r6] 802aa38: 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 ) 802aa3c: 5dbb ldrb r3, [r7, r6] 802aa3e: b113 cbz r3, 802aa46 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++ ) 802aa40: 3601 adds r6, #1 802aa42: 2e10 cmp r6, #16 802aa44: d1f6 bne.n 802aa34 } } /* 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'; 802aa46: 2600 movs r6, #0 pxTCB->uxBasePriority = uxPriority; pxTCB->uxMutexesHeld = 0; } #endif /* configUSE_MUTEXES */ vListInitialiseItem( &( pxTCB->xGenericListItem ) ); 802aa48: 1d27 adds r7, r4, #4 802aa4a: 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'; 802aa4c: f884 6043 strb.w r6, [r4, #67] ; 0x43 else { mtCOVERAGE_TEST_MARKER(); } pxTCB->uxPriority = uxPriority; 802aa50: 62e5 str r5, [r4, #44] ; 0x2c #if ( configUSE_MUTEXES == 1 ) { pxTCB->uxBasePriority = uxPriority; 802aa52: 64e5 str r5, [r4, #76] ; 0x4c pxTCB->uxMutexesHeld = 0; 802aa54: 6526 str r6, [r4, #80] ; 0x50 } #endif /* configUSE_MUTEXES */ vListInitialiseItem( &( pxTCB->xGenericListItem ) ); 802aa56: f7ff fbfd bl 802a254 vListInitialiseItem( &( pxTCB->xEventListItem ) ); 802aa5a: f104 0018 add.w r0, r4, #24 802aa5e: f7ff fbf9 bl 802a254 /* 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. */ 802aa62: f1c5 0305 rsb r3, r5, #5 } #endif /* portUSING_MPU_WRAPPERS */ #if ( configUSE_TASK_NOTIFICATIONS == 1 ) { pxTCB->ulNotifiedValue = 0; 802aa66: 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 ); 802aa68: 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. */ 802aa6a: 61a3 str r3, [r4, #24] listSET_LIST_ITEM_OWNER( &( pxTCB->xEventListItem ), pxTCB ); 802aa6c: 6264 str r4, [r4, #36] ; 0x24 #endif /* portUSING_MPU_WRAPPERS */ #if ( configUSE_TASK_NOTIFICATIONS == 1 ) { pxTCB->ulNotifiedValue = 0; pxTCB->eNotifyState = eNotWaitingNotification; 802aa6e: 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 ); 802aa72: 4658 mov r0, fp 802aa74: 4649 mov r1, r9 802aa76: 4652 mov r2, sl 802aa78: f000 fe24 bl 802b6c4 802aa7c: 6020 str r0, [r4, #0] } #endif /* portUSING_MPU_WRAPPERS */ if( ( void * ) pxCreatedTask != NULL ) 802aa7e: f1b8 0f00 cmp.w r8, #0 802aa82: d001 beq.n 802aa88 { /* 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; 802aa84: f8c8 4000 str.w r4, [r8] mtCOVERAGE_TEST_MARKER(); } /* Ensure interrupts don't access the task lists while they are being updated. */ taskENTER_CRITICAL(); 802aa88: f000 fe50 bl 802b72c { uxCurrentNumberOfTasks++; 802aa8c: 4a2e ldr r2, [pc, #184] ; (802ab48 ) 802aa8e: 6813 ldr r3, [r2, #0] 802aa90: 3301 adds r3, #1 802aa92: 6013 str r3, [r2, #0] if( pxCurrentTCB == NULL ) 802aa94: 4b2d ldr r3, [pc, #180] ; (802ab4c ) 802aa96: 681e ldr r6, [r3, #0] 802aa98: bb36 cbnz r6, 802aae8 { /* There are no other tasks, or all the other tasks are in the suspended state - make this the current task. */ pxCurrentTCB = pxNewTCB; 802aa9a: 601c str r4, [r3, #0] if( uxCurrentNumberOfTasks == ( UBaseType_t ) 1 ) 802aa9c: 6813 ldr r3, [r2, #0] 802aa9e: 2b01 cmp r3, #1 802aaa0: d12a bne.n 802aaf8 { UBaseType_t uxPriority; for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); 802aaa2: f8df 80d0 ldr.w r8, [pc, #208] ; 802ab74 802aaa6: f04f 0914 mov.w r9, #20 802aaaa: 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++ ) 802aaae: 3601 adds r6, #1 { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); 802aab0: f7ff fbc5 bl 802a23e static void prvInitialiseTaskLists( void ) { UBaseType_t uxPriority; for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) 802aab4: 2e05 cmp r6, #5 802aab6: d1f8 bne.n 802aaaa { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); } vListInitialise( &xDelayedTaskList1 ); 802aab8: f8df 80bc ldr.w r8, [pc, #188] ; 802ab78 vListInitialise( &xDelayedTaskList2 ); 802aabc: 4e24 ldr r6, [pc, #144] ; (802ab50 ) for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); } vListInitialise( &xDelayedTaskList1 ); 802aabe: 4640 mov r0, r8 802aac0: f7ff fbbd bl 802a23e vListInitialise( &xDelayedTaskList2 ); 802aac4: 4630 mov r0, r6 802aac6: f7ff fbba bl 802a23e vListInitialise( &xPendingReadyList ); 802aaca: 4822 ldr r0, [pc, #136] ; (802ab54 ) 802aacc: f7ff fbb7 bl 802a23e #if ( INCLUDE_vTaskDelete == 1 ) { vListInitialise( &xTasksWaitingTermination ); 802aad0: 4821 ldr r0, [pc, #132] ; (802ab58 ) 802aad2: f7ff fbb4 bl 802a23e } #endif /* INCLUDE_vTaskDelete */ #if ( INCLUDE_vTaskSuspend == 1 ) { vListInitialise( &xSuspendedTaskList ); 802aad6: 4821 ldr r0, [pc, #132] ; (802ab5c ) 802aad8: f7ff fbb1 bl 802a23e } #endif /* INCLUDE_vTaskSuspend */ /* Start with pxDelayedTaskList using list1 and the pxOverflowDelayedTaskList using list2. */ pxDelayedTaskList = &xDelayedTaskList1; 802aadc: 4b20 ldr r3, [pc, #128] ; (802ab60 ) 802aade: f8c3 8000 str.w r8, [r3] pxOverflowDelayedTaskList = &xDelayedTaskList2; 802aae2: 4b20 ldr r3, [pc, #128] ; (802ab64 ) 802aae4: 601e str r6, [r3, #0] 802aae6: e007 b.n 802aaf8 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 ) 802aae8: 4a1f ldr r2, [pc, #124] ; (802ab68 ) 802aaea: 6812 ldr r2, [r2, #0] 802aaec: b922 cbnz r2, 802aaf8 { if( pxCurrentTCB->uxPriority <= uxPriority ) 802aaee: 681a ldr r2, [r3, #0] 802aaf0: 6ad2 ldr r2, [r2, #44] ; 0x2c 802aaf2: 42aa cmp r2, r5 { pxCurrentTCB = pxNewTCB; 802aaf4: bf98 it ls 802aaf6: 601c strls r4, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } } uxTaskNumber++; 802aaf8: 4a1c ldr r2, [pc, #112] ; (802ab6c ) 802aafa: 6813 ldr r3, [r2, #0] 802aafc: 3301 adds r3, #1 802aafe: 6013 str r3, [r2, #0] pxNewTCB->uxTCBNumber = uxTaskNumber; } #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyList( pxNewTCB ); 802ab00: 4a1b ldr r2, [pc, #108] ; (802ab70 ) uxTaskNumber++; #if ( configUSE_TRACE_FACILITY == 1 ) { /* Add a counter into the TCB for tracing only. */ pxNewTCB->uxTCBNumber = uxTaskNumber; 802ab02: 6463 str r3, [r4, #68] ; 0x44 } #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyList( pxNewTCB ); 802ab04: 6ae3 ldr r3, [r4, #44] ; 0x2c 802ab06: 6811 ldr r1, [r2, #0] 802ab08: 2401 movs r4, #1 802ab0a: fa04 f003 lsl.w r0, r4, r3 802ab0e: 4301 orrs r1, r0 802ab10: 6011 str r1, [r2, #0] 802ab12: 4a18 ldr r2, [pc, #96] ; (802ab74 ) 802ab14: 2014 movs r0, #20 802ab16: fb00 2003 mla r0, r0, r3, r2 802ab1a: 4639 mov r1, r7 802ab1c: f7ff fb9d bl 802a25a xReturn = pdPASS; portSETUP_TCB( pxNewTCB ); } taskEXIT_CRITICAL(); 802ab20: f000 fe30 bl 802b784 traceTASK_CREATE_FAILED(); } if( xReturn == pdPASS ) { if( xSchedulerRunning != pdFALSE ) 802ab24: 4b10 ldr r3, [pc, #64] ; (802ab68 ) 802ab26: 681b ldr r3, [r3, #0] 802ab28: b133 cbz r3, 802ab38 { /* If the created task is of a higher priority than the current task then it should run now. */ if( pxCurrentTCB->uxPriority < uxPriority ) 802ab2a: 4b08 ldr r3, [pc, #32] ; (802ab4c ) 802ab2c: 681b ldr r3, [r3, #0] 802ab2e: 6adb ldr r3, [r3, #44] ; 0x2c 802ab30: 42ab cmp r3, r5 802ab32: d201 bcs.n 802ab38 { taskYIELD_IF_USING_PREEMPTION(); 802ab34: f000 fde6 bl 802b704 #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyList( pxNewTCB ); xReturn = pdPASS; 802ab38: 4620 mov r0, r4 802ab3a: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} } taskEXIT_CRITICAL(); } else { xReturn = errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY; 802ab3e: f04f 30ff mov.w r0, #4294967295 mtCOVERAGE_TEST_MARKER(); } } return xReturn; } 802ab42: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 802ab46: bf00 nop 802ab48: 20000ca0 .word 0x20000ca0 802ab4c: 20000c78 .word 0x20000c78 802ab50: 20000be8 .word 0x20000be8 802ab54: 20000c7c .word 0x20000c7c 802ab58: 20000c64 .word 0x20000c64 802ab5c: 20000ca4 .word 0x20000ca4 802ab60: 20000bc8 .word 0x20000bc8 802ab64: 20000c98 .word 0x20000c98 802ab68: 20000bcc .word 0x20000bcc 802ab6c: 20000c9c .word 0x20000c9c 802ab70: 20000cb8 .word 0x20000cb8 802ab74: 20000c00 .word 0x20000c00 802ab78: 20000bd4 .word 0x20000bd4 0802ab7c : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelete == 1 ) void vTaskDelete( TaskHandle_t xTaskToDelete ) { 802ab7c: b538 push {r3, r4, r5, lr} 802ab7e: 4604 mov r4, r0 TCB_t *pxTCB; taskENTER_CRITICAL(); 802ab80: f000 fdd4 bl 802b72c { /* If null is passed in here then it is the calling task that is being deleted. */ pxTCB = prvGetTCBFromHandle( xTaskToDelete ); 802ab84: b90c cbnz r4, 802ab8a 802ab86: 4b22 ldr r3, [pc, #136] ; (802ac10 ) 802ab88: 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 ) 802ab8a: 1d25 adds r5, r4, #4 802ab8c: 4628 mov r0, r5 802ab8e: f7ff fb88 bl 802a2a2 802ab92: b968 cbnz r0, 802abb0 { taskRESET_READY_PRIORITY( pxTCB->uxPriority ); 802ab94: 6ae2 ldr r2, [r4, #44] ; 0x2c 802ab96: 491f ldr r1, [pc, #124] ; (802ac14 ) 802ab98: 2314 movs r3, #20 802ab9a: 4353 muls r3, r2 802ab9c: 58cb ldr r3, [r1, r3] 802ab9e: b93b cbnz r3, 802abb0 802aba0: 4b1d ldr r3, [pc, #116] ; (802ac18 ) 802aba2: 2001 movs r0, #1 802aba4: 6819 ldr r1, [r3, #0] 802aba6: fa00 f202 lsl.w r2, r0, r2 802abaa: ea21 0202 bic.w r2, r1, r2 802abae: 601a str r2, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } /* Is the task waiting on an event also? */ if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) 802abb0: 6aa3 ldr r3, [r4, #40] ; 0x28 802abb2: b11b cbz r3, 802abbc { ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 802abb4: f104 0018 add.w r0, r4, #24 802abb8: f7ff fb73 bl 802a2a2 else { mtCOVERAGE_TEST_MARKER(); } vListInsertEnd( &xTasksWaitingTermination, &( pxTCB->xGenericListItem ) ); 802abbc: 4817 ldr r0, [pc, #92] ; (802ac1c ) 802abbe: 4629 mov r1, r5 802abc0: f7ff fb4b bl 802a25a /* 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; 802abc4: 4b16 ldr r3, [pc, #88] ; (802ac20 ) 802abc6: 681a ldr r2, [r3, #0] 802abc8: 3201 adds r2, #1 802abca: 601a str r2, [r3, #0] /* Increment the uxTaskNumberVariable also so kernel aware debuggers can detect that the task lists need re-generating. */ uxTaskNumber++; 802abcc: 4b15 ldr r3, [pc, #84] ; (802ac24 ) 802abce: 681a ldr r2, [r3, #0] 802abd0: 3201 adds r2, #1 802abd2: 601a str r2, [r3, #0] traceTASK_DELETE( pxTCB ); } taskEXIT_CRITICAL(); 802abd4: f000 fdd6 bl 802b784 /* Force a reschedule if it is the currently running task that has just been deleted. */ if( xSchedulerRunning != pdFALSE ) 802abd8: 4b13 ldr r3, [pc, #76] ; (802ac28 ) 802abda: 681b ldr r3, [r3, #0] 802abdc: 2b00 cmp r3, #0 802abde: d015 beq.n 802ac0c { if( pxTCB == pxCurrentTCB ) 802abe0: 4b0b ldr r3, [pc, #44] ; (802ac10 ) 802abe2: 681b ldr r3, [r3, #0] 802abe4: 429c cmp r4, r3 802abe6: d109 bne.n 802abfc { configASSERT( uxSchedulerSuspended == 0 ); 802abe8: 4b10 ldr r3, [pc, #64] ; (802ac2c ) 802abea: 681b ldr r3, [r3, #0] 802abec: b113 cbz r3, 802abf4 802abee: f000 fd95 bl 802b71c 802abf2: e7fe b.n 802abf2 prvResetNextTaskUnblockTime(); } taskEXIT_CRITICAL(); } } } 802abf4: 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(); 802abf8: f000 bd84 b.w 802b704 } else { /* Reset the next expected unblock time in case it referred to the task that has just been deleted. */ taskENTER_CRITICAL(); 802abfc: f000 fd96 bl 802b72c { prvResetNextTaskUnblockTime(); 802ac00: f7ff feaa bl 802a958 } taskEXIT_CRITICAL(); } } } 802ac04: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} the task that has just been deleted. */ taskENTER_CRITICAL(); { prvResetNextTaskUnblockTime(); } taskEXIT_CRITICAL(); 802ac08: f000 bdbc b.w 802b784 802ac0c: bd38 pop {r3, r4, r5, pc} 802ac0e: bf00 nop 802ac10: 20000c78 .word 0x20000c78 802ac14: 20000c00 .word 0x20000c00 802ac18: 20000cb8 .word 0x20000cb8 802ac1c: 20000c64 .word 0x20000c64 802ac20: 20000bd0 .word 0x20000bd0 802ac24: 20000c9c .word 0x20000c9c 802ac28: 20000bcc .word 0x20000bcc 802ac2c: 20000c90 .word 0x20000c90 0802ac30 : #endif /* ( ( INCLUDE_xTaskResumeFromISR == 1 ) && ( INCLUDE_vTaskSuspend == 1 ) ) */ /*-----------------------------------------------------------*/ void vTaskStartScheduler( void ) { 802ac30: b530 push {r4, r5, lr} 802ac32: 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. */ 802ac34: 2400 movs r4, #0 802ac36: 2280 movs r2, #128 ; 0x80 802ac38: 9400 str r4, [sp, #0] 802ac3a: 9401 str r4, [sp, #4] 802ac3c: 9402 str r4, [sp, #8] 802ac3e: 9403 str r4, [sp, #12] 802ac40: 480e ldr r0, [pc, #56] ; (802ac7c ) 802ac42: 490f ldr r1, [pc, #60] ; (802ac80 ) 802ac44: 4623 mov r3, r4 802ac46: f7ff fec1 bl 802a9cc } #endif /* INCLUDE_xTaskGetIdleTaskHandle */ #if ( configUSE_TIMERS == 1 ) { if( xReturn == pdPASS ) 802ac4a: 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. */ 802ac4c: 4605 mov r5, r0 } #endif /* INCLUDE_xTaskGetIdleTaskHandle */ #if ( configUSE_TIMERS == 1 ) { if( xReturn == pdPASS ) 802ac4e: d10f bne.n 802ac70 { xReturn = xTimerCreateTimerTask(); 802ac50: f000 fbce bl 802b3f0 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_TIMERS */ if( xReturn == pdPASS ) 802ac54: 2801 cmp r0, #1 #if ( configUSE_TIMERS == 1 ) { if( xReturn == pdPASS ) { xReturn = xTimerCreateTimerTask(); 802ac56: 4605 mov r5, r0 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_TIMERS */ if( xReturn == pdPASS ) 802ac58: d10a bne.n 802ac70 /* 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(); 802ac5a: f000 fd5f bl 802b71c structure specific to the task that will run first. */ _impure_ptr = &( pxCurrentTCB->xNewLib_reent ); } #endif /* configUSE_NEWLIB_REENTRANT */ xSchedulerRunning = pdTRUE; 802ac5e: 4b09 ldr r3, [pc, #36] ; (802ac84 ) 802ac60: 601d str r5, [r3, #0] xTickCount = ( TickType_t ) 0U; 802ac62: 4b09 ldr r3, [pc, #36] ; (802ac88 ) 802ac64: 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 ); } } 802ac66: b005 add sp, #20 802ac68: 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 ) 802ac6c: f000 bde2 b.w 802b834 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 ); 802ac70: b915 cbnz r5, 802ac78 802ac72: f000 fd53 bl 802b71c 802ac76: e7fe b.n 802ac76 } } 802ac78: b005 add sp, #20 802ac7a: bd30 pop {r4, r5, pc} 802ac7c: 0802ae9d .word 0x0802ae9d 802ac80: 08039c70 .word 0x08039c70 802ac84: 20000bcc .word 0x20000bcc 802ac88: 20000c94 .word 0x20000c94 0802ac8c : { /* 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; 802ac8c: 4b02 ldr r3, [pc, #8] ; (802ac98 ) 802ac8e: 681a ldr r2, [r3, #0] 802ac90: 3201 adds r2, #1 802ac92: 601a str r2, [r3, #0] 802ac94: 4770 bx lr 802ac96: bf00 nop 802ac98: 20000c90 .word 0x20000c90 0802ac9c : TickType_t xTicks; /* Critical section required if running on a 16 bit processor. */ portTICK_TYPE_ENTER_CRITICAL(); { xTicks = xTickCount; 802ac9c: 4b01 ldr r3, [pc, #4] ; (802aca4 ) 802ac9e: 6818 ldr r0, [r3, #0] } portTICK_TYPE_EXIT_CRITICAL(); return xTicks; } 802aca0: 4770 bx lr 802aca2: bf00 nop 802aca4: 20000c94 .word 0x20000c94 0802aca8 : /* 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 ) 802aca8: 4b3b ldr r3, [pc, #236] ; (802ad98 ) 802acaa: 681b ldr r3, [r3, #0] #endif /* configUSE_TICKLESS_IDLE */ /*----------------------------------------------------------*/ BaseType_t xTaskIncrementTick( void ) { 802acac: 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 ) 802acb0: 2b00 cmp r3, #0 802acb2: d15b bne.n 802ad6c { /* Increment the RTOS tick, switching the delayed and overflowed delayed lists if it wraps to 0. */ ++xTickCount; 802acb4: 4b39 ldr r3, [pc, #228] ; (802ad9c ) 802acb6: 681a ldr r2, [r3, #0] 802acb8: 3201 adds r2, #1 802acba: 601a str r2, [r3, #0] { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 802acbc: 681e ldr r6, [r3, #0] if( xConstTickCount == ( TickType_t ) 0U ) 802acbe: b98e cbnz r6, 802ace4 { taskSWITCH_DELAYED_LISTS(); 802acc0: 4b37 ldr r3, [pc, #220] ; (802ada0 ) 802acc2: 681a ldr r2, [r3, #0] 802acc4: 6812 ldr r2, [r2, #0] 802acc6: b112 cbz r2, 802acce 802acc8: f000 fd28 bl 802b71c 802accc: e7fe b.n 802accc 802acce: 4a35 ldr r2, [pc, #212] ; (802ada4 ) 802acd0: 6819 ldr r1, [r3, #0] 802acd2: 6810 ldr r0, [r2, #0] 802acd4: 6018 str r0, [r3, #0] 802acd6: 4b34 ldr r3, [pc, #208] ; (802ada8 ) 802acd8: 6011 str r1, [r2, #0] 802acda: 681a ldr r2, [r3, #0] 802acdc: 3201 adds r2, #1 802acde: 601a str r2, [r3, #0] 802ace0: f7ff fe3a bl 802a958 /* 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 ) 802ace4: 4b31 ldr r3, [pc, #196] ; (802adac ) 802ace6: 681b ldr r3, [r3, #0] 802ace8: 2400 movs r4, #0 802acea: 429e cmp r6, r3 802acec: d200 bcs.n 802acf0 802acee: e032 b.n 802ad56 { for( ;; ) { if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 802acf0: 4f2b ldr r7, [pc, #172] ; (802ada0 ) mtCOVERAGE_TEST_MARKER(); } /* Place the unblocked task into the appropriate ready list. */ prvAddTaskToReadyList( pxTCB ); 802acf2: f8df 80cc ldr.w r8, [pc, #204] ; 802adc0 802acf6: f8df a0bc ldr.w sl, [pc, #188] ; 802adb4 look any further down the list. */ if( xConstTickCount >= xNextTaskUnblockTime ) { for( ;; ) { if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 802acfa: 683b ldr r3, [r7, #0] 802acfc: 681b ldr r3, [r3, #0] 802acfe: 2b00 cmp r3, #0 802ad00: d13a bne.n 802ad78 /* 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; 802ad02: 4b2a ldr r3, [pc, #168] ; (802adac ) 802ad04: f04f 32ff mov.w r2, #4294967295 802ad08: 601a str r2, [r3, #0] break; 802ad0a: e024 b.n 802ad56 /* 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; 802ad0c: 4a27 ldr r2, [pc, #156] ; (802adac ) 802ad0e: 6013 str r3, [r2, #0] break; 802ad10: e021 b.n 802ad56 { mtCOVERAGE_TEST_MARKER(); } /* It is time to remove the item from the Blocked state. */ ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 802ad12: f105 0904 add.w r9, r5, #4 802ad16: 4648 mov r0, r9 802ad18: f7ff fac3 bl 802a2a2 /* Is the task waiting on an event also? If so remove it from the event list. */ if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) 802ad1c: 6aab ldr r3, [r5, #40] ; 0x28 802ad1e: b11b cbz r3, 802ad28 { ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 802ad20: f105 0018 add.w r0, r5, #24 802ad24: f7ff fabd bl 802a2a2 mtCOVERAGE_TEST_MARKER(); } /* Place the unblocked task into the appropriate ready list. */ prvAddTaskToReadyList( pxTCB ); 802ad28: 6aeb ldr r3, [r5, #44] ; 0x2c 802ad2a: f8d8 1000 ldr.w r1, [r8] 802ad2e: 2201 movs r2, #1 802ad30: fa02 f203 lsl.w r2, r2, r3 802ad34: 2014 movs r0, #20 802ad36: 430a orrs r2, r1 802ad38: fb00 a003 mla r0, r0, r3, sl 802ad3c: 4649 mov r1, r9 802ad3e: f8c8 2000 str.w r2, [r8] 802ad42: f7ff fa8a bl 802a25a { /* 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 ) 802ad46: 4b1a ldr r3, [pc, #104] ; (802adb0 ) 802ad48: 6aea ldr r2, [r5, #44] ; 0x2c 802ad4a: 681b ldr r3, [r3, #0] 802ad4c: 6adb ldr r3, [r3, #44] ; 0x2c { xSwitchRequired = pdTRUE; 802ad4e: 429a cmp r2, r3 802ad50: bf28 it cs 802ad52: 2401 movcs r4, #1 802ad54: e7d1 b.n 802acfa /* 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 ) 802ad56: 4b16 ldr r3, [pc, #88] ; (802adb0 ) 802ad58: 681b ldr r3, [r3, #0] 802ad5a: 6adb ldr r3, [r3, #44] ; 0x2c 802ad5c: 2214 movs r2, #20 802ad5e: 4353 muls r3, r2 802ad60: 4a14 ldr r2, [pc, #80] ; (802adb4 ) 802ad62: 58d3 ldr r3, [r2, r3] { xSwitchRequired = pdTRUE; 802ad64: 2b01 cmp r3, #1 802ad66: bf88 it hi 802ad68: 2401 movhi r4, #1 802ad6a: e00c b.n 802ad86 } #endif /* configUSE_TICK_HOOK */ } else { ++uxPendedTicks; 802ad6c: 4b12 ldr r3, [pc, #72] ; (802adb8 ) 802ad6e: 681a ldr r2, [r3, #0] 802ad70: 3201 adds r2, #1 802ad72: 601a str r2, [r3, #0] BaseType_t xTaskIncrementTick( void ) { TCB_t * pxTCB; TickType_t xItemValue; BaseType_t xSwitchRequired = pdFALSE; 802ad74: 2400 movs r4, #0 802ad76: e006 b.n 802ad86 { /* 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 ); 802ad78: 683b ldr r3, [r7, #0] 802ad7a: 68db ldr r3, [r3, #12] 802ad7c: 68dd ldr r5, [r3, #12] xItemValue = listGET_LIST_ITEM_VALUE( &( pxTCB->xGenericListItem ) ); 802ad7e: 686b ldr r3, [r5, #4] if( xConstTickCount < xItemValue ) 802ad80: 429e cmp r6, r3 802ad82: d2c6 bcs.n 802ad12 802ad84: e7c2 b.n 802ad0c #endif } #if ( configUSE_PREEMPTION == 1 ) { if( xYieldPending != pdFALSE ) 802ad86: 4b0d ldr r3, [pc, #52] ; (802adbc ) 802ad88: 681b ldr r3, [r3, #0] { xSwitchRequired = pdTRUE; 802ad8a: 2b00 cmp r3, #0 802ad8c: bf18 it ne 802ad8e: 2401 movne r4, #1 } } #endif /* configUSE_PREEMPTION */ return xSwitchRequired; } 802ad90: 4620 mov r0, r4 802ad92: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802ad96: bf00 nop 802ad98: 20000c90 .word 0x20000c90 802ad9c: 20000c94 .word 0x20000c94 802ada0: 20000bc8 .word 0x20000bc8 802ada4: 20000c98 .word 0x20000c98 802ada8: 20000bc4 .word 0x20000bc4 802adac: 20000700 .word 0x20000700 802adb0: 20000c78 .word 0x20000c78 802adb4: 20000c00 .word 0x20000c00 802adb8: 20000bfc .word 0x20000bfc 802adbc: 20000cbc .word 0x20000cbc 802adc0: 20000cb8 .word 0x20000cb8 0802adc4 : #endif /* configUSE_TICKLESS_IDLE */ /*----------------------------------------------------------*/ BaseType_t xTaskResumeAll( void ) { 802adc4: 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 ); 802adc8: 4c2c ldr r4, [pc, #176] ; (802ae7c ) 802adca: 6823 ldr r3, [r4, #0] 802adcc: b913 cbnz r3, 802add4 802adce: f000 fca5 bl 802b71c 802add2: e7fe b.n 802add2 /* 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(); 802add4: f000 fcaa bl 802b72c { --uxSchedulerSuspended; 802add8: 6823 ldr r3, [r4, #0] 802adda: 3b01 subs r3, #1 802addc: 6023 str r3, [r4, #0] if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 802adde: 6823 ldr r3, [r4, #0] 802ade0: b10b cbz r3, 802ade6 /*----------------------------------------------------------*/ BaseType_t xTaskResumeAll( void ) { TCB_t *pxTCB; BaseType_t xAlreadyYielded = pdFALSE; 802ade2: 2400 movs r4, #0 802ade4: e044 b.n 802ae70 { --uxSchedulerSuspended; if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) 802ade6: 4b26 ldr r3, [pc, #152] ; (802ae80 ) 802ade8: 681b ldr r3, [r3, #0] 802adea: bb0b cbnz r3, 802ae30 802adec: e7f9 b.n 802ade2 { /* 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 ) ); 802adee: 68f3 ldr r3, [r6, #12] 802adf0: 68dc ldr r4, [r3, #12] ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 802adf2: 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 ) ); 802adf6: f104 0018 add.w r0, r4, #24 802adfa: f7ff fa52 bl 802a2a2 ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 802adfe: 4640 mov r0, r8 802ae00: f7ff fa4f bl 802a2a2 prvAddTaskToReadyList( pxTCB ); 802ae04: 6ae3 ldr r3, [r4, #44] ; 0x2c 802ae06: 682a ldr r2, [r5, #0] 802ae08: 2701 movs r7, #1 802ae0a: fa07 f103 lsl.w r1, r7, r3 802ae0e: 2014 movs r0, #20 802ae10: 430a orrs r2, r1 802ae12: fb00 9003 mla r0, r0, r3, r9 802ae16: 4641 mov r1, r8 802ae18: 602a str r2, [r5, #0] 802ae1a: f7ff fa1e bl 802a25a /* If the moved task has a priority higher than the current task then a yield must be performed. */ if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority ) 802ae1e: 4b19 ldr r3, [pc, #100] ; (802ae84 ) 802ae20: 6ae2 ldr r2, [r4, #44] ; 0x2c 802ae22: 681b ldr r3, [r3, #0] 802ae24: 6adb ldr r3, [r3, #44] ; 0x2c 802ae26: 429a cmp r2, r3 802ae28: d306 bcc.n 802ae38 { xYieldPending = pdTRUE; 802ae2a: 4b17 ldr r3, [pc, #92] ; (802ae88 ) 802ae2c: 601f str r7, [r3, #0] 802ae2e: e003 b.n 802ae38 { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) { /* Move any readied tasks from the pending list into the appropriate ready list. */ while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) 802ae30: 4e16 ldr r6, [pc, #88] ; (802ae8c ) { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xPendingReadyList ) ); ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); prvAddTaskToReadyList( pxTCB ); 802ae32: 4d17 ldr r5, [pc, #92] ; (802ae90 ) 802ae34: f8df 9060 ldr.w r9, [pc, #96] ; 802ae98 { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) { /* Move any readied tasks from the pending list into the appropriate ready list. */ while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) 802ae38: 6833 ldr r3, [r6, #0] 802ae3a: 2b00 cmp r3, #0 802ae3c: d1d7 bne.n 802adee /* 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 ) 802ae3e: 4c15 ldr r4, [pc, #84] ; (802ae94 ) 802ae40: 6823 ldr r3, [r4, #0] 802ae42: b96b cbnz r3, 802ae60 else { mtCOVERAGE_TEST_MARKER(); } if( xYieldPending == pdTRUE ) 802ae44: 4b10 ldr r3, [pc, #64] ; (802ae88 ) 802ae46: 681c ldr r4, [r3, #0] 802ae48: 2c01 cmp r4, #1 802ae4a: d1ca bne.n 802ade2 802ae4c: e00e b.n 802ae6c time. */ if( uxPendedTicks > ( UBaseType_t ) 0U ) { while( uxPendedTicks > ( UBaseType_t ) 0U ) { if( xTaskIncrementTick() != pdFALSE ) 802ae4e: f7ff ff2b bl 802aca8 802ae52: b108 cbz r0, 802ae58 { xYieldPending = pdTRUE; 802ae54: 2301 movs r3, #1 802ae56: 6033 str r3, [r6, #0] } else { mtCOVERAGE_TEST_MARKER(); } --uxPendedTicks; 802ae58: 682b ldr r3, [r5, #0] 802ae5a: 3b01 subs r3, #1 802ae5c: 602b str r3, [r5, #0] 802ae5e: e001 b.n 802ae64 { while( uxPendedTicks > ( UBaseType_t ) 0U ) { if( xTaskIncrementTick() != pdFALSE ) { xYieldPending = pdTRUE; 802ae60: 4e09 ldr r6, [pc, #36] ; (802ae88 ) 802ae62: 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 ) 802ae64: 6823 ldr r3, [r4, #0] 802ae66: 2b00 cmp r3, #0 802ae68: d1f1 bne.n 802ae4e 802ae6a: e7eb b.n 802ae44 #if( configUSE_PREEMPTION != 0 ) { xAlreadyYielded = pdTRUE; } #endif taskYIELD_IF_USING_PREEMPTION(); 802ae6c: f000 fc4a bl 802b704 else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 802ae70: f000 fc88 bl 802b784 return xAlreadyYielded; } 802ae74: 4620 mov r0, r4 802ae76: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 802ae7a: bf00 nop 802ae7c: 20000c90 .word 0x20000c90 802ae80: 20000ca0 .word 0x20000ca0 802ae84: 20000c78 .word 0x20000c78 802ae88: 20000cbc .word 0x20000cbc 802ae8c: 20000c7c .word 0x20000c7c 802ae90: 20000cb8 .word 0x20000cb8 802ae94: 20000bfc .word 0x20000bfc 802ae98: 20000c00 .word 0x20000c00 0802ae9c : * * void prvIdleTask( void *pvParameters ); * */ static portTASK_FUNCTION( prvIdleTask, pvParameters ) { 802ae9c: 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 ) 802ae9e: 4c14 ldr r4, [pc, #80] ; (802aef0 ) { vTaskSuspendAll(); { xListIsEmpty = listLIST_IS_EMPTY( &xTasksWaitingTermination ); 802aea0: 4e14 ldr r6, [pc, #80] ; (802aef4 ) taskENTER_CRITICAL(); { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xTasksWaitingTermination ) ); ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); --uxCurrentNumberOfTasks; 802aea2: 4f15 ldr r7, [pc, #84] ; (802aef8 ) { BaseType_t xListIsEmpty; /* ucTasksDeleted is used to prevent vTaskSuspendAll() being called too often in the idle task. */ while( uxTasksDeleted > ( UBaseType_t ) 0U ) 802aea4: 6823 ldr r3, [r4, #0] 802aea6: b1e3 cbz r3, 802aee2 { vTaskSuspendAll(); 802aea8: f7ff fef0 bl 802ac8c { xListIsEmpty = listLIST_IS_EMPTY( &xTasksWaitingTermination ); 802aeac: 6835 ldr r5, [r6, #0] } ( void ) xTaskResumeAll(); 802aeae: f7ff ff89 bl 802adc4 if( xListIsEmpty == pdFALSE ) 802aeb2: 2d00 cmp r5, #0 802aeb4: d0f6 beq.n 802aea4 { TCB_t *pxTCB; taskENTER_CRITICAL(); 802aeb6: f000 fc39 bl 802b72c { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xTasksWaitingTermination ) ); 802aeba: 68f3 ldr r3, [r6, #12] 802aebc: 68dd ldr r5, [r3, #12] ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 802aebe: 1d28 adds r0, r5, #4 802aec0: f7ff f9ef bl 802a2a2 --uxCurrentNumberOfTasks; 802aec4: 683b ldr r3, [r7, #0] 802aec6: 3b01 subs r3, #1 802aec8: 603b str r3, [r7, #0] --uxTasksDeleted; 802aeca: 6823 ldr r3, [r4, #0] 802aecc: 3b01 subs r3, #1 802aece: 6023 str r3, [r4, #0] } taskEXIT_CRITICAL(); 802aed0: f000 fc58 bl 802b784 vPortFreeAligned( pxTCB->pxStack ); } } #else { vPortFreeAligned( pxTCB->pxStack ); 802aed4: 6b28 ldr r0, [r5, #48] ; 0x30 802aed6: f000 fdbd bl 802ba54 } #endif vPortFree( pxTCB ); 802aeda: 4628 mov r0, r5 802aedc: f000 fdba bl 802ba54 802aee0: e7e0 b.n 802aea4 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 ) 802aee2: 4b06 ldr r3, [pc, #24] ; (802aefc ) 802aee4: 681b ldr r3, [r3, #0] 802aee6: 2b01 cmp r3, #1 802aee8: d9dc bls.n 802aea4 { taskYIELD(); 802aeea: f000 fc0b bl 802b704 802aeee: e7d9 b.n 802aea4 802aef0: 20000bd0 .word 0x20000bd0 802aef4: 20000c64 .word 0x20000c64 802aef8: 20000ca0 .word 0x20000ca0 802aefc: 20000c00 .word 0x20000c00 0802af00 : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelay == 1 ) void vTaskDelay( const TickType_t xTicksToDelay ) { 802af00: 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 ) 802af02: 4604 mov r4, r0 802af04: b918 cbnz r0, 802af0e } else { mtCOVERAGE_TEST_MARKER(); } } 802af06: 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(); 802af0a: f000 bbfb b.w 802b704 /* A delay time of zero just forces a reschedule. */ if( xTicksToDelay > ( TickType_t ) 0U ) { configASSERT( uxSchedulerSuspended == 0 ); 802af0e: 4b11 ldr r3, [pc, #68] ; (802af54 ) 802af10: 681b ldr r3, [r3, #0] 802af12: b113 cbz r3, 802af1a 802af14: f000 fc02 bl 802b71c 802af18: e7fe b.n 802af18 vTaskSuspendAll(); 802af1a: f7ff feb7 bl 802ac8c 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; 802af1e: 4b0e ldr r3, [pc, #56] ; (802af58 ) 802af20: 681d ldr r5, [r3, #0] 802af22: 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 ) 802af24: 4c0d ldr r4, [pc, #52] ; (802af5c ) 802af26: 6820 ldr r0, [r4, #0] 802af28: 3004 adds r0, #4 802af2a: f7ff f9ba bl 802a2a2 802af2e: b948 cbnz r0, 802af44 { /* 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 ); 802af30: 4b0b ldr r3, [pc, #44] ; (802af60 ) 802af32: 6819 ldr r1, [r3, #0] 802af34: 6822 ldr r2, [r4, #0] 802af36: 6ad2 ldr r2, [r2, #44] ; 0x2c 802af38: 2001 movs r0, #1 802af3a: fa00 f202 lsl.w r2, r0, r2 802af3e: ea21 0202 bic.w r2, r1, r2 802af42: 601a str r2, [r3, #0] } else { mtCOVERAGE_TEST_MARKER(); } prvAddCurrentTaskToDelayedList( xTimeToWake ); 802af44: 4628 mov r0, r5 802af46: f7ff fd19 bl 802a97c } xAlreadyYielded = xTaskResumeAll(); 802af4a: f7ff ff3b bl 802adc4 mtCOVERAGE_TEST_MARKER(); } /* Force a reschedule if xTaskResumeAll has not already done so, we may have put ourselves to sleep. */ if( xAlreadyYielded == pdFALSE ) 802af4e: 2800 cmp r0, #0 802af50: d0d9 beq.n 802af06 } else { mtCOVERAGE_TEST_MARKER(); } } 802af52: bd38 pop {r3, r4, r5, pc} 802af54: 20000c90 .word 0x20000c90 802af58: 20000c94 .word 0x20000c94 802af5c: 20000c78 .word 0x20000c78 802af60: 20000cb8 .word 0x20000cb8 0802af64 : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelayUntil == 1 ) void vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement ) { 802af64: b570 push {r4, r5, r6, lr} 802af66: 460c mov r4, r1 TickType_t xTimeToWake; BaseType_t xAlreadyYielded, xShouldDelay = pdFALSE; configASSERT( pxPreviousWakeTime ); 802af68: 4605 mov r5, r0 802af6a: b910 cbnz r0, 802af72 802af6c: f000 fbd6 bl 802b71c 802af70: e7fe b.n 802af70 configASSERT( ( xTimeIncrement > 0U ) ); 802af72: b911 cbnz r1, 802af7a 802af74: f000 fbd2 bl 802b71c 802af78: e7fe b.n 802af78 configASSERT( uxSchedulerSuspended == 0 ); 802af7a: 4b1c ldr r3, [pc, #112] ; (802afec ) 802af7c: 681e ldr r6, [r3, #0] 802af7e: b116 cbz r6, 802af86 802af80: f000 fbcc bl 802b71c 802af84: e7fe b.n 802af84 vTaskSuspendAll(); 802af86: f7ff fe81 bl 802ac8c { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 802af8a: 4b19 ldr r3, [pc, #100] ; (802aff0 ) /* Generate the tick time at which the task wants to wake. */ xTimeToWake = *pxPreviousWakeTime + xTimeIncrement; 802af8c: 682a ldr r2, [r5, #0] vTaskSuspendAll(); { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 802af8e: 6818 ldr r0, [r3, #0] /* Generate the tick time at which the task wants to wake. */ xTimeToWake = *pxPreviousWakeTime + xTimeIncrement; if( xConstTickCount < *pxPreviousWakeTime ) 802af90: 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; 802af92: 4414 add r4, r2 if( xConstTickCount < *pxPreviousWakeTime ) 802af94: d202 bcs.n 802af9c /* 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 ) ) 802af96: 4294 cmp r4, r2 802af98: d207 bcs.n 802afaa 802af9a: e001 b.n 802afa0 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 ) ) 802af9c: 4294 cmp r4, r2 802af9e: d306 bcc.n 802afae 802afa0: 4284 cmp r4, r0 802afa2: bf94 ite ls 802afa4: 2300 movls r3, #0 802afa6: 2301 movhi r3, #1 802afa8: e002 b.n 802afb0 #if ( INCLUDE_vTaskDelayUntil == 1 ) void vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement ) { TickType_t xTimeToWake; BaseType_t xAlreadyYielded, xShouldDelay = pdFALSE; 802afaa: 4633 mov r3, r6 802afac: e000 b.n 802afb0 /* 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; 802afae: 2301 movs r3, #1 mtCOVERAGE_TEST_MARKER(); } } /* Update the wake time ready for the next call. */ *pxPreviousWakeTime = xTimeToWake; 802afb0: 602c str r4, [r5, #0] if( xShouldDelay != pdFALSE ) 802afb2: b193 cbz r3, 802afda { 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 ) 802afb4: 4d0f ldr r5, [pc, #60] ; (802aff4 ) 802afb6: 6828 ldr r0, [r5, #0] 802afb8: 3004 adds r0, #4 802afba: f7ff f972 bl 802a2a2 802afbe: b948 cbnz r0, 802afd4 { /* 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 ); 802afc0: 4b0d ldr r3, [pc, #52] ; (802aff8 ) 802afc2: 6819 ldr r1, [r3, #0] 802afc4: 682a ldr r2, [r5, #0] 802afc6: 6ad2 ldr r2, [r2, #44] ; 0x2c 802afc8: 2001 movs r0, #1 802afca: fa00 f202 lsl.w r2, r0, r2 802afce: ea21 0202 bic.w r2, r1, r2 802afd2: 601a str r2, [r3, #0] else { mtCOVERAGE_TEST_MARKER(); } prvAddCurrentTaskToDelayedList( xTimeToWake ); 802afd4: 4620 mov r0, r4 802afd6: f7ff fcd1 bl 802a97c else { mtCOVERAGE_TEST_MARKER(); } } xAlreadyYielded = xTaskResumeAll(); 802afda: f7ff fef3 bl 802adc4 /* Force a reschedule if xTaskResumeAll has not already done so, we may have put ourselves to sleep. */ if( xAlreadyYielded == pdFALSE ) 802afde: b918 cbnz r0, 802afe8 } else { mtCOVERAGE_TEST_MARKER(); } } 802afe0: 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(); 802afe4: f000 bb8e b.w 802b704 802afe8: bd70 pop {r4, r5, r6, pc} 802afea: bf00 nop 802afec: 20000c90 .word 0x20000c90 802aff0: 20000c94 .word 0x20000c94 802aff4: 20000c78 .word 0x20000c78 802aff8: 20000cb8 .word 0x20000cb8 0802affc : #endif /* configUSE_APPLICATION_TASK_TAG */ /*-----------------------------------------------------------*/ void vTaskSwitchContext( void ) { 802affc: b508 push {r3, lr} if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE ) 802affe: 4b12 ldr r3, [pc, #72] ; (802b048 ) 802b000: 681a ldr r2, [r3, #0] 802b002: 4b12 ldr r3, [pc, #72] ; (802b04c ) 802b004: b10a cbz r2, 802b00a { /* The scheduler is currently suspended - do not allow a context switch. */ xYieldPending = pdTRUE; 802b006: 2201 movs r2, #1 802b008: e01c b.n 802b044 } else { xYieldPending = pdFALSE; 802b00a: 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(); 802b00c: 4b10 ldr r3, [pc, #64] ; (802b050 ) 802b00e: 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 ) ); 802b010: fab2 f282 clz r2, r2 802b014: b2d2 uxtb r2, r2 802b016: 2314 movs r3, #20 802b018: f1c2 021f rsb r2, r2, #31 802b01c: 490d ldr r1, [pc, #52] ; (802b054 ) 802b01e: 435a muls r2, r3 802b020: 188b adds r3, r1, r2 802b022: 588a ldr r2, [r1, r2] 802b024: b912 cbnz r2, 802b02c 802b026: f000 fb79 bl 802b71c 802b02a: e7fe b.n 802b02a 802b02c: 685a ldr r2, [r3, #4] 802b02e: 6852 ldr r2, [r2, #4] 802b030: f103 0108 add.w r1, r3, #8 802b034: 428a cmp r2, r1 802b036: 605a str r2, [r3, #4] 802b038: bf04 itt eq 802b03a: 6852 ldreq r2, [r2, #4] 802b03c: 605a streq r2, [r3, #4] 802b03e: 685b ldr r3, [r3, #4] 802b040: 68da ldr r2, [r3, #12] 802b042: 4b05 ldr r3, [pc, #20] ; (802b058 ) 802b044: 601a str r2, [r3, #0] 802b046: bd08 pop {r3, pc} 802b048: 20000c90 .word 0x20000c90 802b04c: 20000cbc .word 0x20000cbc 802b050: 20000cb8 .word 0x20000cb8 802b054: 20000c00 .word 0x20000c00 802b058: 20000c78 .word 0x20000c78 0802b05c : } } /*-----------------------------------------------------------*/ void vTaskPlaceOnEventList( List_t * const pxEventList, const TickType_t xTicksToWait ) { 802b05c: b538 push {r3, r4, r5, lr} 802b05e: 460d mov r5, r1 TickType_t xTimeToWake; configASSERT( pxEventList ); 802b060: b910 cbnz r0, 802b068 802b062: f000 fb5b bl 802b71c 802b066: e7fe b.n 802b066 /* 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 ) ); 802b068: 4c12 ldr r4, [pc, #72] ; (802b0b4 ) 802b06a: 6821 ldr r1, [r4, #0] 802b06c: 3118 adds r1, #24 802b06e: f7ff f900 bl 802a272 /* 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 ) 802b072: 6820 ldr r0, [r4, #0] 802b074: 3004 adds r0, #4 802b076: f7ff f914 bl 802a2a2 802b07a: b948 cbnz r0, 802b090 { /* 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 ); 802b07c: 4b0e ldr r3, [pc, #56] ; (802b0b8 ) 802b07e: 6819 ldr r1, [r3, #0] 802b080: 6822 ldr r2, [r4, #0] 802b082: 6ad2 ldr r2, [r2, #44] ; 0x2c 802b084: 2001 movs r0, #1 802b086: fa00 f202 lsl.w r2, r0, r2 802b08a: ea21 0202 bic.w r2, r1, r2 802b08e: 601a str r2, [r3, #0] mtCOVERAGE_TEST_MARKER(); } #if ( INCLUDE_vTaskSuspend == 1 ) { if( xTicksToWait == portMAX_DELAY ) 802b090: 1c69 adds r1, r5, #1 802b092: d107 bne.n 802b0a4 { /* 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 ) ); 802b094: 4b07 ldr r3, [pc, #28] ; (802b0b4 ) 802b096: 4809 ldr r0, [pc, #36] ; (802b0bc ) 802b098: 6819 ldr r1, [r3, #0] 802b09a: 3104 adds r1, #4 will handle it. */ xTimeToWake = xTickCount + xTicksToWait; prvAddCurrentTaskToDelayedList( xTimeToWake ); } #endif /* INCLUDE_vTaskSuspend */ } 802b09c: 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 ) ); 802b0a0: f7ff b8db b.w 802a25a 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; 802b0a4: 4b06 ldr r3, [pc, #24] ; (802b0c0 ) 802b0a6: 6818 ldr r0, [r3, #0] prvAddCurrentTaskToDelayedList( xTimeToWake ); 802b0a8: 1828 adds r0, r5, r0 will handle it. */ xTimeToWake = xTickCount + xTicksToWait; prvAddCurrentTaskToDelayedList( xTimeToWake ); } #endif /* INCLUDE_vTaskSuspend */ } 802b0aa: 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 ); 802b0ae: f7ff bc65 b.w 802a97c 802b0b2: bf00 nop 802b0b4: 20000c78 .word 0x20000c78 802b0b8: 20000cb8 .word 0x20000cb8 802b0bc: 20000ca4 .word 0x20000ca4 802b0c0: 20000c94 .word 0x20000c94 0802b0c4 : /*-----------------------------------------------------------*/ #if configUSE_TIMERS == 1 void vTaskPlaceOnEventListRestricted( List_t * const pxEventList, const TickType_t xTicksToWait ) { 802b0c4: b538 push {r3, r4, r5, lr} 802b0c6: 460d mov r5, r1 TickType_t xTimeToWake; configASSERT( pxEventList ); 802b0c8: b910 cbnz r0, 802b0d0 802b0ca: f000 fb27 bl 802b71c 802b0ce: e7fe b.n 802b0ce /* 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 ) ); 802b0d0: 4c0d ldr r4, [pc, #52] ; (802b108 ) 802b0d2: 6821 ldr r1, [r4, #0] 802b0d4: 3118 adds r1, #24 802b0d6: f7ff f8c0 bl 802a25a /* 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 ) 802b0da: 6820 ldr r0, [r4, #0] 802b0dc: 3004 adds r0, #4 802b0de: f7ff f8e0 bl 802a2a2 802b0e2: b948 cbnz r0, 802b0f8 { /* 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 ); 802b0e4: 4b09 ldr r3, [pc, #36] ; (802b10c ) 802b0e6: 6819 ldr r1, [r3, #0] 802b0e8: 6822 ldr r2, [r4, #0] 802b0ea: 6ad2 ldr r2, [r2, #44] ; 0x2c 802b0ec: 2001 movs r0, #1 802b0ee: fa00 f202 lsl.w r2, r0, r2 802b0f2: ea21 0202 bic.w r2, r1, r2 802b0f6: 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; 802b0f8: 4b05 ldr r3, [pc, #20] ; (802b110 ) 802b0fa: 6818 ldr r0, [r3, #0] traceTASK_DELAY_UNTIL(); prvAddCurrentTaskToDelayedList( xTimeToWake ); 802b0fc: 1828 adds r0, r5, r0 } 802b0fe: 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 ); 802b102: f7ff bc3b b.w 802a97c 802b106: bf00 nop 802b108: 20000c78 .word 0x20000c78 802b10c: 20000cb8 .word 0x20000cb8 802b110: 20000c94 .word 0x20000c94 0802b114 : #endif /* configUSE_TIMERS */ /*-----------------------------------------------------------*/ BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList ) { 802b114: 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 ); 802b116: 68c3 ldr r3, [r0, #12] 802b118: 68dc ldr r4, [r3, #12] configASSERT( pxUnblockedTCB ); 802b11a: b914 cbnz r4, 802b122 802b11c: f000 fafe bl 802b71c 802b120: e7fe b.n 802b120 ( void ) uxListRemove( &( pxUnblockedTCB->xEventListItem ) ); 802b122: f104 0518 add.w r5, r4, #24 802b126: 4628 mov r0, r5 802b128: f7ff f8bb bl 802a2a2 if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 802b12c: 4b11 ldr r3, [pc, #68] ; (802b174 ) 802b12e: 681b ldr r3, [r3, #0] 802b130: b983 cbnz r3, 802b154 { ( void ) uxListRemove( &( pxUnblockedTCB->xGenericListItem ) ); 802b132: 1d25 adds r5, r4, #4 802b134: 4628 mov r0, r5 802b136: f7ff f8b4 bl 802a2a2 prvAddTaskToReadyList( pxUnblockedTCB ); 802b13a: 4a0f ldr r2, [pc, #60] ; (802b178 ) 802b13c: 6ae3 ldr r3, [r4, #44] ; 0x2c 802b13e: 6810 ldr r0, [r2, #0] 802b140: 2101 movs r1, #1 802b142: fa01 f103 lsl.w r1, r1, r3 802b146: 4301 orrs r1, r0 802b148: 6011 str r1, [r2, #0] 802b14a: 4a0c ldr r2, [pc, #48] ; (802b17c ) 802b14c: 2014 movs r0, #20 802b14e: fb00 2003 mla r0, r0, r3, r2 802b152: e000 b.n 802b156 } else { /* The delayed and ready lists cannot be accessed, so hold this task pending until the scheduler is resumed. */ vListInsertEnd( &( xPendingReadyList ), &( pxUnblockedTCB->xEventListItem ) ); 802b154: 480a ldr r0, [pc, #40] ; (802b180 ) 802b156: 4629 mov r1, r5 802b158: f7ff f87f bl 802a25a } if( pxUnblockedTCB->uxPriority > pxCurrentTCB->uxPriority ) 802b15c: 4b09 ldr r3, [pc, #36] ; (802b184 ) 802b15e: 6ae2 ldr r2, [r4, #44] ; 0x2c 802b160: 681b ldr r3, [r3, #0] 802b162: 6adb ldr r3, [r3, #44] ; 0x2c 802b164: 429a cmp r2, r3 802b166: d903 bls.n 802b170 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; 802b168: 4b07 ldr r3, [pc, #28] ; (802b188 ) 802b16a: 2001 movs r0, #1 802b16c: 6018 str r0, [r3, #0] 802b16e: bd38 pop {r3, r4, r5, pc} } else { xReturn = pdFALSE; 802b170: 2000 movs r0, #0 prvResetNextTaskUnblockTime(); } #endif return xReturn; } 802b172: bd38 pop {r3, r4, r5, pc} 802b174: 20000c90 .word 0x20000c90 802b178: 20000cb8 .word 0x20000cb8 802b17c: 20000c00 .word 0x20000c00 802b180: 20000c7c .word 0x20000c7c 802b184: 20000c78 .word 0x20000c78 802b188: 20000cbc .word 0x20000cbc 0802b18c : return xReturn; } /*-----------------------------------------------------------*/ void vTaskSetTimeOutState( TimeOut_t * const pxTimeOut ) { 802b18c: b508 push {r3, lr} configASSERT( pxTimeOut ); 802b18e: b910 cbnz r0, 802b196 802b190: f000 fac4 bl 802b71c 802b194: e7fe b.n 802b194 pxTimeOut->xOverflowCount = xNumOfOverflows; 802b196: 4b03 ldr r3, [pc, #12] ; (802b1a4 ) 802b198: 681b ldr r3, [r3, #0] 802b19a: 6003 str r3, [r0, #0] pxTimeOut->xTimeOnEntering = xTickCount; 802b19c: 4b02 ldr r3, [pc, #8] ; (802b1a8 ) 802b19e: 681b ldr r3, [r3, #0] 802b1a0: 6043 str r3, [r0, #4] 802b1a2: bd08 pop {r3, pc} 802b1a4: 20000bc4 .word 0x20000bc4 802b1a8: 20000c94 .word 0x20000c94 0802b1ac : } /*-----------------------------------------------------------*/ BaseType_t xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait ) { 802b1ac: b538 push {r3, r4, r5, lr} 802b1ae: 460d mov r5, r1 BaseType_t xReturn; configASSERT( pxTimeOut ); 802b1b0: 4604 mov r4, r0 802b1b2: b910 cbnz r0, 802b1ba 802b1b4: f000 fab2 bl 802b71c 802b1b8: e7fe b.n 802b1b8 configASSERT( pxTicksToWait ); 802b1ba: b911 cbnz r1, 802b1c2 802b1bc: f000 faae bl 802b71c 802b1c0: e7fe b.n 802b1c0 taskENTER_CRITICAL(); 802b1c2: f000 fab3 bl 802b72c { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 802b1c6: 4b0e ldr r3, [pc, #56] ; (802b200 ) 802b1c8: 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 ) 802b1ca: 682b ldr r3, [r5, #0] 802b1cc: 1c59 adds r1, r3, #1 802b1ce: d010 beq.n 802b1f2 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. */ 802b1d0: 490c ldr r1, [pc, #48] ; (802b204 ) 802b1d2: 6808 ldr r0, [r1, #0] 802b1d4: 6821 ldr r1, [r4, #0] 802b1d6: 4288 cmp r0, r1 802b1d8: 6861 ldr r1, [r4, #4] 802b1da: d001 beq.n 802b1e0 802b1dc: 428a cmp r2, r1 802b1de: d20a bcs.n 802b1f6 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 ) 802b1e0: 1a50 subs r0, r2, r1 802b1e2: 4298 cmp r0, r3 802b1e4: d207 bcs.n 802b1f6 { /* Not a genuine timeout. Adjust parameters for time remaining. */ *pxTicksToWait -= ( xConstTickCount - pxTimeOut->xTimeOnEntering ); 802b1e6: 1a8a subs r2, r1, r2 802b1e8: 18d3 adds r3, r2, r3 802b1ea: 602b str r3, [r5, #0] vTaskSetTimeOutState( pxTimeOut ); 802b1ec: 4620 mov r0, r4 802b1ee: f7ff ffcd bl 802b18c /* 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; 802b1f2: 2400 movs r4, #0 802b1f4: e000 b.n 802b1f8 { /* 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; 802b1f6: 2401 movs r4, #1 else { xReturn = pdTRUE; } } taskEXIT_CRITICAL(); 802b1f8: f000 fac4 bl 802b784 return xReturn; } 802b1fc: 4620 mov r0, r4 802b1fe: bd38 pop {r3, r4, r5, pc} 802b200: 20000c94 .word 0x20000c94 802b204: 20000bc4 .word 0x20000bc4 0802b208 : /*-----------------------------------------------------------*/ void vTaskMissedYield( void ) { xYieldPending = pdTRUE; 802b208: 4b01 ldr r3, [pc, #4] ; (802b210 ) 802b20a: 2201 movs r2, #1 802b20c: 601a str r2, [r3, #0] 802b20e: 4770 bx lr 802b210: 20000cbc .word 0x20000cbc 0802b214 : BaseType_t xTaskGetSchedulerState( void ) { BaseType_t xReturn; if( xSchedulerRunning == pdFALSE ) 802b214: 4b05 ldr r3, [pc, #20] ; (802b22c ) 802b216: 681b ldr r3, [r3, #0] 802b218: b133 cbz r3, 802b228 { xReturn = taskSCHEDULER_NOT_STARTED; } else { if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 802b21a: 4b05 ldr r3, [pc, #20] ; (802b230 ) 802b21c: 6818 ldr r0, [r3, #0] { xReturn = taskSCHEDULER_RUNNING; 802b21e: 2800 cmp r0, #0 802b220: bf0c ite eq 802b222: 2002 moveq r0, #2 802b224: 2000 movne r0, #0 802b226: 4770 bx lr { BaseType_t xReturn; if( xSchedulerRunning == pdFALSE ) { xReturn = taskSCHEDULER_NOT_STARTED; 802b228: 2001 movs r0, #1 xReturn = taskSCHEDULER_SUSPENDED; } } return xReturn; } 802b22a: 4770 bx lr 802b22c: 20000bcc .word 0x20000bcc 802b230: 20000c90 .word 0x20000c90 0802b234 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) void vTaskPriorityInherit( TaskHandle_t const pxMutexHolder ) { 802b234: 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 ) 802b236: 4604 mov r4, r0 802b238: 2800 cmp r0, #0 802b23a: d040 beq.n 802b2be { if( pxTCB->uxPriority < pxCurrentTCB->uxPriority ) 802b23c: 4a20 ldr r2, [pc, #128] ; (802b2c0 ) 802b23e: 6ac3 ldr r3, [r0, #44] ; 0x2c 802b240: 6811 ldr r1, [r2, #0] 802b242: 6ac9 ldr r1, [r1, #44] ; 0x2c 802b244: 428b cmp r3, r1 802b246: d23a bcs.n 802b2be { /* 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 ) 802b248: 6981 ldr r1, [r0, #24] 802b24a: 2900 cmp r1, #0 802b24c: db04 blt.n 802b258 { 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. */ 802b24e: 6812 ldr r2, [r2, #0] 802b250: 6ad2 ldr r2, [r2, #44] ; 0x2c 802b252: f1c2 0205 rsb r2, r2, #5 802b256: 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 ) 802b258: 4e1a ldr r6, [pc, #104] ; (802b2c4 ) 802b25a: 6962 ldr r2, [r4, #20] 802b25c: 2714 movs r7, #20 802b25e: fb07 6303 mla r3, r7, r3, r6 802b262: 429a cmp r2, r3 802b264: d127 bne.n 802b2b6 802b266: e01f b.n 802b2a8 { if( uxListRemove( &( pxTCB->xGenericListItem ) ) == ( UBaseType_t ) 0 ) { taskRESET_READY_PRIORITY( pxTCB->uxPriority ); 802b268: 6ae2 ldr r2, [r4, #44] ; 0x2c 802b26a: 4357 muls r7, r2 802b26c: 59f3 ldr r3, [r6, r7] 802b26e: b93b cbnz r3, 802b280 802b270: 4b15 ldr r3, [pc, #84] ; (802b2c8 ) 802b272: 2001 movs r0, #1 802b274: 6819 ldr r1, [r3, #0] 802b276: fa00 f202 lsl.w r2, r0, r2 802b27a: ea21 0202 bic.w r2, r1, r2 802b27e: 601a str r2, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802b280: 4b0f ldr r3, [pc, #60] ; (802b2c0 ) prvAddTaskToReadyList( pxTCB ); 802b282: 4a11 ldr r2, [pc, #68] ; (802b2c8 ) { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802b284: 681b ldr r3, [r3, #0] prvAddTaskToReadyList( pxTCB ); 802b286: 6810 ldr r0, [r2, #0] { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802b288: 6adb ldr r3, [r3, #44] ; 0x2c prvAddTaskToReadyList( pxTCB ); 802b28a: 2101 movs r1, #1 802b28c: fa01 f103 lsl.w r1, r1, r3 802b290: 4301 orrs r1, r0 802b292: 6011 str r1, [r2, #0] 802b294: 4a0b ldr r2, [pc, #44] ; (802b2c4 ) { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802b296: 62e3 str r3, [r4, #44] ; 0x2c prvAddTaskToReadyList( pxTCB ); 802b298: 2014 movs r0, #20 802b29a: fb00 2003 mla r0, r0, r3, r2 802b29e: 4629 mov r1, r5 } else { mtCOVERAGE_TEST_MARKER(); } } 802b2a0: 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 ); 802b2a4: f7fe bfd9 b.w 802a25a /* 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 ) 802b2a8: 1d25 adds r5, r4, #4 802b2aa: 4628 mov r0, r5 802b2ac: f7fe fff9 bl 802a2a2 802b2b0: 2800 cmp r0, #0 802b2b2: d0d9 beq.n 802b268 802b2b4: e7e4 b.n 802b280 prvAddTaskToReadyList( pxTCB ); } else { /* Just inherit the priority. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802b2b6: 4b02 ldr r3, [pc, #8] ; (802b2c0 ) 802b2b8: 681b ldr r3, [r3, #0] 802b2ba: 6adb ldr r3, [r3, #44] ; 0x2c 802b2bc: 62e3 str r3, [r4, #44] ; 0x2c 802b2be: bdf8 pop {r3, r4, r5, r6, r7, pc} 802b2c0: 20000c78 .word 0x20000c78 802b2c4: 20000c00 .word 0x20000c00 802b2c8: 20000cb8 .word 0x20000cb8 0802b2cc : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) { 802b2cc: b538 push {r3, r4, r5, lr} TCB_t * const pxTCB = ( TCB_t * ) pxMutexHolder; BaseType_t xReturn = pdFALSE; if( pxMutexHolder != NULL ) 802b2ce: 4604 mov r4, r0 802b2d0: b908 cbnz r0, 802b2d6 #if ( configUSE_MUTEXES == 1 ) BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) { TCB_t * const pxTCB = ( TCB_t * ) pxMutexHolder; BaseType_t xReturn = pdFALSE; 802b2d2: 2000 movs r0, #0 802b2d4: bd38 pop {r3, r4, r5, pc} if( pxMutexHolder != NULL ) { configASSERT( pxTCB->uxMutexesHeld ); 802b2d6: 6d03 ldr r3, [r0, #80] ; 0x50 802b2d8: b913 cbnz r3, 802b2e0 802b2da: f000 fa1f bl 802b71c 802b2de: e7fe b.n 802b2de ( pxTCB->uxMutexesHeld )--; if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 802b2e0: 6ac1 ldr r1, [r0, #44] ; 0x2c 802b2e2: 6cc2 ldr r2, [r0, #76] ; 0x4c BaseType_t xReturn = pdFALSE; if( pxMutexHolder != NULL ) { configASSERT( pxTCB->uxMutexesHeld ); ( pxTCB->uxMutexesHeld )--; 802b2e4: 3b01 subs r3, #1 if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 802b2e6: 4291 cmp r1, r2 BaseType_t xReturn = pdFALSE; if( pxMutexHolder != NULL ) { configASSERT( pxTCB->uxMutexesHeld ); ( pxTCB->uxMutexesHeld )--; 802b2e8: 6503 str r3, [r0, #80] ; 0x50 if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 802b2ea: d0f2 beq.n 802b2d2 { /* Only disinherit if no other mutexes are held. */ if( pxTCB->uxMutexesHeld == ( UBaseType_t ) 0 ) 802b2ec: 2b00 cmp r3, #0 802b2ee: d1f0 bne.n 802b2d2 /* 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 ) 802b2f0: 1d05 adds r5, r0, #4 802b2f2: 4628 mov r0, r5 802b2f4: f7fe ffd5 bl 802a2a2 802b2f8: b968 cbnz r0, 802b316 { taskRESET_READY_PRIORITY( pxTCB->uxPriority ); 802b2fa: 6ae2 ldr r2, [r4, #44] ; 0x2c 802b2fc: 4910 ldr r1, [pc, #64] ; (802b340 ) 802b2fe: 2314 movs r3, #20 802b300: 4353 muls r3, r2 802b302: 58cb ldr r3, [r1, r3] 802b304: b93b cbnz r3, 802b316 802b306: 4b0f ldr r3, [pc, #60] ; (802b344 ) 802b308: 2001 movs r0, #1 802b30a: 6819 ldr r1, [r3, #0] 802b30c: fa00 f202 lsl.w r2, r0, r2 802b310: ea21 0202 bic.w r2, r1, r2 802b314: 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; 802b316: 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. */ 802b318: f1c3 0205 rsb r2, r3, #5 802b31c: 61a2 str r2, [r4, #24] prvAddTaskToReadyList( pxTCB ); 802b31e: 4a09 ldr r2, [pc, #36] ; (802b344 ) } /* Disinherit the priority before adding the task into the new ready list. */ traceTASK_PRIORITY_DISINHERIT( pxTCB, pxTCB->uxBasePriority ); pxTCB->uxPriority = pxTCB->uxBasePriority; 802b320: 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 ); 802b322: 6811 ldr r1, [r2, #0] 802b324: 2401 movs r4, #1 802b326: fa04 f003 lsl.w r0, r4, r3 802b32a: 4301 orrs r1, r0 802b32c: 6011 str r1, [r2, #0] 802b32e: 4a04 ldr r2, [pc, #16] ; (802b340 ) 802b330: 2014 movs r0, #20 802b332: fb00 2003 mla r0, r0, r3, r2 802b336: 4629 mov r1, r5 802b338: f7fe ff8f bl 802a25a 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; 802b33c: 4620 mov r0, r4 { mtCOVERAGE_TEST_MARKER(); } return xReturn; } 802b33e: bd38 pop {r3, r4, r5, pc} 802b340: 20000c00 .word 0x20000c00 802b344: 20000cb8 .word 0x20000cb8 0802b348 : void *pvTaskIncrementMutexHeldCount( void ) { /* If xSemaphoreCreateMutex() is called before any tasks have been created then pxCurrentTCB will be NULL. */ if( pxCurrentTCB != NULL ) 802b348: 4b04 ldr r3, [pc, #16] ; (802b35c ) 802b34a: 681a ldr r2, [r3, #0] 802b34c: b11a cbz r2, 802b356 { ( pxCurrentTCB->uxMutexesHeld )++; 802b34e: 681a ldr r2, [r3, #0] 802b350: 6d11 ldr r1, [r2, #80] ; 0x50 802b352: 3101 adds r1, #1 802b354: 6511 str r1, [r2, #80] ; 0x50 } return pxCurrentTCB; 802b356: 6818 ldr r0, [r3, #0] } 802b358: 4770 bx lr 802b35a: bf00 nop 802b35c: 20000c78 .word 0x20000c78 0802b360 : pxOverflowTimerList = pxTemp; } /*-----------------------------------------------------------*/ static void prvCheckForValidListAndQueue( void ) { 802b360: 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 ) 802b362: 4c0f ldr r4, [pc, #60] ; (802b3a0 ) 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(); 802b364: f000 f9e2 bl 802b72c { if( xTimerQueue == NULL ) 802b368: 6825 ldr r5, [r4, #0] 802b36a: b9ad cbnz r5, 802b398 { vListInitialise( &xActiveTimerList1 ); 802b36c: 4f0d ldr r7, [pc, #52] ; (802b3a4 ) vListInitialise( &xActiveTimerList2 ); 802b36e: 4e0e ldr r6, [pc, #56] ; (802b3a8 ) initialised. */ taskENTER_CRITICAL(); { if( xTimerQueue == NULL ) { vListInitialise( &xActiveTimerList1 ); 802b370: 4638 mov r0, r7 802b372: f7fe ff64 bl 802a23e vListInitialise( &xActiveTimerList2 ); 802b376: 4630 mov r0, r6 802b378: f7fe ff61 bl 802a23e pxCurrentTimerList = &xActiveTimerList1; 802b37c: 4b0b ldr r3, [pc, #44] ; (802b3ac ) 802b37e: 601f str r7, [r3, #0] pxOverflowTimerList = &xActiveTimerList2; 802b380: 4b0b ldr r3, [pc, #44] ; (802b3b0 ) xTimerQueue = xQueueCreate( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, sizeof( DaemonTaskMessage_t ) ); 802b382: 200a movs r0, #10 802b384: 210c movs r1, #12 802b386: 462a mov r2, r5 if( xTimerQueue == NULL ) { vListInitialise( &xActiveTimerList1 ); vListInitialise( &xActiveTimerList2 ); pxCurrentTimerList = &xActiveTimerList1; pxOverflowTimerList = &xActiveTimerList2; 802b388: 601e str r6, [r3, #0] xTimerQueue = xQueueCreate( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, sizeof( DaemonTaskMessage_t ) ); 802b38a: f7ff f849 bl 802a420 802b38e: 6020 str r0, [r4, #0] configASSERT( xTimerQueue ); 802b390: b910 cbnz r0, 802b398 802b392: f000 f9c3 bl 802b71c 802b396: e7fe b.n 802b396 { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); } 802b398: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr} else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 802b39c: f000 b9f2 b.w 802b784 802b3a0: 20000cec .word 0x20000cec 802b3a4: 20000cc4 .word 0x20000cc4 802b3a8: 20000cd8 .word 0x20000cd8 802b3ac: 20000cc0 .word 0x20000cc0 802b3b0: 20000cf4 .word 0x20000cf4 0802b3b4 : return xTimeNow; } /*-----------------------------------------------------------*/ static BaseType_t prvInsertTimerInActiveList( Timer_t * const pxTimer, const TickType_t xNextExpiryTime, const TickType_t xTimeNow, const TickType_t xCommandTime ) { 802b3b4: b510 push {r4, lr} 802b3b6: 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 ) 802b3b8: 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 ); 802b3ba: 6041 str r1, [r0, #4] listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); 802b3bc: 6120 str r0, [r4, #16] if( xNextExpiryTime <= xTimeNow ) 802b3be: d805 bhi.n 802b3cc { /* 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 ) 802b3c0: 6981 ldr r1, [r0, #24] 802b3c2: 1ad2 subs r2, r2, r3 802b3c4: 428a cmp r2, r1 802b3c6: d20c bcs.n 802b3e2 processed actually exceeds the timers period. */ xProcessTimerNow = pdTRUE; } else { vListInsert( pxOverflowTimerList, &( pxTimer->xTimerListItem ) ); 802b3c8: 4b07 ldr r3, [pc, #28] ; (802b3e8 ) 802b3ca: e004 b.n 802b3d6 } } else { if( ( xTimeNow < xCommandTime ) && ( xNextExpiryTime >= xCommandTime ) ) 802b3cc: 429a cmp r2, r3 802b3ce: d201 bcs.n 802b3d4 802b3d0: 4299 cmp r1, r3 802b3d2: d206 bcs.n 802b3e2 its expiry time and should be processed immediately. */ xProcessTimerNow = pdTRUE; } else { vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); 802b3d4: 4b05 ldr r3, [pc, #20] ; (802b3ec ) 802b3d6: 6818 ldr r0, [r3, #0] 802b3d8: 1d21 adds r1, r4, #4 802b3da: f7fe ff4a bl 802a272 } /*-----------------------------------------------------------*/ static BaseType_t prvInsertTimerInActiveList( Timer_t * const pxTimer, const TickType_t xNextExpiryTime, const TickType_t xTimeNow, const TickType_t xCommandTime ) { BaseType_t xProcessTimerNow = pdFALSE; 802b3de: 2000 movs r0, #0 802b3e0: 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; 802b3e2: 2001 movs r0, #1 vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); } } return xProcessTimerNow; } 802b3e4: bd10 pop {r4, pc} 802b3e6: bf00 nop 802b3e8: 20000cf4 .word 0x20000cf4 802b3ec: 20000cc0 .word 0x20000cc0 0802b3f0 : static void prvProcessTimerOrBlockTask( const TickType_t xNextExpireTime, const BaseType_t xListWasEmpty ) PRIVILEGED_FUNCTION; /*-----------------------------------------------------------*/ BaseType_t xTimerCreateTimerTask( void ) { 802b3f0: 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(); 802b3f2: f7ff ffb5 bl 802b360 if( xTimerQueue != NULL ) 802b3f6: 4b0b ldr r3, [pc, #44] ; (802b424 ) 802b3f8: 681b ldr r3, [r3, #0] 802b3fa: b913 cbnz r3, 802b402 else { mtCOVERAGE_TEST_MARKER(); } configASSERT( xReturn ); 802b3fc: f000 f98e bl 802b71c 802b400: e00d b.n 802b41e 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); 802b402: 2302 movs r3, #2 802b404: 9300 str r3, [sp, #0] 802b406: 2300 movs r3, #0 802b408: 9301 str r3, [sp, #4] 802b40a: 9302 str r3, [sp, #8] 802b40c: 9303 str r3, [sp, #12] 802b40e: 4806 ldr r0, [pc, #24] ; (802b428 ) 802b410: 4906 ldr r1, [pc, #24] ; (802b42c ) 802b412: f44f 7280 mov.w r2, #256 ; 0x100 802b416: f7ff fad9 bl 802a9cc else { mtCOVERAGE_TEST_MARKER(); } configASSERT( xReturn ); 802b41a: b908 cbnz r0, 802b420 802b41c: e7ee b.n 802b3fc 802b41e: e7fe b.n 802b41e return xReturn; } 802b420: b005 add sp, #20 802b422: bd00 pop {pc} 802b424: 20000cec .word 0x20000cec 802b428: 0802b529 .word 0x0802b529 802b42c: 08039c84 .word 0x08039c84 0802b430 : /*-----------------------------------------------------------*/ 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. */ { 802b430: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802b434: 4680 mov r8, r0 802b436: 4617 mov r7, r2 802b438: 461e mov r6, r3 Timer_t *pxNewTimer; /* Allocate the timer structure. */ if( xTimerPeriodInTicks == ( TickType_t ) 0U ) 802b43a: 460d mov r5, r1 802b43c: b191 cbz r1, 802b464 { pxNewTimer = NULL; } else { pxNewTimer = ( Timer_t * ) pvPortMalloc( sizeof( Timer_t ) ); 802b43e: 202c movs r0, #44 ; 0x2c 802b440: f000 fa82 bl 802b948 if( pxNewTimer != NULL ) 802b444: 4604 mov r4, r0 802b446: b180 cbz r0, 802b46a { /* Ensure the infrastructure used by the timer service task has been created/initialised. */ prvCheckForValidListAndQueue(); 802b448: f7ff ff8a bl 802b360 /* Initialise the timer structure members using the function parameters. */ pxNewTimer->pcTimerName = pcTimerName; pxNewTimer->xTimerPeriodInTicks = xTimerPeriodInTicks; pxNewTimer->uxAutoReload = uxAutoReload; pxNewTimer->pvTimerID = pvTimerID; pxNewTimer->pxCallbackFunction = pxCallbackFunction; 802b44c: 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; 802b44e: f8c4 8000 str.w r8, [r4] pxNewTimer->xTimerPeriodInTicks = xTimerPeriodInTicks; 802b452: 61a5 str r5, [r4, #24] pxNewTimer->uxAutoReload = uxAutoReload; 802b454: 61e7 str r7, [r4, #28] pxNewTimer->pvTimerID = pvTimerID; 802b456: 6226 str r6, [r4, #32] pxNewTimer->pxCallbackFunction = pxCallbackFunction; 802b458: 6263 str r3, [r4, #36] ; 0x24 vListInitialiseItem( &( pxNewTimer->xTimerListItem ) ); 802b45a: 1d20 adds r0, r4, #4 802b45c: f7fe fefa bl 802a254 802b460: e003 b.n 802b46a 802b462: e7fe b.n 802b462 traceTIMER_CREATE_FAILED(); } } /* 0 is not a valid value for xTimerPeriodInTicks. */ configASSERT( ( xTimerPeriodInTicks > 0 ) ); 802b464: f000 f95a bl 802b71c 802b468: e7fb b.n 802b462 return ( TimerHandle_t ) pxNewTimer; } 802b46a: 4620 mov r0, r4 802b46c: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 0802b470 : /*-----------------------------------------------------------*/ BaseType_t xTimerGenericCommand( TimerHandle_t xTimer, const BaseType_t xCommandID, const TickType_t xOptionalValue, BaseType_t * const pxHigherPriorityTaskWoken, const TickType_t xTicksToWait ) { 802b470: 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 ) 802b472: 4c0f ldr r4, [pc, #60] ; (802b4b0 ) 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 ) { 802b474: 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 ) 802b476: 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 ) { 802b478: 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 ) 802b47a: b1b8 cbz r0, 802b4ac /* 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 ) 802b47c: 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; 802b47e: 9101 str r1, [sp, #4] xMessage.u.xTimerParameters.xMessageValue = xOptionalValue; 802b480: 9202 str r2, [sp, #8] xMessage.u.xTimerParameters.pxTimer = ( Timer_t * ) xTimer; 802b482: 9503 str r5, [sp, #12] if( xCommandID < tmrFIRST_FROM_ISR_COMMAND ) 802b484: dc0d bgt.n 802b4a2 { if( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING ) 802b486: f7ff fec5 bl 802b214 802b48a: 2802 cmp r0, #2 { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, xTicksToWait ); 802b48c: a901 add r1, sp, #4 802b48e: 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 ) 802b490: d102 bne.n 802b498 { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, xTicksToWait ); 802b492: 9a08 ldr r2, [sp, #32] 802b494: 2300 movs r3, #0 802b496: e001 b.n 802b49c } else { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, tmrNO_DELAY ); 802b498: 2200 movs r2, #0 802b49a: 4613 mov r3, r2 802b49c: f7fe fffd bl 802a49a 802b4a0: e004 b.n 802b4ac } } else { xReturn = xQueueSendToBackFromISR( xTimerQueue, &xMessage, pxHigherPriorityTaskWoken ); 802b4a2: 461a mov r2, r3 802b4a4: a901 add r1, sp, #4 802b4a6: 2300 movs r3, #0 802b4a8: f7ff f8bb bl 802a622 { mtCOVERAGE_TEST_MARKER(); } return xReturn; } 802b4ac: b005 add sp, #20 802b4ae: bd30 pop {r4, r5, pc} 802b4b0: 20000cec .word 0x20000cec 0802b4b4 : } } /*-----------------------------------------------------------*/ static void prvSwitchTimerLists( void ) { 802b4b4: 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 ) 802b4b8: 4e19 ldr r6, [pc, #100] ; (802b520 ) listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); } else { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY ); 802b4ba: f04f 0800 mov.w r8, #0 802b4be: e023 b.n 802b508 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 ); 802b4c0: 68db ldr r3, [r3, #12] /* Remove the timer from the list. */ pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); 802b4c2: 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 ); 802b4c4: 681d ldr r5, [r3, #0] /* Remove the timer from the list. */ pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); 802b4c6: 1d27 adds r7, r4, #4 802b4c8: 4638 mov r0, r7 802b4ca: f7fe feea bl 802a2a2 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 ); 802b4ce: 6a63 ldr r3, [r4, #36] ; 0x24 802b4d0: 4620 mov r0, r4 802b4d2: 4798 blx r3 if( pxTimer->uxAutoReload == ( UBaseType_t ) pdTRUE ) 802b4d4: 69e3 ldr r3, [r4, #28] 802b4d6: 2b01 cmp r3, #1 802b4d8: d116 bne.n 802b508 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 ); 802b4da: 69a3 ldr r3, [r4, #24] 802b4dc: 18eb adds r3, r5, r3 if( xReloadTime > xNextExpireTime ) 802b4de: 42ab cmp r3, r5 802b4e0: d906 bls.n 802b4f0 { listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xReloadTime ); 802b4e2: 6063 str r3, [r4, #4] listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); 802b4e4: 6124 str r4, [r4, #16] vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); 802b4e6: 6830 ldr r0, [r6, #0] 802b4e8: 4639 mov r1, r7 802b4ea: f7fe fec2 bl 802a272 802b4ee: e00b b.n 802b508 } else { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY ); 802b4f0: 2100 movs r1, #0 802b4f2: f8cd 8000 str.w r8, [sp] 802b4f6: 4620 mov r0, r4 802b4f8: 462a mov r2, r5 802b4fa: 460b mov r3, r1 802b4fc: f7ff ffb8 bl 802b470 configASSERT( xResult ); 802b500: b910 cbnz r0, 802b508 802b502: f000 f90b bl 802b71c 802b506: e7fe b.n 802b506 /* 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 ) 802b508: 6833 ldr r3, [r6, #0] 802b50a: 681a ldr r2, [r3, #0] 802b50c: 2a00 cmp r2, #0 802b50e: d1d7 bne.n 802b4c0 mtCOVERAGE_TEST_MARKER(); } } pxTemp = pxCurrentTimerList; pxCurrentTimerList = pxOverflowTimerList; 802b510: 4a04 ldr r2, [pc, #16] ; (802b524 ) 802b512: 4803 ldr r0, [pc, #12] ; (802b520 ) 802b514: 6811 ldr r1, [r2, #0] pxOverflowTimerList = pxTemp; 802b516: 6013 str r3, [r2, #0] mtCOVERAGE_TEST_MARKER(); } } pxTemp = pxCurrentTimerList; pxCurrentTimerList = pxOverflowTimerList; 802b518: 6001 str r1, [r0, #0] pxOverflowTimerList = pxTemp; } 802b51a: e8bd 81fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, pc} 802b51e: bf00 nop 802b520: 20000cc0 .word 0x20000cc0 802b524: 20000cf4 .word 0x20000cf4 0802b528 : pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); } /*-----------------------------------------------------------*/ static void prvTimerTask( void *pvParameters ) { 802b528: 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 ) 802b52c: f8df 816c ldr.w r8, [pc, #364] ; 802b69c pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); } /*-----------------------------------------------------------*/ static void prvTimerTask( void *pvParameters ) { 802b530: b087 sub sp, #28 802b532: 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 ); 802b534: 4b57 ldr r3, [pc, #348] ; (802b694 ) 802b536: 681b ldr r3, [r3, #0] 802b538: 681f ldr r7, [r3, #0] 802b53a: f1d7 0701 rsbs r7, r7, #1 802b53e: bf38 it cc 802b540: 2700 movcc r7, #0 if( *pxListWasEmpty == pdFALSE ) 802b542: b917 cbnz r7, 802b54a { xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList ); 802b544: 68db ldr r3, [r3, #12] 802b546: 681d ldr r5, [r3, #0] 802b548: e000 b.n 802b54c } else { /* Ensure the task unblocks when the tick count rolls over. */ xNextExpireTime = ( TickType_t ) 0U; 802b54a: 2500 movs r5, #0 static void prvProcessTimerOrBlockTask( const TickType_t xNextExpireTime, const BaseType_t xListWasEmpty ) { TickType_t xTimeNow; BaseType_t xTimerListsWereSwitched; vTaskSuspendAll(); 802b54c: f7ff fb9e bl 802ac8c 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(); 802b550: f7ff fba4 bl 802ac9c if( xTimeNow < xLastTime ) 802b554: f8d8 3000 ldr.w r3, [r8] 802b558: 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(); 802b55a: 4606 mov r6, r0 if( xTimeNow < xLastTime ) 802b55c: d203 bcs.n 802b566 { prvSwitchTimerLists(); 802b55e: f7ff ffa9 bl 802b4b4 *pxTimerListsWereSwitched = pdTRUE; 802b562: 2301 movs r3, #1 802b564: e000 b.n 802b568 } else { *pxTimerListsWereSwitched = pdFALSE; 802b566: 2300 movs r3, #0 } xLastTime = xTimeNow; 802b568: 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 ) 802b56c: 2b00 cmp r3, #0 802b56e: d132 bne.n 802b5d6 { /* The tick count has not overflowed, has the timer expired? */ if( ( xListWasEmpty == pdFALSE ) && ( xNextExpireTime <= xTimeNow ) ) 802b570: bb2f cbnz r7, 802b5be 802b572: 42b5 cmp r5, r6 802b574: d823 bhi.n 802b5be { ( void ) xTaskResumeAll(); 802b576: f7ff fc25 bl 802adc4 /*-----------------------------------------------------------*/ 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 ); 802b57a: 4b46 ldr r3, [pc, #280] ; (802b694 ) 802b57c: 681b ldr r3, [r3, #0] 802b57e: 68db ldr r3, [r3, #12] 802b580: 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 ) ); 802b582: 1d20 adds r0, r4, #4 802b584: f7fe fe8d bl 802a2a2 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 ) 802b588: 69e3 ldr r3, [r4, #28] 802b58a: 2b01 cmp r3, #1 802b58c: d113 bne.n 802b5b6 { /* 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 ) 802b58e: 69a1 ldr r1, [r4, #24] 802b590: 4620 mov r0, r4 802b592: 1869 adds r1, r5, r1 802b594: 4632 mov r2, r6 802b596: 462b mov r3, r5 802b598: f7ff ff0c bl 802b3b4 802b59c: 2801 cmp r0, #1 802b59e: d10a bne.n 802b5b6 { /* 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 ); 802b5a0: 9700 str r7, [sp, #0] 802b5a2: 4620 mov r0, r4 802b5a4: 4639 mov r1, r7 802b5a6: 462a mov r2, r5 802b5a8: 463b mov r3, r7 802b5aa: f7ff ff61 bl 802b470 configASSERT( xResult ); 802b5ae: b910 cbnz r0, 802b5b6 802b5b0: f000 f8b4 bl 802b71c 802b5b4: e7fe b.n 802b5b4 { mtCOVERAGE_TEST_MARKER(); } /* Call the timer callback. */ pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); 802b5b6: 6a63 ldr r3, [r4, #36] ; 0x24 802b5b8: 4620 mov r0, r4 802b5ba: 4798 blx r3 802b5bc: e05f b.n 802b67e 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 ) ); 802b5be: 4b36 ldr r3, [pc, #216] ; (802b698 ) 802b5c0: 1ba9 subs r1, r5, r6 802b5c2: 6818 ldr r0, [r3, #0] 802b5c4: f7ff f9aa bl 802a91c if( xTaskResumeAll() == pdFALSE ) 802b5c8: f7ff fbfc bl 802adc4 802b5cc: 2800 cmp r0, #0 802b5ce: d156 bne.n 802b67e { /* 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(); 802b5d0: f000 f898 bl 802b704 802b5d4: e053 b.n 802b67e } } } else { ( void ) xTaskResumeAll(); 802b5d6: f7ff fbf5 bl 802adc4 802b5da: e050 b.n 802b67e } #endif /* INCLUDE_xTimerPendFunctionCall */ /* Commands that are positive are timer commands rather than pended function calls. */ if( xMessage.xMessageID >= ( BaseType_t ) 0 ) 802b5dc: 9b03 ldr r3, [sp, #12] 802b5de: 2b00 cmp r3, #0 802b5e0: db4e blt.n 802b680 { /* The messages uses the xTimerParameters member to work on a software timer. */ pxTimer = xMessage.u.xTimerParameters.pxTimer; 802b5e2: 9c05 ldr r4, [sp, #20] if( listIS_CONTAINED_WITHIN( NULL, &( pxTimer->xTimerListItem ) ) == pdFALSE ) 802b5e4: 6963 ldr r3, [r4, #20] 802b5e6: b113 cbz r3, 802b5ee { /* The timer is in a list, remove it. */ ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); 802b5e8: 1d20 adds r0, r4, #4 802b5ea: f7fe fe5a bl 802a2a2 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(); 802b5ee: f7ff fb55 bl 802ac9c if( xTimeNow < xLastTime ) 802b5f2: f8d8 3000 ldr.w r3, [r8] 802b5f6: 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(); 802b5f8: 4605 mov r5, r0 if( xTimeNow < xLastTime ) 802b5fa: d201 bcs.n 802b600 { prvSwitchTimerLists(); 802b5fc: f7ff ff5a bl 802b4b4 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 ) 802b600: 9b03 ldr r3, [sp, #12] else { *pxTimerListsWereSwitched = pdFALSE; } xLastTime = xTimeNow; 802b602: 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 ) 802b606: 2b09 cmp r3, #9 802b608: d83a bhi.n 802b680 802b60a: f04f 6204 mov.w r2, #138412032 ; 0x8400000 802b60e: 409a lsls r2, r3 802b610: d424 bmi.n 802b65c 802b612: f04f 4263 mov.w r2, #3808428032 ; 0xe3000000 802b616: 409a lsls r2, r3 802b618: d404 bmi.n 802b624 802b61a: f04f 6280 mov.w r2, #67108864 ; 0x4000000 802b61e: 409a lsls r2, r3 802b620: d429 bmi.n 802b676 802b622: e02d b.n 802b680 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 ) 802b624: 9b04 ldr r3, [sp, #16] 802b626: 69a1 ldr r1, [r4, #24] 802b628: 4620 mov r0, r4 802b62a: 1859 adds r1, r3, r1 802b62c: 462a mov r2, r5 802b62e: f7ff fec1 bl 802b3b4 802b632: 2801 cmp r0, #1 802b634: d124 bne.n 802b680 { /* The timer expired before it was added to the active timer list. Process it now. */ pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); 802b636: 6a63 ldr r3, [r4, #36] ; 0x24 802b638: 4620 mov r0, r4 802b63a: 4798 blx r3 traceTIMER_EXPIRED( pxTimer ); if( pxTimer->uxAutoReload == ( UBaseType_t ) pdTRUE ) 802b63c: 69e3 ldr r3, [r4, #28] 802b63e: 2b01 cmp r3, #1 802b640: d11e bne.n 802b680 { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, NULL, tmrNO_DELAY ); 802b642: 69a2 ldr r2, [r4, #24] 802b644: 9b04 ldr r3, [sp, #16] 802b646: 2100 movs r1, #0 802b648: 18d2 adds r2, r2, r3 802b64a: 9100 str r1, [sp, #0] 802b64c: 4620 mov r0, r4 802b64e: 460b mov r3, r1 802b650: f7ff ff0e bl 802b470 configASSERT( xResult ); 802b654: b9a0 cbnz r0, 802b680 802b656: f000 f861 bl 802b71c 802b65a: e7fe b.n 802b65a There is nothing to do here. */ break; case tmrCOMMAND_CHANGE_PERIOD : case tmrCOMMAND_CHANGE_PERIOD_FROM_ISR : pxTimer->xTimerPeriodInTicks = xMessage.u.xTimerParameters.xMessageValue; 802b65c: 9904 ldr r1, [sp, #16] 802b65e: 61a1 str r1, [r4, #24] configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) ); 802b660: b911 cbnz r1, 802b668 802b662: f000 f85b bl 802b71c 802b666: e7fe b.n 802b666 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 ); 802b668: 4620 mov r0, r4 802b66a: 1869 adds r1, r5, r1 802b66c: 462a mov r2, r5 802b66e: 462b mov r3, r5 802b670: f7ff fea0 bl 802b3b4 802b674: e004 b.n 802b680 break; case tmrCOMMAND_DELETE : /* The timer has already been removed from the active list, just free up the memory. */ vPortFree( pxTimer ); 802b676: 4620 mov r0, r4 802b678: f000 f9ec bl 802ba54 802b67c: e000 b.n 802b680 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. */ 802b67e: 4e06 ldr r6, [pc, #24] ; (802b698 ) 802b680: 2200 movs r2, #0 802b682: 6830 ldr r0, [r6, #0] 802b684: a903 add r1, sp, #12 802b686: 4613 mov r3, r2 802b688: f7ff f847 bl 802a71a 802b68c: 2800 cmp r0, #0 802b68e: d1a5 bne.n 802b5dc 802b690: e750 b.n 802b534 802b692: bf00 nop 802b694: 20000cc0 .word 0x20000cc0 802b698: 20000cec .word 0x20000cec 802b69c: 20000cf0 .word 0x20000cf0 0802b6a0 : void *pvTimerGetTimerID( const TimerHandle_t xTimer ) { Timer_t * const pxTimer = ( Timer_t * ) xTimer; return pxTimer->pvTimerID; } 802b6a0: 6a00 ldr r0, [r0, #32] 802b6a2: 4770 bx lr 0802b6a4 : } /*-----------------------------------------------------------*/ static void prvPortStartFirstTask( void ) { __asm volatile( 802b6a4: 4806 ldr r0, [pc, #24] ; (802b6c0 ) 802b6a6: 6800 ldr r0, [r0, #0] 802b6a8: 6800 ldr r0, [r0, #0] 802b6aa: f380 8808 msr MSP, r0 802b6ae: b662 cpsie i 802b6b0: b661 cpsie f 802b6b2: f3bf 8f4f dsb sy 802b6b6: f3bf 8f6f isb sy 802b6ba: df00 svc 0 802b6bc: bf00 nop 802b6be: 0000 .short 0x0000 802b6c0: e000ed08 .word 0xe000ed08 0802b6c4 : 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 */ 802b6c4: f04f 7380 mov.w r3, #16777216 ; 0x1000000 pxTopOfStack--; *pxTopOfStack = ( StackType_t ) pxCode; /* PC */ 802b6c8: e900 000a stmdb r0, {r1, r3} pxTopOfStack--; *pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */ 802b6cc: 4b03 ldr r3, [pc, #12] ; (802b6dc ) pxTopOfStack -= 5; /* R12, R3, R2 and R1. */ *pxTopOfStack = ( StackType_t ) pvParameters; /* R0 */ 802b6ce: 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 */ 802b6d2: 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; } 802b6d6: 3840 subs r0, #64 ; 0x40 802b6d8: 4770 bx lr 802b6da: bf00 nop 802b6dc: 0802b761 .word 0x0802b761 0802b6e0 : } /*-----------------------------------------------------------*/ void vPortSVCHandler( void ) { __asm volatile ( 802b6e0: 4b07 ldr r3, [pc, #28] ; (802b700 ) 802b6e2: 6819 ldr r1, [r3, #0] 802b6e4: 6808 ldr r0, [r1, #0] 802b6e6: e8b0 0ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp} 802b6ea: f380 8809 msr PSP, r0 802b6ee: f3bf 8f6f isb sy 802b6f2: f04f 0000 mov.w r0, #0 802b6f6: f380 8811 msr BASEPRI, r0 802b6fa: f04e 0e0d orr.w lr, lr, #13 802b6fe: 4770 bx lr 0802b700 : 802b700: 20000c78 .word 0x20000c78 0802b704 : /*-----------------------------------------------------------*/ void vPortYield( void ) { /* Set a PendSV to request a context switch. */ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; 802b704: 4b04 ldr r3, [pc, #16] ; (802b718 ) 802b706: f04f 5280 mov.w r2, #268435456 ; 0x10000000 802b70a: 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" ); 802b70c: f3bf 8f4f dsb sy __asm volatile( "isb" ); 802b710: f3bf 8f6f isb sy 802b714: 4770 bx lr 802b716: bf00 nop 802b718: e000ed04 .word 0xe000ed04 0802b71c : } /*-----------------------------------------------------------*/ __attribute__(( naked )) uint32_t ulPortSetInterruptMask( void ) { __asm volatile \ 802b71c: f3ef 8011 mrs r0, BASEPRI 802b720: f04f 0150 mov.w r1, #80 ; 0x50 802b724: f381 8811 msr BASEPRI, r1 802b728: 4770 bx lr ); /* This return will not be reached but is necessary to prevent compiler warnings. */ return 0; } 802b72a: 2000 movs r0, #0 0802b72c : __asm volatile( "isb" ); } /*-----------------------------------------------------------*/ void vPortEnterCritical( void ) { 802b72c: b508 push {r3, lr} portDISABLE_INTERRUPTS(); 802b72e: f7ff fff5 bl 802b71c uxCriticalNesting++; 802b732: 4a09 ldr r2, [pc, #36] ; (802b758 ) 802b734: 6813 ldr r3, [r2, #0] 802b736: 3301 adds r3, #1 802b738: 6013 str r3, [r2, #0] __asm volatile( "dsb" ); 802b73a: f3bf 8f4f dsb sy __asm volatile( "isb" ); 802b73e: 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 ) 802b742: 2b01 cmp r3, #1 802b744: d107 bne.n 802b756 { configASSERT( ( portNVIC_INT_CTRL_REG & portVECTACTIVE_MASK ) == 0 ); 802b746: 4b05 ldr r3, [pc, #20] ; (802b75c ) 802b748: 681b ldr r3, [r3, #0] 802b74a: f013 0fff tst.w r3, #255 ; 0xff 802b74e: d002 beq.n 802b756 802b750: f7ff ffe4 bl 802b71c 802b754: e7fe b.n 802b754 802b756: bd08 pop {r3, pc} 802b758: 20000704 .word 0x20000704 802b75c: e000ed04 .word 0xe000ed04 0802b760 : return pxTopOfStack; } /*-----------------------------------------------------------*/ static void prvTaskExitError( void ) { 802b760: 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 ); 802b762: 4b05 ldr r3, [pc, #20] ; (802b778 ) 802b764: 681b ldr r3, [r3, #0] 802b766: 3301 adds r3, #1 802b768: d002 beq.n 802b770 802b76a: f7ff ffd7 bl 802b71c 802b76e: e7fe b.n 802b76e portDISABLE_INTERRUPTS(); 802b770: f7ff ffd4 bl 802b71c 802b774: e7fe b.n 802b774 802b776: bf00 nop 802b778: 20000704 .word 0x20000704 0802b77c : } /*-----------------------------------------------------------*/ __attribute__(( naked )) void vPortClearInterruptMask( uint32_t ulNewMaskValue ) { __asm volatile \ 802b77c: f380 8811 msr BASEPRI, r0 802b780: 4770 bx lr 802b782: 0000 movs r0, r0 0802b784 : } } /*-----------------------------------------------------------*/ void vPortExitCritical( void ) { 802b784: b508 push {r3, lr} configASSERT( uxCriticalNesting ); 802b786: 4b07 ldr r3, [pc, #28] ; (802b7a4 ) 802b788: 6818 ldr r0, [r3, #0] 802b78a: b910 cbnz r0, 802b792 802b78c: f7ff ffc6 bl 802b71c 802b790: e7fe b.n 802b790 uxCriticalNesting--; 802b792: 3801 subs r0, #1 802b794: 6018 str r0, [r3, #0] if( uxCriticalNesting == 0 ) 802b796: b918 cbnz r0, 802b7a0 { portENABLE_INTERRUPTS(); } } 802b798: e8bd 4008 ldmia.w sp!, {r3, lr} { configASSERT( uxCriticalNesting ); uxCriticalNesting--; if( uxCriticalNesting == 0 ) { portENABLE_INTERRUPTS(); 802b79c: f7ff bfee b.w 802b77c 802b7a0: bd08 pop {r3, pc} 802b7a2: bf00 nop 802b7a4: 20000704 .word 0x20000704 0802b7a8 : void xPortPendSVHandler( void ) { /* This is a naked function. */ __asm volatile 802b7a8: f3ef 8009 mrs r0, PSP 802b7ac: f3bf 8f6f isb sy 802b7b0: 4b0d ldr r3, [pc, #52] ; (802b7e8 ) 802b7b2: 681a ldr r2, [r3, #0] 802b7b4: e920 0ff0 stmdb r0!, {r4, r5, r6, r7, r8, r9, sl, fp} 802b7b8: 6010 str r0, [r2, #0] 802b7ba: e92d 4008 stmdb sp!, {r3, lr} 802b7be: f04f 0050 mov.w r0, #80 ; 0x50 802b7c2: f380 8811 msr BASEPRI, r0 802b7c6: f7ff fc19 bl 802affc 802b7ca: f04f 0000 mov.w r0, #0 802b7ce: f380 8811 msr BASEPRI, r0 802b7d2: e8bd 4008 ldmia.w sp!, {r3, lr} 802b7d6: 6819 ldr r1, [r3, #0] 802b7d8: 6808 ldr r0, [r1, #0] 802b7da: e8b0 0ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp} 802b7de: f380 8809 msr PSP, r0 802b7e2: f3bf 8f6f isb sy 802b7e6: 4770 bx lr 0802b7e8 : 802b7e8: 20000c78 .word 0x20000c78 0802b7ec : ); } /*-----------------------------------------------------------*/ void xPortSysTickHandler( void ) { 802b7ec: 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(); 802b7ee: f7ff ff95 bl 802b71c { /* Increment the RTOS tick. */ if( xTaskIncrementTick() != pdFALSE ) 802b7f2: f7ff fa59 bl 802aca8 802b7f6: b118 cbz r0, 802b800 { /* A context switch is required. Context switching is performed in the PendSV interrupt. Pend the PendSV interrupt. */ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; 802b7f8: 4b04 ldr r3, [pc, #16] ; (802b80c ) 802b7fa: f04f 5280 mov.w r2, #268435456 ; 0x10000000 802b7fe: 601a str r2, [r3, #0] } } portCLEAR_INTERRUPT_MASK_FROM_ISR( 0 ); 802b800: 2000 movs r0, #0 } 802b802: 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 ); 802b806: f7ff bfb9 b.w 802b77c 802b80a: bf00 nop 802b80c: e000ed04 .word 0xe000ed04 0802b810 : 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; 802b810: 4b06 ldr r3, [pc, #24] ; (802b82c ) 802b812: 681a ldr r2, [r3, #0] 802b814: f44f 737a mov.w r3, #1000 ; 0x3e8 802b818: fbb2 f2f3 udiv r2, r2, r3 802b81c: 4b04 ldr r3, [pc, #16] ; (802b830 ) 802b81e: 3a01 subs r2, #1 802b820: 601a str r2, [r3, #0] portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT | portNVIC_SYSTICK_ENABLE_BIT ); 802b822: 2207 movs r2, #7 802b824: f843 2c04 str.w r2, [r3, #-4] 802b828: 4770 bx lr 802b82a: bf00 nop 802b82c: 200005bc .word 0x200005bc 802b830: e000e014 .word 0xe000e014 0802b834 : /* * See header file for description. */ BaseType_t xPortStartScheduler( void ) { 802b834: 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; 802b836: 4b1d ldr r3, [pc, #116] ; (802b8ac ) 802b838: 781a ldrb r2, [r3, #0] 802b83a: 9201 str r2, [sp, #4] /* Determine the number of priority bits available. First write to all possible bits. */ *pucFirstUserPriorityRegister = portMAX_8_BIT_VALUE; 802b83c: 22ff movs r2, #255 ; 0xff 802b83e: 701a strb r2, [r3, #0] /* Read the value back to see how many bits stuck. */ ucMaxPriorityValue = *pucFirstUserPriorityRegister; 802b840: 781b ldrb r3, [r3, #0] 802b842: f88d 3003 strb.w r3, [sp, #3] /* Use the same mask on the maximum system call priority. */ ucMaxSysCallPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY & ucMaxPriorityValue; 802b846: f89d 2003 ldrb.w r2, [sp, #3] 802b84a: 4b19 ldr r3, [pc, #100] ; (802b8b0 ) 802b84c: f002 0250 and.w r2, r2, #80 ; 0x50 802b850: 701a strb r2, [r3, #0] /* Calculate the maximum acceptable priority group value for the number of bits read back. */ ulMaxPRIGROUPValue = portMAX_PRIGROUP_BITS; 802b852: 4a18 ldr r2, [pc, #96] ; (802b8b4 ) 802b854: 2307 movs r3, #7 802b856: 6013 str r3, [r2, #0] while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE ) 802b858: e005 b.n 802b866 { ulMaxPRIGROUPValue--; ucMaxPriorityValue <<= ( uint8_t ) 0x01; 802b85a: f89d 3003 ldrb.w r3, [sp, #3] 802b85e: 005b lsls r3, r3, #1 802b860: f88d 3003 strb.w r3, [sp, #3] 802b864: 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 ) 802b866: f89d 2003 ldrb.w r2, [sp, #3] 802b86a: 1e59 subs r1, r3, #1 802b86c: 0612 lsls r2, r2, #24 802b86e: d4f4 bmi.n 802b85a } /* Shift the priority group value back to its position within the AIRCR register. */ ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT; ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK; 802b870: 4a10 ldr r2, [pc, #64] ; (802b8b4 ) ucMaxPriorityValue <<= ( uint8_t ) 0x01; } /* Shift the priority group value back to its position within the AIRCR register. */ ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT; 802b872: 021b lsls r3, r3, #8 ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK; 802b874: f403 63e0 and.w r3, r3, #1792 ; 0x700 802b878: 6013 str r3, [r2, #0] /* Restore the clobbered interrupt priority register to its original value. */ *pucFirstUserPriorityRegister = ulOriginalPriority; 802b87a: 4b0c ldr r3, [pc, #48] ; (802b8ac ) 802b87c: 9a01 ldr r2, [sp, #4] 802b87e: 701a strb r2, [r3, #0] } #endif /* conifgASSERT_DEFINED */ /* Make PendSV and SysTick the lowest priority interrupts. */ portNVIC_SYSPRI2_REG |= portNVIC_PENDSV_PRI; 802b880: f8d3 2920 ldr.w r2, [r3, #2336] ; 0x920 802b884: f442 0270 orr.w r2, r2, #15728640 ; 0xf00000 802b888: f8c3 2920 str.w r2, [r3, #2336] ; 0x920 portNVIC_SYSPRI2_REG |= portNVIC_SYSTICK_PRI; 802b88c: f8d3 2920 ldr.w r2, [r3, #2336] ; 0x920 802b890: f042 4270 orr.w r2, r2, #4026531840 ; 0xf0000000 802b894: f8c3 2920 str.w r2, [r3, #2336] ; 0x920 /* Start the timer that generates the tick ISR. Interrupts are disabled here already. */ vPortSetupTimerInterrupt(); 802b898: f7ff ffba bl 802b810 /* Initialise the critical nesting count ready for the first task. */ uxCriticalNesting = 0; 802b89c: 4b06 ldr r3, [pc, #24] ; (802b8b8 ) 802b89e: 2200 movs r2, #0 802b8a0: 601a str r2, [r3, #0] /* Start the first task. */ prvPortStartFirstTask(); 802b8a2: f7ff feff bl 802b6a4 /* 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(); 802b8a6: f7ff ff5b bl 802b760 802b8aa: bf00 nop 802b8ac: e000e400 .word 0xe000e400 802b8b0: 20000cf8 .word 0x20000cf8 802b8b4: 20000cfc .word 0x20000cfc 802b8b8: 20000704 .word 0x20000704 0802b8bc : /*-----------------------------------------------------------*/ #if( configASSERT_DEFINED == 1 ) void vPortValidateInterruptPriority( void ) { 802b8bc: 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 ) ); 802b8be: f3ef 8305 mrs r3, IPSR /* Is the interrupt number a user defined interrupt? */ if( ulCurrentInterrupt >= portFIRST_USER_INTERRUPT_NUMBER ) 802b8c2: 2b0f cmp r3, #15 802b8c4: d908 bls.n 802b8d8 { /* Look up the interrupt's priority. */ ucCurrentPriority = pcInterruptPriorityRegisters[ ulCurrentInterrupt ]; 802b8c6: 4a0a ldr r2, [pc, #40] ; (802b8f0 ) 802b8c8: 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 ); 802b8ca: 4a0a ldr r2, [pc, #40] ; (802b8f4 ) 802b8cc: 7812 ldrb r2, [r2, #0] 802b8ce: 429a cmp r2, r3 802b8d0: d902 bls.n 802b8d8 802b8d2: f7ff ff23 bl 802b71c 802b8d6: e7fe b.n 802b8d6 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 ); 802b8d8: 4b07 ldr r3, [pc, #28] ; (802b8f8 ) 802b8da: 681a ldr r2, [r3, #0] 802b8dc: 4b07 ldr r3, [pc, #28] ; (802b8fc ) 802b8de: 681b ldr r3, [r3, #0] 802b8e0: f402 62e0 and.w r2, r2, #1792 ; 0x700 802b8e4: 429a cmp r2, r3 802b8e6: d902 bls.n 802b8ee 802b8e8: f7ff ff18 bl 802b71c 802b8ec: e7fe b.n 802b8ec 802b8ee: bd08 pop {r3, pc} 802b8f0: e000e3f0 .word 0xe000e3f0 802b8f4: 20000cf8 .word 0x20000cf8 802b8f8: e000ed0c .word 0xe000ed0c 802b8fc: 20000cfc .word 0x20000cfc 0802b900 : xBlockAllocatedBit = ( ( size_t ) 1 ) << ( ( sizeof( size_t ) * heapBITS_PER_BYTE ) - 1 ); } /*-----------------------------------------------------------*/ static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert ) { 802b900: 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 ) 802b902: 4b0f ldr r3, [pc, #60] ; (802b940 ) 802b904: e000 b.n 802b908 802b906: 4613 mov r3, r2 802b908: 681a ldr r2, [r3, #0] 802b90a: 4282 cmp r2, r0 802b90c: d3fb bcc.n 802b906 } /* 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 ) 802b90e: 6859 ldr r1, [r3, #4] 802b910: 185c adds r4, r3, r1 802b912: 4284 cmp r4, r0 802b914: d103 bne.n 802b91e { pxIterator->xBlockSize += pxBlockToInsert->xBlockSize; 802b916: 6840 ldr r0, [r0, #4] 802b918: 1841 adds r1, r0, r1 802b91a: 6059 str r1, [r3, #4] 802b91c: 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 ) 802b91e: 6841 ldr r1, [r0, #4] 802b920: 1844 adds r4, r0, r1 802b922: 4294 cmp r4, r2 802b924: d106 bne.n 802b934 { if( pxIterator->pxNextFreeBlock != pxEnd ) 802b926: 4c07 ldr r4, [pc, #28] ; (802b944 ) 802b928: 6824 ldr r4, [r4, #0] 802b92a: 42a2 cmp r2, r4 802b92c: d002 beq.n 802b934 { /* Form one big block from the two blocks. */ pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize; pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock->pxNextFreeBlock; 802b92e: 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; 802b930: 1861 adds r1, r4, r1 802b932: 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 ) 802b934: 4283 cmp r3, r0 pxBlockToInsert->pxNextFreeBlock = pxEnd; } } else { pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock; 802b936: 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; 802b938: bf18 it ne 802b93a: 6018 strne r0, [r3, #0] 802b93c: bd10 pop {r4, pc} 802b93e: bf00 nop 802b940: 20000d08 .word 0x20000d08 802b944: 20000d04 .word 0x20000d04 0802b948 : static size_t xBlockAllocatedBit = 0; /*-----------------------------------------------------------*/ void *pvPortMalloc( size_t xWantedSize ) { 802b948: b5f8 push {r3, r4, r5, r6, r7, lr} 802b94a: 4605 mov r5, r0 BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink; void *pvReturn = NULL; vTaskSuspendAll(); 802b94c: f7ff f99e bl 802ac8c { /* If this is the first call to malloc then the heap will require initialisation to setup the list of free blocks. */ if( pxEnd == NULL ) 802b950: 4b3a ldr r3, [pc, #232] ; (802ba3c ) 802b952: 681b ldr r3, [r3, #0] 802b954: bb1b cbnz r3, 802b99e 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; 802b956: 4a3a ldr r2, [pc, #232] ; (802ba40 ) if( ( ulAddress & portBYTE_ALIGNMENT_MASK ) != 0 ) 802b958: 0756 lsls r6, r2, #29 802b95a: d007 beq.n 802b96c { ulAddress += ( portBYTE_ALIGNMENT - 1 ); 802b95c: 1dd3 adds r3, r2, #7 ulAddress &= ~portBYTE_ALIGNMENT_MASK; 802b95e: f023 0307 bic.w r3, r3, #7 xTotalHeapSize -= ulAddress - ( uint32_t ) ucHeap; 802b962: f502 4270 add.w r2, r2, #61440 ; 0xf000 802b966: 1ad1 subs r1, r2, r3 ulAddress = ( uint32_t ) ucHeap; if( ( ulAddress & portBYTE_ALIGNMENT_MASK ) != 0 ) { ulAddress += ( portBYTE_ALIGNMENT - 1 ); ulAddress &= ~portBYTE_ALIGNMENT_MASK; 802b968: 461a mov r2, r3 802b96a: e001 b.n 802b970 static void prvHeapInit( void ) { BlockLink_t *pxFirstFreeBlock; uint8_t *pucAlignedHeap; uint32_t ulAddress; size_t xTotalHeapSize = configTOTAL_HEAP_SIZE; 802b96c: 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; 802b970: 1851 adds r1, r2, r1 ulAddress -= xHeapStructSize; 802b972: 3908 subs r1, #8 ulAddress &= ~portBYTE_ALIGNMENT_MASK; 802b974: 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; 802b978: 4832 ldr r0, [pc, #200] ; (802ba44 ) xStart.xBlockSize = ( size_t ) 0; 802b97a: 2300 movs r3, #0 802b97c: 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; 802b980: 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; 802b982: 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; 802b984: 1a8b subs r3, r1, r2 pxFirstFreeBlock->pxNextFreeBlock = pxEnd; 802b986: e882 000a stmia.w r2, {r1, r3} /* Only one block exists - and it covers the entire usable heap space. */ xMinimumEverFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 802b98a: 4a2f ldr r2, [pc, #188] ; (802ba48 ) /* 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; 802b98c: 482b ldr r0, [pc, #172] ; (802ba3c ) 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; 802b98e: 6013 str r3, [r2, #0] xFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 802b990: 4a2e ldr r2, [pc, #184] ; (802ba4c ) /* 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; 802b992: 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; 802b994: 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 ); 802b996: 4b2e ldr r3, [pc, #184] ; (802ba50 ) 802b998: f04f 4200 mov.w r2, #2147483648 ; 0x80000000 802b99c: 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 ) 802b99e: 4b2c ldr r3, [pc, #176] ; (802ba50 ) 802b9a0: 681e ldr r6, [r3, #0] 802b9a2: 4235 tst r5, r6 802b9a4: d140 bne.n 802ba28 { /* The wanted size is increased so it can contain a BlockLink_t structure in addition to the requested amount of bytes. */ if( xWantedSize > 0 ) 802b9a6: 2d00 cmp r5, #0 802b9a8: d03f beq.n 802ba2a { xWantedSize += xHeapStructSize; 802b9aa: 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 ) 802b9ae: 0758 lsls r0, r3, #29 { /* Byte alignment required. */ xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) ); 802b9b0: bf1c itt ne 802b9b2: f023 0307 bicne.w r3, r3, #7 802b9b6: 3308 addne r3, #8 else { mtCOVERAGE_TEST_MARKER(); } if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) ) 802b9b8: 2b00 cmp r3, #0 802b9ba: d033 beq.n 802ba24 802b9bc: 4a23 ldr r2, [pc, #140] ; (802ba4c ) 802b9be: 6817 ldr r7, [r2, #0] 802b9c0: 42bb cmp r3, r7 802b9c2: d831 bhi.n 802ba28 { /* Traverse the list from the start (lowest address) block until one of adequate size is found. */ pxPreviousBlock = &xStart; pxBlock = xStart.pxNextFreeBlock; 802b9c4: 4a1f ldr r2, [pc, #124] ; (802ba44 ) 802b9c6: 6814 ldr r4, [r2, #0] while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) 802b9c8: e001 b.n 802b9ce 802b9ca: 4622 mov r2, r4 { pxPreviousBlock = pxBlock; pxBlock = pxBlock->pxNextFreeBlock; 802b9cc: 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 ) ) 802b9ce: 6861 ldr r1, [r4, #4] 802b9d0: 4299 cmp r1, r3 802b9d2: d304 bcc.n 802b9de pxBlock = pxBlock->pxNextFreeBlock; } /* If the end marker was reached then a block of adequate size was not found. */ if( pxBlock != pxEnd ) 802b9d4: 4819 ldr r0, [pc, #100] ; (802ba3c ) 802b9d6: 6800 ldr r0, [r0, #0] 802b9d8: 4284 cmp r4, r0 802b9da: d104 bne.n 802b9e6 802b9dc: e024 b.n 802ba28 { /* 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 ) ) 802b9de: 6820 ldr r0, [r4, #0] 802b9e0: 2800 cmp r0, #0 802b9e2: d1f2 bne.n 802b9ca 802b9e4: e7f6 b.n 802b9d4 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; 802b9e6: 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 ); 802b9e8: 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; 802b9ea: 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 ) 802b9ec: 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 ); 802b9ee: 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 ) 802b9f0: 2a10 cmp r2, #16 802b9f2: d909 bls.n 802ba08 { /* 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 ); 802b9f4: 18e0 adds r0, r4, r3 configASSERT( ( ( ( uint32_t ) pxNewBlockLink ) & portBYTE_ALIGNMENT_MASK ) == 0 ); 802b9f6: 0741 lsls r1, r0, #29 802b9f8: d002 beq.n 802ba00 802b9fa: f7ff fe8f bl 802b71c 802b9fe: e7fe b.n 802b9fe /* Calculate the sizes of two blocks split from the single block. */ pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize; 802ba00: 6042 str r2, [r0, #4] pxBlock->xBlockSize = xWantedSize; 802ba02: 6063 str r3, [r4, #4] /* Insert the new block into the list of free blocks. */ prvInsertBlockIntoFreeList( ( pxNewBlockLink ) ); 802ba04: f7ff ff7c bl 802b900 else { mtCOVERAGE_TEST_MARKER(); } xFreeBytesRemaining -= pxBlock->xBlockSize; 802ba08: 6862 ldr r2, [r4, #4] 802ba0a: 4910 ldr r1, [pc, #64] ; (802ba4c ) 802ba0c: 1abb subs r3, r7, r2 802ba0e: 600b str r3, [r1, #0] if( xFreeBytesRemaining < xMinimumEverFreeBytesRemaining ) 802ba10: 490d ldr r1, [pc, #52] ; (802ba48 ) 802ba12: 6808 ldr r0, [r1, #0] 802ba14: 4283 cmp r3, r0 { xMinimumEverFreeBytesRemaining = xFreeBytesRemaining; 802ba16: bf38 it cc 802ba18: 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; 802ba1a: 4316 orrs r6, r2 pxBlock->pxNextFreeBlock = NULL; 802ba1c: 2300 movs r3, #0 802ba1e: e884 0048 stmia.w r4, {r3, r6} 802ba22: e002 b.n 802ba2a /*-----------------------------------------------------------*/ void *pvPortMalloc( size_t xWantedSize ) { BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink; void *pvReturn = NULL; 802ba24: 461d mov r5, r3 802ba26: e000 b.n 802ba2a 802ba28: 2500 movs r5, #0 mtCOVERAGE_TEST_MARKER(); } traceMALLOC( pvReturn, xWantedSize ); } ( void ) xTaskResumeAll(); 802ba2a: f7ff f9cb bl 802adc4 mtCOVERAGE_TEST_MARKER(); } } #endif configASSERT( ( ( ( uint32_t ) pvReturn ) & portBYTE_ALIGNMENT_MASK ) == 0 ); 802ba2e: 076b lsls r3, r5, #29 802ba30: d002 beq.n 802ba38 802ba32: f7ff fe73 bl 802b71c 802ba36: e7fe b.n 802ba36 return pvReturn; } 802ba38: 4628 mov r0, r5 802ba3a: bdf8 pop {r3, r4, r5, r6, r7, pc} 802ba3c: 20000d04 .word 0x20000d04 802ba40: 10000000 .word 0x10000000 802ba44: 20000d08 .word 0x20000d08 802ba48: 20000d10 .word 0x20000d10 802ba4c: 20000d00 .word 0x20000d00 802ba50: 20000d14 .word 0x20000d14 0802ba54 : /*-----------------------------------------------------------*/ void vPortFree( void *pv ) { 802ba54: b510 push {r4, lr} uint8_t *puc = ( uint8_t * ) pv; BlockLink_t *pxLink; if( pv != NULL ) 802ba56: 4604 mov r4, r0 802ba58: b310 cbz r0, 802baa0 /* This casting is to keep the compiler from issuing warnings. */ pxLink = ( void * ) puc; /* Check the block is actually allocated. */ configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 ); 802ba5a: 4a12 ldr r2, [pc, #72] ; (802baa4 ) 802ba5c: f850 3c04 ldr.w r3, [r0, #-4] 802ba60: 6812 ldr r2, [r2, #0] 802ba62: 421a tst r2, r3 802ba64: d102 bne.n 802ba6c 802ba66: f7ff fe59 bl 802b71c 802ba6a: e7fe b.n 802ba6a configASSERT( pxLink->pxNextFreeBlock == NULL ); 802ba6c: f850 1c08 ldr.w r1, [r0, #-8] 802ba70: b111 cbz r1, 802ba78 802ba72: f7ff fe53 bl 802b71c 802ba76: e7fe b.n 802ba76 { if( pxLink->pxNextFreeBlock == NULL ) { /* The block is being returned to the heap - it is no longer allocated. */ pxLink->xBlockSize &= ~xBlockAllocatedBit; 802ba78: ea23 0302 bic.w r3, r3, r2 802ba7c: f840 3c04 str.w r3, [r0, #-4] vTaskSuspendAll(); 802ba80: f7ff f904 bl 802ac8c { /* Add this block to the list of free blocks. */ xFreeBytesRemaining += pxLink->xBlockSize; 802ba84: 4b08 ldr r3, [pc, #32] ; (802baa8 ) 802ba86: f854 1c04 ldr.w r1, [r4, #-4] 802ba8a: 681a ldr r2, [r3, #0] traceFREE( pv, pxLink->xBlockSize ); prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) ); 802ba8c: f1a4 0008 sub.w r0, r4, #8 pxLink->xBlockSize &= ~xBlockAllocatedBit; vTaskSuspendAll(); { /* Add this block to the list of free blocks. */ xFreeBytesRemaining += pxLink->xBlockSize; 802ba90: 188a adds r2, r1, r2 802ba92: 601a str r2, [r3, #0] traceFREE( pv, pxLink->xBlockSize ); prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) ); 802ba94: f7ff ff34 bl 802b900 else { mtCOVERAGE_TEST_MARKER(); } } } 802ba98: 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(); 802ba9c: f7ff b992 b.w 802adc4 802baa0: bd10 pop {r4, pc} 802baa2: bf00 nop 802baa4: 20000d14 .word 0x20000d14 802baa8: 20000d00 .word 0x20000d00 0802baac : static void http_sent_log_err(void * arg, err_t err) { (void)err; (void)arg; /* Clear file transfer in progress flag */ fLogTransInprog = false; 802baac: 4b01 ldr r3, [pc, #4] ; (802bab4 ) 802baae: 2200 movs r2, #0 802bab0: 701a strb r2, [r3, #0] 802bab2: 4770 bx lr 802bab4: 20000d24 .word 0x20000d24 0802bab8 : /** * @brief Обновление времени последней активности пользователя */ static void HTTP_UpdateUserLoginTime(uint8_t user_id) { xTimerStart(users[user_id].LogoutTimer, 0); 802bab8: 4b07 ldr r3, [pc, #28] ; (802bad8 ) 802baba: 2214 movs r2, #20 /** * @brief Обновление времени последней активности пользователя */ static void HTTP_UpdateUserLoginTime(uint8_t user_id) { 802babc: b513 push {r0, r1, r4, lr} xTimerStart(users[user_id].LogoutTimer, 0); 802babe: fb02 3000 mla r0, r2, r0, r3 802bac2: 6904 ldr r4, [r0, #16] 802bac4: f7ff f8ea bl 802ac9c 802bac8: 2300 movs r3, #0 802baca: 4602 mov r2, r0 802bacc: 9300 str r3, [sp, #0] 802bace: 4620 mov r0, r4 802bad0: 2101 movs r1, #1 802bad2: f7ff fccd bl 802b470 } 802bad6: bd1c pop {r2, r3, r4, pc} 802bad8: 2000e238 .word 0x2000e238 0802badc : * @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) { 802badc: 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) 802bade: 4c09 ldr r4, [pc, #36] ; (802bb04 ) * @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) { 802bae0: 4606 mov r6, r0 802bae2: 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)) 802bae4: 4630 mov r0, r6 802bae6: 6861 ldr r1, [r4, #4] 802bae8: f7f6 f896 bl 8021c18 802baec: b928 cbnz r0, 802bafa { file->data = f->data; 802baee: 68a3 ldr r3, [r4, #8] 802baf0: 602b str r3, [r5, #0] file->len = f->len; 802baf2: 68e3 ldr r3, [r4, #12] return 1; 802baf4: 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; 802baf6: 606b str r3, [r5, #4] return 1; 802baf8: 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) 802bafa: 6824 ldr r4, [r4, #0] 802bafc: 2c00 cmp r4, #0 802bafe: d1f1 bne.n 802bae4 file->data = f->data; file->len = f->len; return 1; } } return 0; 802bb00: 4620 mov r0, r4 } 802bb02: bd70 pop {r4, r5, r6, pc} 802bb04: 08041040 .word 0x08041040 0802bb08 : * @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) { 802bb08: 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)); 802bb0a: 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) { 802bb0c: 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)); 802bb0e: f003 ff53 bl 802f9b8 if (hs == NULL) 802bb12: 4601 mov r1, r0 802bb14: b1a0 cbz r0, 802bb40 { return ERR_MEM; } /* Initialize the structure. */ hs->file = NULL; 802bb16: 2500 movs r5, #0 802bb18: 6005 str r5, [r0, #0] hs->left = 0; 802bb1a: 6045 str r5, [r0, #4] /* Tell TCP that this is the structure we wish to be passed for our callbacks. */ tcp_arg(pcb, hs); 802bb1c: 4620 mov r0, r4 802bb1e: f004 fc3b bl 8030398 /* Tell TCP that we wish to be informed of incoming data by a call to the http_recv() function. */ tcp_recv(pcb, http_recv); 802bb22: 4620 mov r0, r4 802bb24: 4908 ldr r1, [pc, #32] ; (802bb48 ) 802bb26: f004 fc39 bl 803039c tcp_err(pcb, conn_err); 802bb2a: 4620 mov r0, r4 802bb2c: 4907 ldr r1, [pc, #28] ; (802bb4c ) 802bb2e: f004 fc39 bl 80303a4 tcp_poll(pcb, http_poll, 10); 802bb32: 4620 mov r0, r4 802bb34: 4906 ldr r1, [pc, #24] ; (802bb50 ) 802bb36: 220a movs r2, #10 802bb38: f004 fc39 bl 80303ae return ERR_OK; 802bb3c: 4628 mov r0, r5 802bb3e: e000 b.n 802bb42 /* 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; 802bb40: 20ff movs r0, #255 ; 0xff tcp_err(pcb, conn_err); tcp_poll(pcb, http_poll, 10); return ERR_OK; } 802bb42: b240 sxtb r0, r0 802bb44: bd38 pop {r3, r4, r5, pc} 802bb46: bf00 nop 802bb48: 0802cba1 .word 0x0802cba1 802bb4c: 0802bb97 .word 0x0802bb97 802bb50: 0802bb7f .word 0x0802bb7f 0802bb54 : * @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) { 802bb54: 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) 802bb56: 684b ldr r3, [r1, #4] 802bb58: f8b0 5066 ldrh.w r5, [r0, #102] ; 0x66 802bb5c: 429d cmp r5, r3 { len = tcp_sndbuf(pcb); } else { len = hs->left; 802bb5e: bf28 it cs 802bb60: 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) { 802bb62: 460c mov r4, r1 } else { len = hs->left; } err = tcp_write(pcb, hs->file, len, 0); 802bb64: 462a mov r2, r5 802bb66: 6809 ldr r1, [r1, #0] 802bb68: 2300 movs r3, #0 802bb6a: f006 f81a bl 8031ba2 if (err == ERR_OK) 802bb6e: b928 cbnz r0, 802bb7c { hs->file += len; 802bb70: 6823 ldr r3, [r4, #0] 802bb72: 195b adds r3, r3, r5 802bb74: 6023 str r3, [r4, #0] hs->left -= len; 802bb76: 6863 ldr r3, [r4, #4] 802bb78: 1b5d subs r5, r3, r5 802bb7a: 6065 str r5, [r4, #4] 802bb7c: bd38 pop {r3, r4, r5, pc} 0802bb7e : * @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) { 802bb7e: b508 push {r3, lr} if (arg == NULL) 802bb80: 4603 mov r3, r0 { tcp_close(pcb); 802bb82: 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) 802bb84: b913 cbnz r3, 802bb8c { tcp_close(pcb); 802bb86: f004 fecb bl 8030920 802bb8a: e002 b.n 802bb92 } else { send_data(pcb, (struct http_state *)arg); 802bb8c: 4619 mov r1, r3 802bb8e: f7ff ffe1 bl 802bb54 } return ERR_OK; } 802bb92: 2000 movs r0, #0 802bb94: bd08 pop {r3, pc} 0802bb96 : static void conn_err(void *arg, err_t err) { struct http_state *hs; hs = arg; mem_free(hs); 802bb96: f003 be47 b.w 802f828 0802bb9a : * @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) { 802bb9a: b538 push {r3, r4, r5, lr} 802bb9c: 4604 mov r4, r0 802bb9e: 460d mov r5, r1 tcp_arg(pcb, NULL); 802bba0: 2100 movs r1, #0 802bba2: f004 fbf9 bl 8030398 tcp_sent(pcb, NULL); 802bba6: 4620 mov r0, r4 802bba8: 2100 movs r1, #0 802bbaa: f004 fbf9 bl 80303a0 tcp_recv(pcb, NULL); 802bbae: 4620 mov r0, r4 802bbb0: 2100 movs r1, #0 802bbb2: f004 fbf3 bl 803039c mem_free(hs); 802bbb6: 4628 mov r0, r5 802bbb8: f003 fe36 bl 802f828 tcp_close(pcb); 802bbbc: 4620 mov r0, r4 } 802bbbe: 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); 802bbc2: f004 bead b.w 8030920 0802bbc6 : * @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) { 802bbc6: b508 push {r3, lr} 802bbc8: 4603 mov r3, r0 802bbca: 4608 mov r0, r1 struct http_state *hs; hs = arg; if (hs->left > 0) 802bbcc: 685a ldr r2, [r3, #4] { send_data(pcb, hs); 802bbce: 4619 mov r1, r3 { struct http_state *hs; hs = arg; if (hs->left > 0) 802bbd0: b112 cbz r2, 802bbd8 { send_data(pcb, hs); 802bbd2: f7ff ffbf bl 802bb54 802bbd6: e001 b.n 802bbdc } else { close_conn(pcb, hs); 802bbd8: f7ff ffdf bl 802bb9a } return ERR_OK; } 802bbdc: 2000 movs r0, #0 802bbde: bd08 pop {r3, pc} 0802bbe0 : /** * @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) { 802bbe0: b570 push {r4, r5, r6, lr} static bool start = true; (void)len; hs = arg; if (hs->left > 0) 802bbe2: 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) { 802bbe4: 4604 mov r4, r0 802bbe6: 460e mov r6, r1 static bool start = true; (void)len; hs = arg; if (hs->left > 0) 802bbe8: b125 cbz r5, 802bbf4 { send_data(pcb, hs); 802bbea: 4608 mov r0, r1 802bbec: 4621 mov r1, r4 802bbee: f7ff ffb1 bl 802bb54 802bbf2: e036 b.n 802bc62 } else { memset(logFileBuf, 0, FILE_BUF_MAX_LEN); 802bbf4: f44f 727a mov.w r2, #1000 ; 0x3e8 802bbf8: 481b ldr r0, [pc, #108] ; (802bc68 ) 802bbfa: 4629 mov r1, r5 802bbfc: f7f5 ff80 bl 8021b00 if (log_ptr + FILE_BUF_MAX_LEN_LOG <= log_size) { 802bc00: 4b1a ldr r3, [pc, #104] ; (802bc6c ) 802bc02: 6818 ldr r0, [r3, #0] 802bc04: 4b1a ldr r3, [pc, #104] ; (802bc70 ) 802bc06: 681a ldr r2, [r3, #0] 802bc08: f500 7320 add.w r3, r0, #640 ; 0x280 802bc0c: 4293 cmp r3, r2 802bc0e: 4b19 ldr r3, [pc, #100] ; (802bc74 ) 802bc10: d803 bhi.n 802bc1a nbytes = LOG_GetData(log_ptr, logFileBuf, FILE_BUF_MAX_LEN_LOG, start); 802bc12: 4915 ldr r1, [pc, #84] ; (802bc68 ) 802bc14: f44f 7220 mov.w r2, #640 ; 0x280 802bc18: e003 b.n 802bc22 } else if (log_ptr < log_size) { 802bc1a: 4290 cmp r0, r2 802bc1c: d205 bcs.n 802bc2a nbytes = LOG_GetData(log_ptr, logFileBuf, (log_size - log_ptr), start); 802bc1e: 4912 ldr r1, [pc, #72] ; (802bc68 ) 802bc20: 1a12 subs r2, r2, r0 802bc22: 781b ldrb r3, [r3, #0] 802bc24: f7fd ff70 bl 8029b08 802bc28: 4605 mov r5, r0 } else { nbytes = 0; } log_ptr += nbytes; 802bc2a: 4b10 ldr r3, [pc, #64] ; (802bc6c ) 802bc2c: 681a ldr r2, [r3, #0] 802bc2e: 18aa adds r2, r5, r2 802bc30: 601a str r2, [r3, #0] start = false; 802bc32: 4b10 ldr r3, [pc, #64] ; (802bc74 ) 802bc34: 2200 movs r2, #0 802bc36: 701a strb r2, [r3, #0] if (nbytes == 0) { 802bc38: b945 cbnz r5, 802bc4c /* File transfer finished. */ start = true; 802bc3a: 2201 movs r2, #1 close_conn(pcb, hs); 802bc3c: 4630 mov r0, r6 802bc3e: 4621 mov r1, r4 log_ptr += nbytes; start = false; if (nbytes == 0) { /* File transfer finished. */ start = true; 802bc40: 701a strb r2, [r3, #0] close_conn(pcb, hs); 802bc42: f7ff ffaa bl 802bb9a /* Clear file transfer in progress flag */ fLogTransInprog = false; 802bc46: 4b0c ldr r3, [pc, #48] ; (802bc78 ) 802bc48: 701d strb r5, [r3, #0] 802bc4a: e00a b.n 802bc62 return ERR_OK; } hs->file = logFileBuf; 802bc4c: 4b06 ldr r3, [pc, #24] ; (802bc68 ) hs->left = nbytes; send_data(pcb, hs); 802bc4e: 4630 mov r0, r6 802bc50: 4621 mov r1, r4 return ERR_OK; } hs->file = logFileBuf; hs->left = nbytes; 802bc52: e884 0028 stmia.w r4, {r3, r5} send_data(pcb, hs); 802bc56: f7ff ff7d bl 802bb54 tcp_sent(pcb, http_sent_log); 802bc5a: 4630 mov r0, r6 802bc5c: 4907 ldr r1, [pc, #28] ; (802bc7c ) 802bc5e: f004 fb9f bl 80303a0 } return ERR_OK; } 802bc62: 2000 movs r0, #0 802bc64: bd70 pop {r4, r5, r6, pc} 802bc66: bf00 nop 802bc68: 2000cbd5 .word 0x2000cbd5 802bc6c: 20000d1c .word 0x20000d1c 802bc70: 20000d28 .word 0x20000d28 802bc74: 20000708 .word 0x20000708 802bc78: 20000d24 .word 0x20000d24 802bc7c: 0802bbe1 .word 0x0802bbe1 0802bc80 : /** * @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) { 802bc80: b570 push {r4, r5, r6, lr} static bool start = true; (void)len; hs = arg; if (hs->left > 0) 802bc82: 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) { 802bc84: 4604 mov r4, r0 802bc86: 460e mov r6, r1 static bool start = true; (void)len; hs = arg; if (hs->left > 0) 802bc88: b125 cbz r5, 802bc94 { send_data(pcb, hs); 802bc8a: 4608 mov r0, r1 802bc8c: 4621 mov r1, r4 802bc8e: f7ff ff61 bl 802bb54 802bc92: e036 b.n 802bd02 } else { memset(logFileBuf, 0, FILE_BUF_MAX_LEN); 802bc94: f44f 727a mov.w r2, #1000 ; 0x3e8 802bc98: 481b ldr r0, [pc, #108] ; (802bd08 ) 802bc9a: 4629 mov r1, r5 802bc9c: f7f5 ff30 bl 8021b00 if (log_ptr + FILE_BUF_MAX_LEN <= log_size) { 802bca0: 4b1a ldr r3, [pc, #104] ; (802bd0c ) 802bca2: 6818 ldr r0, [r3, #0] 802bca4: 4b1a ldr r3, [pc, #104] ; (802bd10 ) 802bca6: 681a ldr r2, [r3, #0] 802bca8: f500 737a add.w r3, r0, #1000 ; 0x3e8 802bcac: 4293 cmp r3, r2 802bcae: 4b19 ldr r3, [pc, #100] ; (802bd14 ) 802bcb0: d803 bhi.n 802bcba nbytes = History_GetData(log_ptr, logFileBuf, FILE_BUF_MAX_LEN, start); 802bcb2: 4915 ldr r1, [pc, #84] ; (802bd08 ) 802bcb4: f44f 727a mov.w r2, #1000 ; 0x3e8 802bcb8: e003 b.n 802bcc2 } else if (log_ptr < log_size) { 802bcba: 4290 cmp r0, r2 802bcbc: d205 bcs.n 802bcca nbytes = History_GetData(log_ptr, logFileBuf, (log_size - log_ptr), start); 802bcbe: 4912 ldr r1, [pc, #72] ; (802bd08 ) 802bcc0: 1a12 subs r2, r2, r0 802bcc2: 781b ldrb r3, [r3, #0] 802bcc4: f7fe f826 bl 8029d14 802bcc8: 4605 mov r5, r0 } else { nbytes = 0; } log_ptr += nbytes; 802bcca: 4b10 ldr r3, [pc, #64] ; (802bd0c ) 802bccc: 681a ldr r2, [r3, #0] 802bcce: 18aa adds r2, r5, r2 802bcd0: 601a str r2, [r3, #0] start = false; 802bcd2: 4b10 ldr r3, [pc, #64] ; (802bd14 ) 802bcd4: 2200 movs r2, #0 802bcd6: 701a strb r2, [r3, #0] if (nbytes == 0) { 802bcd8: b945 cbnz r5, 802bcec /* File transfer finished. */ start = true; 802bcda: 2201 movs r2, #1 close_conn(pcb, hs); 802bcdc: 4630 mov r0, r6 802bcde: 4621 mov r1, r4 log_ptr += nbytes; start = false; if (nbytes == 0) { /* File transfer finished. */ start = true; 802bce0: 701a strb r2, [r3, #0] close_conn(pcb, hs); 802bce2: f7ff ff5a bl 802bb9a /* Clear file transfer in progress flag */ fLogTransInprog = false; 802bce6: 4b0c ldr r3, [pc, #48] ; (802bd18 ) 802bce8: 701d strb r5, [r3, #0] 802bcea: e00a b.n 802bd02 return ERR_OK; } hs->file = logFileBuf; 802bcec: 4b06 ldr r3, [pc, #24] ; (802bd08 ) hs->left = nbytes; send_data(pcb, hs); 802bcee: 4630 mov r0, r6 802bcf0: 4621 mov r1, r4 return ERR_OK; } hs->file = logFileBuf; hs->left = nbytes; 802bcf2: e884 0028 stmia.w r4, {r3, r5} send_data(pcb, hs); 802bcf6: f7ff ff2d bl 802bb54 tcp_sent(pcb, http_sent_history); 802bcfa: 4630 mov r0, r6 802bcfc: 4907 ldr r1, [pc, #28] ; (802bd1c ) 802bcfe: f004 fb4f bl 80303a0 } return ERR_OK; } 802bd02: 2000 movs r0, #0 802bd04: bd70 pop {r4, r5, r6, pc} 802bd06: bf00 nop 802bd08: 2000cbd5 .word 0x2000cbd5 802bd0c: 20000d1c .word 0x20000d1c 802bd10: 20000d28 .word 0x20000d28 802bd14: 20000709 .word 0x20000709 802bd18: 20000d24 .word 0x20000d24 802bd1c: 0802bc81 .word 0x0802bc81 0802bd20 : } /** * @brief >Callback таймера логаута пользователя */ void LogoutTimerCallback(TimerHandle_t pxTimer) { 802bd20: b51f push {r0, r1, r2, r3, r4, lr} uint8_t user_id = (uint8_t)pvTimerGetTimerID( pxTimer ); 802bd22: f7ff fcbd bl 802b6a0 if( sSettings.sRADIUS.Auth_enable ) 802bd26: 4b0a ldr r3, [pc, #40] ; (802bd50 ) 802bd28: f893 3378 ldrb.w r3, [r3, #888] ; 0x378 /** * @brief >Callback таймера логаута пользователя */ void LogoutTimerCallback(TimerHandle_t pxTimer) { uint8_t user_id = (uint8_t)pvTimerGetTimerID( pxTimer ); 802bd2c: 4604 mov r4, r0 if( sSettings.sRADIUS.Auth_enable ) 802bd2e: b173 cbz r3, 802bd4e 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()); 802bd30: f7fa f9cc bl 80260cc 802bd34: 4907 ldr r1, [pc, #28] ; (802bd54 ) 802bd36: 4602 mov r2, r0 802bd38: 4668 mov r0, sp 802bd3a: f7fb fd6b bl 8027814 /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802bd3e: 4b06 ldr r3, [pc, #24] ; (802bd58 ) 802bd40: b2e0 uxtb r0, r4 802bd42: 2214 movs r2, #20 802bd44: fb00 3002 mla r0, r0, r2, r3 802bd48: 4669 mov r1, sp 802bd4a: f7f6 f853 bl 8021df4 */ void LogoutTimerCallback(TimerHandle_t pxTimer) { uint8_t user_id = (uint8_t)pvTimerGetTimerID( pxTimer ); if( sSettings.sRADIUS.Auth_enable ) HTTP_ForceUserLogout(user_id); } 802bd4e: bd1f pop {r0, r1, r2, r3, r4, pc} 802bd50: 2000cfc0 .word 0x2000cfc0 802bd54: 080408a6 .word 0x080408a6 802bd58: 2000e238 .word 0x2000e238 0802bd5c : * @brief Initialize the HTTP server (start its thread) * @param none * @retval None */ void HTTP_Init() { 802bd5c: b5f0 push {r4, r5, r6, r7, lr} 802bd5e: 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(); 802bd60: f004 ff0c bl 8030b7c /* bind HTTP traffic to pcb */ tcp_bind(pcb, IP_ADDR_ANY, 80); 802bd64: 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(); 802bd66: 4604 mov r4, r0 /* bind HTTP traffic to pcb */ tcp_bind(pcb, IP_ADDR_ANY, 80); 802bd68: 4913 ldr r1, [pc, #76] ; (802bdb8 ) /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802bd6a: 4f14 ldr r7, [pc, #80] ; (802bdbc ) 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); 802bd6c: 4e14 ldr r6, [pc, #80] ; (802bdc0 ) //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); 802bd6e: f004 fa41 bl 80301f4 /* start listening on port 80 */ pcb = tcp_listen(pcb); 802bd72: 4620 mov r0, r4 802bd74: 21ff movs r1, #255 ; 0xff 802bd76: f004 fa75 bl 8030264 /* define callback function for TCP connection setup */ tcp_accept(pcb, http_accept); 802bd7a: 4912 ldr r1, [pc, #72] ; (802bdc4 ) 802bd7c: f004 fb15 bl 80303aa 802bd80: 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()); 802bd82: f7fa f9a3 bl 80260cc /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802bd86: 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()); 802bd88: 4602 mov r2, r0 /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802bd8a: 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()); 802bd8e: 490e ldr r1, [pc, #56] ; (802bdc8 ) 802bd90: a802 add r0, sp, #8 802bd92: f7fb fd3f bl 8027814 /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802bd96: a902 add r1, sp, #8 802bd98: 4628 mov r0, r5 802bd9a: f7f6 f82b bl 8021df4 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); 802bd9e: 2200 movs r2, #0 802bda0: 4623 mov r3, r4 802bda2: 9600 str r6, [sp, #0] 802bda4: 4809 ldr r0, [pc, #36] ; (802bdcc ) 802bda6: 490a ldr r1, [pc, #40] ; (802bdd0 ) 802bda8: f7ff fb42 bl 802b430 802bdac: 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++) { 802bdae: 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 = 802bdb0: 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++) { 802bdb2: d1e6 bne.n 802bd82 /* Create user logout timers */ users[user_id].LogoutTimer = xTimerCreate("LogoutTmr", WEB_LOGOUT_TIME, pdFALSE, ( void * ) user_id, LogoutTimerCallback); } } 802bdb4: b007 add sp, #28 802bdb6: bdf0 pop {r4, r5, r6, r7, pc} 802bdb8: 08044e44 .word 0x08044e44 802bdbc: 2000e238 .word 0x2000e238 802bdc0: 0802bd21 .word 0x0802bd21 802bdc4: 0802bb09 .word 0x0802bb09 802bdc8: 080408a6 .word 0x080408a6 802bdcc: 080408a9 .word 0x080408a9 802bdd0: 001b7740 .word 0x001b7740 0802bdd4 : /** * @brief * @retval None */ int HTTP_SettingsPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802bdd4: b570 push {r4, r5, r6, lr} 802bdd6: 4602 mov r2, r0 802bdd8: b088 sub sp, #32 802bdda: 460c mov r4, r1 char tempStr[30]; strncpy(tempStr, bufIn, 30); 802bddc: 4668 mov r0, sp 802bdde: 4611 mov r1, r2 802bde0: 221e movs r2, #30 /** * @brief * @retval None */ int HTTP_SettingsPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802bde2: 461e mov r6, r3 char tempStr[30]; strncpy(tempStr, bufIn, 30); 802bde4: f7f6 f91c bl 8022020 /* В запросе нет параметров, нужно формировать JSON ответ */ if (strpbrk(tempStr,"?") == 0) 802bde8: 4668 mov r0, sp 802bdea: 490b ldr r1, [pc, #44] ; (802be18 ) 802bdec: f7f6 f94a bl 8022084 802bdf0: 4605 mov r5, r0 /* В запросе есть параметры, нужно парсить и сохранять настройки */ else { //HTTP_SetSettings(bufIn, lenBufIn); return SEND_REQUIRED_NO; 802bdf2: 2001 movs r0, #1 { char tempStr[30]; strncpy(tempStr, bufIn, 30); /* В запросе нет параметров, нужно формировать JSON ответ */ if (strpbrk(tempStr,"?") == 0) 802bdf4: b975 cbnz r5, 802be14 { memset(bufOut, 0, SEND_BUF_MAX_LEN); 802bdf6: 4629 mov r1, r5 802bdf8: f44f 62fa mov.w r2, #2000 ; 0x7d0 802bdfc: 4620 mov r0, r4 802bdfe: f7f5 fe7f bl 8021b00 HTTP_GetSettings(bufOut); 802be02: 4620 mov r0, r4 802be04: f001 fbdc bl 802d5c0 //printf(bufOut); *lenBufOut = strlen(bufOut); 802be08: 4620 mov r0, r4 802be0a: f7f6 f851 bl 8021eb0 802be0e: 8030 strh r0, [r6, #0] return SEND_REQUIRED_YES; 802be10: 4628 mov r0, r5 802be12: e7ff b.n 802be14 { //HTTP_SetSettings(bufIn, lenBufIn); return SEND_REQUIRED_NO; } } 802be14: b008 add sp, #32 802be16: bd70 pop {r4, r5, r6, pc} 802be18: 080408b3 .word 0x080408b3 0802be1c : /** * @brief * @retval None */ int HTTP_InfoPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802be1c: b570 push {r4, r5, r6, lr} 802be1e: 4602 mov r2, r0 802be20: b088 sub sp, #32 802be22: 460c mov r4, r1 char tempStr[30]; strncpy(tempStr, bufIn, 30); 802be24: 4668 mov r0, sp 802be26: 4611 mov r1, r2 802be28: 221e movs r2, #30 /** * @brief * @retval None */ int HTTP_InfoPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802be2a: 461e mov r6, r3 char tempStr[30]; strncpy(tempStr, bufIn, 30); 802be2c: f7f6 f8f8 bl 8022020 /* В запросе нет параметров, нужно формировать JSON ответ */ if (strpbrk(tempStr,"?") == 0) 802be30: 4668 mov r0, sp 802be32: 490b ldr r1, [pc, #44] ; (802be60 ) 802be34: f7f6 f926 bl 8022084 802be38: 4605 mov r5, r0 } /* В запросе есть параметры, нужно парсить и сохранять настройки */ else { //HTTP_SetInfo(bufIn, lenBufIn); return SEND_REQUIRED_NO; 802be3a: 2001 movs r0, #1 { char tempStr[30]; strncpy(tempStr, bufIn, 30); /* В запросе нет параметров, нужно формировать JSON ответ */ if (strpbrk(tempStr,"?") == 0) 802be3c: b975 cbnz r5, 802be5c { memset(bufOut, 0, SEND_BUF_MAX_LEN); 802be3e: 4629 mov r1, r5 802be40: f44f 62fa mov.w r2, #2000 ; 0x7d0 802be44: 4620 mov r0, r4 802be46: f7f5 fe5b bl 8021b00 HTTP_GetInfo(bufOut); 802be4a: 4620 mov r0, r4 802be4c: f001 fdaa bl 802d9a4 *lenBufOut = strlen(bufOut); 802be50: 4620 mov r0, r4 802be52: f7f6 f82d bl 8021eb0 802be56: 8030 strh r0, [r6, #0] return SEND_REQUIRED_YES; 802be58: 4628 mov r0, r5 802be5a: e7ff b.n 802be5c /* HTTP_SetSettings(bufIn, lenBufIn); return SEND_REQUIRED_NO; */ } } 802be5c: b008 add sp, #32 802be5e: bd70 pop {r4, r5, r6, pc} 802be60: 080408b3 .word 0x080408b3 0802be64 : /** * @brief Запуск/останов теста UPS */ void HTTP_UPSTest(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802be64: b570 push {r4, r5, r6, lr} 802be66: b08a sub sp, #40 ; 0x28 802be68: 4606 mov r6, r0 802be6a: 460c mov r4, r1 char *valueLen = 0; char tempValue[20]; char tempValue2[20]; int8_t res = 0; memset(tempValue, 0, 20); 802be6c: 2214 movs r2, #20 802be6e: 2100 movs r1, #0 802be70: 4668 mov r0, sp /** * @brief Запуск/останов теста UPS */ void HTTP_UPSTest(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802be72: 461d mov r5, r3 char *valueLen = 0; char tempValue[20]; char tempValue2[20]; int8_t res = 0; memset(tempValue, 0, 20); 802be74: f7f5 fe44 bl 8021b00 memset(tempValue2, 0, 20); 802be78: 2214 movs r2, #20 802be7a: 2100 movs r1, #0 802be7c: a805 add r0, sp, #20 802be7e: f7f5 fe3f bl 8021b00 strcpy(bufOut, HTTP_200_OK); 802be82: 492e ldr r1, [pc, #184] ; (802bf3c ) 802be84: 4620 mov r0, r4 802be86: f7f5 ffb5 bl 8021df4 value = strstr(bufIn, "func"); 802be8a: 4630 mov r0, r6 802be8c: 492c ldr r1, [pc, #176] ; (802bf40 ) 802be8e: f7f6 fa8f bl 80223b0 valueLen = strpbrk(value, ":"); 802be92: 492c ldr r1, [pc, #176] ; (802bf44 ) 802be94: f7f6 f8f6 bl 8022084 802be98: 4606 mov r6, r0 strncpy(tempValue, (valueLen+1), (strlen(valueLen)-2)); 802be9a: f7f6 f809 bl 8021eb0 802be9e: 1c71 adds r1, r6, #1 802bea0: 1e82 subs r2, r0, #2 802bea2: 4668 mov r0, sp 802bea4: f7f6 f8bc bl 8022020 if (strcmp(tempValue, "\"stop\"") == 0){ 802bea8: 4668 mov r0, sp 802beaa: 4927 ldr r1, [pc, #156] ; (802bf48 ) 802beac: f7f5 feb4 bl 8021c18 802beb0: b978 cbnz r0, 802bed2 res = ups_metac_service_pdu(ups_cancel_test); 802beb2: 2008 movs r0, #8 802beb4: f7fd f888 bl 8028fc8 802beb8: b2c6 uxtb r6, r0 if(res == 1 || res == 0) 802beba: 2e01 cmp r6, #1 802bebc: d803 bhi.n 802bec6 strcat(bufOut, "Тест остановлен!"); 802bebe: 4620 mov r0, r4 802bec0: 4922 ldr r1, [pc, #136] ; (802bf4c ) 802bec2: f7f5 fe83 bl 8021bcc if(res == -1) 802bec6: b276 sxtb r6, r6 802bec8: 1c72 adds r2, r6, #1 802beca: d131 bne.n 802bf30 strcat(bufOut, "Тест не удалось остановить!"); 802becc: 4620 mov r0, r4 802bece: 4920 ldr r1, [pc, #128] ; (802bf50 ) 802bed0: e02c b.n 802bf2c *lenBufOut = strlen(bufOut); } else if (strcmp(tempValue, "\"discharge\"") == 0){ 802bed2: 4668 mov r0, sp 802bed4: 491f ldr r1, [pc, #124] ; (802bf54 ) 802bed6: f7f5 fe9f bl 8021c18 802beda: b908 cbnz r0, 802bee0 res = ups_metac_service_pdu(ups_test_low_bat); 802bedc: 2002 movs r0, #2 802bede: e017 b.n 802bf10 strcat(bufOut, "Тест запущен!"); if(res == -1) strcat(bufOut, "Тест не удалось запустить!"); *lenBufOut = strlen(bufOut); } else if (strncmp(tempValue, "\"time\"", 6) == 0){ 802bee0: 4668 mov r0, sp 802bee2: 491d ldr r1, [pc, #116] ; (802bf58 ) 802bee4: 2206 movs r2, #6 802bee6: f7f6 f845 bl 8021f74 802beea: bb28 cbnz r0, 802bf38 valueLen = strpbrk(tempValue, ":"); 802beec: 4915 ldr r1, [pc, #84] ; (802bf44 ) 802beee: 4668 mov r0, sp 802bef0: f7f6 f8c8 bl 8022084 802bef4: 4606 mov r6, r0 strncpy(tempValue2, (valueLen+2), (strlen(valueLen)-2)); 802bef6: f7f5 ffdb bl 8021eb0 802befa: 1cb1 adds r1, r6, #2 802befc: 1e82 subs r2, r0, #2 802befe: a805 add r0, sp, #20 802bf00: f7f6 f88e bl 8022020 TimeParam = atoi(tempValue2); 802bf04: a805 add r0, sp, #20 802bf06: f7f5 fcdb bl 80218c0 802bf0a: 4b14 ldr r3, [pc, #80] ; (802bf5c ) 802bf0c: 8018 strh r0, [r3, #0] res = ups_metac_service_pdu(ups_test_time); 802bf0e: 2003 movs r0, #3 802bf10: f7fd f85a bl 8028fc8 802bf14: b2c6 uxtb r6, r0 if(res == 1 || res == 0) 802bf16: 2e01 cmp r6, #1 802bf18: d803 bhi.n 802bf22 strcat(bufOut, "Тест запущен!"); 802bf1a: 4620 mov r0, r4 802bf1c: 4910 ldr r1, [pc, #64] ; (802bf60 ) 802bf1e: f7f5 fe55 bl 8021bcc if(res == -1) 802bf22: b276 sxtb r6, r6 802bf24: 1c73 adds r3, r6, #1 802bf26: d103 bne.n 802bf30 strcat(bufOut, "Тест не удалось запустить!"); 802bf28: 490e ldr r1, [pc, #56] ; (802bf64 ) 802bf2a: 4620 mov r0, r4 802bf2c: f7f5 fe4e bl 8021bcc *lenBufOut = strlen(bufOut); 802bf30: 4620 mov r0, r4 802bf32: f7f5 ffbd bl 8021eb0 802bf36: 8028 strh r0, [r5, #0] } } 802bf38: b00a add sp, #40 ; 0x28 802bf3a: bd70 pop {r4, r5, r6, pc} 802bf3c: 08044a3c .word 0x08044a3c 802bf40: 080408b5 .word 0x080408b5 802bf44: 08044c85 .word 0x08044c85 802bf48: 080408ba .word 0x080408ba 802bf4c: 080408c1 .word 0x080408c1 802bf50: 080408e0 .word 0x080408e0 802bf54: 08040913 .word 0x08040913 802bf58: 08040969 .word 0x08040969 802bf5c: 20000b48 .word 0x20000b48 802bf60: 0804091f .word 0x0804091f 802bf64: 08040938 .word 0x08040938 0802bf68 : /** * @brief Выклюение UPS */ void HTTP_UPSshutdown(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802bf68: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802bf6c: b09a sub sp, #104 ; 0x68 char *valueLenEnd = 0; char tempValue[50]; char tempValue2[50]; int8_t res = 0; memset(tempValue, 0, 50); 802bf6e: 2232 movs r2, #50 ; 0x32 /** * @brief Выклюение UPS */ void HTTP_UPSshutdown(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802bf70: 4605 mov r5, r0 802bf72: 460c mov r4, r1 char *valueLenEnd = 0; char tempValue[50]; char tempValue2[50]; int8_t res = 0; memset(tempValue, 0, 50); 802bf74: 4668 mov r0, sp 802bf76: 2100 movs r1, #0 /** * @brief Выклюение UPS */ void HTTP_UPSshutdown(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802bf78: 461e mov r6, r3 char *valueLenEnd = 0; char tempValue[50]; char tempValue2[50]; int8_t res = 0; memset(tempValue, 0, 50); 802bf7a: f7f5 fdc1 bl 8021b00 strcpy(bufOut, HTTP_200_OK); 802bf7e: 4940 ldr r1, [pc, #256] ; (802c080 ) 802bf80: 4620 mov r0, r4 802bf82: f7f5 ff37 bl 8021df4 value = strstr(bufIn, "func"); 802bf86: 4628 mov r0, r5 802bf88: 493e ldr r1, [pc, #248] ; (802c084 ) 802bf8a: f7f6 fa11 bl 80223b0 valueLen = strpbrk(value, ":"); 802bf8e: 493e ldr r1, [pc, #248] ; (802c088 ) 802bf90: f7f6 f878 bl 8022084 802bf94: 4605 mov r5, r0 strncpy(tempValue, (valueLen+1), (strlen(valueLen)-2)); 802bf96: f7f5 ff8b bl 8021eb0 802bf9a: 1c69 adds r1, r5, #1 802bf9c: 1e82 subs r2, r0, #2 802bf9e: 4668 mov r0, sp 802bfa0: f7f6 f83e bl 8022020 if (strcmp(tempValue, "\"cancel\"") == 0){ 802bfa4: 4668 mov r0, sp 802bfa6: 4939 ldr r1, [pc, #228] ; (802c08c ) 802bfa8: f7f5 fe36 bl 8021c18 802bfac: b978 cbnz r0, 802bfce res = ups_metac_service_pdu(ups_cancel_shut_down); 802bfae: 2007 movs r0, #7 802bfb0: f7fd f80a bl 8028fc8 802bfb4: b2c5 uxtb r5, r0 if(res == 1 || res == 0) 802bfb6: 2d01 cmp r5, #1 802bfb8: d803 bhi.n 802bfc2 strcat(bufOut, "Выключение ИБП отменено!"); 802bfba: 4620 mov r0, r4 802bfbc: 4934 ldr r1, [pc, #208] ; (802c090 ) 802bfbe: f7f5 fe05 bl 8021bcc if(res == -1) 802bfc2: b26d sxtb r5, r5 802bfc4: 1c68 adds r0, r5, #1 802bfc6: d154 bne.n 802c072 strcat(bufOut, "Выключение ИБП не удалось отменить!"); 802bfc8: 4620 mov r0, r4 802bfca: 4932 ldr r1, [pc, #200] ; (802c094 ) 802bfcc: e04f b.n 802c06e *lenBufOut = strlen(bufOut); } else if (strncmp(tempValue, "\"off\"", 5) == 0){ 802bfce: 4668 mov r0, sp 802bfd0: 4931 ldr r1, [pc, #196] ; (802c098 ) 802bfd2: 2205 movs r2, #5 802bfd4: f7f5 ffce bl 8021f74 802bfd8: 4605 mov r5, r0 802bfda: 2800 cmp r0, #0 802bfdc: d14d bne.n 802c07a value = strstr(tempValue, "after"); 802bfde: 492f ldr r1, [pc, #188] ; (802c09c ) 802bfe0: 4668 mov r0, sp 802bfe2: f7f6 f9e5 bl 80223b0 valueLen = strpbrk(value, ":"); 802bfe6: 4928 ldr r1, [pc, #160] ; (802c088 ) if(res == -1) strcat(bufOut, "Выключение ИБП не удалось отменить!"); *lenBufOut = strlen(bufOut); } else if (strncmp(tempValue, "\"off\"", 5) == 0){ value = strstr(tempValue, "after"); 802bfe8: 4680 mov r8, r0 valueLen = strpbrk(value, ":"); 802bfea: f7f6 f84b bl 8022084 valueLenEnd = strpbrk(value, ","); 802bfee: 492c ldr r1, [pc, #176] ; (802c0a0 ) strcat(bufOut, "Выключение ИБП не удалось отменить!"); *lenBufOut = strlen(bufOut); } else if (strncmp(tempValue, "\"off\"", 5) == 0){ value = strstr(tempValue, "after"); valueLen = strpbrk(value, ":"); 802bff0: 4607 mov r7, r0 valueLenEnd = strpbrk(value, ","); 802bff2: 4640 mov r0, r8 802bff4: f7f6 f846 bl 8022084 memset(tempValue2, 0, 50); 802bff8: 4629 mov r1, r5 802bffa: 2232 movs r2, #50 ; 0x32 *lenBufOut = strlen(bufOut); } else if (strncmp(tempValue, "\"off\"", 5) == 0){ value = strstr(tempValue, "after"); valueLen = strpbrk(value, ":"); valueLenEnd = strpbrk(value, ","); 802bffc: 4680 mov r8, r0 memset(tempValue2, 0, 50); 802bffe: a80d add r0, sp, #52 ; 0x34 802c000: f7f5 fd7e bl 8021b00 strncpy(tempValue2, (valueLen+2), (valueLenEnd - valueLen - 2)); 802c004: ebc7 0208 rsb r2, r7, r8 802c008: 3a02 subs r2, #2 802c00a: 1cb9 adds r1, r7, #2 802c00c: a80d add r0, sp, #52 ; 0x34 802c00e: f7f6 f807 bl 8022020 TimeParam = atoi(tempValue2); 802c012: a80d add r0, sp, #52 ; 0x34 802c014: f7f5 fc54 bl 80218c0 802c018: 4b22 ldr r3, [pc, #136] ; (802c0a4 ) value = strstr(tempValue, "to"); 802c01a: 4923 ldr r1, [pc, #140] ; (802c0a8 ) value = strstr(tempValue, "after"); valueLen = strpbrk(value, ":"); valueLenEnd = strpbrk(value, ","); memset(tempValue2, 0, 50); strncpy(tempValue2, (valueLen+2), (valueLenEnd - valueLen - 2)); TimeParam = atoi(tempValue2); 802c01c: 8018 strh r0, [r3, #0] value = strstr(tempValue, "to"); 802c01e: 4668 mov r0, sp 802c020: f7f6 f9c6 bl 80223b0 valueLen = strpbrk(value, ":"); 802c024: 4918 ldr r1, [pc, #96] ; (802c088 ) 802c026: f7f6 f82d bl 8022084 memset(tempValue2, 0, 50); 802c02a: 4629 mov r1, r5 802c02c: 2232 movs r2, #50 ; 0x32 valueLenEnd = strpbrk(value, ","); memset(tempValue2, 0, 50); strncpy(tempValue2, (valueLen+2), (valueLenEnd - valueLen - 2)); TimeParam = atoi(tempValue2); value = strstr(tempValue, "to"); valueLen = strpbrk(value, ":"); 802c02e: 4607 mov r7, r0 memset(tempValue2, 0, 50); 802c030: a80d add r0, sp, #52 ; 0x34 802c032: f7f5 fd65 bl 8021b00 strncpy(tempValue2, (valueLen+2), (strlen(valueLen) - 2)); 802c036: 4638 mov r0, r7 802c038: f7f5 ff3a bl 8021eb0 802c03c: 1cb9 adds r1, r7, #2 802c03e: 1e82 subs r2, r0, #2 802c040: a80d add r0, sp, #52 ; 0x34 802c042: f7f5 ffed bl 8022020 TimeParam2 = atoi(tempValue2); 802c046: a80d add r0, sp, #52 ; 0x34 802c048: f7f5 fc3a bl 80218c0 802c04c: 4b17 ldr r3, [pc, #92] ; (802c0ac ) 802c04e: 8018 strh r0, [r3, #0] res = ups_metac_service_pdu(ups_shutdown_restore); 802c050: 2006 movs r0, #6 802c052: f7fc ffb9 bl 8028fc8 802c056: b2c5 uxtb r5, r0 if(res == 1 || res == 0) 802c058: 2d01 cmp r5, #1 802c05a: d803 bhi.n 802c064 strcat(bufOut, "Перезагрузка ИБП!"); 802c05c: 4620 mov r0, r4 802c05e: 4914 ldr r1, [pc, #80] ; (802c0b0 ) 802c060: f7f5 fdb4 bl 8021bcc if(res == -1) 802c064: b26d sxtb r5, r5 802c066: 1c69 adds r1, r5, #1 802c068: d103 bne.n 802c072 strcat(bufOut, "Отмена перезагрузки ИБП!"); 802c06a: 4912 ldr r1, [pc, #72] ; (802c0b4 ) 802c06c: 4620 mov r0, r4 802c06e: f7f5 fdad bl 8021bcc *lenBufOut = strlen(bufOut); 802c072: 4620 mov r0, r4 802c074: f7f5 ff1c bl 8021eb0 802c078: 8030 strh r0, [r6, #0] } } 802c07a: b01a add sp, #104 ; 0x68 802c07c: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802c080: 08044a3c .word 0x08044a3c 802c084: 080408b5 .word 0x080408b5 802c088: 08044c85 .word 0x08044c85 802c08c: 08040970 .word 0x08040970 802c090: 08040979 .word 0x08040979 802c094: 080409a7 .word 0x080409a7 802c098: 080409e9 .word 0x080409e9 802c09c: 080409ef .word 0x080409ef 802c0a0: 08039a49 .word 0x08039a49 802c0a4: 20000b48 .word 0x20000b48 802c0a8: 080409f5 .word 0x080409f5 802c0ac: 20000b12 .word 0x20000b12 802c0b0: 080409f8 .word 0x080409f8 802c0b4: 08040a19 .word 0x08040a19 0802c0b8 : /** * @brief Проверка пароля для перехода в режим bootloader * @retval None */ void HTTP_ConfirmBootPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c0b8: b500 push {lr} 802c0ba: b093 sub sp, #76 ; 0x4c 802c0bc: 4601 mov r1, r0 char tempStr[50]; strncpy(tempStr, bufIn, 50); 802c0be: 2232 movs r2, #50 ; 0x32 802c0c0: a805 add r0, sp, #20 802c0c2: f7f5 ffad bl 8022020 char value[20]; uint8_t valueLen; memset(value, 0, 20); 802c0c6: 4668 mov r0, sp 802c0c8: 2100 movs r1, #0 802c0ca: 2214 movs r2, #20 802c0cc: f7f5 fd18 bl 8021b00 //if (strcmp(BOOTLOADER_PASWORD, value) == 0) { // *bufOut = '1'; /* Запускаем задачу отложенной перезагрузки. Контроллер должен успеть отправить ответ серверу о статусе пароля */ HTTP_StartResetTask(true); 802c0d0: 2001 movs r0, #1 802c0d2: f001 fe29 bl 802dd28 /* else *bufOut = '0';*/ //*lenBufOut = 1; } } 802c0d6: b013 add sp, #76 ; 0x4c 802c0d8: bd00 pop {pc} 802c0da: 0000 movs r0, r0 0802c0dc : /* Wrong login or pass, return */ return SEND_REQUIRED_NO; } void HTTP_LOGIN(char *bufOut, uint16_t *lenBufOut) { 802c0dc: b530 push {r4, r5, lr} 802c0de: b093 sub sp, #76 ; 0x4c 802c0e0: 4604 mov r4, r0 802c0e2: 460d mov r5, r1 char tempStr[50]; uint8_t valueLen; char WebLogin[MAX_WEB_LOGIN_LEN]; GetUserLogin(ADMIN, WebLogin, &valueLen); 802c0e4: 2000 movs r0, #0 802c0e6: a902 add r1, sp, #8 802c0e8: f10d 0207 add.w r2, sp, #7 802c0ec: f7fb fe76 bl 8027ddc memset(tempStr, 0, 50); 802c0f0: 2100 movs r1, #0 802c0f2: 2232 movs r2, #50 ; 0x32 802c0f4: a805 add r0, sp, #20 802c0f6: f7f5 fd03 bl 8021b00 /* TODO replace global flag with user-pass-cookie */ Authenticated = true; 802c0fa: 4b1b ldr r3, [pc, #108] ; (802c168 ) 802c0fc: 2201 movs r2, #1 802c0fe: 701a strb r2, [r3, #0] /* Generate cookie */ sprintf(tempStr, "%X", (unsigned int)GetRandomNumber()); 802c100: f7f9 ffe4 bl 80260cc 802c104: 4919 ldr r1, [pc, #100] ; (802c16c ) 802c106: 4602 mov r2, r0 802c108: a805 add r0, sp, #20 802c10a: f7fb fb83 bl 8027814 /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802c10e: a905 add r1, sp, #20 802c110: 4817 ldr r0, [pc, #92] ; (802c170 ) 802c112: f7f5 fe6f bl 8021df4 sprintf(tempStr, "%X", (unsigned int)GetRandomNumber()); /* Set users cookie */ HTTP_SetUserCookie(tempStr, ADMIN); HTTP_UpdateUserLoginTime(ADMIN); 802c116: 2000 movs r0, #0 802c118: f7ff fcce bl 802bab8 /* Send login and cookie back */ strcpy(bufOut, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\nSet-Cookie: uname="); 802c11c: 4915 ldr r1, [pc, #84] ; (802c174 ) 802c11e: 4620 mov r0, r4 802c120: f7f5 fe68 bl 8021df4 strcat(bufOut, WebLogin); 802c124: a902 add r1, sp, #8 802c126: 4620 mov r0, r4 802c128: f7f5 fd50 bl 8021bcc strcat(bufOut, "\r\nSet-Cookie: id="); 802c12c: 4912 ldr r1, [pc, #72] ; (802c178 ) 802c12e: 4620 mov r0, r4 802c130: f7f5 fd4c bl 8021bcc strcat(bufOut, tempStr); 802c134: a905 add r1, sp, #20 802c136: 4620 mov r0, r4 802c138: f7f5 fd48 bl 8021bcc strcat(bufOut, "\r\nSet-Cookie: role=0"); 802c13c: 490f ldr r1, [pc, #60] ; (802c17c ) 802c13e: 4620 mov r0, r4 802c140: f7f5 fd44 bl 8021bcc strcat(bufOut, "\r\nSet-Cookie: auth=0"); 802c144: 490e ldr r1, [pc, #56] ; (802c180 ) 802c146: 4620 mov r0, r4 802c148: f7f5 fd40 bl 8021bcc strcat(bufOut, "\r\n\r\n"); 802c14c: 490d ldr r1, [pc, #52] ; (802c184 ) 802c14e: 4620 mov r0, r4 802c150: f7f5 fd3c bl 8021bcc strcat(bufOut,"\r\n\r\n"); 802c154: 490c ldr r1, [pc, #48] ; (802c188 ) 802c156: 4620 mov r0, r4 802c158: f7f5 fd38 bl 8021bcc *lenBufOut = strlen(bufOut); 802c15c: 4620 mov r0, r4 802c15e: f7f5 fea7 bl 8021eb0 802c162: 8028 strh r0, [r5, #0] } 802c164: b013 add sp, #76 ; 0x4c 802c166: bd30 pop {r4, r5, pc} 802c168: 20000d1a .word 0x20000d1a 802c16c: 080408a6 .word 0x080408a6 802c170: 2000e238 .word 0x2000e238 802c174: 08040a47 .word 0x08040a47 802c178: 08040a83 .word 0x08040a83 802c17c: 08040a95 .word 0x08040a95 802c180: 08040aaa .word 0x08040aaa 802c184: 08040f82 .word 0x08040f82 802c188: 08040abf .word 0x08040abf 0802c18c : /** * @brief * @retval None */ uint8_t GetParamValue(char *inStr, char *paramName, char *paramValue, uint8_t *paramLen) { 802c18c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802c190: 4690 mov r8, r2 802c192: 461f mov r7, r3 char *beginValue = 0; char *endValue = 0; int len = 0; char *strPtr = 0; strPtr = strstr(inStr, paramName); 802c194: f7f6 f90c bl 80223b0 if (strPtr != 0) 802c198: 4605 mov r5, r0 802c19a: b1e0 cbz r0, 802c1d6 { beginValue = strpbrk(strPtr,"="); 802c19c: 490f ldr r1, [pc, #60] ; (802c1dc ) 802c19e: f7f5 ff71 bl 8022084 endValue = strpbrk(strPtr,"&"); 802c1a2: 490f ldr r1, [pc, #60] ; (802c1e0 ) strPtr = strstr(inStr, paramName); if (strPtr != 0) { beginValue = strpbrk(strPtr,"="); 802c1a4: 4606 mov r6, r0 endValue = strpbrk(strPtr,"&"); 802c1a6: 4628 mov r0, r5 802c1a8: f7f5 ff6c bl 8022084 if (endValue == 0) 802c1ac: 4604 mov r4, r0 802c1ae: b920 cbnz r0, 802c1ba endValue = strpbrk(strPtr," "); 802c1b0: 4628 mov r0, r5 802c1b2: 490c ldr r1, [pc, #48] ; (802c1e4 ) 802c1b4: f7f5 ff66 bl 8022084 802c1b8: 4604 mov r4, r0 len = endValue - beginValue - 1; 802c1ba: 1ba5 subs r5, r4, r6 802c1bc: 3d01 subs r5, #1 strncpy(paramValue, beginValue + 1, len); 802c1be: 4640 mov r0, r8 802c1c0: 1c71 adds r1, r6, #1 802c1c2: 462a mov r2, r5 802c1c4: f7f5 ff2c bl 8022020 *endValue = '0'; 802c1c8: 2330 movs r3, #48 ; 0x30 802c1ca: 7023 strb r3, [r4, #0] *beginValue = '0'; *paramLen = len; return 1; 802c1cc: 2001 movs r0, #1 if (endValue == 0) endValue = strpbrk(strPtr," "); len = endValue - beginValue - 1; strncpy(paramValue, beginValue + 1, len); *endValue = '0'; *beginValue = '0'; 802c1ce: 7033 strb r3, [r6, #0] *paramLen = len; 802c1d0: 703d strb r5, [r7, #0] return 1; 802c1d2: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} } else { *paramLen = 0; 802c1d6: 7038 strb r0, [r7, #0] return 0; } } 802c1d8: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802c1dc: 08040c35 .word 0x08040c35 802c1e0: 08040b2b .word 0x08040b2b 802c1e4: 080399a6 .word 0x080399a6 0802c1e8 : /** * @brief Проверка пароля для входа в Web * @retval None */ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c1e8: b5f0 push {r4, r5, r6, r7, lr} 802c1ea: b0a9 sub sp, #164 ; 0xa4 802c1ec: 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); 802c1ee: 2214 movs r2, #20 /** * @brief Проверка пароля для входа в Web * @retval None */ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c1f0: 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); 802c1f2: a807 add r0, sp, #28 802c1f4: 2100 movs r1, #0 /** * @brief Проверка пароля для входа в Web * @retval None */ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c1f6: 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); 802c1f8: f7f5 fc82 bl 8021b00 memset(password, 0, 20); 802c1fc: 2100 movs r1, #0 802c1fe: 2214 movs r2, #20 802c200: a80c add r0, sp, #48 ; 0x30 802c202: f7f5 fc7d bl 8021b00 memset(tempStr, 0, 50); 802c206: 2100 movs r1, #0 802c208: 2232 movs r2, #50 ; 0x32 802c20a: a81b add r0, sp, #108 ; 0x6c 802c20c: f7f5 fc78 bl 8021b00 /* Get first 50 bytes of string */ strncpy(tempStr, bufIn, 49); 802c210: 2231 movs r2, #49 ; 0x31 802c212: 4621 mov r1, r4 802c214: a81b add r0, sp, #108 ; 0x6c 802c216: f7f5 ff03 bl 8022020 /* Add " " to the string in order GetParamValue() can be able to parse the param */ strcat(tempStr, " "); if (GetParamValue(tempStr, "login=", login, &valueLen) && 802c21a: 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, " "); 802c21e: 4941 ldr r1, [pc, #260] ; (802c324 ) 802c220: a81b add r0, sp, #108 ; 0x6c 802c222: f7f5 fcd3 bl 8021bcc if (GetParamValue(tempStr, "login=", login, &valueLen) && 802c226: a81b add r0, sp, #108 ; 0x6c 802c228: 493f ldr r1, [pc, #252] ; (802c328 ) 802c22a: aa07 add r2, sp, #28 802c22c: 4633 mov r3, r6 802c22e: f7ff ffad bl 802c18c 802c232: b920 cbnz r0, 802c23e } } /* No valid login and pass found */ /* TODO replace global flag with user-pass-cookie*/ Authenticated = false; 802c234: 4b3d ldr r3, [pc, #244] ; (802c32c ) 802c236: 2200 movs r2, #0 802c238: 701a strb r2, [r3, #0] /* Wrong login or pass, return */ return SEND_REQUIRED_NO; 802c23a: 2001 movs r0, #1 802c23c: e070 b.n 802c320 /* 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)) 802c23e: a81b add r0, sp, #108 ; 0x6c 802c240: 493b ldr r1, [pc, #236] ; (802c330 ) 802c242: aa0c add r2, sp, #48 ; 0x30 802c244: 4633 mov r3, r6 802c246: f7ff ffa1 bl 802c18c 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) && 802c24a: 2800 cmp r0, #0 802c24c: d0f2 beq.n 802c234 802c24e: 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); 802c250: 4620 mov r0, r4 802c252: a904 add r1, sp, #16 802c254: 4632 mov r2, r6 802c256: f7fb fdc1 bl 8027ddc GetUserPassword(user_id, WebPassword, &valueLen); 802c25a: 4620 mov r0, r4 802c25c: a901 add r1, sp, #4 802c25e: 4632 mov r2, r6 802c260: f7fb fdd2 bl 8027e08 /* Check login and password */ if ((strncmp(WebLogin, login, MAX_WEB_LOGIN_LEN) == 0) && 802c264: a804 add r0, sp, #16 802c266: a907 add r1, sp, #28 802c268: 220b movs r2, #11 802c26a: f7f5 fe83 bl 8021f74 802c26e: 2800 cmp r0, #0 802c270: d151 bne.n 802c316 (strncmp(WebPassword, password, MAX_WEB_PASSWD_LEN) == 0)) { 802c272: a801 add r0, sp, #4 802c274: a90c add r1, sp, #48 ; 0x30 802c276: 220b movs r2, #11 802c278: f7f5 fe7c bl 8021f74 GetUserLogin(user_id, WebLogin, &valueLen); GetUserPassword(user_id, WebPassword, &valueLen); /* Check login and password */ if ((strncmp(WebLogin, login, MAX_WEB_LOGIN_LEN) == 0) && 802c27c: 2800 cmp r0, #0 802c27e: d14a bne.n 802c316 if (user_id >= 1) { } /* TODO replace global flag with user-pass-cookie */ Authenticated = true; 802c280: 4b2a ldr r3, [pc, #168] ; (802c32c ) 802c282: 2201 movs r2, #1 802c284: 701a strb r2, [r3, #0] /* Generate cookie */ sprintf(tempStr, "%X", (unsigned int)GetRandomNumber()); 802c286: f7f9 ff21 bl 80260cc 802c28a: 492a ldr r1, [pc, #168] ; (802c334 ) 802c28c: 4602 mov r2, r0 802c28e: a81b add r0, sp, #108 ; 0x6c 802c290: f7fb fac0 bl 8027814 /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802c294: 4b28 ldr r3, [pc, #160] ; (802c338 ) 802c296: 2014 movs r0, #20 802c298: fb00 3004 mla r0, r0, r4, r3 802c29c: a91b add r1, sp, #108 ; 0x6c 802c29e: f7f5 fda9 bl 8021df4 sprintf(tempStr, "%X", (unsigned int)GetRandomNumber()); /* Set users cookie */ HTTP_SetUserCookie(tempStr, user_id); HTTP_UpdateUserLoginTime(user_id); 802c2a2: 4620 mov r0, r4 802c2a4: f7ff fc08 bl 802bab8 /* Send login and cookie back */ strcpy(bufOut, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\nSet-Cookie: uname="); 802c2a8: 4924 ldr r1, [pc, #144] ; (802c33c ) 802c2aa: 4628 mov r0, r5 802c2ac: f7f5 fda2 bl 8021df4 strcat(bufOut, WebLogin); 802c2b0: a904 add r1, sp, #16 802c2b2: 4628 mov r0, r5 802c2b4: f7f5 fc8a bl 8021bcc strcat(bufOut, "\r\nSet-Cookie: id="); 802c2b8: 4921 ldr r1, [pc, #132] ; (802c340 ) 802c2ba: 4628 mov r0, r5 802c2bc: f7f5 fc86 bl 8021bcc strcat(bufOut, tempStr); 802c2c0: a91b add r1, sp, #108 ; 0x6c 802c2c2: 4628 mov r0, r5 802c2c4: f7f5 fc82 bl 8021bcc sprintf(tempStr, "%d", user_id); 802c2c8: 4622 mov r2, r4 802c2ca: 491e ldr r1, [pc, #120] ; (802c344 ) 802c2cc: a81b add r0, sp, #108 ; 0x6c 802c2ce: f7fb faa1 bl 8027814 strcat(bufOut, "\r\nSet-Cookie: role="); 802c2d2: 491d ldr r1, [pc, #116] ; (802c348 ) 802c2d4: 4628 mov r0, r5 802c2d6: f7f5 fc79 bl 8021bcc strcat(bufOut, tempStr); 802c2da: a91b add r1, sp, #108 ; 0x6c 802c2dc: 4628 mov r0, r5 802c2de: f7f5 fc75 bl 8021bcc strcat(bufOut, "\r\n\r\n"); 802c2e2: 491a ldr r1, [pc, #104] ; (802c34c ) 802c2e4: 4628 mov r0, r5 802c2e6: f7f5 fc71 bl 8021bcc strcat(bufOut,"\r\n\r\n"); 802c2ea: 4919 ldr r1, [pc, #100] ; (802c350 ) 802c2ec: 4628 mov r0, r5 802c2ee: f7f5 fc6d bl 8021bcc *lenBufOut = strlen(bufOut); 802c2f2: 4628 mov r0, r5 802c2f4: f7f5 fddc bl 8021eb0 switch (user_id) { case 0: snprintf(buf, sizeof(buf), "Администратор"); break; case 1: snprintf(buf, sizeof(buf), "Пользователь"); 802c2f8: 2128 movs r1, #40 ; 0x28 strcat(bufOut, "\r\n\r\n"); strcat(bufOut,"\r\n\r\n"); *lenBufOut = strlen(bufOut); switch (user_id) { 802c2fa: 2c01 cmp r4, #1 case 0: snprintf(buf, sizeof(buf), "Администратор"); 802c2fc: bf14 ite ne 802c2fe: 4a15 ldrne r2, [pc, #84] ; (802c354 ) break; case 1: snprintf(buf, sizeof(buf), "Пользователь"); 802c300: 4a15 ldreq r2, [pc, #84] ; (802c358 ) strcat(bufOut, "\r\nSet-Cookie: role="); strcat(bufOut, tempStr); strcat(bufOut, "\r\n\r\n"); strcat(bufOut,"\r\n\r\n"); *lenBufOut = strlen(bufOut); 802c302: 8038 strh r0, [r7, #0] switch (user_id) { case 0: snprintf(buf, sizeof(buf), "Администратор"); break; case 1: snprintf(buf, sizeof(buf), "Пользователь"); 802c304: a811 add r0, sp, #68 ; 0x44 802c306: f7fb fa67 bl 80277d8 default: snprintf(buf, sizeof(buf), "", login); break; } log_event_data(LOG_LOGIN, buf); 802c30a: 2004 movs r0, #4 802c30c: a911 add r1, sp, #68 ; 0x44 802c30e: f7fd fb3f bl 8029990 /* Запускаем задачу-таймер логаута. */ /* TODO отправить ответ серверу о статусе пароля */ return SEND_REQUIRED_YES; 802c312: 2000 movs r0, #0 802c314: e004 b.n 802c320 strcat(tempStr, " "); if (GetParamValue(tempStr, "login=", login, &valueLen) && GetParamValue(tempStr, "password=", password, &valueLen)) { for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { 802c316: 3401 adds r4, #1 802c318: b2e4 uxtb r4, r4 802c31a: 2c02 cmp r4, #2 802c31c: d08a beq.n 802c234 802c31e: e797 b.n 802c250 /* TODO replace global flag with user-pass-cookie*/ Authenticated = false; /* Wrong login or pass, return */ return SEND_REQUIRED_NO; } 802c320: b029 add sp, #164 ; 0xa4 802c322: bdf0 pop {r4, r5, r6, r7, pc} 802c324: 080399a6 .word 0x080399a6 802c328: 08040b2d .word 0x08040b2d 802c32c: 20000d1a .word 0x20000d1a 802c330: 08040b34 .word 0x08040b34 802c334: 080408a6 .word 0x080408a6 802c338: 2000e238 .word 0x2000e238 802c33c: 08040a47 .word 0x08040a47 802c340: 08040a83 .word 0x08040a83 802c344: 08039869 .word 0x08039869 802c348: 08040b3e .word 0x08040b3e 802c34c: 08040f82 .word 0x08040f82 802c350: 08040abf .word 0x08040abf 802c354: 08039980 .word 0x08039980 802c358: 08040b52 .word 0x08040b52 0802c35c : /** * @brief * @retval None */ void HTTP_SetInfo(char *buf, uint16_t lenBuf) { 802c35c: b530 push {r4, r5, lr} uint8_t valueLen = 0; 802c35e: 2400 movs r4, #0 /** * @brief * @retval None */ void HTTP_SetInfo(char *buf, uint16_t lenBuf) { 802c360: b0bb sub sp, #236 ; 0xec 802c362: 4605 mov r5, r0 char value[110]; char str[110]; // ClearParamString(buf); memset(value, 0, len); 802c364: 4621 mov r1, r4 802c366: 226e movs r2, #110 ; 0x6e 802c368: a802 add r0, sp, #8 * @brief * @retval None */ void HTTP_SetInfo(char *buf, uint16_t lenBuf) { uint8_t valueLen = 0; 802c36a: f88d 4007 strb.w r4, [sp, #7] char value[110]; char str[110]; // ClearParamString(buf); memset(value, 0, len); 802c36e: f7f5 fbc7 bl 8021b00 /* Владелец */ GetParamValue(buf, "owner=", value, &valueLen); 802c372: f10d 0307 add.w r3, sp, #7 802c376: aa02 add r2, sp, #8 802c378: 4628 mov r0, r5 802c37a: 491e ldr r1, [pc, #120] ; (802c3f4 ) 802c37c: f7ff ff06 bl 802c18c url_decode(str, sizeof(str), value); 802c380: 216e movs r1, #110 ; 0x6e 802c382: aa02 add r2, sp, #8 802c384: a81e add r0, sp, #120 ; 0x78 802c386: f7fc fedb bl 8029140 SetOwner(str); 802c38a: a81e add r0, sp, #120 ; 0x78 802c38c: f7fb ff68 bl 8028260 memset(value, 0, len); 802c390: 4621 mov r1, r4 802c392: 226e movs r2, #110 ; 0x6e 802c394: a802 add r0, sp, #8 802c396: f7f5 fbb3 bl 8021b00 /* Владелец */ GetParamValue(buf, "sysLocation=", value, &valueLen); 802c39a: f10d 0307 add.w r3, sp, #7 802c39e: aa02 add r2, sp, #8 802c3a0: 4628 mov r0, r5 802c3a2: 4915 ldr r1, [pc, #84] ; (802c3f8 ) 802c3a4: f7ff fef2 bl 802c18c url_decode(str, sizeof(str), value); 802c3a8: 216e movs r1, #110 ; 0x6e 802c3aa: aa02 add r2, sp, #8 802c3ac: a81e add r0, sp, #120 ; 0x78 802c3ae: f7fc fec7 bl 8029140 SetLocation(str); 802c3b2: a81e add r0, sp, #120 ; 0x78 802c3b4: f7fb ff64 bl 8028280 memset(value, 0, len); 802c3b8: 4621 mov r1, r4 802c3ba: 226e movs r2, #110 ; 0x6e 802c3bc: a802 add r0, sp, #8 802c3be: f7f5 fb9f bl 8021b00 /* Комментарий */ GetParamValue(buf, "comment=", value, &valueLen); 802c3c2: f10d 0307 add.w r3, sp, #7 802c3c6: aa02 add r2, sp, #8 802c3c8: 4628 mov r0, r5 802c3ca: 490c ldr r1, [pc, #48] ; (802c3fc ) 802c3cc: f7ff fede bl 802c18c url_decode(str, sizeof(str), value); 802c3d0: 216e movs r1, #110 ; 0x6e 802c3d2: aa02 add r2, sp, #8 802c3d4: a81e add r0, sp, #120 ; 0x78 802c3d6: f7fc feb3 bl 8029140 SetComment(str); 802c3da: a81e add r0, sp, #120 ; 0x78 802c3dc: f7fb ff5e bl 802829c memset(value, 0, len); 802c3e0: 4621 mov r1, r4 802c3e2: 226e movs r2, #110 ; 0x6e 802c3e4: a802 add r0, sp, #8 802c3e6: f7f5 fb8b bl 8021b00 HTTP_SaveSettings(); 802c3ea: f001 fc91 bl 802dd10 } 802c3ee: b03b add sp, #236 ; 0xec 802c3f0: bd30 pop {r4, r5, pc} 802c3f2: bf00 nop 802c3f4: 08040b6b .word 0x08040b6b 802c3f8: 08040b72 .word 0x08040b72 802c3fc: 08040b7f .word 0x08040b7f 0802c400 : /** * @brief * @retval None */ void HTTP_SetSettings(char *buf, uint16_t lenBuf) { 802c400: b530 push {r4, r5, lr} uint8_t valueLen = 0; 802c402: 2500 movs r5, #0 /** * @brief * @retval None */ void HTTP_SetSettings(char *buf, uint16_t lenBuf) { 802c404: b0a3 sub sp, #140 ; 0x8c 802c406: 4604 mov r4, r0 //printf(buf); //ClearParamString(buf); memset(value, 0, len); 802c408: 2240 movs r2, #64 ; 0x40 802c40a: 4629 mov r1, r5 802c40c: a802 add r0, sp, #8 * @brief * @retval None */ void HTTP_SetSettings(char *buf, uint16_t lenBuf) { uint8_t valueLen = 0; 802c40e: f88d 5007 strb.w r5, [sp, #7] //printf(buf); //ClearParamString(buf); memset(value, 0, len); 802c412: f7f5 fb75 bl 8021b00 memset(str, 0, MAX_WEB_PARAM_LEN); 802c416: 2240 movs r2, #64 ; 0x40 802c418: 4629 mov r1, r5 802c41a: a812 add r0, sp, #72 ; 0x48 802c41c: f7f5 fb70 bl 8021b00 /* SNMP */ GetParamValue(buf, "read_community=", value, &valueLen); 802c420: f10d 0307 add.w r3, sp, #7 802c424: 49b5 ldr r1, [pc, #724] ; (802c6fc ) 802c426: aa02 add r2, sp, #8 802c428: 4620 mov r0, r4 802c42a: f7ff feaf bl 802c18c SetReadCommunity(value); 802c42e: a802 add r0, sp, #8 802c430: f7fb fec4 bl 80281bc memset(value, 0, len); 802c434: 2240 movs r2, #64 ; 0x40 802c436: 4629 mov r1, r5 802c438: a802 add r0, sp, #8 802c43a: f7f5 fb61 bl 8021b00 GetParamValue(buf, "write_community=", value, &valueLen); 802c43e: f10d 0307 add.w r3, sp, #7 802c442: 49af ldr r1, [pc, #700] ; (802c700 ) 802c444: aa02 add r2, sp, #8 802c446: 4620 mov r0, r4 802c448: f7ff fea0 bl 802c18c SetWriteCommunity(value); 802c44c: a802 add r0, sp, #8 802c44e: f7fb febb bl 80281c8 memset(value, 0, len); 802c452: 2240 movs r2, #64 ; 0x40 802c454: 4629 mov r1, r5 802c456: a802 add r0, sp, #8 802c458: f7f5 fb52 bl 8021b00 GetParamValue(buf, "managerIP=", value, &valueLen); 802c45c: f10d 0307 add.w r3, sp, #7 802c460: 49a8 ldr r1, [pc, #672] ; (802c704 ) 802c462: aa02 add r2, sp, #8 802c464: 4620 mov r0, r4 802c466: f7ff fe91 bl 802c18c SetManagerIp(value); 802c46a: a802 add r0, sp, #8 802c46c: f7fb feb2 bl 80281d4 memset(value, 0, len); 802c470: 2240 movs r2, #64 ; 0x40 802c472: 4629 mov r1, r5 802c474: a802 add r0, sp, #8 802c476: f7f5 fb43 bl 8021b00 GetParamValue(buf, "managerIP2=", value, &valueLen); 802c47a: f10d 0307 add.w r3, sp, #7 802c47e: 49a2 ldr r1, [pc, #648] ; (802c708 ) 802c480: aa02 add r2, sp, #8 802c482: 4620 mov r0, r4 802c484: f7ff fe82 bl 802c18c SetManagerIp2(value); 802c488: a802 add r0, sp, #8 802c48a: f7fb feb1 bl 80281f0 memset(value, 0, len); 802c48e: 2240 movs r2, #64 ; 0x40 802c490: 4629 mov r1, r5 802c492: a802 add r0, sp, #8 802c494: f7f5 fb34 bl 8021b00 GetParamValue(buf, "managerIP3=", value, &valueLen); 802c498: f10d 0307 add.w r3, sp, #7 802c49c: 499b ldr r1, [pc, #620] ; (802c70c ) 802c49e: aa02 add r2, sp, #8 802c4a0: 4620 mov r0, r4 802c4a2: f7ff fe73 bl 802c18c SetManagerIp3(value); 802c4a6: a802 add r0, sp, #8 802c4a8: f7fb feb0 bl 802820c memset(value, 0, len); 802c4ac: 2240 movs r2, #64 ; 0x40 802c4ae: 4629 mov r1, r5 802c4b0: a802 add r0, sp, #8 802c4b2: f7f5 fb25 bl 8021b00 GetParamValue(buf, "managerIP4=", value, &valueLen); 802c4b6: f10d 0307 add.w r3, sp, #7 802c4ba: 4995 ldr r1, [pc, #596] ; (802c710 ) 802c4bc: aa02 add r2, sp, #8 802c4be: 4620 mov r0, r4 802c4c0: f7ff fe64 bl 802c18c SetManagerIp4(value); 802c4c4: a802 add r0, sp, #8 802c4c6: f7fb feaf bl 8028228 memset(value, 0, len); 802c4ca: 2240 movs r2, #64 ; 0x40 802c4cc: 4629 mov r1, r5 802c4ce: a802 add r0, sp, #8 802c4d0: f7f5 fb16 bl 8021b00 GetParamValue(buf, "managerIP5=", value, &valueLen); 802c4d4: f10d 0307 add.w r3, sp, #7 802c4d8: 498e ldr r1, [pc, #568] ; (802c714 ) 802c4da: aa02 add r2, sp, #8 802c4dc: 4620 mov r0, r4 802c4de: f7ff fe55 bl 802c18c SetManagerIp5(value); 802c4e2: a802 add r0, sp, #8 802c4e4: f7fb feae bl 8028244 memset(value, 0, len); 802c4e8: 2240 movs r2, #64 ; 0x40 802c4ea: 4629 mov r1, r5 802c4ec: a802 add r0, sp, #8 802c4ee: f7f5 fb07 bl 8021b00 /* Сетевые параметры */ GetParamValue(buf, "dhcp=", value, &valueLen); 802c4f2: 4989 ldr r1, [pc, #548] ; (802c718 ) 802c4f4: aa02 add r2, sp, #8 802c4f6: f10d 0307 add.w r3, sp, #7 802c4fa: 4620 mov r0, r4 802c4fc: f7ff fe46 bl 802c18c SetDhcpStateStr(value); 802c500: a802 add r0, sp, #8 802c502: f7fb fe2d bl 8028160 if (strncmp(value, "on", 2) != 0) // Если dhcp off устанавливаем параметры 802c506: a802 add r0, sp, #8 802c508: 4984 ldr r1, [pc, #528] ; (802c71c ) 802c50a: 2202 movs r2, #2 802c50c: f7f5 fd32 bl 8021f74 802c510: 2800 cmp r0, #0 802c512: d031 beq.n 802c578 { memset(value, 0, len); 802c514: 4629 mov r1, r5 802c516: 2240 movs r2, #64 ; 0x40 802c518: a802 add r0, sp, #8 802c51a: f7f5 faf1 bl 8021b00 GetParamValue(buf, "ipaddr=", value, &valueLen); 802c51e: f10d 0307 add.w r3, sp, #7 802c522: 497f ldr r1, [pc, #508] ; (802c720 ) 802c524: aa02 add r2, sp, #8 802c526: 4620 mov r0, r4 802c528: f7ff fe30 bl 802c18c SetIPStr(value); 802c52c: a802 add r0, sp, #8 802c52e: f7fb fe05 bl 802813c memset(value, 0, len); 802c532: 4629 mov r1, r5 802c534: 2240 movs r2, #64 ; 0x40 802c536: a802 add r0, sp, #8 802c538: f7f5 fae2 bl 8021b00 GetParamValue(buf, "gw=", value, &valueLen); 802c53c: f10d 0307 add.w r3, sp, #7 802c540: 4978 ldr r1, [pc, #480] ; (802c724 ) 802c542: aa02 add r2, sp, #8 802c544: 4620 mov r0, r4 802c546: f7ff fe21 bl 802c18c SetGatewayStr(value); 802c54a: a802 add r0, sp, #8 802c54c: f7fb fdfc bl 8028148 memset(value, 0, len); 802c550: 4629 mov r1, r5 802c552: 2240 movs r2, #64 ; 0x40 802c554: a802 add r0, sp, #8 802c556: f7f5 fad3 bl 8021b00 GetParamValue(buf, "mask=", value, &valueLen); 802c55a: 4973 ldr r1, [pc, #460] ; (802c728 ) 802c55c: aa02 add r2, sp, #8 802c55e: f10d 0307 add.w r3, sp, #7 802c562: 4620 mov r0, r4 802c564: f7ff fe12 bl 802c18c SetMaskStr(value); 802c568: a802 add r0, sp, #8 802c56a: f7fb fdf3 bl 8028154 memset(value, 0, len); 802c56e: a802 add r0, sp, #8 802c570: 4629 mov r1, r5 802c572: 2240 movs r2, #64 ; 0x40 802c574: f7f5 fac4 bl 8021b00 } memset(value, 0, len); 802c578: 2100 movs r1, #0 802c57a: 2240 movs r2, #64 ; 0x40 802c57c: a802 add r0, sp, #8 802c57e: f7f5 fabf bl 8021b00 GetParamValue(&buf[555], "auth=", value, &valueLen); 802c582: f10d 0307 add.w r3, sp, #7 802c586: 4969 ldr r1, [pc, #420] ; (802c72c ) 802c588: aa02 add r2, sp, #8 802c58a: f204 202b addw r0, r4, #555 ; 0x22b 802c58e: f7ff fdfd bl 802c18c SetAuthEnableStateStr(value); 802c592: a802 add r0, sp, #8 802c594: f7fb feba bl 802830c memset(value, 0, len); 802c598: 2100 movs r1, #0 802c59a: 2240 movs r2, #64 ; 0x40 802c59c: a802 add r0, sp, #8 802c59e: f7f5 faaf bl 8021b00 if (strncmp(value, "on", 2) == 0){ 802c5a2: a802 add r0, sp, #8 802c5a4: 495d ldr r1, [pc, #372] ; (802c71c ) 802c5a6: 2202 movs r2, #2 802c5a8: f7f5 fce4 bl 8021f74 802c5ac: 4605 mov r5, r0 802c5ae: 2800 cmp r0, #0 802c5b0: d152 bne.n 802c658 /* параметры RADIUS*/ GetParamValue(buf, "rs_enabled=", value, &valueLen); 802c5b2: f10d 0307 add.w r3, sp, #7 802c5b6: 495e ldr r1, [pc, #376] ; (802c730 ) 802c5b8: aa02 add r2, sp, #8 802c5ba: 4620 mov r0, r4 802c5bc: f7ff fde6 bl 802c18c SetRDSEnableStateStr(value); 802c5c0: a802 add r0, sp, #8 802c5c2: f7fb fe91 bl 80282e8 memset(value, 0, len); 802c5c6: 4629 mov r1, r5 802c5c8: 2240 movs r2, #64 ; 0x40 802c5ca: a802 add r0, sp, #8 802c5cc: f7f5 fa98 bl 8021b00 if (strncmp(value, "on", 2) == 0) // Если raddius off устанавливаем параметры 802c5d0: a802 add r0, sp, #8 802c5d2: 4952 ldr r1, [pc, #328] ; (802c71c ) 802c5d4: 2202 movs r2, #2 802c5d6: f7f5 fccd bl 8021f74 802c5da: 4605 mov r5, r0 802c5dc: 2800 cmp r0, #0 802c5de: d13b bne.n 802c658 { GetParamValue(buf, "rs_server=", value, &valueLen); 802c5e0: f10d 0307 add.w r3, sp, #7 802c5e4: 4953 ldr r1, [pc, #332] ; (802c734 ) 802c5e6: aa02 add r2, sp, #8 802c5e8: 4620 mov r0, r4 802c5ea: f7ff fdcf bl 802c18c SetRDSIpStr(value); 802c5ee: a802 add r0, sp, #8 802c5f0: f7fb fe5a bl 80282a8 memset(value, 0, len); 802c5f4: 4629 mov r1, r5 802c5f6: 2240 movs r2, #64 ; 0x40 802c5f8: a802 add r0, sp, #8 802c5fa: f7f5 fa81 bl 8021b00 GetParamValue(buf, "rs_port=", value, &valueLen); 802c5fe: f10d 0307 add.w r3, sp, #7 802c602: 494d ldr r1, [pc, #308] ; (802c738 ) 802c604: aa02 add r2, sp, #8 802c606: 4620 mov r0, r4 802c608: f7ff fdc0 bl 802c18c SetRDSPortStr(value); 802c60c: a802 add r0, sp, #8 802c60e: f7fb fe51 bl 80282b4 memset(value, 0, len); 802c612: 4629 mov r1, r5 802c614: 2240 movs r2, #64 ; 0x40 802c616: a802 add r0, sp, #8 802c618: f7f5 fa72 bl 8021b00 GetParamValue(buf, "rs_pwd=", value, &valueLen); 802c61c: f10d 0307 add.w r3, sp, #7 802c620: 4946 ldr r1, [pc, #280] ; (802c73c ) 802c622: aa02 add r2, sp, #8 802c624: 4620 mov r0, r4 802c626: f7ff fdb1 bl 802c18c SetRDSPasswordkStr(value); 802c62a: a802 add r0, sp, #8 802c62c: f7fb fe56 bl 80282dc memset(value, 0, len); 802c630: 4629 mov r1, r5 802c632: 2240 movs r2, #64 ; 0x40 802c634: a802 add r0, sp, #8 802c636: f7f5 fa63 bl 8021b00 GetParamValue(buf, "rs_key=", value, &valueLen); 802c63a: 4941 ldr r1, [pc, #260] ; (802c740 ) 802c63c: aa02 add r2, sp, #8 802c63e: f10d 0307 add.w r3, sp, #7 802c642: 4620 mov r0, r4 802c644: f7ff fda2 bl 802c18c SetRDSKeyAccesstStr(value); 802c648: a802 add r0, sp, #8 802c64a: f7fb fe3d bl 80282c8 memset(value, 0, len); 802c64e: a802 add r0, sp, #8 802c650: 4629 mov r1, r5 802c652: 2240 movs r2, #64 ; 0x40 802c654: f7f5 fa54 bl 8021b00 } } // Параметры реле и сухих контактов GetParamValue(buf, "di1=", value, &valueLen); 802c658: f10d 0307 add.w r3, sp, #7 802c65c: aa02 add r2, sp, #8 802c65e: 4939 ldr r1, [pc, #228] ; (802c744 ) 802c660: 4620 mov r0, r4 802c662: f7ff fd93 bl 802c18c SetDINTypeActStr(value, 0); 802c666: a802 add r0, sp, #8 802c668: 2100 movs r1, #0 802c66a: f7fb ff45 bl 80284f8 memset(value, 0, len); 802c66e: 2100 movs r1, #0 802c670: 2240 movs r2, #64 ; 0x40 802c672: a802 add r0, sp, #8 802c674: f7f5 fa44 bl 8021b00 GetParamValue(buf, "ro1=", value, &valueLen); 802c678: f10d 0307 add.w r3, sp, #7 802c67c: aa02 add r2, sp, #8 802c67e: 4932 ldr r1, [pc, #200] ; (802c748 ) 802c680: 4620 mov r0, r4 802c682: f7ff fd83 bl 802c18c SetROTypeActStr(value, 0); 802c686: a802 add r0, sp, #8 802c688: 2100 movs r1, #0 802c68a: f7fb ff53 bl 8028534 memset(value, 0, len); 802c68e: 2100 movs r1, #0 802c690: 2240 movs r2, #64 ; 0x40 802c692: a802 add r0, sp, #8 802c694: f7f5 fa34 bl 8021b00 GetParamValue(buf, "ro2=", value, &valueLen); 802c698: f10d 0307 add.w r3, sp, #7 802c69c: aa02 add r2, sp, #8 802c69e: 492b ldr r1, [pc, #172] ; (802c74c ) 802c6a0: 4620 mov r0, r4 802c6a2: f7ff fd73 bl 802c18c SetROTypeActStr(value, 1); 802c6a6: a802 add r0, sp, #8 802c6a8: 2101 movs r1, #1 802c6aa: f7fb ff43 bl 8028534 memset(value, 0, len); 802c6ae: 2100 movs r1, #0 802c6b0: 2240 movs r2, #64 ; 0x40 802c6b2: a802 add r0, sp, #8 802c6b4: f7f5 fa24 bl 8021b00 // Параметры даты и времени GetParamValue(buf, "ntp=", value, &valueLen); 802c6b8: 4925 ldr r1, [pc, #148] ; (802c750 ) 802c6ba: aa02 add r2, sp, #8 802c6bc: f10d 0307 add.w r3, sp, #7 802c6c0: 4620 mov r0, r4 802c6c2: f7ff fd63 bl 802c18c SetSntpStateStr(value); 802c6c6: a802 add r0, sp, #8 802c6c8: f7fb fe9a bl 8028400 if (strncmp(value, "1", 1) == 0) // Если ntp on устанавливаем параметры 802c6cc: a802 add r0, sp, #8 802c6ce: 4921 ldr r1, [pc, #132] ; (802c754 ) 802c6d0: 2201 movs r2, #1 802c6d2: f7f5 fc4f bl 8021f74 802c6d6: 4605 mov r5, r0 { memset(value, 0, len); 802c6d8: a802 add r0, sp, #8 // Параметры даты и времени GetParamValue(buf, "ntp=", value, &valueLen); SetSntpStateStr(value); if (strncmp(value, "1", 1) == 0) // Если ntp on устанавливаем параметры 802c6da: 2d00 cmp r5, #0 802c6dc: d13f bne.n 802c75e { memset(value, 0, len); 802c6de: 4629 mov r1, r5 802c6e0: 2240 movs r2, #64 ; 0x40 802c6e2: f7f5 fa0d bl 8021b00 GetParamValue(buf, "ntpservip=", value, &valueLen); 802c6e6: 4620 mov r0, r4 802c6e8: 491b ldr r1, [pc, #108] ; (802c758 ) 802c6ea: aa02 add r2, sp, #8 802c6ec: f10d 0307 add.w r3, sp, #7 802c6f0: f7ff fd4c bl 802c18c SetSntpServerIpStr(value); 802c6f4: a802 add r0, sp, #8 802c6f6: f7fb fea3 bl 8028440 802c6fa: e02f b.n 802c75c 802c6fc: 08040b88 .word 0x08040b88 802c700: 08040b98 .word 0x08040b98 802c704: 08040ba9 .word 0x08040ba9 802c708: 08040bb4 .word 0x08040bb4 802c70c: 08040bc0 .word 0x08040bc0 802c710: 08040bcc .word 0x08040bcc 802c714: 08040bd8 .word 0x08040bd8 802c718: 08040be4 .word 0x08040be4 802c71c: 080398ae .word 0x080398ae 802c720: 08040bea .word 0x08040bea 802c724: 08040bf2 .word 0x08040bf2 802c728: 08040bf6 .word 0x08040bf6 802c72c: 08040bfc .word 0x08040bfc 802c730: 08040c02 .word 0x08040c02 802c734: 08040c0e .word 0x08040c0e 802c738: 08040c19 .word 0x08040c19 802c73c: 08040c22 .word 0x08040c22 802c740: 08040c2a .word 0x08040c2a 802c744: 08040c32 .word 0x08040c32 802c748: 08040c37 .word 0x08040c37 802c74c: 08040c3c .word 0x08040c3c 802c750: 08040c41 .word 0x08040c41 802c754: 08039b52 .word 0x08039b52 802c758: 08040c46 .word 0x08040c46 802c75c: e023 b.n 802c7a6 memset(value, 0, len); } else if (strncmp(value, "0", 1) == 0){ 802c75e: 4925 ldr r1, [pc, #148] ; (802c7f4 ) 802c760: 2201 movs r2, #1 802c762: f7f5 fc07 bl 8021f74 802c766: 4605 mov r5, r0 802c768: bb10 cbnz r0, 802c7b0 GetParamValue(buf, "date=", value, &valueLen); 802c76a: f10d 0307 add.w r3, sp, #7 802c76e: 4922 ldr r1, [pc, #136] ; (802c7f8 ) 802c770: aa02 add r2, sp, #8 802c772: 4620 mov r0, r4 802c774: f7ff fd0a bl 802c18c SetDateStr(value); 802c778: a802 add r0, sp, #8 802c77a: f7fb fdd9 bl 8028330 memset(value, 0, len); 802c77e: 4629 mov r1, r5 802c780: 2240 movs r2, #64 ; 0x40 802c782: a802 add r0, sp, #8 802c784: f7f5 f9bc bl 8021b00 GetParamValue(buf, "time=", value, &valueLen); 802c788: 491c ldr r1, [pc, #112] ; (802c7fc ) 802c78a: aa02 add r2, sp, #8 802c78c: f10d 0307 add.w r3, sp, #7 802c790: 4620 mov r0, r4 802c792: f7ff fcfb bl 802c18c url_decode(str, sizeof(str), value); 802c796: a812 add r0, sp, #72 ; 0x48 802c798: 2140 movs r1, #64 ; 0x40 802c79a: aa02 add r2, sp, #8 802c79c: f7fc fcd0 bl 8029140 SetTimeStr(str); 802c7a0: a812 add r0, sp, #72 ; 0x48 802c7a2: f7fb fdfd bl 80283a0 memset(value, 0, len); 802c7a6: a802 add r0, sp, #8 802c7a8: 4629 mov r1, r5 802c7aa: 2240 movs r2, #64 ; 0x40 802c7ac: f7f5 f9a8 bl 8021b00 } GetParamValue(buf, "utc=", value, &valueLen); 802c7b0: 4913 ldr r1, [pc, #76] ; (802c800 ) 802c7b2: aa02 add r2, sp, #8 802c7b4: f10d 0307 add.w r3, sp, #7 802c7b8: 4620 mov r0, r4 802c7ba: f7ff fce7 bl 802c18c SetSntpTimeZoneStr(value); 802c7be: a802 add r0, sp, #8 802c7c0: f7fb fe44 bl 802844c memset(value, 0, len); 802c7c4: 2100 movs r1, #0 802c7c6: 2240 movs r2, #64 ; 0x40 802c7c8: a802 add r0, sp, #8 802c7ca: f7f5 f999 bl 8021b00 /* Если параметры WEB изменились выставляем флаг, сохраняем настройки и перезагружаемся */ if (GetStateWebReinit() == true) 802c7ce: f00b fad1 bl 8037d74 802c7d2: b150 cbz r0, 802c7ea { SetWebReinitFlag(true); 802c7d4: 2001 movs r0, #1 802c7d6: f7fb fca5 bl 8028124 HTTP_SaveSettings(); 802c7da: f001 fa99 bl 802dd10 /* Блокируем управление ключем на тау секунд*/ //IO_KeyBlockOn(); vTaskDelay(1010); 802c7de: f240 30f2 movw r0, #1010 ; 0x3f2 802c7e2: f7fe fb8d bl 802af00 Reboot(); 802c7e6: f7fc fc3d bl 8029064 } HTTP_SaveSettings(); 802c7ea: f001 fa91 bl 802dd10 } 802c7ee: b023 add sp, #140 ; 0x8c 802c7f0: bd30 pop {r4, r5, pc} 802c7f2: bf00 nop 802c7f4: 0803990d .word 0x0803990d 802c7f8: 08040c64 .word 0x08040c64 802c7fc: 08040c51 .word 0x08040c51 802c800: 08040c57 .word 0x08040c57 0802c804 : /** * @brief * @retval None */ uint8_t GetCookieValue(char *inStr, char *paramName, char *paramValue, uint8_t *paramLen) { 802c804: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802c808: 4690 mov r8, r2 802c80a: 461f mov r7, r3 char *beginValue = 0; char *endValue = 0; int len = 0; char *strPtr = 0; strPtr = strstr(inStr, paramName); 802c80c: f7f5 fdd0 bl 80223b0 if (strPtr != 0) 802c810: 4605 mov r5, r0 802c812: b1e0 cbz r0, 802c84e { beginValue = strpbrk(strPtr,"="); 802c814: 490f ldr r1, [pc, #60] ; (802c854 ) 802c816: f7f5 fc35 bl 8022084 endValue = strpbrk(strPtr,";"); 802c81a: 490f ldr r1, [pc, #60] ; (802c858 ) strPtr = strstr(inStr, paramName); if (strPtr != 0) { beginValue = strpbrk(strPtr,"="); 802c81c: 4606 mov r6, r0 endValue = strpbrk(strPtr,";"); 802c81e: 4628 mov r0, r5 802c820: f7f5 fc30 bl 8022084 if (endValue == 0) 802c824: 4604 mov r4, r0 802c826: b920 cbnz r0, 802c832 endValue = strpbrk(strPtr,"\n"); 802c828: 4628 mov r0, r5 802c82a: 490c ldr r1, [pc, #48] ; (802c85c ) 802c82c: f7f5 fc2a bl 8022084 802c830: 4604 mov r4, r0 len = endValue - beginValue - 1; 802c832: 1ba5 subs r5, r4, r6 802c834: 3d01 subs r5, #1 strncpy(paramValue, beginValue + 1, len); 802c836: 4640 mov r0, r8 802c838: 1c71 adds r1, r6, #1 802c83a: 462a mov r2, r5 802c83c: f7f5 fbf0 bl 8022020 *endValue = '0'; 802c840: 2330 movs r3, #48 ; 0x30 802c842: 7023 strb r3, [r4, #0] *beginValue = '0'; *paramLen = len; return 1; 802c844: 2001 movs r0, #1 if (endValue == 0) endValue = strpbrk(strPtr,"\n"); len = endValue - beginValue - 1; strncpy(paramValue, beginValue + 1, len); *endValue = '0'; *beginValue = '0'; 802c846: 7033 strb r3, [r6, #0] *paramLen = len; 802c848: 703d strb r5, [r7, #0] return 1; 802c84a: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} } else { *paramLen = 0; 802c84e: 7038 strb r0, [r7, #0] return 0; } } 802c850: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802c854: 08040c35 .word 0x08040c35 802c858: 08045955 .word 0x08045955 802c85c: 08040f85 .word 0x08040f85 0802c860 : } } */ void ClearParamString(char *inBuf) { 802c860: b510 push {r4, lr} uint16_t len; char *str; str = strstr(inBuf, "HTTP"); 802c862: 4908 ldr r1, [pc, #32] ; (802c884 ) } } */ void ClearParamString(char *inBuf) { 802c864: 4604 mov r4, r0 uint16_t len; char *str; str = strstr(inBuf, "HTTP"); 802c866: f7f5 fda3 bl 80223b0 if (str != 0) 802c86a: b148 cbz r0, 802c880 { len = str - inBuf; 802c86c: 1b02 subs r2, r0, r4 memset(str, 0, RECIVE_BUF_MAX_LEN - len - 1); 802c86e: b292 uxth r2, r2 802c870: f5c2 62bb rsb r2, r2, #1496 ; 0x5d8 802c874: 2100 movs r1, #0 802c876: 3203 adds r2, #3 } } 802c878: 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); 802c87c: f7f5 b940 b.w 8021b00 802c880: bd10 pop {r4, pc} 802c882: bf00 nop 802c884: 08040c5c .word 0x08040c5c 0802c888 : /** * @brief Установка даты производства */ // TODO Убрать заглушку! void HTTP_Prodate(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c888: b5f0 push {r4, r5, r6, r7, lr} uint8_t valueLen = 0; 802c88a: 2500 movs r5, #0 /** * @brief Установка даты производства */ // TODO Убрать заглушку! void HTTP_Prodate(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c88c: b087 sub sp, #28 802c88e: 4606 mov r6, r0 802c890: 460c mov r4, r1 uint8_t valueLen = 0; char value[20]; memset(bufOut, 0, SEND_BUF_MAX_LEN); 802c892: f44f 62fa mov.w r2, #2000 ; 0x7d0 802c896: 4608 mov r0, r1 802c898: 4629 mov r1, r5 /** * @brief Установка даты производства */ // TODO Убрать заглушку! void HTTP_Prodate(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c89a: 461f mov r7, r3 uint8_t valueLen = 0; 802c89c: f88d 5003 strb.w r5, [sp, #3] char value[20]; memset(bufOut, 0, SEND_BUF_MAX_LEN); 802c8a0: f7f5 f92e bl 8021b00 ClearParamString(bufIn); 802c8a4: 4630 mov r0, r6 802c8a6: f7ff ffdb bl 802c860 memset(value, 0, 20); 802c8aa: 4629 mov r1, r5 802c8ac: 2214 movs r2, #20 802c8ae: a801 add r0, sp, #4 802c8b0: f7f5 f926 bl 8021b00 GetParamValue(bufIn, "prodate=", value, &valueLen); 802c8b4: aa01 add r2, sp, #4 802c8b6: f10d 0303 add.w r3, sp, #3 802c8ba: 490b ldr r1, [pc, #44] ; (802c8e8 ) 802c8bc: 4630 mov r0, r6 802c8be: f7ff fc65 bl 802c18c printf(value); printf("\r\n"); */ /* Устанавливаем дату производства */ SETTINGS_SetProDate(value, valueLen); 802c8c2: f89d 1003 ldrb.w r1, [sp, #3] 802c8c6: a801 add r0, sp, #4 802c8c8: f7fc f89e bl 8028a08 /* Устанавливаем дату следующей профилактики +1 год */ RTC_SetProfTime(value); 802c8cc: a801 add r0, sp, #4 802c8ce: f7f9 ff37 bl 8026740 /* Пока отправляем true */ strcpy(bufOut, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\nTrue"); 802c8d2: 4906 ldr r1, [pc, #24] ; (802c8ec ) 802c8d4: 4620 mov r0, r4 802c8d6: f7f5 fa8d bl 8021df4 *lenBufOut = strlen(bufOut); 802c8da: 4620 mov r0, r4 802c8dc: f7f5 fae8 bl 8021eb0 802c8e0: 8038 strh r0, [r7, #0] // TEST_SetServerFlag(); } 802c8e2: b007 add sp, #28 802c8e4: bdf0 pop {r4, r5, r6, r7, pc} 802c8e6: bf00 nop 802c8e8: 08040c61 .word 0x08040c61 802c8ec: 08040c6a .word 0x08040c6a 0802c8f0 : } } } int HTTP_UpsHistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c8f0: b5f0 push {r4, r5, r6, r7, lr} uint8_t i, valueLen = 0; 802c8f2: 2500 movs r5, #0 } } } int HTTP_UpsHistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c8f4: b087 sub sp, #28 802c8f6: 4607 mov r7, r0 char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802c8f8: f44f 727a mov.w r2, #1000 ; 0x3e8 802c8fc: 4608 mov r0, r1 } } } int HTTP_UpsHistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c8fe: 460c mov r4, r1 char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802c900: 4629 mov r1, r5 } } } int HTTP_UpsHistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c902: 461e mov r6, r3 uint8_t i, valueLen = 0; 802c904: f88d 5003 strb.w r5, [sp, #3] char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802c908: f7f5 f8fa bl 8021b00 ClearParamString(bufIn); 802c90c: 4638 mov r0, r7 802c90e: f7ff ffa7 bl 802c860 memset(value, 0, 20); 802c912: 4629 mov r1, r5 802c914: 2214 movs r2, #20 802c916: a801 add r0, sp, #4 802c918: f7f5 f8f2 bl 8021b00 GetParamValue(bufIn, "page=", value, &valueLen); 802c91c: 491c ldr r1, [pc, #112] ; (802c990 ) 802c91e: 4638 mov r0, r7 802c920: aa01 add r2, sp, #4 802c922: f10d 0303 add.w r3, sp, #3 802c926: f7ff fc31 bl 802c18c if (strcmp(value, "all") == 0) 802c92a: a801 add r0, sp, #4 802c92c: 4919 ldr r1, [pc, #100] ; (802c994 ) 802c92e: f7f5 f973 bl 8021c18 802c932: b9d8 cbnz r0, 802c96c { if (!LOG_IsInit()) { 802c934: f7fd f866 bl 8029a04 802c938: b908 cbnz r0, 802c93e return SEND_REQUIRED_NO; 802c93a: 2001 movs r0, #1 802c93c: e026 b.n 802c98c } if (fLogTransInprog == false) { 802c93e: 4d16 ldr r5, [pc, #88] ; (802c998 ) 802c940: 782b ldrb r3, [r5, #0] 802c942: 2b00 cmp r3, #0 802c944: d1f9 bne.n 802c93a // Send log as raw data log_ptr = 0; 802c946: 4a15 ldr r2, [pc, #84] ; (802c99c ) 802c948: 6013 str r3, [r2, #0] log_size = LOG_GetTotalSTRCount() * STRING_SIZE; 802c94a: f7fd f86d bl 8029a28 802c94e: 4b14 ldr r3, [pc, #80] ; (802c9a0 ) sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n", log_size); 802c950: 4914 ldr r1, [pc, #80] ; (802c9a4 ) if (fLogTransInprog == false) { // Send log as raw data log_ptr = 0; log_size = LOG_GetTotalSTRCount() * STRING_SIZE; 802c952: 0182 lsls r2, r0, #6 sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n", log_size); 802c954: 4620 mov r0, r4 if (fLogTransInprog == false) { // Send log as raw data log_ptr = 0; log_size = LOG_GetTotalSTRCount() * STRING_SIZE; 802c956: 601a str r2, [r3, #0] sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n", log_size); 802c958: f7fa ff5c bl 8027814 *lenBufOut = strlen(bufOut); 802c95c: 4620 mov r0, r4 802c95e: f7f5 faa7 bl 8021eb0 // Set file transfer in progress flag fLogTransInprog = true; 802c962: 2301 movs r3, #1 log_ptr = 0; log_size = LOG_GetTotalSTRCount() * STRING_SIZE; sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n", log_size); *lenBufOut = strlen(bufOut); 802c964: 8030 strh r0, [r6, #0] // Set file transfer in progress flag fLogTransInprog = true; 802c966: 702b strb r3, [r5, #0] return SEND_REQUIRED_FILE; 802c968: 2002 movs r0, #2 802c96a: e00f b.n 802c98c // We send nothing if file transfer already in progress return SEND_REQUIRED_NO; } } else { if (!LOG_IsInit()) { 802c96c: f7fd f84a bl 8029a04 802c970: 2800 cmp r0, #0 802c972: d0e2 beq.n 802c93a return SEND_REQUIRED_NO; } else { HTTP_GetUpsHistoryPage(bufOut, atoi(value)); 802c974: a801 add r0, sp, #4 802c976: f7f4 ffa3 bl 80218c0 802c97a: 4601 mov r1, r0 802c97c: 4620 mov r0, r4 802c97e: f001 f951 bl 802dc24 *lenBufOut = strlen(bufOut); 802c982: 4620 mov r0, r4 802c984: f7f5 fa94 bl 8021eb0 802c988: 8030 strh r0, [r6, #0] return SEND_REQUIRED_YES; 802c98a: 4628 mov r0, r5 } } } 802c98c: b007 add sp, #28 802c98e: bdf0 pop {r4, r5, r6, r7, pc} 802c990: 08040c9a .word 0x08040c9a 802c994: 08040ca0 .word 0x08040ca0 802c998: 20000d24 .word 0x20000d24 802c99c: 20000d1c .word 0x20000d1c 802c9a0: 20000d28 .word 0x20000d28 802c9a4: 08040ca4 .word 0x08040ca4 0802c9a8 : */ } } int HTTP_HistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c9a8: b5f0 push {r4, r5, r6, r7, lr} uint8_t i, valueLen = 0; 802c9aa: 2500 movs r5, #0 */ } } int HTTP_HistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c9ac: b087 sub sp, #28 802c9ae: 4607 mov r7, r0 char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802c9b0: f44f 727a mov.w r2, #1000 ; 0x3e8 802c9b4: 4608 mov r0, r1 */ } } int HTTP_HistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c9b6: 460c mov r4, r1 char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802c9b8: 4629 mov r1, r5 */ } } int HTTP_HistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c9ba: 461e mov r6, r3 uint8_t i, valueLen = 0; 802c9bc: f88d 5003 strb.w r5, [sp, #3] char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802c9c0: f7f5 f89e bl 8021b00 ClearParamString(bufIn); 802c9c4: 4638 mov r0, r7 802c9c6: f7ff ff4b bl 802c860 memset(value, 0, 20); 802c9ca: 4629 mov r1, r5 802c9cc: 2214 movs r2, #20 802c9ce: a801 add r0, sp, #4 802c9d0: f7f5 f896 bl 8021b00 GetParamValue(bufIn, "page=", value, &valueLen); 802c9d4: 491d ldr r1, [pc, #116] ; (802ca4c ) 802c9d6: 4638 mov r0, r7 802c9d8: aa01 add r2, sp, #4 802c9da: f10d 0303 add.w r3, sp, #3 802c9de: f7ff fbd5 bl 802c18c if (strcmp(value, "all") == 0) 802c9e2: a801 add r0, sp, #4 802c9e4: 491a ldr r1, [pc, #104] ; (802ca50 ) 802c9e6: f7f5 f917 bl 8021c18 802c9ea: b9e0 cbnz r0, 802ca26 { if (!LOG_IsInit()) { 802c9ec: f7fd f80a bl 8029a04 802c9f0: b908 cbnz r0, 802c9f6 return SEND_REQUIRED_NO; 802c9f2: 2001 movs r0, #1 802c9f4: e027 b.n 802ca46 } if (fLogTransInprog == false) { 802c9f6: 4d17 ldr r5, [pc, #92] ; (802ca54 ) 802c9f8: 782b ldrb r3, [r5, #0] 802c9fa: 2b00 cmp r3, #0 802c9fc: d1f9 bne.n 802c9f2 // Send log as raw data log_ptr = 0; 802c9fe: 4a16 ldr r2, [pc, #88] ; (802ca58 ) 802ca00: 6013 str r3, [r2, #0] log_size = History_GetTotalSTRCount() * STRING_SIZE_HISTORY; 802ca02: f7fd f8f5 bl 8029bf0 802ca06: 4b15 ldr r3, [pc, #84] ; (802ca5c ) sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n", log_size); 802ca08: 4915 ldr r1, [pc, #84] ; (802ca60 ) if (fLogTransInprog == false) { // Send log as raw data log_ptr = 0; log_size = History_GetTotalSTRCount() * STRING_SIZE_HISTORY; 802ca0a: 2264 movs r2, #100 ; 0x64 802ca0c: 4342 muls r2, r0 sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n", log_size); 802ca0e: 4620 mov r0, r4 if (fLogTransInprog == false) { // Send log as raw data log_ptr = 0; log_size = History_GetTotalSTRCount() * STRING_SIZE_HISTORY; 802ca10: 601a str r2, [r3, #0] sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n", log_size); 802ca12: f7fa feff bl 8027814 *lenBufOut = strlen(bufOut); 802ca16: 4620 mov r0, r4 802ca18: f7f5 fa4a bl 8021eb0 // Set file transfer in progress flag fLogTransInprog = true; 802ca1c: 2301 movs r3, #1 log_ptr = 0; log_size = History_GetTotalSTRCount() * STRING_SIZE_HISTORY; sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n", log_size); *lenBufOut = strlen(bufOut); 802ca1e: 8030 strh r0, [r6, #0] // Set file transfer in progress flag fLogTransInprog = true; 802ca20: 702b strb r3, [r5, #0] return SEND_REQUIRED_FILE; 802ca22: 2002 movs r0, #2 802ca24: e00f b.n 802ca46 // We send nothing if file transfer already in progress return SEND_REQUIRED_NO; } } else { if (!LOG_IsInit()) { 802ca26: f7fc ffed bl 8029a04 802ca2a: 2800 cmp r0, #0 802ca2c: d0e1 beq.n 802c9f2 return SEND_REQUIRED_NO; } else { HTTP_GetHistoryPage(bufOut, atoi(value)); 802ca2e: a801 add r0, sp, #4 802ca30: f7f4 ff46 bl 80218c0 802ca34: 4601 mov r1, r0 802ca36: 4620 mov r0, r4 802ca38: f001 f892 bl 802db60 *lenBufOut = strlen(bufOut); 802ca3c: 4620 mov r0, r4 802ca3e: f7f5 fa37 bl 8021eb0 802ca42: 8030 strh r0, [r6, #0] return SEND_REQUIRED_YES; 802ca44: 4628 mov r0, r5 } } } 802ca46: b007 add sp, #28 802ca48: bdf0 pop {r4, r5, r6, r7, pc} 802ca4a: bf00 nop 802ca4c: 08040c9a .word 0x08040c9a 802ca50: 08040ca0 .word 0x08040ca0 802ca54: 20000d24 .word 0x20000d24 802ca58: 20000d1c .word 0x20000d1c 802ca5c: 20000d28 .word 0x20000d28 802ca60: 08040ca4 .word 0x08040ca4 0802ca64 : /** * @brief Смена пароля пользователя * @retval None */ int HTTP_ChangeUserPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802ca64: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802ca68: b0b0 sub sp, #192 ; 0xc0 802ca6a: 4605 mov r5, r0 802ca6c: 460c mov r4, r1 uint8_t valueLen, valueLen2, user_id; char WebLogin[MAX_WEB_LOGIN_LEN]; (void)lenBufIn; memset(login, 0, 20); 802ca6e: 2214 movs r2, #20 802ca70: 2100 movs r1, #0 802ca72: a80a add r0, sp, #40 ; 0x28 /** * @brief Смена пароля пользователя * @retval None */ int HTTP_ChangeUserPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802ca74: 461e mov r6, r3 uint8_t valueLen, valueLen2, user_id; char WebLogin[MAX_WEB_LOGIN_LEN]; (void)lenBufIn; memset(login, 0, 20); 802ca76: f7f5 f843 bl 8021b00 memset(password, 0, 20); 802ca7a: 2100 movs r1, #0 802ca7c: 2214 movs r2, #20 802ca7e: a80f add r0, sp, #60 ; 0x3c 802ca80: f7f5 f83e bl 8021b00 memset(tempStr, 0, 50); memset(value, 0, 20); 802ca84: af05 add r7, sp, #20 (void)lenBufIn; memset(login, 0, 20); memset(password, 0, 20); memset(tempStr, 0, 50); 802ca86: 2100 movs r1, #0 802ca88: 2232 movs r2, #50 ; 0x32 802ca8a: a814 add r0, sp, #80 ; 0x50 802ca8c: f7f5 f838 bl 8021b00 memset(value, 0, 20); 802ca90: 2100 movs r1, #0 802ca92: 2214 movs r2, #20 802ca94: 4638 mov r0, r7 802ca96: f7f5 f833 bl 8021b00 ClearParamString(bufIn); 802ca9a: 4628 mov r0, r5 802ca9c: f7ff fee0 bl 802c860 strncpy(tempStr, bufIn, 110); 802caa0: 226e movs r2, #110 ; 0x6e 802caa2: 4629 mov r1, r5 802caa4: a814 add r0, sp, #80 ; 0x50 802caa6: f7f5 fabb bl 8022020 strcpy(bufOut, HTTP_200_OK); if (GetParamValue(tempStr, "username=", login, &valueLen) && 802caaa: f10d 0806 add.w r8, sp, #6 ClearParamString(bufIn); strncpy(tempStr, bufIn, 110); strcpy(bufOut, HTTP_200_OK); 802caae: 4933 ldr r1, [pc, #204] ; (802cb7c ) 802cab0: 4620 mov r0, r4 802cab2: f7f5 f99f bl 8021df4 if (GetParamValue(tempStr, "username=", login, &valueLen) && 802cab6: a814 add r0, sp, #80 ; 0x50 802cab8: 4931 ldr r1, [pc, #196] ; (802cb80 ) 802caba: aa0a add r2, sp, #40 ; 0x28 802cabc: 4643 mov r3, r8 802cabe: f7ff fb65 bl 802c18c 802cac2: 2800 cmp r0, #0 802cac4: d04e beq.n 802cb64 GetParamValue(tempStr, "oldpass=", password, &valueLen)) 802cac6: a814 add r0, sp, #80 ; 0x50 802cac8: 492e ldr r1, [pc, #184] ; (802cb84 ) 802caca: aa0f add r2, sp, #60 ; 0x3c 802cacc: 4643 mov r3, r8 802cace: f7ff fb5d bl 802c18c strncpy(tempStr, bufIn, 110); strcpy(bufOut, HTTP_200_OK); if (GetParamValue(tempStr, "username=", login, &valueLen) && 802cad2: 2800 cmp r0, #0 802cad4: d046 beq.n 802cb64 802cad6: 2500 movs r5, #0 GetParamValue(tempStr, "oldpass=", password, &valueLen)) { for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { memset(value, 0, 20); 802cad8: 2100 movs r1, #0 802cada: 2214 movs r2, #20 802cadc: 4638 mov r0, r7 802cade: f7f5 f80f bl 8021b00 memset(WebLogin, 0, MAX_WEB_LOGIN_LEN); 802cae2: 2100 movs r1, #0 802cae4: 220b movs r2, #11 802cae6: a802 add r0, sp, #8 802cae8: f7f5 f80a bl 8021b00 GetUserLogin(user_id, WebLogin, &valueLen); 802caec: 4628 mov r0, r5 802caee: a902 add r1, sp, #8 802caf0: 4642 mov r2, r8 802caf2: f7fb f973 bl 8027ddc GetUserPassword(user_id, value, &valueLen2); 802caf6: 4628 mov r0, r5 802caf8: 4639 mov r1, r7 802cafa: f10d 0207 add.w r2, sp, #7 802cafe: f7fb f983 bl 8027e08 /* Check login and password */ if ((strncmp(WebLogin, login, MAX_WEB_LOGIN_LEN) == 0) && 802cb02: a802 add r0, sp, #8 802cb04: a90a add r1, sp, #40 ; 0x28 802cb06: 220b movs r2, #11 802cb08: f7f5 fa34 bl 8021f74 802cb0c: bb18 cbnz r0, 802cb56 (memcmp(password, value, 11) == 0)) 802cb0e: 4639 mov r1, r7 802cb10: a80f add r0, sp, #60 ; 0x3c 802cb12: 220b movs r2, #11 802cb14: f7f4 ff08 bl 8021928 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) && 802cb18: 4601 mov r1, r0 802cb1a: b9e0 cbnz r0, 802cb56 (memcmp(password, value, 11) == 0)) { memset(password, 0, 20); 802cb1c: 2214 movs r2, #20 802cb1e: a80f add r0, sp, #60 ; 0x3c 802cb20: f7f4 ffee bl 8021b00 if (GetParamValue(tempStr, "newpass=", password, &valueLen)) 802cb24: a814 add r0, sp, #80 ; 0x50 802cb26: 4918 ldr r1, [pc, #96] ; (802cb88 ) 802cb28: aa0f add r2, sp, #60 ; 0x3c 802cb2a: 4643 mov r3, r8 802cb2c: f7ff fb2e bl 802c18c 802cb30: b1c0 cbz r0, 802cb64 { memcpy(sSettings.sAuth[user_id].password, password, 11); 802cb32: 4b16 ldr r3, [pc, #88] ; (802cb8c ) 802cb34: 2217 movs r2, #23 802cb36: fb02 3005 mla r0, r2, r5, r3 802cb3a: a90f add r1, sp, #60 ; 0x3c 802cb3c: 220b movs r2, #11 802cb3e: 3005 adds r0, #5 802cb40: f7f4 ff24 bl 802198c HTTP_SaveSettings(); 802cb44: f001 f8e4 bl 802dd10 log_event_data(LOG_PSW_CHANGE, "Администратор"); 802cb48: 2003 movs r0, #3 802cb4a: 4911 ldr r1, [pc, #68] ; (802cb90 ) 802cb4c: f7fc ff20 bl 8029990 strcat(bufOut, "Пароль успешно изменён"); 802cb50: 4620 mov r0, r4 802cb52: 4910 ldr r1, [pc, #64] ; (802cb94 ) 802cb54: e008 b.n 802cb68 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++) 802cb56: 3501 adds r5, #1 802cb58: b2ed uxtb r5, r5 802cb5a: 2d02 cmp r5, #2 802cb5c: d1bc bne.n 802cad8 *lenBufOut = strlen(bufOut); return SEND_REQUIRED_YES; } } } strcat(bufOut, "Введён неверный пароль!"); 802cb5e: 4620 mov r0, r4 802cb60: 490d ldr r1, [pc, #52] ; (802cb98 ) 802cb62: e001 b.n 802cb68 *lenBufOut = strlen(bufOut); return SEND_REQUIRED_YES; } else { strcat(bufOut, "Введены некорректные данные!"); 802cb64: 490d ldr r1, [pc, #52] ; (802cb9c ) 802cb66: 4620 mov r0, r4 802cb68: f7f5 f830 bl 8021bcc *lenBufOut = strlen(bufOut); 802cb6c: 4620 mov r0, r4 802cb6e: f7f5 f99f bl 8021eb0 802cb72: 8030 strh r0, [r6, #0] return SEND_REQUIRED_YES; } } 802cb74: 2000 movs r0, #0 802cb76: b030 add sp, #192 ; 0xc0 802cb78: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802cb7c: 08044a3c .word 0x08044a3c 802cb80: 08040ccc .word 0x08040ccc 802cb84: 08040cd6 .word 0x08040cd6 802cb88: 08040cdf .word 0x08040cdf 802cb8c: 2000d2d8 .word 0x2000d2d8 802cb90: 08039980 .word 0x08039980 802cb94: 08040ce8 .word 0x08040ce8 802cb98: 08040d49 .word 0x08040d49 802cb9c: 08040d13 .word 0x08040d13 0802cba0 : * @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) { 802cba0: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802cba4: b09d sub sp, #116 ; 0x74 802cba6: 4690 mov r8, 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; 802cba8: 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) { 802cbaa: 4604 mov r4, r0 802cbac: 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; 802cbae: f88d 200a strb.w r2, [sp, #10] 802cbb2: f88d 200b strb.w r2, [sp, #11] struct fs_file file = {0, 0}; 802cbb6: 9205 str r2, [sp, #20] 802cbb8: 9206 str r2, [sp, #24] hs = arg; if (err == ERR_OK && p != NULL) 802cbba: 2b00 cmp r3, #0 802cbbc: f040 83ac bne.w 802d318 802cbc0: f1b8 0f00 cmp.w r8, #0 802cbc4: f000 83a8 beq.w 802d318 { tcp_recved(pcb, p->tot_len); 802cbc8: 4608 mov r0, r1 802cbca: f8b8 1008 ldrh.w r1, [r8, #8] 802cbce: f003 fbb1 bl 8030334 if (hs->file == NULL) 802cbd2: f8d4 9000 ldr.w r9, [r4] 802cbd6: f1b9 0f00 cmp.w r9, #0 802cbda: f040 839a bne.w 802d312 printLen = p->tot_len; memcpy(printBuf, p->payload , printLen); printf(printBuf); */ receivedBufLen = p->tot_len; memcpy(receiveBuf, p->payload , receivedBufLen); 802cbde: f8df a2e0 ldr.w sl, [pc, #736] ; 802cec0 { tcp_recved(pcb, p->tot_len); if (hs->file == NULL) { data = p->payload; 802cbe2: f8d8 6004 ldr.w r6, [r8, #4] /* printLen = p->tot_len; memcpy(printBuf, p->payload , printLen); printf(printBuf); */ receivedBufLen = p->tot_len; 802cbe6: f8b8 2008 ldrh.w r2, [r8, #8] 802cbea: 4fa0 ldr r7, [pc, #640] ; (802ce6c ) memcpy(receiveBuf, p->payload , receivedBufLen); 802cbec: 4650 mov r0, sl 802cbee: 4631 mov r1, r6 /* printLen = p->tot_len; memcpy(printBuf, p->payload , printLen); printf(printBuf); */ receivedBufLen = p->tot_len; 802cbf0: 803a strh r2, [r7, #0] memcpy(receiveBuf, p->payload , receivedBufLen); 802cbf2: f7f4 fecb bl 802198c receiveBuf[receivedBufLen] = '\0'; 802cbf6: 883b ldrh r3, [r7, #0] // printf("receive %s \r\n", receiveBuf); /* Get cookie "uname" value */ CookiePtr = strstr(receiveBuf, "uname="); 802cbf8: 499d ldr r1, [pc, #628] ; (802ce70 ) printf(printBuf); */ receivedBufLen = p->tot_len; memcpy(receiveBuf, p->payload , receivedBufLen); receiveBuf[receivedBufLen] = '\0'; 802cbfa: f80a 9003 strb.w r9, [sl, r3] // printf("receive %s \r\n", receiveBuf); /* Get cookie "uname" value */ CookiePtr = strstr(receiveBuf, "uname="); 802cbfe: 4650 mov r0, sl 802cc00: f7f5 fbd6 bl 80223b0 strncpy(CookieBuf, CookiePtr, 50); 802cc04: af0f add r7, sp, #60 ; 0x3c memcpy(receiveBuf, p->payload , receivedBufLen); receiveBuf[receivedBufLen] = '\0'; // printf("receive %s \r\n", receiveBuf); /* Get cookie "uname" value */ CookiePtr = strstr(receiveBuf, "uname="); 802cc06: 4601 mov r1, r0 strncpy(CookieBuf, CookiePtr, 50); 802cc08: 2232 movs r2, #50 ; 0x32 802cc0a: 4638 mov r0, r7 802cc0c: f7f5 fa08 bl 8022020 //printf("********CookieBuf1= %s\r\n", CookieBuf); memset(name, 0, MAX_WEB_COOKIE_LEN); 802cc10: 4649 mov r1, r9 802cc12: 2210 movs r2, #16 802cc14: a807 add r0, sp, #28 802cc16: f7f4 ff73 bl 8021b00 GetCookieValue(CookieBuf, "uname=", name, &nameLen); 802cc1a: f10d 030a add.w r3, sp, #10 802cc1e: aa07 add r2, sp, #28 802cc20: 4993 ldr r1, [pc, #588] ; (802ce70 ) 802cc22: 4638 mov r0, r7 802cc24: f7ff fdee bl 802c804 //printf("********CookieBuf2= %s\r\n", CookieBuf); //printf("********uname= %s\r\n", name); /* Get cookie "id" value */ CookiePtr = strstr(receiveBuf, "id="); 802cc28: 4650 mov r0, sl 802cc2a: 4992 ldr r1, [pc, #584] ; (802ce74 ) 802cc2c: f7f5 fbc0 bl 80223b0 strncpy(CookieBuf, CookiePtr, 50); //printf("********CookieBuf1= %s\r\n", CookieBuf); memset(id, 0, MAX_WEB_COOKIE_LEN); 802cc30: f10d 0b2c add.w fp, sp, #44 ; 0x2c 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="); 802cc34: 4601 mov r1, r0 strncpy(CookieBuf, CookiePtr, 50); 802cc36: 2232 movs r2, #50 ; 0x32 802cc38: 4638 mov r0, r7 802cc3a: f7f5 f9f1 bl 8022020 //printf("********CookieBuf1= %s\r\n", CookieBuf); memset(id, 0, MAX_WEB_COOKIE_LEN); 802cc3e: 4649 mov r1, r9 802cc40: 2210 movs r2, #16 802cc42: 4658 mov r0, fp 802cc44: f7f4 ff5c bl 8021b00 GetCookieValue(CookieBuf, "id=", id, &idLen); 802cc48: 465a mov r2, fp 802cc4a: f10d 030b add.w r3, sp, #11 802cc4e: 4638 mov r0, r7 802cc50: 4988 ldr r1, [pc, #544] ; (802ce74 ) 802cc52: f7ff fdd7 bl 802c804 /* Id of currently logged-in user */ uint8_t user_id; /* Level of currently logged-in user */ seclevel = 0xFF; 802cc56: 4b88 ldr r3, [pc, #544] ; (802ce78 ) 802cc58: 22ff movs r2, #255 ; 0xff 802cc5a: 701a strb r2, [r3, #0] /** * @brief Чтение Cookie пользователя */ static void HTTP_GetUserCookie(uint8_t user_id, char *str, uint8_t *len) { sprintf(str, "%s", users[user_id].cookie); 802cc5c: 4b87 ldr r3, [pc, #540] ; (802ce7c ) uint8_t user_id; /* 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); 802cc5e: 46ba mov sl, r7 /** * @brief Чтение Cookie пользователя */ static void HTTP_GetUserCookie(uint8_t user_id, char *str, uint8_t *len) { sprintf(str, "%s", users[user_id].cookie); 802cc60: 2214 movs r2, #20 802cc62: fb02 3209 mla r2, r2, r9, r3 802cc66: 4986 ldr r1, [pc, #536] ; (802ce80 ) 802cc68: 9301 str r3, [sp, #4] 802cc6a: 4650 mov r0, sl 802cc6c: f7fa fdd2 bl 8027814 *len = strlen(str); 802cc70: 4650 mov r0, sl 802cc72: f7f5 f91d bl 8021eb0 802cc76: 4602 mov r2, r0 802cc78: f88d 000b strb.w r0, [sp, #11] /* 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 ) { 802cc7c: b2d2 uxtb r2, r2 802cc7e: 4658 mov r0, fp 802cc80: 4651 mov r1, sl 802cc82: f7f5 f977 bl 8021f74 802cc86: fa5f f789 uxtb.w r7, r9 802cc8a: 4a7e ldr r2, [pc, #504] ; (802ce84 ) 802cc8c: 9b01 ldr r3, [sp, #4] 802cc8e: b940 cbnz r0, 802cca2 GetUserLevelInt(user_id, &seclevel); 802cc90: 4638 mov r0, r7 802cc92: 4979 ldr r1, [pc, #484] ; (802ce78 ) 802cc94: 9201 str r2, [sp, #4] 802cc96: f7fb f8cd bl 8027e34 Authenticated = true; 802cc9a: 9a01 ldr r2, [sp, #4] 802cc9c: 2301 movs r3, #1 802cc9e: 7013 strb r3, [r2, #0] break; 802cca0: e00a b.n 802ccb8 } Authenticated = false; 802cca2: 2100 movs r1, #0 802cca4: 7011 strb r1, [r2, #0] 802cca6: f109 0901 add.w r9, r9, #1 seclevel = 0xFF; 802ccaa: 4a73 ldr r2, [pc, #460] ; (802ce78 ) 802ccac: 21ff movs r1, #255 ; 0xff /* Id of currently logged-in user */ uint8_t user_id; /* Level of currently logged-in user */ seclevel = 0xFF; for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { 802ccae: f1b9 0f02 cmp.w r9, #2 GetUserLevelInt(user_id, &seclevel); Authenticated = true; break; } Authenticated = false; seclevel = 0xFF; 802ccb2: 7011 strb r1, [r2, #0] /* Id of currently logged-in user */ uint8_t user_id; /* Level of currently logged-in user */ seclevel = 0xFF; for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { 802ccb4: d1d4 bne.n 802cc60 802ccb6: 464f mov r7, r9 } Authenticated = false; seclevel = 0xFF; } if ( Authenticated == false && sSettings.sRADIUS.Auth_enable == false) 802ccb8: 4b72 ldr r3, [pc, #456] ; (802ce84 ) 802ccba: 781b ldrb r3, [r3, #0] 802ccbc: 2b00 cmp r3, #0 802ccbe: f040 8136 bne.w 802cf2e 802ccc2: 4b71 ldr r3, [pc, #452] ; (802ce88 ) 802ccc4: f893 3378 ldrb.w r3, [r3, #888] ; 0x378 802ccc8: b933 cbnz r3, 802ccd8 { HTTP_LOGIN(sendBuf, &sendBufLoadLen); 802ccca: 4f70 ldr r7, [pc, #448] ; (802ce8c ) 802cccc: 4e70 ldr r6, [pc, #448] ; (802ce90 ) 802ccce: 4638 mov r0, r7 802ccd0: 4631 mov r1, r6 802ccd2: f7ff fa03 bl 802c0dc 802ccd6: e306 b.n 802d2e6 tcp_sent(pcb, http_sent); } else if ( Authenticated == false )//&& sSettings.sRADIUS.Auth_enable == true { if (strncmp(data, "GET /main.css", 13) == 0) // + 802ccd8: 4630 mov r0, r6 802ccda: 496e ldr r1, [pc, #440] ; (802ce94 ) 802ccdc: 220d movs r2, #13 802ccde: f7f5 f949 bl 8021f74 802cce2: b900 cbnz r0, 802cce6 802cce4: e129 b.n 802cf3a 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) // + 802cce6: 4630 mov r0, r6 802cce8: 496b ldr r1, [pc, #428] ; (802ce98 ) 802ccea: 220e movs r2, #14 802ccec: f7f5 f942 bl 8021f74 802ccf0: b900 cbnz r0, 802ccf4 802ccf2: e12a b.n 802cf4a 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) // ? 802ccf4: 4630 mov r0, r6 802ccf6: 4969 ldr r1, [pc, #420] ; (802ce9c ) 802ccf8: 2210 movs r2, #16 802ccfa: f7f5 f93b bl 8021f74 802ccfe: b900 cbnz r0, 802cd02 802cd00: e12b b.n 802cf5a 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) 802cd02: 4630 mov r0, r6 802cd04: 4966 ldr r1, [pc, #408] ; (802cea0 ) 802cd06: 220c movs r2, #12 802cd08: f7f5 f934 bl 8021f74 802cd0c: b900 cbnz r0, 802cd10 802cd0e: e134 b.n 802cf7a 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)) 802cd10: 4630 mov r0, r6 802cd12: 4964 ldr r1, [pc, #400] ; (802cea4 ) 802cd14: 220f movs r2, #15 802cd16: f7f5 f92d bl 8021f74 802cd1a: b120 cbz r0, 802cd26 802cd1c: 4b62 ldr r3, [pc, #392] ; (802cea8 ) 802cd1e: 681b ldr r3, [r3, #0] 802cd20: 2b00 cmp r3, #0 802cd22: f000 80d5 beq.w 802ced0 { uint32_t i=0,size=0, S=1; int32_t j=0; char sizestring[6], *ptr; ContentLengthOffset =0; 802cd26: 4b61 ldr r3, [pc, #388] ; (802ceac ) 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); 802cd28: f8b8 9008 ldrh.w r9, [r8, #8] { uint32_t i=0,size=0, S=1; int32_t j=0; char sizestring[6], *ptr; ContentLengthOffset =0; 802cd2c: 2700 movs r7, #0 802cd2e: 601f str r7, [r3, #0] 802cd30: e00a b.n 802cd48 /* find Content-Length data in packet buffer */ for (i=0;i) 802cd36: 2210 movs r2, #16 802cd38: f7f5 f91c bl 8021f74 802cd3c: b918 cbnz r0, 802cd46 { ContentLengthOffset = i+16; 802cd3e: 4b5b ldr r3, [pc, #364] ; (802ceac ) 802cd40: 3710 adds r7, #16 802cd42: 601f str r7, [r3, #0] 802cd44: e002 b.n 802cd4c 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) 802cd4c: 4b57 ldr r3, [pc, #348] ; (802ceac ) 802cd4e: 681a ldr r2, [r3, #0] 802cd50: 4618 mov r0, r3 802cd52: b90a cbnz r2, 802cd58 * @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; 802cd54: 2200 movs r2, #0 802cd56: e01d b.n 802cd94 } /* read Content-Length value */ if (ContentLengthOffset) { i=0; ptr = (char*)(data + ContentLengthOffset); 802cd58: eb06 0e02 add.w lr, r6, r2 } } /* read Content-Length value */ if (ContentLengthOffset) { i=0; 802cd5c: 2300 movs r3, #0 802cd5e: e002 b.n 802cd66 ptr = (char*)(data + ContentLengthOffset); while(*(ptr+i)!=0x0d) { sizestring[i] = *(ptr+i); 802cd60: af03 add r7, sp, #12 802cd62: 55d9 strb r1, [r3, r7] i++; 802cd64: 3301 adds r3, #1 /* read Content-Length value */ if (ContentLengthOffset) { i=0; ptr = (char*)(data + ContentLengthOffset); while(*(ptr+i)!=0x0d) 802cd66: f81e 1003 ldrb.w r1, [lr, r3] 802cd6a: 290d cmp r1, #13 802cd6c: eb03 0702 add.w r7, r3, r2 802cd70: d1f6 bne.n 802cd60 802cd72: 6007 str r7, [r0, #0] { sizestring[i] = *(ptr+i); i++; ContentLengthOffset++; } if (i>0) 802cd74: 2b00 cmp r3, #0 802cd76: d0ed beq.n 802cd54 { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) 802cd78: 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; 802cd7a: 2101 movs r1, #1 802cd7c: 2200 movs r2, #0 { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) { size += (sizestring[j]-0x30)*S; S=S*10; 802cd7e: 200a movs r0, #10 802cd80: e006 b.n 802cd90 if (i>0) { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) { size += (sizestring[j]-0x30)*S; 802cd82: af03 add r7, sp, #12 802cd84: 5ddf ldrb r7, [r3, r7] 802cd86: 3f30 subs r7, #48 ; 0x30 802cd88: fb01 2207 mla r2, r1, r7, r2 ContentLengthOffset++; } if (i>0) { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) 802cd8c: 3b01 subs r3, #1 { size += (sizestring[j]-0x30)*S; S=S*10; 802cd8e: 4341 muls r1, r0 ContentLengthOffset++; } if (i>0) { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) 802cd90: 2b00 cmp r3, #0 802cd92: daf6 bge.n 802cd82 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); 802cd94: 4f47 ldr r7, [pc, #284] ; (802ceb4 ) //printf("Content-length: %d\r\n", (int)post_data_count); if (post_data_count < MAX_POST_REQ_LEN) { 802cd96: 2aff cmp r2, #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); 802cd98: 603a str r2, [r7, #0] //printf("Content-length: %d\r\n", (int)post_data_count); if (post_data_count < MAX_POST_REQ_LEN) { 802cd9a: d85e bhi.n 802ce5a memset(post_req_data, 0, MAX_POST_REQ_LEN); 802cd9c: 4846 ldr r0, [pc, #280] ; (802ceb8 ) /* parse packet for "\r\n\r\n" */ for (i = 0; i < receivedBufLen; i++) 802cd9e: f8df 90cc ldr.w r9, [pc, #204] ; 802ce6c 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); 802cda2: 2100 movs r1, #0 802cda4: f44f 7280 mov.w r2, #256 ; 0x100 802cda8: f7f4 feaa bl 8021b00 /* parse packet for "\r\n\r\n" */ for (i = 0; i < receivedBufLen; i++) 802cdac: 2700 movs r7, #0 802cdae: e008 b.n 802cdc2 { if (strncmp ((char*)(data+i), "\r\n\r\n", 4) == 0) 802cdb0: 19f0 adds r0, r6, r7 802cdb2: 4942 ldr r1, [pc, #264] ; (802cebc ) 802cdb4: 2204 movs r2, #4 802cdb6: f7f5 f8dd bl 8021f74 802cdba: b908 cbnz r0, 802cdc0 { offset = i+4; 802cdbc: 3704 adds r7, #4 //printf("offset: %d\r\n", (int)offset); break; 802cdbe: e005 b.n 802cdcc 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++) 802cdc0: 3701 adds r7, #1 802cdc2: f8b9 3000 ldrh.w r3, [r9] 802cdc6: 429f cmp r7, r3 802cdc8: d3f2 bcc.n 802cdb0 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; 802cdca: 2700 movs r7, #0 //printf("offset: %d\r\n", (int)offset); break; } } req_data_received = receivedBufLen - offset; 802cdcc: 4b27 ldr r3, [pc, #156] ; (802ce6c ) 802cdce: 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) { 802cdd2: b33f cbz r7, 802ce24 /* if data was splited in two packets */ if (req_data_received < post_data_count) { 802cdd4: f8df 90dc ldr.w r9, [pc, #220] ; 802ceb4 /* Copy request data to buffer */ snprintf(post_req_data, req_data_received, "%s", receiveBuf); 802cdd8: 4837 ldr r0, [pc, #220] ; (802ceb8 ) /* 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) { 802cdda: f8d9 2000 ldr.w r2, [r9] //printf("offset: %d\r\n", (int)offset); break; } } req_data_received = receivedBufLen - offset; 802cdde: ebc7 0a0a rsb sl, r7, 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) { 802cde2: 4592 cmp sl, r2 802cde4: d20b bcs.n 802cdfe /* Copy request data to buffer */ snprintf(post_req_data, req_data_received, "%s", receiveBuf); 802cde6: 4b36 ldr r3, [pc, #216] ; (802cec0 ) 802cde8: 4a25 ldr r2, [pc, #148] ; (802ce80 ) 802cdea: 4651 mov r1, sl 802cdec: f7fa fcf4 bl 80277d8 //printf("copied: %d\r\n", (int)req_data_received); post_data_count -= req_data_received; 802cdf0: f8d9 3000 ldr.w r3, [r9] 802cdf4: ebca 0303 rsb r3, sl, r3 802cdf8: f8c9 3000 str.w r3, [r9] 802cdfc: e289 b.n 802d312 } /* if data received completely */ else { strncat(post_req_data, (char *)(data + offset), post_data_count); 802cdfe: 19f1 adds r1, r6, r7 802ce00: f7f5 f886 bl 8021f10 //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) { 802ce04: 482c ldr r0, [pc, #176] ; (802ceb8 ) 802ce06: 4f21 ldr r7, [pc, #132] ; (802ce8c ) 802ce08: 4e21 ldr r6, [pc, #132] ; (802ce90 ) 802ce0a: f7f5 f851 bl 8021eb0 802ce0e: 4639 mov r1, r7 802ce10: b282 uxth r2, r0 802ce12: 4633 mov r3, r6 802ce14: 4828 ldr r0, [pc, #160] ; (802ceb8 ) 802ce16: f7ff f9e7 bl 802c1e8 802ce1a: 2800 cmp r0, #0 802ce1c: d16f bne.n 802cefe hs->file = sendBuf; 802ce1e: 6027 str r7, [r4, #0] hs->left = sendBufLoadLen; 802ce20: 8833 ldrh r3, [r6, #0] 802ce22: e073 b.n 802cf0c /* request was fragmented before "\r\n\r\n" */ else { //printf("no data found!\r\n"); /* wait next packet */ log_post_reqn++; 802ce24: 4e20 ldr r6, [pc, #128] ; (802cea8 ) 802ce26: 6833 ldr r3, [r6, #0] 802ce28: 3301 adds r3, #1 /* wait max 2 requests */ if (log_post_reqn > 1) { 802ce2a: 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++; 802ce2c: 6033 str r3, [r6, #0] /* wait max 2 requests */ if (log_post_reqn > 1) { 802ce2e: f240 8270 bls.w 802d312 /* Redirect to login page */ fs_open("/login.html", &file); 802ce32: a905 add r1, sp, #20 802ce34: 4823 ldr r0, [pc, #140] ; (802cec4 ) 802ce36: f7fe fe51 bl 802badc hs->file = file.data; 802ce3a: 9b05 ldr r3, [sp, #20] 802ce3c: 6023 str r3, [r4, #0] hs->left = file.len; 802ce3e: 9b06 ldr r3, [sp, #24] send_data(pcb, hs); 802ce40: 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; 802ce42: 6063 str r3, [r4, #4] send_data(pcb, hs); 802ce44: 4621 mov r1, r4 802ce46: f7fe fe85 bl 802bb54 tcp_sent(pcb, http_sent); 802ce4a: 4628 mov r0, r5 802ce4c: 491e ldr r1, [pc, #120] ; (802cec8 ) 802ce4e: f003 faa7 bl 80303a0 /* End reqest */ post_data_count = 0; 802ce52: 4b18 ldr r3, [pc, #96] ; (802ceb4 ) log_post_reqn = 0; 802ce54: 6037 str r7, [r6, #0] hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); /* End reqest */ post_data_count = 0; 802ce56: 601f str r7, [r3, #0] 802ce58: e25b b.n 802d312 log_post_reqn = 0; } } } else { printf("Too long POST request!\r\n"); 802ce5a: 481c ldr r0, [pc, #112] ; (802cecc ) 802ce5c: f7fa fc8e bl 802777c /* Ignore request */ post_data_count = 0; log_post_reqn = 0; 802ce60: 4a11 ldr r2, [pc, #68] ; (802cea8 ) } } else { printf("Too long POST request!\r\n"); /* Ignore request */ post_data_count = 0; 802ce62: 2300 movs r3, #0 802ce64: 603b str r3, [r7, #0] log_post_reqn = 0; 802ce66: 6013 str r3, [r2, #0] 802ce68: e05f b.n 802cf2a 802ce6a: bf00 nop 802ce6c: 20000d2e .word 0x20000d2e 802ce70: 08040a7c .word 0x08040a7c 802ce74: 08040a91 .word 0x08040a91 802ce78: 2000070a .word 0x2000070a 802ce7c: 2000e238 .word 0x2000e238 802ce80: 0803987b .word 0x0803987b 802ce84: 20000d1a .word 0x20000d1a 802ce88: 2000cfc0 .word 0x2000cfc0 802ce8c: 2000d388 .word 0x2000d388 802ce90: 20000d18 .word 0x20000d18 802ce94: 08040d75 .word 0x08040d75 802ce98: 08040d83 .word 0x08040d83 802ce9c: 08040d92 .word 0x08040d92 802cea0: 08040da3 .word 0x08040da3 802cea4: 08040db0 .word 0x08040db0 802cea8: 2000e234 .word 0x2000e234 802ceac: 20000d20 .word 0x20000d20 802ceb0: 0803c1b7 .word 0x0803c1b7 802ceb4: 2000e260 .word 0x2000e260 802ceb8: 2000e134 .word 0x2000e134 802cebc: 08040f82 .word 0x08040f82 802cec0: 2000db58 .word 0x2000db58 802cec4: 08040dc0 .word 0x08040dc0 802cec8: 0802bbc7 .word 0x0802bbc7 802cecc: 08040dcc .word 0x08040dcc hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } } else if (post_data_count > 0) 802ced0: 4b87 ldr r3, [pc, #540] ; (802d0f0 ) 802ced2: 681a ldr r2, [r3, #0] 802ced4: 2a00 cmp r2, #0 802ced6: d028 beq.n 802cf2a { strncat(post_req_data, data, post_data_count); 802ced8: 4631 mov r1, r6 802ceda: 4886 ldr r0, [pc, #536] ; (802d0f4 ) 802cedc: f7f5 f818 bl 8021f10 //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) { 802cee0: 4884 ldr r0, [pc, #528] ; (802d0f4 ) 802cee2: f7f4 ffe5 bl 8021eb0 802cee6: 4984 ldr r1, [pc, #528] ; (802d0f8 ) 802cee8: 4b84 ldr r3, [pc, #528] ; (802d0fc ) 802ceea: b282 uxth r2, r0 802ceec: 4881 ldr r0, [pc, #516] ; (802d0f4 ) 802ceee: f7ff f97b bl 802c1e8 802cef2: b920 cbnz r0, 802cefe hs->file = sendBuf; 802cef4: 4b80 ldr r3, [pc, #512] ; (802d0f8 ) 802cef6: 6023 str r3, [r4, #0] hs->left = sendBufLoadLen; 802cef8: 4b80 ldr r3, [pc, #512] ; (802d0fc ) 802cefa: 881b ldrh r3, [r3, #0] 802cefc: e006 b.n 802cf0c tcp_sent(pcb, http_sent); } else { /* Redirect to login page */ fs_open("/login.html", &file); 802cefe: 4880 ldr r0, [pc, #512] ; (802d100 ) 802cf00: a905 add r1, sp, #20 802cf02: f7fe fdeb bl 802badc hs->file = file.data; 802cf06: 9b05 ldr r3, [sp, #20] 802cf08: 6023 str r3, [r4, #0] hs->left = file.len; 802cf0a: 9b06 ldr r3, [sp, #24] 802cf0c: 6063 str r3, [r4, #4] send_data(pcb, hs); 802cf0e: 4628 mov r0, r5 802cf10: 4621 mov r1, r4 802cf12: f7fe fe1f bl 802bb54 tcp_sent(pcb, http_sent); 802cf16: 4628 mov r0, r5 802cf18: 497a ldr r1, [pc, #488] ; (802d104 ) 802cf1a: f003 fa41 bl 80303a0 } /* End reqest */ post_data_count = 0; 802cf1e: 4a74 ldr r2, [pc, #464] ; (802d0f0 ) 802cf20: 2300 movs r3, #0 802cf22: 6013 str r3, [r2, #0] log_post_reqn = 0; 802cf24: 4a78 ldr r2, [pc, #480] ; (802d108 ) 802cf26: 6013 str r3, [r2, #0] 802cf28: e1f3 b.n 802d312 } else { fs_open("/login.html", &file); 802cf2a: 4875 ldr r0, [pc, #468] ; (802d100 ) 802cf2c: e1e2 b.n 802d2f4 } else if ( Authenticated == true ) { if (strncmp(data, "GET /main.css", 13) == 0) // + 802cf2e: 4630 mov r0, r6 802cf30: 4976 ldr r1, [pc, #472] ; (802d10c ) 802cf32: 220d movs r2, #13 802cf34: f7f5 f81e bl 8021f74 802cf38: b908 cbnz r0, 802cf3e { fs_open("/main.css", &file); 802cf3a: 4875 ldr r0, [pc, #468] ; (802d110 ) 802cf3c: e1da b.n 802d2f4 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) // + 802cf3e: 4630 mov r0, r6 802cf40: 4974 ldr r1, [pc, #464] ; (802d114 ) 802cf42: 220e movs r2, #14 802cf44: f7f5 f816 bl 8021f74 802cf48: b908 cbnz r0, 802cf4e { fs_open("/rotek.png", &file); 802cf4a: 4873 ldr r0, [pc, #460] ; (802d118 ) 802cf4c: e1d2 b.n 802d2f4 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) // ? 802cf4e: 4630 mov r0, r6 802cf50: 4972 ldr r1, [pc, #456] ; (802d11c ) 802cf52: 2210 movs r2, #16 802cf54: f7f5 f80e bl 8021f74 802cf58: b908 cbnz r0, 802cf5e { fs_open("/favicon.ico", &file); 802cf5a: 4871 ldr r0, [pc, #452] ; (802d120 ) 802cf5c: e1ca b.n 802d2f4 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) // + 802cf5e: 4630 mov r0, r6 802cf60: 4970 ldr r1, [pc, #448] ; (802d124 ) 802cf62: 220c movs r2, #12 802cf64: f7f5 f806 bl 8021f74 802cf68: b908 cbnz r0, 802cf6e { fs_open("/main.js", &file); 802cf6a: 486f ldr r0, [pc, #444] ; (802d128 ) 802cf6c: e1c2 b.n 802d2f4 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /role.js", 12) == 0) 802cf6e: 4630 mov r0, r6 802cf70: 496e ldr r1, [pc, #440] ; (802d12c ) 802cf72: 220c movs r2, #12 802cf74: f7f4 fffe bl 8021f74 802cf78: b908 cbnz r0, 802cf7e { fs_open("/role.js", &file); 802cf7a: 486d ldr r0, [pc, #436] ; (802d130 ) 802cf7c: e1ba b.n 802d2f4 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /settings.html", 18) == 0) // + 802cf7e: 4630 mov r0, r6 802cf80: 496c ldr r1, [pc, #432] ; (802d134 ) 802cf82: 2212 movs r2, #18 802cf84: f7f4 fff6 bl 8021f74 802cf88: b940 cbnz r0, 802cf9c { HTTP_UpdateUserLoginTime(user_id); 802cf8a: 4638 mov r0, r7 802cf8c: f7fe fd94 bl 802bab8 if (seclevel == 0){ 802cf90: 4b69 ldr r3, [pc, #420] ; (802d138 ) 802cf92: 781b ldrb r3, [r3, #0] 802cf94: 2b00 cmp r3, #0 802cf96: f040 81ac bne.w 802d2f2 802cf9a: e15f b.n 802d25c hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } } else if (strncmp(data, "GET /info.html", 14) == 0) // + 802cf9c: 4630 mov r0, r6 802cf9e: 4967 ldr r1, [pc, #412] ; (802d13c ) 802cfa0: 220e movs r2, #14 802cfa2: f7f4 ffe7 bl 8021f74 802cfa6: b920 cbnz r0, 802cfb2 { HTTP_UpdateUserLoginTime(user_id); 802cfa8: 4638 mov r0, r7 802cfaa: f7fe fd85 bl 802bab8 fs_open("/info.html", &file); 802cfae: 4864 ldr r0, [pc, #400] ; (802d140 ) 802cfb0: e1a0 b.n 802d2f4 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) 802cfb2: 4630 mov r0, r6 802cfb4: 4963 ldr r1, [pc, #396] ; (802d144 ) 802cfb6: 2211 movs r2, #17 802cfb8: f7f4 ffdc bl 8021f74 802cfbc: b920 cbnz r0, 802cfc8 { HTTP_UpdateUserLoginTime(user_id); 802cfbe: 4638 mov r0, r7 802cfc0: f7fe fd7a bl 802bab8 fs_open("/history.html", &file); 802cfc4: 4860 ldr r0, [pc, #384] ; (802d148 ) 802cfc6: e195 b.n 802d2f4 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) 802cfc8: 4630 mov r0, r6 802cfca: 4960 ldr r1, [pc, #384] ; (802d14c ) 802cfcc: 2215 movs r2, #21 802cfce: f7f4 ffd1 bl 8021f74 802cfd2: b920 cbnz r0, 802cfde { HTTP_UpdateUserLoginTime(user_id); 802cfd4: 4638 mov r0, r7 802cfd6: f7fe fd6f bl 802bab8 fs_open("/ups_history.html", &file); 802cfda: 485d ldr r0, [pc, #372] ; (802d150 ) 802cfdc: e18a b.n 802d2f4 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) // + 802cfde: 4630 mov r0, r6 802cfe0: 495c ldr r1, [pc, #368] ; (802d154 ) 802cfe2: 2210 movs r2, #16 802cfe4: f7f4 ffc6 bl 8021f74 802cfe8: b940 cbnz r0, 802cffc { HTTP_GetParamsPage1(sendBuf); 802cfea: 4e43 ldr r6, [pc, #268] ; (802d0f8 ) 802cfec: 4630 mov r0, r6 802cfee: f000 f9df bl 802d3b0 hs->file = sendBuf; 802cff2: 6026 str r6, [r4, #0] hs->left = strlen(sendBuf); 802cff4: 4630 mov r0, r6 802cff6: f7f4 ff5b bl 8021eb0 802cffa: e042 b.n 802d082 send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /settings.cgi", 17) == 0) // + 802cffc: 4630 mov r0, r6 802cffe: 4956 ldr r1, [pc, #344] ; (802d158 ) 802d000: 2211 movs r2, #17 802d002: f7f4 ffb7 bl 8021f74 802d006: b988 cbnz r0, 802d02c { SET_PAGE = SET_PAGE_PAGE2; 802d008: 4b54 ldr r3, [pc, #336] ; (802d15c ) 802d00a: 2202 movs r2, #2 802d00c: 701a strb r2, [r3, #0] if (seclevel == 0) { 802d00e: 4b4a ldr r3, [pc, #296] ; (802d138 ) 802d010: 781b ldrb r3, [r3, #0] 802d012: 2b00 cmp r3, #0 802d014: f040 817d bne.w 802d312 if (HTTP_SettingsPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen) == SEND_REQUIRED_YES) 802d018: 4f37 ldr r7, [pc, #220] ; (802d0f8 ) 802d01a: 4e38 ldr r6, [pc, #224] ; (802d0fc ) 802d01c: 4b50 ldr r3, [pc, #320] ; (802d160 ) 802d01e: 4851 ldr r0, [pc, #324] ; (802d164 ) 802d020: 881a ldrh r2, [r3, #0] 802d022: 4639 mov r1, r7 802d024: 4633 mov r3, r6 802d026: f7fe fed5 bl 802bdd4 802d02a: e0e9 b.n 802d200 send_data(pcb, hs); tcp_sent(pcb, http_sent); }*/ } } else if (strncmp(data, "POST /settings.cgi", 18) == 0) 802d02c: 4630 mov r0, r6 802d02e: 494e ldr r1, [pc, #312] ; (802d168 ) 802d030: 2212 movs r2, #18 802d032: f7f4 ff9f bl 8021f74 802d036: 4681 mov r9, r0 802d038: bb28 cbnz r0, 802d086 { strncat(&receiveBuf, " ", 1); 802d03a: 2201 movs r2, #1 802d03c: 494b ldr r1, [pc, #300] ; (802d16c ) 802d03e: 4849 ldr r0, [pc, #292] ; (802d164 ) HTTP_SetSettings(receiveBuf, receivedBufLen); memset(sendBuf, 0, SEND_BUF_MAX_LEN); 802d040: 4e2d ldr r6, [pc, #180] ; (802d0f8 ) }*/ } } else if (strncmp(data, "POST /settings.cgi", 18) == 0) { strncat(&receiveBuf, " ", 1); 802d042: f7f4 ff65 bl 8021f10 HTTP_SetSettings(receiveBuf, receivedBufLen); 802d046: 4b46 ldr r3, [pc, #280] ; (802d160 ) 802d048: 4846 ldr r0, [pc, #280] ; (802d164 ) 802d04a: 8819 ldrh r1, [r3, #0] 802d04c: f7ff f9d8 bl 802c400 memset(sendBuf, 0, SEND_BUF_MAX_LEN); 802d050: f44f 62fa mov.w r2, #2000 ; 0x7d0 802d054: 4649 mov r1, r9 802d056: 4630 mov r0, r6 802d058: f7f4 fd52 bl 8021b00 strcpy(sendBuf, "HTTP/1.1 200 OK\r\n"); 802d05c: 4944 ldr r1, [pc, #272] ; (802d170 ) 802d05e: 4630 mov r0, r6 802d060: f7f4 fec8 bl 8021df4 strcat(sendBuf, "\r\n\r\n"); 802d064: 4943 ldr r1, [pc, #268] ; (802d174 ) 802d066: 4630 mov r0, r6 802d068: f7f4 fdb0 bl 8021bcc strcat(sendBuf,"\r\n\r\n"); 802d06c: 4942 ldr r1, [pc, #264] ; (802d178 ) 802d06e: 4630 mov r0, r6 802d070: f7f4 fdac bl 8021bcc sendBufLoadLen = strlen(sendBuf); 802d074: 4630 mov r0, r6 802d076: f7f4 ff1b bl 8021eb0 802d07a: 4b20 ldr r3, [pc, #128] ; (802d0fc ) 802d07c: 8018 strh r0, [r3, #0] hs->file = sendBuf; 802d07e: 6026 str r6, [r4, #0] hs->left = sendBufLoadLen; 802d080: b280 uxth r0, r0 802d082: 6060 str r0, [r4, #4] 802d084: e13d b.n 802d302 send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /info.cgi", 13) == 0) // + 802d086: 4630 mov r0, r6 802d088: 493c ldr r1, [pc, #240] ; (802d17c ) 802d08a: 220d movs r2, #13 802d08c: f7f4 ff72 bl 8021f74 802d090: b948 cbnz r0, 802d0a6 { if (HTTP_InfoPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen) == SEND_REQUIRED_YES) 802d092: 4f19 ldr r7, [pc, #100] ; (802d0f8 ) 802d094: 4e19 ldr r6, [pc, #100] ; (802d0fc ) 802d096: 4b32 ldr r3, [pc, #200] ; (802d160 ) 802d098: 4832 ldr r0, [pc, #200] ; (802d164 ) 802d09a: 881a ldrh r2, [r3, #0] 802d09c: 4639 mov r1, r7 802d09e: 4633 mov r3, r6 802d0a0: f7fe febc bl 802be1c 802d0a4: e0ac b.n 802d200 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); }*/ } else if (strncmp(data, "POST /info.cgi", 14) == 0) 802d0a6: 4630 mov r0, r6 802d0a8: 4935 ldr r1, [pc, #212] ; (802d180 ) 802d0aa: 220e movs r2, #14 802d0ac: f7f4 ff62 bl 8021f74 802d0b0: 4681 mov r9, r0 802d0b2: 2800 cmp r0, #0 802d0b4: d168 bne.n 802d188 { strncat(&receiveBuf, " ", 1); 802d0b6: 2201 movs r2, #1 802d0b8: 492c ldr r1, [pc, #176] ; (802d16c ) 802d0ba: 482a ldr r0, [pc, #168] ; (802d164 ) HTTP_SetInfo(receiveBuf, receivedBufLen); memset(sendBuf, 0, SEND_BUF_MAX_LEN); 802d0bc: 4e0e ldr r6, [pc, #56] ; (802d0f8 ) tcp_sent(pcb, http_sent); }*/ } else if (strncmp(data, "POST /info.cgi", 14) == 0) { strncat(&receiveBuf, " ", 1); 802d0be: f7f4 ff27 bl 8021f10 HTTP_SetInfo(receiveBuf, receivedBufLen); 802d0c2: 4b27 ldr r3, [pc, #156] ; (802d160 ) 802d0c4: 4827 ldr r0, [pc, #156] ; (802d164 ) 802d0c6: 8819 ldrh r1, [r3, #0] 802d0c8: f7ff f948 bl 802c35c memset(sendBuf, 0, SEND_BUF_MAX_LEN); 802d0cc: f44f 62fa mov.w r2, #2000 ; 0x7d0 802d0d0: 4649 mov r1, r9 802d0d2: 4630 mov r0, r6 802d0d4: f7f4 fd14 bl 8021b00 strcpy(sendBuf, "HTTP/1.1 200 OK\r\n"); 802d0d8: 4925 ldr r1, [pc, #148] ; (802d170 ) 802d0da: 4630 mov r0, r6 802d0dc: f7f4 fe8a bl 8021df4 strcat(sendBuf, "\r\n\r\n"); 802d0e0: 4924 ldr r1, [pc, #144] ; (802d174 ) 802d0e2: 4630 mov r0, r6 802d0e4: f7f4 fd72 bl 8021bcc strcat(sendBuf,"\r\n\r\n"); 802d0e8: 4630 mov r0, r6 802d0ea: 4926 ldr r1, [pc, #152] ; (802d184 ) 802d0ec: e7c0 b.n 802d070 802d0ee: bf00 nop 802d0f0: 2000e260 .word 0x2000e260 802d0f4: 2000e134 .word 0x2000e134 802d0f8: 2000d388 .word 0x2000d388 802d0fc: 20000d18 .word 0x20000d18 802d100: 08040dc0 .word 0x08040dc0 802d104: 0802bbc7 .word 0x0802bbc7 802d108: 2000e234 .word 0x2000e234 802d10c: 08040d75 .word 0x08040d75 802d110: 08040d79 .word 0x08040d79 802d114: 08040d83 .word 0x08040d83 802d118: 08040d87 .word 0x08040d87 802d11c: 08040d92 .word 0x08040d92 802d120: 08040d96 .word 0x08040d96 802d124: 08040de5 .word 0x08040de5 802d128: 08040de9 .word 0x08040de9 802d12c: 08040da3 .word 0x08040da3 802d130: 08040da7 .word 0x08040da7 802d134: 08040df2 .word 0x08040df2 802d138: 2000070a .word 0x2000070a 802d13c: 08040e11 .word 0x08040e11 802d140: 08040e15 .word 0x08040e15 802d144: 08040e20 .word 0x08040e20 802d148: 08040e24 .word 0x08040e24 802d14c: 08040e32 .word 0x08040e32 802d150: 08040e36 .word 0x08040e36 802d154: 08040e48 .word 0x08040e48 802d158: 08040e59 .word 0x08040e59 802d15c: 20000d2c .word 0x20000d2c 802d160: 20000d2e .word 0x20000d2e 802d164: 2000db58 .word 0x2000db58 802d168: 08040e6b .word 0x08040e6b 802d16c: 080399a6 .word 0x080399a6 802d170: 08040e7e .word 0x08040e7e 802d174: 08040f82 .word 0x08040f82 802d178: 08040e90 .word 0x08040e90 802d17c: 08040eff .word 0x08040eff 802d180: 08040f0d .word 0x08040f0d 802d184: 08040f1c .word 0x08040f1c hs->file = sendBuf; hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /history.cgi", 16) == 0) 802d188: 4630 mov r0, r6 802d18a: 4965 ldr r1, [pc, #404] ; (802d320 ) 802d18c: 2210 movs r2, #16 802d18e: f7f4 fef1 bl 8021f74 802d192: b9a0 cbnz r0, 802d1be { int res; res = HTTP_HistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802d194: 4b63 ldr r3, [pc, #396] ; (802d324 ) 802d196: 4f64 ldr r7, [pc, #400] ; (802d328 ) 802d198: 4e64 ldr r6, [pc, #400] ; (802d32c ) 802d19a: 881a ldrh r2, [r3, #0] 802d19c: 4864 ldr r0, [pc, #400] ; (802d330 ) 802d19e: 4639 mov r1, r7 802d1a0: 4633 mov r3, r6 802d1a2: f7ff fc01 bl 802c9a8 if (res == SEND_REQUIRED_FILE) 802d1a6: 2802 cmp r0, #2 802d1a8: d12a bne.n 802d200 { hs->file = sendBuf; hs->left = sendBufLoadLen; 802d1aa: 8833 ldrh r3, [r6, #0] res = HTTP_HistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); if (res == SEND_REQUIRED_FILE) { hs->file = sendBuf; 802d1ac: 6027 str r7, [r4, #0] hs->left = sendBufLoadLen; send_data(pcb, hs); 802d1ae: 4628 mov r0, r5 802d1b0: 4621 mov r1, r4 res = HTTP_HistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); if (res == SEND_REQUIRED_FILE) { hs->file = sendBuf; hs->left = sendBufLoadLen; 802d1b2: 6063 str r3, [r4, #4] send_data(pcb, hs); 802d1b4: f7fe fcce bl 802bb54 tcp_sent(pcb, http_sent_history); 802d1b8: 4628 mov r0, r5 802d1ba: 495e ldr r1, [pc, #376] ; (802d334 ) 802d1bc: e019 b.n 802d1f2 hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } } else if (strncmp(data, "GET /ups_history.cgi", 19) == 0) 802d1be: 4630 mov r0, r6 802d1c0: 495d ldr r1, [pc, #372] ; (802d338 ) 802d1c2: 2213 movs r2, #19 802d1c4: f7f4 fed6 bl 8021f74 802d1c8: b9f0 cbnz r0, 802d208 { int res; res = HTTP_UpsHistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802d1ca: 4b56 ldr r3, [pc, #344] ; (802d324 ) 802d1cc: 4f56 ldr r7, [pc, #344] ; (802d328 ) 802d1ce: 4e57 ldr r6, [pc, #348] ; (802d32c ) 802d1d0: 881a ldrh r2, [r3, #0] 802d1d2: 4857 ldr r0, [pc, #348] ; (802d330 ) 802d1d4: 4639 mov r1, r7 802d1d6: 4633 mov r3, r6 802d1d8: f7ff fb8a bl 802c8f0 if (res == SEND_REQUIRED_FILE) 802d1dc: 2802 cmp r0, #2 802d1de: d10f bne.n 802d200 { hs->file = sendBuf; hs->left = sendBufLoadLen; 802d1e0: 8833 ldrh r3, [r6, #0] res = HTTP_UpsHistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); if (res == SEND_REQUIRED_FILE) { hs->file = sendBuf; 802d1e2: 6027 str r7, [r4, #0] hs->left = sendBufLoadLen; send_data(pcb, hs); 802d1e4: 4628 mov r0, r5 802d1e6: 4621 mov r1, r4 res = HTTP_UpsHistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); if (res == SEND_REQUIRED_FILE) { hs->file = sendBuf; hs->left = sendBufLoadLen; 802d1e8: 6063 str r3, [r4, #4] send_data(pcb, hs); 802d1ea: f7fe fcb3 bl 802bb54 tcp_sent(pcb, http_sent_log); 802d1ee: 4953 ldr r1, [pc, #332] ; (802d33c ) 802d1f0: 4628 mov r0, r5 802d1f2: f003 f8d5 bl 80303a0 tcp_err(pcb, http_sent_log_err); 802d1f6: 4628 mov r0, r5 802d1f8: 4951 ldr r1, [pc, #324] ; (802d340 ) 802d1fa: f003 f8d3 bl 80303a4 802d1fe: e088 b.n 802d312 } else if (res == SEND_REQUIRED_YES) { 802d200: 2800 cmp r0, #0 802d202: f040 8086 bne.w 802d312 802d206: e06e b.n 802d2e6 send_data(pcb, hs); tcp_sent(pcb, http_sent); } } /* Тест АКБ ИБП */ else if (strncmp(data, "POST /bat_test.cgi", 18) == 0) 802d208: 4630 mov r0, r6 802d20a: 494e ldr r1, [pc, #312] ; (802d344 ) 802d20c: 2212 movs r2, #18 802d20e: f7f4 feb1 bl 8021f74 802d212: b948 cbnz r0, 802d228 { HTTP_UPSTest(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802d214: 4f44 ldr r7, [pc, #272] ; (802d328 ) 802d216: 4e45 ldr r6, [pc, #276] ; (802d32c ) 802d218: 4b42 ldr r3, [pc, #264] ; (802d324 ) 802d21a: 4845 ldr r0, [pc, #276] ; (802d330 ) 802d21c: 881a ldrh r2, [r3, #0] 802d21e: 4639 mov r1, r7 802d220: 4633 mov r3, r6 802d222: f7fe fe1f bl 802be64 802d226: e05e b.n 802d2e6 hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Выключение ИБП */ else if (strncmp(data, "POST /ups_power.cgi", 19) == 0) 802d228: 4630 mov r0, r6 802d22a: 4947 ldr r1, [pc, #284] ; (802d348 ) 802d22c: 2213 movs r2, #19 802d22e: f7f4 fea1 bl 8021f74 802d232: b948 cbnz r0, 802d248 { HTTP_UPSshutdown(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802d234: 4f3c ldr r7, [pc, #240] ; (802d328 ) 802d236: 4e3d ldr r6, [pc, #244] ; (802d32c ) 802d238: 4b3a ldr r3, [pc, #232] ; (802d324 ) 802d23a: 483d ldr r0, [pc, #244] ; (802d330 ) 802d23c: 881a ldrh r2, [r3, #0] 802d23e: 4639 mov r1, r7 802d240: 4633 mov r3, r6 802d242: f7fe fe91 bl 802bf68 802d246: e04e b.n 802d2e6 hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Сброс настроек и сохранине */ else if (strncmp(data, "GET /reset.cgi", 14) == 0) 802d248: 4630 mov r0, r6 802d24a: 4940 ldr r1, [pc, #256] ; (802d34c ) 802d24c: 220e movs r2, #14 802d24e: f7f4 fe91 bl 8021f74 802d252: b928 cbnz r0, 802d260 { HTTP_ResetSettings(); 802d254: f000 fd48 bl 802dce8 HTTP_SaveSettings(); 802d258: f000 fd5a bl 802dd10 fs_open("/settings.html", &file); 802d25c: 483c ldr r0, [pc, #240] ; (802d350 ) 802d25e: e049 b.n 802d2f4 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Перезагрузка контроллера */ else if (strncmp(data, "GET /reboot.cgi", 15) == 0) 802d260: 4630 mov r0, r6 802d262: 493c ldr r1, [pc, #240] ; (802d354 ) 802d264: 220f movs r2, #15 802d266: f7f4 fe85 bl 8021f74 802d26a: b910 cbnz r0, 802d272 { HTTP_Reboot(); 802d26c: f000 fd52 bl 802dd14 802d270: e04f b.n 802d312 } /* Подтверждение новых сетевых настроек */ else if (strncmp(data, "GET /confirm.cgi", 16) == 0) 802d272: 4630 mov r0, r6 802d274: 4938 ldr r1, [pc, #224] ; (802d358 ) 802d276: 2210 movs r2, #16 802d278: f7f4 fe7c bl 8021f74 802d27c: b920 cbnz r0, 802d288 { SetWebReinitFlag(false); 802d27e: f7fa ff51 bl 8028124 SetConfirmWebParamsFlag(); 802d282: f7fa ff55 bl 8028130 802d286: e034 b.n 802d2f2 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Проверка пароля, переход в bootloader */ else if (strncmp(data, "GET /fw_update.cgi", 18) == 0) 802d288: 4630 mov r0, r6 802d28a: 4934 ldr r1, [pc, #208] ; (802d35c ) 802d28c: 2212 movs r2, #18 802d28e: f7f4 fe71 bl 8021f74 802d292: b948 cbnz r0, 802d2a8 { HTTP_ConfirmBootPwd(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802d294: 4f24 ldr r7, [pc, #144] ; (802d328 ) 802d296: 4e25 ldr r6, [pc, #148] ; (802d32c ) 802d298: 4b22 ldr r3, [pc, #136] ; (802d324 ) 802d29a: 4825 ldr r0, [pc, #148] ; (802d330 ) 802d29c: 881a ldrh r2, [r3, #0] 802d29e: 4639 mov r1, r7 802d2a0: 4633 mov r3, r6 802d2a2: f7fe ff09 bl 802c0b8 802d2a6: e01e b.n 802d2e6 hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Смена пароля пользователя */ else if (strncmp(data, "POST /changepwd.cgi", 19) == 0) 802d2a8: 4630 mov r0, r6 802d2aa: 492d ldr r1, [pc, #180] ; (802d360 ) 802d2ac: 2213 movs r2, #19 802d2ae: f7f4 fe61 bl 8021f74 802d2b2: b948 cbnz r0, 802d2c8 { HTTP_ChangeUserPwd(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802d2b4: 4f1c ldr r7, [pc, #112] ; (802d328 ) 802d2b6: 4e1d ldr r6, [pc, #116] ; (802d32c ) 802d2b8: 4b1a ldr r3, [pc, #104] ; (802d324 ) 802d2ba: 481d ldr r0, [pc, #116] ; (802d330 ) 802d2bc: 881a ldrh r2, [r3, #0] 802d2be: 4639 mov r1, r7 802d2c0: 4633 mov r3, r6 802d2c2: f7ff fbcf bl 802ca64 802d2c6: e00e b.n 802d2e6 hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } // На производстве else if (strncmp(data, "GET /setProdate.cgi", 19) == 0) 802d2c8: 4630 mov r0, r6 802d2ca: 4926 ldr r1, [pc, #152] ; (802d364 ) 802d2cc: 2213 movs r2, #19 802d2ce: f7f4 fe51 bl 8021f74 802d2d2: b958 cbnz r0, 802d2ec { HTTP_Prodate(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802d2d4: 4b13 ldr r3, [pc, #76] ; (802d324 ) 802d2d6: 4f14 ldr r7, [pc, #80] ; (802d328 ) 802d2d8: 4e14 ldr r6, [pc, #80] ; (802d32c ) 802d2da: 881a ldrh r2, [r3, #0] 802d2dc: 4814 ldr r0, [pc, #80] ; (802d330 ) 802d2de: 4639 mov r1, r7 802d2e0: 4633 mov r3, r6 802d2e2: f7ff fad1 bl 802c888 hs->file = sendBuf; 802d2e6: 6027 str r7, [r4, #0] hs->left = sendBufLoadLen; 802d2e8: 8833 ldrh r3, [r6, #0] 802d2ea: e009 b.n 802d300 send_data(pcb, hs); tcp_sent(pcb, http_sent); } else { HTTP_UpdateUserLoginTime(user_id); 802d2ec: 4638 mov r0, r7 802d2ee: f7fe fbe3 bl 802bab8 fs_open("/index.html", &file); // + 802d2f2: 481d ldr r0, [pc, #116] ; (802d368 ) 802d2f4: a905 add r1, sp, #20 802d2f6: f7fe fbf1 bl 802badc hs->file = file.data; 802d2fa: 9b05 ldr r3, [sp, #20] 802d2fc: 6023 str r3, [r4, #0] hs->left = file.len; 802d2fe: 9b06 ldr r3, [sp, #24] 802d300: 6063 str r3, [r4, #4] send_data(pcb, hs); 802d302: 4628 mov r0, r5 802d304: 4621 mov r1, r4 802d306: f7fe fc25 bl 802bb54 tcp_sent(pcb, http_sent); 802d30a: 4628 mov r0, r5 802d30c: 4917 ldr r1, [pc, #92] ; (802d36c ) 802d30e: f003 f847 bl 80303a0 } } } pbuf_free(p); 802d312: 4640 mov r0, r8 802d314: f002 fcfa bl 802fd0c /* if (err == ERR_OK && p == NULL) { close_conn(pcb, hs); }*/ return ERR_OK; } 802d318: 2000 movs r0, #0 802d31a: b01d add sp, #116 ; 0x74 802d31c: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802d320: 08040f87 .word 0x08040f87 802d324: 20000d2e .word 0x20000d2e 802d328: 2000d388 .word 0x2000d388 802d32c: 20000d18 .word 0x20000d18 802d330: 2000db58 .word 0x2000db58 802d334: 0802bc81 .word 0x0802bc81 802d338: 08040f98 .word 0x08040f98 802d33c: 0802bbe1 .word 0x0802bbe1 802d340: 0802baad .word 0x0802baad 802d344: 08040fad .word 0x08040fad 802d348: 08040fc0 .word 0x08040fc0 802d34c: 08040fd4 .word 0x08040fd4 802d350: 08040df6 .word 0x08040df6 802d354: 08040fe3 .word 0x08040fe3 802d358: 08040ff3 .word 0x08040ff3 802d35c: 08041004 .word 0x08041004 802d360: 08041017 .word 0x08041017 802d364: 0804102b .word 0x0804102b 802d368: 08040e05 .word 0x08040e05 802d36c: 0802bbc7 .word 0x0802bbc7 0802d370 : /** * @brief */ void vTaskReboot(void * pvParameters) { 802d370: b510 push {r4, lr} 802d372: 4604 mov r4, r0 for (;;) { mode = *(bool*)pvParameters; if (mode) 802d374: 7823 ldrb r3, [r4, #0] 802d376: b16b cbz r3, 802d394 { SNMP_SendUserTrap(FW_VERSION_UPDATE); 802d378: 2001 movs r0, #1 802d37a: f00a fe5f bl 803803c log_event_data(LOG_UPDATE_SOFT, "Администратор"); 802d37e: 2002 movs r0, #2 802d380: 490a ldr r1, [pc, #40] ; (802d3ac ) 802d382: f7fc fb05 bl 8029990 SetLoadMode(); 802d386: f7fa fec1 bl 802810c */ void HTTP_SaveSettings(void) { // taskENTER_CRITICAL(); SETTINGS_Save(); 802d38a: f7fb fa79 bl 8028880 { SNMP_SendUserTrap(FW_VERSION_UPDATE); log_event_data(LOG_UPDATE_SOFT, "Администратор"); SetLoadMode(); HTTP_SaveSettings(); vTaskDelay(2000); 802d38e: f44f 60fa mov.w r0, #2000 ; 0x7d0 802d392: e001 b.n 802d398 vTaskDelay(1010); Reboot(); } else { vTaskDelay(1000); 802d394: f44f 707a mov.w r0, #1000 ; 0x3e8 802d398: f7fd fdb2 bl 802af00 /* Блокируем управление ключем на тау секунд*/ //IO_KeyBlockOn(); vTaskDelay(1010); 802d39c: f240 30f2 movw r0, #1010 ; 0x3f2 802d3a0: f7fd fdae bl 802af00 Reboot(); 802d3a4: f7fb fe5e bl 8029064 802d3a8: e7e4 b.n 802d374 802d3aa: bf00 nop 802d3ac: 08039980 .word 0x08039980 0802d3b0 : /** * @brief Возвращяет строку с настройками на первой странице * @retval None */ void HTTP_GetParamsPage1(char *buf) { 802d3b0: b510 push {r4, lr} char str[40]; uint8_t len; memset(buf, 0, 1000); 802d3b2: f44f 727a mov.w r2, #1000 ; 0x3e8 /** * @brief Возвращяет строку с настройками на первой странице * @retval None */ void HTTP_GetParamsPage1(char *buf) { 802d3b6: b08c sub sp, #48 ; 0x30 802d3b8: 4604 mov r4, r0 char str[40]; uint8_t len; memset(buf, 0, 1000); 802d3ba: 2100 movs r1, #0 802d3bc: f7f4 fba0 bl 8021b00 // Headers для поддержки saffari strcpy(buf, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\n"); 802d3c0: 4620 mov r0, r4 802d3c2: 496f ldr r1, [pc, #444] ; (802d580 ) 802d3c4: f7f4 fd16 bl 8021df4 // Параметры UPS GetInputVoltageStr(str, &len); 802d3c8: a802 add r0, sp, #8 802d3ca: f10d 0107 add.w r1, sp, #7 802d3ce: f7fa fa59 bl 8027884 strcat(buf, "{\"AC\":\""); 802d3d2: 4620 mov r0, r4 802d3d4: 496b ldr r1, [pc, #428] ; (802d584 ) 802d3d6: f7f4 fbf9 bl 8021bcc strncat(buf, str, len); 802d3da: f89d 2007 ldrb.w r2, [sp, #7] 802d3de: a902 add r1, sp, #8 802d3e0: 4620 mov r0, r4 802d3e2: f7f4 fd95 bl 8021f10 GetOutputVoltageStr(str, &len); 802d3e6: a802 add r0, sp, #8 802d3e8: f10d 0107 add.w r1, sp, #7 802d3ec: f7fa fa60 bl 80278b0 strcat(buf, "\",\"DC\":\""); 802d3f0: 4620 mov r0, r4 802d3f2: 4965 ldr r1, [pc, #404] ; (802d588 ) 802d3f4: f7f4 fbea bl 8021bcc strncat(buf, str, len); 802d3f8: f89d 2007 ldrb.w r2, [sp, #7] 802d3fc: a902 add r1, sp, #8 802d3fe: 4620 mov r0, r4 802d400: f7f4 fd86 bl 8021f10 GetInputFreqStr(str, &len); 802d404: a802 add r0, sp, #8 802d406: f10d 0107 add.w r1, sp, #7 802d40a: f7fa fa0f bl 802782c strcat(buf, "\",\"in_freq\":\""); 802d40e: 4620 mov r0, r4 802d410: 495e ldr r1, [pc, #376] ; (802d58c ) 802d412: f7f4 fbdb bl 8021bcc strncat(buf, str, len); 802d416: f89d 2007 ldrb.w r2, [sp, #7] 802d41a: a902 add r1, sp, #8 802d41c: 4620 mov r0, r4 802d41e: f7f4 fd77 bl 8021f10 GetOutputFreqStr(str, &len); 802d422: a802 add r0, sp, #8 802d424: f10d 0107 add.w r1, sp, #7 802d428: f7fa fa16 bl 8027858 strcat(buf, "\",\"out_freq\":\""); 802d42c: 4620 mov r0, r4 802d42e: 4958 ldr r1, [pc, #352] ; (802d590 ) 802d430: f7f4 fbcc bl 8021bcc strncat(buf, str, len); 802d434: f89d 2007 ldrb.w r2, [sp, #7] 802d438: a902 add r1, sp, #8 802d43a: 4620 mov r0, r4 802d43c: f7f4 fd68 bl 8021f10 GetPowerStr(str, &len); 802d440: a802 add r0, sp, #8 802d442: f10d 0107 add.w r1, sp, #7 802d446: f7fa fa49 bl 80278dc strcat(buf, "\",\"pwr\":\""); 802d44a: 4620 mov r0, r4 802d44c: 4951 ldr r1, [pc, #324] ; (802d594 ) 802d44e: f7f4 fbbd bl 8021bcc strncat(buf, str, len); 802d452: f89d 2007 ldrb.w r2, [sp, #7] 802d456: a902 add r1, sp, #8 802d458: 4620 mov r0, r4 802d45a: f7f4 fd59 bl 8021f10 GetBatCapacityStr(str, &len); 802d45e: a802 add r0, sp, #8 802d460: f10d 0107 add.w r1, sp, #7 802d464: f7fa fa4c bl 8027900 strcat(buf, "\",\"bat_cap\":\""); 802d468: 4620 mov r0, r4 802d46a: 494b ldr r1, [pc, #300] ; (802d598 ) 802d46c: f7f4 fbae bl 8021bcc strncat(buf, str, len); 802d470: f89d 2007 ldrb.w r2, [sp, #7] 802d474: a902 add r1, sp, #8 802d476: 4620 mov r0, r4 802d478: f7f4 fd4a bl 8021f10 GetInternalTempStr(str, &len); 802d47c: a802 add r0, sp, #8 802d47e: f10d 0107 add.w r1, sp, #7 802d482: f7fa fa61 bl 8027948 strcat(buf, "\",\"inner_temp\":\""); 802d486: 4620 mov r0, r4 802d488: 4944 ldr r1, [pc, #272] ; (802d59c ) 802d48a: f7f4 fb9f bl 8021bcc strncat(buf, str, len); 802d48e: f89d 2007 ldrb.w r2, [sp, #7] 802d492: a902 add r1, sp, #8 802d494: 4620 mov r0, r4 802d496: f7f4 fd3b bl 8021f10 GetRuntimeStr(str, &len); 802d49a: a802 add r0, sp, #8 802d49c: f10d 0107 add.w r1, sp, #7 802d4a0: f7fa fa40 bl 8027924 strcat(buf, "\",\"bat_time_left\":\""); 802d4a4: 4620 mov r0, r4 802d4a6: 493e ldr r1, [pc, #248] ; (802d5a0 ) 802d4a8: f7f4 fb90 bl 8021bcc strncat(buf, str, len); 802d4ac: a902 add r1, sp, #8 802d4ae: f89d 2007 ldrb.w r2, [sp, #7] 802d4b2: 4620 mov r0, r4 802d4b4: f7f4 fd2c bl 8021f10 GetDINStatusStr(str, &len, 0); 802d4b8: 2200 movs r2, #0 802d4ba: a802 add r0, sp, #8 802d4bc: f10d 0107 add.w r1, sp, #7 802d4c0: f7fa fb40 bl 8027b44 strcat(buf, "\",\"di1\":\""); 802d4c4: 4620 mov r0, r4 802d4c6: 4937 ldr r1, [pc, #220] ; (802d5a4 ) 802d4c8: f7f4 fb80 bl 8021bcc strncat(buf, str, len); 802d4cc: a902 add r1, sp, #8 802d4ce: f89d 2007 ldrb.w r2, [sp, #7] 802d4d2: 4620 mov r0, r4 802d4d4: f7f4 fd1c bl 8021f10 GetDOUTStatusStr(str, &len, 0); 802d4d8: a802 add r0, sp, #8 802d4da: f10d 0107 add.w r1, sp, #7 802d4de: 2200 movs r2, #0 802d4e0: f7fa fb6a bl 8027bb8 strcat(buf, "\",\"ro1\":\""); 802d4e4: 4620 mov r0, r4 802d4e6: 4930 ldr r1, [pc, #192] ; (802d5a8 ) 802d4e8: f7f4 fb70 bl 8021bcc strncat(buf, str, len); 802d4ec: a902 add r1, sp, #8 802d4ee: f89d 2007 ldrb.w r2, [sp, #7] 802d4f2: 4620 mov r0, r4 802d4f4: f7f4 fd0c bl 8021f10 GetDOUTStatusStr(str, &len, 1); 802d4f8: 2201 movs r2, #1 802d4fa: a802 add r0, sp, #8 802d4fc: f10d 0107 add.w r1, sp, #7 802d500: f7fa fb5a bl 8027bb8 strcat(buf, "\",\"ro2\":\""); 802d504: 4620 mov r0, r4 802d506: 4929 ldr r1, [pc, #164] ; (802d5ac ) 802d508: f7f4 fb60 bl 8021bcc strncat(buf, str, len); 802d50c: f89d 2007 ldrb.w r2, [sp, #7] 802d510: a902 add r1, sp, #8 802d512: 4620 mov r0, r4 802d514: f7f4 fcfc bl 8021f10 // Мониторинг // load_monitor (нагрузка, 0 - норма, 1 - fail) // temp_monitor (внутренняя температура, 0 - норма, 1 - fail) // connect_monitor (связь с UPSом, 0 - норма, 1 - fail) GetAlarmMonitorStr(str, &len); 802d518: a802 add r0, sp, #8 802d51a: f10d 0107 add.w r1, sp, #7 802d51e: f7fa fa29 bl 8027974 strcat(buf, "\",\"m_alarm\":\""); 802d522: 4620 mov r0, r4 802d524: 4922 ldr r1, [pc, #136] ; (802d5b0 ) 802d526: f7f4 fb51 bl 8021bcc strncat(buf, str, len); 802d52a: f89d 2007 ldrb.w r2, [sp, #7] 802d52e: a902 add r1, sp, #8 802d530: 4620 mov r0, r4 802d532: f7f4 fced bl 8021f10 GetAlarmStr(str, &len); 802d536: a802 add r0, sp, #8 802d538: f10d 0107 add.w r1, sp, #7 802d53c: f7fa fa3e bl 80279bc strcat(buf, "\",\"u_alarm\":\""); 802d540: 4620 mov r0, r4 802d542: 491c ldr r1, [pc, #112] ; (802d5b4 ) 802d544: f7f4 fb42 bl 8021bcc strncat(buf, str, len); 802d548: f89d 2007 ldrb.w r2, [sp, #7] 802d54c: a902 add r1, sp, #8 802d54e: 4620 mov r0, r4 802d550: f7f4 fcde bl 8021f10 // Признак изменения сетевых настроек GetWebReinitFlag(str, &len); 802d554: a802 add r0, sp, #8 802d556: f10d 0107 add.w r1, sp, #7 802d55a: f7fa fdbd bl 80280d8 strcat(buf, "\",\"netsettings_changed\":\""); 802d55e: 4620 mov r0, r4 802d560: 4915 ldr r1, [pc, #84] ; (802d5b8 ) 802d562: f7f4 fb33 bl 8021bcc strncat(buf, str, len); 802d566: a902 add r1, sp, #8 802d568: f89d 2007 ldrb.w r2, [sp, #7] 802d56c: 4620 mov r0, r4 802d56e: f7f4 fccf bl 8021f10 strncat(buf, "\"}", 2); 802d572: 4620 mov r0, r4 802d574: 4911 ldr r1, [pc, #68] ; (802d5bc ) 802d576: 2202 movs r2, #2 802d578: f7f4 fcca bl 8021f10 //printf(buf); } 802d57c: b00c add sp, #48 ; 0x30 802d57e: bd10 pop {r4, pc} 802d580: 08044aa0 .word 0x08044aa0 802d584: 08044acc .word 0x08044acc 802d588: 08044ad4 .word 0x08044ad4 802d58c: 08044add .word 0x08044add 802d590: 08044aeb .word 0x08044aeb 802d594: 08044afa .word 0x08044afa 802d598: 08044b04 .word 0x08044b04 802d59c: 08044b12 .word 0x08044b12 802d5a0: 08044b23 .word 0x08044b23 802d5a4: 08044b37 .word 0x08044b37 802d5a8: 08044b41 .word 0x08044b41 802d5ac: 08044b4b .word 0x08044b4b 802d5b0: 08044b55 .word 0x08044b55 802d5b4: 08044b63 .word 0x08044b63 802d5b8: 08044b71 .word 0x08044b71 802d5bc: 08044b8b .word 0x08044b8b 0802d5c0 : /** * @brief Возвращяет строку с настройками на второй странице * @retval None */ void HTTP_GetSettings(char *buf) { 802d5c0: 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"); 802d5c2: 49bf ldr r1, [pc, #764] ; (802d8c0 ) /** * @brief Возвращяет строку с настройками на второй странице * @retval None */ void HTTP_GetSettings(char *buf) { 802d5c4: b08a sub sp, #40 ; 0x28 802d5c6: 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"); 802d5c8: f7f4 fc14 bl 8021df4 /* SNMP */ GetReadCommunity(str, &len); 802d5cc: a802 add r0, sp, #8 802d5ce: f10d 0107 add.w r1, sp, #7 802d5d2: f7fa fcb1 bl 8027f38 strcat(buf, "{\"read_community\":\""); 802d5d6: 4620 mov r0, r4 802d5d8: 49ba ldr r1, [pc, #744] ; (802d8c4 ) 802d5da: f7f4 faf7 bl 8021bcc strncat(buf, str, len); 802d5de: f89d 2007 ldrb.w r2, [sp, #7] 802d5e2: a902 add r1, sp, #8 802d5e4: 4620 mov r0, r4 802d5e6: f7f4 fc93 bl 8021f10 GetWriteCommunity(str, &len); 802d5ea: a802 add r0, sp, #8 802d5ec: f10d 0107 add.w r1, sp, #7 802d5f0: f7fa fcb2 bl 8027f58 strcat(buf, "\",\"write_community\":\""); 802d5f4: 4620 mov r0, r4 802d5f6: 49b4 ldr r1, [pc, #720] ; (802d8c8 ) 802d5f8: f7f4 fae8 bl 8021bcc strncat(buf, str, len); 802d5fc: f89d 2007 ldrb.w r2, [sp, #7] 802d600: a902 add r1, sp, #8 802d602: 4620 mov r0, r4 802d604: f7f4 fc84 bl 8021f10 GetManagerIp(str, &len); 802d608: a802 add r0, sp, #8 802d60a: f10d 0107 add.w r1, sp, #7 802d60e: f7fa fcb3 bl 8027f78 strcat(buf, "\",\"managerIP\":\""); 802d612: 4620 mov r0, r4 802d614: 49ad ldr r1, [pc, #692] ; (802d8cc ) 802d616: f7f4 fad9 bl 8021bcc strncat(buf, str, len); 802d61a: f89d 2007 ldrb.w r2, [sp, #7] 802d61e: a902 add r1, sp, #8 802d620: 4620 mov r0, r4 802d622: f7f4 fc75 bl 8021f10 GetManagerIp2(str, &len); 802d626: a802 add r0, sp, #8 802d628: f10d 0107 add.w r1, sp, #7 802d62c: f7fa fcb4 bl 8027f98 strcat(buf, "\",\"managerIP2\":\""); 802d630: 4620 mov r0, r4 802d632: 49a7 ldr r1, [pc, #668] ; (802d8d0 ) 802d634: f7f4 faca bl 8021bcc strncat(buf, str, len); 802d638: f89d 2007 ldrb.w r2, [sp, #7] 802d63c: a902 add r1, sp, #8 802d63e: 4620 mov r0, r4 802d640: f7f4 fc66 bl 8021f10 GetManagerIp3(str, &len); 802d644: a802 add r0, sp, #8 802d646: f10d 0107 add.w r1, sp, #7 802d64a: f7fa fcb5 bl 8027fb8 strcat(buf, "\",\"managerIP3\":\""); 802d64e: 4620 mov r0, r4 802d650: 49a0 ldr r1, [pc, #640] ; (802d8d4 ) 802d652: f7f4 fabb bl 8021bcc strncat(buf, str, len); 802d656: f89d 2007 ldrb.w r2, [sp, #7] 802d65a: a902 add r1, sp, #8 802d65c: 4620 mov r0, r4 802d65e: f7f4 fc57 bl 8021f10 GetManagerIp4(str, &len); 802d662: a802 add r0, sp, #8 802d664: f10d 0107 add.w r1, sp, #7 802d668: f7fa fcb6 bl 8027fd8 strcat(buf, "\",\"managerIP4\":\""); 802d66c: 4620 mov r0, r4 802d66e: 499a ldr r1, [pc, #616] ; (802d8d8 ) 802d670: f7f4 faac bl 8021bcc strncat(buf, str, len); 802d674: f89d 2007 ldrb.w r2, [sp, #7] 802d678: a902 add r1, sp, #8 802d67a: 4620 mov r0, r4 802d67c: f7f4 fc48 bl 8021f10 GetManagerIp5(str, &len); 802d680: a802 add r0, sp, #8 802d682: f10d 0107 add.w r1, sp, #7 802d686: f7fa fcb7 bl 8027ff8 strcat(buf, "\",\"managerIP5\":\""); 802d68a: 4620 mov r0, r4 802d68c: 4993 ldr r1, [pc, #588] ; (802d8dc ) 802d68e: f7f4 fa9d bl 8021bcc strncat(buf, str, len); 802d692: a902 add r1, sp, #8 802d694: f89d 2007 ldrb.w r2, [sp, #7] 802d698: 4620 mov r0, r4 802d69a: f7f4 fc39 bl 8021f10 /*Параметры реле и сухих контактов*/ GetDINTypeActStr(str, &len, 0); 802d69e: 2200 movs r2, #0 802d6a0: a802 add r0, sp, #8 802d6a2: f10d 0107 add.w r1, sp, #7 802d6a6: f7fa fa39 bl 8027b1c strcat(buf, "\",\"di1\":\""); 802d6aa: 4620 mov r0, r4 802d6ac: 498c ldr r1, [pc, #560] ; (802d8e0 ) 802d6ae: f7f4 fa8d bl 8021bcc strncat(buf, str, len); 802d6b2: a902 add r1, sp, #8 802d6b4: f89d 2007 ldrb.w r2, [sp, #7] 802d6b8: 4620 mov r0, r4 802d6ba: f7f4 fc29 bl 8021f10 GetROTypeActStr(str, &len, 0); 802d6be: 2200 movs r2, #0 802d6c0: a802 add r0, sp, #8 802d6c2: f10d 0107 add.w r1, sp, #7 802d6c6: f7fa fa63 bl 8027b90 strcat(buf, "\",\"ro1\":\""); 802d6ca: 4620 mov r0, r4 802d6cc: 4985 ldr r1, [pc, #532] ; (802d8e4 ) 802d6ce: f7f4 fa7d bl 8021bcc strncat(buf, str, len); 802d6d2: a902 add r1, sp, #8 802d6d4: f89d 2007 ldrb.w r2, [sp, #7] 802d6d8: 4620 mov r0, r4 802d6da: f7f4 fc19 bl 8021f10 GetROTypeActStr(str, &len, 1); 802d6de: 2201 movs r2, #1 802d6e0: a802 add r0, sp, #8 802d6e2: f10d 0107 add.w r1, sp, #7 802d6e6: f7fa fa53 bl 8027b90 strcat(buf, "\",\"ro2\":\""); 802d6ea: 4620 mov r0, r4 802d6ec: 497e ldr r1, [pc, #504] ; (802d8e8 ) 802d6ee: f7f4 fa6d bl 8021bcc strncat(buf, str, len); 802d6f2: f89d 2007 ldrb.w r2, [sp, #7] 802d6f6: a902 add r1, sp, #8 802d6f8: 4620 mov r0, r4 802d6fa: f7f4 fc09 bl 8021f10 /* WEB */ GetIpStr(str, &len); 802d6fe: a802 add r0, sp, #8 802d700: f10d 0107 add.w r1, sp, #7 802d704: f7fa fba0 bl 8027e48 strcat(buf, "\",\"ipaddr\":\""); 802d708: 4620 mov r0, r4 802d70a: 4978 ldr r1, [pc, #480] ; (802d8ec ) 802d70c: f7f4 fa5e bl 8021bcc strncat(buf, str, len); 802d710: f89d 2007 ldrb.w r2, [sp, #7] 802d714: a902 add r1, sp, #8 802d716: 4620 mov r0, r4 802d718: f7f4 fbfa bl 8021f10 GetGatewayStr(str, &len); 802d71c: a802 add r0, sp, #8 802d71e: f10d 0107 add.w r1, sp, #7 802d722: f7fa fba7 bl 8027e74 strcat(buf, "\",\"gw\":\""); 802d726: 4620 mov r0, r4 802d728: 4971 ldr r1, [pc, #452] ; (802d8f0 ) 802d72a: f7f4 fa4f bl 8021bcc strncat(buf, str, len); 802d72e: f89d 2007 ldrb.w r2, [sp, #7] 802d732: a902 add r1, sp, #8 802d734: 4620 mov r0, r4 802d736: f7f4 fbeb bl 8021f10 GetMaskStr(str, &len); 802d73a: a802 add r0, sp, #8 802d73c: f10d 0107 add.w r1, sp, #7 802d740: f7fa fbae bl 8027ea0 strcat(buf, "\",\"mask\":\""); 802d744: 4620 mov r0, r4 802d746: 496b ldr r1, [pc, #428] ; (802d8f4 ) 802d748: f7f4 fa40 bl 8021bcc strncat(buf, str, len); 802d74c: f89d 2007 ldrb.w r2, [sp, #7] 802d750: a902 add r1, sp, #8 802d752: 4620 mov r0, r4 802d754: f7f4 fbdc bl 8021f10 GetDhcpStateStr(str, &len); 802d758: a802 add r0, sp, #8 802d75a: f10d 0107 add.w r1, sp, #7 802d75e: f7fa fbb5 bl 8027ecc strcat(buf, "\",\"dhcp\":"); 802d762: 4620 mov r0, r4 802d764: 4964 ldr r1, [pc, #400] ; (802d8f8 ) 802d766: f7f4 fa31 bl 8021bcc strncat(buf, str, len); 802d76a: f89d 2007 ldrb.w r2, [sp, #7] 802d76e: a902 add r1, sp, #8 802d770: 4620 mov r0, r4 802d772: f7f4 fbcd bl 8021f10 GetAuthEnableStateStr(str, &len); 802d776: a802 add r0, sp, #8 802d778: f10d 0107 add.w r1, sp, #7 802d77c: f7fa fc9e bl 80280bc strcat(buf, ",\"auth\":"); 802d780: 4620 mov r0, r4 802d782: 495e ldr r1, [pc, #376] ; (802d8fc ) 802d784: f7f4 fa22 bl 8021bcc strncat(buf, str, len); 802d788: f89d 2007 ldrb.w r2, [sp, #7] 802d78c: a902 add r1, sp, #8 802d78e: 4620 mov r0, r4 802d790: f7f4 fbbe bl 8021f10 /* RADIUS */ GetRDSIpStr(str, &len); 802d794: a802 add r0, sp, #8 802d796: f10d 0107 add.w r1, sp, #7 802d79a: f7fa fc3d bl 8028018 strcat(buf, ",\"rs_server\":\""); 802d79e: 4620 mov r0, r4 802d7a0: 4957 ldr r1, [pc, #348] ; (802d900 ) 802d7a2: f7f4 fa13 bl 8021bcc strncat(buf, str, len); 802d7a6: f89d 2007 ldrb.w r2, [sp, #7] 802d7aa: a902 add r1, sp, #8 802d7ac: 4620 mov r0, r4 802d7ae: f7f4 fbaf bl 8021f10 GetRDSPortStr(str, &len); 802d7b2: a802 add r0, sp, #8 802d7b4: f10d 0107 add.w r1, sp, #7 802d7b8: f7fa fc3e bl 8028038 strcat(buf, "\",\"rs_port\":\""); 802d7bc: 4620 mov r0, r4 802d7be: 4951 ldr r1, [pc, #324] ; (802d904 ) 802d7c0: f7f4 fa04 bl 8021bcc strncat(buf, str, len); 802d7c4: f89d 2007 ldrb.w r2, [sp, #7] 802d7c8: a902 add r1, sp, #8 802d7ca: 4620 mov r0, r4 802d7cc: f7f4 fba0 bl 8021f10 GetRDSPasswordkStr(str, &len); 802d7d0: a802 add r0, sp, #8 802d7d2: f10d 0107 add.w r1, sp, #7 802d7d6: f7fa fc53 bl 8028080 strcat(buf, "\",\"rs_pwd\":\""); 802d7da: 4620 mov r0, r4 802d7dc: 494a ldr r1, [pc, #296] ; (802d908 ) 802d7de: f7f4 f9f5 bl 8021bcc strncat(buf, str, len); 802d7e2: f89d 2007 ldrb.w r2, [sp, #7] 802d7e6: a902 add r1, sp, #8 802d7e8: 4620 mov r0, r4 802d7ea: f7f4 fb91 bl 8021f10 GetRDSKeyAccesstStr(str, &len); 802d7ee: a802 add r0, sp, #8 802d7f0: f10d 0107 add.w r1, sp, #7 802d7f4: f7fa fc32 bl 802805c strcat(buf, "\",\"rs_key\":\""); 802d7f8: 4620 mov r0, r4 802d7fa: 4944 ldr r1, [pc, #272] ; (802d90c ) 802d7fc: f7f4 f9e6 bl 8021bcc strncat(buf, str, len); 802d800: f89d 2007 ldrb.w r2, [sp, #7] 802d804: a902 add r1, sp, #8 802d806: 4620 mov r0, r4 802d808: f7f4 fb82 bl 8021f10 GetRDSEnableStateStr(str, &len); 802d80c: a802 add r0, sp, #8 802d80e: f10d 0107 add.w r1, sp, #7 802d812: f7fa fc45 bl 80280a0 strcat(buf, "\",\"rs_enabled\":"); 802d816: 4620 mov r0, r4 802d818: 493d ldr r1, [pc, #244] ; (802d910 ) 802d81a: f7f4 f9d7 bl 8021bcc strncat(buf, str, len); 802d81e: f89d 2007 ldrb.w r2, [sp, #7] 802d822: a902 add r1, sp, #8 802d824: 4620 mov r0, r4 802d826: f7f4 fb73 bl 8021f10 /* Параметры даты и времени */ GetDateStr(str, &len); 802d82a: a802 add r0, sp, #8 802d82c: f10d 0107 add.w r1, sp, #7 802d830: f7fa f8d6 bl 80279e0 strcat(buf, ",\"date\":\""); 802d834: 4620 mov r0, r4 802d836: 4937 ldr r1, [pc, #220] ; (802d914 ) 802d838: f7f4 f9c8 bl 8021bcc strncat(buf, str, len); 802d83c: f89d 2007 ldrb.w r2, [sp, #7] 802d840: a902 add r1, sp, #8 802d842: 4620 mov r0, r4 802d844: f7f4 fb64 bl 8021f10 GetTimeStr(str, &len); 802d848: a802 add r0, sp, #8 802d84a: f10d 0107 add.w r1, sp, #7 802d84e: f7fa f8e5 bl 8027a1c strcat(buf, "\",\"time\":\""); 802d852: 4620 mov r0, r4 802d854: 4930 ldr r1, [pc, #192] ; (802d918 ) 802d856: f7f4 f9b9 bl 8021bcc strncat(buf, str, len); 802d85a: f89d 2007 ldrb.w r2, [sp, #7] 802d85e: a902 add r1, sp, #8 802d860: 4620 mov r0, r4 802d862: f7f4 fb55 bl 8021f10 /* Параметры SNTP */ GetSntpStateStr(str, &len); 802d866: a802 add r0, sp, #8 802d868: f10d 0107 add.w r1, sp, #7 802d86c: f7fa f904 bl 8027a78 strcat(buf, "\",\"ntp\":\""); 802d870: 4620 mov r0, r4 802d872: 492a ldr r1, [pc, #168] ; (802d91c ) 802d874: f7f4 f9aa bl 8021bcc strncat(buf, str, len); 802d878: f89d 2007 ldrb.w r2, [sp, #7] 802d87c: a902 add r1, sp, #8 802d87e: 4620 mov r0, r4 802d880: f7f4 fb46 bl 8021f10 GetSntpServerIpStr(str, &len); 802d884: a802 add r0, sp, #8 802d886: f10d 0107 add.w r1, sp, #7 802d88a: f7fa f90f bl 8027aac strcat(buf, "\",\"ntpservip\":\""); 802d88e: 4620 mov r0, r4 802d890: 4923 ldr r1, [pc, #140] ; (802d920 ) 802d892: f7f4 f99b bl 8021bcc strncat(buf, str, len); 802d896: f89d 2007 ldrb.w r2, [sp, #7] 802d89a: a902 add r1, sp, #8 802d89c: 4620 mov r0, r4 802d89e: f7f4 fb37 bl 8021f10 GetSntpTimeZoneStr(str, &len); 802d8a2: a802 add r0, sp, #8 802d8a4: f10d 0107 add.w r1, sp, #7 802d8a8: f7fa f910 bl 8027acc strcat(buf, "\",\"utc\":\""); 802d8ac: 4620 mov r0, r4 802d8ae: 491d ldr r1, [pc, #116] ; (802d924 ) 802d8b0: f7f4 f98c bl 8021bcc strncat(buf, str, len); 802d8b4: f89d 2007 ldrb.w r2, [sp, #7] 802d8b8: a902 add r1, sp, #8 802d8ba: 4620 mov r0, r4 802d8bc: e034 b.n 802d928 802d8be: bf00 nop 802d8c0: 08044aa0 .word 0x08044aa0 802d8c4: 08044b8e .word 0x08044b8e 802d8c8: 08044ba2 .word 0x08044ba2 802d8cc: 08044bb8 .word 0x08044bb8 802d8d0: 08044bc8 .word 0x08044bc8 802d8d4: 08044bd9 .word 0x08044bd9 802d8d8: 08044bea .word 0x08044bea 802d8dc: 08044bfb .word 0x08044bfb 802d8e0: 08044b37 .word 0x08044b37 802d8e4: 08044b41 .word 0x08044b41 802d8e8: 08044b4b .word 0x08044b4b 802d8ec: 08044c0c .word 0x08044c0c 802d8f0: 08044c19 .word 0x08044c19 802d8f4: 08044c22 .word 0x08044c22 802d8f8: 08044c2d .word 0x08044c2d 802d8fc: 08044c37 .word 0x08044c37 802d900: 08044c40 .word 0x08044c40 802d904: 08044c4f .word 0x08044c4f 802d908: 08044c5d .word 0x08044c5d 802d90c: 08044c6a .word 0x08044c6a 802d910: 08044c77 .word 0x08044c77 802d914: 08044c87 .word 0x08044c87 802d918: 08044c91 .word 0x08044c91 802d91c: 08044c9c .word 0x08044c9c 802d920: 08044ca6 .word 0x08044ca6 802d924: 08044cb6 .word 0x08044cb6 802d928: f7f4 faf2 bl 8021f10 GetUnixTimeStr(str, &len); 802d92c: a802 add r0, sp, #8 802d92e: f10d 0107 add.w r1, sp, #7 802d932: f7fa f88b bl 8027a4c strcat(buf, "\",\"utm\":\""); 802d936: 4620 mov r0, r4 802d938: 4916 ldr r1, [pc, #88] ; (802d994 ) 802d93a: f7f4 f947 bl 8021bcc strncat(buf, str, len); 802d93e: f89d 2007 ldrb.w r2, [sp, #7] 802d942: a902 add r1, sp, #8 802d944: 4620 mov r0, r4 802d946: f7f4 fae3 bl 8021f10 GetSntpLastDataStr(str, &len); 802d94a: a802 add r0, sp, #8 802d94c: f10d 0107 add.w r1, sp, #7 802d950: f7fa f8d4 bl 8027afc strcat(buf, "\",\"lastsynctime\":\""); 802d954: 4620 mov r0, r4 802d956: 4910 ldr r1, [pc, #64] ; (802d998 ) 802d958: f7f4 f938 bl 8021bcc strncat(buf, str, len); 802d95c: f89d 2007 ldrb.w r2, [sp, #7] 802d960: a902 add r1, sp, #8 802d962: 4620 mov r0, r4 802d964: f7f4 fad4 bl 8021f10 /* Признак изменения сетевых настроек */ GetWebReinitFlag(str, &len); 802d968: a802 add r0, sp, #8 802d96a: f10d 0107 add.w r1, sp, #7 802d96e: f7fa fbb3 bl 80280d8 strcat(buf, "\",\"netsettings_changed\":\""); 802d972: 4620 mov r0, r4 802d974: 4909 ldr r1, [pc, #36] ; (802d99c ) 802d976: f7f4 f929 bl 8021bcc strncat(buf, str, len); 802d97a: a902 add r1, sp, #8 802d97c: f89d 2007 ldrb.w r2, [sp, #7] 802d980: 4620 mov r0, r4 802d982: f7f4 fac5 bl 8021f10 strncat(buf, "\"}", 2); 802d986: 4620 mov r0, r4 802d988: 4905 ldr r1, [pc, #20] ; (802d9a0 ) 802d98a: 2202 movs r2, #2 802d98c: f7f4 fac0 bl 8021f10 //printf(buf); } 802d990: b00a add sp, #40 ; 0x28 802d992: bd10 pop {r4, pc} 802d994: 08044cc0 .word 0x08044cc0 802d998: 08044cca .word 0x08044cca 802d99c: 08044b71 .word 0x08044b71 802d9a0: 08044b8b .word 0x08044b8b 0802d9a4 : * @brief Возвращяет строку с информацией об устройстве * @retval None */ // TODO Согласовать максимальную длину строк void HTTP_GetInfo(char *buf) { 802d9a4: 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"); 802d9a6: 4960 ldr r1, [pc, #384] ; (802db28 ) * @brief Возвращяет строку с информацией об устройстве * @retval None */ // TODO Согласовать максимальную длину строк void HTTP_GetInfo(char *buf) { 802d9a8: b08c sub sp, #48 ; 0x30 802d9aa: 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"); 802d9ac: f7f4 fa22 bl 8021df4 GetWorkTimeStr(str, &len); 802d9b0: a802 add r0, sp, #8 802d9b2: f10d 0107 add.w r1, sp, #7 802d9b6: f7fa f937 bl 8027c28 strcat(buf, "{\"uptime\":\""); 802d9ba: 4620 mov r0, r4 802d9bc: 495b ldr r1, [pc, #364] ; (802db2c ) 802d9be: f7f4 f905 bl 8021bcc strncat(buf, str, len); 802d9c2: f89d 2007 ldrb.w r2, [sp, #7] 802d9c6: a902 add r1, sp, #8 802d9c8: 4620 mov r0, r4 802d9ca: f7f4 faa1 bl 8021f10 GetModelStr(str, &len); 802d9ce: a802 add r0, sp, #8 802d9d0: f10d 0107 add.w r1, sp, #7 802d9d4: f7fa f94e bl 8027c74 strcat(buf, "\",\"model\":\""); 802d9d8: 4620 mov r0, r4 802d9da: 4955 ldr r1, [pc, #340] ; (802db30 ) 802d9dc: f7f4 f8f6 bl 8021bcc strncat(buf, str, len); 802d9e0: f89d 2007 ldrb.w r2, [sp, #7] 802d9e4: a902 add r1, sp, #8 802d9e6: 4620 mov r0, r4 802d9e8: f7f4 fa92 bl 8021f10 GetProductionDataStr(str, &len); 802d9ec: a802 add r0, sp, #8 802d9ee: f10d 0107 add.w r1, sp, #7 802d9f2: f7fa f951 bl 8027c98 strcat(buf, "\",\"prodate\":\""); 802d9f6: 4620 mov r0, r4 802d9f8: 494e ldr r1, [pc, #312] ; (802db34 ) 802d9fa: f7f4 f8e7 bl 8021bcc strncat(buf, str, len); 802d9fe: f89d 2007 ldrb.w r2, [sp, #7] 802da02: a902 add r1, sp, #8 802da04: 4620 mov r0, r4 802da06: f7f4 fa83 bl 8021f10 GetVersionStr(str, &len); 802da0a: a802 add r0, sp, #8 802da0c: f10d 0107 add.w r1, sp, #7 802da10: f7fa f954 bl 8027cbc strcat(buf, "\",\"fwversion\":\""); 802da14: 4620 mov r0, r4 802da16: 4948 ldr r1, [pc, #288] ; (802db38 ) 802da18: f7f4 f8d8 bl 8021bcc strncat(buf, str, len); 802da1c: f89d 2007 ldrb.w r2, [sp, #7] 802da20: a902 add r1, sp, #8 802da22: 4620 mov r0, r4 802da24: f7f4 fa74 bl 8021f10 GetMacStr(str, &len); 802da28: a802 add r0, sp, #8 802da2a: f10d 0107 add.w r1, sp, #7 802da2e: f7fa f957 bl 8027ce0 strcat(buf, "\",\"macaddr\":\""); 802da32: 4620 mov r0, r4 802da34: 4941 ldr r1, [pc, #260] ; (802db3c ) 802da36: f7f4 f8c9 bl 8021bcc strncat(buf, str, len); 802da3a: f89d 2007 ldrb.w r2, [sp, #7] 802da3e: a902 add r1, sp, #8 802da40: 4620 mov r0, r4 802da42: f7f4 fa65 bl 8021f10 GetSerialNumberStr(str, &len); 802da46: a802 add r0, sp, #8 802da48: f10d 0107 add.w r1, sp, #7 802da4c: f7fa f95a bl 8027d04 strcat(buf, "\",\"serno\":\""); 802da50: 4620 mov r0, r4 802da52: 493b ldr r1, [pc, #236] ; (802db40 ) 802da54: f7f4 f8ba bl 8021bcc strncat(buf, str, len); 802da58: f89d 2007 ldrb.w r2, [sp, #7] 802da5c: a902 add r1, sp, #8 802da5e: 4620 mov r0, r4 802da60: f7f4 fa56 bl 8021f10 GetOwnerStr(str, &len); 802da64: a802 add r0, sp, #8 802da66: f10d 0107 add.w r1, sp, #7 802da6a: f7fa f95d bl 8027d28 strcat(buf, "\",\"owner\":\""); 802da6e: 4620 mov r0, r4 802da70: 4934 ldr r1, [pc, #208] ; (802db44 ) 802da72: f7f4 f8ab bl 8021bcc strncat(buf, str, len); 802da76: f89d 2007 ldrb.w r2, [sp, #7] 802da7a: a902 add r1, sp, #8 802da7c: 4620 mov r0, r4 802da7e: f7f4 fa47 bl 8021f10 GetLocationStr(str, &len); 802da82: a802 add r0, sp, #8 802da84: f10d 0107 add.w r1, sp, #7 802da88: f7fa f960 bl 8027d4c strcat(buf, "\",\"sysLocation\":\""); 802da8c: 4620 mov r0, r4 802da8e: 492e ldr r1, [pc, #184] ; (802db48 ) 802da90: f7f4 f89c bl 8021bcc strncat(buf, str, len); 802da94: f89d 2007 ldrb.w r2, [sp, #7] 802da98: a902 add r1, sp, #8 802da9a: 4620 mov r0, r4 802da9c: f7f4 fa38 bl 8021f10 GetCommentsStr(str, &len); 802daa0: a802 add r0, sp, #8 802daa2: f10d 0107 add.w r1, sp, #7 802daa6: f7fa f963 bl 8027d70 strcat(buf, "\",\"comment\":\""); 802daaa: 4620 mov r0, r4 802daac: 4927 ldr r1, [pc, #156] ; (802db4c ) 802daae: f7f4 f88d bl 8021bcc strncat(buf, str, len); 802dab2: f89d 2007 ldrb.w r2, [sp, #7] 802dab6: a902 add r1, sp, #8 802dab8: 4620 mov r0, r4 802daba: f7f4 fa29 bl 8021f10 GetUPSModelStr(str, &len); 802dabe: a802 add r0, sp, #8 802dac0: f10d 0107 add.w r1, sp, #7 802dac4: f7fa f966 bl 8027d94 strcat(buf, "\",\"ups_model\":\""); 802dac8: 4620 mov r0, r4 802daca: 4921 ldr r1, [pc, #132] ; (802db50 ) 802dacc: f7f4 f87e bl 8021bcc strncat(buf, str, len); 802dad0: f89d 2007 ldrb.w r2, [sp, #7] 802dad4: a902 add r1, sp, #8 802dad6: 4620 mov r0, r4 802dad8: f7f4 fa1a bl 8021f10 GetUPSVersionStr(str, &len); 802dadc: a802 add r0, sp, #8 802dade: f10d 0107 add.w r1, sp, #7 802dae2: f7fa f969 bl 8027db8 strcat(buf, "\",\"ups_fwversion\":\""); 802dae6: 4620 mov r0, r4 802dae8: 491a ldr r1, [pc, #104] ; (802db54 ) 802daea: f7f4 f86f bl 8021bcc strncat(buf, str, len); 802daee: f89d 2007 ldrb.w r2, [sp, #7] 802daf2: a902 add r1, sp, #8 802daf4: 4620 mov r0, r4 802daf6: f7f4 fa0b bl 8021f10 /* Признак изменения сетевых настроек */ GetWebReinitFlag(str, &len); 802dafa: a802 add r0, sp, #8 802dafc: f10d 0107 add.w r1, sp, #7 802db00: f7fa faea bl 80280d8 strcat(buf, "\",\"netsettings_changed\":\""); 802db04: 4620 mov r0, r4 802db06: 4914 ldr r1, [pc, #80] ; (802db58 ) 802db08: f7f4 f860 bl 8021bcc strncat(buf, str, len); 802db0c: a902 add r1, sp, #8 802db0e: f89d 2007 ldrb.w r2, [sp, #7] 802db12: 4620 mov r0, r4 802db14: f7f4 f9fc bl 8021f10 strncat(buf, "\"}", 2); 802db18: 4620 mov r0, r4 802db1a: 4910 ldr r1, [pc, #64] ; (802db5c ) 802db1c: 2202 movs r2, #2 802db1e: f7f4 f9f7 bl 8021f10 } 802db22: b00c add sp, #48 ; 0x30 802db24: bd10 pop {r4, pc} 802db26: bf00 nop 802db28: 08044aa0 .word 0x08044aa0 802db2c: 08044cdd .word 0x08044cdd 802db30: 08044ce9 .word 0x08044ce9 802db34: 08044cf5 .word 0x08044cf5 802db38: 08044d03 .word 0x08044d03 802db3c: 08044d13 .word 0x08044d13 802db40: 08044d21 .word 0x08044d21 802db44: 08044d2d .word 0x08044d2d 802db48: 08044d39 .word 0x08044d39 802db4c: 08044d4b .word 0x08044d4b 802db50: 08044d59 .word 0x08044d59 802db54: 08044d69 .word 0x08044d69 802db58: 08044b71 .word 0x08044b71 802db5c: 08044b8b .word 0x08044b8b 0802db60 : void HTTP_GetHistoryPage(char* buf, uint32_t pageNumber) { 802db60: b530 push {r4, r5, lr} 802db62: 4605 mov r5, r0 802db64: b087 sub sp, #28 802db66: 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"); 802db68: 4927 ldr r1, [pc, #156] ; (802dc08 ) 802db6a: f7f4 f943 bl 8021df4 strcat(buf, "{\"page\": ["); 802db6e: 4628 mov r0, r5 802db70: 4926 ldr r1, [pc, #152] ; (802dc0c ) 802db72: f7f4 f82b bl 8021bcc History_GetPage(buf, pageNumber); 802db76: 4621 mov r1, r4 802db78: 4628 mov r0, r5 802db7a: f7fc f83f bl 8029bfc len = strlen(buf); 802db7e: 4628 mov r0, r5 802db80: f7f4 f996 bl 8021eb0 802db84: f8ad 0006 strh.w r0, [sp, #6] buf +=len-1; 802db88: b280 uxth r0, r0 802db8a: 1e43 subs r3, r0, #1 802db8c: 18ec adds r4, r5, r3 *buf = 0; 802db8e: 2100 movs r1, #0 buf -=len-1; 802db90: f1c0 0001 rsb r0, r0, #1 strcat(buf, "{\"page\": ["); History_GetPage(buf, pageNumber); len = strlen(buf); buf +=len-1; *buf = 0; 802db94: 54e9 strb r1, [r5, r3] buf -=len-1; 802db96: 1824 adds r4, r4, r0 /* Количество страниц */ memset(str, 0, 16); 802db98: 2210 movs r2, #16 802db9a: a802 add r0, sp, #8 802db9c: f7f3 ffb0 bl 8021b00 sprintf(str, "%i", History_GetPageCount()); 802dba0: f7fc f81a bl 8029bd8 802dba4: 491a ldr r1, [pc, #104] ; (802dc10 ) 802dba6: 4602 mov r2, r0 802dba8: a802 add r0, sp, #8 802dbaa: f7f9 fe33 bl 8027814 strcat(buf, "],\"pages\":\""); 802dbae: 4620 mov r0, r4 802dbb0: 4918 ldr r1, [pc, #96] ; (802dc14 ) 802dbb2: f7f4 f80b bl 8021bcc strcat(buf, str); 802dbb6: a902 add r1, sp, #8 802dbb8: 4620 mov r0, r4 802dbba: f7f4 f807 bl 8021bcc /* Часовой пояс */ GetSntpTimeZoneStr(str, (uint8_t*)&len); 802dbbe: a802 add r0, sp, #8 802dbc0: f10d 0106 add.w r1, sp, #6 802dbc4: f7f9 ff82 bl 8027acc strcat(buf, "\",\"utc\":\""); 802dbc8: 4620 mov r0, r4 802dbca: 4913 ldr r1, [pc, #76] ; (802dc18 ) 802dbcc: f7f3 fffe bl 8021bcc strncat(buf, str, len); 802dbd0: f8bd 2006 ldrh.w r2, [sp, #6] 802dbd4: a902 add r1, sp, #8 802dbd6: 4620 mov r0, r4 802dbd8: f7f4 f99a bl 8021f10 GetUnixTimeStr(str, (uint8_t*)&len); 802dbdc: a802 add r0, sp, #8 802dbde: f10d 0106 add.w r1, sp, #6 802dbe2: f7f9 ff33 bl 8027a4c strcat(buf, "\",\"utm\":\""); 802dbe6: 4620 mov r0, r4 802dbe8: 490c ldr r1, [pc, #48] ; (802dc1c ) 802dbea: f7f3 ffef bl 8021bcc strncat(buf, str, len); 802dbee: a902 add r1, sp, #8 802dbf0: 4620 mov r0, r4 802dbf2: f8bd 2006 ldrh.w r2, [sp, #6] 802dbf6: f7f4 f98b bl 8021f10 strcat(buf, "\"}"); 802dbfa: 4620 mov r0, r4 802dbfc: 4908 ldr r1, [pc, #32] ; (802dc20 ) 802dbfe: f7f3 ffe5 bl 8021bcc //printf(buf); } 802dc02: b007 add sp, #28 802dc04: bd30 pop {r4, r5, pc} 802dc06: bf00 nop 802dc08: 08044d7d .word 0x08044d7d 802dc0c: 08044da9 .word 0x08044da9 802dc10: 08044db4 .word 0x08044db4 802dc14: 08044db7 .word 0x08044db7 802dc18: 08044cb6 .word 0x08044cb6 802dc1c: 08044cc0 .word 0x08044cc0 802dc20: 08044b8b .word 0x08044b8b 0802dc24 : void HTTP_GetUpsHistoryPage(char* buf, uint32_t pageNumber) { 802dc24: b530 push {r4, r5, lr} 802dc26: 4605 mov r5, r0 802dc28: b087 sub sp, #28 802dc2a: 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"); 802dc2c: 4927 ldr r1, [pc, #156] ; (802dccc ) 802dc2e: f7f4 f8e1 bl 8021df4 strcat(buf, "{\"page\": ["); 802dc32: 4628 mov r0, r5 802dc34: 4926 ldr r1, [pc, #152] ; (802dcd0 ) 802dc36: f7f3 ffc9 bl 8021bcc LOG_GetPage(buf, pageNumber); 802dc3a: 4621 mov r1, r4 802dc3c: 4628 mov r0, r5 802dc3e: f7fb fef9 bl 8029a34 len = strlen(buf); 802dc42: 4628 mov r0, r5 802dc44: f7f4 f934 bl 8021eb0 802dc48: f8ad 0006 strh.w r0, [sp, #6] buf +=len-1; 802dc4c: b280 uxth r0, r0 802dc4e: 1e43 subs r3, r0, #1 802dc50: 18ec adds r4, r5, r3 *buf = 0; 802dc52: 2100 movs r1, #0 buf -=len-1; 802dc54: f1c0 0001 rsb r0, r0, #1 strcat(buf, "{\"page\": ["); LOG_GetPage(buf, pageNumber); len = strlen(buf); buf +=len-1; *buf = 0; 802dc58: 54e9 strb r1, [r5, r3] buf -=len-1; 802dc5a: 1824 adds r4, r4, r0 /* Количество страниц */ memset(str, 0, 16); 802dc5c: 2210 movs r2, #16 802dc5e: a802 add r0, sp, #8 802dc60: f7f3 ff4e bl 8021b00 sprintf(str, "%i", LOG_GetPageCount()); 802dc64: f7fb fed4 bl 8029a10 802dc68: 491a ldr r1, [pc, #104] ; (802dcd4 ) 802dc6a: 4602 mov r2, r0 802dc6c: a802 add r0, sp, #8 802dc6e: f7f9 fdd1 bl 8027814 strcat(buf, "],\"pages\":\""); 802dc72: 4620 mov r0, r4 802dc74: 4918 ldr r1, [pc, #96] ; (802dcd8 ) 802dc76: f7f3 ffa9 bl 8021bcc strcat(buf, str); 802dc7a: a902 add r1, sp, #8 802dc7c: 4620 mov r0, r4 802dc7e: f7f3 ffa5 bl 8021bcc /* Часовой пояс */ GetSntpTimeZoneStr(str, (uint8_t*)&len); 802dc82: a802 add r0, sp, #8 802dc84: f10d 0106 add.w r1, sp, #6 802dc88: f7f9 ff20 bl 8027acc strcat(buf, "\",\"utc\":\""); 802dc8c: 4620 mov r0, r4 802dc8e: 4913 ldr r1, [pc, #76] ; (802dcdc ) 802dc90: f7f3 ff9c bl 8021bcc strncat(buf, str, len); 802dc94: f8bd 2006 ldrh.w r2, [sp, #6] 802dc98: a902 add r1, sp, #8 802dc9a: 4620 mov r0, r4 802dc9c: f7f4 f938 bl 8021f10 GetUnixTimeStr(str, (uint8_t*)&len); 802dca0: a802 add r0, sp, #8 802dca2: f10d 0106 add.w r1, sp, #6 802dca6: f7f9 fed1 bl 8027a4c strcat(buf, "\",\"utm\":\""); 802dcaa: 4620 mov r0, r4 802dcac: 490c ldr r1, [pc, #48] ; (802dce0 ) 802dcae: f7f3 ff8d bl 8021bcc strncat(buf, str, len); 802dcb2: a902 add r1, sp, #8 802dcb4: 4620 mov r0, r4 802dcb6: f8bd 2006 ldrh.w r2, [sp, #6] 802dcba: f7f4 f929 bl 8021f10 strcat(buf, "\"}"); 802dcbe: 4620 mov r0, r4 802dcc0: 4908 ldr r1, [pc, #32] ; (802dce4 ) 802dcc2: f7f3 ff83 bl 8021bcc //printf(buf); } 802dcc6: b007 add sp, #28 802dcc8: bd30 pop {r4, r5, pc} 802dcca: bf00 nop 802dccc: 08044d7d .word 0x08044d7d 802dcd0: 08044da9 .word 0x08044da9 802dcd4: 08044db4 .word 0x08044db4 802dcd8: 08044db7 .word 0x08044db7 802dcdc: 08044cb6 .word 0x08044cb6 802dce0: 08044cc0 .word 0x08044cc0 802dce4: 08044b8b .word 0x08044b8b 0802dce8 : /** * @brief Сброс настроек (всё кроме сетевых параметров) */ void HTTP_ResetSettings(void) { 802dce8: b508 push {r3, lr} //taskENTER_CRITICAL(); SNMP_SendUserTrap(DEVICE_RESTORED); 802dcea: 2003 movs r0, #3 802dcec: f00a f9a6 bl 803803c log_event_data(LOG_SYSTEM_DEFCONFIG, "Администратор"); 802dcf0: 4906 ldr r1, [pc, #24] ; (802dd0c ) 802dcf2: 2001 movs r0, #1 802dcf4: f7fb fe4c bl 8029990 vTaskDelay(500); 802dcf8: f44f 70fa mov.w r0, #500 ; 0x1f4 802dcfc: f7fd f900 bl 802af00 SETTINGS_SetPartDefault(); 802dd00: f7fa fe2c bl 802895c SETTINGS_Save(); //taskEXIT_CRITICAL(); } 802dd04: e8bd 4008 ldmia.w sp!, {r3, lr} SNMP_SendUserTrap(DEVICE_RESTORED); log_event_data(LOG_SYSTEM_DEFCONFIG, "Администратор"); vTaskDelay(500); SETTINGS_SetPartDefault(); SETTINGS_Save(); 802dd08: f7fa bdba b.w 8028880 802dd0c: 08039980 .word 0x08039980 0802dd10 : */ void HTTP_SaveSettings(void) { // taskENTER_CRITICAL(); SETTINGS_Save(); 802dd10: f7fa bdb6 b.w 8028880 0802dd14 : /** * @brief Перезагрузка контроллера */ void HTTP_Reboot(void) { 802dd14: b508 push {r3, lr} vTaskDelay(1010); 802dd16: f240 30f2 movw r0, #1010 ; 0x3f2 802dd1a: f7fd f8f1 bl 802af00 Reboot(); } 802dd1e: e8bd 4008 ldmia.w sp!, {r3, lr} * @brief Перезагрузка контроллера */ void HTTP_Reboot(void) { vTaskDelay(1010); Reboot(); 802dd22: f7fb b99f b.w 8029064 802dd26: 0000 movs r0, r0 0802dd28 : * bootloader и перезаписаны настройки * * false - обычная перезагрузка */ void HTTP_StartResetTask(bool fBootMode) { 802dd28: b51f push {r0, r1, r2, r3, r4, lr} static bool temp; temp = fBootMode; 802dd2a: 4b07 ldr r3, [pc, #28] ; (802dd48 ) xTaskCreate(vTaskReboot, "RebootTask", configMINIMAL_STACK_SIZE, 802dd2c: 4907 ldr r1, [pc, #28] ; (802dd4c ) */ void HTTP_StartResetTask(bool fBootMode) { static bool temp; temp = fBootMode; 802dd2e: 7018 strb r0, [r3, #0] xTaskCreate(vTaskReboot, "RebootTask", configMINIMAL_STACK_SIZE, 802dd30: 2200 movs r2, #0 802dd32: 9200 str r2, [sp, #0] 802dd34: 9201 str r2, [sp, #4] 802dd36: 9202 str r2, [sp, #8] 802dd38: 9203 str r2, [sp, #12] 802dd3a: 4805 ldr r0, [pc, #20] ; (802dd50 ) 802dd3c: 2280 movs r2, #128 ; 0x80 802dd3e: f7fc fe45 bl 802a9cc (void*)&temp, tskIDLE_PRIORITY, NULL); } 802dd42: b005 add sp, #20 802dd44: bd00 pop {pc} 802dd46: bf00 nop 802dd48: 20000d30 .word 0x20000d30 802dd4c: 08044dc3 .word 0x08044dc3 802dd50: 0802d371 .word 0x0802d371 0802dd54 : * @return ERR_OK if data has been received, an error code otherwise (timeout, * memory error or another error) */ static err_t netconn_recv_data(struct netconn *conn, void **new_buf) { 802dd54: b530 push {r4, r5, lr} 802dd56: b089 sub sp, #36 ; 0x24 void *buf = NULL; 802dd58: 2300 movs r3, #0 * @return ERR_OK if data has been received, an error code otherwise (timeout, * memory error or another error) */ static err_t netconn_recv_data(struct netconn *conn, void **new_buf) { 802dd5a: 4604 mov r4, r0 void *buf = NULL; 802dd5c: 9301 str r3, [sp, #4] err_t err; #if LWIP_TCP struct api_msg msg; #endif /* LWIP_TCP */ LWIP_ERROR("netconn_recv: invalid pointer", (new_buf != NULL), return ERR_ARG;); 802dd5e: 460d mov r5, r1 802dd60: b909 cbnz r1, 802dd66 802dd62: 20f2 movs r0, #242 ; 0xf2 802dd64: e055 b.n 802de12 *new_buf = NULL; 802dd66: 600b str r3, [r1, #0] LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL), return ERR_ARG;); 802dd68: 2800 cmp r0, #0 802dd6a: d0fa beq.n 802dd62 LWIP_ERROR("netconn_accept: invalid recvmbox", sys_mbox_valid(&conn->recvmbox), return ERR_CONN;); 802dd6c: 6903 ldr r3, [r0, #16] 802dd6e: 2b00 cmp r3, #0 802dd70: d04e beq.n 802de10 err = conn->last_err; 802dd72: 7a00 ldrb r0, [r0, #8] if (ERR_IS_FATAL(err)) { 802dd74: b243 sxtb r3, r0 802dd76: 3309 adds r3, #9 802dd78: db4b blt.n 802de12 before the fatal error occurred - is that a problem? */ return err; } #if LWIP_SO_RCVTIMEO if (sys_arch_mbox_fetch(&conn->recvmbox, &buf, conn->recv_timeout) == SYS_ARCH_TIMEOUT) { 802dd7a: f104 0010 add.w r0, r4, #16 802dd7e: a901 add r1, sp, #4 802dd80: 69a2 ldr r2, [r4, #24] 802dd82: f009 fd43 bl 803780c 802dd86: 3001 adds r0, #1 802dd88: d10b bne.n 802dda2 NETCONN_SET_SAFE_ERR(conn, ERR_TIMEOUT); 802dd8a: f009 fe1d bl 80379c8 802dd8e: f994 3008 ldrsb.w r3, [r4, #8] 802dd92: 3309 adds r3, #9 802dd94: db01 blt.n 802dd9a 802dd96: 23fd movs r3, #253 ; 0xfd 802dd98: 7223 strb r3, [r4, #8] 802dd9a: f009 fe1f bl 80379dc return ERR_TIMEOUT; 802dd9e: 20fd movs r0, #253 ; 0xfd 802dda0: e037 b.n 802de12 sys_arch_mbox_fetch(&conn->recvmbox, &buf, 0); #endif /* LWIP_SO_RCVTIMEO*/ #if LWIP_TCP #if (LWIP_UDP || LWIP_RAW) if (conn->type == NETCONN_TCP) 802dda2: 7823 ldrb r3, [r4, #0] 802dda4: 2b10 cmp r3, #16 802dda6: d127 bne.n 802ddf8 #endif /* (LWIP_UDP || LWIP_RAW) */ { if (!netconn_get_noautorecved(conn) || (buf == NULL)) { 802dda8: 7f23 ldrb r3, [r4, #28] 802ddaa: f003 0308 and.w r3, r3, #8 802ddae: b2db uxtb r3, r3 802ddb0: b10b cbz r3, 802ddb6 802ddb2: 9b01 ldr r3, [sp, #4] 802ddb4: b95b cbnz r3, 802ddce /* Let the stack know that we have taken the data. */ /* TODO: Speedup: Don't block and wait for the answer here (to prevent multiple thread-switches). */ msg.function = do_recv; 802ddb6: 4b18 ldr r3, [pc, #96] ; (802de18 ) msg.msg.conn = conn; 802ddb8: 9403 str r4, [sp, #12] { if (!netconn_get_noautorecved(conn) || (buf == NULL)) { /* Let the stack know that we have taken the data. */ /* TODO: Speedup: Don't block and wait for the answer here (to prevent multiple thread-switches). */ msg.function = do_recv; 802ddba: 9302 str r3, [sp, #8] msg.msg.conn = conn; if (buf != NULL) { 802ddbc: 9b01 ldr r3, [sp, #4] 802ddbe: b10b cbz r3, 802ddc4 msg.msg.msg.r.len = ((struct pbuf *)buf)->tot_len; 802ddc0: 891b ldrh r3, [r3, #8] 802ddc2: e000 b.n 802ddc6 } else { msg.msg.msg.r.len = 1; 802ddc4: 2301 movs r3, #1 } /* don't care for the return value of do_recv */ TCPIP_APIMSG(&msg); 802ddc6: a802 add r0, sp, #8 msg.function = do_recv; msg.msg.conn = conn; if (buf != NULL) { msg.msg.msg.r.len = ((struct pbuf *)buf)->tot_len; } else { msg.msg.msg.r.len = 1; 802ddc8: 9305 str r3, [sp, #20] } /* don't care for the return value of do_recv */ TCPIP_APIMSG(&msg); 802ddca: f000 fe25 bl 802ea18 } /* If we are closed, we indicate that we no longer wish to use the socket */ if (buf == NULL) { 802ddce: 9a01 ldr r2, [sp, #4] 802ddd0: b982 cbnz r2, 802ddf4 API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0); 802ddd2: 6aa3 ldr r3, [r4, #40] ; 0x28 802ddd4: b113 cbz r3, 802dddc 802ddd6: 4620 mov r0, r4 802ddd8: 2101 movs r1, #1 802ddda: 4798 blx r3 /* Avoid to lose any previous error code */ NETCONN_SET_SAFE_ERR(conn, ERR_CLSD); 802dddc: f009 fdf4 bl 80379c8 802dde0: f994 3008 ldrsb.w r3, [r4, #8] 802dde4: 3309 adds r3, #9 802dde6: db01 blt.n 802ddec 802dde8: 23f4 movs r3, #244 ; 0xf4 802ddea: 7223 strb r3, [r4, #8] 802ddec: f009 fdf6 bl 80379dc return ERR_CLSD; 802ddf0: 20f4 movs r0, #244 ; 0xf4 802ddf2: e00e b.n 802de12 } len = ((struct pbuf *)buf)->tot_len; 802ddf4: 8912 ldrh r2, [r2, #8] 802ddf6: e002 b.n 802ddfe else #endif /* LWIP_TCP && (LWIP_UDP || LWIP_RAW) */ #if (LWIP_UDP || LWIP_RAW) { LWIP_ASSERT("buf != NULL", buf != NULL); len = netbuf_len((struct netbuf *)buf); 802ddf8: 9b01 ldr r3, [sp, #4] 802ddfa: 681b ldr r3, [r3, #0] 802ddfc: 891a ldrh r2, [r3, #8] #if LWIP_SO_RCVBUF SYS_ARCH_DEC(conn->recv_avail, len); #endif /* LWIP_SO_RCVBUF */ /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVMINUS, len); 802ddfe: 6aa3 ldr r3, [r4, #40] ; 0x28 802de00: b113 cbz r3, 802de08 802de02: 4620 mov r0, r4 802de04: 2101 movs r1, #1 802de06: 4798 blx r3 LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_recv_data: received %p, len=%"U16_F"\n", buf, len)); *new_buf = buf; 802de08: 9b01 ldr r3, [sp, #4] /* don't set conn->last_err: it's only ERR_OK, anyway */ return ERR_OK; 802de0a: 2000 movs r0, #0 /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVMINUS, len); LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_recv_data: received %p, len=%"U16_F"\n", buf, len)); *new_buf = buf; 802de0c: 602b str r3, [r5, #0] 802de0e: e000 b.n 802de12 #endif /* LWIP_TCP */ LWIP_ERROR("netconn_recv: invalid pointer", (new_buf != NULL), return ERR_ARG;); *new_buf = NULL; LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL), return ERR_ARG;); LWIP_ERROR("netconn_accept: invalid recvmbox", sys_mbox_valid(&conn->recvmbox), return ERR_CONN;); 802de10: 20f3 movs r0, #243 ; 0xf3 LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_recv_data: received %p, len=%"U16_F"\n", buf, len)); *new_buf = buf; /* don't set conn->last_err: it's only ERR_OK, anyway */ return ERR_OK; } 802de12: b240 sxtb r0, r0 802de14: b009 add sp, #36 ; 0x24 802de16: bd30 pop {r4, r5, pc} 802de18: 0802e88d .word 0x0802e88d 0802de1c : * @return a newly allocated struct netconn or * NULL on memory error */ struct netconn* netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, netconn_callback callback) { 802de1c: b530 push {r4, r5, lr} 802de1e: 460d mov r5, r1 802de20: b087 sub sp, #28 struct netconn *conn; struct api_msg msg; conn = netconn_alloc(t, callback); 802de22: 4611 mov r1, r2 802de24: f000 fba0 bl 802e568 if (conn != NULL) { 802de28: 4604 mov r4, r0 802de2a: b1a8 cbz r0, 802de58 msg.function = do_newconn; 802de2c: 4b0c ldr r3, [pc, #48] ; (802de60 ) msg.msg.msg.n.proto = proto; msg.msg.conn = conn; 802de2e: 9001 str r0, [sp, #4] if (TCPIP_APIMSG(&msg) != ERR_OK) { 802de30: 4668 mov r0, sp struct netconn *conn; struct api_msg msg; conn = netconn_alloc(t, callback); if (conn != NULL) { msg.function = do_newconn; 802de32: 9300 str r3, [sp, #0] msg.msg.msg.n.proto = proto; 802de34: f88d 500c strb.w r5, [sp, #12] msg.msg.conn = conn; if (TCPIP_APIMSG(&msg) != ERR_OK) { 802de38: f000 fdee bl 802ea18 802de3c: b160 cbz r0, 802de58 LWIP_ASSERT("conn has no op_completed", sys_sem_valid(&conn->op_completed)); LWIP_ASSERT("conn has no recvmbox", sys_mbox_valid(&conn->recvmbox)); #if LWIP_TCP LWIP_ASSERT("conn->acceptmbox shouldn't exist", !sys_mbox_valid(&conn->acceptmbox)); #endif /* LWIP_TCP */ sys_sem_free(&conn->op_completed); 802de3e: f104 000c add.w r0, r4, #12 802de42: f009 fda3 bl 803798c sys_mbox_free(&conn->recvmbox); 802de46: f104 0010 add.w r0, r4, #16 802de4a: f009 fca7 bl 803779c memp_free(MEMP_NETCONN, conn); 802de4e: 4621 mov r1, r4 802de50: 2006 movs r0, #6 802de52: f001 fe51 bl 802faf8 return NULL; 802de56: 2400 movs r4, #0 } } return conn; } 802de58: 4620 mov r0, r4 802de5a: b007 add sp, #28 802de5c: bd30 pop {r4, r5, pc} 802de5e: bf00 nop 802de60: 0802e4d9 .word 0x0802e4d9 0802de64 : * @param conn the netconn to delete * @return ERR_OK if the connection was deleted */ err_t netconn_delete(struct netconn *conn) { 802de64: b510 push {r4, lr} struct api_msg msg; /* No ASSERT here because possible to get a (conn == NULL) if we got an accept error */ if (conn == NULL) { 802de66: 4604 mov r4, r0 * @param conn the netconn to delete * @return ERR_OK if the connection was deleted */ err_t netconn_delete(struct netconn *conn) { 802de68: b086 sub sp, #24 struct api_msg msg; /* No ASSERT here because possible to get a (conn == NULL) if we got an accept error */ if (conn == NULL) { 802de6a: b140 cbz r0, 802de7e return ERR_OK; } msg.function = do_delconn; 802de6c: 4b05 ldr r3, [pc, #20] ; (802de84 ) msg.msg.conn = conn; tcpip_apimsg(&msg); 802de6e: 4668 mov r0, sp if (conn == NULL) { return ERR_OK; } msg.function = do_delconn; msg.msg.conn = conn; 802de70: e88d 0018 stmia.w sp, {r3, r4} tcpip_apimsg(&msg); 802de74: f000 fdd0 bl 802ea18 netconn_free(conn); 802de78: 4620 mov r0, r4 802de7a: f000 fbaf bl 802e5dc /* don't care for return value of do_delconn since it only calls void functions */ return ERR_OK; } 802de7e: 2000 movs r0, #0 802de80: b006 add sp, #24 802de82: bd10 pop {r4, pc} 802de84: 0802e67d .word 0x0802e67d 0802de88 : * @param port the local port to bind the netconn to (not used for RAW) * @return ERR_OK if bound, any other err_t on failure */ err_t netconn_bind(struct netconn *conn, ip_addr_t *addr, u16_t port) { 802de88: b530 push {r4, r5, lr} struct api_msg msg; err_t err; LWIP_ERROR("netconn_bind: invalid conn", (conn != NULL), return ERR_ARG;); 802de8a: 4604 mov r4, r0 * @param port the local port to bind the netconn to (not used for RAW) * @return ERR_OK if bound, any other err_t on failure */ err_t netconn_bind(struct netconn *conn, ip_addr_t *addr, u16_t port) { 802de8c: b087 sub sp, #28 struct api_msg msg; err_t err; LWIP_ERROR("netconn_bind: invalid conn", (conn != NULL), return ERR_ARG;); 802de8e: b198 cbz r0, 802deb8 msg.function = do_bind; 802de90: 4b0b ldr r3, [pc, #44] ; (802dec0 ) msg.msg.conn = conn; msg.msg.msg.bc.ipaddr = addr; 802de92: 9103 str r1, [sp, #12] msg.msg.msg.bc.port = port; err = TCPIP_APIMSG(&msg); 802de94: 4668 mov r0, sp err_t err; LWIP_ERROR("netconn_bind: invalid conn", (conn != NULL), return ERR_ARG;); msg.function = do_bind; msg.msg.conn = conn; 802de96: e88d 0018 stmia.w sp, {r3, r4} msg.msg.msg.bc.ipaddr = addr; msg.msg.msg.bc.port = port; 802de9a: f8ad 2010 strh.w r2, [sp, #16] err = TCPIP_APIMSG(&msg); 802de9e: f000 fdbb bl 802ea18 802dea2: 4605 mov r5, r0 NETCONN_SET_SAFE_ERR(conn, err); 802dea4: f009 fd90 bl 80379c8 802dea8: f994 3008 ldrsb.w r3, [r4, #8] 802deac: 3309 adds r3, #9 802deae: bfa8 it ge 802deb0: 7225 strbge r5, [r4, #8] 802deb2: f009 fd93 bl 80379dc 802deb6: e000 b.n 802deba netconn_bind(struct netconn *conn, ip_addr_t *addr, u16_t port) { struct api_msg msg; err_t err; LWIP_ERROR("netconn_bind: invalid conn", (conn != NULL), return ERR_ARG;); 802deb8: 25f2 movs r5, #242 ; 0xf2 msg.msg.msg.bc.port = port; err = TCPIP_APIMSG(&msg); NETCONN_SET_SAFE_ERR(conn, err); return err; } 802deba: b268 sxtb r0, r5 802debc: b007 add sp, #28 802debe: bd30 pop {r4, r5, pc} 802dec0: 0802e70f .word 0x0802e70f 0802dec4 : * @param port the remote port to connect to (no used for RAW) * @return ERR_OK if connected, return value of tcp_/udp_/raw_connect otherwise */ err_t netconn_connect(struct netconn *conn, ip_addr_t *addr, u16_t port) { 802dec4: b530 push {r4, r5, lr} struct api_msg msg; err_t err; LWIP_ERROR("netconn_connect: invalid conn", (conn != NULL), return ERR_ARG;); 802dec6: 4604 mov r4, r0 * @param port the remote port to connect to (no used for RAW) * @return ERR_OK if connected, return value of tcp_/udp_/raw_connect otherwise */ err_t netconn_connect(struct netconn *conn, ip_addr_t *addr, u16_t port) { 802dec8: b087 sub sp, #28 struct api_msg msg; err_t err; LWIP_ERROR("netconn_connect: invalid conn", (conn != NULL), return ERR_ARG;); 802deca: b198 cbz r0, 802def4 msg.function = do_connect; 802decc: 4b0b ldr r3, [pc, #44] ; (802defc ) msg.msg.conn = conn; msg.msg.msg.bc.ipaddr = addr; 802dece: 9103 str r1, [sp, #12] msg.msg.msg.bc.port = port; /* This is the only function which need to not block tcpip_thread */ err = tcpip_apimsg(&msg); 802ded0: 4668 mov r0, sp err_t err; LWIP_ERROR("netconn_connect: invalid conn", (conn != NULL), return ERR_ARG;); msg.function = do_connect; msg.msg.conn = conn; 802ded2: e88d 0018 stmia.w sp, {r3, r4} msg.msg.msg.bc.ipaddr = addr; msg.msg.msg.bc.port = port; 802ded6: f8ad 2010 strh.w r2, [sp, #16] /* This is the only function which need to not block tcpip_thread */ err = tcpip_apimsg(&msg); 802deda: f000 fd9d bl 802ea18 802dede: 4605 mov r5, r0 NETCONN_SET_SAFE_ERR(conn, err); 802dee0: f009 fd72 bl 80379c8 802dee4: f994 3008 ldrsb.w r3, [r4, #8] 802dee8: 3309 adds r3, #9 802deea: bfa8 it ge 802deec: 7225 strbge r5, [r4, #8] 802deee: f009 fd75 bl 80379dc 802def2: e000 b.n 802def6 netconn_connect(struct netconn *conn, ip_addr_t *addr, u16_t port) { struct api_msg msg; err_t err; LWIP_ERROR("netconn_connect: invalid conn", (conn != NULL), return ERR_ARG;); 802def4: 25f2 movs r5, #242 ; 0xf2 /* This is the only function which need to not block tcpip_thread */ err = tcpip_apimsg(&msg); NETCONN_SET_SAFE_ERR(conn, err); return err; } 802def6: b268 sxtb r0, r5 802def8: b007 add sp, #28 802defa: bd30 pop {r4, r5, pc} 802defc: 0802e765 .word 0x0802e765 0802df00 : * @param conn the netconn to disconnect * @return TODO: return value is not set here... */ err_t netconn_disconnect(struct netconn *conn) { 802df00: b530 push {r4, r5, lr} struct api_msg msg; err_t err; LWIP_ERROR("netconn_disconnect: invalid conn", (conn != NULL), return ERR_ARG;); 802df02: 4604 mov r4, r0 * @param conn the netconn to disconnect * @return TODO: return value is not set here... */ err_t netconn_disconnect(struct netconn *conn) { 802df04: b087 sub sp, #28 struct api_msg msg; err_t err; LWIP_ERROR("netconn_disconnect: invalid conn", (conn != NULL), return ERR_ARG;); 802df06: b180 cbz r0, 802df2a msg.function = do_disconnect; 802df08: 4b0a ldr r3, [pc, #40] ; (802df34 ) msg.msg.conn = conn; err = TCPIP_APIMSG(&msg); 802df0a: 4668 mov r0, sp err_t err; LWIP_ERROR("netconn_disconnect: invalid conn", (conn != NULL), return ERR_ARG;); msg.function = do_disconnect; msg.msg.conn = conn; 802df0c: e88d 0018 stmia.w sp, {r3, r4} err = TCPIP_APIMSG(&msg); 802df10: f000 fd82 bl 802ea18 802df14: 4605 mov r5, r0 NETCONN_SET_SAFE_ERR(conn, err); 802df16: f009 fd57 bl 80379c8 802df1a: f994 3008 ldrsb.w r3, [r4, #8] 802df1e: 3309 adds r3, #9 802df20: bfa8 it ge 802df22: 7225 strbge r5, [r4, #8] 802df24: f009 fd5a bl 80379dc 802df28: e000 b.n 802df2c netconn_disconnect(struct netconn *conn) { struct api_msg msg; err_t err; LWIP_ERROR("netconn_disconnect: invalid conn", (conn != NULL), return ERR_ARG;); 802df2a: 25f2 movs r5, #242 ; 0xf2 msg.msg.conn = conn; err = TCPIP_APIMSG(&msg); NETCONN_SET_SAFE_ERR(conn, err); return err; } 802df2c: b268 sxtb r0, r5 802df2e: b007 add sp, #28 802df30: bd30 pop {r4, r5, pc} 802df32: bf00 nop 802df34: 0802e7f5 .word 0x0802e7f5 0802df38 : * @return ERR_OK if data has been received, an error code otherwise (timeout, * memory error or another error) */ err_t netconn_recv(struct netconn *conn, struct netbuf **new_buf) { 802df38: b573 push {r0, r1, r4, r5, r6, lr} 802df3a: 4604 mov r4, r0 #if LWIP_TCP struct netbuf *buf = NULL; err_t err; #endif /* LWIP_TCP */ LWIP_ERROR("netconn_recv: invalid pointer", (new_buf != NULL), return ERR_ARG;); 802df3c: 460e mov r6, r1 802df3e: b909 cbnz r1, 802df44 802df40: 24f2 movs r4, #242 ; 0xf2 802df42: e031 b.n 802dfa8 *new_buf = NULL; 802df44: 2300 movs r3, #0 802df46: 600b str r3, [r1, #0] LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL), return ERR_ARG;); 802df48: 2800 cmp r0, #0 802df4a: d0f9 beq.n 802df40 LWIP_ERROR("netconn_accept: invalid recvmbox", sys_mbox_valid(&conn->recvmbox), return ERR_CONN;); 802df4c: 6902 ldr r2, [r0, #16] 802df4e: b352 cbz r2, 802dfa6 #if LWIP_TCP #if (LWIP_UDP || LWIP_RAW) if (conn->type == NETCONN_TCP) 802df50: 7802 ldrb r2, [r0, #0] 802df52: 2a10 cmp r2, #16 802df54: d123 bne.n 802df9e #endif /* (LWIP_UDP || LWIP_RAW) */ { struct pbuf *p = NULL; /* This is not a listening netconn, since recvmbox is set */ buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); 802df56: 2005 movs r0, #5 #if LWIP_TCP #if (LWIP_UDP || LWIP_RAW) if (conn->type == NETCONN_TCP) #endif /* (LWIP_UDP || LWIP_RAW) */ { struct pbuf *p = NULL; 802df58: 9301 str r3, [sp, #4] /* This is not a listening netconn, since recvmbox is set */ buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); 802df5a: f001 fdb7 bl 802facc if (buf == NULL) { 802df5e: 4605 mov r5, r0 802df60: b958 cbnz r0, 802df7a NETCONN_SET_SAFE_ERR(conn, ERR_MEM); 802df62: f009 fd31 bl 80379c8 802df66: f994 3008 ldrsb.w r3, [r4, #8] 802df6a: 3309 adds r3, #9 802df6c: db01 blt.n 802df72 802df6e: 23ff movs r3, #255 ; 0xff 802df70: 7223 strb r3, [r4, #8] 802df72: f009 fd33 bl 80379dc return ERR_MEM; 802df76: 24ff movs r4, #255 ; 0xff 802df78: e016 b.n 802dfa8 } err = netconn_recv_data(conn, (void **)&p); 802df7a: 4620 mov r0, r4 802df7c: a901 add r1, sp, #4 802df7e: f7ff fee9 bl 802dd54 if (err != ERR_OK) { 802df82: 4604 mov r4, r0 802df84: b120 cbz r0, 802df90 memp_free(MEMP_NETBUF, buf); 802df86: 2005 movs r0, #5 802df88: 4629 mov r1, r5 802df8a: f001 fdb5 bl 802faf8 802df8e: e00b b.n 802dfa8 return err; } LWIP_ASSERT("p != NULL", p != NULL); buf->p = p; 802df90: 9b01 ldr r3, [sp, #4] buf->ptr = p; buf->port = 0; 802df92: 81a8 strh r0, [r5, #12] memp_free(MEMP_NETBUF, buf); return err; } LWIP_ASSERT("p != NULL", p != NULL); buf->p = p; 802df94: 602b str r3, [r5, #0] buf->ptr = p; 802df96: 606b str r3, [r5, #4] buf->port = 0; ip_addr_set_any(&buf->addr); 802df98: 60a8 str r0, [r5, #8] *new_buf = buf; 802df9a: 6035 str r5, [r6, #0] 802df9c: e004 b.n 802dfa8 #if LWIP_TCP && (LWIP_UDP || LWIP_RAW) else #endif /* LWIP_TCP && (LWIP_UDP || LWIP_RAW) */ { #if (LWIP_UDP || LWIP_RAW) return netconn_recv_data(conn, (void **)new_buf); 802df9e: f7ff fed9 bl 802dd54 802dfa2: 4604 mov r4, r0 802dfa4: e000 b.n 802dfa8 #endif /* LWIP_TCP */ LWIP_ERROR("netconn_recv: invalid pointer", (new_buf != NULL), return ERR_ARG;); *new_buf = NULL; LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL), return ERR_ARG;); LWIP_ERROR("netconn_accept: invalid recvmbox", sys_mbox_valid(&conn->recvmbox), return ERR_CONN;); 802dfa6: 24f3 movs r4, #243 ; 0xf3 { #if (LWIP_UDP || LWIP_RAW) return netconn_recv_data(conn, (void **)new_buf); #endif /* (LWIP_UDP || LWIP_RAW) */ } } 802dfa8: b260 sxtb r0, r4 802dfaa: bd7c pop {r2, r3, r4, r5, r6, pc} 0802dfac : * @param buf a netbuf containing the data to send * @return ERR_OK if data was sent, any other err_t on error */ err_t netconn_send(struct netconn *conn, struct netbuf *buf) { 802dfac: b530 push {r4, r5, lr} struct api_msg msg; err_t err; LWIP_ERROR("netconn_send: invalid conn", (conn != NULL), return ERR_ARG;); 802dfae: 4604 mov r4, r0 * @param buf a netbuf containing the data to send * @return ERR_OK if data was sent, any other err_t on error */ err_t netconn_send(struct netconn *conn, struct netbuf *buf) { 802dfb0: b087 sub sp, #28 struct api_msg msg; err_t err; LWIP_ERROR("netconn_send: invalid conn", (conn != NULL), return ERR_ARG;); 802dfb2: b188 cbz r0, 802dfd8 LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_send: sending %"U16_F" bytes\n", buf->p->tot_len)); msg.function = do_send; 802dfb4: 4b0a ldr r3, [pc, #40] ; (802dfe0 ) msg.msg.conn = conn; msg.msg.msg.b = buf; 802dfb6: 9103 str r1, [sp, #12] err = TCPIP_APIMSG(&msg); 802dfb8: 4668 mov r0, sp LWIP_ERROR("netconn_send: invalid conn", (conn != NULL), return ERR_ARG;); LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_send: sending %"U16_F" bytes\n", buf->p->tot_len)); msg.function = do_send; msg.msg.conn = conn; 802dfba: e88d 0018 stmia.w sp, {r3, r4} msg.msg.msg.b = buf; err = TCPIP_APIMSG(&msg); 802dfbe: f000 fd2b bl 802ea18 802dfc2: 4605 mov r5, r0 NETCONN_SET_SAFE_ERR(conn, err); 802dfc4: f009 fd00 bl 80379c8 802dfc8: f994 3008 ldrsb.w r3, [r4, #8] 802dfcc: 3309 adds r3, #9 802dfce: bfa8 it ge 802dfd0: 7225 strbge r5, [r4, #8] 802dfd2: f009 fd03 bl 80379dc 802dfd6: e000 b.n 802dfda netconn_send(struct netconn *conn, struct netbuf *buf) { struct api_msg msg; err_t err; LWIP_ERROR("netconn_send: invalid conn", (conn != NULL), return ERR_ARG;); 802dfd8: 25f2 movs r5, #242 ; 0xf2 msg.msg.msg.b = buf; err = TCPIP_APIMSG(&msg); NETCONN_SET_SAFE_ERR(conn, err); return err; } 802dfda: b268 sxtb r0, r5 802dfdc: b007 add sp, #28 802dfde: bd30 pop {r4, r5, pc} 802dfe0: 0802e81f .word 0x0802e81f 0802dfe4 : * * @param conn the TCP netconn to setup */ static void setup_tcp(struct netconn *conn) { 802dfe4: b510 push {r4, lr} struct tcp_pcb *pcb; pcb = conn->pcb.tcp; 802dfe6: 6844 ldr r4, [r0, #4] * * @param conn the TCP netconn to setup */ static void setup_tcp(struct netconn *conn) { 802dfe8: 4601 mov r1, r0 struct tcp_pcb *pcb; pcb = conn->pcb.tcp; tcp_arg(pcb, conn); 802dfea: 4620 mov r0, r4 802dfec: f002 f9d4 bl 8030398 tcp_recv(pcb, recv_tcp); 802dff0: 4620 mov r0, r4 802dff2: 4909 ldr r1, [pc, #36] ; (802e018 ) 802dff4: f002 f9d2 bl 803039c tcp_sent(pcb, sent_tcp); 802dff8: 4620 mov r0, r4 802dffa: 4908 ldr r1, [pc, #32] ; (802e01c ) 802dffc: f002 f9d0 bl 80303a0 tcp_poll(pcb, poll_tcp, 4); 802e000: 4620 mov r0, r4 802e002: 4907 ldr r1, [pc, #28] ; (802e020 ) 802e004: 2204 movs r2, #4 802e006: f002 f9d2 bl 80303ae tcp_err(pcb, err_tcp); 802e00a: 4906 ldr r1, [pc, #24] ; (802e024 ) 802e00c: 4620 mov r0, r4 } 802e00e: e8bd 4010 ldmia.w sp!, {r4, lr} pcb = conn->pcb.tcp; tcp_arg(pcb, conn); tcp_recv(pcb, recv_tcp); tcp_sent(pcb, sent_tcp); tcp_poll(pcb, poll_tcp, 4); tcp_err(pcb, err_tcp); 802e012: f002 b9c7 b.w 80303a4 802e016: bf00 nop 802e018: 0802e429 .word 0x0802e429 802e01c: 0802e48f .word 0x0802e48f 802e020: 0802e2ff .word 0x0802e2ff 802e024: 0802e179 .word 0x0802e179 0802e028 : * * @param conn the TCP netconn to close */ static void do_close_internal(struct netconn *conn) { 802e028: b5f8 push {r3, r4, r5, r6, r7, lr} LWIP_ASSERT("this is for tcp netconns only", (conn->type == NETCONN_TCP)); LWIP_ASSERT("conn must be in state NETCONN_CLOSE", (conn->state == NETCONN_CLOSE)); LWIP_ASSERT("pcb already closed", (conn->pcb.tcp != NULL)); LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); shut = conn->current_msg->msg.sd.shut; 802e02a: 6a43 ldr r3, [r0, #36] ; 0x24 802e02c: 7a1d ldrb r5, [r3, #8] shut_rx = shut & NETCONN_SHUT_RD; shut_tx = shut & NETCONN_SHUT_WR; /* shutting down both ends is the same as closing */ close = shut == NETCONN_SHUT_RDWR; 802e02e: 1eeb subs r3, r5, #3 LWIP_ASSERT("pcb already closed", (conn->pcb.tcp != NULL)); LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); shut = conn->current_msg->msg.sd.shut; shut_rx = shut & NETCONN_SHUT_RD; shut_tx = shut & NETCONN_SHUT_WR; 802e030: f005 0602 and.w r6, r5, #2 LWIP_ASSERT("conn must be in state NETCONN_CLOSE", (conn->state == NETCONN_CLOSE)); LWIP_ASSERT("pcb already closed", (conn->pcb.tcp != NULL)); LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); shut = conn->current_msg->msg.sd.shut; shut_rx = shut & NETCONN_SHUT_RD; 802e034: f005 0701 and.w r7, r5, #1 shut_tx = shut & NETCONN_SHUT_WR; /* shutting down both ends is the same as closing */ close = shut == NETCONN_SHUT_RDWR; 802e038: 425d negs r5, r3 802e03a: 415d adcs r5, r3 * * @param conn the TCP netconn to close */ static void do_close_internal(struct netconn *conn) { 802e03c: 4604 mov r4, r0 LWIP_ASSERT("pcb already closed", (conn->pcb.tcp != NULL)); LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); shut = conn->current_msg->msg.sd.shut; shut_rx = shut & NETCONN_SHUT_RD; shut_tx = shut & NETCONN_SHUT_WR; 802e03e: b2f6 uxtb r6, r6 /* shutting down both ends is the same as closing */ close = shut == NETCONN_SHUT_RDWR; /* Set back some callback pointers */ if (close) { 802e040: b11d cbz r5, 802e04a tcp_arg(conn->pcb.tcp, NULL); 802e042: 6840 ldr r0, [r0, #4] 802e044: 2100 movs r1, #0 802e046: f002 f9a7 bl 8030398 } if (conn->pcb.tcp->state == LISTEN) { 802e04a: 6860 ldr r0, [r4, #4] 802e04c: 7e03 ldrb r3, [r0, #24] 802e04e: 2b01 cmp r3, #1 802e050: d104 bne.n 802e05c tcp_accept(conn->pcb.tcp, NULL); 802e052: 2100 movs r1, #0 802e054: f002 f9a9 bl 80303aa tcp_poll(conn->pcb.tcp, NULL, 4); tcp_err(conn->pcb.tcp, NULL); } } /* Try to close the connection */ if (close) { 802e058: b9bd cbnz r5, 802e08a 802e05a: e01a b.n 802e092 } if (conn->pcb.tcp->state == LISTEN) { tcp_accept(conn->pcb.tcp, NULL); } else { /* some callbacks have to be reset if tcp_close is not successful */ if (shut_rx) { 802e05c: b137 cbz r7, 802e06c tcp_recv(conn->pcb.tcp, NULL); 802e05e: 2100 movs r1, #0 802e060: f002 f99c bl 803039c tcp_accept(conn->pcb.tcp, NULL); 802e064: 6860 ldr r0, [r4, #4] 802e066: 2100 movs r1, #0 802e068: f002 f99f bl 80303aa } if (shut_tx) { 802e06c: b11e cbz r6, 802e076 tcp_sent(conn->pcb.tcp, NULL); 802e06e: 6860 ldr r0, [r4, #4] 802e070: 2100 movs r1, #0 802e072: f002 f995 bl 80303a0 } if (close) { 802e076: b165 cbz r5, 802e092 tcp_poll(conn->pcb.tcp, NULL, 4); 802e078: 6860 ldr r0, [r4, #4] 802e07a: 2100 movs r1, #0 802e07c: 2204 movs r2, #4 802e07e: f002 f996 bl 80303ae tcp_err(conn->pcb.tcp, NULL); 802e082: 6860 ldr r0, [r4, #4] 802e084: 2100 movs r1, #0 802e086: f002 f98d bl 80303a4 } } /* Try to close the connection */ if (close) { err = tcp_close(conn->pcb.tcp); 802e08a: 6860 ldr r0, [r4, #4] 802e08c: f002 fc48 bl 8030920 802e090: e004 b.n 802e09c } else { err = tcp_shutdown(conn->pcb.tcp, shut_rx, shut_tx); 802e092: 6860 ldr r0, [r4, #4] 802e094: 4639 mov r1, r7 802e096: 4632 mov r2, r6 802e098: f002 fc1c bl 80308d4 802e09c: 4602 mov r2, r0 } if (err == ERR_OK) { 802e09e: b9f0 cbnz r0, 802e0de /* Closing succeeded */ conn->current_msg->err = ERR_OK; 802e0a0: 6a63 ldr r3, [r4, #36] ; 0x24 802e0a2: 7118 strb r0, [r3, #4] conn->current_msg = NULL; 802e0a4: 6260 str r0, [r4, #36] ; 0x24 conn->state = NETCONN_NONE; 802e0a6: 7060 strb r0, [r4, #1] if (close) { 802e0a8: b12d cbz r5, 802e0b6 /* Set back some callback pointers as conn is going away */ conn->pcb.tcp = NULL; /* Trigger select() in socket layer. Make sure everybody notices activity on the connection, error first! */ API_EVENT(conn, NETCONN_EVT_ERROR, 0); 802e0aa: 6aa3 ldr r3, [r4, #40] ; 0x28 conn->current_msg->err = ERR_OK; conn->current_msg = NULL; conn->state = NETCONN_NONE; if (close) { /* Set back some callback pointers as conn is going away */ conn->pcb.tcp = NULL; 802e0ac: 6060 str r0, [r4, #4] /* Trigger select() in socket layer. Make sure everybody notices activity on the connection, error first! */ API_EVENT(conn, NETCONN_EVT_ERROR, 0); 802e0ae: b113 cbz r3, 802e0b6 802e0b0: 4620 mov r0, r4 802e0b2: 2104 movs r1, #4 802e0b4: 4798 blx r3 } if (shut_rx) { 802e0b6: b12f cbz r7, 802e0c4 API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); 802e0b8: 6aa3 ldr r3, [r4, #40] ; 0x28 802e0ba: b11b cbz r3, 802e0c4 802e0bc: 2100 movs r1, #0 802e0be: 4620 mov r0, r4 802e0c0: 460a mov r2, r1 802e0c2: 4798 blx r3 } if (shut_tx) { 802e0c4: b12e cbz r6, 802e0d2 API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 802e0c6: 6aa3 ldr r3, [r4, #40] ; 0x28 802e0c8: b11b cbz r3, 802e0d2 802e0ca: 4620 mov r0, r4 802e0cc: 2102 movs r1, #2 802e0ce: 2200 movs r2, #0 802e0d0: 4798 blx r3 } /* wake up the application task */ sys_sem_signal(&conn->op_completed); 802e0d2: f104 000c add.w r0, r4, #12 tcp_arg(conn->pcb.tcp, conn); /* don't restore recv callback: we don't want to receive any more data */ } /* If closing didn't succeed, we get called again either from poll_tcp or from sent_tcp */ } 802e0d6: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr} } if (shut_tx) { API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); } /* wake up the application task */ sys_sem_signal(&conn->op_completed); 802e0da: f009 bc45 b.w 8037968 } else { /* Closing failed, restore some of the callbacks */ /* Closing of listen pcb will never fail! */ LWIP_ASSERT("Closing a listen pcb may not fail!", (conn->pcb.tcp->state != LISTEN)); tcp_sent(conn->pcb.tcp, sent_tcp); 802e0de: 6860 ldr r0, [r4, #4] 802e0e0: 4908 ldr r1, [pc, #32] ; (802e104 ) 802e0e2: f002 f95d bl 80303a0 tcp_poll(conn->pcb.tcp, poll_tcp, 4); 802e0e6: 6860 ldr r0, [r4, #4] 802e0e8: 4907 ldr r1, [pc, #28] ; (802e108 ) 802e0ea: 2204 movs r2, #4 802e0ec: f002 f95f bl 80303ae tcp_err(conn->pcb.tcp, err_tcp); 802e0f0: 6860 ldr r0, [r4, #4] 802e0f2: 4906 ldr r1, [pc, #24] ; (802e10c ) 802e0f4: f002 f956 bl 80303a4 tcp_arg(conn->pcb.tcp, conn); 802e0f8: 6860 ldr r0, [r4, #4] 802e0fa: 4621 mov r1, r4 /* don't restore recv callback: we don't want to receive any more data */ } /* If closing didn't succeed, we get called again either from poll_tcp or from sent_tcp */ } 802e0fc: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr} /* Closing of listen pcb will never fail! */ LWIP_ASSERT("Closing a listen pcb may not fail!", (conn->pcb.tcp->state != LISTEN)); tcp_sent(conn->pcb.tcp, sent_tcp); tcp_poll(conn->pcb.tcp, poll_tcp, 4); tcp_err(conn->pcb.tcp, err_tcp); tcp_arg(conn->pcb.tcp, conn); 802e100: f002 b94a b.w 8030398 802e104: 0802e48f .word 0x0802e48f 802e108: 0802e2ff .word 0x0802e2ff 802e10c: 0802e179 .word 0x0802e179 0802e110 : * * @see tcp.h (struct tcp_pcb.connected) for parameters and return values */ static err_t do_connected(void *arg, struct tcp_pcb *pcb, err_t err) { 802e110: b538 push {r3, r4, r5, lr} LWIP_UNUSED_ARG(pcb); conn = (struct netconn *)arg; if (conn == NULL) { 802e112: 4604 mov r4, r0 802e114: b358 cbz r0, 802e16e LWIP_ASSERT("conn->state == NETCONN_CONNECT", conn->state == NETCONN_CONNECT); LWIP_ASSERT("(conn->current_msg != NULL) || conn->in_non_blocking_connect", (conn->current_msg != NULL) || IN_NONBLOCKING_CONNECT(conn)); if (conn->current_msg != NULL) { 802e116: 6a43 ldr r3, [r0, #36] ; 0x24 802e118: b103 cbz r3, 802e11c conn->current_msg->err = err; 802e11a: 711a strb r2, [r3, #4] } if ((conn->type == NETCONN_TCP) && (err == ERR_OK)) { 802e11c: 7823 ldrb r3, [r4, #0] 802e11e: 2b10 cmp r3, #16 802e120: d103 bne.n 802e12a 802e122: b912 cbnz r2, 802e12a setup_tcp(conn); 802e124: 4620 mov r0, r4 802e126: f7ff ff5d bl 802dfe4 } was_blocking = !IN_NONBLOCKING_CONNECT(conn); 802e12a: 7f23 ldrb r3, [r4, #28] 802e12c: f083 0504 eor.w r5, r3, #4 SET_NONBLOCKING_CONNECT(conn, 0); 802e130: f023 0304 bic.w r3, r3, #4 802e134: 7723 strb r3, [r4, #28] conn->current_msg->err = err; } if ((conn->type == NETCONN_TCP) && (err == ERR_OK)) { setup_tcp(conn); } was_blocking = !IN_NONBLOCKING_CONNECT(conn); 802e136: f3c5 0580 ubfx r5, r5, #2, #1 SET_NONBLOCKING_CONNECT(conn, 0); conn->current_msg = NULL; 802e13a: 2300 movs r3, #0 802e13c: 6263 str r3, [r4, #36] ; 0x24 conn->state = NETCONN_NONE; 802e13e: 7063 strb r3, [r4, #1] if (!was_blocking) { 802e140: b945 cbnz r5, 802e154 NETCONN_SET_SAFE_ERR(conn, ERR_OK); 802e142: f009 fc41 bl 80379c8 802e146: f994 3008 ldrsb.w r3, [r4, #8] 802e14a: 3309 adds r3, #9 802e14c: bfa8 it ge 802e14e: 7225 strbge r5, [r4, #8] 802e150: f009 fc44 bl 80379dc } API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 802e154: 6aa3 ldr r3, [r4, #40] ; 0x28 802e156: b11b cbz r3, 802e160 802e158: 4620 mov r0, r4 802e15a: 2102 movs r1, #2 802e15c: 2200 movs r2, #0 802e15e: 4798 blx r3 if (was_blocking) { 802e160: b13d cbz r5, 802e172 sys_sem_signal(&conn->op_completed); 802e162: f104 000c add.w r0, r4, #12 802e166: f009 fbff bl 8037968 } return ERR_OK; 802e16a: 2000 movs r0, #0 802e16c: e002 b.n 802e174 LWIP_UNUSED_ARG(pcb); conn = (struct netconn *)arg; if (conn == NULL) { return ERR_VAL; 802e16e: 20fa movs r0, #250 ; 0xfa 802e170: e000 b.n 802e174 API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); if (was_blocking) { sys_sem_signal(&conn->op_completed); } return ERR_OK; 802e172: 4628 mov r0, r5 } 802e174: b240 sxtb r0, r0 802e176: bd38 pop {r3, r4, r5, pc} 0802e178 : * * @see tcp.h (struct tcp_pcb.err) for parameters */ static void err_tcp(void *arg, err_t err) { 802e178: b5f8 push {r3, r4, r5, r6, r7, lr} 802e17a: 4604 mov r4, r0 SYS_ARCH_DECL_PROTECT(lev); conn = (struct netconn *)arg; LWIP_ASSERT("conn != NULL", (conn != NULL)); conn->pcb.tcp = NULL; 802e17c: 2500 movs r5, #0 * * @see tcp.h (struct tcp_pcb.err) for parameters */ static void err_tcp(void *arg, err_t err) { 802e17e: 460e mov r6, r1 SYS_ARCH_DECL_PROTECT(lev); conn = (struct netconn *)arg; LWIP_ASSERT("conn != NULL", (conn != NULL)); conn->pcb.tcp = NULL; 802e180: 6045 str r5, [r0, #4] /* no check since this is always fatal! */ SYS_ARCH_PROTECT(lev); 802e182: f009 fc21 bl 80379c8 conn->last_err = err; 802e186: 7226 strb r6, [r4, #8] SYS_ARCH_UNPROTECT(lev); 802e188: f009 fc28 bl 80379dc old_state = conn->state; conn->state = NETCONN_NONE; /* Notify the user layer about a connection error. Used to signal select. */ API_EVENT(conn, NETCONN_EVT_ERROR, 0); 802e18c: 6aa3 ldr r3, [r4, #40] ; 0x28 SYS_ARCH_PROTECT(lev); conn->last_err = err; SYS_ARCH_UNPROTECT(lev); /* reset conn->state now before waking up other threads */ old_state = conn->state; 802e18e: 7867 ldrb r7, [r4, #1] conn->state = NETCONN_NONE; 802e190: 7065 strb r5, [r4, #1] /* Notify the user layer about a connection error. Used to signal select. */ API_EVENT(conn, NETCONN_EVT_ERROR, 0); 802e192: b11b cbz r3, 802e19c 802e194: 4620 mov r0, r4 802e196: 2104 movs r1, #4 802e198: 462a mov r2, r5 802e19a: 4798 blx r3 /* Try to release selects pending on 'read' or 'write', too. They will get an error if they actually try to read or write. */ API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); 802e19c: 6aa3 ldr r3, [r4, #40] ; 0x28 802e19e: b11b cbz r3, 802e1a8 802e1a0: 2100 movs r1, #0 802e1a2: 4620 mov r0, r4 802e1a4: 460a mov r2, r1 802e1a6: 4798 blx r3 API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 802e1a8: 6aa3 ldr r3, [r4, #40] ; 0x28 802e1aa: b11b cbz r3, 802e1b4 802e1ac: 4620 mov r0, r4 802e1ae: 2102 movs r1, #2 802e1b0: 2200 movs r2, #0 802e1b2: 4798 blx r3 /* pass NULL-message to recvmbox to wake up pending recv */ if (sys_mbox_valid(&conn->recvmbox)) { 802e1b4: 6923 ldr r3, [r4, #16] 802e1b6: b123 cbz r3, 802e1c2 /* use trypost to prevent deadlock */ sys_mbox_trypost(&conn->recvmbox, NULL); 802e1b8: f104 0010 add.w r0, r4, #16 802e1bc: 2100 movs r1, #0 802e1be: f009 fb0b bl 80377d8 } /* pass NULL-message to acceptmbox to wake up pending accept */ if (sys_mbox_valid(&conn->acceptmbox)) { 802e1c2: 6963 ldr r3, [r4, #20] 802e1c4: b123 cbz r3, 802e1d0 /* use trypost to preven deadlock */ sys_mbox_trypost(&conn->acceptmbox, NULL); 802e1c6: f104 0014 add.w r0, r4, #20 802e1ca: 2100 movs r1, #0 802e1cc: f009 fb04 bl 80377d8 802e1d0: 2f04 cmp r7, #4 802e1d2: d815 bhi.n 802e200 802e1d4: b27f sxtb r7, r7 802e1d6: f04f 43b0 mov.w r3, #1476395008 ; 0x58000000 802e1da: 40bb lsls r3, r7 802e1dc: d510 bpl.n 802e200 if ((old_state == NETCONN_WRITE) || (old_state == NETCONN_CLOSE) || (old_state == NETCONN_CONNECT)) { /* calling do_writemore/do_close_internal is not necessary since the pcb has already been deleted! */ int was_nonblocking_connect = IN_NONBLOCKING_CONNECT(conn); 802e1de: 7f23 ldrb r3, [r4, #28] SET_NONBLOCKING_CONNECT(conn, 0); 802e1e0: f023 0204 bic.w r2, r3, #4 if (!was_nonblocking_connect) { 802e1e4: f003 0304 and.w r3, r3, #4 802e1e8: b2db uxtb r3, r3 if ((old_state == NETCONN_WRITE) || (old_state == NETCONN_CLOSE) || (old_state == NETCONN_CONNECT)) { /* calling do_writemore/do_close_internal is not necessary since the pcb has already been deleted! */ int was_nonblocking_connect = IN_NONBLOCKING_CONNECT(conn); SET_NONBLOCKING_CONNECT(conn, 0); 802e1ea: 7722 strb r2, [r4, #28] if (!was_nonblocking_connect) { 802e1ec: b943 cbnz r3, 802e200 /* set error return code */ LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); conn->current_msg->err = err; 802e1ee: 6a62 ldr r2, [r4, #36] ; 0x24 conn->current_msg = NULL; /* wake up the waiting task */ sys_sem_signal(&conn->op_completed); 802e1f0: f104 000c add.w r0, r4, #12 SET_NONBLOCKING_CONNECT(conn, 0); if (!was_nonblocking_connect) { /* set error return code */ LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); conn->current_msg->err = err; 802e1f4: 7116 strb r6, [r2, #4] conn->current_msg = NULL; 802e1f6: 6263 str r3, [r4, #36] ; 0x24 sys_sem_signal(&conn->op_completed); } } else { LWIP_ASSERT("conn->current_msg == NULL", conn->current_msg == NULL); } } 802e1f8: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr} /* set error return code */ LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); conn->current_msg->err = err; conn->current_msg = NULL; /* wake up the waiting task */ sys_sem_signal(&conn->op_completed); 802e1fc: f009 bbb4 b.w 8037968 802e200: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802e202 : * @return ERR_OK * ERR_MEM if LWIP_TCPIP_CORE_LOCKING=1 and sending hasn't yet finished */ static err_t do_writemore(struct netconn *conn) { 802e202: b5f8 push {r3, r4, r5, r6, r7, lr} err_t err; void *dataptr; u16_t len, available; u8_t write_finished = 0; size_t diff; u8_t dontblock = netconn_is_nonblocking(conn) || 802e204: 7f03 ldrb r3, [r0, #28] 802e206: f003 0302 and.w r3, r3, #2 802e20a: b2db uxtb r3, r3 * @return ERR_OK * ERR_MEM if LWIP_TCPIP_CORE_LOCKING=1 and sending hasn't yet finished */ static err_t do_writemore(struct netconn *conn) { 802e20c: 4604 mov r4, r0 err_t err; void *dataptr; u16_t len, available; u8_t write_finished = 0; size_t diff; u8_t dontblock = netconn_is_nonblocking(conn) || 802e20e: b923 cbnz r3, 802e21a (conn->current_msg->msg.w.apiflags & NETCONN_DONTBLOCK); 802e210: 6a43 ldr r3, [r0, #36] ; 0x24 err_t err; void *dataptr; u16_t len, available; u8_t write_finished = 0; size_t diff; u8_t dontblock = netconn_is_nonblocking(conn) || 802e212: 7c1f ldrb r7, [r3, #16] 802e214: f3c7 0780 ubfx r7, r7, #2, #1 802e218: e000 b.n 802e21c 802e21a: 2701 movs r7, #1 (conn->current_msg->msg.w.apiflags & NETCONN_DONTBLOCK); u8_t apiflags = conn->current_msg->msg.w.apiflags; 802e21c: 6a62 ldr r2, [r4, #36] ; 0x24 conn->current_msg->msg.w.len = conn->write_offset; } } else #endif /* LWIP_SO_SNDTIMEO */ { dataptr = (u8_t*)conn->current_msg->msg.w.dataptr + conn->write_offset; 802e21e: 6a20 ldr r0, [r4, #32] u16_t len, available; u8_t write_finished = 0; size_t diff; u8_t dontblock = netconn_is_nonblocking(conn) || (conn->current_msg->msg.w.apiflags & NETCONN_DONTBLOCK); u8_t apiflags = conn->current_msg->msg.w.apiflags; 802e220: 7c13 ldrb r3, [r2, #16] conn->current_msg->msg.w.len = conn->write_offset; } } else #endif /* LWIP_SO_SNDTIMEO */ { dataptr = (u8_t*)conn->current_msg->msg.w.dataptr + conn->write_offset; 802e222: 6891 ldr r1, [r2, #8] diff = conn->current_msg->msg.w.len - conn->write_offset; 802e224: 68d2 ldr r2, [r2, #12] if (diff > 0xffffUL) { /* max_u16_t */ 802e226: f64f 75ff movw r5, #65535 ; 0xffff } } else #endif /* LWIP_SO_SNDTIMEO */ { dataptr = (u8_t*)conn->current_msg->msg.w.dataptr + conn->write_offset; diff = conn->current_msg->msg.w.len - conn->write_offset; 802e22a: 1a12 subs r2, r2, r0 conn->current_msg->msg.w.len = conn->write_offset; } } else #endif /* LWIP_SO_SNDTIMEO */ { dataptr = (u8_t*)conn->current_msg->msg.w.dataptr + conn->write_offset; 802e22c: 1809 adds r1, r1, r0 #endif apiflags |= TCP_WRITE_FLAG_MORE; } else { len = (u16_t)diff; } available = tcp_sndbuf(conn->pcb.tcp); 802e22e: 6860 ldr r0, [r4, #4] } else #endif /* LWIP_SO_SNDTIMEO */ { dataptr = (u8_t*)conn->current_msg->msg.w.dataptr + conn->write_offset; diff = conn->current_msg->msg.w.len - conn->write_offset; if (diff > 0xffffUL) { /* max_u16_t */ 802e230: 42aa cmp r2, r5 #if LWIP_TCPIP_CORE_LOCKING conn->flags |= NETCONN_FLAG_WRITE_DELAYED; #endif apiflags |= TCP_WRITE_FLAG_MORE; } else { len = (u16_t)diff; 802e232: bf98 it ls 802e234: b295 uxthls r5, r2 } available = tcp_sndbuf(conn->pcb.tcp); 802e236: f8b0 2066 ldrh.w r2, [r0, #102] ; 0x66 if (diff > 0xffffUL) { /* max_u16_t */ len = 0xffff; #if LWIP_TCPIP_CORE_LOCKING conn->flags |= NETCONN_FLAG_WRITE_DELAYED; #endif apiflags |= TCP_WRITE_FLAG_MORE; 802e23a: bf88 it hi 802e23c: f043 0302 orrhi.w r3, r3, #2 } else { len = (u16_t)diff; } available = tcp_sndbuf(conn->pcb.tcp); if (available < len) { 802e240: 42aa cmp r2, r5 err_t err; void *dataptr; u16_t len, available; u8_t write_finished = 0; size_t diff; u8_t dontblock = netconn_is_nonblocking(conn) || 802e242: b2ff uxtb r7, r7 apiflags |= TCP_WRITE_FLAG_MORE; } else { len = (u16_t)diff; } available = tcp_sndbuf(conn->pcb.tcp); if (available < len) { 802e244: d206 bcs.n 802e254 /* don't try to write more than sendbuf */ len = available; if (dontblock){ 802e246: b117 cbz r7, 802e24e if (!len) { 802e248: 4615 mov r5, r2 802e24a: b16a cbz r2, 802e268 802e24c: e002 b.n 802e254 } } else { #if LWIP_TCPIP_CORE_LOCKING conn->flags |= NETCONN_FLAG_WRITE_DELAYED; #endif apiflags |= TCP_WRITE_FLAG_MORE; 802e24e: f043 0302 orr.w r3, r3, #2 802e252: 4615 mov r5, r2 } } LWIP_ASSERT("do_writemore: invalid length!", ((conn->write_offset + len) <= conn->current_msg->msg.w.len)); err = tcp_write(conn->pcb.tcp, dataptr, len, apiflags); 802e254: 462a mov r2, r5 802e256: f003 fca4 bl 8031ba2 /* if OK or memory error, check available space */ if ((err == ERR_OK) || (err == ERR_MEM)) { 802e25a: 1c43 adds r3, r0, #1 802e25c: b2db uxtb r3, r3 802e25e: 2b01 cmp r3, #1 #endif apiflags |= TCP_WRITE_FLAG_MORE; } } LWIP_ASSERT("do_writemore: invalid length!", ((conn->write_offset + len) <= conn->current_msg->msg.w.len)); err = tcp_write(conn->pcb.tcp, dataptr, len, apiflags); 802e260: 4606 mov r6, r0 /* if OK or memory error, check available space */ if ((err == ERR_OK) || (err == ERR_MEM)) { 802e262: d83e bhi.n 802e2e2 err_mem: if (dontblock && (len < conn->current_msg->msg.w.len)) { 802e264: b187 cbz r7, 802e288 802e266: e000 b.n 802e26a if (available < len) { /* don't try to write more than sendbuf */ len = available; if (dontblock){ if (!len) { err = ERR_WOULDBLOCK; 802e268: 26f9 movs r6, #249 ; 0xf9 LWIP_ASSERT("do_writemore: invalid length!", ((conn->write_offset + len) <= conn->current_msg->msg.w.len)); err = tcp_write(conn->pcb.tcp, dataptr, len, apiflags); /* if OK or memory error, check available space */ if ((err == ERR_OK) || (err == ERR_MEM)) { err_mem: if (dontblock && (len < conn->current_msg->msg.w.len)) { 802e26a: 6a63 ldr r3, [r4, #36] ; 0x24 802e26c: 68db ldr r3, [r3, #12] 802e26e: 429d cmp r5, r3 802e270: d20a bcs.n 802e288 /* non-blocking write did not write everything: mark the pcb non-writable and let poll_tcp check writable space to mark the pcb writable again */ API_EVENT(conn, NETCONN_EVT_SENDMINUS, len); 802e272: 6aa3 ldr r3, [r4, #40] ; 0x28 802e274: b11b cbz r3, 802e27e 802e276: 4620 mov r0, r4 802e278: 2103 movs r1, #3 802e27a: 462a mov r2, r5 802e27c: 4798 blx r3 conn->flags |= NETCONN_FLAG_CHECK_WRITESPACE; 802e27e: 7f23 ldrb r3, [r4, #28] 802e280: f043 0310 orr.w r3, r3, #16 802e284: 7723 strb r3, [r4, #28] 802e286: e010 b.n 802e2aa } else if ((tcp_sndbuf(conn->pcb.tcp) <= TCP_SNDLOWAT) || 802e288: 6863 ldr r3, [r4, #4] 802e28a: f8b3 1066 ldrh.w r1, [r3, #102] ; 0x66 802e28e: f243 3254 movw r2, #13140 ; 0x3354 802e292: 4291 cmp r1, r2 802e294: d903 bls.n 802e29e 802e296: f8b3 3068 ldrh.w r3, [r3, #104] ; 0x68 802e29a: 2b23 cmp r3, #35 ; 0x23 802e29c: d905 bls.n 802e2aa (tcp_sndqueuelen(conn->pcb.tcp) >= TCP_SNDQUEUELOWAT)) { /* The queued byte- or pbuf-count exceeds the configured low-water limit, let select mark this pcb as non-writable. */ API_EVENT(conn, NETCONN_EVT_SENDMINUS, len); 802e29e: 6aa3 ldr r3, [r4, #40] ; 0x28 802e2a0: b11b cbz r3, 802e2aa 802e2a2: 4620 mov r0, r4 802e2a4: 2103 movs r1, #3 802e2a6: 462a mov r2, r5 802e2a8: 4798 blx r3 } } if (err == ERR_OK) { 802e2aa: b996 cbnz r6, 802e2d2 conn->write_offset += len; 802e2ac: 6a23 ldr r3, [r4, #32] 802e2ae: 18ed adds r5, r5, r3 if ((conn->write_offset == conn->current_msg->msg.w.len) || dontblock) { 802e2b0: 6a63 ldr r3, [r4, #36] ; 0x24 API_EVENT(conn, NETCONN_EVT_SENDMINUS, len); } } if (err == ERR_OK) { conn->write_offset += len; 802e2b2: 6225 str r5, [r4, #32] if ((conn->write_offset == conn->current_msg->msg.w.len) || dontblock) { 802e2b4: 68da ldr r2, [r3, #12] 802e2b6: 4295 cmp r5, r2 802e2b8: 4632 mov r2, r6 802e2ba: d000 beq.n 802e2be 802e2bc: b11f cbz r7, 802e2c6 /* return sent length */ conn->current_msg->msg.w.len = conn->write_offset; 802e2be: 60dd str r5, [r3, #12] /* everything was written */ write_finished = 1; conn->write_offset = 0; 802e2c0: 6222 str r2, [r4, #32] conn->write_offset += len; if ((conn->write_offset == conn->current_msg->msg.w.len) || dontblock) { /* return sent length */ conn->current_msg->msg.w.len = conn->write_offset; /* everything was written */ write_finished = 1; 802e2c2: 2501 movs r5, #1 802e2c4: e000 b.n 802e2c8 do_writemore(struct netconn *conn) { err_t err; void *dataptr; u16_t len, available; u8_t write_finished = 0; 802e2c6: 4635 mov r5, r6 conn->current_msg->msg.w.len = conn->write_offset; /* everything was written */ write_finished = 1; conn->write_offset = 0; } tcp_output(conn->pcb.tcp); 802e2c8: 6860 ldr r0, [r4, #4] 802e2ca: f003 fe7d bl 8031fc8 the error to the application thread. */ write_finished = 1; conn->current_msg->msg.w.len = 0; } } if (write_finished) { 802e2ce: b1a5 cbz r5, 802e2fa 802e2d0: e00a b.n 802e2e8 /* everything was written */ write_finished = 1; conn->write_offset = 0; } tcp_output(conn->pcb.tcp); } else if ((err == ERR_MEM) && !dontblock) { 802e2d2: b273 sxtb r3, r6 802e2d4: 3301 adds r3, #1 802e2d6: d104 bne.n 802e2e2 802e2d8: b91f cbnz r7, 802e2e2 /* If ERR_MEM, we wait for sent_tcp or poll_tcp to be called we do NOT return to the application thread, since ERR_MEM is only a temporary error! */ /* tcp_write returned ERR_MEM, try tcp_output anyway */ tcp_output(conn->pcb.tcp); 802e2da: 6860 ldr r0, [r4, #4] 802e2dc: f003 fe74 bl 8031fc8 802e2e0: e00b b.n 802e2fa #endif } else { /* On errors != ERR_MEM, we don't try writing any more but return the error to the application thread. */ write_finished = 1; conn->current_msg->msg.w.len = 0; 802e2e2: 6a63 ldr r3, [r4, #36] ; 0x24 802e2e4: 2200 movs r2, #0 802e2e6: 60da str r2, [r3, #12] } } if (write_finished) { /* everything was written: set back connection state and back to application task */ conn->current_msg->err = err; 802e2e8: 6a63 ldr r3, [r4, #36] ; 0x24 802e2ea: 711e strb r6, [r3, #4] conn->current_msg = NULL; 802e2ec: 2300 movs r3, #0 802e2ee: 6263 str r3, [r4, #36] ; 0x24 conn->state = NETCONN_NONE; 802e2f0: 7063 strb r3, [r4, #1] #if LWIP_TCPIP_CORE_LOCKING if ((conn->flags & NETCONN_FLAG_WRITE_DELAYED) != 0) #endif { sys_sem_signal(&conn->op_completed); 802e2f2: f104 000c add.w r0, r4, #12 802e2f6: f009 fb37 bl 8037968 #if LWIP_TCPIP_CORE_LOCKING else return ERR_MEM; #endif return ERR_OK; } 802e2fa: 2000 movs r0, #0 802e2fc: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802e2fe : struct netconn *conn = (struct netconn *)arg; LWIP_UNUSED_ARG(pcb); LWIP_ASSERT("conn != NULL", (conn != NULL)); if (conn->state == NETCONN_WRITE) { 802e2fe: 7843 ldrb r3, [r0, #1] 802e300: 2b01 cmp r3, #1 * * @see tcp.h (struct tcp_pcb.poll) for parameters and return value */ static err_t poll_tcp(void *arg, struct tcp_pcb *pcb) { 802e302: b510 push {r4, lr} 802e304: 4604 mov r4, r0 struct netconn *conn = (struct netconn *)arg; LWIP_UNUSED_ARG(pcb); LWIP_ASSERT("conn != NULL", (conn != NULL)); if (conn->state == NETCONN_WRITE) { 802e306: d102 bne.n 802e30e do_writemore(conn); 802e308: f7ff ff7b bl 802e202 802e30c: e003 b.n 802e316 } else if (conn->state == NETCONN_CLOSE) { 802e30e: 2b04 cmp r3, #4 802e310: d101 bne.n 802e316 do_close_internal(conn); 802e312: f7ff fe89 bl 802e028 } /* @todo: implement connect timeout here? */ /* Did a nonblocking write fail before? Then check available write-space. */ if (conn->flags & NETCONN_FLAG_CHECK_WRITESPACE) { 802e316: 7f22 ldrb r2, [r4, #28] 802e318: f002 0310 and.w r3, r2, #16 802e31c: b2db uxtb r3, r3 802e31e: b1a3 cbz r3, 802e34a /* If the queued byte- or pbuf-count drops below the configured low-water limit, let select mark this pcb as writable again. */ if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) && 802e320: 6863 ldr r3, [r4, #4] 802e322: b193 cbz r3, 802e34a 802e324: f8b3 0066 ldrh.w r0, [r3, #102] ; 0x66 802e328: f243 3154 movw r1, #13140 ; 0x3354 802e32c: 4288 cmp r0, r1 802e32e: d90c bls.n 802e34a 802e330: f8b3 3068 ldrh.w r3, [r3, #104] ; 0x68 802e334: 2b23 cmp r3, #35 ; 0x23 802e336: d808 bhi.n 802e34a (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) { conn->flags &= ~NETCONN_FLAG_CHECK_WRITESPACE; API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 802e338: 6aa3 ldr r3, [r4, #40] ; 0x28 if (conn->flags & NETCONN_FLAG_CHECK_WRITESPACE) { /* If the queued byte- or pbuf-count drops below the configured low-water limit, let select mark this pcb as writable again. */ if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) && (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) { conn->flags &= ~NETCONN_FLAG_CHECK_WRITESPACE; 802e33a: f022 0210 bic.w r2, r2, #16 802e33e: 7722 strb r2, [r4, #28] API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 802e340: b11b cbz r3, 802e34a 802e342: 4620 mov r0, r4 802e344: 2102 movs r1, #2 802e346: 2200 movs r2, #0 802e348: 4798 blx r3 } } return ERR_OK; } 802e34a: 2000 movs r0, #0 802e34c: bd10 pop {r4, pc} 0802e34e : * @see udp.h (struct udp_pcb.recv) for parameters */ static void recv_udp(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) { 802e34e: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802e352: 4616 mov r6, r2 802e354: 461f mov r7, r3 802e356: f8bd 8018 ldrh.w r8, [sp, #24] #if LWIP_SO_RCVBUF SYS_ARCH_GET(conn->recv_avail, recv_avail); if ((conn == NULL) || !sys_mbox_valid(&conn->recvmbox) || ((recv_avail + (int)(p->tot_len)) > conn->recv_bufsize)) { #else /* LWIP_SO_RCVBUF */ if ((conn == NULL) || !sys_mbox_valid(&conn->recvmbox)) { 802e35a: 4605 mov r5, r0 802e35c: b108 cbz r0, 802e362 802e35e: 6903 ldr r3, [r0, #16] 802e360: b923 cbnz r3, 802e36c #endif /* LWIP_SO_RCVBUF */ pbuf_free(p); 802e362: 4630 mov r0, r6 SYS_ARCH_INC(conn->recv_avail, len); #endif /* LWIP_SO_RCVBUF */ /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); } } 802e364: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} if ((conn == NULL) || !sys_mbox_valid(&conn->recvmbox) || ((recv_avail + (int)(p->tot_len)) > conn->recv_bufsize)) { #else /* LWIP_SO_RCVBUF */ if ((conn == NULL) || !sys_mbox_valid(&conn->recvmbox)) { #endif /* LWIP_SO_RCVBUF */ pbuf_free(p); 802e368: f001 bcd0 b.w 802fd0c return; } buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); 802e36c: 2005 movs r0, #5 802e36e: f001 fbad bl 802facc if (buf == NULL) { 802e372: 4604 mov r4, r0 802e374: 2800 cmp r0, #0 802e376: d0f4 beq.n 802e362 pbuf_free(p); return; } else { buf->p = p; 802e378: 6006 str r6, [r0, #0] buf->ptr = p; 802e37a: 6046 str r6, [r0, #4] ip_addr_set(&buf->addr, addr); 802e37c: b107 cbz r7, 802e380 802e37e: 683f ldr r7, [r7, #0] } #endif /* LWIP_NETBUF_RECVINFO */ } len = p->tot_len; if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) { 802e380: 4621 mov r1, r4 pbuf_free(p); return; } else { buf->p = p; buf->ptr = p; ip_addr_set(&buf->addr, addr); 802e382: 60a7 str r7, [r4, #8] buf->port = port; 802e384: f8a4 800c strh.w r8, [r4, #12] } #endif /* LWIP_NETBUF_RECVINFO */ } len = p->tot_len; if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) { 802e388: f105 0010 add.w r0, r5, #16 buf->toport_chksum = udphdr->dest; } #endif /* LWIP_NETBUF_RECVINFO */ } len = p->tot_len; 802e38c: 8936 ldrh r6, [r6, #8] if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) { 802e38e: f009 fa23 bl 80377d8 802e392: 4601 mov r1, r0 802e394: b120 cbz r0, 802e3a0 netbuf_delete(buf); 802e396: 4620 mov r0, r4 SYS_ARCH_INC(conn->recv_avail, len); #endif /* LWIP_SO_RCVBUF */ /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); } } 802e398: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} #endif /* LWIP_NETBUF_RECVINFO */ } len = p->tot_len; if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) { netbuf_delete(buf); 802e39c: f000 baa1 b.w 802e8e2 } else { #if LWIP_SO_RCVBUF SYS_ARCH_INC(conn->recv_avail, len); #endif /* LWIP_SO_RCVBUF */ /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); 802e3a0: 6aab ldr r3, [r5, #40] ; 0x28 802e3a2: b113 cbz r3, 802e3aa 802e3a4: 4628 mov r0, r5 802e3a6: 4632 mov r2, r6 802e3a8: 4798 blx r3 802e3aa: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802e3ae: 0000 movs r0, r0 0802e3b0 : * @see raw.h (struct raw_pcb.recv) for parameters and return value */ static u8_t recv_raw(void *arg, struct raw_pcb *pcb, struct pbuf *p, ip_addr_t *addr) { 802e3b0: b5f8 push {r3, r4, r5, r6, r7, lr} 802e3b2: 460f mov r7, r1 802e3b4: 4614 mov r4, r2 struct netconn *conn; LWIP_UNUSED_ARG(addr); conn = (struct netconn *)arg; if ((conn != NULL) && sys_mbox_valid(&conn->recvmbox)) { 802e3b6: 4605 mov r5, r0 802e3b8: 2800 cmp r0, #0 802e3ba: d031 beq.n 802e420 802e3bc: 6903 ldr r3, [r0, #16] 802e3be: 2b00 cmp r3, #0 802e3c0: d02e beq.n 802e420 if ((recv_avail + (int)(p->tot_len)) > conn->recv_bufsize) { return 0; } #endif /* LWIP_SO_RCVBUF */ /* copy the whole packet into new pbufs */ q = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM); 802e3c2: 8911 ldrh r1, [r2, #8] 802e3c4: 2003 movs r0, #3 802e3c6: 2200 movs r2, #0 802e3c8: f001 fced bl 802fda6 if(q != NULL) { 802e3cc: 4606 mov r6, r0 802e3ce: b338 cbz r0, 802e420 if (pbuf_copy(q, p) != ERR_OK) { 802e3d0: 4621 mov r1, r4 802e3d2: f001 fd9f bl 802ff14 802e3d6: b1e0 cbz r0, 802e412 if (q != NULL) { u16_t len; buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); if (buf == NULL) { pbuf_free(q); 802e3d8: 4630 mov r0, r6 802e3da: f001 fc97 bl 802fd0c return 0; 802e3de: e01f b.n 802e420 } buf->p = q; buf->ptr = q; ip_addr_copy(buf->addr, *ip_current_src_addr()); 802e3e0: 4b10 ldr r3, [pc, #64] ; (802e424 ) if (buf == NULL) { pbuf_free(q); return 0; } buf->p = q; 802e3e2: 6026 str r6, [r4, #0] buf->ptr = q; ip_addr_copy(buf->addr, *ip_current_src_addr()); 802e3e4: 681b ldr r3, [r3, #0] pbuf_free(q); return 0; } buf->p = q; buf->ptr = q; 802e3e6: 6066 str r6, [r4, #4] ip_addr_copy(buf->addr, *ip_current_src_addr()); 802e3e8: 60a3 str r3, [r4, #8] buf->port = pcb->protocol; 802e3ea: 7c3b ldrb r3, [r7, #16] len = q->tot_len; 802e3ec: 8936 ldrh r6, [r6, #8] } buf->p = q; buf->ptr = q; ip_addr_copy(buf->addr, *ip_current_src_addr()); buf->port = pcb->protocol; 802e3ee: 81a3 strh r3, [r4, #12] len = q->tot_len; if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) { 802e3f0: 4621 mov r1, r4 802e3f2: f105 0010 add.w r0, r5, #16 802e3f6: f009 f9ef bl 80377d8 802e3fa: 4601 mov r1, r0 802e3fc: b118 cbz r0, 802e406 netbuf_delete(buf); 802e3fe: 4620 mov r0, r4 802e400: f000 fa6f bl 802e8e2 return 0; 802e404: e00c b.n 802e420 } else { #if LWIP_SO_RCVBUF SYS_ARCH_INC(conn->recv_avail, len); #endif /* LWIP_SO_RCVBUF */ /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); 802e406: 6aab ldr r3, [r5, #40] ; 0x28 802e408: b153 cbz r3, 802e420 802e40a: 4628 mov r0, r5 802e40c: 4632 mov r2, r6 802e40e: 4798 blx r3 802e410: e006 b.n 802e420 } } if (q != NULL) { u16_t len; buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); 802e412: 2005 movs r0, #5 802e414: f001 fb5a bl 802facc if (buf == NULL) { 802e418: 4604 mov r4, r0 802e41a: 2800 cmp r0, #0 802e41c: d1e0 bne.n 802e3e0 802e41e: e7db b.n 802e3d8 } } } return 0; /* do not eat the packet */ } 802e420: 2000 movs r0, #0 802e422: bdf8 pop {r3, r4, r5, r6, r7, pc} 802e424: 2000f6d8 .word 0x2000f6d8 0802e428 : * * @see tcp.h (struct tcp_pcb.recv) for parameters and return value */ static err_t recv_tcp(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) { 802e428: b5f8 push {r3, r4, r5, r6, r7, lr} 802e42a: 4614 mov r4, r2 802e42c: 461f mov r7, r3 LWIP_ASSERT("recv_tcp must have a pcb argument", pcb != NULL); LWIP_ASSERT("recv_tcp must have an argument", arg != NULL); conn = (struct netconn *)arg; LWIP_ASSERT("recv_tcp: recv for wrong pcb!", conn->pcb.tcp == pcb); if (conn == NULL) { 802e42e: 4605 mov r5, r0 802e430: b340 cbz r0, 802e484 return ERR_VAL; } if (!sys_mbox_valid(&conn->recvmbox)) { 802e432: 6906 ldr r6, [r0, #16] 802e434: b956 cbnz r6, 802e44c /* recvmbox already deleted */ if (p != NULL) { 802e436: b90a cbnz r2, 802e43c tcp_recved(pcb, p->tot_len); pbuf_free(p); } return ERR_OK; 802e438: 2000 movs r0, #0 802e43a: e026 b.n 802e48a return ERR_VAL; } if (!sys_mbox_valid(&conn->recvmbox)) { /* recvmbox already deleted */ if (p != NULL) { tcp_recved(pcb, p->tot_len); 802e43c: 4608 mov r0, r1 802e43e: 8911 ldrh r1, [r2, #8] 802e440: f001 ff78 bl 8030334 pbuf_free(p); 802e444: 4620 mov r0, r4 802e446: f001 fc61 bl 802fd0c 802e44a: e7f5 b.n 802e438 /* Unlike for UDP or RAW pcbs, don't check for available space using recv_avail since that could break the connection (data is already ACKed) */ /* don't overwrite fatal errors! */ NETCONN_SET_SAFE_ERR(conn, err); 802e44c: f009 fabc bl 80379c8 802e450: f995 3008 ldrsb.w r3, [r5, #8] 802e454: 3309 adds r3, #9 802e456: bfa8 it ge 802e458: 722f strbge r7, [r5, #8] 802e45a: f009 fabf bl 80379dc if (p != NULL) { 802e45e: b10c cbz r4, 802e464 len = p->tot_len; 802e460: 8926 ldrh r6, [r4, #8] 802e462: e000 b.n 802e466 } else { len = 0; 802e464: 4626 mov r6, r4 } if (sys_mbox_trypost(&conn->recvmbox, p) != ERR_OK) { 802e466: 4621 mov r1, r4 802e468: f105 0010 add.w r0, r5, #16 802e46c: f009 f9b4 bl 80377d8 802e470: 4604 mov r4, r0 802e472: b948 cbnz r0, 802e488 } else { #if LWIP_SO_RCVBUF SYS_ARCH_INC(conn->recv_avail, len); #endif /* LWIP_SO_RCVBUF */ /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); 802e474: 6aab ldr r3, [r5, #40] ; 0x28 802e476: 2b00 cmp r3, #0 802e478: d0de beq.n 802e438 802e47a: 4628 mov r0, r5 802e47c: 4621 mov r1, r4 802e47e: 4632 mov r2, r6 802e480: 4798 blx r3 802e482: e7d9 b.n 802e438 LWIP_ASSERT("recv_tcp must have an argument", arg != NULL); conn = (struct netconn *)arg; LWIP_ASSERT("recv_tcp: recv for wrong pcb!", conn->pcb.tcp == pcb); if (conn == NULL) { return ERR_VAL; 802e484: 20fa movs r0, #250 ; 0xfa 802e486: e000 b.n 802e48a len = 0; } if (sys_mbox_trypost(&conn->recvmbox, p) != ERR_OK) { /* don't deallocate p: it is presented to us later again from tcp_fasttmr! */ return ERR_MEM; 802e488: 20ff movs r0, #255 ; 0xff /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); } return ERR_OK; } 802e48a: b240 sxtb r0, r0 802e48c: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802e48e : * * @see tcp.h (struct tcp_pcb.sent) for parameters and return value */ static err_t sent_tcp(void *arg, struct tcp_pcb *pcb, u16_t len) { 802e48e: b538 push {r3, r4, r5, lr} struct netconn *conn = (struct netconn *)arg; LWIP_UNUSED_ARG(pcb); LWIP_ASSERT("conn != NULL", (conn != NULL)); if (conn->state == NETCONN_WRITE) { 802e490: 7843 ldrb r3, [r0, #1] 802e492: 2b01 cmp r3, #1 * * @see tcp.h (struct tcp_pcb.sent) for parameters and return value */ static err_t sent_tcp(void *arg, struct tcp_pcb *pcb, u16_t len) { 802e494: 4604 mov r4, r0 802e496: 4615 mov r5, r2 struct netconn *conn = (struct netconn *)arg; LWIP_UNUSED_ARG(pcb); LWIP_ASSERT("conn != NULL", (conn != NULL)); if (conn->state == NETCONN_WRITE) { 802e498: d102 bne.n 802e4a0 do_writemore(conn); 802e49a: f7ff feb2 bl 802e202 802e49e: e003 b.n 802e4a8 } else if (conn->state == NETCONN_CLOSE) { 802e4a0: 2b04 cmp r3, #4 802e4a2: d101 bne.n 802e4a8 do_close_internal(conn); 802e4a4: f7ff fdc0 bl 802e028 } if (conn) { /* If the queued byte- or pbuf-count drops below the configured low-water limit, let select mark this pcb as writable again. */ if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) && 802e4a8: 6863 ldr r3, [r4, #4] 802e4aa: b19b cbz r3, 802e4d4 802e4ac: f8b3 1066 ldrh.w r1, [r3, #102] ; 0x66 802e4b0: f243 3254 movw r2, #13140 ; 0x3354 802e4b4: 4291 cmp r1, r2 802e4b6: d90d bls.n 802e4d4 802e4b8: f8b3 3068 ldrh.w r3, [r3, #104] ; 0x68 802e4bc: 2b23 cmp r3, #35 ; 0x23 802e4be: d809 bhi.n 802e4d4 (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) { conn->flags &= ~NETCONN_FLAG_CHECK_WRITESPACE; 802e4c0: 7f23 ldrb r3, [r4, #28] 802e4c2: f023 0310 bic.w r3, r3, #16 802e4c6: 7723 strb r3, [r4, #28] API_EVENT(conn, NETCONN_EVT_SENDPLUS, len); 802e4c8: 6aa3 ldr r3, [r4, #40] ; 0x28 802e4ca: b11b cbz r3, 802e4d4 802e4cc: 4620 mov r0, r4 802e4ce: 2102 movs r1, #2 802e4d0: 462a mov r2, r5 802e4d2: 4798 blx r3 } } return ERR_OK; } 802e4d4: 2000 movs r0, #0 802e4d6: bd38 pop {r3, r4, r5, pc} 0802e4d8 : * * @param msg the api_msg_msg describing the connection type */ void do_newconn(struct api_msg_msg *msg) { 802e4d8: b538 push {r3, r4, r5, lr} msg->err = ERR_OK; 802e4da: 2300 movs r3, #0 if(msg->conn->pcb.tcp == NULL) { 802e4dc: 6805 ldr r5, [r0, #0] * @param msg the api_msg_msg describing the connection type */ void do_newconn(struct api_msg_msg *msg) { msg->err = ERR_OK; 802e4de: 7103 strb r3, [r0, #4] if(msg->conn->pcb.tcp == NULL) { 802e4e0: 686b ldr r3, [r5, #4] * * @param msg the api_msg_msg describing the connection type */ void do_newconn(struct api_msg_msg *msg) { 802e4e2: 4604 mov r4, r0 msg->err = ERR_OK; if(msg->conn->pcb.tcp == NULL) { 802e4e4: 2b00 cmp r3, #0 802e4e6: d134 bne.n 802e552 pcb_new(struct api_msg_msg *msg) { LWIP_ASSERT("pcb_new: pcb already allocated", msg->conn->pcb.tcp == NULL); /* Allocate a PCB for this connection */ switch(NETCONNTYPE_GROUP(msg->conn->type)) { 802e4e8: 782b ldrb r3, [r5, #0] 802e4ea: f003 03f0 and.w r3, r3, #240 ; 0xf0 802e4ee: 2b20 cmp r3, #32 802e4f0: d010 beq.n 802e514 802e4f2: 2b40 cmp r3, #64 ; 0x40 802e4f4: d002 beq.n 802e4fc 802e4f6: 2b10 cmp r3, #16 802e4f8: d129 bne.n 802e54e 802e4fa: e01d b.n 802e538 #if LWIP_RAW case NETCONN_RAW: msg->conn->pcb.raw = raw_new(msg->msg.n.proto); 802e4fc: 7a00 ldrb r0, [r0, #8] 802e4fe: f001 fe31 bl 8030164 802e502: 6068 str r0, [r5, #4] if(msg->conn->pcb.raw == NULL) { 802e504: 6822 ldr r2, [r4, #0] 802e506: 6850 ldr r0, [r2, #4] 802e508: b900 cbnz r0, 802e50c 802e50a: e01b b.n 802e544 msg->err = ERR_MEM; break; } raw_recv(msg->conn->pcb.raw, recv_raw, msg->conn); 802e50c: 4914 ldr r1, [pc, #80] ; (802e560 ) 802e50e: f001 fdc7 bl 80300a0 802e512: e01e b.n 802e552 break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: msg->conn->pcb.udp = udp_new(); 802e514: f004 fa84 bl 8032a20 802e518: 6068 str r0, [r5, #4] if(msg->conn->pcb.udp == NULL) { 802e51a: 6822 ldr r2, [r4, #0] 802e51c: 6853 ldr r3, [r2, #4] 802e51e: b903 cbnz r3, 802e522 802e520: e010 b.n 802e544 #if LWIP_UDPLITE if (msg->conn->type==NETCONN_UDPLITE) { udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_UDPLITE); } #endif /* LWIP_UDPLITE */ if (msg->conn->type==NETCONN_UDPNOCHKSUM) { 802e522: 7812 ldrb r2, [r2, #0] 802e524: 2a22 cmp r2, #34 ; 0x22 802e526: d101 bne.n 802e52c udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_NOCHKSUM); 802e528: 2201 movs r2, #1 802e52a: 741a strb r2, [r3, #16] } udp_recv(msg->conn->pcb.udp, recv_udp, msg->conn); 802e52c: 6822 ldr r2, [r4, #0] 802e52e: 490d ldr r1, [pc, #52] ; (802e564 ) 802e530: 6850 ldr r0, [r2, #4] 802e532: f004 fa55 bl 80329e0 802e536: e00c b.n 802e552 break; #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: msg->conn->pcb.tcp = tcp_new(); 802e538: f002 fb20 bl 8030b7c 802e53c: 6068 str r0, [r5, #4] if(msg->conn->pcb.tcp == NULL) { 802e53e: 6820 ldr r0, [r4, #0] 802e540: 6843 ldr r3, [r0, #4] 802e542: b90b cbnz r3, 802e548 msg->err = ERR_MEM; 802e544: 23ff movs r3, #255 ; 0xff 802e546: e003 b.n 802e550 break; } setup_tcp(msg->conn); 802e548: f7ff fd4c bl 802dfe4 802e54c: e001 b.n 802e552 break; #endif /* LWIP_TCP */ default: /* Unsupported netconn type, e.g. protocol disabled */ msg->err = ERR_VAL; 802e54e: 23fa movs r3, #250 ; 0xfa 802e550: 7123 strb r3, [r4, #4] } /* Else? This "new" connection already has a PCB allocated. */ /* Is this an error condition? Should it be deleted? */ /* We currently just are happy and return. */ TCPIP_APIMSG_ACK(msg); 802e552: 6820 ldr r0, [r4, #0] 802e554: 300c adds r0, #12 } 802e556: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} } /* Else? This "new" connection already has a PCB allocated. */ /* Is this an error condition? Should it be deleted? */ /* We currently just are happy and return. */ TCPIP_APIMSG_ACK(msg); 802e55a: f009 ba05 b.w 8037968 802e55e: bf00 nop 802e560: 0802e3b1 .word 0x0802e3b1 802e564: 0802e34f .word 0x0802e34f 0802e568 : * @return a newly allocated struct netconn or * NULL on memory error */ struct netconn* netconn_alloc(enum netconn_type t, netconn_callback callback) { 802e568: b5f8 push {r3, r4, r5, r6, r7, lr} 802e56a: 4605 mov r5, r0 struct netconn *conn; int size; conn = (struct netconn *)memp_malloc(MEMP_NETCONN); 802e56c: 2006 movs r0, #6 * @return a newly allocated struct netconn or * NULL on memory error */ struct netconn* netconn_alloc(enum netconn_type t, netconn_callback callback) { 802e56e: 460f mov r7, r1 struct netconn *conn; int size; conn = (struct netconn *)memp_malloc(MEMP_NETCONN); 802e570: f001 faac bl 802facc if (conn == NULL) { 802e574: 4604 mov r4, r0 802e576: b378 cbz r0, 802e5d8 return NULL; } conn->last_err = ERR_OK; 802e578: 2300 movs r3, #0 802e57a: 7203 strb r3, [r0, #8] conn->type = t; 802e57c: 7005 strb r5, [r0, #0] conn->pcb.tcp = NULL; 802e57e: 6043 str r3, [r0, #4] #if (DEFAULT_RAW_RECVMBOX_SIZE == DEFAULT_UDP_RECVMBOX_SIZE) && \ (DEFAULT_RAW_RECVMBOX_SIZE == DEFAULT_TCP_RECVMBOX_SIZE) size = DEFAULT_RAW_RECVMBOX_SIZE; #else switch(NETCONNTYPE_GROUP(t)) { 802e580: f005 00f0 and.w r0, r5, #240 ; 0xf0 802e584: 2820 cmp r0, #32 802e586: d008 beq.n 802e59a 802e588: 2840 cmp r0, #64 ; 0x40 802e58a: d002 beq.n 802e592 802e58c: 2810 cmp r0, #16 802e58e: d11e bne.n 802e5ce 802e590: e001 b.n 802e596 #if LWIP_RAW case NETCONN_RAW: size = DEFAULT_RAW_RECVMBOX_SIZE; 802e592: 250a movs r5, #10 802e594: e002 b.n 802e59c size = DEFAULT_UDP_RECVMBOX_SIZE; break; #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: size = DEFAULT_TCP_RECVMBOX_SIZE; 802e596: 2546 movs r5, #70 ; 0x46 break; 802e598: e000 b.n 802e59c size = DEFAULT_RAW_RECVMBOX_SIZE; break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: size = DEFAULT_UDP_RECVMBOX_SIZE; 802e59a: 2514 movs r5, #20 LWIP_ASSERT("netconn_alloc: undefined netconn_type", 0); goto free_and_return; } #endif if (sys_sem_new(&conn->op_completed, 0) != ERR_OK) { 802e59c: f104 060c add.w r6, r4, #12 802e5a0: 4630 mov r0, r6 802e5a2: 2100 movs r1, #0 802e5a4: f009 f980 bl 80378a8 802e5a8: b988 cbnz r0, 802e5ce goto free_and_return; } if (sys_mbox_new(&conn->recvmbox, size) != ERR_OK) { 802e5aa: f104 0010 add.w r0, r4, #16 802e5ae: 4629 mov r1, r5 802e5b0: f009 f8e6 bl 8037780 802e5b4: b118 cbz r0, 802e5be sys_sem_free(&conn->op_completed); 802e5b6: 4630 mov r0, r6 802e5b8: f009 f9e8 bl 803798c goto free_and_return; 802e5bc: e007 b.n 802e5ce } #if LWIP_TCP sys_mbox_set_invalid(&conn->acceptmbox); 802e5be: 6160 str r0, [r4, #20] #endif conn->state = NETCONN_NONE; 802e5c0: 7060 strb r0, [r4, #1] #if LWIP_SOCKET /* initialize socket to -1 since 0 is a valid socket */ conn->socket = -1; #endif /* LWIP_SOCKET */ conn->callback = callback; 802e5c2: 62a7 str r7, [r4, #40] ; 0x28 #if LWIP_TCP conn->current_msg = NULL; 802e5c4: 6260 str r0, [r4, #36] ; 0x24 conn->write_offset = 0; 802e5c6: 6220 str r0, [r4, #32] #endif /* LWIP_TCP */ #if LWIP_SO_SNDTIMEO conn->send_timeout = 0; #endif /* LWIP_SO_SNDTIMEO */ #if LWIP_SO_RCVTIMEO conn->recv_timeout = 0; 802e5c8: 61a0 str r0, [r4, #24] #endif /* LWIP_SO_RCVTIMEO */ #if LWIP_SO_RCVBUF conn->recv_bufsize = RECV_BUFSIZE_DEFAULT; conn->recv_avail = 0; #endif /* LWIP_SO_RCVBUF */ conn->flags = 0; 802e5ca: 7720 strb r0, [r4, #28] return conn; 802e5cc: e004 b.n 802e5d8 free_and_return: memp_free(MEMP_NETCONN, conn); 802e5ce: 4621 mov r1, r4 802e5d0: 2006 movs r0, #6 802e5d2: f001 fa91 bl 802faf8 return NULL; 802e5d6: 2400 movs r4, #0 } 802e5d8: 4620 mov r0, r4 802e5da: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802e5dc : * * @param conn the netconn to free */ void netconn_free(struct netconn *conn) { 802e5dc: b510 push {r4, lr} 802e5de: 4604 mov r4, r0 #if LWIP_TCP LWIP_ASSERT("acceptmbox must be deallocated before calling this function", !sys_mbox_valid(&conn->acceptmbox)); #endif /* LWIP_TCP */ sys_sem_free(&conn->op_completed); 802e5e0: 300c adds r0, #12 802e5e2: f009 f9d3 bl 803798c sys_sem_set_invalid(&conn->op_completed); 802e5e6: 2300 movs r3, #0 memp_free(MEMP_NETCONN, conn); 802e5e8: 2006 movs r0, #6 802e5ea: 4621 mov r1, r4 LWIP_ASSERT("acceptmbox must be deallocated before calling this function", !sys_mbox_valid(&conn->acceptmbox)); #endif /* LWIP_TCP */ sys_sem_free(&conn->op_completed); sys_sem_set_invalid(&conn->op_completed); 802e5ec: 60e3 str r3, [r4, #12] memp_free(MEMP_NETCONN, conn); } 802e5ee: e8bd 4010 ldmia.w sp!, {r4, lr} #endif /* LWIP_TCP */ sys_sem_free(&conn->op_completed); sys_sem_set_invalid(&conn->op_completed); memp_free(MEMP_NETCONN, conn); 802e5f2: f001 ba81 b.w 802faf8 0802e5f6 : #endif /* LWIP_TCP */ /* This runs in tcpip_thread, so we don't need to lock against rx packets */ /* Delete and drain the recvmbox. */ if (sys_mbox_valid(&conn->recvmbox)) { 802e5f6: 6903 ldr r3, [r0, #16] * @bytes_drained bytes drained from recvmbox * @accepts_drained pending connections drained from acceptmbox */ static void netconn_drain(struct netconn *conn) { 802e5f8: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} 802e5fa: 4604 mov r4, r0 #endif /* LWIP_TCP */ /* This runs in tcpip_thread, so we don't need to lock against rx packets */ /* Delete and drain the recvmbox. */ if (sys_mbox_valid(&conn->recvmbox)) { 802e5fc: b993 cbnz r3, 802e624 802e5fe: e01e b.n 802e63e while (sys_mbox_tryfetch(&conn->recvmbox, &mem) != SYS_MBOX_EMPTY) { #if LWIP_TCP if (conn->type == NETCONN_TCP) { 802e600: 7823 ldrb r3, [r4, #0] 802e602: 2b10 cmp r3, #16 802e604: d10a bne.n 802e61c if(mem != NULL) { 802e606: 9d01 ldr r5, [sp, #4] 802e608: b175 cbz r5, 802e628 p = (struct pbuf*)mem; /* pcb might be set to NULL already by err_tcp() */ if (conn->pcb.tcp != NULL) { 802e60a: 6860 ldr r0, [r4, #4] 802e60c: b110 cbz r0, 802e614 tcp_recved(conn->pcb.tcp, p->tot_len); 802e60e: 8929 ldrh r1, [r5, #8] 802e610: f001 fe90 bl 8030334 } pbuf_free(p); 802e614: 4628 mov r0, r5 802e616: f001 fb79 bl 802fd0c 802e61a: e005 b.n 802e628 } } else #endif /* LWIP_TCP */ { netbuf_delete((struct netbuf *)mem); 802e61c: 9801 ldr r0, [sp, #4] 802e61e: f000 f960 bl 802e8e2 802e622: e001 b.n 802e628 /* This runs in tcpip_thread, so we don't need to lock against rx packets */ /* Delete and drain the recvmbox. */ if (sys_mbox_valid(&conn->recvmbox)) { while (sys_mbox_tryfetch(&conn->recvmbox, &mem) != SYS_MBOX_EMPTY) { 802e624: f100 0610 add.w r6, r0, #16 802e628: 4630 mov r0, r6 802e62a: a901 add r1, sp, #4 802e62c: f009 f924 bl 8037878 802e630: 3001 adds r0, #1 802e632: d1e5 bne.n 802e600 #endif /* LWIP_TCP */ { netbuf_delete((struct netbuf *)mem); } } sys_mbox_free(&conn->recvmbox); 802e634: 4630 mov r0, r6 802e636: f009 f8b1 bl 803779c sys_mbox_set_invalid(&conn->recvmbox); 802e63a: 2300 movs r3, #0 802e63c: 6123 str r3, [r4, #16] } /* Delete and drain the acceptmbox. */ #if LWIP_TCP if (sys_mbox_valid(&conn->acceptmbox)) { 802e63e: 6963 ldr r3, [r4, #20] 802e640: b96b cbnz r3, 802e65e 802e642: e01a b.n 802e67a while (sys_mbox_tryfetch(&conn->acceptmbox, &mem) != SYS_MBOX_EMPTY) { struct netconn *newconn = (struct netconn *)mem; 802e644: 9d01 ldr r5, [sp, #4] /* pcb might be set to NULL already by err_tcp() */ if (conn->pcb.tcp != NULL) { tcp_accepted(conn->pcb.tcp); } /* drain recvmbox */ netconn_drain(newconn); 802e646: 4628 mov r0, r5 802e648: f7ff ffd5 bl 802e5f6 if (newconn->pcb.tcp != NULL) { 802e64c: 6868 ldr r0, [r5, #4] 802e64e: b110 cbz r0, 802e656 tcp_abort(newconn->pcb.tcp); 802e650: f002 f88e bl 8030770 newconn->pcb.tcp = NULL; 802e654: 606f str r7, [r5, #4] } netconn_free(newconn); 802e656: 4628 mov r0, r5 802e658: f7ff ffc0 bl 802e5dc 802e65c: e002 b.n 802e664 } /* Delete and drain the acceptmbox. */ #if LWIP_TCP if (sys_mbox_valid(&conn->acceptmbox)) { while (sys_mbox_tryfetch(&conn->acceptmbox, &mem) != SYS_MBOX_EMPTY) { 802e65e: f104 0614 add.w r6, r4, #20 } /* drain recvmbox */ netconn_drain(newconn); if (newconn->pcb.tcp != NULL) { tcp_abort(newconn->pcb.tcp); newconn->pcb.tcp = NULL; 802e662: 2700 movs r7, #0 } /* Delete and drain the acceptmbox. */ #if LWIP_TCP if (sys_mbox_valid(&conn->acceptmbox)) { while (sys_mbox_tryfetch(&conn->acceptmbox, &mem) != SYS_MBOX_EMPTY) { 802e664: 4630 mov r0, r6 802e666: a901 add r1, sp, #4 802e668: f009 f906 bl 8037878 802e66c: 3001 adds r0, #1 802e66e: d1e9 bne.n 802e644 tcp_abort(newconn->pcb.tcp); newconn->pcb.tcp = NULL; } netconn_free(newconn); } sys_mbox_free(&conn->acceptmbox); 802e670: 4630 mov r0, r6 802e672: f009 f893 bl 803779c sys_mbox_set_invalid(&conn->acceptmbox); 802e676: 2300 movs r3, #0 802e678: 6163 str r3, [r4, #20] } #endif /* LWIP_TCP */ } 802e67a: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 0802e67c : * * @param msg the api_msg_msg pointing to the connection */ void do_delconn(struct api_msg_msg *msg) { 802e67c: b510 push {r4, lr} 802e67e: 4604 mov r4, r0 /* @todo TCP: abort running write/connect? */ if ((msg->conn->state != NETCONN_NONE) && 802e680: 6800 ldr r0, [r0, #0] 802e682: 7843 ldrb r3, [r0, #1] 802e684: 2b03 cmp r3, #3 802e686: d805 bhi.n 802e694 802e688: f990 3001 ldrsb.w r3, [r0, #1] 802e68c: f04f 4230 mov.w r2, #2952790016 ; 0xb0000000 802e690: 409a lsls r2, r3 802e692: d402 bmi.n 802e69a (msg->conn->state != NETCONN_LISTEN) && (msg->conn->state != NETCONN_CONNECT)) { /* this only happens for TCP netconns */ LWIP_ASSERT("msg->conn->type == NETCONN_TCP", msg->conn->type == NETCONN_TCP); msg->err = ERR_INPROGRESS; 802e694: 23fb movs r3, #251 ; 0xfb 802e696: 7123 strb r3, [r4, #4] 802e698: e030 b.n 802e6fc } else { LWIP_ASSERT("blocking connect in progress", (msg->conn->state != NETCONN_CONNECT) || IN_NONBLOCKING_CONNECT(msg->conn)); /* Drain and delete mboxes */ netconn_drain(msg->conn); 802e69a: f7ff ffac bl 802e5f6 if (msg->conn->pcb.tcp != NULL) { 802e69e: 6823 ldr r3, [r4, #0] 802e6a0: 6858 ldr r0, [r3, #4] 802e6a2: b1f8 cbz r0, 802e6e4 switch (NETCONNTYPE_GROUP(msg->conn->type)) { 802e6a4: 781a ldrb r2, [r3, #0] 802e6a6: f002 02f0 and.w r2, r2, #240 ; 0xf0 802e6aa: 2a20 cmp r2, #32 802e6ac: d007 beq.n 802e6be 802e6ae: 2a40 cmp r2, #64 ; 0x40 802e6b0: d002 beq.n 802e6b8 802e6b2: 2a10 cmp r2, #16 802e6b4: d113 bne.n 802e6de 802e6b6: e008 b.n 802e6ca #if LWIP_RAW case NETCONN_RAW: raw_remove(msg->conn->pcb.raw); 802e6b8: f001 fd3e bl 8030138 break; 802e6bc: e00f b.n 802e6de #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: msg->conn->pcb.udp->recv_arg = NULL; 802e6be: 2200 movs r2, #0 802e6c0: 61c2 str r2, [r0, #28] udp_remove(msg->conn->pcb.udp); 802e6c2: 6858 ldr r0, [r3, #4] 802e6c4: f004 f990 bl 80329e8 break; 802e6c8: e009 b.n 802e6de #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL && msg->conn->write_offset == 0); msg->conn->state = NETCONN_CLOSE; 802e6ca: 2204 movs r2, #4 802e6cc: 705a strb r2, [r3, #1] msg->msg.sd.shut = NETCONN_SHUT_RDWR; msg->conn->current_msg = msg; do_close_internal(msg->conn); 802e6ce: 4618 mov r0, r3 #if LWIP_TCP case NETCONN_TCP: LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL && msg->conn->write_offset == 0); msg->conn->state = NETCONN_CLOSE; msg->msg.sd.shut = NETCONN_SHUT_RDWR; 802e6d0: 2203 movs r2, #3 802e6d2: 7222 strb r2, [r4, #8] msg->conn->current_msg = msg; 802e6d4: 625c str r4, [r3, #36] ; 0x24 API_EVENT(msg->conn, NETCONN_EVT_SENDPLUS, 0); } if (sys_sem_valid(&msg->conn->op_completed)) { sys_sem_signal(&msg->conn->op_completed); } } 802e6d6: e8bd 4010 ldmia.w sp!, {r4, lr} LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL && msg->conn->write_offset == 0); msg->conn->state = NETCONN_CLOSE; msg->msg.sd.shut = NETCONN_SHUT_RDWR; msg->conn->current_msg = msg; do_close_internal(msg->conn); 802e6da: f7ff bca5 b.w 802e028 return; #endif /* LWIP_TCP */ default: break; } msg->conn->pcb.tcp = NULL; 802e6de: 6823 ldr r3, [r4, #0] 802e6e0: 2200 movs r2, #0 802e6e2: 605a str r2, [r3, #4] } /* tcp netconns don't come here! */ /* @todo: this lets select make the socket readable and writable, which is wrong! errfd instead? */ API_EVENT(msg->conn, NETCONN_EVT_RCVPLUS, 0); 802e6e4: 6820 ldr r0, [r4, #0] 802e6e6: 6a83 ldr r3, [r0, #40] ; 0x28 802e6e8: b113 cbz r3, 802e6f0 802e6ea: 2100 movs r1, #0 802e6ec: 460a mov r2, r1 802e6ee: 4798 blx r3 API_EVENT(msg->conn, NETCONN_EVT_SENDPLUS, 0); 802e6f0: 6820 ldr r0, [r4, #0] 802e6f2: 6a83 ldr r3, [r0, #40] ; 0x28 802e6f4: b113 cbz r3, 802e6fc 802e6f6: 2102 movs r1, #2 802e6f8: 2200 movs r2, #0 802e6fa: 4798 blx r3 } if (sys_sem_valid(&msg->conn->op_completed)) { 802e6fc: 6820 ldr r0, [r4, #0] 802e6fe: 68c3 ldr r3, [r0, #12] 802e700: b123 cbz r3, 802e70c sys_sem_signal(&msg->conn->op_completed); 802e702: 300c adds r0, #12 } } 802e704: e8bd 4010 ldmia.w sp!, {r4, lr} which is wrong! errfd instead? */ API_EVENT(msg->conn, NETCONN_EVT_RCVPLUS, 0); API_EVENT(msg->conn, NETCONN_EVT_SENDPLUS, 0); } if (sys_sem_valid(&msg->conn->op_completed)) { sys_sem_signal(&msg->conn->op_completed); 802e708: f009 b92e b.w 8037968 802e70c: bd10 pop {r4, pc} 0802e70e : * @param msg the api_msg_msg pointing to the connection and containing * the IP address and port to bind to */ void do_bind(struct api_msg_msg *msg) { 802e70e: b510 push {r4, lr} if (ERR_IS_FATAL(msg->conn->last_err)) { 802e710: 6803 ldr r3, [r0, #0] 802e712: 7a1a ldrb r2, [r3, #8] 802e714: b251 sxtb r1, r2 802e716: 3109 adds r1, #9 * @param msg the api_msg_msg pointing to the connection and containing * the IP address and port to bind to */ void do_bind(struct api_msg_msg *msg) { 802e718: 4604 mov r4, r0 if (ERR_IS_FATAL(msg->conn->last_err)) { 802e71a: da01 bge.n 802e720 msg->err = msg->conn->last_err; 802e71c: 7102 strb r2, [r0, #4] 802e71e: e01b b.n 802e758 } else { msg->err = ERR_VAL; 802e720: 22fa movs r2, #250 ; 0xfa 802e722: 7102 strb r2, [r0, #4] if (msg->conn->pcb.tcp != NULL) { 802e724: 6858 ldr r0, [r3, #4] 802e726: b1b8 cbz r0, 802e758 switch (NETCONNTYPE_GROUP(msg->conn->type)) { 802e728: 781b ldrb r3, [r3, #0] 802e72a: f003 03f0 and.w r3, r3, #240 ; 0xf0 802e72e: 2b20 cmp r3, #32 802e730: d008 beq.n 802e744 802e732: 2b40 cmp r3, #64 ; 0x40 802e734: d002 beq.n 802e73c 802e736: 2b10 cmp r3, #16 802e738: d10e bne.n 802e758 802e73a: e008 b.n 802e74e #if LWIP_RAW case NETCONN_RAW: msg->err = raw_bind(msg->conn->pcb.raw, msg->msg.bc.ipaddr); 802e73c: 68a1 ldr r1, [r4, #8] 802e73e: f001 fca5 bl 803008c 802e742: e008 b.n 802e756 break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: msg->err = udp_bind(msg->conn->pcb.udp, msg->msg.bc.ipaddr, msg->msg.bc.port); 802e744: 68a1 ldr r1, [r4, #8] 802e746: 89a2 ldrh r2, [r4, #12] 802e748: f004 f852 bl 80327f0 802e74c: e003 b.n 802e756 break; #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: msg->err = tcp_bind(msg->conn->pcb.tcp, msg->msg.bc.ipaddr, msg->msg.bc.port); 802e74e: 68a1 ldr r1, [r4, #8] 802e750: 89a2 ldrh r2, [r4, #12] 802e752: f001 fd4f bl 80301f4 802e756: 7120 strb r0, [r4, #4] default: break; } } } TCPIP_APIMSG_ACK(msg); 802e758: 6820 ldr r0, [r4, #0] 802e75a: 300c adds r0, #12 } 802e75c: e8bd 4010 ldmia.w sp!, {r4, lr} default: break; } } } TCPIP_APIMSG_ACK(msg); 802e760: f009 b902 b.w 8037968 0802e764 : * @param msg the api_msg_msg pointing to the connection and containing * the IP address and port to connect to */ void do_connect(struct api_msg_msg *msg) { 802e764: b510 push {r4, lr} if (msg->conn->pcb.tcp == NULL) { 802e766: 6803 ldr r3, [r0, #0] * @param msg the api_msg_msg pointing to the connection and containing * the IP address and port to connect to */ void do_connect(struct api_msg_msg *msg) { 802e768: 4604 mov r4, r0 if (msg->conn->pcb.tcp == NULL) { 802e76a: 6858 ldr r0, [r3, #4] 802e76c: b908 cbnz r0, 802e772 /* This may happen when calling netconn_connect() a second time */ msg->err = ERR_CLSD; 802e76e: 23f4 movs r3, #244 ; 0xf4 802e770: e037 b.n 802e7e2 } else { switch (NETCONNTYPE_GROUP(msg->conn->type)) { 802e772: 781a ldrb r2, [r3, #0] 802e774: f002 02f0 and.w r2, r2, #240 ; 0xf0 802e778: 2a20 cmp r2, #32 802e77a: d008 beq.n 802e78e 802e77c: 2a40 cmp r2, #64 ; 0x40 802e77e: d002 beq.n 802e786 802e780: 2a10 cmp r2, #16 802e782: d12d bne.n 802e7e0 802e784: e009 b.n 802e79a #if LWIP_RAW case NETCONN_RAW: msg->err = raw_connect(msg->conn->pcb.raw, msg->msg.bc.ipaddr); 802e786: 68a1 ldr r1, [r4, #8] 802e788: f001 fc85 bl 8030096 802e78c: e003 b.n 802e796 break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: msg->err = udp_connect(msg->conn->pcb.udp, msg->msg.bc.ipaddr, msg->msg.bc.port); 802e78e: 68a1 ldr r1, [r4, #8] 802e790: 89a2 ldrh r2, [r4, #12] 802e792: f004 f8f7 bl 8032984 802e796: 7120 strb r0, [r4, #4] break; 802e798: e024 b.n 802e7e4 #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: /* Prevent connect while doing any other action. */ if (msg->conn->state != NETCONN_NONE) { 802e79a: 785a ldrb r2, [r3, #1] 802e79c: b10a cbz r2, 802e7a2 msg->err = ERR_ISCONN; 802e79e: 23f7 movs r3, #247 ; 0xf7 802e7a0: e01f b.n 802e7e2 } else { setup_tcp(msg->conn); 802e7a2: 4618 mov r0, r3 802e7a4: f7ff fc1e bl 802dfe4 msg->err = tcp_connect(msg->conn->pcb.tcp, msg->msg.bc.ipaddr, 802e7a8: 6823 ldr r3, [r4, #0] 802e7aa: 68a1 ldr r1, [r4, #8] 802e7ac: 6858 ldr r0, [r3, #4] 802e7ae: 89a2 ldrh r2, [r4, #12] 802e7b0: 4b0f ldr r3, [pc, #60] ; (802e7f0 ) 802e7b2: f002 f9f5 bl 8030ba0 802e7b6: 7120 strb r0, [r4, #4] msg->msg.bc.port, do_connected); if (msg->err == ERR_OK) { 802e7b8: b9a0 cbnz r0, 802e7e4 u8_t non_blocking = netconn_is_nonblocking(msg->conn); 802e7ba: 6823 ldr r3, [r4, #0] 802e7bc: 7f1a ldrb r2, [r3, #28] msg->conn->state = NETCONN_CONNECT; 802e7be: 2103 movs r1, #3 802e7c0: 7059 strb r1, [r3, #1] SET_NONBLOCKING_CONNECT(msg->conn, non_blocking); 802e7c2: f002 0102 and.w r1, r2, #2 802e7c6: b2c9 uxtb r1, r1 802e7c8: b121 cbz r1, 802e7d4 802e7ca: f042 0204 orr.w r2, r2, #4 802e7ce: 771a strb r2, [r3, #28] if (non_blocking) { msg->err = ERR_INPROGRESS; 802e7d0: 23fb movs r3, #251 ; 0xfb 802e7d2: e006 b.n 802e7e2 msg->err = tcp_connect(msg->conn->pcb.tcp, msg->msg.bc.ipaddr, msg->msg.bc.port, do_connected); if (msg->err == ERR_OK) { u8_t non_blocking = netconn_is_nonblocking(msg->conn); msg->conn->state = NETCONN_CONNECT; SET_NONBLOCKING_CONNECT(msg->conn, non_blocking); 802e7d4: f022 0204 bic.w r2, r2, #4 802e7d8: 771a strb r2, [r3, #28] if (non_blocking) { msg->err = ERR_INPROGRESS; } else { msg->conn->current_msg = msg; 802e7da: 6823 ldr r3, [r4, #0] 802e7dc: 625c str r4, [r3, #36] ; 0x24 /* sys_sem_signal() is called from do_connected (or err_tcp()), * when the connection is established! */ return; 802e7de: bd10 pop {r4, pc} } } break; #endif /* LWIP_TCP */ default: LWIP_ERROR("Invalid netconn type", 0, do{ msg->err = ERR_VAL; }while(0)); 802e7e0: 23fa movs r3, #250 ; 0xfa 802e7e2: 7123 strb r3, [r4, #4] break; } } sys_sem_signal(&msg->conn->op_completed); 802e7e4: 6820 ldr r0, [r4, #0] 802e7e6: 300c adds r0, #12 } 802e7e8: e8bd 4010 ldmia.w sp!, {r4, lr} default: LWIP_ERROR("Invalid netconn type", 0, do{ msg->err = ERR_VAL; }while(0)); break; } } sys_sem_signal(&msg->conn->op_completed); 802e7ec: f009 b8bc b.w 8037968 802e7f0: 0802e111 .word 0x0802e111 0802e7f4 : */ void do_disconnect(struct api_msg_msg *msg) { #if LWIP_UDP if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_UDP) { 802e7f4: 6803 ldr r3, [r0, #0] 802e7f6: 781a ldrb r2, [r3, #0] 802e7f8: f002 02f0 and.w r2, r2, #240 ; 0xf0 802e7fc: 2a20 cmp r2, #32 * * @param msg the api_msg_msg pointing to the connection to disconnect */ void do_disconnect(struct api_msg_msg *msg) { 802e7fe: b510 push {r4, lr} 802e800: 4604 mov r4, r0 #if LWIP_UDP if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_UDP) { 802e802: d104 bne.n 802e80e udp_disconnect(msg->conn->pcb.udp); 802e804: 6858 ldr r0, [r3, #4] 802e806: f004 f8e3 bl 80329d0 msg->err = ERR_OK; 802e80a: 2300 movs r3, #0 802e80c: e000 b.n 802e810 } else #endif /* LWIP_UDP */ { msg->err = ERR_VAL; 802e80e: 23fa movs r3, #250 ; 0xfa } TCPIP_APIMSG_ACK(msg); 802e810: 6820 ldr r0, [r4, #0] udp_disconnect(msg->conn->pcb.udp); msg->err = ERR_OK; } else #endif /* LWIP_UDP */ { msg->err = ERR_VAL; 802e812: 7123 strb r3, [r4, #4] } TCPIP_APIMSG_ACK(msg); 802e814: 300c adds r0, #12 } 802e816: e8bd 4010 ldmia.w sp!, {r4, lr} } else #endif /* LWIP_UDP */ { msg->err = ERR_VAL; } TCPIP_APIMSG_ACK(msg); 802e81a: f009 b8a5 b.w 8037968 0802e81e : * * @param msg the api_msg_msg pointing to the connection */ void do_send(struct api_msg_msg *msg) { 802e81e: b510 push {r4, lr} if (ERR_IS_FATAL(msg->conn->last_err)) { 802e820: 6803 ldr r3, [r0, #0] 802e822: 7a1a ldrb r2, [r3, #8] 802e824: b251 sxtb r1, r2 802e826: 3109 adds r1, #9 * * @param msg the api_msg_msg pointing to the connection */ void do_send(struct api_msg_msg *msg) { 802e828: 4604 mov r4, r0 if (ERR_IS_FATAL(msg->conn->last_err)) { 802e82a: da01 bge.n 802e830 msg->err = msg->conn->last_err; 802e82c: 7102 strb r2, [r0, #4] 802e82e: e027 b.n 802e880 } else { msg->err = ERR_CONN; 802e830: 22f3 movs r2, #243 ; 0xf3 802e832: 7102 strb r2, [r0, #4] if (msg->conn->pcb.tcp != NULL) { 802e834: 6858 ldr r0, [r3, #4] 802e836: b318 cbz r0, 802e880 switch (NETCONNTYPE_GROUP(msg->conn->type)) { 802e838: 781b ldrb r3, [r3, #0] 802e83a: f003 03f0 and.w r3, r3, #240 ; 0xf0 802e83e: 2b20 cmp r3, #32 802e840: d00f beq.n 802e862 802e842: 2b40 cmp r3, #64 ; 0x40 802e844: d11c bne.n 802e880 #if LWIP_RAW case NETCONN_RAW: if (ip_addr_isany(&msg->msg.b->addr)) { 802e846: 68a3 ldr r3, [r4, #8] 802e848: f113 0208 adds.w r2, r3, #8 802e84c: d001 beq.n 802e852 802e84e: 6899 ldr r1, [r3, #8] 802e850: b919 cbnz r1, 802e85a msg->err = raw_send(msg->conn->pcb.raw, msg->msg.b->p); 802e852: 6819 ldr r1, [r3, #0] 802e854: f001 fc6c bl 8030130 802e858: e011 b.n 802e87e } else { msg->err = raw_sendto(msg->conn->pcb.raw, msg->msg.b->p, &msg->msg.b->addr); 802e85a: 6819 ldr r1, [r3, #0] 802e85c: f001 fc23 bl 80300a6 802e860: e00d b.n 802e87e msg->err = udp_sendto_chksum(msg->conn->pcb.udp, msg->msg.b->p, &msg->msg.b->addr, msg->msg.b->port, msg->msg.b->flags & NETBUF_FLAG_CHKSUM, msg->msg.b->toport_chksum); } #else /* LWIP_CHECKSUM_ON_COPY */ if (ip_addr_isany(&msg->msg.b->addr)) { 802e862: 68a3 ldr r3, [r4, #8] 802e864: f113 0208 adds.w r2, r3, #8 802e868: d001 beq.n 802e86e 802e86a: 6899 ldr r1, [r3, #8] 802e86c: b919 cbnz r1, 802e876 msg->err = udp_send(msg->conn->pcb.udp, msg->msg.b->p); 802e86e: 6819 ldr r1, [r3, #0] 802e870: f004 f883 bl 803297a 802e874: e003 b.n 802e87e } else { msg->err = udp_sendto(msg->conn->pcb.udp, msg->msg.b->p, &msg->msg.b->addr, msg->msg.b->port); 802e876: 6819 ldr r1, [r3, #0] 802e878: 899b ldrh r3, [r3, #12] 802e87a: f004 f86a bl 8032952 802e87e: 7120 strb r0, [r4, #4] default: break; } } } TCPIP_APIMSG_ACK(msg); 802e880: 6820 ldr r0, [r4, #0] 802e882: 300c adds r0, #12 } 802e884: e8bd 4010 ldmia.w sp!, {r4, lr} default: break; } } } TCPIP_APIMSG_ACK(msg); 802e888: f009 b86e b.w 8037968 0802e88c : * * @param msg the api_msg_msg pointing to the connection */ void do_recv(struct api_msg_msg *msg) { 802e88c: b5f8 push {r3, r4, r5, r6, r7, lr} msg->err = ERR_OK; 802e88e: 2300 movs r3, #0 802e890: 7103 strb r3, [r0, #4] if (msg->conn->pcb.tcp != NULL) { 802e892: 6803 ldr r3, [r0, #0] 802e894: 685a ldr r2, [r3, #4] * * @param msg the api_msg_msg pointing to the connection */ void do_recv(struct api_msg_msg *msg) { 802e896: 4604 mov r4, r0 msg->err = ERR_OK; if (msg->conn->pcb.tcp != NULL) { 802e898: b92a cbnz r2, 802e8a6 remaining -= recved; }while(remaining != 0); } } } TCPIP_APIMSG_ACK(msg); 802e89a: 6820 ldr r0, [r4, #0] 802e89c: 300c adds r0, #12 } 802e89e: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr} remaining -= recved; }while(remaining != 0); } } } TCPIP_APIMSG_ACK(msg); 802e8a2: f009 b861 b.w 8037968 void do_recv(struct api_msg_msg *msg) { msg->err = ERR_OK; if (msg->conn->pcb.tcp != NULL) { if (msg->conn->type == NETCONN_TCP) { 802e8a6: 781b ldrb r3, [r3, #0] 802e8a8: 2b10 cmp r3, #16 802e8aa: d1f6 bne.n 802e89a if (msg->conn->pcb.tcp->state == LISTEN) { tcp_accepted(msg->conn->pcb.tcp); } else #endif /* TCP_LISTEN_BACKLOG */ { u32_t remaining = msg->msg.r.len; 802e8ac: 6885 ldr r5, [r0, #8] do { u16_t recved = (remaining > 0xffff) ? 0xffff : (u16_t)remaining; 802e8ae: f64f 77ff movw r7, #65535 ; 0xffff 802e8b2: 42bd cmp r5, r7 tcp_recved(msg->conn->pcb.tcp, recved); 802e8b4: 6823 ldr r3, [r4, #0] } else #endif /* TCP_LISTEN_BACKLOG */ { u32_t remaining = msg->msg.r.len; do { u16_t recved = (remaining > 0xffff) ? 0xffff : (u16_t)remaining; 802e8b6: bf94 ite ls 802e8b8: b2ae uxthls r6, r5 802e8ba: f64f 76ff movwhi r6, #65535 ; 0xffff tcp_recved(msg->conn->pcb.tcp, recved); 802e8be: 6858 ldr r0, [r3, #4] 802e8c0: 4631 mov r1, r6 802e8c2: f001 fd37 bl 8030334 remaining -= recved; }while(remaining != 0); 802e8c6: 1bad subs r5, r5, r6 802e8c8: d1f3 bne.n 802e8b2 802e8ca: e7e6 b.n 802e89a 0802e8cc : * @return a pointer to a new netbuf * NULL on lack of memory */ struct netbuf *netbuf_new(void) { 802e8cc: b508 push {r3, lr} struct netbuf *buf; buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); 802e8ce: 2005 movs r0, #5 802e8d0: f001 f8fc bl 802facc if (buf != NULL) { 802e8d4: b120 cbz r0, 802e8e0 buf->p = NULL; 802e8d6: 2300 movs r3, #0 802e8d8: 6003 str r3, [r0, #0] buf->ptr = NULL; 802e8da: 6043 str r3, [r0, #4] ip_addr_set_any(&buf->addr); 802e8dc: 6083 str r3, [r0, #8] buf->port = 0; 802e8de: 8183 strh r3, [r0, #12] #endif /* LWIP_NETBUF_RECVINFO || LWIP_CHECKSUM_ON_COPY */ return buf; } else { return NULL; } } 802e8e0: bd08 pop {r3, pc} 0802e8e2 : * * @param buf pointer to a netbuf allocated by netbuf_new() */ void netbuf_delete(struct netbuf *buf) { 802e8e2: b510 push {r4, lr} if (buf != NULL) { 802e8e4: 4604 mov r4, r0 802e8e6: b160 cbz r0, 802e902 if (buf->p != NULL) { 802e8e8: 6800 ldr r0, [r0, #0] 802e8ea: b120 cbz r0, 802e8f6 pbuf_free(buf->p); 802e8ec: f001 fa0e bl 802fd0c buf->p = buf->ptr = NULL; 802e8f0: 2300 movs r3, #0 802e8f2: 6063 str r3, [r4, #4] 802e8f4: 6023 str r3, [r4, #0] } memp_free(MEMP_NETBUF, buf); 802e8f6: 2005 movs r0, #5 802e8f8: 4621 mov r1, r4 } } 802e8fa: e8bd 4010 ldmia.w sp!, {r4, lr} if (buf != NULL) { if (buf->p != NULL) { pbuf_free(buf->p); buf->p = buf->ptr = NULL; } memp_free(MEMP_NETBUF, buf); 802e8fe: f001 b8fb b.w 802faf8 802e902: bd10 pop {r4, pc} 0802e904 : * @return pointer to the allocated memory * NULL if no memory could be allocated */ void * netbuf_alloc(struct netbuf *buf, u16_t size) { 802e904: b538 push {r3, r4, r5, lr} 802e906: 460d mov r5, r1 LWIP_ERROR("netbuf_alloc: invalid buf", (buf != NULL), return NULL;); 802e908: 4604 mov r4, r0 802e90a: b908 cbnz r0, 802e910 802e90c: 2000 movs r0, #0 802e90e: bd38 pop {r3, r4, r5, pc} /* Deallocate any previously allocated memory. */ if (buf->p != NULL) { 802e910: 6800 ldr r0, [r0, #0] 802e912: b108 cbz r0, 802e918 pbuf_free(buf->p); 802e914: f001 f9fa bl 802fd0c } buf->p = pbuf_alloc(PBUF_TRANSPORT, size, PBUF_RAM); 802e918: 2000 movs r0, #0 802e91a: 4629 mov r1, r5 802e91c: 4602 mov r2, r0 802e91e: f001 fa42 bl 802fda6 802e922: 6020 str r0, [r4, #0] if (buf->p == NULL) { 802e924: 2800 cmp r0, #0 802e926: d0f1 beq.n 802e90c return NULL; } LWIP_ASSERT("check that first pbuf can hold size", (buf->p->len >= size)); buf->ptr = buf->p; 802e928: 6060 str r0, [r4, #4] return buf->p->payload; 802e92a: 6840 ldr r0, [r0, #4] } 802e92c: bd38 pop {r3, r4, r5, pc} 0802e92e : * ERR_BUF on error. */ err_t netbuf_data(struct netbuf *buf, void **dataptr, u16_t *len) { LWIP_ERROR("netbuf_data: invalid buf", (buf != NULL), return ERR_ARG;); 802e92e: b150 cbz r0, 802e946 LWIP_ERROR("netbuf_data: invalid dataptr", (dataptr != NULL), return ERR_ARG;); 802e930: b149 cbz r1, 802e946 LWIP_ERROR("netbuf_data: invalid len", (len != NULL), return ERR_ARG;); 802e932: b142 cbz r2, 802e946 if (buf->ptr == NULL) { 802e934: 6843 ldr r3, [r0, #4] 802e936: b143 cbz r3, 802e94a return ERR_BUF; } *dataptr = buf->ptr->payload; 802e938: 685b ldr r3, [r3, #4] 802e93a: 600b str r3, [r1, #0] *len = buf->ptr->len; 802e93c: 6843 ldr r3, [r0, #4] 802e93e: 895b ldrh r3, [r3, #10] return ERR_OK; 802e940: 2000 movs r0, #0 if (buf->ptr == NULL) { return ERR_BUF; } *dataptr = buf->ptr->payload; *len = buf->ptr->len; 802e942: 8013 strh r3, [r2, #0] return ERR_OK; 802e944: e002 b.n 802e94c * ERR_BUF on error. */ err_t netbuf_data(struct netbuf *buf, void **dataptr, u16_t *len) { LWIP_ERROR("netbuf_data: invalid buf", (buf != NULL), return ERR_ARG;); 802e946: 20f2 movs r0, #242 ; 0xf2 802e948: e000 b.n 802e94c LWIP_ERROR("netbuf_data: invalid dataptr", (dataptr != NULL), return ERR_ARG;); LWIP_ERROR("netbuf_data: invalid len", (len != NULL), return ERR_ARG;); if (buf->ptr == NULL) { return ERR_BUF; 802e94a: 20fe movs r0, #254 ; 0xfe } *dataptr = buf->ptr->payload; *len = buf->ptr->len; return ERR_OK; } 802e94c: b240 sxtb r0, r0 802e94e: 4770 bx lr 0802e950 : tcpip_thread(void *arg) { struct tcpip_msg *msg; LWIP_UNUSED_ARG(arg); if (tcpip_init_done != NULL) { 802e950: 4b1e ldr r3, [pc, #120] ; (802e9cc ) 802e952: 681b ldr r3, [r3, #0] * * @param arg unused argument */ static void tcpip_thread(void *arg) { 802e954: b507 push {r0, r1, r2, lr} struct tcpip_msg *msg; LWIP_UNUSED_ARG(arg); if (tcpip_init_done != NULL) { 802e956: b113 cbz r3, 802e95e tcpip_init_done(tcpip_init_done_arg); 802e958: 4a1d ldr r2, [pc, #116] ; (802e9d0 ) 802e95a: 6810 ldr r0, [r2, #0] 802e95c: 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); 802e95e: 481d ldr r0, [pc, #116] ; (802e9d4 ) 802e960: a901 add r1, sp, #4 802e962: f003 fe49 bl 80325f8 LOCK_TCPIP_CORE(); switch (msg->type) { 802e966: 9b01 ldr r3, [sp, #4] 802e968: 781a ldrb r2, [r3, #0] 802e96a: 2a05 cmp r2, #5 802e96c: d8f7 bhi.n 802e95e 802e96e: e8df f002 tbb [pc, r2] 802e972: 0703 .short 0x0703 802e974: 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)); 802e978: 6898 ldr r0, [r3, #8] 802e97a: 6803 ldr r3, [r0, #0] 802e97c: 3004 adds r0, #4 802e97e: e7ed b.n 802e95c #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)) { 802e980: 68d9 ldr r1, [r3, #12] ethernet_input(msg->msg.inp.p, msg->msg.inp.netif); 802e982: 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)) { 802e984: f891 202d ldrb.w r2, [r1, #45] ; 0x2d 802e988: f012 0f60 tst.w r2, #96 ; 0x60 802e98c: d002 beq.n 802e994 ethernet_input(msg->msg.inp.p, msg->msg.inp.netif); 802e98e: f008 fcb7 bl 8037300 802e992: e001 b.n 802e998 } else #endif /* LWIP_ETHERNET */ { ip_input(msg->msg.inp.p, msg->msg.inp.netif); 802e994: f004 fa8a bl 8032eac } memp_free(MEMP_TCPIP_MSG_INPKT, msg); 802e998: 2008 movs r0, #8 802e99a: e00e b.n 802e9ba #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); 802e99c: f103 0008 add.w r0, r3, #8 802e9a0: c807 ldmia r0, {r0, r1, r2} 802e9a2: f003 fd5b bl 803245c 802e9a6: e007 b.n 802e9b8 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); 802e9a8: 68d8 ldr r0, [r3, #12] 802e9aa: 6919 ldr r1, [r3, #16] 802e9ac: f003 fe00 bl 80325b0 802e9b0: e002 b.n 802e9b8 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); 802e9b2: 689a ldr r2, [r3, #8] 802e9b4: 68d8 ldr r0, [r3, #12] 802e9b6: 4790 blx r2 memp_free(MEMP_TCPIP_MSG_API, msg); 802e9b8: 2007 movs r0, #7 802e9ba: 9901 ldr r1, [sp, #4] 802e9bc: f001 f89c bl 802faf8 break; 802e9c0: e7cd b.n 802e95e 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); 802e9c2: 689a ldr r2, [r3, #8] 802e9c4: 68d8 ldr r0, [r3, #12] 802e9c6: 4790 blx r2 break; 802e9c8: e7c9 b.n 802e95e 802e9ca: bf00 nop 802e9cc: 20000d3c .word 0x20000d3c 802e9d0: 20000d38 .word 0x20000d38 802e9d4: 20000d34 .word 0x20000d34 0802e9d8 : * 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) { 802e9d8: 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)) { 802e9da: 4d0e ldr r5, [pc, #56] ; (802ea14 ) 802e9dc: 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) { 802e9de: 4606 mov r6, r0 802e9e0: 460f mov r7, r1 UNLOCK_TCPIP_CORE(); return ret; #else /* LWIP_TCPIP_CORE_LOCKING_INPUT */ struct tcpip_msg *msg; if (!sys_mbox_valid(&mbox)) { 802e9e2: b193 cbz r3, 802ea0a return ERR_VAL; } msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT); 802e9e4: 2008 movs r0, #8 802e9e6: f001 f871 bl 802facc if (msg == NULL) { 802e9ea: 4604 mov r4, r0 802e9ec: b178 cbz r0, 802ea0e return ERR_MEM; } msg->type = TCPIP_MSG_INPKT; 802e9ee: 2301 movs r3, #1 802e9f0: 7003 strb r3, [r0, #0] msg->msg.inp.p = p; 802e9f2: 6086 str r6, [r0, #8] msg->msg.inp.netif = inp; 802e9f4: 60c7 str r7, [r0, #12] if (sys_mbox_trypost(&mbox, msg) != ERR_OK) { 802e9f6: 4621 mov r1, r4 802e9f8: 4628 mov r0, r5 802e9fa: f008 feed bl 80377d8 802e9fe: b138 cbz r0, 802ea10 memp_free(MEMP_TCPIP_MSG_INPKT, msg); 802ea00: 2008 movs r0, #8 802ea02: 4621 mov r1, r4 802ea04: f001 f878 bl 802faf8 802ea08: e001 b.n 802ea0e return ret; #else /* LWIP_TCPIP_CORE_LOCKING_INPUT */ struct tcpip_msg *msg; if (!sys_mbox_valid(&mbox)) { return ERR_VAL; 802ea0a: 20fa movs r0, #250 ; 0xfa 802ea0c: e000 b.n 802ea10 } msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT); if (msg == NULL) { return ERR_MEM; 802ea0e: 20ff movs r0, #255 ; 0xff memp_free(MEMP_TCPIP_MSG_INPKT, msg); return ERR_MEM; } return ERR_OK; #endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */ } 802ea10: b240 sxtb r0, r0 802ea12: bdf8 pop {r3, r4, r5, r6, r7, pc} 802ea14: 20000d34 .word 0x20000d34 0802ea18 : * @param apimsg a struct containing the function to call and its parameters * @return ERR_OK if the function was called, another err_t if not */ err_t tcpip_apimsg(struct api_msg *apimsg) { 802ea18: b530 push {r4, r5, lr} 802ea1a: 4604 mov r4, r0 #ifdef LWIP_DEBUG /* catch functions that don't set err */ apimsg->msg.err = ERR_VAL; #endif if (sys_mbox_valid(&mbox)) { 802ea1c: 480a ldr r0, [pc, #40] ; (802ea48 ) 802ea1e: 6803 ldr r3, [r0, #0] * @param apimsg a struct containing the function to call and its parameters * @return ERR_OK if the function was called, another err_t if not */ err_t tcpip_apimsg(struct api_msg *apimsg) { 802ea20: b087 sub sp, #28 #ifdef LWIP_DEBUG /* catch functions that don't set err */ apimsg->msg.err = ERR_VAL; #endif if (sys_mbox_valid(&mbox)) { 802ea22: b16b cbz r3, 802ea40 msg.type = TCPIP_MSG_API; 802ea24: 2500 movs r5, #0 msg.msg.apimsg = apimsg; sys_mbox_post(&mbox, &msg); 802ea26: a901 add r1, sp, #4 /* catch functions that don't set err */ apimsg->msg.err = ERR_VAL; #endif if (sys_mbox_valid(&mbox)) { msg.type = TCPIP_MSG_API; 802ea28: f88d 5004 strb.w r5, [sp, #4] msg.msg.apimsg = apimsg; 802ea2c: 9403 str r4, [sp, #12] sys_mbox_post(&mbox, &msg); 802ea2e: f008 fec3 bl 80377b8 sys_arch_sem_wait(&apimsg->msg.conn->op_completed, 0); 802ea32: 6860 ldr r0, [r4, #4] 802ea34: 4629 mov r1, r5 802ea36: 300c adds r0, #12 802ea38: f008 ff53 bl 80378e2 return apimsg->msg.err; 802ea3c: 7a20 ldrb r0, [r4, #8] 802ea3e: e000 b.n 802ea42 } return ERR_VAL; 802ea40: 20fa movs r0, #250 ; 0xfa } 802ea42: b240 sxtb r0, r0 802ea44: b007 add sp, #28 802ea46: bd30 pop {r4, r5, pc} 802ea48: 20000d34 .word 0x20000d34 0802ea4c : * @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) { 802ea4c: b537 push {r0, r1, r2, r4, r5, lr} 802ea4e: 4604 mov r4, r0 802ea50: 460d mov r5, r1 lwip_init(); 802ea52: f000 feb3 bl 802f7bc tcpip_init_done = initfunc; 802ea56: 4b09 ldr r3, [pc, #36] ; (802ea7c ) tcpip_init_done_arg = arg; if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 802ea58: 4809 ldr r0, [pc, #36] ; (802ea80 ) void tcpip_init(tcpip_init_done_fn initfunc, void *arg) { lwip_init(); tcpip_init_done = initfunc; 802ea5a: 601c str r4, [r3, #0] tcpip_init_done_arg = arg; 802ea5c: 4b09 ldr r3, [pc, #36] ; (802ea84 ) if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 802ea5e: 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; 802ea60: 601d str r5, [r3, #0] if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 802ea62: f008 fe8d bl 8037780 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); 802ea66: 2303 movs r3, #3 802ea68: 9300 str r3, [sp, #0] 802ea6a: 4907 ldr r1, [pc, #28] ; (802ea88 ) 802ea6c: 4807 ldr r0, [pc, #28] ; (802ea8c ) 802ea6e: 2200 movs r2, #0 802ea70: f44f 73c8 mov.w r3, #400 ; 0x190 802ea74: f008 ff90 bl 8037998 } 802ea78: bd3e pop {r1, r2, r3, r4, r5, pc} 802ea7a: bf00 nop 802ea7c: 20000d3c .word 0x20000d3c 802ea80: 20000d34 .word 0x20000d34 802ea84: 20000d38 .word 0x20000d38 802ea88: 0802e951 .word 0x0802e951 802ea8c: 08044dce .word 0x08044dce 0802ea90 : * @return n in network byte order */ u16_t lwip_htons(u16_t n) { return ((n & 0xff) << 8) | ((n & 0xff00) >> 8); 802ea90: 0a03 lsrs r3, r0, #8 802ea92: ea43 2000 orr.w r0, r3, r0, lsl #8 } 802ea96: b280 uxth r0, r0 802ea98: 4770 bx lr 0802ea9a : * @return n in network byte order */ u16_t lwip_htons(u16_t n) { return ((n & 0xff) << 8) | ((n & 0xff00) >> 8); 802ea9a: 0a03 lsrs r3, r0, #8 802ea9c: ea43 2000 orr.w r0, r3, r0, lsl #8 */ u16_t lwip_ntohs(u16_t n) { return lwip_htons(n); } 802eaa0: b280 uxth r0, r0 802eaa2: 4770 bx lr 0802eaa4 : { return ((n & 0xff) << 24) | ((n & 0xff00) << 8) | ((n & 0xff0000UL) >> 8) | ((n & 0xff000000UL) >> 24); } 802eaa4: ba00 rev r0, r0 802eaa6: 4770 bx lr 0802eaa8 : * @return n in host byte order */ u32_t lwip_ntohl(u32_t n) { return lwip_htonl(n); 802eaa8: f7ff bffc b.w 802eaa4 0802eaac : * 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) { 802eaac: 7b03 ldrb r3, [r0, #12] 802eaae: 428b cmp r3, r1 802eab0: d003 beq.n 802eaba dhcp->state = new_state; dhcp->tries = 0; 802eab2: 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; 802eab4: 7301 strb r1, [r0, #12] dhcp->tries = 0; 802eab6: 7343 strb r3, [r0, #13] dhcp->request_timeout = 0; 802eab8: 8343 strh r3, [r0, #26] 802eaba: 4770 bx lr 0802eabc : */ 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; 802eabc: 8b03 ldrh r3, [r0, #24] * DHCP message. * */ static void dhcp_option(struct dhcp *dhcp, u8_t option_type, u8_t option_len) { 802eabe: 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; 802eac0: 6944 ldr r4, [r0, #20] 802eac2: 18e4 adds r4, r4, r3 802eac4: f884 10f0 strb.w r1, [r4, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = option_len; 802eac8: 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; 802eaca: 1c5c adds r4, r3, #1 dhcp->msg_out->options[dhcp->options_out_len++] = option_len; 802eacc: fa11 f184 uxtah r1, r1, r4 802ead0: 3302 adds r3, #2 802ead2: f881 20f0 strb.w r2, [r1, #240] ; 0xf0 802ead6: 8303 strh r3, [r0, #24] 802ead8: bd10 pop {r4, pc} 0802eada : */ 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; 802eada: 8b03 ldrh r3, [r0, #24] 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] 802eae8: 4770 bx lr 0802eaea : 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); 802eaea: 8b03 ldrh r3, [r0, #24] 802eaec: 6942 ldr r2, [r0, #20] 802eaee: 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) { 802eaf0: 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); 802eaf2: 0a0c lsrs r4, r1, #8 802eaf4: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t) (value & 0x00ffU); 802eaf8: 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); 802eafa: 1c5c adds r4, r3, #1 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t) (value & 0x00ffU); 802eafc: fa12 f284 uxtah r2, r2, r4 802eb00: 3302 adds r3, #2 802eb02: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802eb06: 8303 strh r3, [r0, #24] 802eb08: bd10 pop {r4, pc} 0802eb0a : 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); 802eb0a: 8b03 ldrh r3, [r0, #24] 802eb0c: 6942 ldr r2, [r0, #20] 802eb0e: 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) { 802eb10: 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); 802eb12: 0e0c lsrs r4, r1, #24 802eb14: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); 802eb18: 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); 802eb1a: 1c5c adds r4, r3, #1 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); 802eb1c: fa12 f284 uxtah r2, r2, r4 802eb20: f3c1 4407 ubfx r4, r1, #16, #8 802eb24: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); 802eb28: 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); 802eb2a: 1c9c adds r4, r3, #2 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); 802eb2c: fa12 f284 uxtah r2, r2, r4 802eb30: f3c1 2407 ubfx r4, r1, #8, #8 802eb34: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x000000ffUL)); 802eb38: 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); 802eb3a: 1cdc adds r4, r3, #3 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x000000ffUL)); 802eb3c: fa12 f284 uxtah r2, r2, r4 802eb40: 3304 adds r3, #4 802eb42: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802eb46: 8303 strh r3, [r0, #24] 802eb48: bd10 pop {r4, pc} 0802eb4a : * @param dhcp DHCP state structure */ static void dhcp_option_trailer(struct dhcp *dhcp) { LWIP_ERROR("dhcp_option_trailer: dhcp != NULL", (dhcp != NULL), return;); 802eb4a: b190 cbz r0, 802eb72 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; 802eb4c: 8b03 ldrh r3, [r0, #24] 802eb4e: 6942 ldr r2, [r0, #20] 802eb50: 18d2 adds r2, r2, r3 802eb52: 21ff movs r1, #255 ; 0xff 802eb54: 3301 adds r3, #1 802eb56: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802eb5a: 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; 802eb5c: 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)) && 802eb5e: e005 b.n 802eb6c (dhcp->options_out_len < DHCP_OPTIONS_LEN)) { /* add a fill/padding byte */ dhcp->msg_out->options[dhcp->options_out_len++] = 0; 802eb60: 6942 ldr r2, [r0, #20] 802eb62: 18d2 adds r2, r2, r3 802eb64: 3301 adds r3, #1 802eb66: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802eb6a: 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)) && 802eb6c: 8b03 ldrh r3, [r0, #24] 802eb6e: 2b43 cmp r3, #67 ; 0x43 802eb70: d9f6 bls.n 802eb60 802eb72: 4770 bx lr 0802eb74 : * @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) { 802eb74: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802eb78: 460c mov r4, r1 802eb7a: 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;); 802eb7c: 4606 mov r6, r0 802eb7e: 2800 cmp r0, #0 802eb80: f000 808e beq.w 802eca0 LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); 802eb84: 2900 cmp r1, #0 802eb86: f000 808d beq.w 802eca4 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); 802eb8a: 2000 movs r0, #0 802eb8c: f44f 719a mov.w r1, #308 ; 0x134 802eb90: 4602 mov r2, r0 802eb92: f001 f908 bl 802fda6 802eb96: 6120 str r0, [r4, #16] if (dhcp->p_out == NULL) { 802eb98: 2800 cmp r0, #0 802eb9a: f000 8085 beq.w 802eca8 } 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) { 802eb9e: 7b62 ldrb r2, [r4, #13] 802eba0: 4b43 ldr r3, [pc, #268] ; (802ecb0 ) 802eba2: b912 cbnz r2, 802ebaa #if DHCP_CREATE_RAND_XID && defined(LWIP_RAND) xid = LWIP_RAND(); #else /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ xid++; 802eba4: 681a ldr r2, [r3, #0] 802eba6: 3201 adds r2, #1 802eba8: 601a str r2, [r3, #0] #endif /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ } dhcp->xid = xid; 802ebaa: 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; 802ebac: 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; 802ebae: 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; 802ebb0: 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; 802ebb2: 6162 str r2, [r4, #20] dhcp->msg_out->op = DHCP_BOOTREQUEST; 802ebb4: 7013 strb r3, [r2, #0] /* TODO: make link layer independent */ dhcp->msg_out->htype = DHCP_HTYPE_ETH; 802ebb6: 6962 ldr r2, [r4, #20] 802ebb8: 7053 strb r3, [r2, #1] dhcp->msg_out->hlen = netif->hwaddr_len; 802ebba: 6963 ldr r3, [r4, #20] 802ebbc: f896 2026 ldrb.w r2, [r6, #38] ; 0x26 802ebc0: 709a strb r2, [r3, #2] dhcp->msg_out->hops = 0; 802ebc2: 6963 ldr r3, [r4, #20] 802ebc4: 2500 movs r5, #0 802ebc6: 70dd strb r5, [r3, #3] dhcp->msg_out->xid = htonl(dhcp->xid); 802ebc8: 6820 ldr r0, [r4, #0] 802ebca: f8d4 8014 ldr.w r8, [r4, #20] 802ebce: f7ff ff69 bl 802eaa4 802ebd2: f8c8 0004 str.w r0, [r8, #4] dhcp->msg_out->secs = 0; 802ebd6: 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) || 802ebd8: 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; 802ebda: 721d strb r5, [r3, #8] 802ebdc: 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; 802ebde: 729d strb r5, [r3, #10] 802ebe0: 72dd strb r5, [r3, #11] ip_addr_set_zero(&dhcp->msg_out->ciaddr); 802ebe2: 731d strb r5, [r3, #12] 802ebe4: 735d strb r5, [r3, #13] 802ebe6: 739d strb r5, [r3, #14] 802ebe8: 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) || 802ebea: d007 beq.n 802ebfc 802ebec: 2f04 cmp r7, #4 802ebee: d005 beq.n 802ebfc 802ebf0: 2f03 cmp r7, #3 802ebf2: d105 bne.n 802ec00 ((message_type == DHCP_REQUEST) && /* DHCP_BOUND not used for sending! */ ((dhcp->state==DHCP_RENEWING) || dhcp->state==DHCP_REBINDING))) { 802ebf4: 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! */ 802ebf6: 3a04 subs r2, #4 802ebf8: 2a01 cmp r2, #1 802ebfa: d801 bhi.n 802ec00 ((dhcp->state==DHCP_RENEWING) || dhcp->state==DHCP_REBINDING))) { ip_addr_copy(dhcp->msg_out->ciaddr, netif->ip_addr); 802ebfc: 6872 ldr r2, [r6, #4] 802ebfe: 60da str r2, [r3, #12] } ip_addr_set_zero(&dhcp->msg_out->yiaddr); 802ec00: 2500 movs r5, #0 802ec02: 741d strb r5, [r3, #16] 802ec04: 745d strb r5, [r3, #17] 802ec06: 749d strb r5, [r3, #18] 802ec08: 74dd strb r5, [r3, #19] ip_addr_set_zero(&dhcp->msg_out->siaddr); 802ec0a: 751d strb r5, [r3, #20] 802ec0c: 755d strb r5, [r3, #21] 802ec0e: 759d strb r5, [r3, #22] 802ec10: 75dd strb r5, [r3, #23] ip_addr_set_zero(&dhcp->msg_out->giaddr); 802ec12: 761d strb r5, [r3, #24] 802ec14: 765d strb r5, [r3, #25] 802ec16: 769d strb r5, [r3, #26] 802ec18: 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*/; 802ec1a: f896 1026 ldrb.w r1, [r6, #38] ; 0x26 802ec1e: 6962 ldr r2, [r4, #20] 802ec20: b2ab uxth r3, r5 802ec22: 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) 802ec24: bf88 it hi 802ec26: 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*/; 802ec28: 442a add r2, r5 802ec2a: bf8c ite hi 802ec2c: f893 3027 ldrbhi.w r3, [r3, #39] ; 0x27 802ec30: 2300 movls r3, #0 802ec32: 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++) { 802ec34: 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*/; 802ec36: 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++) { 802ec38: d1ef bne.n 802ec1a 802ec3a: 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; 802ec3c: 4619 mov r1, r3 802ec3e: 6962 ldr r2, [r4, #20] 802ec40: 18d2 adds r2, r2, r3 802ec42: 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++) { 802ec44: 2b40 cmp r3, #64 ; 0x40 dhcp->msg_out->sname[i] = 0; 802ec46: 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++) { 802ec4a: d1f8 bne.n 802ec3e 802ec4c: 2200 movs r2, #0 dhcp->msg_out->sname[i] = 0; } for (i = 0; i < DHCP_FILE_LEN; i++) { dhcp->msg_out->file[i] = 0; 802ec4e: 4610 mov r0, r2 802ec50: 6963 ldr r3, [r4, #20] 802ec52: 1899 adds r1, r3, r2 802ec54: 3201 adds r2, #1 802ec56: 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++) { 802ec58: 2a80 cmp r2, #128 ; 0x80 dhcp->msg_out->file[i] = 0; 802ec5a: 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++) { 802ec5e: d1f7 bne.n 802ec50 dhcp->msg_out->file[i] = 0; } dhcp->msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE); 802ec60: 6962 ldr r2, [r4, #20] 802ec62: f06f 007d mvn.w r0, #125 ; 0x7d 802ec66: 2163 movs r1, #99 ; 0x63 802ec68: f882 00ed strb.w r0, [r2, #237] ; 0xed 802ec6c: 2053 movs r0, #83 ; 0x53 802ec6e: f882 10ec strb.w r1, [r2, #236] ; 0xec 802ec72: f882 00ee strb.w r0, [r2, #238] ; 0xee 802ec76: f882 10ef strb.w r1, [r2, #239] ; 0xef dhcp->options_out_len = 0; 802ec7a: 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 */ 802ec7c: 6962 ldr r2, [r4, #20] 802ec7e: 18d2 adds r2, r2, r3 802ec80: f882 30f0 strb.w r3, [r2, #240] ; 0xf0 802ec84: 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++) { 802ec86: 2b44 cmp r3, #68 ; 0x44 802ec88: d1f8 bne.n 802ec7c 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); 802ec8a: 4620 mov r0, r4 802ec8c: 2135 movs r1, #53 ; 0x35 802ec8e: 2201 movs r2, #1 802ec90: f7ff ff14 bl 802eabc dhcp_option_byte(dhcp, message_type); 802ec94: 4620 mov r0, r4 802ec96: 4639 mov r1, r7 802ec98: f7ff ff1f bl 802eada return ERR_OK; 802ec9c: 2000 movs r0, #0 802ec9e: e004 b.n 802ecaa if (!xid_initialised) { xid = DHCP_GLOBAL_XID; xid_initialised = !xid_initialised; } #endif LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return ERR_ARG;); 802eca0: 20f2 movs r0, #242 ; 0xf2 802eca2: e002 b.n 802ecaa LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); 802eca4: 20fa movs r0, #250 ; 0xfa 802eca6: e000 b.n 802ecaa 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; 802eca8: 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; } 802ecaa: b240 sxtb r0, r0 802ecac: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802ecb0: 2000070c .word 0x2000070c 0802ecb4 : * * @param dhcp the dhcp struct to free the request from */ static void dhcp_delete_msg(struct dhcp *dhcp) { 802ecb4: b510 push {r4, lr} LWIP_ERROR("dhcp_delete_msg: dhcp != NULL", (dhcp != NULL), return;); 802ecb6: 4604 mov r4, r0 802ecb8: b130 cbz r0, 802ecc8 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) { 802ecba: 6900 ldr r0, [r0, #16] 802ecbc: b108 cbz r0, 802ecc2 pbuf_free(dhcp->p_out); 802ecbe: f001 f825 bl 802fd0c } dhcp->p_out = NULL; 802ecc2: 2300 movs r3, #0 802ecc4: 6123 str r3, [r4, #16] dhcp->msg_out = NULL; 802ecc6: 6163 str r3, [r4, #20] 802ecc8: bd10 pop {r4, pc} 802ecca: 0000 movs r0, r0 0802eccc : * * @param netif the netif under DHCP control */ static err_t dhcp_discover(struct netif *netif) { 802eccc: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802ecce: 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); 802ecd0: 2300 movs r3, #0 * * @param netif the netif under DHCP control */ static err_t dhcp_discover(struct netif *netif) { 802ecd2: 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); 802ecd4: 6263 str r3, [r4, #36] ; 0x24 dhcp_set_state(dhcp, DHCP_SELECTING); 802ecd6: 4620 mov r0, r4 802ecd8: 2106 movs r1, #6 802ecda: f7ff fee7 bl 802eaac /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER); 802ecde: 4628 mov r0, r5 802ece0: 4621 mov r1, r4 802ece2: 2201 movs r2, #1 802ece4: f7ff ff46 bl 802eb74 if (result == ERR_OK) { 802ece8: 4606 mov r6, r0 802ecea: 2800 cmp r0, #0 802ecec: d130 bne.n 802ed50 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); 802ecee: 2202 movs r2, #2 802ecf0: 4620 mov r0, r4 802ecf2: 2139 movs r1, #57 ; 0x39 802ecf4: f7ff fee2 bl 802eabc dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 802ecf8: 4620 mov r0, r4 802ecfa: 8ca9 ldrh r1, [r5, #36] ; 0x24 802ecfc: f7ff fef5 bl 802eaea dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, 4/*num options*/); 802ed00: 2204 movs r2, #4 802ed02: 4620 mov r0, r4 802ed04: 2137 movs r1, #55 ; 0x37 802ed06: f7ff fed9 bl 802eabc dhcp_option_byte(dhcp, DHCP_OPTION_SUBNET_MASK); 802ed0a: 4620 mov r0, r4 802ed0c: 2101 movs r1, #1 802ed0e: f7ff fee4 bl 802eada dhcp_option_byte(dhcp, DHCP_OPTION_ROUTER); 802ed12: 4620 mov r0, r4 802ed14: 2103 movs r1, #3 802ed16: f7ff fee0 bl 802eada dhcp_option_byte(dhcp, DHCP_OPTION_BROADCAST); 802ed1a: 4620 mov r0, r4 802ed1c: 211c movs r1, #28 802ed1e: f7ff fedc bl 802eada dhcp_option_byte(dhcp, DHCP_OPTION_DNS_SERVER); 802ed22: 2106 movs r1, #6 802ed24: 4620 mov r0, r4 802ed26: f7ff fed8 bl 802eada dhcp_option_trailer(dhcp); 802ed2a: 4620 mov r0, r4 802ed2c: f7ff ff0d bl 802eb4a 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); 802ed30: 8b21 ldrh r1, [r4, #24] 802ed32: 6920 ldr r0, [r4, #16] 802ed34: 31f0 adds r1, #240 ; 0xf0 802ed36: b289 uxth r1, r1 802ed38: f001 f80f bl 802fd5a 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); 802ed3c: 9500 str r5, [sp, #0] 802ed3e: 6860 ldr r0, [r4, #4] 802ed40: 6921 ldr r1, [r4, #16] 802ed42: 4a0f ldr r2, [pc, #60] ; (802ed80 ) 802ed44: 2343 movs r3, #67 ; 0x43 802ed46: f003 fda3 bl 8032890 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: deleting()ing\n")); dhcp_delete_msg(dhcp); 802ed4a: 4620 mov r0, r4 802ed4c: f7ff ffb2 bl 802ecb4 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++; 802ed50: 7b63 ldrb r3, [r4, #13] 802ed52: 3301 adds r3, #1 802ed54: 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; 802ed56: 2b05 cmp r3, #5 802ed58: bf98 it ls 802ed5a: 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++; 802ed5e: 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; 802ed60: bf9a itte ls 802ed62: fa02 f303 lslls.w r3, r2, r3 802ed66: b29b uxthls r3, r3 802ed68: f64e 2360 movwhi r3, #60000 ; 0xea60 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802ed6c: f44f 72fa mov.w r2, #500 ; 0x1f4 802ed70: f203 13f3 addw r3, r3, #499 ; 0x1f3 802ed74: fb93 f3f2 sdiv r3, r3, r2 802ed78: 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; } 802ed7a: 4630 mov r0, r6 802ed7c: bd7c pop {r2, r3, r4, r5, r6, pc} 802ed7e: bf00 nop 802ed80: 08044e40 .word 0x08044e40 0802ed84 : * * @param netif network interface which must rebind with a DHCP server */ static err_t dhcp_rebind(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 rebind with a DHCP server */ static err_t dhcp_rebind(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_rebind()\n")); dhcp_set_state(dhcp, DHCP_REBINDING); 802ed8a: 2104 movs r1, #4 802ed8c: 4620 mov r0, r4 802ed8e: f7ff fe8d bl 802eaac /* 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 feec bl 802eb74 if (result == ERR_OK) { 802ed9c: 4606 mov r6, r0 802ed9e: b9d8 cbnz r0, 802edd8 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 fe89 bl 802eabc dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 802edaa: 8ca9 ldrh r1, [r5, #36] ; 0x24 802edac: 4620 mov r0, r4 802edae: f7ff fe9c bl 802eaea dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); dhcp_option_long(dhcp, ntohl(dhcp->server_ip_addr.addr)); #endif dhcp_option_trailer(dhcp); 802edb2: 4620 mov r0, r4 802edb4: f7ff fec9 bl 802eb4a pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802edb8: 8b21 ldrh r1, [r4, #24] 802edba: 6920 ldr r0, [r4, #16] 802edbc: 31f0 adds r1, #240 ; 0xf0 802edbe: b289 uxth r1, r1 802edc0: f000 ffcb bl 802fd5a /* broadcast to server */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802edc4: 9500 str r5, [sp, #0] 802edc6: 6860 ldr r0, [r4, #4] 802edc8: 6921 ldr r1, [r4, #16] 802edca: 4a0e ldr r2, [pc, #56] ; (802ee04 ) 802edcc: 2343 movs r3, #67 ; 0x43 802edce: f003 fd5f bl 8032890 dhcp_delete_msg(dhcp); 802edd2: 4620 mov r0, r4 802edd4: f7ff ff6e bl 802ecb4 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++; 802edd8: 7b63 ldrb r3, [r4, #13] 802edda: 3301 adds r3, #1 802eddc: b2db uxtb r3, r3 msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802edde: 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++; 802ede0: 7363 strb r3, [r4, #13] msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802ede2: d804 bhi.n 802edee 802ede4: f44f 727a mov.w r2, #1000 ; 0x3e8 802ede8: 4353 muls r3, r2 802edea: b29b uxth r3, r3 802edec: e001 b.n 802edf2 802edee: f242 7310 movw r3, #10000 ; 0x2710 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802edf2: f44f 72fa mov.w r2, #500 ; 0x1f4 802edf6: f203 13f3 addw r3, r3, #499 ; 0x1f3 802edfa: fb93 f3f2 sdiv r3, r3, r2 802edfe: 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; } 802ee00: 4630 mov r0, r6 802ee02: bd7c pop {r2, r3, r4, r5, r6, pc} 802ee04: 08044e40 .word 0x08044e40 0802ee08 : * * @param netif network interface which must reboot */ static err_t dhcp_reboot(struct netif *netif) { 802ee08: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802ee0a: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must reboot */ static err_t dhcp_reboot(struct netif *netif) { 802ee0c: 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); 802ee0e: 2103 movs r1, #3 802ee10: 4620 mov r0, r4 802ee12: f7ff fe4b bl 802eaac /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 802ee16: 4628 mov r0, r5 802ee18: 4621 mov r1, r4 802ee1a: 2203 movs r2, #3 802ee1c: f7ff feaa bl 802eb74 if (result == ERR_OK) { 802ee20: 4606 mov r6, r0 802ee22: bb40 cbnz r0, 802ee76 dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 802ee24: 2202 movs r2, #2 802ee26: 4620 mov r0, r4 802ee28: 2139 movs r1, #57 ; 0x39 802ee2a: f7ff fe47 bl 802eabc dhcp_option_short(dhcp, 576); 802ee2e: 4620 mov r0, r4 802ee30: f44f 7110 mov.w r1, #576 ; 0x240 802ee34: f7ff fe59 bl 802eaea dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); 802ee38: 2204 movs r2, #4 802ee3a: 2132 movs r1, #50 ; 0x32 802ee3c: 4620 mov r0, r4 802ee3e: f7ff fe3d bl 802eabc dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); 802ee42: 6a60 ldr r0, [r4, #36] ; 0x24 802ee44: f7ff fe30 bl 802eaa8 802ee48: 4601 mov r1, r0 802ee4a: 4620 mov r0, r4 802ee4c: f7ff fe5d bl 802eb0a dhcp_option_trailer(dhcp); 802ee50: 4620 mov r0, r4 802ee52: f7ff fe7a bl 802eb4a pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802ee56: 8b21 ldrh r1, [r4, #24] 802ee58: 6920 ldr r0, [r4, #16] 802ee5a: 31f0 adds r1, #240 ; 0xf0 802ee5c: b289 uxth r1, r1 802ee5e: f000 ff7c bl 802fd5a /* broadcast to server */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802ee62: 9500 str r5, [sp, #0] 802ee64: 6860 ldr r0, [r4, #4] 802ee66: 6921 ldr r1, [r4, #16] 802ee68: 4a0e ldr r2, [pc, #56] ; (802eea4 ) 802ee6a: 2343 movs r3, #67 ; 0x43 802ee6c: f003 fd10 bl 8032890 dhcp_delete_msg(dhcp); 802ee70: 4620 mov r0, r4 802ee72: f7ff ff1f bl 802ecb4 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++; 802ee76: 7b63 ldrb r3, [r4, #13] 802ee78: 3301 adds r3, #1 802ee7a: b2db uxtb r3, r3 msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802ee7c: 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++; 802ee7e: 7363 strb r3, [r4, #13] msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802ee80: d804 bhi.n 802ee8c 802ee82: f44f 727a mov.w r2, #1000 ; 0x3e8 802ee86: 4353 muls r3, r2 802ee88: b29b uxth r3, r3 802ee8a: e001 b.n 802ee90 802ee8c: f242 7310 movw r3, #10000 ; 0x2710 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802ee90: f44f 72fa mov.w r2, #500 ; 0x1f4 802ee94: f203 13f3 addw r3, r3, #499 ; 0x1f3 802ee98: fb93 f3f2 sdiv r3, r3, r2 802ee9c: 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; } 802ee9e: 4630 mov r0, r6 802eea0: bd7c pop {r2, r3, r4, r5, r6, pc} 802eea2: bf00 nop 802eea4: 08044e40 .word 0x08044e40 0802eea8 : * @param netif the netif under DHCP control * @return lwIP specific error (see error.h) */ static err_t dhcp_select(struct netif *netif) { 802eea8: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802eeaa: 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) { 802eeac: 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); 802eeae: 2101 movs r1, #1 802eeb0: 4620 mov r0, r4 802eeb2: f7ff fdfb bl 802eaac /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 802eeb6: 4628 mov r0, r5 802eeb8: 4621 mov r1, r4 802eeba: 2203 movs r2, #3 802eebc: f7ff fe5a bl 802eb74 if (result == ERR_OK) { 802eec0: 4606 mov r6, r0 802eec2: 2800 cmp r0, #0 802eec4: d148 bne.n 802ef58 dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 802eec6: 2202 movs r2, #2 802eec8: 4620 mov r0, r4 802eeca: 2139 movs r1, #57 ; 0x39 802eecc: f7ff fdf6 bl 802eabc dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 802eed0: 4620 mov r0, r4 802eed2: 8ca9 ldrh r1, [r5, #36] ; 0x24 802eed4: f7ff fe09 bl 802eaea /* MUST request the offered IP address */ dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); 802eed8: 2204 movs r2, #4 802eeda: 2132 movs r1, #50 ; 0x32 802eedc: 4620 mov r0, r4 802eede: f7ff fded bl 802eabc dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); 802eee2: 6a60 ldr r0, [r4, #36] ; 0x24 802eee4: f7ff fde0 bl 802eaa8 802eee8: 4601 mov r1, r0 802eeea: 4620 mov r0, r4 802eeec: f7ff fe0d bl 802eb0a dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); 802eef0: 2204 movs r2, #4 802eef2: 2136 movs r1, #54 ; 0x36 802eef4: 4620 mov r0, r4 802eef6: f7ff fde1 bl 802eabc dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->server_ip_addr))); 802eefa: 6a20 ldr r0, [r4, #32] 802eefc: f7ff fdd4 bl 802eaa8 802ef00: 4601 mov r1, r0 802ef02: 4620 mov r0, r4 802ef04: f7ff fe01 bl 802eb0a dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, 4/*num options*/); 802ef08: 2204 movs r2, #4 802ef0a: 4620 mov r0, r4 802ef0c: 2137 movs r1, #55 ; 0x37 802ef0e: f7ff fdd5 bl 802eabc dhcp_option_byte(dhcp, DHCP_OPTION_SUBNET_MASK); 802ef12: 4620 mov r0, r4 802ef14: 2101 movs r1, #1 802ef16: f7ff fde0 bl 802eada dhcp_option_byte(dhcp, DHCP_OPTION_ROUTER); 802ef1a: 4620 mov r0, r4 802ef1c: 2103 movs r1, #3 802ef1e: f7ff fddc bl 802eada dhcp_option_byte(dhcp, DHCP_OPTION_BROADCAST); 802ef22: 4620 mov r0, r4 802ef24: 211c movs r1, #28 802ef26: f7ff fdd8 bl 802eada dhcp_option_byte(dhcp, DHCP_OPTION_DNS_SERVER); 802ef2a: 2106 movs r1, #6 802ef2c: 4620 mov r0, r4 802ef2e: f7ff fdd4 bl 802eada #if LWIP_NETIF_HOSTNAME dhcp_option_hostname(dhcp, netif); #endif /* LWIP_NETIF_HOSTNAME */ dhcp_option_trailer(dhcp); 802ef32: 4620 mov r0, r4 802ef34: f7ff fe09 bl 802eb4a /* shrink the pbuf to the actual content length */ pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802ef38: 8b21 ldrh r1, [r4, #24] 802ef3a: 6920 ldr r0, [r4, #16] 802ef3c: 31f0 adds r1, #240 ; 0xf0 802ef3e: b289 uxth r1, r1 802ef40: f000 ff0b bl 802fd5a /* send broadcast to any DHCP server */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802ef44: 9500 str r5, [sp, #0] 802ef46: 6860 ldr r0, [r4, #4] 802ef48: 6921 ldr r1, [r4, #16] 802ef4a: 4a0f ldr r2, [pc, #60] ; (802ef88 ) 802ef4c: 2343 movs r3, #67 ; 0x43 802ef4e: f003 fc9f bl 8032890 dhcp_delete_msg(dhcp); 802ef52: 4620 mov r0, r4 802ef54: f7ff feae bl 802ecb4 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++; 802ef58: 7b63 ldrb r3, [r4, #13] 802ef5a: 3301 adds r3, #1 802ef5c: b2db uxtb r3, r3 msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; 802ef5e: 2b05 cmp r3, #5 802ef60: bf98 it ls 802ef62: 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++; 802ef66: 7363 strb r3, [r4, #13] msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; 802ef68: bf9a itte ls 802ef6a: fa02 f303 lslls.w r3, r2, r3 802ef6e: b29b uxthls r3, r3 802ef70: f64e 2360 movwhi r3, #60000 ; 0xea60 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802ef74: f44f 72fa mov.w r2, #500 ; 0x1f4 802ef78: f203 13f3 addw r3, r3, #499 ; 0x1f3 802ef7c: fb93 f3f2 sdiv r3, r3, r2 802ef80: 8363 strh r3, [r4, #26] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_select(): set request timeout %"U16_F" msecs\n", msecs)); return result; } 802ef82: 4630 mov r0, r6 802ef84: bd7c pop {r2, r3, r4, r5, r6, pc} 802ef86: bf00 nop 802ef88: 08044e40 .word 0x08044e40 0802ef8c : * * @param netif the netif under DHCP control */ static void dhcp_check(struct netif *netif) { 802ef8c: b538 push {r3, r4, r5, lr} struct dhcp *dhcp = netif->dhcp; 802ef8e: 6a04 ldr r4, [r0, #32] * * @param netif the netif under DHCP control */ static void dhcp_check(struct netif *netif) { 802ef90: 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); 802ef92: 2108 movs r1, #8 802ef94: 4620 mov r0, r4 802ef96: f7ff fd89 bl 802eaac /* 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); 802ef9a: 4628 mov r0, r5 802ef9c: f104 0124 add.w r1, r4, #36 ; 0x24 802efa0: 2200 movs r2, #0 802efa2: f008 f88d bl 80370c0 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++; 802efa6: 7b63 ldrb r3, [r4, #13] 802efa8: 3301 adds r3, #1 802efaa: 7363 strb r3, [r4, #13] msecs = 500; dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802efac: 2301 movs r3, #1 802efae: 8363 strh r3, [r4, #26] 802efb0: bd38 pop {r3, r4, r5, pc} 0802efb2 : * * @param netif network interface to bind to the offered address */ static void dhcp_bind(struct netif *netif) { 802efb2: 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;); 802efb4: 4605 mov r5, r0 802efb6: 2800 cmp r0, #0 802efb8: d059 beq.n 802f06e dhcp = netif->dhcp; 802efba: 6a04 ldr r4, [r0, #32] LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;); 802efbc: 2c00 cmp r4, #0 802efbe: d056 beq.n 802f06e 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) { 802efc0: 6b63 ldr r3, [r4, #52] ; 0x34 802efc2: 1c58 adds r0, r3, #1 802efc4: d00d beq.n 802efe2 /* 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; 802efc6: 223c movs r2, #60 ; 0x3c 802efc8: 331e adds r3, #30 802efca: fbb3 f3f2 udiv r3, r3, r2 if(timeout > 0xffff) { timeout = 0xffff; } dhcp->t1_timeout = (u16_t)timeout; 802efce: f64f 72ff movw r2, #65535 ; 0xffff 802efd2: 4293 cmp r3, r2 802efd4: bf28 it cs 802efd6: 4613 movcs r3, r2 802efd8: b29b uxth r3, r3 802efda: 83a3 strh r3, [r4, #28] if (dhcp->t1_timeout == 0) { 802efdc: b90b cbnz r3, 802efe2 dhcp->t1_timeout = 1; 802efde: 2301 movs r3, #1 802efe0: 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) { 802efe2: 6ba3 ldr r3, [r4, #56] ; 0x38 802efe4: 1c59 adds r1, r3, #1 802efe6: d00d beq.n 802f004 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; 802efe8: 223c movs r2, #60 ; 0x3c 802efea: 331e adds r3, #30 802efec: fbb3 f3f2 udiv r3, r3, r2 if(timeout > 0xffff) { timeout = 0xffff; } dhcp->t2_timeout = (u16_t)timeout; 802eff0: f64f 72ff movw r2, #65535 ; 0xffff 802eff4: 4293 cmp r3, r2 802eff6: bf28 it cs 802eff8: 4613 movcs r3, r2 802effa: b29b uxth r3, r3 802effc: 83e3 strh r3, [r4, #30] if (dhcp->t2_timeout == 0) { 802effe: b90b cbnz r3, 802f004 dhcp->t2_timeout = 1; 802f000: 2301 movs r3, #1 802f002: 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)) { 802f004: 8be3 ldrh r3, [r4, #30] 802f006: 8ba2 ldrh r2, [r4, #28] 802f008: 429a cmp r2, r3 802f00a: d302 bcc.n 802f012 802f00c: b10b cbz r3, 802f012 dhcp->t1_timeout = 0; 802f00e: 2300 movs r3, #0 802f010: 83a3 strh r3, [r4, #28] } if (dhcp->subnet_mask_given) { 802f012: 7ba3 ldrb r3, [r4, #14] 802f014: b10b cbz r3, 802f01a /* copy offered network mask */ ip_addr_copy(sn_mask, dhcp->offered_sn_mask); 802f016: 6aa3 ldr r3, [r4, #40] ; 0x28 802f018: e00b b.n 802f032 } else { /* subnet mask not given, choose a safe subnet mask given the network class */ u8_t first_octet = ip4_addr1(&dhcp->offered_ip_addr); 802f01a: f894 3024 ldrb.w r3, [r4, #36] ; 0x24 if (first_octet <= 127) { 802f01e: 061a lsls r2, r3, #24 802f020: d401 bmi.n 802f026 ip4_addr_set_u32(&sn_mask, PP_HTONL(0xff000000UL)); 802f022: 23ff movs r3, #255 ; 0xff 802f024: e005 b.n 802f032 } else if (first_octet >= 192) { 802f026: 2bbf cmp r3, #191 ; 0xbf ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffffff00UL)); 802f028: bf8c ite hi 802f02a: f06f 437f mvnhi.w r3, #4278190080 ; 0xff000000 } else { ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffff0000UL)); 802f02e: f64f 73ff movwls r3, #65535 ; 0xffff 802f032: 9300 str r3, [sp, #0] } } ip_addr_copy(gw_addr, dhcp->offered_gw_addr); 802f034: 6ae3 ldr r3, [r4, #44] ; 0x2c 802f036: 9301 str r3, [sp, #4] /* gateway address not given? */ if (ip_addr_isany(&gw_addr)) { 802f038: b92b cbnz r3, 802f046 /* copy network address */ ip_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask); 802f03a: 6a63 ldr r3, [r4, #36] ; 0x24 802f03c: 9a00 ldr r2, [sp, #0] 802f03e: 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)); 802f040: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000 802f044: 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); 802f046: 4628 mov r0, r5 802f048: f104 0124 add.w r1, r4, #36 ; 0x24 802f04c: f000 fd6a bl 802fb24 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); 802f050: 4628 mov r0, r5 802f052: 4669 mov r1, sp 802f054: f000 fda6 bl 802fba4 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); 802f058: a901 add r1, sp, #4 802f05a: 4628 mov r0, r5 802f05c: f000 fd9e bl 802fb9c /* bring the interface up */ netif_set_up(netif); 802f060: 4628 mov r0, r5 802f062: f000 fdf5 bl 802fc50 /* netif is now bound to DHCP leased address */ dhcp_set_state(dhcp, DHCP_BOUND); 802f066: 4620 mov r0, r4 802f068: 210a movs r1, #10 802f06a: f7ff fd1f bl 802eaac } 802f06e: bd3e pop {r1, r2, r3, r4, r5, pc} 0802f070 : /** * 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) { 802f070: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802f074: 4692 mov sl, r2 802f076: 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) { 802f078: 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; 802f07c: f8d0 8020 ldr.w r8, [r0, #32] struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload; 802f080: 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) { 802f082: 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) { 802f084: 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) { 802f086: f240 81b8 bls.w 802f3fa 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) { 802f08a: 7813 ldrb r3, [r2, #0] 802f08c: 2b02 cmp r3, #2 802f08e: f040 81b4 bne.w 802f3fa 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++) { 802f092: f890 1026 ldrb.w r1, [r0, #38] ; 0x26 802f096: 2300 movs r3, #0 802f098: e008 b.n 802f0ac /** * 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) 802f09a: 18e8 adds r0, r5, r3 802f09c: 3301 adds r3, #1 802f09e: 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]) { 802f0a0: f890 0027 ldrb.w r0, [r0, #39] ; 0x27 802f0a4: 7ee4 ldrb r4, [r4, #27] 802f0a6: 4284 cmp r4, r0 802f0a8: f040 81a7 bne.w 802f3fa 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++) { 802f0ac: b2d8 uxtb r0, r3 802f0ae: 4288 cmp r0, r1 802f0b0: d3f3 bcc.n 802f09a (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) { 802f0b2: 6850 ldr r0, [r2, #4] 802f0b4: f7ff fcf8 bl 802eaa8 802f0b8: f8d8 3000 ldr.w r3, [r8] 802f0bc: 4298 cmp r0, r3 802f0be: f040 819c bne.w 802f3fa struct pbuf *q; int parse_file_as_options = 0; int parse_sname_as_options = 0; /* clear received options */ dhcp_clear_all_options(dhcp); 802f0c2: 2100 movs r1, #0 802f0c4: 220a movs r2, #10 802f0c6: 489d ldr r0, [pc, #628] ; (802f33c ) 802f0c8: f7f2 fd1a bl 8021b00 /* check that beginning of dhcp_msg (up to and including chaddr) is in first pbuf */ if (p->len < DHCP_SNAME_OFS) { 802f0cc: f8ba 300a ldrh.w r3, [sl, #10] 802f0d0: 2b2b cmp r3, #43 ; 0x2b 802f0d2: f240 8192 bls.w 802f3fa return ERR_BUF; } dhcp->msg_in = (struct dhcp_msg *)p->payload; 802f0d6: 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; 802f0da: 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; 802f0de: 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; 802f0e2: f04f 0b00 mov.w fp, #0 #endif /* LWIP_DHCP_BOOTP_FILE */ /* parse options */ /* start with options field */ options_idx = DHCP_OPTIONS_OFS; 802f0e6: 22f0 movs r2, #240 ; 0xf0 802f0e8: e004 b.n 802f0f4 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; 802f0ea: f04f 0b00 mov.w fp, #0 options_idx = DHCP_SNAME_OFS; options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN; 802f0ee: 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; 802f0f2: 222c movs r2, #44 ; 0x2c #endif /* LWIP_DHCP_BOOTP_FILE */ /* parse options */ /* start with options field */ options_idx = DHCP_OPTIONS_OFS; 802f0f4: 4657 mov r7, sl 802f0f6: e009 b.n 802f10c again: q = p; while((q != NULL) && (options_idx >= q->len)) { options_idx -= q->len; options_idx_max -= q->len; q = q->next; 802f0f8: 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; 802f0fa: 1ad2 subs r2, r2, r3 options_idx_max -= q->len; 802f0fc: 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; 802f100: b292 uxth r2, r2 options_idx_max -= q->len; 802f102: 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)) { 802f106: 2f00 cmp r7, #0 802f108: f000 8177 beq.w 802f3fa 802f10c: 897b ldrh r3, [r7, #10] 802f10e: 429a cmp r2, r3 802f110: d2f2 bcs.n 802f0f8 if (q == NULL) { return ERR_BUF; } offset = options_idx; offset_max = options_idx_max; options = (u8_t*)q->payload; 802f112: 6878 ldr r0, [r7, #4] 802f114: 9003 str r0, [sp, #12] 802f116: e0db b.n 802f2d0 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) { 802f118: 897b ldrh r3, [r7, #10] 802f11a: 1c50 adds r0, r2, #1 802f11c: 4298 cmp r0, r3 802f11e: da03 bge.n 802f128 len = options[offset + 1]; 802f120: 9803 ldr r0, [sp, #12] 802f122: 1883 adds r3, r0, r2 802f124: 785b ldrb r3, [r3, #1] 802f126: e003 b.n 802f130 } else { len = (q->next != NULL ? ((u8_t*)q->next->payload)[0] : 0); 802f128: 683b ldr r3, [r7, #0] 802f12a: b10b cbz r3, 802f130 802f12c: 685b ldr r3, [r3, #4] 802f12e: 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) { 802f130: 2933 cmp r1, #51 ; 0x33 802f132: d038 beq.n 802f1a6 802f134: d807 bhi.n 802f146 802f136: 2901 cmp r1, #1 802f138: d019 beq.n 802f16e 802f13a: d311 bcc.n 802f160 802f13c: 2903 cmp r1, #3 802f13e: d01d beq.n 802f17c 802f140: 2906 cmp r1, #6 802f142: d155 bne.n 802f1f0 802f144: e021 b.n 802f18a 802f146: 2936 cmp r1, #54 ; 0x36 802f148: d03d beq.n 802f1c6 802f14a: d804 bhi.n 802f156 802f14c: 2934 cmp r1, #52 ; 0x34 802f14e: d031 beq.n 802f1b4 802f150: 2935 cmp r1, #53 ; 0x35 802f152: d14d bne.n 802f1f0 802f154: e035 b.n 802f1c2 802f156: 293a cmp r1, #58 ; 0x3a 802f158: d03c beq.n 802f1d4 802f15a: 293b cmp r1, #59 ; 0x3b 802f15c: d148 bne.n 802f1f0 802f15e: e040 b.n 802f1e2 /* case(DHCP_OPTION_END): handled above */ case(DHCP_OPTION_PAD): /* special option: no len encoded */ decode_len = len = 0; /* will be increased below */ offset--; 802f160: 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; 802f162: 2300 movs r3, #0 /* will be increased below */ offset--; 802f164: 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; 802f166: 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; 802f16a: 461e mov r6, r3 802f16c: e044 b.n 802f1f8 /* will be increased below */ offset--; break; case(DHCP_OPTION_SUBNET_MASK): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802f16e: 2b04 cmp r3, #4 802f170: f040 8143 bne.w 802f3fa 802f174: 461e mov r6, r3 802f176: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_SUBNET_MASK; 802f178: 2406 movs r4, #6 802f17a: e03d b.n 802f1f8 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;); 802f17c: 2b03 cmp r3, #3 802f17e: f240 813c bls.w 802f3fa 802f182: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_ROUTER; 802f184: 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 */ 802f186: 2604 movs r6, #4 802f188: e036 b.n 802f1f8 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;); 802f18a: 0799 lsls r1, r3, #30 802f18c: f040 8135 bne.w 802f3fa /* limit number of DNS servers */ decode_len = LWIP_MIN(len, 4 * DNS_MAX_SERVERS); 802f190: 2b08 cmp r3, #8 802f192: bf34 ite cc 802f194: 461e movcc r6, r3 802f196: 2608 movcs r6, #8 802f198: b2f6 uxtb r6, r6 LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); 802f19a: 42b3 cmp r3, r6 802f19c: f0c0 812d bcc.w 802f3fa 802f1a0: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_DNS_SERVER; 802f1a2: 2408 movs r4, #8 802f1a4: e028 b.n 802f1f8 break; case(DHCP_OPTION_LEASE_TIME): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802f1a6: 2b04 cmp r3, #4 802f1a8: f040 8127 bne.w 802f3fa 802f1ac: 461e mov r6, r3 802f1ae: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_LEASE_TIME; 802f1b0: 2403 movs r4, #3 802f1b2: e021 b.n 802f1f8 break; case(DHCP_OPTION_OVERLOAD): LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); 802f1b4: 2b01 cmp r3, #1 802f1b6: f040 8120 bne.w 802f3fa 802f1ba: 461e mov r6, r3 802f1bc: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_OVERLOAD; 802f1be: 2400 movs r4, #0 802f1c0: e01a b.n 802f1f8 break; case(DHCP_OPTION_MESSAGE_TYPE): LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); 802f1c2: 2b01 cmp r3, #1 802f1c4: e007 b.n 802f1d6 decode_idx = DHCP_OPTION_IDX_MSG_TYPE; break; case(DHCP_OPTION_SERVER_ID): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802f1c6: 2b04 cmp r3, #4 802f1c8: f040 8117 bne.w 802f3fa 802f1cc: 461e mov r6, r3 802f1ce: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_SERVER_ID; 802f1d0: 2402 movs r4, #2 802f1d2: e011 b.n 802f1f8 break; case(DHCP_OPTION_T1): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802f1d4: 2b04 cmp r3, #4 802f1d6: f040 8110 bne.w 802f3fa 802f1da: 461e mov r6, r3 802f1dc: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_T1; 802f1de: 461c mov r4, r3 802f1e0: e00a b.n 802f1f8 break; case(DHCP_OPTION_T2): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802f1e2: 2b04 cmp r3, #4 802f1e4: f040 8109 bne.w 802f3fa 802f1e8: 461e mov r6, r3 802f1ea: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_T2; 802f1ec: 2405 movs r4, #5 802f1ee: e003 b.n 802f1f8 } 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) { 802f1f0: 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; 802f1f2: 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; 802f1f6: 2600 movs r6, #0 LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", op)); break; } offset += len + 2; 802f1f8: 3102 adds r1, #2 802f1fa: fa13 f381 uxtah r3, r3, r1 802f1fe: b29b uxth r3, r3 802f200: 9301 str r3, [sp, #4] if (decode_len > 0) { 802f202: 2e00 cmp r6, #0 802f204: d04f beq.n 802f2a6 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; 802f206: 3202 adds r2, #2 802f208: 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; 802f20a: 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; 802f20c: 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; 802f20e: 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) 802f210: 4a4b ldr r2, [pc, #300] ; (802f340 ) LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", op)); break; } offset += len + 2; if (decode_len > 0) { u32_t value = 0; 802f212: 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) 802f216: 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; 802f21a: 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) 802f21c: 9206 str r2, [sp, #24] 802f21e: 9302 str r3, [sp, #8] 802f220: 9805 ldr r0, [sp, #20] 802f222: 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)) { 802f224: 4a45 ldr r2, [pc, #276] ; (802f33c ) /** * 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) 802f226: 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)) { 802f228: 4844 ldr r0, [pc, #272] ; (802f33c ) 802f22a: 18a2 adds r2, r4, r2 802f22c: 9207 str r2, [sp, #28] 802f22e: 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) 802f230: ebc1 0c06 rsb ip, r1, r6 802f234: b29b uxth r3, r3 802f236: 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)) { 802f23a: 2a00 cmp r2, #0 802f23c: d133 bne.n 802f2a6 copy_len = LWIP_MIN(decode_len, 4); pbuf_copy_partial(q, &value, copy_len, val_offset); 802f23e: f1bc 0f03 cmp.w ip, #3 802f242: bf94 ite ls 802f244: 4662 movls r2, ip 802f246: 2204 movhi r2, #4 802f248: 4638 mov r0, r7 802f24a: 9904 ldr r1, [sp, #16] 802f24c: f8cd c000 str.w ip, [sp] 802f250: f000 feaa bl 802ffa8 if (decode_len > 4) { 802f254: f8dd c000 ldr.w ip, [sp] 802f258: f1bc 0f04 cmp.w ip, #4 802f25c: d90f bls.n 802f27e /* decode more than one u32_t */ LWIP_ERROR("decode_len % 4 == 0", decode_len % 4 == 0, return ERR_VAL;); 802f25e: f01c 0f03 tst.w ip, #3 802f262: f040 80ca bne.w 802f3fa dhcp_got_option(dhcp, decode_idx); 802f266: 9907 ldr r1, [sp, #28] dhcp_set_option_value(dhcp, decode_idx, htonl(value)); 802f268: 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); 802f26a: 2201 movs r2, #1 802f26c: 700a strb r2, [r1, #0] dhcp_set_option_value(dhcp, decode_idx, htonl(value)); 802f26e: f7ff fc19 bl 802eaa4 802f272: 9b02 ldr r3, [sp, #8] 802f274: 9906 ldr r1, [sp, #24] decode_len -= 4; val_offset += 4; decode_idx++; 802f276: 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)); 802f278: 50c8 str r0, [r1, r3] 802f27a: 3304 adds r3, #4 802f27c: e7cf b.n 802f21e decode_len -= 4; val_offset += 4; decode_idx++; goto decode_next; } else if (decode_len == 4) { 802f27e: d104 bne.n 802f28a value = ntohl(value); 802f280: 9809 ldr r0, [sp, #36] ; 0x24 802f282: f7ff fc11 bl 802eaa8 802f286: 9009 str r0, [sp, #36] ; 0x24 802f288: e006 b.n 802f298 } else { LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;); 802f28a: f1bc 0f01 cmp.w ip, #1 802f28e: f040 80b4 bne.w 802f3fa value = ((u8_t*)&value)[0]; 802f292: f89d 3024 ldrb.w r3, [sp, #36] ; 0x24 802f296: 9309 str r3, [sp, #36] ; 0x24 } dhcp_got_option(dhcp, decode_idx); 802f298: 4a28 ldr r2, [pc, #160] ; (802f33c ) dhcp_set_option_value(dhcp, decode_idx, value); 802f29a: 4829 ldr r0, [pc, #164] ; (802f340 ) 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); 802f29c: 2301 movs r3, #1 802f29e: 5513 strb r3, [r2, r4] dhcp_set_option_value(dhcp, decode_idx, value); 802f2a0: 9b09 ldr r3, [sp, #36] ; 0x24 802f2a2: f840 3024 str.w r3, [r0, r4, lsl #2] } } if (offset >= q->len) { 802f2a6: 897b ldrh r3, [r7, #10] 802f2a8: 9901 ldr r1, [sp, #4] 802f2aa: 4299 cmp r1, r3 802f2ac: d30f bcc.n 802f2ce offset -= q->len; 802f2ae: 1aca subs r2, r1, r3 offset_max -= q->len; 802f2b0: 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; 802f2b4: b292 uxth r2, r2 offset_max -= q->len; 802f2b6: fa1f f989 uxth.w r9, r9 if ((offset < offset_max) && offset_max) { 802f2ba: 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; 802f2bc: 9201 str r2, [sp, #4] offset_max -= q->len; if ((offset < offset_max) && offset_max) { 802f2be: d303 bcc.n 802f2c8 break; } } } /* is this an overloaded message? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) { 802f2c0: 4a1e ldr r2, [pc, #120] ; (802f33c ) 802f2c2: 7813 ldrb r3, [r2, #0] 802f2c4: b963 cbnz r3, 802f2e0 802f2c6: e09f b.n 802f408 } if (offset >= q->len) { offset -= q->len; offset_max -= q->len; if ((offset < offset_max) && offset_max) { q = q->next; 802f2c8: 683f ldr r7, [r7, #0] LWIP_ASSERT("next pbuf was null", q); options = (u8_t*)q->payload; 802f2ca: 687b ldr r3, [r7, #4] 802f2cc: 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); 802f2ce: 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)) { 802f2d0: 9803 ldr r0, [sp, #12] 802f2d2: 5c81 ldrb r1, [r0, r2] 802f2d4: 29ff cmp r1, #255 ; 0xff 802f2d6: d0f3 beq.n 802f2c0 802f2d8: 454a cmp r2, r9 802f2da: f4ff af1d bcc.w 802f118 802f2de: e7ef b.n 802f2c0 } } } /* 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); 802f2e0: 4b17 ldr r3, [pc, #92] ; (802f340 ) dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); 802f2e2: 4916 ldr r1, [pc, #88] ; (802f33c ) } } } /* 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); 802f2e4: 681b ldr r3, [r3, #0] dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); 802f2e6: 2200 movs r2, #0 if (overload == DHCP_OVERLOAD_FILE) { 802f2e8: 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); 802f2ea: 700a strb r2, [r1, #0] if (overload == DHCP_OVERLOAD_FILE) { 802f2ec: f000 8093 beq.w 802f416 parse_file_as_options = 1; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded file field\n")); } else if (overload == DHCP_OVERLOAD_SNAME) { 802f2f0: 2b02 cmp r3, #2 802f2f2: f43f aefa beq.w 802f0ea parse_sname_as_options = 1; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname field\n")); } else if (overload == DHCP_OVERLOAD_SNAME_FILE) { 802f2f6: 2b03 cmp r3, #3 802f2f8: f040 8086 bne.w 802f408 802f2fc: e089 b.n 802f412 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); 802f2fe: 4a10 ldr r2, [pc, #64] ; (802f340 ) 802f300: 7911 ldrb r1, [r2, #4] /* message type is DHCP ACK? */ if (msg_type == DHCP_ACK) { 802f302: 2905 cmp r1, #5 802f304: d140 bne.n 802f388 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_ACK received\n")); /* in requesting state? */ if (dhcp->state == DHCP_REQUESTING) { 802f306: f898 100c ldrb.w r1, [r8, #12] 802f30a: 2901 cmp r1, #1 802f30c: d135 bne.n 802f37a * @param netif the netif under DHCP control */ static void dhcp_handle_ack(struct netif *netif) { struct dhcp *dhcp = netif->dhcp; 802f30e: 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)) { 802f310: 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); 802f312: f8c4 b028 str.w fp, [r4, #40] ; 0x28 ip_addr_set_zero(&dhcp->offered_gw_addr); 802f316: 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)) { 802f31a: b10b cbz r3, 802f320 /* remember offered lease time */ dhcp->offered_t0_lease = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_LEASE_TIME); 802f31c: 68d3 ldr r3, [r2, #12] 802f31e: 6323 str r3, [r4, #48] ; 0x30 } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) { 802f320: 4b06 ldr r3, [pc, #24] ; (802f33c ) 802f322: 791a ldrb r2, [r3, #4] 802f324: b112 cbz r2, 802f32c /* remember given renewal period */ dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1); 802f326: 4a06 ldr r2, [pc, #24] ; (802f340 ) 802f328: 6912 ldr r2, [r2, #16] 802f32a: e001 b.n 802f330 } else { /* calculate safe periods for renewal */ dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2; 802f32c: 6b22 ldr r2, [r4, #48] ; 0x30 802f32e: 0852 lsrs r2, r2, #1 } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) { 802f330: 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; 802f332: 6362 str r2, [r4, #52] ; 0x34 } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) { 802f334: b133 cbz r3, 802f344 /* remember given rebind period */ dhcp->offered_t2_rebind = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T2); 802f336: 4b02 ldr r3, [pc, #8] ; (802f340 ) 802f338: 695b ldr r3, [r3, #20] 802f33a: e004 b.n 802f346 802f33c: 2000e264 .word 0x2000e264 802f340: 2000e270 .word 0x2000e270 } else { /* calculate safe periods for rebinding */ dhcp->offered_t2_rebind = dhcp->offered_t0_lease; 802f344: 6b23 ldr r3, [r4, #48] ; 0x30 802f346: 63a3 str r3, [r4, #56] ; 0x38 } /* (y)our internet address */ ip_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); 802f348: 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)) { 802f34a: 4a39 ldr r2, [pc, #228] ; (802f430 ) /* 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); 802f34c: 691b ldr r3, [r3, #16] 802f34e: 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)) { 802f350: 7993 ldrb r3, [r2, #6] 802f352: 4616 mov r6, r2 802f354: b12b cbz r3, 802f362 /* remember given subnet mask */ ip4_addr_set_u32(&dhcp->offered_sn_mask, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SUBNET_MASK))); 802f356: 4b37 ldr r3, [pc, #220] ; (802f434 ) 802f358: 6998 ldr r0, [r3, #24] 802f35a: f7ff fba3 bl 802eaa4 dhcp->subnet_mask_given = 1; 802f35e: 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))); 802f360: 62a0 str r0, [r4, #40] ; 0x28 dhcp->subnet_mask_given = 1; } else { dhcp->subnet_mask_given = 0; 802f362: 73a3 strb r3, [r4, #14] } /* gateway router */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_ROUTER)) { 802f364: 79f3 ldrb r3, [r6, #7] 802f366: b123 cbz r3, 802f372 ip4_addr_set_u32(&dhcp->offered_gw_addr, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_ROUTER))); 802f368: 4b32 ldr r3, [pc, #200] ; (802f434 ) 802f36a: 69d8 ldr r0, [r3, #28] 802f36c: f7ff fb9a bl 802eaa4 802f370: 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); 802f372: 4628 mov r0, r5 802f374: f7ff fe0a bl 802ef8c 802f378: e03f b.n 802f3fa /* 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)) { 802f37a: 3903 subs r1, #3 802f37c: 2902 cmp r1, #2 802f37e: d83c bhi.n 802f3fa dhcp_bind(netif); 802f380: 4628 mov r0, r5 802f382: f7ff fe16 bl 802efb2 802f386: e038 b.n 802f3fa } } /* received a DHCP_NAK in appropriate state? */ else if ((msg_type == DHCP_NAK) && 802f388: 2906 cmp r1, #6 802f38a: d121 bne.n 802f3d0 802f38c: f898 300c ldrb.w r3, [r8, #12] 802f390: 2b05 cmp r3, #5 802f392: d832 bhi.n 802f3fa 802f394: f998 300c ldrsb.w r3, [r8, #12] 802f398: f04f 42b8 mov.w r2, #1543503872 ; 0x5c000000 802f39c: 409a lsls r2, r3 802f39e: d52c bpl.n 802f3fa { 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); 802f3a0: 4628 mov r0, r5 * @param netif the netif under DHCP control */ static void dhcp_handle_nak(struct netif *netif) { struct dhcp *dhcp = netif->dhcp; 802f3a2: 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); 802f3a4: f000 fc6e bl 802fc84 /* remove IP address from interface */ netif_set_ipaddr(netif, IP_ADDR_ANY); 802f3a8: 4628 mov r0, r5 802f3aa: 4923 ldr r1, [pc, #140] ; (802f438 ) 802f3ac: f000 fbba bl 802fb24 netif_set_gw(netif, IP_ADDR_ANY); 802f3b0: 4628 mov r0, r5 802f3b2: 4921 ldr r1, [pc, #132] ; (802f438 ) 802f3b4: f000 fbf2 bl 802fb9c netif_set_netmask(netif, IP_ADDR_ANY); 802f3b8: 4628 mov r0, r5 802f3ba: 491f ldr r1, [pc, #124] ; (802f438 ) 802f3bc: f000 fbf2 bl 802fba4 /* Change to a defined state */ dhcp_set_state(dhcp, DHCP_BACKING_OFF); 802f3c0: 4620 mov r0, r4 802f3c2: 210c movs r1, #12 802f3c4: f7ff fb72 bl 802eaac /* We can immediately restart discovery */ dhcp_discover(netif); 802f3c8: 4628 mov r0, r5 802f3ca: f7ff fc7f bl 802eccc 802f3ce: e014 b.n 802f3fa (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)) { 802f3d0: 2902 cmp r1, #2 802f3d2: d112 bne.n 802f3fa 802f3d4: f898 100c ldrb.w r1, [r8, #12] 802f3d8: 2906 cmp r1, #6 802f3da: d10e bne.n 802f3fa { 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)) { 802f3dc: 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; 802f3de: 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; 802f3e2: 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)) { 802f3e4: b14b cbz r3, 802f3fa ip4_addr_set_u32(&dhcp->server_ip_addr, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SERVER_ID))); 802f3e6: 6890 ldr r0, [r2, #8] 802f3e8: f7ff fb5c bl 802eaa4 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); 802f3ec: 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))); 802f3ee: 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); 802f3f0: 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); 802f3f2: 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); 802f3f4: 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); 802f3f6: f7ff fd57 bl 802eea8 dhcp->request_timeout = 0; /* remember offered lease */ dhcp_handle_offer(netif); } free_pbuf_and_return: dhcp->msg_in = NULL; 802f3fa: 2300 movs r3, #0 802f3fc: f8c8 3008 str.w r3, [r8, #8] pbuf_free(p); 802f400: 4650 mov r0, sl 802f402: f000 fc83 bl 802fd0c 802f406: e010 b.n 802f42a /* 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) { 802f408: f1bb 0f00 cmp.w fp, #0 802f40c: f47f ae6d bne.w 802f0ea 802f410: e005 b.n 802f41e 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; 802f412: 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; 802f416: 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; 802f41a: 226c movs r2, #108 ; 0x6c 802f41c: e66a b.n 802f0f4 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)) { 802f41e: 4b04 ldr r3, [pc, #16] ; (802f430 ) 802f420: 785a ldrb r2, [r3, #1] 802f422: 2a00 cmp r2, #0 802f424: f47f af6b bne.w 802f2fe 802f428: e7e7 b.n 802f3fa dhcp_handle_offer(netif); } free_pbuf_and_return: dhcp->msg_in = NULL; pbuf_free(p); } 802f42a: b00b add sp, #44 ; 0x2c 802f42c: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802f430: 2000e264 .word 0x2000e264 802f434: 2000e270 .word 0x2000e270 802f438: 08044e44 .word 0x08044e44 0802f43c : * * @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) { 802f43c: b537 push {r0, r1, r2, r4, r5, lr} LWIP_ERROR("netif != NULL", (netif != NULL), return;); 802f43e: 4605 mov r5, r0 802f440: 2800 cmp r0, #0 802f442: d037 beq.n 802f4b4 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)) { 802f444: 6a04 ldr r4, [r0, #32] 802f446: 2c00 cmp r4, #0 802f448: d034 beq.n 802f4b4 802f44a: 7b23 ldrb r3, [r4, #12] 802f44c: 2b08 cmp r3, #8 802f44e: d131 bne.n 802f4b4 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)) { 802f450: 680a ldr r2, [r1, #0] 802f452: 6a63 ldr r3, [r4, #36] ; 0x24 802f454: 429a cmp r2, r3 802f456: d12d bne.n 802f4b4 { 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); 802f458: 4620 mov r0, r4 802f45a: 210c movs r1, #12 802f45c: f7ff fb26 bl 802eaac /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_DECLINE); 802f460: 4628 mov r0, r5 802f462: 4621 mov r1, r4 802f464: 2204 movs r2, #4 802f466: f7ff fb85 bl 802eb74 if (result == ERR_OK) { 802f46a: b9f0 cbnz r0, 802f4aa dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); 802f46c: 2204 movs r2, #4 802f46e: 2132 movs r1, #50 ; 0x32 802f470: 4620 mov r0, r4 802f472: f7ff fb23 bl 802eabc dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); 802f476: 6a60 ldr r0, [r4, #36] ; 0x24 802f478: f7ff fb16 bl 802eaa8 802f47c: 4601 mov r1, r0 802f47e: 4620 mov r0, r4 802f480: f7ff fb43 bl 802eb0a dhcp_option_trailer(dhcp); 802f484: 4620 mov r0, r4 802f486: f7ff fb60 bl 802eb4a /* resize pbuf to reflect true size of options */ pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802f48a: 8b21 ldrh r1, [r4, #24] 802f48c: 6920 ldr r0, [r4, #16] 802f48e: 31f0 adds r1, #240 ; 0xf0 802f490: b289 uxth r1, r1 802f492: f000 fc62 bl 802fd5a /* per section 4.4.4, broadcast DECLINE messages */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802f496: 9500 str r5, [sp, #0] 802f498: 6860 ldr r0, [r4, #4] 802f49a: 6921 ldr r1, [r4, #16] 802f49c: 4a06 ldr r2, [pc, #24] ; (802f4b8 ) 802f49e: 2343 movs r3, #67 ; 0x43 802f4a0: f003 f9f6 bl 8032890 dhcp_delete_msg(dhcp); 802f4a4: 4620 mov r0, r4 802f4a6: f7ff fc05 bl 802ecb4 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++; 802f4aa: 7b63 ldrb r3, [r4, #13] 802f4ac: 3301 adds r3, #1 802f4ae: 7363 strb r3, [r4, #13] msecs = 10*1000; dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802f4b0: 2314 movs r3, #20 802f4b2: 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); } } } 802f4b4: bd3e pop {r1, r2, r3, r4, r5, pc} 802f4b6: bf00 nop 802f4b8: 08044e40 .word 0x08044e40 0802f4bc : * * @param netif network interface which must renew its lease */ err_t dhcp_renew(struct netif *netif) { 802f4bc: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802f4be: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must renew its lease */ err_t dhcp_renew(struct netif *netif) { 802f4c0: 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); 802f4c2: 2105 movs r1, #5 802f4c4: 4620 mov r0, r4 802f4c6: f7ff faf1 bl 802eaac /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 802f4ca: 4628 mov r0, r5 802f4cc: 4621 mov r1, r4 802f4ce: 2203 movs r2, #3 802f4d0: f7ff fb50 bl 802eb74 if (result == ERR_OK) { 802f4d4: 4606 mov r6, r0 802f4d6: b9e0 cbnz r0, 802f512 dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 802f4d8: 2202 movs r2, #2 802f4da: 4620 mov r0, r4 802f4dc: 2139 movs r1, #57 ; 0x39 802f4de: f7ff faed bl 802eabc dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 802f4e2: 8ca9 ldrh r1, [r5, #36] ; 0x24 802f4e4: 4620 mov r0, r4 802f4e6: f7ff fb00 bl 802eaea #if LWIP_NETIF_HOSTNAME dhcp_option_hostname(dhcp, netif); #endif /* LWIP_NETIF_HOSTNAME */ /* append DHCP message trailer */ dhcp_option_trailer(dhcp); 802f4ea: 4620 mov r0, r4 802f4ec: f7ff fb2d bl 802eb4a pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802f4f0: 8b21 ldrh r1, [r4, #24] 802f4f2: 6920 ldr r0, [r4, #16] 802f4f4: 31f0 adds r1, #240 ; 0xf0 802f4f6: b289 uxth r1, r1 802f4f8: f000 fc2f bl 802fd5a udp_sendto_if(dhcp->pcb, dhcp->p_out, &dhcp->server_ip_addr, DHCP_SERVER_PORT, netif); 802f4fc: 9500 str r5, [sp, #0] 802f4fe: 6860 ldr r0, [r4, #4] 802f500: 6921 ldr r1, [r4, #16] 802f502: f104 0220 add.w r2, r4, #32 802f506: 2343 movs r3, #67 ; 0x43 802f508: f003 f9c2 bl 8032890 dhcp_delete_msg(dhcp); 802f50c: 4620 mov r0, r4 802f50e: f7ff fbd1 bl 802ecb4 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++; 802f512: 7b63 ldrb r3, [r4, #13] 802f514: 3301 adds r3, #1 802f516: b2db uxtb r3, r3 /* back-off on retries, but to a maximum of 20 seconds */ msecs = dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000; 802f518: 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++; 802f51a: 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; 802f51c: d804 bhi.n 802f528 802f51e: f44f 62fa mov.w r2, #2000 ; 0x7d0 802f522: 4353 muls r3, r2 802f524: b29b uxth r3, r3 802f526: e001 b.n 802f52c 802f528: f644 6320 movw r3, #20000 ; 0x4e20 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802f52c: f44f 72fa mov.w r2, #500 ; 0x1f4 802f530: f203 13f3 addw r3, r3, #499 ; 0x1f3 802f534: fb93 f3f2 sdiv r3, r3, r2 802f538: 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; } 802f53a: 4630 mov r0, r6 802f53c: bd7c pop {r2, r3, r4, r5, r6, pc} 802f53e: 0000 movs r0, r0 0802f540 : /** * The DHCP timer that checks for lease renewal/rebind timeouts. */ void dhcp_coarse_tmr() { 802f540: b538 push {r3, r4, r5, lr} struct netif *netif = netif_list; 802f542: 4b15 ldr r3, [pc, #84] ; (802f598 ) 802f544: 4d15 ldr r5, [pc, #84] ; (802f59c ) 802f546: 681c ldr r4, [r3, #0] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_coarse_tmr()\n")); /* iterate through all network interfaces */ while (netif != NULL) { 802f548: e023 b.n 802f592 /* only act on DHCP configured interfaces */ if (netif->dhcp != NULL) { 802f54a: 6a23 ldr r3, [r4, #32] 802f54c: b303 cbz r3, 802f590 /* timer is active (non zero), and triggers (zeroes) now? */ if (netif->dhcp->t2_timeout-- == 1) { 802f54e: 8bda ldrh r2, [r3, #30] 802f550: 1e51 subs r1, r2, #1 802f552: 2a01 cmp r2, #1 802f554: 83d9 strh r1, [r3, #30] 802f556: d10b bne.n 802f570 802f558: 7b1a ldrb r2, [r3, #12] 802f55a: 2a0a cmp r2, #10 802f55c: d818 bhi.n 802f590 802f55e: f993 300c ldrsb.w r3, [r3, #12] 802f562: fa15 f303 lsls.w r3, r5, r3 802f566: d513 bpl.n 802f590 /* 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); 802f568: 4620 mov r0, r4 802f56a: f7ff fc0b bl 802ed84 802f56e: e00f b.n 802f590 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) { 802f570: 8b9a ldrh r2, [r3, #28] 802f572: 1e51 subs r1, r2, #1 802f574: 2a01 cmp r2, #1 802f576: 8399 strh r1, [r3, #28] 802f578: d10a bne.n 802f590 802f57a: 7b1a ldrb r2, [r3, #12] 802f57c: 2a0a cmp r2, #10 802f57e: d807 bhi.n 802f590 802f580: f993 300c ldrsb.w r3, [r3, #12] 802f584: fa15 f303 lsls.w r3, r5, r3 802f588: d502 bpl.n 802f590 * 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); 802f58a: 4620 mov r0, r4 802f58c: f7ff ff96 bl 802f4bc /* this clients' renewal timeout triggered */ dhcp_t1_timeout(netif); } } /* proceed to next netif */ netif = netif->next; 802f590: 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) { 802f592: 2c00 cmp r4, #0 802f594: d1d9 bne.n 802f54a } } /* proceed to next netif */ netif = netif->next; } } 802f596: bd38 pop {r3, r4, r5, pc} 802f598: 2000f6ac .word 0x2000f6ac 802f59c: 44200000 .word 0x44200000 0802f5a0 : * * @param netif network interface which must release its lease */ err_t dhcp_release(struct netif *netif) { 802f5a0: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802f5a2: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must release its lease */ err_t dhcp_release(struct netif *netif) { 802f5a4: 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); 802f5a6: 2100 movs r1, #0 802f5a8: 4620 mov r0, r4 802f5aa: f7ff fa7f bl 802eaac /* clean old DHCP offer */ ip_addr_set_zero(&dhcp->server_ip_addr); 802f5ae: 2300 movs r3, #0 802f5b0: 6223 str r3, [r4, #32] ip_addr_set_zero(&dhcp->offered_ip_addr); 802f5b2: 6263 str r3, [r4, #36] ; 0x24 ip_addr_set_zero(&dhcp->offered_sn_mask); 802f5b4: 62a3 str r3, [r4, #40] ; 0x28 ip_addr_set_zero(&dhcp->offered_gw_addr); 802f5b6: 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; 802f5b8: 63a3 str r3, [r4, #56] ; 0x38 802f5ba: 6363 str r3, [r4, #52] ; 0x34 802f5bc: 6323 str r3, [r4, #48] ; 0x30 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_RELEASE); 802f5be: 4628 mov r0, r5 802f5c0: 4621 mov r1, r4 802f5c2: 2207 movs r2, #7 802f5c4: f7ff fad6 bl 802eb74 if (result == ERR_OK) { 802f5c8: 4606 mov r6, r0 802f5ca: b998 cbnz r0, 802f5f4 dhcp_option_trailer(dhcp); 802f5cc: 4620 mov r0, r4 802f5ce: f7ff fabc bl 802eb4a pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802f5d2: 8b21 ldrh r1, [r4, #24] 802f5d4: 6920 ldr r0, [r4, #16] 802f5d6: 31f0 adds r1, #240 ; 0xf0 802f5d8: b289 uxth r1, r1 802f5da: f000 fbbe bl 802fd5a udp_sendto_if(dhcp->pcb, dhcp->p_out, &dhcp->server_ip_addr, DHCP_SERVER_PORT, netif); 802f5de: 9500 str r5, [sp, #0] 802f5e0: 6860 ldr r0, [r4, #4] 802f5e2: 6921 ldr r1, [r4, #16] 802f5e4: f104 0220 add.w r2, r4, #32 802f5e8: 2343 movs r3, #67 ; 0x43 802f5ea: f003 f951 bl 8032890 dhcp_delete_msg(dhcp); 802f5ee: 4620 mov r0, r4 802f5f0: f7ff fb60 bl 802ecb4 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++; 802f5f4: 7b63 ldrb r3, [r4, #13] 802f5f6: 3301 adds r3, #1 802f5f8: b2db uxtb r3, r3 msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802f5fa: 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++; 802f5fc: 7363 strb r3, [r4, #13] msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802f5fe: d804 bhi.n 802f60a 802f600: f44f 727a mov.w r2, #1000 ; 0x3e8 802f604: 4353 muls r3, r2 802f606: b29b uxth r3, r3 802f608: e001 b.n 802f60e 802f60a: f242 7310 movw r3, #10000 ; 0x2710 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802f60e: f44f 72fa mov.w r2, #500 ; 0x1f4 802f612: f203 13f3 addw r3, r3, #499 ; 0x1f3 802f616: fb93 f3f2 sdiv r3, r3, r2 802f61a: 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); 802f61c: 4628 mov r0, r5 802f61e: f000 fb31 bl 802fc84 /* remove IP address from interface */ netif_set_ipaddr(netif, IP_ADDR_ANY); 802f622: 4628 mov r0, r5 802f624: 4906 ldr r1, [pc, #24] ; (802f640 ) 802f626: f000 fa7d bl 802fb24 netif_set_gw(netif, IP_ADDR_ANY); 802f62a: 4628 mov r0, r5 802f62c: 4904 ldr r1, [pc, #16] ; (802f640 ) 802f62e: f000 fab5 bl 802fb9c netif_set_netmask(netif, IP_ADDR_ANY); 802f632: 4628 mov r0, r5 802f634: 4902 ldr r1, [pc, #8] ; (802f640 ) 802f636: f000 fab5 bl 802fba4 return result; } 802f63a: 4630 mov r0, r6 802f63c: bd7c pop {r2, r3, r4, r5, r6, pc} 802f63e: bf00 nop 802f640: 08044e44 .word 0x08044e44 0802f644 : * 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() { 802f644: b538 push {r3, r4, r5, lr} struct netif *netif = netif_list; 802f646: 4b26 ldr r3, [pc, #152] ; (802f6e0 ) /* 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--; 802f648: 2500 movs r5, #0 * This timer checks whether an outstanding DHCP request is timed out. */ void dhcp_fine_tmr() { struct netif *netif = netif_list; 802f64a: 681c ldr r4, [r3, #0] /* loop through netif's */ while (netif != NULL) { 802f64c: e044 b.n 802f6d8 /* only act on DHCP configured interfaces */ if (netif->dhcp != NULL) { 802f64e: 6a23 ldr r3, [r4, #32] 802f650: 2b00 cmp r3, #0 802f652: d040 beq.n 802f6d6 /* timer is active (non zero), and is about to trigger now */ if (netif->dhcp->request_timeout > 1) { 802f654: 8b5a ldrh r2, [r3, #26] 802f656: 2a01 cmp r2, #1 802f658: d902 bls.n 802f660 netif->dhcp->request_timeout--; 802f65a: 3a01 subs r2, #1 802f65c: 835a strh r2, [r3, #26] 802f65e: e03a b.n 802f6d6 } else if (netif->dhcp->request_timeout == 1) { 802f660: d139 bne.n 802f6d6 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)) { 802f662: 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--; 802f664: 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)) { 802f666: 2a0c cmp r2, #12 802f668: d028 beq.n 802f6bc 802f66a: 2a06 cmp r2, #6 802f66c: d100 bne.n 802f670 802f66e: e025 b.n 802f6bc 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) { 802f670: 2a01 cmp r2, #1 802f672: d106 bne.n 802f682 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REQUESTING, DHCP request timed out\n")); if (dhcp->tries <= 5) { 802f674: 7b5b ldrb r3, [r3, #13] 802f676: 2b05 cmp r3, #5 dhcp_select(netif); 802f678: 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) { 802f67a: d81d bhi.n 802f6b8 dhcp_select(netif); 802f67c: f7ff fc14 bl 802eea8 802f680: e029 b.n 802f6d6 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) { 802f682: 2a08 cmp r2, #8 802f684: d109 bne.n 802f69a LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): CHECKING, ARP request timed out\n")); if (dhcp->tries <= 1) { 802f686: 7b5b ldrb r3, [r3, #13] 802f688: 2b01 cmp r3, #1 dhcp_check(netif); 802f68a: 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) { 802f68c: d802 bhi.n 802f694 dhcp_check(netif); 802f68e: f7ff fc7d bl 802ef8c 802f692: e020 b.n 802f6d6 /* 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); 802f694: f7ff fc8d bl 802efb2 802f698: e01d b.n 802f6d6 } #endif /* DHCP_DOES_ARP_CHECK */ } /* did not get response to renew request? */ else if (dhcp->state == DHCP_RENEWING) { 802f69a: 2a05 cmp r2, #5 802f69c: d103 bne.n 802f6a6 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); 802f69e: 4620 mov r0, r4 802f6a0: f7ff ff0c bl 802f4bc 802f6a4: e017 b.n 802f6d6 /* did not get response to rebind request? */ } else if (dhcp->state == DHCP_REBINDING) { 802f6a6: 2a04 cmp r2, #4 802f6a8: d10a bne.n 802f6c0 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REBINDING, DHCP request timed out\n")); if (dhcp->tries <= 8) { 802f6aa: 7b5b ldrb r3, [r3, #13] 802f6ac: 2b08 cmp r3, #8 dhcp_rebind(netif); 802f6ae: 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) { 802f6b0: d802 bhi.n 802f6b8 dhcp_rebind(netif); 802f6b2: f7ff fb67 bl 802ed84 802f6b6: e00e b.n 802f6d6 } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): RELEASING, DISCOVERING\n")); dhcp_release(netif); 802f6b8: f7ff ff72 bl 802f5a0 dhcp_discover(netif); 802f6bc: 4620 mov r0, r4 802f6be: e008 b.n 802f6d2 } } else if (dhcp->state == DHCP_REBOOTING) { 802f6c0: 2a03 cmp r2, #3 802f6c2: d108 bne.n 802f6d6 if (dhcp->tries < REBOOT_TRIES) { 802f6c4: 7b5b ldrb r3, [r3, #13] 802f6c6: 2b01 cmp r3, #1 dhcp_reboot(netif); 802f6c8: 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) { 802f6ca: d802 bhi.n 802f6d2 dhcp_reboot(netif); 802f6cc: f7ff fb9c bl 802ee08 802f6d0: e001 b.n 802f6d6 } else { dhcp_discover(netif); 802f6d2: f7ff fafb bl 802eccc /* this client's request timeout triggered */ dhcp_timeout(netif); } } /* proceed to next network interface */ netif = netif->next; 802f6d6: 6824 ldr r4, [r4, #0] void dhcp_fine_tmr() { struct netif *netif = netif_list; /* loop through netif's */ while (netif != NULL) { 802f6d8: 2c00 cmp r4, #0 802f6da: d1b8 bne.n 802f64e } } /* proceed to next network interface */ netif = netif->next; } } 802f6dc: bd38 pop {r3, r4, r5, pc} 802f6de: bf00 nop 802f6e0: 2000f6ac .word 0x2000f6ac 0802f6e4 : * * @param netif The network interface to stop DHCP on */ void dhcp_stop(struct netif *netif) { 802f6e4: b510 push {r4, lr} struct dhcp *dhcp; LWIP_ERROR("dhcp_stop: netif != NULL", (netif != NULL), return;); 802f6e6: b198 cbz r0, 802f710 dhcp = netif->dhcp; /* Remove the flag that says this netif is handled by DHCP. */ netif->flags &= ~NETIF_FLAG_DHCP; 802f6e8: 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; 802f6ec: 6a04 ldr r4, [r0, #32] /* Remove the flag that says this netif is handled by DHCP. */ netif->flags &= ~NETIF_FLAG_DHCP; 802f6ee: f023 0308 bic.w r3, r3, #8 802f6f2: 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) { 802f6f6: b15c cbz r4, 802f710 autoip_stop(netif); dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; } #endif /* LWIP_DHCP_AUTOIP_COOP */ if (dhcp->pcb != NULL) { 802f6f8: 6860 ldr r0, [r4, #4] 802f6fa: b118 cbz r0, 802f704 udp_remove(dhcp->pcb); 802f6fc: f003 f974 bl 80329e8 dhcp->pcb = NULL; 802f700: 2300 movs r3, #0 802f702: 6063 str r3, [r4, #4] } LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); dhcp_set_state(dhcp, DHCP_OFF); 802f704: 4620 mov r0, r4 802f706: 2100 movs r1, #0 } } 802f708: 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); 802f70c: f7ff b9ce b.w 802eaac 802f710: bd10 pop {r4, pc} 802f712: 0000 movs r0, r0 0802f714 : * - ERR_OK - No error * - ERR_MEM - Out of memory */ err_t dhcp_start(struct netif *netif) { 802f714: b538 push {r3, r4, r5, lr} struct dhcp *dhcp; err_t result = ERR_OK; LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;); 802f716: 4604 mov r4, r0 802f718: b908 cbnz r0, 802f71e 802f71a: 20f2 movs r0, #242 ; 0xf2 802f71c: e047 b.n 802f7ae 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; 802f71e: 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; 802f722: 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; 802f724: f023 0208 bic.w r2, r3, #8 /* check hwtype of the netif */ if ((netif->flags & NETIF_FLAG_ETHARP) == 0) { 802f728: f003 0320 and.w r3, r3, #32 802f72c: 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; 802f72e: f880 202d strb.w r2, [r0, #45] ; 0x2d /* check hwtype of the netif */ if ((netif->flags & NETIF_FLAG_ETHARP) == 0) { 802f732: 2b00 cmp r3, #0 802f734: d0f1 beq.n 802f71a 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) { 802f736: 8c83 ldrh r3, [r0, #36] ; 0x24 802f738: f5b3 7f10 cmp.w r3, #576 ; 0x240 802f73c: d200 bcs.n 802f740 802f73e: e02e b.n 802f79e 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) { 802f740: b935 cbnz r5, 802f750 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): starting new DHCP client\n")); dhcp = (struct dhcp *)mem_malloc(sizeof(struct dhcp)); 802f742: 203c movs r0, #60 ; 0x3c 802f744: f000 f938 bl 802f9b8 if (dhcp == NULL) { 802f748: 4605 mov r5, r0 802f74a: b340 cbz r0, 802f79e 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; 802f74c: 6220 str r0, [r4, #32] 802f74e: e003 b.n 802f758 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) { 802f750: 6868 ldr r0, [r5, #4] 802f752: b108 cbz r0, 802f758 udp_remove(dhcp->pcb); 802f754: f003 f948 bl 80329e8 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)); 802f758: 2100 movs r1, #0 802f75a: 223c movs r2, #60 ; 0x3c 802f75c: 4628 mov r0, r5 802f75e: f7f2 f9cf bl 8021b00 /* dhcp_set_state(&dhcp, DHCP_OFF); */ /* allocate UDP PCB */ dhcp->pcb = udp_new(); 802f762: f003 f95d bl 8032a20 802f766: 6068 str r0, [r5, #4] if (dhcp->pcb == NULL) { 802f768: b1c8 cbz r0, 802f79e LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not obtain pcb\n")); return ERR_MEM; } ip_set_option(dhcp->pcb, SOF_BROADCAST); 802f76a: 7a03 ldrb r3, [r0, #8] /* set up local and remote port for the pcb */ udp_bind(dhcp->pcb, IP_ADDR_ANY, DHCP_CLIENT_PORT); 802f76c: 4911 ldr r1, [pc, #68] ; (802f7b4 ) 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); 802f76e: f043 0320 orr.w r3, r3, #32 802f772: 7203 strb r3, [r0, #8] /* set up local and remote port for the pcb */ udp_bind(dhcp->pcb, IP_ADDR_ANY, DHCP_CLIENT_PORT); 802f774: 2244 movs r2, #68 ; 0x44 802f776: 6868 ldr r0, [r5, #4] 802f778: f003 f83a bl 80327f0 udp_connect(dhcp->pcb, IP_ADDR_ANY, DHCP_SERVER_PORT); 802f77c: 490d ldr r1, [pc, #52] ; (802f7b4 ) 802f77e: 6868 ldr r0, [r5, #4] 802f780: 2243 movs r2, #67 ; 0x43 802f782: f003 f8ff bl 8032984 /* set up the recv callback and argument */ udp_recv(dhcp->pcb, dhcp_recv, netif); 802f786: 6868 ldr r0, [r5, #4] 802f788: 490b ldr r1, [pc, #44] ; (802f7b8 ) 802f78a: 4622 mov r2, r4 802f78c: f003 f928 bl 80329e0 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): starting DHCP configuration\n")); /* (re)start the DHCP negotiation */ result = dhcp_discover(netif); 802f790: 4620 mov r0, r4 802f792: f7ff fa9b bl 802eccc if (result != ERR_OK) { 802f796: b120 cbz r0, 802f7a2 /* free resources allocated above */ dhcp_stop(netif); 802f798: 4620 mov r0, r4 802f79a: f7ff ffa3 bl 802f6e4 return ERR_MEM; 802f79e: 20ff movs r0, #255 ; 0xff 802f7a0: e005 b.n 802f7ae } /* Set the flag that says this netif is handled by DHCP. */ netif->flags |= NETIF_FLAG_DHCP; 802f7a2: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 802f7a6: f043 0308 orr.w r3, r3, #8 802f7aa: f884 302d strb.w r3, [r4, #45] ; 0x2d return result; } 802f7ae: b240 sxtb r0, r0 802f7b0: bd38 pop {r3, r4, r5, pc} 802f7b2: bf00 nop 802f7b4: 08044e44 .word 0x08044e44 802f7b8: 0802f071 .word 0x0802f071 0802f7bc : /** * Perform Sanity check of user-configurable values, and initialize all modules. */ void lwip_init(void) { 802f7bc: b508 push {r3, lr} /* Modules initialization */ stats_init(); #if !NO_SYS sys_init(); 802f7be: f008 f8e8 bl 8037992 #endif /* !NO_SYS */ mem_init(); 802f7c2: f000 f80f bl 802f7e4 memp_init(); 802f7c6: f000 f95b bl 802fa80 pbuf_init(); netif_init(); 802f7ca: f000 f9a9 bl 802fb20 #endif /* LWIP_ARP */ #if LWIP_RAW raw_init(); #endif /* LWIP_RAW */ #if LWIP_UDP udp_init(); 802f7ce: f002 ff49 bl 8032664 #endif /* LWIP_UDP */ #if LWIP_TCP tcp_init(); 802f7d2: f000 fd0d bl 80301f0 #endif /* LWIP_TCP */ #if LWIP_SNMP snmp_init(); 802f7d6: f005 ff0b bl 80355f0 #endif /* LWIP_DNS */ #if LWIP_TIMERS sys_timeouts_init(); #endif /* LWIP_TIMERS */ } 802f7da: e8bd 4008 ldmia.w sp!, {r3, lr} #if LWIP_DNS dns_init(); #endif /* LWIP_DNS */ #if LWIP_TIMERS sys_timeouts_init(); 802f7de: f002 be6b b.w 80324b8 802f7e2: 0000 movs r0, r0 0802f7e4 : 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); 802f7e4: 4b0b ldr r3, [pc, #44] ; (802f814 ) 802f7e6: 4a0c ldr r2, [pc, #48] ; (802f818 ) 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]; 802f7e8: 480c ldr r0, [pc, #48] ; (802f81c ) 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); 802f7ea: f023 0303 bic.w r3, r3, #3 802f7ee: 6013 str r3, [r2, #0] /* initialize the start of the heap */ mem = (struct mem *)(void *)ram; mem->next = MEM_SIZE_ALIGNED; 802f7f0: f44f 51a0 mov.w r1, #5120 ; 0x1400 mem->prev = 0; 802f7f4: 2200 movs r2, #0 802f7f6: 805a strh r2, [r3, #2] mem->used = 0; 802f7f8: 711a strb r2, [r3, #4] /* initialize the end of the heap */ ram_end = (struct mem *)(void *)&ram[MEM_SIZE_ALIGNED]; 802f7fa: 185a adds r2, r3, r1 802f7fc: 6002 str r2, [r0, #0] ram_end->used = 1; 802f7fe: 2001 movs r0, #1 802f800: 7110 strb r0, [r2, #4] ram_end->next = MEM_SIZE_ALIGNED; ram_end->prev = MEM_SIZE_ALIGNED; 802f802: 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; 802f804: 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) { 802f806: 4806 ldr r0, [pc, #24] ; (802f820 ) 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; 802f808: 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; 802f80a: 4a06 ldr r2, [pc, #24] ; (802f824 ) 802f80c: 6013 str r3, [r2, #0] MEM_STATS_AVAIL(avail, MEM_SIZE_ALIGNED); if(sys_mutex_new(&mem_mutex) != ERR_OK) { 802f80e: f008 b88d b.w 803792c 802f812: bf00 nop 802f814: 2000e29b .word 0x2000e29b 802f818: 20000d4c .word 0x20000d4c 802f81c: 20000d44 .word 0x20000d44 802f820: 20000d48 .word 0x20000d48 802f824: 20000d40 .word 0x20000d40 0802f828 : * @param rmem is the data portion of a struct mem as returned by a previous * call to mem_malloc() */ void mem_free(void *rmem) { 802f828: b570 push {r4, r5, r6, lr} struct mem *mem; LWIP_MEM_FREE_DECL_PROTECT(); if (rmem == NULL) { 802f82a: 4604 mov r4, r0 802f82c: 2800 cmp r0, #0 802f82e: d04c beq.n 802f8ca 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) { 802f830: 4b26 ldr r3, [pc, #152] ; (802f8cc ) 802f832: 681b ldr r3, [r3, #0] 802f834: 4298 cmp r0, r3 802f836: d303 bcc.n 802f840 802f838: 4b25 ldr r3, [pc, #148] ; (802f8d0 ) 802f83a: 681b ldr r3, [r3, #0] 802f83c: 4298 cmp r0, r3 802f83e: d305 bcc.n 802f84c 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); 802f840: f008 f8c2 bl 80379c8 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(); } 802f844: 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); 802f848: f008 b8c8 b.w 80379dc return; } /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); 802f84c: 4821 ldr r0, [pc, #132] ; (802f8d4 ) 802f84e: f008 f879 bl 8037944 /* 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; 802f852: 2300 movs r3, #0 802f854: f804 3c04 strb.w r3, [r4, #-4] if (mem < lfree) { 802f858: 4b1f ldr r3, [pc, #124] ; (802f8d8 ) 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]; 802f85a: 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) { 802f85e: 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); 802f860: 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) { 802f864: 428a cmp r2, r1 /* the newly freed struct is now the lowest */ lfree = mem; 802f866: bf38 it cc 802f868: 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]; 802f86a: 4b18 ldr r3, [pc, #96] ; (802f8cc ) 802f86c: 681b ldr r3, [r3, #0] 802f86e: 1819 adds r1, r3, r0 if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) { 802f870: 428a cmp r2, r1 802f872: d011 beq.n 802f898 802f874: 790d ldrb r5, [r1, #4] 802f876: b97d cbnz r5, 802f898 802f878: 4d15 ldr r5, [pc, #84] ; (802f8d0 ) 802f87a: 682d ldr r5, [r5, #0] 802f87c: 42a9 cmp r1, r5 802f87e: d00b beq.n 802f898 /* if mem->next is unused and not end of ram, combine mem and mem->next */ if (lfree == nmem) { 802f880: 4d15 ldr r5, [pc, #84] ; (802f8d8 ) 802f882: 682e ldr r6, [r5, #0] 802f884: 428e cmp r6, r1 lfree = mem; } mem->next = nmem->next; 802f886: 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; 802f888: bf08 it eq 802f88a: 602a streq r2, [r5, #0] } mem->next = nmem->next; 802f88c: f824 1c08 strh.w r1, [r4, #-8] ((struct mem *)(void *)&ram[nmem->next])->prev = (mem_size_t)((u8_t *)mem - ram); 802f890: 5a19 ldrh r1, [r3, r0] 802f892: 1859 adds r1, r3, r1 802f894: 1ad0 subs r0, r2, r3 802f896: 8048 strh r0, [r1, #2] } /* plug hole backward */ pmem = (struct mem *)(void *)&ram[mem->prev]; 802f898: f834 0c06 ldrh.w r0, [r4, #-6] 802f89c: 1819 adds r1, r3, r0 if (pmem != mem && pmem->used == 0) { 802f89e: 4291 cmp r1, r2 802f8a0: d00e beq.n 802f8c0 802f8a2: 790d ldrb r5, [r1, #4] 802f8a4: b965 cbnz r5, 802f8c0 /* if mem->prev is unused, combine mem and mem->prev */ if (lfree == mem) { 802f8a6: 4d0c ldr r5, [pc, #48] ; (802f8d8 ) 802f8a8: 682e ldr r6, [r5, #0] 802f8aa: 4296 cmp r6, r2 lfree = pmem; } pmem->next = mem->next; 802f8ac: 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; 802f8b0: bf08 it eq 802f8b2: 6029 streq r1, [r5, #0] } pmem->next = mem->next; 802f8b4: 521a strh r2, [r3, r0] ((struct mem *)(void *)&ram[mem->next])->prev = (mem_size_t)((u8_t *)pmem - ram); 802f8b6: f834 2c08 ldrh.w r2, [r4, #-8] 802f8ba: 189a adds r2, r3, r2 802f8bc: 1acb subs r3, r1, r3 802f8be: 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(); 802f8c0: 4804 ldr r0, [pc, #16] ; (802f8d4 ) } 802f8c2: 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(); 802f8c6: f008 b849 b.w 803795c 802f8ca: bd70 pop {r4, r5, r6, pc} 802f8cc: 20000d4c .word 0x20000d4c 802f8d0: 20000d44 .word 0x20000d44 802f8d4: 20000d48 .word 0x20000d48 802f8d8: 20000d40 .word 0x20000d40 0802f8dc : * 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) { 802f8dc: 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); 802f8e0: 3103 adds r1, #3 802f8e2: f64f 75fc movw r5, #65532 ; 0xfffc 802f8e6: 400d ands r5, r1 if(newsize < MIN_SIZE_ALIGNED) { 802f8e8: 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) { 802f8ea: 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) { 802f8ec: d903 bls.n 802f8f6 /* every data block must be at least MIN_SIZE_ALIGNED long */ newsize = MIN_SIZE_ALIGNED; } if (newsize > MEM_SIZE_ALIGNED) { 802f8ee: f5b5 5fa0 cmp.w r5, #5120 ; 0x1400 802f8f2: d901 bls.n 802f8f8 802f8f4: e053 b.n 802f99e 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; 802f8f6: 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) { 802f8f8: f8df 80b8 ldr.w r8, [pc, #184] ; 802f9b4 802f8fc: f8d8 3000 ldr.w r3, [r8] 802f900: 429c cmp r4, r3 802f902: d303 bcc.n 802f90c 802f904: 4a28 ldr r2, [pc, #160] ; (802f9a8 ) 802f906: 6812 ldr r2, [r2, #0] 802f908: 4294 cmp r4, r2 802f90a: d304 bcc.n 802f916 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); 802f90c: f008 f85c bl 80379c8 MEM_STATS_INC(illegal); SYS_ARCH_UNPROTECT(lev); 802f910: f008 f864 bl 80379dc return rmem; 802f914: e044 b.n 802f9a0 } /* Get the corresponding struct mem ... */ mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); 802f916: 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; 802f91a: 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); 802f91e: 1af6 subs r6, r6, r3 size = mem->next - ptr - SIZEOF_STRUCT_MEM; 802f920: 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); 802f922: b2b6 uxth r6, r6 size = mem->next - ptr - SIZEOF_STRUCT_MEM; 802f924: 1bbf subs r7, r7, r6 802f926: b2bf uxth r7, r7 LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size); if (newsize > size) { 802f928: 42bd cmp r5, r7 802f92a: d838 bhi.n 802f99e /* not supported */ return NULL; } if (newsize == size) { 802f92c: d038 beq.n 802f9a0 /* No change in size, simply return */ return rmem; } /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); 802f92e: 481f ldr r0, [pc, #124] ; (802f9ac ) 802f930: f008 f808 bl 8037944 mem2 = (struct mem *)(void *)&ram[mem->next]; 802f934: f8d8 3000 ldr.w r3, [r8] 802f938: f834 1c08 ldrh.w r1, [r4, #-8] 802f93c: 185a adds r2, r3, r1 if(mem2->used == 0) { 802f93e: 7910 ldrb r0, [r2, #4] 802f940: b978 cbnz r0, 802f962 /* The next struct is unused, we can simply move it at little */ mem_size_t next; /* remember the old next pointer */ next = mem2->next; 802f942: 5a5f ldrh r7, [r3, r1] /* create new struct mem which is moved directly after the shrinked mem */ ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; 802f944: f106 0108 add.w r1, r6, #8 802f948: 186d adds r5, r5, r1 if (lfree == mem2) { 802f94a: 4919 ldr r1, [pc, #100] ; (802f9b0 ) 802f94c: 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; 802f94e: b2ad uxth r5, r5 if (lfree == mem2) { 802f950: 4290 cmp r0, r2 802f952: eb03 0205 add.w r2, r3, r5 lfree = (struct mem *)(void *)&ram[ptr2]; 802f956: bf08 it eq 802f958: 600a streq r2, [r1, #0] } mem2 = (struct mem *)(void *)&ram[ptr2]; mem2->used = 0; 802f95a: 2100 movs r1, #0 802f95c: 7111 strb r1, [r2, #4] /* restore the next pointer */ mem2->next = next; 802f95e: 535f strh r7, [r3, r5] 802f960: e010 b.n 802f984 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) { 802f962: f105 0214 add.w r2, r5, #20 802f966: 42ba cmp r2, r7 802f968: d815 bhi.n 802f996 * @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) { 802f96a: 4811 ldr r0, [pc, #68] ; (802f9b0 ) * 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; 802f96c: f106 0208 add.w r2, r6, #8 802f970: 18ad adds r5, r5, r2 mem2 = (struct mem *)(void *)&ram[ptr2]; if (mem2 < lfree) { 802f972: 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; 802f974: b2ad uxth r5, r5 mem2 = (struct mem *)(void *)&ram[ptr2]; 802f976: 195a adds r2, r3, r5 if (mem2 < lfree) { 802f978: 42ba cmp r2, r7 lfree = mem2; 802f97a: bf38 it cc 802f97c: 6002 strcc r2, [r0, #0] } mem2->used = 0; mem2->next = mem->next; 802f97e: 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; 802f980: 2000 movs r0, #0 802f982: 7110 strb r0, [r2, #4] mem2->next = mem->next; mem2->prev = ptr; 802f984: 8056 strh r6, [r2, #2] mem->next = ptr2; 802f986: f824 5c08 strh.w r5, [r4, #-8] if (mem2->next != MEM_SIZE_ALIGNED) { 802f98a: 5b5a ldrh r2, [r3, r5] 802f98c: f5b2 5fa0 cmp.w r2, #5120 ; 0x1400 ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; 802f990: bf1c itt ne 802f992: 189b addne r3, r3, r2 802f994: 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(); 802f996: 4805 ldr r0, [pc, #20] ; (802f9ac ) 802f998: f007 ffe0 bl 803795c return rmem; 802f99c: e000 b.n 802f9a0 /* every data block must be at least MIN_SIZE_ALIGNED long */ newsize = MIN_SIZE_ALIGNED; } if (newsize > MEM_SIZE_ALIGNED) { return NULL; 802f99e: 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; } 802f9a0: 4620 mov r0, r4 802f9a2: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802f9a6: bf00 nop 802f9a8: 20000d44 .word 0x20000d44 802f9ac: 20000d48 .word 0x20000d48 802f9b0: 20000d40 .word 0x20000d40 802f9b4: 20000d4c .word 0x20000d4c 0802f9b8 : * * Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT). */ void * mem_malloc(mem_size_t size) { 802f9b8: 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) { 802f9ba: 2800 cmp r0, #0 802f9bc: d056 beq.n 802fa6c return NULL; } /* Expand the size of the allocated memory region so that we can adjust for alignment. */ size = LWIP_MEM_ALIGN_SIZE(size); 802f9be: 3003 adds r0, #3 802f9c0: f64f 74fc movw r4, #65532 ; 0xfffc 802f9c4: 4004 ands r4, r0 if(size < MIN_SIZE_ALIGNED) { 802f9c6: 2c0b cmp r4, #11 802f9c8: d903 bls.n 802f9d2 /* every data block must be at least MIN_SIZE_ALIGNED long */ size = MIN_SIZE_ALIGNED; } if (size > MEM_SIZE_ALIGNED) { 802f9ca: f5b4 5fa0 cmp.w r4, #5120 ; 0x1400 802f9ce: d901 bls.n 802f9d4 802f9d0: e04b b.n 802fa6a 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; 802f9d2: 240c movs r4, #12 if (size > MEM_SIZE_ALIGNED) { return NULL; } /* protect the heap from concurrent access */ sys_mutex_lock(&mem_mutex); 802f9d4: 4826 ldr r0, [pc, #152] ; (802fa70 ) 802f9d6: f007 ffb5 bl 8037944 #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; 802f9da: 4b26 ldr r3, [pc, #152] ; (802fa74 ) 802f9dc: 6819 ldr r1, [r3, #0] 802f9de: 4b26 ldr r3, [pc, #152] ; (802fa78 ) 802f9e0: 681a ldr r2, [r3, #0] 802f9e2: 1a8b subs r3, r1, r2 802f9e4: b29b uxth r3, r3 802f9e6: f5c4 5ea0 rsb lr, r4, #5120 ; 0x1400 802f9ea: e039 b.n 802fa60 ptr = ((struct mem *)(void *)&ram[ptr])->next) { mem = (struct mem *)(void *)&ram[ptr]; 802f9ec: 18d5 adds r5, r2, r3 local_mem_free_count = 1; break; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if ((!mem->used) && 802f9ee: 792f ldrb r7, [r5, #4] 802f9f0: 2f00 cmp r7, #0 802f9f2: d134 bne.n 802fa5e (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) { 802f9f4: 5ad6 ldrh r6, [r2, r3] 802f9f6: f1a6 0008 sub.w r0, r6, #8 802f9fa: 1ac0 subs r0, r0, r3 local_mem_free_count = 1; break; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if ((!mem->used) && 802f9fc: 42a0 cmp r0, r4 802f9fe: d32e bcc.n 802fa5e (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)) { 802fa00: f104 0e14 add.w lr, r4, #20 802fa04: 4570 cmp r0, lr 802fa06: d310 bcc.n 802fa2a * 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; 802fa08: 3408 adds r4, #8 802fa0a: 191c adds r4, r3, r4 802fa0c: b2a4 uxth r4, r4 /* create mem2 struct */ mem2 = (struct mem *)(void *)&ram[ptr2]; 802fa0e: 1910 adds r0, r2, r4 mem2->used = 0; mem2->next = mem->next; 802fa10: 5316 strh r6, [r2, r4] mem2->prev = ptr; 802fa12: 8043 strh r3, [r0, #2] /* and insert it between mem and mem->next */ mem->next = ptr2; 802fa14: 802c strh r4, [r5, #0] mem->used = 1; 802fa16: 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; 802fa18: 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; 802fa1a: 712b strb r3, [r5, #4] if (mem2->next != MEM_SIZE_ALIGNED) { 802fa1c: 5b13 ldrh r3, [r2, r4] 802fa1e: f5b3 5fa0 cmp.w r3, #5120 ; 0x1400 802fa22: d004 beq.n 802fa2e ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; 802fa24: 18d2 adds r2, r2, r3 802fa26: 8054 strh r4, [r2, #2] 802fa28: e001 b.n 802fa2e * 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; 802fa2a: 2301 movs r3, #1 802fa2c: 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) { 802fa2e: 428d cmp r5, r1 802fa30: d10f bne.n 802fa52 struct mem *cur = lfree; /* Find next free block after mem and update lowest free pointer */ while (cur->used && cur != ram_end) { 802fa32: 4b12 ldr r3, [pc, #72] ; (802fa7c ) 802fa34: 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]; 802fa36: 4b10 ldr r3, [pc, #64] ; (802fa78 ) 802fa38: 6819 ldr r1, [r3, #0] 802fa3a: 462b mov r3, r5 802fa3c: e001 b.n 802fa42 802fa3e: 881b ldrh r3, [r3, #0] 802fa40: 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) { 802fa42: 7918 ldrb r0, [r3, #4] 802fa44: b910 cbnz r0, 802fa4c goto mem_malloc_adjust_lfree; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ cur = (struct mem *)(void *)&ram[cur->next]; } lfree = cur; 802fa46: 4a0b ldr r2, [pc, #44] ; (802fa74 ) 802fa48: 6013 str r3, [r2, #0] 802fa4a: e002 b.n 802fa52 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) { 802fa4c: 4293 cmp r3, r2 802fa4e: d1f6 bne.n 802fa3e 802fa50: e7f9 b.n 802fa46 } lfree = cur; LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used))); } LWIP_MEM_ALLOC_UNPROTECT(); sys_mutex_unlock(&mem_mutex); 802fa52: 4807 ldr r0, [pc, #28] ; (802fa70 ) 802fa54: f007 ff82 bl 803795c 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; 802fa58: f105 0008 add.w r0, r5, #8 802fa5c: 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) { 802fa5e: 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; 802fa60: 4573 cmp r3, lr 802fa62: dbc3 blt.n 802f9ec } 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); 802fa64: 4802 ldr r0, [pc, #8] ; (802fa70 ) 802fa66: f007 ff79 bl 803795c 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; 802fa6a: 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; } 802fa6c: bdf8 pop {r3, r4, r5, r6, r7, pc} 802fa6e: bf00 nop 802fa70: 20000d48 .word 0x20000d48 802fa74: 20000d40 .word 0x20000d40 802fa78: 20000d4c .word 0x20000d4c 802fa7c: 20000d44 .word 0x20000d44 0802fa80 : 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); 802fa80: 4a0e ldr r2, [pc, #56] ; (802fabc ) 802fa82: 490f ldr r1, [pc, #60] ; (802fac0 ) * * Carves out memp_memory into linked lists for each pool-type. */ void memp_init(void) { 802fa84: 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); 802fa86: 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) { 802fa88: 4e0e ldr r6, [pc, #56] ; (802fac4 ) memp->next = memp_tab[i]; memp_tab[i] = memp; memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + memp_sizes[i] 802fa8a: 4f0f ldr r7, [pc, #60] ; (802fac8 ) 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); 802fa8c: 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; 802fa90: 461d mov r5, r3 802fa92: 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) { 802fa96: f833 c006 ldrh.w ip, [r3, r6] 802fa9a: 2000 movs r0, #0 802fa9c: e008 b.n 802fab0 memp->next = memp_tab[i]; 802fa9e: f851 4c04 ldr.w r4, [r1, #-4] 802faa2: 6014 str r4, [r2, #0] memp_tab[i] = memp; memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + memp_sizes[i] 802faa4: 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; 802faa6: 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) { 802faaa: 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] 802faac: 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) { 802faae: b280 uxth r0, r0 802fab0: 4560 cmp r0, ip 802fab2: d1f4 bne.n 802fa9e 802fab4: 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) { 802fab6: 2b20 cmp r3, #32 802fab8: d1eb bne.n 802fa92 #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 */ } 802faba: bdf0 pop {r4, r5, r6, r7, pc} 802fabc: 20000d53 .word 0x20000d53 802fac0: 2000c390 .word 0x2000c390 802fac4: 08044ddc .word 0x08044ddc 802fac8: 08044dfc .word 0x08044dfc 0802facc : #endif { struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); 802facc: 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 { 802face: b538 push {r3, r4, r5, lr} 802fad0: 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;); 802fad2: d80b bhi.n 802faec SYS_ARCH_PROTECT(old_level); 802fad4: f007 ff78 bl 80379c8 #if MEMP_OVERFLOW_CHECK >= 2 memp_overflow_check_all(); #endif /* MEMP_OVERFLOW_CHECK >= 2 */ memp = memp_tab[type]; 802fad8: 4b06 ldr r3, [pc, #24] ; (802faf4 ) 802fada: f853 4025 ldr.w r4, [r3, r5, lsl #2] if (memp != NULL) { 802fade: b114 cbz r4, 802fae6 memp_tab[type] = memp->next; 802fae0: 6822 ldr r2, [r4, #0] 802fae2: 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); 802fae6: f007 ff79 bl 80379dc return memp; 802faea: e000 b.n 802faee #endif { struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); 802faec: 2400 movs r4, #0 } SYS_ARCH_UNPROTECT(old_level); return memp; } 802faee: 4620 mov r0, r4 802faf0: bd38 pop {r3, r4, r5, pc} 802faf2: bf00 nop 802faf4: 2000c390 .word 0x2000c390 0802faf8 : * @param type the pool where to put mem * @param mem the memp element to free */ void memp_free(memp_t type, void *mem) { 802faf8: b538 push {r3, r4, r5, lr} 802fafa: 4605 mov r5, r0 struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); if (mem == NULL) { 802fafc: 460c mov r4, r1 802fafe: b159 cbz r1, 802fb18 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); 802fb00: f007 ff62 bl 80379c8 #endif /* MEMP_OVERFLOW_CHECK >= 2 */ #endif /* MEMP_OVERFLOW_CHECK */ MEMP_STATS_DEC(used, type); memp->next = memp_tab[type]; 802fb04: 4b05 ldr r3, [pc, #20] ; (802fb1c ) 802fb06: f853 2025 ldr.w r2, [r3, r5, lsl #2] 802fb0a: 6022 str r2, [r4, #0] memp_tab[type] = memp; 802fb0c: 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); } 802fb10: 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); 802fb14: f007 bf62 b.w 80379dc 802fb18: bd38 pop {r3, r4, r5, pc} 802fb1a: bf00 nop 802fb1c: 2000c390 .word 0x2000c390 0802fb20 : } #endif /* LWIP_HAVE_LOOPIF */ void netif_init(void) { 802fb20: 4770 bx lr 802fb22: 0000 movs r0, r0 0802fb24 : * @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) { 802fb24: b570 push {r4, r5, r6, lr} 802fb26: 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) { 802fb28: 460d mov r5, r1 802fb2a: b941 cbnz r1, 802fb3e ip_addr_set(&(lpcb->local_ip), ipaddr); } } } #endif snmp_delete_ipaddridx_tree(netif); 802fb2c: 4620 mov r0, r4 802fb2e: f004 fed7 bl 80348e0 snmp_delete_iprteidx_tree(0,netif); 802fb32: 2000 movs r0, #0 802fb34: 4621 mov r1, r4 802fb36: f004 ff69 bl 8034a0c /* set new IP address to netif */ ip_addr_set(&(netif->ip_addr), ipaddr); 802fb3a: b9fd cbnz r5, 802fb7c 802fb3c: e01f b.n 802fb7e #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) { 802fb3e: 680a ldr r2, [r1, #0] 802fb40: 6843 ldr r3, [r0, #4] 802fb42: 429a cmp r2, r3 802fb44: d0f2 beq.n 802fb2c /* 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; 802fb46: 4b13 ldr r3, [pc, #76] ; (802fb94 ) 802fb48: 6818 ldr r0, [r3, #0] while (pcb != NULL) { 802fb4a: e007 b.n 802fb5c /* PCB bound to current local interface address? */ if (ip_addr_cmp(&(pcb->local_ip), &(netif->ip_addr)) 802fb4c: 6802 ldr r2, [r0, #0] 802fb4e: 6863 ldr r3, [r4, #4] 802fb50: 68c6 ldr r6, [r0, #12] 802fb52: 429a cmp r2, r3 802fb54: d101 bne.n 802fb5a #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); 802fb56: f000 fe0b bl 8030770 pcb = next; } else { pcb = pcb->next; 802fb5a: 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) { 802fb5c: 2800 cmp r0, #0 802fb5e: d1f5 bne.n 802fb4c pcb = next; } else { pcb = pcb->next; } } for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 802fb60: 4b0d ldr r3, [pc, #52] ; (802fb98 ) 802fb62: 681b ldr r3, [r3, #0] 802fb64: e007 b.n 802fb76 /* PCB bound to current local interface address? */ if ((!(ip_addr_isany(&(lpcb->local_ip)))) && 802fb66: 681a ldr r2, [r3, #0] 802fb68: b122 cbz r2, 802fb74 802fb6a: 6861 ldr r1, [r4, #4] 802fb6c: 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); 802fb6e: bf04 itt eq 802fb70: 682a ldreq r2, [r5, #0] 802fb72: 601a streq r2, [r3, #0] pcb = next; } else { pcb = pcb->next; } } for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 802fb74: 68db ldr r3, [r3, #12] 802fb76: 2b00 cmp r3, #0 802fb78: d1f5 bne.n 802fb66 802fb7a: e7d7 b.n 802fb2c } #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); 802fb7c: 682d ldr r5, [r5, #0] snmp_insert_ipaddridx_tree(netif); 802fb7e: 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); 802fb80: 6065 str r5, [r4, #4] snmp_insert_ipaddridx_tree(netif); 802fb82: f004 fe6b bl 803485c snmp_insert_iprteidx_tree(0,netif); 802fb86: 2000 movs r0, #0 802fb88: 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))); } 802fb8a: 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); 802fb8e: f004 bef1 b.w 8034974 802fb92: bf00 nop 802fb94: 2000f6b8 .word 0x2000f6b8 802fb98: 2000f6c0 .word 0x2000f6c0 0802fb9c : * @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); 802fb9c: b101 cbz r1, 802fba0 802fb9e: 6809 ldr r1, [r1, #0] 802fba0: 60c1 str r1, [r0, #12] 802fba2: 4770 bx lr 0802fba4 : * @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) { 802fba4: b538 push {r3, r4, r5, lr} 802fba6: 4604 mov r4, r0 802fba8: 460d mov r5, r1 snmp_delete_iprteidx_tree(0, netif); 802fbaa: 2000 movs r0, #0 802fbac: 4621 mov r1, r4 802fbae: f004 ff2d bl 8034a0c /* set new netmask to netif */ ip_addr_set(&(netif->netmask), netmask); 802fbb2: b105 cbz r5, 802fbb6 802fbb4: 682d ldr r5, [r5, #0] snmp_insert_iprteidx_tree(0, netif); 802fbb6: 2000 movs r0, #0 802fbb8: 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); 802fbba: 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))); } 802fbbc: 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); 802fbc0: f004 bed8 b.w 8034974 0802fbc4 : * @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) { 802fbc4: b570 push {r4, r5, r6, lr} 802fbc6: 4605 mov r5, r0 802fbc8: 4616 mov r6, r2 802fbca: 461c mov r4, r3 netif_set_ipaddr(netif, ipaddr); 802fbcc: f7ff ffaa bl 802fb24 netif_set_netmask(netif, netmask); 802fbd0: 4628 mov r0, r5 802fbd2: 4631 mov r1, r6 802fbd4: f7ff ffe6 bl 802fba4 * @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); 802fbd8: b104 cbz r4, 802fbdc 802fbda: 6824 ldr r4, [r4, #0] 802fbdc: 60ec str r4, [r5, #12] 802fbde: bd70 pop {r4, r5, r6, pc} 0802fbe0 : * @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) { 802fbe0: 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; 802fbe2: 9e06 ldr r6, [sp, #24] 802fbe4: 61c6 str r6, [r0, #28] netif->num = netif_num++; 802fbe6: 4e10 ldr r6, [pc, #64] ; (802fc28 ) 802fbe8: 7837 ldrb r7, [r6, #0] 802fbea: f880 7030 strb.w r7, [r0, #48] ; 0x30 802fbee: 3701 adds r7, #1 802fbf0: 7037 strb r7, [r6, #0] netif->input = input; 802fbf2: 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); 802fbf4: 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) { 802fbf6: 4604 mov r4, r0 LWIP_ASSERT("No init function given", init != NULL); /* reset new interface configuration state */ ip_addr_set_zero(&netif->ip_addr); 802fbf8: 6045 str r5, [r0, #4] ip_addr_set_zero(&netif->netmask); 802fbfa: 6085 str r5, [r0, #8] ip_addr_set_zero(&netif->gw); 802fbfc: 60c5 str r5, [r0, #12] netif->flags = 0; 802fbfe: f880 502d strb.w r5, [r0, #45] ; 0x2d #if LWIP_DHCP /* netif not under DHCP control by default */ netif->dhcp = NULL; 802fc02: 6205 str r5, [r0, #32] #endif /* ENABLE_LOOPBACK */ /* remember netif specific state information data */ netif->state = state; netif->num = netif_num++; netif->input = input; 802fc04: 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); 802fc06: f7ff ffdd bl 802fbc4 /* call user specified initialization function for netif */ if (init(netif) != ERR_OK) { 802fc0a: 4620 mov r0, r4 802fc0c: 9b07 ldr r3, [sp, #28] 802fc0e: 4798 blx r3 802fc10: b930 cbnz r0, 802fc20 return NULL; } /* add this netif to the list */ netif->next = netif_list; 802fc12: 4b06 ldr r3, [pc, #24] ; (802fc2c ) 802fc14: 681a ldr r2, [r3, #0] 802fc16: 6022 str r2, [r4, #0] netif_list = netif; 802fc18: 601c str r4, [r3, #0] snmp_inc_iflist(); 802fc1a: f004 fd03 bl 8034624 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; 802fc1e: e000 b.n 802fc22 netif_set_addr(netif, ipaddr, netmask, gw); /* call user specified initialization function for netif */ if (init(netif) != ERR_OK) { return NULL; 802fc20: 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; } 802fc22: 4620 mov r0, r4 802fc24: bdf8 pop {r3, r4, r5, r6, r7, pc} 802fc26: bf00 nop 802fc28: 2000c3d0 .word 0x2000c3d0 802fc2c: 2000f6ac .word 0x2000f6ac 0802fc30 : * * @param netif the default network interface */ void netif_set_default(struct netif *netif) { 802fc30: b510 push {r4, lr} if (netif == NULL) { 802fc32: 4604 mov r4, r0 /* remove default route */ snmp_delete_iprteidx_tree(1, netif); 802fc34: 4621 mov r1, r4 802fc36: 2001 movs r0, #1 * @param netif the default network interface */ void netif_set_default(struct netif *netif) { if (netif == NULL) { 802fc38: b914 cbnz r4, 802fc40 /* remove default route */ snmp_delete_iprteidx_tree(1, netif); 802fc3a: f004 fee7 bl 8034a0c 802fc3e: e001 b.n 802fc44 } else { /* install default route */ snmp_insert_iprteidx_tree(1, netif); 802fc40: f004 fe98 bl 8034974 } netif_default = netif; 802fc44: 4b01 ldr r3, [pc, #4] ; (802fc4c ) 802fc46: 601c str r4, [r3, #0] 802fc48: bd10 pop {r4, pc} 802fc4a: bf00 nop 802fc4c: 2000f6b0 .word 0x2000f6b0 0802fc50 : * up once configured. * * @see dhcp_start() */ void netif_set_up(struct netif *netif) { 802fc50: b510 push {r4, lr} if (!(netif->flags & NETIF_FLAG_UP)) { 802fc52: f890 302d ldrb.w r3, [r0, #45] ; 0x2d 802fc56: 07da lsls r2, r3, #31 * up once configured. * * @see dhcp_start() */ void netif_set_up(struct netif *netif) { 802fc58: 4604 mov r4, r0 if (!(netif->flags & NETIF_FLAG_UP)) { 802fc5a: d412 bmi.n 802fc82 netif->flags |= NETIF_FLAG_UP; 802fc5c: f043 0301 orr.w r3, r3, #1 802fc60: f880 302d strb.w r3, [r0, #45] ; 0x2d #if LWIP_SNMP snmp_get_sysuptime(&netif->ts); 802fc64: 3038 adds r0, #56 ; 0x38 802fc66: f004 fc77 bl 8034558 * @note: Enabling DHCP on a down interface will make it come * up once configured. * * @see dhcp_start() */ void netif_set_up(struct netif *netif) 802fc6a: 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)) { 802fc6e: f003 0330 and.w r3, r3, #48 ; 0x30 802fc72: 2b30 cmp r3, #48 ; 0x30 802fc74: d105 bne.n 802fc82 etharp_gratuitous(netif); 802fc76: 4620 mov r0, r4 802fc78: 1d21 adds r1, r4, #4 igmp_report_groups( netif); } #endif /* LWIP_IGMP */ } } } 802fc7a: 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); 802fc7e: f007 b9c9 b.w 8037014 802fc82: bd10 pop {r4, pc} 0802fc84 : * up once configured. * * @see dhcp_start() */ void netif_set_down(struct netif *netif) { 802fc84: b510 push {r4, lr} if (netif->flags & NETIF_FLAG_UP) { 802fc86: f890 302d ldrb.w r3, [r0, #45] ; 0x2d 802fc8a: 07d9 lsls r1, r3, #31 * up once configured. * * @see dhcp_start() */ void netif_set_down(struct netif *netif) { 802fc8c: 4604 mov r4, r0 if (netif->flags & NETIF_FLAG_UP) { 802fc8e: d511 bpl.n 802fcb4 netif->flags &= ~NETIF_FLAG_UP; 802fc90: f023 0301 bic.w r3, r3, #1 802fc94: f880 302d strb.w r3, [r0, #45] ; 0x2d #if LWIP_SNMP snmp_get_sysuptime(&netif->ts); 802fc98: 3038 adds r0, #56 ; 0x38 802fc9a: f004 fc5d bl 8034558 #endif #if LWIP_ARP if (netif->flags & NETIF_FLAG_ETHARP) { 802fc9e: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 802fca2: f003 0320 and.w r3, r3, #32 802fca6: b2db uxtb r3, r3 802fca8: b123 cbz r3, 802fcb4 etharp_cleanup_netif(netif); 802fcaa: 4620 mov r0, r4 } #endif /* LWIP_ARP */ NETIF_STATUS_CALLBACK(netif); } } 802fcac: 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); 802fcb0: f007 b980 b.w 8036fb4 802fcb4: bd10 pop {r4, pc} 0802fcb6 : * @return non-zero on failure, zero on success. * */ u8_t pbuf_header(struct pbuf *p, s16_t header_size_increment) { 802fcb6: 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)) { 802fcb8: b321 cbz r1, 802fd04 802fcba: b330 cbz r0, 802fd0a return 0; } if (header_size_increment < 0){ 802fcbc: 2900 cmp r1, #0 802fcbe: da05 bge.n 802fccc increment_magnitude = -header_size_increment; 802fcc0: 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;); 802fcc2: 8942 ldrh r2, [r0, #10] if ((header_size_increment == 0) || (p == NULL)) { return 0; } if (header_size_increment < 0){ increment_magnitude = -header_size_increment; 802fcc4: 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;); 802fcc6: 429a cmp r2, r3 802fcc8: d201 bcs.n 802fcce 802fcca: e01d b.n 802fd08 } else { increment_magnitude = header_size_increment; 802fccc: 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; 802fcce: 7b02 ldrb r2, [r0, #12] /* remember current payload pointer */ payload = p->payload; 802fcd0: 6844 ldr r4, [r0, #4] /* pbuf types containing payloads? */ if (type == PBUF_RAM || type == PBUF_POOL) { 802fcd2: b10a cbz r2, 802fcd8 802fcd4: 2a03 cmp r2, #3 802fcd6: d105 bne.n 802fce4 /* set new payload pointer */ p->payload = (u8_t *)p->payload - header_size_increment; 802fcd8: 1a64 subs r4, r4, r1 /* boundary check fails? */ if ((u8_t *)p->payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) { 802fcda: f100 0310 add.w r3, r0, #16 802fcde: 429c cmp r4, r3 802fce0: d312 bcc.n 802fd08 802fce2: e008 b.n 802fcf6 p->payload = payload; /* bail out unsuccesfully */ return 1; } /* pbuf types refering to external payloads? */ } else if (type == PBUF_REF || type == PBUF_ROM) { 802fce4: 3a01 subs r2, #1 802fce6: 2a01 cmp r2, #1 802fce8: d80e bhi.n 802fd08 /* hide a header in the payload? */ if ((header_size_increment < 0) && (increment_magnitude <= p->len)) { 802fcea: 2900 cmp r1, #0 802fcec: da0c bge.n 802fd08 802fcee: 8942 ldrh r2, [r0, #10] 802fcf0: 429a cmp r2, r3 802fcf2: d309 bcc.n 802fd08 /* increase payload pointer */ p->payload = (u8_t *)p->payload - header_size_increment; 802fcf4: 1a64 subs r4, r4, r1 /* Unknown type */ LWIP_ASSERT("bad pbuf type", 0); return 1; } /* modify pbuf length fields */ p->len += header_size_increment; 802fcf6: 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; 802fcf8: 6044 str r4, [r0, #4] /* Unknown type */ LWIP_ASSERT("bad pbuf type", 0); return 1; } /* modify pbuf length fields */ p->len += header_size_increment; 802fcfa: 18cb adds r3, r1, r3 802fcfc: 8143 strh r3, [r0, #10] p->tot_len += header_size_increment; 802fcfe: 8903 ldrh r3, [r0, #8] 802fd00: 18c9 adds r1, r1, r3 802fd02: 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; 802fd04: 2000 movs r0, #0 802fd06: 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;); 802fd08: 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; } 802fd0a: bd10 pop {r4, pc} 0802fd0c : * 1->1->1 becomes ....... * */ u8_t pbuf_free(struct pbuf *p) { 802fd0c: b570 push {r4, r5, r6, lr} u16_t type; struct pbuf *q; u8_t count; if (p == NULL) { 802fd0e: 4604 mov r4, r0 802fd10: b300 cbz r0, 802fd54 802fd12: 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); 802fd14: f007 fe58 bl 80379c8 /* 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); 802fd18: 89e6 ldrh r6, [r4, #14] 802fd1a: 3e01 subs r6, #1 802fd1c: b2b6 uxth r6, r6 802fd1e: 81e6 strh r6, [r4, #14] SYS_ARCH_UNPROTECT(old_level); 802fd20: f007 fe5c bl 80379dc /* this pbuf is no longer referenced to? */ if (ref == 0) { 802fd24: b9be cbnz r6, 802fd56 /* 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; 802fd26: 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; 802fd28: 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) { 802fd2a: 2b03 cmp r3, #3 802fd2c: d101 bne.n 802fd32 memp_free(MEMP_PBUF_POOL, p); 802fd2e: 200f movs r0, #15 802fd30: e003 b.n 802fd3a /* is this a ROM or RAM referencing pbuf? */ } else if (type == PBUF_ROM || type == PBUF_REF) { 802fd32: 3b01 subs r3, #1 802fd34: 2b01 cmp r3, #1 802fd36: d804 bhi.n 802fd42 memp_free(MEMP_PBUF, p); 802fd38: 200e movs r0, #14 802fd3a: 4621 mov r1, r4 802fd3c: f7ff fedc bl 802faf8 802fd40: e002 b.n 802fd48 /* type == PBUF_RAM */ } else { mem_free(p); 802fd42: 4620 mov r0, r4 802fd44: f7ff fd70 bl 802f828 } } count++; 802fd48: 3501 adds r5, #1 802fd4a: 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) { 802fd4c: 4634 mov r4, r6 802fd4e: 2e00 cmp r6, #0 802fd50: d1e0 bne.n 802fd14 802fd52: e000 b.n 802fd56 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; 802fd54: 4605 mov r5, r0 } } PERF_STOP("pbuf_free"); /* return number of de-allocated pbufs */ return count; } 802fd56: 4628 mov r0, r5 802fd58: bd70 pop {r4, r5, r6, pc} 0802fd5a : * * @note Despite its name, pbuf_realloc cannot grow the size of a pbuf (chain). */ void pbuf_realloc(struct pbuf *p, u16_t new_len) { 802fd5a: 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) { 802fd5c: 8903 ldrh r3, [r0, #8] 802fd5e: 4299 cmp r1, r3 802fd60: d220 bcs.n 802fda4 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; 802fd62: 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) { 802fd64: 460d mov r5, r1 802fd66: 4604 mov r4, r0 802fd68: e005 b.n 802fd76 /* decrease remaining length by pbuf length */ rem_len -= q->len; 802fd6a: 1aed subs r5, r5, r3 /* decrease total length indicator */ LWIP_ASSERT("grow < max_u16_t", grow < 0xffff); q->tot_len += (u16_t)grow; 802fd6c: 8923 ldrh r3, [r4, #8] 802fd6e: 18d3 adds r3, r2, r3 802fd70: 8123 strh r3, [r4, #8] /* proceed to next pbuf in chain */ q = q->next; 802fd72: 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; 802fd74: 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) { 802fd76: 8963 ldrh r3, [r4, #10] 802fd78: 429d cmp r5, r3 802fd7a: d8f6 bhi.n 802fd6a /* 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)) { 802fd7c: 7b22 ldrb r2, [r4, #12] 802fd7e: b94a cbnz r2, 802fd94 802fd80: 429d cmp r5, r3 802fd82: d007 beq.n 802fd94 /* 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); 802fd84: 6863 ldr r3, [r4, #4] 802fd86: 1b1b subs r3, r3, r4 802fd88: 18e9 adds r1, r5, r3 802fd8a: 4620 mov r0, r4 802fd8c: b289 uxth r1, r1 802fd8e: f7ff fda5 bl 802f8dc 802fd92: 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) { 802fd94: 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; 802fd96: 8165 strh r5, [r4, #10] q->tot_len = q->len; 802fd98: 8125 strh r5, [r4, #8] /* any remaining pbufs in chain? */ if (q->next != NULL) { 802fd9a: b108 cbz r0, 802fda0 /* free remaining pbufs in chain */ pbuf_free(q->next); 802fd9c: f7ff ffb6 bl 802fd0c } /* q is last packet in chain */ q->next = NULL; 802fda0: 2300 movs r3, #0 802fda2: 6023 str r3, [r4, #0] 802fda4: bd38 pop {r3, r4, r5, pc} 0802fda6 : * @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) { 802fda6: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 802fdaa: 460d mov r5, r1 802fdac: 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) { 802fdae: 2803 cmp r0, #3 802fdb0: d87c bhi.n 802feac 802fdb2: e8df f000 tbb [pc, r0] 802fdb6: 0802 .short 0x0802 802fdb8: 0604 .short 0x0604 case PBUF_TRANSPORT: /* add room for transport (often TCP) layer header */ offset = PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN; 802fdba: 2636 movs r6, #54 ; 0x36 802fdbc: e004 b.n 802fdc8 /* 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; 802fdbe: 260e movs r6, #14 break; 802fdc0: e002 b.n 802fdc8 case PBUF_RAW: offset = 0; 802fdc2: 2600 movs r6, #0 break; 802fdc4: e000 b.n 802fdc8 /* 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; 802fdc6: 2622 movs r6, #34 ; 0x22 default: LWIP_ASSERT("pbuf_alloc: bad pbuf layer", 0); return NULL; } switch (type) { 802fdc8: 2f03 cmp r7, #3 802fdca: d86f bhi.n 802feac 802fdcc: e8df f007 tbb [pc, r7] 802fdd0: 025e5e46 .word 0x025e5e46 case PBUF_POOL: /* allocate head of pbuf chain into p */ p = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); 802fdd4: 200f movs r0, #15 802fdd6: f7ff fe79 bl 802facc LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc: allocated pbuf %p\n", (void *)p)); if (p == NULL) { 802fdda: 4604 mov r4, r0 802fddc: b900 cbnz r0, 802fde0 802fdde: e065 b.n 802feac } 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))); 802fde0: 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)); 802fde2: 3603 adds r6, #3 802fde4: 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))); 802fde8: 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)); 802fdea: 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; 802fdee: 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))); 802fdf0: 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)); 802fdf4: 3604 adds r6, #4 802fdf6: 42ae cmp r6, r5 802fdf8: bfa8 it ge 802fdfa: 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; 802fdfc: 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))); 802fdfe: 6042 str r2, [r0, #4] if (p == NULL) { PBUF_POOL_IS_EMPTY(); return NULL; } p->type = type; p->next = NULL; 802fe00: 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; 802fe02: 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)); 802fe04: 8146 strh r6, [r0, #10] if (p == NULL) { PBUF_POOL_IS_EMPTY(); return NULL; } p->type = type; p->next = NULL; 802fe06: 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; 802fe08: 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; 802fe0a: 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; 802fe0c: 1bae subs r6, r5, r6 /* any remaining pbufs to be allocated? */ while (rem_len > 0) { 802fe0e: 4607 mov r7, r0 802fe10: 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); 802fe12: f240 6903 movw r9, #1539 ; 0x603 802fe16: 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) { 802fe1a: e01c b.n 802fe56 q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); 802fe1c: 200f movs r0, #15 802fe1e: f7ff fe55 bl 802facc if (q == NULL) { 802fe22: 4605 mov r5, r0 802fe24: b918 cbnz r0, 802fe2e PBUF_POOL_IS_EMPTY(); /* free chain so far allocated */ pbuf_free(p); 802fe26: 4620 mov r0, r4 802fe28: f7ff ff70 bl 802fd0c 802fe2c: e03e b.n 802feac /* bail out unsuccesfully */ return NULL; } q->type = type; 802fe2e: 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); 802fe30: f100 0210 add.w r2, r0, #16 /* free chain so far allocated */ pbuf_free(p); /* bail out unsuccesfully */ return NULL; } q->type = type; 802fe34: 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; 802fe36: b2b3 uxth r3, r6 802fe38: 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); 802fe3a: 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); 802fe3c: 454b cmp r3, r9 802fe3e: bf88 it hi 802fe40: 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; 802fe42: 2201 movs r2, #1 /* bail out unsuccesfully */ return NULL; } q->type = type; q->flags = 0; q->next = NULL; 802fe44: f8c0 8000 str.w r8, [r0] pbuf_free(p); /* bail out unsuccesfully */ return NULL; } q->type = type; q->flags = 0; 802fe48: f880 800d strb.w r8, [r0, #13] q->next = NULL; /* make previous pbuf point to this pbuf */ r->next = q; 802fe4c: 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); 802fe4e: 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; 802fe50: 81c2 strh r2, [r0, #14] /* calculate remaining length to be allocated */ rem_len -= q->len; 802fe52: 1af6 subs r6, r6, r3 802fe54: 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) { 802fe56: 2e00 cmp r6, #0 802fe58: dce0 bgt.n 802fe1c 802fe5a: e022 b.n 802fea2 /*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)); 802fe5c: f106 0013 add.w r0, r6, #19 802fe60: 1ceb adds r3, r5, #3 802fe62: f023 0303 bic.w r3, r3, #3 802fe66: f020 0003 bic.w r0, r0, #3 802fe6a: 18c0 adds r0, r0, r3 802fe6c: b280 uxth r0, r0 802fe6e: f7ff fda3 bl 802f9b8 if (p == NULL) { 802fe72: 4604 mov r4, r0 802fe74: b1d0 cbz r0, 802feac return NULL; } /* Set up internal structure of the pbuf. */ p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)); 802fe76: 1986 adds r6, r0, r6 802fe78: 3613 adds r6, #19 p->len = p->tot_len = length; p->next = NULL; 802fe7a: 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)); 802fe7c: f026 0603 bic.w r6, r6, #3 802fe80: 6046 str r6, [r0, #4] p->len = p->tot_len = length; 802fe82: 8105 strh r5, [r0, #8] 802fe84: 8145 strh r5, [r0, #10] p->next = NULL; 802fe86: 6003 str r3, [r0, #0] p->type = type; 802fe88: 7303 strb r3, [r0, #12] 802fe8a: e00a b.n 802fea2 /* 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); 802fe8c: 200e movs r0, #14 802fe8e: f7ff fe1d bl 802facc if (p == NULL) { 802fe92: 4604 mov r4, r0 802fe94: b150 cbz r0, 802feac ("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; 802fe96: 2300 movs r3, #0 802fe98: 6043 str r3, [r0, #4] p->len = p->tot_len = length; 802fe9a: 8105 strh r5, [r0, #8] 802fe9c: 8145 strh r5, [r0, #10] p->next = NULL; 802fe9e: 6003 str r3, [r0, #0] p->type = type; 802fea0: 7307 strb r7, [r0, #12] default: LWIP_ASSERT("pbuf_alloc: erroneous type", 0); return NULL; } /* set reference count */ p->ref = 1; 802fea2: 2301 movs r3, #1 802fea4: 81e3 strh r3, [r4, #14] /* set flags */ p->flags = 0; 802fea6: 2300 movs r3, #0 802fea8: 7363 strb r3, [r4, #13] LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p)); return p; 802feaa: e000 b.n 802feae p->next = NULL; p->type = type; break; default: LWIP_ASSERT("pbuf_alloc: erroneous type", 0); return NULL; 802feac: 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; } 802feae: 4620 mov r0, r4 802feb0: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 0802feb4 : * @return the number of pbufs in a chain */ u8_t pbuf_clen(struct pbuf *p) { 802feb4: 4603 mov r3, r0 u8_t len; len = 0; 802feb6: 2000 movs r0, #0 while (p != NULL) { 802feb8: e002 b.n 802fec0 ++len; 802feba: 3001 adds r0, #1 p = p->next; 802febc: 681b ldr r3, [r3, #0] { u8_t len; len = 0; while (p != NULL) { ++len; 802febe: b2c0 uxtb r0, r0 pbuf_clen(struct pbuf *p) { u8_t len; len = 0; while (p != NULL) { 802fec0: 2b00 cmp r3, #0 802fec2: d1fa bne.n 802feba ++len; p = p->next; } return len; } 802fec4: 4770 bx lr 0802fec6 : * @param p pbuf to increase reference counter of * */ void pbuf_ref(struct pbuf *p) { 802fec6: b510 push {r4, lr} SYS_ARCH_DECL_PROTECT(old_level); /* pbuf given? */ if (p != NULL) { 802fec8: 4604 mov r4, r0 802feca: b140 cbz r0, 802fede SYS_ARCH_PROTECT(old_level); 802fecc: f007 fd7c bl 80379c8 ++(p->ref); 802fed0: 89e3 ldrh r3, [r4, #14] 802fed2: 3301 adds r3, #1 802fed4: 81e3 strh r3, [r4, #14] SYS_ARCH_UNPROTECT(old_level); } } 802fed6: 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); 802feda: f007 bd7f b.w 80379dc 802fede: bd10 pop {r4, pc} 0802fee0 : * @see pbuf_chain() */ void pbuf_cat(struct pbuf *h, struct pbuf *t) { 802fee0: b510 push {r4, lr} struct pbuf *p; LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)", 802fee2: b168 cbz r0, 802ff00 802fee4: b161 cbz r1, 802ff00 802fee6: e003 b.n 802fef0 ((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; 802fee8: 8904 ldrh r4, [r0, #8] 802feea: 191b adds r3, r3, r4 802feec: 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) { 802feee: 4610 mov r0, r2 802fef0: 6802 ldr r2, [r0, #0] 802fef2: 890b ldrh r3, [r1, #8] 802fef4: 2a00 cmp r2, #0 802fef6: d1f7 bne.n 802fee8 } /* { 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; 802fef8: 8902 ldrh r2, [r0, #8] /* chain last pbuf of head (p) with first of tail (t) */ p->next = t; 802fefa: 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; 802fefc: 189b adds r3, r3, r2 802fefe: 8103 strh r3, [r0, #8] 802ff00: bd10 pop {r4, pc} 0802ff02 : * The ->ref field of the first pbuf of the tail chain is adjusted. * */ void pbuf_chain(struct pbuf *h, struct pbuf *t) { 802ff02: b510 push {r4, lr} 802ff04: 460c mov r4, r1 pbuf_cat(h, t); 802ff06: f7ff ffeb bl 802fee0 /* t is now referenced by h */ pbuf_ref(t); 802ff0a: 4620 mov r0, r4 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t)); } 802ff0c: 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); 802ff10: f7ff bfd9 b.w 802fec6 0802ff14 : * 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) { 802ff14: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802ff18: 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) && 802ff1a: 4605 mov r5, r0 802ff1c: b908 cbnz r0, 802ff22 802ff1e: 20f2 movs r0, #242 ; 0xf2 802ff20: e03f b.n 802ffa2 802ff22: 2900 cmp r1, #0 802ff24: d0fb beq.n 802ff1e 802ff26: 8902 ldrh r2, [r0, #8] 802ff28: 890b ldrh r3, [r1, #8] 802ff2a: 429a cmp r2, r3 802ff2c: d3f7 bcc.n 802ff1e 802ff2e: 2600 movs r6, #0 802ff30: 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)) { 802ff32: f8b4 800a ldrh.w r8, [r4, #10] 802ff36: 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); 802ff38: 6861 ldr r1, [r4, #4] 802ff3a: 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)) { 802ff3c: ebc6 0808 rsb r8, r6, r8 802ff40: 1bdb subs r3, r3, r7 802ff42: 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; 802ff44: bfb4 ite lt 802ff46: 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; 802ff4a: 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); 802ff4e: 19c0 adds r0, r0, r7 802ff50: 1989 adds r1, r1, r6 802ff52: 4642 mov r2, r8 802ff54: f7f1 fd1a bl 802198c offset_to += len; offset_from += len; 802ff58: 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) { 802ff5a: 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; 802ff5c: 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) { 802ff5e: 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; 802ff60: 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) { 802ff62: 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; 802ff64: bf98 it ls 802ff66: 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; 802ff68: 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; 802ff6a: bf98 it ls 802ff6c: 2600 movls r6, #0 p_from = p_from->next; } if (offset_to == p_to->len) { 802ff6e: 42bb cmp r3, r7 802ff70: d105 bne.n 802ff7e /* on to next p_to (if any) */ offset_to = 0; p_to = p_to->next; 802ff72: 682d ldr r5, [r5, #0] LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL) , return ERR_ARG;); 802ff74: b915 cbnz r5, 802ff7c 802ff76: 2c00 cmp r4, #0 802ff78: d1d1 bne.n 802ff1e 802ff7a: e00f b.n 802ff9c offset_from = 0; p_from = p_from->next; } if (offset_to == p_to->len) { /* on to next p_to (if any) */ offset_to = 0; 802ff7c: 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)) { 802ff7e: b12c cbz r4, 802ff8c 802ff80: 8962 ldrh r2, [r4, #10] 802ff82: 8923 ldrh r3, [r4, #8] 802ff84: 429a cmp r2, r3 802ff86: d101 bne.n 802ff8c /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!\n", 802ff88: 6823 ldr r3, [r4, #0] 802ff8a: b94b cbnz r3, 802ffa0 (p_from->next == NULL), return ERR_VAL;); } if((p_to != NULL) && (p_to->len == p_to->tot_len)) { 802ff8c: 896a ldrh r2, [r5, #10] 802ff8e: 892b ldrh r3, [r5, #8] 802ff90: 429a cmp r2, r3 802ff92: d101 bne.n 802ff98 /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!\n", 802ff94: 682b ldr r3, [r5, #0] 802ff96: b91b cbnz r3, 802ffa0 (p_to->next == NULL), return ERR_VAL;); } } while (p_from); 802ff98: 2c00 cmp r4, #0 802ff9a: d1ca bne.n 802ff32 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n")); return ERR_OK; 802ff9c: 4620 mov r0, r4 802ff9e: e000 b.n 802ffa2 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", 802ffa0: 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; } 802ffa2: b240 sxtb r0, r0 802ffa4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 0802ffa8 : * @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) { 802ffa8: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 802ffac: 4688 mov r8, r1 802ffae: 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;); 802ffb0: b328 cbz r0, 802fffe LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;); 802ffb2: b331 cbz r1, 8030002 802ffb4: 2400 movs r4, #0 802ffb6: 4605 mov r5, r0 802ffb8: 46a1 mov r9, r4 802ffba: e01c b.n 802fff6 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)) { 802ffbc: b12b cbz r3, 802ffca 802ffbe: 896a ldrh r2, [r5, #10] 802ffc0: 4293 cmp r3, r2 802ffc2: d302 bcc.n 802ffca /* don't copy from this buffer -> on to the next */ offset -= p->len; 802ffc4: 1a9b subs r3, r3, r2 802ffc6: b29b uxth r3, r3 802ffc8: e014 b.n 802fff4 } else { /* copy from this buffer. maybe only partially. */ buf_copy_len = p->len - offset; 802ffca: 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); 802ffcc: 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; 802ffce: 1aff subs r7, r7, r3 802ffd0: b2bf uxth r7, r7 802ffd2: 42b7 cmp r7, r6 802ffd4: bf28 it cs 802ffd6: 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); 802ffd8: eb08 0009 add.w r0, r8, r9 802ffdc: 18c9 adds r1, r1, r3 802ffde: 463a mov r2, r7 copied_total += buf_copy_len; 802ffe0: 193c adds r4, r7, r4 left += buf_copy_len; 802ffe2: 44b9 add r9, r7 len -= buf_copy_len; 802ffe4: 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); 802ffe6: f7f1 fcd1 bl 802198c copied_total += buf_copy_len; 802ffea: b2a4 uxth r4, r4 left += buf_copy_len; 802ffec: fa1f f989 uxth.w r9, r9 len -= buf_copy_len; 802fff0: b2b6 uxth r6, r6 offset = 0; 802fff2: 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) { 802fff4: 682d ldr r5, [r5, #0] 802fff6: b12e cbz r6, 8030004 802fff8: 2d00 cmp r5, #0 802fffa: d1df bne.n 802ffbc 802fffc: e002 b.n 8030004 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;); 802fffe: 4604 mov r4, r0 8030000: e000 b.n 8030004 8030002: 460c mov r4, r1 len -= buf_copy_len; offset = 0; } } return copied_total; } 8030004: 4620 mov r0, r4 8030006: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 803000a: 0000 movs r0, r0 0803000c : * caller). * */ u8_t raw_input(struct pbuf *p, struct netif *inp) { 803000c: 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); 8030010: 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))) { 8030012: f8df a074 ldr.w sl, [pc, #116] ; 8030088 u8_t eaten = 0; LWIP_UNUSED_ARG(inp); iphdr = (struct ip_hdr *)p->payload; proto = IPH_PROTO(iphdr); 8030016: f893 9009 ldrb.w r9, [r3, #9] prev = NULL; pcb = raw_pcbs; 803001a: 4b19 ldr r3, [pc, #100] ; (8030080 ) * caller). * */ u8_t raw_input(struct pbuf *p, struct netif *inp) { 803001c: 4606 mov r6, r0 iphdr = (struct ip_hdr *)p->payload; proto = IPH_PROTO(iphdr); prev = NULL; pcb = raw_pcbs; 803001e: 681c ldr r4, [r3, #0] LWIP_UNUSED_ARG(inp); iphdr = (struct ip_hdr *)p->payload; proto = IPH_PROTO(iphdr); prev = NULL; 8030020: 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; 8030022: 4698 mov r8, r3 8030024: e023 b.n 803006e 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) && 8030026: 7c23 ldrb r3, [r4, #16] 8030028: 454b cmp r3, r9 803002a: d118 bne.n 803005e (ip_addr_isany(&pcb->local_ip) || 803002c: 6823 ldr r3, [r4, #0] 803002e: b11b cbz r3, 8030038 8030030: f8da 2000 ldr.w r2, [sl] 8030034: 4293 cmp r3, r2 8030036: d112 bne.n 803005e /* 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) { 8030038: 6967 ldr r7, [r4, #20] 803003a: b187 cbz r7, 803005e /* the receive callback function did not eat the packet? */ if (pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr()) != 0) { 803003c: 69a0 ldr r0, [r4, #24] 803003e: 4b11 ldr r3, [pc, #68] ; (8030084 ) 8030040: 4621 mov r1, r4 8030042: 4632 mov r2, r6 8030044: 47b8 blx r7 8030046: b150 cbz r0, 803005e /* receive function ate the packet */ p = NULL; eaten = 1; if (prev != NULL) { 8030048: b15d cbz r5, 8030062 /* move the pcb to the front of raw_pcbs so that is found faster next time */ prev->next = pcb->next; 803004a: 68e3 ldr r3, [r4, #12] 803004c: 60eb str r3, [r5, #12] pcb->next = raw_pcbs; 803004e: f8d8 3000 ldr.w r3, [r8] raw_pcbs = pcb; 8030052: 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; 8030056: 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; 8030058: 2600 movs r6, #0 eaten = 1; 803005a: 2301 movs r3, #1 803005c: e003 b.n 8030066 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) || 803005e: 2300 movs r3, #0 8030060: e001 b.n 8030066 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; 8030062: 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; 8030064: 462e mov r6, r5 /* no receive callback function was set for this raw PCB */ } /* drop the packet */ } prev = pcb; pcb = pcb->next; 8030066: 68e2 ldr r2, [r4, #12] 8030068: 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)) { 803006a: b92b cbnz r3, 8030078 /* no receive callback function was set for this raw PCB */ } /* drop the packet */ } prev = pcb; pcb = pcb->next; 803006c: 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)) { 803006e: 2c00 cmp r4, #0 8030070: d1d9 bne.n 8030026 8030072: 4620 mov r0, r4 8030074: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 8030078: 2001 movs r0, #1 } prev = pcb; pcb = pcb->next; } return eaten; } 803007a: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 803007e: bf00 nop 8030080: 2000c3d4 .word 0x2000c3d4 8030084: 2000f6d8 .word 0x2000f6d8 8030088: 2000f6e0 .word 0x2000f6e0 0803008c : * @see raw_disconnect() */ err_t raw_bind(struct raw_pcb *pcb, ip_addr_t *ipaddr) { ip_addr_set(&pcb->local_ip, ipaddr); 803008c: b101 cbz r1, 8030090 803008e: 6809 ldr r1, [r1, #0] 8030090: 6001 str r1, [r0, #0] return ERR_OK; } 8030092: 2000 movs r0, #0 8030094: 4770 bx lr 08030096 : * @see raw_disconnect() and raw_sendto() */ err_t raw_connect(struct raw_pcb *pcb, ip_addr_t *ipaddr) { ip_addr_set(&pcb->remote_ip, ipaddr); 8030096: b101 cbz r1, 803009a 8030098: 6809 ldr r1, [r1, #0] 803009a: 6041 str r1, [r0, #4] return ERR_OK; } 803009c: 2000 movs r0, #0 803009e: 4770 bx lr 080300a0 : */ void raw_recv(struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg) { /* remember recv() callback and user data */ pcb->recv = recv; 80300a0: 6141 str r1, [r0, #20] pcb->recv_arg = recv_arg; 80300a2: 6182 str r2, [r0, #24] 80300a4: 4770 bx lr 080300a6 : * @param ipaddr the destination address of the IP packet * */ err_t raw_sendto(struct raw_pcb *pcb, struct pbuf *p, ip_addr_t *ipaddr) { 80300a6: b5f0 push {r4, r5, r6, r7, lr} 80300a8: 4605 mov r5, r0 80300aa: b085 sub sp, #20 80300ac: 460c mov r4, r1 struct pbuf *q; /* q will be sent down the stack */ LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_TRACE, ("raw_sendto\n")); /* not enough space to add an IP header to first pbuf in given p chain? */ if (pbuf_header(p, IP_HLEN)) { 80300ae: 4608 mov r0, r1 80300b0: 2114 movs r1, #20 * @param ipaddr the destination address of the IP packet * */ err_t raw_sendto(struct raw_pcb *pcb, struct pbuf *p, ip_addr_t *ipaddr) { 80300b2: 4617 mov r7, r2 struct pbuf *q; /* q will be sent down the stack */ LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_TRACE, ("raw_sendto\n")); /* not enough space to add an IP header to first pbuf in given p chain? */ if (pbuf_header(p, IP_HLEN)) { 80300b4: f7ff fdff bl 802fcb6 80300b8: b170 cbz r0, 80300d8 /* allocate header in new pbuf */ q = pbuf_alloc(PBUF_IP, 0, PBUF_RAM); 80300ba: 2100 movs r1, #0 80300bc: 2001 movs r0, #1 80300be: 460a mov r2, r1 80300c0: f7ff fe71 bl 802fda6 /* new header pbuf could not be allocated? */ if (q == NULL) { 80300c4: 4606 mov r6, r0 80300c6: b908 cbnz r0, 80300cc LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("raw_sendto: could not allocate header\n")); return ERR_MEM; 80300c8: 25ff movs r5, #255 ; 0xff 80300ca: e02e b.n 803012a } if (p->tot_len != 0) { 80300cc: 8923 ldrh r3, [r4, #8] 80300ce: b15b cbz r3, 80300e8 /* chain header q in front of given pbuf p */ pbuf_chain(q, p); 80300d0: 4621 mov r1, r4 80300d2: f7ff ff16 bl 802ff02 80300d6: e007 b.n 80300e8 /* { first pbuf q points to header pbuf } */ LWIP_DEBUGF(RAW_DEBUG, ("raw_sendto: added header pbuf %p before given pbuf %p\n", (void *)q, (void *)p)); } else { /* first pbuf q equals given pbuf */ q = p; if(pbuf_header(q, -IP_HLEN)) { 80300d8: 4620 mov r0, r4 80300da: f06f 0113 mvn.w r1, #19 80300de: f7ff fdea bl 802fcb6 80300e2: 2800 cmp r0, #0 80300e4: d1f0 bne.n 80300c8 80300e6: 4626 mov r6, r4 LWIP_ASSERT("Can't restore header we just removed!", 0); return ERR_MEM; } } if ((netif = ip_route(ipaddr)) == NULL) { 80300e8: 4638 mov r0, r7 80300ea: f002 febb bl 8032e64 80300ee: b928 cbnz r0, 80300fc LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_LEVEL_WARNING, ("raw_sendto: No route to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr))); /* free any temporary header pbuf allocated by pbuf_header() */ if (q != p) { 80300f0: 42a6 cmp r6, r4 80300f2: d019 beq.n 8030128 pbuf_free(q); 80300f4: 4630 mov r0, r6 80300f6: f7ff fe09 bl 802fd0c 80300fa: e015 b.n 8030128 } return ERR_VAL; } #endif /* IP_SOF_BROADCAST */ if (ip_addr_isany(&pcb->local_ip)) { 80300fc: 4629 mov r1, r5 80300fe: b10d cbz r5, 8030104 8030100: 682b ldr r3, [r5, #0] 8030102: b903 cbnz r3, 8030106 /* use outgoing network interface IP address as source address */ src_ip = &(netif->ip_addr); 8030104: 1d01 adds r1, r0, #4 /* use RAW PCB local IP address as source address */ src_ip = &(pcb->local_ip); } NETIF_SET_HWADDRHINT(netif, &pcb->addr_hint); err = ip_output_if (q, src_ip, ipaddr, pcb->ttl, pcb->tos, pcb->protocol, netif); 8030106: 7a6a ldrb r2, [r5, #9] 8030108: 7aab ldrb r3, [r5, #10] 803010a: 9200 str r2, [sp, #0] 803010c: 7c2a ldrb r2, [r5, #16] 803010e: 9002 str r0, [sp, #8] 8030110: 9201 str r2, [sp, #4] 8030112: 4630 mov r0, r6 8030114: 463a mov r2, r7 8030116: f002 ffa9 bl 803306c NETIF_SET_HWADDRHINT(netif, NULL); /* did we chain a header earlier? */ if (q != p) { 803011a: 42a6 cmp r6, r4 /* use RAW PCB local IP address as source address */ src_ip = &(pcb->local_ip); } NETIF_SET_HWADDRHINT(netif, &pcb->addr_hint); err = ip_output_if (q, src_ip, ipaddr, pcb->ttl, pcb->tos, pcb->protocol, netif); 803011c: 4605 mov r5, r0 NETIF_SET_HWADDRHINT(netif, NULL); /* did we chain a header earlier? */ if (q != p) { 803011e: d004 beq.n 803012a /* free the header */ pbuf_free(q); 8030120: 4630 mov r0, r6 8030122: f7ff fdf3 bl 802fd0c 8030126: e000 b.n 803012a ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr))); /* free any temporary header pbuf allocated by pbuf_header() */ if (q != p) { pbuf_free(q); } return ERR_RTE; 8030128: 25fc movs r5, #252 ; 0xfc if (q != p) { /* free the header */ pbuf_free(q); } return err; } 803012a: b268 sxtb r0, r5 803012c: b005 add sp, #20 803012e: bdf0 pop {r4, r5, r6, r7, pc} 08030130 : * */ err_t raw_send(struct raw_pcb *pcb, struct pbuf *p) { return raw_sendto(pcb, p, &pcb->remote_ip); 8030130: 1d02 adds r2, r0, #4 8030132: f7ff bfb8 b.w 80300a6 8030136: 0000 movs r0, r0 08030138 : void raw_remove(struct raw_pcb *pcb) { struct raw_pcb *pcb2; /* pcb to be removed is first in list? */ if (raw_pcbs == pcb) { 8030138: 4a09 ldr r2, [pc, #36] ; (8030160 ) 803013a: 6813 ldr r3, [r2, #0] 803013c: 4283 cmp r3, r0 * * @see raw_new() */ void raw_remove(struct raw_pcb *pcb) { 803013e: 4601 mov r1, r0 struct raw_pcb *pcb2; /* pcb to be removed is first in list? */ if (raw_pcbs == pcb) { 8030140: d109 bne.n 8030156 /* make list start at 2nd pcb */ raw_pcbs = raw_pcbs->next; 8030142: 68c3 ldr r3, [r0, #12] 8030144: 6013 str r3, [r2, #0] 8030146: e008 b.n 803015a /* pcb not 1st in list */ } else { for(pcb2 = raw_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { /* find pcb in raw_pcbs list */ if (pcb2->next != NULL && pcb2->next == pcb) { 8030148: 68da ldr r2, [r3, #12] 803014a: b11a cbz r2, 8030154 803014c: 428a cmp r2, r1 /* remove pcb from list */ pcb2->next = pcb->next; 803014e: bf04 itt eq 8030150: 68ca ldreq r2, [r1, #12] 8030152: 60da streq r2, [r3, #12] if (raw_pcbs == pcb) { /* make list start at 2nd pcb */ raw_pcbs = raw_pcbs->next; /* pcb not 1st in list */ } else { for(pcb2 = raw_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { 8030154: 68db ldr r3, [r3, #12] 8030156: 2b00 cmp r3, #0 8030158: d1f6 bne.n 8030148 /* remove pcb from list */ pcb2->next = pcb->next; } } } memp_free(MEMP_RAW_PCB, pcb); 803015a: 2000 movs r0, #0 803015c: f7ff bccc b.w 802faf8 8030160: 2000c3d4 .word 0x2000c3d4 08030164 : * * @see raw_remove() */ struct raw_pcb * raw_new(u8_t proto) { 8030164: b538 push {r3, r4, r5, lr} 8030166: 4605 mov r5, r0 struct raw_pcb *pcb; LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_TRACE, ("raw_new\n")); pcb = (struct raw_pcb *)memp_malloc(MEMP_RAW_PCB); 8030168: 2000 movs r0, #0 803016a: f7ff fcaf bl 802facc /* could allocate RAW PCB? */ if (pcb != NULL) { 803016e: 4604 mov r4, r0 8030170: b150 cbz r0, 8030188 /* initialize PCB to all zeroes */ memset(pcb, 0, sizeof(struct raw_pcb)); 8030172: 221c movs r2, #28 8030174: 2100 movs r1, #0 8030176: f7f1 fcc3 bl 8021b00 pcb->protocol = proto; pcb->ttl = RAW_TTL; 803017a: 23ff movs r3, #255 ; 0xff 803017c: 72a3 strb r3, [r4, #10] pcb->next = raw_pcbs; 803017e: 4b03 ldr r3, [pc, #12] ; (803018c ) pcb = (struct raw_pcb *)memp_malloc(MEMP_RAW_PCB); /* could allocate RAW PCB? */ if (pcb != NULL) { /* initialize PCB to all zeroes */ memset(pcb, 0, sizeof(struct raw_pcb)); pcb->protocol = proto; 8030180: 7425 strb r5, [r4, #16] pcb->ttl = RAW_TTL; pcb->next = raw_pcbs; 8030182: 681a ldr r2, [r3, #0] raw_pcbs = pcb; 8030184: 601c str r4, [r3, #0] if (pcb != NULL) { /* initialize PCB to all zeroes */ memset(pcb, 0, sizeof(struct raw_pcb)); pcb->protocol = proto; pcb->ttl = RAW_TTL; pcb->next = raw_pcbs; 8030186: 60e2 str r2, [r4, #12] raw_pcbs = pcb; } return pcb; } 8030188: 4620 mov r0, r4 803018a: bd38 pop {r3, r4, r5, pc} 803018c: 2000c3d4 .word 0x2000c3d4 08030190 : LWIP_UNUSED_ARG(arg); LWIP_UNUSED_ARG(pcb); LWIP_UNUSED_ARG(err); return ERR_ABRT; } 8030190: f06f 0009 mvn.w r0, #9 8030194: 4770 bx lr 8030196: 0000 movs r0, r0 08030198 : * * @return a new (free) local TCP port number */ static u16_t tcp_new_port(void) { 8030198: 4b13 ldr r3, [pc, #76] ; (80301e8 ) 803019a: b570 push {r4, r5, r6, lr} 803019c: 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) { 803019e: 4d13 ldr r5, [pc, #76] ; (80301ec ) * * @return a new (free) local TCP port number */ static u16_t tcp_new_port(void) { 80301a0: 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) { 80301a4: f64f 74ff movw r4, #65535 ; 0xffff 80301a8: 42a0 cmp r0, r4 80301aa: d002 beq.n 80301b2 80301ac: 3001 adds r0, #1 80301ae: b280 uxth r0, r0 80301b0: e001 b.n 80301b6 tcp_port = TCP_LOCAL_PORT_RANGE_START; 80301b2: f44f 4040 mov.w r0, #49152 ; 0xc000 80301b6: 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) { 80301b8: 5959 ldr r1, [r3, r5] 80301ba: 6809 ldr r1, [r1, #0] 80301bc: e00b b.n 80301d6 if (pcb->local_port == tcp_port) { 80301be: 8b4e ldrh r6, [r1, #26] 80301c0: 4286 cmp r6, r0 80301c2: d107 bne.n 80301d4 80301c4: 3a01 subs r2, #1 80301c6: b292 uxth r2, r2 if (++n > (TCP_LOCAL_PORT_RANGE_END - TCP_LOCAL_PORT_RANGE_START)) { 80301c8: 2a00 cmp r2, #0 80301ca: d1ed bne.n 80301a8 80301cc: 4b06 ldr r3, [pc, #24] ; (80301e8 ) 80301ce: 8018 strh r0, [r3, #0] return 0; 80301d0: 4610 mov r0, r2 80301d2: 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) { 80301d4: 68c9 ldr r1, [r1, #12] 80301d6: 2900 cmp r1, #0 80301d8: d1f1 bne.n 80301be 80301da: 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++) { 80301dc: 2b10 cmp r3, #16 80301de: d1eb bne.n 80301b8 80301e0: 4b01 ldr r3, [pc, #4] ; (80301e8 ) 80301e2: 8018 strh r0, [r3, #0] goto again; } } } return tcp_port; } 80301e4: bd70 pop {r4, r5, r6, pc} 80301e6: bf00 nop 80301e8: 20000714 .word 0x20000714 80301ec: 08044e1c .word 0x08044e1c 080301f0 : /** * Initialize this module. */ void tcp_init(void) { 80301f0: 4770 bx lr 80301f2: 0000 movs r0, r0 080301f4 : * 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) { 80301f4: 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); 80301f6: 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) { 80301f8: 4604 mov r4, r0 80301fa: 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); 80301fc: bb33 cbnz r3, 803024c if (ip_get_option(pcb, SOF_REUSEADDR)) { max_pcb_list = NUM_TCP_PCB_LISTS_NO_TIME_WAIT; } #endif /* SO_REUSE */ if (port == 0) { 80301fe: b91a cbnz r2, 8030208 port = tcp_new_port(); 8030200: f7ff ffca bl 8030198 if (port == 0) { 8030204: 4602 mov r2, r0 8030206: b318 cbz r0, 8030250 } } /* 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) { 8030208: 4f14 ldr r7, [pc, #80] ; (803025c ) * 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) { 803020a: 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) { 803020c: 59cb ldr r3, [r1, r7] 803020e: 681b ldr r3, [r3, #0] 8030210: e00a b.n 8030228 if (cpcb->local_port == port) { 8030212: 8b58 ldrh r0, [r3, #26] 8030214: 4290 cmp r0, r2 8030216: d106 bne.n 8030226 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)) || 8030218: 681e ldr r6, [r3, #0] 803021a: b1de cbz r6, 8030254 803021c: b1d5 cbz r5, 8030254 ip_addr_isany(ipaddr) || 803021e: 6828 ldr r0, [r5, #0] 8030220: b1c0 cbz r0, 8030254 8030222: 4286 cmp r6, r0 8030224: d016 beq.n 8030254 } } /* 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) { 8030226: 68db ldr r3, [r3, #12] 8030228: 2b00 cmp r3, #0 803022a: d1f2 bne.n 8030212 803022c: 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++) { 803022e: 2910 cmp r1, #16 8030230: d1ec bne.n 803020c } } } } if (!ip_addr_isany(ipaddr)) { 8030232: b115 cbz r5, 803023a 8030234: 682b ldr r3, [r5, #0] 8030236: b103 cbz r3, 803023a pcb->local_ip = *ipaddr; 8030238: 6023 str r3, [r4, #0] } pcb->local_port = port; TCP_REG(&tcp_bound_pcbs, pcb); 803023a: 4b09 ldr r3, [pc, #36] ; (8030260 ) } if (!ip_addr_isany(ipaddr)) { pcb->local_ip = *ipaddr; } pcb->local_port = port; 803023c: 8362 strh r2, [r4, #26] TCP_REG(&tcp_bound_pcbs, pcb); 803023e: 681a ldr r2, [r3, #0] 8030240: 601c str r4, [r3, #0] 8030242: 60e2 str r2, [r4, #12] 8030244: f002 f97e bl 8032544 LWIP_DEBUGF(TCP_DEBUG, ("tcp_bind: bind to port %"U16_F"\n", port)); return ERR_OK; 8030248: 2000 movs r0, #0 803024a: e004 b.n 8030256 { 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); 803024c: 20fa movs r0, #250 ; 0xfa 803024e: e002 b.n 8030256 #endif /* SO_REUSE */ if (port == 0) { port = tcp_new_port(); if (port == 0) { return ERR_BUF; 8030250: 20fe movs r0, #254 ; 0xfe 8030252: e000 b.n 8030256 #endif /* SO_REUSE */ { if (ip_addr_isany(&(cpcb->local_ip)) || ip_addr_isany(ipaddr) || ip_addr_cmp(&(cpcb->local_ip), ipaddr)) { return ERR_USE; 8030254: 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; } 8030256: b240 sxtb r0, r0 8030258: bdf8 pop {r3, r4, r5, r6, r7, pc} 803025a: bf00 nop 803025c: 08044e1c .word 0x08044e1c 8030260: 2000f6c8 .word 0x2000f6c8 08030264 : * called like this: * tpcb = tcp_listen(tpcb); */ struct tcp_pcb * tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog) { 8030264: 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); 8030266: 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) { 8030268: 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); 803026a: b10b cbz r3, 8030270 803026c: 2000 movs r0, #0 803026e: bd38 pop {r3, r4, r5, pc} } } } } #endif /* SO_REUSE */ lpcb = (struct tcp_pcb_listen *)memp_malloc(MEMP_TCP_PCB_LISTEN); 8030270: 2003 movs r0, #3 8030272: f7ff fc2b bl 802facc if (lpcb == NULL) { 8030276: 4605 mov r5, r0 8030278: 2800 cmp r0, #0 803027a: d0f7 beq.n 803026c return NULL; } lpcb->callback_arg = pcb->callback_arg; 803027c: 6923 ldr r3, [r4, #16] 803027e: 6103 str r3, [r0, #16] lpcb->local_port = pcb->local_port; 8030280: 8b63 ldrh r3, [r4, #26] 8030282: 8343 strh r3, [r0, #26] lpcb->state = LISTEN; 8030284: 2301 movs r3, #1 8030286: 7603 strb r3, [r0, #24] lpcb->prio = pcb->prio; 8030288: 7e63 ldrb r3, [r4, #25] 803028a: 7643 strb r3, [r0, #25] lpcb->so_options = pcb->so_options; ip_set_option(lpcb, SOF_ACCEPTCONN); 803028c: 7a23 ldrb r3, [r4, #8] 803028e: f043 0302 orr.w r3, r3, #2 8030292: 7203 strb r3, [r0, #8] lpcb->ttl = pcb->ttl; 8030294: 7aa3 ldrb r3, [r4, #10] 8030296: 7283 strb r3, [r0, #10] lpcb->tos = pcb->tos; 8030298: 7a63 ldrb r3, [r4, #9] 803029a: 7243 strb r3, [r0, #9] ip_addr_copy(lpcb->local_ip, pcb->local_ip); 803029c: 6823 ldr r3, [r4, #0] 803029e: 6003 str r3, [r0, #0] if (pcb->local_port != 0) { 80302a0: 8b63 ldrh r3, [r4, #26] 80302a2: b1ab cbz r3, 80302d0 TCP_RMV(&tcp_bound_pcbs, pcb); 80302a4: 4a11 ldr r2, [pc, #68] ; (80302ec ) 80302a6: 6813 ldr r3, [r2, #0] 80302a8: 42a3 cmp r3, r4 80302aa: d101 bne.n 80302b0 80302ac: 68e3 ldr r3, [r4, #12] 80302ae: e00c b.n 80302ca 80302b0: 4a0f ldr r2, [pc, #60] ; (80302f0 ) 80302b2: 6013 str r3, [r2, #0] 80302b4: e007 b.n 80302c6 80302b6: 68d9 ldr r1, [r3, #12] 80302b8: 42a1 cmp r1, r4 80302ba: d103 bne.n 80302c4 80302bc: 6013 str r3, [r2, #0] 80302be: 68e2 ldr r2, [r4, #12] 80302c0: 60da str r2, [r3, #12] 80302c2: e003 b.n 80302cc 80302c4: 460b mov r3, r1 80302c6: 2b00 cmp r3, #0 80302c8: d1f5 bne.n 80302b6 80302ca: 6013 str r3, [r2, #0] 80302cc: 2300 movs r3, #0 80302ce: 60e3 str r3, [r4, #12] } memp_free(MEMP_TCP_PCB, pcb); 80302d0: 2002 movs r0, #2 80302d2: 4621 mov r1, r4 80302d4: f7ff fc10 bl 802faf8 #if LWIP_CALLBACK_API lpcb->accept = tcp_accept_null; 80302d8: 4b06 ldr r3, [pc, #24] ; (80302f4 ) 80302da: 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); 80302dc: 4b06 ldr r3, [pc, #24] ; (80302f8 ) 80302de: 681a ldr r2, [r3, #0] 80302e0: 601d str r5, [r3, #0] 80302e2: 60ea str r2, [r5, #12] 80302e4: f002 f92e bl 8032544 return (struct tcp_pcb *)lpcb; 80302e8: 4628 mov r0, r5 } 80302ea: bd38 pop {r3, r4, r5, pc} 80302ec: 2000f6c8 .word 0x2000f6c8 80302f0: 2000f6c4 .word 0x2000f6c4 80302f4: 08030191 .word 0x08030191 80302f8: 2000f6c0 .word 0x2000f6c0 080302fc : * * 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) { 80302fc: 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))) { 80302fe: 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; 8030300: 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))) { 8030302: 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; 8030304: 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) { 8030306: 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))) { 8030308: f640 3068 movw r0, #2920 ; 0xb68 803030c: 4285 cmp r5, r0 803030e: bf28 it cs 8030310: 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; 8030312: 1a60 subs r0, r4, r1 if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { 8030314: 1880 adds r0, r0, r2 8030316: 1b45 subs r5, r0, r5 8030318: 2d00 cmp r5, #0 803031a: db01 blt.n 8030320 /* we can advertise more window */ pcb->rcv_ann_wnd = pcb->rcv_wnd; 803031c: 85dc strh r4, [r3, #46] ; 0x2e return new_right_edge - pcb->rcv_ann_right_edge; 803031e: bd30 pop {r4, r5, pc} } else { if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) { 8030320: 1a50 subs r0, r2, r1 8030322: 2800 cmp r0, #0 8030324: f04f 0000 mov.w r0, #0 8030328: dd01 ble.n 803032e /* 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; 803032a: 85d8 strh r0, [r3, #46] ; 0x2e 803032c: 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; 803032e: 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; 8030330: 85da strh r2, [r3, #46] ; 0x2e } return 0; } } 8030332: bd30 pop {r4, r5, pc} 08030334 : 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; 8030334: 8d83 ldrh r3, [r0, #44] ; 0x2c 8030336: 18c9 adds r1, r1, r3 8030338: b289 uxth r1, r1 if (pcb->rcv_wnd > TCP_WND) { 803033a: f241 63d0 movw r3, #5840 ; 0x16d0 803033e: 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) { 8030340: 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; 8030342: bf8c ite hi 8030344: 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; 8030346: 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) { 8030348: 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); 803034a: f7ff ffd7 bl 80302fc /* 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) { 803034e: f240 53b3 movw r3, #1459 ; 0x5b3 8030352: 4298 cmp r0, r3 8030354: dd08 ble.n 8030368 tcp_ack_now(pcb); 8030356: 7fa3 ldrb r3, [r4, #30] tcp_output(pcb); 8030358: 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); 803035a: f043 0302 orr.w r3, r3, #2 803035e: 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)); } 8030360: 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); 8030364: f001 be30 b.w 8031fc8 8030368: bd10 pop {r4, pc} 0803036a : * * @param seg single tcp_seg to free */ void tcp_seg_free(struct tcp_seg *seg) { 803036a: b510 push {r4, lr} if (seg != NULL) { 803036c: 4604 mov r4, r0 803036e: b148 cbz r0, 8030384 if (seg->p != NULL) { 8030370: 6840 ldr r0, [r0, #4] 8030372: b108 cbz r0, 8030378 pbuf_free(seg->p); 8030374: f7ff fcca bl 802fd0c #if TCP_DEBUG seg->p = NULL; #endif /* TCP_DEBUG */ } memp_free(MEMP_TCP_SEG, seg); 8030378: 2004 movs r0, #4 803037a: 4621 mov r1, r4 } } 803037c: 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); 8030380: f7ff bbba b.w 802faf8 8030384: bd10 pop {r4, pc} 08030386 : * * @param seg tcp_seg list of TCP segments to free */ void tcp_segs_free(struct tcp_seg *seg) { 8030386: b510 push {r4, lr} while (seg != NULL) { 8030388: e003 b.n 8030392 struct tcp_seg *next = seg->next; 803038a: 6804 ldr r4, [r0, #0] tcp_seg_free(seg); 803038c: f7ff ffed bl 803036a seg = next; 8030390: 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) { 8030392: 2800 cmp r0, #0 8030394: d1f9 bne.n 803038a struct tcp_seg *next = seg->next; tcp_seg_free(seg); seg = next; } } 8030396: bd10 pop {r4, pc} 08030398 : 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; 8030398: 6101 str r1, [r0, #16] 803039a: 4770 bx lr 0803039c : */ 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; 803039c: 67c1 str r1, [r0, #124] ; 0x7c 803039e: 4770 bx lr 080303a0 : */ 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; 80303a0: 6781 str r1, [r0, #120] ; 0x78 80303a2: 4770 bx lr 080303a4 : */ 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; 80303a4: f8c0 1088 str.w r1, [r0, #136] ; 0x88 80303a8: 4770 bx lr 080303aa : 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; 80303aa: 6141 str r1, [r0, #20] 80303ac: 4770 bx lr 080303ae : 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; 80303ae: f8c0 1084 str.w r1, [r0, #132] ; 0x84 #else /* LWIP_CALLBACK_API */ LWIP_UNUSED_ARG(poll); #endif /* LWIP_CALLBACK_API */ pcb->pollinterval = interval; 80303b2: f880 2020 strb.w r2, [r0, #32] 80303b6: 4770 bx lr 080303b8 : * @param pcb tcp_pcb to purge. The pcb itself is not deallocated! */ void tcp_pcb_purge(struct tcp_pcb *pcb) { if (pcb->state != CLOSED && 80303b8: 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) { 80303ba: b510 push {r4, lr} 80303bc: 4604 mov r4, r0 if (pcb->state != CLOSED && 80303be: b1bb cbz r3, 80303f0 80303c0: 2b0a cmp r3, #10 80303c2: d015 beq.n 80303f0 pcb->state != TIME_WAIT && 80303c4: 2b01 cmp r3, #1 80303c6: d013 beq.n 80303f0 } } #endif /* TCP_LISTEN_BACKLOG */ if (pcb->refused_data != NULL) { 80303c8: 6f40 ldr r0, [r0, #116] ; 0x74 80303ca: b118 cbz r0, 80303d4 LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->refused_data\n")); pbuf_free(pcb->refused_data); 80303cc: f7ff fc9e bl 802fd0c pcb->refused_data = NULL; 80303d0: 2300 movs r3, #0 80303d2: 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; 80303d4: f64f 73ff movw r3, #65535 ; 0xffff 80303d8: 86a3 strh r3, [r4, #52] ; 0x34 tcp_segs_free(pcb->unsent); 80303da: 6ee0 ldr r0, [r4, #108] ; 0x6c 80303dc: f7ff ffd3 bl 8030386 tcp_segs_free(pcb->unacked); 80303e0: 6f20 ldr r0, [r4, #112] ; 0x70 80303e2: f7ff ffd0 bl 8030386 pcb->unacked = pcb->unsent = NULL; 80303e6: 2300 movs r3, #0 80303e8: 66e3 str r3, [r4, #108] ; 0x6c 80303ea: 6723 str r3, [r4, #112] ; 0x70 #if TCP_OVERSIZE pcb->unsent_oversize = 0; 80303ec: f8a4 306a strh.w r3, [r4, #106] ; 0x6a 80303f0: bd10 pop {r4, pc} 80303f2: 0000 movs r0, r0 080303f4 : u8_t pcb_reset; /* flag if a RST should be sent when removing */ err_t err; err = ERR_OK; ++tcp_ticks; 80303f4: 4b9c ldr r3, [pc, #624] ; (8030668 ) * * Automatically called from tcp_tmr(). */ void tcp_slowtmr(void) { 80303f6: 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; 80303fa: 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; 80303fc: f8df 8284 ldr.w r8, [pc, #644] ; 8030684 u8_t pcb_reset; /* flag if a RST should be sent when removing */ err_t err; err = ERR_OK; ++tcp_ticks; 8030400: 3201 adds r2, #1 8030402: 601a str r2, [r3, #0] ++tcp_timer_ctr; 8030404: 4b99 ldr r3, [pc, #612] ; (803066c ) 8030406: 781a ldrb r2, [r3, #0] 8030408: 3201 adds r2, #1 803040a: 701a strb r2, [r3, #0] 803040c: 46c1 mov r9, r8 tcp_slowtmr_start: /* Steps through all of the active PCBs. */ prev = NULL; pcb = tcp_active_pcbs; 803040e: 4b98 ldr r3, [pc, #608] ; (8030670 ) 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) { 8030410: f8df a258 ldr.w sl, [pc, #600] ; 803066c ++tcp_timer_ctr; tcp_slowtmr_start: /* Steps through all of the active PCBs. */ prev = NULL; pcb = tcp_active_pcbs; 8030414: 681c ldr r4, [r3, #0] ++tcp_ticks; ++tcp_timer_ctr; tcp_slowtmr_start: /* Steps through all of the active PCBs. */ prev = NULL; 8030416: 2600 movs r6, #0 pcb = tcp_active_pcbs; if (pcb == NULL) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: no active pcbs\n")); } while (pcb != NULL) { 8030418: e0ff b.n 803061a 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) { 803041a: f89a 3000 ldrb.w r3, [sl] 803041e: f894 2021 ldrb.w r2, [r4, #33] ; 0x21 8030422: 429a cmp r2, r3 8030424: d101 bne.n 803042a /* skip this pcb, we have already processed it */ pcb = pcb->next; 8030426: 68e7 ldr r7, [r4, #12] continue; 8030428: e0f6 b.n 8030618 pcb->last_timer = tcp_timer_ctr; pcb_remove = 0; pcb_reset = 0; if (pcb->state == SYN_SENT && pcb->nrtx == TCP_SYNMAXRTX) { 803042a: 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; 803042c: f884 3021 strb.w r3, [r4, #33] ; 0x21 pcb_remove = 0; pcb_reset = 0; if (pcb->state == SYN_SENT && pcb->nrtx == TCP_SYNMAXRTX) { 8030430: 2902 cmp r1, #2 8030432: f894 2046 ldrb.w r2, [r4, #70] ; 0x46 8030436: d101 bne.n 803043c 8030438: 2a06 cmp r2, #6 803043a: d051 beq.n 80304e0 ++pcb_remove; LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max SYN retries reached\n")); } else if (pcb->nrtx == TCP_MAXRTX) { 803043c: 2a0c cmp r2, #12 803043e: d04f beq.n 80304e0 ++pcb_remove; LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n")); } else { if (pcb->persist_backoff > 0) { 8030440: f894 3091 ldrb.w r3, [r4, #145] ; 0x91 8030444: b1c3 cbz r3, 8030478 /* 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]) { 8030446: 498b ldr r1, [pc, #556] ; (8030674 ) 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++; 8030448: f894 2090 ldrb.w r2, [r4, #144] ; 0x90 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 803044c: 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++; 803044e: 3201 adds r2, #1 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 8030450: 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++; 8030454: b2d2 uxtb r2, r2 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 8030456: 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++; 8030458: f884 2090 strb.w r2, [r4, #144] ; 0x90 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 803045c: d900 bls.n 8030460 803045e: e03d b.n 80304dc pcb->persist_cnt = 0; 8030460: 2200 movs r2, #0 if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { 8030462: 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; 8030464: f884 2090 strb.w r2, [r4, #144] ; 0x90 if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { 8030468: d802 bhi.n 8030470 pcb->persist_backoff++; 803046a: 3301 adds r3, #1 803046c: f884 3091 strb.w r3, [r4, #145] ; 0x91 } tcp_zero_window_probe(pcb); 8030470: 4620 mov r0, r4 8030472: f001 ffa4 bl 80323be 8030476: e031 b.n 80304dc } } else { /* Increase the retransmission timer if it is running */ if(pcb->rtime >= 0) { 8030478: 8ea3 ldrh r3, [r4, #52] ; 0x34 803047a: 0418 lsls r0, r3, #16 803047c: d401 bmi.n 8030482 ++pcb->rtime; 803047e: 3301 adds r3, #1 8030480: 86a3 strh r3, [r4, #52] ; 0x34 } if (pcb->unacked != NULL && pcb->rtime >= pcb->rto) { 8030482: 6f23 ldr r3, [r4, #112] ; 0x70 8030484: b353 cbz r3, 80304dc 8030486: f9b4 0034 ldrsh.w r0, [r4, #52] ; 0x34 803048a: f9b4 3044 ldrsh.w r3, [r4, #68] ; 0x44 803048e: 4298 cmp r0, r3 8030490: db24 blt.n 80304dc " 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) { 8030492: 2902 cmp r1, #2 8030494: d00b beq.n 80304ae pcb->rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[pcb->nrtx]; 8030496: f9b4 1040 ldrsh.w r1, [r4, #64] ; 0x40 803049a: f9b4 3042 ldrsh.w r3, [r4, #66] ; 0x42 803049e: eb03 03e1 add.w r3, r3, r1, asr #3 80304a2: 4975 ldr r1, [pc, #468] ; (8030678 ) 80304a4: 5c8a ldrb r2, [r1, r2] 80304a6: fa03 f302 lsl.w r3, r3, r2 80304aa: f8a4 3044 strh.w r3, [r4, #68] ; 0x44 } /* Reset the retransmission timer. */ pcb->rtime = 0; 80304ae: 2300 movs r3, #0 /* Reduce congestion window and ssthresh. */ eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); 80304b0: 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; 80304b4: 86a3 strh r3, [r4, #52] ; 0x34 /* Reduce congestion window and ssthresh. */ eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); 80304b6: f8b4 3060 ldrh.w r3, [r4, #96] ; 0x60 pcb->ssthresh = eff_wnd >> 1; 80304ba: 4299 cmp r1, r3 80304bc: bf28 it cs 80304be: 4619 movcs r1, r3 if (pcb->ssthresh < (pcb->mss << 1)) { 80304c0: 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; 80304c2: 0849 lsrs r1, r1, #1 if (pcb->ssthresh < (pcb->mss << 1)) { 80304c4: 005a lsls r2, r3, #1 80304c6: 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; 80304c8: f8a4 104e strh.w r1, [r4, #78] ; 0x4e if (pcb->ssthresh < (pcb->mss << 1)) { pcb->ssthresh = (pcb->mss << 1); } pcb->cwnd = pcb->mss; 80304cc: 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); 80304d0: bfb8 it lt 80304d2: 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); 80304d6: 4620 mov r0, r4 80304d8: f001 fee0 bl 803229c pcb = pcb->next; continue; } pcb->last_timer = tcp_timer_ctr; pcb_remove = 0; 80304dc: 2500 movs r5, #0 80304de: e000 b.n 80304e2 pcb_reset = 0; if (pcb->state == SYN_SENT && pcb->nrtx == TCP_SYNMAXRTX) { ++pcb_remove; 80304e0: 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) { 80304e2: 7e23 ldrb r3, [r4, #24] 80304e4: 2b06 cmp r3, #6 80304e6: d10c bne.n 8030502 /* If this PCB is in FIN_WAIT_2 because of SHUT_WR don't let it time out. */ if (pcb->flags & TF_RXCLOSED) { 80304e8: 7fa2 ldrb r2, [r4, #30] 80304ea: f002 0210 and.w r2, r2, #16 80304ee: b2d2 uxtb r2, r2 80304f0: b13a cbz r2, 8030502 /* PCB was fully closed (either through close() or SHUT_RDWR): normal FIN-WAIT timeout handling. */ if ((u32_t)(tcp_ticks - pcb->tmr) > 80304f2: 4a5d ldr r2, [pc, #372] ; (8030668 ) 80304f4: 6811 ldr r1, [r2, #0] 80304f6: 6a62 ldr r2, [r4, #36] ; 0x24 80304f8: 1a8a subs r2, r1, r2 80304fa: 2a28 cmp r2, #40 ; 0x28 80304fc: d901 bls.n 8030502 TCP_FIN_WAIT_TIMEOUT / TCP_SLOW_INTERVAL) { ++pcb_remove; 80304fe: 3501 adds r5, #1 8030500: b2ed uxtb r5, r5 } } } /* Check if KEEPALIVE should be sent */ if(ip_get_option(pcb, SOF_KEEPALIVE) && 8030502: 7a27 ldrb r7, [r4, #8] 8030504: f007 0708 and.w r7, r7, #8 8030508: b2ff uxtb r7, r7 803050a: b34f cbz r7, 8030560 803050c: 2b04 cmp r3, #4 803050e: d001 beq.n 8030514 ((pcb->state == ESTABLISHED) || 8030510: 2b07 cmp r3, #7 8030512: d124 bne.n 803055e (pcb->state == CLOSE_WAIT))) { if((u32_t)(tcp_ticks - pcb->tmr) > 8030514: 4b54 ldr r3, [pc, #336] ; (8030668 ) (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) 8030516: 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) > 803051a: 681a ldr r2, [r3, #0] 803051c: 6a63 ldr r3, [r4, #36] ; 0x24 803051e: 1ad2 subs r2, r2, r3 (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) 8030520: f500 2324 add.w r3, r0, #671744 ; 0xa4000 8030524: f603 43b8 addw r3, r3, #3256 ; 0xcb8 8030528: f44f 71fa mov.w r1, #500 ; 0x1f4 803052c: 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) > 8030530: 429a cmp r2, r3 8030532: d903 bls.n 803053c { 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; 8030534: 3501 adds r5, #1 8030536: b2ed uxtb r5, r5 ++pcb_reset; 8030538: 2701 movs r7, #1 803053a: e011 b.n 8030560 } else if((u32_t)(tcp_ticks - pcb->tmr) > (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) 803053c: f894 3092 ldrb.w r3, [r4, #146] ; 0x92 8030540: 4f4e ldr r7, [pc, #312] ; (803067c ) 8030542: fb07 0003 mla r0, r7, r3, r0 / TCP_SLOW_INTERVAL) 8030546: 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) > 803054a: 428a cmp r2, r1 803054c: d907 bls.n 803055e (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) / TCP_SLOW_INTERVAL) { tcp_keepalive(pcb); 803054e: 4620 mov r0, r4 8030550: f001 ff16 bl 8032380 pcb->keep_cnt_sent++; 8030554: f894 3092 ldrb.w r3, [r4, #146] ; 0x92 8030558: 3301 adds r3, #1 803055a: f884 3092 strb.w r3, [r4, #146] ; 0x92 continue; } pcb->last_timer = tcp_timer_ctr; pcb_remove = 0; pcb_reset = 0; 803055e: 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) { 8030560: 7e23 ldrb r3, [r4, #24] 8030562: 2b03 cmp r3, #3 8030564: d108 bne.n 8030578 if ((u32_t)(tcp_ticks - pcb->tmr) > 8030566: 4b40 ldr r3, [pc, #256] ; (8030668 ) 8030568: 681a ldr r2, [r3, #0] 803056a: 6a63 ldr r3, [r4, #36] ; 0x24 803056c: 1ad3 subs r3, r2, r3 803056e: 2b28 cmp r3, #40 ; 0x28 8030570: d90a bls.n 8030588 TCP_SYN_RCVD_TIMEOUT / TCP_SLOW_INTERVAL) { ++pcb_remove; 8030572: 3501 adds r5, #1 8030574: b2ed uxtb r5, r5 8030576: e007 b.n 8030588 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) { 8030578: 2b09 cmp r3, #9 803057a: d105 bne.n 8030588 if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { 803057c: 4b3a ldr r3, [pc, #232] ; (8030668 ) 803057e: 681a ldr r2, [r3, #0] 8030580: 6a63 ldr r3, [r4, #36] ; 0x24 8030582: 1ad3 subs r3, r2, r3 8030584: 2bf0 cmp r3, #240 ; 0xf0 8030586: d800 bhi.n 803058a LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in LAST-ACK\n")); } } /* If the PCB should be removed, do it. */ if (pcb_remove) { 8030588: b345 cbz r5, 80305dc struct tcp_pcb *pcb2; tcp_err_fn err_fn; void *err_arg; tcp_pcb_purge(pcb); 803058a: 4620 mov r0, r4 803058c: f7ff ff14 bl 80303b8 8030590: 68e3 ldr r3, [r4, #12] /* Remove PCB from tcp_active_pcbs list. */ if (prev != NULL) { 8030592: b10e cbz r6, 8030598 LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs); prev->next = pcb->next; 8030594: 60f3 str r3, [r6, #12] 8030596: e001 b.n 803059c } else { /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb); tcp_active_pcbs = pcb->next; 8030598: 4a35 ldr r2, [pc, #212] ; (8030670 ) 803059a: 6013 str r3, [r2, #0] } if (pcb_reset) { 803059c: b14f cbz r7, 80305b2 tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, 803059e: 8b63 ldrh r3, [r4, #26] 80305a0: 9300 str r3, [sp, #0] 80305a2: 8ba3 ldrh r3, [r4, #28] 80305a4: 9301 str r3, [sp, #4] 80305a6: 6d20 ldr r0, [r4, #80] ; 0x50 80305a8: 6aa1 ldr r1, [r4, #40] ; 0x28 80305aa: 4622 mov r2, r4 80305ac: 1d23 adds r3, r4, #4 80305ae: f001 fe2f bl 8032210 pcb->local_port, pcb->remote_port); } err_fn = pcb->errf; 80305b2: f8d4 5088 ldr.w r5, [r4, #136] ; 0x88 err_arg = pcb->callback_arg; 80305b6: f8d4 b010 ldr.w fp, [r4, #16] pcb2 = pcb; pcb = pcb->next; 80305ba: 68e7 ldr r7, [r4, #12] memp_free(MEMP_TCP_PCB, pcb2); 80305bc: 2002 movs r0, #2 80305be: 4621 mov r1, r4 80305c0: f7ff fa9a bl 802faf8 tcp_active_pcbs_changed = 0; 80305c4: 2300 movs r3, #0 80305c6: f888 3000 strb.w r3, [r8] TCP_EVENT_ERR(err_fn, err_arg, ERR_ABRT); 80305ca: b11d cbz r5, 80305d4 80305cc: 4658 mov r0, fp 80305ce: f06f 0109 mvn.w r1, #9 80305d2: 47a8 blx r5 if (tcp_active_pcbs_changed) { 80305d4: f899 3000 ldrb.w r3, [r9] 80305d8: b1f3 cbz r3, 8030618 80305da: e718 b.n 803040e /* 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; 80305dc: 7fe3 ldrb r3, [r4, #31] if (prev->polltmr >= prev->pollinterval) { 80305de: 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; 80305e2: 68e7 ldr r7, [r4, #12] /* We check if we should poll the connection. */ ++prev->polltmr; 80305e4: 3301 adds r3, #1 80305e6: b2db uxtb r3, r3 if (prev->polltmr >= prev->pollinterval) { 80305e8: 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; 80305ea: 77e3 strb r3, [r4, #31] if (prev->polltmr >= prev->pollinterval) { 80305ec: d813 bhi.n 8030616 prev->polltmr = 0; LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n")); tcp_active_pcbs_changed = 0; TCP_EVENT_POLL(prev, err); 80305ee: 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; 80305f2: 77e5 strb r5, [r4, #31] LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n")); tcp_active_pcbs_changed = 0; 80305f4: f888 5000 strb.w r5, [r8] TCP_EVENT_POLL(prev, err); 80305f8: b11b cbz r3, 8030602 80305fa: 6920 ldr r0, [r4, #16] 80305fc: 4621 mov r1, r4 80305fe: 4798 blx r3 8030600: e000 b.n 8030604 8030602: 4628 mov r0, r5 if (tcp_active_pcbs_changed) { 8030604: f899 3000 ldrb.w r3, [r9] 8030608: 2b00 cmp r3, #0 803060a: f47f af00 bne.w 803040e goto tcp_slowtmr_start; } /* if err == ERR_ABRT, 'prev' is already deallocated */ if (err == ERR_OK) { 803060e: b910 cbnz r0, 8030616 tcp_output(prev); 8030610: 4620 mov r0, r4 8030612: f001 fcd9 bl 8031fc8 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) { 8030616: 4626 mov r6, r4 prev = pcb; pcb = pcb->next; /* We check if we should poll the connection. */ ++prev->polltmr; if (prev->polltmr >= prev->pollinterval) { 8030618: 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) { 803061a: 2c00 cmp r4, #0 803061c: f47f aefd bne.w 803041a } /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; 8030620: 4b17 ldr r3, [pc, #92] ; (8030680 ) 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) { 8030622: 4e11 ldr r6, [pc, #68] ; (8030668 ) } /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; 8030624: 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; 8030626: 461f mov r7, r3 /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; while (pcb != NULL) { 8030628: e00f b.n 803064a 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) { 803062a: 6832 ldr r2, [r6, #0] 803062c: 6a6b ldr r3, [r5, #36] ; 0x24 803062e: 1ad3 subs r3, r2, r3 8030630: 2bf0 cmp r3, #240 ; 0xf0 8030632: d810 bhi.n 8030656 8030634: e00c b.n 8030650 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; 8030636: 60e2 str r2, [r4, #12] 8030638: e000 b.n 803063c } else { /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb); tcp_tw_pcbs = pcb->next; 803063a: 603a str r2, [r7, #0] } pcb2 = pcb; pcb = pcb->next; memp_free(MEMP_TCP_PCB, pcb2); 803063c: 4629 mov r1, r5 803063e: 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; 8030640: f8d5 800c ldr.w r8, [r5, #12] memp_free(MEMP_TCP_PCB, pcb2); 8030644: f7ff fa58 bl 802faf8 /* 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; 8030648: 4645 mov r5, r8 /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; while (pcb != NULL) { 803064a: 2d00 cmp r5, #0 803064c: d1ed bne.n 803062a 803064e: e009 b.n 8030664 pcb2 = pcb; pcb = pcb->next; memp_free(MEMP_TCP_PCB, pcb2); } else { prev = pcb; pcb = pcb->next; 8030650: 462c mov r4, r5 8030652: 68ed ldr r5, [r5, #12] 8030654: e7f9 b.n 803064a /* If the PCB should be removed, do it. */ if (pcb_remove) { struct tcp_pcb *pcb2; tcp_pcb_purge(pcb); 8030656: 4628 mov r0, r5 8030658: f7ff feae bl 80303b8 803065c: 68ea ldr r2, [r5, #12] /* Remove PCB from tcp_tw_pcbs list. */ if (prev != NULL) { 803065e: 2c00 cmp r4, #0 8030660: d1e9 bne.n 8030636 8030662: e7ea b.n 803063a } else { prev = pcb; pcb = pcb->next; } } } 8030664: e8bd 8ffe ldmia.w sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8030668: 2000f6bc .word 0x2000f6bc 803066c: 2000c3d9 .word 0x2000c3d9 8030670: 2000f6b8 .word 0x2000f6b8 8030674: 08044e39 .word 0x08044e39 8030678: 08044e2c .word 0x08044e2c 803067c: 000124f8 .word 0x000124f8 8030680: 2000f6cc .word 0x2000f6cc 8030684: 2000f6b4 .word 0x2000f6b4 08030688 : * @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); 8030688: 6803 ldr r3, [r0, #0] 803068a: 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) { 803068c: b510 push {r4, lr} 803068e: 460c mov r4, r1 TCP_RMV(pcblist, pcb); 8030690: d102 bne.n 8030698 8030692: 68cb ldr r3, [r1, #12] 8030694: 6003 str r3, [r0, #0] 8030696: e00d b.n 80306b4 8030698: 4a11 ldr r2, [pc, #68] ; (80306e0 ) 803069a: 6013 str r3, [r2, #0] 803069c: e007 b.n 80306ae 803069e: 68d9 ldr r1, [r3, #12] 80306a0: 42a1 cmp r1, r4 80306a2: d103 bne.n 80306ac 80306a4: 6013 str r3, [r2, #0] 80306a6: 68e2 ldr r2, [r4, #12] 80306a8: 60da str r2, [r3, #12] 80306aa: e003 b.n 80306b4 80306ac: 460b mov r3, r1 80306ae: 2b00 cmp r3, #0 80306b0: d1f5 bne.n 803069e 80306b2: 6013 str r3, [r2, #0] 80306b4: 2300 movs r3, #0 80306b6: 60e3 str r3, [r4, #12] tcp_pcb_purge(pcb); 80306b8: 4620 mov r0, r4 80306ba: f7ff fe7d bl 80303b8 /* if there is an outstanding delayed ACKs, send it */ if (pcb->state != TIME_WAIT && 80306be: 7e23 ldrb r3, [r4, #24] 80306c0: 2b0a cmp r3, #10 80306c2: d00a beq.n 80306da 80306c4: 2b01 cmp r3, #1 80306c6: d008 beq.n 80306da pcb->state != LISTEN && pcb->flags & TF_ACK_DELAY) { 80306c8: 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 && 80306ca: 07da lsls r2, r3, #31 80306cc: d505 bpl.n 80306da pcb->flags & TF_ACK_DELAY) { pcb->flags |= TF_ACK_NOW; 80306ce: f043 0302 orr.w r3, r3, #2 80306d2: 77a3 strb r3, [r4, #30] tcp_output(pcb); 80306d4: 4620 mov r0, r4 80306d6: f001 fc77 bl 8031fc8 #if TCP_QUEUE_OOSEQ LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL); #endif /* TCP_QUEUE_OOSEQ */ } pcb->state = CLOSED; 80306da: 2300 movs r3, #0 80306dc: 7623 strb r3, [r4, #24] 80306de: bd10 pop {r4, pc} 80306e0: 2000f6c4 .word 0x2000f6c4 080306e4 : 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) { 80306e4: 7e03 ldrb r3, [r0, #24] 80306e6: 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) { 80306e8: e92d 43f7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, lr} 80306ec: 4604 mov r4, r0 80306ee: 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) { 80306f0: d10a bne.n 8030708 tcp_pcb_remove(&tcp_tw_pcbs, pcb); 80306f2: 4621 mov r1, r4 80306f4: 481b ldr r0, [pc, #108] ; (8030764 ) 80306f6: f7ff ffc7 bl 8030688 memp_free(MEMP_TCP_PCB, pcb); 80306fa: 2002 movs r0, #2 80306fc: 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); } } 80306fe: b003 add sp, #12 8030700: 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); 8030704: f7ff b9f8 b.w 802faf8 } else { seqno = pcb->snd_nxt; 8030708: f8d0 8050 ldr.w r8, [r0, #80] ; 0x50 ackno = pcb->rcv_nxt; 803070c: 6a87 ldr r7, [r0, #40] ; 0x28 #if LWIP_CALLBACK_API errf = pcb->errf; 803070e: f8d0 5088 ldr.w r5, [r0, #136] ; 0x88 #endif /* LWIP_CALLBACK_API */ errf_arg = pcb->callback_arg; 8030712: 6906 ldr r6, [r0, #16] TCP_PCB_REMOVE_ACTIVE(pcb); 8030714: 4814 ldr r0, [pc, #80] ; (8030768 ) 8030716: 4621 mov r1, r4 8030718: f7ff ffb6 bl 8030688 803071c: 4b13 ldr r3, [pc, #76] ; (803076c ) if (pcb->unacked != NULL) { 803071e: 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); 8030720: 2201 movs r2, #1 8030722: 701a strb r2, [r3, #0] if (pcb->unacked != NULL) { 8030724: b108 cbz r0, 803072a tcp_segs_free(pcb->unacked); 8030726: f7ff fe2e bl 8030386 } if (pcb->unsent != NULL) { 803072a: 6ee0 ldr r0, [r4, #108] ; 0x6c 803072c: b108 cbz r0, 8030732 tcp_segs_free(pcb->unsent); 803072e: f7ff fe2a bl 8030386 #if TCP_QUEUE_OOSEQ if (pcb->ooseq != NULL) { tcp_segs_free(pcb->ooseq); } #endif /* TCP_QUEUE_OOSEQ */ if (reset) { 8030732: f1b9 0f00 cmp.w r9, #0 8030736: d009 beq.n 803074c 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); 8030738: 8b63 ldrh r3, [r4, #26] 803073a: 9300 str r3, [sp, #0] 803073c: 8ba3 ldrh r3, [r4, #28] 803073e: 4640 mov r0, r8 8030740: 9301 str r3, [sp, #4] 8030742: 4639 mov r1, r7 8030744: 4622 mov r2, r4 8030746: 1d23 adds r3, r4, #4 8030748: f001 fd62 bl 8032210 } memp_free(MEMP_TCP_PCB, pcb); 803074c: 2002 movs r0, #2 803074e: 4621 mov r1, r4 8030750: f7ff f9d2 bl 802faf8 TCP_EVENT_ERR(errf, errf_arg, ERR_ABRT); 8030754: b11d cbz r5, 803075e 8030756: 4630 mov r0, r6 8030758: f06f 0109 mvn.w r1, #9 803075c: 47a8 blx r5 } } 803075e: b003 add sp, #12 8030760: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 8030764: 2000f6cc .word 0x2000f6cc 8030768: 2000f6b8 .word 0x2000f6b8 803076c: 2000f6b4 .word 0x2000f6b4 08030770 : * @param pcb the tcp pcb to abort */ void tcp_abort(struct tcp_pcb *pcb) { tcp_abandon(pcb, 1); 8030770: 2101 movs r1, #1 8030772: f7ff bfb7 b.w 80306e4 8030776: 0000 movs r0, r0 08030778 : * @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) { 8030778: b537 push {r0, r1, r2, r4, r5, lr} 803077a: 4604 mov r4, r0 err_t err; if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { 803077c: 2900 cmp r1, #0 803077e: d043 beq.n 8030808 8030780: 7e03 ldrb r3, [r0, #24] 8030782: 2b04 cmp r3, #4 8030784: d001 beq.n 803078a 8030786: 2b07 cmp r3, #7 8030788: d13e bne.n 8030808 if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND)) { 803078a: 6f63 ldr r3, [r4, #116] ; 0x74 803078c: b923 cbnz r3, 8030798 803078e: 8da2 ldrh r2, [r4, #44] ; 0x2c 8030790: f241 63d0 movw r3, #5840 ; 0x16d0 8030794: 429a cmp r2, r3 8030796: d037 beq.n 8030808 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, 8030798: 8b63 ldrh r3, [r4, #26] 803079a: 6d20 ldr r0, [r4, #80] ; 0x50 803079c: 9300 str r3, [sp, #0] 803079e: 8ba3 ldrh r3, [r4, #28] 80307a0: 6aa1 ldr r1, [r4, #40] ; 0x28 80307a2: 9301 str r3, [sp, #4] 80307a4: 4622 mov r2, r4 80307a6: 1d23 adds r3, r4, #4 80307a8: f001 fd32 bl 8032210 pcb->local_port, pcb->remote_port); tcp_pcb_purge(pcb); 80307ac: 4620 mov r0, r4 80307ae: f7ff fe03 bl 80303b8 TCP_RMV_ACTIVE(pcb); 80307b2: 4a42 ldr r2, [pc, #264] ; (80308bc ) 80307b4: 6813 ldr r3, [r2, #0] 80307b6: 42a3 cmp r3, r4 80307b8: d101 bne.n 80307be 80307ba: 68e3 ldr r3, [r4, #12] 80307bc: e00c b.n 80307d8 80307be: 4a40 ldr r2, [pc, #256] ; (80308c0 ) 80307c0: 6013 str r3, [r2, #0] 80307c2: e007 b.n 80307d4 80307c4: 68d9 ldr r1, [r3, #12] 80307c6: 42a1 cmp r1, r4 80307c8: d103 bne.n 80307d2 80307ca: 6013 str r3, [r2, #0] 80307cc: 68e2 ldr r2, [r4, #12] 80307ce: 60da str r2, [r3, #12] 80307d0: e003 b.n 80307da 80307d2: 460b mov r3, r1 80307d4: 2b00 cmp r3, #0 80307d6: d1f5 bne.n 80307c4 80307d8: 6013 str r3, [r2, #0] 80307da: 4b3a ldr r3, [pc, #232] ; (80308c4 ) 80307dc: 2201 movs r2, #1 80307de: 701a strb r2, [r3, #0] if (pcb->state == ESTABLISHED) { 80307e0: 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); 80307e2: 2500 movs r5, #0 if (pcb->state == ESTABLISHED) { 80307e4: 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); 80307e6: 60e5 str r5, [r4, #12] if (pcb->state == ESTABLISHED) { 80307e8: d108 bne.n 80307fc /* move to TIME_WAIT since we close actively */ pcb->state = TIME_WAIT; 80307ea: 230a movs r3, #10 80307ec: 7623 strb r3, [r4, #24] TCP_REG(&tcp_tw_pcbs, pcb); 80307ee: 4b36 ldr r3, [pc, #216] ; (80308c8 ) 80307f0: 681a ldr r2, [r3, #0] 80307f2: 601c str r4, [r3, #0] 80307f4: 60e2 str r2, [r4, #12] 80307f6: f001 fea5 bl 8032544 80307fa: e003 b.n 8030804 } else { /* CLOSE_WAIT: deallocate the pcb since we already sent a RST for it */ memp_free(MEMP_TCP_PCB, pcb); 80307fc: 2002 movs r0, #2 80307fe: 4621 mov r1, r4 8030800: f7ff f97a bl 802faf8 } return ERR_OK; 8030804: 4628 mov r0, r5 8030806: e051 b.n 80308ac } } switch (pcb->state) { 8030808: 7e23 ldrb r3, [r4, #24] 803080a: 2b07 cmp r3, #7 803080c: d853 bhi.n 80308b6 803080e: e8df f003 tbb [pc, r3] 8030812: 1e04 .short 0x1e04 8030814: 523c3527 .word 0x523c3527 8030818: 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) { 803081a: 8b63 ldrh r3, [r4, #26] 803081c: b1ab cbz r3, 803084a TCP_RMV(&tcp_bound_pcbs, pcb); 803081e: 4a2b ldr r2, [pc, #172] ; (80308cc ) 8030820: 6813 ldr r3, [r2, #0] 8030822: 42a3 cmp r3, r4 8030824: d101 bne.n 803082a 8030826: 68e3 ldr r3, [r4, #12] 8030828: e00c b.n 8030844 803082a: 4a25 ldr r2, [pc, #148] ; (80308c0 ) 803082c: 6013 str r3, [r2, #0] 803082e: e007 b.n 8030840 8030830: 68d9 ldr r1, [r3, #12] 8030832: 42a1 cmp r1, r4 8030834: d103 bne.n 803083e 8030836: 6013 str r3, [r2, #0] 8030838: 68e2 ldr r2, [r4, #12] 803083a: 60da str r2, [r3, #12] 803083c: e003 b.n 8030846 803083e: 460b mov r3, r1 8030840: 2b00 cmp r3, #0 8030842: d1f5 bne.n 8030830 8030844: 6013 str r3, [r2, #0] 8030846: 2300 movs r3, #0 8030848: 60e3 str r3, [r4, #12] } memp_free(MEMP_TCP_PCB, pcb); 803084a: 2002 movs r0, #2 803084c: e004 b.n 8030858 pcb = NULL; break; case LISTEN: err = ERR_OK; tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb); 803084e: 4820 ldr r0, [pc, #128] ; (80308d0 ) 8030850: 4621 mov r1, r4 8030852: f7ff ff19 bl 8030688 memp_free(MEMP_TCP_PCB_LISTEN, pcb); 8030856: 2003 movs r0, #3 8030858: 4621 mov r1, r4 803085a: f7ff f94d bl 802faf8 pcb = NULL; break; 803085e: e02a b.n 80308b6 case SYN_SENT: err = ERR_OK; TCP_PCB_REMOVE_ACTIVE(pcb); 8030860: 4621 mov r1, r4 8030862: 4816 ldr r0, [pc, #88] ; (80308bc ) 8030864: f7ff ff10 bl 8030688 8030868: 4b16 ldr r3, [pc, #88] ; (80308c4 ) 803086a: 2201 movs r2, #1 memp_free(MEMP_TCP_PCB, pcb); 803086c: 2002 movs r0, #2 803086e: 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); 8030870: 701a strb r2, [r3, #0] memp_free(MEMP_TCP_PCB, pcb); 8030872: f7ff f941 bl 802faf8 pcb = NULL; snmp_inc_tcpattemptfails(); 8030876: f004 f957 bl 8034b28 break; 803087a: e01c b.n 80308b6 case SYN_RCVD: err = tcp_send_fin(pcb); 803087c: 4620 mov r0, r4 803087e: f001 fb5e bl 8031f3e if (err == ERR_OK) { 8030882: b998 cbnz r0, 80308ac snmp_inc_tcpattemptfails(); 8030884: f004 f950 bl 8034b28 8030888: e005 b.n 8030896 pcb->state = FIN_WAIT_1; } break; case ESTABLISHED: err = tcp_send_fin(pcb); 803088a: 4620 mov r0, r4 803088c: f001 fb57 bl 8031f3e if (err == ERR_OK) { 8030890: b960 cbnz r0, 80308ac snmp_inc_tcpestabresets(); 8030892: f004 f951 bl 8034b38 pcb->state = FIN_WAIT_1; 8030896: 2305 movs r3, #5 8030898: e006 b.n 80308a8 } break; case CLOSE_WAIT: err = tcp_send_fin(pcb); 803089a: 4620 mov r0, r4 803089c: f001 fb4f bl 8031f3e if (err == ERR_OK) { 80308a0: b920 cbnz r0, 80308ac snmp_inc_tcpestabresets(); 80308a2: f004 f949 bl 8034b38 pcb->state = LAST_ACK; 80308a6: 2309 movs r3, #9 80308a8: 7623 strb r3, [r4, #24] 80308aa: e001 b.n 80308b0 80308ac: b240 sxtb r0, r0 80308ae: e004 b.n 80308ba 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); 80308b0: 4620 mov r0, r4 80308b2: f001 fb89 bl 8031fc8 80308b6: 2000 movs r0, #0 80308b8: e7f8 b.n 80308ac } return err; } 80308ba: bd3e pop {r1, r2, r3, r4, r5, pc} 80308bc: 2000f6b8 .word 0x2000f6b8 80308c0: 2000f6c4 .word 0x2000f6c4 80308c4: 2000f6b4 .word 0x2000f6b4 80308c8: 2000f6cc .word 0x2000f6cc 80308cc: 2000f6c8 .word 0x2000f6c8 80308d0: 2000f6c0 .word 0x2000f6c0 080308d4 : * another err_t on error. */ err_t tcp_shutdown(struct tcp_pcb *pcb, int shut_rx, int shut_tx) { if (pcb->state == LISTEN) { 80308d4: 7e03 ldrb r3, [r0, #24] 80308d6: 2b01 cmp r3, #1 * @return ERR_OK if shutdown succeeded (or the PCB has already been shut down) * another err_t on error. */ err_t tcp_shutdown(struct tcp_pcb *pcb, int shut_rx, int shut_tx) { 80308d8: b570 push {r4, r5, r6, lr} 80308da: 4604 mov r4, r0 80308dc: 460e mov r6, r1 80308de: 4615 mov r5, r2 if (pcb->state == LISTEN) { 80308e0: d019 beq.n 8030916 return ERR_CONN; } if (shut_rx) { 80308e2: b161 cbz r1, 80308fe /* shut down the receive side: set a flag not to receive any more data... */ pcb->flags |= TF_RXCLOSED; 80308e4: 7f83 ldrb r3, [r0, #30] 80308e6: f043 0310 orr.w r3, r3, #16 80308ea: 7783 strb r3, [r0, #30] if (shut_tx) { 80308ec: b10a cbz r2, 80308f2 /* shutting down the tx AND rx side is the same as closing for the raw API */ return tcp_close_shutdown(pcb, 1); 80308ee: 2101 movs r1, #1 80308f0: e00d b.n 803090e } /* ... and free buffered data */ if (pcb->refused_data != NULL) { 80308f2: 6f40 ldr r0, [r0, #116] ; 0x74 80308f4: b190 cbz r0, 803091c pbuf_free(pcb->refused_data); 80308f6: f7ff fa09 bl 802fd0c pcb->refused_data = NULL; 80308fa: 6765 str r5, [r4, #116] ; 0x74 80308fc: e00e b.n 803091c } } if (shut_tx) { 80308fe: b15a cbz r2, 8030918 /* This can't happen twice since if it succeeds, the pcb's state is changed. Only close in these states as the others directly deallocate the PCB */ switch (pcb->state) { 8030900: 2b07 cmp r3, #7 8030902: d808 bhi.n 8030916 8030904: b25b sxtb r3, r3 8030906: f04f 52c8 mov.w r2, #419430400 ; 0x19000000 803090a: 409a lsls r2, r3 803090c: d503 bpl.n 8030916 into CLOSED state, where the PCB is deallocated. */ return ERR_CONN; } } return ERR_OK; } 803090e: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} Only close in these states as the others directly deallocate the PCB */ switch (pcb->state) { case SYN_RCVD: case ESTABLISHED: case CLOSE_WAIT: return tcp_close_shutdown(pcb, shut_rx); 8030912: f7ff bf31 b.w 8030778 default: /* Not (yet?) connected, cannot shutdown the TX side as that would bring us into CLOSED state, where the PCB is deallocated. */ return ERR_CONN; 8030916: 25f3 movs r5, #243 ; 0xf3 8030918: b268 sxtb r0, r5 803091a: bd70 pop {r4, r5, r6, pc} } } return ERR_OK; 803091c: 2500 movs r5, #0 803091e: e7fb b.n 8030918 08030920 : #if TCP_DEBUG LWIP_DEBUGF(TCP_DEBUG, ("tcp_close: closing in ")); tcp_debug_print_state(pcb->state); #endif /* TCP_DEBUG */ if (pcb->state != LISTEN) { 8030920: 7e03 ldrb r3, [r0, #24] 8030922: 2b01 cmp r3, #1 8030924: d003 beq.n 803092e /* Set a flag not to receive any more data... */ pcb->flags |= TF_RXCLOSED; 8030926: 7f83 ldrb r3, [r0, #30] 8030928: f043 0310 orr.w r3, r3, #16 803092c: 7783 strb r3, [r0, #30] } /* ... and close */ return tcp_close_shutdown(pcb, 1); 803092e: 2101 movs r1, #1 8030930: f7ff bf22 b.w 8030778 08030934 : * 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) { 8030934: b510 push {r4, lr} 8030936: 4608 mov r0, r1 LWIP_UNUSED_ARG(arg); if (p != NULL) { 8030938: 4614 mov r4, r2 803093a: b132 cbz r2, 803094a tcp_recved(pcb, p->tot_len); 803093c: 8911 ldrh r1, [r2, #8] 803093e: f7ff fcf9 bl 8030334 pbuf_free(p); 8030942: 4620 mov r0, r4 8030944: f7ff f9e2 bl 802fd0c 8030948: e004 b.n 8030954 } else if (err == ERR_OK) { 803094a: b91b cbnz r3, 8030954 return tcp_close(pcb); } return ERR_OK; } 803094c: 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); 8030950: f7ff bfe6 b.w 8030920 } return ERR_OK; } 8030954: 2000 movs r0, #0 8030956: bd10 pop {r4, pc} 08030958 : } /** Pass pcb->refused_data to the recv callback */ err_t tcp_process_refused_data(struct tcp_pcb *pcb) { 8030958: b5f8 push {r3, r4, r5, r6, r7, lr} err_t err; u8_t refused_flags = pcb->refused_data->flags; 803095a: 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); 803095c: 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; 803095e: 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; 8030960: 2300 movs r3, #0 } /** Pass pcb->refused_data to the recv callback */ err_t tcp_process_refused_data(struct tcp_pcb *pcb) { 8030962: 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; 8030964: 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); 8030966: b126 cbz r6, 8030972 8030968: 4621 mov r1, r4 803096a: 462a mov r2, r5 803096c: 6900 ldr r0, [r0, #16] 803096e: 47b0 blx r6 8030970: e005 b.n 803097e 8030972: 4630 mov r0, r6 8030974: 4621 mov r1, r4 8030976: 462a mov r2, r5 8030978: 4633 mov r3, r6 803097a: f7ff ffdb bl 8030934 if (err == ERR_OK) { 803097e: b9b0 cbnz r0, 80309ae /* did refused_data include a FIN? */ if (refused_flags & PBUF_FLAG_TCP_FIN) { 8030980: f007 0720 and.w r7, r7, #32 8030984: b2ff uxtb r7, r7 8030986: b1bf cbz r7, 80309b8 /* correct rcv_wnd as the application won't call tcp_recved() for the FIN's seqno */ if (pcb->rcv_wnd != TCP_WND) { 8030988: 8da3 ldrh r3, [r4, #44] ; 0x2c 803098a: f241 62d0 movw r2, #5840 ; 0x16d0 803098e: 4293 cmp r3, r2 8030990: d001 beq.n 8030996 pcb->rcv_wnd++; 8030992: 3301 adds r3, #1 8030994: 85a3 strh r3, [r4, #44] ; 0x2c } TCP_EVENT_CLOSED(pcb, err); 8030996: 6fe5 ldr r5, [r4, #124] ; 0x7c 8030998: b905 cbnz r5, 803099c 803099a: e00c b.n 80309b6 803099c: 2200 movs r2, #0 803099e: 6920 ldr r0, [r4, #16] 80309a0: 4621 mov r1, r4 80309a2: 4613 mov r3, r2 80309a4: 47a8 blx r5 if (err == ERR_ABRT) { 80309a6: 300a adds r0, #10 80309a8: d105 bne.n 80309b6 return ERR_ABRT; 80309aa: 20f6 movs r0, #246 ; 0xf6 80309ac: e004 b.n 80309b8 } } } else if (err == ERR_ABRT) { 80309ae: b240 sxtb r0, r0 80309b0: 300a adds r0, #10 80309b2: d0fa beq.n 80309aa 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; 80309b4: 6765 str r5, [r4, #116] ; 0x74 } return ERR_OK; 80309b6: 2000 movs r0, #0 } 80309b8: b240 sxtb r0, r0 80309ba: bdf8 pop {r3, r4, r5, r6, r7, pc} 080309bc : * * Automatically called from tcp_tmr(). */ void tcp_fasttmr(void) { 80309bc: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} struct tcp_pcb *pcb; ++tcp_timer_ctr; 80309c0: 4b18 ldr r3, [pc, #96] ; (8030a24 ) tcp_fasttmr_start: pcb = tcp_active_pcbs; 80309c2: 4f19 ldr r7, [pc, #100] ; (8030a28 ) void tcp_fasttmr(void) { struct tcp_pcb *pcb; ++tcp_timer_ctr; 80309c4: 781a ldrb r2, [r3, #0] 80309c6: 3201 adds r2, #1 80309c8: 701a strb r2, [r3, #0] tcp_fasttmr_start: pcb = tcp_active_pcbs; while(pcb != NULL) { if (pcb->last_timer != tcp_timer_ctr) { 80309ca: 4698 mov r8, r3 struct tcp_pcb *pcb; ++tcp_timer_ctr; tcp_fasttmr_start: pcb = tcp_active_pcbs; 80309cc: 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; 80309ce: 4d17 ldr r5, [pc, #92] ; (8030a2c ) 80309d0: 2600 movs r6, #0 ++tcp_timer_ctr; tcp_fasttmr_start: pcb = tcp_active_pcbs; while(pcb != NULL) { 80309d2: e022 b.n 8030a1a if (pcb->last_timer != tcp_timer_ctr) { 80309d4: f898 2000 ldrb.w r2, [r8] 80309d8: f894 3021 ldrb.w r3, [r4, #33] ; 0x21 80309dc: 4293 cmp r3, r2 80309de: d020 beq.n 8030a22 struct tcp_pcb *next; pcb->last_timer = tcp_timer_ctr; 80309e0: f884 2021 strb.w r2, [r4, #33] ; 0x21 /* send delayed ACKs */ if (pcb->flags & TF_ACK_DELAY) { 80309e4: 7fa2 ldrb r2, [r4, #30] 80309e6: 07d1 lsls r1, r2, #31 80309e8: d509 bpl.n 80309fe LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n")); tcp_ack_now(pcb); 80309ea: f042 0202 orr.w r2, r2, #2 80309ee: 77a2 strb r2, [r4, #30] tcp_output(pcb); 80309f0: 4620 mov r0, r4 80309f2: f001 fae9 bl 8031fc8 pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); 80309f6: 7fa3 ldrb r3, [r4, #30] 80309f8: f023 0303 bic.w r3, r3, #3 80309fc: 77a3 strb r3, [r4, #30] } next = pcb->next; /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 80309fe: 6f63 ldr r3, [r4, #116] ; 0x74 tcp_ack_now(pcb); tcp_output(pcb); pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); } next = pcb->next; 8030a00: f8d4 900c ldr.w r9, [r4, #12] /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 8030a04: b90b cbnz r3, 8030a0a 8030a06: 464c mov r4, r9 8030a08: e007 b.n 8030a1a tcp_active_pcbs_changed = 0; tcp_process_refused_data(pcb); 8030a0a: 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; 8030a0c: 702e strb r6, [r5, #0] tcp_process_refused_data(pcb); 8030a0e: f7ff ffa3 bl 8030958 if (tcp_active_pcbs_changed) { 8030a12: 782b ldrb r3, [r5, #0] 8030a14: 2b00 cmp r3, #0 8030a16: d1d9 bne.n 80309cc 8030a18: e7f5 b.n 8030a06 ++tcp_timer_ctr; tcp_fasttmr_start: pcb = tcp_active_pcbs; while(pcb != NULL) { 8030a1a: 2c00 cmp r4, #0 8030a1c: d1da bne.n 80309d4 8030a1e: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8030a22: e7fe b.n 8030a22 8030a24: 2000c3d9 .word 0x2000c3d9 8030a28: 2000f6b8 .word 0x2000f6b8 8030a2c: 2000f6b4 .word 0x2000f6b4 08030a30 : /** * Called periodically to dispatch TCP timers. */ void tcp_tmr(void) { 8030a30: b508 push {r3, lr} /* Call tcp_fasttmr() every 250 ms */ tcp_fasttmr(); 8030a32: f7ff ffc3 bl 80309bc if (++tcp_timer & 1) { 8030a36: 4a06 ldr r2, [pc, #24] ; (8030a50 ) 8030a38: 7813 ldrb r3, [r2, #0] 8030a3a: 3301 adds r3, #1 8030a3c: b2db uxtb r3, r3 8030a3e: 07d8 lsls r0, r3, #31 8030a40: 7013 strb r3, [r2, #0] 8030a42: d503 bpl.n 8030a4c /* Call tcp_tmr() every 500 ms, i.e., every other timer tcp_tmr() is called. */ tcp_slowtmr(); } } 8030a44: 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(); 8030a48: f7ff bcd4 b.w 80303f4 8030a4c: bd08 pop {r3, pc} 8030a4e: bf00 nop 8030a50: 2000c3d8 .word 0x2000c3d8 08030a54 : u32_t tcp_next_iss(void) { static u32_t iss = 6510; iss += tcp_ticks; /* XXX */ 8030a54: 4b03 ldr r3, [pc, #12] ; (8030a64 ) 8030a56: 4a04 ldr r2, [pc, #16] ; (8030a68 ) 8030a58: 6810 ldr r0, [r2, #0] 8030a5a: 681a ldr r2, [r3, #0] 8030a5c: 1880 adds r0, r0, r2 8030a5e: 6018 str r0, [r3, #0] return iss; } 8030a60: 4770 bx lr 8030a62: bf00 nop 8030a64: 20000710 .word 0x20000710 8030a68: 2000f6bc .word 0x2000f6bc 08030a6c : * @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) { 8030a6c: b5f8 push {r3, r4, r5, r6, r7, lr} 8030a6e: 4605 mov r5, r0 struct tcp_pcb *pcb; u32_t iss; pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 8030a70: 2002 movs r0, #2 8030a72: f7ff f82b bl 802facc if (pcb == NULL) { 8030a76: 4604 mov r4, r0 8030a78: 2800 cmp r0, #0 8030a7a: d136 bne.n 8030aea 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) { 8030a7c: 4b39 ldr r3, [pc, #228] ; (8030b64 ) if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 8030a7e: 4a3a ldr r2, [pc, #232] ; (8030b68 ) 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) { 8030a80: 681b ldr r3, [r3, #0] if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 8030a82: 6811 ldr r1, [r2, #0] 8030a84: e007 b.n 8030a96 8030a86: 6a5a ldr r2, [r3, #36] ; 0x24 8030a88: 1a8a subs r2, r1, r2 8030a8a: 42a2 cmp r2, r4 8030a8c: bf34 ite cc 8030a8e: 4622 movcc r2, r4 8030a90: 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) { 8030a92: 68db ldr r3, [r3, #12] 8030a94: 4614 mov r4, r2 8030a96: 2b00 cmp r3, #0 8030a98: d1f5 bne.n 8030a86 if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { inactivity = tcp_ticks - pcb->tmr; inactive = pcb; } } if (inactive != NULL) { 8030a9a: b108 cbz r0, 8030aa0 LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_timewait: killing oldest TIME-WAIT PCB %p (%"S32_F")\n", (void *)inactive, inactivity)); tcp_abort(inactive); 8030a9c: f7ff fe68 bl 8030770 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); 8030aa0: 2002 movs r0, #2 8030aa2: f7ff f813 bl 802facc if (pcb == NULL) { 8030aa6: 4604 mov r4, r0 8030aa8: b9f8 cbnz r0, 8030aea 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) { 8030aaa: 4a2f ldr r2, [pc, #188] ; (8030b68 ) 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) { 8030aac: 4b2f ldr r3, [pc, #188] ; (8030b6c ) if (pcb->prio <= prio && pcb->prio <= mprio && (u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 8030aae: 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) { 8030ab0: 681b ldr r3, [r3, #0] struct tcp_pcb *pcb, *inactive; u32_t inactivity; u8_t mprio; mprio = TCP_PRIO_MAX; 8030ab2: 207f movs r0, #127 ; 0x7f /* We kill the oldest active connection that has lower priority than prio. */ inactivity = 0; inactive = NULL; 8030ab4: 4622 mov r2, r4 8030ab6: e00c b.n 8030ad2 for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { if (pcb->prio <= prio && 8030ab8: 7e59 ldrb r1, [r3, #25] 8030aba: 42a9 cmp r1, r5 8030abc: d808 bhi.n 8030ad0 8030abe: 4281 cmp r1, r0 8030ac0: d806 bhi.n 8030ad0 pcb->prio <= mprio && (u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 8030ac2: 6a5e ldr r6, [r3, #36] ; 0x24 8030ac4: 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 && 8030ac6: 42a6 cmp r6, r4 8030ac8: d302 bcc.n 8030ad0 8030aca: 4608 mov r0, r1 8030acc: 4634 mov r4, r6 8030ace: 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) { 8030ad0: 68db ldr r3, [r3, #12] 8030ad2: 2b00 cmp r3, #0 8030ad4: d1f0 bne.n 8030ab8 inactivity = tcp_ticks - pcb->tmr; inactive = pcb; mprio = pcb->prio; } } if (inactive != NULL) { 8030ad6: b112 cbz r2, 8030ade LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB %p (%"S32_F")\n", (void *)inactive, inactivity)); tcp_abort(inactive); 8030ad8: 4610 mov r0, r2 8030ada: f7ff fe49 bl 8030770 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); 8030ade: 2002 movs r0, #2 8030ae0: f7fe fff4 bl 802facc if (pcb != NULL) { /* adjust err stats: timewait PCB was freed above */ MEMP_STATS_DEC(err, MEMP_TCP_PCB); } } if (pcb != NULL) { 8030ae4: 4604 mov r4, r0 8030ae6: 2800 cmp r0, #0 8030ae8: d039 beq.n 8030b5e memset(pcb, 0, sizeof(struct tcp_pcb)); 8030aea: 2100 movs r1, #0 8030aec: 2294 movs r2, #148 ; 0x94 8030aee: 4620 mov r0, r4 8030af0: f7f1 f806 bl 8021b00 pcb->prio = prio; pcb->snd_buf = TCP_SND_BUF; pcb->snd_queuelen = 0; pcb->rcv_wnd = TCP_WND; 8030af4: 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; 8030af8: f246 63a8 movw r3, #26280 ; 0x66a8 8030afc: f8a4 3066 strh.w r3, [r4, #102] ; 0x66 pcb->snd_queuelen = 0; pcb->rcv_wnd = TCP_WND; 8030b00: 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; 8030b02: 2300 movs r3, #0 pcb->rcv_wnd = TCP_WND; pcb->rcv_ann_wnd = TCP_WND; 8030b04: 85e2 strh r2, [r4, #46] ; 0x2e pcb->tos = 0; pcb->ttl = TCP_TTL; 8030b06: 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; 8030b08: 7665 strb r5, [r4, #25] pcb->snd_buf = TCP_SND_BUF; pcb->snd_queuelen = 0; 8030b0a: f8a4 3068 strh.w r3, [r4, #104] ; 0x68 8030b0e: 461d mov r5, r3 pcb->rcv_wnd = TCP_WND; pcb->rcv_ann_wnd = TCP_WND; pcb->tos = 0; 8030b10: 7263 strb r3, [r4, #9] pcb->ttl = TCP_TTL; 8030b12: 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; 8030b14: 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; 8030b18: 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; 8030b1c: 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; 8030b20: 86e2 strh r2, [r4, #54] ; 0x36 pcb->rto = 3000 / TCP_SLOW_INTERVAL; pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; 8030b22: 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; 8030b24: 2206 movs r2, #6 pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; pcb->cwnd = 1; 8030b26: 2301 movs r3, #1 8030b28: 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; 8030b2c: f8a4 2044 strh.w r2, [r4, #68] ; 0x44 pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; 8030b30: f8a4 2042 strh.w r2, [r4, #66] ; 0x42 pcb->rtime = -1; pcb->cwnd = 1; iss = tcp_next_iss(); 8030b34: f7ff ff8e bl 8030a54 pcb->snd_wl2 = iss; pcb->snd_nxt = iss; pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; 8030b38: 4b0b ldr r3, [pc, #44] ; (8030b68 ) pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; pcb->cwnd = 1; iss = tcp_next_iss(); pcb->snd_wl2 = iss; 8030b3a: 65a0 str r0, [r4, #88] ; 0x58 pcb->snd_nxt = iss; pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; 8030b3c: 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; 8030b3e: 6520 str r0, [r4, #80] ; 0x50 pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; 8030b40: 6263 str r3, [r4, #36] ; 0x24 pcb->last_timer = tcp_timer_ctr; 8030b42: 4b0b ldr r3, [pc, #44] ; (8030b70 ) pcb->rtime = -1; pcb->cwnd = 1; iss = tcp_next_iss(); pcb->snd_wl2 = iss; pcb->snd_nxt = iss; pcb->lastack = iss; 8030b44: 64a0 str r0, [r4, #72] ; 0x48 pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; pcb->last_timer = tcp_timer_ctr; 8030b46: 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; 8030b48: 65e0 str r0, [r4, #92] ; 0x5c pcb->tmr = tcp_ticks; pcb->last_timer = tcp_timer_ctr; 8030b4a: f884 3021 strb.w r3, [r4, #33] ; 0x21 pcb->polltmr = 0; #if LWIP_CALLBACK_API pcb->recv = tcp_recv_null; 8030b4e: 4b09 ldr r3, [pc, #36] ; (8030b74 ) pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; pcb->last_timer = tcp_timer_ctr; pcb->polltmr = 0; 8030b50: 77e5 strb r5, [r4, #31] #if LWIP_CALLBACK_API pcb->recv = tcp_recv_null; 8030b52: 67e3 str r3, [r4, #124] ; 0x7c #endif /* LWIP_CALLBACK_API */ /* Init KEEPALIVE timer */ pcb->keep_idle = TCP_KEEPIDLE_DEFAULT; 8030b54: 4b08 ldr r3, [pc, #32] ; (8030b78 ) #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; 8030b56: 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; 8030b5a: f8c4 308c str.w r3, [r4, #140] ; 0x8c #endif /* LWIP_TCP_KEEPALIVE */ pcb->keep_cnt_sent = 0; } return pcb; } 8030b5e: 4620 mov r0, r4 8030b60: bdf8 pop {r3, r4, r5, r6, r7, pc} 8030b62: bf00 nop 8030b64: 2000f6cc .word 0x2000f6cc 8030b68: 2000f6bc .word 0x2000f6bc 8030b6c: 2000f6b8 .word 0x2000f6b8 8030b70: 2000c3d9 .word 0x2000c3d9 8030b74: 08030935 .word 0x08030935 8030b78: 006ddd00 .word 0x006ddd00 08030b7c : * @return a new tcp_pcb that initially is in state CLOSED */ struct tcp_pcb * tcp_new(void) { return tcp_alloc(TCP_PRIO_NORMAL); 8030b7c: 2040 movs r0, #64 ; 0x40 8030b7e: f7ff bf75 b.w 8030a6c 08030b82 : * 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) { 8030b82: b510 push {r4, lr} 8030b84: 4604 mov r4, r0 u16_t mss_s; struct netif *outif; outif = ip_route(addr); 8030b86: 4608 mov r0, r1 8030b88: f002 f96c bl 8032e64 if ((outif != NULL) && (outif->mtu != 0)) { 8030b8c: b130 cbz r0, 8030b9c 8030b8e: 8c83 ldrh r3, [r0, #36] ; 0x24 8030b90: b123 cbz r3, 8030b9c mss_s = outif->mtu - IP_HLEN - TCP_HLEN; 8030b92: 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); 8030b94: b29b uxth r3, r3 8030b96: 429c cmp r4, r3 8030b98: bf28 it cs 8030b9a: 461c movcs r4, r3 } return sendmss; } 8030b9c: 4620 mov r0, r4 8030b9e: bd10 pop {r4, pc} 08030ba0 : * other err_t values if connect request couldn't be sent */ err_t tcp_connect(struct tcp_pcb *pcb, ip_addr_t *ipaddr, u16_t port, tcp_connected_fn connected) { 8030ba0: b5f8 push {r3, r4, r5, r6, r7, lr} 8030ba2: 461f mov r7, r3 err_t ret; u32_t iss; u16_t old_local_port; LWIP_ERROR("tcp_connect: can only connect from state CLOSED", pcb->state == CLOSED, return ERR_ISCONN); 8030ba4: 7e03 ldrb r3, [r0, #24] * other err_t values if connect request couldn't be sent */ err_t tcp_connect(struct tcp_pcb *pcb, ip_addr_t *ipaddr, u16_t port, tcp_connected_fn connected) { 8030ba6: 4604 mov r4, r0 8030ba8: 460d mov r5, r1 err_t ret; u32_t iss; u16_t old_local_port; LWIP_ERROR("tcp_connect: can only connect from state CLOSED", pcb->state == CLOSED, return ERR_ISCONN); 8030baa: 2b00 cmp r3, #0 8030bac: d161 bne.n 8030c72 LWIP_DEBUGF(TCP_DEBUG, ("tcp_connect to port %"U16_F"\n", port)); if (ipaddr != NULL) { 8030bae: 2900 cmp r1, #0 8030bb0: d061 beq.n 8030c76 pcb->remote_ip = *ipaddr; 8030bb2: 680b ldr r3, [r1, #0] } else { return ERR_VAL; } pcb->remote_port = port; 8030bb4: 8382 strh r2, [r0, #28] LWIP_ERROR("tcp_connect: can only connect from state CLOSED", pcb->state == CLOSED, return ERR_ISCONN); LWIP_DEBUGF(TCP_DEBUG, ("tcp_connect to port %"U16_F"\n", port)); if (ipaddr != NULL) { pcb->remote_ip = *ipaddr; 8030bb6: 6043 str r3, [r0, #4] return ERR_VAL; } pcb->remote_port = port; /* check if we have a route to the remote host */ if (ip_addr_isany(&(pcb->local_ip))) { 8030bb8: 6803 ldr r3, [r0, #0] 8030bba: b933 cbnz r3, 8030bca /* no local IP address set, yet. */ struct netif *netif = ip_route(&(pcb->remote_ip)); 8030bbc: 3004 adds r0, #4 8030bbe: f002 f951 bl 8032e64 if (netif == NULL) { 8030bc2: 2800 cmp r0, #0 8030bc4: d059 beq.n 8030c7a /* Don't even try to send a SYN packet if we have no route since that will fail. */ return ERR_RTE; } /* Use the netif's IP address as local address. */ ip_addr_copy(pcb->local_ip, netif->ip_addr); 8030bc6: 6843 ldr r3, [r0, #4] 8030bc8: 6023 str r3, [r4, #0] } old_local_port = pcb->local_port; 8030bca: 8b66 ldrh r6, [r4, #26] if (pcb->local_port == 0) { 8030bcc: b32e cbz r6, 8030c1a } } } } #endif /* SO_REUSE */ iss = tcp_next_iss(); 8030bce: f7ff ff41 bl 8030a54 pcb->rcv_nxt = 0; pcb->snd_nxt = iss; 8030bd2: 6520 str r0, [r4, #80] ; 0x50 pcb->lastack = iss - 1; 8030bd4: 3801 subs r0, #1 pcb->snd_lbb = iss - 1; pcb->rcv_wnd = TCP_WND; 8030bd6: f241 62d0 movw r2, #5840 ; 0x16d0 } } } #endif /* SO_REUSE */ iss = tcp_next_iss(); pcb->rcv_nxt = 0; 8030bda: 2300 movs r3, #0 pcb->snd_nxt = iss; pcb->lastack = iss - 1; 8030bdc: 64a0 str r0, [r4, #72] ; 0x48 pcb->snd_lbb = iss - 1; 8030bde: 65e0 str r0, [r4, #92] ; 0x5c pcb->rcv_ann_wnd = TCP_WND; pcb->rcv_ann_right_edge = pcb->rcv_nxt; pcb->snd_wnd = TCP_WND; /* 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; 8030be0: f44f 7006 mov.w r0, #536 ; 0x218 #if TCP_CALCULATE_EFF_SEND_MSS pcb->mss = tcp_eff_send_mss(pcb->mss, ipaddr); 8030be4: 4629 mov r1, r5 } } } #endif /* SO_REUSE */ iss = tcp_next_iss(); pcb->rcv_nxt = 0; 8030be6: 62a3 str r3, [r4, #40] ; 0x28 pcb->snd_nxt = iss; pcb->lastack = iss - 1; pcb->snd_lbb = iss - 1; pcb->rcv_wnd = TCP_WND; 8030be8: 85a2 strh r2, [r4, #44] ; 0x2c pcb->rcv_ann_wnd = TCP_WND; 8030bea: 85e2 strh r2, [r4, #46] ; 0x2e pcb->rcv_ann_right_edge = pcb->rcv_nxt; 8030bec: 6323 str r3, [r4, #48] ; 0x30 pcb->snd_wnd = TCP_WND; 8030bee: f8a4 2060 strh.w r2, [r4, #96] ; 0x60 /* 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; 8030bf2: 86e0 strh r0, [r4, #54] ; 0x36 #if TCP_CALCULATE_EFF_SEND_MSS pcb->mss = tcp_eff_send_mss(pcb->mss, ipaddr); 8030bf4: f7ff ffc5 bl 8030b82 #endif /* TCP_CALCULATE_EFF_SEND_MSS */ pcb->cwnd = 1; 8030bf8: 2301 movs r3, #1 8030bfa: f8a4 304c strh.w r3, [r4, #76] ; 0x4c pcb->ssthresh = pcb->mss * 10; 8030bfe: 230a movs r3, #10 pcb->snd_wnd = TCP_WND; /* 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; #if TCP_CALCULATE_EFF_SEND_MSS pcb->mss = tcp_eff_send_mss(pcb->mss, ipaddr); 8030c00: 86e0 strh r0, [r4, #54] ; 0x36 #endif /* TCP_CALCULATE_EFF_SEND_MSS */ pcb->cwnd = 1; pcb->ssthresh = pcb->mss * 10; 8030c02: 4358 muls r0, r3 8030c04: f8a4 004e strh.w r0, [r4, #78] ; 0x4e #if LWIP_CALLBACK_API pcb->connected = connected; 8030c08: f8c4 7080 str.w r7, [r4, #128] ; 0x80 #else /* LWIP_CALLBACK_API */ LWIP_UNUSED_ARG(connected); #endif /* LWIP_CALLBACK_API */ /* Send a SYN together with the MSS option. */ ret = tcp_enqueue_flags(pcb, TCP_SYN); 8030c0c: 4620 mov r0, r4 8030c0e: 2102 movs r1, #2 8030c10: f001 f94a bl 8031ea8 if (ret == ERR_OK) { 8030c14: 4605 mov r5, r0 8030c16: b130 cbz r0, 8030c26 8030c18: e032 b.n 8030c80 ip_addr_copy(pcb->local_ip, netif->ip_addr); } old_local_port = pcb->local_port; if (pcb->local_port == 0) { pcb->local_port = tcp_new_port(); 8030c1a: f7ff fabd bl 8030198 8030c1e: 8360 strh r0, [r4, #26] if (pcb->local_port == 0) { 8030c20: 2800 cmp r0, #0 8030c22: d1d4 bne.n 8030bce 8030c24: e02b b.n 8030c7e /* Send a SYN together with the MSS option. */ ret = tcp_enqueue_flags(pcb, TCP_SYN); if (ret == ERR_OK) { /* SYN segment was enqueued, changed the pcbs state now */ pcb->state = SYN_SENT; 8030c26: 2302 movs r3, #2 8030c28: 7623 strb r3, [r4, #24] if (old_local_port != 0) { 8030c2a: b19e cbz r6, 8030c54 TCP_RMV(&tcp_bound_pcbs, pcb); 8030c2c: 4a15 ldr r2, [pc, #84] ; (8030c84 ) 8030c2e: 6813 ldr r3, [r2, #0] 8030c30: 42a3 cmp r3, r4 8030c32: d101 bne.n 8030c38 8030c34: 68e3 ldr r3, [r4, #12] 8030c36: e00c b.n 8030c52 8030c38: 4a13 ldr r2, [pc, #76] ; (8030c88 ) 8030c3a: 6013 str r3, [r2, #0] 8030c3c: e007 b.n 8030c4e 8030c3e: 68d9 ldr r1, [r3, #12] 8030c40: 42a1 cmp r1, r4 8030c42: d103 bne.n 8030c4c 8030c44: 6013 str r3, [r2, #0] 8030c46: 68e2 ldr r2, [r4, #12] 8030c48: 60da str r2, [r3, #12] 8030c4a: e003 b.n 8030c54 8030c4c: 460b mov r3, r1 8030c4e: 2b00 cmp r3, #0 8030c50: d1f5 bne.n 8030c3e 8030c52: 6013 str r3, [r2, #0] } TCP_REG_ACTIVE(pcb); 8030c54: 4b0d ldr r3, [pc, #52] ; (8030c8c ) 8030c56: 681a ldr r2, [r3, #0] 8030c58: 601c str r4, [r3, #0] 8030c5a: 60e2 str r2, [r4, #12] 8030c5c: f001 fc72 bl 8032544 8030c60: 4b0b ldr r3, [pc, #44] ; (8030c90 ) 8030c62: 2201 movs r2, #1 8030c64: 701a strb r2, [r3, #0] snmp_inc_tcpactiveopens(); 8030c66: f003 ff4f bl 8034b08 tcp_output(pcb); 8030c6a: 4620 mov r0, r4 8030c6c: f001 f9ac bl 8031fc8 8030c70: e006 b.n 8030c80 { err_t ret; u32_t iss; u16_t old_local_port; LWIP_ERROR("tcp_connect: can only connect from state CLOSED", pcb->state == CLOSED, return ERR_ISCONN); 8030c72: 25f7 movs r5, #247 ; 0xf7 8030c74: e004 b.n 8030c80 LWIP_DEBUGF(TCP_DEBUG, ("tcp_connect to port %"U16_F"\n", port)); if (ipaddr != NULL) { pcb->remote_ip = *ipaddr; } else { return ERR_VAL; 8030c76: 25fa movs r5, #250 ; 0xfa 8030c78: e002 b.n 8030c80 /* no local IP address set, yet. */ struct netif *netif = ip_route(&(pcb->remote_ip)); if (netif == NULL) { /* Don't even try to send a SYN packet if we have no route since that will fail. */ return ERR_RTE; 8030c7a: 25fc movs r5, #252 ; 0xfc 8030c7c: e000 b.n 8030c80 old_local_port = pcb->local_port; if (pcb->local_port == 0) { pcb->local_port = tcp_new_port(); if (pcb->local_port == 0) { return ERR_BUF; 8030c7e: 25fe movs r5, #254 ; 0xfe snmp_inc_tcpactiveopens(); tcp_output(pcb); } return ret; } 8030c80: b268 sxtb r0, r5 8030c82: bdf8 pop {r3, r4, r5, r6, r7, pc} 8030c84: 2000f6c8 .word 0x2000f6c8 8030c88: 2000f6c4 .word 0x2000f6c4 8030c8c: 2000f6b8 .word 0x2000f6b8 8030c90: 2000f6b4 .word 0x2000f6b4 08030c94 : * * @param pcb the tcp_pcb for which a segment arrived */ static void tcp_parseopt(struct tcp_pcb *pcb) { 8030c94: 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; 8030c96: 4d1e ldr r5, [pc, #120] ; (8030d10 ) 8030c98: 682c ldr r4, [r5, #0] * * @param pcb the tcp_pcb for which a segment arrived */ static void tcp_parseopt(struct tcp_pcb *pcb) { 8030c9a: 4606 mov r6, r0 #endif opts = (u8_t *)tcphdr + TCP_HLEN; /* Parse the TCP MSS option, if present. */ if(TCPH_HDRLEN(tcphdr) > 0x5) { 8030c9c: 89a0 ldrh r0, [r4, #12] 8030c9e: f7fd fefc bl 802ea9a 8030ca2: f3c0 300f ubfx r0, r0, #12, #16 8030ca6: 2805 cmp r0, #5 8030ca8: d931 bls.n 8030d0e max_c = (TCPH_HDRLEN(tcphdr) - 5) << 2; 8030caa: 682b ldr r3, [r5, #0] 8030cac: 8998 ldrh r0, [r3, #12] 8030cae: f7fd fef4 bl 802ea9a 8030cb2: 0b00 lsrs r0, r0, #12 8030cb4: 1f41 subs r1, r0, #5 8030cb6: 0089 lsls r1, r1, #2 u8_t *opts, opt; #if LWIP_TCP_TIMESTAMPS u32_t tsval; #endif opts = (u8_t *)tcphdr + TCP_HLEN; 8030cb8: 3414 adds r4, #20 /* Parse the TCP MSS option, if present. */ if(TCPH_HDRLEN(tcphdr) > 0x5) { max_c = (TCPH_HDRLEN(tcphdr) - 5) << 2; 8030cba: b289 uxth r1, r1 for (c = 0; c < max_c; ) { 8030cbc: 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; 8030cbe: f240 50b3 movw r0, #1459 ; 0x5b3 8030cc2: 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; ) { 8030cc6: e020 b.n 8030d0a opt = opts[c]; switch (opt) { 8030cc8: 5ce2 ldrb r2, [r4, r3] 8030cca: 2a01 cmp r2, #1 8030ccc: d005 beq.n 8030cda 8030cce: d31e bcc.n 8030d0e 8030cd0: 2a02 cmp r2, #2 8030cd2: eb04 0203 add.w r2, r4, r3 8030cd6: d114 bne.n 8030d02 8030cd8: e001 b.n 8030cde /* End of options. */ LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: EOL\n")); return; case 0x01: /* NOP option. */ ++c; 8030cda: 3301 adds r3, #1 8030cdc: e014 b.n 8030d08 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) { 8030cde: 7857 ldrb r7, [r2, #1] 8030ce0: 2f04 cmp r7, #4 8030ce2: d114 bne.n 8030d0e 8030ce4: 1cdf adds r7, r3, #3 8030ce6: 428f cmp r7, r1 8030ce8: da11 bge.n 8030d0e /* 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]; 8030cea: 7897 ldrb r7, [r2, #2] 8030cec: 78d2 ldrb r2, [r2, #3] 8030cee: 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; 8030cf2: 1e57 subs r7, r2, #1 8030cf4: b2bf uxth r7, r7 8030cf6: 4287 cmp r7, r0 8030cf8: bf88 it hi 8030cfa: 462a movhi r2, r5 8030cfc: 86f2 strh r2, [r6, #54] ; 0x36 /* Advance to next option */ c += 0x04; 8030cfe: 3304 adds r3, #4 8030d00: e002 b.n 8030d08 c += 0x0A; break; #endif default: LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n")); if (opts[c + 1] == 0) { 8030d02: 7852 ldrb r2, [r2, #1] 8030d04: b11a cbz r2, 8030d0e 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]; 8030d06: 18d3 adds r3, r2, r3 8030d08: 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; ) { 8030d0a: 428b cmp r3, r1 8030d0c: d3dc bcc.n 8030cc8 8030d0e: bdf8 pop {r3, r4, r5, r6, r7, pc} 8030d10: 2000c3dc .word 0x2000c3dc 08030d14 : * * Called from tcp_process(). */ static void tcp_receive(struct tcp_pcb *pcb) { 8030d14: 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) { 8030d18: 4ba0 ldr r3, [pc, #640] ; (8030f9c ) 8030d1a: 781b ldrb r3, [r3, #0] 8030d1c: f003 0310 and.w r3, r3, #16 8030d20: b2db uxtb r3, r3 * * Called from tcp_process(). */ static void tcp_receive(struct tcp_pcb *pcb) { 8030d22: 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) { 8030d24: 2b00 cmp r3, #0 8030d26: f000 816b beq.w 8031000 right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2; /* Update window. */ if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || 8030d2a: 4a9d ldr r2, [pc, #628] ; (8030fa0 ) 8030d2c: 6d43 ldr r3, [r0, #84] ; 0x54 8030d2e: 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; 8030d30: f8b0 5060 ldrh.w r5, [r0, #96] ; 0x60 8030d34: 6d81 ldr r1, [r0, #88] ; 0x58 /* Update window. */ if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || 8030d36: 1a98 subs r0, r3, r2 8030d38: 2800 cmp r0, #0 8030d3a: db0e blt.n 8030d5a 8030d3c: 4293 cmp r3, r2 8030d3e: 4b99 ldr r3, [pc, #612] ; (8030fa4 ) 8030d40: d103 bne.n 8030d4a (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || 8030d42: 6818 ldr r0, [r3, #0] 8030d44: 1a08 subs r0, r1, r0 8030d46: 2800 cmp r0, #0 8030d48: db07 blt.n 8030d5a 8030d4a: 681b ldr r3, [r3, #0] 8030d4c: 4299 cmp r1, r3 8030d4e: d11f bne.n 8030d90 (pcb->snd_wl2 == ackno && tcphdr->wnd > pcb->snd_wnd)) { 8030d50: 4b95 ldr r3, [pc, #596] ; (8030fa8 ) 8030d52: 681b ldr r3, [r3, #0] 8030d54: 89db ldrh r3, [r3, #14] 8030d56: 42ab cmp r3, r5 8030d58: d91a bls.n 8030d90 pcb->snd_wnd = tcphdr->wnd; 8030d5a: 4b93 ldr r3, [pc, #588] ; (8030fa8 ) /* keep track of the biggest window announced by the remote host to calculate the maximum segment size */ if (pcb->snd_wnd_max < tcphdr->wnd) { 8030d5c: 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; 8030d60: 681b ldr r3, [r3, #0] 8030d62: 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; 8030d64: 6562 str r2, [r4, #84] ; 0x54 pcb->snd_wl2 = ackno; 8030d66: 4a8f ldr r2, [pc, #572] ; (8030fa4 ) /* 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; 8030d68: 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; 8030d6c: 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) { 8030d6e: 4286 cmp r6, r0 pcb->snd_wnd_max = tcphdr->wnd; } pcb->snd_wl1 = seqno; pcb->snd_wl2 = ackno; 8030d70: 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; 8030d72: bf38 it cc 8030d74: f8a4 0062 strhcc.w r0, [r4, #98] ; 0x62 8030d78: f894 2091 ldrb.w r2, [r4, #145] ; 0x91 } pcb->snd_wl1 = seqno; pcb->snd_wl2 = ackno; if (pcb->snd_wnd == 0) { 8030d7c: b920 cbnz r0, 8030d88 if (pcb->persist_backoff == 0) { 8030d7e: b93a cbnz r2, 8030d90 /* start persist timer */ pcb->persist_cnt = 0; 8030d80: f884 0090 strb.w r0, [r4, #144] ; 0x90 pcb->persist_backoff = 1; 8030d84: 2301 movs r3, #1 8030d86: e001 b.n 8030d8c } } else if (pcb->persist_backoff > 0) { 8030d88: b112 cbz r2, 8030d90 /* stop persist timer */ pcb->persist_backoff = 0; 8030d8a: 2300 movs r3, #0 8030d8c: 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)) { 8030d90: 4b84 ldr r3, [pc, #528] ; (8030fa4 ) 8030d92: 6ca2 ldr r2, [r4, #72] ; 0x48 8030d94: 681b ldr r3, [r3, #0] 8030d96: 1a98 subs r0, r3, r2 8030d98: 2800 cmp r0, #0 8030d9a: dc34 bgt.n 8030e06 pcb->acked = 0; 8030d9c: 2000 movs r0, #0 8030d9e: f8a4 0064 strh.w r0, [r4, #100] ; 0x64 /* Clause 2 */ if (tcplen == 0) { 8030da2: 4882 ldr r0, [pc, #520] ; (8030fac ) 8030da4: 8800 ldrh r0, [r0, #0] 8030da6: 2800 cmp r0, #0 8030da8: f040 81f4 bne.w 8031194 /* Clause 3 */ if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge){ 8030dac: f8b4 6060 ldrh.w r6, [r4, #96] ; 0x60 8030db0: 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; 8030db2: 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){ 8030db4: 1830 adds r0, r6, r0 8030db6: 4288 cmp r0, r1 8030db8: f040 81ec bne.w 8031194 /* Clause 4 */ if (pcb->rtime >= 0) { 8030dbc: f9b4 1034 ldrsh.w r1, [r4, #52] ; 0x34 8030dc0: 2900 cmp r1, #0 8030dc2: f2c0 81e7 blt.w 8031194 /* Clause 5 */ if (pcb->lastack == ackno) { 8030dc6: 429a cmp r2, r3 8030dc8: f040 81e4 bne.w 8031194 found_dupack = 1; if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) { 8030dcc: f894 2047 ldrb.w r2, [r4, #71] ; 0x47 8030dd0: 1c53 adds r3, r2, #1 8030dd2: b2db uxtb r3, r3 8030dd4: 4293 cmp r3, r2 ++pcb->dupacks; 8030dd6: bf88 it hi 8030dd8: f884 3047 strbhi.w r3, [r4, #71] ; 0x47 } if (pcb->dupacks > 3) { 8030ddc: f894 3047 ldrb.w r3, [r4, #71] ; 0x47 8030de0: 2b03 cmp r3, #3 8030de2: d90a bls.n 8030dfa /* Inflate the congestion window, but not if it means that the value overflows. */ if ((u16_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { 8030de4: f8b4 204c ldrh.w r2, [r4, #76] ; 0x4c 8030de8: 8ee3 ldrh r3, [r4, #54] ; 0x36 8030dea: 18d3 adds r3, r2, r3 8030dec: b29b uxth r3, r3 8030dee: 4293 cmp r3, r2 8030df0: f240 80b2 bls.w 8030f58 pcb->cwnd += pcb->mss; 8030df4: f8a4 304c strh.w r3, [r4, #76] ; 0x4c 8030df8: e0ae b.n 8030f58 } } else if (pcb->dupacks == 3) { 8030dfa: f040 80ad bne.w 8030f58 /* Do fast retransmit */ tcp_rexmit_fast(pcb); 8030dfe: 4620 mov r0, r4 8030e00: f001 fa92 bl 8032328 8030e04: e0a8 b.n 8030f58 /* 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)){ 8030e06: 43d1 mvns r1, r2 8030e08: 42d9 cmn r1, r3 8030e0a: d47e bmi.n 8030f0a 8030e0c: 6d21 ldr r1, [r4, #80] ; 0x50 8030e0e: 1a59 subs r1, r3, r1 8030e10: 2900 cmp r1, #0 8030e12: dc7a bgt.n 8030f0a /* 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) { 8030e14: 7fa1 ldrb r1, [r4, #30] 8030e16: f001 0004 and.w r0, r1, #4 8030e1a: b2c0 uxtb r0, r0 8030e1c: b130 cbz r0, 8030e2c pcb->flags &= ~TF_INFR; 8030e1e: f021 0104 bic.w r1, r1, #4 8030e22: 77a1 strb r1, [r4, #30] pcb->cwnd = pcb->ssthresh; 8030e24: f8b4 104e ldrh.w r1, [r4, #78] ; 0x4e 8030e28: 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; 8030e2c: f9b4 5040 ldrsh.w r5, [r4, #64] ; 0x40 8030e30: f8b4 0042 ldrh.w r0, [r4, #66] ; 0x42 pcb->snd_buf += pcb->acked; /* Reset the fast retransmit variables. */ pcb->dupacks = 0; pcb->lastack = ackno; 8030e34: 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; 8030e36: 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); 8030e3a: 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; 8030e3c: 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) { 8030e40: 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; 8030e42: 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); 8030e46: f8a4 2064 strh.w r2, [r4, #100] ; 0x64 pcb->flags &= ~TF_INFR; pcb->cwnd = pcb->ssthresh; } /* Reset the number of retransmissions. */ pcb->nrtx = 0; 8030e4a: 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; 8030e4c: 1812 adds r2, r2, r0 pcb->dupacks = 0; pcb->lastack = ackno; /* Update the congestion control variables (cwnd and ssthresh). */ if (pcb->state >= ESTABLISHED) { 8030e4e: 2b03 cmp r3, #3 pcb->flags &= ~TF_INFR; pcb->cwnd = pcb->ssthresh; } /* Reset the number of retransmissions. */ pcb->nrtx = 0; 8030e50: 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; 8030e54: f8a4 2066 strh.w r2, [r4, #102] ; 0x66 /* Reset the fast retransmit variables. */ pcb->dupacks = 0; 8030e58: f884 1047 strb.w r1, [r4, #71] ; 0x47 pcb->lastack = ackno; /* Update the congestion control variables (cwnd and ssthresh). */ if (pcb->state >= ESTABLISHED) { 8030e5c: d931 bls.n 8030ec2 if (pcb->cwnd < pcb->ssthresh) { 8030e5e: f8b4 204e ldrh.w r2, [r4, #78] ; 0x4e 8030e62: f8b4 304c ldrh.w r3, [r4, #76] ; 0x4c 8030e66: 429a cmp r2, r3 if ((u16_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { 8030e68: 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) { 8030e6a: d900 bls.n 8030e6e 8030e6c: e002 b.n 8030e74 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); 8030e6e: 4352 muls r2, r2 8030e70: fb92 f2f3 sdiv r2, r2, r3 8030e74: 189a adds r2, r3, r2 8030e76: b292 uxth r2, r2 if (new_cwnd > pcb->cwnd) { 8030e78: 429a cmp r2, r3 8030e7a: d922 bls.n 8030ec2 pcb->cwnd = new_cwnd; 8030e7c: f8a4 204c strh.w r2, [r4, #76] ; 0x4c 8030e80: e01f b.n 8030ec2 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; 8030e82: 6f25 ldr r5, [r4, #112] ; 0x70 pcb->unacked = pcb->unacked->next; 8030e84: 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))); 8030e86: 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; 8030e88: 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))); 8030e8a: f7ff f813 bl 802feb4 /* Prevent ACK for FIN to generate a sent event */ if ((pcb->acked != 0) && ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0)) { 8030e8e: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 8030e92: b153 cbz r3, 8030eaa 8030e94: 68eb ldr r3, [r5, #12] 8030e96: 8998 ldrh r0, [r3, #12] 8030e98: f7fd fdff bl 802ea9a 8030e9c: 07c3 lsls r3, r0, #31 8030e9e: d504 bpl.n 8030eaa pcb->acked--; 8030ea0: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 8030ea4: 3b01 subs r3, #1 8030ea6: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 } pcb->snd_queuelen -= pbuf_clen(next->p); 8030eaa: 6868 ldr r0, [r5, #4] 8030eac: f8b4 7068 ldrh.w r7, [r4, #104] ; 0x68 8030eb0: f7ff f800 bl 802feb4 8030eb4: 1a38 subs r0, r7, r0 8030eb6: f8a4 0068 strh.w r0, [r4, #104] ; 0x68 tcp_seg_free(next); 8030eba: 4628 mov r0, r5 8030ebc: f7ff fa55 bl 803036a 8030ec0: e000 b.n 8030ec4 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) + 8030ec2: 4e38 ldr r6, [pc, #224] ; (8030fa4 ) 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 && 8030ec4: 6f23 ldr r3, [r4, #112] ; 0x70 8030ec6: b91b cbnz r3, 8030ed0 } } /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if(pcb->unacked == NULL) 8030ec8: 6f22 ldr r2, [r4, #112] ; 0x70 8030eca: 2300 movs r3, #0 8030ecc: b9d2 cbnz r2, 8030f04 8030ece: e015 b.n 8030efc 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) + 8030ed0: 68db ldr r3, [r3, #12] 8030ed2: 6858 ldr r0, [r3, #4] 8030ed4: f7fd fde8 bl 802eaa8 8030ed8: 6f23 ldr r3, [r4, #112] ; 0x70 8030eda: 891d ldrh r5, [r3, #8] 8030edc: 68db ldr r3, [r3, #12] 8030ede: 4607 mov r7, r0 8030ee0: 8998 ldrh r0, [r3, #12] 8030ee2: f7fd fdda bl 802ea9a 8030ee6: 6833 ldr r3, [r6, #0] 8030ee8: f010 0003 ands.w r0, r0, #3 8030eec: bf18 it ne 8030eee: 2001 movne r0, #1 8030ef0: 1afb subs r3, r7, r3 8030ef2: 1828 adds r0, r5, r0 8030ef4: 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 && 8030ef6: 2b00 cmp r3, #0 8030ef8: ddc3 ble.n 8030e82 8030efa: e7e5 b.n 8030ec8 } /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if(pcb->unacked == NULL) pcb->rtime = -1; 8030efc: f64f 72ff movw r2, #65535 ; 0xffff 8030f00: 86a2 strh r2, [r4, #52] ; 0x34 8030f02: e000 b.n 8030f06 else pcb->rtime = 0; 8030f04: 86a3 strh r3, [r4, #52] ; 0x34 pcb->polltmr = 0; 8030f06: 77e3 strb r3, [r4, #31] 8030f08: e026 b.n 8030f58 } else { /* Fix bug bug #21582: out of sequence ACK, didn't really ack anything */ pcb->acked = 0; 8030f0a: 2300 movs r3, #0 8030f0c: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 8030f10: e022 b.n 8030f58 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; 8030f12: 6ee5 ldr r5, [r4, #108] ; 0x6c pcb->unsent = pcb->unsent->next; 8030f14: 682b ldr r3, [r5, #0] 8030f16: 66e3 str r3, [r4, #108] ; 0x6c #if TCP_OVERSIZE if (pcb->unsent == NULL) { 8030f18: b90b cbnz r3, 8030f1e pcb->unsent_oversize = 0; 8030f1a: 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))); 8030f1e: 6868 ldr r0, [r5, #4] 8030f20: f7fe ffc8 bl 802feb4 /* Prevent ACK for FIN to generate a sent event */ if ((pcb->acked != 0) && ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0)) { 8030f24: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 8030f28: b153 cbz r3, 8030f40 8030f2a: 68eb ldr r3, [r5, #12] 8030f2c: 8998 ldrh r0, [r3, #12] 8030f2e: f7fd fdb4 bl 802ea9a 8030f32: 07c7 lsls r7, r0, #31 8030f34: d504 bpl.n 8030f40 pcb->acked--; 8030f36: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 8030f3a: 3b01 subs r3, #1 8030f3c: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 } pcb->snd_queuelen -= pbuf_clen(next->p); 8030f40: 6868 ldr r0, [r5, #4] 8030f42: f8b4 7068 ldrh.w r7, [r4, #104] ; 0x68 8030f46: f7fe ffb5 bl 802feb4 8030f4a: 1a38 subs r0, r7, r0 8030f4c: f8a4 0068 strh.w r0, [r4, #104] ; 0x68 tcp_seg_free(next); 8030f50: 4628 mov r0, r5 8030f52: f7ff fa0a bl 803036a 8030f56: e000 b.n 8030f5a 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) + 8030f58: 4e12 ldr r6, [pc, #72] ; (8030fa4 ) 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 && 8030f5a: 6ee3 ldr r3, [r4, #108] ; 0x6c 8030f5c: b913 cbnz r3, 8030f64 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)) { 8030f5e: 6ba3 ldr r3, [r4, #56] ; 0x38 8030f60: bb33 cbnz r3, 8030fb0 8030f62: e04d b.n 8031000 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) + 8030f64: 68db ldr r3, [r3, #12] 8030f66: 6835 ldr r5, [r6, #0] 8030f68: 6858 ldr r0, [r3, #4] 8030f6a: f7fd fd9d bl 802eaa8 8030f6e: 6ee3 ldr r3, [r4, #108] ; 0x6c 8030f70: 891f ldrh r7, [r3, #8] 8030f72: 68db ldr r3, [r3, #12] 8030f74: 4680 mov r8, r0 8030f76: 8998 ldrh r0, [r3, #12] 8030f78: f7fd fd8f bl 802ea9a 8030f7c: f010 0003 ands.w r0, r0, #3 8030f80: bf18 it ne 8030f82: 2001 movne r0, #1 8030f84: ebc8 0505 rsb r5, r8, r5 8030f88: 1838 adds r0, r7, r0 8030f8a: 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 && 8030f8c: 2d00 cmp r5, #0 8030f8e: dbe6 blt.n 8030f5e TCP_SEQ_BETWEEN(ackno, ntohl(pcb->unsent->tcphdr->seqno) + 8030f90: 6832 ldr r2, [r6, #0] 8030f92: 6d23 ldr r3, [r4, #80] ; 0x50 8030f94: 1ad3 subs r3, r2, r3 8030f96: 2b00 cmp r3, #0 8030f98: ddbb ble.n 8030f12 8030f9a: e7e0 b.n 8030f5e 8030f9c: 2000c3ec .word 0x2000c3ec 8030fa0: 2000c3e0 .word 0x2000c3e0 8030fa4: 2000c3e8 .word 0x2000c3e8 8030fa8: 2000c3dc .word 0x2000c3dc 8030fac: 2000c3e4 .word 0x2000c3e4 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)) { 8030fb0: 497b ldr r1, [pc, #492] ; (80311a0 ) 8030fb2: 6be2 ldr r2, [r4, #60] ; 0x3c 8030fb4: 6809 ldr r1, [r1, #0] 8030fb6: 1a52 subs r2, r2, r1 8030fb8: 2a00 cmp r2, #0 8030fba: da21 bge.n 8031000 /* 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); 8030fbc: 4a79 ldr r2, [pc, #484] ; (80311a4 ) 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); 8030fbe: 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); 8030fc2: 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); 8030fc4: 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); 8030fc8: 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); 8030fca: 1a12 subs r2, r2, r0 8030fcc: b292 uxth r2, r2 8030fce: b293 uxth r3, r2 pcb->sa += m; 8030fd0: 1851 adds r1, r2, r1 8030fd2: b289 uxth r1, r1 if (m < 0) { 8030fd4: 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; 8030fd6: f8a4 1040 strh.w r1, [r4, #64] ; 0x40 if (m < 0) { 8030fda: d501 bpl.n 8030fe0 m = -m; 8030fdc: 4253 negs r3, r2 8030fde: b29b uxth r3, r3 } m = m - (pcb->sv >> 2); 8030fe0: f8b4 2042 ldrh.w r2, [r4, #66] ; 0x42 8030fe4: f342 008d sbfx r0, r2, #2, #14 8030fe8: 1a12 subs r2, r2, r0 pcb->sv += m; 8030fea: 18d3 adds r3, r2, r3 8030fec: b29b uxth r3, r3 pcb->rto = (pcb->sa >> 3) + pcb->sv; 8030fee: f341 01cc sbfx r1, r1, #3, #13 pcb->sa += m; if (m < 0) { m = -m; } m = m - (pcb->sv >> 2); pcb->sv += m; 8030ff2: f8a4 3042 strh.w r3, [r4, #66] ; 0x42 pcb->rto = (pcb->sa >> 3) + pcb->sv; 8030ff6: 185b adds r3, r3, r1 8030ff8: 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; 8030ffc: 2300 movs r3, #0 8030ffe: 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)) { 8031000: 4b69 ldr r3, [pc, #420] ; (80311a8 ) 8031002: 4a6a ldr r2, [pc, #424] ; (80311ac ) 8031004: 8818 ldrh r0, [r3, #0] 8031006: 2800 cmp r0, #0 8031008: f000 80b3 beq.w 8031172 803100c: 7e23 ldrb r3, [r4, #24] 803100e: 2b06 cmp r3, #6 8031010: f200 80af bhi.w 8031172 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)){ 8031014: 6811 ldr r1, [r2, #0] 8031016: 6aa3 ldr r3, [r4, #40] ; 0x28 8031018: 43ca mvns r2, r1 803101a: 42da cmn r2, r3 803101c: d425 bmi.n 803106a 803101e: 1c5a adds r2, r3, #1 8031020: 1a52 subs r2, r2, r1 8031022: 1a10 subs r0, r2, r0 8031024: 2800 cmp r0, #0 8031026: dc20 bgt.n 803106a 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; 8031028: 1a59 subs r1, r3, r1 p = inseg.p; 803102a: 4b61 ldr r3, [pc, #388] ; (80311b0 ) 803102c: 6858 ldr r0, [r3, #4] LWIP_ASSERT("inseg.p != NULL", inseg.p); LWIP_ASSERT("insane offset!", (off < 0x7fff)); if (inseg.p->len < off) { 803102e: 8943 ldrh r3, [r0, #10] 8031030: 428b cmp r3, r1 8031032: da0a bge.n 803104a LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); new_tot_len = (u16_t)(inseg.p->tot_len - off); 8031034: 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; 8031036: 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); 8031038: 1a52 subs r2, r2, r1 while (p->len < off) { 803103a: e003 b.n 8031044 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; 803103c: 8102 strh r2, [r0, #8] p->len = 0; 803103e: 8145 strh r5, [r0, #10] p = p->next; 8031040: 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; 8031042: 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) { 8031044: 8943 ldrh r3, [r0, #10] 8031046: 428b cmp r3, r1 8031048: dbf8 blt.n 803103c 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)) { 803104a: 4249 negs r1, r1 803104c: b209 sxth r1, r1 803104e: f7fe fe32 bl 802fcb6 /* 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); 8031052: 4a57 ldr r2, [pc, #348] ; (80311b0 ) 8031054: 4955 ldr r1, [pc, #340] ; (80311ac ) 8031056: 8915 ldrh r5, [r2, #8] 8031058: 6808 ldr r0, [r1, #0] 803105a: 6aa3 ldr r3, [r4, #40] ; 0x28 803105c: 1940 adds r0, r0, r5 803105e: 1ac0 subs r0, r0, r3 8031060: 8110 strh r0, [r2, #8] inseg.tcphdr->seqno = seqno = pcb->rcv_nxt; 8031062: 68d2 ldr r2, [r2, #12] 8031064: 600b str r3, [r1, #0] 8031066: 6053 str r3, [r2, #4] 8031068: e006 b.n 8031078 } else { if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)){ 803106a: 1ac9 subs r1, r1, r3 803106c: 2900 cmp r1, #0 803106e: da03 bge.n 8031078 /* 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); 8031070: 7fa3 ldrb r3, [r4, #30] 8031072: f043 0302 orr.w r3, r3, #2 8031076: 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, 8031078: 4b4c ldr r3, [pc, #304] ; (80311ac ) 803107a: 6aa2 ldr r2, [r4, #40] ; 0x28 803107c: 681b ldr r3, [r3, #0] 803107e: 1a99 subs r1, r3, r2 8031080: 2900 cmp r1, #0 8031082: db71 blt.n 8031168 8031084: 1c59 adds r1, r3, #1 8031086: 8da0 ldrh r0, [r4, #44] ; 0x2c 8031088: 1a89 subs r1, r1, r2 803108a: 1a09 subs r1, r1, r0 803108c: 2900 cmp r1, #0 803108e: dc6b bgt.n 8031168 pcb->rcv_nxt + pcb->rcv_wnd - 1)){ if (pcb->rcv_nxt == seqno) { 8031090: 429a cmp r2, r3 8031092: d169 bne.n 8031168 /* 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); 8031094: 4d46 ldr r5, [pc, #280] ; (80311b0 ) 8031096: 68eb ldr r3, [r5, #12] 8031098: 892e ldrh r6, [r5, #8] 803109a: 8998 ldrh r0, [r3, #12] 803109c: f7fd fcfd bl 802ea9a 80310a0: f010 0003 ands.w r0, r0, #3 80310a4: bf18 it ne 80310a6: 2001 movne r0, #1 80310a8: 4b3f ldr r3, [pc, #252] ; (80311a8 ) 80310aa: 1830 adds r0, r6, r0 80310ac: b280 uxth r0, r0 80310ae: 8018 strh r0, [r3, #0] if (tcplen > pcb->rcv_wnd) { 80310b0: 8da3 ldrh r3, [r4, #44] ; 0x2c 80310b2: 4283 cmp r3, r0 80310b4: d230 bcs.n 8031118 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) { 80310b6: 68eb ldr r3, [r5, #12] 80310b8: 8998 ldrh r0, [r3, #12] 80310ba: f7fd fcee bl 802ea9a 80310be: 07c0 lsls r0, r0, #31 80310c0: d50c bpl.n 80310dc /* 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); 80310c2: 68ed ldr r5, [r5, #12] 80310c4: 89ae ldrh r6, [r5, #12] 80310c6: 4630 mov r0, r6 80310c8: f7fd fce7 bl 802ea9a 80310cc: f000 003e and.w r0, r0, #62 ; 0x3e 80310d0: f7fd fcde bl 802ea90 80310d4: f426 567c bic.w r6, r6, #16128 ; 0x3f00 80310d8: 4330 orrs r0, r6 80310da: 81a8 strh r0, [r5, #12] } /* Adjust length of segment to fit in the window. */ inseg.len = pcb->rcv_wnd; 80310dc: 8da3 ldrh r3, [r4, #44] ; 0x2c 80310de: 4d34 ldr r5, [pc, #208] ; (80311b0 ) 80310e0: 812b strh r3, [r5, #8] if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { 80310e2: 68eb ldr r3, [r5, #12] 80310e4: 8998 ldrh r0, [r3, #12] 80310e6: f7fd fcd8 bl 802ea9a 80310ea: f000 0002 and.w r0, r0, #2 80310ee: b280 uxth r0, r0 80310f0: b110 cbz r0, 80310f8 inseg.len -= 1; 80310f2: 892b ldrh r3, [r5, #8] 80310f4: 3b01 subs r3, #1 80310f6: 812b strh r3, [r5, #8] } pbuf_realloc(inseg.p, inseg.len); 80310f8: 6868 ldr r0, [r5, #4] 80310fa: 8929 ldrh r1, [r5, #8] 80310fc: f7fe fe2d bl 802fd5a tcplen = TCP_TCPLEN(&inseg); 8031100: 68eb ldr r3, [r5, #12] 8031102: 892e ldrh r6, [r5, #8] 8031104: 8998 ldrh r0, [r3, #12] 8031106: f7fd fcc8 bl 802ea9a 803110a: f010 0003 ands.w r0, r0, #3 803110e: bf18 it ne 8031110: 2001 movne r0, #1 8031112: 4b25 ldr r3, [pc, #148] ; (80311a8 ) 8031114: 1830 adds r0, r6, r0 8031116: 8018 strh r0, [r3, #0] pcb->ooseq = next; } } #endif /* TCP_QUEUE_OOSEQ */ pcb->rcv_nxt = seqno + tcplen; 8031118: 4b23 ldr r3, [pc, #140] ; (80311a8 ) 803111a: 4a24 ldr r2, [pc, #144] ; (80311ac ) 803111c: 881b ldrh r3, [r3, #0] 803111e: 6812 ldr r2, [r2, #0] 8031120: 189a adds r2, r3, r2 8031122: 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; 8031124: 8da2 ldrh r2, [r4, #44] ; 0x2c 8031126: 1ad3 subs r3, r2, r3 8031128: 85a3 strh r3, [r4, #44] ; 0x2c tcp_update_rcv_ann_wnd(pcb); 803112a: 4620 mov r0, r4 803112c: f7ff f8e6 bl 80302fc 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) { 8031130: 4b1f ldr r3, [pc, #124] ; (80311b0 ) 8031132: 685a ldr r2, [r3, #4] 8031134: 8911 ldrh r1, [r2, #8] 8031136: b119 cbz r1, 8031140 recv_data = inseg.p; 8031138: 491e ldr r1, [pc, #120] ; (80311b4 ) 803113a: 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; 803113c: 2200 movs r2, #0 803113e: 605a str r2, [r3, #4] } if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { 8031140: 68db ldr r3, [r3, #12] 8031142: 8998 ldrh r0, [r3, #12] 8031144: f7fd fca9 bl 802ea9a 8031148: 07c1 lsls r1, r0, #31 803114a: d504 bpl.n 8031156 LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: received FIN.\n")); recv_flags |= TF_GOT_FIN; 803114c: 4b1a ldr r3, [pc, #104] ; (80311b8 ) 803114e: 781a ldrb r2, [r3, #0] 8031150: f042 0220 orr.w r2, r2, #32 8031154: 701a strb r2, [r3, #0] } #endif /* TCP_QUEUE_OOSEQ */ /* Acknowledge the segment(s). */ tcp_ack(pcb); 8031156: 7fa3 ldrb r3, [r4, #30] 8031158: 07da lsls r2, r3, #31 803115a: d502 bpl.n 8031162 803115c: f023 0301 bic.w r3, r3, #1 8031160: e013 b.n 803118a 8031162: f043 0301 orr.w r3, r3, #1 8031166: e012 b.n 803118e } else { /* We get here if the incoming segment is out-of-sequence. */ tcp_send_empty_ack(pcb); 8031168: 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); } } } 803116a: 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); 803116e: f000 bf09 b.w 8031f84 } 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)){ 8031172: 6812 ldr r2, [r2, #0] 8031174: 6aa3 ldr r3, [r4, #40] ; 0x28 8031176: 1ad1 subs r1, r2, r3 8031178: 2900 cmp r1, #0 803117a: db05 blt.n 8031188 803117c: 3201 adds r2, #1 803117e: 8da1 ldrh r1, [r4, #44] ; 0x2c 8031180: 1ad3 subs r3, r2, r3 8031182: 1a5b subs r3, r3, r1 8031184: 2b00 cmp r3, #0 8031186: dd09 ble.n 803119c tcp_ack_now(pcb); 8031188: 7fa3 ldrb r3, [r4, #30] 803118a: f043 0302 orr.w r3, r3, #2 803118e: 77a3 strb r3, [r4, #30] 8031190: 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; 8031194: 2300 movs r3, #0 8031196: f884 3047 strb.w r3, [r4, #71] ; 0x47 803119a: e6dd b.n 8030f58 803119c: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80311a0: 2000c3e8 .word 0x2000c3e8 80311a4: 2000f6bc .word 0x2000f6bc 80311a8: 2000c3e4 .word 0x2000c3e4 80311ac: 2000c3e0 .word 0x2000c3e0 80311b0: 2000c3f8 .word 0x2000c3f8 80311b4: 2000c3f0 .word 0x2000c3f0 80311b8: 2000c3ed .word 0x2000c3ed 080311bc : * @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) { 80311bc: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 80311c0: 4606 mov r6, r0 80311c2: 460f mov r7, r1 err_t err; PERF_START; TCP_STATS_INC(tcp.recv); snmp_inc_tcpinsegs(); 80311c4: f003 fcc0 bl 8034b48 iphdr = (struct ip_hdr *)p->payload; 80311c8: 6873 ldr r3, [r6, #4] 80311ca: 4aa7 ldr r2, [pc, #668] ; (8031468 ) tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4); 80311cc: 4ca7 ldr r4, [pc, #668] ; (803146c ) PERF_START; TCP_STATS_INC(tcp.recv); snmp_inc_tcpinsegs(); iphdr = (struct ip_hdr *)p->payload; 80311ce: 6013 str r3, [r2, #0] tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4); 80311d0: 781a ldrb r2, [r3, #0] 80311d2: 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))) { 80311d6: 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); 80311d8: 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))) { 80311dc: 4630 mov r0, r6 80311de: 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); 80311e0: 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))) { 80311e2: f7fe fd68 bl 802fcb6 80311e6: 2800 cmp r0, #0 80311e8: f040 83ce bne.w 8031988 80311ec: 8933 ldrh r3, [r6, #8] 80311ee: 2b13 cmp r3, #19 80311f0: f240 83ca bls.w 8031988 TCP_STATS_INC(tcp.lenerr); goto dropped; } /* Don't even process incoming broadcasts/multicasts. */ if (ip_addr_isbroadcast(¤t_iphdr_dest, inp) || 80311f4: 4d9e ldr r5, [pc, #632] ; (8031470 ) 80311f6: 4639 mov r1, r7 80311f8: 6828 ldr r0, [r5, #0] 80311fa: f001 fd43 bl 8032c84 80311fe: 2800 cmp r0, #0 8031200: f040 83c2 bne.w 8031988 ip_addr_ismulticast(¤t_iphdr_dest)) { 8031204: 682b ldr r3, [r5, #0] 8031206: 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) || 803120a: 2be0 cmp r3, #224 ; 0xe0 803120c: f000 83bc beq.w 8031988 } #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); 8031210: 6823 ldr r3, [r4, #0] 8031212: 8998 ldrh r0, [r3, #12] 8031214: f7fd fc41 bl 802ea9a if(pbuf_header(p, -(hdrlen * 4))){ 8031218: f06f 0103 mvn.w r1, #3 803121c: f3c0 3307 ubfx r3, r0, #12, #8 8031220: 4359 muls r1, r3 8031222: 4630 mov r0, r6 8031224: f7fe fd47 bl 802fcb6 8031228: 4683 mov fp, r0 803122a: 2800 cmp r0, #0 803122c: f040 83ac bne.w 8031988 TCP_STATS_INC(tcp.lenerr); goto dropped; } /* Convert fields in TCP header to host byte order. */ tcphdr->src = ntohs(tcphdr->src); 8031230: 6827 ldr r7, [r4, #0] 8031232: 8838 ldrh r0, [r7, #0] 8031234: f7fd fc31 bl 802ea9a 8031238: 8038 strh r0, [r7, #0] tcphdr->dest = ntohs(tcphdr->dest); 803123a: 6827 ldr r7, [r4, #0] 803123c: 8878 ldrh r0, [r7, #2] 803123e: f7fd fc2c bl 802ea9a 8031242: 8078 strh r0, [r7, #2] seqno = tcphdr->seqno = ntohl(tcphdr->seqno); 8031244: 6827 ldr r7, [r4, #0] 8031246: 6878 ldr r0, [r7, #4] 8031248: f7fd fc2e bl 802eaa8 803124c: 4b89 ldr r3, [pc, #548] ; (8031474 ) 803124e: 6078 str r0, [r7, #4] ackno = tcphdr->ackno = ntohl(tcphdr->ackno); 8031250: 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); 8031252: 6018 str r0, [r3, #0] ackno = tcphdr->ackno = ntohl(tcphdr->ackno); 8031254: 68b8 ldr r0, [r7, #8] 8031256: f7fd fc27 bl 802eaa8 803125a: 4b87 ldr r3, [pc, #540] ; (8031478 ) 803125c: 60b8 str r0, [r7, #8] tcphdr->wnd = ntohs(tcphdr->wnd); 803125e: 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); 8031260: 6018 str r0, [r3, #0] tcphdr->wnd = ntohs(tcphdr->wnd); 8031262: 89f8 ldrh r0, [r7, #14] 8031264: f7fd fc19 bl 802ea9a 8031268: 81f8 strh r0, [r7, #14] flags = TCPH_FLAGS(tcphdr); 803126a: 6823 ldr r3, [r4, #0] 803126c: 8998 ldrh r0, [r3, #12] 803126e: f7fd fc14 bl 802ea9a 8031272: 4b82 ldr r3, [pc, #520] ; (803147c ) tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 8031274: 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 && 8031278: 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); 803127a: 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); 803127e: f000 013f and.w r1, r0, #63 ; 0x3f tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 8031282: bf18 it ne 8031284: 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); 8031288: 7019 strb r1, [r3, #0] tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 803128a: 44c4 add ip, r8 803128c: 4b7c ldr r3, [pc, #496] ; (8031480 ) 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)) { 803128e: 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); 8031290: fa1f fc8c uxth.w ip, ip 8031294: 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) { 8031298: 4b7a ldr r3, [pc, #488] ; (8031484 ) 803129a: 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) && 803129e: 4b7a ldr r3, [pc, #488] ; (8031488 ) 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); 80312a0: 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) && 80312a2: 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) { 80312a6: 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; 80312a8: 4658 mov r0, fp for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 80312aa: e019 b.n 80312e0 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 && 80312ac: 8ba5 ldrh r5, [r4, #28] 80312ae: 883b ldrh r3, [r7, #0] 80312b0: 429d cmp r5, r3 80312b2: d113 bne.n 80312dc 80312b4: 8b65 ldrh r5, [r4, #26] 80312b6: 887b ldrh r3, [r7, #2] 80312b8: 429d cmp r5, r3 80312ba: d10f bne.n 80312dc pcb->local_port == tcphdr->dest && 80312bc: 6863 ldr r3, [r4, #4] 80312be: 454b cmp r3, r9 80312c0: d10c bne.n 80312dc ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src) && 80312c2: 6823 ldr r3, [r4, #0] 80312c4: 428b cmp r3, r1 80312c6: d109 bne.n 80312dc /* 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) { 80312c8: 2800 cmp r0, #0 80312ca: f000 8382 beq.w 80319d2 prev->next = pcb->next; 80312ce: 68e3 ldr r3, [r4, #12] 80312d0: 60c3 str r3, [r0, #12] pcb->next = tcp_active_pcbs; tcp_active_pcbs = pcb; 80312d2: 4b6c ldr r3, [pc, #432] ; (8031484 ) 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; 80312d4: f8c4 a00c str.w sl, [r4, #12] tcp_active_pcbs = pcb; 80312d8: 601c str r4, [r3, #0] 80312da: e37a b.n 80319d2 80312dc: 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) { 80312de: 68e4 ldr r4, [r4, #12] 80312e0: 2c00 cmp r4, #0 80312e2: d1e3 bne.n 80312ac 80312e4: e372 b.n 80319cc 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 && 80312e6: 8b98 ldrh r0, [r3, #28] 80312e8: 883c ldrh r4, [r7, #0] 80312ea: 4284 cmp r4, r0 80312ec: d130 bne.n 8031350 pcb->local_port == tcphdr->dest && 80312ee: 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 && 80312f0: 887d ldrh r5, [r7, #2] 80312f2: 4285 cmp r5, r0 80312f4: d12c bne.n 8031350 pcb->local_port == tcphdr->dest && 80312f6: 6858 ldr r0, [r3, #4] 80312f8: 4548 cmp r0, r9 80312fa: d129 bne.n 8031350 ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src) && 80312fc: 6818 ldr r0, [r3, #0] 80312fe: 4288 cmp r0, r1 8031300: d126 bne.n 8031350 /* 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) { 8031302: f002 0104 and.w r1, r2, #4 8031306: b2c9 uxtb r1, r1 8031308: 2900 cmp r1, #0 803130a: f040 833f bne.w 803198c return ERR_OK; } /* - fourth, check the SYN bit, */ if (flags & TCP_SYN) { 803130e: f002 0102 and.w r1, r2, #2 8031312: b2c9 uxtb r1, r1 8031314: b159 cbz r1, 803132e /* 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)) { 8031316: 4a57 ldr r2, [pc, #348] ; (8031474 ) 8031318: 6811 ldr r1, [r2, #0] 803131a: 6a9a ldr r2, [r3, #40] ; 0x28 803131c: 1a8a subs r2, r1, r2 803131e: d40b bmi.n 8031338 8031320: 8d98 ldrh r0, [r3, #44] ; 0x2c 8031322: 1a12 subs r2, r2, r0 8031324: 2a00 cmp r2, #0 8031326: dc07 bgt.n 8031338 /* 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(), 8031328: 9500 str r5, [sp, #0] 803132a: 9401 str r4, [sp, #4] 803132c: e041 b.n 80313b2 tcphdr->dest, tcphdr->src); return ERR_OK; } } else if (flags & TCP_FIN) { 803132e: 07d2 lsls r2, r2, #31 8031330: d502 bpl.n 8031338 /* - eighth, check the FIN bit: Remain in the TIME-WAIT state. Restart the 2 MSL time-wait timeout.*/ pcb->tmr = tcp_ticks; 8031332: 4a56 ldr r2, [pc, #344] ; (803148c ) 8031334: 6812 ldr r2, [r2, #0] 8031336: 625a str r2, [r3, #36] ; 0x24 } if ((tcplen > 0)) { 8031338: f1bc 0f00 cmp.w ip, #0 803133c: f000 8326 beq.w 803198c /* Acknowledge data, FIN or out-of-window SYN */ pcb->flags |= TF_ACK_NOW; 8031340: 7f9a ldrb r2, [r3, #30] 8031342: f042 0202 orr.w r2, r2, #2 8031346: 779a strb r2, [r3, #30] return tcp_output(pcb); 8031348: 4618 mov r0, r3 803134a: f000 fe3d bl 8031fc8 803134e: e31d b.n 803198c } 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) { 8031350: 68db ldr r3, [r3, #12] 8031352: 2b00 cmp r3, #0 8031354: d1c7 bne.n 80312e6 } /* 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) { 8031356: 484e ldr r0, [pc, #312] ; (8031490 ) 8031358: 6804 ldr r4, [r0, #0] 803135a: 4625 mov r5, r4 803135c: e00f b.n 803137e if (lpcb->local_port == tcphdr->dest) { 803135e: 8b68 ldrh r0, [r5, #26] 8031360: f8b7 8002 ldrh.w r8, [r7, #2] 8031364: 4580 cmp r8, r0 8031366: d108 bne.n 803137a /* found an ANY-match */ lpcb_any = lpcb; lpcb_prev = prev; } #else /* SO_REUSE */ if (ip_addr_cmp(&(lpcb->local_ip), ¤t_iphdr_dest) || 8031368: f8d5 8000 ldr.w r8, [r5] 803136c: 4588 cmp r8, r1 803136e: f000 8342 beq.w 80319f6 ip_addr_isany(&(lpcb->local_ip))) { 8031372: f1b8 0f00 cmp.w r8, #0 8031376: f000 833e beq.w 80319f6 803137a: 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) { 803137c: 68ed ldr r5, [r5, #12] 803137e: 2d00 cmp r5, #0 8031380: d1ed bne.n 803135e 8031382: e33c b.n 80319fe 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; 8031384: 68e9 ldr r1, [r5, #12] 8031386: 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; 8031388: 4b41 ldr r3, [pc, #260] ; (8031490 ) 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; 803138a: 60ec str r4, [r5, #12] /* put this listening pcb at the head of the listening list */ tcp_listen_pcbs.listen_pcbs = lpcb; 803138c: 601d str r5, [r3, #0] tcp_listen_input(struct tcp_pcb_listen *pcb) { struct tcp_pcb *npcb; err_t rc; if (flags & TCP_RST) { 803138e: f002 0304 and.w r3, r2, #4 8031392: b2db uxtb r3, r3 8031394: 2b00 cmp r3, #0 8031396: f040 82f9 bne.w 803198c 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) { 803139a: f002 0810 and.w r8, r2, #16 803139e: fa5f f888 uxtb.w r8, r8 80313a2: f1b8 0f00 cmp.w r8, #0 80313a6: d00c beq.n 80313c2 /* 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(), 80313a8: 4b32 ldr r3, [pc, #200] ; (8031474 ) 80313aa: 6819 ldr r1, [r3, #0] 80313ac: 9000 str r0, [sp, #0] 80313ae: 883b ldrh r3, [r7, #0] 80313b0: 9301 str r3, [sp, #4] 80313b2: 4b31 ldr r3, [pc, #196] ; (8031478 ) 80313b4: 6818 ldr r0, [r3, #0] 80313b6: 4461 add r1, ip 80313b8: 4a2d ldr r2, [pc, #180] ; (8031470 ) 80313ba: 4b33 ldr r3, [pc, #204] ; (8031488 ) 80313bc: f000 ff28 bl 8032210 80313c0: e2e4 b.n 803198c ip_current_src_addr(), tcphdr->dest, tcphdr->src); } else if (flags & TCP_SYN) { 80313c2: f002 0202 and.w r2, r2, #2 80313c6: b2d2 uxtb r2, r2 80313c8: 2a00 cmp r2, #0 80313ca: f000 82df beq.w 803198c 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); 80313ce: 7e68 ldrb r0, [r5, #25] 80313d0: f7ff fb4c bl 8030a6c /* 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) { 80313d4: 4604 mov r4, r0 80313d6: 2800 cmp r0, #0 80313d8: f000 82d8 beq.w 803198c } #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); 80313dc: 4b24 ldr r3, [pc, #144] ; (8031470 ) 80313de: 681b ldr r3, [r3, #0] 80313e0: 6003 str r3, [r0, #0] npcb->local_port = pcb->local_port; 80313e2: 8b6b ldrh r3, [r5, #26] 80313e4: 8343 strh r3, [r0, #26] ip_addr_copy(npcb->remote_ip, current_iphdr_src); 80313e6: 4b28 ldr r3, [pc, #160] ; (8031488 ) 80313e8: 681b ldr r3, [r3, #0] 80313ea: 6043 str r3, [r0, #4] npcb->remote_port = tcphdr->src; 80313ec: 4b1f ldr r3, [pc, #124] ; (803146c ) 80313ee: 681b ldr r3, [r3, #0] 80313f0: 7859 ldrb r1, [r3, #1] 80313f2: 781a ldrb r2, [r3, #0] 80313f4: ea42 2201 orr.w r2, r2, r1, lsl #8 80313f8: 8382 strh r2, [r0, #28] npcb->state = SYN_RCVD; 80313fa: 2203 movs r2, #3 80313fc: 7602 strb r2, [r0, #24] npcb->rcv_nxt = seqno + 1; 80313fe: 4a1d ldr r2, [pc, #116] ; (8031474 ) 8031400: 6812 ldr r2, [r2, #0] 8031402: 1c51 adds r1, r2, #1 8031404: 6281 str r1, [r0, #40] ; 0x28 npcb->rcv_ann_right_edge = npcb->rcv_nxt; 8031406: 6301 str r1, [r0, #48] ; 0x30 npcb->snd_wnd = tcphdr->wnd; 8031408: 89db ldrh r3, [r3, #14] 803140a: f8a0 3060 strh.w r3, [r0, #96] ; 0x60 npcb->snd_wnd_max = tcphdr->wnd; 803140e: f8a0 3062 strh.w r3, [r0, #98] ; 0x62 npcb->ssthresh = npcb->snd_wnd; 8031412: 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; 8031416: 692b ldr r3, [r5, #16] 8031418: 6103 str r3, [r0, #16] #if LWIP_CALLBACK_API npcb->accept = pcb->accept; 803141a: 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 */ 803141c: 3a01 subs r2, #1 803141e: 6542 str r2, [r0, #84] ; 0x54 npcb->callback_arg = pcb->callback_arg; #if LWIP_CALLBACK_API npcb->accept = pcb->accept; 8031420: 6143 str r3, [r0, #20] #endif /* LWIP_CALLBACK_API */ /* inherit socket options */ npcb->so_options = pcb->so_options & SOF_INHERITED; 8031422: 7a2b ldrb r3, [r5, #8] 8031424: f023 0373 bic.w r3, r3, #115 ; 0x73 8031428: 7203 strb r3, [r0, #8] /* Register the new PCB so that we can begin receiving segments for it. */ TCP_REG_ACTIVE(npcb); 803142a: 4b16 ldr r3, [pc, #88] ; (8031484 ) 803142c: 681a ldr r2, [r3, #0] 803142e: 6018 str r0, [r3, #0] 8031430: 60c2 str r2, [r0, #12] 8031432: f001 f887 bl 8032544 8031436: 4b17 ldr r3, [pc, #92] ; (8031494 ) 8031438: 2201 movs r2, #1 /* Parse any options in the SYN. */ tcp_parseopt(npcb); 803143a: 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); 803143c: 701a strb r2, [r3, #0] /* Parse any options in the SYN. */ tcp_parseopt(npcb); 803143e: f7ff fc29 bl 8030c94 #if TCP_CALCULATE_EFF_SEND_MSS npcb->mss = tcp_eff_send_mss(npcb->mss, &(npcb->remote_ip)); 8031442: 1d21 adds r1, r4, #4 8031444: 8ee0 ldrh r0, [r4, #54] ; 0x36 8031446: f7ff fb9c bl 8030b82 803144a: 86e0 strh r0, [r4, #54] ; 0x36 #endif /* TCP_CALCULATE_EFF_SEND_MSS */ snmp_inc_tcppassiveopens(); 803144c: f003 fb64 bl 8034b18 /* Send a SYN|ACK together with the MSS option. */ rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK); 8031450: 4620 mov r0, r4 8031452: 2112 movs r1, #18 8031454: f000 fd28 bl 8031ea8 if (rc != ERR_OK) { 8031458: b120 cbz r0, 8031464 tcp_abandon(npcb, 0); 803145a: 4620 mov r0, r4 803145c: 4641 mov r1, r8 803145e: f7ff f941 bl 80306e4 8031462: e293 b.n 803198c return rc; } return tcp_output(npcb); 8031464: 4620 mov r0, r4 8031466: e770 b.n 803134a 8031468: 2000c3f4 .word 0x2000c3f4 803146c: 2000c3dc .word 0x2000c3dc 8031470: 2000f6e0 .word 0x2000f6e0 8031474: 2000c3e0 .word 0x2000c3e0 8031478: 2000c3e8 .word 0x2000c3e8 803147c: 2000c3ec .word 0x2000c3ec 8031480: 2000c3e4 .word 0x2000c3e4 8031484: 2000f6b8 .word 0x2000f6b8 8031488: 2000f6d8 .word 0x2000f6d8 803148c: 2000f6bc .word 0x2000f6bc 8031490: 2000f6c0 .word 0x2000f6c0 8031494: 2000f6b4 .word 0x2000f6b4 recv_data = NULL; recv_flags = 0; if (flags & TCP_PSH) { p->flags |= PBUF_FLAG_PUSH; 8031498: 7b73 ldrb r3, [r6, #13] 803149a: f043 0301 orr.w r3, r3, #1 803149e: 7373 strb r3, [r6, #13] } /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 80314a0: 6f63 ldr r3, [r4, #116] ; 0x74 80314a2: b163 cbz r3, 80314be if ((tcp_process_refused_data(pcb) == ERR_ABRT) || 80314a4: 4620 mov r0, r4 80314a6: f7ff fa57 bl 8030958 80314aa: 300a adds r0, #10 80314ac: d004 beq.n 80314b8 80314ae: 6f63 ldr r3, [r4, #116] ; 0x74 80314b0: b12b cbz r3, 80314be ((pcb->refused_data != NULL) && (tcplen > 0))) { 80314b2: 4b9f ldr r3, [pc, #636] ; (8031730 ) 80314b4: 881b ldrh r3, [r3, #0] 80314b6: b113 cbz r3, 80314be /* pcb has been aborted or refused data is still refused and the new segment contains data */ TCP_STATS_INC(tcp.drop); snmp_inc_tcpinerrs(); 80314b8: f003 fb5e bl 8034b78 goto aborted; 80314bc: e249 b.n 8031952 } } tcp_input_pcb = pcb; 80314be: 4b9d ldr r3, [pc, #628] ; (8031734 ) 80314c0: 601c str r4, [r3, #0] err_t err; err = ERR_OK; /* Process incoming RST segments. */ if (flags & TCP_RST) { 80314c2: 4b9d ldr r3, [pc, #628] ; (8031738 ) 80314c4: 781b ldrb r3, [r3, #0] 80314c6: f003 0204 and.w r2, r3, #4 80314ca: b2d2 uxtb r2, r2 80314cc: b1aa cbz r2, 80314fa /* First, determine if the reset is acceptable. */ if (pcb->state == SYN_SENT) { 80314ce: 7e23 ldrb r3, [r4, #24] 80314d0: 2b02 cmp r3, #2 80314d2: d106 bne.n 80314e2 if (ackno == pcb->snd_nxt) { 80314d4: 4b99 ldr r3, [pc, #612] ; (803173c ) 80314d6: 681a ldr r2, [r3, #0] 80314d8: 6d23 ldr r3, [r4, #80] ; 0x50 80314da: 429a cmp r2, r3 80314dc: f040 82a1 bne.w 8031a22 80314e0: e296 b.n 8031a10 acceptable = 1; } } else { if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, 80314e2: 4b97 ldr r3, [pc, #604] ; (8031740 ) 80314e4: 681a ldr r2, [r3, #0] 80314e6: 6aa3 ldr r3, [r4, #40] ; 0x28 80314e8: 1ad3 subs r3, r2, r3 80314ea: f100 829a bmi.w 8031a22 80314ee: 8da1 ldrh r1, [r4, #44] ; 0x2c 80314f0: 1a5b subs r3, r3, r1 80314f2: 2b00 cmp r3, #0 80314f4: f300 8295 bgt.w 8031a22 80314f8: e28a b.n 8031a10 seqno, pcb->rcv_nxt)); return ERR_OK; } } if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) { 80314fa: f003 0302 and.w r3, r3, #2 80314fe: b2db uxtb r3, r3 8031500: b123 cbz r3, 803150c 8031502: 7e23 ldrb r3, [r4, #24] 8031504: 3b02 subs r3, #2 8031506: 2b01 cmp r3, #1 8031508: d900 bls.n 803150c 803150a: e06b b.n 80315e4 /* Cope with new connection attempt after remote end crashed */ tcp_ack_now(pcb); return ERR_OK; } if ((pcb->flags & TF_RXCLOSED) == 0) { 803150c: 7fa3 ldrb r3, [r4, #30] 803150e: f003 0310 and.w r3, r3, #16 8031512: b2db uxtb r3, r3 8031514: b913 cbnz r3, 803151c /* Update the PCB (in)activity timer unless rx is closed (see tcp_shutdown) */ pcb->tmr = tcp_ticks; 8031516: 4b8b ldr r3, [pc, #556] ; (8031744 ) 8031518: 681b ldr r3, [r3, #0] 803151a: 6263 str r3, [r4, #36] ; 0x24 } pcb->keep_cnt_sent = 0; 803151c: 2300 movs r3, #0 803151e: f884 3092 strb.w r3, [r4, #146] ; 0x92 tcp_parseopt(pcb); 8031522: 4620 mov r0, r4 8031524: f7ff fbb6 bl 8030c94 /* Do different things depending on the TCP state. */ switch (pcb->state) { 8031528: 7e23 ldrb r3, [r4, #24] 803152a: 3b02 subs r3, #2 803152c: 2b07 cmp r3, #7 803152e: f200 8278 bhi.w 8031a22 8031532: e8df f013 tbh [pc, r3, lsl #1] 8031536: 0008 .short 0x0008 8031538: 00c90077 .word 0x00c90077 803153c: 013000da .word 0x013000da 8031540: 015200c9 .word 0x015200c9 8031544: 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) 8031546: 4b7c ldr r3, [pc, #496] ; (8031738 ) 8031548: 781b ldrb r3, [r3, #0] 803154a: f003 0312 and.w r3, r3, #18 803154e: 2b12 cmp r3, #18 8031550: d153 bne.n 80315fa && ackno == ntohl(pcb->unacked->tcphdr->seqno) + 1) { 8031552: 6f23 ldr r3, [r4, #112] ; 0x70 8031554: 4d79 ldr r5, [pc, #484] ; (803173c ) 8031556: 68db ldr r3, [r3, #12] 8031558: 682e ldr r6, [r5, #0] 803155a: 6858 ldr r0, [r3, #4] 803155c: f7fd faa4 bl 802eaa8 8031560: 3001 adds r0, #1 8031562: 4286 cmp r6, r0 8031564: d149 bne.n 80315fa pcb->snd_buf++; 8031566: 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)); 803156a: 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++; 803156c: 3301 adds r3, #1 803156e: f8a4 3066 strh.w r3, [r4, #102] ; 0x66 pcb->rcv_nxt = seqno + 1; 8031572: 4b73 ldr r3, [pc, #460] ; (8031740 ) 8031574: 681b ldr r3, [r3, #0] 8031576: 1c5a adds r2, r3, #1 8031578: 62a2 str r2, [r4, #40] ; 0x28 pcb->rcv_ann_right_edge = pcb->rcv_nxt; 803157a: 6322 str r2, [r4, #48] ; 0x30 pcb->lastack = ackno; 803157c: 682a ldr r2, [r5, #0] 803157e: 64a2 str r2, [r4, #72] ; 0x48 pcb->snd_wnd = tcphdr->wnd; 8031580: 4a71 ldr r2, [pc, #452] ; (8031748 ) 8031582: 6812 ldr r2, [r2, #0] pcb->snd_wnd_max = tcphdr->wnd; pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ 8031584: 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; 8031586: 89d2 ldrh r2, [r2, #14] pcb->snd_wnd_max = tcphdr->wnd; pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ 8031588: 6563 str r3, [r4, #84] ; 0x54 pcb->state = ESTABLISHED; 803158a: 2304 movs r3, #4 803158c: 7623 strb r3, [r4, #24] #if TCP_CALCULATE_EFF_SEND_MSS pcb->mss = tcp_eff_send_mss(pcb->mss, &(pcb->remote_ip)); 803158e: 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; 8031590: f8a4 2060 strh.w r2, [r4, #96] ; 0x60 pcb->snd_wnd_max = tcphdr->wnd; 8031594: 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)); 8031598: f7ff faf3 bl 8030b82 #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; 803159c: 230a movs r3, #10 803159e: 4343 muls r3, r0 80315a0: f8a4 304e strh.w r3, [r4, #78] ; 0x4e pcb->cwnd = ((pcb->cwnd == 1) ? (pcb->mss * 2) : pcb->mss); 80315a4: 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)); 80315a8: 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); 80315aa: 2b01 cmp r3, #1 80315ac: d101 bne.n 80315b2 80315ae: 0040 lsls r0, r0, #1 80315b0: b280 uxth r0, r0 LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0)); --pcb->snd_queuelen; 80315b2: 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); 80315b6: 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; 80315ba: 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; 80315bc: 3b01 subs r3, #1 80315be: 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; 80315c2: 6803 ldr r3, [r0, #0] 80315c4: 6723 str r3, [r4, #112] ; 0x70 tcp_seg_free(rseg); 80315c6: f7fe fed0 bl 803036a /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if(pcb->unacked == NULL) 80315ca: 6f23 ldr r3, [r4, #112] ; 0x70 80315cc: b91b cbnz r3, 80315d6 pcb->rtime = -1; 80315ce: f64f 73ff movw r3, #65535 ; 0xffff 80315d2: 86a3 strh r3, [r4, #52] ; 0x34 80315d4: e003 b.n 80315de else { pcb->rtime = 0; 80315d6: 2300 movs r3, #0 80315d8: 86a3 strh r3, [r4, #52] ; 0x34 pcb->nrtx = 0; 80315da: 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); 80315de: f8d4 3080 ldr.w r3, [r4, #128] ; 0x80 80315e2: b91b cbnz r3, 80315ec if (err == ERR_ABRT) { return ERR_ABRT; } tcp_ack_now(pcb); 80315e4: 7fa3 ldrb r3, [r4, #30] 80315e6: f043 0302 orr.w r3, r3, #2 80315ea: e219 b.n 8031a20 pcb->nrtx = 0; } /* Call the user specified function to call when sucessfully * connected. */ TCP_EVENT_CONNECTED(pcb, ERR_OK, err); 80315ec: 2200 movs r2, #0 80315ee: 6920 ldr r0, [r4, #16] 80315f0: 4621 mov r1, r4 80315f2: 4798 blx r3 if (err == ERR_ABRT) { 80315f4: 300a adds r0, #10 80315f6: d1f5 bne.n 80315e4 80315f8: e1ab b.n 8031952 return ERR_ABRT; } tcp_ack_now(pcb); } /* received ACK? possibly a half-open connection */ else if (flags & TCP_ACK) { 80315fa: 4b4f ldr r3, [pc, #316] ; (8031738 ) 80315fc: 781b ldrb r3, [r3, #0] 80315fe: f003 0310 and.w r3, r3, #16 8031602: b2db uxtb r3, r3 8031604: 2b00 cmp r3, #0 8031606: f000 820c beq.w 8031a22 /* 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); 803160a: 4b4f ldr r3, [pc, #316] ; (8031748 ) 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(), 803160c: 4a48 ldr r2, [pc, #288] ; (8031730 ) tcphdr->dest, tcphdr->src); 803160e: 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(), 8031610: 8811 ldrh r1, [r2, #0] 8031612: 8858 ldrh r0, [r3, #2] 8031614: 4a4a ldr r2, [pc, #296] ; (8031740 ) 8031616: 6812 ldr r2, [r2, #0] 8031618: 9000 str r0, [sp, #0] 803161a: 881b ldrh r3, [r3, #0] 803161c: 9301 str r3, [sp, #4] 803161e: 4b47 ldr r3, [pc, #284] ; (803173c ) 8031620: 6818 ldr r0, [r3, #0] 8031622: e03a b.n 803169a tcphdr->dest, tcphdr->src); } break; case SYN_RCVD: if (flags & TCP_ACK) { 8031624: 4b44 ldr r3, [pc, #272] ; (8031738 ) 8031626: 781b ldrb r3, [r3, #0] 8031628: f003 0210 and.w r2, r3, #16 803162c: b2d2 uxtb r2, r2 803162e: 2a00 cmp r2, #0 8031630: d039 beq.n 80316a6 /* expected ACK number? */ if (TCP_SEQ_BETWEEN(ackno, pcb->lastack+1, pcb->snd_nxt)) { 8031632: 4b42 ldr r3, [pc, #264] ; (803173c ) 8031634: 6818 ldr r0, [r3, #0] 8031636: 6ca3 ldr r3, [r4, #72] ; 0x48 8031638: 43db mvns r3, r3 803163a: 42c3 cmn r3, r0 803163c: d423 bmi.n 8031686 803163e: 6d23 ldr r3, [r4, #80] ; 0x50 8031640: 1ac3 subs r3, r0, r3 8031642: 2b00 cmp r3, #0 8031644: dc1f bgt.n 8031686 u16_t old_cwnd; pcb->state = ESTABLISHED; 8031646: 2304 movs r3, #4 8031648: 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); 803164a: 6963 ldr r3, [r4, #20] 803164c: b903 cbnz r3, 8031650 803164e: e147 b.n 80318e0 8031650: 6920 ldr r0, [r4, #16] 8031652: 4621 mov r1, r4 8031654: 2200 movs r2, #0 8031656: 4798 blx r3 if (err != ERR_OK) { 8031658: b118 cbz r0, 8031662 /* If the accept function returns with an error, we abort * the connection. */ /* Already aborted? */ if (err != ERR_ABRT) { 803165a: 300a adds r0, #10 803165c: f040 8140 bne.w 80318e0 8031660: e177 b.n 8031952 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); 8031662: 4620 mov r0, r4 if (err != ERR_ABRT) { tcp_abort(pcb); } return ERR_ABRT; } old_cwnd = pcb->cwnd; 8031664: 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); 8031668: f7ff fb54 bl 8030d14 /* Prevent ACK for SYN to generate a sent event */ if (pcb->acked != 0) { 803166c: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 8031670: b113 cbz r3, 8031678 pcb->acked--; 8031672: 3b01 subs r3, #1 8031674: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 } pcb->cwnd = ((old_cwnd == 1) ? (pcb->mss * 2) : pcb->mss); 8031678: 8ee3 ldrh r3, [r4, #54] ; 0x36 803167a: 2d01 cmp r5, #1 803167c: bf08 it eq 803167e: 005b lsleq r3, r3, #1 8031680: f8a4 304c strh.w r3, [r4, #76] ; 0x4c 8031684: e023 b.n 80316ce 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); 8031686: 4b30 ldr r3, [pc, #192] ; (8031748 ) 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(), 8031688: 4a29 ldr r2, [pc, #164] ; (8031730 ) tcphdr->dest, tcphdr->src); 803168a: 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(), 803168c: 8811 ldrh r1, [r2, #0] 803168e: 885d ldrh r5, [r3, #2] 8031690: 4a2b ldr r2, [pc, #172] ; (8031740 ) 8031692: 6812 ldr r2, [r2, #0] 8031694: 9500 str r5, [sp, #0] 8031696: 881b ldrh r3, [r3, #0] 8031698: 9301 str r3, [sp, #4] 803169a: 1889 adds r1, r1, r2 803169c: 4b2b ldr r3, [pc, #172] ; (803174c ) 803169e: 4a2c ldr r2, [pc, #176] ; (8031750 ) 80316a0: f000 fdb6 bl 8032210 80316a4: e1bd b.n 8031a22 tcphdr->dest, tcphdr->src); } } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) { 80316a6: f003 0302 and.w r3, r3, #2 80316aa: b2db uxtb r3, r3 80316ac: 2b00 cmp r3, #0 80316ae: f000 81b8 beq.w 8031a22 80316b2: 4a23 ldr r2, [pc, #140] ; (8031740 ) 80316b4: 6aa3 ldr r3, [r4, #40] ; 0x28 80316b6: 6812 ldr r2, [r2, #0] 80316b8: 3b01 subs r3, #1 80316ba: 429a cmp r2, r3 80316bc: f040 81b1 bne.w 8031a22 /* Looks like another copy of the SYN - retransmit our SYN-ACK */ tcp_rexmit(pcb); 80316c0: 4620 mov r0, r4 80316c2: f000 fe03 bl 80322cc 80316c6: e1ac b.n 8031a22 } break; case CLOSE_WAIT: /* FALLTHROUGH */ case ESTABLISHED: tcp_receive(pcb); 80316c8: 4620 mov r0, r4 80316ca: f7ff fb23 bl 8030d14 if (recv_flags & TF_GOT_FIN) { /* passive close */ 80316ce: 4b21 ldr r3, [pc, #132] ; (8031754 ) 80316d0: 781b ldrb r3, [r3, #0] 80316d2: f003 0320 and.w r3, r3, #32 80316d6: b2db uxtb r3, r3 80316d8: 2b00 cmp r3, #0 80316da: f000 81a2 beq.w 8031a22 tcp_ack_now(pcb); 80316de: 7fa3 ldrb r3, [r4, #30] 80316e0: f043 0302 orr.w r3, r3, #2 80316e4: 77a3 strb r3, [r4, #30] pcb->state = CLOSE_WAIT; 80316e6: 2307 movs r3, #7 80316e8: e053 b.n 8031792 } break; case FIN_WAIT_1: tcp_receive(pcb); 80316ea: 4620 mov r0, r4 80316ec: f7ff fb12 bl 8030d14 if (recv_flags & TF_GOT_FIN) { 80316f0: 4b18 ldr r3, [pc, #96] ; (8031754 ) 80316f2: 781a ldrb r2, [r3, #0] 80316f4: 4b10 ldr r3, [pc, #64] ; (8031738 ) if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 80316f6: 781b ldrb r3, [r3, #0] pcb->state = CLOSE_WAIT; } break; case FIN_WAIT_1: tcp_receive(pcb); if (recv_flags & TF_GOT_FIN) { 80316f8: f002 0220 and.w r2, r2, #32 if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 80316fc: 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) { 8031700: b2d2 uxtb r2, r2 if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 8031702: b2db uxtb r3, r3 pcb->state = CLOSE_WAIT; } break; case FIN_WAIT_1: tcp_receive(pcb); if (recv_flags & TF_GOT_FIN) { 8031704: 2a00 cmp r2, #0 8031706: d03a beq.n 803177e if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 8031708: 2b00 cmp r3, #0 803170a: d032 beq.n 8031772 803170c: 4b0b ldr r3, [pc, #44] ; (803173c ) 803170e: 681a ldr r2, [r3, #0] 8031710: 6d23 ldr r3, [r4, #80] ; 0x50 8031712: 429a cmp r2, r3 8031714: d12d bne.n 8031772 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); 8031716: 7fa3 ldrb r3, [r4, #30] 8031718: f043 0302 orr.w r3, r3, #2 803171c: 77a3 strb r3, [r4, #30] tcp_pcb_purge(pcb); 803171e: 4620 mov r0, r4 8031720: f7fe fe4a bl 80303b8 TCP_RMV_ACTIVE(pcb); 8031724: 4a0c ldr r2, [pc, #48] ; (8031758 ) 8031726: 6813 ldr r3, [r2, #0] 8031728: 42a3 cmp r3, r4 803172a: d117 bne.n 803175c 803172c: e06d b.n 803180a 803172e: bf00 nop 8031730: 2000c3e4 .word 0x2000c3e4 8031734: 2000f6d0 .word 0x2000f6d0 8031738: 2000c3ec .word 0x2000c3ec 803173c: 2000c3e8 .word 0x2000c3e8 8031740: 2000c3e0 .word 0x2000c3e0 8031744: 2000f6bc .word 0x2000f6bc 8031748: 2000c3dc .word 0x2000c3dc 803174c: 2000f6d8 .word 0x2000f6d8 8031750: 2000f6e0 .word 0x2000f6e0 8031754: 2000c3ed .word 0x2000c3ed 8031758: 2000f6b8 .word 0x2000f6b8 803175c: 4a8e ldr r2, [pc, #568] ; (8031998 ) 803175e: 6013 str r3, [r2, #0] 8031760: e004 b.n 803176c 8031762: 68d9 ldr r1, [r3, #12] 8031764: 42a1 cmp r1, r4 8031766: d100 bne.n 803176a 8031768: e057 b.n 803181a 803176a: 460b mov r3, r1 803176c: 2b00 cmp r3, #0 803176e: d1f8 bne.n 8031762 8031770: e05a b.n 8031828 pcb->state = TIME_WAIT; TCP_REG(&tcp_tw_pcbs, pcb); } else { tcp_ack_now(pcb); 8031772: 7fa3 ldrb r3, [r4, #30] 8031774: f043 0302 orr.w r3, r3, #2 8031778: 77a3 strb r3, [r4, #30] pcb->state = CLOSING; 803177a: 2308 movs r3, #8 803177c: e009 b.n 8031792 } } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 803177e: 2b00 cmp r3, #0 8031780: f000 814f beq.w 8031a22 8031784: 4b85 ldr r3, [pc, #532] ; (803199c ) 8031786: 681a ldr r2, [r3, #0] 8031788: 6d23 ldr r3, [r4, #80] ; 0x50 803178a: 429a cmp r2, r3 803178c: f040 8149 bne.w 8031a22 pcb->state = FIN_WAIT_2; 8031790: 2306 movs r3, #6 8031792: 7623 strb r3, [r4, #24] 8031794: e145 b.n 8031a22 } break; case FIN_WAIT_2: tcp_receive(pcb); 8031796: 4620 mov r0, r4 8031798: f7ff fabc bl 8030d14 if (recv_flags & TF_GOT_FIN) { 803179c: 4b80 ldr r3, [pc, #512] ; (80319a0 ) 803179e: 781b ldrb r3, [r3, #0] 80317a0: f003 0320 and.w r3, r3, #32 80317a4: b2db uxtb r3, r3 80317a6: 2b00 cmp r3, #0 80317a8: f000 813b beq.w 8031a22 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); 80317ac: 7fa3 ldrb r3, [r4, #30] 80317ae: f043 0302 orr.w r3, r3, #2 80317b2: 77a3 strb r3, [r4, #30] tcp_pcb_purge(pcb); 80317b4: 4620 mov r0, r4 80317b6: f7fe fdff bl 80303b8 TCP_RMV_ACTIVE(pcb); 80317ba: 4a7a ldr r2, [pc, #488] ; (80319a4 ) 80317bc: 6813 ldr r3, [r2, #0] 80317be: 42a3 cmp r3, r4 80317c0: d100 bne.n 80317c4 80317c2: e022 b.n 803180a 80317c4: 4a74 ldr r2, [pc, #464] ; (8031998 ) 80317c6: 6013 str r3, [r2, #0] 80317c8: e004 b.n 80317d4 80317ca: 68d9 ldr r1, [r3, #12] 80317cc: 42a1 cmp r1, r4 80317ce: d100 bne.n 80317d2 80317d0: e023 b.n 803181a 80317d2: 460b mov r3, r1 80317d4: 2b00 cmp r3, #0 80317d6: d1f8 bne.n 80317ca 80317d8: e026 b.n 8031828 pcb->state = TIME_WAIT; TCP_REG(&tcp_tw_pcbs, pcb); } break; case CLOSING: tcp_receive(pcb); 80317da: 4620 mov r0, r4 80317dc: f7ff fa9a bl 8030d14 if (flags & TCP_ACK && ackno == pcb->snd_nxt) { 80317e0: 4b71 ldr r3, [pc, #452] ; (80319a8 ) 80317e2: 781b ldrb r3, [r3, #0] 80317e4: f003 0310 and.w r3, r3, #16 80317e8: b2db uxtb r3, r3 80317ea: 2b00 cmp r3, #0 80317ec: f000 8119 beq.w 8031a22 80317f0: 4b6a ldr r3, [pc, #424] ; (803199c ) 80317f2: 681a ldr r2, [r3, #0] 80317f4: 6d23 ldr r3, [r4, #80] ; 0x50 80317f6: 429a cmp r2, r3 80317f8: f040 8113 bne.w 8031a22 LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: CLOSING %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); tcp_pcb_purge(pcb); 80317fc: 4620 mov r0, r4 80317fe: f7fe fddb bl 80303b8 TCP_RMV_ACTIVE(pcb); 8031802: 4a68 ldr r2, [pc, #416] ; (80319a4 ) 8031804: 6813 ldr r3, [r2, #0] 8031806: 42a3 cmp r3, r4 8031808: d101 bne.n 803180e 803180a: 68e3 ldr r3, [r4, #12] 803180c: e00c b.n 8031828 803180e: 4a62 ldr r2, [pc, #392] ; (8031998 ) 8031810: 6013 str r3, [r2, #0] 8031812: e007 b.n 8031824 8031814: 68d9 ldr r1, [r3, #12] 8031816: 42a1 cmp r1, r4 8031818: d103 bne.n 8031822 803181a: 6013 str r3, [r2, #0] 803181c: 68e2 ldr r2, [r4, #12] 803181e: 60da str r2, [r3, #12] 8031820: e003 b.n 803182a 8031822: 460b mov r3, r1 8031824: 2b00 cmp r3, #0 8031826: d1f5 bne.n 8031814 8031828: 6013 str r3, [r2, #0] 803182a: 4b60 ldr r3, [pc, #384] ; (80319ac ) 803182c: 2201 movs r2, #1 803182e: 701a strb r2, [r3, #0] pcb->state = TIME_WAIT; 8031830: 230a movs r3, #10 8031832: 7623 strb r3, [r4, #24] TCP_REG(&tcp_tw_pcbs, pcb); 8031834: 4b5e ldr r3, [pc, #376] ; (80319b0 ) 8031836: 681a ldr r2, [r3, #0] 8031838: 601c str r4, [r3, #0] 803183a: 60e2 str r2, [r4, #12] 803183c: f000 fe82 bl 8032544 8031840: e0ef b.n 8031a22 } break; case LAST_ACK: tcp_receive(pcb); 8031842: 4620 mov r0, r4 8031844: f7ff fa66 bl 8030d14 if (flags & TCP_ACK && ackno == pcb->snd_nxt) { 8031848: 4b57 ldr r3, [pc, #348] ; (80319a8 ) 803184a: 781b ldrb r3, [r3, #0] 803184c: f003 0310 and.w r3, r3, #16 8031850: b2db uxtb r3, r3 8031852: 2b00 cmp r3, #0 8031854: f000 80e5 beq.w 8031a22 8031858: 4b50 ldr r3, [pc, #320] ; (803199c ) 803185a: 681a ldr r2, [r3, #0] 803185c: 6d23 ldr r3, [r4, #80] ; 0x50 803185e: 429a cmp r2, r3 8031860: f040 80df bne.w 8031a22 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; 8031864: 4b4e ldr r3, [pc, #312] ; (80319a0 ) 8031866: 781a ldrb r2, [r3, #0] 8031868: f042 0210 orr.w r2, r2, #16 803186c: 701a strb r2, [r3, #0] 803186e: e0d8 b.n 8031a22 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); 8031870: f8d4 3088 ldr.w r3, [r4, #136] ; 0x88 8031874: b19b cbz r3, 803189e 8031876: 6920 ldr r0, [r4, #16] 8031878: f06f 010a mvn.w r1, #10 803187c: e00e b.n 803189c tcp_pcb_remove(&tcp_active_pcbs, pcb); memp_free(MEMP_TCP_PCB, pcb); } else if (recv_flags & TF_CLOSED) { 803187e: f003 0310 and.w r3, r3, #16 8031882: b2db uxtb r3, r3 8031884: b1a3 cbz r3, 80318b0 /* The connection has been closed and we will deallocate the PCB. */ if (!(pcb->flags & TF_RXCLOSED)) { 8031886: 7fa3 ldrb r3, [r4, #30] 8031888: f003 0310 and.w r3, r3, #16 803188c: b2db uxtb r3, r3 803188e: b933 cbnz r3, 803189e /* 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); 8031890: f8d4 3088 ldr.w r3, [r4, #136] ; 0x88 8031894: b11b cbz r3, 803189e 8031896: 6920 ldr r0, [r4, #16] 8031898: f06f 010b mvn.w r1, #11 803189c: 4798 blx r3 } tcp_pcb_remove(&tcp_active_pcbs, pcb); 803189e: 4621 mov r1, r4 80318a0: 4840 ldr r0, [pc, #256] ; (80319a4 ) 80318a2: f7fe fef1 bl 8030688 memp_free(MEMP_TCP_PCB, pcb); 80318a6: 2002 movs r0, #2 80318a8: 4621 mov r1, r4 80318aa: f7fe f925 bl 802faf8 80318ae: e050 b.n 8031952 } 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) { 80318b0: f8b4 2064 ldrh.w r2, [r4, #100] ; 0x64 80318b4: b91a cbnz r2, 80318be if (err == ERR_ABRT) { goto aborted; } } if (recv_data != NULL) { 80318b6: 4b3f ldr r3, [pc, #252] ; (80319b4 ) 80318b8: 681a ldr r2, [r3, #0] 80318ba: b94a cbnz r2, 80318d0 80318bc: e026 b.n 803190c 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); 80318be: 6fa3 ldr r3, [r4, #120] ; 0x78 80318c0: 2b00 cmp r3, #0 80318c2: d0f8 beq.n 80318b6 80318c4: 6920 ldr r0, [r4, #16] 80318c6: 4621 mov r1, r4 80318c8: 4798 blx r3 if (err == ERR_ABRT) { 80318ca: 300a adds r0, #10 80318cc: d1f3 bne.n 80318b6 80318ce: e040 b.n 8031952 } } if (recv_data != NULL) { LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL); if (pcb->flags & TF_RXCLOSED) { 80318d0: 7fa3 ldrb r3, [r4, #30] 80318d2: f003 0310 and.w r3, r3, #16 80318d6: b2db uxtb r3, r3 80318d8: b133 cbz r3, 80318e8 /* received data although already closed -> abort (send RST) to notify the remote host that not all data has been processed */ pbuf_free(recv_data); 80318da: 4610 mov r0, r2 80318dc: f7fe fa16 bl 802fd0c tcp_abort(pcb); 80318e0: 4620 mov r0, r4 80318e2: f7fe ff45 bl 8030770 goto aborted; 80318e6: e034 b.n 8031952 } /* Notify application that data has been received. */ TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err); 80318e8: 6fe5 ldr r5, [r4, #124] ; 0x7c 80318ea: b11d cbz r5, 80318f4 80318ec: 6920 ldr r0, [r4, #16] 80318ee: 4621 mov r1, r4 80318f0: 47a8 blx r5 80318f2: e004 b.n 80318fe 80318f4: 4628 mov r0, r5 80318f6: 4621 mov r1, r4 80318f8: 462b mov r3, r5 80318fa: f7ff f81b bl 8030934 if (err == ERR_ABRT) { 80318fe: b243 sxtb r3, r0 8031900: 330a adds r3, #10 8031902: d026 beq.n 8031952 goto aborted; } /* If the upper layer can't receive this data, store it */ if (err != ERR_OK) { 8031904: b110 cbz r0, 803190c pcb->refused_data = recv_data; 8031906: 4b2b ldr r3, [pc, #172] ; (80319b4 ) 8031908: 681b ldr r3, [r3, #0] 803190a: 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) { 803190c: 4b24 ldr r3, [pc, #144] ; (80319a0 ) 803190e: 781b ldrb r3, [r3, #0] 8031910: f003 0320 and.w r3, r3, #32 8031914: b2db uxtb r3, r3 8031916: b1b3 cbz r3, 8031946 if (pcb->refused_data != NULL) { 8031918: 6f63 ldr r3, [r4, #116] ; 0x74 803191a: b123 cbz r3, 8031926 /* Delay this if we have refused data. */ pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN; 803191c: 7b5a ldrb r2, [r3, #13] 803191e: f042 0220 orr.w r2, r2, #32 8031922: 735a strb r2, [r3, #13] 8031924: e00f b.n 8031946 } else { /* correct rcv_wnd as the application won't call tcp_recved() for the FIN's seqno */ if (pcb->rcv_wnd != TCP_WND) { 8031926: 8da3 ldrh r3, [r4, #44] ; 0x2c 8031928: f241 62d0 movw r2, #5840 ; 0x16d0 803192c: 4293 cmp r3, r2 803192e: d001 beq.n 8031934 pcb->rcv_wnd++; 8031930: 3301 adds r3, #1 8031932: 85a3 strh r3, [r4, #44] ; 0x2c } TCP_EVENT_CLOSED(pcb, err); 8031934: 6fe5 ldr r5, [r4, #124] ; 0x7c 8031936: b135 cbz r5, 8031946 8031938: 2200 movs r2, #0 803193a: 6920 ldr r0, [r4, #16] 803193c: 4621 mov r1, r4 803193e: 4613 mov r3, r2 8031940: 47a8 blx r5 if (err == ERR_ABRT) { 8031942: 300a adds r0, #10 8031944: d005 beq.n 8031952 goto aborted; } } } tcp_input_pcb = NULL; 8031946: 4b1c ldr r3, [pc, #112] ; (80319b8 ) 8031948: 2200 movs r2, #0 /* Try to send something out. */ tcp_output(pcb); 803194a: 4620 mov r0, r4 goto aborted; } } } tcp_input_pcb = NULL; 803194c: 601a str r2, [r3, #0] /* Try to send something out. */ tcp_output(pcb); 803194e: f000 fb3b bl 8031fc8 } } /* 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; 8031952: 4b19 ldr r3, [pc, #100] ; (80319b8 ) recv_data = NULL; /* give up our reference to inseg.p */ if (inseg.p != NULL) 8031954: 4d19 ldr r5, [pc, #100] ; (80319bc ) } } /* 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; 8031956: 2400 movs r4, #0 8031958: 601c str r4, [r3, #0] recv_data = NULL; /* give up our reference to inseg.p */ if (inseg.p != NULL) 803195a: 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; 803195c: 4b15 ldr r3, [pc, #84] ; (80319b4 ) 803195e: 601c str r4, [r3, #0] /* give up our reference to inseg.p */ if (inseg.p != NULL) 8031960: 2800 cmp r0, #0 8031962: d067 beq.n 8031a34 { pbuf_free(inseg.p); 8031964: f7fe f9d2 bl 802fd0c inseg.p = NULL; 8031968: 606c str r4, [r5, #4] 803196a: e063 b.n 8031a34 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); 803196c: 4b14 ldr r3, [pc, #80] ; (80319c0 ) 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, 803196e: 4a15 ldr r2, [pc, #84] ; (80319c4 ) ip_current_dest_addr(), ip_current_src_addr(), tcphdr->dest, tcphdr->src); 8031970: 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, 8031972: 8811 ldrh r1, [r2, #0] 8031974: 8858 ldrh r0, [r3, #2] 8031976: 4a14 ldr r2, [pc, #80] ; (80319c8 ) 8031978: 6812 ldr r2, [r2, #0] 803197a: 9000 str r0, [sp, #0] 803197c: 881b ldrh r3, [r3, #0] 803197e: 9301 str r3, [sp, #4] 8031980: 4b06 ldr r3, [pc, #24] ; (803199c ) 8031982: 1889 adds r1, r1, r2 8031984: 6818 ldr r0, [r3, #0] 8031986: e517 b.n 80313b8 LWIP_ASSERT("tcp_input: tcp_pcbs_sane()", tcp_pcbs_sane()); PERF_STOP("tcp_input"); return; dropped: TCP_STATS_INC(tcp.drop); snmp_inc_tcpinerrs(); 8031988: f003 f8f6 bl 8034b78 pbuf_free(p); 803198c: 4630 mov r0, r6 } 803198e: b003 add sp, #12 8031990: 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); 8031994: f7fe b9ba b.w 802fd0c 8031998: 2000f6c4 .word 0x2000f6c4 803199c: 2000c3e8 .word 0x2000c3e8 80319a0: 2000c3ed .word 0x2000c3ed 80319a4: 2000f6b8 .word 0x2000f6b8 80319a8: 2000c3ec .word 0x2000c3ec 80319ac: 2000f6b4 .word 0x2000f6b4 80319b0: 2000f6cc .word 0x2000f6cc 80319b4: 2000c3f0 .word 0x2000c3f0 80319b8: 2000f6d0 .word 0x2000f6d0 80319bc: 2000c3f8 .word 0x2000c3f8 80319c0: 2000c3dc .word 0x2000c3dc 80319c4: 2000c3e4 .word 0x2000c3e4 80319c8: 2000c3e0 .word 0x2000c3e0 } 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) { 80319cc: 4b1b ldr r3, [pc, #108] ; (8031a3c ) 80319ce: 681b ldr r3, [r3, #0] 80319d0: e4bf b.n 8031352 tcp_debug_print_state(pcb->state); #endif /* TCP_DEBUG */ #endif /* TCP_INPUT_DEBUG */ /* Set up a tcp_seg structure. */ inseg.next = NULL; 80319d2: 4b1b ldr r3, [pc, #108] ; (8031a40 ) 80319d4: 2100 movs r1, #0 80319d6: 6019 str r1, [r3, #0] inseg.len = p->tot_len; 80319d8: f8a3 8008 strh.w r8, [r3, #8] inseg.p = p; 80319dc: 605e str r6, [r3, #4] inseg.tcphdr = tcphdr; 80319de: 60df str r7, [r3, #12] recv_data = NULL; 80319e0: 4b18 ldr r3, [pc, #96] ; (8031a44 ) recv_flags = 0; if (flags & TCP_PSH) { 80319e2: f002 0208 and.w r2, r2, #8 inseg.next = NULL; inseg.len = p->tot_len; inseg.p = p; inseg.tcphdr = tcphdr; recv_data = NULL; 80319e6: 6019 str r1, [r3, #0] recv_flags = 0; 80319e8: 4b17 ldr r3, [pc, #92] ; (8031a48 ) if (flags & TCP_PSH) { 80319ea: b2d2 uxtb r2, r2 inseg.len = p->tot_len; inseg.p = p; inseg.tcphdr = tcphdr; recv_data = NULL; recv_flags = 0; 80319ec: 7019 strb r1, [r3, #0] if (flags & TCP_PSH) { 80319ee: 2a00 cmp r2, #0 80319f0: f47f ad52 bne.w 8031498 80319f4: e554 b.n 80314a0 #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) { 80319f6: 2b00 cmp r3, #0 80319f8: f47f acc4 bne.w 8031384 80319fc: e4c7 b.n 803138e } 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)) { 80319fe: 89b8 ldrh r0, [r7, #12] 8031a00: f7fd f84b bl 802ea9a 8031a04: f000 0004 and.w r0, r0, #4 8031a08: b280 uxth r0, r0 8031a0a: 2800 cmp r0, #0 8031a0c: d1be bne.n 803198c 8031a0e: e7ad b.n 803196c } 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; 8031a10: 4b0d ldr r3, [pc, #52] ; (8031a48 ) 8031a12: 781a ldrb r2, [r3, #0] 8031a14: f042 0208 orr.w r2, r2, #8 8031a18: 701a strb r2, [r3, #0] pcb->flags &= ~TF_ACK_DELAY; 8031a1a: 7fa3 ldrb r3, [r4, #30] 8031a1c: f023 0301 bic.w r3, r3, #1 8031a20: 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) { 8031a22: 4b09 ldr r3, [pc, #36] ; (8031a48 ) 8031a24: 781b ldrb r3, [r3, #0] 8031a26: f003 0208 and.w r2, r3, #8 8031a2a: b2d2 uxtb r2, r2 8031a2c: 2a00 cmp r2, #0 8031a2e: f47f af1f bne.w 8031870 8031a32: e724 b.n 803187e return; dropped: TCP_STATS_INC(tcp.drop); snmp_inc_tcpinerrs(); pbuf_free(p); } 8031a34: b003 add sp, #12 8031a36: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8031a3a: bf00 nop 8031a3c: 2000f6cc .word 0x2000f6cc 8031a40: 2000c3f8 .word 0x2000c3f8 8031a44: 2000c3f0 .word 0x2000c3f0 8031a48: 2000c3ed .word 0x2000c3ed 08031a4c : #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) { 8031a4c: 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) { 8031a4e: 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) { 8031a50: 460c mov r4, r1 8031a52: 461e mov r6, r3 8031a54: 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) { 8031a56: d21a bcs.n 8031a8e * * Did the user set TCP_WRITE_FLAG_MORE? * * Will the Nagle algorithm defer transmission of this segment? */ if ((apiflags & TCP_WRITE_FLAG_MORE) || 8031a58: f89d 3014 ldrb.w r3, [sp, #20] 8031a5c: f003 0302 and.w r3, r3, #2 8031a60: b2db uxtb r3, r3 8031a62: b95b cbnz r3, 8031a7c (!(pcb->flags & TF_NODELAY) && 8031a64: 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) || 8031a66: f003 0340 and.w r3, r3, #64 ; 0x40 8031a6a: b2db uxtb r3, r3 8031a6c: b97b cbnz r3, 8031a8e (!(pcb->flags & TF_NODELAY) && 8031a6e: f89d 3018 ldrb.w r3, [sp, #24] 8031a72: b11b cbz r3, 8031a7c (!first_seg || 8031a74: 6ee9 ldr r1, [r5, #108] ; 0x6c 8031a76: b909 cbnz r1, 8031a7c pcb->unsent != NULL || 8031a78: 6f2b ldr r3, [r5, #112] ; 0x70 8031a7a: b143 cbz r3, 8031a8e pcb->unacked != NULL))) { alloc = LWIP_MIN(max_length, LWIP_MEM_ALIGN_SIZE(length + TCP_OVERSIZE)); 8031a7c: f204 51b7 addw r1, r4, #1463 ; 0x5b7 8031a80: f021 0103 bic.w r1, r1, #3 8031a84: 4291 cmp r1, r2 8031a86: bfa8 it ge 8031a88: 4611 movge r1, r2 8031a8a: b289 uxth r1, r1 8031a8c: e000 b.n 8031a90 * Will the Nagle algorithm defer transmission of this segment? */ if ((apiflags & TCP_WRITE_FLAG_MORE) || (!(pcb->flags & TF_NODELAY) && (!first_seg || pcb->unsent != NULL || 8031a8e: 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); 8031a90: 2200 movs r2, #0 8031a92: f7fe f988 bl 802fda6 if (p == NULL) { 8031a96: b120 cbz r0, 8031aa2 return NULL; } LWIP_ASSERT("need unchained pbuf", p->next == NULL); *oversize = p->len - length; 8031a98: 8943 ldrh r3, [r0, #10] 8031a9a: 1b1b subs r3, r3, r4 8031a9c: 8033 strh r3, [r6, #0] /* trim p->len to the currently used size */ p->len = p->tot_len = length; 8031a9e: 8104 strh r4, [r0, #8] 8031aa0: 8144 strh r4, [r0, #10] return p; } 8031aa2: bd70 pop {r4, r5, r6, pc} 08031aa4 : * 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) { 8031aa4: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8031aa8: f89d 6020 ldrb.w r6, [sp, #32] struct tcp_seg *seg; u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); 8031aac: f006 0702 and.w r7, r6, #2 8031ab0: f016 0f01 tst.w r6, #1 8031ab4: 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) { 8031ab6: 4680 mov r8, r0 8031ab8: 469a mov sl, r3 struct tcp_seg *seg; u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); 8031aba: bf0c ite eq 8031abc: 2300 moveq r3, #0 8031abe: 2304 movne r3, #4 8031ac0: 2f00 cmp r7, #0 8031ac2: bf14 ite ne 8031ac4: 270c movne r7, #12 8031ac6: 2700 moveq r7, #0 if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { 8031ac8: 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) { 8031aca: 460d mov r5, r1 8031acc: 4691 mov r9, r2 struct tcp_seg *seg; u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); 8031ace: 18ff adds r7, r7, r3 if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { 8031ad0: f7fd fffc bl 802facc 8031ad4: 4604 mov r4, r0 8031ad6: b918 cbnz r0, 8031ae0 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_create_segment: no memory.\n")); pbuf_free(p); 8031ad8: 4628 mov r0, r5 8031ada: f7fe f917 bl 802fd0c return NULL; 8031ade: e030 b.n 8031b42 } seg->flags = optflags; 8031ae0: 7286 strb r6, [r0, #10] seg->next = NULL; seg->p = p; seg->len = p->tot_len - optlen; 8031ae2: 892b ldrh r3, [r5, #8] pbuf_free(p); return NULL; } seg->flags = optflags; seg->next = NULL; seg->p = p; 8031ae4: 6045 str r5, [r0, #4] seg->len = p->tot_len - optlen; 8031ae6: 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; 8031ae8: 2600 movs r6, #0 8031aea: 6006 str r6, [r0, #0] seg->p = p; seg->len = p->tot_len - optlen; 8031aec: 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)) { 8031aee: 2114 movs r1, #20 8031af0: 4628 mov r0, r5 8031af2: f7fe f8e0 bl 802fcb6 8031af6: 4605 mov r5, r0 8031af8: b120 cbz r0, 8031b04 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); 8031afa: 4620 mov r0, r4 8031afc: f7fe fc35 bl 803036a return NULL; 8031b00: 4634 mov r4, r6 8031b02: e01e b.n 8031b42 } seg->tcphdr = (struct tcp_hdr *)seg->p->payload; 8031b04: 6863 ldr r3, [r4, #4] seg->tcphdr->src = htons(pcb->local_port); 8031b06: 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; 8031b0a: 685e ldr r6, [r3, #4] 8031b0c: 60e6 str r6, [r4, #12] seg->tcphdr->src = htons(pcb->local_port); 8031b0e: f7fc ffbf bl 802ea90 8031b12: 8030 strh r0, [r6, #0] seg->tcphdr->dest = htons(pcb->remote_port); 8031b14: f8b8 001c ldrh.w r0, [r8, #28] 8031b18: 68e6 ldr r6, [r4, #12] 8031b1a: f7fc ffb9 bl 802ea90 8031b1e: 8070 strh r0, [r6, #2] seg->tcphdr->seqno = htonl(seqno); 8031b20: 4650 mov r0, sl 8031b22: 68e6 ldr r6, [r4, #12] 8031b24: f7fc ffbe bl 802eaa4 /* ackno is set in tcp_output */ TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), flags); 8031b28: 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); 8031b2a: 6070 str r0, [r6, #4] /* ackno is set in tcp_output */ TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), flags); 8031b2c: f507 40a0 add.w r0, r7, #20480 ; 0x5000 8031b30: ea40 0009 orr.w r0, r0, r9 8031b34: 68e6 ldr r6, [r4, #12] 8031b36: f7fc ffab bl 802ea90 8031b3a: 81b0 strh r0, [r6, #12] /* wnd and chksum are set in tcp_output */ seg->tcphdr->urgp = 0; 8031b3c: 68e3 ldr r3, [r4, #12] 8031b3e: 749d strb r5, [r3, #18] 8031b40: 74dd strb r5, [r3, #19] return seg; } 8031b42: 4620 mov r0, r4 8031b44: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 08031b48 : 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); 8031b48: 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, 8031b4a: 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); 8031b4c: 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, 8031b4e: 4605 mov r5, r0 8031b50: 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); 8031b52: 2001 movs r0, #1 8031b54: 2200 movs r2, #0 8031b56: f7fe f926 bl 802fda6 if (p != NULL) { 8031b5a: 4606 mov r6, r0 8031b5c: b1f8 cbz r0, 8031b9e LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", (p->len >= TCP_HLEN + optlen)); tcphdr = (struct tcp_hdr *)p->payload; 8031b5e: 6844 ldr r4, [r0, #4] tcphdr->src = htons(pcb->local_port); 8031b60: 8b68 ldrh r0, [r5, #26] 8031b62: f7fc ff95 bl 802ea90 8031b66: 8020 strh r0, [r4, #0] tcphdr->dest = htons(pcb->remote_port); 8031b68: 8ba8 ldrh r0, [r5, #28] 8031b6a: f7fc ff91 bl 802ea90 tcphdr->seqno = seqno_be; 8031b6e: 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); 8031b70: 8060 strh r0, [r4, #2] tcphdr->seqno = seqno_be; tcphdr->ackno = htonl(pcb->rcv_nxt); 8031b72: 6aa8 ldr r0, [r5, #40] ; 0x28 8031b74: f7fc ff96 bl 802eaa4 8031b78: 60a0 str r0, [r4, #8] TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), TCP_ACK); 8031b7a: f245 0010 movw r0, #20496 ; 0x5010 8031b7e: f7fc ff87 bl 802ea90 8031b82: 81a0 strh r0, [r4, #12] tcphdr->wnd = htons(pcb->rcv_ann_wnd); 8031b84: 8de8 ldrh r0, [r5, #46] ; 0x2e 8031b86: f7fc ff83 bl 802ea90 tcphdr->chksum = 0; 8031b8a: 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); 8031b8c: 81e0 strh r0, [r4, #14] tcphdr->chksum = 0; 8031b8e: 7423 strb r3, [r4, #16] 8031b90: 7463 strb r3, [r4, #17] tcphdr->urgp = 0; 8031b92: 74a3 strb r3, [r4, #18] 8031b94: 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; 8031b96: 8dea ldrh r2, [r5, #46] ; 0x2e 8031b98: 6aab ldr r3, [r5, #40] ; 0x28 8031b9a: 18d3 adds r3, r2, r3 8031b9c: 632b str r3, [r5, #48] ; 0x30 } return p; } 8031b9e: 4630 mov r0, r6 8031ba0: bdf8 pop {r3, r4, r5, r6, r7, pc} 08031ba2 : * - 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) { 8031ba2: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8031ba6: b08f sub sp, #60 ; 0x3c 8031ba8: 4691 mov r9, r2 8031baa: 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; 8031bac: 2300 movs r3, #0 8031bae: 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) { 8031bb2: 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); 8031bb4: f8b0 2062 ldrh.w r2, [r0, #98] ; 0x62 8031bb8: 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)", 8031bba: 9106 str r1, [sp, #24] 8031bbc: 2900 cmp r1, #0 8031bbe: f000 8168 beq.w 8031e92 8031bc2: 7e01 ldrb r1, [r0, #24] 8031bc4: 2907 cmp r1, #7 8031bc6: f200 8166 bhi.w 8031e96 8031bca: f990 1018 ldrsb.w r1, [r0, #24] 8031bce: f04f 5064 mov.w r0, #956301312 ; 0x39000000 8031bd2: 4088 lsls r0, r1 8031bd4: f140 815f bpl.w 8031e96 (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) { 8031bd8: f1b9 0f00 cmp.w r9, #0 8031bdc: d00d beq.n 8031bfa return ERR_OK; } /* fail on too much data */ if (len > pcb->snd_buf) { 8031bde: f8b4 1066 ldrh.w r1, [r4, #102] ; 0x66 8031be2: 4549 cmp r1, r9 8031be4: d200 bcs.n 8031be8 8031be6: e003 b.n 8031bf0 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)) { 8031be8: f8b4 1068 ldrh.w r1, [r4, #104] ; 0x68 8031bec: 2947 cmp r1, #71 ; 0x47 8031bee: d904 bls.n 8031bfa 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; 8031bf0: 7fa3 ldrb r3, [r4, #30] 8031bf2: f063 037f orn r3, r3, #127 ; 0x7f 8031bf6: 77a3 strb r3, [r4, #30] 8031bf8: e151 b.n 8031e9e 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); 8031bfa: 0852 lsrs r2, r2, #1 * * pos records progress as data is segmented. */ /* Find the tail of the unsent queue. */ if (pcb->unsent != NULL) { 8031bfc: 6ee6 ldr r6, [r4, #108] ; 0x6c err = tcp_write_checks(pcb, len); if (err != ERR_OK) { return err; } queuelen = pcb->snd_queuelen; 8031bfe: 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); 8031c02: 429a cmp r2, r3 8031c04: bf28 it cs 8031c06: 461a movcs r2, r3 8031c08: 920a str r2, [sp, #40] ; 0x28 * * pos records progress as data is segmented. */ /* Find the tail of the unsent queue. */ if (pcb->unsent != NULL) { 8031c0a: b90e cbnz r6, 8031c10 8031c0c: e066 b.n 8031cdc 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); 8031c0e: 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; 8031c10: 6833 ldr r3, [r6, #0] 8031c12: 2b00 cmp r3, #0 8031c14: d1fb bne.n 8031c0e last_unsent = last_unsent->next); /* Usable space at the end of the last unsent segment */ unsent_optlen = LWIP_TCP_OPT_LENGTH(last_unsent->flags); 8031c16: 7ab3 ldrb r3, [r6, #10] space = mss_local - (last_unsent->len + unsent_optlen); 8031c18: 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); 8031c1a: 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; 8031c1c: 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); 8031c20: f013 0f01 tst.w r3, #1 8031c24: f003 0302 and.w r3, r3, #2 8031c28: bf0c ite eq 8031c2a: 2100 moveq r1, #0 8031c2c: 2104 movne r1, #4 8031c2e: b2db uxtb r3, r3 8031c30: 1bc2 subs r2, r0, r7 8031c32: 2b00 cmp r3, #0 8031c34: bf14 ite ne 8031c36: 230c movne r3, #12 8031c38: 2300 moveq r3, #0 space = mss_local - (last_unsent->len + unsent_optlen); 8031c3a: 1a52 subs r2, r2, r1 8031c3c: 1ad2 subs r2, r2, r3 8031c3e: 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) { 8031c40: b91d cbnz r5, 8031c4a #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; 8031c42: 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; 8031c46: 462b mov r3, r5 8031c48: e00a b.n 8031c60 #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; 8031c4a: 45a9 cmp r9, r5 8031c4c: bf34 ite cc 8031c4e: 464b movcc r3, r9 8031c50: 462b movcs r3, r5 pos += oversize_used; oversize -= oversize_used; 8031c52: 1aed subs r5, r5, r3 space -= oversize_used; 8031c54: 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; 8031c56: f8ad 5036 strh.w r5, [sp, #54] ; 0x36 space -= oversize_used; 8031c5a: 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; 8031c5c: 461d mov r5, r3 oversize -= oversize_used; space -= oversize_used; 8031c5e: 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)) { 8031c60: 454d cmp r5, r9 8031c62: d23f bcs.n 8031ce4 8031c64: 2a00 cmp r2, #0 8031c66: d03d beq.n 8031ce4 8031c68: 2f00 cmp r7, #0 8031c6a: d03e beq.n 8031cea 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) { 8031c6c: 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; 8031c6e: ebc5 0a09 rsb sl, r5, r9 8031c72: 4592 cmp sl, r2 8031c74: bfa8 it ge 8031c76: 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) { 8031c78: 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; 8031c7a: 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) { 8031c7e: d514 bpl.n 8031caa /* Data is copied */ if ((concat_p = tcp_pbuf_prealloc(PBUF_RAW, seglen, space, &oversize, pcb, apiflags, 1)) == NULL) { 8031c80: 2301 movs r3, #1 8031c82: 9101 str r1, [sp, #4] 8031c84: 9302 str r3, [sp, #8] 8031c86: 9400 str r4, [sp, #0] 8031c88: 2003 movs r0, #3 8031c8a: 4641 mov r1, r8 8031c8c: f10d 0336 add.w r3, sp, #54 ; 0x36 8031c90: f7ff fedc bl 8031a4c 8031c94: 4607 mov r7, r0 8031c96: 2800 cmp r0, #0 8031c98: f000 80e9 beq.w 8031e6e 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); 8031c9c: 9a06 ldr r2, [sp, #24] 8031c9e: 6840 ldr r0, [r0, #4] 8031ca0: 1951 adds r1, r2, r5 8031ca2: 4642 mov r2, r8 8031ca4: f7ef fe72 bl 802198c 8031ca8: e00b b.n 8031cc2 #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) { 8031caa: 2003 movs r0, #3 8031cac: 4641 mov r1, r8 8031cae: 2201 movs r2, #1 8031cb0: f7fe f879 bl 802fda6 8031cb4: 4607 mov r7, r0 8031cb6: 2800 cmp r0, #0 8031cb8: f000 80d9 beq.w 8031e6e 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; 8031cbc: 9806 ldr r0, [sp, #24] 8031cbe: 1943 adds r3, r0, r5 8031cc0: 607b str r3, [r7, #4] } pos += seglen; queuelen += pbuf_clen(concat_p); 8031cc2: 4638 mov r0, r7 8031cc4: f7fe f8f6 bl 802feb4 #endif /* TCP_CHECKSUM_ON_COPY */ /* reference the non-volatile payload data */ concat_p->payload = (u8_t*)arg + pos; } pos += seglen; 8031cc8: 44a8 add r8, r5 8031cca: fa1f f888 uxth.w r8, r8 queuelen += pbuf_clen(concat_p); 8031cce: 4458 add r0, fp 8031cd0: 46aa mov sl, r5 8031cd2: 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; 8031cd6: 4645 mov r5, r8 queuelen += pbuf_clen(concat_p); 8031cd8: 4633 mov r3, r6 8031cda: e007 b.n 8031cec u16_t queuelen; u8_t optlen = 0; u8_t optflags = 0; #if TCP_OVERSIZE u16_t oversize = 0; u16_t oversize_used = 0; 8031cdc: 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 */ 8031cde: 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; 8031ce0: 4633 mov r3, r6 8031ce2: e000 b.n 8031ce6 * * 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)) { 8031ce4: 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; 8031ce6: 2700 movs r7, #0 8031ce8: e000 b.n 8031cec * * 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)) { 8031cea: 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) { 8031cec: 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) { 8031cee: 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) { 8031cf2: 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) { 8031cf6: 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) { 8031cfa: 9108 str r1, [sp, #32] 8031cfc: e068 b.n 8031dd0 * 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; 8031cfe: ebc5 0309 rsb r3, r5, r9 u16_t max_len = mss_local - optlen; u16_t seglen = left > max_len ? max_len : left; 8031d02: 9a0a ldr r2, [sp, #40] ; 0x28 8031d04: b29b uxth r3, r3 8031d06: 4293 cmp r3, r2 8031d08: bf38 it cc 8031d0a: 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) { 8031d0c: 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; 8031d0e: 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) { 8031d10: b1db cbz r3, 8031d4a /* 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) { 8031d12: f1d8 0301 rsbs r3, r8, #1 8031d16: 9807 ldr r0, [sp, #28] 8031d18: 9400 str r4, [sp, #0] 8031d1a: bf38 it cc 8031d1c: 2300 movcc r3, #0 8031d1e: 9001 str r0, [sp, #4] 8031d20: 9302 str r3, [sp, #8] 8031d22: 4611 mov r1, r2 8031d24: 2000 movs r0, #0 8031d26: 9a0a ldr r2, [sp, #40] ; 0x28 8031d28: f10d 0336 add.w r3, sp, #54 ; 0x36 8031d2c: f7ff fe8e bl 8031a4c 8031d30: 4684 mov ip, r0 8031d32: 2800 cmp r0, #0 8031d34: f000 809e beq.w 8031e74 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); 8031d38: 9a06 ldr r2, [sp, #24] 8031d3a: 6840 ldr r0, [r0, #4] 8031d3c: f8cd c014 str.w ip, [sp, #20] 8031d40: 1951 adds r1, r2, r5 8031d42: 9a09 ldr r2, [sp, #36] ; 0x24 8031d44: f7ef fe22 bl 802198c 8031d48: e019 b.n 8031d7e */ 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) { 8031d4a: 9808 ldr r0, [sp, #32] 8031d4c: 9909 ldr r1, [sp, #36] ; 0x24 8031d4e: 2201 movs r2, #1 8031d50: f7fe f829 bl 802fda6 8031d54: 4603 mov r3, r0 8031d56: 2800 cmp r0, #0 8031d58: f000 808c beq.w 8031e74 #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; 8031d5c: 9806 ldr r0, [sp, #24] 8031d5e: 1942 adds r2, r0, r5 /* Second, allocate a pbuf for the headers. */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 8031d60: 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; 8031d62: 605a str r2, [r3, #4] /* Second, allocate a pbuf for the headers. */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 8031d64: 4601 mov r1, r0 8031d66: 4602 mov r2, r0 8031d68: 9305 str r3, [sp, #20] 8031d6a: f7fe f81c bl 802fda6 8031d6e: 9b05 ldr r3, [sp, #20] 8031d70: b908 cbnz r0, 8031d76 /* If allocation fails, we have to deallocate the data pbuf as * well. */ pbuf_free(p2); 8031d72: 4618 mov r0, r3 8031d74: e013 b.n 8031d9e 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*/); 8031d76: 4619 mov r1, r3 8031d78: 9005 str r0, [sp, #20] 8031d7a: f7fe f8b1 bl 802fee0 8031d7e: f8dd c014 ldr.w ip, [sp, #20] } queuelen += pbuf_clen(p); 8031d82: 4660 mov r0, ip 8031d84: f8cd c014 str.w ip, [sp, #20] 8031d88: f7fe f894 bl 802feb4 8031d8c: 4458 add r0, fp 8031d8e: 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)) { 8031d92: f1bb 0f48 cmp.w fp, #72 ; 0x48 8031d96: f8dd c014 ldr.w ip, [sp, #20] 8031d9a: d903 bls.n 8031da4 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_write: queue too long %"U16_F" (%"U16_F")\n", queuelen, TCP_SND_QUEUELEN)); pbuf_free(p); 8031d9c: 4660 mov r0, ip 8031d9e: f7fd ffb5 bl 802fd0c goto memerr; 8031da2: e067 b.n 8031e74 } if ((seg = tcp_create_segment(pcb, p, 0, pcb->snd_lbb + pos, optflags)) == NULL) { 8031da4: 6de3 ldr r3, [r4, #92] ; 0x5c 8031da6: 2200 movs r2, #0 8031da8: 18eb adds r3, r5, r3 8031daa: 9200 str r2, [sp, #0] 8031dac: 4620 mov r0, r4 8031dae: 4661 mov r1, ip 8031db0: f7ff fe78 bl 8031aa4 8031db4: 4603 mov r3, r0 8031db6: 2800 cmp r0, #0 8031db8: d05c beq.n 8031e74 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) { 8031dba: f1b8 0f00 cmp.w r8, #0 8031dbe: d002 beq.n 8031dc6 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; 8031dc0: 990b ldr r1, [sp, #44] ; 0x2c 8031dc2: 6008 str r0, [r1, #0] 8031dc4: e000 b.n 8031dc8 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) { 8031dc6: 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; 8031dc8: 9a09 ldr r2, [sp, #36] ; 0x24 8031dca: 930b str r3, [sp, #44] ; 0x2c 8031dcc: 1955 adds r5, r2, r5 8031dce: 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) { 8031dd0: 454d cmp r5, r9 8031dd2: d394 bcc.n 8031cfe /* * 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) { 8031dd4: f1ba 0f00 cmp.w sl, #0 8031dd8: d019 beq.n 8031e0e struct pbuf *p; /* Bump tot_len of whole chain, len of tail */ for (p = last_unsent->p; p; p = p->next) { 8031dda: 6875 ldr r5, [r6, #4] 8031ddc: e011 b.n 8031e02 p->tot_len += oversize_used; 8031dde: 892a ldrh r2, [r5, #8] 8031de0: 4452 add r2, sl 8031de2: 812a strh r2, [r5, #8] if (p->next == NULL) { 8031de4: 682a ldr r2, [r5, #0] 8031de6: b95a cbnz r2, 8031e00 TCP_DATA_COPY((char *)p->payload + p->len, arg, oversize_used, last_unsent); 8031de8: 686a ldr r2, [r5, #4] 8031dea: 8968 ldrh r0, [r5, #10] 8031dec: 9906 ldr r1, [sp, #24] 8031dee: 9305 str r3, [sp, #20] 8031df0: 1810 adds r0, r2, r0 8031df2: 4652 mov r2, sl 8031df4: f7ef fdca bl 802198c p->len += oversize_used; 8031df8: 896a ldrh r2, [r5, #10] 8031dfa: 9b05 ldr r3, [sp, #20] 8031dfc: 4452 add r2, sl 8031dfe: 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) { 8031e00: 682d ldr r5, [r5, #0] 8031e02: 2d00 cmp r5, #0 8031e04: d1eb bne.n 8031dde 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; 8031e06: 8932 ldrh r2, [r6, #8] 8031e08: 4492 add sl, r2 8031e0a: 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; 8031e0e: f8bd 2036 ldrh.w r2, [sp, #54] ; 0x36 8031e12: 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) { 8031e16: b157 cbz r7, 8031e2e LWIP_ASSERT("tcp_write: cannot concatenate when pcb->unsent is empty", (last_unsent != NULL)); pbuf_cat(last_unsent->p, concat_p); 8031e18: 6870 ldr r0, [r6, #4] 8031e1a: 9305 str r3, [sp, #20] 8031e1c: 4639 mov r1, r7 8031e1e: f7fe f85f bl 802fee0 last_unsent->len += concat_p->tot_len; 8031e22: 8939 ldrh r1, [r7, #8] 8031e24: 8932 ldrh r2, [r6, #8] 8031e26: 9b05 ldr r3, [sp, #20] 8031e28: 188a adds r2, r1, r2 8031e2a: 8132 strh r2, [r6, #8] 8031e2c: e003 b.n 8031e36 /* * Phase 3: Append queue to pcb->unsent. Queue may be NULL, but that * is harmless */ if (last_unsent == NULL) { 8031e2e: b916 cbnz r6, 8031e36 pcb->unsent = queue; 8031e30: f8c4 806c str.w r8, [r4, #108] ; 0x6c 8031e34: e001 b.n 8031e3a } else { last_unsent->next = queue; 8031e36: f8c6 8000 str.w r8, [r6] } /* * Finally update the pcb state. */ pcb->snd_lbb += len; 8031e3a: 6de2 ldr r2, [r4, #92] ; 0x5c pcb->snd_buf -= len; pcb->snd_queuelen = queuelen; 8031e3c: f8a4 b068 strh.w fp, [r4, #104] ; 0x68 } /* * Finally update the pcb state. */ pcb->snd_lbb += len; 8031e40: 444a add r2, r9 8031e42: 65e2 str r2, [r4, #92] ; 0x5c pcb->snd_buf -= len; 8031e44: f8b4 2066 ldrh.w r2, [r4, #102] ; 0x66 8031e48: ebc9 0902 rsb r9, r9, r2 8031e4c: 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)) { 8031e50: b333 cbz r3, 8031ea0 8031e52: 68dc ldr r4, [r3, #12] 8031e54: b30c cbz r4, 8031e9a 8031e56: 9b07 ldr r3, [sp, #28] 8031e58: f003 0502 and.w r5, r3, #2 8031e5c: b2ed uxtb r5, r5 8031e5e: b9e5 cbnz r5, 8031e9a TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); 8031e60: 2008 movs r0, #8 8031e62: 89a6 ldrh r6, [r4, #12] 8031e64: f7fc fe14 bl 802ea90 8031e68: 4330 orrs r0, r6 8031e6a: 81a0 strh r0, [r4, #12] 8031e6c: e015 b.n 8031e9a */ 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; 8031e6e: f04f 0800 mov.w r8, #0 8031e72: 4647 mov r7, r8 TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); } return ERR_OK; memerr: pcb->flags |= TF_NAGLEMEMERR; 8031e74: 7fa3 ldrb r3, [r4, #30] 8031e76: f063 037f orn r3, r3, #127 ; 0x7f 8031e7a: 77a3 strb r3, [r4, #30] TCP_STATS_INC(tcp.memerr); if (concat_p != NULL) { 8031e7c: b117 cbz r7, 8031e84 pbuf_free(concat_p); 8031e7e: 4638 mov r0, r7 8031e80: f7fd ff44 bl 802fd0c } if (queue != NULL) { 8031e84: f1b8 0f00 cmp.w r8, #0 8031e88: d009 beq.n 8031e9e tcp_segs_free(queue); 8031e8a: 4640 mov r0, r8 8031e8c: f7fe fa7b bl 8030386 8031e90: e005 b.n 8031e9e 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)", 8031e92: 23f2 movs r3, #242 ; 0xf2 8031e94: e004 b.n 8031ea0 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; 8031e96: 23f3 movs r3, #243 ; 0xf3 8031e98: e002 b.n 8031ea0 /* 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; 8031e9a: 2300 movs r3, #0 8031e9c: e000 b.n 8031ea0 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; 8031e9e: 23ff movs r3, #255 ; 0xff 8031ea0: b258 sxtb r0, r3 } 8031ea2: b00f add sp, #60 ; 0x3c 8031ea4: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 08031ea8 : 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)) { 8031ea8: f8b0 3068 ldrh.w r3, [r0, #104] ; 0x68 8031eac: 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) { 8031eae: b573 push {r0, r1, r4, r5, r6, lr} 8031eb0: 4604 mov r4, r0 8031eb2: 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)) { 8031eb4: d900 bls.n 8031eb8 8031eb6: e014 b.n 8031ee2 /* 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) { 8031eb8: 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; 8031ebc: 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); 8031ec0: 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) { 8031ec2: 2b00 cmp r3, #0 8031ec4: d038 beq.n 8031f38 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) { 8031ec6: 2000 movs r0, #0 8031ec8: 4602 mov r2, r0 8031eca: f7fd ff6c bl 802fda6 8031ece: 4601 mov r1, r0 8031ed0: b900 cbnz r0, 8031ed4 8031ed2: e006 b.n 8031ee2 } 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) { 8031ed4: 9600 str r6, [sp, #0] 8031ed6: 4620 mov r0, r4 8031ed8: 462a mov r2, r5 8031eda: 6de3 ldr r3, [r4, #92] ; 0x5c 8031edc: f7ff fde2 bl 8031aa4 8031ee0: b920 cbnz r0, 8031eec pcb->flags |= TF_NAGLEMEMERR; 8031ee2: 7fa3 ldrb r3, [r4, #30] 8031ee4: f063 037f orn r3, r3, #127 ; 0x7f 8031ee8: 77a3 strb r3, [r4, #30] 8031eea: e025 b.n 8031f38 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) { 8031eec: 6ee3 ldr r3, [r4, #108] ; 0x6c 8031eee: b913 cbnz r3, 8031ef6 pcb->unsent = seg; 8031ef0: 66e0 str r0, [r4, #108] ; 0x6c 8031ef2: e004 b.n 8031efe } else { struct tcp_seg *useg; for (useg = pcb->unsent; useg->next != NULL; useg = useg->next); 8031ef4: 4613 mov r3, r2 8031ef6: 681a ldr r2, [r3, #0] 8031ef8: 2a00 cmp r2, #0 8031efa: d1fb bne.n 8031ef4 useg->next = seg; 8031efc: 6018 str r0, [r3, #0] } #if TCP_OVERSIZE /* The new unsent tail has no space */ pcb->unsent_oversize = 0; 8031efe: 2300 movs r3, #0 #endif /* TCP_OVERSIZE */ /* SYN and FIN bump the sequence number */ if ((flags & TCP_SYN) || (flags & TCP_FIN)) { 8031f00: 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; 8031f02: 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)) { 8031f06: d007 beq.n 8031f18 pcb->snd_lbb++; 8031f08: 6de3 ldr r3, [r4, #92] ; 0x5c 8031f0a: 3301 adds r3, #1 8031f0c: 65e3 str r3, [r4, #92] ; 0x5c /* optlen does not influence snd_buf */ pcb->snd_buf--; 8031f0e: f8b4 3066 ldrh.w r3, [r4, #102] ; 0x66 8031f12: 3b01 subs r3, #1 8031f14: f8a4 3066 strh.w r3, [r4, #102] ; 0x66 } if (flags & TCP_FIN) { 8031f18: 07ea lsls r2, r5, #31 8031f1a: d503 bpl.n 8031f24 pcb->flags |= TF_FIN; 8031f1c: 7fa3 ldrb r3, [r4, #30] 8031f1e: f043 0320 orr.w r3, r3, #32 8031f22: 77a3 strb r3, [r4, #30] } /* update number of segments on the queues */ pcb->snd_queuelen += pbuf_clen(seg->p); 8031f24: 6840 ldr r0, [r0, #4] 8031f26: f8b4 5068 ldrh.w r5, [r4, #104] ; 0x68 8031f2a: f7fd ffc3 bl 802feb4 8031f2e: 1940 adds r0, r0, r5 8031f30: 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; 8031f34: 2000 movs r0, #0 8031f36: e000 b.n 8031f3a * 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; 8031f38: 20ff movs r0, #255 ; 0xff LWIP_ASSERT("tcp_enqueue_flags: invalid queue length", pcb->unacked != NULL || pcb->unsent != NULL); } return ERR_OK; } 8031f3a: b240 sxtb r0, r0 8031f3c: bd7c pop {r2, r3, r4, r5, r6, pc} 08031f3e : * @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) { 8031f3e: b5f8 push {r3, r4, r5, r6, r7, lr} /* first, try to add the fin to the last unsent segment */ if (pcb->unsent != NULL) { 8031f40: 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) { 8031f42: 4605 mov r5, r0 /* first, try to add the fin to the last unsent segment */ if (pcb->unsent != NULL) { 8031f44: b90c cbnz r4, 8031f4a 8031f46: e00a b.n 8031f5e struct tcp_seg *last_unsent; for (last_unsent = pcb->unsent; last_unsent->next != NULL; last_unsent = last_unsent->next); 8031f48: 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; 8031f4a: 6823 ldr r3, [r4, #0] 8031f4c: 2b00 cmp r3, #0 8031f4e: d1fb bne.n 8031f48 last_unsent = last_unsent->next); if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) { 8031f50: 68e3 ldr r3, [r4, #12] 8031f52: 8998 ldrh r0, [r3, #12] 8031f54: f7fc fda1 bl 802ea9a 8031f58: f010 0607 ands.w r6, r0, #7 8031f5c: d005 beq.n 8031f6a pcb->flags |= TF_FIN; return ERR_OK; } } /* no data, no length, flags, copy=1, no optdata */ return tcp_enqueue_flags(pcb, TCP_FIN); 8031f5e: 4628 mov r0, r5 8031f60: 2101 movs r1, #1 } 8031f62: 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); 8031f66: f7ff bf9f b.w 8031ea8 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); 8031f6a: 68e4 ldr r4, [r4, #12] 8031f6c: 2001 movs r0, #1 8031f6e: 89a7 ldrh r7, [r4, #12] 8031f70: f7fc fd8e bl 802ea90 8031f74: 4338 orrs r0, r7 8031f76: 81a0 strh r0, [r4, #12] pcb->flags |= TF_FIN; 8031f78: 7fab ldrb r3, [r5, #30] 8031f7a: f043 0320 orr.w r3, r3, #32 8031f7e: 77ab strb r3, [r5, #30] return ERR_OK; } } /* no data, no length, flags, copy=1, no optdata */ return tcp_enqueue_flags(pcb, TCP_FIN); } 8031f80: 4630 mov r0, r6 8031f82: bdf8 pop {r3, r4, r5, r6, r7, pc} 08031f84 : * * @param pcb Protocol control block for the TCP connection to send the ACK */ err_t tcp_send_empty_ack(struct tcp_pcb *pcb) { 8031f84: b537 push {r0, r1, r2, r4, r5, lr} 8031f86: 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)); 8031f88: 6d00 ldr r0, [r0, #80] ; 0x50 8031f8a: f7fc fd8b bl 802eaa4 8031f8e: 2100 movs r1, #0 8031f90: 4602 mov r2, r0 8031f92: 4620 mov r0, r4 8031f94: f7ff fdd8 bl 8031b48 if (p == NULL) { 8031f98: 4605 mov r5, r0 8031f9a: b188 cbz r0, 8031fc0 } 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); 8031f9c: 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, 8031f9e: 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); 8031fa0: 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, 8031fa4: 9200 str r2, [sp, #0] 8031fa6: 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); 8031fa8: 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, 8031faa: 9201 str r2, [sp, #4] 8031fac: 7aa3 ldrb r3, [r4, #10] 8031fae: 4621 mov r1, r4 8031fb0: 1d22 adds r2, r4, #4 8031fb2: f001 f8ab bl 803310c IP_PROTO_TCP); #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 8031fb6: 4628 mov r0, r5 8031fb8: f7fd fea8 bl 802fd0c return ERR_OK; 8031fbc: 2000 movs r0, #0 8031fbe: e000 b.n 8031fc2 #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; 8031fc0: 20fe movs r0, #254 ; 0xfe IP_PROTO_TCP); #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); return ERR_OK; } 8031fc2: b240 sxtb r0, r0 8031fc4: bd3e pop {r1, r2, r3, r4, r5, pc} 8031fc6: 0000 movs r0, r0 08031fc8 : /* 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) { 8031fc8: 4b8f ldr r3, [pc, #572] ; (8032208 ) 8031fca: 681b ldr r3, [r3, #0] 8031fcc: 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) { 8031fce: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8031fd2: 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) { 8031fd4: f000 8113 beq.w 80321fe return ERR_OK; } wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd); 8031fd8: f8b0 304c ldrh.w r3, [r0, #76] ; 0x4c 8031fdc: f8b0 9060 ldrh.w r9, [r0, #96] ; 0x60 seg = pcb->unsent; 8031fe0: 6ec5 ldr r5, [r0, #108] ; 0x6c with. */ if (tcp_input_pcb == pcb) { return ERR_OK; } wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd); 8031fe2: 4599 cmp r9, r3 8031fe4: bf28 it cs 8031fe6: 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 && 8031fe8: 7f83 ldrb r3, [r0, #30] 8031fea: f003 0302 and.w r3, r3, #2 8031fee: b2db uxtb r3, r3 8031ff0: b183 cbz r3, 8032014 8031ff2: b92d cbnz r5, 8032000 (seg == NULL || ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd)) { return tcp_send_empty_ack(pcb); 8031ff4: 4620 mov r0, r4 } #endif /* TCP_OVERSIZE */ pcb->flags &= ~TF_NAGLEMEMERR; return ERR_OK; } 8031ff6: b003 add sp, #12 8031ff8: 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); 8031ffc: f7ff bfc2 b.w 8031f84 * * 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)) { 8032000: 68eb ldr r3, [r5, #12] 8032002: 6858 ldr r0, [r3, #4] 8032004: f7fc fd50 bl 802eaa8 8032008: 892a ldrh r2, [r5, #8] 803200a: 6ca3 ldr r3, [r4, #72] ; 0x48 803200c: 1ad3 subs r3, r2, r3 803200e: 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 || 8032010: 4548 cmp r0, r9 8032012: d8ef bhi.n 8031ff4 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; 8032014: 6f26 ldr r6, [r4, #112] ; 0x70 if (useg != NULL) { 8032016: b90e cbnz r6, 803201c 8032018: e0d1 b.n 80321be for (; useg->next != NULL; useg = useg->next); 803201a: 461e mov r6, r3 803201c: 6833 ldr r3, [r6, #0] 803201e: 2b00 cmp r3, #0 8032020: d1fb bne.n 803201a 8032022: e0cc b.n 80321be } #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!", 8032024: 68eb ldr r3, [r5, #12] 8032026: 8998 ldrh r0, [r3, #12] 8032028: f7fc fd37 bl 802ea9a * - 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) && 803202c: 6f23 ldr r3, [r4, #112] ; 0x70 803202e: b19b cbz r3, 8032058 8032030: 7fa2 ldrb r2, [r4, #30] 8032032: f012 0f44 tst.w r2, #68 ; 0x44 8032036: d10f bne.n 8032058 8032038: 6ee3 ldr r3, [r4, #108] ; 0x6c 803203a: b12b cbz r3, 8032048 803203c: 6819 ldr r1, [r3, #0] 803203e: b959 cbnz r1, 8032058 8032040: 8919 ldrh r1, [r3, #8] 8032042: 8ee3 ldrh r3, [r4, #54] ; 0x36 8032044: 4299 cmp r1, r3 8032046: d207 bcs.n 8032058 8032048: f8b4 3066 ldrh.w r3, [r4, #102] ; 0x66 803204c: b123 cbz r3, 8032058 803204e: f8b4 3068 ldrh.w r3, [r4, #104] ; 0x68 8032052: 2b47 cmp r3, #71 ; 0x47 8032054: f240 80ce bls.w 80321f4 pcb->lastack, ntohl(seg->tcphdr->seqno), pcb->lastack, i)); ++i; #endif /* TCP_CWND_DEBUG */ pcb->unsent = seg->next; 8032058: 682b ldr r3, [r5, #0] 803205a: 66e3 str r3, [r4, #108] ; 0x6c if (pcb->state != SYN_SENT) { 803205c: 7e23 ldrb r3, [r4, #24] 803205e: 2b02 cmp r3, #2 8032060: d00c beq.n 803207c TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); 8032062: 68ef ldr r7, [r5, #12] 8032064: 2010 movs r0, #16 8032066: f8b7 b00c ldrh.w fp, [r7, #12] 803206a: f7fc fd11 bl 802ea90 803206e: ea40 000b orr.w r0, r0, fp 8032072: 81b8 strh r0, [r7, #12] pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); 8032074: 7fa3 ldrb r3, [r4, #30] 8032076: f023 0303 bic.w r3, r3, #3 803207a: 77a3 strb r3, [r4, #30] u16_t len; struct netif *netif; u32_t *opts; /** @bug Exclude retransmitted segments from this count. */ snmp_inc_tcpoutsegs(); 803207c: f002 fd6c bl 8034b58 /* The TCP header has already been constructed, but the ackno and wnd fields remain. */ seg->tcphdr->ackno = htonl(pcb->rcv_nxt); 8032080: 6aa0 ldr r0, [r4, #40] ; 0x28 8032082: 68ef ldr r7, [r5, #12] 8032084: f7fc fd0e bl 802eaa4 8032088: 60b8 str r0, [r7, #8] /* advertise our receive window size in this TCP segment */ seg->tcphdr->wnd = htons(pcb->rcv_ann_wnd); 803208a: 8de0 ldrh r0, [r4, #46] ; 0x2e 803208c: 68ef ldr r7, [r5, #12] 803208e: f7fc fcff bl 802ea90 8032092: 81f8 strh r0, [r7, #14] pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; 8032094: 8de2 ldrh r2, [r4, #46] ; 0x2e 8032096: 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); 8032098: 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; 803209a: 18d3 adds r3, r2, r3 803209c: 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) { 803209e: 7aab ldrb r3, [r5, #10] 80320a0: 07d8 lsls r0, r3, #31 80320a2: d509 bpl.n 80320b8 u16_t mss; #if TCP_CALCULATE_EFF_SEND_MSS mss = tcp_eff_send_mss(TCP_MSS, &pcb->remote_ip); 80320a4: 4641 mov r1, r8 80320a6: f240 50b4 movw r0, #1460 ; 0x5b4 80320aa: f7fe fd6a bl 8030b82 #else /* TCP_CALCULATE_EFF_SEND_MSS */ mss = TCP_MSS; #endif /* TCP_CALCULATE_EFF_SEND_MSS */ *opts = TCP_BUILD_MSS_OPTION(mss); 80320ae: f040 7001 orr.w r0, r0, #33816576 ; 0x2040000 80320b2: f7fc fcf7 bl 802eaa4 80320b6: 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) { 80320b8: f9b4 3034 ldrsh.w r3, [r4, #52] ; 0x34 80320bc: 3301 adds r3, #1 80320be: d101 bne.n 80320c4 pcb->rtime = 0; 80320c0: 2300 movs r3, #0 80320c2: 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))) { 80320c4: 6823 ldr r3, [r4, #0] 80320c6: b92b cbnz r3, 80320d4 netif = ip_route(&(pcb->remote_ip)); 80320c8: 4640 mov r0, r8 80320ca: f000 fecb bl 8032e64 if (netif == NULL) { 80320ce: b310 cbz r0, 8032116 return; } ip_addr_copy(pcb->local_ip, netif->ip_addr); 80320d0: 6843 ldr r3, [r0, #4] 80320d2: 6023 str r3, [r4, #0] } if (pcb->rttest == 0) { 80320d4: 6ba3 ldr r3, [r4, #56] ; 0x38 80320d6: b93b cbnz r3, 80320e8 pcb->rttest = tcp_ticks; 80320d8: f8da 3000 ldr.w r3, [sl] 80320dc: 63a3 str r3, [r4, #56] ; 0x38 pcb->rtseq = ntohl(seg->tcphdr->seqno); 80320de: 68eb ldr r3, [r5, #12] 80320e0: 6858 ldr r0, [r3, #4] 80320e2: f7fc fce1 bl 802eaa8 80320e6: 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); 80320e8: 6868 ldr r0, [r5, #4] 80320ea: 68eb ldr r3, [r5, #12] 80320ec: 6842 ldr r2, [r0, #4] seg->p->len -= len; 80320ee: 8941 ldrh r1, [r0, #10] seg->p->tot_len -= len; seg->p->payload = seg->tcphdr; 80320f0: 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); 80320f2: 1a9a subs r2, r3, r2 seg->p->len -= len; 80320f4: 1a89 subs r1, r1, r2 80320f6: 8141 strh r1, [r0, #10] seg->p->tot_len -= len; 80320f8: 8901 ldrh r1, [r0, #8] 80320fa: 1a8a subs r2, r1, r2 80320fc: 8102 strh r2, [r0, #8] seg->p->payload = seg->tcphdr; seg->tcphdr->chksum = 0; 80320fe: 2200 movs r2, #0 8032100: 741a strb r2, [r3, #16] 8032102: 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, 8032104: 7a62 ldrb r2, [r4, #9] 8032106: 7aa3 ldrb r3, [r4, #10] 8032108: 9200 str r2, [sp, #0] 803210a: 2206 movs r2, #6 803210c: 9201 str r2, [sp, #4] 803210e: 4621 mov r1, r4 8032110: 4642 mov r2, r8 8032112: f000 fffb bl 803310c 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); 8032116: 68eb ldr r3, [r5, #12] 8032118: 6858 ldr r0, [r3, #4] 803211a: f7fc fcc5 bl 802eaa8 803211e: 68ea ldr r2, [r5, #12] 8032120: f8b5 b008 ldrh.w fp, [r5, #8] 8032124: 4607 mov r7, r0 8032126: 8990 ldrh r0, [r2, #12] 8032128: f7fc fcb7 bl 802ea9a 803212c: f010 0003 ands.w r0, r0, #3 8032130: bf18 it ne 8032132: 2001 movne r0, #1 if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 8032134: 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); 8032136: eb0b 0300 add.w r3, fp, r0 803213a: 19db adds r3, r3, r7 if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 803213c: 1ad2 subs r2, r2, r3 803213e: 2a00 cmp r2, #0 pcb->snd_nxt = snd_nxt; 8032140: bfb8 it lt 8032142: 6523 strlt r3, [r4, #80] ; 0x50 } /* put segment on unacknowledged list if length > 0 */ if (TCP_TCPLEN(seg) > 0) { 8032144: 68eb ldr r3, [r5, #12] 8032146: 892f ldrh r7, [r5, #8] 8032148: 8998 ldrh r0, [r3, #12] 803214a: f7fc fca6 bl 802ea9a 803214e: f010 0003 ands.w r0, r0, #3 8032152: bf18 it ne 8032154: 2001 movne r0, #1 8032156: 1838 adds r0, r7, r0 8032158: b360 cbz r0, 80321b4 seg->next = NULL; 803215a: 2300 movs r3, #0 803215c: 602b str r3, [r5, #0] /* unacked list is empty? */ if (pcb->unacked == NULL) { 803215e: 6f23 ldr r3, [r4, #112] ; 0x70 8032160: b90b cbnz r3, 8032166 pcb->unacked = seg; 8032162: 6725 str r5, [r4, #112] ; 0x70 8032164: e024 b.n 80321b0 /* 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))) { 8032166: 68eb ldr r3, [r5, #12] 8032168: 6858 ldr r0, [r3, #4] 803216a: f7fc fc9d bl 802eaa8 803216e: 68f3 ldr r3, [r6, #12] 8032170: 4607 mov r7, r0 8032172: 6858 ldr r0, [r3, #4] 8032174: f7fc fc98 bl 802eaa8 8032178: 1a38 subs r0, r7, r0 803217a: 2800 cmp r0, #0 803217c: da17 bge.n 80321ae /* add segment to before tail of unacked list, keeping the list sorted */ struct tcp_seg **cur_seg = &(pcb->unacked); 803217e: f104 0770 add.w r7, r4, #112 ; 0x70 while (*cur_seg && 8032182: e000 b.n 8032186 TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); 8032184: 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 && 8032186: 683b ldr r3, [r7, #0] 8032188: b91b cbnz r3, 8032192 TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); } seg->next = (*cur_seg); 803218a: 683b ldr r3, [r7, #0] 803218c: 602b str r3, [r5, #0] (*cur_seg) = seg; 803218e: 603d str r5, [r7, #0] 8032190: e013 b.n 80321ba * 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))) { 8032192: 68db ldr r3, [r3, #12] 8032194: 6858 ldr r0, [r3, #4] 8032196: f7fc fc87 bl 802eaa8 803219a: 68eb ldr r3, [r5, #12] 803219c: 4683 mov fp, r0 803219e: 6858 ldr r0, [r3, #4] 80321a0: f7fc fc82 bl 802eaa8 80321a4: 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 && 80321a8: 2800 cmp r0, #0 80321aa: dbeb blt.n 8032184 80321ac: e7ed b.n 803218a } seg->next = (*cur_seg); (*cur_seg) = seg; } else { /* add segment to tail of unacked list */ useg->next = seg; 80321ae: 6035 str r5, [r6, #0] 80321b0: 462e mov r6, r5 80321b2: e002 b.n 80321ba useg = useg->next; } } /* do not queue empty segments on the unacked list */ } else { tcp_seg_free(seg); 80321b4: 4628 mov r0, r5 80321b6: f7fe f8d8 bl 803036a } seg = pcb->unsent; 80321ba: 6ee5 ldr r5, [r4, #108] ; 0x6c 80321bc: e003 b.n 80321c6 } ip_addr_copy(pcb->local_ip, netif->ip_addr); } if (pcb->rttest == 0) { pcb->rttest = tcp_ticks; 80321be: f8df a04c ldr.w sl, [pc, #76] ; 803220c 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); 80321c2: 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 && 80321c6: b915 cbnz r5, 80321ce tcp_seg_free(seg); } seg = pcb->unsent; } #if TCP_OVERSIZE if (pcb->unsent == NULL) { 80321c8: 6ee3 ldr r3, [r4, #108] ; 0x6c 80321ca: b973 cbnz r3, 80321ea 80321cc: e00b b.n 80321e6 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) { 80321ce: 68eb ldr r3, [r5, #12] 80321d0: 6858 ldr r0, [r3, #4] 80321d2: f7fc fc69 bl 802eaa8 80321d6: 892a ldrh r2, [r5, #8] 80321d8: 6ca3 ldr r3, [r4, #72] ; 0x48 80321da: 1ad3 subs r3, r2, r3 80321dc: 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 && 80321de: 4548 cmp r0, r9 80321e0: f67f af20 bls.w 8032024 80321e4: e7f0 b.n 80321c8 seg = pcb->unsent; } #if TCP_OVERSIZE if (pcb->unsent == NULL) { /* last unsent has been removed, reset unsent_oversize */ pcb->unsent_oversize = 0; 80321e6: f8a4 306a strh.w r3, [r4, #106] ; 0x6a } #endif /* TCP_OVERSIZE */ pcb->flags &= ~TF_NAGLEMEMERR; 80321ea: 7fa3 ldrb r3, [r4, #30] 80321ec: f003 037f and.w r3, r3, #127 ; 0x7f 80321f0: 77a3 strb r3, [r4, #30] return ERR_OK; 80321f2: e004 b.n 80321fe * - 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) && 80321f4: f012 0fa0 tst.w r2, #160 ; 0xa0 80321f8: f47f af2e bne.w 8032058 80321fc: e7e4 b.n 80321c8 } #endif /* TCP_OVERSIZE */ pcb->flags &= ~TF_NAGLEMEMERR; return ERR_OK; } 80321fe: 2000 movs r0, #0 8032200: b003 add sp, #12 8032202: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8032206: bf00 nop 8032208: 2000f6d0 .word 0x2000f6d0 803220c: 2000f6bc .word 0x2000f6bc 08032210 : */ 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) { 8032210: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8032214: 4681 mov r9, r0 8032216: 460d mov r5, r1 8032218: 4690 mov r8, r2 struct pbuf *p; struct tcp_hdr *tcphdr; p = pbuf_alloc(PBUF_IP, TCP_HLEN, PBUF_RAM); 803221a: 2001 movs r0, #1 803221c: 2114 movs r1, #20 803221e: 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) { 8032220: 461f mov r7, r3 8032222: f8bd b030 ldrh.w fp, [sp, #48] ; 0x30 8032226: f8bd a034 ldrh.w sl, [sp, #52] ; 0x34 struct pbuf *p; struct tcp_hdr *tcphdr; p = pbuf_alloc(PBUF_IP, TCP_HLEN, PBUF_RAM); 803222a: f7fd fdbc bl 802fda6 if (p == NULL) { 803222e: 4606 mov r6, r0 8032230: 2800 cmp r0, #0 8032232: d030 beq.n 8032296 return; } LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", (p->len >= sizeof(struct tcp_hdr))); tcphdr = (struct tcp_hdr *)p->payload; 8032234: 6844 ldr r4, [r0, #4] tcphdr->src = htons(local_port); 8032236: 4658 mov r0, fp 8032238: f7fc fc2a bl 802ea90 803223c: 8020 strh r0, [r4, #0] tcphdr->dest = htons(remote_port); 803223e: 4650 mov r0, sl 8032240: f7fc fc26 bl 802ea90 8032244: 8060 strh r0, [r4, #2] tcphdr->seqno = htonl(seqno); 8032246: 4648 mov r0, r9 8032248: f7fc fc2c bl 802eaa4 803224c: 6060 str r0, [r4, #4] tcphdr->ackno = htonl(ackno); 803224e: 4628 mov r0, r5 8032250: f7fc fc28 bl 802eaa4 8032254: 60a0 str r0, [r4, #8] TCPH_HDRLEN_FLAGS_SET(tcphdr, TCP_HLEN/4, TCP_RST | TCP_ACK); 8032256: f245 0014 movw r0, #20500 ; 0x5014 803225a: f7fc fc19 bl 802ea90 tcphdr->wnd = PP_HTONS(TCP_WND); 803225e: 2316 movs r3, #22 8032260: 2500 movs r5, #0 8032262: 73a3 strb r3, [r4, #14] 8032264: 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); 8032268: 81a0 strh r0, [r4, #12] tcphdr->wnd = PP_HTONS(TCP_WND); 803226a: 73e3 strb r3, [r4, #15] tcphdr->chksum = 0; 803226c: 7425 strb r5, [r4, #16] 803226e: 7465 strb r5, [r4, #17] tcphdr->urgp = 0; 8032270: 74a5 strb r5, [r4, #18] 8032272: 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(); 8032274: f002 fc88 bl 8034b88 /* 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); 8032278: 2306 movs r3, #6 803227a: 9301 str r3, [sp, #4] 803227c: 9500 str r5, [sp, #0] 803227e: 4630 mov r0, r6 8032280: 4641 mov r1, r8 8032282: 463a mov r2, r7 8032284: 23ff movs r3, #255 ; 0xff 8032286: f000 ff41 bl 803310c pbuf_free(p); 803228a: 4630 mov r0, r6 LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); } 803228c: b003 add sp, #12 803228e: 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); 8032292: f7fd bd3b b.w 802fd0c LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); } 8032296: b003 add sp, #12 8032298: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0803229c : void tcp_rexmit_rto(struct tcp_pcb *pcb) { struct tcp_seg *seg; if (pcb->unacked == NULL) { 803229c: 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) { 803229e: b510 push {r4, lr} struct tcp_seg *seg; if (pcb->unacked == NULL) { 80322a0: b19a cbz r2, 80322ca 80322a2: 4611 mov r1, r2 80322a4: e000 b.n 80322a8 return; } /* Move all unacked segments to the head of the unsent queue */ for (seg = pcb->unacked; seg->next != NULL; seg = seg->next); 80322a6: 4619 mov r1, r3 80322a8: 680b ldr r3, [r1, #0] 80322aa: 2b00 cmp r3, #0 80322ac: d1fb bne.n 80322a6 /* concatenate unsent queue after unacked queue */ seg->next = pcb->unsent; 80322ae: 6ec4 ldr r4, [r0, #108] ; 0x6c 80322b0: 600c str r4, [r1, #0] /* unsent queue is the concatenated queue (of unacked, unsent) */ pcb->unsent = pcb->unacked; 80322b2: 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; 80322b4: 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; 80322b8: 6703 str r3, [r0, #112] ; 0x70 /* last unsent hasn't changed, no need to reset unsent_oversize */ /* increment number of retransmissions */ ++pcb->nrtx; 80322ba: 3201 adds r2, #1 80322bc: f880 2046 strb.w r2, [r0, #70] ; 0x46 /* Don't take any RTT measurements after retransmitting. */ pcb->rttest = 0; 80322c0: 6383 str r3, [r0, #56] ; 0x38 /* Do the actual retransmission */ tcp_output(pcb); } 80322c2: 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); 80322c6: f7ff be7f b.w 8031fc8 80322ca: bd10 pop {r4, pc} 080322cc : * * @param pcb the tcp_pcb for which to retransmit the first unacked segment */ void tcp_rexmit(struct tcp_pcb *pcb) { 80322cc: b5f8 push {r3, r4, r5, r6, r7, lr} struct tcp_seg *seg; struct tcp_seg **cur_seg; if (pcb->unacked == NULL) { 80322ce: 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) { 80322d0: 4604 mov r4, r0 struct tcp_seg *seg; struct tcp_seg **cur_seg; if (pcb->unacked == NULL) { 80322d2: 2d00 cmp r5, #0 80322d4: d027 beq.n 8032326 } /* Move the first unacked segment to the unsent queue */ /* Keep the unsent queue sorted. */ seg = pcb->unacked; pcb->unacked = seg->next; 80322d6: 682b ldr r3, [r5, #0] cur_seg = &(pcb->unsent); 80322d8: 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; 80322dc: 6703 str r3, [r0, #112] ; 0x70 cur_seg = &(pcb->unsent); while (*cur_seg && 80322de: e000 b.n 80322e2 TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); 80322e0: 6836 ldr r6, [r6, #0] /* Keep the unsent queue sorted. */ seg = pcb->unacked; pcb->unacked = seg->next; cur_seg = &(pcb->unsent); while (*cur_seg && 80322e2: 6833 ldr r3, [r6, #0] 80322e4: b92b cbnz r3, 80322f2 TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); } seg->next = *cur_seg; 80322e6: 6833 ldr r3, [r6, #0] 80322e8: 602b str r3, [r5, #0] *cur_seg = seg; 80322ea: 6035 str r5, [r6, #0] #if TCP_OVERSIZE if (seg->next == NULL) { 80322ec: 682b ldr r3, [r5, #0] 80322ee: b97b cbnz r3, 8032310 80322f0: e00c b.n 803230c 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))) { 80322f2: 68db ldr r3, [r3, #12] 80322f4: 6858 ldr r0, [r3, #4] 80322f6: f7fc fbd7 bl 802eaa8 80322fa: 68eb ldr r3, [r5, #12] 80322fc: 4607 mov r7, r0 80322fe: 6858 ldr r0, [r3, #4] 8032300: f7fc fbd2 bl 802eaa8 8032304: 1a38 subs r0, r7, r0 /* Keep the unsent queue sorted. */ seg = pcb->unacked; pcb->unacked = seg->next; cur_seg = &(pcb->unsent); while (*cur_seg && 8032306: 2800 cmp r0, #0 8032308: dbea blt.n 80322e0 803230a: e7ec b.n 80322e6 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; 803230c: f8a4 306a strh.w r3, [r4, #106] ; 0x6a } #endif /* TCP_OVERSIZE */ ++pcb->nrtx; 8032310: f894 3046 ldrb.w r3, [r4, #70] ; 0x46 8032314: 3301 adds r3, #1 8032316: f884 3046 strb.w r3, [r4, #70] ; 0x46 /* Don't take any rtt measurements after retransmitting. */ pcb->rttest = 0; 803231a: 2300 movs r3, #0 803231c: 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. */ } 803231e: 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(); 8032322: f002 bc21 b.w 8034b68 8032326: bdf8 pop {r3, r4, r5, r6, r7, pc} 08032328 : * @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)) { 8032328: 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) { 803232a: b510 push {r4, lr} 803232c: 4604 mov r4, r0 if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) { 803232e: b333 cbz r3, 803237e 8032330: 7f83 ldrb r3, [r0, #30] 8032332: f003 0304 and.w r3, r3, #4 8032336: b2db uxtb r3, r3 8032338: bb0b cbnz r3, 803237e 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); 803233a: f7ff ffc7 bl 80322cc /* Set ssthresh to half of the minimum of the current * cwnd and the advertised window */ if (pcb->cwnd > pcb->snd_wnd) { 803233e: f8b4 304c ldrh.w r3, [r4, #76] ; 0x4c 8032342: f8b4 2060 ldrh.w r2, [r4, #96] ; 0x60 8032346: 4293 cmp r3, r2 8032348: d903 bls.n 8032352 pcb->ssthresh = pcb->snd_wnd / 2; 803234a: 0852 lsrs r2, r2, #1 803234c: f8a4 204e strh.w r2, [r4, #78] ; 0x4e 8032350: e002 b.n 8032358 } else { pcb->ssthresh = pcb->cwnd / 2; 8032352: 085b lsrs r3, r3, #1 8032354: f8a4 304e strh.w r3, [r4, #78] ; 0x4e } /* The minimum value for ssthresh should be 2 MSS */ if (pcb->ssthresh < 2*pcb->mss) { 8032358: 8ee3 ldrh r3, [r4, #54] ; 0x36 803235a: f8b4 104e ldrh.w r1, [r4, #78] ; 0x4e 803235e: 005a lsls r2, r3, #1 8032360: 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; 8032362: bfb8 it lt 8032364: f8a4 204e strhlt.w r2, [r4, #78] ; 0x4e } pcb->cwnd = pcb->ssthresh + 3 * pcb->mss; 8032368: f8b4 204e ldrh.w r2, [r4, #78] ; 0x4e 803236c: 2103 movs r1, #3 803236e: fb01 2303 mla r3, r1, r3, r2 8032372: f8a4 304c strh.w r3, [r4, #76] ; 0x4c pcb->flags |= TF_INFR; 8032376: 7fa3 ldrb r3, [r4, #30] 8032378: f043 0304 orr.w r3, r3, #4 803237c: 77a3 strb r3, [r4, #30] 803237e: bd10 pop {r4, pc} 08032380 : * * @param pcb the tcp_pcb for which to send a keepalive packet */ void tcp_keepalive(struct tcp_pcb *pcb) { 8032380: b537 push {r0, r1, r2, r4, r5, lr} 8032382: 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)); 8032384: 6d00 ldr r0, [r0, #80] ; 0x50 8032386: 3801 subs r0, #1 8032388: f7fc fb8c bl 802eaa4 803238c: 2100 movs r1, #0 803238e: 4602 mov r2, r0 8032390: 4620 mov r0, r4 8032392: f7ff fbd9 bl 8031b48 if(p == NULL) { 8032396: 4605 mov r5, r0 8032398: b178 cbz r0, 80323ba /* 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); 803239a: 2200 movs r2, #0 803239c: f04f 0e06 mov.w lr, #6 80323a0: e88d 4004 stmia.w sp, {r2, lr} 80323a4: 7aa3 ldrb r3, [r4, #10] 80323a6: 4621 mov r1, r4 80323a8: 1d22 adds r2, r4, #4 80323aa: f000 feaf bl 803310c #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 80323ae: 4628 mov r0, r5 LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: seqno %"U32_F" ackno %"U32_F".\n", pcb->snd_nxt - 1, pcb->rcv_nxt)); } 80323b0: b003 add sp, #12 80323b2: 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); 80323b6: f7fd bca9 b.w 802fd0c LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: seqno %"U32_F" ackno %"U32_F".\n", pcb->snd_nxt - 1, pcb->rcv_nxt)); } 80323ba: b003 add sp, #12 80323bc: bd30 pop {r4, r5, pc} 080323be : * * @param pcb the tcp_pcb for which to send a zero-window probe packet */ void tcp_zero_window_probe(struct tcp_pcb *pcb) { 80323be: 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; 80323c2: 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) { 80323c4: 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) { 80323c6: b914 cbnz r4, 80323ce seg = pcb->unsent; 80323c8: 6ec4 ldr r4, [r0, #108] ; 0x6c } if(seg == NULL) { 80323ca: 2c00 cmp r4, #0 80323cc: d042 beq.n 8032454 return; } is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); 80323ce: 68e3 ldr r3, [r4, #12] 80323d0: 8998 ldrh r0, [r3, #12] 80323d2: f7fc fb62 bl 802ea9a 80323d6: f010 0001 ands.w r0, r0, #1 80323da: d005 beq.n 80323e8 80323dc: 8921 ldrh r1, [r4, #8] 80323de: f1d1 0101 rsbs r1, r1, #1 80323e2: bf38 it cc 80323e4: 2100 movcc r1, #0 80323e6: e000 b.n 80323ea 80323e8: 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); 80323ea: 68e3 ldr r3, [r4, #12] } if(seg == NULL) { return; } is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); 80323ec: 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); 80323f0: 4628 mov r0, r5 80323f2: f081 0101 eor.w r1, r1, #1 80323f6: 685a ldr r2, [r3, #4] 80323f8: f7ff fba6 bl 8031b48 if(p == NULL) { 80323fc: 4606 mov r6, r0 80323fe: 2800 cmp r0, #0 8032400: d028 beq.n 8032454 LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n")); return; } tcphdr = (struct tcp_hdr *)p->payload; 8032402: 6847 ldr r7, [r0, #4] if (is_fin) { 8032404: f1b8 0f00 cmp.w r8, #0 8032408: d009 beq.n 803241e /* FIN segment, no data */ TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN); 803240a: 89bc ldrh r4, [r7, #12] 803240c: 2011 movs r0, #17 803240e: f7fc fb3f bl 802ea90 8032412: f424 547c bic.w r4, r4, #16128 ; 0x3f00 8032416: b2a4 uxth r4, r4 8032418: 4320 orrs r0, r4 803241a: 81b8 strh r0, [r7, #12] 803241c: e009 b.n 8032432 /* 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); 803241e: 6860 ldr r0, [r4, #4] 8032420: 8923 ldrh r3, [r4, #8] 8032422: 8902 ldrh r2, [r0, #8] 8032424: 1ad3 subs r3, r2, r3 8032426: f107 0114 add.w r1, r7, #20 803242a: 2201 movs r2, #1 803242c: b29b uxth r3, r3 803242e: f7fd fdbb bl 802ffa8 /* 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); 8032432: 2200 movs r2, #0 8032434: f04f 0c06 mov.w ip, #6 8032438: e88d 1004 stmia.w sp, {r2, ip} 803243c: 7aab ldrb r3, [r5, #10] 803243e: 4630 mov r0, r6 8032440: 4629 mov r1, r5 8032442: 1d2a adds r2, r5, #4 8032444: f000 fe62 bl 803310c #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 8032448: 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)); } 803244a: b002 add sp, #8 803244c: 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); 8032450: f7fd bc5c b.w 802fd0c LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: seqno %"U32_F " ackno %"U32_F".\n", pcb->snd_nxt - 1, pcb->rcv_nxt)); } 8032454: b002 add sp, #8 8032456: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 803245a: 0000 movs r0, r0 0803245c : 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 */ { 803245c: b570 push {r4, r5, r6, lr} 803245e: 4604 mov r4, r0 struct sys_timeo *timeout, *t; timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); 8032460: 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 */ { 8032462: 460d mov r5, r1 8032464: 4616 mov r6, r2 struct sys_timeo *timeout, *t; timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); 8032466: f7fd fb31 bl 802facc if (timeout == NULL) { 803246a: 4603 mov r3, r0 803246c: b308 cbz r0, 80324b2 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) { 803246e: 4911 ldr r1, [pc, #68] ; (80324b4 ) 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; 8032470: 2200 movs r2, #0 timeout->h = handler; timeout->arg = arg; timeout->time = msecs; 8032472: 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) { 8032476: 680a ldr r2, [r1, #0] 8032478: b902 cbnz r2, 803247c 803247a: e005 b.n 8032488 next_timeout = timeout; return; } if (next_timeout->time > msecs) { 803247c: 6850 ldr r0, [r2, #4] 803247e: 42a0 cmp r0, r4 8032480: d90c bls.n 803249c next_timeout->time -= msecs; 8032482: 1b04 subs r4, r0, r4 8032484: 6054 str r4, [r2, #4] timeout->next = next_timeout; 8032486: 601a str r2, [r3, #0] next_timeout = timeout; 8032488: 600b str r3, [r1, #0] 803248a: 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) { 803248c: 684c ldr r4, [r1, #4] 803248e: 4284 cmp r4, r0 8032490: d80c bhi.n 80324ac 8032492: 460a mov r2, r1 8032494: e002 b.n 803249c if (t->next != NULL) { t->next->time -= timeout->time; } timeout->next = t->next; 8032496: 6019 str r1, [r3, #0] t->next = timeout; 8032498: 6013 str r3, [r2, #0] break; 803249a: 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; 803249c: 6851 ldr r1, [r2, #4] 803249e: 6858 ldr r0, [r3, #4] 80324a0: 1a40 subs r0, r0, r1 if (t->next == NULL || t->next->time > timeout->time) { 80324a2: 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; 80324a4: 6058 str r0, [r3, #4] if (t->next == NULL || t->next->time > timeout->time) { 80324a6: 2900 cmp r1, #0 80324a8: d1f0 bne.n 803248c 80324aa: e7f4 b.n 8032496 if (t->next != NULL) { t->next->time -= timeout->time; 80324ac: 1a20 subs r0, r4, r0 80324ae: 6048 str r0, [r1, #4] 80324b0: e7f1 b.n 8032496 80324b2: bd70 pop {r4, r5, r6, pc} 80324b4: 2000c40c .word 0x2000c40c 080324b8 : } #endif /* LWIP_DNS */ /** Initialize this module */ void sys_timeouts_init(void) { 80324b8: 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); 80324ba: 2200 movs r2, #0 80324bc: f241 3088 movw r0, #5000 ; 0x1388 80324c0: 4908 ldr r1, [pc, #32] ; (80324e4 ) 80324c2: f7ff ffcb bl 803245c #endif /* LWIP_ARP */ #if LWIP_DHCP sys_timeout(DHCP_COARSE_TIMER_MSECS, dhcp_timer_coarse, NULL); 80324c6: 2200 movs r2, #0 80324c8: f64e 2060 movw r0, #60000 ; 0xea60 80324cc: 4906 ldr r1, [pc, #24] ; (80324e8 ) 80324ce: f7ff ffc5 bl 803245c sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL); 80324d2: 4906 ldr r1, [pc, #24] ; (80324ec ) 80324d4: f44f 70fa mov.w r0, #500 ; 0x1f4 80324d8: 2200 movs r2, #0 #if NO_SYS /* Initialise timestamp for sys_check_timeouts */ timeouts_last_time = sys_now(); #endif } 80324da: 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); 80324de: f7ff bfbd b.w 803245c 80324e2: bf00 nop 80324e4: 08032529 .word 0x08032529 80324e8: 0803250d .word 0x0803250d 80324ec: 080324f1 .word 0x080324f1 080324f0 : * * @param arg unused argument */ static void dhcp_timer_fine(void *arg) { 80324f0: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: dhcp_fine_tmr()\n")); dhcp_fine_tmr(); 80324f2: f7fd f8a7 bl 802f644 sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL); 80324f6: 4904 ldr r1, [pc, #16] ; (8032508 ) 80324f8: f44f 70fa mov.w r0, #500 ; 0x1f4 80324fc: 2200 movs r2, #0 } 80324fe: 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); 8032502: f7ff bfab b.w 803245c 8032506: bf00 nop 8032508: 080324f1 .word 0x080324f1 0803250c : * * @param arg unused argument */ static void dhcp_timer_coarse(void *arg) { 803250c: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: dhcp_coarse_tmr()\n")); dhcp_coarse_tmr(); 803250e: f7fd f817 bl 802f540 sys_timeout(DHCP_COARSE_TIMER_MSECS, dhcp_timer_coarse, NULL); 8032512: 4904 ldr r1, [pc, #16] ; (8032524 ) 8032514: f64e 2060 movw r0, #60000 ; 0xea60 8032518: 2200 movs r2, #0 } 803251a: 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); 803251e: f7ff bf9d b.w 803245c 8032522: bf00 nop 8032524: 0803250d .word 0x0803250d 08032528 : * * @param arg unused argument */ static void arp_timer(void *arg) { 8032528: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: etharp_tmr()\n")); etharp_tmr(); 803252a: f004 fd25 bl 8036f78 sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 803252e: 4904 ldr r1, [pc, #16] ; (8032540 ) 8032530: f241 3088 movw r0, #5000 ; 0x1388 8032534: 2200 movs r2, #0 } 8032536: 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); 803253a: f7ff bf8f b.w 803245c 803253e: bf00 nop 8032540: 08032529 .word 0x08032529 08032544 : */ void tcp_timer_needed(void) { /* timer is off but needed again? */ if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) { 8032544: 4b08 ldr r3, [pc, #32] ; (8032568 ) 8032546: 681b ldr r3, [r3, #0] 8032548: b96b cbnz r3, 8032566 803254a: 4b08 ldr r3, [pc, #32] ; (803256c ) 803254c: 681b ldr r3, [r3, #0] 803254e: b913 cbnz r3, 8032556 8032550: 4b07 ldr r3, [pc, #28] ; (8032570 ) 8032552: 681b ldr r3, [r3, #0] 8032554: b13b cbz r3, 8032566 /* enable and start timer */ tcpip_tcp_timer_active = 1; 8032556: 4b04 ldr r3, [pc, #16] ; (8032568 ) sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 8032558: 4906 ldr r1, [pc, #24] ; (8032574 ) 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; 803255a: 2201 movs r2, #1 803255c: 601a str r2, [r3, #0] sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 803255e: 20fa movs r0, #250 ; 0xfa 8032560: 2200 movs r2, #0 8032562: f7ff bf7b b.w 803245c 8032566: 4770 bx lr 8032568: 2000c408 .word 0x2000c408 803256c: 2000f6b8 .word 0x2000f6b8 8032570: 2000f6cc .word 0x2000f6cc 8032574: 08032579 .word 0x08032579 08032578 : * * @param arg unused argument */ static void tcpip_tcp_timer(void *arg) { 8032578: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); /* call TCP timer handler */ tcp_tmr(); 803257a: f7fe fa59 bl 8030a30 /* timer still needed? */ if (tcp_active_pcbs || tcp_tw_pcbs) { 803257e: 4b08 ldr r3, [pc, #32] ; (80325a0 ) 8032580: 681b ldr r3, [r3, #0] 8032582: b913 cbnz r3, 803258a 8032584: 4b07 ldr r3, [pc, #28] ; (80325a4 ) 8032586: 681b ldr r3, [r3, #0] 8032588: b133 cbz r3, 8032598 /* restart timer */ sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 803258a: 4907 ldr r1, [pc, #28] ; (80325a8 ) 803258c: 20fa movs r0, #250 ; 0xfa 803258e: 2200 movs r2, #0 } else { /* disable timer */ tcpip_tcp_timer_active = 0; } } 8032590: 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); 8032594: f7ff bf62 b.w 803245c } else { /* disable timer */ tcpip_tcp_timer_active = 0; 8032598: 4a04 ldr r2, [pc, #16] ; (80325ac ) 803259a: 6013 str r3, [r2, #0] 803259c: bd08 pop {r3, pc} 803259e: bf00 nop 80325a0: 2000f6b8 .word 0x2000f6b8 80325a4: 2000f6cc .word 0x2000f6cc 80325a8: 08032579 .word 0x08032579 80325ac: 2000c408 .word 0x2000c408 080325b0 : void sys_untimeout(sys_timeout_handler handler, void *arg) { struct sys_timeo *prev_t, *t; if (next_timeout == NULL) { 80325b0: 4b10 ldr r3, [pc, #64] ; (80325f4 ) 80325b2: 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) { 80325b4: b510 push {r4, lr} struct sys_timeo *prev_t, *t; if (next_timeout == NULL) { 80325b6: b1e3 cbz r3, 80325f2 80325b8: 2200 movs r2, #0 80325ba: e000 b.n 80325be return; } for (t = next_timeout, prev_t = NULL; t != NULL; prev_t = t, t = t->next) { 80325bc: 4623 mov r3, r4 if ((t->h == handler) && (t->arg == arg)) { 80325be: 689c ldr r4, [r3, #8] 80325c0: 4284 cmp r4, r0 80325c2: d112 bne.n 80325ea 80325c4: 68dc ldr r4, [r3, #12] 80325c6: 428c cmp r4, r1 80325c8: d10f bne.n 80325ea 80325ca: 6819 ldr r1, [r3, #0] /* We have a match */ /* Unlink from previous in list */ if (prev_t == NULL) { 80325cc: b902 cbnz r2, 80325d0 next_timeout = t->next; 80325ce: 4a09 ldr r2, [pc, #36] ; (80325f4 ) } else { prev_t->next = t->next; 80325d0: 6011 str r1, [r2, #0] } /* If not the last one, add time of this one back to next */ if (t->next != NULL) { 80325d2: 681a ldr r2, [r3, #0] 80325d4: b11a cbz r2, 80325de t->next->time += t->time; 80325d6: 6850 ldr r0, [r2, #4] 80325d8: 6859 ldr r1, [r3, #4] 80325da: 1841 adds r1, r0, r1 80325dc: 6051 str r1, [r2, #4] } memp_free(MEMP_SYS_TIMEOUT, t); 80325de: 2009 movs r0, #9 80325e0: 4619 mov r1, r3 return; } } return; } 80325e2: 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); 80325e6: f7fd ba87 b.w 802faf8 if (next_timeout == NULL) { return; } for (t = next_timeout, prev_t = NULL; t != NULL; prev_t = t, t = t->next) { 80325ea: 681c ldr r4, [r3, #0] 80325ec: 461a mov r2, r3 80325ee: 2c00 cmp r4, #0 80325f0: d1e4 bne.n 80325bc 80325f2: bd10 pop {r4, pc} 80325f4: 2000c40c .word 0x2000c40c 080325f8 : * @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) { 80325f8: 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) { 80325fc: 4e18 ldr r6, [pc, #96] ; (8032660 ) * @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) { 80325fe: 4604 mov r4, r0 8032600: 460d mov r5, r1 8032602: 4637 mov r7, r6 struct sys_timeo *tmptimeout; sys_timeout_handler handler; void *arg; again: if (!next_timeout) { 8032604: 6832 ldr r2, [r6, #0] 8032606: b92a cbnz r2, 8032614 time_needed = sys_arch_mbox_fetch(mbox, msg, 0); 8032608: 4620 mov r0, r4 803260a: 4629 mov r1, r5 } else { next_timeout->time = 0; } } } } 803260c: 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); 8032610: f005 b8fc b.w 803780c } else { if (next_timeout->time > 0) { 8032614: 6852 ldr r2, [r2, #4] 8032616: b96a cbnz r2, 8032634 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; 8032618: 6839 ldr r1, [r7, #0] next_timeout = tmptimeout->next; 803261a: 680a ldr r2, [r1, #0] handler = tmptimeout->h; 803261c: 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; 8032620: 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); 8032622: 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; 8032624: 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); 8032628: f7fd fa66 bl 802faf8 if (handler != NULL) { 803262c: f1b8 0f00 cmp.w r8, #0 8032630: d0e8 beq.n 8032604 8032632: e006 b.n 8032642 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); 8032634: 4620 mov r0, r4 8032636: 4629 mov r1, r5 8032638: f005 f8e8 bl 803780c } else { time_needed = SYS_ARCH_TIMEOUT; } if (time_needed == SYS_ARCH_TIMEOUT) { 803263c: 1c43 adds r3, r0, #1 803263e: d0eb beq.n 8032618 8032640: e002 b.n 8032648 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); 8032642: 4648 mov r0, r9 8032644: 47c0 blx r8 8032646: e7dd b.n 8032604 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) { 8032648: 4b05 ldr r3, [pc, #20] ; (8032660 ) 803264a: 681b ldr r3, [r3, #0] 803264c: 6859 ldr r1, [r3, #4] 803264e: 4288 cmp r0, r1 next_timeout->time -= time_needed; 8032650: bf34 ite cc 8032652: ebc0 0201 rsbcc r2, r0, r1 } else { next_timeout->time = 0; 8032656: 2200 movcs r2, #0 8032658: 605a str r2, [r3, #4] 803265a: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 803265e: bf00 nop 8032660: 2000c40c .word 0x2000c40c 08032664 : /** * Initialize this module. */ void udp_init(void) { 8032664: 4770 bx lr 8032666: 0000 movs r0, r0 08032668 : * @param inp network interface on which the datagram was received. * */ void udp_input(struct pbuf *p, struct netif *inp) { 8032668: 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; 803266c: 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))) { 8032670: 8903 ldrh r3, [r0, #8] * @param inp network interface on which the datagram was received. * */ void udp_input(struct pbuf *p, struct netif *inp) { 8032672: 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))) { 8032674: f899 1000 ldrb.w r1, [r9] 8032678: f001 010f and.w r1, r1, #15 803267c: 1c8a adds r2, r1, #2 803267e: 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) { 8032682: b085 sub sp, #20 8032684: 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))) { 8032686: db05 blt.n 8032694 8032688: 0089 lsls r1, r1, #2 803268a: 4249 negs r1, r1 803268c: f7fd fb13 bl 802fcb6 8032690: 4683 mov fp, r0 8032692: b110 cbz r0, 803269a /* 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(); 8032694: f002 fa90 bl 8034bb8 8032698: e096 b.n 80327c8 } udphdr = (struct udp_hdr *)p->payload; /* is broadcast packet ? */ broadcast = ip_addr_isbroadcast(¤t_iphdr_dest, inp); 803269a: f8df a150 ldr.w sl, [pc, #336] ; 80327ec snmp_inc_udpinerrors(); pbuf_free(p); goto end; } udphdr = (struct udp_hdr *)p->payload; 803269e: 686c ldr r4, [r5, #4] /* is broadcast packet ? */ broadcast = ip_addr_isbroadcast(¤t_iphdr_dest, inp); 80326a0: f8da 0000 ldr.w r0, [sl] 80326a4: 4631 mov r1, r6 80326a6: f000 faed bl 8032c84 80326aa: 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); 80326ac: 8820 ldrh r0, [r4, #0] 80326ae: f7fc f9f4 bl 802ea9a 80326b2: 4607 mov r7, r0 dest = ntohs(udphdr->dest); 80326b4: 8860 ldrh r0, [r4, #2] 80326b6: f7fc f9f0 bl 802ea9a #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) { 80326ba: 2844 cmp r0, #68 ; 0x44 80326bc: d10f bne.n 80326de /* all packets for DHCP_CLIENT_PORT not coming from DHCP_SERVER_PORT are dropped! */ if (src == DHCP_SERVER_PORT) { 80326be: 2f43 cmp r7, #67 ; 0x43 80326c0: d14f bne.n 8032762 if ((inp->dhcp != NULL) && (inp->dhcp->pcb != NULL)) { 80326c2: 6a33 ldr r3, [r6, #32] 80326c4: 2b00 cmp r3, #0 80326c6: d04c beq.n 8032762 80326c8: 685c ldr r4, [r3, #4] 80326ca: 2c00 cmp r4, #0 80326cc: d049 beq.n 8032762 /* 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) || 80326ce: 6863 ldr r3, [r4, #4] 80326d0: 2b00 cmp r3, #0 80326d2: d04e beq.n 8032772 ip_addr_cmp(&(inp->dhcp->pcb->remote_ip), ¤t_iphdr_src))) { 80326d4: 4a43 ldr r2, [pc, #268] ; (80327e4 ) 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) || 80326d6: 6812 ldr r2, [r2, #0] 80326d8: 4293 cmp r3, r2 80326da: d142 bne.n 8032762 80326dc: e049 b.n 8032772 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) { 80326de: 4b42 ldr r3, [pc, #264] ; (80327e8 ) /* 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) || 80326e0: 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) { 80326e4: 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))) { 80326e8: 4b3e ldr r3, [pc, #248] ; (80327e4 ) 80326ea: 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) { 80326ec: 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))) { 80326ee: 9303 str r3, [sp, #12] } } } else #endif /* LWIP_DHCP */ { prev = NULL; 80326f0: 4659 mov r1, fp local_match = 0; uncon_pcb = NULL; 80326f2: 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) { 80326f4: e032 b.n 803275c 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) { 80326f6: 8a62 ldrh r2, [r4, #18] 80326f8: 4282 cmp r2, r0 80326fa: d12d bne.n 8032758 80326fc: 6822 ldr r2, [r4, #0] if ( 80326fe: f1b8 0f00 cmp.w r8, #0 8032702: d100 bne.n 8032706 (!broadcast && ip_addr_isany(&pcb->local_ip)) || 8032704: b15a cbz r2, 803271e 8032706: 4552 cmp r2, sl 8032708: d009 beq.n 803271e ip_addr_cmp(&(pcb->local_ip), ¤t_iphdr_dest) || 803270a: f1b8 0f00 cmp.w r8, #0 803270e: d023 beq.n 8032758 (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) || 8032710: b12a cbz r2, 803271e ip_addr_netcmp(&pcb->local_ip, ip_current_dest_addr(), &inp->netmask)))) { 8032712: ea8a 0b02 eor.w fp, sl, r2 8032716: 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) || 8032718: ea1b 0f02 tst.w fp, r2 803271c: d11c bne.n 8032758 ip_addr_netcmp(&pcb->local_ip, ip_current_dest_addr(), &inp->netmask)))) { #endif /* IP_SOF_BROADCAST_RECV */ local_match = 1; if ((uncon_pcb == NULL) && 803271e: 2b00 cmp r3, #0 8032720: d158 bne.n 80327d4 ((pcb->flags & UDP_FLAGS_CONNECTED) == 0)) { 8032722: 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) && 8032724: f003 0304 and.w r3, r3, #4 8032728: b2db uxtb r3, r3 803272a: 2b00 cmp r3, #0 803272c: bf0c ite eq 803272e: 4623 moveq r3, r4 8032730: 2300 movne r3, #0 8032732: e04f b.n 80327d4 } } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && (pcb->remote_port == src) && (ip_addr_isany(&pcb->remote_ip) || 8032734: f8d4 b004 ldr.w fp, [r4, #4] 8032738: f1bb 0f00 cmp.w fp, #0 803273c: d101 bne.n 8032742 ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src))) { /* the first fully matching PCB */ if (prev != NULL) { 803273e: b921 cbnz r1, 803274a 8032740: e017 b.n 8032772 } } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && (pcb->remote_port == src) && (ip_addr_isany(&pcb->remote_ip) || 8032742: 9a03 ldr r2, [sp, #12] 8032744: 4593 cmp fp, r2 8032746: d107 bne.n 8032758 8032748: e7f9 b.n 803273e 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; 803274a: 68e3 ldr r3, [r4, #12] 803274c: 60cb str r3, [r1, #12] pcb->next = udp_pcbs; udp_pcbs = pcb; 803274e: 4b26 ldr r3, [pc, #152] ; (80327e8 ) /* 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; 8032750: f8c4 c00c str.w ip, [r4, #12] udp_pcbs = pcb; 8032754: 601c str r4, [r3, #0] 8032756: e00c b.n 8032772 8032758: 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) { 803275a: 68e4 ldr r4, [r4, #12] 803275c: 2c00 cmp r4, #0 803275e: d1ca bne.n 80326f6 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)) { 8032760: b933 cbnz r3, 8032770 8032762: 4b22 ldr r3, [pc, #136] ; (80327ec ) 8032764: 6872 ldr r2, [r6, #4] 8032766: 681b ldr r3, [r3, #0] 8032768: 429a cmp r2, r3 803276a: d12d bne.n 80327c8 803276c: 2400 movs r4, #0 803276e: e000 b.n 8032772 8032770: 461c mov r4, r3 goto end; } } #endif /* CHECKSUM_CHECK_UDP */ } if(pbuf_header(p, -UDP_HLEN)) { 8032772: 4628 mov r0, r5 8032774: f06f 0107 mvn.w r1, #7 8032778: f7fd fa9d bl 802fcb6 803277c: 2800 cmp r0, #0 803277e: d189 bne.n 8032694 UDP_STATS_INC(udp.drop); snmp_inc_udpinerrors(); pbuf_free(p); goto end; } if (pcb != NULL) { 8032780: b154 cbz r4, 8032798 snmp_inc_udpindatagrams(); 8032782: f002 fa09 bl 8034b98 pbuf_header(p, -(s16_t)((IPH_HL(iphdr) * 4) + UDP_HLEN)); } } #endif /* SO_REUSE && SO_REUSE_RXTOALL */ /* callback */ if (pcb->recv != NULL) { 8032786: 69a6 ldr r6, [r4, #24] 8032788: b1f6 cbz r6, 80327c8 /* now the recv function is responsible for freeing p */ pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src); 803278a: 9700 str r7, [sp, #0] 803278c: 69e0 ldr r0, [r4, #28] 803278e: 4b15 ldr r3, [pc, #84] ; (80327e4 ) 8032790: 4621 mov r1, r4 8032792: 462a mov r2, r5 8032794: 47b0 blx r6 8032796: e021 b.n 80327dc 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 && 8032798: f1b8 0f00 cmp.w r8, #0 803279c: d112 bne.n 80327c4 !ip_addr_ismulticast(¤t_iphdr_dest)) { 803279e: 4b13 ldr r3, [pc, #76] ; (80327ec ) 80327a0: 681b ldr r3, [r3, #0] 80327a2: 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 && 80327a6: 2be0 cmp r3, #224 ; 0xe0 80327a8: d00c beq.n 80327c4 !ip_addr_ismulticast(¤t_iphdr_dest)) { /* move payload pointer back to ip header */ pbuf_header(p, (IPH_HL(iphdr) * 4) + UDP_HLEN); 80327aa: f899 1000 ldrb.w r1, [r9] 80327ae: f001 010f and.w r1, r1, #15 80327b2: 3102 adds r1, #2 80327b4: 0089 lsls r1, r1, #2 80327b6: 4628 mov r0, r5 80327b8: f7fd fa7d bl 802fcb6 LWIP_ASSERT("p->payload == iphdr", (p->payload == iphdr)); icmp_dest_unreach(p, ICMP_DUR_PORT); 80327bc: 4628 mov r0, r5 80327be: 2103 movs r1, #3 80327c0: f000 f9d2 bl 8032b68 } #endif /* LWIP_ICMP */ UDP_STATS_INC(udp.proterr); UDP_STATS_INC(udp.drop); snmp_inc_udpnoports(); 80327c4: f002 f9f0 bl 8034ba8 pbuf_free(p); 80327c8: 4628 mov r0, r5 } else { pbuf_free(p); } end: PERF_STOP("udp_input"); } 80327ca: b005 add sp, #20 80327cc: 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); 80327d0: f7fd ba9c b.w 802fd0c uncon_pcb = pcb; } } } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && 80327d4: 8aa2 ldrh r2, [r4, #20] 80327d6: 42ba cmp r2, r7 80327d8: d1be bne.n 8032758 80327da: e7ab b.n 8032734 } else { pbuf_free(p); } end: PERF_STOP("udp_input"); } 80327dc: b005 add sp, #20 80327de: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80327e2: bf00 nop 80327e4: 2000f6d8 .word 0x2000f6d8 80327e8: 2000f6d4 .word 0x2000f6d4 80327ec: 2000f6e0 .word 0x2000f6e0 080327f0 : * * @see udp_disconnect() */ err_t udp_bind(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 80327f0: 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) { 80327f2: 4b25 ldr r3, [pc, #148] ; (8032888 ) * * @see udp_disconnect() */ err_t udp_bind(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 80327f4: 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) { 80327f6: 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; 80327f8: 2500 movs r5, #0 /* Check for double bind and rebind of the same pcb */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 80327fa: 4603 mov r3, r0 80327fc: e012 b.n 8032824 /* is this UDP PCB already on active list? */ if (pcb == ipcb) { 80327fe: 429c cmp r4, r3 8032800: d00e beq.n 8032820 !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) && 8032802: 8a5e ldrh r6, [r3, #18] 8032804: 4296 cmp r6, r2 8032806: d10c bne.n 8032822 /* IP address matches, or one is IP_ADDR_ANY? */ (ip_addr_isany(&(ipcb->local_ip)) || 8032808: 681f ldr r7, [r3, #0] 803280a: b90f cbnz r7, 8032810 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; 803280c: 20f8 movs r0, #248 ; 0xf8 803280e: e039 b.n 8032884 /* 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)) || 8032810: 2900 cmp r1, #0 8032812: d0fb beq.n 803280c ip_addr_isany(ipaddr) || 8032814: 680e ldr r6, [r1, #0] 8032816: 2e00 cmp r6, #0 8032818: d0f8 beq.n 803280c 803281a: 42b7 cmp r7, r6 803281c: d101 bne.n 8032822 803281e: e7f5 b.n 803280c /* 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; 8032820: 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) { 8032822: 68db ldr r3, [r3, #12] 8032824: 2b00 cmp r3, #0 8032826: d1ea bne.n 80327fe return ERR_USE; } } } ip_addr_set(&pcb->local_ip, ipaddr); 8032828: b101 cbz r1, 803282c 803282a: 6809 ldr r1, [r1, #0] 803282c: 6021 str r1, [r4, #0] /* no port specified? */ if (port == 0) { 803282e: b9fa cbnz r2, 8032870 8032830: 4b16 ldr r3, [pc, #88] ; (803288c ) 8032832: 881a ldrh r2, [r3, #0] 8032834: f44f 4180 mov.w r1, #16384 ; 0x4000 { u16_t n = 0; struct udp_pcb *pcb; again: if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) { 8032838: f64f 76ff movw r6, #65535 ; 0xffff 803283c: 42b2 cmp r2, r6 803283e: d002 beq.n 8032846 8032840: 3201 adds r2, #1 8032842: b292 uxth r2, r2 8032844: e001 b.n 803284a udp_port = UDP_LOCAL_PORT_RANGE_START; 8032846: f44f 4240 mov.w r2, #49152 ; 0xc000 } /* Check all PCBs. */ for(pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 803284a: 4603 mov r3, r0 803284c: e00a b.n 8032864 if (pcb->local_port == udp_port) { 803284e: 8a5f ldrh r7, [r3, #18] 8032850: 4297 cmp r7, r2 8032852: d106 bne.n 8032862 8032854: 3901 subs r1, #1 8032856: b289 uxth r1, r1 if (++n > (UDP_LOCAL_PORT_RANGE_END - UDP_LOCAL_PORT_RANGE_START)) { 8032858: 2900 cmp r1, #0 803285a: d1ef bne.n 803283c 803285c: 4b0b ldr r3, [pc, #44] ; (803288c ) 803285e: 801a strh r2, [r3, #0] 8032860: e7d4 b.n 803280c 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) { 8032862: 68db ldr r3, [r3, #12] 8032864: 2b00 cmp r3, #0 8032866: d1f2 bne.n 803284e 8032868: 4b08 ldr r3, [pc, #32] ; (803288c ) 803286a: 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) { 803286c: 2a00 cmp r2, #0 803286e: d0cd beq.n 803280c /* 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; 8032870: 8262 strh r2, [r4, #18] snmp_insert_udpidx_tree(pcb); 8032872: 4620 mov r0, r4 8032874: f002 f9b0 bl 8034bd8 /* pcb not active yet? */ if (rebind == 0) { 8032878: b91d cbnz r5, 8032882 /* place the PCB on the active list if not already there */ pcb->next = udp_pcbs; 803287a: 4b03 ldr r3, [pc, #12] ; (8032888 ) 803287c: 681a ldr r2, [r3, #0] udp_pcbs = pcb; 803287e: 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; 8032880: 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; 8032882: 2000 movs r0, #0 } 8032884: b240 sxtb r0, r0 8032886: bdf8 pop {r3, r4, r5, r6, r7, pc} 8032888: 2000f6d4 .word 0x2000f6d4 803288c: 20000716 .word 0x20000716 08032890 : * @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) { 8032890: e92d 47ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr} 8032894: 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) { 8032896: 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) { 8032898: f8dd 8030 ldr.w r8, [sp, #48] ; 0x30 803289c: 4605 mov r5, r0 803289e: 460e mov r6, r1 80328a0: 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) { 80328a2: b132 cbz r2, 80328b2 return err; } } /* not enough space to add an UDP header to first pbuf in given p chain? */ if (pbuf_header(p, UDP_HLEN)) { 80328a4: 4630 mov r0, r6 80328a6: 2108 movs r1, #8 80328a8: f7fd fa05 bl 802fcb6 80328ac: b940 cbnz r0, 80328c0 80328ae: 4634 mov r4, r6 80328b0: e013 b.n 80328da #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); 80328b2: 4601 mov r1, r0 80328b4: f7ff ff9c bl 80327f0 if (err != ERR_OK) { 80328b8: 4607 mov r7, r0 80328ba: 2800 cmp r0, #0 80328bc: d0f2 beq.n 80328a4 80328be: e044 b.n 803294a } /* 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); 80328c0: 2001 movs r0, #1 80328c2: 2108 movs r1, #8 80328c4: 2200 movs r2, #0 80328c6: f7fd fa6e bl 802fda6 /* new header pbuf could not be allocated? */ if (q == NULL) { 80328ca: 4604 mov r4, r0 80328cc: 2800 cmp r0, #0 80328ce: d039 beq.n 8032944 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) { 80328d0: 8933 ldrh r3, [r6, #8] 80328d2: b113 cbz r3, 80328da /* chain header q in front of given pbuf p (only if p contains data) */ pbuf_chain(q, p); 80328d4: 4631 mov r1, r6 80328d6: f7fd fb14 bl 802ff02 } 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); 80328da: 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; 80328dc: 6867 ldr r7, [r4, #4] udphdr->src = htons(pcb->local_port); 80328de: f7fc f8d7 bl 802ea90 80328e2: 8038 strh r0, [r7, #0] udphdr->dest = htons(dst_port); 80328e4: 4648 mov r0, r9 80328e6: f7fc f8d3 bl 802ea90 /* in UDP, 0 checksum means 'no checksum' */ udphdr->chksum = 0x0000; 80328ea: 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); 80328ec: 8078 strh r0, [r7, #2] /* in UDP, 0 checksum means 'no checksum' */ udphdr->chksum = 0x0000; 80328ee: 71bb strb r3, [r7, #6] 80328f0: 71fb strb r3, [r7, #7] } #endif /* LWIP_IGMP */ /* PCB local address is IP_ANY_ADDR? */ if (ip_addr_isany(&pcb->local_ip)) { 80328f2: 682b ldr r3, [r5, #0] 80328f4: b913 cbnz r3, 80328fc /* use outgoing network interface IP address as source address */ src_ip = &(netif->ip_addr); 80328f6: f108 0904 add.w r9, r8, #4 80328fa: e00a b.n 8032912 } 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))) { 80328fc: f8d8 2004 ldr.w r2, [r8, #4] 8032900: 4293 cmp r3, r2 8032902: d005 beq.n 8032910 /* local_ip doesn't match, drop the packet */ if (q != p) { 8032904: 42b4 cmp r4, r6 8032906: d01f beq.n 8032948 /* free the header pbuf */ pbuf_free(q); 8032908: 4620 mov r0, r4 803290a: f7fd f9ff bl 802fd0c 803290e: e01b b.n 8032948 } #endif /* LWIP_IGMP */ /* PCB local address is IP_ANY_ADDR? */ if (ip_addr_isany(&pcb->local_ip)) { 8032910: 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); 8032912: 8920 ldrh r0, [r4, #8] 8032914: f7fc f8bc bl 802ea90 8032918: 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); 803291a: 7a6a ldrb r2, [r5, #9] 803291c: 7aab ldrb r3, [r5, #10] 803291e: 9200 str r2, [sp, #0] 8032920: 2211 movs r2, #17 8032922: 9201 str r2, [sp, #4] 8032924: 4649 mov r1, r9 8032926: 4652 mov r2, sl 8032928: f8cd 8008 str.w r8, [sp, #8] 803292c: 4620 mov r0, r4 803292e: f000 fb9d bl 803306c 8032932: 4607 mov r7, r0 NETIF_SET_HWADDRHINT(netif, NULL); } /* TODO: must this be increased even if error occured? */ snmp_inc_udpoutdatagrams(); 8032934: f002 f948 bl 8034bc8 /* did we chain a separate header pbuf earlier? */ if (q != p) { 8032938: 42b4 cmp r4, r6 803293a: d006 beq.n 803294a /* free the header pbuf */ pbuf_free(q); 803293c: 4620 mov r0, r4 803293e: f7fd f9e5 bl 802fd0c 8032942: e002 b.n 803294a /* 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; 8032944: 27ff movs r7, #255 ; 0xff 8032946: e000 b.n 803294a /* free the header pbuf */ pbuf_free(q); q = NULL; /* p is still referenced by the caller, and will live on */ } return ERR_VAL; 8032948: 27fa movs r7, #250 ; 0xfa /* p is still referenced by the caller, and will live on */ } UDP_STATS_INC(udp.xmit); return err; } 803294a: b278 sxtb r0, r7 803294c: b004 add sp, #16 803294e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 08032952 : * @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) { 8032952: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} 8032954: 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); 8032956: 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) { 8032958: 460f mov r7, r1 803295a: 4614 mov r4, r2 803295c: 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); 803295e: f000 fa81 bl 8032e64 #endif /* LWIP_IGMP */ /* no outgoing network interface could be found? */ if (netif == NULL) { 8032962: b138 cbz r0, 8032974 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); 8032964: 9000 str r0, [sp, #0] 8032966: 4639 mov r1, r7 8032968: 4628 mov r0, r5 803296a: 4622 mov r2, r4 803296c: 4633 mov r3, r6 803296e: f7ff ff8f bl 8032890 8032972: e000 b.n 8032976 /* 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; 8032974: 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 */ } 8032976: b240 sxtb r0, r0 8032978: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 0803297a : */ 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); 803297a: 8a83 ldrh r3, [r0, #20] 803297c: 1d02 adds r2, r0, #4 803297e: f7ff bfe8 b.w 8032952 8032982: 0000 movs r0, r0 08032984 : * * @see udp_disconnect() */ err_t udp_connect(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 8032984: b570 push {r4, r5, r6, lr} 8032986: 4616 mov r6, r2 struct udp_pcb *ipcb; if (pcb->local_port == 0) { 8032988: 8a42 ldrh r2, [r0, #18] * * @see udp_disconnect() */ err_t udp_connect(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 803298a: 4604 mov r4, r0 803298c: 460d mov r5, r1 struct udp_pcb *ipcb; if (pcb->local_port == 0) { 803298e: b10a cbz r2, 8032994 if (err != ERR_OK) { return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); 8032990: b935 cbnz r5, 80329a0 8032992: e006 b.n 80329a2 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); 8032994: 4601 mov r1, r0 8032996: f7ff ff2b bl 80327f0 if (err != ERR_OK) { 803299a: 2800 cmp r0, #0 803299c: d0f8 beq.n 8032990 803299e: e013 b.n 80329c8 return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); 80329a0: 682d ldr r5, [r5, #0] pcb->remote_port = port; pcb->flags |= UDP_FLAGS_CONNECTED; 80329a2: 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) { 80329a4: 4a09 ldr r2, [pc, #36] ; (80329cc ) if (err != ERR_OK) { return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); 80329a6: 6065 str r5, [r4, #4] pcb->remote_port = port; pcb->flags |= UDP_FLAGS_CONNECTED; 80329a8: f043 0304 orr.w r3, r3, #4 80329ac: 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) { 80329ae: 6813 ldr r3, [r2, #0] return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); pcb->remote_port = port; 80329b0: 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) { 80329b2: 4618 mov r0, r3 80329b4: e002 b.n 80329bc if (pcb == ipcb) { 80329b6: 4284 cmp r4, r0 80329b8: d005 beq.n 80329c6 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) { 80329ba: 68c0 ldr r0, [r0, #12] 80329bc: 2800 cmp r0, #0 80329be: d1fa bne.n 80329b6 /* already on the list, just return */ return ERR_OK; } } /* PCB not yet on the list, add PCB now */ pcb->next = udp_pcbs; 80329c0: 60e3 str r3, [r4, #12] udp_pcbs = pcb; 80329c2: 6014 str r4, [r2, #0] return ERR_OK; 80329c4: e000 b.n 80329c8 /* 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; 80329c6: 2000 movs r0, #0 } /* PCB not yet on the list, add PCB now */ pcb->next = udp_pcbs; udp_pcbs = pcb; return ERR_OK; } 80329c8: b240 sxtb r0, r0 80329ca: bd70 pop {r4, r5, r6, pc} 80329cc: 2000f6d4 .word 0x2000f6d4 080329d0 : */ void udp_disconnect(struct udp_pcb *pcb) { /* reset remote address association */ ip_addr_set_any(&pcb->remote_ip); 80329d0: 2300 movs r3, #0 80329d2: 6043 str r3, [r0, #4] pcb->remote_port = 0; 80329d4: 8283 strh r3, [r0, #20] /* mark PCB as unconnected */ pcb->flags &= ~UDP_FLAGS_CONNECTED; 80329d6: 7c03 ldrb r3, [r0, #16] 80329d8: f023 0304 bic.w r3, r3, #4 80329dc: 7403 strb r3, [r0, #16] 80329de: 4770 bx lr 080329e0 : */ void udp_recv(struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg) { /* remember recv() callback and user data */ pcb->recv = recv; 80329e0: 6181 str r1, [r0, #24] pcb->recv_arg = recv_arg; 80329e2: 61c2 str r2, [r0, #28] 80329e4: 4770 bx lr 80329e6: 0000 movs r0, r0 080329e8 : * * @see udp_new() */ void udp_remove(struct udp_pcb *pcb) { 80329e8: b510 push {r4, lr} 80329ea: 4604 mov r4, r0 struct udp_pcb *pcb2; snmp_delete_udpidx_tree(pcb); 80329ec: f002 f938 bl 8034c60 /* pcb to be removed is first in list? */ if (udp_pcbs == pcb) { 80329f0: 4a0a ldr r2, [pc, #40] ; (8032a1c ) 80329f2: 6813 ldr r3, [r2, #0] 80329f4: 42a3 cmp r3, r4 80329f6: d109 bne.n 8032a0c /* make list start at 2nd pcb */ udp_pcbs = udp_pcbs->next; 80329f8: 68e3 ldr r3, [r4, #12] 80329fa: 6013 str r3, [r2, #0] 80329fc: e008 b.n 8032a10 /* 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) { 80329fe: 68da ldr r2, [r3, #12] 8032a00: b11a cbz r2, 8032a0a 8032a02: 42a2 cmp r2, r4 /* remove pcb from list */ pcb2->next = pcb->next; 8032a04: bf04 itt eq 8032a06: 68e2 ldreq r2, [r4, #12] 8032a08: 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) { 8032a0a: 68db ldr r3, [r3, #12] 8032a0c: 2b00 cmp r3, #0 8032a0e: d1f6 bne.n 80329fe /* remove pcb from list */ pcb2->next = pcb->next; } } } memp_free(MEMP_UDP_PCB, pcb); 8032a10: 2001 movs r0, #1 8032a12: 4621 mov r1, r4 } 8032a14: e8bd 4010 ldmia.w sp!, {r4, lr} /* remove pcb from list */ pcb2->next = pcb->next; } } } memp_free(MEMP_UDP_PCB, pcb); 8032a18: f7fd b86e b.w 802faf8 8032a1c: 2000f6d4 .word 0x2000f6d4 08032a20 : * * @see udp_remove() */ struct udp_pcb * udp_new(void) { 8032a20: b510 push {r4, lr} struct udp_pcb *pcb; pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB); 8032a22: 2001 movs r0, #1 8032a24: f7fd f852 bl 802facc /* could allocate UDP PCB? */ if (pcb != NULL) { 8032a28: 4604 mov r4, r0 8032a2a: b128 cbz r0, 8032a38 /* 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)); 8032a2c: 2100 movs r1, #0 8032a2e: 2220 movs r2, #32 8032a30: f7ef f866 bl 8021b00 pcb->ttl = UDP_TTL; 8032a34: 23ff movs r3, #255 ; 0xff 8032a36: 72a3 strb r3, [r4, #10] } return pcb; } 8032a38: 4620 mov r0, r4 8032a3a: bd10 pop {r4, pc} 08032a3c : * @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) { 8032a3c: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 8032a40: 4604 mov r4, r0 8032a42: b085 sub sp, #20 8032a44: 460f mov r7, r1 struct icmp_echo_hdr *iecho; struct ip_hdr *iphdr; s16_t hlen; ICMP_STATS_INC(icmp.recv); snmp_inc_icmpinmsgs(); 8032a46: f002 f837 bl 8034ab8 iphdr = (struct ip_hdr *)p->payload; 8032a4a: 6865 ldr r5, [r4, #4] hlen = IPH_HL(iphdr) * 4; 8032a4c: f895 8000 ldrb.w r8, [r5] 8032a50: f008 080f and.w r8, r8, #15 8032a54: ea4f 0888 mov.w r8, r8, lsl #2 if (pbuf_header(p, -hlen) || (p->tot_len < sizeof(u16_t)*2)) { 8032a58: f1c8 0900 rsb r9, r8, #0 8032a5c: 4620 mov r0, r4 8032a5e: fa0f f189 sxth.w r1, r9 8032a62: f7fd f928 bl 802fcb6 8032a66: 2800 cmp r0, #0 8032a68: d172 bne.n 8032b50 8032a6a: 8923 ldrh r3, [r4, #8] 8032a6c: 2b03 cmp r3, #3 8032a6e: d96f bls.n 8032b50 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short ICMP (%"U16_F" bytes) received\n", p->tot_len)); goto lenerr; } type = *((u8_t *)p->payload); 8032a70: 6863 ldr r3, [r4, #4] #ifdef LWIP_DEBUG code = *(((u8_t *)p->payload)+1); #endif /* LWIP_DEBUG */ switch (type) { 8032a72: 781b ldrb r3, [r3, #0] 8032a74: 2b08 cmp r3, #8 8032a76: d165 bne.n 8032b44 #if !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING { int accepted = 1; #if !LWIP_MULTICAST_PING /* multicast destination address? */ if (ip_addr_ismulticast(¤t_iphdr_dest)) { 8032a78: 4b39 ldr r3, [pc, #228] ; (8032b60 ) 8032a7a: 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)) { 8032a7c: 4639 mov r1, r7 8032a7e: 4630 mov r0, r6 8032a80: f000 f900 bl 8032c84 8032a84: 2800 cmp r0, #0 8032a86: d15d bne.n 8032b44 #if !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING { int accepted = 1; #if !LWIP_MULTICAST_PING /* multicast destination address? */ if (ip_addr_ismulticast(¤t_iphdr_dest)) { 8032a88: 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) { 8032a8c: 2ee0 cmp r6, #224 ; 0xe0 8032a8e: d100 bne.n 8032a92 8032a90: e058 b.n 8032b44 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)) { 8032a92: 8923 ldrh r3, [r4, #8] 8032a94: 2b07 cmp r3, #7 8032a96: d95b bls.n 8032b50 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: bad ICMP echo received\n")); goto lenerr; } if (inet_chksum_pbuf(p) != 0) { 8032a98: 4620 mov r0, r4 8032a9a: f000 f8cf bl 8032c3c 8032a9e: b100 cbz r0, 8032aa2 8032aa0: e056 b.n 8032b50 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))) { 8032aa2: 4620 mov r0, r4 8032aa4: 2122 movs r1, #34 ; 0x22 ICMP_STATS_INC(icmp.recv); snmp_inc_icmpinmsgs(); iphdr = (struct ip_hdr *)p->payload; hlen = IPH_HL(iphdr) * 4; 8032aa6: 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))) { 8032aaa: f7fd f904 bl 802fcb6 8032aae: b1f8 cbz r0, 8032af0 /* 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)) { 8032ab0: 4620 mov r0, r4 8032ab2: 4641 mov r1, r8 8032ab4: f7fd f8ff bl 802fcb6 8032ab8: 4602 mov r2, r0 8032aba: 2800 cmp r0, #0 8032abc: d148 bne.n 8032b50 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); 8032abe: 2002 movs r0, #2 8032ac0: 8921 ldrh r1, [r4, #8] 8032ac2: f7fd f970 bl 802fda6 if (r == NULL) { 8032ac6: 4606 mov r6, r0 8032ac8: 2800 cmp r0, #0 8032aca: d041 beq.n 8032b50 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) { 8032acc: 4621 mov r1, r4 8032ace: f7fd fa21 bl 802ff14 8032ad2: 2800 cmp r0, #0 8032ad4: d13c bne.n 8032b50 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)) { 8032ad6: 4630 mov r0, r6 8032ad8: 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; 8032adc: 6875 ldr r5, [r6, #4] /* switch r->payload back to icmp header */ if (pbuf_header(r, -hlen)) { 8032ade: f7fd f8ea bl 802fcb6 8032ae2: 2800 cmp r0, #0 8032ae4: d134 bne.n 8032b50 LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0); goto memerr; } /* free the original p */ pbuf_free(p); 8032ae6: 4620 mov r0, r4 8032ae8: f7fd f910 bl 802fd0c 8032aec: 4634 mov r4, r6 8032aee: e006 b.n 8032afe /* 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))) { 8032af0: 4620 mov r0, r4 8032af2: f06f 0121 mvn.w r1, #33 ; 0x21 8032af6: f7fd f8de bl 802fcb6 8032afa: 2800 cmp r0, #0 8032afc: d128 bne.n 8032b50 #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()); 8032afe: f8df 9060 ldr.w r9, [pc, #96] ; 8032b60 } #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; 8032b02: 6863 ldr r3, [r4, #4] ip_addr_copy(iphdr->src, *ip_current_dest_addr()); 8032b04: f8d9 2000 ldr.w r2, [r9] 8032b08: 60ea str r2, [r5, #12] ip_addr_copy(iphdr->dest, *ip_current_src_addr()); 8032b0a: 4a16 ldr r2, [pc, #88] ; (8032b64 ) 8032b0c: 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); 8032b0e: 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()); 8032b10: 612a str r2, [r5, #16] ICMPH_TYPE_SET(iecho, ICMP_ER); 8032b12: 2200 movs r2, #0 8032b14: 701a strb r2, [r3, #0] //----------------------------------------------------------- // Добавил фикс 15.08.15. // Фикс исправляет баг с пингом. #ifdef CHECKSUM_BY_HARDWARE iecho->chksum = 0; 8032b16: 709a strb r2, [r3, #2] 8032b18: 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); 8032b1a: 72aa strb r2, [r5, #10] 8032b1c: 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); 8032b1e: 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(); 8032b20: f001 ffda bl 8034ad8 /* increase number of echo replies attempted to send */ snmp_inc_icmpoutechoreps(); 8032b24: f001 ffe8 bl 8034af8 if(pbuf_header(p, hlen)) { 8032b28: 4620 mov r0, r4 8032b2a: 4641 mov r1, r8 8032b2c: f7fd f8c3 bl 802fcb6 8032b30: 4602 mov r2, r0 8032b32: b938 cbnz r0, 8032b44 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, 8032b34: 2301 movs r3, #1 8032b36: e88d 0089 stmia.w sp, {r0, r3, r7} 8032b3a: 4620 mov r0, r4 8032b3c: 4649 mov r1, r9 8032b3e: 4633 mov r3, r6 8032b40: f000 fa94 bl 803306c 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); 8032b44: 4620 mov r0, r4 pbuf_free(p); ICMP_STATS_INC(icmp.err); snmp_inc_icmpinerrors(); return; #endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ } 8032b46: b005 add sp, #20 8032b48: 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); 8032b4c: f7fd b8de b.w 802fd0c ICMP_STATS_INC(icmp.lenerr); snmp_inc_icmpinerrors(); return; #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN memerr: pbuf_free(p); 8032b50: 4620 mov r0, r4 8032b52: f7fd f8db bl 802fd0c ICMP_STATS_INC(icmp.err); snmp_inc_icmpinerrors(); return; #endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ } 8032b56: b005 add sp, #20 8032b58: 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(); 8032b5c: f001 bfb4 b.w 8034ac8 8032b60: 2000f6e0 .word 0x2000f6e0 8032b64: 2000f6d8 .word 0x2000f6d8 08032b68 : * 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) { 8032b68: e92d 41ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, lr} 8032b6c: 4607 mov r7, r0 8032b6e: 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, 8032b70: 2001 movs r0, #1 8032b72: 2124 movs r1, #36 ; 0x24 8032b74: 2200 movs r2, #0 8032b76: f7fd f916 bl 802fda6 PBUF_RAM); if (q == NULL) { 8032b7a: 4606 mov r6, r0 8032b7c: b358 cbz r0, 8032bd6 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; 8032b7e: 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; 8032b80: 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; 8032b84: 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; 8032b86: 2303 movs r3, #3 icmphdr->code = code; icmphdr->id = 0; 8032b88: 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; 8032b8a: 7023 strb r3, [r4, #0] icmphdr->code = code; icmphdr->id = 0; 8032b8c: 7125 strb r5, [r4, #4] 8032b8e: 7165 strb r5, [r4, #5] icmphdr->seqno = 0; 8032b90: 71a5 strb r5, [r4, #6] 8032b92: 71e5 strb r5, [r4, #7] /* copy fields from original packet */ SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload, 8032b94: 6840 ldr r0, [r0, #4] 8032b96: 6879 ldr r1, [r7, #4] 8032b98: 221c movs r2, #28 8032b9a: 3008 adds r0, #8 8032b9c: f7ee fef6 bl 802198c IP_HLEN + ICMP_DEST_UNREACH_DATASIZE); /* calculate checksum */ icmphdr->chksum = 0; 8032ba0: 70a5 strb r5, [r4, #2] 8032ba2: 70e5 strb r5, [r4, #3] icmphdr->chksum = inet_chksum(icmphdr, q->len); 8032ba4: 8971 ldrh r1, [r6, #10] 8032ba6: 4620 mov r0, r4 8032ba8: f000 f842 bl 8032c30 8032bac: 8060 strh r0, [r4, #2] ICMP_STATS_INC(icmp.xmit); /* increase number of messages attempted to send */ snmp_inc_icmpoutmsgs(); 8032bae: f001 ff93 bl 8034ad8 /* increase number of destination unreachable messages attempted to send */ snmp_inc_icmpouttimeexcds(); 8032bb2: f001 ff99 bl 8034ae8 ip_addr_copy(iphdr_src, iphdr->src); 8032bb6: f8d8 300c ldr.w r3, [r8, #12] 8032bba: aa04 add r2, sp, #16 ip_output(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP); 8032bbc: 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); 8032bbe: f842 3d04 str.w r3, [r2, #-4]! ip_output(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP); 8032bc2: 2301 movs r3, #1 8032bc4: 9301 str r3, [sp, #4] 8032bc6: 9500 str r5, [sp, #0] 8032bc8: 4629 mov r1, r5 8032bca: 23ff movs r3, #255 ; 0xff 8032bcc: f000 fa9e bl 803310c pbuf_free(q); 8032bd0: 4630 mov r0, r6 8032bd2: f7fd f89b bl 802fd0c */ void icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t) { icmp_send_response(p, ICMP_DUR, t); } 8032bd6: e8bd 81ff ldmia.w sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, pc} 08032bda : * @return host order (!) lwip checksum (non-inverted Internet sum) */ static u16_t lwip_standard_chksum(void *dataptr, int len) { 8032bda: b513 push {r0, r1, r4, lr} u8_t *pb = (u8_t *)dataptr; u16_t *ps, t = 0; 8032bdc: 2300 movs r3, #0 u32_t sum = 0; int odd = ((mem_ptr_t)pb & 1); /* Get aligned to u16_t */ if (odd && len > 0) { 8032bde: 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; 8032be2: 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) { 8032be6: d006 beq.n 8032bf6 8032be8: 4299 cmp r1, r3 8032bea: dd04 ble.n 8032bf6 ((u8_t *)&t)[1] = *pb++; 8032bec: f810 3b01 ldrb.w r3, [r0], #1 len--; 8032bf0: 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++; 8032bf2: 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; 8032bf6: 2300 movs r3, #0 len--; } /* Add the bulk of the data */ ps = (u16_t *)(void *)pb; while (len > 1) { 8032bf8: e003 b.n 8032c02 sum += *ps++; 8032bfa: f830 4b02 ldrh.w r4, [r0], #2 len -= 2; 8032bfe: 3902 subs r1, #2 } /* Add the bulk of the data */ ps = (u16_t *)(void *)pb; while (len > 1) { sum += *ps++; 8032c00: 191b adds r3, r3, r4 len--; } /* Add the bulk of the data */ ps = (u16_t *)(void *)pb; while (len > 1) { 8032c02: 2901 cmp r1, #1 8032c04: dcf9 bgt.n 8032bfa len -= 2; } /* Consume left-over byte, if any */ if (len > 0) { ((u8_t *)&t)[0] = *(u8_t *)ps; 8032c06: bf04 itt eq 8032c08: 7801 ldrbeq r1, [r0, #0] 8032c0a: f88d 1006 strbeq.w r1, [sp, #6] } /* Add end bytes */ sum += t; 8032c0e: f8bd 0006 ldrh.w r0, [sp, #6] 8032c12: 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); 8032c14: b298 uxth r0, r3 8032c16: eb00 4313 add.w r3, r0, r3, lsr #16 sum = FOLD_U32T(sum); 8032c1a: b298 uxth r0, r3 8032c1c: eb00 4013 add.w r0, r0, r3, lsr #16 /* Swap if alignment was odd */ if (odd) { 8032c20: b122 cbz r2, 8032c2c sum = SWAP_BYTES_IN_WORD(sum); 8032c22: 0603 lsls r3, r0, #24 8032c24: f3c0 2007 ubfx r0, r0, #8, #8 8032c28: ea40 4013 orr.w r0, r0, r3, lsr #16 } return (u16_t)sum; } 8032c2c: b280 uxth r0, r0 8032c2e: bd1c pop {r2, r3, r4, pc} 08032c30 : * @return checksum (as u16_t) to be saved directly in the protocol header */ u16_t inet_chksum(void *dataptr, u16_t len) { 8032c30: b508 push {r3, lr} return ~LWIP_CHKSUM(dataptr, len); 8032c32: f7ff ffd2 bl 8032bda 8032c36: 43c0 mvns r0, r0 } 8032c38: b280 uxth r0, r0 8032c3a: bd08 pop {r3, pc} 08032c3c : * @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) { 8032c3c: b570 push {r4, r5, r6, lr} u32_t acc; struct pbuf *q; u8_t swapped; acc = 0; swapped = 0; 8032c3e: 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) { 8032c40: 4605 mov r5, r0 u32_t acc; struct pbuf *q; u8_t swapped; acc = 0; 8032c42: 4634 mov r4, r6 swapped = 0; for(q = p; q != NULL; q = q->next) { 8032c44: e013 b.n 8032c6e acc += LWIP_CHKSUM(q->payload, q->len); 8032c46: 8969 ldrh r1, [r5, #10] 8032c48: 6868 ldr r0, [r5, #4] 8032c4a: f7ff ffc6 bl 8032bda acc = FOLD_U32T(acc); if (q->len % 2 != 0) { 8032c4e: 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); 8032c50: 1900 adds r0, r0, r4 acc = FOLD_U32T(acc); 8032c52: b284 uxth r4, r0 if (q->len % 2 != 0) { 8032c54: 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); 8032c56: eb04 4410 add.w r4, r4, r0, lsr #16 if (q->len % 2 != 0) { 8032c5a: d507 bpl.n 8032c6c swapped = 1 - swapped; acc = SWAP_BYTES_IN_WORD(acc); 8032c5c: 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; 8032c5e: f1c6 0601 rsb r6, r6, #1 acc = SWAP_BYTES_IN_WORD(acc); 8032c62: 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; 8032c66: b2f6 uxtb r6, r6 acc = SWAP_BYTES_IN_WORD(acc); 8032c68: 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) { 8032c6c: 682d ldr r5, [r5, #0] 8032c6e: 2d00 cmp r5, #0 8032c70: d1e9 bne.n 8032c46 swapped = 1 - swapped; acc = SWAP_BYTES_IN_WORD(acc); } } if (swapped) { 8032c72: b126 cbz r6, 8032c7e acc = SWAP_BYTES_IN_WORD(acc); 8032c74: 0623 lsls r3, r4, #24 8032c76: f3c4 2407 ubfx r4, r4, #8, #8 8032c7a: ea44 4413 orr.w r4, r4, r3, lsr #16 } return (u16_t)~(acc & 0xffffUL); 8032c7e: 43e0 mvns r0, r4 } 8032c80: b280 uxth r0, r0 8032c82: bd70 pop {r4, r5, r6, pc} 08032c84 : { ip_addr_t ipaddr; ip4_addr_set_u32(&ipaddr, addr); /* all ones (broadcast) or all zeroes (old skool broadcast) */ if ((~addr == IPADDR_ANY) || 8032c84: 1e43 subs r3, r0, #1 8032c86: 3303 adds r3, #3 8032c88: d811 bhi.n 8032cae (addr == IPADDR_ANY)) { return 1; /* no broadcast support on this network interface? */ } else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) { 8032c8a: f891 302d ldrb.w r3, [r1, #45] ; 0x2d 8032c8e: f003 0302 and.w r3, r3, #2 8032c92: b2db uxtb r3, r3 8032c94: b16b cbz r3, 8032cb2 /* 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)) { 8032c96: 684a ldr r2, [r1, #4] 8032c98: 4290 cmp r0, r2 8032c9a: d00a beq.n 8032cb2 return 0; /* on the same (sub) network... */ } else if (ip_addr_netcmp(&ipaddr, &(netif->ip_addr), &(netif->netmask)) 8032c9c: 688b ldr r3, [r1, #8] 8032c9e: 4042 eors r2, r0 8032ca0: 421a tst r2, r3 8032ca2: d000 beq.n 8032ca6 8032ca4: e005 b.n 8032cb2 /* ...and host identifier bits are all ones? =>... */ && ((addr & ~ip4_addr_get_u32(&netif->netmask)) == 8032ca6: 43db mvns r3, r3 8032ca8: 4018 ands r0, r3 8032caa: 4298 cmp r0, r3 8032cac: d101 bne.n 8032cb2 ip4_addr_set_u32(&ipaddr, addr); /* all ones (broadcast) or all zeroes (old skool broadcast) */ if ((~addr == IPADDR_ANY) || (addr == IPADDR_ANY)) { return 1; 8032cae: 2001 movs r0, #1 8032cb0: 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; 8032cb2: 2000 movs r0, #0 /* => network broadcast address */ return 1; } else { return 0; } } 8032cb4: 4770 bx lr 08032cb6 : * @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) { 8032cb6: b5f0 push {r4, r5, r6, r7, lr} u8_t base; char c; u32_t parts[4]; u32_t *pp = parts; c = *cp; 8032cb8: 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) { 8032cba: b085 sub sp, #20 8032cbc: 460e mov r6, r1 u8_t base; char c; u32_t parts[4]; u32_t *pp = parts; c = *cp; 8032cbe: 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) 8032cc0: aa00 add r2, sp, #0 8032cc2: 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)) 8032cc4: f1a3 0230 sub.w r2, r3, #48 ; 0x30 8032cc8: 2a09 cmp r2, #9 8032cca: d86d bhi.n 8032da8 return (0); val = 0; base = 10; if (c == '0') { 8032ccc: 2b30 cmp r3, #48 ; 0x30 8032cce: d10b bne.n 8032ce8 c = *++cp; 8032cd0: 7843 ldrb r3, [r0, #1] if (c == 'x' || c == 'X') { 8032cd2: 2b78 cmp r3, #120 ; 0x78 8032cd4: d004 beq.n 8032ce0 8032cd6: 2b58 cmp r3, #88 ; 0x58 8032cd8: d002 beq.n 8032ce0 if (!isdigit(c)) return (0); val = 0; base = 10; if (c == '0') { c = *++cp; 8032cda: 3001 adds r0, #1 if (c == 'x' || c == 'X') { base = 16; c = *++cp; } else base = 8; 8032cdc: 2508 movs r5, #8 8032cde: e004 b.n 8032cea base = 10; if (c == '0') { c = *++cp; if (c == 'x' || c == 'X') { base = 16; c = *++cp; 8032ce0: 7883 ldrb r3, [r0, #2] val = 0; base = 10; if (c == '0') { c = *++cp; if (c == 'x' || c == 'X') { base = 16; 8032ce2: 2510 movs r5, #16 c = *++cp; 8032ce4: 3002 adds r0, #2 8032ce6: e000 b.n 8032cea * 0x=hex, 0=octal, 1-9=decimal. */ if (!isdigit(c)) return (0); val = 0; base = 10; 8032ce8: 250a movs r5, #10 8032cea: 4602 mov r2, r0 if (c == '0') { c = *++cp; if (c == 'x' || c == 'X') { base = 16; 8032cec: 2000 movs r0, #0 8032cee: e000 b.n 8032cf2 8032cf0: 3201 adds r2, #1 c = *++cp; } else base = 8; } for (;;) { if (isdigit(c)) { 8032cf2: f1a3 0130 sub.w r1, r3, #48 ; 0x30 8032cf6: 2909 cmp r1, #9 8032cf8: d803 bhi.n 8032d02 val = (val * base) + (int)(c - '0'); 8032cfa: fb05 3000 mla r0, r5, r0, r3 8032cfe: 3830 subs r0, #48 ; 0x30 8032d00: e013 b.n 8032d2a c = *++cp; } else if (base == 16 && isxdigit(c)) { 8032d02: 2d10 cmp r5, #16 8032d04: d113 bne.n 8032d2e 8032d06: f1a3 0161 sub.w r1, r3, #97 ; 0x61 8032d0a: b2c9 uxtb r1, r1 8032d0c: 2905 cmp r1, #5 8032d0e: d904 bls.n 8032d1a 8032d10: f1a3 0c41 sub.w ip, r3, #65 ; 0x41 8032d14: f1bc 0f05 cmp.w ip, #5 8032d18: d809 bhi.n 8032d2e val = (val << 4) | (int)(c + 10 - (islower(c) ? 'a' : 'A')); 8032d1a: 330a adds r3, #10 8032d1c: 2919 cmp r1, #25 8032d1e: bf8c ite hi 8032d20: 2141 movhi r1, #65 ; 0x41 8032d22: 2161 movls r1, #97 ; 0x61 8032d24: 1a5b subs r3, r3, r1 8032d26: ea43 1000 orr.w r0, r3, r0, lsl #4 c = *++cp; 8032d2a: 7853 ldrb r3, [r2, #1] 8032d2c: e7e0 b.n 8032cf0 } else break; } if (c == '.') { 8032d2e: 2b2e cmp r3, #46 ; 0x2e 8032d30: d107 bne.n 8032d42 * 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) { 8032d32: 2c0c cmp r4, #12 8032d34: d038 beq.n 8032da8 return (0); } *pp++ = val; 8032d36: f84d 0004 str.w r0, [sp, r4] c = *++cp; 8032d3a: 7853 ldrb r3, [r2, #1] 8032d3c: 1c50 adds r0, r2, #1 8032d3e: 3404 adds r4, #4 } else break; } 8032d40: e7be b.n 8032cc0 8032d42: 2b0d cmp r3, #13 8032d44: d803 bhi.n 8032d4e 8032d46: 2b09 cmp r3, #9 8032d48: d203 bcs.n 8032d52 8032d4a: b113 cbz r3, 8032d52 8032d4c: e02c b.n 8032da8 8032d4e: 2b20 cmp r3, #32 8032d50: d12a bne.n 8032da8 } /* * Concoct the address according to * the number of parts specified. */ switch (pp - parts + 1) { 8032d52: 466b mov r3, sp 8032d54: 1afb subs r3, r7, r3 8032d56: 109b asrs r3, r3, #2 8032d58: 3301 adds r3, #1 8032d5a: 2b04 cmp r3, #4 8032d5c: d81f bhi.n 8032d9e 8032d5e: e8df f003 tbb [pc, r3] 8032d62: 1e23 .short 0x1e23 8032d64: 0a03 .short 0x0a03 8032d66: 13 .byte 0x13 8032d67: 00 .byte 0x00 case 1: /* a -- 32 bits */ break; case 2: /* a.b -- 8.24 bits */ if (val > 0xffffffUL) { 8032d68: f1b0 7f80 cmp.w r0, #16777216 ; 0x1000000 8032d6c: d21c bcs.n 8032da8 return (0); } val |= parts[0] << 24; 8032d6e: 9b00 ldr r3, [sp, #0] 8032d70: ea40 6003 orr.w r0, r0, r3, lsl #24 break; 8032d74: e013 b.n 8032d9e case 3: /* a.b.c -- 8.8.16 bits */ if (val > 0xffff) { 8032d76: f5b0 3f80 cmp.w r0, #65536 ; 0x10000 8032d7a: d215 bcs.n 8032da8 return (0); } val |= (parts[0] << 24) | (parts[1] << 16); 8032d7c: 9b00 ldr r3, [sp, #0] 8032d7e: 061a lsls r2, r3, #24 8032d80: 9b01 ldr r3, [sp, #4] 8032d82: ea42 4303 orr.w r3, r2, r3, lsl #16 8032d86: e009 b.n 8032d9c break; case 4: /* a.b.c.d -- 8.8.8.8 bits */ if (val > 0xff) { 8032d88: 28ff cmp r0, #255 ; 0xff 8032d8a: d80d bhi.n 8032da8 return (0); } val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); 8032d8c: 9b00 ldr r3, [sp, #0] 8032d8e: 061a lsls r2, r3, #24 8032d90: 9b01 ldr r3, [sp, #4] 8032d92: ea42 4203 orr.w r2, r2, r3, lsl #16 8032d96: 9b02 ldr r3, [sp, #8] 8032d98: ea42 2303 orr.w r3, r2, r3, lsl #8 8032d9c: 4318 orrs r0, r3 break; default: LWIP_ASSERT("unhandled", 0); break; } if (addr) { 8032d9e: b12e cbz r6, 8032dac ip4_addr_set_u32(addr, htonl(val)); 8032da0: f7fb fe80 bl 802eaa4 8032da4: 6030 str r0, [r6, #0] 8032da6: e001 b.n 8032dac * Collect number up to ``.''. * Values are specified as for C: * 0x=hex, 0=octal, 1-9=decimal. */ if (!isdigit(c)) return (0); 8032da8: 2000 movs r0, #0 8032daa: e000 b.n 8032dae break; } if (addr) { ip4_addr_set_u32(addr, htonl(val)); } return (1); 8032dac: 2001 movs r0, #1 } 8032dae: b005 add sp, #20 8032db0: bdf0 pop {r4, r5, r6, r7, pc} 08032db2 : * @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) { 8032db2: b507 push {r0, r1, r2, lr} ip_addr_t val; if (ipaddr_aton(cp, &val)) { 8032db4: a901 add r1, sp, #4 8032db6: f7ff ff7e bl 8032cb6 8032dba: b108 cbz r0, 8032dc0 return ip4_addr_get_u32(&val); 8032dbc: 9801 ldr r0, [sp, #4] 8032dbe: e001 b.n 8032dc4 } return (IPADDR_NONE); 8032dc0: f04f 30ff mov.w r0, #4294967295 } 8032dc4: bd0e pop {r1, r2, r3, pc} 08032dc6 : * @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) { 8032dc6: 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); 8032dca: 6803 ldr r3, [r0, #0] 8032dcc: 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) 8032dce: 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); 8032dd2: f840 3d04 str.w r3, [r0, #-4]! rp = buf; 8032dd6: 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) 8032dd8: 3801 subs r0, #1 char *rp; u8_t *ap; u8_t rem; u8_t n; u8_t i; int len = 0; 8032dda: 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; 8032ddc: f04f 0c0a mov.w ip, #10 *rp++ = inv[i]; } if (len++ >= buflen) { return NULL; } *rp++ = '.'; 8032de0: f04f 092e mov.w r9, #46 ; 0x2e 8032de4: 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) 8032de6: 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; 8032de8: fbb3 f6fc udiv r6, r3, ip *ap /= (u8_t)10; inv[i++] = '0' + rem; 8032dec: 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; 8032df0: fb0c 3a16 mls sl, ip, r6, r3 *ap /= (u8_t)10; inv[i++] = '0' + rem; 8032df4: eb0b 0305 add.w r3, fp, r5 8032df8: f10a 0a30 add.w sl, sl, #48 ; 0x30 8032dfc: 3501 adds r5, #1 8032dfe: f803 ac08 strb.w sl, [r3, #-8] } while(*ap); 8032e02: 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; 8032e06: b2ed uxtb r5, r5 } while(*ap); 8032e08: d1ee bne.n 8032de8 8032e0a: 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) 8032e0c: 1be6 subs r6, r4, r7 8032e0e: f800 3f01 strb.w r3, [r0, #1]! 8032e12: b2ed uxtb r5, r5 8032e14: 463b mov r3, r7 8032e16: 4637 mov r7, r6 8032e18: e00b b.n 8032e32 8032e1a: 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) { 8032e1c: 4293 cmp r3, r2 8032e1e: b2e4 uxtb r4, r4 8032e20: da16 bge.n 8032e50 return NULL; } *rp++ = inv[i]; 8032e22: f10d 0a08 add.w sl, sp, #8 8032e26: 4455 add r5, sl 8032e28: f815 5c08 ldrb.w r5, [r5, #-8] 8032e2c: 54fd strb r5, [r7, r3] 8032e2e: 3301 adds r3, #1 8032e30: 4625 mov r5, r4 do { rem = *ap % (u8_t)10; *ap /= (u8_t)10; inv[i++] = '0' + rem; } while(*ap); while(i--) { 8032e32: 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) 8032e34: 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--) { 8032e38: d1ef bne.n 8032e1a if (len++ >= buflen) { return NULL; } *rp++ = inv[i]; } if (len++ >= buflen) { 8032e3a: 1c5f adds r7, r3, #1 8032e3c: 4293 cmp r3, r2 8032e3e: da07 bge.n 8032e50 s_addr = ip4_addr_get_u32(addr); rp = buf; ap = (u8_t *)&s_addr; for(n = 0; n < 4; n++) { 8032e40: 4540 cmp r0, r8 *rp++ = inv[i]; } if (len++ >= buflen) { return NULL; } *rp++ = '.'; 8032e42: 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++) { 8032e46: d1cd bne.n 8032de4 return NULL; } *rp++ = '.'; ap++; } *--rp = 0; 8032e48: 2300 movs r3, #0 8032e4a: f804 3c01 strb.w r3, [r4, #-1] 8032e4e: e000 b.n 8032e52 *ap /= (u8_t)10; inv[i++] = '0' + rem; } while(*ap); while(i--) { if (len++ >= buflen) { return NULL; 8032e50: 2100 movs r1, #0 *rp++ = '.'; ap++; } *--rp = 0; return buf; } 8032e52: 4608 mov r0, r1 8032e54: e8bd 8ffe ldmia.w sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 08032e58 : */ char * ipaddr_ntoa(const ip_addr_t *addr) { static char str[16]; return ipaddr_ntoa_r(addr, str, 16); 8032e58: 4901 ldr r1, [pc, #4] ; (8032e60 ) 8032e5a: 2210 movs r2, #16 8032e5c: f7ff bfb3 b.w 8032dc6 8032e60: 2000c410 .word 0x2000c410 08032e64 : return netif; } #endif /* iterate through netifs */ for (netif = netif_list; netif != NULL; netif = netif->next) { 8032e64: 4b0f ldr r3, [pc, #60] ; (8032ea4 ) * @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) { 8032e66: b510 push {r4, lr} return netif; } #endif /* iterate through netifs */ for (netif = netif_list; netif != NULL; netif = netif->next) { 8032e68: 681c ldr r4, [r3, #0] 8032e6a: e00a b.n 8032e82 /* network mask matches? */ if (netif_is_up(netif)) { 8032e6c: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 8032e70: 07d9 lsls r1, r3, #31 8032e72: d505 bpl.n 8032e80 if (ip_addr_netcmp(dest, &(netif->ip_addr), &(netif->netmask))) { 8032e74: 6803 ldr r3, [r0, #0] 8032e76: 6862 ldr r2, [r4, #4] 8032e78: 405a eors r2, r3 8032e7a: 68a3 ldr r3, [r4, #8] 8032e7c: 421a tst r2, r3 8032e7e: d00e beq.n 8032e9e return netif; } #endif /* iterate through netifs */ for (netif = netif_list; netif != NULL; netif = netif->next) { 8032e80: 6824 ldr r4, [r4, #0] 8032e82: 2c00 cmp r4, #0 8032e84: d1f2 bne.n 8032e6c /* return netif on which to forward IP packet */ return netif; } } } if ((netif_default == NULL) || (!netif_is_up(netif_default))) { 8032e86: 4b08 ldr r3, [pc, #32] ; (8032ea8 ) 8032e88: 681b ldr r3, [r3, #0] 8032e8a: b12b cbz r3, 8032e98 8032e8c: f893 202d ldrb.w r2, [r3, #45] ; 0x2d 8032e90: 07d2 lsls r2, r2, #31 8032e92: bf48 it mi 8032e94: 461c movmi r4, r3 8032e96: d402 bmi.n 8032e9e 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(); 8032e98: f001 fcd8 bl 803484c return NULL; 8032e9c: e7ff b.n 8032e9e } /* no matching netif found, use default netif */ return netif_default; } 8032e9e: 4620 mov r0, r4 8032ea0: bd10 pop {r4, pc} 8032ea2: bf00 nop 8032ea4: 2000f6ac .word 0x2000f6ac 8032ea8: 2000f6b0 .word 0x2000f6b0 08032eac : * @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) { 8032eac: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8032eb0: 4604 mov r4, r0 8032eb2: 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(); 8032eb4: f001 fc8a bl 80347cc /* identify the IP header */ iphdr = (struct ip_hdr *)p->payload; 8032eb8: 6866 ldr r6, [r4, #4] if (IPH_V(iphdr) != 4) { 8032eba: f896 8000 ldrb.w r8, [r6] 8032ebe: ea4f 1318 mov.w r3, r8, lsr #4 8032ec2: 2b04 cmp r3, #4 8032ec4: d005 beq.n 8032ed2 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); 8032ec6: 4620 mov r0, r4 8032ec8: f7fc ff20 bl 802fd0c IP_STATS_INC(ip.err); IP_STATS_INC(ip.drop); snmp_inc_ipinhdrerrors(); 8032ecc: f001 fc86 bl 80347dc return ERR_OK; 8032ed0: e0be b.n 8033050 /* 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)); 8032ed2: 8870 ldrh r0, [r6, #2] 8032ed4: f7fb fde1 bl 802ea9a return ERR_OK; } #endif /* obtain IP header length in number of 32-bit words */ iphdr_hlen = IPH_HL(iphdr); 8032ed8: 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)) { 8032edc: 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; 8032ede: 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)) { 8032ee2: 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)); 8032ee4: 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); 8032ee6: 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)) { 8032ee8: d302 bcc.n 8032ef0 8032eea: 8923 ldrh r3, [r4, #8] 8032eec: 428b cmp r3, r1 8032eee: d202 bcs.n 8032ef6 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); 8032ef0: f7fc ff0c bl 802fd0c 8032ef4: e045 b.n 8032f82 } #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); 8032ef6: f7fc ff30 bl 802fd5a /* copy IP addresses to aligned ip_addr_t */ ip_addr_copy(current_iphdr_dest, iphdr->dest); 8032efa: 6932 ldr r2, [r6, #16] 8032efc: 4b56 ldr r3, [pc, #344] ; (8033058 ) } #endif /* LWIP_AUTOIP */ } if (first) { first = 0; netif = netif_list; 8032efe: f8df b168 ldr.w fp, [pc, #360] ; 8033068 /* 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); 8032f02: 601a str r2, [r3, #0] ip_addr_copy(current_iphdr_src, iphdr->src); 8032f04: 68f1 ldr r1, [r6, #12] 8032f06: 4a55 ldr r2, [pc, #340] ; (803305c ) 8032f08: 463d mov r5, r7 8032f0a: 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; 8032f0c: 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)) || 8032f10: 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)))) { 8032f12: f895 302d ldrb.w r3, [r5, #45] ; 0x2d 8032f16: 07d8 lsls r0, r3, #31 8032f18: d403 bmi.n 8032f22 /* break out of for loop */ break; } #endif /* LWIP_AUTOIP */ } if (first) { 8032f1a: f1b9 0f00 cmp.w r9, #0 8032f1e: d10e bne.n 8032f3e 8032f20: e010 b.n 8032f44 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)))) { 8032f22: 686b ldr r3, [r5, #4] 8032f24: 2b00 cmp r3, #0 8032f26: d0f8 beq.n 8032f1a /* unicast to this interface address? */ if (ip_addr_cmp(¤t_iphdr_dest, &(netif->ip_addr)) || 8032f28: f8da 0000 ldr.w r0, [sl] 8032f2c: 4298 cmp r0, r3 8032f2e: f000 8088 beq.w 8033042 /* or broadcast on this interface network address? */ ip_addr_isbroadcast(¤t_iphdr_dest, netif)) { 8032f32: 4629 mov r1, r5 8032f34: f7ff fea6 bl 8032c84 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)) || 8032f38: 2800 cmp r0, #0 8032f3a: d0ee beq.n 8032f1a 8032f3c: e081 b.n 8033042 } #endif /* LWIP_AUTOIP */ } if (first) { first = 0; netif = netif_list; 8032f3e: f8db 5000 ldr.w r5, [fp] 8032f42: e000 b.n 8032f46 } else { netif = netif->next; 8032f44: 682d ldr r5, [r5, #0] } if (netif == inp) { 8032f46: 42bd cmp r5, r7 netif = netif->next; 8032f48: bf08 it eq 8032f4a: 682d ldreq r5, [r5, #0] 8032f4c: f04f 0900 mov.w r9, #0 } } while(netif != NULL); 8032f50: 2d00 cmp r5, #0 8032f52: d1de bne.n 8032f12 8032f54: e072 b.n 803303c /* 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)) { 8032f56: eb06 0308 add.w r3, r6, r8 8032f5a: 885b ldrh r3, [r3, #2] 8032f5c: f5b3 4f88 cmp.w r3, #17408 ; 0x4400 8032f60: d16f bne.n 8033042 8032f62: e011 b.n 8032f88 /* 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)) || 8032f64: 4639 mov r1, r7 8032f66: f7ff fe8d bl 8032c84 8032f6a: b928 cbnz r0, 8032f78 (ip_addr_ismulticast(¤t_iphdr_src))) { 8032f6c: f8d8 3000 ldr.w r3, [r8] 8032f70: 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)) || 8032f74: 2be0 cmp r3, #224 ; 0xe0 8032f76: d108 bne.n 8032f8a (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); 8032f78: 4620 mov r0, r4 8032f7a: f7fc fec7 bl 802fd0c IP_STATS_INC(ip.drop); snmp_inc_ipinaddrerrors(); 8032f7e: f001 fc35 bl 80347ec snmp_inc_ipindiscards(); 8032f82: f001 fc43 bl 803480c return ERR_OK; 8032f86: e063 b.n 8033050 /* 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)) { 8032f88: 463d mov r5, r7 return ERR_OK; } } /* packet not for us? */ if (netif == NULL) { 8032f8a: b93d cbnz r5, 8032f9c /* try to forward IP packet on (other) interfaces */ ip_forward(p, iphdr, inp); } else #endif /* IP_FORWARD */ { snmp_inc_ipinaddrerrors(); 8032f8c: f001 fc2e bl 80347ec snmp_inc_ipindiscards(); 8032f90: f001 fc3c bl 803480c } pbuf_free(p); 8032f94: 4620 mov r0, r4 8032f96: f7fc feb9 bl 802fd0c return ERR_OK; 8032f9a: e059 b.n 8033050 } /* packet consists of multiple fragments? */ if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) { 8032f9c: 88f3 ldrh r3, [r6, #6] 8032f9e: f023 03c0 bic.w r3, r3, #192 ; 0xc0 8032fa2: b29b uxth r3, r3 8032fa4: b12b cbz r3, 8032fb2 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); 8032fa6: 4620 mov r0, r4 8032fa8: f7fc feb0 bl 802fd0c 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(); 8032fac: f001 fc26 bl 80347fc return ERR_OK; 8032fb0: e04e b.n 8033050 /* 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; 8032fb2: 4b2b ldr r3, [pc, #172] ; (8033060 ) 8032fb4: 601f str r7, [r3, #0] current_header = iphdr; 8032fb6: 4b2b ldr r3, [pc, #172] ; (8033064 ) #if LWIP_RAW /* raw input did not eat the packet? */ if (raw_input(p, inp) == 0) 8032fb8: 4620 mov r0, r4 8032fba: 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; 8032fbc: 601e str r6, [r3, #0] #if LWIP_RAW /* raw input did not eat the packet? */ if (raw_input(p, inp) == 0) 8032fbe: f7fd f825 bl 803000c 8032fc2: bb88 cbnz r0, 8033028 #endif /* LWIP_RAW */ { switch (IPH_PROTO(iphdr)) { 8032fc4: 7a73 ldrb r3, [r6, #9] 8032fc6: 2b06 cmp r3, #6 8032fc8: d00b beq.n 8032fe2 8032fca: 2b11 cmp r3, #17 8032fcc: d002 beq.n 8032fd4 8032fce: 2b01 cmp r3, #1 8032fd0: d115 bne.n 8032ffe 8032fd2: e00d b.n 8032ff0 #if LWIP_UDP case IP_PROTO_UDP: #if LWIP_UDPLITE case IP_PROTO_UDPLITE: #endif /* LWIP_UDPLITE */ snmp_inc_ipindelivers(); 8032fd4: f001 fc22 bl 803481c udp_input(p, inp); 8032fd8: 4620 mov r0, r4 8032fda: 4639 mov r1, r7 8032fdc: f7ff fb44 bl 8032668 break; 8032fe0: e022 b.n 8033028 #endif /* LWIP_UDP */ #if LWIP_TCP case IP_PROTO_TCP: snmp_inc_ipindelivers(); 8032fe2: f001 fc1b bl 803481c tcp_input(p, inp); 8032fe6: 4620 mov r0, r4 8032fe8: 4639 mov r1, r7 8032fea: f7fe f8e7 bl 80311bc break; 8032fee: e01b b.n 8033028 #endif /* LWIP_TCP */ #if LWIP_ICMP case IP_PROTO_ICMP: snmp_inc_ipindelivers(); 8032ff0: f001 fc14 bl 803481c icmp_input(p, inp); 8032ff4: 4620 mov r0, r4 8032ff6: 4639 mov r1, r7 8032ff8: f7ff fd20 bl 8032a3c break; 8032ffc: e014 b.n 8033028 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) && 8032ffe: 4d16 ldr r5, [pc, #88] ; (8033058 ) 8033000: 4639 mov r1, r7 8033002: 6828 ldr r0, [r5, #0] 8033004: f7ff fe3e bl 8032c84 8033008: b948 cbnz r0, 803301e !ip_addr_ismulticast(¤t_iphdr_dest)) { 803300a: 682b ldr r3, [r5, #0] 803300c: 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) && 8033010: 2be0 cmp r3, #224 ; 0xe0 8033012: d004 beq.n 803301e !ip_addr_ismulticast(¤t_iphdr_dest)) { p->payload = iphdr; 8033014: 6066 str r6, [r4, #4] icmp_dest_unreach(p, ICMP_DUR_PROTO); 8033016: 4620 mov r0, r4 8033018: 2102 movs r1, #2 803301a: f7ff fda5 bl 8032b68 } #endif /* LWIP_ICMP */ pbuf_free(p); 803301e: 4620 mov r0, r4 8033020: f7fc fe74 bl 802fd0c 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(); 8033024: f001 fbea bl 80347fc } } current_netif = NULL; 8033028: 4a0d ldr r2, [pc, #52] ; (8033060 ) 803302a: 2300 movs r3, #0 803302c: 6013 str r3, [r2, #0] current_header = NULL; 803302e: 4a0d ldr r2, [pc, #52] ; (8033064 ) 8033030: 6013 str r3, [r2, #0] ip_addr_set_any(¤t_iphdr_src); 8033032: 4a0a ldr r2, [pc, #40] ; (803305c ) 8033034: 6013 str r3, [r2, #0] ip_addr_set_any(¤t_iphdr_dest); 8033036: 4a08 ldr r2, [pc, #32] ; (8033058 ) 8033038: 6013 str r3, [r2, #0] return ERR_OK; 803303a: e009 b.n 8033050 * * #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) { 803303c: 7a73 ldrb r3, [r6, #9] 803303e: 2b11 cmp r3, #17 8033040: d089 beq.n 8032f56 #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)) 8033042: f8df 8018 ldr.w r8, [pc, #24] ; 803305c 8033046: f8d8 0000 ldr.w r0, [r8] 803304a: 2800 cmp r0, #0 803304c: d09d beq.n 8032f8a 803304e: e789 b.n 8032f64 current_header = NULL; ip_addr_set_any(¤t_iphdr_src); ip_addr_set_any(¤t_iphdr_dest); return ERR_OK; } 8033050: 2000 movs r0, #0 8033052: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8033056: bf00 nop 8033058: 2000f6e0 .word 0x2000f6e0 803305c: 2000f6d8 .word 0x2000f6d8 8033060: 2000f6dc .word 0x2000f6dc 8033064: 2000f6e4 .word 0x2000f6e4 8033068: 2000f6ac .word 0x2000f6ac 0803306c : */ 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) { 803306c: e92d 47f3 stmdb sp!, {r0, r1, r4, r5, r6, r7, r8, r9, sl, lr} 8033070: 4615 mov r5, r2 8033072: 4606 mov r6, r0 8033074: 4689 mov r9, r1 8033076: 469a mov sl, r3 8033078: 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(); 803307a: f001 fbd7 bl 803482c /* Should the IP header be generated or is it already included in p? */ if (dest != IP_HDRINCL) { 803307e: b3b5 cbz r5, 80330ee } #endif /* CHECKSUM_GEN_IP_INLINE */ } #endif /* IP_OPTIONS_SEND */ /* generate IP header */ if (pbuf_header(p, IP_HLEN)) { 8033080: 4630 mov r0, r6 8033082: 2114 movs r1, #20 8033084: f7fc fe17 bl 802fcb6 8033088: 4680 mov r8, r0 803308a: b118 cbz r0, 8033094 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(); 803308c: f001 fbd6 bl 803483c return ERR_BUF; 8033090: 20fe movs r0, #254 ; 0xfe 8033092: e036 b.n 8033102 } iphdr = (struct ip_hdr *)p->payload; 8033094: 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); 8033096: 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); 803309a: f884 a008 strb.w sl, [r4, #8] IPH_PROTO_SET(iphdr, proto); 803309e: 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); 80330a0: 682b ldr r3, [r5, #0] 80330a2: 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); 80330a4: 2345 movs r3, #69 ; 0x45 80330a6: 7023 strb r3, [r4, #0] IPH_TOS_SET(iphdr, tos); 80330a8: f89d 3028 ldrb.w r3, [sp, #40] ; 0x28 80330ac: 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)); 80330ae: 8930 ldrh r0, [r6, #8] 80330b0: f7fb fcee bl 802ea90 #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_len; #endif /* CHECKSUM_GEN_IP_INLINE */ IPH_OFFSET_SET(iphdr, 0); 80330b4: f884 8006 strb.w r8, [r4, #6] 80330b8: f884 8007 strb.w r8, [r4, #7] IPH_ID_SET(iphdr, htons(ip_id)); 80330bc: f8df 8048 ldr.w r8, [pc, #72] ; 8033108 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)); 80330c0: 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)); 80330c2: f8b8 0000 ldrh.w r0, [r8] 80330c6: f7fb fce3 bl 802ea90 80330ca: 80a0 strh r0, [r4, #4] #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_id; #endif /* CHECKSUM_GEN_IP_INLINE */ ++ip_id; 80330cc: f8b8 3000 ldrh.w r3, [r8] 80330d0: 3301 adds r3, #1 80330d2: f8a8 3000 strh.w r3, [r8] if (ip_addr_isany(src)) { 80330d6: f1b9 0f00 cmp.w r9, #0 80330da: d002 beq.n 80330e2 80330dc: f8d9 3000 ldr.w r3, [r9] 80330e0: b903 cbnz r3, 80330e4 ip_addr_copy(iphdr->src, netif->ip_addr); 80330e2: 687b ldr r3, [r7, #4] } else { /* src cannot be NULL here */ ip_addr_copy(iphdr->src, *src); 80330e4: 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); 80330e6: 2300 movs r3, #0 80330e8: 72a3 strb r3, [r4, #10] 80330ea: 72e3 strb r3, [r4, #11] 80330ec: e004 b.n 80330f8 #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); 80330ee: 6873 ldr r3, [r6, #4] 80330f0: ad02 add r5, sp, #8 80330f2: 691b ldr r3, [r3, #16] 80330f4: 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); 80330f8: 697b ldr r3, [r7, #20] 80330fa: 4638 mov r0, r7 80330fc: 4631 mov r1, r6 80330fe: 462a mov r2, r5 8033100: 4798 blx r3 } 8033102: b240 sxtb r0, r0 8033104: e8bd 87fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, r9, sl, pc} 8033108: 2000c420 .word 0x2000c420 0803310c : * 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) { 803310c: b5f0 push {r4, r5, r6, r7, lr} 803310e: 4605 mov r5, r0 8033110: 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) { 8033112: 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) { 8033114: 460f mov r7, r1 8033116: 4614 mov r4, r2 8033118: 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) { 803311a: f7ff fea3 bl 8032e64 803311e: b168 cbz r0, 803313c 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); 8033120: f89d 3028 ldrb.w r3, [sp, #40] ; 0x28 8033124: 9002 str r0, [sp, #8] 8033126: 9300 str r3, [sp, #0] 8033128: f89d 302c ldrb.w r3, [sp, #44] ; 0x2c 803312c: 4628 mov r0, r5 803312e: 9301 str r3, [sp, #4] 8033130: 4639 mov r1, r7 8033132: 4622 mov r2, r4 8033134: 4633 mov r3, r6 8033136: f7ff ff99 bl 803306c 803313a: e000 b.n 803313e 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; 803313c: 20fc movs r0, #252 ; 0xfc } return ip_output_if(p, src, dest, ttl, tos, proto, netif); } 803313e: b240 sxtb r0, r0 8033140: b005 add sp, #20 8033142: bdf0 pop {r4, r5, r6, r7, pc} 08033144 : * @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) { 8033144: b510 push {r4, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8033146: 2300 movs r3, #0 while (p != NULL) 8033148: e00c b.n 8033164 { base = plen; plen += p->len; 803314a: 8944 ldrh r4, [r0, #10] 803314c: 191c adds r4, r3, r4 803314e: b2a4 uxth r4, r4 if (ofs < plen) 8033150: 42a1 cmp r1, r4 8033152: d205 bcs.n 8033160 { msg_ptr = (u8_t*)p->payload; 8033154: 6840 ldr r0, [r0, #4] msg_ptr += ofs - base; 8033156: 1acb subs r3, r1, r3 *type = *msg_ptr; 8033158: 5cc3 ldrb r3, [r0, r3] return ERR_OK; 803315a: 2000 movs r0, #0 plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; *type = *msg_ptr; 803315c: 7013 strb r3, [r2, #0] return ERR_OK; 803315e: e004 b.n 803316a } p = p->next; 8033160: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8033162: 4623 mov r3, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8033164: 2800 cmp r0, #0 8033166: d1f0 bne.n 803314a return ERR_OK; } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; 8033168: 20f2 movs r0, #242 ; 0xf2 } 803316a: b240 sxtb r0, r0 803316c: bd10 pop {r4, pc} 0803316e : * @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) { 803316e: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8033170: 2500 movs r5, #0 while (p != NULL) 8033172: e079 b.n 8033268 { base = plen; plen += p->len; 8033174: 8944 ldrh r4, [r0, #10] 8033176: 192c adds r4, r5, r4 8033178: b2a4 uxth r4, r4 if (ofs < plen) 803317a: 42a1 cmp r1, r4 803317c: d272 bcs.n 8033264 { msg_ptr = (u8_t*)p->payload; 803317e: f8d0 c004 ldr.w ip, [r0, #4] msg_ptr += ofs - base; 8033182: 1b4f subs r7, r1, r5 8033184: eb0c 0507 add.w r5, ip, r7 if (*msg_ptr < 0x80) 8033188: f81c 6007 ldrb.w r6, [ip, r7] 803318c: f016 0f80 tst.w r6, #128 ; 0x80 8033190: d105 bne.n 803319e { /* primitive definite length format */ *octets_used = 1; 8033192: 2101 movs r1, #1 8033194: 7011 strb r1, [r2, #0] *length = *msg_ptr; 8033196: f81c 2007 ldrb.w r2, [ip, r7] 803319a: 801a strh r2, [r3, #0] 803319c: e05a b.n 8033254 return ERR_OK; } else if (*msg_ptr == 0x80) 803319e: 2e80 cmp r6, #128 ; 0x80 80331a0: d12a bne.n 80331f8 { /* constructed indefinite length format, termination with two zero octets */ u8_t zeros; u8_t i; *length = 0; 80331a2: 2600 movs r6, #0 80331a4: 801e strh r6, [r3, #0] 80331a6: e022 b.n 80331ee { i = 2; while (i > 0) { i--; (*length) += 1; 80331a8: f8b3 c000 ldrh.w ip, [r3] ofs += 1; 80331ac: 3101 adds r1, #1 80331ae: b289 uxth r1, r1 { i = 2; while (i > 0) { i--; (*length) += 1; 80331b0: f10c 0c01 add.w ip, ip, #1 ofs += 1; if (ofs >= plen) 80331b4: 42a1 cmp r1, r4 { i = 2; while (i > 0) { i--; (*length) += 1; 80331b6: f8a3 c000 strh.w ip, [r3] ofs += 1; if (ofs >= plen) 80331ba: d308 bcc.n 80331ce { /* next octet in next pbuf */ p = p->next; 80331bc: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80331be: b900 cbnz r0, 80331c2 80331c0: e04e b.n 8033260 msg_ptr = (u8_t*)p->payload; plen += p->len; 80331c2: 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; 80331c6: 6845 ldr r5, [r0, #4] plen += p->len; 80331c8: 4464 add r4, ip 80331ca: b2a4 uxth r4, r4 80331cc: e000 b.n 80331d0 } else { /* next octet in same pbuf */ msg_ptr++; 80331ce: 3501 adds r5, #1 } if (*msg_ptr == 0) 80331d0: f895 c000 ldrb.w ip, [r5] 80331d4: f1bc 0f00 cmp.w ip, #0 80331d8: d104 bne.n 80331e4 { zeros++; 80331da: 3601 adds r6, #1 80331dc: b2f6 uxtb r6, r6 if (zeros == 2) 80331de: 2e02 cmp r6, #2 80331e0: d101 bne.n 80331e6 80331e2: e007 b.n 80331f4 i = 0; } } else { zeros = 0; 80331e4: 2600 movs r6, #0 *length = 0; zeros = 0; while (zeros != 2) { i = 2; while (i > 0) 80331e6: 42b9 cmp r1, r7 80331e8: d1de bne.n 80331a8 u8_t zeros; u8_t i; *length = 0; zeros = 0; while (zeros != 2) 80331ea: 2e02 cmp r6, #2 80331ec: d002 beq.n 80331f4 * @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) 80331ee: 1c8f adds r7, r1, #2 80331f0: b2bf uxth r7, r7 80331f2: e7d9 b.n 80331a8 { zeros = 0; } } } *octets_used = 1; 80331f4: 2301 movs r3, #1 80331f6: e02c b.n 8033252 return ERR_OK; } else if (*msg_ptr == 0x81) 80331f8: 2e81 cmp r6, #129 ; 0x81 80331fa: d10c bne.n 8033216 { /* constructed definite length format, one octet */ ofs += 1; 80331fc: 3101 adds r1, #1 if (ofs >= plen) 80331fe: b289 uxth r1, r1 8033200: 42a1 cmp r1, r4 8033202: d303 bcc.n 803320c { /* next octet in next pbuf */ p = p->next; 8033204: 6801 ldr r1, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033206: b359 cbz r1, 8033260 msg_ptr = (u8_t*)p->payload; 8033208: 684d ldr r5, [r1, #4] 803320a: e000 b.n 803320e } else { /* next octet in same pbuf */ msg_ptr++; 803320c: 3501 adds r5, #1 } *length = *msg_ptr; 803320e: 7829 ldrb r1, [r5, #0] 8033210: 8019 strh r1, [r3, #0] *octets_used = 2; 8033212: 2302 movs r3, #2 8033214: e01d b.n 8033252 return ERR_OK; } else if (*msg_ptr == 0x82) 8033216: 2e82 cmp r6, #130 ; 0x82 8033218: d11e bne.n 8033258 /* constructed definite length format, two octets */ i = 2; while (i > 0) { i--; ofs += 1; 803321a: 1c4e adds r6, r1, #1 if (ofs >= plen) 803321c: b2b6 uxth r6, r6 803321e: 42a6 cmp r6, r4 8033220: d201 bcs.n 8033226 plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 8033222: 3501 adds r5, #1 8033224: e005 b.n 8033232 i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 8033226: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033228: b1d0 cbz r0, 8033260 msg_ptr = (u8_t*)p->payload; plen += p->len; 803322a: 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; 803322c: 6845 ldr r5, [r0, #4] plen += p->len; 803322e: 19a4 adds r4, r4, r6 8033230: b2a4 uxth r4, r4 *length |= *msg_ptr; } else { /* most significant length octet */ *length = (*msg_ptr) << 8; 8033232: 782e ldrb r6, [r5, #0] /* constructed definite length format, two octets */ i = 2; while (i > 0) { i--; ofs += 1; 8033234: 3102 adds r1, #2 if (ofs >= plen) 8033236: b289 uxth r1, r1 *length |= *msg_ptr; } else { /* most significant length octet */ *length = (*msg_ptr) << 8; 8033238: 0236 lsls r6, r6, #8 i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 803323a: 42a1 cmp r1, r4 *length |= *msg_ptr; } else { /* most significant length octet */ *length = (*msg_ptr) << 8; 803323c: 801e strh r6, [r3, #0] i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 803323e: d201 bcs.n 8033244 plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 8033240: 3501 adds r5, #1 8033242: e002 b.n 803324a i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 8033244: 6801 ldr r1, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033246: b159 cbz r1, 8033260 msg_ptr = (u8_t*)p->payload; 8033248: 684d ldr r5, [r1, #4] msg_ptr++; } if (i == 0) { /* least significant length octet */ *length |= *msg_ptr; 803324a: 7829 ldrb r1, [r5, #0] 803324c: 430e orrs r6, r1 803324e: 801e strh r6, [r3, #0] { /* most significant length octet */ *length = (*msg_ptr) << 8; } } *octets_used = 3; 8033250: 2303 movs r3, #3 8033252: 7013 strb r3, [r2, #0] return ERR_OK; 8033254: 2000 movs r0, #0 8033256: e00a b.n 803326e } 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); 8033258: f006 067f and.w r6, r6, #127 ; 0x7f 803325c: 3601 adds r6, #1 803325e: 7016 strb r6, [r2, #0] return ERR_ARG; 8033260: 20f2 movs r0, #242 ; 0xf2 8033262: e004 b.n 803326e } } p = p->next; 8033264: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8033266: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8033268: 2800 cmp r0, #0 803326a: d183 bne.n 8033174 803326c: e7f8 b.n 8033260 p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 803326e: b240 sxtb r0, r0 8033270: bdf0 pop {r4, r5, r6, r7, pc} 08033272 : * 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) { 8033272: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8033276: 2500 movs r5, #0 while (p != NULL) 8033278: e049 b.n 803330e { base = plen; plen += p->len; 803327a: 8944 ldrh r4, [r0, #10] 803327c: 192c adds r4, r5, r4 803327e: b2a4 uxth r4, r4 if (ofs < plen) 8033280: 42a1 cmp r1, r4 8033282: d242 bcs.n 803330a { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if ((len > 0) && (len < 6)) 8033284: 1e56 subs r6, r2, #1 { base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; 8033286: f8d0 c004 ldr.w ip, [r0, #4] msg_ptr += ofs - base; if ((len > 0) && (len < 6)) 803328a: b2b6 uxth r6, r6 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 803328c: 1b4f subs r7, r1, r5 if ((len > 0) && (len < 6)) 803328e: 2e04 cmp r6, #4 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8033290: eb0c 0507 add.w r5, ip, r7 if ((len > 0) && (len < 6)) 8033294: d901 bls.n 803329a *value |= *msg_ptr; return ERR_OK; } else { return ERR_ARG; 8033296: 20f2 movs r0, #242 ; 0xf2 8033298: e03c b.n 8033314 msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if ((len > 0) && (len < 6)) { /* start from zero */ *value = 0; 803329a: f04f 0800 mov.w r8, #0 803329e: f8c3 8000 str.w r8, [r3] if (*msg_ptr & 0x80) 80332a2: f81c 7007 ldrb.w r7, [ip, r7] 80332a6: f017 0f80 tst.w r7, #128 ; 0x80 80332aa: d1f4 bne.n 8033296 return ERR_ARG; } else { /* positive */ if ((len > 1) && (*msg_ptr == 0)) 80332ac: 2a01 cmp r2, #1 80332ae: d00e beq.n 80332ce 80332b0: b96f cbnz r7, 80332ce { /* skip leading "sign byte" octet 0x00 */ len--; ofs += 1; 80332b2: 3101 adds r1, #1 80332b4: b289 uxth r1, r1 if (ofs >= plen) 80332b6: 42a1 cmp r1, r4 { /* positive */ if ((len > 1) && (*msg_ptr == 0)) { /* skip leading "sign byte" octet 0x00 */ len--; 80332b8: 4632 mov r2, r6 ofs += 1; if (ofs >= plen) 80332ba: d307 bcc.n 80332cc { /* next octet in next pbuf */ p = p->next; 80332bc: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80332be: 2800 cmp r0, #0 80332c0: d0e9 beq.n 8033296 msg_ptr = (u8_t*)p->payload; plen += p->len; 80332c2: 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; 80332c4: 6845 ldr r5, [r0, #4] plen += p->len; 80332c6: 19a4 adds r4, r4, r6 80332c8: b2a4 uxth r4, r4 80332ca: e000 b.n 80332ce } else { /* next octet in same pbuf */ msg_ptr++; 80332cc: 3501 adds r5, #1 80332ce: 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) 80332d0: 188a adds r2, r1, r2 80332d2: b2b6 uxth r6, r6 80332d4: b292 uxth r2, r2 80332d6: e010 b.n 80332fa } /* OR octets with value */ while (len > 1) { len--; *value |= *msg_ptr; 80332d8: 7829 ldrb r1, [r5, #0] 80332da: 430f orrs r7, r1 *value <<= 8; 80332dc: 023f lsls r7, r7, #8 ofs += 1; if (ofs >= plen) 80332de: 42a6 cmp r6, r4 /* OR octets with value */ while (len > 1) { len--; *value |= *msg_ptr; *value <<= 8; 80332e0: 601f str r7, [r3, #0] ofs += 1; if (ofs >= plen) 80332e2: d307 bcc.n 80332f4 { /* next octet in next pbuf */ p = p->next; 80332e4: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80332e6: 2800 cmp r0, #0 80332e8: d0d5 beq.n 8033296 msg_ptr = (u8_t*)p->payload; plen += p->len; 80332ea: 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; 80332ec: 6845 ldr r5, [r0, #4] plen += p->len; 80332ee: 1864 adds r4, r4, r1 80332f0: b2a4 uxth r4, r4 80332f2: e000 b.n 80332f6 } else { /* next octet in same pbuf */ msg_ptr++; 80332f4: 3501 adds r5, #1 80332f6: 3601 adds r6, #1 80332f8: b2b6 uxth r6, r6 msg_ptr++; } } } /* OR octets with value */ while (len > 1) 80332fa: 4296 cmp r6, r2 80332fc: 681f ldr r7, [r3, #0] 80332fe: d1eb bne.n 80332d8 { /* next octet in same pbuf */ msg_ptr++; } } *value |= *msg_ptr; 8033300: 782a ldrb r2, [r5, #0] 8033302: 4317 orrs r7, r2 8033304: 601f str r7, [r3, #0] return ERR_OK; 8033306: 2000 movs r0, #0 8033308: e004 b.n 8033314 else { return ERR_ARG; } } p = p->next; 803330a: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 803330c: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 803330e: 2800 cmp r0, #0 8033310: d1b3 bne.n 803327a 8033312: e7c0 b.n 8033296 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 8033314: b240 sxtb r0, r0 8033316: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 0803331a : * * @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) { 803331a: 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; 803331e: 2500 movs r5, #0 while (p != NULL) 8033320: e04e b.n 80333c0 { base = plen; plen += p->len; 8033322: 8944 ldrh r4, [r0, #10] 8033324: 192c adds r4, r5, r4 8033326: b2a4 uxth r4, r4 if (ofs < plen) 8033328: 42a1 cmp r1, r4 803332a: d247 bcs.n 80333bc { msg_ptr = (u8_t*)p->payload; 803332c: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; if ((len > 0) && (len < 5)) 803332e: 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; 8033332: 1b4e subs r6, r1, r5 if ((len > 0) && (len < 5)) 8033334: f1bc 0f03 cmp.w ip, #3 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8033338: eb07 0506 add.w r5, r7, r6 if ((len > 0) && (len < 5)) 803333c: d901 bls.n 8033342 } return ERR_OK; } else { return ERR_ARG; 803333e: 20f2 movs r0, #242 ; 0xf2 8033340: e041 b.n 80333c6 { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if ((len > 0) && (len < 5)) { if (*msg_ptr & 0x80) 8033342: 57be ldrsb r6, [r7, r6] 8033344: 2e00 cmp r6, #0 8033346: da0b bge.n 8033360 { /* negative, start from -1 */ *value = -1; 8033348: f04f 36ff mov.w r6, #4294967295 803334c: 601e str r6, [r3, #0] sign = 1; 803334e: 2601 movs r6, #1 8033350: 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) 8033354: 1852 adds r2, r2, r1 8033356: fa1f fc8c uxth.w ip, ip 803335a: b292 uxth r2, r2 len--; if (sign) { *lsb_ptr &= *msg_ptr; *value <<= 8; *lsb_ptr |= 255; 803335c: 21ff movs r1, #255 ; 0xff 803335e: e022 b.n 80333a6 sign = 1; } else { /* positive, start from 0 */ *value = 0; 8033360: 2600 movs r6, #0 8033362: 601e str r6, [r3, #0] 8033364: e7f4 b.n 8033350 8033366: f895 8000 ldrb.w r8, [r5] } /* OR/AND octets with value */ while (len > 1) { len--; if (sign) 803336a: b13e cbz r6, 803337c { *lsb_ptr &= *msg_ptr; 803336c: ea08 0707 and.w r7, r8, r7 8033370: 701f strb r7, [r3, #0] *value <<= 8; 8033372: 681f ldr r7, [r3, #0] 8033374: 023f lsls r7, r7, #8 8033376: 601f str r7, [r3, #0] *lsb_ptr |= 255; 8033378: 7019 strb r1, [r3, #0] 803337a: e005 b.n 8033388 } else { *lsb_ptr |= *msg_ptr; 803337c: ea48 0707 orr.w r7, r8, r7 8033380: 701f strb r7, [r3, #0] *value <<= 8; 8033382: 681f ldr r7, [r3, #0] 8033384: 023f lsls r7, r7, #8 8033386: 601f str r7, [r3, #0] } ofs += 1; if (ofs >= plen) 8033388: 45a4 cmp ip, r4 803338a: d307 bcc.n 803339c { /* next octet in next pbuf */ p = p->next; 803338c: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 803338e: 2800 cmp r0, #0 8033390: d0d5 beq.n 803333e msg_ptr = (u8_t*)p->payload; plen += p->len; 8033392: 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; 8033394: 6845 ldr r5, [r0, #4] plen += p->len; 8033396: 19e4 adds r4, r4, r7 8033398: b2a4 uxth r4, r4 803339a: e000 b.n 803339e } else { /* next octet in same pbuf */ msg_ptr++; 803339c: 3501 adds r5, #1 803339e: f10c 0c01 add.w ip, ip, #1 80333a2: fa1f fc8c uxth.w ip, ip /* positive, start from 0 */ *value = 0; sign = 0; } /* OR/AND octets with value */ while (len > 1) 80333a6: 4594 cmp ip, r2 80333a8: 781f ldrb r7, [r3, #0] 80333aa: d1dc bne.n 8033366 80333ac: 782a ldrb r2, [r5, #0] { /* next octet in same pbuf */ msg_ptr++; } } if (sign) 80333ae: b11e cbz r6, 80333b8 { *lsb_ptr &= *msg_ptr; 80333b0: 4017 ands r7, r2 80333b2: 701f strb r7, [r3, #0] } else { *lsb_ptr |= *msg_ptr; } return ERR_OK; 80333b4: 2000 movs r0, #0 80333b6: e006 b.n 80333c6 { *lsb_ptr &= *msg_ptr; } else { *lsb_ptr |= *msg_ptr; 80333b8: 4317 orrs r7, r2 80333ba: e7fa b.n 80333b2 else { return ERR_ARG; } } p = p->next; 80333bc: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 80333be: 4625 mov r5, r4 u8_t *lsb_ptr = (u8_t*)value + sizeof(s32_t) - 1; #endif u8_t sign; plen = 0; while (p != NULL) 80333c0: 2800 cmp r0, #0 80333c2: d1ae bne.n 8033322 80333c4: e7bb b.n 803333e } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 80333c6: b240 sxtb r0, r0 80333c8: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 080333cc : * @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) { 80333cc: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} u16_t plen, base; u8_t *msg_ptr; s32_t *oid_ptr; plen = 0; 80333d0: 2600 movs r6, #0 while (p != NULL) 80333d2: e08d b.n 80334f0 { base = plen; plen += p->len; 80333d4: 8944 ldrh r4, [r0, #10] 80333d6: 1934 adds r4, r6, r4 80333d8: b2a4 uxth r4, r4 if (ofs < plen) 80333da: 42a1 cmp r1, r4 80333dc: f080 8086 bcs.w 80334ec { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; oid->len = 0; 80333e0: f04f 0800 mov.w r8, #0 { base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; 80333e4: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; oid->len = 0; 80333e6: f883 8000 strb.w r8, [r3] oid_ptr = &oid->id[0]; if (len > 0) 80333ea: b90a cbnz r2, 80333f0 } else { /* accepting zero length identifiers e.g. for getnext operation. uncommon but valid */ return ERR_OK; 80333ec: 2000 movs r0, #0 80333ee: e083 b.n 80334f8 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 80333f0: 1b8e subs r6, r1, r6 80333f2: 19bd adds r5, r7, r6 oid->len = 0; oid_ptr = &oid->id[0]; if (len > 0) { /* first compressed octet */ if (*msg_ptr == 0x2B) 80333f4: f817 c006 ldrb.w ip, [r7, r6] 80333f8: f1bc 0f2b cmp.w ip, #43 ; 0x2b 80333fc: d103 bne.n 8033406 { /* (most) common case 1.3 (iso.org) */ *oid_ptr = 1; 80333fe: 2601 movs r6, #1 8033400: 605e str r6, [r3, #4] oid_ptr++; *oid_ptr = 3; 8033402: 2603 movs r6, #3 8033404: e016 b.n 8033434 oid_ptr++; } else if (*msg_ptr < 40) 8033406: f1bc 0f27 cmp.w ip, #39 ; 0x27 803340a: d803 bhi.n 8033414 { *oid_ptr = 0; 803340c: f8c3 8004 str.w r8, [r3, #4] oid_ptr++; *oid_ptr = *msg_ptr; 8033410: 5dbe ldrb r6, [r7, r6] 8033412: e00f b.n 8033434 oid_ptr++; } else if (*msg_ptr < 80) 8033414: f1bc 0f4f cmp.w ip, #79 ; 0x4f 8033418: d806 bhi.n 8033428 { *oid_ptr = 1; 803341a: f04f 0c01 mov.w ip, #1 803341e: f8c3 c004 str.w ip, [r3, #4] oid_ptr++; *oid_ptr = (*msg_ptr) - 40; 8033422: 5dbe ldrb r6, [r7, r6] 8033424: 3e28 subs r6, #40 ; 0x28 8033426: e005 b.n 8033434 oid_ptr++; } else { *oid_ptr = 2; 8033428: f04f 0c02 mov.w ip, #2 803342c: f8c3 c004 str.w ip, [r3, #4] oid_ptr++; *oid_ptr = (*msg_ptr) - 80; 8033430: 5dbe ldrb r6, [r7, r6] 8033432: 3e50 subs r6, #80 ; 0x50 { /* accepting zero length identifiers e.g. for getnext operation. uncommon but valid */ return ERR_OK; } len--; 8033434: 3a01 subs r2, #1 *oid_ptr = 2; oid_ptr++; *oid_ptr = (*msg_ptr) - 80; oid_ptr++; } oid->len = 2; 8033436: 2702 movs r7, #2 { /* accepting zero length identifiers e.g. for getnext operation. uncommon but valid */ return ERR_OK; } len--; 8033438: b292 uxth r2, r2 } else { *oid_ptr = 2; oid_ptr++; *oid_ptr = (*msg_ptr) - 80; 803343a: 609e str r6, [r3, #8] oid_ptr++; } oid->len = 2; 803343c: 701f strb r7, [r3, #0] else { *oid_ptr = 2; oid_ptr++; *oid_ptr = (*msg_ptr) - 80; oid_ptr++; 803343e: 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) 8033442: 2a00 cmp r2, #0 8033444: d04b beq.n 80334de { ofs += 1; 8033446: 3101 adds r1, #1 8033448: b289 uxth r1, r1 if (ofs >= plen) 803344a: 42a1 cmp r1, r4 803344c: d308 bcc.n 8033460 { /* next octet in next pbuf */ p = p->next; 803344e: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033450: b908 cbnz r0, 8033456 8033452: 20f2 movs r0, #242 ; 0xf2 8033454: e050 b.n 80334f8 msg_ptr = (u8_t*)p->payload; plen += p->len; 8033456: 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; 8033458: 6845 ldr r5, [r0, #4] plen += p->len; 803345a: 19e4 adds r4, r4, r7 803345c: b2a4 uxth r4, r4 803345e: e03e b.n 80334de } else { /* next octet in same pbuf */ msg_ptr++; 8033460: 3501 adds r5, #1 8033462: e03c b.n 80334de } } while ((len > 0) && (oid->len < LWIP_SNMP_OBJ_ID_LEN)) { /* sub-identifier uses multiple octets */ if (*msg_ptr & 0x80) 8033464: 782f ldrb r7, [r5, #0] 8033466: f017 0f80 tst.w r7, #128 ; 0x80 803346a: d023 beq.n 80334b4 803346c: e014 b.n 8033498 while ((*msg_ptr & 0x80) && (len > 1)) { len--; sub_id = (sub_id << 7) + (*msg_ptr & ~0x80); ofs += 1; 803346e: 3101 adds r1, #1 8033470: b289 uxth r1, r1 { s32_t sub_id = 0; while ((*msg_ptr & 0x80) && (len > 1)) { len--; 8033472: 3a01 subs r2, #1 sub_id = (sub_id << 7) + (*msg_ptr & ~0x80); 8033474: f02c 0c80 bic.w ip, ip, #128 ; 0x80 ofs += 1; if (ofs >= plen) 8033478: 42a1 cmp r1, r4 { s32_t sub_id = 0; while ((*msg_ptr & 0x80) && (len > 1)) { len--; 803347a: b292 uxth r2, r2 sub_id = (sub_id << 7) + (*msg_ptr & ~0x80); 803347c: eb0c 17c7 add.w r7, ip, r7, lsl #7 ofs += 1; if (ofs >= plen) 8033480: d308 bcc.n 8033494 { /* next octet in next pbuf */ p = p->next; 8033482: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033484: 2800 cmp r0, #0 8033486: d0e4 beq.n 8033452 msg_ptr = (u8_t*)p->payload; plen += p->len; 8033488: 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; 803348c: 6845 ldr r5, [r0, #4] plen += p->len; 803348e: 4464 add r4, ip 8033490: b2a4 uxth r4, r4 8033492: e002 b.n 803349a } else { /* next octet in same pbuf */ msg_ptr++; 8033494: 3501 adds r5, #1 8033496: e000 b.n 803349a } } while ((len > 0) && (oid->len < LWIP_SNMP_OBJ_ID_LEN)) { /* sub-identifier uses multiple octets */ if (*msg_ptr & 0x80) 8033498: 2700 movs r7, #0 { s32_t sub_id = 0; while ((*msg_ptr & 0x80) && (len > 1)) 803349a: f895 c000 ldrb.w ip, [r5] 803349e: f01c 0f80 tst.w ip, #128 ; 0x80 80334a2: d02c beq.n 80334fe 80334a4: 2a01 cmp r2, #1 80334a6: d1e2 bne.n 803346e 80334a8: e009 b.n 80334be } } if (!(*msg_ptr & 0x80) && (len > 0)) { /* last octet sub-identifier */ len--; 80334aa: 3a01 subs r2, #1 80334ac: b292 uxth r2, r2 sub_id = (sub_id << 7) + *msg_ptr; 80334ae: eb0c 17c7 add.w r7, ip, r7, lsl #7 80334b2: e001 b.n 80334b8 } } else { /* !(*msg_ptr & 0x80) sub-identifier uses single octet */ len--; 80334b4: 3a01 subs r2, #1 80334b6: b292 uxth r2, r2 *oid_ptr = *msg_ptr; 80334b8: f846 7c04 str.w r7, [r6, #-4] } if (len > 0) 80334bc: b162 cbz r2, 80334d8 { /* remaining oid bytes available ... */ ofs += 1; 80334be: 3101 adds r1, #1 80334c0: b289 uxth r1, r1 if (ofs >= plen) 80334c2: 42a1 cmp r1, r4 80334c4: d307 bcc.n 80334d6 { /* next octet in next pbuf */ p = p->next; 80334c6: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80334c8: 2800 cmp r0, #0 80334ca: d0c2 beq.n 8033452 msg_ptr = (u8_t*)p->payload; plen += p->len; 80334cc: 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; 80334ce: 6845 ldr r5, [r0, #4] plen += p->len; 80334d0: 19e4 adds r4, r4, r7 80334d2: b2a4 uxth r4, r4 80334d4: e000 b.n 80334d8 } else { /* next octet in same pbuf */ msg_ptr++; 80334d6: 3501 adds r5, #1 } } oid_ptr++; oid->len++; 80334d8: 781f ldrb r7, [r3, #0] 80334da: 3701 adds r7, #1 80334dc: 701f strb r7, [r3, #0] 80334de: 3604 adds r6, #4 { /* next octet in same pbuf */ msg_ptr++; } } while ((len > 0) && (oid->len < LWIP_SNMP_OBJ_ID_LEN)) 80334e0: 2a00 cmp r2, #0 80334e2: d083 beq.n 80333ec 80334e4: 781f ldrb r7, [r3, #0] 80334e6: 2f1f cmp r7, #31 80334e8: d9bc bls.n 8033464 80334ea: e7b2 b.n 8033452 /* len > 0, oid->len == LWIP_SNMP_OBJ_ID_LEN or malformed encoding */ return ERR_ARG; } } p = p->next; 80334ec: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 80334ee: 4626 mov r6, r4 u16_t plen, base; u8_t *msg_ptr; s32_t *oid_ptr; plen = 0; while (p != NULL) 80334f0: 2800 cmp r0, #0 80334f2: f47f af6f bne.w 80333d4 80334f6: e7ac b.n 8033452 80334f8: b240 sxtb r0, r0 80334fa: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} { /* next octet in same pbuf */ msg_ptr++; } } if (!(*msg_ptr & 0x80) && (len > 0)) 80334fe: 2a00 cmp r2, #0 8033500: d1d3 bne.n 80334aa 8033502: e7e9 b.n 80334d8 08033504 : * @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) { 8033504: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; if (len > 0) 8033506: 2a00 cmp r2, #0 8033508: d12d bne.n 8033566 803350a: e027 b.n 803355c { plen = 0; while (p != NULL) { base = plen; plen += p->len; 803350c: 8944 ldrh r4, [r0, #10] 803350e: 1934 adds r4, r6, r4 8033510: b2a4 uxth r4, r4 if (ofs < plen) 8033512: 42a1 cmp r1, r4 8033514: d224 bcs.n 8033560 { msg_ptr = (u8_t*)p->payload; 8033516: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 8033518: 1b8d subs r5, r1, r6 if (raw_len >= len) 803351a: 4293 cmp r3, r2 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 803351c: 443d add r5, r7 if (raw_len >= len) 803351e: d305 bcc.n 803352c 8033520: 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) 8033522: b29e uxth r6, r3 8033524: 18b2 adds r2, r6, r2 8033526: b292 uxth r2, r2 8033528: 1b89 subs r1, r1, r6 803352a: e011 b.n 8033550 return ERR_OK; } else { /* raw_len < len, not enough dst space */ return ERR_ARG; 803352c: 20f2 movs r0, #242 ; 0xf2 803352e: e01e b.n 803356e { while (len > 1) { /* copy len - 1 octets */ len--; *raw = *msg_ptr; 8033530: 782e ldrb r6, [r5, #0] 8033532: 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) 8033536: 18ce adds r6, r1, r3 /* copy len - 1 octets */ len--; *raw = *msg_ptr; raw++; ofs += 1; if (ofs >= plen) 8033538: b2b6 uxth r6, r6 803353a: 42a6 cmp r6, r4 803353c: d307 bcc.n 803354e { /* next octet in next pbuf */ p = p->next; 803353e: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033540: 2800 cmp r0, #0 8033542: d0f3 beq.n 803352c msg_ptr = (u8_t*)p->payload; plen += p->len; 8033544: 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; 8033546: 6845 ldr r5, [r0, #4] plen += p->len; 8033548: 19a4 adds r4, r4, r6 803354a: b2a4 uxth r4, r4 803354c: e000 b.n 8033550 } else { /* next octet in same pbuf */ msg_ptr++; 803354e: 3501 adds r5, #1 { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if (raw_len >= len) { while (len > 1) 8033550: 1ad7 subs r7, r2, r3 8033552: b2bf uxth r7, r7 8033554: 2f01 cmp r7, #1 8033556: d8eb bhi.n 8033530 /* next octet in same pbuf */ msg_ptr++; } } /* copy last octet */ *raw = *msg_ptr; 8033558: 782a ldrb r2, [r5, #0] 803355a: 701a strb r2, [r3, #0] return ERR_OK; 803355c: 2000 movs r0, #0 803355e: e006 b.n 803356e { /* raw_len < len, not enough dst space */ return ERR_ARG; } } p = p->next; 8033560: 6800 ldr r0, [r0, #0] { plen = 0; while (p != NULL) { base = plen; plen += p->len; 8033562: 4626 mov r6, r4 8033564: e000 b.n 8033568 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) 8033566: 2600 movs r6, #0 { plen = 0; while (p != NULL) 8033568: 2800 cmp r0, #0 803356a: d1cf bne.n 803350c 803356c: e7de b.n 803352c else { /* len == 0, empty string */ return ERR_OK; } } 803356e: b240 sxtb r0, r0 8033570: bdf0 pop {r4, r5, r6, r7, pc} 08033572 : * @param octets_needed points to the return value */ void snmp_asn1_enc_length_cnt(u16_t length, u8_t *octets_needed) { if (length < 0x80U) 8033572: 287f cmp r0, #127 ; 0x7f 8033574: d801 bhi.n 803357a { *octets_needed = 1; 8033576: 2301 movs r3, #1 8033578: e004 b.n 8033584 } else if (length < 0x100U) 803357a: 28ff cmp r0, #255 ; 0xff 803357c: d801 bhi.n 8033582 { *octets_needed = 2; 803357e: 2302 movs r3, #2 8033580: e000 b.n 8033584 } else { *octets_needed = 3; 8033582: 2303 movs r3, #3 8033584: 700b strb r3, [r1, #0] 8033586: 4770 bx lr 08033588 : * 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) 8033588: 287f cmp r0, #127 ; 0x7f 803358a: d801 bhi.n 8033590 { *octets_needed = 1; 803358c: 2301 movs r3, #1 803358e: e00e b.n 80335ae } else if (value < 0x8000UL) 8033590: f5b0 4f00 cmp.w r0, #32768 ; 0x8000 8033594: d201 bcs.n 803359a { *octets_needed = 2; 8033596: 2302 movs r3, #2 8033598: e009 b.n 80335ae } else if (value < 0x800000UL) 803359a: f5b0 0f00 cmp.w r0, #8388608 ; 0x800000 803359e: d201 bcs.n 80335a4 { *octets_needed = 3; 80335a0: 2303 movs r3, #3 80335a2: e004 b.n 80335ae } else if (value < 0x80000000UL) 80335a4: 2800 cmp r0, #0 80335a6: db01 blt.n 80335ac { *octets_needed = 4; 80335a8: 2304 movs r3, #4 80335aa: e000 b.n 80335ae } else { *octets_needed = 5; 80335ac: 2305 movs r3, #5 80335ae: 800b strh r3, [r1, #0] 80335b0: 4770 bx lr 080335b2 : void snmp_asn1_enc_s32t_cnt(s32_t value, u16_t *octets_needed) { if (value < 0) { value = ~value; 80335b2: 43c3 mvns r3, r0 80335b4: 4283 cmp r3, r0 80335b6: bfa8 it ge 80335b8: 4618 movge r0, r3 } if (value < 0x80L) 80335ba: 287f cmp r0, #127 ; 0x7f 80335bc: dc01 bgt.n 80335c2 { *octets_needed = 1; 80335be: 2301 movs r3, #1 80335c0: e00a b.n 80335d8 } else if (value < 0x8000L) 80335c2: f5b0 4f00 cmp.w r0, #32768 ; 0x8000 80335c6: da01 bge.n 80335cc { *octets_needed = 2; 80335c8: 2302 movs r3, #2 80335ca: e005 b.n 80335d8 } else if (value < 0x800000L) 80335cc: f5b0 0f00 cmp.w r0, #8388608 ; 0x800000 80335d0: da01 bge.n 80335d6 { *octets_needed = 3; 80335d2: 2303 movs r3, #3 80335d4: e000 b.n 80335d8 } else { *octets_needed = 4; 80335d6: 2304 movs r3, #4 80335d8: 800b strh r3, [r1, #0] 80335da: 4770 bx lr 080335dc : { s32_t sub_id; u8_t cnt; cnt = 0; if (ident_len > 1) 80335dc: 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) { 80335de: b510 push {r4, lr} s32_t sub_id; u8_t cnt; cnt = 0; if (ident_len > 1) 80335e0: d904 bls.n 80335ec { /* compressed prefix in one octet */ cnt++; ident_len -= 2; 80335e2: 3802 subs r0, #2 80335e4: b2c0 uxtb r0, r0 ident += 2; 80335e6: 3108 adds r1, #8 cnt = 0; if (ident_len > 1) { /* compressed prefix in one octet */ cnt++; 80335e8: 2301 movs r3, #1 80335ea: e000 b.n 80335ee 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; 80335ec: 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) 80335ee: 3904 subs r1, #4 80335f0: e008 b.n 8033604 ident_len -= 2; ident += 2; } while(ident_len > 0) { ident_len--; 80335f2: 3801 subs r0, #1 sub_id = *ident; 80335f4: f851 4f04 ldr.w r4, [r1, #4]! ident_len -= 2; ident += 2; } while(ident_len > 0) { ident_len--; 80335f8: b2c0 uxtb r0, r0 sub_id >>= 7; cnt++; while(sub_id > 0) { sub_id >>= 7; 80335fa: 11e4 asrs r4, r4, #7 cnt++; 80335fc: 3301 adds r3, #1 ident_len--; sub_id = *ident; sub_id >>= 7; cnt++; while(sub_id > 0) 80335fe: 2c00 cmp r4, #0 { sub_id >>= 7; cnt++; 8033600: b2db uxtb r3, r3 ident_len--; sub_id = *ident; sub_id >>= 7; cnt++; while(sub_id > 0) 8033602: dcfa bgt.n 80335fa /* compressed prefix in one octet */ cnt++; ident_len -= 2; ident += 2; } while(ident_len > 0) 8033604: 2800 cmp r0, #0 8033606: d1f4 bne.n 80335f2 sub_id >>= 7; cnt++; } ident++; } *octets_needed = cnt; 8033608: 8013 strh r3, [r2, #0] 803360a: bd10 pop {r4, pc} 0803360c : * @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) { 803360c: b510 push {r4, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 803360e: 2300 movs r3, #0 while (p != NULL) 8033610: e00b b.n 803362a { base = plen; plen += p->len; 8033612: 8944 ldrh r4, [r0, #10] 8033614: 191c adds r4, r3, r4 8033616: b2a4 uxth r4, r4 if (ofs < plen) 8033618: 42a1 cmp r1, r4 803361a: d204 bcs.n 8033626 { msg_ptr = (u8_t*)p->payload; 803361c: 6840 ldr r0, [r0, #4] msg_ptr += ofs - base; 803361e: 1acb subs r3, r1, r3 *msg_ptr = type; 8033620: 54c2 strb r2, [r0, r3] return ERR_OK; 8033622: 2000 movs r0, #0 8033624: e004 b.n 8033630 } p = p->next; 8033626: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8033628: 4623 mov r3, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 803362a: 2800 cmp r0, #0 803362c: d1f1 bne.n 8033612 return ERR_OK; } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; 803362e: 20f2 movs r0, #242 ; 0xf2 } 8033630: b240 sxtb r0, r0 8033632: bd10 pop {r4, pc} 08033634 : * @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) { 8033634: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8033636: 2400 movs r4, #0 while (p != NULL) 8033638: e03f b.n 80336ba { base = plen; plen += p->len; 803363a: 8943 ldrh r3, [r0, #10] 803363c: 18e3 adds r3, r4, r3 803363e: b29b uxth r3, r3 if (ofs < plen) 8033640: 4299 cmp r1, r3 8033642: d238 bcs.n 80336b6 { msg_ptr = (u8_t*)p->payload; 8033644: 6845 ldr r5, [r0, #4] msg_ptr += ofs - base; 8033646: 1b0c subs r4, r1, r4 if (length < 0x80) 8033648: 2a7f cmp r2, #127 ; 0x7f base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 803364a: eb05 0604 add.w r6, r5, r4 if (length < 0x80) 803364e: d801 bhi.n 8033654 { *msg_ptr = (u8_t)length; 8033650: 552a strb r2, [r5, r4] 8033652: e02e b.n 80336b2 return ERR_OK; } else if (length < 0x100) 8033654: 2aff cmp r2, #255 ; 0xff 8033656: f101 0701 add.w r7, r1, #1 803365a: d80d bhi.n 8033678 { *msg_ptr = 0x81; ofs += 1; if (ofs >= plen) 803365c: b2bf uxth r7, r7 *msg_ptr = (u8_t)length; return ERR_OK; } else if (length < 0x100) { *msg_ptr = 0x81; 803365e: 2181 movs r1, #129 ; 0x81 ofs += 1; if (ofs >= plen) 8033660: 429f cmp r7, r3 *msg_ptr = (u8_t)length; return ERR_OK; } else if (length < 0x100) { *msg_ptr = 0x81; 8033662: 5529 strb r1, [r5, r4] ofs += 1; if (ofs >= plen) 8033664: d305 bcc.n 8033672 { /* next octet in next pbuf */ p = p->next; 8033666: 6803 ldr r3, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033668: b90b cbnz r3, 803366e 803366a: 20f2 movs r0, #242 ; 0xf2 803366c: e028 b.n 80336c0 msg_ptr = (u8_t*)p->payload; 803366e: 685e ldr r6, [r3, #4] 8033670: e000 b.n 8033674 } else { /* next octet in same pbuf */ msg_ptr++; 8033672: 3601 adds r6, #1 } *msg_ptr = (u8_t)length; 8033674: 7032 strb r2, [r6, #0] 8033676: e01c b.n 80336b2 i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 8033678: b2bf uxth r7, r7 else { u8_t i; /* length >= 0x100 && length <= 0xFFFF */ *msg_ptr = 0x82; 803367a: f04f 0c82 mov.w ip, #130 ; 0x82 i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 803367e: 429f cmp r7, r3 else { u8_t i; /* length >= 0x100 && length <= 0xFFFF */ *msg_ptr = 0x82; 8033680: f805 c004 strb.w ip, [r5, r4] i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 8033684: d201 bcs.n 803368a plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 8033686: 1c74 adds r4, r6, #1 8033688: e006 b.n 8033698 i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 803368a: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 803368c: 2800 cmp r0, #0 803368e: d0ec beq.n 803366a msg_ptr = (u8_t*)p->payload; plen += p->len; 8033690: 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; 8033692: 6844 ldr r4, [r0, #4] plen += p->len; 8033694: 195b adds r3, r3, r5 8033696: b29b uxth r3, r3 *msg_ptr = 0x82; i = 2; while (i > 0) { i--; ofs += 1; 8033698: 3102 adds r1, #2 if (ofs >= plen) 803369a: b289 uxth r1, r1 *msg_ptr = (u8_t)length; } else { /* most significant length octet */ *msg_ptr = (u8_t)(length >> 8); 803369c: 0a15 lsrs r5, r2, #8 i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 803369e: 4299 cmp r1, r3 *msg_ptr = (u8_t)length; } else { /* most significant length octet */ *msg_ptr = (u8_t)(length >> 8); 80336a0: 7025 strb r5, [r4, #0] i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 80336a2: d201 bcs.n 80336a8 plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 80336a4: 3401 adds r4, #1 80336a6: e003 b.n 80336b0 i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 80336a8: 6803 ldr r3, [r0, #0] if (p == NULL) { return ERR_ARG; } 80336aa: 2b00 cmp r3, #0 80336ac: d0dd beq.n 803366a msg_ptr = (u8_t*)p->payload; 80336ae: 685c ldr r4, [r3, #4] msg_ptr++; } if (i == 0) { /* least significant length octet */ *msg_ptr = (u8_t)length; 80336b0: 7022 strb r2, [r4, #0] { /* most significant length octet */ *msg_ptr = (u8_t)(length >> 8); } } return ERR_OK; 80336b2: 2000 movs r0, #0 80336b4: e004 b.n 80336c0 } } p = p->next; 80336b6: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 80336b8: 461c mov r4, r3 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 80336ba: 2800 cmp r0, #0 80336bc: d1bd bne.n 803363a 80336be: e7d4 b.n 803366a } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 80336c0: b240 sxtb r0, r0 80336c2: bdf0 pop {r4, r5, r6, r7, pc} 080336c4 : * * @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) { 80336c4: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 80336c6: 2500 movs r5, #0 while (p != NULL) 80336c8: e037 b.n 803373a { base = plen; plen += p->len; 80336ca: 8944 ldrh r4, [r0, #10] 80336cc: 192c adds r4, r5, r4 80336ce: b2a4 uxth r4, r4 if (ofs < plen) 80336d0: 42a1 cmp r1, r4 80336d2: d230 bcs.n 8033736 { msg_ptr = (u8_t*)p->payload; 80336d4: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 80336d6: 1b4e subs r6, r1, r5 if (octets_needed == 5) 80336d8: 2a05 cmp r2, #5 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 80336da: eb07 0506 add.w r5, r7, r6 if (octets_needed == 5) 80336de: d110 bne.n 8033702 { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; *msg_ptr = 0x00; ofs += 1; 80336e0: 3101 adds r1, #1 80336e2: b289 uxth r1, r1 if (octets_needed == 5) { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; *msg_ptr = 0x00; 80336e4: 2200 movs r2, #0 ofs += 1; if (ofs >= plen) 80336e6: 42a1 cmp r1, r4 if (octets_needed == 5) { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; *msg_ptr = 0x00; 80336e8: 55ba strb r2, [r7, r6] ofs += 1; if (ofs >= plen) 80336ea: d308 bcc.n 80336fe { /* next octet in next pbuf */ p = p->next; 80336ec: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80336ee: b908 cbnz r0, 80336f4 80336f0: 20f2 movs r0, #242 ; 0xf2 80336f2: e025 b.n 8033740 msg_ptr = (u8_t*)p->payload; plen += p->len; 80336f4: 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; 80336f6: 6845 ldr r5, [r0, #4] plen += p->len; 80336f8: 18a4 adds r4, r4, r2 80336fa: b2a4 uxth r4, r4 80336fc: e000 b.n 8033700 } else { /* next octet in same pbuf */ msg_ptr++; 80336fe: 3501 adds r5, #1 msg_ptr += ofs - base; if (octets_needed == 5) { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; 8033700: 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) 8033702: 1851 adds r1, r2, r1 8033704: e012 b.n 803372c msg_ptr++; } } while (octets_needed > 1) { octets_needed--; 8033706: 3a01 subs r2, #1 8033708: b292 uxth r2, r2 *msg_ptr = (u8_t)(value >> (octets_needed << 3)); 803370a: 00d6 lsls r6, r2, #3 803370c: fa23 f606 lsr.w r6, r3, r6 8033710: 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) 8033712: 1a8e subs r6, r1, r2 while (octets_needed > 1) { octets_needed--; *msg_ptr = (u8_t)(value >> (octets_needed << 3)); ofs += 1; if (ofs >= plen) 8033714: b2b6 uxth r6, r6 8033716: 42a6 cmp r6, r4 8033718: d307 bcc.n 803372a { /* next octet in next pbuf */ p = p->next; 803371a: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 803371c: 2800 cmp r0, #0 803371e: d0e7 beq.n 80336f0 msg_ptr = (u8_t*)p->payload; plen += p->len; 8033720: 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; 8033722: 6845 ldr r5, [r0, #4] plen += p->len; 8033724: 19a4 adds r4, r4, r6 8033726: b2a4 uxth r4, r4 8033728: e000 b.n 803372c } else { /* next octet in same pbuf */ msg_ptr++; 803372a: 3501 adds r5, #1 { /* next octet in same pbuf */ msg_ptr++; } } while (octets_needed > 1) 803372c: 2a01 cmp r2, #1 803372e: d8ea bhi.n 8033706 /* next octet in same pbuf */ msg_ptr++; } } /* (only) one least significant octet */ *msg_ptr = (u8_t)value; 8033730: 702b strb r3, [r5, #0] return ERR_OK; 8033732: 2000 movs r0, #0 8033734: e004 b.n 8033740 } p = p->next; 8033736: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8033738: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 803373a: 2800 cmp r0, #0 803373c: d1c5 bne.n 80336ca 803373e: e7d7 b.n 80336f0 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 8033740: b240 sxtb r0, r0 8033742: bdf0 pop {r4, r5, r6, r7, pc} 08033744 : * * @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) { 8033744: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8033746: 2600 movs r6, #0 while (p != NULL) 8033748: e024 b.n 8033794 { base = plen; plen += p->len; 803374a: 8944 ldrh r4, [r0, #10] 803374c: 1934 adds r4, r6, r4 803374e: b2a4 uxth r4, r4 if (ofs < plen) 8033750: 42a1 cmp r1, r4 8033752: d21d bcs.n 8033790 { msg_ptr = (u8_t*)p->payload; 8033754: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 8033756: 1b8d subs r5, r1, r6 8033758: 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) 803375a: 1851 adds r1, r2, r1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (octets_needed > 1) 803375c: e013 b.n 8033786 { octets_needed--; 803375e: 3a01 subs r2, #1 8033760: b292 uxth r2, r2 *msg_ptr = (u8_t)(value >> (octets_needed << 3)); 8033762: 00d6 lsls r6, r2, #3 8033764: fa43 f606 asr.w r6, r3, r6 8033768: 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) 803376a: 1a8e subs r6, r1, r2 while (octets_needed > 1) { octets_needed--; *msg_ptr = (u8_t)(value >> (octets_needed << 3)); ofs += 1; if (ofs >= plen) 803376c: b2b6 uxth r6, r6 803376e: 42a6 cmp r6, r4 8033770: d308 bcc.n 8033784 { /* next octet in next pbuf */ p = p->next; 8033772: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033774: b908 cbnz r0, 803377a 8033776: 20f2 movs r0, #242 ; 0xf2 8033778: e00f b.n 803379a msg_ptr = (u8_t*)p->payload; plen += p->len; 803377a: 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; 803377c: 6845 ldr r5, [r0, #4] plen += p->len; 803377e: 19a4 adds r4, r4, r6 8033780: b2a4 uxth r4, r4 8033782: e000 b.n 8033786 } else { /* next octet in same pbuf */ msg_ptr++; 8033784: 3501 adds r5, #1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (octets_needed > 1) 8033786: 2a01 cmp r2, #1 8033788: d8e9 bhi.n 803375e /* next octet in same pbuf */ msg_ptr++; } } /* (only) one least significant octet */ *msg_ptr = (u8_t)value; 803378a: 702b strb r3, [r5, #0] return ERR_OK; 803378c: 2000 movs r0, #0 803378e: e004 b.n 803379a } p = p->next; 8033790: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8033792: 4626 mov r6, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8033794: 2800 cmp r0, #0 8033796: d1d8 bne.n 803374a 8033798: e7ed b.n 8033776 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 803379a: b240 sxtb r0, r0 803379c: bdf0 pop {r4, r5, r6, r7, pc} 0803379e : * @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) { 803379e: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 80337a2: 2500 movs r5, #0 while (p != NULL) 80337a4: e068 b.n 8033878 { base = plen; plen += p->len; 80337a6: 8944 ldrh r4, [r0, #10] 80337a8: 192c adds r4, r5, r4 80337aa: b2a4 uxth r4, r4 if (ofs < plen) 80337ac: 42a1 cmp r1, r4 80337ae: d261 bcs.n 8033874 { msg_ptr = (u8_t*)p->payload; 80337b0: 6846 ldr r6, [r0, #4] msg_ptr += ofs - base; 80337b2: 1b4d subs r5, r1, r5 if (ident_len > 1) 80337b4: 2a01 cmp r2, #1 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 80337b6: eb06 0805 add.w r8, r6, r5 if (ident_len > 1) 80337ba: d801 bhi.n 80337c0 } 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; 80337bc: 20f2 movs r0, #242 ; 0xf2 80337be: e05e b.n 803387e msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if (ident_len > 1) { if ((ident[0] == 1) && (ident[1] == 3)) 80337c0: f8d3 c000 ldr.w ip, [r3] 80337c4: f1bc 0f01 cmp.w ip, #1 80337c8: d105 bne.n 80337d6 80337ca: 685f ldr r7, [r3, #4] 80337cc: 2f03 cmp r7, #3 80337ce: d102 bne.n 80337d6 { /* compressed (most common) prefix .iso.org */ *msg_ptr = 0x2b; 80337d0: 272b movs r7, #43 ; 0x2b 80337d2: 5577 strb r7, [r6, r5] 80337d4: e006 b.n 80337e4 } else { /* calculate prefix */ *msg_ptr = (u8_t)((ident[0] * 40) + ident[1]); 80337d6: 685f ldr r7, [r3, #4] 80337d8: f04f 0928 mov.w r9, #40 ; 0x28 80337dc: fb09 7c0c mla ip, r9, ip, r7 80337e0: f806 c005 strb.w ip, [r6, r5] } ofs += 1; 80337e4: 3101 adds r1, #1 80337e6: b289 uxth r1, r1 if (ofs >= plen) 80337e8: 42a1 cmp r1, r4 80337ea: d307 bcc.n 80337fc { /* next octet in next pbuf */ p = p->next; 80337ec: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80337ee: 2800 cmp r0, #0 80337f0: d0e4 beq.n 80337bc msg_ptr = (u8_t*)p->payload; plen += p->len; 80337f2: 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; 80337f4: 6845 ldr r5, [r0, #4] plen += p->len; 80337f6: 19a4 adds r4, r4, r6 80337f8: b2a4 uxth r4, r4 80337fa: e001 b.n 8033800 } else { /* next octet in same pbuf */ msg_ptr++; 80337fc: f108 0501 add.w r5, r8, #1 } ident_len -= 2; 8033800: 3a02 subs r2, #2 8033802: 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) 8033804: 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) 8033806: e031 b.n 803386c { s32_t sub_id; u8_t shift, tail; ident_len--; 8033808: 3a01 subs r2, #1 sub_id = *ident; 803380a: f853 cf04 ldr.w ip, [r3, #4]! while (ident_len > 0) { s32_t sub_id; u8_t shift, tail; ident_len--; 803380e: b2d2 uxtb r2, r2 sub_id = *ident; 8033810: 261c movs r6, #28 tail = 0; 8033812: 2700 movs r7, #0 shift = 28; while(shift > 0) { u8_t code; code = (u8_t)(sub_id >> shift); 8033814: fa4c f806 asr.w r8, ip, r6 if ((code != 0) || (tail != 0)) 8033818: f018 0fff tst.w r8, #255 ; 0xff 803381c: d100 bne.n 8033820 803381e: b18f cbz r7, 8033844 { tail = 1; *msg_ptr = code | 0x80; ofs += 1; 8033820: 3101 adds r1, #1 8033822: b289 uxth r1, r1 code = (u8_t)(sub_id >> shift); if ((code != 0) || (tail != 0)) { tail = 1; *msg_ptr = code | 0x80; 8033824: f048 0880 orr.w r8, r8, #128 ; 0x80 ofs += 1; if (ofs >= plen) 8033828: 42a1 cmp r1, r4 code = (u8_t)(sub_id >> shift); if ((code != 0) || (tail != 0)) { tail = 1; *msg_ptr = code | 0x80; 803382a: f885 8000 strb.w r8, [r5] ofs += 1; if (ofs >= plen) 803382e: d307 bcc.n 8033840 { /* next octet in next pbuf */ p = p->next; 8033830: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033832: 2800 cmp r0, #0 8033834: d0c2 beq.n 80337bc msg_ptr = (u8_t*)p->payload; plen += p->len; 8033836: 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; 8033838: 6845 ldr r5, [r0, #4] plen += p->len; 803383a: 19e4 adds r4, r4, r7 803383c: b2a4 uxth r4, r4 803383e: e000 b.n 8033842 } else { /* next octet in same pbuf */ msg_ptr++; 8033840: 3501 adds r5, #1 u8_t code; code = (u8_t)(sub_id >> shift); if ((code != 0) || (tail != 0)) { tail = 1; 8033842: 2701 movs r7, #1 ident_len--; sub_id = *ident; tail = 0; shift = 28; while(shift > 0) 8033844: 3e07 subs r6, #7 8033846: d1e5 bne.n 8033814 msg_ptr++; } } shift -= 7; } *msg_ptr = (u8_t)sub_id & 0x7F; 8033848: f00c 0c7f and.w ip, ip, #127 ; 0x7f 803384c: f885 c000 strb.w ip, [r5] if (ident_len > 0) 8033850: b172 cbz r2, 8033870 { ofs += 1; 8033852: 3101 adds r1, #1 8033854: b289 uxth r1, r1 if (ofs >= plen) 8033856: 42a1 cmp r1, r4 8033858: d307 bcc.n 803386a { /* next octet in next pbuf */ p = p->next; 803385a: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 803385c: 2800 cmp r0, #0 803385e: d0ad beq.n 80337bc msg_ptr = (u8_t*)p->payload; plen += p->len; 8033860: 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; 8033862: 6845 ldr r5, [r0, #4] plen += p->len; 8033864: 19a4 adds r4, r4, r6 8033866: b2a4 uxth r4, r4 8033868: e000 b.n 803386c } else { /* next octet in same pbuf */ msg_ptr++; 803386a: 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) 803386c: 2a00 cmp r2, #0 803386e: d1cb bne.n 8033808 } } /* proceed to next sub-identifier */ ident++; } return ERR_OK; 8033870: 2000 movs r0, #0 8033872: e004 b.n 803387e } p = p->next; 8033874: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8033876: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8033878: 2800 cmp r0, #0 803387a: d194 bne.n 80337a6 803387c: e79e b.n 80337bc } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 803387e: b240 sxtb r0, r0 8033880: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 08033884 : * @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) { 8033884: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8033886: 2600 movs r6, #0 while (p != NULL) 8033888: e025 b.n 80338d6 { base = plen; plen += p->len; 803388a: 8944 ldrh r4, [r0, #10] 803388c: 1934 adds r4, r6, r4 803388e: b2a4 uxth r4, r4 if (ofs < plen) 8033890: 42a1 cmp r1, r4 8033892: d21e bcs.n 80338d2 { msg_ptr = (u8_t*)p->payload; 8033894: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 8033896: 1b8d subs r5, r1, r6 8033898: 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) 803389a: 1851 adds r1, r2, r1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (raw_len > 1) 803389c: e012 b.n 80338c4 { /* copy raw_len - 1 octets */ raw_len--; 803389e: 3a01 subs r2, #1 *msg_ptr = *raw; 80338a0: f813 6b01 ldrb.w r6, [r3], #1 msg_ptr += ofs - base; while (raw_len > 1) { /* copy raw_len - 1 octets */ raw_len--; 80338a4: b292 uxth r2, r2 *msg_ptr = *raw; 80338a6: 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) 80338a8: 1a8e subs r6, r1, r2 /* copy raw_len - 1 octets */ raw_len--; *msg_ptr = *raw; raw++; ofs += 1; if (ofs >= plen) 80338aa: b2b6 uxth r6, r6 80338ac: 42a6 cmp r6, r4 80338ae: d308 bcc.n 80338c2 { /* next octet in next pbuf */ p = p->next; 80338b0: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80338b2: b908 cbnz r0, 80338b8 80338b4: 20f2 movs r0, #242 ; 0xf2 80338b6: e012 b.n 80338de msg_ptr = (u8_t*)p->payload; plen += p->len; 80338b8: 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; 80338ba: 6845 ldr r5, [r0, #4] plen += p->len; 80338bc: 19a4 adds r4, r4, r6 80338be: b2a4 uxth r4, r4 80338c0: e000 b.n 80338c4 } else { /* next octet in same pbuf */ msg_ptr++; 80338c2: 3501 adds r5, #1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (raw_len > 1) 80338c4: 2a01 cmp r2, #1 80338c6: d8ea bhi.n 803389e { /* next octet in same pbuf */ msg_ptr++; } } if (raw_len > 0) 80338c8: b142 cbz r2, 80338dc { /* copy last or single octet */ *msg_ptr = *raw; 80338ca: 781b ldrb r3, [r3, #0] } return ERR_OK; 80338cc: 2000 movs r0, #0 } } if (raw_len > 0) { /* copy last or single octet */ *msg_ptr = *raw; 80338ce: 702b strb r3, [r5, #0] 80338d0: e005 b.n 80338de } return ERR_OK; } p = p->next; 80338d2: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 80338d4: 4626 mov r6, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 80338d6: 2800 cmp r0, #0 80338d8: d1d7 bne.n 803388a 80338da: e7eb b.n 80338b4 if (raw_len > 0) { /* copy last or single octet */ *msg_ptr = *raw; } return ERR_OK; 80338dc: 4610 mov r0, r2 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 80338de: b240 sxtb r0, r0 80338e0: bdf0 pop {r4, r5, r6, r7, pc} 080338e2 : 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; 80338e2: 2300 movs r3, #0 80338e4: 7013 strb r3, [r2, #0] 80338e6: 4770 bx lr 080338e8 : } void noleafs_get_value(struct obj_def *od, u16_t len, void *value) { 80338e8: 4770 bx lr 080338ea : LWIP_UNUSED_ARG(od); LWIP_UNUSED_ARG(len); LWIP_UNUSED_ARG(value); /* can't set */ return 0; } 80338ea: 2000 movs r0, #0 80338ec: 4770 bx lr 080338ee : void noleafs_set_value(struct obj_def *od, u16_t len, void *value) { 80338ee: 4770 bx lr 080338f0 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 80338f0: 2801 cmp r0, #1 80338f2: d145 bne.n 8033980 { od->id_inst_len = ident_len; 80338f4: 2002 movs r0, #2 { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 80338f6: 1f0b subs r3, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; 80338f8: 7190 strb r0, [r2, #6] od->id_inst_ptr = ident; 80338fa: 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) 80338fc: f811 3c04 ldrb.w r3, [r1, #-4] 8033900: 3b01 subs r3, #1 8033902: 2b06 cmp r3, #6 8033904: d83c bhi.n 8033980 8033906: e8df f003 tbb [pc, r3] 803390a: 0b04 .short 0x0b04 803390c: 2a221a14 .word 0x2a221a14 8033910: 34 .byte 0x34 8033911: 00 .byte 0x00 { case 1: /* sysDescr */ od->instance = MIB_OBJECT_SCALAR; 8033912: 2301 movs r3, #1 8033914: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033916: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8033918: 2304 movs r3, #4 803391a: 7093 strb r3, [r2, #2] od->v_len = *sysdescr_len_ptr; 803391c: 4b1a ldr r3, [pc, #104] ; (8033988 ) 803391e: e025 b.n 803396c break; case 2: /* sysObjectID */ od->instance = MIB_OBJECT_SCALAR; 8033920: 2301 movs r3, #1 8033922: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033924: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID); 8033926: 2306 movs r3, #6 8033928: 7093 strb r3, [r2, #2] od->v_len = sysobjid.len * sizeof(s32_t); 803392a: 4b18 ldr r3, [pc, #96] ; (803398c ) 803392c: 781b ldrb r3, [r3, #0] 803392e: 009b lsls r3, r3, #2 8033930: e024 b.n 803397c break; case 3: /* sysUpTime */ od->instance = MIB_OBJECT_SCALAR; 8033932: 2301 movs r3, #1 8033934: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033936: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS); 8033938: 2343 movs r3, #67 ; 0x43 803393a: 7093 strb r3, [r2, #2] 803393c: e01d b.n 803397a od->v_len = sizeof(u32_t); break; case 4: /* sysContact */ od->instance = MIB_OBJECT_SCALAR; 803393e: 2301 movs r3, #1 8033940: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8033942: 2303 movs r3, #3 8033944: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8033946: 2304 movs r3, #4 8033948: 7093 strb r3, [r2, #2] od->v_len = *syscontact_len_ptr; 803394a: 4b11 ldr r3, [pc, #68] ; (8033990 ) 803394c: e00e b.n 803396c break; case 5: /* sysName */ od->instance = MIB_OBJECT_SCALAR; 803394e: 2301 movs r3, #1 8033950: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8033952: 2303 movs r3, #3 8033954: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8033956: 2304 movs r3, #4 8033958: 7093 strb r3, [r2, #2] od->v_len = *sysname_len_ptr; 803395a: 4b0e ldr r3, [pc, #56] ; (8033994 ) 803395c: e006 b.n 803396c break; case 6: /* sysLocation */ od->instance = MIB_OBJECT_SCALAR; 803395e: 2301 movs r3, #1 8033960: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8033962: 2303 movs r3, #3 8033964: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8033966: 2304 movs r3, #4 8033968: 7093 strb r3, [r2, #2] od->v_len = *syslocation_len_ptr; 803396a: 4b0b ldr r3, [pc, #44] ; (8033998 ) 803396c: 681b ldr r3, [r3, #0] 803396e: 781b ldrb r3, [r3, #0] 8033970: e004 b.n 803397c break; case 7: /* sysServices */ od->instance = MIB_OBJECT_SCALAR; 8033972: 2301 movs r3, #1 8033974: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033976: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 8033978: 7090 strb r0, [r2, #2] od->v_len = sizeof(s32_t); 803397a: 2304 movs r3, #4 803397c: 8093 strh r3, [r2, #4] break; 803397e: 4770 bx lr }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("system_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033980: 2300 movs r3, #0 8033982: 7013 strb r3, [r2, #0] 8033984: 4770 bx lr 8033986: bf00 nop 8033988: 20000934 .word 0x20000934 803398c: 200007e4 .word 0x200007e4 8033990: 20000790 .word 0x20000790 8033994: 2000078c .word 0x2000078c 8033998: 20000978 .word 0x20000978 0803399c : 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) 803399c: 2801 cmp r0, #1 803399e: d109 bne.n 80339b4 { od->id_inst_len = ident_len; 80339a0: 2302 movs r3, #2 80339a2: 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; 80339a4: 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); 80339a6: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 80339a8: 2304 movs r3, #4 ident_len += 1; ident -= 1; if (ident_len == 2) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 80339aa: 6091 str r1, [r2, #8] od->instance = MIB_OBJECT_SCALAR; 80339ac: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 80339ae: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); od->v_len = sizeof(s32_t); 80339b0: 8093 strh r3, [r2, #4] 80339b2: 4770 bx lr } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("interfaces_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 80339b4: 2300 movs r3, #0 80339b6: 7013 strb r3, [r2, #0] 80339b8: 4770 bx lr 80339ba: 0000 movs r0, r0 080339bc : */ 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) 80339bc: 6883 ldr r3, [r0, #8] 80339be: 681b ldr r3, [r3, #0] 80339c0: 2b01 cmp r3, #1 80339c2: d102 bne.n 80339ca { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = iflist_root.count; 80339c4: 4b01 ldr r3, [pc, #4] ; (80339cc ) 80339c6: 8b9b ldrh r3, [r3, #28] 80339c8: 6013 str r3, [r2, #0] 80339ca: 4770 bx lr 80339cc: 200007c4 .word 0x200007c4 080339d0 : { 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]; 80339d0: 6883 ldr r3, [r0, #8] switch (id) 80339d2: 781b ldrb r3, [r3, #0] 80339d4: 3b01 subs r3, #1 80339d6: 2b16 cmp r3, #22 80339d8: d836 bhi.n 8033a48 80339da: e8df f003 tbb [pc, r3] 80339de: 0e0c .short 0x0e0c 80339e0: 16141210 .word 0x16141210 80339e4: 1e1c1a18 .word 0x1e1c1a18 80339e8: 26242220 .word 0x26242220 80339ec: 2e2c2a28 .word 0x2e2c2a28 80339f0: 35353530 .word 0x35353530 80339f4: 32 .byte 0x32 80339f5: 00 .byte 0x00 #if IP_FORWARD /* forwarding */ *sint_ptr = 1; #else /* not-forwarding */ *sint_ptr = 2; 80339f6: 2302 movs r3, #2 80339f8: e025 b.n 8033a46 } break; case 2: /* ipDefaultTTL */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = IP_DEFAULT_TTL; 80339fa: 23ff movs r3, #255 ; 0xff 80339fc: e023 b.n 8033a46 } break; case 3: /* ipInReceives */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinreceives; 80339fe: 4b13 ldr r3, [pc, #76] ; (8033a4c ) 8033a00: e020 b.n 8033a44 } break; case 4: /* ipInHdrErrors */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinhdrerrors; 8033a02: 4b13 ldr r3, [pc, #76] ; (8033a50 ) 8033a04: e01e b.n 8033a44 } break; case 5: /* ipInAddrErrors */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinaddrerrors; 8033a06: 4b13 ldr r3, [pc, #76] ; (8033a54 ) 8033a08: e01c b.n 8033a44 } break; case 6: /* ipForwDatagrams */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipforwdatagrams; 8033a0a: 4b13 ldr r3, [pc, #76] ; (8033a58 ) 8033a0c: e01a b.n 8033a44 } break; case 7: /* ipInUnknownProtos */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinunknownprotos; 8033a0e: 4b13 ldr r3, [pc, #76] ; (8033a5c ) 8033a10: e018 b.n 8033a44 } break; case 8: /* ipInDiscards */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipindiscards; 8033a12: 4b13 ldr r3, [pc, #76] ; (8033a60 ) 8033a14: e016 b.n 8033a44 } break; case 9: /* ipInDelivers */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipindelivers; 8033a16: 4b13 ldr r3, [pc, #76] ; (8033a64 ) 8033a18: e014 b.n 8033a44 } break; case 10: /* ipOutRequests */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipoutrequests; 8033a1a: 4b13 ldr r3, [pc, #76] ; (8033a68 ) 8033a1c: e012 b.n 8033a44 } break; case 11: /* ipOutDiscards */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipoutdiscards; 8033a1e: 4b13 ldr r3, [pc, #76] ; (8033a6c ) 8033a20: e010 b.n 8033a44 } break; case 12: /* ipOutNoRoutes */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipoutnoroutes; 8033a22: 4b13 ldr r3, [pc, #76] ; (8033a70 ) 8033a24: e00e b.n 8033a44 { s32_t *sint_ptr = (s32_t*)value; #if IP_REASSEMBLY *sint_ptr = IP_REASS_MAXAGE; #else *sint_ptr = 0; 8033a26: 2300 movs r3, #0 8033a28: e00d b.n 8033a46 } break; case 14: /* ipReasmReqds */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipreasmreqds; 8033a2a: 4b12 ldr r3, [pc, #72] ; (8033a74 ) 8033a2c: e00a b.n 8033a44 } break; case 15: /* ipReasmOKs */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipreasmoks; 8033a2e: 4b12 ldr r3, [pc, #72] ; (8033a78 ) 8033a30: e008 b.n 8033a44 } break; case 16: /* ipReasmFails */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipreasmfails; 8033a32: 4b12 ldr r3, [pc, #72] ; (8033a7c ) 8033a34: e006 b.n 8033a44 } break; case 17: /* ipFragOKs */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipfragoks; 8033a36: 4b12 ldr r3, [pc, #72] ; (8033a80 ) 8033a38: e004 b.n 8033a44 } break; case 18: /* ipFragFails */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipfragfails; 8033a3a: 4b12 ldr r3, [pc, #72] ; (8033a84 ) 8033a3c: e002 b.n 8033a44 } break; case 19: /* ipFragCreates */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipfragcreates; 8033a3e: 4b12 ldr r3, [pc, #72] ; (8033a88 ) 8033a40: e000 b.n 8033a44 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; 8033a42: 4b12 ldr r3, [pc, #72] ; (8033a8c ) 8033a44: 681b ldr r3, [r3, #0] 8033a46: 6013 str r3, [r2, #0] 8033a48: 4770 bx lr 8033a4a: bf00 nop 8033a4c: 2000c4d0 .word 0x2000c4d0 8033a50: 2000c458 .word 0x2000c458 8033a54: 2000c43c .word 0x2000c43c 8033a58: 2000c558 .word 0x2000c558 8033a5c: 2000c498 .word 0x2000c498 8033a60: 2000c524 .word 0x2000c524 8033a64: 2000c55c .word 0x2000c55c 8033a68: 2000c544 .word 0x2000c544 8033a6c: 2000c4e8 .word 0x2000c4e8 8033a70: 2000c568 .word 0x2000c568 8033a74: 2000c4b8 .word 0x2000c4b8 8033a78: 2000c464 .word 0x2000c464 8033a7c: 2000c518 .word 0x2000c518 8033a80: 2000c428 .word 0x2000c428 8033a84: 2000c494 .word 0x2000c494 8033a88: 2000c534 .word 0x2000c534 8033a8c: 2000c520 .word 0x2000c520 08033a90 : 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]; 8033a90: 6883 ldr r3, [r0, #8] switch (id) 8033a92: 781b ldrb r3, [r3, #0] 8033a94: 2b01 cmp r3, #1 8033a96: d002 beq.n 8033a9e 8033a98: 2b02 cmp r3, #2 8033a9a: d109 bne.n 8033ab0 8033a9c: e002 b.n 8033aa4 #if IP_FORWARD /* forwarding */ if (*sint_ptr == 1) #else /* not-forwarding */ if (*sint_ptr == 2) 8033a9e: 6810 ldr r0, [r2, #0] { u8_t id, set_ok; s32_t *sint_ptr = (s32_t*)value; LWIP_UNUSED_ARG(len); set_ok = 0; 8033aa0: 2802 cmp r0, #2 8033aa2: e001 b.n 8033aa8 { set_ok = 1; } break; case 2: /* ipDefaultTTL */ if (*sint_ptr == IP_DEFAULT_TTL) 8033aa4: 6810 ldr r0, [r2, #0] { u8_t id, set_ok; s32_t *sint_ptr = (s32_t*)value; LWIP_UNUSED_ARG(len); set_ok = 0; 8033aa6: 28ff cmp r0, #255 ; 0xff 8033aa8: bf14 ite ne 8033aaa: 2000 movne r0, #0 8033aac: 2001 moveq r0, #1 8033aae: 4770 bx lr 8033ab0: 2000 movs r0, #0 set_ok = 1; } break; }; return set_ok; } 8033ab2: 4770 bx lr 08033ab4 : /* return to object name, adding index depth (4) */ ident_len += 4; ident -= 4; if (ident_len == 5) 8033ab4: 2801 cmp r0, #1 8033ab6: d12c bne.n 8033b12 { od->id_inst_len = ident_len; 8033ab8: 2305 movs r3, #5 8033aba: 7193 strb r3, [r2, #6] { u8_t id; /* return to object name, adding index depth (4) */ ident_len += 4; ident -= 4; 8033abc: f1a1 0310 sub.w r3, r1, #16 if (ident_len == 5) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8033ac0: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 8033ac2: f811 3c10 ldrb.w r3, [r1, #-16] 8033ac6: 3b01 subs r3, #1 8033ac8: 2b0c cmp r3, #12 8033aca: d822 bhi.n 8033b12 8033acc: e8df f003 tbb [pc, r3] 8033ad0: 0d0d0d07 .word 0x0d0d0d07 8033ad4: 0d070d0d .word 0x0d070d0d 8033ad8: 0d070d11 .word 0x0d070d11 8033adc: 18 .byte 0x18 8033add: 00 .byte 0x00 { case 1: /* ipRouteDest */ case 7: /* ipRouteNextHop */ case 11: /* ipRouteMask */ od->instance = MIB_OBJECT_TAB; 8033ade: 2302 movs r3, #2 8033ae0: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8033ae2: 2303 movs r3, #3 8033ae4: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 8033ae6: 2340 movs r3, #64 ; 0x40 8033ae8: e007 b.n 8033afa case 5: /* ipRouteMetric3 */ case 6: /* ipRouteMetric4 */ case 8: /* ipRouteType */ case 10: /* ipRouteAge */ case 12: /* ipRouteMetric5 */ od->instance = MIB_OBJECT_TAB; 8033aea: 2302 movs r3, #2 8033aec: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8033aee: 2103 movs r1, #3 8033af0: e002 b.n 8033af8 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; 8033af2: 2302 movs r3, #2 8033af4: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033af6: 2101 movs r1, #1 8033af8: 7051 strb r1, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 8033afa: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 8033afc: 2304 movs r3, #4 8033afe: e006 b.n 8033b0e break; case 13: /* ipRouteInfo */ /** @note returning zeroDotZero (0.0) no routing protocol specific MIB */ od->instance = MIB_OBJECT_TAB; 8033b00: 2302 movs r3, #2 8033b02: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033b04: 2301 movs r3, #1 8033b06: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID); 8033b08: 2306 movs r3, #6 8033b0a: 7093 strb r3, [r2, #2] od->v_len = iprouteinfo.len * sizeof(s32_t); 8033b0c: 2308 movs r3, #8 8033b0e: 8093 strh r3, [r2, #4] break; 8033b10: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_rteentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033b12: 2300 movs r3, #0 8033b14: 7013 strb r3, [r2, #0] 8033b16: 4770 bx lr 08033b18 : 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) && 8033b18: 2801 cmp r0, #1 8033b1a: d110 bne.n 8033b3e (ident[0] > 0) && (ident[0] < 27)) 8033b1c: 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) && 8033b20: 2b00 cmp r3, #0 8033b22: dd0c ble.n 8033b3e (ident[0] > 0) && (ident[0] < 27)) 8033b24: 2b1a cmp r3, #26 8033b26: dc0a bgt.n 8033b3e { od->id_inst_len = ident_len; 8033b28: 2302 movs r3, #2 8033b2a: 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); 8033b2c: 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; 8033b2e: 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); 8033b30: 7093 strb r3, [r2, #2] od->v_len = sizeof(u32_t); 8033b32: 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; 8033b34: 6091 str r1, [r2, #8] od->instance = MIB_OBJECT_SCALAR; 8033b36: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033b38: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); od->v_len = sizeof(u32_t); 8033b3a: 8093 strh r3, [r2, #4] 8033b3c: 4770 bx lr } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("icmp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033b3e: 2300 movs r3, #0 8033b40: 7013 strb r3, [r2, #0] 8033b42: 4770 bx lr 08033b44 : 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]; 8033b44: 6883 ldr r3, [r0, #8] switch (id) 8033b46: 781b ldrb r3, [r3, #0] 8033b48: 3b01 subs r3, #1 8033b4a: 2b19 cmp r3, #25 8033b4c: d843 bhi.n 8033bd6 8033b4e: e8df f003 tbb [pc, r3] 8033b52: 0f0d .short 0x0f0d 8033b54: 17151311 .word 0x17151311 8033b58: 1f1d1b19 .word 0x1f1d1b19 8033b5c: 27252321 .word 0x27252321 8033b60: 2f2d2b29 .word 0x2f2d2b29 8033b64: 37353331 .word 0x37353331 8033b68: 3f3d3b39 .word 0x3f3d3b39 { case 1: /* icmpInMsgs */ *uint_ptr = icmpinmsgs; 8033b6c: 4b1a ldr r3, [pc, #104] ; (8033bd8 ) 8033b6e: e030 b.n 8033bd2 break; case 2: /* icmpInErrors */ *uint_ptr = icmpinerrors; 8033b70: 4b1a ldr r3, [pc, #104] ; (8033bdc ) 8033b72: e02e b.n 8033bd2 break; case 3: /* icmpInDestUnreachs */ *uint_ptr = icmpindestunreachs; 8033b74: 4b1a ldr r3, [pc, #104] ; (8033be0 ) 8033b76: e02c b.n 8033bd2 break; case 4: /* icmpInTimeExcds */ *uint_ptr = icmpintimeexcds; 8033b78: 4b1a ldr r3, [pc, #104] ; (8033be4 ) 8033b7a: e02a b.n 8033bd2 break; case 5: /* icmpInParmProbs */ *uint_ptr = icmpinparmprobs; 8033b7c: 4b1a ldr r3, [pc, #104] ; (8033be8 ) 8033b7e: e028 b.n 8033bd2 break; case 6: /* icmpInSrcQuenchs */ *uint_ptr = icmpinsrcquenchs; 8033b80: 4b1a ldr r3, [pc, #104] ; (8033bec ) 8033b82: e026 b.n 8033bd2 break; case 7: /* icmpInRedirects */ *uint_ptr = icmpinredirects; 8033b84: 4b1a ldr r3, [pc, #104] ; (8033bf0 ) 8033b86: e024 b.n 8033bd2 break; case 8: /* icmpInEchos */ *uint_ptr = icmpinechos; 8033b88: 4b1a ldr r3, [pc, #104] ; (8033bf4 ) 8033b8a: e022 b.n 8033bd2 break; case 9: /* icmpInEchoReps */ *uint_ptr = icmpinechoreps; 8033b8c: 4b1a ldr r3, [pc, #104] ; (8033bf8 ) 8033b8e: e020 b.n 8033bd2 break; case 10: /* icmpInTimestamps */ *uint_ptr = icmpintimestamps; 8033b90: 4b1a ldr r3, [pc, #104] ; (8033bfc ) 8033b92: e01e b.n 8033bd2 break; case 11: /* icmpInTimestampReps */ *uint_ptr = icmpintimestampreps; 8033b94: 4b1a ldr r3, [pc, #104] ; (8033c00 ) 8033b96: e01c b.n 8033bd2 break; case 12: /* icmpInAddrMasks */ *uint_ptr = icmpinaddrmasks; 8033b98: 4b1a ldr r3, [pc, #104] ; (8033c04 ) 8033b9a: e01a b.n 8033bd2 break; case 13: /* icmpInAddrMaskReps */ *uint_ptr = icmpinaddrmaskreps; 8033b9c: 4b1a ldr r3, [pc, #104] ; (8033c08 ) 8033b9e: e018 b.n 8033bd2 break; case 14: /* icmpOutMsgs */ *uint_ptr = icmpoutmsgs; 8033ba0: 4b1a ldr r3, [pc, #104] ; (8033c0c ) 8033ba2: e016 b.n 8033bd2 break; case 15: /* icmpOutErrors */ *uint_ptr = icmpouterrors; 8033ba4: 4b1a ldr r3, [pc, #104] ; (8033c10 ) 8033ba6: e014 b.n 8033bd2 break; case 16: /* icmpOutDestUnreachs */ *uint_ptr = icmpoutdestunreachs; 8033ba8: 4b1a ldr r3, [pc, #104] ; (8033c14 ) 8033baa: e012 b.n 8033bd2 break; case 17: /* icmpOutTimeExcds */ *uint_ptr = icmpouttimeexcds; 8033bac: 4b1a ldr r3, [pc, #104] ; (8033c18 ) 8033bae: e010 b.n 8033bd2 break; case 18: /* icmpOutParmProbs */ *uint_ptr = icmpoutparmprobs; 8033bb0: 4b1a ldr r3, [pc, #104] ; (8033c1c ) 8033bb2: e00e b.n 8033bd2 break; case 19: /* icmpOutSrcQuenchs */ *uint_ptr = icmpoutsrcquenchs; 8033bb4: 4b1a ldr r3, [pc, #104] ; (8033c20 ) 8033bb6: e00c b.n 8033bd2 break; case 20: /* icmpOutRedirects */ *uint_ptr = icmpoutredirects; 8033bb8: 4b1a ldr r3, [pc, #104] ; (8033c24 ) 8033bba: e00a b.n 8033bd2 break; case 21: /* icmpOutEchos */ *uint_ptr = icmpoutechos; 8033bbc: 4b1a ldr r3, [pc, #104] ; (8033c28 ) 8033bbe: e008 b.n 8033bd2 break; case 22: /* icmpOutEchoReps */ *uint_ptr = icmpoutechoreps; 8033bc0: 4b1a ldr r3, [pc, #104] ; (8033c2c ) 8033bc2: e006 b.n 8033bd2 break; case 23: /* icmpOutTimestamps */ *uint_ptr = icmpouttimestamps; 8033bc4: 4b1a ldr r3, [pc, #104] ; (8033c30 ) 8033bc6: e004 b.n 8033bd2 break; case 24: /* icmpOutTimestampReps */ *uint_ptr = icmpouttimestampreps; 8033bc8: 4b1a ldr r3, [pc, #104] ; (8033c34 ) 8033bca: e002 b.n 8033bd2 break; case 25: /* icmpOutAddrMasks */ *uint_ptr = icmpoutaddrmasks; 8033bcc: 4b1a ldr r3, [pc, #104] ; (8033c38 ) 8033bce: e000 b.n 8033bd2 break; case 26: /* icmpOutAddrMaskReps */ *uint_ptr = icmpoutaddrmaskreps; 8033bd0: 4b1a ldr r3, [pc, #104] ; (8033c3c ) 8033bd2: 681b ldr r3, [r3, #0] 8033bd4: 6013 str r3, [r2, #0] 8033bd6: 4770 bx lr 8033bd8: 2000c460 .word 0x2000c460 8033bdc: 2000c45c .word 0x2000c45c 8033be0: 2000c438 .word 0x2000c438 8033be4: 2000c51c .word 0x2000c51c 8033be8: 2000c550 .word 0x2000c550 8033bec: 2000c448 .word 0x2000c448 8033bf0: 2000c474 .word 0x2000c474 8033bf4: 2000c514 .word 0x2000c514 8033bf8: 2000c48c .word 0x2000c48c 8033bfc: 2000c47c .word 0x2000c47c 8033c00: 2000c4bc .word 0x2000c4bc 8033c04: 2000c554 .word 0x2000c554 8033c08: 2000c4f0 .word 0x2000c4f0 8033c0c: 2000c4e0 .word 0x2000c4e0 8033c10: 2000c564 .word 0x2000c564 8033c14: 2000c4f8 .word 0x2000c4f8 8033c18: 2000c4ac .word 0x2000c4ac 8033c1c: 2000c470 .word 0x2000c470 8033c20: 2000c4c4 .word 0x2000c4c4 8033c24: 2000c480 .word 0x2000c480 8033c28: 2000c560 .word 0x2000c560 8033c2c: 2000c500 .word 0x2000c500 8033c30: 2000c4cc .word 0x2000c4cc 8033c34: 2000c4b0 .word 0x2000c4b0 8033c38: 2000c478 .word 0x2000c478 8033c3c: 2000c4d8 .word 0x2000c4d8 08033c40 : 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]; 8033c40: 6883 ldr r3, [r0, #8] switch (id) 8033c42: 781b ldrb r3, [r3, #0] 8033c44: 3b01 subs r3, #1 8033c46: 2b0e cmp r3, #14 8033c48: d836 bhi.n 8033cb8 8033c4a: e8df f003 tbb [pc, r3] 8033c4e: 0a08 .short 0x0a08 8033c50: 1412100d .word 0x1412100d 8033c54: 2a1a1816 .word 0x2a1a1816 8033c58: 30352e2c .word 0x30352e2c 8033c5c: 32 .byte 0x32 8033c5d: 00 .byte 0x00 { case 1: /* tcpRtoAlgorithm, vanj(4) */ *sint_ptr = 4; 8033c5e: 2304 movs r3, #4 8033c60: e029 b.n 8033cb6 break; case 2: /* tcpRtoMin */ /* @todo not the actual value, a guess, needs to be calculated */ *sint_ptr = 1000; 8033c62: f44f 737a mov.w r3, #1000 ; 0x3e8 8033c66: e026 b.n 8033cb6 break; case 3: /* tcpRtoMax */ /* @todo not the actual value, a guess, needs to be calculated */ *sint_ptr = 60000; 8033c68: f64e 2360 movw r3, #60000 ; 0xea60 8033c6c: e023 b.n 8033cb6 break; case 4: /* tcpMaxConn */ *sint_ptr = MEMP_NUM_TCP_PCB; 8033c6e: 230c movs r3, #12 8033c70: e021 b.n 8033cb6 break; case 5: /* tcpActiveOpens */ *uint_ptr = tcpactiveopens; 8033c72: 4b12 ldr r3, [pc, #72] ; (8033cbc ) 8033c74: e01e b.n 8033cb4 break; case 6: /* tcpPassiveOpens */ *uint_ptr = tcppassiveopens; 8033c76: 4b12 ldr r3, [pc, #72] ; (8033cc0 ) 8033c78: e01c b.n 8033cb4 break; case 7: /* tcpAttemptFails */ *uint_ptr = tcpattemptfails; 8033c7a: 4b12 ldr r3, [pc, #72] ; (8033cc4 ) 8033c7c: e01a b.n 8033cb4 break; case 8: /* tcpEstabResets */ *uint_ptr = tcpestabresets; 8033c7e: 4b12 ldr r3, [pc, #72] ; (8033cc8 ) 8033c80: e018 b.n 8033cb4 break; case 9: /* tcpCurrEstab */ { u16_t tcpcurrestab = 0; struct tcp_pcb *pcb = tcp_active_pcbs; 8033c82: 4b12 ldr r3, [pc, #72] ; (8033ccc ) case 8: /* tcpEstabResets */ *uint_ptr = tcpestabresets; break; case 9: /* tcpCurrEstab */ { u16_t tcpcurrestab = 0; 8033c84: 2100 movs r1, #0 struct tcp_pcb *pcb = tcp_active_pcbs; 8033c86: 681b ldr r3, [r3, #0] while (pcb != NULL) 8033c88: e007 b.n 8033c9a { if ((pcb->state == ESTABLISHED) || 8033c8a: 7e18 ldrb r0, [r3, #24] 8033c8c: 2804 cmp r0, #4 8033c8e: d001 beq.n 8033c94 8033c90: 2807 cmp r0, #7 8033c92: d101 bne.n 8033c98 (pcb->state == CLOSE_WAIT)) { tcpcurrestab++; 8033c94: 3101 adds r1, #1 8033c96: b289 uxth r1, r1 } pcb = pcb->next; 8033c98: 68db ldr r3, [r3, #12] break; case 9: /* tcpCurrEstab */ { u16_t tcpcurrestab = 0; struct tcp_pcb *pcb = tcp_active_pcbs; while (pcb != NULL) 8033c9a: 2b00 cmp r3, #0 8033c9c: d1f5 bne.n 8033c8a { tcpcurrestab++; } pcb = pcb->next; } *uint_ptr = tcpcurrestab; 8033c9e: 6011 str r1, [r2, #0] } break; 8033ca0: 4770 bx lr case 10: /* tcpInSegs */ *uint_ptr = tcpinsegs; 8033ca2: 4b0b ldr r3, [pc, #44] ; (8033cd0 ) 8033ca4: e006 b.n 8033cb4 break; case 11: /* tcpOutSegs */ *uint_ptr = tcpoutsegs; 8033ca6: 4b0b ldr r3, [pc, #44] ; (8033cd4 ) 8033ca8: e004 b.n 8033cb4 break; case 12: /* tcpRetransSegs */ *uint_ptr = tcpretranssegs; 8033caa: 4b0b ldr r3, [pc, #44] ; (8033cd8 ) 8033cac: e002 b.n 8033cb4 break; case 14: /* tcpInErrs */ *uint_ptr = tcpinerrs; 8033cae: 4b0b ldr r3, [pc, #44] ; (8033cdc ) 8033cb0: e000 b.n 8033cb4 break; case 15: /* tcpOutRsts */ *uint_ptr = tcpoutrsts; 8033cb2: 4b0b ldr r3, [pc, #44] ; (8033ce0 ) 8033cb4: 681b ldr r3, [r3, #0] 8033cb6: 6013 str r3, [r2, #0] 8033cb8: 4770 bx lr 8033cba: bf00 nop 8033cbc: 2000c454 .word 0x2000c454 8033cc0: 2000c488 .word 0x2000c488 8033cc4: 2000c4d4 .word 0x2000c4d4 8033cc8: 2000c468 .word 0x2000c468 8033ccc: 2000f6b8 .word 0x2000f6b8 8033cd0: 2000c4e4 .word 0x2000c4e4 8033cd4: 2000c530 .word 0x2000c530 8033cd8: 2000c504 .word 0x2000c504 8033cdc: 2000c490 .word 0x2000c490 8033ce0: 2000c4f4 .word 0x2000c4f4 08033ce4 : 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) && 8033ce4: 2801 cmp r0, #1 8033ce6: d110 bne.n 8033d0a (ident[0] > 0) && (ident[0] < 6)) 8033ce8: 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) && 8033cec: 2b00 cmp r3, #0 8033cee: dd0c ble.n 8033d0a (ident[0] > 0) && (ident[0] < 6)) 8033cf0: 2b05 cmp r3, #5 8033cf2: dc0a bgt.n 8033d0a { od->id_inst_len = ident_len; 8033cf4: 2302 movs r3, #2 8033cf6: 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); 8033cf8: 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; 8033cfa: 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); 8033cfc: 7093 strb r3, [r2, #2] od->v_len = sizeof(u32_t); 8033cfe: 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; 8033d00: 6091 str r1, [r2, #8] od->instance = MIB_OBJECT_SCALAR; 8033d02: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033d04: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); od->v_len = sizeof(u32_t); 8033d06: 8093 strh r3, [r2, #4] 8033d08: 4770 bx lr } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("udp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033d0a: 2300 movs r3, #0 8033d0c: 7013 strb r3, [r2, #0] 8033d0e: 4770 bx lr 08033d10 : 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]; 8033d10: 6883 ldr r3, [r0, #8] switch (id) 8033d12: 781b ldrb r3, [r3, #0] 8033d14: 3b01 subs r3, #1 8033d16: 2b03 cmp r3, #3 8033d18: d80c bhi.n 8033d34 8033d1a: e8df f003 tbb [pc, r3] 8033d1e: 0402 .short 0x0402 8033d20: 0806 .short 0x0806 { case 1: /* udpInDatagrams */ *uint_ptr = udpindatagrams; 8033d22: 4b05 ldr r3, [pc, #20] ; (8033d38 ) 8033d24: e004 b.n 8033d30 break; case 2: /* udpNoPorts */ *uint_ptr = udpnoports; 8033d26: 4b05 ldr r3, [pc, #20] ; (8033d3c ) 8033d28: e002 b.n 8033d30 break; case 3: /* udpInErrors */ *uint_ptr = udpinerrors; 8033d2a: 4b05 ldr r3, [pc, #20] ; (8033d40 ) 8033d2c: e000 b.n 8033d30 break; case 4: /* udpOutDatagrams */ *uint_ptr = udpoutdatagrams; 8033d2e: 4b05 ldr r3, [pc, #20] ; (8033d44 ) 8033d30: 681b ldr r3, [r3, #0] 8033d32: 6013 str r3, [r2, #0] 8033d34: 4770 bx lr 8033d36: bf00 nop 8033d38: 2000c510 .word 0x2000c510 8033d3c: 2000c4c8 .word 0x2000c4c8 8033d40: 2000c538 .word 0x2000c538 8033d44: 2000c4c0 .word 0x2000c4c0 08033d48 : 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]; 8033d48: 6883 ldr r3, [r0, #8] switch (id) 8033d4a: 781b ldrb r3, [r3, #0] 8033d4c: 3b01 subs r3, #1 8033d4e: 2b1d cmp r3, #29 8033d50: d84b bhi.n 8033dea 8033d52: e8df f003 tbb [pc, r3] 8033d56: 110f .short 0x110f 8033d58: 19171513 .word 0x19171513 8033d5c: 1f1d1b4a .word 0x1f1d1b4a 8033d60: 27252321 .word 0x27252321 8033d64: 2f2d2b29 .word 0x2f2d2b29 8033d68: 37353331 .word 0x37353331 8033d6c: 3d3b394a .word 0x3d3b394a 8033d70: 4643413f .word 0x4643413f { case 1: /* snmpInPkts */ *uint_ptr = snmpinpkts; 8033d74: 4b1d ldr r3, [pc, #116] ; (8033dec ) 8033d76: e032 b.n 8033dde break; case 2: /* snmpOutPkts */ *uint_ptr = snmpoutpkts; 8033d78: 4b1d ldr r3, [pc, #116] ; (8033df0 ) 8033d7a: e030 b.n 8033dde break; case 3: /* snmpInBadVersions */ *uint_ptr = snmpinbadversions; 8033d7c: 4b1d ldr r3, [pc, #116] ; (8033df4 ) 8033d7e: e02e b.n 8033dde break; case 4: /* snmpInBadCommunityNames */ *uint_ptr = snmpinbadcommunitynames; 8033d80: 4b1d ldr r3, [pc, #116] ; (8033df8 ) 8033d82: e02c b.n 8033dde break; case 5: /* snmpInBadCommunityUses */ *uint_ptr = snmpinbadcommunityuses; 8033d84: 4b1d ldr r3, [pc, #116] ; (8033dfc ) 8033d86: e02a b.n 8033dde break; case 6: /* snmpInASNParseErrs */ *uint_ptr = snmpinasnparseerrs; 8033d88: 4b1d ldr r3, [pc, #116] ; (8033e00 ) 8033d8a: e028 b.n 8033dde break; case 8: /* snmpInTooBigs */ *uint_ptr = snmpintoobigs; 8033d8c: 4b1d ldr r3, [pc, #116] ; (8033e04 ) 8033d8e: e026 b.n 8033dde break; case 9: /* snmpInNoSuchNames */ *uint_ptr = snmpinnosuchnames; 8033d90: 4b1d ldr r3, [pc, #116] ; (8033e08 ) 8033d92: e024 b.n 8033dde break; case 10: /* snmpInBadValues */ *uint_ptr = snmpinbadvalues; 8033d94: 4b1d ldr r3, [pc, #116] ; (8033e0c ) 8033d96: e022 b.n 8033dde break; case 11: /* snmpInReadOnlys */ *uint_ptr = snmpinreadonlys; 8033d98: 4b1d ldr r3, [pc, #116] ; (8033e10 ) 8033d9a: e020 b.n 8033dde break; case 12: /* snmpInGenErrs */ *uint_ptr = snmpingenerrs; 8033d9c: 4b1d ldr r3, [pc, #116] ; (8033e14 ) 8033d9e: e01e b.n 8033dde break; case 13: /* snmpInTotalReqVars */ *uint_ptr = snmpintotalreqvars; 8033da0: 4b1d ldr r3, [pc, #116] ; (8033e18 ) 8033da2: e01c b.n 8033dde break; case 14: /* snmpInTotalSetVars */ *uint_ptr = snmpintotalsetvars; 8033da4: 4b1d ldr r3, [pc, #116] ; (8033e1c ) 8033da6: e01a b.n 8033dde break; case 15: /* snmpInGetRequests */ *uint_ptr = snmpingetrequests; 8033da8: 4b1d ldr r3, [pc, #116] ; (8033e20 ) 8033daa: e018 b.n 8033dde break; case 16: /* snmpInGetNexts */ *uint_ptr = snmpingetnexts; 8033dac: 4b1d ldr r3, [pc, #116] ; (8033e24 ) 8033dae: e016 b.n 8033dde break; case 17: /* snmpInSetRequests */ *uint_ptr = snmpinsetrequests; 8033db0: 4b1d ldr r3, [pc, #116] ; (8033e28 ) 8033db2: e014 b.n 8033dde break; case 18: /* snmpInGetResponses */ *uint_ptr = snmpingetresponses; 8033db4: 4b1d ldr r3, [pc, #116] ; (8033e2c ) 8033db6: e012 b.n 8033dde break; case 19: /* snmpInTraps */ *uint_ptr = snmpintraps; 8033db8: 4b1d ldr r3, [pc, #116] ; (8033e30 ) 8033dba: e010 b.n 8033dde break; case 20: /* snmpOutTooBigs */ *uint_ptr = snmpouttoobigs; 8033dbc: 4b1d ldr r3, [pc, #116] ; (8033e34 ) 8033dbe: e00e b.n 8033dde break; case 21: /* snmpOutNoSuchNames */ *uint_ptr = snmpoutnosuchnames; 8033dc0: 4b1d ldr r3, [pc, #116] ; (8033e38 ) 8033dc2: e00c b.n 8033dde break; case 22: /* snmpOutBadValues */ *uint_ptr = snmpoutbadvalues; 8033dc4: 4b1d ldr r3, [pc, #116] ; (8033e3c ) 8033dc6: e00a b.n 8033dde break; case 24: /* snmpOutGenErrs */ *uint_ptr = snmpoutgenerrs; 8033dc8: 4b1d ldr r3, [pc, #116] ; (8033e40 ) 8033dca: e008 b.n 8033dde break; case 25: /* snmpOutGetRequests */ *uint_ptr = snmpoutgetrequests; 8033dcc: 4b1d ldr r3, [pc, #116] ; (8033e44 ) 8033dce: e006 b.n 8033dde break; case 26: /* snmpOutGetNexts */ *uint_ptr = snmpoutgetnexts; 8033dd0: 4b1d ldr r3, [pc, #116] ; (8033e48 ) 8033dd2: e004 b.n 8033dde break; case 27: /* snmpOutSetRequests */ *uint_ptr = snmpoutsetrequests; 8033dd4: 4b1d ldr r3, [pc, #116] ; (8033e4c ) 8033dd6: e002 b.n 8033dde break; case 28: /* snmpOutGetResponses */ *uint_ptr = snmpoutgetresponses; 8033dd8: 4b1d ldr r3, [pc, #116] ; (8033e50 ) 8033dda: e000 b.n 8033dde break; case 29: /* snmpOutTraps */ *uint_ptr = snmpouttraps; 8033ddc: 4b1d ldr r3, [pc, #116] ; (8033e54 ) 8033dde: 681b ldr r3, [r3, #0] 8033de0: e002 b.n 8033de8 break; case 30: /* snmpEnableAuthenTraps */ *uint_ptr = *snmpenableauthentraps_ptr; 8033de2: 4b1d ldr r3, [pc, #116] ; (8033e58 ) 8033de4: 681b ldr r3, [r3, #0] 8033de6: 781b ldrb r3, [r3, #0] 8033de8: 6013 str r3, [r2, #0] 8033dea: 4770 bx lr 8033dec: 2000c46c .word 0x2000c46c 8033df0: 2000c53c .word 0x2000c53c 8033df4: 2000c528 .word 0x2000c528 8033df8: 2000c440 .word 0x2000c440 8033dfc: 2000c444 .word 0x2000c444 8033e00: 2000c52c .word 0x2000c52c 8033e04: 2000c4ec .word 0x2000c4ec 8033e08: 2000c56c .word 0x2000c56c 8033e0c: 2000c508 .word 0x2000c508 8033e10: 2000c4dc .word 0x2000c4dc 8033e14: 2000c4b4 .word 0x2000c4b4 8033e18: 2000c50c .word 0x2000c50c 8033e1c: 2000c44c .word 0x2000c44c 8033e20: 2000c4a0 .word 0x2000c4a0 8033e24: 2000c424 .word 0x2000c424 8033e28: 2000c548 .word 0x2000c548 8033e2c: 2000c49c .word 0x2000c49c 8033e30: 2000c434 .word 0x2000c434 8033e34: 2000c484 .word 0x2000c484 8033e38: 2000c450 .word 0x2000c450 8033e3c: 2000c430 .word 0x2000c430 8033e40: 2000c570 .word 0x2000c570 8033e44: 2000c4a8 .word 0x2000c4a8 8033e48: 2000c540 .word 0x2000c540 8033e4c: 2000c54c .word 0x2000c54c 8033e50: 2000c42c .word 0x2000c42c 8033e54: 2000c4a4 .word 0x2000c4a4 8033e58: 20000890 .word 0x20000890 08033e5c : { 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]; 8033e5c: 6883 ldr r3, [r0, #8] if (id == 30) 8033e5e: 781b ldrb r3, [r3, #0] 8033e60: 2b1e cmp r3, #30 8033e62: d103 bne.n 8033e6c { /* snmpEnableAuthenTraps */ /* @todo @fixme: which kind of pointer is 'value'? s32_t or u8_t??? */ u8_t *ptr = (u8_t*)value; *snmpenableauthentraps_ptr = *ptr; 8033e64: 4b02 ldr r3, [pc, #8] ; (8033e70 ) 8033e66: 7812 ldrb r2, [r2, #0] 8033e68: 681b ldr r3, [r3, #0] 8033e6a: 701a strb r2, [r3, #0] 8033e6c: 4770 bx lr 8033e6e: bf00 nop 8033e70: 20000890 .word 0x20000890 08033e74 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8033e74: 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) { 8033e76: b513 push {r0, r1, r4, lr} 8033e78: 4614 mov r4, r2 u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8033e7a: d149 bne.n 8033f10 { od->id_inst_len = ident_len; 8033e7c: 2302 movs r3, #2 8033e7e: 7193 strb r3, [r2, #6] { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 8033e80: 1f0a subs r2, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8033e82: 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) 8033e84: f811 2c04 ldrb.w r2, [r1, #-4] 8033e88: 3a01 subs r2, #1 8033e8a: 2a15 cmp r2, #21 8033e8c: d840 bhi.n 8033f10 8033e8e: e8df f002 tbb [pc, r2] 8033e92: 0e0b .short 0x0e0b 8033e94: 19140b0b .word 0x19140b0b 8033e98: 302b0b27 .word 0x302b0b27 8033e9c: 30303030 .word 0x30303030 8033ea0: 30303030 .word 0x30303030 8033ea4: 37143030 .word 0x37143030 { case 1: /* ifIndex */ case 3: /* ifType */ case 4: /* ifMtu */ case 8: /* ifOperStatus */ od->instance = MIB_OBJECT_TAB; 8033ea8: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8033eaa: 2201 movs r2, #1 8033eac: e01a b.n 8033ee4 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; 8033eae: 2201 movs r2, #1 8033eb0: 7062 strb r2, [r4, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8033eb2: 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; 8033eb4: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8033eb6: 70a2 strb r2, [r4, #2] 8033eb8: e028 b.n 8033f0c /** @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; 8033eba: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8033ebc: 2301 movs r3, #1 8033ebe: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_GAUGE); 8033ec0: 2342 movs r3, #66 ; 0x42 8033ec2: e01a b.n 8033efa break; case 6: /* ifPhysAddress */ { struct netif *netif; snmp_ifindextonetif(ident[1], &netif); 8033ec4: 6808 ldr r0, [r1, #0] 8033ec6: a901 add r1, sp, #4 8033ec8: f001 f824 bl 8034f14 od->instance = MIB_OBJECT_TAB; 8033ecc: 2302 movs r3, #2 8033ece: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8033ed0: 2301 movs r3, #1 8033ed2: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8033ed4: 2304 movs r3, #4 8033ed6: 70a3 strb r3, [r4, #2] od->v_len = netif->hwaddr_len; 8033ed8: 9b01 ldr r3, [sp, #4] 8033eda: f893 3026 ldrb.w r3, [r3, #38] ; 0x26 8033ede: e015 b.n 8033f0c } break; case 7: /* ifAdminStatus */ od->instance = MIB_OBJECT_TAB; 8033ee0: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_WRITE; 8033ee2: 2203 movs r2, #3 8033ee4: 7062 strb r2, [r4, #1] 8033ee6: e008 b.n 8033efa 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; 8033ee8: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8033eea: 2301 movs r3, #1 8033eec: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS); 8033eee: 2343 movs r3, #67 ; 0x43 8033ef0: e003 b.n 8033efa case 16: /* ifOutOctets */ case 17: /* ifOutUcastPkts */ case 18: /* ifOutNUcastPkts */ case 19: /* ifOutDiscarts */ case 20: /* ifOutErrors */ od->instance = MIB_OBJECT_TAB; 8033ef2: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8033ef4: 2301 movs r3, #1 8033ef6: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 8033ef8: 2341 movs r3, #65 ; 0x41 8033efa: 70a3 strb r3, [r4, #2] od->v_len = sizeof(u32_t); 8033efc: 2304 movs r3, #4 8033efe: e005 b.n 8033f0c break; case 22: /* ifSpecific */ /** @note returning zeroDotZero (0.0) no media specific MIB support */ od->instance = MIB_OBJECT_TAB; 8033f00: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8033f02: 2301 movs r3, #1 8033f04: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID); 8033f06: 2306 movs r3, #6 8033f08: 70a3 strb r3, [r4, #2] od->v_len = ifspecific.len * sizeof(s32_t); 8033f0a: 2308 movs r3, #8 8033f0c: 80a3 strh r3, [r4, #4] break; 8033f0e: e001 b.n 8033f14 }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ifentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033f10: 2300 movs r3, #0 8033f12: 7023 strb r3, [r4, #0] } } 8033f14: bd1c pop {r2, r3, r4, pc} 8033f16: 0000 movs r0, r0 08033f18 : } } static void udpentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033f18: b537 push {r0, r1, r2, r4, r5, lr} 8033f1a: 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); 8033f1c: 6880 ldr r0, [r0, #8] 8033f1e: a901 add r1, sp, #4 8033f20: 3004 adds r0, #4 } } static void udpentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033f22: 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); 8033f24: f001 f814 bl 8034f50 LWIP_ASSERT("invalid port", (od->id_inst_ptr[5] >= 0) && (od->id_inst_ptr[5] <= 0xffff)); port = (u16_t)od->id_inst_ptr[5]; 8033f28: 68a1 ldr r1, [r4, #8] pcb = udp_pcbs; 8033f2a: 4b0c ldr r3, [pc, #48] ; (8033f5c ) 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]; 8033f2c: 8a8a ldrh r2, [r1, #20] pcb = udp_pcbs; 8033f2e: 681b ldr r3, [r3, #0] while ((pcb != NULL) && !(ip_addr_cmp(&pcb->local_ip, &ip) && 8033f30: 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) && 8033f32: e000 b.n 8033f36 !(ip_addr_cmp(&pcb->local_ip, &ip) && (pcb->local_port == port))) { pcb = pcb->next; 8033f34: 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) && 8033f36: b17b cbz r3, 8033f58 8033f38: 681c ldr r4, [r3, #0] 8033f3a: 4284 cmp r4, r0 8033f3c: d1fa bne.n 8033f34 !(ip_addr_cmp(&pcb->local_ip, &ip) && (pcb->local_port == port))) 8033f3e: 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) && 8033f40: 4294 cmp r4, r2 8033f42: d1f7 bne.n 8033f34 8033f44: e003 b.n 8033f4e switch (id) { case 1: /* udpLocalAddress */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = pcb->local_ip; 8033f46: 6028 str r0, [r5, #0] } break; 8033f48: e006 b.n 8033f58 case 2: /* udpLocalPort */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = pcb->local_port; 8033f4a: 602a str r2, [r5, #0] } break; 8033f4c: e004 b.n 8033f58 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) 8033f4e: 780b ldrb r3, [r1, #0] 8033f50: 2b01 cmp r3, #1 8033f52: d0f8 beq.n 8033f46 8033f54: 2b02 cmp r3, #2 8033f56: d0f8 beq.n 8033f4a *sint_ptr = pcb->local_port; } break; } } } 8033f58: bd3e pop {r1, r2, r3, r4, r5, pc} 8033f5a: bf00 nop 8033f5c: 2000f6d4 .word 0x2000f6d4 08033f60 : } } static void ip_addrentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033f60: b573 push {r0, r1, r4, r5, r6, lr} 8033f62: 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); 8033f64: 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; 8033f66: 4b18 ldr r3, [pc, #96] ; (8033fc8 ) LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); 8033f68: a901 add r1, sp, #4 8033f6a: 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; 8033f6c: 681c ldr r4, [r3, #0] } } static void ip_addrentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033f6e: 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); 8033f70: f000 ffee bl 8034f50 ifidx = 0; while ((netif != NULL) && !ip_addr_cmp(&ip, &netif->ip_addr)) 8033f74: 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; 8033f76: 2300 movs r3, #0 while ((netif != NULL) && !ip_addr_cmp(&ip, &netif->ip_addr)) 8033f78: e002 b.n 8033f80 { netif = netif->next; ifidx++; 8033f7a: 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; 8033f7c: 6824 ldr r4, [r4, #0] ifidx++; 8033f7e: 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)) 8033f80: b304 cbz r4, 8033fc4 8033f82: 6862 ldr r2, [r4, #4] 8033f84: 4291 cmp r1, r2 8033f86: d1f8 bne.n 8033f7a 8033f88: e00a b.n 8033fa0 switch (id) { case 1: /* ipAdEntAddr */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = netif->ip_addr; 8033f8a: 6863 ldr r3, [r4, #4] 8033f8c: e006 b.n 8033f9c } break; case 2: /* ipAdEntIfIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = ifidx + 1; 8033f8e: 3301 adds r3, #1 8033f90: e004 b.n 8033f9c } break; case 3: /* ipAdEntNetMask */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = netif->netmask; 8033f92: 68a3 ldr r3, [r4, #8] 8033f94: e002 b.n 8033f9c { 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; 8033f96: 2301 movs r3, #1 8033f98: e000 b.n 8033f9c *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; 8033f9a: 2300 movs r3, #0 8033f9c: 602b str r3, [r5, #0] #endif } break; 8033f9e: e011 b.n 8033fc4 } 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]; 8033fa0: 68b2 ldr r2, [r6, #8] switch (id) 8033fa2: 7812 ldrb r2, [r2, #0] 8033fa4: 3a01 subs r2, #1 8033fa6: 2a04 cmp r2, #4 8033fa8: d80c bhi.n 8033fc4 8033faa: a101 add r1, pc, #4 ; (adr r1, 8033fb0 ) 8033fac: f851 f022 ldr.w pc, [r1, r2, lsl #2] 8033fb0: 08033f8b .word 0x08033f8b 8033fb4: 08033f8f .word 0x08033f8f 8033fb8: 08033f93 .word 0x08033f93 8033fbc: 08033f97 .word 0x08033f97 8033fc0: 08033f9b .word 0x08033f9b #endif } break; } } } 8033fc4: bd7c pop {r2, r3, r4, r5, r6, pc} 8033fc6: bf00 nop 8033fc8: 2000f6ac .word 0x2000f6ac 08033fcc : } } static void ip_ntomentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033fcc: 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); 8033fce: 6883 ldr r3, [r0, #8] } } static void ip_ntomentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033fd0: b085 sub sp, #20 8033fd2: 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); 8033fd4: a903 add r1, sp, #12 8033fd6: 6858 ldr r0, [r3, #4] } } static void ip_ntomentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033fd8: 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); 8033fda: f000 ff9b bl 8034f14 snmp_oidtoip(&od->id_inst_ptr[2], &ip); 8033fde: 68a8 ldr r0, [r5, #8] 8033fe0: a902 add r1, sp, #8 8033fe2: 3008 adds r0, #8 8033fe4: f000 ffb4 bl 8034f50 #if LWIP_ARP /** @todo implement a netif_find_addr */ if (etharp_find_addr(netif, &ip, ðaddr_ret, &ipaddr_ret) > -1) 8033fe8: 9803 ldr r0, [sp, #12] 8033fea: a902 add r1, sp, #8 8033fec: 466a mov r2, sp 8033fee: ab01 add r3, sp, #4 8033ff0: f002 fff4 bl 8036fdc 8033ff4: 2800 cmp r0, #0 8033ff6: db15 blt.n 8034024 { LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 8033ff8: 68ab ldr r3, [r5, #8] switch (id) 8033ffa: 781a ldrb r2, [r3, #0] 8033ffc: 3a01 subs r2, #1 8033ffe: 2a03 cmp r2, #3 8034000: d810 bhi.n 8034024 8034002: e8df f002 tbb [pc, r2] 8034006: 0402 .short 0x0402 8034008: 0d0a .short 0x0d0a { case 1: /* ipNetToMediaIfIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = od->id_inst_ptr[1]; 803400a: 685b ldr r3, [r3, #4] 803400c: e009 b.n 8034022 break; case 2: /* ipNetToMediaPhysAddress */ { struct eth_addr *dst = (struct eth_addr*)value; *dst = *ethaddr_ret; 803400e: 9b00 ldr r3, [sp, #0] 8034010: 681a ldr r2, [r3, #0] 8034012: 6022 str r2, [r4, #0] 8034014: 889b ldrh r3, [r3, #4] 8034016: 80a3 strh r3, [r4, #4] } break; 8034018: e004 b.n 8034024 case 3: /* ipNetToMediaNetAddress */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = *ipaddr_ret; 803401a: 9b01 ldr r3, [sp, #4] 803401c: 681b ldr r3, [r3, #0] 803401e: e000 b.n 8034022 break; case 4: /* ipNetToMediaType */ { s32_t *sint_ptr = (s32_t*)value; /* dynamic (?) */ *sint_ptr = 3; 8034020: 2303 movs r3, #3 8034022: 6023 str r3, [r4, #0] } break; } } #endif /* LWIP_ARP */ } 8034024: b005 add sp, #20 8034026: bd30 pop {r4, r5, pc} 08034028 : } } static void atentry_get_value(struct obj_def *od, u16_t len, void *value) { 8034028: 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); 803402a: 6883 ldr r3, [r0, #8] } } static void atentry_get_value(struct obj_def *od, u16_t len, void *value) { 803402c: b085 sub sp, #20 803402e: 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); 8034030: a903 add r1, sp, #12 8034032: 6858 ldr r0, [r3, #4] } } static void atentry_get_value(struct obj_def *od, u16_t len, void *value) { 8034034: 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); 8034036: f000 ff6d bl 8034f14 snmp_oidtoip(&od->id_inst_ptr[2], &ip); 803403a: 68a8 ldr r0, [r5, #8] 803403c: a902 add r1, sp, #8 803403e: 3008 adds r0, #8 8034040: f000 ff86 bl 8034f50 #if LWIP_ARP /** @todo implement a netif_find_addr */ if (etharp_find_addr(netif, &ip, ðaddr_ret, &ipaddr_ret) > -1) 8034044: 9803 ldr r0, [sp, #12] 8034046: a902 add r1, sp, #8 8034048: 466a mov r2, sp 803404a: ab01 add r3, sp, #4 803404c: f002 ffc6 bl 8036fdc 8034050: 2800 cmp r0, #0 8034052: db12 blt.n 803407a { LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 8034054: 68aa ldr r2, [r5, #8] switch (id) 8034056: 7813 ldrb r3, [r2, #0] 8034058: 2b02 cmp r3, #2 803405a: d005 beq.n 8034068 803405c: 2b03 cmp r3, #3 803405e: d009 beq.n 8034074 8034060: 2b01 cmp r3, #1 8034062: d10a bne.n 803407a { case 1: /* atIfIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = od->id_inst_ptr[1]; 8034064: 6853 ldr r3, [r2, #4] 8034066: e007 b.n 8034078 break; case 2: /* atPhysAddress */ { struct eth_addr *dst = (struct eth_addr*)value; *dst = *ethaddr_ret; 8034068: 9b00 ldr r3, [sp, #0] 803406a: 681a ldr r2, [r3, #0] 803406c: 6022 str r2, [r4, #0] 803406e: 889b ldrh r3, [r3, #4] 8034070: 80a3 strh r3, [r4, #4] } break; 8034072: e002 b.n 803407a case 3: /* atNetAddress */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = *ipaddr_ret; 8034074: 9b01 ldr r3, [sp, #4] 8034076: 681b ldr r3, [r3, #0] 8034078: 6023 str r3, [r4, #0] } break; } } #endif /* LWIP_ARP */ } 803407a: b005 add sp, #20 803407c: bd30 pop {r4, r5, pc} 803407e: 0000 movs r0, r0 08034080 : 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]; 8034080: 6883 ldr r3, [r0, #8] switch (id) 8034082: 781b ldrb r3, [r3, #0] 8034084: 2b05 cmp r3, #5 8034086: d007 beq.n 8034098 8034088: 2b06 cmp r3, #6 803408a: d00f beq.n 80340ac 803408c: 2b04 cmp r3, #4 803408e: d111 bne.n 80340b4 { case 4: /* sysContact */ if ((syscontact_ptr != syscontact_default) && 8034090: 4b09 ldr r3, [pc, #36] ; (80340b8 ) 8034092: 681a ldr r2, [r3, #0] 8034094: 4b09 ldr r3, [pc, #36] ; (80340bc ) 8034096: e002 b.n 803409e { set_ok = 1; } break; case 5: /* sysName */ if ((sysname_ptr != sysname_default) && 8034098: 4b09 ldr r3, [pc, #36] ; (80340c0 ) 803409a: 681a ldr r2, [r3, #0] 803409c: 4b09 ldr r3, [pc, #36] ; (80340c4 ) 803409e: 429a cmp r2, r3 80340a0: d008 beq.n 80340b4 system_set_test(struct obj_def *od, u16_t len, void *value) { u8_t id, set_ok; LWIP_UNUSED_ARG(value); set_ok = 0; 80340a2: 29ff cmp r1, #255 ; 0xff 80340a4: bf8c ite hi 80340a6: 2000 movhi r0, #0 80340a8: 2001 movls r0, #1 80340aa: 4770 bx lr { set_ok = 1; } break; case 6: /* sysLocation */ if ((syslocation_ptr != syslocation_default) && 80340ac: 4b06 ldr r3, [pc, #24] ; (80340c8 ) 80340ae: 681a ldr r2, [r3, #0] 80340b0: 4b06 ldr r3, [pc, #24] ; (80340cc ) 80340b2: e7f4 b.n 803409e system_set_test(struct obj_def *od, u16_t len, void *value) { u8_t id, set_ok; LWIP_UNUSED_ARG(value); set_ok = 0; 80340b4: 2000 movs r0, #0 set_ok = 1; } break; }; return set_ok; } 80340b6: 4770 bx lr 80340b8: 2000090c .word 0x2000090c 80340bc: 08045244 .word 0x08045244 80340c0: 20000898 .word 0x20000898 80340c4: 08044f5c .word 0x08044f5c 80340c8: 20000a24 .word 0x20000a24 80340cc: 08044f8c .word 0x08044f8c 080340d0 : { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; if (ident_len == 6) 80340d0: 2801 cmp r0, #1 80340d2: d120 bne.n 8034116 { od->id_inst_len = ident_len; 80340d4: 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; 80340d6: f1a1 0314 sub.w r3, r1, #20 if (ident_len == 6) { od->id_inst_len = ident_len; 80340da: 7190 strb r0, [r2, #6] od->id_inst_ptr = ident; 80340dc: 6093 str r3, [r2, #8] switch (ident[0]) 80340de: f851 3c14 ldr.w r3, [r1, #-20] 80340e2: 2b02 cmp r3, #2 80340e4: d008 beq.n 80340f8 80340e6: 2b03 cmp r3, #3 80340e8: d00d beq.n 8034106 80340ea: 2b01 cmp r3, #1 80340ec: d113 bne.n 8034116 { case 1: /* atIfIndex */ od->instance = MIB_OBJECT_TAB; 80340ee: 2302 movs r3, #2 od->access = MIB_OBJECT_READ_WRITE; 80340f0: 2103 movs r1, #3 od->id_inst_ptr = ident; switch (ident[0]) { case 1: /* atIfIndex */ od->instance = MIB_OBJECT_TAB; 80340f2: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 80340f4: 7051 strb r1, [r2, #1] 80340f6: e00a b.n 803410e 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; 80340f8: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 80340fa: 2303 movs r3, #3 80340fc: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 80340fe: 2304 movs r3, #4 8034100: 7093 strb r3, [r2, #2] od->v_len = 6; /** @todo try to use netif::hwaddr_len */ 8034102: 8090 strh r0, [r2, #4] break; 8034104: 4770 bx lr case 3: /* atNetAddress */ od->instance = MIB_OBJECT_TAB; 8034106: 2102 movs r1, #2 od->access = MIB_OBJECT_READ_WRITE; 8034108: 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; 803410a: 7011 strb r1, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 803410c: 2340 movs r3, #64 ; 0x40 803410e: 7093 strb r3, [r2, #2] od->v_len = 4; 8034110: 2304 movs r3, #4 8034112: 8093 strh r3, [r2, #4] break; 8034114: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("atentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8034116: 2300 movs r3, #0 8034118: 7013 strb r3, [r2, #0] 803411a: 4770 bx lr 0803411c : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 803411c: 2801 cmp r0, #1 #endif /* LWIP_ARP */ } static void ip_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { 803411e: b510 push {r4, lr} u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8034120: d121 bne.n 8034166 { od->id_inst_len = ident_len; 8034122: 2402 movs r4, #2 { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 8034124: 1f0b subs r3, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; 8034126: 7194 strb r4, [r2, #6] od->id_inst_ptr = ident; 8034128: 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) 803412a: f811 3c04 ldrb.w r3, [r1, #-4] 803412e: 2b17 cmp r3, #23 8034130: d819 bhi.n 8034166 8034132: 490e ldr r1, [pc, #56] ; (803416c ) 8034134: 4099 lsls r1, r3 8034136: d40b bmi.n 8034150 8034138: f44f 2180 mov.w r1, #262144 ; 0x40000 803413c: 4099 lsls r1, r3 803413e: d40c bmi.n 803415a 8034140: f04f 41c0 mov.w r1, #1610612736 ; 0x60000000 8034144: 4099 lsls r1, r3 8034146: d50e bpl.n 8034166 { case 1: /* ipForwarding */ case 2: /* ipDefaultTTL */ od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_WRITE; 8034148: 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; 803414a: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 803414c: 7053 strb r3, [r2, #1] 803414e: e006 b.n 803415e 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); 8034150: 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; 8034152: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8034154: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 8034156: 7093 strb r3, [r2, #2] 8034158: e002 b.n 8034160 od->v_len = sizeof(u32_t); break; case 13: /* ipReasmTimeout */ od->instance = MIB_OBJECT_SCALAR; 803415a: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 803415c: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 803415e: 7094 strb r4, [r2, #2] od->v_len = sizeof(s32_t); 8034160: 2304 movs r3, #4 8034162: 8093 strh r3, [r2, #4] break; 8034164: bd10 pop {r4, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8034166: 2300 movs r3, #0 8034168: 7013 strb r3, [r2, #0] 803416a: bd10 pop {r4, pc} 803416c: 1ffbf100 .word 0x1ffbf100 08034170 : { /* return to object name, adding index depth (4) */ ident_len += 4; ident -= 4; if (ident_len == 5) 8034170: 2801 cmp r0, #1 8034172: d11c bne.n 80341ae { u8_t id; od->id_inst_len = ident_len; 8034174: 2305 movs r3, #5 8034176: 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; 8034178: 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; 803417c: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 803417e: f811 3c10 ldrb.w r3, [r1, #-16] 8034182: 2b05 cmp r3, #5 8034184: d813 bhi.n 80341ae 8034186: f04f 5130 mov.w r1, #738197504 ; 0x2c000000 803418a: 4099 lsls r1, r3 803418c: d408 bmi.n 80341a0 803418e: f04f 41a0 mov.w r1, #1342177280 ; 0x50000000 8034192: 4099 lsls r1, r3 8034194: d50b bpl.n 80341ae { case 1: /* ipAdEntAddr */ case 3: /* ipAdEntNetMask */ od->instance = MIB_OBJECT_TAB; 8034196: 2302 movs r3, #2 8034198: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 803419a: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 803419c: 2340 movs r3, #64 ; 0x40 803419e: e002 b.n 80341a6 od->v_len = 4; break; case 2: /* ipAdEntIfIndex */ case 4: /* ipAdEntBcastAddr */ case 5: /* ipAdEntReasmMaxSize */ od->instance = MIB_OBJECT_TAB; 80341a0: 2302 movs r3, #2 80341a2: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 80341a4: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 80341a6: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 80341a8: 2304 movs r3, #4 80341aa: 8093 strh r3, [r2, #4] break; 80341ac: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_addrentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 80341ae: 2300 movs r3, #0 80341b0: 7013 strb r3, [r2, #0] 80341b2: 4770 bx lr 080341b4 : { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; if (ident_len == 6) 80341b4: 2801 cmp r0, #1 80341b6: d123 bne.n 8034200 { u8_t id; od->id_inst_len = ident_len; 80341b8: 2306 movs r3, #6 80341ba: 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; 80341bc: 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; 80341c0: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 80341c2: f811 3c14 ldrb.w r3, [r1, #-20] 80341c6: 3b01 subs r3, #1 80341c8: 2b03 cmp r3, #3 80341ca: d819 bhi.n 8034200 80341cc: e8df f003 tbb [pc, r3] 80341d0: 020f0702 .word 0x020f0702 { case 1: /* ipNetToMediaIfIndex */ case 4: /* ipNetToMediaType */ od->instance = MIB_OBJECT_TAB; 80341d4: 2302 movs r3, #2 od->access = MIB_OBJECT_READ_WRITE; 80341d6: 2103 movs r1, #3 id = (u8_t)ident[0]; switch (id) { case 1: /* ipNetToMediaIfIndex */ case 4: /* ipNetToMediaType */ od->instance = MIB_OBJECT_TAB; 80341d8: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 80341da: 7051 strb r1, [r2, #1] 80341dc: e00c b.n 80341f8 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; 80341de: 2302 movs r3, #2 80341e0: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 80341e2: 2303 movs r3, #3 80341e4: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 80341e6: 2304 movs r3, #4 80341e8: 7093 strb r3, [r2, #2] od->v_len = 6; /** @todo try to use netif::hwaddr_len */ 80341ea: 2306 movs r3, #6 80341ec: e006 b.n 80341fc break; case 3: /* ipNetToMediaNetAddress */ od->instance = MIB_OBJECT_TAB; 80341ee: 2302 movs r3, #2 80341f0: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 80341f2: 2303 movs r3, #3 80341f4: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 80341f6: 2340 movs r3, #64 ; 0x40 80341f8: 7093 strb r3, [r2, #2] od->v_len = 4; 80341fa: 2304 movs r3, #4 80341fc: 8093 strh r3, [r2, #4] break; 80341fe: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_ntomentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8034200: 2300 movs r3, #0 8034202: 7013 strb r3, [r2, #0] 8034204: 4770 bx lr 8034206: 0000 movs r0, r0 08034208 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8034208: 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) { 803420a: b510 push {r4, lr} u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 803420c: d121 bne.n 8034252 { od->id_inst_len = ident_len; 803420e: 2402 movs r4, #2 { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 8034210: 1f0b subs r3, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; 8034212: 7194 strb r4, [r2, #6] od->id_inst_ptr = ident; 8034214: 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) 8034216: f811 3c04 ldrb.w r3, [r1, #-4] 803421a: 2b0f cmp r3, #15 803421c: d819 bhi.n 8034252 803421e: 490e ldr r1, [pc, #56] ; (8034258 ) 8034220: 4099 lsls r1, r3 8034222: d40b bmi.n 803423c 8034224: f44f 0180 mov.w r1, #4194304 ; 0x400000 8034228: 4099 lsls r1, r3 803422a: d40b bmi.n 8034244 803422c: f04f 41f0 mov.w r1, #2013265920 ; 0x78000000 8034230: 4099 lsls r1, r3 8034232: d50e bpl.n 8034252 { case 1: /* tcpRtoAlgorithm */ case 2: /* tcpRtoMin */ case 3: /* tcpRtoMax */ case 4: /* tcpMaxConn */ od->instance = MIB_OBJECT_SCALAR; 8034234: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8034236: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 8034238: 7094 strb r4, [r2, #2] 803423a: e007 b.n 803424c case 10: /* tcpInSegs */ case 11: /* tcpOutSegs */ case 12: /* tcpRetransSegs */ case 14: /* tcpInErrs */ case 15: /* tcpOutRsts */ od->instance = MIB_OBJECT_SCALAR; 803423c: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 803423e: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 8034240: 2341 movs r3, #65 ; 0x41 8034242: e002 b.n 803424a od->v_len = sizeof(u32_t); break; case 9: /* tcpCurrEstab */ od->instance = MIB_OBJECT_TAB; 8034244: 7014 strb r4, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8034246: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_GAUGE); 8034248: 2342 movs r3, #66 ; 0x42 803424a: 7093 strb r3, [r2, #2] od->v_len = sizeof(u32_t); 803424c: 2304 movs r3, #4 803424e: 8093 strh r3, [r2, #4] break; 8034250: bd10 pop {r4, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("tcp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8034252: 2300 movs r3, #0 8034254: 7013 strb r3, [r2, #0] 8034256: bd10 pop {r4, pc} 8034258: 07bb0000 .word 0x07bb0000 0803425c : { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; if (ident_len == 6) 803425c: 2801 cmp r0, #1 803425e: d116 bne.n 803428e { od->id_inst_len = ident_len; 8034260: 2306 movs r3, #6 8034262: 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; 8034264: f1a1 0314 sub.w r3, r1, #20 if (ident_len == 6) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8034268: 6093 str r3, [r2, #8] switch (ident[0]) 803426a: f851 3c14 ldr.w r3, [r1, #-20] 803426e: 2b01 cmp r3, #1 8034270: d002 beq.n 8034278 8034272: 2b02 cmp r3, #2 8034274: d10b bne.n 803428e 8034276: e004 b.n 8034282 { case 1: /* udpLocalAddress */ od->instance = MIB_OBJECT_TAB; 8034278: 2102 movs r1, #2 od->access = MIB_OBJECT_READ_ONLY; 803427a: 7053 strb r3, [r2, #1] od->id_inst_ptr = ident; switch (ident[0]) { case 1: /* udpLocalAddress */ od->instance = MIB_OBJECT_TAB; 803427c: 7011 strb r1, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 803427e: 2340 movs r3, #64 ; 0x40 8034280: e001 b.n 8034286 od->v_len = 4; break; case 2: /* udpLocalPort */ od->instance = MIB_OBJECT_TAB; 8034282: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8034284: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 8034286: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 8034288: 2304 movs r3, #4 803428a: 8093 strh r3, [r2, #4] break; 803428c: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("udpentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 803428e: 2300 movs r3, #0 8034290: 7013 strb r3, [r2, #0] 8034292: 4770 bx lr 08034294 : 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) 8034294: 2801 cmp r0, #1 } } static void snmp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { 8034296: b510 push {r4, lr} /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8034298: d119 bne.n 80342ce { u8_t id; od->id_inst_len = ident_len; 803429a: 2302 movs r3, #2 803429c: 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; 803429e: 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) 80342a0: 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; 80342a4: 6094 str r4, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 80342a6: 291e cmp r1, #30 80342a8: d811 bhi.n 80342ce 80342aa: 4c0a ldr r4, [pc, #40] ; (80342d4 ) 80342ac: 408c lsls r4, r1 80342ae: d403 bmi.n 80342b8 80342b0: fa13 f101 lsls.w r1, r3, r1 80342b4: d404 bmi.n 80342c0 80342b6: e00a b.n 80342ce case 25: /* snmpOutGetRequests */ case 26: /* snmpOutGetNexts */ case 27: /* snmpOutSetRequests */ case 28: /* snmpOutGetResponses */ case 29: /* snmpOutTraps */ od->instance = MIB_OBJECT_SCALAR; 80342b8: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 80342ba: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 80342bc: 2341 movs r3, #65 ; 0x41 80342be: e002 b.n 80342c6 od->v_len = sizeof(u32_t); break; case 30: /* snmpEnableAuthenTraps */ od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_WRITE; 80342c0: 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; 80342c2: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 80342c4: 7051 strb r1, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 80342c6: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 80342c8: 2304 movs r3, #4 80342ca: 8093 strh r3, [r2, #4] break; 80342cc: bd10 pop {r4, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("snmp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 80342ce: 2300 movs r3, #0 80342d0: 7013 strb r3, [r2, #0] 80342d2: bd10 pop {r4, pc} 80342d4: 7efffefc .word 0x7efffefc 080342d8 : 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]; 80342d8: 6883 ldr r3, [r0, #8] if (id == 30) 80342da: 781b ldrb r3, [r3, #0] 80342dc: 2b1e cmp r3, #30 80342de: d10f bne.n 8034300 { /* snmpEnableAuthenTraps */ s32_t *sint_ptr = (s32_t*)value; if (snmpenableauthentraps_ptr != &snmpenableauthentraps_default) 80342e0: 4b08 ldr r3, [pc, #32] ; (8034304 ) 80342e2: 6810 ldr r0, [r2, #0] 80342e4: 6819 ldr r1, [r3, #0] 80342e6: 4b08 ldr r3, [pc, #32] ; (8034308 ) 80342e8: 4299 cmp r1, r3 80342ea: d005 beq.n 80342f8 { /* we should have writable non-volatile mem here */ if ((*sint_ptr == 1) || (*sint_ptr == 2)) 80342ec: 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; 80342ee: 2801 cmp r0, #1 80342f0: bf8c ite hi 80342f2: 2000 movhi r0, #0 80342f4: 2001 movls r0, #1 80342f6: 4770 bx lr 80342f8: 1e83 subs r3, r0, #2 80342fa: 4258 negs r0, r3 80342fc: 4158 adcs r0, r3 80342fe: 4770 bx lr 8034300: 2000 movs r0, #0 set_ok = 1; } } } return set_ok; } 8034302: 4770 bx lr 8034304: 20000890 .word 0x20000890 8034308: 08045040 .word 0x08045040 0803430c : * @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) { 803430c: b510 push {r4, lr} u16_t i = n; while (i > 0) { 803430e: 2300 movs r3, #0 8034310: e002 b.n 8034318 i--; *dst++ = *src++; 8034312: 5ccc ldrb r4, [r1, r3] 8034314: 54c4 strb r4, [r0, r3] 8034316: 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) { 8034318: b29c uxth r4, r3 803431a: 42a2 cmp r2, r4 803431c: d1f9 bne.n 8034312 i--; *dst++ = *src++; } } 803431e: bd10 pop {r4, pc} 08034320 : { 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]; 8034320: 6883 ldr r3, [r0, #8] switch (id) 8034322: 781b ldrb r3, [r3, #0] 8034324: 2b05 cmp r3, #5 return set_ok; } static void system_set_value(struct obj_def *od, u16_t len, void *value) { 8034326: b510 push {r4, lr} 8034328: 460c mov r4, r1 803432a: 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) 803432c: d00a beq.n 8034344 803432e: 2b06 cmp r3, #6 8034330: d00f beq.n 8034352 8034332: 2b04 cmp r3, #4 8034334: d115 bne.n 8034362 { case 4: /* sysContact */ ocstrncpy(syscontact_ptr, (u8_t*)value, len); 8034336: 4b0b ldr r3, [pc, #44] ; (8034364 ) 8034338: 4622 mov r2, r4 803433a: 6818 ldr r0, [r3, #0] 803433c: f7ff ffe6 bl 803430c *syscontact_len_ptr = (u8_t)len; 8034340: 4b09 ldr r3, [pc, #36] ; (8034368 ) 8034342: e00c b.n 803435e break; case 5: /* sysName */ ocstrncpy(sysname_ptr, (u8_t*)value, len); 8034344: 4b09 ldr r3, [pc, #36] ; (803436c ) 8034346: 4622 mov r2, r4 8034348: 6818 ldr r0, [r3, #0] 803434a: f7ff ffdf bl 803430c *sysname_len_ptr = (u8_t)len; 803434e: 4b08 ldr r3, [pc, #32] ; (8034370 ) 8034350: e005 b.n 803435e break; case 6: /* sysLocation */ ocstrncpy(syslocation_ptr, (u8_t*)value, len); 8034352: 4b08 ldr r3, [pc, #32] ; (8034374 ) 8034354: 4622 mov r2, r4 8034356: 6818 ldr r0, [r3, #0] 8034358: f7ff ffd8 bl 803430c *syslocation_len_ptr = (u8_t)len; 803435c: 4b06 ldr r3, [pc, #24] ; (8034378 ) 803435e: 681b ldr r3, [r3, #0] 8034360: 701c strb r4, [r3, #0] 8034362: bd10 pop {r4, pc} 8034364: 2000090c .word 0x2000090c 8034368: 20000790 .word 0x20000790 803436c: 20000898 .word 0x20000898 8034370: 2000078c .word 0x2000078c 8034374: 20000a24 .word 0x20000a24 8034378: 20000978 .word 0x20000978 0803437c : * * @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) 803437c: 3904 subs r1, #4 { u8_t i = n; while(i > 0) { 803437e: e005 b.n 803438c i--; *dst++ = *src++; 8034380: 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--; 8034384: 3a01 subs r2, #1 *dst++ = *src++; 8034386: 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--; 803438a: 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) { 803438c: 2a00 cmp r2, #0 803438e: d1f7 bne.n 8034380 i--; *dst++ = *src++; } } 8034390: 4770 bx lr 8034392: 0000 movs r0, r0 08034394 : * @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) { 8034394: b573 push {r0, r1, r4, r5, r6, lr} struct netif *netif; u8_t id; snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 8034396: 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) { 8034398: 4606 mov r6, r0 803439a: 460d mov r5, r1 struct netif *netif; u8_t id; snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 803439c: 6858 ldr r0, [r3, #4] 803439e: 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) { 80343a0: 4614 mov r4, r2 struct netif *netif; u8_t id; snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 80343a2: f000 fdb7 bl 8034f14 LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 80343a6: 68b3 ldr r3, [r6, #8] switch (id) 80343a8: 781a ldrb r2, [r3, #0] 80343aa: 3a01 subs r2, #1 80343ac: 2a15 cmp r2, #21 80343ae: d85c bhi.n 803446a 80343b0: e8df f002 tbb [pc, r2] 80343b4: 15110d0b .word 0x15110d0b 80343b8: 2e221b18 .word 0x2e221b18 80343bc: 403d3a37 .word 0x403d3a37 80343c0: 46525243 .word 0x46525243 80343c4: 524f4c49 .word 0x524f4c49 80343c8: 5552 .short 0x5552 { case 1: /* ifIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = od->id_inst_ptr[1]; 80343ca: 685b ldr r3, [r3, #4] 80343cc: e045 b.n 803445a } break; case 2: /* ifDescr */ ocstrncpy((u8_t*)value, (u8_t*)netif->name, len); 80343ce: 9901 ldr r1, [sp, #4] 80343d0: 4620 mov r0, r4 80343d2: 312e adds r1, #46 ; 0x2e 80343d4: e00c b.n 80343f0 break; case 3: /* ifType */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = netif->link_type; 80343d6: 9b01 ldr r3, [sp, #4] 80343d8: f893 3031 ldrb.w r3, [r3, #49] ; 0x31 80343dc: e03d b.n 803445a } break; case 4: /* ifMtu */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = netif->mtu; 80343de: 9b01 ldr r3, [sp, #4] 80343e0: 8c9b ldrh r3, [r3, #36] ; 0x24 80343e2: e03a b.n 803445a } break; case 5: /* ifSpeed */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->link_speed; 80343e4: 9b01 ldr r3, [sp, #4] 80343e6: 6b5b ldr r3, [r3, #52] ; 0x34 80343e8: e037 b.n 803445a } break; case 6: /* ifPhysAddress */ ocstrncpy((u8_t*)value, netif->hwaddr, len); 80343ea: 9901 ldr r1, [sp, #4] 80343ec: 4620 mov r0, r4 80343ee: 3127 adds r1, #39 ; 0x27 80343f0: 462a mov r2, r5 80343f2: f7ff ff8b bl 803430c break; 80343f6: e038 b.n 803446a case 7: /* ifAdminStatus */ { s32_t *sint_ptr = (s32_t*)value; if (netif_is_up(netif)) 80343f8: 9b01 ldr r3, [sp, #4] 80343fa: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 80343fe: 07d9 lsls r1, r3, #31 8034400: d50d bpl.n 803441e { if (netif_is_link_up(netif)) 8034402: f003 0310 and.w r3, r3, #16 8034406: b2db uxtb r3, r3 8034408: b103 cbz r3, 803440c 803440a: e006 b.n 803441a { *sint_ptr = 1; /* up */ } else { *sint_ptr = 7; /* lowerLayerDown */ 803440c: 2307 movs r3, #7 803440e: e024 b.n 803445a } break; case 8: /* ifOperStatus */ { s32_t *sint_ptr = (s32_t*)value; if (netif_is_up(netif)) 8034410: 9b01 ldr r3, [sp, #4] 8034412: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 8034416: 07da lsls r2, r3, #31 8034418: d501 bpl.n 803441e { *sint_ptr = 1; 803441a: 2301 movs r3, #1 803441c: e01d b.n 803445a } else { *sint_ptr = 2; 803441e: 2302 movs r3, #2 8034420: e01b b.n 803445a } break; case 9: /* ifLastChange */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ts; 8034422: 9b01 ldr r3, [sp, #4] 8034424: 6b9b ldr r3, [r3, #56] ; 0x38 8034426: e018 b.n 803445a } break; case 10: /* ifInOctets */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifinoctets; 8034428: 9b01 ldr r3, [sp, #4] 803442a: 6bdb ldr r3, [r3, #60] ; 0x3c 803442c: e015 b.n 803445a } break; case 11: /* ifInUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifinucastpkts; 803442e: 9b01 ldr r3, [sp, #4] 8034430: 6c1b ldr r3, [r3, #64] ; 0x40 8034432: e012 b.n 803445a } break; case 12: /* ifInNUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifinnucastpkts; 8034434: 9b01 ldr r3, [sp, #4] 8034436: 6c5b ldr r3, [r3, #68] ; 0x44 8034438: e00f b.n 803445a } break; case 13: /* ifInDiscarts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifindiscards; 803443a: 9b01 ldr r3, [sp, #4] 803443c: 6c9b ldr r3, [r3, #72] ; 0x48 803443e: e00c b.n 803445a } break; case 16: /* ifOutOctets */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutoctets; 8034440: 9b01 ldr r3, [sp, #4] 8034442: 6cdb ldr r3, [r3, #76] ; 0x4c 8034444: e009 b.n 803445a } break; case 17: /* ifOutUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutucastpkts; 8034446: 9b01 ldr r3, [sp, #4] 8034448: 6d1b ldr r3, [r3, #80] ; 0x50 803444a: e006 b.n 803445a } break; case 18: /* ifOutNUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutnucastpkts; 803444c: 9b01 ldr r3, [sp, #4] 803444e: 6d5b ldr r3, [r3, #84] ; 0x54 8034450: e003 b.n 803445a } break; case 19: /* ifOutDiscarts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutdiscards; 8034452: 9b01 ldr r3, [sp, #4] 8034454: 6d9b ldr r3, [r3, #88] ; 0x58 8034456: e000 b.n 803445a 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; 8034458: 2300 movs r3, #0 803445a: 6023 str r3, [r4, #0] } break; 803445c: e005 b.n 803446a case 22: /* ifSpecific */ objectidncpy((s32_t*)value, (s32_t*)ifspecific.id, (u8_t)(len / sizeof(s32_t))); 803445e: 4620 mov r0, r4 8034460: 4902 ldr r1, [pc, #8] ; (803446c ) 8034462: f3c5 0287 ubfx r2, r5, #2, #8 8034466: f7ff ff89 bl 803437c break; }; } 803446a: bd7c pop {r2, r3, r4, r5, r6, pc} 803446c: 080450c8 .word 0x080450c8 08034470 : } } static void ip_rteentry_get_value(struct obj_def *od, u16_t len, void *value) { 8034470: 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; 8034472: 6885 ldr r5, [r0, #8] } } static void ip_rteentry_get_value(struct obj_def *od, u16_t len, void *value) { 8034474: 460f mov r7, r1 ip_addr_t dest; s32_t *ident; u8_t id; ident = od->id_inst_ptr; snmp_oidtoip(&ident[1], &dest); 8034476: 1d28 adds r0, r5, #4 8034478: a901 add r1, sp, #4 } } static void ip_rteentry_get_value(struct obj_def *od, u16_t len, void *value) { 803447a: 4614 mov r4, r2 ip_addr_t dest; s32_t *ident; u8_t id; ident = od->id_inst_ptr; snmp_oidtoip(&ident[1], &dest); 803447c: f000 fd68 bl 8034f50 if (ip_addr_isany(&dest)) 8034480: 9b01 ldr r3, [sp, #4] 8034482: b91b cbnz r3, 803448c { /* ip_route() uses default netif for default route */ netif = netif_default; 8034484: 4a23 ldr r2, [pc, #140] ; (8034514 ) 8034486: 6810 ldr r0, [r2, #0] !ip_addr_netcmp(&dest, &(netif->ip_addr), &(netif->netmask)) ) { netif = netif->next; } } if (netif != NULL) 8034488: b960 cbnz r0, 80344a4 803448a: e041 b.n 8034510 netif = netif_default; } else { /* not using ip_route(), need exact match! */ netif = netif_list; 803448c: 4a22 ldr r2, [pc, #136] ; (8034518 ) 803448e: 6810 ldr r0, [r2, #0] while ((netif != NULL) && 8034490: e000 b.n 8034494 !ip_addr_netcmp(&dest, &(netif->ip_addr), &(netif->netmask)) ) { netif = netif->next; 8034492: 6800 ldr r0, [r0, #0] } else { /* not using ip_route(), need exact match! */ netif = netif_list; while ((netif != NULL) && 8034494: 2800 cmp r0, #0 8034496: d03b beq.n 8034510 !ip_addr_netcmp(&dest, &(netif->ip_addr), &(netif->netmask)) ) 8034498: 6846 ldr r6, [r0, #4] 803449a: ea83 0206 eor.w r2, r3, r6 803449e: 6886 ldr r6, [r0, #8] } else { /* not using ip_route(), need exact match! */ netif = netif_list; while ((netif != NULL) && 80344a0: 4232 tst r2, r6 80344a2: d1f6 bne.n 8034492 } if (netif != NULL) { LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 80344a4: 782d ldrb r5, [r5, #0] 80344a6: 3d01 subs r5, #1 80344a8: 2d0c cmp r5, #12 80344aa: d831 bhi.n 8034510 80344ac: e8df f005 tbb [pc, r5] 80344b0: 14110d07 .word 0x14110d07 80344b4: 1c171414 .word 0x1c171414 80344b8: 14252321 .word 0x14252321 80344bc: 2a .byte 0x2a 80344bd: 00 .byte 0x00 { case 1: /* ipRouteDest */ { ip_addr_t *dst = (ip_addr_t*)value; if (ip_addr_isany(&dest)) 80344be: b903 cbnz r3, 80344c2 80344c0: e01e b.n 8034500 ip_addr_set_zero(dst); } else { /* netifs have netaddress dest */ ip_addr_get_network(dst, &netif->ip_addr, &netif->netmask); 80344c2: 6882 ldr r2, [r0, #8] 80344c4: 6843 ldr r3, [r0, #4] 80344c6: 4013 ands r3, r2 80344c8: e01a b.n 8034500 break; case 2: /* ipRouteIfIndex */ { s32_t *sint_ptr = (s32_t*)value; snmp_netiftoifindex(netif, sint_ptr); 80344ca: 4621 mov r1, r4 80344cc: f000 fd30 bl 8034f30 } break; 80344d0: e01e b.n 8034510 case 3: /* ipRouteMetric1 */ { s32_t *sint_ptr = (s32_t*)value; if (ip_addr_isany(&dest)) 80344d2: b983 cbnz r3, 80344f6 { /* default rte has metric 1 */ *sint_ptr = 1; 80344d4: 2301 movs r3, #1 80344d6: e013 b.n 8034500 case 6: /* ipRouteMetric4 */ case 12: /* ipRouteMetric5 */ { s32_t *sint_ptr = (s32_t*)value; /* not used */ *sint_ptr = -1; 80344d8: f04f 33ff mov.w r3, #4294967295 80344dc: e010 b.n 8034500 break; case 7: /* ipRouteNextHop */ { ip_addr_t *dst = (ip_addr_t*)value; if (ip_addr_isany(&dest)) 80344de: b90b cbnz r3, 80344e4 { /* default rte: gateway */ *dst = netif->gw; 80344e0: 68c3 ldr r3, [r0, #12] 80344e2: e00d b.n 8034500 } else { /* other rtes: netif ip_addr */ *dst = netif->ip_addr; 80344e4: 6843 ldr r3, [r0, #4] 80344e6: e00b b.n 8034500 break; case 8: /* ipRouteType */ { s32_t *sint_ptr = (s32_t*)value; if (ip_addr_isany(&dest)) 80344e8: b90b cbnz r3, 80344ee { /* default rte is indirect */ *sint_ptr = 4; 80344ea: 2304 movs r3, #4 80344ec: e008 b.n 8034500 } else { /* other rtes are direct */ *sint_ptr = 3; 80344ee: 2303 movs r3, #3 80344f0: e006 b.n 8034500 break; case 9: /* ipRouteProto */ { s32_t *sint_ptr = (s32_t*)value; /* locally defined routes */ *sint_ptr = 2; 80344f2: 2302 movs r3, #2 80344f4: e004 b.n 8034500 case 10: /* ipRouteAge */ { s32_t *sint_ptr = (s32_t*)value; /** @todo (sysuptime - timestamp last change) / 100 @see snmp_insert_iprteidx_tree() */ *sint_ptr = 0; 80344f6: 2300 movs r3, #0 80344f8: e002 b.n 8034500 break; case 11: /* ipRouteMask */ { ip_addr_t *dst = (ip_addr_t*)value; if (ip_addr_isany(&dest)) 80344fa: b903 cbnz r3, 80344fe 80344fc: e000 b.n 8034500 ip_addr_set_zero(dst); } else { /* other rtes use netmask */ *dst = netif->netmask; 80344fe: 6883 ldr r3, [r0, #8] 8034500: 6023 str r3, [r4, #0] 8034502: e005 b.n 8034510 } } break; case 13: /* ipRouteInfo */ objectidncpy((s32_t*)value, (s32_t*)iprouteinfo.id, (u8_t)(len / sizeof(s32_t))); 8034504: 4620 mov r0, r4 8034506: 4905 ldr r1, [pc, #20] ; (803451c ) 8034508: f3c7 0287 ubfx r2, r7, #2, #8 803450c: f7ff ff36 bl 803437c break; } } } 8034510: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 8034512: bf00 nop 8034514: 2000f6b0 .word 0x2000f6b0 8034518: 2000f6ac .word 0x2000f6ac 803451c: 08044edc .word 0x08044edc 08034520 : * @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) 8034520: b118 cbz r0, 803452a { sysdescr_ptr = str; 8034522: 4b02 ldr r3, [pc, #8] ; (803452c ) 8034524: 6018 str r0, [r3, #0] sysdescr_len_ptr = len; 8034526: 4b02 ldr r3, [pc, #8] ; (8034530 ) 8034528: 6019 str r1, [r3, #0] 803452a: 4770 bx lr 803452c: 200008b8 .word 0x200008b8 8034530: 20000934 .word 0x20000934 08034534 : * Initializes sysObjectID value. * * @param oid points to stuct snmp_obj_id to copy */ void snmp_set_sysobjid(struct snmp_obj_id *oid) { 8034534: 4601 mov r1, r0 8034536: b508 push {r3, lr} sysobjid = *oid; 8034538: 2284 movs r2, #132 ; 0x84 803453a: 4802 ldr r0, [pc, #8] ; (8034544 ) 803453c: f7ed fa26 bl 802198c 8034540: bd08 pop {r3, pc} 8034542: bf00 nop 8034544: 200007e4 .word 0x200007e4 08034548 : * 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++; 8034548: 4b02 ldr r3, [pc, #8] ; (8034554 ) 803454a: 681a ldr r2, [r3, #0] 803454c: 3201 adds r2, #1 803454e: 601a str r2, [r3, #0] 8034550: 4770 bx lr 8034552: bf00 nop 8034554: 2000c4fc .word 0x2000c4fc 08034558 : { sysuptime+=value; } void snmp_get_sysuptime(u32_t *value) { 8034558: b510 push {r4, lr} 803455a: 4604 mov r4, r0 SNMP_GET_SYSUPTIME(sysuptime); 803455c: f003 fa1a bl 8037994 8034560: 230a movs r3, #10 8034562: 4a03 ldr r2, [pc, #12] ; (8034570 ) 8034564: fbb0 f0f3 udiv r0, r0, r3 8034568: 6010 str r0, [r2, #0] *value = sysuptime; 803456a: 6020 str r0, [r4, #0] 803456c: bd10 pop {r4, pc} 803456e: bf00 nop 8034570: 2000c4fc .word 0x2000c4fc 08034574 : * @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) { 8034574: 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]; 8034576: 6882 ldr r2, [r0, #8] switch (id) 8034578: 7812 ldrb r2, [r2, #0] 803457a: 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) { 803457c: b510 push {r4, lr} 803457e: 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) 8034580: 2a06 cmp r2, #6 8034582: d825 bhi.n 80345d0 8034584: e8df f002 tbb [pc, r2] 8034588: 140f0704 .word 0x140f0704 803458c: 1a17 .short 0x1a17 803458e: 22 .byte 0x22 803458f: 00 .byte 0x00 { case 1: /* sysDescr */ ocstrncpy((u8_t*)value, sysdescr_ptr, len); 8034590: 4618 mov r0, r3 8034592: 4b10 ldr r3, [pc, #64] ; (80345d4 ) 8034594: e014 b.n 80345c0 break; case 2: /* sysObjectID */ objectidncpy((s32_t*)value, (s32_t*)sysobjid.id, (u8_t)(len / sizeof(s32_t))); 8034596: 4910 ldr r1, [pc, #64] ; (80345d8 ) 8034598: 4618 mov r0, r3 803459a: f3c4 0287 ubfx r2, r4, #2, #8 s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; } break; }; } 803459e: 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))); 80345a2: f7ff beeb b.w 803437c break; case 3: /* sysUpTime */ { snmp_get_sysuptime((u32_t*)value); 80345a6: 4618 mov r0, r3 s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; } break; }; } 80345a8: 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); 80345ac: f7ff bfd4 b.w 8034558 } break; case 4: /* sysContact */ ocstrncpy((u8_t*)value, syscontact_ptr, len); 80345b0: 4618 mov r0, r3 80345b2: 4b0a ldr r3, [pc, #40] ; (80345dc ) 80345b4: e004 b.n 80345c0 break; case 5: /* sysName */ ocstrncpy((u8_t*)value, sysname_ptr, len); 80345b6: 4618 mov r0, r3 80345b8: 4b09 ldr r3, [pc, #36] ; (80345e0 ) 80345ba: e001 b.n 80345c0 break; case 6: /* sysLocation */ ocstrncpy((u8_t*)value, syslocation_ptr, len); 80345bc: 4618 mov r0, r3 80345be: 4b09 ldr r3, [pc, #36] ; (80345e4 ) 80345c0: 6819 ldr r1, [r3, #0] 80345c2: 4622 mov r2, r4 s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; } break; }; } 80345c4: 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); 80345c8: f7ff bea0 b.w 803430c break; case 7: /* sysServices */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; 80345cc: 2248 movs r2, #72 ; 0x48 80345ce: 601a str r2, [r3, #0] 80345d0: bd10 pop {r4, pc} 80345d2: bf00 nop 80345d4: 200008b8 .word 0x200008b8 80345d8: 200007e8 .word 0x200007e8 80345dc: 2000090c .word 0x2000090c 80345e0: 20000898 .word 0x20000898 80345e4: 20000a24 .word 0x20000a24 080345e8 : * @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) 80345e8: b118 cbz r0, 80345f2 { syscontact_ptr = ocstr; 80345ea: 4b02 ldr r3, [pc, #8] ; (80345f4 ) 80345ec: 6018 str r0, [r3, #0] syscontact_len_ptr = ocstrlen; 80345ee: 4b02 ldr r3, [pc, #8] ; (80345f8 ) 80345f0: 6019 str r1, [r3, #0] 80345f2: 4770 bx lr 80345f4: 2000090c .word 0x2000090c 80345f8: 20000790 .word 0x20000790 080345fc : * @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) 80345fc: b118 cbz r0, 8034606 { sysname_ptr = ocstr; 80345fe: 4b02 ldr r3, [pc, #8] ; (8034608 ) 8034600: 6018 str r0, [r3, #0] sysname_len_ptr = ocstrlen; 8034602: 4b02 ldr r3, [pc, #8] ; (803460c ) 8034604: 6019 str r1, [r3, #0] 8034606: 4770 bx lr 8034608: 20000898 .word 0x20000898 803460c: 2000078c .word 0x2000078c 08034610 : * @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) 8034610: b118 cbz r0, 803461a { syslocation_ptr = ocstr; 8034612: 4b02 ldr r3, [pc, #8] ; (803461c ) 8034614: 6018 str r0, [r3, #0] syslocation_len_ptr = ocstrlen; 8034616: 4b02 ldr r3, [pc, #8] ; (8034620 ) 8034618: 6019 str r1, [r3, #0] 803461a: 4770 bx lr 803461c: 20000a24 .word 0x20000a24 8034620: 20000978 .word 0x20000978 08034624 : { (ni->ifoutdiscards)++; } void snmp_inc_iflist(void) { 8034624: 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); 8034626: 4806 ldr r0, [pc, #24] ; (8034640 ) (ni->ifoutdiscards)++; } void snmp_inc_iflist(void) { struct mib_list_node *if_node = NULL; 8034628: aa02 add r2, sp, #8 snmp_mib_node_insert(&iflist_root, iflist_root.count + 1, &if_node); 803462a: 8b81 ldrh r1, [r0, #28] (ni->ifoutdiscards)++; } void snmp_inc_iflist(void) { struct mib_list_node *if_node = NULL; 803462c: 2300 movs r3, #0 803462e: f842 3d04 str.w r3, [r2, #-4]! snmp_mib_node_insert(&iflist_root, iflist_root.count + 1, &if_node); 8034632: 3101 adds r1, #1 8034634: f000 fcd4 bl 8034fe0 /* enable getnext traversal on filled table */ iftable.maxlength = 1; 8034638: 4b02 ldr r3, [pc, #8] ; (8034644 ) 803463a: 2201 movs r2, #1 803463c: 825a strh r2, [r3, #18] } 803463e: bd0e pop {r1, r2, r3, pc} 8034640: 200007c4 .word 0x200007c4 8034644: 2000093c .word 0x2000093c 08034648 : /** * 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) { 8034648: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 803464c: b086 sub sp, #24 803464e: 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]); 8034650: a901 add r1, sp, #4 8034652: f000 fc6d bl 8034f30 snmp_iptooid(ip, &arpidx[1]); 8034656: 4620 mov r0, r4 8034658: a902 add r1, sp, #8 803465a: f000 fc86 bl 8034f6a for (tree = 0; tree < 2; tree++) { if (tree == 0) { at_rn = &arptree_root; 803465e: f8df 80a0 ldr.w r8, [pc, #160] ; 8034700 LWIP_ASSERT("ni != NULL", ni != NULL); snmp_netiftoifindex(ni, &arpidx[0]); snmp_iptooid(ip, &arpidx[1]); for (tree = 0; tree < 2; tree++) 8034662: 2500 movs r5, #0 { if (tree == 0) { at_rn = &arptree_root; 8034664: 4c1f ldr r4, [pc, #124] ; (80346e4 ) 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; 8034666: f8df 909c ldr.w r9, [pc, #156] ; 8034704 at_rn->set_value = noleafs_set_value; 803466a: f8df a09c ldr.w sl, [pc, #156] ; 8034708 for (tree = 0; tree < 2; tree++) { if (tree == 0) { at_rn = &arptree_root; 803466e: 2d00 cmp r5, #0 8034670: bf18 it ne 8034672: 4644 movne r4, r8 } else { at_rn = &ipntomtree_root; 8034674: 2600 movs r6, #0 } for (level = 0; level < 5; level++) { at_node = NULL; 8034676: 2300 movs r3, #0 8034678: 9300 str r3, [sp, #0] snmp_mib_node_insert(at_rn, arpidx[level], &at_node); 803467a: ab01 add r3, sp, #4 803467c: 4620 mov r0, r4 803467e: f853 1026 ldr.w r1, [r3, r6, lsl #2] 8034682: aa00 add r2, sp, #0 8034684: b2f7 uxtb r7, r6 8034686: f000 fcab bl 8034fe0 if ((level != 4) && (at_node != NULL)) 803468a: 2f04 cmp r7, #4 803468c: d01d beq.n 80346ca 803468e: 9b00 ldr r3, [sp, #0] 8034690: b1db cbz r3, 80346ca { if (at_node->nptr == NULL) 8034692: 68dc ldr r4, [r3, #12] 8034694: b9cc cbnz r4, 80346ca { at_rn = snmp_mib_lrn_alloc(); 8034696: f000 fc81 bl 8034f9c at_node->nptr = (struct mib_node*)at_rn; 803469a: 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(); 803469c: 4604 mov r4, r0 at_node->nptr = (struct mib_node*)at_rn; 803469e: 60d8 str r0, [r3, #12] if (at_rn != NULL) 80346a0: b920 cbnz r0, 80346ac LWIP_ASSERT("ni != NULL", ni != NULL); snmp_netiftoifindex(ni, &arpidx[0]); snmp_iptooid(ip, &arpidx[1]); for (tree = 0; tree < 2; tree++) 80346a2: 3501 adds r5, #1 80346a4: b2ed uxtb r5, r5 80346a6: 2d02 cmp r5, #2 80346a8: d1dc bne.n 8034664 80346aa: e012 b.n 80346d2 { at_rn = snmp_mib_lrn_alloc(); at_node->nptr = (struct mib_node*)at_rn; if (at_rn != NULL) { if (level == 3) 80346ac: 2f03 cmp r7, #3 80346ae: d10c bne.n 80346ca { if (tree == 0) 80346b0: b91d cbnz r5, 80346ba { at_rn->get_object_def = atentry_get_object_def; 80346b2: 4b0d ldr r3, [pc, #52] ; (80346e8 ) 80346b4: 6003 str r3, [r0, #0] at_rn->get_value = atentry_get_value; 80346b6: 4b0d ldr r3, [pc, #52] ; (80346ec ) 80346b8: e002 b.n 80346c0 } else { at_rn->get_object_def = ip_ntomentry_get_object_def; 80346ba: 4b0d ldr r3, [pc, #52] ; (80346f0 ) 80346bc: 6003 str r3, [r0, #0] at_rn->get_value = ip_ntomentry_get_value; 80346be: 4b0d ldr r3, [pc, #52] ; (80346f4 ) 80346c0: 6063 str r3, [r4, #4] } at_rn->set_test = noleafs_set_test; 80346c2: f8c4 9008 str.w r9, [r4, #8] at_rn->set_value = noleafs_set_value; 80346c6: f8c4 a00c str.w sl, [r4, #12] 80346ca: 3601 adds r6, #1 } else { at_rn = &ipntomtree_root; } for (level = 0; level < 5; level++) 80346cc: 2e05 cmp r6, #5 80346ce: d1d2 bne.n 8034676 80346d0: e7e7 b.n 80346a2 } } } } /* enable getnext traversal on filled tables */ at.maxlength = 1; 80346d2: 4a09 ldr r2, [pc, #36] ; (80346f8 ) 80346d4: 2301 movs r3, #1 80346d6: 8253 strh r3, [r2, #18] ipntomtable.maxlength = 1; 80346d8: 4a08 ldr r2, [pc, #32] ; (80346fc ) 80346da: 8253 strh r3, [r2, #18] } 80346dc: b006 add sp, #24 80346de: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 80346e2: bf00 nop 80346e4: 20000910 .word 0x20000910 80346e8: 080340d1 .word 0x080340d1 80346ec: 08034029 .word 0x08034029 80346f0: 080341b5 .word 0x080341b5 80346f4: 08033fcd .word 0x08033fcd 80346f8: 20000734 .word 0x20000734 80346fc: 20000718 .word 0x20000718 8034700: 20000a00 .word 0x20000a00 8034704: 080338eb .word 0x080338eb 8034708: 080338ef .word 0x080338ef 0803470c : /** * Removes ARP table indexes (.xIfIndex.xNetAddress) * from arp table index trees. */ void snmp_delete_arpidx_tree(struct netif *ni, ip_addr_t *ip) { 803470c: b5f0 push {r4, r5, r6, r7, lr} 803470e: b091 sub sp, #68 ; 0x44 8034710: 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]); 8034712: a90b add r1, sp, #44 ; 0x2c 8034714: f000 fc0c bl 8034f30 snmp_iptooid(ip, &arpidx[1]); 8034718: 4620 mov r0, r4 803471a: a90c add r1, sp, #48 ; 0x30 803471c: f000 fc25 bl 8034f6a for (tree = 0; tree < 2; tree++) 8034720: 2700 movs r7, #0 { /* mark nodes for deletion */ if (tree == 0) { at_rn = &arptree_root; 8034722: 4b26 ldr r3, [pc, #152] ; (80347bc ) 8034724: 4d26 ldr r5, [pc, #152] ; (80347c0 ) } else { at_rn = &ipntomtree_root; 8034726: 2600 movs r6, #0 for (tree = 0; tree < 2; tree++) { /* mark nodes for deletion */ if (tree == 0) { at_rn = &arptree_root; 8034728: 2f00 cmp r7, #0 803472a: bf08 it eq 803472c: 461d moveq r5, r3 } else { at_rn = &ipntomtree_root; 803472e: 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); 8034730: ab0b add r3, sp, #44 ; 0x2c 8034732: 4628 mov r0, r5 8034734: 58f1 ldr r1, [r6, r3] 8034736: aa00 add r2, sp, #0 8034738: f000 fc8d bl 8035056 803473c: b2c0 uxtb r0, r0 if (fc == 0) 803473e: b198 cbz r0, 8034768 { /* arpidx[level] does not exist */ del_cnt = 0; at_rn = NULL; } else if (fc == 1) 8034740: 2801 cmp r0, #1 8034742: d10b bne.n 803475c { del_rn[del_cnt] = at_rn; 8034744: ab10 add r3, sp, #64 ; 0x40 8034746: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = at_n; 803474a: 9b00 ldr r3, [sp, #0] del_cnt = 0; at_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = at_rn; 803474c: f842 5c3c str.w r5, [r2, #-60] del_n[del_cnt] = at_n; del_cnt++; 8034750: 3401 adds r4, #1 at_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = at_rn; del_n[del_cnt] = at_n; 8034752: f842 3c28 str.w r3, [r2, #-40] del_cnt++; 8034756: b2e4 uxtb r4, r4 at_rn = (struct mib_list_rootnode*)(at_n->nptr); 8034758: 68dd ldr r5, [r3, #12] 803475a: e007 b.n 803476c } else if (fc == 2) 803475c: 2802 cmp r0, #2 803475e: d105 bne.n 803476c { /* reset delete (2 or more childs) */ del_cnt = 0; at_rn = (struct mib_list_rootnode*)(at_n->nptr); 8034760: 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; 8034762: 2400 movs r4, #0 at_rn = (struct mib_list_rootnode*)(at_n->nptr); 8034764: 68dd ldr r5, [r3, #12] 8034766: e001 b.n 803476c { fc = snmp_mib_node_find(at_rn, arpidx[level], &at_n); if (fc == 0) { /* arpidx[level] does not exist */ del_cnt = 0; 8034768: 4604 mov r4, r0 at_rn = NULL; 803476a: 4605 mov r5, r0 803476c: 3604 adds r6, #4 { at_rn = &ipntomtree_root; } level = 0; del_cnt = 0; while ((level < 5) && (at_rn != NULL)) 803476e: 2e14 cmp r6, #20 8034770: d011 beq.n 8034796 8034772: 2d00 cmp r5, #0 8034774: d1dc bne.n 8034730 8034776: e00e b.n 8034796 level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 8034778: 3c01 subs r4, #1 803477a: b2e4 uxtb r4, r4 at_rn = del_rn[del_cnt]; 803477c: aa10 add r2, sp, #64 ; 0x40 803477e: eb02 0384 add.w r3, r2, r4, lsl #2 at_n = del_n[del_cnt]; 8034782: f853 1c28 ldr.w r1, [r3, #-40] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; at_rn = del_rn[del_cnt]; 8034786: f853 0c3c ldr.w r0, [r3, #-60] at_n = del_n[del_cnt]; 803478a: 9100 str r1, [sp, #0] next = snmp_mib_node_delete(at_rn, at_n); 803478c: f000 fc7d bl 803508a if (next != NULL) 8034790: b108 cbz r0, 8034796 { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 8034792: f000 fc21 bl 8034fd8 at_rn = (struct mib_list_rootnode*)(at_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 8034796: 2c00 cmp r4, #0 8034798: d1ee bne.n 8034778 u8_t fc, tree, level, del_cnt; snmp_netiftoifindex(ni, &arpidx[0]); snmp_iptooid(ip, &arpidx[1]); for (tree = 0; tree < 2; tree++) 803479a: 3701 adds r7, #1 803479c: b2ff uxtb r7, r7 803479e: 2f02 cmp r7, #2 80347a0: d1bf bne.n 8034722 snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty tables */ if(arptree_root.count == 0) at.maxlength = 0; 80347a2: 4b06 ldr r3, [pc, #24] ; (80347bc ) 80347a4: 8b9b ldrh r3, [r3, #28] 80347a6: b90b cbnz r3, 80347ac 80347a8: 4b06 ldr r3, [pc, #24] ; (80347c4 ) 80347aa: 825c strh r4, [r3, #18] if(ipntomtree_root.count == 0) ipntomtable.maxlength = 0; 80347ac: 4b04 ldr r3, [pc, #16] ; (80347c0 ) 80347ae: 8b9b ldrh r3, [r3, #28] 80347b0: b90b cbnz r3, 80347b6 80347b2: 4a05 ldr r2, [pc, #20] ; (80347c8 ) 80347b4: 8253 strh r3, [r2, #18] } 80347b6: b011 add sp, #68 ; 0x44 80347b8: bdf0 pop {r4, r5, r6, r7, pc} 80347ba: bf00 nop 80347bc: 20000910 .word 0x20000910 80347c0: 20000a00 .word 0x20000a00 80347c4: 20000734 .word 0x20000734 80347c8: 20000718 .word 0x20000718 080347cc : void snmp_inc_ipinreceives(void) { ipinreceives++; 80347cc: 4b02 ldr r3, [pc, #8] ; (80347d8 ) 80347ce: 681a ldr r2, [r3, #0] 80347d0: 3201 adds r2, #1 80347d2: 601a str r2, [r3, #0] 80347d4: 4770 bx lr 80347d6: bf00 nop 80347d8: 2000c4d0 .word 0x2000c4d0 080347dc : } void snmp_inc_ipinhdrerrors(void) { ipinhdrerrors++; 80347dc: 4b02 ldr r3, [pc, #8] ; (80347e8 ) 80347de: 681a ldr r2, [r3, #0] 80347e0: 3201 adds r2, #1 80347e2: 601a str r2, [r3, #0] 80347e4: 4770 bx lr 80347e6: bf00 nop 80347e8: 2000c458 .word 0x2000c458 080347ec : } void snmp_inc_ipinaddrerrors(void) { ipinaddrerrors++; 80347ec: 4b02 ldr r3, [pc, #8] ; (80347f8 ) 80347ee: 681a ldr r2, [r3, #0] 80347f0: 3201 adds r2, #1 80347f2: 601a str r2, [r3, #0] 80347f4: 4770 bx lr 80347f6: bf00 nop 80347f8: 2000c43c .word 0x2000c43c 080347fc : ipforwdatagrams++; } void snmp_inc_ipinunknownprotos(void) { ipinunknownprotos++; 80347fc: 4b02 ldr r3, [pc, #8] ; (8034808 ) 80347fe: 681a ldr r2, [r3, #0] 8034800: 3201 adds r2, #1 8034802: 601a str r2, [r3, #0] 8034804: 4770 bx lr 8034806: bf00 nop 8034808: 2000c498 .word 0x2000c498 0803480c : } void snmp_inc_ipindiscards(void) { ipindiscards++; 803480c: 4b02 ldr r3, [pc, #8] ; (8034818 ) 803480e: 681a ldr r2, [r3, #0] 8034810: 3201 adds r2, #1 8034812: 601a str r2, [r3, #0] 8034814: 4770 bx lr 8034816: bf00 nop 8034818: 2000c524 .word 0x2000c524 0803481c : } void snmp_inc_ipindelivers(void) { ipindelivers++; 803481c: 4b02 ldr r3, [pc, #8] ; (8034828 ) 803481e: 681a ldr r2, [r3, #0] 8034820: 3201 adds r2, #1 8034822: 601a str r2, [r3, #0] 8034824: 4770 bx lr 8034826: bf00 nop 8034828: 2000c55c .word 0x2000c55c 0803482c : } void snmp_inc_ipoutrequests(void) { ipoutrequests++; 803482c: 4b02 ldr r3, [pc, #8] ; (8034838 ) 803482e: 681a ldr r2, [r3, #0] 8034830: 3201 adds r2, #1 8034832: 601a str r2, [r3, #0] 8034834: 4770 bx lr 8034836: bf00 nop 8034838: 2000c544 .word 0x2000c544 0803483c : } void snmp_inc_ipoutdiscards(void) { ipoutdiscards++; 803483c: 4b02 ldr r3, [pc, #8] ; (8034848 ) 803483e: 681a ldr r2, [r3, #0] 8034840: 3201 adds r2, #1 8034842: 601a str r2, [r3, #0] 8034844: 4770 bx lr 8034846: bf00 nop 8034848: 2000c4e8 .word 0x2000c4e8 0803484c : } void snmp_inc_ipoutnoroutes(void) { ipoutnoroutes++; 803484c: 4b02 ldr r3, [pc, #8] ; (8034858 ) 803484e: 681a ldr r2, [r3, #0] 8034850: 3201 adds r2, #1 8034852: 601a str r2, [r3, #0] 8034854: 4770 bx lr 8034856: bf00 nop 8034858: 2000c568 .word 0x2000c568 0803485c : /** * Inserts ipAddrTable indexes (.ipAdEntAddr) * into index tree. */ void snmp_insert_ipaddridx_tree(struct netif *ni) { 803485c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8034860: 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]); 8034862: 3004 adds r0, #4 8034864: a902 add r1, sp, #8 8034866: f000 fb80 bl 8034f6a level = 0; ipa_rn = &ipaddrtree_root; 803486a: 4c17 ldr r4, [pc, #92] ; (80348c8 ) 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; 803486c: 4f17 ldr r7, [pc, #92] ; (80348cc ) ipa_rn->get_value = ip_addrentry_get_value; 803486e: f8df 806c ldr.w r8, [pc, #108] ; 80348dc 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]); 8034872: 2500 movs r5, #0 level = 0; ipa_rn = &ipaddrtree_root; while (level < 4) { ipa_node = NULL; 8034874: 2300 movs r3, #0 8034876: 9301 str r3, [sp, #4] snmp_mib_node_insert(ipa_rn, ipaddridx[level], &ipa_node); 8034878: ab02 add r3, sp, #8 803487a: 4620 mov r0, r4 803487c: f853 1025 ldr.w r1, [r3, r5, lsl #2] 8034880: aa01 add r2, sp, #4 8034882: b2ee uxtb r6, r5 8034884: f000 fbac bl 8034fe0 if ((level != 3) && (ipa_node != NULL)) 8034888: 2e03 cmp r6, #3 803488a: d015 beq.n 80348b8 803488c: 9b01 ldr r3, [sp, #4] 803488e: b19b cbz r3, 80348b8 { if (ipa_node->nptr == NULL) 8034890: 68dc ldr r4, [r3, #12] 8034892: b98c cbnz r4, 80348b8 { ipa_rn = snmp_mib_lrn_alloc(); 8034894: f000 fb82 bl 8034f9c ipa_node->nptr = (struct mib_node*)ipa_rn; 8034898: 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(); 803489a: 4604 mov r4, r0 ipa_node->nptr = (struct mib_node*)ipa_rn; 803489c: 60d8 str r0, [r3, #12] if (ipa_rn != NULL) 803489e: b918 cbnz r0, 80348a8 } } level++; } /* enable getnext traversal on filled table */ ipaddrtable.maxlength = 1; 80348a0: 4b0b ldr r3, [pc, #44] ; (80348d0 ) 80348a2: 2201 movs r2, #1 80348a4: 825a strh r2, [r3, #18] 80348a6: e00b b.n 80348c0 { ipa_rn = snmp_mib_lrn_alloc(); ipa_node->nptr = (struct mib_node*)ipa_rn; if (ipa_rn != NULL) { if (level == 2) 80348a8: 2e02 cmp r6, #2 80348aa: d105 bne.n 80348b8 { 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; 80348ac: 4b09 ldr r3, [pc, #36] ; (80348d4 ) 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; 80348ae: e880 0180 stmia.w r0, {r7, r8} ipa_rn->set_test = noleafs_set_test; 80348b2: 6083 str r3, [r0, #8] ipa_rn->set_value = noleafs_set_value; 80348b4: 4b08 ldr r3, [pc, #32] ; (80348d8 ) 80348b6: 60c3 str r3, [r0, #12] 80348b8: 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) 80348ba: 2d04 cmp r5, #4 80348bc: d1da bne.n 8034874 80348be: e7ef b.n 80348a0 } level++; } /* enable getnext traversal on filled table */ ipaddrtable.maxlength = 1; } 80348c0: b006 add sp, #24 80348c2: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80348c6: bf00 nop 80348c8: 2000086c .word 0x2000086c 80348cc: 08034171 .word 0x08034171 80348d0: 200008f0 .word 0x200008f0 80348d4: 080338eb .word 0x080338eb 80348d8: 080338ef .word 0x080338ef 80348dc: 08033f61 .word 0x08033f61 080348e0 : /** * Removes ipAddrTable indexes (.ipAdEntAddr) * from index tree. */ void snmp_delete_ipaddridx_tree(struct netif *ni) { 80348e0: b570 push {r4, r5, r6, lr} 80348e2: 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]); 80348e4: 3004 adds r0, #4 80348e6: a90a add r1, sp, #40 ; 0x28 80348e8: f000 fb3f bl 8034f6a 80348ec: 2600 movs r6, #0 /* mark nodes for deletion */ level = 0; del_cnt = 0; ipa_rn = &ipaddrtree_root; 80348ee: 4d1f ldr r5, [pc, #124] ; (803496c ) LWIP_ASSERT("ni != NULL", ni != NULL); snmp_iptooid(&ni->ip_addr, &ipaddridx[0]); /* mark nodes for deletion */ level = 0; del_cnt = 0; 80348f0: 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); 80348f2: ab0a add r3, sp, #40 ; 0x28 80348f4: 4628 mov r0, r5 80348f6: 58f1 ldr r1, [r6, r3] 80348f8: aa01 add r2, sp, #4 80348fa: f000 fbac bl 8035056 80348fe: b2c0 uxtb r0, r0 if (fc == 0) 8034900: b198 cbz r0, 803492a { /* ipaddridx[level] does not exist */ del_cnt = 0; ipa_rn = NULL; } else if (fc == 1) 8034902: 2801 cmp r0, #1 8034904: d10b bne.n 803491e { del_rn[del_cnt] = ipa_rn; 8034906: ab0e add r3, sp, #56 ; 0x38 8034908: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = ipa_n; 803490c: 9b01 ldr r3, [sp, #4] del_cnt = 0; ipa_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = ipa_rn; 803490e: f842 5c30 str.w r5, [r2, #-48] del_n[del_cnt] = ipa_n; del_cnt++; 8034912: 3401 adds r4, #1 ipa_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = ipa_rn; del_n[del_cnt] = ipa_n; 8034914: f842 3c20 str.w r3, [r2, #-32] del_cnt++; 8034918: b2e4 uxtb r4, r4 ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); 803491a: 68dd ldr r5, [r3, #12] 803491c: e007 b.n 803492e } else if (fc == 2) 803491e: 2802 cmp r0, #2 8034920: d105 bne.n 803492e { /* reset delete (2 or more childs) */ del_cnt = 0; ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); 8034922: 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; 8034924: 2400 movs r4, #0 ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); 8034926: 68dd ldr r5, [r3, #12] 8034928: e001 b.n 803492e { fc = snmp_mib_node_find(ipa_rn, ipaddridx[level], &ipa_n); if (fc == 0) { /* ipaddridx[level] does not exist */ del_cnt = 0; 803492a: 4604 mov r4, r0 ipa_rn = NULL; 803492c: 4605 mov r5, r0 /* mark nodes for deletion */ level = 0; del_cnt = 0; ipa_rn = &ipaddrtree_root; while ((level < 4) && (ipa_rn != NULL)) 803492e: 2e0c cmp r6, #12 8034930: d012 beq.n 8034958 8034932: 3604 adds r6, #4 8034934: 2d00 cmp r5, #0 8034936: d1dc bne.n 80348f2 8034938: e00e b.n 8034958 level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 803493a: 3c01 subs r4, #1 803493c: b2e4 uxtb r4, r4 ipa_rn = del_rn[del_cnt]; 803493e: aa0e add r2, sp, #56 ; 0x38 8034940: eb02 0384 add.w r3, r2, r4, lsl #2 ipa_n = del_n[del_cnt]; 8034944: f853 1c20 ldr.w r1, [r3, #-32] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; ipa_rn = del_rn[del_cnt]; 8034948: f853 0c30 ldr.w r0, [r3, #-48] ipa_n = del_n[del_cnt]; 803494c: 9101 str r1, [sp, #4] next = snmp_mib_node_delete(ipa_rn, ipa_n); 803494e: f000 fb9c bl 803508a if (next != NULL) 8034952: b108 cbz r0, 8034958 { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 8034954: f000 fb40 bl 8034fd8 ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 8034958: 2c00 cmp r4, #0 803495a: d1ee bne.n 803493a 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; 803495c: 4b03 ldr r3, [pc, #12] ; (803496c ) 803495e: 8b9b ldrh r3, [r3, #28] 8034960: b90b cbnz r3, 8034966 8034962: 4b03 ldr r3, [pc, #12] ; (8034970 ) 8034964: 825c strh r4, [r3, #18] } 8034966: b00e add sp, #56 ; 0x38 8034968: bd70 pop {r4, r5, r6, pc} 803496a: bf00 nop 803496c: 2000086c .word 0x2000086c 8034970: 200008f0 .word 0x200008f0 08034974 : * * @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) { 8034974: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8034978: b086 sub sp, #24 u8_t insert = 0; ip_addr_t dst; if (dflt != 0) 803497a: b110 cbz r0, 8034982 { /* the default route 0.0.0.0 */ ip_addr_set_any(&dst); 803497c: 2300 movs r3, #0 803497e: 9300 str r3, [sp, #0] 8034980: e02b b.n 80349da insert = 1; } else { /* route to the network address */ ip_addr_get_network(&dst, &ni->ip_addr, &ni->netmask); 8034982: 688a ldr r2, [r1, #8] 8034984: 684b ldr r3, [r1, #4] 8034986: 4013 ands r3, r2 8034988: 9300 str r3, [sp, #0] /* exclude 0.0.0.0 network (reserved for default rte) */ if (!ip_addr_isany(&dst)) { 803498a: bb33 cbnz r3, 80349da 803498c: e021 b.n 80349d2 snmp_iptooid(&dst, &iprteidx[0]); level = 0; iprte_rn = &iprtetree_root; while (level < 4) { iprte_node = NULL; 803498e: 2300 movs r3, #0 8034990: 9301 str r3, [sp, #4] snmp_mib_node_insert(iprte_rn, iprteidx[level], &iprte_node); 8034992: ab02 add r3, sp, #8 8034994: 4620 mov r0, r4 8034996: f853 1025 ldr.w r1, [r3, r5, lsl #2] 803499a: aa01 add r2, sp, #4 803499c: b2ee uxtb r6, r5 803499e: f000 fb1f bl 8034fe0 if ((level != 3) && (iprte_node != NULL)) 80349a2: 2e03 cmp r6, #3 80349a4: d012 beq.n 80349cc 80349a6: 9b01 ldr r3, [sp, #4] 80349a8: b183 cbz r3, 80349cc { if (iprte_node->nptr == NULL) 80349aa: 68dc ldr r4, [r3, #12] 80349ac: b974 cbnz r4, 80349cc { iprte_rn = snmp_mib_lrn_alloc(); 80349ae: f000 faf5 bl 8034f9c iprte_node->nptr = (struct mib_node*)iprte_rn; 80349b2: 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(); 80349b4: 4604 mov r4, r0 iprte_node->nptr = (struct mib_node*)iprte_rn; 80349b6: 60d8 str r0, [r3, #12] if (iprte_rn != NULL) 80349b8: b158 cbz r0, 80349d2 { if (level == 2) 80349ba: 2e02 cmp r6, #2 80349bc: d106 bne.n 80349cc { 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; 80349be: 4b0d ldr r3, [pc, #52] ; (80349f4 ) 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; 80349c0: f8c0 8000 str.w r8, [r0] iprte_rn->get_value = ip_rteentry_get_value; iprte_rn->set_test = noleafs_set_test; 80349c4: 6083 str r3, [r0, #8] iprte_rn->set_value = noleafs_set_value; 80349c6: 4b0c ldr r3, [pc, #48] ; (80349f8 ) 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; 80349c8: 6047 str r7, [r0, #4] iprte_rn->set_test = noleafs_set_test; iprte_rn->set_value = noleafs_set_value; 80349ca: 60c3 str r3, [r0, #12] 80349cc: 3501 adds r5, #1 u8_t level; snmp_iptooid(&dst, &iprteidx[0]); level = 0; iprte_rn = &iprtetree_root; while (level < 4) 80349ce: 2d04 cmp r5, #4 80349d0: d1dd bne.n 803498e } level++; } } /* enable getnext traversal on filled table */ iprtetable.maxlength = 1; 80349d2: 4b0a ldr r3, [pc, #40] ; (80349fc ) 80349d4: 2201 movs r2, #1 80349d6: 825a strh r2, [r3, #18] 80349d8: e009 b.n 80349ee struct mib_list_rootnode *iprte_rn; struct mib_list_node *iprte_node; s32_t iprteidx[4]; u8_t level; snmp_iptooid(&dst, &iprteidx[0]); 80349da: 4668 mov r0, sp 80349dc: a902 add r1, sp, #8 80349de: f000 fac4 bl 8034f6a 80349e2: 2500 movs r5, #0 level = 0; iprte_rn = &iprtetree_root; 80349e4: 4c06 ldr r4, [pc, #24] ; (8034a00 ) 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; 80349e6: f8df 8020 ldr.w r8, [pc, #32] ; 8034a08 iprte_rn->get_value = ip_rteentry_get_value; 80349ea: 4f06 ldr r7, [pc, #24] ; (8034a04 ) 80349ec: e7cf b.n 803498e level++; } } /* enable getnext traversal on filled table */ iprtetable.maxlength = 1; } 80349ee: b006 add sp, #24 80349f0: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80349f4: 080338eb .word 0x080338eb 80349f8: 080338ef .word 0x080338ef 80349fc: 20000958 .word 0x20000958 8034a00: 2000079c .word 0x2000079c 8034a04: 08034471 .word 0x08034471 8034a08: 08033ab5 .word 0x08033ab5 08034a0c : * @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) { 8034a0c: b570 push {r4, r5, r6, lr} 8034a0e: b08e sub sp, #56 ; 0x38 u8_t del = 0; ip_addr_t dst; if (dflt != 0) 8034a10: b110 cbz r0, 8034a18 { /* the default route 0.0.0.0 */ ip_addr_set_any(&dst); 8034a12: 2300 movs r3, #0 8034a14: 9300 str r3, [sp, #0] 8034a16: e041 b.n 8034a9c del = 1; } else { /* route to the network address */ ip_addr_get_network(&dst, &ni->ip_addr, &ni->netmask); 8034a18: 688a ldr r2, [r1, #8] 8034a1a: 684b ldr r3, [r1, #4] 8034a1c: 4013 ands r3, r2 8034a1e: 9300 str r3, [sp, #0] /* exclude 0.0.0.0 network (reserved for default rte) */ if (!ip_addr_isany(&dst)) { 8034a20: 2b00 cmp r3, #0 8034a22: d13b bne.n 8034a9c 8034a24: e034 b.n 8034a90 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); 8034a26: ab0a add r3, sp, #40 ; 0x28 8034a28: 4628 mov r0, r5 8034a2a: 58f1 ldr r1, [r6, r3] 8034a2c: aa01 add r2, sp, #4 8034a2e: f000 fb12 bl 8035056 8034a32: b2c0 uxtb r0, r0 if (fc == 0) 8034a34: b198 cbz r0, 8034a5e { /* iprteidx[level] does not exist */ del_cnt = 0; iprte_rn = NULL; } else if (fc == 1) 8034a36: 2801 cmp r0, #1 8034a38: d10b bne.n 8034a52 { del_rn[del_cnt] = iprte_rn; 8034a3a: ab0e add r3, sp, #56 ; 0x38 8034a3c: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = iprte_n; 8034a40: 9b01 ldr r3, [sp, #4] del_cnt = 0; iprte_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = iprte_rn; 8034a42: f842 5c30 str.w r5, [r2, #-48] del_n[del_cnt] = iprte_n; del_cnt++; 8034a46: 3401 adds r4, #1 iprte_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = iprte_rn; del_n[del_cnt] = iprte_n; 8034a48: f842 3c20 str.w r3, [r2, #-32] del_cnt++; 8034a4c: b2e4 uxtb r4, r4 iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); 8034a4e: 68dd ldr r5, [r3, #12] 8034a50: e007 b.n 8034a62 } else if (fc == 2) 8034a52: 2802 cmp r0, #2 8034a54: d105 bne.n 8034a62 { /* reset delete (2 or more childs) */ del_cnt = 0; iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); 8034a56: 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; 8034a58: 2400 movs r4, #0 iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); 8034a5a: 68dd ldr r5, [r3, #12] 8034a5c: e001 b.n 8034a62 { fc = snmp_mib_node_find(iprte_rn, iprteidx[level], &iprte_n); if (fc == 0) { /* iprteidx[level] does not exist */ del_cnt = 0; 8034a5e: 4604 mov r4, r0 iprte_rn = NULL; 8034a60: 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)) 8034a62: 2e0c cmp r6, #12 8034a64: d012 beq.n 8034a8c 8034a66: 3604 adds r6, #4 8034a68: 2d00 cmp r5, #0 8034a6a: d1dc bne.n 8034a26 8034a6c: e00e b.n 8034a8c level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 8034a6e: 3c01 subs r4, #1 8034a70: b2e4 uxtb r4, r4 iprte_rn = del_rn[del_cnt]; 8034a72: aa0e add r2, sp, #56 ; 0x38 8034a74: eb02 0384 add.w r3, r2, r4, lsl #2 iprte_n = del_n[del_cnt]; 8034a78: f853 1c20 ldr.w r1, [r3, #-32] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; iprte_rn = del_rn[del_cnt]; 8034a7c: f853 0c30 ldr.w r0, [r3, #-48] iprte_n = del_n[del_cnt]; 8034a80: 9101 str r1, [sp, #4] next = snmp_mib_node_delete(iprte_rn, iprte_n); 8034a82: f000 fb02 bl 803508a if (next != NULL) 8034a86: b108 cbz r0, 8034a8c { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 8034a88: f000 faa6 bl 8034fd8 iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 8034a8c: 2c00 cmp r4, #0 8034a8e: d1ee bne.n 8034a6e snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty table */ if (iprtetree_root.count == 0) iprtetable.maxlength = 0; 8034a90: 4b07 ldr r3, [pc, #28] ; (8034ab0 ) 8034a92: 8b9b ldrh r3, [r3, #28] 8034a94: b953 cbnz r3, 8034aac 8034a96: 4a07 ldr r2, [pc, #28] ; (8034ab4 ) 8034a98: 8253 strh r3, [r2, #18] 8034a9a: e007 b.n 8034aac 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]); 8034a9c: 4668 mov r0, sp 8034a9e: a90a add r1, sp, #40 ; 0x28 8034aa0: 2600 movs r6, #0 8034aa2: f000 fa62 bl 8034f6a /* mark nodes for deletion */ level = 0; del_cnt = 0; 8034aa6: 4634 mov r4, r6 iprte_rn = &iprtetree_root; 8034aa8: 4d01 ldr r5, [pc, #4] ; (8034ab0 ) 8034aaa: e7bc b.n 8034a26 } } } /* disable getnext traversal on empty table */ if (iprtetree_root.count == 0) iprtetable.maxlength = 0; } 8034aac: b00e add sp, #56 ; 0x38 8034aae: bd70 pop {r4, r5, r6, pc} 8034ab0: 2000079c .word 0x2000079c 8034ab4: 20000958 .word 0x20000958 08034ab8 : void snmp_inc_icmpinmsgs(void) { icmpinmsgs++; 8034ab8: 4b02 ldr r3, [pc, #8] ; (8034ac4 ) 8034aba: 681a ldr r2, [r3, #0] 8034abc: 3201 adds r2, #1 8034abe: 601a str r2, [r3, #0] 8034ac0: 4770 bx lr 8034ac2: bf00 nop 8034ac4: 2000c460 .word 0x2000c460 08034ac8 : } void snmp_inc_icmpinerrors(void) { icmpinerrors++; 8034ac8: 4b02 ldr r3, [pc, #8] ; (8034ad4 ) 8034aca: 681a ldr r2, [r3, #0] 8034acc: 3201 adds r2, #1 8034ace: 601a str r2, [r3, #0] 8034ad0: 4770 bx lr 8034ad2: bf00 nop 8034ad4: 2000c45c .word 0x2000c45c 08034ad8 : icmpinaddrmaskreps++; } void snmp_inc_icmpoutmsgs(void) { icmpoutmsgs++; 8034ad8: 4b02 ldr r3, [pc, #8] ; (8034ae4 ) 8034ada: 681a ldr r2, [r3, #0] 8034adc: 3201 adds r2, #1 8034ade: 601a str r2, [r3, #0] 8034ae0: 4770 bx lr 8034ae2: bf00 nop 8034ae4: 2000c4e0 .word 0x2000c4e0 08034ae8 : icmpoutdestunreachs++; } void snmp_inc_icmpouttimeexcds(void) { icmpouttimeexcds++; 8034ae8: 4b02 ldr r3, [pc, #8] ; (8034af4 ) 8034aea: 681a ldr r2, [r3, #0] 8034aec: 3201 adds r2, #1 8034aee: 601a str r2, [r3, #0] 8034af0: 4770 bx lr 8034af2: bf00 nop 8034af4: 2000c4ac .word 0x2000c4ac 08034af8 : icmpoutechos++; } void snmp_inc_icmpoutechoreps(void) { icmpoutechoreps++; 8034af8: 4b02 ldr r3, [pc, #8] ; (8034b04 ) 8034afa: 681a ldr r2, [r3, #0] 8034afc: 3201 adds r2, #1 8034afe: 601a str r2, [r3, #0] 8034b00: 4770 bx lr 8034b02: bf00 nop 8034b04: 2000c500 .word 0x2000c500 08034b08 : icmpoutaddrmaskreps++; } void snmp_inc_tcpactiveopens(void) { tcpactiveopens++; 8034b08: 4b02 ldr r3, [pc, #8] ; (8034b14 ) 8034b0a: 681a ldr r2, [r3, #0] 8034b0c: 3201 adds r2, #1 8034b0e: 601a str r2, [r3, #0] 8034b10: 4770 bx lr 8034b12: bf00 nop 8034b14: 2000c454 .word 0x2000c454 08034b18 : } void snmp_inc_tcppassiveopens(void) { tcppassiveopens++; 8034b18: 4b02 ldr r3, [pc, #8] ; (8034b24 ) 8034b1a: 681a ldr r2, [r3, #0] 8034b1c: 3201 adds r2, #1 8034b1e: 601a str r2, [r3, #0] 8034b20: 4770 bx lr 8034b22: bf00 nop 8034b24: 2000c488 .word 0x2000c488 08034b28 : } void snmp_inc_tcpattemptfails(void) { tcpattemptfails++; 8034b28: 4b02 ldr r3, [pc, #8] ; (8034b34 ) 8034b2a: 681a ldr r2, [r3, #0] 8034b2c: 3201 adds r2, #1 8034b2e: 601a str r2, [r3, #0] 8034b30: 4770 bx lr 8034b32: bf00 nop 8034b34: 2000c4d4 .word 0x2000c4d4 08034b38 : } void snmp_inc_tcpestabresets(void) { tcpestabresets++; 8034b38: 4b02 ldr r3, [pc, #8] ; (8034b44 ) 8034b3a: 681a ldr r2, [r3, #0] 8034b3c: 3201 adds r2, #1 8034b3e: 601a str r2, [r3, #0] 8034b40: 4770 bx lr 8034b42: bf00 nop 8034b44: 2000c468 .word 0x2000c468 08034b48 : } void snmp_inc_tcpinsegs(void) { tcpinsegs++; 8034b48: 4b02 ldr r3, [pc, #8] ; (8034b54 ) 8034b4a: 681a ldr r2, [r3, #0] 8034b4c: 3201 adds r2, #1 8034b4e: 601a str r2, [r3, #0] 8034b50: 4770 bx lr 8034b52: bf00 nop 8034b54: 2000c4e4 .word 0x2000c4e4 08034b58 : } void snmp_inc_tcpoutsegs(void) { tcpoutsegs++; 8034b58: 4b02 ldr r3, [pc, #8] ; (8034b64 ) 8034b5a: 681a ldr r2, [r3, #0] 8034b5c: 3201 adds r2, #1 8034b5e: 601a str r2, [r3, #0] 8034b60: 4770 bx lr 8034b62: bf00 nop 8034b64: 2000c530 .word 0x2000c530 08034b68 : } void snmp_inc_tcpretranssegs(void) { tcpretranssegs++; 8034b68: 4b02 ldr r3, [pc, #8] ; (8034b74 ) 8034b6a: 681a ldr r2, [r3, #0] 8034b6c: 3201 adds r2, #1 8034b6e: 601a str r2, [r3, #0] 8034b70: 4770 bx lr 8034b72: bf00 nop 8034b74: 2000c504 .word 0x2000c504 08034b78 : } void snmp_inc_tcpinerrs(void) { tcpinerrs++; 8034b78: 4b02 ldr r3, [pc, #8] ; (8034b84 ) 8034b7a: 681a ldr r2, [r3, #0] 8034b7c: 3201 adds r2, #1 8034b7e: 601a str r2, [r3, #0] 8034b80: 4770 bx lr 8034b82: bf00 nop 8034b84: 2000c490 .word 0x2000c490 08034b88 : } void snmp_inc_tcpoutrsts(void) { tcpoutrsts++; 8034b88: 4b02 ldr r3, [pc, #8] ; (8034b94 ) 8034b8a: 681a ldr r2, [r3, #0] 8034b8c: 3201 adds r2, #1 8034b8e: 601a str r2, [r3, #0] 8034b90: 4770 bx lr 8034b92: bf00 nop 8034b94: 2000c4f4 .word 0x2000c4f4 08034b98 : } void snmp_inc_udpindatagrams(void) { udpindatagrams++; 8034b98: 4b02 ldr r3, [pc, #8] ; (8034ba4 ) 8034b9a: 681a ldr r2, [r3, #0] 8034b9c: 3201 adds r2, #1 8034b9e: 601a str r2, [r3, #0] 8034ba0: 4770 bx lr 8034ba2: bf00 nop 8034ba4: 2000c510 .word 0x2000c510 08034ba8 : } void snmp_inc_udpnoports(void) { udpnoports++; 8034ba8: 4b02 ldr r3, [pc, #8] ; (8034bb4 ) 8034baa: 681a ldr r2, [r3, #0] 8034bac: 3201 adds r2, #1 8034bae: 601a str r2, [r3, #0] 8034bb0: 4770 bx lr 8034bb2: bf00 nop 8034bb4: 2000c4c8 .word 0x2000c4c8 08034bb8 : } void snmp_inc_udpinerrors(void) { udpinerrors++; 8034bb8: 4b02 ldr r3, [pc, #8] ; (8034bc4 ) 8034bba: 681a ldr r2, [r3, #0] 8034bbc: 3201 adds r2, #1 8034bbe: 601a str r2, [r3, #0] 8034bc0: 4770 bx lr 8034bc2: bf00 nop 8034bc4: 2000c538 .word 0x2000c538 08034bc8 : } void snmp_inc_udpoutdatagrams(void) { udpoutdatagrams++; 8034bc8: 4b02 ldr r3, [pc, #8] ; (8034bd4 ) 8034bca: 681a ldr r2, [r3, #0] 8034bcc: 3201 adds r2, #1 8034bce: 601a str r2, [r3, #0] 8034bd0: 4770 bx lr 8034bd2: bf00 nop 8034bd4: 2000c4c0 .word 0x2000c4c0 08034bd8 : /** * Inserts udpTable indexes (.udpLocalAddress.udpLocalPort) * into index tree. */ void snmp_insert_udpidx_tree(struct udp_pcb *pcb) { 8034bd8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8034bdc: 4604 mov r4, r0 8034bde: 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]); 8034be0: a901 add r1, sp, #4 8034be2: f000 f9c2 bl 8034f6a udpidx[4] = pcb->local_port; 8034be6: 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; 8034be8: 4f17 ldr r7, [pc, #92] ; (8034c48 ) LWIP_ASSERT("pcb != NULL", pcb != NULL); snmp_iptooid(&pcb->local_ip, &udpidx[0]); udpidx[4] = pcb->local_port; udp_rn = &udp_root; 8034bea: 4c18 ldr r4, [pc, #96] ; (8034c4c ) if (udp_rn != NULL) { if (level == 3) { udp_rn->get_object_def = udpentry_get_object_def; udp_rn->get_value = udpentry_get_value; 8034bec: f8df 806c ldr.w r8, [pc, #108] ; 8034c5c 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; 8034bf0: 9305 str r3, [sp, #20] 8034bf2: 2500 movs r5, #0 udp_rn = &udp_root; for (level = 0; level < 5; level++) { udp_node = NULL; 8034bf4: 2300 movs r3, #0 8034bf6: 9300 str r3, [sp, #0] snmp_mib_node_insert(udp_rn, udpidx[level], &udp_node); 8034bf8: ab01 add r3, sp, #4 8034bfa: 4620 mov r0, r4 8034bfc: f853 1025 ldr.w r1, [r3, r5, lsl #2] 8034c00: 466a mov r2, sp 8034c02: b2ee uxtb r6, r5 8034c04: f000 f9ec bl 8034fe0 if ((level != 4) && (udp_node != NULL)) 8034c08: 2e04 cmp r6, #4 8034c0a: d015 beq.n 8034c38 8034c0c: 9b00 ldr r3, [sp, #0] 8034c0e: b19b cbz r3, 8034c38 { if (udp_node->nptr == NULL) 8034c10: 68dc ldr r4, [r3, #12] 8034c12: b98c cbnz r4, 8034c38 { udp_rn = snmp_mib_lrn_alloc(); 8034c14: f000 f9c2 bl 8034f9c udp_node->nptr = (struct mib_node*)udp_rn; 8034c18: 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(); 8034c1a: 4604 mov r4, r0 udp_node->nptr = (struct mib_node*)udp_rn; 8034c1c: 60d8 str r0, [r3, #12] if (udp_rn != NULL) 8034c1e: b918 cbnz r0, 8034c28 { udp_rn = (struct mib_list_rootnode*)udp_node->nptr; } } } udptable.maxlength = 1; 8034c20: 4b0b ldr r3, [pc, #44] ; (8034c50 ) 8034c22: 2201 movs r2, #1 8034c24: 825a strh r2, [r3, #18] 8034c26: e00b b.n 8034c40 { udp_rn = snmp_mib_lrn_alloc(); udp_node->nptr = (struct mib_node*)udp_rn; if (udp_rn != NULL) { if (level == 3) 8034c28: 2e03 cmp r6, #3 8034c2a: d105 bne.n 8034c38 { udp_rn->get_object_def = udpentry_get_object_def; udp_rn->get_value = udpentry_get_value; udp_rn->set_test = noleafs_set_test; 8034c2c: 4b09 ldr r3, [pc, #36] ; (8034c54 ) if (udp_rn != NULL) { if (level == 3) { udp_rn->get_object_def = udpentry_get_object_def; udp_rn->get_value = udpentry_get_value; 8034c2e: e880 0180 stmia.w r0, {r7, r8} udp_rn->set_test = noleafs_set_test; 8034c32: 6083 str r3, [r0, #8] udp_rn->set_value = noleafs_set_value; 8034c34: 4b08 ldr r3, [pc, #32] ; (8034c58 ) 8034c36: 60c3 str r3, [r0, #12] 8034c38: 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++) 8034c3a: 2d05 cmp r5, #5 8034c3c: d1da bne.n 8034bf4 8034c3e: e7ef b.n 8034c20 udp_rn = (struct mib_list_rootnode*)udp_node->nptr; } } } udptable.maxlength = 1; } 8034c40: b006 add sp, #24 8034c42: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8034c46: bf00 nop 8034c48: 0803425d .word 0x0803425d 8034c4c: 2000076c .word 0x2000076c 8034c50: 20000750 .word 0x20000750 8034c54: 080338eb .word 0x080338eb 8034c58: 080338ef .word 0x080338ef 8034c5c: 08033f19 .word 0x08033f19 08034c60 : /** * Removes udpTable indexes (.udpLocalAddress.udpLocalPort) * from index tree. */ void snmp_delete_udpidx_tree(struct udp_pcb *pcb) { 8034c60: b570 push {r4, r5, r6, lr} 8034c62: 4604 mov r4, r0 8034c64: 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]); 8034c66: a90b add r1, sp, #44 ; 0x2c 8034c68: f000 f97f bl 8034f6a udpidx[4] = pcb->local_port; 8034c6c: 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; 8034c6e: 4b2a ldr r3, [pc, #168] ; (8034d18 ) 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; 8034c70: 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; 8034c72: 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; 8034c74: 2200 movs r2, #0 npcb = udp_pcbs; while ((npcb != NULL)) 8034c76: e009 b.n 8034c8c { if (ip_addr_cmp(&npcb->local_ip, &pcb->local_ip) && 8034c78: 681d ldr r5, [r3, #0] 8034c7a: 6820 ldr r0, [r4, #0] 8034c7c: 4285 cmp r5, r0 8034c7e: d104 bne.n 8034c8a (npcb->local_port == udpidx[4])) 8034c80: 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) && 8034c82: 4288 cmp r0, r1 8034c84: d101 bne.n 8034c8a (npcb->local_port == udpidx[4])) { bindings++; 8034c86: 3201 adds r2, #1 8034c88: b2d2 uxtb r2, r2 } npcb = npcb->next; 8034c8a: 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)) 8034c8c: 2b00 cmp r3, #0 8034c8e: d1f3 bne.n 8034c78 { bindings++; } npcb = npcb->next; } if (bindings == 1) 8034c90: 2a01 cmp r2, #1 8034c92: d004 beq.n 8034c9e snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty table */ if (udp_root.count == 0) udptable.maxlength = 0; 8034c94: 4b21 ldr r3, [pc, #132] ; (8034d1c ) 8034c96: 8b9b ldrh r3, [r3, #28] 8034c98: 2b00 cmp r3, #0 8034c9a: d039 beq.n 8034d10 8034c9c: e03a b.n 8034d14 { /* selectively remove */ /* mark nodes for deletion */ level = 0; del_cnt = 0; udp_rn = &udp_root; 8034c9e: 4d1f ldr r5, [pc, #124] ; (8034d1c ) { bindings++; } npcb = npcb->next; } if (bindings == 1) 8034ca0: 461e mov r6, r3 8034ca2: 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); 8034ca4: ab0b add r3, sp, #44 ; 0x2c 8034ca6: 4628 mov r0, r5 8034ca8: 58f1 ldr r1, [r6, r3] 8034caa: 466a mov r2, sp 8034cac: f000 f9d3 bl 8035056 8034cb0: b2c0 uxtb r0, r0 if (fc == 0) 8034cb2: b198 cbz r0, 8034cdc { /* udpidx[level] does not exist */ del_cnt = 0; udp_rn = NULL; } else if (fc == 1) 8034cb4: 2801 cmp r0, #1 8034cb6: d10b bne.n 8034cd0 { del_rn[del_cnt] = udp_rn; 8034cb8: ab10 add r3, sp, #64 ; 0x40 8034cba: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = udp_n; 8034cbe: 9b00 ldr r3, [sp, #0] del_cnt = 0; udp_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = udp_rn; 8034cc0: f842 5c3c str.w r5, [r2, #-60] del_n[del_cnt] = udp_n; del_cnt++; 8034cc4: 3401 adds r4, #1 udp_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = udp_rn; del_n[del_cnt] = udp_n; 8034cc6: f842 3c28 str.w r3, [r2, #-40] del_cnt++; 8034cca: b2e4 uxtb r4, r4 udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); 8034ccc: 68dd ldr r5, [r3, #12] 8034cce: e007 b.n 8034ce0 } else if (fc == 2) 8034cd0: 2802 cmp r0, #2 8034cd2: d105 bne.n 8034ce0 { /* reset delete (2 or more childs) */ del_cnt = 0; udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); 8034cd4: 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; 8034cd6: 2400 movs r4, #0 udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); 8034cd8: 68dd ldr r5, [r3, #12] 8034cda: e001 b.n 8034ce0 { fc = snmp_mib_node_find(udp_rn, udpidx[level], &udp_n); if (fc == 0) { /* udpidx[level] does not exist */ del_cnt = 0; 8034cdc: 4604 mov r4, r0 udp_rn = NULL; 8034cde: 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)) 8034ce0: 2e10 cmp r6, #16 8034ce2: d012 beq.n 8034d0a 8034ce4: 3604 adds r6, #4 8034ce6: 2d00 cmp r5, #0 8034ce8: d1dc bne.n 8034ca4 8034cea: e00e b.n 8034d0a level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 8034cec: 3c01 subs r4, #1 8034cee: b2e4 uxtb r4, r4 udp_rn = del_rn[del_cnt]; 8034cf0: aa10 add r2, sp, #64 ; 0x40 8034cf2: eb02 0384 add.w r3, r2, r4, lsl #2 udp_n = del_n[del_cnt]; 8034cf6: f853 1c28 ldr.w r1, [r3, #-40] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; udp_rn = del_rn[del_cnt]; 8034cfa: f853 0c3c ldr.w r0, [r3, #-60] udp_n = del_n[del_cnt]; 8034cfe: 9100 str r1, [sp, #0] next = snmp_mib_node_delete(udp_rn, udp_n); 8034d00: f000 f9c3 bl 803508a if (next != NULL) 8034d04: b108 cbz r0, 8034d0a { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 8034d06: f000 f967 bl 8034fd8 udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 8034d0a: 2c00 cmp r4, #0 8034d0c: d1ee bne.n 8034cec 8034d0e: e7c1 b.n 8034c94 snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty table */ if (udp_root.count == 0) udptable.maxlength = 0; 8034d10: 4a03 ldr r2, [pc, #12] ; (8034d20 ) 8034d12: 8253 strh r3, [r2, #18] } 8034d14: b010 add sp, #64 ; 0x40 8034d16: bd70 pop {r4, r5, r6, pc} 8034d18: 2000f6d4 .word 0x2000f6d4 8034d1c: 2000076c .word 0x2000076c 8034d20: 20000750 .word 0x20000750 08034d24 : void snmp_inc_snmpinpkts(void) { snmpinpkts++; 8034d24: 4b02 ldr r3, [pc, #8] ; (8034d30 ) 8034d26: 681a ldr r2, [r3, #0] 8034d28: 3201 adds r2, #1 8034d2a: 601a str r2, [r3, #0] 8034d2c: 4770 bx lr 8034d2e: bf00 nop 8034d30: 2000c46c .word 0x2000c46c 08034d34 : } void snmp_inc_snmpoutpkts(void) { snmpoutpkts++; 8034d34: 4b02 ldr r3, [pc, #8] ; (8034d40 ) 8034d36: 681a ldr r2, [r3, #0] 8034d38: 3201 adds r2, #1 8034d3a: 601a str r2, [r3, #0] 8034d3c: 4770 bx lr 8034d3e: bf00 nop 8034d40: 2000c53c .word 0x2000c53c 08034d44 : } void snmp_inc_snmpinbadversions(void) { snmpinbadversions++; 8034d44: 4b02 ldr r3, [pc, #8] ; (8034d50 ) 8034d46: 681a ldr r2, [r3, #0] 8034d48: 3201 adds r2, #1 8034d4a: 601a str r2, [r3, #0] 8034d4c: 4770 bx lr 8034d4e: bf00 nop 8034d50: 2000c528 .word 0x2000c528 08034d54 : } void snmp_inc_snmpinbadcommunitynames(void) { snmpinbadcommunitynames++; 8034d54: 4b02 ldr r3, [pc, #8] ; (8034d60 ) 8034d56: 681a ldr r2, [r3, #0] 8034d58: 3201 adds r2, #1 8034d5a: 601a str r2, [r3, #0] 8034d5c: 4770 bx lr 8034d5e: bf00 nop 8034d60: 2000c440 .word 0x2000c440 08034d64 : snmpinbadcommunityuses++; } void snmp_inc_snmpinasnparseerrs(void) { snmpinasnparseerrs++; 8034d64: 4b02 ldr r3, [pc, #8] ; (8034d70 ) 8034d66: 681a ldr r2, [r3, #0] 8034d68: 3201 adds r2, #1 8034d6a: 601a str r2, [r3, #0] 8034d6c: 4770 bx lr 8034d6e: bf00 nop 8034d70: 2000c52c .word 0x2000c52c 08034d74 : } void snmp_inc_snmpintoobigs(void) { snmpintoobigs++; 8034d74: 4b02 ldr r3, [pc, #8] ; (8034d80 ) 8034d76: 681a ldr r2, [r3, #0] 8034d78: 3201 adds r2, #1 8034d7a: 601a str r2, [r3, #0] 8034d7c: 4770 bx lr 8034d7e: bf00 nop 8034d80: 2000c4ec .word 0x2000c4ec 08034d84 : } void snmp_inc_snmpinnosuchnames(void) { snmpinnosuchnames++; 8034d84: 4b02 ldr r3, [pc, #8] ; (8034d90 ) 8034d86: 681a ldr r2, [r3, #0] 8034d88: 3201 adds r2, #1 8034d8a: 601a str r2, [r3, #0] 8034d8c: 4770 bx lr 8034d8e: bf00 nop 8034d90: 2000c56c .word 0x2000c56c 08034d94 : } void snmp_inc_snmpinbadvalues(void) { snmpinbadvalues++; 8034d94: 4b02 ldr r3, [pc, #8] ; (8034da0 ) 8034d96: 681a ldr r2, [r3, #0] 8034d98: 3201 adds r2, #1 8034d9a: 601a str r2, [r3, #0] 8034d9c: 4770 bx lr 8034d9e: bf00 nop 8034da0: 2000c508 .word 0x2000c508 08034da4 : } void snmp_inc_snmpinreadonlys(void) { snmpinreadonlys++; 8034da4: 4b02 ldr r3, [pc, #8] ; (8034db0 ) 8034da6: 681a ldr r2, [r3, #0] 8034da8: 3201 adds r2, #1 8034daa: 601a str r2, [r3, #0] 8034dac: 4770 bx lr 8034dae: bf00 nop 8034db0: 2000c4dc .word 0x2000c4dc 08034db4 : } void snmp_inc_snmpingenerrs(void) { snmpingenerrs++; 8034db4: 4b02 ldr r3, [pc, #8] ; (8034dc0 ) 8034db6: 681a ldr r2, [r3, #0] 8034db8: 3201 adds r2, #1 8034dba: 601a str r2, [r3, #0] 8034dbc: 4770 bx lr 8034dbe: bf00 nop 8034dc0: 2000c4b4 .word 0x2000c4b4 08034dc4 : } void snmp_add_snmpintotalreqvars(u8_t value) { snmpintotalreqvars += value; 8034dc4: 4b02 ldr r3, [pc, #8] ; (8034dd0 ) 8034dc6: 681a ldr r2, [r3, #0] 8034dc8: 1880 adds r0, r0, r2 8034dca: 6018 str r0, [r3, #0] 8034dcc: 4770 bx lr 8034dce: bf00 nop 8034dd0: 2000c50c .word 0x2000c50c 08034dd4 : } void snmp_add_snmpintotalsetvars(u8_t value) { snmpintotalsetvars += value; 8034dd4: 4b02 ldr r3, [pc, #8] ; (8034de0 ) 8034dd6: 681a ldr r2, [r3, #0] 8034dd8: 1880 adds r0, r0, r2 8034dda: 6018 str r0, [r3, #0] 8034ddc: 4770 bx lr 8034dde: bf00 nop 8034de0: 2000c44c .word 0x2000c44c 08034de4 : } void snmp_inc_snmpingetrequests(void) { snmpingetrequests++; 8034de4: 4b02 ldr r3, [pc, #8] ; (8034df0 ) 8034de6: 681a ldr r2, [r3, #0] 8034de8: 3201 adds r2, #1 8034dea: 601a str r2, [r3, #0] 8034dec: 4770 bx lr 8034dee: bf00 nop 8034df0: 2000c4a0 .word 0x2000c4a0 08034df4 : } void snmp_inc_snmpingetnexts(void) { snmpingetnexts++; 8034df4: 4b02 ldr r3, [pc, #8] ; (8034e00 ) 8034df6: 681a ldr r2, [r3, #0] 8034df8: 3201 adds r2, #1 8034dfa: 601a str r2, [r3, #0] 8034dfc: 4770 bx lr 8034dfe: bf00 nop 8034e00: 2000c424 .word 0x2000c424 08034e04 : } void snmp_inc_snmpinsetrequests(void) { snmpinsetrequests++; 8034e04: 4b02 ldr r3, [pc, #8] ; (8034e10 ) 8034e06: 681a ldr r2, [r3, #0] 8034e08: 3201 adds r2, #1 8034e0a: 601a str r2, [r3, #0] 8034e0c: 4770 bx lr 8034e0e: bf00 nop 8034e10: 2000c548 .word 0x2000c548 08034e14 : } void snmp_inc_snmpingetresponses(void) { snmpingetresponses++; 8034e14: 4b02 ldr r3, [pc, #8] ; (8034e20 ) 8034e16: 681a ldr r2, [r3, #0] 8034e18: 3201 adds r2, #1 8034e1a: 601a str r2, [r3, #0] 8034e1c: 4770 bx lr 8034e1e: bf00 nop 8034e20: 2000c49c .word 0x2000c49c 08034e24 : } void snmp_inc_snmpintraps(void) { snmpintraps++; 8034e24: 4b02 ldr r3, [pc, #8] ; (8034e30 ) 8034e26: 681a ldr r2, [r3, #0] 8034e28: 3201 adds r2, #1 8034e2a: 601a str r2, [r3, #0] 8034e2c: 4770 bx lr 8034e2e: bf00 nop 8034e30: 2000c434 .word 0x2000c434 08034e34 : } void snmp_inc_snmpouttoobigs(void) { snmpouttoobigs++; 8034e34: 4b02 ldr r3, [pc, #8] ; (8034e40 ) 8034e36: 681a ldr r2, [r3, #0] 8034e38: 3201 adds r2, #1 8034e3a: 601a str r2, [r3, #0] 8034e3c: 4770 bx lr 8034e3e: bf00 nop 8034e40: 2000c484 .word 0x2000c484 08034e44 : } void snmp_inc_snmpoutnosuchnames(void) { snmpoutnosuchnames++; 8034e44: 4b02 ldr r3, [pc, #8] ; (8034e50 ) 8034e46: 681a ldr r2, [r3, #0] 8034e48: 3201 adds r2, #1 8034e4a: 601a str r2, [r3, #0] 8034e4c: 4770 bx lr 8034e4e: bf00 nop 8034e50: 2000c450 .word 0x2000c450 08034e54 : } void snmp_inc_snmpoutbadvalues(void) { snmpoutbadvalues++; 8034e54: 4b02 ldr r3, [pc, #8] ; (8034e60 ) 8034e56: 681a ldr r2, [r3, #0] 8034e58: 3201 adds r2, #1 8034e5a: 601a str r2, [r3, #0] 8034e5c: 4770 bx lr 8034e5e: bf00 nop 8034e60: 2000c430 .word 0x2000c430 08034e64 : } void snmp_inc_snmpoutgenerrs(void) { snmpoutgenerrs++; 8034e64: 4b02 ldr r3, [pc, #8] ; (8034e70 ) 8034e66: 681a ldr r2, [r3, #0] 8034e68: 3201 adds r2, #1 8034e6a: 601a str r2, [r3, #0] 8034e6c: 4770 bx lr 8034e6e: bf00 nop 8034e70: 2000c570 .word 0x2000c570 08034e74 : snmpoutsetrequests++; } void snmp_inc_snmpoutgetresponses(void) { snmpoutgetresponses++; 8034e74: 4b02 ldr r3, [pc, #8] ; (8034e80 ) 8034e76: 681a ldr r2, [r3, #0] 8034e78: 3201 adds r2, #1 8034e7a: 601a str r2, [r3, #0] 8034e7c: 4770 bx lr 8034e7e: bf00 nop 8034e80: 2000c42c .word 0x2000c42c 08034e84 : } void snmp_inc_snmpouttraps(void) { snmpouttraps++; 8034e84: 4b02 ldr r3, [pc, #8] ; (8034e90 ) 8034e86: 681a ldr r2, [r3, #0] 8034e88: 3201 adds r2, #1 8034e8a: 601a str r2, [r3, #0] 8034e8c: 4770 bx lr 8034e8e: bf00 nop 8034e90: 2000c4a4 .word 0x2000c4a4 08034e94 : } void snmp_get_snmpgrpid_ptr(struct snmp_obj_id **oid) { *oid = &snmpgrp_id; 8034e94: 4b01 ldr r3, [pc, #4] ; (8034e9c ) 8034e96: 6003 str r3, [r0, #0] 8034e98: 4770 bx lr 8034e9a: bf00 nop 8034e9c: 2000097c .word 0x2000097c 08034ea0 : } } void snmp_get_snmpenableauthentraps(u8_t *value) { *value = *snmpenableauthentraps_ptr; 8034ea0: 4b02 ldr r3, [pc, #8] ; (8034eac ) 8034ea2: 681b ldr r3, [r3, #0] 8034ea4: 781b ldrb r3, [r3, #0] 8034ea6: 7003 strb r3, [r0, #0] 8034ea8: 4770 bx lr 8034eaa: bf00 nop 8034eac: 20000890 .word 0x20000890 08034eb0 : /** * Pushes nse struct onto stack. */ static void push_node(struct nse* node) { 8034eb0: 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) 8034eb2: 4d07 ldr r5, [pc, #28] ; (8034ed0 ) 8034eb4: 782b ldrb r3, [r5, #0] 8034eb6: 2b1f cmp r3, #31 8034eb8: d808 bhi.n 8034ecc { node_stack[node_stack_cnt] = *node; 8034eba: 4a06 ldr r2, [pc, #24] ; (8034ed4 ) 8034ebc: 240c movs r4, #12 8034ebe: fb04 2403 mla r4, r4, r3, r2 8034ec2: c807 ldmia r0, {r0, r1, r2} 8034ec4: e884 0007 stmia.w r4, {r0, r1, r2} node_stack_cnt++; 8034ec8: 3301 adds r3, #1 8034eca: 702b strb r3, [r5, #0] 8034ecc: bd30 pop {r4, r5, pc} 8034ece: bf00 nop 8034ed0: 2000c574 .word 0x2000c574 8034ed4: 2000c578 .word 0x2000c578 08034ed8 : empty_table(struct mib_node *node) { u8_t node_type; u8_t empty = 0; if (node != NULL) 8034ed8: b1d0 cbz r0, 8034f10 { node_type = node->node_type; 8034eda: 7c03 ldrb r3, [r0, #16] if (node_type == MIB_NODE_LR) 8034edc: 2b04 cmp r3, #4 8034ede: d105 bne.n 8034eec { struct mib_list_rootnode *lrn; lrn = (struct mib_list_rootnode *)node; if ((lrn->count == 0) || (lrn->head == NULL)) 8034ee0: 8b83 ldrh r3, [r0, #28] 8034ee2: b903 cbnz r3, 8034ee6 8034ee4: e009 b.n 8034efa 8034ee6: 6943 ldr r3, [r0, #20] 8034ee8: b13b cbz r3, 8034efa 8034eea: e010 b.n 8034f0e { empty = 1; } } else if ((node_type == MIB_NODE_AR) || (node_type == MIB_NODE_RA)) 8034eec: 1e9a subs r2, r3, #2 8034eee: 2a01 cmp r2, #1 8034ef0: d805 bhi.n 8034efe { struct mib_array_node *an; an = (struct mib_array_node *)node; if ((an->maxlength == 0) || (an->nptr == NULL)) 8034ef2: 8a43 ldrh r3, [r0, #18] 8034ef4: b10b cbz r3, 8034efa 8034ef6: 6980 ldr r0, [r0, #24] 8034ef8: e004 b.n 8034f04 { empty = 1; 8034efa: 2001 movs r0, #1 8034efc: 4770 bx lr } } else if (node_type == MIB_NODE_EX) 8034efe: 2b05 cmp r3, #5 8034f00: d105 bne.n 8034f0e { struct mib_external_node *en; en = (struct mib_external_node *)node; if (en->tree_levels == 0) 8034f02: 7e00 ldrb r0, [r0, #24] */ static u8_t empty_table(struct mib_node *node) { u8_t node_type; u8_t empty = 0; 8034f04: f1d0 0001 rsbs r0, r0, #1 8034f08: bf38 it cc 8034f0a: 2000 movcc r0, #0 8034f0c: 4770 bx lr 8034f0e: 2000 movs r0, #0 empty = 1; } } } return empty; } 8034f10: 4770 bx lr 8034f12: 0000 movs r0, r0 08034f14 : * @param netif points to returned netif struct pointer */ void snmp_ifindextonetif(s32_t ifindex, struct netif **netif) { struct netif *nif = netif_list; 8034f14: 4b05 ldr r3, [pc, #20] ; (8034f2c ) s32_t i, ifidx; ifidx = ifindex - 1; 8034f16: 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; 8034f18: 681b ldr r3, [r3, #0] s32_t i, ifidx; ifidx = ifindex - 1; i = 0; 8034f1a: 2200 movs r2, #0 while ((nif != NULL) && (i < ifidx)) 8034f1c: e001 b.n 8034f22 { nif = nif->next; 8034f1e: 681b ldr r3, [r3, #0] i++; 8034f20: 3201 adds r2, #1 struct netif *nif = netif_list; s32_t i, ifidx; ifidx = ifindex - 1; i = 0; while ((nif != NULL) && (i < ifidx)) 8034f22: b10b cbz r3, 8034f28 8034f24: 4282 cmp r2, r0 8034f26: dbfa blt.n 8034f1e { nif = nif->next; i++; } *netif = nif; 8034f28: 600b str r3, [r1, #0] 8034f2a: 4770 bx lr 8034f2c: 2000f6ac .word 0x2000f6ac 08034f30 : * @param ifidx points to s32_t object sub-identifier */ void snmp_netiftoifindex(struct netif *netif, s32_t *ifidx) { struct netif *nif = netif_list; 8034f30: 4b06 ldr r3, [pc, #24] ; (8034f4c ) u16_t i; i = 0; 8034f32: 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; 8034f34: 681b ldr r3, [r3, #0] u16_t i; i = 0; while ((nif != NULL) && (nif != netif)) 8034f36: e001 b.n 8034f3c { nif = nif->next; 8034f38: 681b ldr r3, [r3, #0] i++; 8034f3a: b292 uxth r2, r2 8034f3c: 3201 adds r2, #1 { struct netif *nif = netif_list; u16_t i; i = 0; while ((nif != NULL) && (nif != netif)) 8034f3e: b90b cbnz r3, 8034f44 { nif = nif->next; i++; } *ifidx = i+1; 8034f40: 600a str r2, [r1, #0] 8034f42: 4770 bx lr { struct netif *nif = netif_list; u16_t i; i = 0; while ((nif != NULL) && (nif != netif)) 8034f44: 4283 cmp r3, r0 8034f46: d1f7 bne.n 8034f38 8034f48: e7fa b.n 8034f40 8034f4a: bf00 nop 8034f4c: 2000f6ac .word 0x2000f6ac 08034f50 : * @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]); 8034f50: 7802 ldrb r2, [r0, #0] 8034f52: 68c3 ldr r3, [r0, #12] 8034f54: ea42 6303 orr.w r3, r2, r3, lsl #24 8034f58: 7a02 ldrb r2, [r0, #8] 8034f5a: ea43 4302 orr.w r3, r3, r2, lsl #16 8034f5e: 6842 ldr r2, [r0, #4] 8034f60: 0612 lsls r2, r2, #24 8034f62: ea43 4312 orr.w r3, r3, r2, lsr #16 8034f66: 600b str r3, [r1, #0] 8034f68: 4770 bx lr 08034f6a : * @param ident points to s32_t ident[4] output */ void snmp_iptooid(ip_addr_t *ip, s32_t *ident) { ident[0] = ip4_addr1(ip); 8034f6a: 7803 ldrb r3, [r0, #0] 8034f6c: 600b str r3, [r1, #0] ident[1] = ip4_addr2(ip); 8034f6e: 7843 ldrb r3, [r0, #1] 8034f70: 604b str r3, [r1, #4] ident[2] = ip4_addr3(ip); 8034f72: 7883 ldrb r3, [r0, #2] 8034f74: 608b str r3, [r1, #8] ident[3] = ip4_addr4(ip); 8034f76: 78c3 ldrb r3, [r0, #3] 8034f78: 60cb str r3, [r1, #12] 8034f7a: 4770 bx lr 08034f7c : } struct mib_list_node * snmp_mib_ln_alloc(s32_t id) { 8034f7c: b510 push {r4, lr} 8034f7e: 4604 mov r4, r0 struct mib_list_node *ln; ln = (struct mib_list_node *)memp_malloc(MEMP_SNMP_NODE); 8034f80: 200b movs r0, #11 8034f82: f7fa fda3 bl 802facc if (ln != NULL) 8034f86: b120 cbz r0, 8034f92 { ln->prev = NULL; 8034f88: 2300 movs r3, #0 8034f8a: 6003 str r3, [r0, #0] ln->next = NULL; 8034f8c: 6043 str r3, [r0, #4] ln->objid = id; 8034f8e: 6084 str r4, [r0, #8] ln->nptr = NULL; 8034f90: 60c3 str r3, [r0, #12] } return ln; } 8034f92: bd10 pop {r4, pc} 08034f94 : void snmp_mib_ln_free(struct mib_list_node *ln) { 8034f94: 4601 mov r1, r0 memp_free(MEMP_SNMP_NODE, ln); 8034f96: 200b movs r0, #11 8034f98: f7fa bdae b.w 802faf8 08034f9c : } struct mib_list_rootnode * snmp_mib_lrn_alloc(void) { 8034f9c: b508 push {r3, lr} struct mib_list_rootnode *lrn; lrn = (struct mib_list_rootnode*)memp_malloc(MEMP_SNMP_ROOTNODE); 8034f9e: 200a movs r0, #10 8034fa0: f7fa fd94 bl 802facc if (lrn != NULL) 8034fa4: b170 cbz r0, 8034fc4 { lrn->get_object_def = noleafs_get_object_def; 8034fa6: 4b08 ldr r3, [pc, #32] ; (8034fc8 ) 8034fa8: 6003 str r3, [r0, #0] lrn->get_value = noleafs_get_value; 8034faa: 4b08 ldr r3, [pc, #32] ; (8034fcc ) 8034fac: 6043 str r3, [r0, #4] lrn->set_test = noleafs_set_test; 8034fae: 4b08 ldr r3, [pc, #32] ; (8034fd0 ) 8034fb0: 6083 str r3, [r0, #8] lrn->set_value = noleafs_set_value; 8034fb2: 4b08 ldr r3, [pc, #32] ; (8034fd4 ) 8034fb4: 60c3 str r3, [r0, #12] lrn->node_type = MIB_NODE_LR; 8034fb6: 2304 movs r3, #4 8034fb8: 7403 strb r3, [r0, #16] lrn->maxlength = 0; 8034fba: 2300 movs r3, #0 8034fbc: 8243 strh r3, [r0, #18] lrn->head = NULL; 8034fbe: 6143 str r3, [r0, #20] lrn->tail = NULL; 8034fc0: 6183 str r3, [r0, #24] lrn->count = 0; 8034fc2: 8383 strh r3, [r0, #28] } return lrn; } 8034fc4: bd08 pop {r3, pc} 8034fc6: bf00 nop 8034fc8: 080338e3 .word 0x080338e3 8034fcc: 080338e9 .word 0x080338e9 8034fd0: 080338eb .word 0x080338eb 8034fd4: 080338ef .word 0x080338ef 08034fd8 : void snmp_mib_lrn_free(struct mib_list_rootnode *lrn) { 8034fd8: 4601 mov r1, r0 memp_free(MEMP_SNMP_ROOTNODE, lrn); 8034fda: 200a movs r0, #10 8034fdc: f7fa bd8c b.w 802faf8 08034fe0 : * 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) { 8034fe0: b5f8 push {r3, r4, r5, r6, r7, lr} 8034fe2: 4605 mov r5, r0 8034fe4: 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) 8034fe6: 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) { 8034fe8: 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) 8034fea: b93c cbnz r4, 8034ffc { /* empty list, add first node */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("alloc empty list objid==%"S32_F"\n",objid)); nn = snmp_mib_ln_alloc(objid); 8034fec: f7ff ffc6 bl 8034f7c if (nn != NULL) 8034ff0: b350 cbz r0, 8035048 { rn->head = nn; 8034ff2: 6168 str r0, [r5, #20] rn->tail = nn; 8034ff4: 61a8 str r0, [r5, #24] *insn = nn; 8034ff6: 6030 str r0, [r6, #0] 8034ff8: e021 b.n 803503e *insn = n; insert = 2; } else if (n->objid < objid) { if (n->next == NULL) 8034ffa: 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) 8034ffc: 68a3 ldr r3, [r4, #8] 8034ffe: 4283 cmp r3, r0 8035000: d102 bne.n 8035008 { /* node is already there */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("node already there objid==%"S32_F"\n",objid)); *insn = n; 8035002: 6034 str r4, [r6, #0] insert = 2; 8035004: 2302 movs r3, #2 8035006: e023 b.n 8035050 } else if (n->objid < objid) 8035008: da0a bge.n 8035020 { if (n->next == NULL) 803500a: 6867 ldr r7, [r4, #4] 803500c: 2f00 cmp r7, #0 803500e: d1f4 bne.n 8034ffa { /* 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); 8035010: f7ff ffb4 bl 8034f7c if (nn != NULL) 8035014: b1d8 cbz r0, 803504e { nn->next = NULL; nn->prev = n; 8035016: e880 0090 stmia.w r0, {r4, r7} n->next = nn; 803501a: 6060 str r0, [r4, #4] rn->tail = nn; 803501c: 61a8 str r0, [r5, #24] 803501e: e00b b.n 8035038 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); 8035020: f7ff ffac bl 8034f7c if (nn != NULL) 8035024: b198 cbz r0, 803504e { if (n->prev == NULL) 8035026: 6822 ldr r2, [r4, #0] { /* insert at the head */ nn->next = n; nn->prev = NULL; 8035028: 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) 803502c: b90a cbnz r2, 8035032 { /* insert at the head */ nn->next = n; nn->prev = NULL; rn->head = nn; 803502e: 6168 str r0, [r5, #20] 8035030: e001 b.n 8035036 else { /* insert in the middle */ nn->next = n; nn->prev = n->prev; n->prev->next = nn; 8035032: 6822 ldr r2, [r4, #0] 8035034: 6050 str r0, [r2, #4] n->prev = nn; 8035036: 6020 str r0, [r4, #0] } *insn = nn; 8035038: 6030 str r0, [r6, #0] insert = 1; 803503a: 2301 movs r3, #1 803503c: e008 b.n 8035050 } } } if (insert == 1) { rn->count += 1; 803503e: 8bab ldrh r3, [r5, #28] 8035040: 3301 adds r3, #1 8035042: 83ab strh r3, [r5, #28] 8035044: 2301 movs r3, #1 8035046: e000 b.n 803504a *insn = nn; insert = 1; } else { insert = -1; 8035048: 23ff movs r3, #255 ; 0xff if (insert == 1) { rn->count += 1; } LWIP_ASSERT("insert != 0",insert != 0); return insert; 803504a: b258 sxtb r0, r3 803504c: bdf8 pop {r3, r4, r5, r6, r7, pc} insert = 1; } else { /* insertion failure */ insert = -1; 803504e: 23ff movs r3, #255 ; 0xff } } } } if (insert == 1) 8035050: 2b01 cmp r3, #1 8035052: d1fa bne.n 803504a 8035054: e7f3 b.n 803503e 08035056 : { s8_t fc; struct mib_list_node *n; LWIP_ASSERT("rn != NULL",rn != NULL); n = rn->head; 8035056: 6943 ldr r3, [r0, #20] while ((n != NULL) && (n->objid != objid)) 8035058: e000 b.n 803505c { n = n->next; 803505a: 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)) 803505c: b16b cbz r3, 803507a 803505e: 6898 ldr r0, [r3, #8] 8035060: 4288 cmp r0, r1 8035062: d1fa bne.n 803505a } if (n == NULL) { fc = 0; } else if (n->nptr == NULL) 8035064: 68d9 ldr r1, [r3, #12] 8035066: b161 cbz r1, 8035082 } else { struct mib_list_rootnode *r; if (n->nptr->node_type == MIB_NODE_LR) 8035068: 7c08 ldrb r0, [r1, #16] 803506a: 2804 cmp r0, #4 803506c: d107 bne.n 803507e { r = (struct mib_list_rootnode *)n->nptr; if (r->count > 1) 803506e: 8b88 ldrh r0, [r1, #28] { /* can't delete node */ fc = 2; 8035070: 2801 cmp r0, #1 8035072: bf94 ite ls 8035074: 2001 movls r0, #1 8035076: 2002 movhi r0, #2 8035078: e004 b.n 8035084 { n = n->next; } if (n == NULL) { fc = 0; 803507a: 4618 mov r0, r3 803507c: e002 b.n 8035084 } } else { /* other node type */ fc = 3; 803507e: 2003 movs r0, #3 8035080: e000 b.n 8035084 fc = 0; } else if (n->nptr == NULL) { /* leaf, can delete node */ fc = 1; 8035082: 2001 movs r0, #1 { /* other node type */ fc = 3; } } *fn = n; 8035084: 6013 str r3, [r2, #0] return fc; } 8035086: b240 sxtb r0, r0 8035088: 4770 bx lr 0803508a : * @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) { 803508a: 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; 803508c: 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); 803508e: 68cd ldr r5, [r1, #12] rn->count -= 1; 8035090: 3b01 subs r3, #1 8035092: 8383 strh r3, [r0, #28] if (n == rn->head) 8035094: 6943 ldr r3, [r0, #20] 8035096: 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) { 8035098: 4604 mov r4, r0 /* caller must remove this sub-tree */ next = (struct mib_list_rootnode*)(n->nptr); rn->count -= 1; if (n == rn->head) 803509a: d105 bne.n 80350a8 { rn->head = n->next; 803509c: 684b ldr r3, [r1, #4] 803509e: 6143 str r3, [r0, #20] if (n->next != NULL) 80350a0: b17b cbz r3, 80350c2 { /* not last node, new list begin */ n->next->prev = NULL; 80350a2: 2200 movs r2, #0 80350a4: 601a str r2, [r3, #0] 80350a6: e00c b.n 80350c2 } } else if (n == rn->tail) 80350a8: 6983 ldr r3, [r0, #24] 80350aa: 4299 cmp r1, r3 80350ac: 680b ldr r3, [r1, #0] 80350ae: d104 bne.n 80350ba { rn->tail = n->prev; 80350b0: 6183 str r3, [r0, #24] if (n->prev != NULL) 80350b2: b133 cbz r3, 80350c2 { /* not last node, new list end */ n->prev->next = NULL; 80350b4: 2200 movs r2, #0 80350b6: 605a str r2, [r3, #4] 80350b8: e003 b.n 80350c2 } } else { /* node must be in the middle */ n->prev->next = n->next; 80350ba: 684a ldr r2, [r1, #4] 80350bc: 605a str r2, [r3, #4] n->next->prev = n->prev; 80350be: 684a ldr r2, [r1, #4] 80350c0: 6013 str r3, [r2, #0] } LWIP_DEBUGF(SNMP_MIB_DEBUG,("free list objid==%"S32_F"\n",n->objid)); snmp_mib_ln_free(n); 80350c2: 4608 mov r0, r1 80350c4: f7ff ff66 bl 8034f94 if (rn->count == 0) 80350c8: 8ba3 ldrh r3, [r4, #28] 80350ca: b90b cbnz r3, 80350d0 { rn->head = NULL; 80350cc: 6163 str r3, [r4, #20] rn->tail = NULL; 80350ce: 61a3 str r3, [r4, #24] } return next; } 80350d0: 4628 mov r0, r5 80350d2: bd38 pop {r3, r4, r5, pc} 080350d4 : * @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) { 80350d4: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80350d8: 4604 mov r4, r0 80350da: b085 sub sp, #20 80350dc: 460d mov r5, r1 80350de: 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) 80350e0: f102 0804 add.w r8, r2, #4 { u8_t node_type, ext_level; ext_level = 0; 80350e4: f04f 0b00 mov.w fp, #0 LWIP_DEBUGF(SNMP_MIB_DEBUG,("node==%p *ident==%"S32_F"\n",(void*)node,*ident)); while (node != NULL) 80350e8: e068 b.n 80351bc { node_type = node->node_type; 80350ea: 7c23 ldrb r3, [r4, #16] if ((node_type == MIB_NODE_AR) || (node_type == MIB_NODE_RA)) 80350ec: 1e9a subs r2, r3, #2 80350ee: 2a01 cmp r2, #1 80350f0: d812 bhi.n 8035118 { struct mib_array_node *an; u16_t i; if (ident_len > 0) 80350f2: b90d cbnz r5, 80350f8 } else { /* search failed, short object identifier (nosuchname) */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("an search failed, short object identifier\n")); return NULL; 80350f4: 2000 movs r0, #0 80350f6: e06a b.n 80351ce 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)) 80350f8: 8a67 ldrh r7, [r4, #18] 80350fa: 2300 movs r3, #0 80350fc: b29a uxth r2, r3 80350fe: 42ba cmp r2, r7 8035100: d2f8 bcs.n 80350f4 8035102: 009a lsls r2, r3, #2 8035104: 6961 ldr r1, [r4, #20] 8035106: 5888 ldr r0, [r1, r2] 8035108: f858 1c04 ldr.w r1, [r8, #-4] 803510c: 3301 adds r3, #1 803510e: 4288 cmp r0, r1 8035110: d1f4 bne.n 80350fc } 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) 8035112: 69a3 ldr r3, [r4, #24] 8035114: 589b ldr r3, [r3, r2] 8035116: e057 b.n 80351c8 /* 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) 8035118: 2b04 cmp r3, #4 803511a: d10c bne.n 8035136 { struct mib_list_rootnode *lrn; struct mib_list_node *ln; if (ident_len > 0) 803511c: 2d00 cmp r5, #0 803511e: d0e9 beq.n 80350f4 { /* list root node (internal 'RAM', variable length) */ lrn = (struct mib_list_rootnode *)node; ln = lrn->head; 8035120: 6963 ldr r3, [r4, #20] /* iterate over list, head to tail */ while ((ln != NULL) && (ln->objid != *ident)) 8035122: e000 b.n 8035126 { ln = ln->next; 8035124: 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)) 8035126: 2b00 cmp r3, #0 8035128: d0e4 beq.n 80350f4 803512a: 6899 ldr r1, [r3, #8] 803512c: f858 2c04 ldr.w r2, [r8, #-4] 8035130: 4291 cmp r1, r2 8035132: d1f7 bne.n 8035124 8035134: e047 b.n 80351c6 /* 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) 8035136: 2b05 cmp r3, #5 8035138: d12e bne.n 8035198 { struct mib_external_node *en; u16_t i, len; if (ident_len > 0) 803513a: 2d00 cmp r5, #0 803513c: d0da beq.n 80350f4 { /* external node (addressing and access via functions) */ en = (struct mib_external_node *)node; i = 0; len = en->level_length(en->addr_inf,ext_level); 803513e: 69e3 ldr r3, [r4, #28] 8035140: 6960 ldr r0, [r4, #20] 8035142: 4659 mov r1, fp 8035144: 4798 blx r3 if (ident_len > 0) { /* external node (addressing and access via functions) */ en = (struct mib_external_node *)node; i = 0; 8035146: f04f 0900 mov.w r9, #0 len = en->level_length(en->addr_inf,ext_level); 803514a: 4684 mov ip, r0 while ((i < len) && (en->ident_cmp(en->addr_inf,ext_level,i,*ident) != 0)) 803514c: e003 b.n 8035156 { i++; 803514e: f109 0901 add.w r9, r9, #1 8035152: 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)) 8035156: 45e1 cmp r9, ip 8035158: d0cc beq.n 80350f4 803515a: 6960 ldr r0, [r4, #20] 803515c: f858 3c04 ldr.w r3, [r8, #-4] 8035160: 6a27 ldr r7, [r4, #32] 8035162: f8cd c004 str.w ip, [sp, #4] 8035166: 4659 mov r1, fp 8035168: 464a mov r2, r9 803516a: 47b8 blx r7 803516c: f8dd c004 ldr.w ip, [sp, #4] 8035170: 2800 cmp r0, #0 8035172: d1ec bne.n 803514e { i++; } if (i < len) 8035174: 45e1 cmp r9, ip 8035176: d2bd bcs.n 80350f4 { s32_t debug_id; en->get_objid(en->addr_inf,ext_level,i,&debug_id); 8035178: 4659 mov r1, fp 803517a: ab03 add r3, sp, #12 803517c: 6a67 ldr r7, [r4, #36] ; 0x24 803517e: 6960 ldr r0, [r4, #20] 8035180: 464a mov r2, r9 8035182: 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) 8035184: 7e23 ldrb r3, [r4, #24] 8035186: f10b 0b01 add.w fp, fp, #1 803518a: 459b cmp fp, r3 803518c: d100 bne.n 8035190 803518e: e00b b.n 80351a8 else { /* found it, proceed to child */ ident_len--; ident++; ext_level++; 8035190: fa5f fb8b uxtb.w fp, fp 8035194: 4623 mov r3, r4 8035196: e00c b.n 80351b2 /* 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) 8035198: 2b01 cmp r3, #1 803519a: d1ab bne.n 80350f4 { mib_scalar_node *sn; sn = (mib_scalar_node *)node; if ((ident_len == 1) && (*ident == 0)) 803519c: 2d01 cmp r5, #1 803519e: d1a9 bne.n 80350f4 80351a0: f8da 3000 ldr.w r3, [sl] 80351a4: 2b00 cmp r3, #0 80351a6: d1a5 bne.n 80350f4 { np->ident_len = ident_len; 80351a8: 7035 strb r5, [r6, #0] np->ident = ident; 80351aa: f8c6 a004 str.w sl, [r6, #4] return (struct mib_node*)sn; 80351ae: 4620 mov r0, r4 80351b0: e00d b.n 80351ce 80351b2: 3d01 subs r5, #1 80351b4: b2ed uxtb r5, r5 80351b6: f108 0804 add.w r8, r8, #4 80351ba: 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) 80351bc: 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) 80351c0: 2c00 cmp r4, #0 80351c2: d192 bne.n 80350ea 80351c4: e796 b.n 80350f4 } 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) 80351c6: 68db ldr r3, [r3, #12] 80351c8: 2b00 cmp r3, #0 80351ca: d1f2 bne.n 80351b2 80351cc: e7ec b.n 80351a8 } } /* done, found nothing */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("search failed node==%p\n",(void*)node)); return NULL; } 80351ce: b005 add sp, #20 80351d0: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 080351d4 : /** * Tree expansion. */ struct mib_node * snmp_expand_tree(struct mib_node *node, u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret) { 80351d4: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80351d8: 461d mov r5, r3 80351da: b08b sub sp, #44 ; 0x2c u8_t node_type, ext_level, climb_tree; ext_level = 0; /* reset node stack */ node_stack_cnt = 0; 80351dc: 4ba4 ldr r3, [pc, #656] ; (8035470 ) 80351de: 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); 80351e2: 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) { 80351e4: 4604 mov r4, r0 80351e6: 460e mov r6, r1 80351e8: 4690 mov r8, r2 u8_t node_type, ext_level, climb_tree; ext_level = 0; /* reset node stack */ node_stack_cnt = 0; 80351ea: 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); 80351ee: 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) 80351f0: e19c b.n 803552c { climb_tree = 0; node_type = node->node_type; 80351f2: 7c23 ldrb r3, [r4, #16] if ((node_type == MIB_NODE_AR) || (node_type == MIB_NODE_RA)) 80351f4: 1e9a subs r2, r3, #2 80351f6: 2a01 cmp r2, #1 80351f8: f200 808f bhi.w 803531a 80351fc: 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) 80351fe: b90e cbnz r6, 8035204 else { u8_t j; /* ident_len == 0, complete with leftmost '.thing' */ j = 0; while ((j < an->maxlength) && empty_table(an->nptr[j])) 8035200: 46b1 mov r9, r6 8035202: e06f b.n 80352e4 /* 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)) 8035204: f04f 0c00 mov.w ip, #0 8035208: fa1f f28c uxth.w r2, ip 803520c: 42ba cmp r2, r7 803520e: f080 8168 bcs.w 80354e2 8035212: 6963 ldr r3, [r4, #20] 8035214: f853 102c ldr.w r1, [r3, ip, lsl #2] 8035218: f8d8 3000 ldr.w r3, [r8] 803521c: 4299 cmp r1, r3 803521e: ea4f 098c mov.w r9, ip, lsl #2 8035222: f10c 0c01 add.w ip, ip, #1 8035226: dbef blt.n 8035208 } 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]; 8035228: 782b ldrb r3, [r5, #0] 803522a: eb05 0783 add.w r7, r5, r3, lsl #2 803522e: 6079 str r1, [r7, #4] (oidret->len)++; 8035230: 1c59 adds r1, r3, #1 8035232: 7029 strb r1, [r5, #0] if (an->nptr[i] == NULL) 8035234: f8d4 b018 ldr.w fp, [r4, #24] 8035238: f85b 0009 ldr.w r0, [fp, r9] 803523c: b998 cbnz r0, 8035266 { LWIP_DEBUGF(SNMP_MIB_DEBUG,("leaf node\n")); /* leaf node (e.g. in a fixed size table) */ if (an->objid[i] > *ident) 803523e: 6960 ldr r0, [r4, #20] 8035240: f850 6009 ldr.w r6, [r0, r9] 8035244: f8d8 0000 ldr.w r0, [r8] 8035248: 4286 cmp r6, r0 803524a: f300 8173 bgt.w 8035534 { return (struct mib_node*)an; } else if ((i + 1) < an->maxlength) 803524e: 8a60 ldrh r0, [r4, #18] { /* an->objid[i] == *ident */ (oidret->len)--; 8035250: 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) 8035252: 3201 adds r2, #1 8035254: 4282 cmp r2, r0 8035256: f280 8144 bge.w 80354e2 { /* an->objid[i] == *ident */ (oidret->len)--; oidret->id[oidret->len] = an->objid[i + 1]; 803525a: 6963 ldr r3, [r4, #20] 803525c: f853 302c ldr.w r3, [r3, ip, lsl #2] (oidret->len)++; 8035260: 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]; 8035262: 607b str r3, [r7, #4] 8035264: e166 b.n 8035534 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; 8035266: 3201 adds r2, #1 while ((j < an->maxlength) && (empty_table(an->nptr[j]))) 8035268: 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; 803526a: fa5f fc82 uxtb.w ip, r2 while ((j < an->maxlength) && (empty_table(an->nptr[j]))) 803526e: 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) 8035270: eb0c 0307 add.w r3, ip, r7 8035274: 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]))) 8035276: 428b cmp r3, r1 8035278: d21a bcs.n 80352b0 803527a: b21b sxth r3, r3 803527c: 009a lsls r2, r3, #2 803527e: f85b 3023 ldr.w r3, [fp, r3, lsl #2] 8035282: 9104 str r1, [sp, #16] 8035284: 4618 mov r0, r3 8035286: 9203 str r2, [sp, #12] 8035288: 9302 str r3, [sp, #8] 803528a: f8cd c004 str.w ip, [sp, #4] 803528e: f7ff fe23 bl 8034ed8 8035292: 3701 adds r7, #1 8035294: 9904 ldr r1, [sp, #16] 8035296: 9a03 ldr r2, [sp, #12] 8035298: 9b02 ldr r3, [sp, #8] 803529a: f8dd c004 ldr.w ip, [sp, #4] 803529e: 2800 cmp r0, #0 80352a0: d1e6 bne.n 8035270 { j++; } if (j < an->maxlength) { cur_node.r_ptr = an->nptr[j]; 80352a2: 9307 str r3, [sp, #28] cur_node.r_id = an->objid[j]; 80352a4: 6963 ldr r3, [r4, #20] 80352a6: 589b ldr r3, [r3, r2] cur_node.r_nl = 0; 80352a8: 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]; 80352ac: 9308 str r3, [sp, #32] 80352ae: e001 b.n 80352b4 cur_node.r_nl = 0; } else { cur_node.r_ptr = NULL; 80352b0: 2300 movs r3, #0 80352b2: 9307 str r3, [sp, #28] } push_node(&cur_node); 80352b4: a807 add r0, sp, #28 80352b6: f7ff fdfb bl 8034eb0 if (an->objid[i] == *ident) 80352ba: 6963 ldr r3, [r4, #20] 80352bc: f853 2009 ldr.w r2, [r3, r9] 80352c0: f8d8 3000 ldr.w r3, [r8] 80352c4: 429a cmp r2, r3 80352c6: d104 bne.n 80352d2 { ident_len--; 80352c8: 3e01 subs r6, #1 80352ca: b2f6 uxtb r6, r6 ident++; 80352cc: f108 0804 add.w r8, r8, #4 80352d0: e000 b.n 80352d4 } else { /* an->objid[i] < *ident */ ident_len = 0; 80352d2: 2600 movs r6, #0 } /* follow next child pointer */ node = an->nptr[i]; 80352d4: 69a3 ldr r3, [r4, #24] 80352d6: f853 3009 ldr.w r3, [r3, r9] 80352da: e140 b.n 803555e u8_t j; /* ident_len == 0, complete with leftmost '.thing' */ j = 0; while ((j < an->maxlength) && empty_table(an->nptr[j])) { j++; 80352dc: f109 0901 add.w r9, r9, #1 80352e0: 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])) 80352e4: 45b9 cmp r9, r7 80352e6: f080 80fc bcs.w 80354e2 80352ea: fa0f f289 sxth.w r2, r9 80352ee: 69a3 ldr r3, [r4, #24] 80352f0: f853 0022 ldr.w r0, [r3, r2, lsl #2] 80352f4: ea4f 0b82 mov.w fp, r2, lsl #2 80352f8: f7ff fdee bl 8034ed8 80352fc: 2800 cmp r0, #0 80352fe: d1ed bne.n 80352dc 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]; 8035300: 6962 ldr r2, [r4, #20] 8035302: 782b ldrb r3, [r5, #0] 8035304: f852 100b ldr.w r1, [r2, fp] 8035308: eb05 0283 add.w r2, r5, r3, lsl #2 (oidret->len)++; 803530c: 3301 adds r3, #1 803530e: 702b strb r3, [r5, #0] if (an->nptr[j] == NULL) 8035310: 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]; 8035312: 6051 str r1, [r2, #4] (oidret->len)++; if (an->nptr[j] == NULL) 8035314: f853 300b ldr.w r3, [r3, fp] 8035318: e11f b.n 803555a /* j == an->maxlength */ climb_tree = 1; } } } else if(node_type == MIB_NODE_LR) 803531a: 2b04 cmp r3, #4 803531c: d14c bne.n 80353b8 803531e: 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) 8035320: 2e00 cmp r6, #0 8035322: d040 beq.n 80353a6 { ln = lrn->head; /* iterate over list, head to tail */ while ((ln != NULL) && (ln->objid < *ident)) 8035324: e000 b.n 8035328 { ln = ln->next; 8035326: 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)) 8035328: 2f00 cmp r7, #0 803532a: f000 80da beq.w 80354e2 803532e: 68ba ldr r2, [r7, #8] 8035330: f8d8 3000 ldr.w r3, [r8] 8035334: 429a cmp r2, r3 8035336: dbf6 blt.n 8035326 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; 8035338: 782b ldrb r3, [r5, #0] 803533a: eb05 0183 add.w r1, r5, r3, lsl #2 803533e: 604a str r2, [r1, #4] (oidret->len)++; 8035340: 1c5a adds r2, r3, #1 8035342: 702a strb r2, [r5, #0] if (ln->nptr == NULL) 8035344: 68f8 ldr r0, [r7, #12] 8035346: b978 cbnz r0, 8035368 { /* leaf node */ if (ln->objid > *ident) 8035348: 68b8 ldr r0, [r7, #8] 803534a: f8d8 6000 ldr.w r6, [r8] 803534e: 42b0 cmp r0, r6 8035350: f300 80f0 bgt.w 8035534 { return (struct mib_node*)lrn; } else if (ln->next != NULL) 8035354: 6878 ldr r0, [r7, #4] { /* ln->objid == *ident */ (oidret->len)--; 8035356: 702b strb r3, [r5, #0] /* leaf node */ if (ln->objid > *ident) { return (struct mib_node*)lrn; } else if (ln->next != NULL) 8035358: 2800 cmp r0, #0 803535a: f000 80c2 beq.w 80354e2 { /* ln->objid == *ident */ (oidret->len)--; oidret->id[oidret->len] = ln->next->objid; 803535e: 687b ldr r3, [r7, #4] 8035360: 689b ldr r3, [r3, #8] (oidret->len)++; 8035362: 702a strb r2, [r5, #0] } else if (ln->next != NULL) { /* ln->objid == *ident */ (oidret->len)--; oidret->id[oidret->len] = ln->next->objid; 8035364: 604b str r3, [r1, #4] 8035366: e0e5 b.n 8035534 { struct mib_list_node *jn; struct nse cur_node; /* non-leaf, store right child ptr and id */ jn = ln->next; 8035368: 687c ldr r4, [r7, #4] while ((jn != NULL) && empty_table(jn->nptr)) 803536a: e000 b.n 803536e { jn = jn->next; 803536c: 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)) 803536e: 2c00 cmp r4, #0 8035370: f000 80e9 beq.w 8035546 8035374: f8d4 900c ldr.w r9, [r4, #12] 8035378: 4648 mov r0, r9 803537a: f7ff fdad bl 8034ed8 803537e: 2800 cmp r0, #0 8035380: d1f4 bne.n 803536c 8035382: e0d9 b.n 8035538 } else { cur_node.r_ptr = NULL; } push_node(&cur_node); 8035384: a807 add r0, sp, #28 8035386: f7ff fd93 bl 8034eb0 if (ln->objid == *ident) 803538a: 68ba ldr r2, [r7, #8] 803538c: f8d8 3000 ldr.w r3, [r8] 8035390: 429a cmp r2, r3 8035392: d104 bne.n 803539e { ident_len--; 8035394: 3e01 subs r6, #1 8035396: b2f6 uxtb r6, r6 ident++; 8035398: f108 0804 add.w r8, r8, #4 803539c: e000 b.n 80353a0 } else { /* ln->objid < *ident */ ident_len = 0; 803539e: 2600 movs r6, #0 } /* follow next child pointer */ node = ln->nptr; 80353a0: 68fb ldr r3, [r7, #12] 80353a2: e0dc b.n 803555e 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; 80353a4: 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)) 80353a6: 2f00 cmp r7, #0 80353a8: f000 809b beq.w 80354e2 80353ac: 68f8 ldr r0, [r7, #12] 80353ae: f7ff fd93 bl 8034ed8 80353b2: 2800 cmp r0, #0 80353b4: d1f6 bne.n 80353a4 80353b6: e0c8 b.n 803554a /* jn == NULL */ climb_tree = 1; } } } else if(node_type == MIB_NODE_EX) 80353b8: 2b05 cmp r3, #5 80353ba: f040 8086 bne.w 80354ca 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) 80353be: 2e00 cmp r6, #0 80353c0: d06e beq.n 80354a0 { u16_t i, len; i = 0; len = en->level_length(en->addr_inf,ext_level); 80353c2: 69e3 ldr r3, [r4, #28] 80353c4: 6960 ldr r0, [r4, #20] 80353c6: 4651 mov r1, sl 80353c8: 4798 blx r3 en = (struct mib_external_node *)node; if (ident_len > 0) { u16_t i, len; i = 0; 80353ca: f04f 0900 mov.w r9, #0 len = en->level_length(en->addr_inf,ext_level); 80353ce: 4683 mov fp, r0 while ((i < len) && (en->ident_cmp(en->addr_inf,ext_level,i,*ident) < 0)) 80353d0: e003 b.n 80353da { i++; 80353d2: f109 0901 add.w r9, r9, #1 80353d6: 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)) 80353da: 45d9 cmp r9, fp 80353dc: f000 8081 beq.w 80354e2 80353e0: 6a27 ldr r7, [r4, #32] 80353e2: 6960 ldr r0, [r4, #20] 80353e4: f8d8 3000 ldr.w r3, [r8] 80353e8: 4651 mov r1, sl 80353ea: 464a mov r2, r9 80353ec: 47b8 blx r7 80353ee: 2800 cmp r0, #0 80353f0: dbef blt.n 80353d2 { i++; } if (i < len) 80353f2: 45d9 cmp r9, fp 80353f4: d275 bcs.n 80354e2 { /* add identifier to oidret */ en->get_objid(en->addr_inf,ext_level,i,&ex_id); 80353f6: 4651 mov r1, sl 80353f8: 464a mov r2, r9 80353fa: ab06 add r3, sp, #24 80353fc: 6a67 ldr r7, [r4, #36] ; 0x24 80353fe: 6960 ldr r0, [r4, #20] 8035400: 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; 8035402: 782b ldrb r3, [r5, #0] 8035404: 9a06 ldr r2, [sp, #24] 8035406: eb05 0183 add.w r1, r5, r3, lsl #2 (oidret->len)++; if ((ext_level + 1) == en->tree_levels) 803540a: 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; 803540e: 604a str r2, [r1, #4] (oidret->len)++; 8035410: 1c59 adds r1, r3, #1 8035412: 7029 strb r1, [r5, #0] if ((ext_level + 1) == en->tree_levels) 8035414: 7e21 ldrb r1, [r4, #24] 8035416: 458c cmp ip, r1 8035418: d118 bne.n 803544c { LWIP_DEBUGF(SNMP_MIB_DEBUG,("leaf node\n")); /* leaf node */ if (ex_id > *ident) 803541a: f8d8 1000 ldr.w r1, [r8] 803541e: 428a cmp r2, r1 8035420: f300 8088 bgt.w 8035534 { return (struct mib_node*)en; } else if ((i + 1) < len) 8035424: f109 0201 add.w r2, r9, #1 8035428: 455a cmp r2, fp 803542a: da0d bge.n 8035448 { /* ex_id == *ident */ en->get_objid(en->addr_inf,ext_level,i + 1,&ex_id); 803542c: ab06 add r3, sp, #24 803542e: 6a66 ldr r6, [r4, #36] ; 0x24 8035430: 6960 ldr r0, [r4, #20] 8035432: 4651 mov r1, sl 8035434: b292 uxth r2, r2 8035436: 47b0 blx r6 (oidret->len)--; 8035438: 782b ldrb r3, [r5, #0] 803543a: 3b01 subs r3, #1 oidret->id[oidret->len] = ex_id; 803543c: b2db uxtb r3, r3 803543e: eb05 0583 add.w r5, r5, r3, lsl #2 8035442: 9b06 ldr r3, [sp, #24] 8035444: 606b str r3, [r5, #4] 8035446: e075 b.n 8035534 return (struct mib_node*)en; } else { /* (i + 1) == len */ (oidret->len)--; 8035448: 702b strb r3, [r5, #0] 803544a: e04a b.n 80354e2 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; 803544c: f109 0201 add.w r2, r9, #1 if (j < len) 8035450: b2d2 uxtb r2, r2 8035452: 455a cmp r2, fp 8035454: d20e bcs.n 8035474 { /* right node is the current external node */ cur_node.r_ptr = node; 8035456: 9407 str r4, [sp, #28] en->get_objid(en->addr_inf,ext_level,j,&cur_node.r_id); 8035458: 6960 ldr r0, [r4, #20] 803545a: 9b05 ldr r3, [sp, #20] 803545c: f8cd c004 str.w ip, [sp, #4] 8035460: 4651 mov r1, sl 8035462: 6a67 ldr r7, [r4, #36] ; 0x24 8035464: 47b8 blx r7 cur_node.r_nl = ext_level + 1; 8035466: f8dd c004 ldr.w ip, [sp, #4] 803546a: f88d c024 strb.w ip, [sp, #36] ; 0x24 803546e: e003 b.n 8035478 8035470: 2000c574 .word 0x2000c574 } else { cur_node.r_ptr = NULL; 8035474: 2300 movs r3, #0 8035476: 9307 str r3, [sp, #28] } push_node(&cur_node); 8035478: a807 add r0, sp, #28 803547a: f7ff fd19 bl 8034eb0 if (en->ident_cmp(en->addr_inf,ext_level,i,*ident) == 0) 803547e: 6a27 ldr r7, [r4, #32] 8035480: 6960 ldr r0, [r4, #20] 8035482: f8d8 3000 ldr.w r3, [r8] 8035486: 4651 mov r1, sl 8035488: 464a mov r2, r9 803548a: 47b8 blx r7 803548c: b920 cbnz r0, 8035498 { ident_len--; 803548e: 3e01 subs r6, #1 8035490: b2f6 uxtb r6, r6 ident++; 8035492: f108 0804 add.w r8, r8, #4 8035496: e000 b.n 803549a } else { /* external id < *ident */ ident_len = 0; 8035498: 2600 movs r6, #0 } /* proceed to child */ ext_level++; 803549a: f10a 0a01 add.w sl, sl, #1 803549e: e011 b.n 80354c4 } } else { /* ident_len == 0, complete with leftmost '.thing' */ en->get_objid(en->addr_inf,ext_level,0,&ex_id); 80354a0: 4651 mov r1, sl 80354a2: 4632 mov r2, r6 80354a4: ab06 add r3, sp, #24 80354a6: 6a67 ldr r7, [r4, #36] ; 0x24 80354a8: 6960 ldr r0, [r4, #20] 80354aa: 47b8 blx r7 LWIP_DEBUGF(SNMP_MIB_DEBUG,("left en->objid==%"S32_F"\n",ex_id)); oidret->id[oidret->len] = ex_id; 80354ac: 782b ldrb r3, [r5, #0] 80354ae: 9a06 ldr r2, [sp, #24] 80354b0: eb05 0183 add.w r1, r5, r3, lsl #2 (oidret->len)++; 80354b4: 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; 80354b6: 604a str r2, [r1, #4] (oidret->len)++; 80354b8: 702b strb r3, [r5, #0] if ((ext_level + 1) == en->tree_levels) 80354ba: 7e23 ldrb r3, [r4, #24] 80354bc: f10a 0a01 add.w sl, sl, #1 80354c0: 459a cmp sl, r3 80354c2: d037 beq.n 8035534 return (struct mib_node*)en; } else { /* no leaf, proceed to child */ ext_level++; 80354c4: fa5f fa8a uxtb.w sl, sl 80354c8: e030 b.n 803552c } } } else if(node_type == MIB_NODE_SC) 80354ca: 2b01 cmp r3, #1 80354cc: d001 beq.n 80354d2 } else { /* unknown/unhandled node_type */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("expand failed node_type %"U16_F" unkown\n",(u16_t)node_type)); return NULL; 80354ce: 2000 movs r0, #0 80354d0: e047 b.n 8035562 { mib_scalar_node *sn; /* scalar node */ sn = (mib_scalar_node *)node; if (ident_len > 0) 80354d2: b936 cbnz r6, 80354e2 climb_tree = 1; } else { /* ident_len == 0, complete object identifier */ oidret->id[oidret->len] = 0; 80354d4: 782b ldrb r3, [r5, #0] 80354d6: eb05 0283 add.w r2, r5, r3, lsl #2 (oidret->len)++; 80354da: 3301 adds r3, #1 climb_tree = 1; } else { /* ident_len == 0, complete object identifier */ oidret->id[oidret->len] = 0; 80354dc: 6056 str r6, [r2, #4] (oidret->len)++; 80354de: 702b strb r3, [r5, #0] 80354e0: e028 b.n 8035534 80354e2: 4921 ldr r1, [pc, #132] ; (8035568 ) struct nse child; /* find right child ptr */ child.r_ptr = NULL; child.r_id = 0; child.r_nl = 0; 80354e4: f04f 0a00 mov.w sl, #0 80354e8: 780b ldrb r3, [r1, #0] pop_node(struct nse* node) { if (node_stack_cnt > 0) { node_stack_cnt--; *node = node_stack[node_stack_cnt]; 80354ea: 4920 ldr r1, [pc, #128] ; (803556c ) { struct nse child; /* find right child ptr */ child.r_ptr = NULL; child.r_id = 0; 80354ec: 4652 mov r2, sl if (climb_tree) { struct nse child; /* find right child ptr */ child.r_ptr = NULL; 80354ee: 4654 mov r4, sl pop_node(struct nse* node) { if (node_stack_cnt > 0) { node_stack_cnt--; *node = node_stack[node_stack_cnt]; 80354f0: 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)) 80354f2: e00b b.n 803550c static void pop_node(struct nse* node) { if (node_stack_cnt > 0) { node_stack_cnt--; 80354f4: 3b01 subs r3, #1 80354f6: b2db uxtb r3, r3 *node = node_stack[node_stack_cnt]; 80354f8: fb06 f203 mul.w r2, r6, r3 80354fc: 1888 adds r0, r1, r2 80354fe: 588c ldr r4, [r1, r2] 8035500: f890 a008 ldrb.w sl, [r0, #8] 8035504: 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)--; 8035506: 7828 ldrb r0, [r5, #0] 8035508: 3801 subs r0, #1 803550a: 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)) 803550c: b91b cbnz r3, 8035516 803550e: 4f16 ldr r7, [pc, #88] ; (8035568 ) 8035510: 703b strb r3, [r7, #0] { pop_node(&child); /* trim returned oid */ (oidret->len)--; } if (child.r_ptr != NULL) 8035512: b924 cbnz r4, 803551e 8035514: e7db b.n 80354ce /* 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)) 8035516: 2c00 cmp r4, #0 8035518: d0ec beq.n 80354f4 803551a: 4913 ldr r1, [pc, #76] ; (8035568 ) 803551c: 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; 803551e: 782b ldrb r3, [r5, #0] 8035520: eb05 0183 add.w r1, r5, r3, lsl #2 oidret->len++; 8035524: 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; 8035526: 604a str r2, [r1, #4] oidret->len++; 8035528: 702b strb r3, [r5, #0] (oidret->len)--; } if (child.r_ptr != NULL) { /* incoming ident is useless beyond this point */ ident_len = 0; 803552a: 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) 803552c: 2c00 cmp r4, #0 803552e: f47f ae60 bne.w 80351f2 8035532: e7cc b.n 80354ce 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) 8035534: 4620 mov r0, r4 8035536: e014 b.n 8035562 jn = jn->next; } if (jn != NULL) { cur_node.r_ptr = jn->nptr; cur_node.r_id = jn->objid; 8035538: 68a3 ldr r3, [r4, #8] { jn = jn->next; } if (jn != NULL) { cur_node.r_ptr = jn->nptr; 803553a: f8cd 901c str.w r9, [sp, #28] cur_node.r_id = jn->objid; 803553e: 9308 str r3, [sp, #32] cur_node.r_nl = 0; 8035540: f88d 0024 strb.w r0, [sp, #36] ; 0x24 8035544: e71e b.n 8035384 } else { cur_node.r_ptr = NULL; 8035546: 9407 str r4, [sp, #28] 8035548: e71c b.n 8035384 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; 803554a: 782b ldrb r3, [r5, #0] 803554c: 68ba ldr r2, [r7, #8] 803554e: eb05 0183 add.w r1, r5, r3, lsl #2 (oidret->len)++; 8035552: 3301 adds r3, #1 8035554: 702b strb r3, [r5, #0] if (jn->nptr == NULL) 8035556: 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; 8035558: 604a str r2, [r1, #4] (oidret->len)++; if (jn->nptr == NULL) 803555a: 2b00 cmp r3, #0 803555c: d0ea beq.n 8035534 (oidret->len)--; } if (child.r_ptr != NULL) { /* incoming ident is useless beyond this point */ ident_len = 0; 803555e: 461c mov r4, r3 8035560: e7e4 b.n 803552c } } /* done, found nothing */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("expand failed node==%p\n",(void*)node)); return NULL; } 8035562: b00b add sp, #44 ; 0x2c 8035564: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8035568: 2000c574 .word 0x2000c574 803556c: 2000c578 .word 0x2000c578 08035570 : * @return 1 if it matches, 0 otherwise */ u8_t snmp_iso_prefix_tst(u8_t ident_len, s32_t *ident) { if ((ident_len > 3) && 8035570: 2803 cmp r0, #3 8035572: d90d bls.n 8035590 8035574: 680b ldr r3, [r1, #0] 8035576: 2b01 cmp r3, #1 8035578: d10a bne.n 8035590 (ident[0] == 1) && (ident[1] == 3) && 803557a: 684b ldr r3, [r1, #4] 803557c: 2b03 cmp r3, #3 803557e: d107 bne.n 8035590 8035580: 688b ldr r3, [r1, #8] 8035582: 2b06 cmp r3, #6 8035584: d104 bne.n 8035590 (ident[2] == 6) && (ident[3] == 1)) 8035586: 68c8 ldr r0, [r1, #12] { return 1; 8035588: 1e43 subs r3, r0, #1 803558a: 4258 negs r0, r3 803558c: 4158 adcs r0, r3 803558e: 4770 bx lr } else { return 0; 8035590: 2000 movs r0, #0 } } 8035592: 4770 bx lr 08035594 : 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))) 8035594: 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) { 8035596: 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]; 803559a: 1d15 adds r5, r2, #4 ident_len = ((ident_len < 4)?ident_len:4); 803559c: 2804 cmp r0, #4 803559e: bf34 ite cc 80355a0: 4680 movcc r8, r0 80355a2: f04f 0804 movcs.w r8, #4 { const s32_t *prefix_ptr; s32_t *ret_ptr; u8_t i; i = 0; 80355a6: 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) 80355a8: 4f10 ldr r7, [pc, #64] ; (80355ec ) 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))) 80355aa: e003 b.n 80355b4 { *ret_ptr++ = *prefix_ptr++; ident++; i++; 80355ac: 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++; 80355ae: 50ee str r6, [r5, r3] ident++; i++; 80355b0: b2e4 uxtb r4, r4 80355b2: 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))) 80355b4: 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) 80355b6: eb05 0c03 add.w ip, r5, r3 80355ba: 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))) 80355be: d101 bne.n 80355c4 80355c0: 2300 movs r3, #0 80355c2: e00c b.n 80355de 80355c4: 59de ldr r6, [r3, r7] 80355c6: 58c8 ldr r0, [r1, r3] 80355c8: 42b0 cmp r0, r6 80355ca: ddef ble.n 80355ac return 1; } else { /* i != ident_len */ return 0; 80355cc: 2000 movs r0, #0 80355ce: 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++; 80355d2: 58f1 ldr r1, [r6, r3] i++; 80355d4: 3401 adds r4, #1 if (i == ident_len) { /* match, complete missing bits */ while (i < 4) { *ret_ptr++ = *prefix_ptr++; 80355d6: f84c 1003 str.w r1, [ip, r3] i++; 80355da: b2e4 uxtb r4, r4 80355dc: 3304 adds r3, #4 i++; } if (i == ident_len) { /* match, complete missing bits */ while (i < 4) 80355de: 2c03 cmp r4, #3 80355e0: d9f7 bls.n 80355d2 { *ret_ptr++ = *prefix_ptr++; i++; } oidret->len = i; 80355e2: 7014 strb r4, [r2, #0] return 1; 80355e4: 2001 movs r0, #1 else { /* i != ident_len */ return 0; } } 80355e6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80355ea: bf00 nop 80355ec: 08045758 .word 0x08045758 080355f0 : * Starts SNMP Agent. * Allocates UDP pcb and binds it to IP_ADDR_ANY port 161. */ void snmp_init(void) { 80355f0: b510 push {r4, lr} struct snmp_msg_pstat *msg_ps; u8_t i; snmp1_pcb = udp_new(); 80355f2: f7fd fa15 bl 8032a20 80355f6: 4c0b ldr r4, [pc, #44] ; (8035624 ) 80355f8: 6020 str r0, [r4, #0] if (snmp1_pcb != NULL) 80355fa: b140 cbz r0, 803560e { udp_recv(snmp1_pcb, snmp_recv, (void *)SNMP_IN_PORT); 80355fc: 490a ldr r1, [pc, #40] ; (8035628 ) 80355fe: 22a1 movs r2, #161 ; 0xa1 8035600: f7fd f9ee bl 80329e0 udp_bind(snmp1_pcb, IP_ADDR_ANY, SNMP_IN_PORT); 8035604: 6820 ldr r0, [r4, #0] 8035606: 4909 ldr r1, [pc, #36] ; (803562c ) 8035608: 22a1 movs r2, #161 ; 0xa1 803560a: f7fd f8f1 bl 80327f0 } msg_ps = &msg_input_list[0]; for (i=0; istate = SNMP_MSG_EMPTY; 803560e: 4b08 ldr r3, [pc, #32] ; (8035630 ) 8035610: 2200 movs r2, #0 8035612: f883 205a strb.w r2, [r3, #90] ; 0x5a msg_ps->error_index = 0; 8035616: 615a str r2, [r3, #20] msg_ps->error_status = SNMP_ES_NOERROR; 8035618: 611a str r2, [r3, #16] msg_ps++; } trap_msg.pcb = snmp1_pcb; 803561a: 4b02 ldr r3, [pc, #8] ; (8035624 ) 803561c: 681a ldr r2, [r3, #0] 803561e: 4b05 ldr r3, [pc, #20] ; (8035634 ) 8035620: 601a str r2, [r3, #0] 8035622: bd10 pop {r4, pc} 8035624: 2000f6e8 .word 0x2000f6e8 8035628: 0803619d .word 0x0803619d 803562c: 08044e44 .word 0x08044e44 8035630: 2000f6ec .word 0x2000f6ec 8035634: 2000f824 .word 0x2000f824 08035638 : return ERR_OK; } struct snmp_varbind* snmp_varbind_alloc(struct snmp_obj_id *oid, u8_t type, u8_t len) { 8035638: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 803563c: 4680 mov r8, r0 struct snmp_varbind *vb; vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 803563e: 200c movs r0, #12 return ERR_OK; } struct snmp_varbind* snmp_varbind_alloc(struct snmp_obj_id *oid, u8_t type, u8_t len) { 8035640: 4689 mov r9, r1 8035642: 4617 mov r7, r2 struct snmp_varbind *vb; vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 8035644: f7fa fa42 bl 802facc if (vb != NULL) 8035648: 4604 mov r4, r0 803564a: 2800 cmp r0, #0 803564c: d032 beq.n 80356b4 { u8_t i; vb->next = NULL; 803564e: 2300 movs r3, #0 8035650: 6003 str r3, [r0, #0] vb->prev = NULL; 8035652: 6043 str r3, [r0, #4] i = oid->len; 8035654: f898 5000 ldrb.w r5, [r8] vb->ident_len = i; 8035658: 7205 strb r5, [r0, #8] if (i > 0) 803565a: b1ad cbz r5, 8035688 { 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); 803565c: 200d movs r0, #13 803565e: f7fa fa35 bl 802facc 8035662: 4606 mov r6, r0 8035664: 60e0 str r0, [r4, #12] if (vb->ident == NULL) 8035666: b928 cbnz r0, 8035674 { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_varbind_alloc: couldn't allocate ident value space\n")); memp_free(MEMP_SNMP_VARBIND, vb); 8035668: 4621 mov r1, r4 803566a: 200c movs r0, #12 803566c: f7fa fa44 bl 802faf8 return NULL; 8035670: 4634 mov r4, r6 8035672: e01f b.n 80356b4 } while(i > 0) { i--; 8035674: 3d01 subs r5, #1 8035676: b2ed uxtb r5, r5 vb->ident[i] = oid->id[i]; 8035678: eb08 0385 add.w r3, r8, r5, lsl #2 803567c: 685b ldr r3, [r3, #4] 803567e: 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) 8035682: 2d00 cmp r5, #0 8035684: d1f6 bne.n 8035674 8035686: e000 b.n 803568a } } else { /* i == 0, pass zero length object identifier */ vb->ident = NULL; 8035688: 60c5 str r5, [r0, #12] } vb->value_type = type; 803568a: f884 9010 strb.w r9, [r4, #16] vb->value_len = len; 803568e: 7467 strb r7, [r4, #17] if (len > 0) 8035690: b17f cbz r7, 80356b2 { 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); 8035692: 200d movs r0, #13 8035694: f7fa fa1a bl 802facc 8035698: 6160 str r0, [r4, #20] if (vb->value == NULL) 803569a: b958 cbnz r0, 80356b4 { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_varbind_alloc: couldn't allocate value space\n")); if (vb->ident != NULL) 803569c: 68e1 ldr r1, [r4, #12] 803569e: b111 cbz r1, 80356a6 { memp_free(MEMP_SNMP_VALUE, vb->ident); 80356a0: 200d movs r0, #13 80356a2: f7fa fa29 bl 802faf8 } memp_free(MEMP_SNMP_VARBIND, vb); 80356a6: 4621 mov r1, r4 80356a8: 200c movs r0, #12 80356aa: f7fa fa25 bl 802faf8 return NULL; 80356ae: 2400 movs r4, #0 80356b0: e000 b.n 80356b4 } } else { /* ASN1_NUL type, or zero length ASN1_OC_STR */ vb->value = NULL; 80356b2: 6167 str r7, [r4, #20] else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_varbind_alloc: couldn't allocate varbind space\n")); } return vb; } 80356b4: 4620 mov r0, r4 80356b6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 080356ba : void snmp_varbind_free(struct snmp_varbind *vb) { if (vb->value != NULL ) 80356ba: 6941 ldr r1, [r0, #20] return vb; } void snmp_varbind_free(struct snmp_varbind *vb) { 80356bc: b510 push {r4, lr} 80356be: 4604 mov r4, r0 if (vb->value != NULL ) 80356c0: b111 cbz r1, 80356c8 { memp_free(MEMP_SNMP_VALUE, vb->value); 80356c2: 200d movs r0, #13 80356c4: f7fa fa18 bl 802faf8 } if (vb->ident != NULL ) 80356c8: 68e1 ldr r1, [r4, #12] 80356ca: b111 cbz r1, 80356d2 { memp_free(MEMP_SNMP_VALUE, vb->ident); 80356cc: 200d movs r0, #13 80356ce: f7fa fa13 bl 802faf8 } memp_free(MEMP_SNMP_VARBIND, vb); 80356d2: 200c movs r0, #12 80356d4: 4621 mov r1, r4 } 80356d6: e8bd 4010 ldmia.w sp!, {r4, lr} } if (vb->ident != NULL ) { memp_free(MEMP_SNMP_VALUE, vb->ident); } memp_free(MEMP_SNMP_VARBIND, vb); 80356da: f7fa ba0d b.w 802faf8 080356de : } void snmp_varbind_list_free(struct snmp_varbind_root *root) { 80356de: b538 push {r3, r4, r5, lr} 80356e0: 4604 mov r4, r0 struct snmp_varbind *vb, *prev; vb = root->tail; 80356e2: 6840 ldr r0, [r0, #4] while ( vb != NULL ) 80356e4: e003 b.n 80356ee { prev = vb->prev; 80356e6: 6845 ldr r5, [r0, #4] snmp_varbind_free(vb); 80356e8: f7ff ffe7 bl 80356ba vb = prev; 80356ec: 4628 mov r0, r5 snmp_varbind_list_free(struct snmp_varbind_root *root) { struct snmp_varbind *vb, *prev; vb = root->tail; while ( vb != NULL ) 80356ee: 2800 cmp r0, #0 80356f0: d1f9 bne.n 80356e6 { prev = vb->prev; snmp_varbind_free(vb); vb = prev; } root->count = 0; 80356f2: 7220 strb r0, [r4, #8] root->head = NULL; 80356f4: 6020 str r0, [r4, #0] root->tail = NULL; 80356f6: 6060 str r0, [r4, #4] 80356f8: bd38 pop {r3, r4, r5, pc} 080356fa : //snmp_coldstart_trap(); } static void snmp_error_response(struct snmp_msg_pstat *msg_ps, u8_t error) { 80356fa: b570 push {r4, r5, r6, lr} 80356fc: 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++) { 80356fe: 2200 movs r2, #0 //snmp_coldstart_trap(); } static void snmp_error_response(struct snmp_msg_pstat *msg_ps, u8_t error) { 8035700: 460e mov r6, r1 /* move names back from outvb to invb */ int v; struct snmp_varbind *vbi = msg_ps->invb.head; 8035702: f8d0 0100 ldr.w r0, [r0, #256] ; 0x100 struct snmp_varbind *vbo = msg_ps->outvb.head; 8035706: f8d4 310c ldr.w r3, [r4, #268] ; 0x10c for (v=0; vvb_idx; v++) { vbi->ident_len = vbo->ident_len; vbo->ident_len = 0; 803570a: 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++) { 803570c: e008 b.n 8035720 vbi->ident_len = vbo->ident_len; 803570e: 7a1d ldrb r5, [r3, #8] 8035710: 7205 strb r5, [r0, #8] vbo->ident_len = 0; vbi->ident = vbo->ident; 8035712: 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; 8035714: 7219 strb r1, [r3, #8] vbi->ident = vbo->ident; 8035716: 60c5 str r5, [r0, #12] vbo->ident = NULL; 8035718: 60d9 str r1, [r3, #12] vbi = vbi->next; 803571a: 6800 ldr r0, [r0, #0] vbo = vbo->next; 803571c: 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++) { 803571e: 3201 adds r2, #1 8035720: f894 50f8 ldrb.w r5, [r4, #248] ; 0xf8 8035724: 42aa cmp r2, r5 8035726: dbf2 blt.n 803570e vbo->ident = NULL; vbi = vbi->next; vbo = vbo->next; } /* free outvb */ snmp_varbind_list_free(&msg_ps->outvb); 8035728: f504 7586 add.w r5, r4, #268 ; 0x10c 803572c: 4628 mov r0, r5 803572e: f7ff ffd6 bl 80356de /* we send invb back */ msg_ps->outvb = msg_ps->invb; 8035732: f504 7380 add.w r3, r4, #256 ; 0x100 8035736: e893 0007 ldmia.w r3, {r0, r1, r2} msg_ps->invb.head = NULL; 803573a: 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; 803573c: 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; 803573e: f8c4 3100 str.w r3, [r4, #256] ; 0x100 msg_ps->invb.tail = NULL; 8035742: f8c4 3104 str.w r3, [r4, #260] ; 0x104 msg_ps->invb.count = 0; 8035746: 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; 803574a: bf18 it ne 803574c: 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; 8035750: 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; 8035752: bf18 it ne 8035754: 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; 8035756: 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; 803575a: 6163 str r3, [r4, #20] snmp_send_response(msg_ps); 803575c: 4620 mov r0, r4 803575e: f001 f879 bl 8036854 snmp_varbind_list_free(&msg_ps->outvb); 8035762: 4628 mov r0, r5 8035764: f7ff ffbb bl 80356de msg_ps->state = SNMP_MSG_EMPTY; 8035768: 2300 movs r3, #0 803576a: f884 305a strb.w r3, [r4, #90] ; 0x5a 803576e: bd70 pop {r4, r5, r6, pc} 08035770 : } static void snmp_ok_response(struct snmp_msg_pstat *msg_ps) { 8035770: b510 push {r4, lr} 8035772: 4604 mov r4, r0 err_t err_ret; err_ret = snmp_send_response(msg_ps); 8035774: f001 f86e bl 8036854 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); 8035778: f504 7080 add.w r0, r4, #256 ; 0x100 803577c: f7ff ffaf bl 80356de snmp_varbind_list_free(&msg_ps->outvb); 8035780: f504 7086 add.w r0, r4, #268 ; 0x10c 8035784: f7ff ffab bl 80356de msg_ps->state = SNMP_MSG_EMPTY; 8035788: 2300 movs r3, #0 803578a: f884 305a strb.w r3, [r4, #90] ; 0x5a 803578e: bd10 pop {r4, pc} 08035790 : } void snmp_varbind_tail_add(struct snmp_varbind_root *root, struct snmp_varbind *vb) { if (root->count == 0) 8035790: 7a03 ldrb r3, [r0, #8] 8035792: b90b cbnz r3, 8035798 { /* add first varbind to list */ root->head = vb; 8035794: 6001 str r1, [r0, #0] 8035796: e002 b.n 803579e root->tail = vb; } else { /* add nth varbind to list tail */ root->tail->next = vb; 8035798: 6843 ldr r3, [r0, #4] 803579a: 6019 str r1, [r3, #0] vb->prev = root->tail; 803579c: 604b str r3, [r1, #4] root->tail = vb; } root->count += 1; 803579e: 7a03 ldrb r3, [r0, #8] else { /* add nth varbind to list tail */ root->tail->next = vb; vb->prev = root->tail; root->tail = vb; 80357a0: 6041 str r1, [r0, #4] } root->count += 1; 80357a2: 3301 adds r3, #1 80357a4: 7203 strb r3, [r0, #8] 80357a6: 4770 bx lr 080357a8 : * * @param request_id identifies requests from 0 to (SNMP_CONCURRENT_REQUESTS-1) */ void snmp_msg_event(u8_t request_id) { 80357a8: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} struct snmp_msg_pstat *msg_ps; if (request_id < SNMP_CONCURRENT_REQUESTS) 80357ac: 4605 mov r5, r0 * * @param request_id identifies requests from 0 to (SNMP_CONCURRENT_REQUESTS-1) */ void snmp_msg_event(u8_t request_id) { 80357ae: b0a7 sub sp, #156 ; 0x9c struct snmp_msg_pstat *msg_ps; if (request_id < SNMP_CONCURRENT_REQUESTS) 80357b0: 2800 cmp r0, #0 80357b2: f040 8390 bne.w 8035ed6 { msg_ps = &msg_input_list[request_id]; if (msg_ps->rt == SNMP_ASN1_PDU_GET_NEXT_REQ) 80357b6: 4cb2 ldr r4, [pc, #712] ; (8035a80 ) 80357b8: 7aa6 ldrb r6, [r4, #10] 80357ba: 2e01 cmp r6, #1 80357bc: f040 80d4 bne.w 8035968 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) 80357c0: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 80357c4: 2b07 cmp r3, #7 80357c6: d125 bne.n 8035814 /* 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); 80357c8: 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; 80357cc: 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); 80357d0: eb04 0282 add.w r2, r4, r2, lsl #2 80357d4: 4631 mov r1, r6 80357d6: 3274 adds r2, #116 ; 0x74 80357d8: f104 0368 add.w r3, r4, #104 ; 0x68 80357dc: f8d8 7038 ldr.w r7, [r8, #56] ; 0x38 80357e0: 47b8 blx r7 if (msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) 80357e2: f894 0068 ldrb.w r0, [r4, #104] ; 0x68 80357e6: b148 cbz r0, 80357fc { msg_ps->state = SNMP_MSG_EXTERNAL_GET_VALUE; 80357e8: 2308 movs r3, #8 80357ea: f884 305a strb.w r3, [r4, #90] ; 0x5a en->get_value_q(request_id, &msg_ps->ext_object_def); 80357ee: f8d8 302c ldr.w r3, [r8, #44] ; 0x2c 80357f2: 4628 mov r0, r5 80357f4: f104 0168 add.w r1, r4, #104 ; 0x68 80357f8: 4798 blx r3 80357fa: e0a6 b.n 803594a } else { en->get_object_def_pc(request_id, 1, &msg_ps->ext_oid.id[msg_ps->ext_oid.len - 1]); 80357fc: f894 2074 ldrb.w r2, [r4, #116] ; 0x74 8035800: f8d8 3048 ldr.w r3, [r8, #72] ; 0x48 8035804: eb04 0282 add.w r2, r4, r2, lsl #2 8035808: 4631 mov r1, r6 803580a: 3274 adds r2, #116 ; 0x74 803580c: 4798 blx r3 /* search failed, object id points to unknown object (nosuchname) */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 803580e: 4620 mov r0, r4 8035810: 2102 movs r1, #2 8035812: e02a b.n 803586a } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_VALUE) 8035814: 2b08 cmp r3, #8 8035816: f040 8098 bne.w 803594a /* 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, 803581a: f104 0074 add.w r0, r4, #116 ; 0x74 803581e: f894 106a ldrb.w r1, [r4, #106] ; 0x6a 8035822: 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; 8035826: 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, 803582a: f7ff ff05 bl 8035638 msg_ps->ext_object_def.asn_type, (u8_t)msg_ps->ext_object_def.v_len); if (vb != NULL) 803582e: 4607 mov r7, r0 8035830: b1a0 cbz r0, 803585c { en->get_value_a(request_id, &msg_ps->ext_object_def, vb->value_len, vb->value); 8035832: 697b ldr r3, [r7, #20] 8035834: f8d8 c03c ldr.w ip, [r8, #60] ; 0x3c 8035838: 7c7a ldrb r2, [r7, #17] 803583a: 4628 mov r0, r5 803583c: f104 0168 add.w r1, r4, #104 ; 0x68 8035840: 47e0 blx ip snmp_varbind_tail_add(&msg_ps->outvb, vb); 8035842: f504 7086 add.w r0, r4, #268 ; 0x10c 8035846: 4639 mov r1, r7 8035848: f7ff ffa2 bl 8035790 msg_ps->state = SNMP_MSG_SEARCH_OBJ; msg_ps->vb_idx += 1; 803584c: 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; 8035850: f884 605a strb.w r6, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8035854: 3301 adds r3, #1 8035856: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 803585a: e076 b.n 803594a } else { en->get_value_pc(request_id, &msg_ps->ext_object_def); 803585c: f104 0168 add.w r1, r4, #104 ; 0x68 8035860: f8d8 304c ldr.w r3, [r8, #76] ; 0x4c 8035864: 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); 8035866: 4620 mov r0, r4 8035868: 4631 mov r1, r6 803586a: f7ff ff46 bl 80356fa 803586e: e06c b.n 803594a (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_obj_id oid; if (msg_ps->vb_idx == 0) 8035870: b913 cbnz r3, 8035878 { msg_ps->vb_ptr = msg_ps->invb.head; 8035872: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 8035876: e002 b.n 803587e } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 8035878: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 803587c: 681b ldr r3, [r3, #0] 803587e: 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)) 8035882: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035886: aa05 add r2, sp, #20 8035888: 7a18 ldrb r0, [r3, #8] 803588a: 68d9 ldr r1, [r3, #12] 803588c: f7ff fe82 bl 8035594 8035890: 2800 cmp r0, #0 8035892: f000 82ff beq.w 8035e94 { if (msg_ps->vb_ptr->ident_len > 3) 8035896: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 803589a: 7a19 ldrb r1, [r3, #8] 803589c: 2903 cmp r1, #3 803589e: d905 bls.n 80358ac { /* can offset ident_len and ident */ mn = snmp_expand_tree((struct mib_node*)&internet, 80358a0: 68da ldr r2, [r3, #12] 80358a2: 4878 ldr r0, [pc, #480] ; (8035a84 ) 80358a4: 3904 subs r1, #4 80358a6: b2c9 uxtb r1, r1 80358a8: 3210 adds r2, #16 80358aa: e002 b.n 80358b2 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); 80358ac: 2100 movs r1, #0 80358ae: 4875 ldr r0, [pc, #468] ; (8035a84 ) 80358b0: 460a mov r2, r1 80358b2: ab05 add r3, sp, #20 80358b4: f7ff fc8e bl 80351d4 80358b8: 4605 mov r5, r0 } else { mn = NULL; } if (mn != NULL) 80358ba: 2800 cmp r0, #0 80358bc: f000 82ea beq.w 8035e94 { if (mn->node_type == MIB_NODE_EX) 80358c0: 7c03 ldrb r3, [r0, #16] 80358c2: 2b05 cmp r3, #5 80358c4: d113 bne.n 80358ee { /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; 80358c6: 2307 movs r3, #7 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; 80358c8: 65e0 str r0, [r4, #92] ; 0x5c msg_ps->ext_oid = oid; 80358ca: a905 add r1, sp, #20 80358cc: 2284 movs r2, #132 ; 0x84 80358ce: 486e ldr r0, [pc, #440] ; (8035a88 ) 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; 80358d0: 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; 80358d4: f7ec f85a bl 802198c en->get_object_def_q(en->addr_inf, request_id, 1, &oid.id[oid.len - 1]); 80358d8: f89d 3014 ldrb.w r3, [sp, #20] 80358dc: 6aae ldr r6, [r5, #40] ; 0x28 80358de: 6968 ldr r0, [r5, #20] 80358e0: ad05 add r5, sp, #20 80358e2: 2100 movs r1, #0 80358e4: 2201 movs r2, #1 80358e6: eb05 0383 add.w r3, r5, r3, lsl #2 80358ea: 47b0 blx r6 80358ec: e02e b.n 803594c { /* internal object */ struct obj_def object_def; struct snmp_varbind *vb; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; 80358ee: 2302 movs r3, #2 mn->get_object_def(1, &oid.id[oid.len - 1], &object_def); 80358f0: 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; 80358f4: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_object_def(1, &oid.id[oid.len - 1], &object_def); 80358f8: af05 add r7, sp, #20 80358fa: 6803 ldr r3, [r0, #0] 80358fc: eb07 0181 add.w r1, r7, r1, lsl #2 8035900: 2001 movs r0, #1 8035902: aa02 add r2, sp, #8 8035904: 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); 8035906: a805 add r0, sp, #20 8035908: f89d 100a ldrb.w r1, [sp, #10] 803590c: f89d 200c ldrb.w r2, [sp, #12] 8035910: f7ff fe92 bl 8035638 if (vb != NULL) 8035914: 4606 mov r6, r0 8035916: b1a8 cbz r0, 8035944 { msg_ps->state = SNMP_MSG_INTERNAL_GET_VALUE; 8035918: 2303 movs r3, #3 803591a: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_value(&object_def, object_def.v_len, vb->value); 803591e: 686b ldr r3, [r5, #4] 8035920: f8bd 100c ldrh.w r1, [sp, #12] 8035924: 6972 ldr r2, [r6, #20] 8035926: a802 add r0, sp, #8 8035928: 4798 blx r3 snmp_varbind_tail_add(&msg_ps->outvb, vb); 803592a: 4858 ldr r0, [pc, #352] ; (8035a8c ) 803592c: 4631 mov r1, r6 803592e: f7ff ff2f bl 8035790 msg_ps->state = SNMP_MSG_SEARCH_OBJ; 8035932: 2301 movs r3, #1 8035934: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8035938: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 803593c: 3301 adds r3, #1 803593e: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8035942: e003 b.n 803594c } else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_recv couldn't allocate outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); 8035944: 484e ldr r0, [pc, #312] ; (8035a80 ) 8035946: 2101 movs r1, #1 8035948: e2a6 b.n 8035e98 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) && 803594a: 4c4d ldr r4, [pc, #308] ; (8035a80 ) 803594c: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 8035950: 2b01 cmp r3, #1 8035952: f040 82c0 bne.w 8035ed6 (msg_ps->vb_idx < msg_ps->invb.count)) 8035956: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 803595a: 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) && 803595e: 4293 cmp r3, r2 8035960: d386 bcc.n 8035870 8035962: e2a7 b.n 8035eb4 } } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && (msg_ps->vb_idx == msg_ps->invb.count)) { snmp_ok_response(msg_ps); 8035964: 4846 ldr r0, [pc, #280] ; (8035a80 ) 8035966: e292 b.n 8035e8e 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) 8035968: 2e00 cmp r6, #0 803596a: f040 8126 bne.w 8035bba 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) 803596e: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 8035972: 2b07 cmp r3, #7 8035974: d122 bne.n 80359bc { struct mib_external_node *en; struct snmp_name_ptr np; /* get_object_def() answer*/ en = msg_ps->ext_mib_node; 8035976: 6de5 ldr r5, [r4, #92] ; 0x5c np = msg_ps->ext_name_ptr; 8035978: f894 9060 ldrb.w r9, [r4, #96] ; 0x60 803597c: 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); 8035980: 6baf ldr r7, [r5, #56] ; 0x38 8035982: f104 0368 add.w r3, r4, #104 ; 0x68 8035986: 4649 mov r1, r9 8035988: 4642 mov r2, r8 803598a: 47b8 blx r7 if ((msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) && 803598c: f894 3068 ldrb.w r3, [r4, #104] ; 0x68 8035990: b163 cbz r3, 80359ac (msg_ps->ext_object_def.access & MIB_ACCESS_READ)) 8035992: 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) && 8035996: 07da lsls r2, r3, #31 8035998: d508 bpl.n 80359ac (msg_ps->ext_object_def.access & MIB_ACCESS_READ)) { msg_ps->state = SNMP_MSG_EXTERNAL_GET_VALUE; 803599a: 2308 movs r3, #8 803599c: f884 305a strb.w r3, [r4, #90] ; 0x5a en->get_value_q(request_id, &msg_ps->ext_object_def); 80359a0: 6aeb ldr r3, [r5, #44] ; 0x2c 80359a2: 4630 mov r0, r6 80359a4: f104 0168 add.w r1, r4, #104 ; 0x68 80359a8: 4798 blx r3 80359aa: e0f7 b.n 8035b9c } else { en->get_object_def_pc(request_id, np.ident_len, np.ident); 80359ac: 2000 movs r0, #0 80359ae: 4649 mov r1, r9 80359b0: 6cab ldr r3, [r5, #72] ; 0x48 80359b2: 4642 mov r2, r8 80359b4: 4798 blx r3 /* search failed, object id points to unknown object (nosuchname) */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 80359b6: 4832 ldr r0, [pc, #200] ; (8035a80 ) 80359b8: 2102 movs r1, #2 80359ba: e059 b.n 8035a70 } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_VALUE) 80359bc: 2b08 cmp r3, #8 80359be: f040 80ed bne.w 8035b9c /* get_value() answer */ en = msg_ps->ext_mib_node; /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 80359c2: 200c movs r0, #12 { struct mib_external_node *en; struct snmp_varbind *vb; /* get_value() answer */ en = msg_ps->ext_mib_node; 80359c4: f8d4 805c ldr.w r8, [r4, #92] ; 0x5c /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 80359c8: f7fa f880 bl 802facc if (vb != NULL) 80359cc: 4605 mov r5, r0 80359ce: 2800 cmp r0, #0 80359d0: d047 beq.n 8035a62 { vb->next = NULL; 80359d2: 6006 str r6, [r0, #0] vb->prev = NULL; 80359d4: 6046 str r6, [r0, #4] /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 80359d6: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80359da: 68da ldr r2, [r3, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 80359dc: 7a1b ldrb r3, [r3, #8] { vb->next = NULL; vb->prev = NULL; /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 80359de: 60c2 str r2, [r0, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 80359e0: 7203 strb r3, [r0, #8] /* ensure this memory is refereced once only */ msg_ps->vb_ptr->ident = NULL; 80359e2: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc msg_ps->vb_ptr->ident_len = 0; 80359e6: 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; 80359e8: 60de str r6, [r3, #12] msg_ps->vb_ptr->ident_len = 0; vb->value_type = msg_ps->ext_object_def.asn_type; 80359ea: f894 306a ldrb.w r3, [r4, #106] ; 0x6a 80359ee: 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; 80359f0: f894 706c ldrb.w r7, [r4, #108] ; 0x6c 80359f4: 7447 strb r7, [r0, #17] if (vb->value_len > 0) 80359f6: b1ef cbz r7, 8035a34 { 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); 80359f8: 200d movs r0, #13 80359fa: f7fa f867 bl 802facc 80359fe: 4603 mov r3, r0 8035a00: 6168 str r0, [r5, #20] if (vb->value != NULL) 8035a02: b138 cbz r0, 8035a14 { en->get_value_a(request_id, &msg_ps->ext_object_def, vb->value_len, vb->value); 8035a04: f8d8 703c ldr.w r7, [r8, #60] ; 0x3c 8035a08: 7c6a ldrb r2, [r5, #17] 8035a0a: 4630 mov r0, r6 8035a0c: f104 0168 add.w r1, r4, #104 ; 0x68 8035a10: 47b8 blx r7 8035a12: e018 b.n 8035a46 msg_ps->state = SNMP_MSG_SEARCH_OBJ; msg_ps->vb_idx += 1; } else { en->get_value_pc(request_id, &msg_ps->ext_object_def); 8035a14: f8d8 304c ldr.w r3, [r8, #76] ; 0x4c 8035a18: f104 0168 add.w r1, r4, #104 ; 0x68 8035a1c: 4798 blx r3 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: no variable space\n")); msg_ps->vb_ptr->ident = vb->ident; 8035a1e: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035a22: 68ea ldr r2, [r5, #12] 8035a24: 60da str r2, [r3, #12] msg_ps->vb_ptr->ident_len = vb->ident_len; 8035a26: 7a2a ldrb r2, [r5, #8] memp_free(MEMP_SNMP_VARBIND, vb); 8035a28: 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; 8035a2a: 721a strb r2, [r3, #8] memp_free(MEMP_SNMP_VARBIND, vb); 8035a2c: 4629 mov r1, r5 8035a2e: f7fa f863 bl 802faf8 8035a32: e01b b.n 8035a6c } } else { /* vb->value_len == 0, empty value (e.g. empty string) */ en->get_value_a(request_id, &msg_ps->ext_object_def, 0, NULL); 8035a34: f8d8 603c ldr.w r6, [r8, #60] ; 0x3c 8035a38: 4638 mov r0, r7 8035a3a: f104 0168 add.w r1, r4, #104 ; 0x68 8035a3e: 463a mov r2, r7 8035a40: 463b mov r3, r7 8035a42: 47b0 blx r6 vb->value = NULL; 8035a44: 616f str r7, [r5, #20] snmp_varbind_tail_add(&msg_ps->outvb, vb); 8035a46: f504 7086 add.w r0, r4, #268 ; 0x10c 8035a4a: 4629 mov r1, r5 8035a4c: f7ff fea0 bl 8035790 /* search again (if vb_idx < msg_ps->invb.count) */ msg_ps->state = SNMP_MSG_SEARCH_OBJ; 8035a50: 2301 movs r3, #1 8035a52: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8035a56: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035a5a: 3301 adds r3, #1 8035a5c: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8035a60: e09c b.n 8035b9c } } else { en->get_value_pc(request_id, &msg_ps->ext_object_def); 8035a62: f8d8 304c ldr.w r3, [r8, #76] ; 0x4c 8035a66: f104 0168 add.w r1, r4, #104 ; 0x68 8035a6a: 4798 blx r3 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: no outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); 8035a6c: 4620 mov r0, r4 8035a6e: 2101 movs r1, #1 8035a70: f7ff fe43 bl 80356fa 8035a74: e092 b.n 8035b9c (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_name_ptr np; if (msg_ps->vb_idx == 0) 8035a76: b95b cbnz r3, 8035a90 { msg_ps->vb_ptr = msg_ps->invb.head; 8035a78: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 8035a7c: e00b b.n 8035a96 8035a7e: bf00 nop 8035a80: 2000f6ec .word 0x2000f6ec 8035a84: 08045670 .word 0x08045670 8035a88: 2000f760 .word 0x2000f760 8035a8c: 2000f7f8 .word 0x2000f7f8 } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 8035a90: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035a94: 681b ldr r3, [r3, #0] 8035a96: 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)) 8035a9a: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035a9e: 7a18 ldrb r0, [r3, #8] 8035aa0: 68d9 ldr r1, [r3, #12] 8035aa2: f7ff fd65 bl 8035570 8035aa6: 2800 cmp r0, #0 8035aa8: d073 beq.n 8035b92 { mn = snmp_search_tree((struct mib_node*)&internet, msg_ps->vb_ptr->ident_len - 4, 8035aaa: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035aae: 48a6 ldr r0, [pc, #664] ; (8035d48 ) 8035ab0: 7a19 ldrb r1, [r3, #8] 8035ab2: 68da ldr r2, [r3, #12] 8035ab4: 3904 subs r1, #4 8035ab6: b2c9 uxtb r1, r1 8035ab8: 3210 adds r2, #16 8035aba: 466b mov r3, sp 8035abc: f7ff fb0a bl 80350d4 msg_ps->vb_ptr->ident + 4, &np); if (mn != NULL) 8035ac0: 4606 mov r6, r0 8035ac2: 2800 cmp r0, #0 8035ac4: d065 beq.n 8035b92 { if (mn->node_type == MIB_NODE_EX) 8035ac6: 7c03 ldrb r3, [r0, #16] 8035ac8: 2b05 cmp r3, #5 8035aca: d110 bne.n 8035aee /* 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; 8035acc: 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; 8035ace: 2307 movs r3, #7 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 8035ad0: 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; 8035ad4: 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; 8035ad8: 4b9c ldr r3, [pc, #624] ; (8035d4c ) en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 8035ada: 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; 8035ade: e883 0003 stmia.w r3, {r0, r1} en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 8035ae2: 2100 movs r1, #0 8035ae4: 6ab5 ldr r5, [r6, #40] ; 0x28 8035ae6: 6970 ldr r0, [r6, #20] 8035ae8: 9b01 ldr r3, [sp, #4] 8035aea: 47a8 blx r5 8035aec: e058 b.n 8035ba0 else { /* internal object */ struct obj_def object_def; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; 8035aee: 2302 movs r3, #2 8035af0: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_object_def(np.ident_len, np.ident, &object_def); 8035af4: 6803 ldr r3, [r0, #0] 8035af6: 9901 ldr r1, [sp, #4] 8035af8: f89d 0000 ldrb.w r0, [sp] 8035afc: aa02 add r2, sp, #8 8035afe: 4798 blx r3 if ((object_def.instance != MIB_OBJECT_NONE) && 8035b00: f89d 3008 ldrb.w r3, [sp, #8] 8035b04: 2b00 cmp r3, #0 8035b06: d044 beq.n 8035b92 (object_def.access & MIB_ACCESS_READ)) 8035b08: 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) && 8035b0c: 07db lsls r3, r3, #31 8035b0e: f100 81c6 bmi.w 8035e9e 8035b12: e03e b.n 8035b92 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; 8035b14: 2200 movs r2, #0 8035b16: 602a str r2, [r5, #0] vb->prev = NULL; 8035b18: 606a str r2, [r5, #4] /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 8035b1a: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035b1e: 68d9 ldr r1, [r3, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 8035b20: 7a1b ldrb r3, [r3, #8] { vb->next = NULL; vb->prev = NULL; /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 8035b22: 60e9 str r1, [r5, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 8035b24: 722b strb r3, [r5, #8] /* ensure this memory is refereced once only */ msg_ps->vb_ptr->ident = NULL; 8035b26: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc msg_ps->vb_ptr->ident_len = 0; 8035b2a: 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; 8035b2c: 60da str r2, [r3, #12] msg_ps->vb_ptr->ident_len = 0; vb->value_type = object_def.asn_type; 8035b2e: f89d 300a ldrb.w r3, [sp, #10] 8035b32: 742b strb r3, [r5, #16] LWIP_ASSERT("invalid length", object_def.v_len <= 0xff); vb->value_len = (u8_t)object_def.v_len; 8035b34: f89d 300c ldrb.w r3, [sp, #12] 8035b38: 746b strb r3, [r5, #17] if (vb->value_len > 0) 8035b3a: b1bb cbz r3, 8035b6c { 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); 8035b3c: 200d movs r0, #13 8035b3e: f7f9 ffc5 bl 802facc 8035b42: 4602 mov r2, r0 8035b44: 6168 str r0, [r5, #20] if (vb->value != NULL) 8035b46: b120 cbz r0, 8035b52 { mn->get_value(&object_def, vb->value_len, vb->value); 8035b48: 6877 ldr r7, [r6, #4] 8035b4a: 7c69 ldrb r1, [r5, #17] 8035b4c: a802 add r0, sp, #8 8035b4e: 47b8 blx r7 8035b50: e00d b.n 8035b6e 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; 8035b52: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035b56: 68e9 ldr r1, [r5, #12] 8035b58: 60d9 str r1, [r3, #12] msg_ps->vb_ptr->ident_len = vb->ident_len; 8035b5a: 7a29 ldrb r1, [r5, #8] vb->ident = NULL; 8035b5c: 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; 8035b5e: 7219 strb r1, [r3, #8] vb->ident = NULL; vb->ident_len = 0; 8035b60: 7228 strb r0, [r5, #8] memp_free(MEMP_SNMP_VARBIND, vb); 8035b62: 4629 mov r1, r5 8035b64: 200c movs r0, #12 8035b66: f7f9 ffc7 bl 802faf8 8035b6a: e00d b.n 8035b88 } } else { /* vb->value_len == 0, empty value (e.g. empty string) */ vb->value = NULL; 8035b6c: 616b str r3, [r5, #20] snmp_varbind_tail_add(&msg_ps->outvb, vb); 8035b6e: 4878 ldr r0, [pc, #480] ; (8035d50 ) 8035b70: 4629 mov r1, r5 8035b72: f7ff fe0d bl 8035790 msg_ps->state = SNMP_MSG_SEARCH_OBJ; 8035b76: 2301 movs r3, #1 8035b78: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8035b7c: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035b80: 3301 adds r3, #1 8035b82: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8035b86: e003 b.n 8035b90 } } else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: couldn't allocate outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); 8035b88: 4872 ldr r0, [pc, #456] ; (8035d54 ) 8035b8a: 2101 movs r1, #1 8035b8c: f7ff fdb5 bl 80356fa } else { mn = NULL; } if (mn == NULL) 8035b90: b936 cbnz r6, 8035ba0 { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 8035b92: 4870 ldr r0, [pc, #448] ; (8035d54 ) 8035b94: 2102 movs r1, #2 8035b96: f7ff fdb0 bl 80356fa 8035b9a: e001 b.n 8035ba0 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) && 8035b9c: 4c6d ldr r4, [pc, #436] ; (8035d54 ) 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, 8035b9e: 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) && 8035ba0: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 8035ba4: 2b01 cmp r3, #1 8035ba6: f040 8196 bne.w 8035ed6 (msg_ps->vb_idx < msg_ps->invb.count)) 8035baa: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035bae: 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) && 8035bb2: 4293 cmp r3, r2 8035bb4: f4ff af5f bcc.w 8035a76 8035bb8: e17c b.n 8035eb4 } 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) 8035bba: 2e03 cmp r6, #3 8035bbc: f040 818b bne.w 8035ed6 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) 8035bc0: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 8035bc4: 2b07 cmp r3, #7 8035bc6: d11b bne.n 8035c00 { struct mib_external_node *en; struct snmp_name_ptr np; /* get_object_def() answer*/ en = msg_ps->ext_mib_node; 8035bc8: 6de6 ldr r6, [r4, #92] ; 0x5c np = msg_ps->ext_name_ptr; 8035bca: f894 9060 ldrb.w r9, [r4, #96] ; 0x60 8035bce: 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); 8035bd2: 6bb7 ldr r7, [r6, #56] ; 0x38 8035bd4: 4649 mov r1, r9 8035bd6: 4642 mov r2, r8 8035bd8: f104 0368 add.w r3, r4, #104 ; 0x68 8035bdc: 47b8 blx r7 if (msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) 8035bde: f894 0068 ldrb.w r0, [r4, #104] ; 0x68 8035be2: b140 cbz r0, 8035bf6 { msg_ps->state = SNMP_MSG_EXTERNAL_SET_TEST; 8035be4: 2309 movs r3, #9 8035be6: f884 305a strb.w r3, [r4, #90] ; 0x5a en->set_test_q(request_id, &msg_ps->ext_object_def); 8035bea: 6b33 ldr r3, [r6, #48] ; 0x30 8035bec: 4628 mov r0, r5 8035bee: f104 0168 add.w r1, r4, #104 ; 0x68 8035bf2: 4798 blx r3 8035bf4: e0d5 b.n 8035da2 } else { en->get_object_def_pc(request_id, np.ident_len, np.ident); 8035bf6: 6cb3 ldr r3, [r6, #72] ; 0x48 8035bf8: 4649 mov r1, r9 8035bfa: 4642 mov r2, r8 8035bfc: 4798 blx r3 8035bfe: e023 b.n 8035c48 /* 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) 8035c00: 2b09 cmp r3, #9 8035c02: d124 bne.n 8035c4e struct mib_external_node *en; /* set_test() answer*/ en = msg_ps->ext_mib_node; if (msg_ps->ext_object_def.access & MIB_ACCESS_WRITE) 8035c04: 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; 8035c08: 6de5 ldr r5, [r4, #92] ; 0x5c if (msg_ps->ext_object_def.access & MIB_ACCESS_WRITE) 8035c0a: f003 0302 and.w r3, r3, #2 8035c0e: b2db uxtb r3, r3 8035c10: b1b3 cbz r3, 8035c40 { if ((msg_ps->ext_object_def.asn_type == msg_ps->vb_ptr->value_type) && 8035c12: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035c16: f894 106a ldrb.w r1, [r4, #106] ; 0x6a 8035c1a: 7c1a ldrb r2, [r3, #16] 8035c1c: 4291 cmp r1, r2 8035c1e: d108 bne.n 8035c32 (en->set_test_a(request_id,&msg_ps->ext_object_def, 8035c20: 7c5a ldrb r2, [r3, #17] 8035c22: 6c2e ldr r6, [r5, #64] ; 0x40 8035c24: 695b ldr r3, [r3, #20] 8035c26: f104 0168 add.w r1, r4, #104 ; 0x68 8035c2a: 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) && 8035c2c: b108 cbz r0, 8035c32 (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; 8035c2e: 2301 movs r3, #1 8035c30: e040 b.n 8035cb4 msg_ps->vb_idx += 1; } else { en->set_test_pc(request_id,&msg_ps->ext_object_def); 8035c32: 2000 movs r0, #0 8035c34: 4948 ldr r1, [pc, #288] ; (8035d58 ) 8035c36: 6d2b ldr r3, [r5, #80] ; 0x50 8035c38: 4798 blx r3 /* bad value */ snmp_error_response(msg_ps,SNMP_ES_BADVALUE); 8035c3a: 4846 ldr r0, [pc, #280] ; (8035d54 ) 8035c3c: 2103 movs r1, #3 8035c3e: e029 b.n 8035c94 } } else { en->set_test_pc(request_id,&msg_ps->ext_object_def); 8035c40: 6d2b ldr r3, [r5, #80] ; 0x50 8035c42: f104 0168 add.w r1, r4, #104 ; 0x68 8035c46: 4798 blx r3 /* object not available for set */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 8035c48: 4620 mov r0, r4 8035c4a: 2102 movs r1, #2 8035c4c: e022 b.n 8035c94 } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_OBJDEF_S) 8035c4e: 2b0a cmp r3, #10 8035c50: d123 bne.n 8035c9a { struct mib_external_node *en; struct snmp_name_ptr np; /* get_object_def() answer*/ en = msg_ps->ext_mib_node; 8035c52: 6de6 ldr r6, [r4, #92] ; 0x5c np = msg_ps->ext_name_ptr; 8035c54: f894 9060 ldrb.w r9, [r4, #96] ; 0x60 8035c58: 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); 8035c5c: 6bb7 ldr r7, [r6, #56] ; 0x38 8035c5e: 4649 mov r1, r9 8035c60: 4642 mov r2, r8 8035c62: f104 0368 add.w r3, r4, #104 ; 0x68 8035c66: 47b8 blx r7 if (msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) 8035c68: f894 0068 ldrb.w r0, [r4, #104] ; 0x68 8035c6c: b160 cbz r0, 8035c88 { msg_ps->state = SNMP_MSG_EXTERNAL_SET_VALUE; 8035c6e: 230b movs r3, #11 8035c70: 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); 8035c74: 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, 8035c78: 6b76 ldr r6, [r6, #52] ; 0x34 8035c7a: 7c5a ldrb r2, [r3, #17] 8035c7c: 695b ldr r3, [r3, #20] 8035c7e: 4628 mov r0, r5 8035c80: f104 0168 add.w r1, r4, #104 ; 0x68 8035c84: 47b0 blx r6 8035c86: e08c b.n 8035da2 msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value); } else { en->get_object_def_pc(request_id, np.ident_len, np.ident); 8035c88: 4649 mov r1, r9 8035c8a: 6cb3 ldr r3, [r6, #72] ; 0x48 8035c8c: 4642 mov r2, r8 8035c8e: 4798 blx r3 /* set_value failed, object has disappeared for some odd reason?? */ snmp_error_response(msg_ps,SNMP_ES_GENERROR); 8035c90: 4620 mov r0, r4 8035c92: 2105 movs r1, #5 8035c94: f7ff fd31 bl 80356fa 8035c98: e083 b.n 8035da2 } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_SET_VALUE) 8035c9a: 2b0b cmp r3, #11 8035c9c: f040 8081 bne.w 8035da2 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); 8035ca0: 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, 8035ca4: 6de2 ldr r2, [r4, #92] ; 0x5c 8035ca6: f104 0168 add.w r1, r4, #104 ; 0x68 8035caa: 6c55 ldr r5, [r2, #68] ; 0x44 8035cac: 7c5a ldrb r2, [r3, #17] 8035cae: 695b ldr r3, [r3, #20] 8035cb0: 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; 8035cb2: 2306 movs r3, #6 8035cb4: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8035cb8: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035cbc: 3301 adds r3, #1 8035cbe: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8035cc2: e06e b.n 8035da2 (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_name_ptr np; if (msg_ps->vb_idx == 0) 8035cc4: b912 cbnz r2, 8035ccc { msg_ps->vb_ptr = msg_ps->invb.head; 8035cc6: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 8035cca: e002 b.n 8035cd2 } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 8035ccc: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035cd0: 681b ldr r3, [r3, #0] 8035cd2: 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)) 8035cd6: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035cda: 7a18 ldrb r0, [r3, #8] 8035cdc: 68d9 ldr r1, [r3, #12] 8035cde: f7ff fc47 bl 8035570 8035ce2: 2800 cmp r0, #0 8035ce4: d058 beq.n 8035d98 { mn = snmp_search_tree((struct mib_node*)&internet, msg_ps->vb_ptr->ident_len - 4, 8035ce6: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035cea: 4817 ldr r0, [pc, #92] ; (8035d48 ) 8035cec: 7a19 ldrb r1, [r3, #8] 8035cee: 68da ldr r2, [r3, #12] 8035cf0: 3904 subs r1, #4 8035cf2: b2c9 uxtb r1, r1 8035cf4: 3210 adds r2, #16 8035cf6: 466b mov r3, sp 8035cf8: f7ff f9ec bl 80350d4 msg_ps->vb_ptr->ident + 4, &np); if (mn != NULL) 8035cfc: 4605 mov r5, r0 8035cfe: 2800 cmp r0, #0 8035d00: d04a beq.n 8035d98 { if (mn->node_type == MIB_NODE_EX) 8035d02: 7c03 ldrb r3, [r0, #16] 8035d04: 2b05 cmp r3, #5 8035d06: d110 bne.n 8035d2a /* 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; 8035d08: 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; 8035d0a: 2307 movs r3, #7 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 8035d0c: 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; 8035d10: 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; 8035d14: 4b0d ldr r3, [pc, #52] ; (8035d4c ) en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 8035d16: 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; 8035d1a: e883 0003 stmia.w r3, {r0, r1} en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 8035d1e: 2100 movs r1, #0 8035d20: 6aaf ldr r7, [r5, #40] ; 0x28 8035d22: 6968 ldr r0, [r5, #20] 8035d24: 9b01 ldr r3, [sp, #4] 8035d26: 47b8 blx r7 8035d28: e03d b.n 8035da6 else { /* internal object */ struct obj_def object_def; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; 8035d2a: 2702 movs r7, #2 8035d2c: f884 705a strb.w r7, [r4, #90] ; 0x5a mn->get_object_def(np.ident_len, np.ident, &object_def); 8035d30: 6803 ldr r3, [r0, #0] 8035d32: 9901 ldr r1, [sp, #4] 8035d34: f89d 0000 ldrb.w r0, [sp] 8035d38: aa02 add r2, sp, #8 8035d3a: 4798 blx r3 if (object_def.instance != MIB_OBJECT_NONE) 8035d3c: f89d 3008 ldrb.w r3, [sp, #8] 8035d40: 2b00 cmp r3, #0 8035d42: f040 80b9 bne.w 8035eb8 8035d46: e027 b.n 8035d98 8035d48: 08045670 .word 0x08045670 8035d4c: 2000f74c .word 0x2000f74c 8035d50: 2000f7f8 .word 0x2000f7f8 8035d54: 2000f6ec .word 0x2000f6ec 8035d58: 2000f754 .word 0x2000f754 { 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) && 8035d5c: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035d60: f89d 100a ldrb.w r1, [sp, #10] 8035d64: 7c1a ldrb r2, [r3, #16] 8035d66: 4291 cmp r1, r2 8035d68: d10e bne.n 8035d88 (mn->set_test(&object_def,msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value) != 0)) 8035d6a: 68af ldr r7, [r5, #8] 8035d6c: 7c59 ldrb r1, [r3, #17] 8035d6e: 695a ldr r2, [r3, #20] 8035d70: a802 add r0, sp, #8 8035d72: 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) && 8035d74: b140 cbz r0, 8035d88 (mn->set_test(&object_def,msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value) != 0)) { msg_ps->state = SNMP_MSG_SEARCH_OBJ; 8035d76: 2301 movs r3, #1 8035d78: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8035d7c: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035d80: 3301 adds r3, #1 8035d82: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8035d86: e006 b.n 8035d96 } else { /* bad value */ snmp_error_response(msg_ps,SNMP_ES_BADVALUE); 8035d88: 4854 ldr r0, [pc, #336] ; (8035edc ) 8035d8a: 2103 movs r1, #3 8035d8c: e001 b.n 8035d92 } } else { /* object not available for set */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 8035d8e: 4853 ldr r0, [pc, #332] ; (8035edc ) 8035d90: 4639 mov r1, r7 8035d92: f7ff fcb2 bl 80356fa } else { mn = NULL; } if (mn == NULL) 8035d96: b935 cbnz r5, 8035da6 { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 8035d98: 4850 ldr r0, [pc, #320] ; (8035edc ) 8035d9a: 2102 movs r1, #2 8035d9c: f7ff fcad bl 80356fa 8035da0: e001 b.n 8035da6 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) && 8035da2: 4c4e ldr r4, [pc, #312] ; (8035edc ) 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, 8035da4: 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) && 8035da6: f894 205a ldrb.w r2, [r4, #90] ; 0x5a 8035daa: 4b4c ldr r3, [pc, #304] ; (8035edc ) 8035dac: 2a01 cmp r2, #1 8035dae: d151 bne.n 8035e54 (msg_ps->vb_idx < msg_ps->invb.count)) 8035db0: f894 20f8 ldrb.w r2, [r4, #248] ; 0xf8 8035db4: 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) && 8035db8: 428a cmp r2, r1 8035dba: d383 bcc.n 8035cc4 8035dbc: e088 b.n 8035ed0 } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && (msg_ps->vb_idx == msg_ps->invb.count)) { msg_ps->vb_idx = 0; 8035dbe: 2200 movs r2, #0 8035dc0: f883 20f8 strb.w r2, [r3, #248] ; 0xf8 msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; 8035dc4: 2206 movs r2, #6 8035dc6: f883 205a strb.w r2, [r3, #90] ; 0x5a 8035dca: e043 b.n 8035e54 (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_name_ptr np; if (msg_ps->vb_idx == 0) 8035dcc: b913 cbnz r3, 8035dd4 { msg_ps->vb_ptr = msg_ps->invb.head; 8035dce: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 8035dd2: e002 b.n 8035dda } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 8035dd4: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035dd8: 681b ldr r3, [r3, #0] 8035dda: 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, 8035dde: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035de2: 483f ldr r0, [pc, #252] ; (8035ee0 ) 8035de4: 7a19 ldrb r1, [r3, #8] 8035de6: 68da ldr r2, [r3, #12] 8035de8: 3904 subs r1, #4 8035dea: b2c9 uxtb r1, r1 8035dec: 3210 adds r2, #16 8035dee: 466b mov r3, sp 8035df0: f7ff f970 bl 80350d4 msg_ps->vb_ptr->ident + 4, &np); /* check if object is still available (e.g. external hot-plug thingy present?) */ if (mn != NULL) 8035df4: 4605 mov r5, r0 8035df6: 2800 cmp r0, #0 8035df8: d02e beq.n 8035e58 { if (mn->node_type == MIB_NODE_EX) 8035dfa: 7c03 ldrb r3, [r0, #16] 8035dfc: 2b05 cmp r3, #5 8035dfe: d110 bne.n 8035e22 /* 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; 8035e00: 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; 8035e02: 230a movs r3, #10 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 8035e04: 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; 8035e08: 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; 8035e0c: 4b35 ldr r3, [pc, #212] ; (8035ee4 ) en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 8035e0e: 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; 8035e12: e883 0003 stmia.w r3, {r0, r1} en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 8035e16: 2100 movs r1, #0 8035e18: 6aaf ldr r7, [r5, #40] ; 0x28 8035e1a: 6968 ldr r0, [r5, #20] 8035e1c: 9b01 ldr r3, [sp, #4] 8035e1e: 47b8 blx r7 8035e20: e01a b.n 8035e58 else { /* internal object */ struct obj_def object_def; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF_S; 8035e22: 2305 movs r3, #5 8035e24: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_object_def(np.ident_len, np.ident, &object_def); 8035e28: 6803 ldr r3, [r0, #0] 8035e2a: 9901 ldr r1, [sp, #4] 8035e2c: f89d 0000 ldrb.w r0, [sp] 8035e30: aa02 add r2, sp, #8 8035e32: 4798 blx r3 msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; 8035e34: 2306 movs r3, #6 8035e36: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->set_value(&object_def,msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value); 8035e3a: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035e3e: 68ed ldr r5, [r5, #12] 8035e40: 7c59 ldrb r1, [r3, #17] 8035e42: 695a ldr r2, [r3, #20] 8035e44: a802 add r0, sp, #8 8035e46: 47a8 blx r5 msg_ps->vb_idx += 1; 8035e48: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035e4c: 3301 adds r3, #1 8035e4e: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8035e52: e001 b.n 8035e58 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) && 8035e54: 4c21 ldr r4, [pc, #132] ; (8035edc ) 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, 8035e56: 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) && 8035e58: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 8035e5c: 4d1f ldr r5, [pc, #124] ; (8035edc ) 8035e5e: 2b06 cmp r3, #6 8035e60: d139 bne.n 8035ed6 (msg_ps->vb_idx < msg_ps->invb.count)) 8035e62: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035e66: 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) && 8035e6a: 4293 cmp r3, r2 8035e6c: d3ae bcc.n 8035dcc 8035e6e: e031 b.n 8035ed4 (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; 8035e70: f505 7280 add.w r2, r5, #256 ; 0x100 8035e74: ca07 ldmia r2, {r0, r1, r2} 8035e76: f505 7386 add.w r3, r5, #268 ; 0x10c 8035e7a: e883 0007 stmia.w r3, {r0, r1, r2} msg_ps->invb.head = NULL; 8035e7e: 2300 movs r3, #0 8035e80: f8c5 3100 str.w r3, [r5, #256] ; 0x100 msg_ps->invb.tail = NULL; 8035e84: f8c5 3104 str.w r3, [r5, #260] ; 0x104 msg_ps->invb.count = 0; 8035e88: f885 3108 strb.w r3, [r5, #264] ; 0x108 snmp_ok_response(msg_ps); 8035e8c: 4628 mov r0, r5 8035e8e: f7ff fc6f bl 8035770 8035e92: e020 b.n 8035ed6 } } if (mn == NULL) { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 8035e94: 4811 ldr r0, [pc, #68] ; (8035edc ) 8035e96: 2102 movs r1, #2 8035e98: f7ff fc2f bl 80356fa 8035e9c: e556 b.n 803594c } if (mn != NULL) { struct snmp_varbind *vb; msg_ps->state = SNMP_MSG_INTERNAL_GET_VALUE; 8035e9e: 2303 movs r3, #3 /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 8035ea0: 200c movs r0, #12 } if (mn != NULL) { struct snmp_varbind *vb; msg_ps->state = SNMP_MSG_INTERNAL_GET_VALUE; 8035ea2: f884 305a strb.w r3, [r4, #90] ; 0x5a /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 8035ea6: f7f9 fe11 bl 802facc if (vb != NULL) 8035eaa: 4605 mov r5, r0 8035eac: 2800 cmp r0, #0 8035eae: f47f ae31 bne.w 8035b14 8035eb2: e669 b.n 8035b88 { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); } } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 8035eb4: d10f bne.n 8035ed6 8035eb6: e555 b.n 8035964 /* search failed, object id points to unknown object (nosuchname) */ mn = NULL; } if (mn != NULL) { msg_ps->state = SNMP_MSG_INTERNAL_SET_TEST; 8035eb8: 2304 movs r3, #4 8035eba: f884 305a strb.w r3, [r4, #90] ; 0x5a if (object_def.access & MIB_ACCESS_WRITE) 8035ebe: f89d 3009 ldrb.w r3, [sp, #9] 8035ec2: f003 0302 and.w r3, r3, #2 8035ec6: b2db uxtb r3, r3 8035ec8: 2b00 cmp r3, #0 8035eca: f47f af47 bne.w 8035d5c 8035ece: e75e b.n 8035d8e /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); } } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 8035ed0: d1c0 bne.n 8035e54 8035ed2: e774 b.n 8035dbe 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) && 8035ed4: d0cc beq.n 8035e70 else if(msg_ps->rt == SNMP_ASN1_PDU_SET_REQ) { snmp_msg_set_event(request_id, msg_ps); } } } 8035ed6: b027 add sp, #156 ; 0x9c 8035ed8: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 8035edc: 2000f6ec .word 0x2000f6ec 8035ee0: 08045670 .word 0x08045670 8035ee4: 2000f74c .word 0x2000f74c 08035ee8 : 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) { 8035ee8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8035eec: 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); 8035eee: 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) { 8035ef2: 468a mov sl, r1 8035ef4: 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); 8035ef6: 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) { 8035ef8: 4604 mov r4, r0 8035efa: 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); 8035efc: 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); 8035f00: f7fd f920 bl 8033144 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &vb_len); 8035f04: f10a 0101 add.w r1, sl, #1 8035f08: 4620 mov r0, r4 8035f0a: b289 uxth r1, r1 8035f0c: f10d 020a add.w r2, sp, #10 8035f10: 4633 mov r3, r6 8035f12: f7fd f92c bl 803316e if ((derr != ERR_OK) || 8035f16: b910 cbnz r0, 8035f1e 8035f18: 783b ldrb r3, [r7, #0] 8035f1a: 2b30 cmp r3, #48 ; 0x30 8035f1c: d002 beq.n 8035f24 (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ))) { snmp_inc_snmpinasnparseerrs(); 8035f1e: f7fe ff21 bl 8034d64 8035f22: e02b b.n 8035f7c return ERR_ARG; } ofs += (1 + len_octets); 8035f24: f89d 800a ldrb.w r8, [sp, #10] /* start with empty list */ m_stat->invb.count = 0; 8035f28: 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); 8035f2c: f108 0801 add.w r8, r8, #1 8035f30: 44d0 add r8, sl 8035f32: fa1f f888 uxth.w r8, r8 /* start with empty list */ m_stat->invb.count = 0; m_stat->invb.head = NULL; 8035f36: f8c5 0100 str.w r0, [r5, #256] ; 0x100 m_stat->invb.tail = NULL; 8035f3a: f8c5 0104 str.w r0, [r5, #260] ; 0x104 while (vb_len > 0) 8035f3e: e118 b.n 8036172 { struct snmp_obj_id oid, oid_value; struct snmp_varbind *vb; snmp_asn1_dec_type(p, ofs, &type); 8035f40: 4641 mov r1, r8 8035f42: 463a mov r2, r7 8035f44: 4620 mov r0, r4 8035f46: f7fd f8fd bl 8033144 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8035f4a: f108 0101 add.w r1, r8, #1 8035f4e: 4620 mov r0, r4 8035f50: b289 uxth r1, r1 8035f52: f10d 020a add.w r2, sp, #10 8035f56: ab03 add r3, sp, #12 8035f58: f7fd f909 bl 803316e if ((derr != ERR_OK) || 8035f5c: b940 cbnz r0, 8035f70 8035f5e: 783b ldrb r3, [r7, #0] 8035f60: 2b30 cmp r3, #48 ; 0x30 8035f62: d105 bne.n 8035f70 (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)) || (len == 0) || (len > vb_len)) 8035f64: 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)) || 8035f68: b112 cbz r2, 8035f70 (len == 0) || (len > vb_len)) 8035f6a: 8833 ldrh r3, [r6, #0] 8035f6c: 429a cmp r2, r3 8035f6e: d907 bls.n 8035f80 { snmp_inc_snmpinasnparseerrs(); 8035f70: f7fe fef8 bl 8034d64 /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); 8035f74: f505 7080 add.w r0, r5, #256 ; 0x100 8035f78: f7ff fbb1 bl 80356de 8035f7c: 20f2 movs r0, #242 ; 0xf2 8035f7e: e109 b.n 8036194 return ERR_ARG; } ofs += (1 + len_octets); 8035f80: f89d 200a ldrb.w r2, [sp, #10] 8035f84: 4490 add r8, r2 8035f86: fa1f f888 uxth.w r8, r8 8035f8a: f108 0a01 add.w sl, r8, #1 vb_len -= (1 + len_octets); 8035f8e: 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); 8035f90: fa1f fa8a uxth.w sl, sl vb_len -= (1 + len_octets); 8035f94: 189b adds r3, r3, r2 snmp_asn1_dec_type(p, ofs, &type); 8035f96: 4651 mov r1, sl 8035f98: 463a mov r2, r7 8035f9a: 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); 8035f9c: 8033 strh r3, [r6, #0] snmp_asn1_dec_type(p, ofs, &type); 8035f9e: f7fd f8d1 bl 8033144 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8035fa2: f108 0102 add.w r1, r8, #2 8035fa6: 4620 mov r0, r4 8035fa8: b289 uxth r1, r1 8035faa: f10d 020a add.w r2, sp, #10 8035fae: ab03 add r3, sp, #12 8035fb0: f7fd f8dd bl 803316e if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID))) 8035fb4: 2800 cmp r0, #0 8035fb6: d1db bne.n 8035f70 8035fb8: 783b ldrb r3, [r7, #0] 8035fba: 2b06 cmp r3, #6 8035fbc: d1d8 bne.n 8035f70 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); 8035fbe: f89d 100a ldrb.w r1, [sp, #10] 8035fc2: f8bd 200c ldrh.w r2, [sp, #12] 8035fc6: 3101 adds r1, #1 8035fc8: 4451 add r1, sl 8035fca: 4620 mov r0, r4 8035fcc: b289 uxth r1, r1 8035fce: ab04 add r3, sp, #16 8035fd0: f7fd f9fc bl 80333cc if (derr != ERR_OK) 8035fd4: 2800 cmp r0, #0 8035fd6: d1cb bne.n 8035f70 snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets + len); 8035fd8: f89d 300a ldrb.w r3, [sp, #10] 8035fdc: f8bd 200c ldrh.w r2, [sp, #12] 8035fe0: 1899 adds r1, r3, r2 8035fe2: 448a add sl, r1 8035fe4: fa1f fa8a uxth.w sl, sl vb_len -= (1 + len_octets + len); 8035fe8: 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); 8035fea: f10a 0801 add.w r8, sl, #1 vb_len -= (1 + len_octets + len); 8035fee: 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); 8035ff0: fa1f f888 uxth.w r8, r8 vb_len -= (1 + len_octets + len); 8035ff4: 43db mvns r3, r3 8035ff6: 18d3 adds r3, r2, r3 snmp_asn1_dec_type(p, ofs, &type); 8035ff8: 4641 mov r1, r8 8035ffa: 463a mov r2, r7 8035ffc: 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); 8035ffe: 8033 strh r3, [r6, #0] snmp_asn1_dec_type(p, ofs, &type); 8036000: f7fd f8a0 bl 8033144 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8036004: f10a 0102 add.w r1, sl, #2 8036008: 4620 mov r0, r4 803600a: b289 uxth r1, r1 803600c: f10d 020a add.w r2, sp, #10 8036010: ab03 add r3, sp, #12 8036012: f7fd f8ac bl 803316e if (derr != ERR_OK) 8036016: 2800 cmp r0, #0 8036018: d1aa bne.n 8035f70 /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } switch (type) 803601a: 7839 ldrb r1, [r7, #0] 803601c: 2906 cmp r1, #6 803601e: d047 beq.n 80360b0 8036020: d805 bhi.n 803602e 8036022: 2904 cmp r1, #4 8036024: d036 beq.n 8036094 8036026: d839 bhi.n 803609c 8036028: 2902 cmp r1, #2 803602a: d1a1 bne.n 8035f70 803602c: e009 b.n 8036042 803602e: 2943 cmp r1, #67 ; 0x43 8036030: d804 bhi.n 803603c 8036032: 2941 cmp r1, #65 ; 0x41 8036034: d219 bcs.n 803606a 8036036: 2940 cmp r1, #64 ; 0x40 8036038: d19a bne.n 8035f70 803603a: e069 b.n 8036110 803603c: 2944 cmp r1, #68 ; 0x44 803603e: d197 bne.n 8035f70 8036040: e028 b.n 8036094 { case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG): vb = snmp_varbind_alloc(&oid, type, sizeof(s32_t)); 8036042: a804 add r0, sp, #16 8036044: 2204 movs r2, #4 8036046: f7ff faf7 bl 8035638 if (vb != NULL) 803604a: 4683 mov fp, r0 803604c: 2800 cmp r0, #0 803604e: d08f beq.n 8035f70 { s32_t *vptr = (s32_t*)vb->value; derr = snmp_asn1_dec_s32t(p, ofs + 1 + len_octets, len, vptr); 8036050: f89d 100a ldrb.w r1, [sp, #10] 8036054: f8bd 200c ldrh.w r2, [sp, #12] 8036058: f8db 3014 ldr.w r3, [fp, #20] 803605c: 3101 adds r1, #1 803605e: 4441 add r1, r8 8036060: 4620 mov r0, r4 8036062: b289 uxth r1, r1 8036064: f7fd f959 bl 803331a 8036068: e06b b.n 8036142 } 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)); 803606a: a804 add r0, sp, #16 803606c: 2204 movs r2, #4 803606e: f7ff fae3 bl 8035638 if (vb != NULL) 8036072: 4683 mov fp, r0 8036074: 2800 cmp r0, #0 8036076: f43f af7b beq.w 8035f70 { u32_t *vptr = (u32_t*)vb->value; derr = snmp_asn1_dec_u32t(p, ofs + 1 + len_octets, len, vptr); 803607a: f89d 100a ldrb.w r1, [sp, #10] 803607e: f8bd 200c ldrh.w r2, [sp, #12] 8036082: f8db 3014 ldr.w r3, [fp, #20] 8036086: 3101 adds r1, #1 8036088: 4441 add r1, r8 803608a: 4620 mov r0, r4 803608c: b289 uxth r1, r1 803608e: f7fd f8f0 bl 8033272 8036092: e056 b.n 8036142 } 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); 8036094: a804 add r0, sp, #16 8036096: f89d 200c ldrb.w r2, [sp, #12] 803609a: e03f b.n 803611c { derr = ERR_ARG; } break; case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_NUL): vb = snmp_varbind_alloc(&oid, type, 0); 803609c: 2105 movs r1, #5 803609e: a804 add r0, sp, #16 80360a0: 2200 movs r2, #0 80360a2: f7ff fac9 bl 8035638 if (vb != NULL) 80360a6: 4601 mov r1, r0 80360a8: 2800 cmp r0, #0 80360aa: f43f af61 beq.w 8035f70 80360ae: e02a b.n 8036106 { 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); 80360b0: f89d 100a ldrb.w r1, [sp, #10] 80360b4: f8bd 200c ldrh.w r2, [sp, #12] 80360b8: 3101 adds r1, #1 80360ba: 4441 add r1, r8 80360bc: 4620 mov r0, r4 80360be: b289 uxth r1, r1 80360c0: ab25 add r3, sp, #148 ; 0x94 80360c2: f7fd f983 bl 80333cc if (derr == ERR_OK) 80360c6: 2800 cmp r0, #0 80360c8: f47f af52 bne.w 8035f70 { vb = snmp_varbind_alloc(&oid, type, oid_value.len * sizeof(s32_t)); 80360cc: f89d 2094 ldrb.w r2, [sp, #148] ; 0x94 80360d0: 7839 ldrb r1, [r7, #0] 80360d2: 0092 lsls r2, r2, #2 80360d4: a804 add r0, sp, #16 80360d6: f002 02fc and.w r2, r2, #252 ; 0xfc 80360da: f7ff faad bl 8035638 if (vb != NULL) 80360de: 4601 mov r1, r0 80360e0: 2800 cmp r0, #0 80360e2: f43f af45 beq.w 8035f70 { u8_t i = oid_value.len; 80360e6: f89d 3094 ldrb.w r3, [sp, #148] ; 0x94 s32_t *vptr = (s32_t*)vb->value; 80360ea: 6940 ldr r0, [r0, #20] while(i > 0) 80360ec: e009 b.n 8036102 { i--; 80360ee: 3b01 subs r3, #1 80360f0: b2db uxtb r3, r3 vptr[i] = oid_value.id[i]; 80360f2: f50d 7e8c add.w lr, sp, #280 ; 0x118 80360f6: eb0e 0283 add.w r2, lr, r3, lsl #2 80360fa: f852 2c80 ldr.w r2, [r2, #-128] 80360fe: 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) 8036102: 2b00 cmp r3, #0 8036104: d1f3 bne.n 80360ee { i--; vptr[i] = oid_value.id[i]; } snmp_varbind_tail_add(&m_stat->invb, vb); 8036106: f505 7080 add.w r0, r5, #256 ; 0x100 803610a: f7ff fb41 bl 8035790 803610e: e022 b.n 8036156 derr = ERR_ARG; } } break; case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR): if (len == 4) 8036110: f8bd 200c ldrh.w r2, [sp, #12] 8036114: 2a04 cmp r2, #4 8036116: f47f af2b bne.w 8035f70 { /* must be exactly 4 octets! */ vb = snmp_varbind_alloc(&oid, type, 4); 803611a: a804 add r0, sp, #16 803611c: f7ff fa8c bl 8035638 if (vb != NULL) 8036120: 4683 mov fp, r0 8036122: 2800 cmp r0, #0 8036124: f43f af24 beq.w 8035f70 { derr = snmp_asn1_dec_raw(p, ofs + 1 + len_octets, len, vb->value_len, (u8_t*)vb->value); 8036128: f89d 100a ldrb.w r1, [sp, #10] 803612c: 7c43 ldrb r3, [r0, #17] 803612e: 6940 ldr r0, [r0, #20] 8036130: f8bd 200c ldrh.w r2, [sp, #12] 8036134: 9000 str r0, [sp, #0] 8036136: 3101 adds r1, #1 8036138: 4441 add r1, r8 803613a: 4620 mov r0, r4 803613c: b289 uxth r1, r1 803613e: f7fd f9e1 bl 8033504 8036142: 4682 mov sl, r0 snmp_varbind_tail_add(&m_stat->invb, vb); 8036144: 4659 mov r1, fp 8036146: f505 7080 add.w r0, r5, #256 ; 0x100 803614a: f7ff fb21 bl 8035790 break; default: derr = ERR_ARG; break; } if (derr != ERR_OK) 803614e: f1ba 0f00 cmp.w sl, #0 8036152: f47f af0d bne.w 8035f70 snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets + len); 8036156: f8bd 200c ldrh.w r2, [sp, #12] 803615a: f89d 300a ldrb.w r3, [sp, #10] 803615e: 1c51 adds r1, r2, #1 8036160: 1859 adds r1, r3, r1 8036162: 4488 add r8, r1 vb_len -= (1 + len_octets + len); 8036164: 8831 ldrh r1, [r6, #0] 8036166: 43db mvns r3, r3 8036168: 1a8a subs r2, r1, r2 803616a: 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); 803616c: fa1f f888 uxth.w r8, r8 vb_len -= (1 + len_octets + len); 8036170: 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) 8036172: 8833 ldrh r3, [r6, #0] 8036174: 2b00 cmp r3, #0 8036176: f47f aee3 bne.w 8035f40 } ofs += (1 + len_octets + len); vb_len -= (1 + len_octets + len); } if (m_stat->rt == SNMP_ASN1_PDU_SET_REQ) 803617a: 7aab ldrb r3, [r5, #10] 803617c: f895 0108 ldrb.w r0, [r5, #264] ; 0x108 8036180: 2b03 cmp r3, #3 8036182: d102 bne.n 803618a { snmp_add_snmpintotalsetvars(m_stat->invb.count); 8036184: f7fe fe26 bl 8034dd4 8036188: e001 b.n 803618e } else { snmp_add_snmpintotalreqvars(m_stat->invb.count); 803618a: f7fe fe1b bl 8034dc4 } *ofs_ret = ofs; 803618e: f8a9 8000 strh.w r8, [r9] return ERR_OK; 8036192: 2000 movs r0, #0 } 8036194: b240 sxtb r0, r0 8036196: b047 add sp, #284 ; 0x11c 8036198: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0803619c : /* 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) { 803619c: 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)) 80361a0: 4da3 ldr r5, [pc, #652] ; (8036430 ) snmp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) { volatile struct snmp_msg_pstat *msg_ps; u8_t req_idx; err_t err_ret; u16_t payload_len = p->tot_len; 80361a2: 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)) 80361a4: 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) { 80361a8: b087 sub sp, #28 80361aa: 4699 mov r9, r3 volatile 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; 80361ac: 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) { 80361ae: 4688 mov r8, r1 80361b0: 4614 mov r4, r2 volatile 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; 80361b2: 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)) 80361b6: 2e00 cmp r6, #0 80361b8: f000 81aa beq.w 8036510 msg_ps++; } if (req_idx == SNMP_CONCURRENT_REQUESTS) { /* exceeding number of concurrent requests */ pbuf_free(p); 80361bc: 4620 mov r0, r4 80361be: f7f9 fda5 bl 802fd0c 80361c2: e1d6 b.n 8036572 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)) || 80361c4: f89d 600e ldrb.w r6, [sp, #14] 80361c8: f8bd 3012 ldrh.w r3, [sp, #18] 80361cc: 1c75 adds r5, r6, #1 80361ce: 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) || 80361d0: 429f cmp r7, r3 80361d2: f040 80c4 bne.w 803635e (pdu_len != (1 + len_octets + len)) || 80361d6: f89d 300f ldrb.w r3, [sp, #15] 80361da: 2b30 cmp r3, #48 ; 0x30 80361dc: d000 beq.n 80361e0 80361de: e0be b.n 803635e (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ))) { snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets); 80361e0: b2ad uxth r5, r5 snmp_asn1_dec_type(p, ofs, &type); 80361e2: 4629 mov r1, r5 80361e4: f10d 020f add.w r2, sp, #15 80361e8: 4620 mov r0, r4 80361ea: f7fc ffab bl 8033144 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 80361ee: 4620 mov r0, r4 80361f0: 1cb1 adds r1, r6, #2 80361f2: f10d 020e add.w r2, sp, #14 80361f6: f10d 0312 add.w r3, sp, #18 80361fa: f7fc ffb8 bl 803316e if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 80361fe: 2800 cmp r0, #0 8036200: f040 80ad bne.w 803635e 8036204: f89d 300f ldrb.w r3, [sp, #15] 8036208: 2b02 cmp r3, #2 803620a: f040 80a8 bne.w 803635e { /* 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); 803620e: f89d 100e ldrb.w r1, [sp, #14] 8036212: f8bd 2012 ldrh.w r2, [sp, #18] 8036216: 3101 adds r1, #1 8036218: 4620 mov r0, r4 803621a: 1869 adds r1, r5, r1 803621c: ab05 add r3, sp, #20 803621e: f7fd f87c bl 803331a if (derr != ERR_OK) 8036222: 2800 cmp r0, #0 8036224: f040 809b bne.w 803635e { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } if (version != 0) 8036228: 9b05 ldr r3, [sp, #20] 803622a: b113 cbz r3, 8036232 { /* not version 1 */ snmp_inc_snmpinbadversions(); 803622c: f7fe fd8a bl 8034d44 8036230: e7c4 b.n 80361bc return ERR_ARG; } ofs += (1 + len_octets + len); 8036232: f89d 200e ldrb.w r2, [sp, #14] 8036236: f8bd 3012 ldrh.w r3, [sp, #18] 803623a: 18d3 adds r3, r2, r3 803623c: 18ed adds r5, r5, r3 803623e: b2ad uxth r5, r5 8036240: 1c6e adds r6, r5, #1 8036242: b2b6 uxth r6, r6 snmp_asn1_dec_type(p, ofs, &type); 8036244: 4631 mov r1, r6 8036246: f10d 020f add.w r2, sp, #15 803624a: 4620 mov r0, r4 803624c: f7fc ff7a bl 8033144 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8036250: 1ca9 adds r1, r5, #2 8036252: 4620 mov r0, r4 8036254: b289 uxth r1, r1 8036256: f10d 020e add.w r2, sp, #14 803625a: f10d 0312 add.w r3, sp, #18 803625e: f7fc ff86 bl 803316e if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR))) 8036262: 2800 cmp r0, #0 8036264: d17b bne.n 803635e 8036266: f89d 300f ldrb.w r3, [sp, #15] 803626a: 2b04 cmp r3, #4 803626c: d177 bne.n 803635e { /* 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); 803626e: f89d 100e ldrb.w r1, [sp, #14] 8036272: 4d70 ldr r5, [pc, #448] ; (8036434 ) 8036274: f8bd 2012 ldrh.w r2, [sp, #18] 8036278: 9500 str r5, [sp, #0] 803627a: 3101 adds r1, #1 803627c: 1871 adds r1, r6, r1 803627e: 4620 mov r0, r4 8036280: b289 uxth r1, r1 8036282: 2340 movs r3, #64 ; 0x40 8036284: f7fd f93e bl 8033504 if (derr != ERR_OK) 8036288: 2800 cmp r0, #0 803628a: d168 bne.n 803635e { snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } /* add zero terminator */ len = ((len < (SNMP_COMMUNITY_STR_LEN))?(len):(SNMP_COMMUNITY_STR_LEN)); 803628c: f8bd 3012 ldrh.w r3, [sp, #18] m_stat->community[len] = 0; 8036290: 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)); 8036294: 2b40 cmp r3, #64 ; 0x40 8036296: bf28 it cs 8036298: 2340 movcs r3, #64 ; 0x40 m_stat->community[len] = 0; 803629a: 18d1 adds r1, r2, r3 snmp_inc_snmpinbadcommunitynames(); snmp_authfail_trap(); return ERR_ARG; }*/ ofs += (1 + len_octets + len); 803629c: 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)); 80362a0: f8ad 3012 strh.w r3, [sp, #18] m_stat->community[len] = 0; m_stat->com_strlen = (u8_t)len; 80362a4: f885 3041 strb.w r3, [r5, #65] ; 0x41 snmp_inc_snmpinbadcommunitynames(); snmp_authfail_trap(); return ERR_ARG; }*/ ofs += (1 + len_octets + len); 80362a8: 189b adds r3, r3, r2 80362aa: 18f6 adds r6, r6, r3 80362ac: b2b6 uxth r6, r6 80362ae: f106 0801 add.w r8, r6, #1 80362b2: 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; 80362b6: 7608 strb r0, [r1, #24] snmp_authfail_trap(); return ERR_ARG; }*/ ofs += (1 + len_octets + len); snmp_asn1_dec_type(p, ofs, &type); 80362b8: f10d 020f add.w r2, sp, #15 80362bc: 4641 mov r1, r8 80362be: 4620 mov r0, r4 80362c0: f7fc ff40 bl 8033144 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 80362c4: 1cb1 adds r1, r6, #2 80362c6: 4620 mov r0, r4 80362c8: b289 uxth r1, r1 80362ca: f10d 020e add.w r2, sp, #14 80362ce: f10d 0312 add.w r3, sp, #18 80362d2: f7fc ff4c bl 803316e if (derr != ERR_OK) 80362d6: 2800 cmp r0, #0 80362d8: d141 bne.n 803635e return ERR_ARG; } /* FIX for write/read communuty */ /* GetRequest PDU */ if (type == (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_REQ)) 80362da: f89d 300f ldrb.w r3, [sp, #15] 80362de: 2ba0 cmp r3, #160 ; 0xa0 80362e0: d10f bne.n 8036302 { if (strncmp(sSettings.sSnmp.readCommunity, (const char*)m_stat->community, strlen(sSettings.sSnmp.readCommunity)) != 0 80362e2: 4855 ldr r0, [pc, #340] ; (8036438 ) 80362e4: f7eb fde4 bl 8021eb0 80362e8: 4629 mov r1, r5 80362ea: 4602 mov r2, r0 80362ec: 4852 ldr r0, [pc, #328] ; (8036438 ) 80362ee: f7eb fe41 bl 8021f74 80362f2: b120 cbz r0, 80362fe || (strlen(sSettings.sSnmp.readCommunity) != strlen((const char*)m_stat->community)) ) { snmp_inc_snmpinbadcommunitynames(); 80362f4: f7fe fd2e bl 8034d54 snmp_authfail_trap(); 80362f8: f000 fd84 bl 8036e04 80362fc: e75e b.n 80361bc /* 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)) ) 80362fe: 484e ldr r0, [pc, #312] ; (8036438 ) 8036300: e00c b.n 803631c snmp_authfail_trap(); return ERR_ARG; } } /* SetRequest PDU */ else if (type == (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_SET_REQ)) 8036302: 2ba3 cmp r3, #163 ; 0xa3 8036304: d112 bne.n 803632c { if (strncmp(sSettings.sSnmp.writeCommunity, (const char*)m_stat->community, strlen(sSettings.sSnmp.writeCommunity)) != 0 8036306: 484d ldr r0, [pc, #308] ; (803643c ) 8036308: f7eb fdd2 bl 8021eb0 803630c: 4629 mov r1, r5 803630e: 4602 mov r2, r0 8036310: 484a ldr r0, [pc, #296] ; (803643c ) 8036312: f7eb fe2f bl 8021f74 8036316: 2800 cmp r0, #0 8036318: d1ec bne.n 80362f4 || (strlen(sSettings.sSnmp.writeCommunity) != strlen((const char*)m_stat->community)) ) 803631a: 4848 ldr r0, [pc, #288] ; (803643c ) 803631c: f7eb fdc8 bl 8021eb0 8036320: 4606 mov r6, r0 8036322: 4628 mov r0, r5 8036324: f7eb fdc4 bl 8021eb0 8036328: 4286 cmp r6, r0 803632a: d1e3 bne.n 80362f4 snmp_authfail_trap(); return ERR_ARG; } } switch(type) 803632c: f89d 300f ldrb.w r3, [sp, #15] 8036330: 3ba0 subs r3, #160 ; 0xa0 8036332: 2b04 cmp r3, #4 8036334: d813 bhi.n 803635e 8036336: e8df f003 tbb [pc, r3] 803633a: 0603 .short 0x0603 803633c: 0c09 .short 0x0c09 803633e: 0f .byte 0x0f 803633f: 00 .byte 0x00 { case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_REQ): // GetRequest PDU snmp_inc_snmpingetrequests(); 8036340: f7fe fd50 bl 8034de4 8036344: e100 b.n 8036548 derr = ERR_OK; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_NEXT_REQ): // GetNextRequest PDU snmp_inc_snmpingetnexts(); 8036346: f7fe fd55 bl 8034df4 803634a: e0fd b.n 8036548 derr = ERR_OK; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_RESP): // GetResponse PDU snmp_inc_snmpingetresponses(); 803634c: f7fe fd62 bl 8034e14 8036350: e734 b.n 80361bc derr = ERR_ARG; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_SET_REQ): // SetRequest PDU snmp_inc_snmpinsetrequests(); 8036352: f7fe fd57 bl 8034e04 8036356: e0f7 b.n 8036548 derr = ERR_OK; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_TRAP): // Trap PDU snmp_inc_snmpintraps(); 8036358: f7fe fd64 bl 8034e24 803635c: e72e b.n 80361bc derr = ERR_ARG; break; default: snmp_inc_snmpinasnparseerrs(); 803635e: f7fe fd01 bl 8034d64 8036362: e72b b.n 80361bc { /* decoded PDU length does not equal actual payload length */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } snmp_asn1_dec_type(p, ofs, &type); 8036364: 4631 mov r1, r6 8036366: f10d 020f add.w r2, sp, #15 803636a: 4620 mov r0, r4 803636c: f7fc feea bl 8033144 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8036370: f108 0102 add.w r1, r8, #2 8036374: 4620 mov r0, r4 8036376: b289 uxth r1, r1 8036378: f10d 020e add.w r2, sp, #14 803637c: f10d 0312 add.w r3, sp, #18 8036380: f7fc fef5 bl 803316e if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 8036384: 2800 cmp r0, #0 8036386: d1ea bne.n 803635e 8036388: f89d 300f ldrb.w r3, [sp, #15] 803638c: 2b02 cmp r3, #2 803638e: d1e6 bne.n 803635e { /* 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); 8036390: f89d 100e ldrb.w r1, [sp, #14] 8036394: f8bd 2012 ldrh.w r2, [sp, #18] 8036398: 3101 adds r1, #1 803639a: 1871 adds r1, r6, r1 803639c: 4620 mov r0, r4 803639e: b289 uxth r1, r1 80363a0: f105 030c add.w r3, r5, #12 80363a4: f7fc ffb9 bl 803331a if (derr != ERR_OK) 80363a8: 2800 cmp r0, #0 80363aa: d1d8 bne.n 803635e { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets + len); 80363ac: f89d 200e ldrb.w r2, [sp, #14] 80363b0: f8bd 3012 ldrh.w r3, [sp, #18] 80363b4: 18d3 adds r3, r2, r3 80363b6: 18f6 adds r6, r6, r3 80363b8: b2b6 uxth r6, r6 80363ba: 1c77 adds r7, r6, #1 80363bc: b2bf uxth r7, r7 snmp_asn1_dec_type(p, ofs, &type); 80363be: 4639 mov r1, r7 80363c0: f10d 020f add.w r2, sp, #15 80363c4: 4620 mov r0, r4 80363c6: f7fc febd bl 8033144 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 80363ca: 1cb1 adds r1, r6, #2 80363cc: 4620 mov r0, r4 80363ce: b289 uxth r1, r1 80363d0: f10d 020e add.w r2, sp, #14 80363d4: f10d 0312 add.w r3, sp, #18 80363d8: f7fc fec9 bl 803316e if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 80363dc: 2800 cmp r0, #0 80363de: d1be bne.n 803635e 80363e0: f89d 300f ldrb.w r3, [sp, #15] 80363e4: 2b02 cmp r3, #2 80363e6: d1ba bne.n 803635e 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); 80363e8: f89d 100e ldrb.w r1, [sp, #14] 80363ec: f8bd 2012 ldrh.w r2, [sp, #18] 80363f0: 3101 adds r1, #1 80363f2: 1879 adds r1, r7, r1 80363f4: 4620 mov r0, r4 80363f6: b289 uxth r1, r1 80363f8: f105 0310 add.w r3, r5, #16 80363fc: f7fc ff8d bl 803331a if (derr != ERR_OK) 8036400: 2800 cmp r0, #0 8036402: d1ac bne.n 803635e { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } switch (m_stat->error_status) 8036404: 692b ldr r3, [r5, #16] 8036406: 3b01 subs r3, #1 8036408: 2b04 cmp r3, #4 803640a: d81b bhi.n 8036444 803640c: e8df f003 tbb [pc, r3] 8036410: 0c090603 .word 0x0c090603 8036414: 18 .byte 0x18 8036415: 00 .byte 0x00 { case SNMP_ES_TOOBIG: snmp_inc_snmpintoobigs(); 8036416: f7fe fcad bl 8034d74 803641a: e013 b.n 8036444 break; case SNMP_ES_NOSUCHNAME: snmp_inc_snmpinnosuchnames(); 803641c: f7fe fcb2 bl 8034d84 8036420: e010 b.n 8036444 break; case SNMP_ES_BADVALUE: snmp_inc_snmpinbadvalues(); 8036422: f7fe fcb7 bl 8034d94 8036426: e00d b.n 8036444 break; case SNMP_ES_READONLY: snmp_inc_snmpinreadonlys(); 8036428: f7fe fcbc bl 8034da4 803642c: e00a b.n 8036444 803642e: bf00 nop 8036430: 2000f6ec .word 0x2000f6ec 8036434: 2000f704 .word 0x2000f704 8036438: 2000d191 .word 0x2000d191 803643c: 2000d1a5 .word 0x2000d1a5 break; case SNMP_ES_GENERROR: snmp_inc_snmpingenerrs(); 8036440: f7fe fcb8 bl 8034db4 break; } ofs += (1 + len_octets + len); 8036444: f89d 200e ldrb.w r2, [sp, #14] 8036448: f8bd 3012 ldrh.w r3, [sp, #18] 803644c: 18d3 adds r3, r2, r3 803644e: 18ff adds r7, r7, r3 8036450: b2bf uxth r7, r7 8036452: 1c7d adds r5, r7, #1 8036454: b2ad uxth r5, r5 snmp_asn1_dec_type(p, ofs, &type); 8036456: 4629 mov r1, r5 8036458: f10d 020f add.w r2, sp, #15 803645c: 4620 mov r0, r4 803645e: f7fc fe71 bl 8033144 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8036462: 1cb9 adds r1, r7, #2 8036464: 4620 mov r0, r4 8036466: b289 uxth r1, r1 8036468: f10d 020e add.w r2, sp, #14 803646c: f10d 0312 add.w r3, sp, #18 8036470: f7fc fe7d bl 803316e if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 8036474: 2800 cmp r0, #0 8036476: f47f af72 bne.w 803635e 803647a: f89d 300f ldrb.w r3, [sp, #15] 803647e: 2b02 cmp r3, #2 8036480: f47f af6d bne.w 803635e 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); 8036484: f89d 100e ldrb.w r1, [sp, #14] 8036488: f8bd 2012 ldrh.w r2, [sp, #18] 803648c: 4b3a ldr r3, [pc, #232] ; (8036578 ) 803648e: 3101 adds r1, #1 8036490: 1869 adds r1, r5, r1 8036492: 4620 mov r0, r4 8036494: b289 uxth r1, r1 8036496: f7fc ff40 bl 803331a if (derr != ERR_OK) 803649a: 2800 cmp r0, #0 803649c: f47f af5f bne.w 803635e { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets + len); 80364a0: f8bd 3012 ldrh.w r3, [sp, #18] 80364a4: f89d 200e ldrb.w r2, [sp, #14] 80364a8: 3301 adds r3, #1 80364aa: 189b adds r3, r3, r2 80364ac: 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) && 80364ae: 4b33 ldr r3, [pc, #204] ; (803657c ) /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets + len); *ofs_ret = ofs; 80364b0: 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) || ((msg_ps->rt != SNMP_ASN1_PDU_GET_REQ) && 80364b4: 7a9a ldrb r2, [r3, #10] /* 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) || 80364b6: b132 cbz r2, 80364c6 ((msg_ps->rt != SNMP_ASN1_PDU_GET_REQ) && (msg_ps->rt != SNMP_ASN1_PDU_GET_NEXT_REQ) && 80364b8: 7a9a ldrb r2, [r3, #10] /* 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) && 80364ba: 2a01 cmp r2, #1 80364bc: d003 beq.n 80364c6 (msg_ps->rt != SNMP_ASN1_PDU_GET_NEXT_REQ) && (msg_ps->rt != SNMP_ASN1_PDU_SET_REQ)) || 80364be: 7a9a ldrb r2, [r3, #10] 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) && (msg_ps->rt != SNMP_ASN1_PDU_GET_NEXT_REQ) && 80364c0: 2a03 cmp r2, #3 80364c2: f47f ae7b bne.w 80361bc (msg_ps->rt != SNMP_ASN1_PDU_SET_REQ)) || ((msg_ps->error_status != SNMP_ES_NOERROR) || 80364c6: 691b ldr r3, [r3, #16] 80364c8: 4d2c ldr r5, [pc, #176] ; (803657c ) /* 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)) || 80364ca: 2b00 cmp r3, #0 80364cc: f47f ae76 bne.w 80361bc ((msg_ps->error_status != SNMP_ES_NOERROR) || (msg_ps->error_index != 0)) ) 80364d0: 696b ldr r3, [r5, #20] /* 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)) || ((msg_ps->error_status != SNMP_ES_NOERROR) || 80364d2: 2b00 cmp r3, #0 80364d4: f47f ae72 bne.w 80361bc } 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); 80364d8: aa06 add r2, sp, #24 80364da: 4620 mov r0, r4 80364dc: f832 1d08 ldrh.w r1, [r2, #-8]! 80364e0: 462b mov r3, r5 80364e2: f7ff fd01 bl 8035ee8 80364e6: 4606 mov r6, r0 /* we've decoded the incoming message, release input msg now */ pbuf_free(p); 80364e8: 4620 mov r0, r4 80364ea: f7f9 fc0f bl 802fd0c if ((err_ret != ERR_OK) || (msg_ps->invb.count == 0)) 80364ee: 2e00 cmp r6, #0 80364f0: d13f bne.n 8036572 80364f2: f895 3108 ldrb.w r3, [r5, #264] ; 0x108 80364f6: 2b00 cmp r3, #0 80364f8: d03b beq.n 8036572 } 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; 80364fa: 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; 80364fc: 612e str r6, [r5, #16] msg_ps->vb_idx = 0; 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); 80364fe: 4630 mov r0, r6 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_pdu_dec_varbindlist() failed\n")); return; } msg_ps->error_status = SNMP_ES_NOERROR; msg_ps->error_index = 0; 8036500: 616e str r6, [r5, #20] /* find object for each variable binding */ msg_ps->state = SNMP_MSG_SEARCH_OBJ; 8036502: f885 305a strb.w r3, [r5, #90] ; 0x5a /* first variable binding from list to inspect */ msg_ps->vb_idx = 0; 8036506: 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); 803650a: f7ff f94d bl 80357a8 803650e: e030 b.n 8036572 pbuf_free(p); return; } /* accepting request */ snmp_inc_snmpinpkts(); 8036510: f7fe fc08 bl 8034d24 /* record used 'protocol control block' */ msg_ps->pcb = pcb; /* source address (network order) */ msg_ps->sip = *addr; 8036514: f8d9 3000 ldr.w r3, [r9] } /* accepting request */ snmp_inc_snmpinpkts(); /* record used 'protocol control block' */ msg_ps->pcb = pcb; 8036518: f8c5 8000 str.w r8, [r5] /* source address (network order) */ msg_ps->sip = *addr; 803651c: 606b str r3, [r5, #4] /* source port (host order (lwIP oddity)) */ msg_ps->sp = port; 803651e: 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); 8036522: 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; 8036524: 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); 8036526: f10d 020f add.w r2, sp, #15 803652a: 4620 mov r0, r4 803652c: f7fc fe0a bl 8033144 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8036530: 4620 mov r0, r4 8036532: 2101 movs r1, #1 8036534: f10d 020e add.w r2, sp, #14 8036538: f10d 0312 add.w r3, sp, #18 803653c: f7fc fe17 bl 803316e if ((derr != ERR_OK) || 8036540: 2800 cmp r0, #0 8036542: f43f ae3f beq.w 80361c4 8036546: e70a b.n 803635e if (derr != ERR_OK) { /* unsupported input PDU for this agent (no parse error) */ return ERR_ARG; } m_stat->rt = type & 0x1F; 8036548: f89d 300f ldrb.w r3, [sp, #15] 803654c: 4d0b ldr r5, [pc, #44] ; (803657c ) 803654e: f003 031f and.w r3, r3, #31 8036552: 72ab strb r3, [r5, #10] ofs += (1 + len_octets); 8036554: f89d 300e ldrb.w r3, [sp, #14] 8036558: 4498 add r8, r3 803655a: fa1f f888 uxth.w r8, r8 803655e: f108 0601 add.w r6, r8, #1 8036562: b2b6 uxth r6, r6 if (len != (pdu_len - (ofs - ofs_base))) 8036564: f8bd 3012 ldrh.w r3, [sp, #18] 8036568: 1bbf subs r7, r7, r6 803656a: 42bb cmp r3, r7 803656c: f43f aefa beq.w 8036364 8036570: e6f5 b.n 803635e 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); } 8036572: b007 add sp, #28 8036574: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 8036578: 2000f700 .word 0x2000f700 803657c: 2000f6ec .word 0x2000f6ec 08036580 : * @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) { 8036580: 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; 8036582: 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) { 8036584: 4606 mov r6, r0 u32_t *uint_ptr; s32_t *sint_ptr; u16_t tot_len; tot_len = 0; vb = root->tail; 8036586: 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; 8036588: 462f mov r7, r5 s32_t *sint_ptr; u16_t tot_len; tot_len = 0; vb = root->tail; while ( vb != NULL ) 803658a: e051 b.n 8036630 { /* encoded value lenght depends on type */ switch (vb->value_type) 803658c: 7c23 ldrb r3, [r4, #16] 803658e: 2b06 cmp r3, #6 8036590: d020 beq.n 80365d4 8036592: d805 bhi.n 80365a0 8036594: 2b02 cmp r3, #2 8036596: d00c beq.n 80365b2 8036598: d324 bcc.n 80365e4 803659a: 2b04 cmp r3, #4 803659c: d322 bcc.n 80365e4 803659e: e016 b.n 80365ce 80365a0: 2b43 cmp r3, #67 ; 0x43 80365a2: d803 bhi.n 80365ac 80365a4: 2b41 cmp r3, #65 ; 0x41 80365a6: d20b bcs.n 80365c0 80365a8: 2b40 cmp r3, #64 ; 0x40 80365aa: e000 b.n 80365ae 80365ac: 2b44 cmp r3, #68 ; 0x44 80365ae: d119 bne.n 80365e4 80365b0: e00d b.n 80365ce { 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); 80365b2: 6963 ldr r3, [r4, #20] 80365b4: f104 0120 add.w r1, r4, #32 80365b8: 6818 ldr r0, [r3, #0] 80365ba: f7fc fffa bl 80335b2 break; 80365be: e012 b.n 80365e6 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); 80365c0: 6963 ldr r3, [r4, #20] 80365c2: f104 0120 add.w r1, r4, #32 80365c6: 6818 ldr r0, [r3, #0] 80365c8: f7fc ffde bl 8033588 break; 80365cc: e00b b.n 80365e6 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; 80365ce: 7c63 ldrb r3, [r4, #17] 80365d0: 8423 strh r3, [r4, #32] break; 80365d2: e008 b.n 80365e6 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); 80365d4: 7c60 ldrb r0, [r4, #17] 80365d6: 6961 ldr r1, [r4, #20] 80365d8: 0880 lsrs r0, r0, #2 80365da: f104 0220 add.w r2, r4, #32 80365de: f7fc fffd bl 80335dc break; 80365e2: e000 b.n 80365e6 default: /* unsupported type */ vb->vlen = 0; 80365e4: 8427 strh r7, [r4, #32] break; }; /* encoding length of value length field */ snmp_asn1_enc_length_cnt(vb->vlen, &vb->vlenlen); 80365e6: 8c20 ldrh r0, [r4, #32] 80365e8: f104 011a add.w r1, r4, #26 80365ec: f7fc ffc1 bl 8033572 snmp_asn1_enc_oid_cnt(vb->ident_len, vb->ident, &vb->olen); 80365f0: f104 021e add.w r2, r4, #30 80365f4: 7a20 ldrb r0, [r4, #8] 80365f6: 68e1 ldr r1, [r4, #12] 80365f8: f7fc fff0 bl 80335dc snmp_asn1_enc_length_cnt(vb->olen, &vb->olenlen); 80365fc: 8be0 ldrh r0, [r4, #30] 80365fe: f104 0119 add.w r1, r4, #25 8036602: f7fc ffb6 bl 8033572 vb->seqlen = 1 + vb->vlenlen + vb->vlen; 8036606: 8be3 ldrh r3, [r4, #30] 8036608: 8c20 ldrh r0, [r4, #32] 803660a: 18c0 adds r0, r0, r3 803660c: 7ea3 ldrb r3, [r4, #26] vb->seqlen += 1 + vb->olenlen + vb->olen; 803660e: 3002 adds r0, #2 8036610: 18c0 adds r0, r0, r3 8036612: 7e63 ldrb r3, [r4, #25] 8036614: 18c0 adds r0, r0, r3 8036616: b280 uxth r0, r0 8036618: 83a0 strh r0, [r4, #28] snmp_asn1_enc_length_cnt(vb->seqlen, &vb->seqlenlen); 803661a: f104 0118 add.w r1, r4, #24 803661e: f7fc ffa8 bl 8033572 /* varbind seq */ tot_len += 1 + vb->seqlenlen + vb->seqlen; 8036622: 8ba3 ldrh r3, [r4, #28] 8036624: 7e22 ldrb r2, [r4, #24] vb = vb->prev; 8036626: 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; 8036628: 3301 adds r3, #1 803662a: 189b adds r3, r3, r2 803662c: 18ed adds r5, r5, r3 803662e: b2ad uxth r5, r5 s32_t *sint_ptr; u16_t tot_len; tot_len = 0; vb = root->tail; while ( vb != NULL ) 8036630: 2c00 cmp r4, #0 8036632: d1ab bne.n 803658c vb = vb->prev; } /* varbind-list seq */ root->seqlen = tot_len; snmp_asn1_enc_length_cnt(root->seqlen, &root->seqlenlen); 8036634: 4628 mov r0, r5 vb = vb->prev; } /* varbind-list seq */ root->seqlen = tot_len; 8036636: 8175 strh r5, [r6, #10] snmp_asn1_enc_length_cnt(root->seqlen, &root->seqlenlen); 8036638: f106 0109 add.w r1, r6, #9 803663c: f7fc ff99 bl 8033572 tot_len += 1 + root->seqlenlen; 8036640: 7a73 ldrb r3, [r6, #9] 8036642: 3301 adds r3, #1 8036644: 18e8 adds r0, r5, r3 return tot_len; } 8036646: b280 uxth r0, r0 8036648: bdf8 pop {r3, r4, r5, r6, r7, pc} 803664a: 0000 movs r0, r0 0803664c : * @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) { 803664c: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8036650: 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); 8036652: 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) { 8036656: 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); 8036658: 6940 ldr r0, [r0, #20] 803665a: f504 7190 add.w r1, r4, #288 ; 0x120 803665e: f7fc ffa8 bl 80335b2 snmp_asn1_enc_length_cnt(rhl->erridxlen, &rhl->erridxlenlen); 8036662: f8b4 0120 ldrh.w r0, [r4, #288] ; 0x120 8036666: 4629 mov r1, r5 8036668: f7fc ff83 bl 8033572 tot_len += 1 + rhl->erridxlenlen + rhl->erridxlen; snmp_asn1_enc_s32t_cnt(m_stat->error_status, &rhl->errstatlen); 803666c: 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; 803666e: f894 8118 ldrb.w r8, [r4, #280] ; 0x118 8036672: f8b4 a120 ldrh.w sl, [r4, #288] ; 0x120 snmp_asn1_enc_s32t_cnt(m_stat->error_status, &rhl->errstatlen); 8036676: f504 7191 add.w r1, r4, #290 ; 0x122 803667a: f7fc ff9a bl 80335b2 snmp_asn1_enc_length_cnt(rhl->errstatlen, &rhl->errstatlenlen); 803667e: 1c69 adds r1, r5, #1 8036680: f8b4 0122 ldrh.w r0, [r4, #290] ; 0x122 8036684: f7fc ff75 bl 8033572 tot_len += 1 + rhl->errstatlenlen + rhl->errstatlen; 8036688: f8b4 9122 ldrh.w r9, [r4, #290] ; 0x122 snmp_asn1_enc_s32t_cnt(m_stat->rid, &rhl->ridlen); 803668c: 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; 803668e: f894 6119 ldrb.w r6, [r4, #281] ; 0x119 snmp_asn1_enc_s32t_cnt(m_stat->rid, &rhl->ridlen); 8036692: f504 7192 add.w r1, r4, #292 ; 0x124 8036696: f7fc ff8c bl 80335b2 snmp_asn1_enc_length_cnt(rhl->ridlen, &rhl->ridlenlen); 803669a: f8b4 0124 ldrh.w r0, [r4, #292] ; 0x124 803669e: f504 718d add.w r1, r4, #282 ; 0x11a 80366a2: f7fc ff66 bl 8033572 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; 80366a6: 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; 80366a8: f8b4 3124 ldrh.w r3, [r4, #292] ; 0x124 80366ac: f109 0903 add.w r9, r9, #3 80366b0: 4499 add r9, r3 80366b2: 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; 80366b6: f894 311a ldrb.w r3, [r4, #282] ; 0x11a 80366ba: 4446 add r6, r8 80366bc: 18f6 adds r6, r6, r3 80366be: fa17 f686 uxtah r6, r7, r6 80366c2: b2b6 uxth r6, r6 rhl->pdulen = tot_len; snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); 80366c4: 1ce9 adds r1, r5, #3 80366c6: 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; 80366c8: f8a4 6126 strh.w r6, [r4, #294] ; 0x126 snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); 80366cc: f7fc ff51 bl 8033572 tot_len += 1 + rhl->pdulenlen; rhl->comlen = m_stat->com_strlen; 80366d0: 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; 80366d4: f894 811b ldrb.w r8, [r4, #283] ; 0x11b rhl->comlen = m_stat->com_strlen; 80366d8: f8a4 0128 strh.w r0, [r4, #296] ; 0x128 snmp_asn1_enc_length_cnt(rhl->comlen, &rhl->comlenlen); 80366dc: f504 718e add.w r1, r4, #284 ; 0x11c 80366e0: f7fc ff47 bl 8033572 tot_len += 1 + rhl->comlenlen + rhl->comlen; snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); 80366e4: 4b14 ldr r3, [pc, #80] ; (8036738 ) 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; 80366e6: f894 711c ldrb.w r7, [r4, #284] ; 0x11c snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); 80366ea: 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; 80366ec: f8b4 9128 ldrh.w r9, [r4, #296] ; 0x128 snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); 80366f0: f504 7195 add.w r1, r4, #298 ; 0x12a 80366f4: f7fc ff5d bl 80335b2 snmp_asn1_enc_length_cnt(rhl->verlen, &rhl->verlenlen); 80366f8: 1d69 adds r1, r5, #5 80366fa: f8b4 012a ldrh.w r0, [r4, #298] ; 0x12a 80366fe: f7fc ff38 bl 8033572 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; 8036702: 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; 8036706: 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; 803670a: 444d add r5, r9 803670c: 3503 adds r5, #3 803670e: 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; 8036710: 197d adds r5, r7, r5 8036712: 18ed adds r5, r5, r3 8036714: fa16 f585 uxtah r5, r6, r5 8036718: b2ad uxth r5, r5 rhl->seqlen = tot_len; snmp_asn1_enc_length_cnt(rhl->seqlen, &rhl->seqlenlen); 803671a: 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; 803671c: f8a4 512c strh.w r5, [r4, #300] ; 0x12c snmp_asn1_enc_length_cnt(rhl->seqlen, &rhl->seqlenlen); 8036720: f504 718f add.w r1, r4, #286 ; 0x11e 8036724: f7fc ff25 bl 8033572 tot_len += 1 + rhl->seqlenlen; 8036728: f894 311e ldrb.w r3, [r4, #286] ; 0x11e 803672c: 3301 adds r3, #1 803672e: 18e8 adds r0, r5, r3 return tot_len; } 8036730: b280 uxth r0, r0 8036732: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 8036736: bf00 nop 8036738: 08045768 .word 0x08045768 0803673c : /** * 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) { 803673c: b570 push {r4, r5, r6, lr} 803673e: 4616 mov r6, r2 8036740: 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; 8036742: 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) { 8036744: 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)); 8036746: 4608 mov r0, r1 ofs += 1; 8036748: 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)); 803674a: 4611 mov r1, r2 803674c: 2230 movs r2, #48 ; 0x30 803674e: f7fc ff5d bl 803360c ofs += 1; snmp_asn1_enc_length(p, ofs, root->seqlen); 8036752: 4628 mov r0, r5 8036754: 4631 mov r1, r6 8036756: 8962 ldrh r2, [r4, #10] 8036758: f7fc ff6c bl 8033634 ofs += root->seqlenlen; 803675c: 7a63 ldrb r3, [r4, #9] 803675e: e064 b.n 803682a vb = root->head; while ( vb != NULL ) { snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); 8036760: 4631 mov r1, r6 ofs += 1; 8036762: 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)); 8036764: 2230 movs r2, #48 ; 0x30 ofs += 1; 8036766: 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)); 8036768: 4628 mov r0, r5 803676a: f7fc ff4f bl 803360c ofs += 1; snmp_asn1_enc_length(p, ofs, vb->seqlen); 803676e: 4631 mov r1, r6 8036770: 8ba2 ldrh r2, [r4, #28] 8036772: 4628 mov r0, r5 8036774: f7fc ff5e bl 8033634 ofs += vb->seqlenlen; 8036778: 7e23 ldrb r3, [r4, #24] 803677a: 18f6 adds r6, r6, r3 803677c: b2b6 uxth r6, r6 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); 803677e: 4631 mov r1, r6 ofs += 1; 8036780: 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)); 8036782: 2206 movs r2, #6 ofs += 1; 8036784: 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)); 8036786: 4628 mov r0, r5 8036788: f7fc ff40 bl 803360c ofs += 1; snmp_asn1_enc_length(p, ofs, vb->olen); 803678c: 4631 mov r1, r6 803678e: 8be2 ldrh r2, [r4, #30] 8036790: 4628 mov r0, r5 8036792: f7fc ff4f bl 8033634 ofs += vb->olenlen; 8036796: 7e63 ldrb r3, [r4, #25] snmp_asn1_enc_oid(p, ofs, vb->ident_len, &vb->ident[0]); 8036798: 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; 803679a: 18f6 adds r6, r6, r3 803679c: b2b6 uxth r6, r6 snmp_asn1_enc_oid(p, ofs, vb->ident_len, &vb->ident[0]); 803679e: 4631 mov r1, r6 80367a0: 68e3 ldr r3, [r4, #12] 80367a2: 4628 mov r0, r5 80367a4: f7fc fffb bl 803379e ofs += vb->olen; 80367a8: 8be3 ldrh r3, [r4, #30] snmp_asn1_enc_type(p, ofs, vb->value_type); 80367aa: 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; 80367ac: 18f6 adds r6, r6, r3 80367ae: b2b6 uxth r6, r6 snmp_asn1_enc_type(p, ofs, vb->value_type); 80367b0: 4631 mov r1, r6 ofs += 1; 80367b2: 3601 adds r6, #1 80367b4: 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); 80367b6: 4628 mov r0, r5 80367b8: f7fc ff28 bl 803360c ofs += 1; snmp_asn1_enc_length(p, ofs, vb->vlen); 80367bc: 4631 mov r1, r6 80367be: 4628 mov r0, r5 80367c0: 8c22 ldrh r2, [r4, #32] 80367c2: f7fc ff37 bl 8033634 ofs += vb->vlenlen; 80367c6: 7ea3 ldrb r3, [r4, #26] 80367c8: 18f6 adds r6, r6, r3 switch (vb->value_type) 80367ca: 7c23 ldrb r3, [r4, #16] 80367cc: 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; 80367ce: b2b6 uxth r6, r6 switch (vb->value_type) 80367d0: d01c beq.n 803680c 80367d2: d806 bhi.n 80367e2 80367d4: 2b04 cmp r3, #4 80367d6: d019 beq.n 803680c 80367d8: 2b06 cmp r3, #6 80367da: d01e beq.n 803681a 80367dc: 2b02 cmp r3, #2 80367de: d123 bne.n 8036828 80367e0: e004 b.n 80367ec 80367e2: 2b43 cmp r3, #67 ; 0x43 80367e4: d90a bls.n 80367fc 80367e6: 2b44 cmp r3, #68 ; 0x44 80367e8: d11e bne.n 8036828 80367ea: e00f b.n 803680c { 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); 80367ec: 6963 ldr r3, [r4, #20] 80367ee: 8c22 ldrh r2, [r4, #32] 80367f0: 681b ldr r3, [r3, #0] 80367f2: 4628 mov r0, r5 80367f4: 4631 mov r1, r6 80367f6: f7fc ffa5 bl 8033744 break; 80367fa: e015 b.n 8036828 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); 80367fc: 6963 ldr r3, [r4, #20] 80367fe: 8c22 ldrh r2, [r4, #32] 8036800: 681b ldr r3, [r3, #0] 8036802: 4628 mov r0, r5 8036804: 4631 mov r1, r6 8036806: f7fc ff5d bl 80336c4 break; 803680a: e00d b.n 8036828 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); 803680c: 4628 mov r0, r5 803680e: 4631 mov r1, r6 8036810: 8c22 ldrh r2, [r4, #32] 8036812: 6963 ldr r3, [r4, #20] 8036814: f7fd f836 bl 8033884 break; 8036818: e006 b.n 8036828 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); 803681a: 7c62 ldrb r2, [r4, #17] 803681c: 6963 ldr r3, [r4, #20] 803681e: 4628 mov r0, r5 8036820: 4631 mov r1, r6 8036822: 0892 lsrs r2, r2, #2 8036824: f7fc ffbb bl 803379e break; default: /* unsupported type */ break; }; ofs += vb->vlen; 8036828: 8c23 ldrh r3, [r4, #32] vb = vb->next; 803682a: 6824 ldr r4, [r4, #0] break; default: /* unsupported type */ break; }; ofs += vb->vlen; 803682c: 18f6 adds r6, r6, r3 803682e: b2b6 uxth r6, r6 ofs += 1; snmp_asn1_enc_length(p, ofs, root->seqlen); ofs += root->seqlenlen; vb = root->head; while ( vb != NULL ) 8036830: 2c00 cmp r4, #0 8036832: d195 bne.n 8036760 }; ofs += vb->vlen; vb = vb->next; } return ofs; } 8036834: 4630 mov r0, r6 8036836: bd70 pop {r4, r5, r6, pc} 08036838 : * @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) 8036838: b908 cbnz r0, 803683e { trap_dst[dst_idx].enable = enable; 803683a: 4b01 ldr r3, [pc, #4] ; (8036840 ) 803683c: 7119 strb r1, [r3, #4] 803683e: 4770 bx lr 8036840: 2000f81c .word 0x2000f81c 08036844 : * @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) 8036844: b918 cbnz r0, 803684e { ip_addr_set(&trap_dst[dst_idx].dip, dst); 8036846: b101 cbz r1, 803684a 8036848: 6809 ldr r1, [r1, #0] 803684a: 4b01 ldr r3, [pc, #4] ; (8036850 ) 803684c: 6019 str r1, [r3, #0] 803684e: 4770 bx lr 8036850: 2000f81c .word 0x2000f81c 08036854 : * @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) { 8036854: b5f0 push {r4, r5, r6, r7, lr} 8036856: 4604 mov r4, r0 8036858: b085 sub sp, #20 struct snmp_varbind_root emptyvb = {NULL, NULL, 0, 0, 0}; 803685a: 220c movs r2, #12 803685c: 2100 movs r1, #0 803685e: 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); 8036860: 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}; 8036864: f7eb f94c bl 8021b00 struct pbuf *p; u16_t tot_len; err_t err; /* pass 0, calculate length fields */ tot_len = snmp_varbind_list_sum(&m_stat->outvb); 8036868: 4630 mov r0, r6 803686a: f7ff fe89 bl 8036580 803686e: 4601 mov r1, r0 tot_len = snmp_resp_header_sum(m_stat, tot_len); 8036870: 4620 mov r0, r4 8036872: f7ff feeb bl 803664c /* try allocating pbuf(s) for complete response */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 8036876: 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); 8036878: 4601 mov r1, r0 /* try allocating pbuf(s) for complete response */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 803687a: 2000 movs r0, #0 803687c: f7f9 fa93 bl 802fda6 if (p == NULL) 8036880: 4605 mov r5, r0 8036882: b990 cbnz r0, 80368aa { 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; 8036884: 2301 movs r3, #1 8036886: 6123 str r3, [r4, #16] m_stat->error_index = 0; 8036888: 6160 str r0, [r4, #20] /* pass 0, recalculate lengths, for empty varbind-list */ tot_len = snmp_varbind_list_sum(&emptyvb); 803688a: a801 add r0, sp, #4 803688c: f7ff fe78 bl 8036580 8036890: 4601 mov r1, r0 tot_len = snmp_resp_header_sum(m_stat, tot_len); 8036892: 4620 mov r0, r4 8036894: f7ff feda bl 803664c /* retry allocation once for header and empty varbind-list */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 8036898: 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); 803689a: 4601 mov r1, r0 /* retry allocation once for header and empty varbind-list */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 803689c: 4628 mov r0, r5 803689e: f7f9 fa82 bl 802fda6 } if (p != NULL) 80368a2: 4605 mov r5, r0 80368a4: 2800 cmp r0, #0 80368a6: f000 80dc beq.w 8036a62 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)); 80368aa: 2100 movs r1, #0 80368ac: 2230 movs r2, #48 ; 0x30 80368ae: 4628 mov r0, r5 80368b0: f7fc feac bl 803360c ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.seqlen); 80368b4: 2101 movs r1, #1 80368b6: f8b4 212c ldrh.w r2, [r4, #300] ; 0x12c 80368ba: 4628 mov r0, r5 80368bc: f7fc feba bl 8033634 ofs += m_stat->rhl.seqlenlen; 80368c0: f894 711e ldrb.w r7, [r4, #286] ; 0x11e snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 80368c4: 2202 movs r2, #2 80368c6: 1c79 adds r1, r7, #1 80368c8: 4628 mov r0, r5 ofs += 1; 80368ca: 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)); 80368cc: f7fc fe9e bl 803360c ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.verlen); 80368d0: 4639 mov r1, r7 80368d2: f8b4 212a ldrh.w r2, [r4, #298] ; 0x12a 80368d6: 4628 mov r0, r5 80368d8: f7fc feac bl 8033634 ofs += m_stat->rhl.verlenlen; 80368dc: f894 311d ldrb.w r3, [r4, #285] ; 0x11d snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.verlen, snmp_version); 80368e0: 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; 80368e4: 18ff adds r7, r7, r3 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.verlen, snmp_version); 80368e6: 4b61 ldr r3, [pc, #388] ; (8036a6c ) 80368e8: 4639 mov r1, r7 80368ea: 681b ldr r3, [r3, #0] 80368ec: 4628 mov r0, r5 80368ee: f7fc ff29 bl 8033744 ofs += m_stat->rhl.verlen; 80368f2: f8b4 312a ldrh.w r3, [r4, #298] ; 0x12a 80368f6: 18ff adds r7, r7, r3 80368f8: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); 80368fa: 4639 mov r1, r7 ofs += 1; 80368fc: 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)); 80368fe: 2204 movs r2, #4 ofs += 1; 8036900: 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)); 8036902: 4628 mov r0, r5 8036904: f7fc fe82 bl 803360c ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.comlen); 8036908: 4639 mov r1, r7 803690a: f8b4 2128 ldrh.w r2, [r4, #296] ; 0x128 803690e: 4628 mov r0, r5 8036910: f7fc fe90 bl 8033634 ofs += m_stat->rhl.comlenlen; 8036914: f894 311c ldrb.w r3, [r4, #284] ; 0x11c snmp_asn1_enc_raw(p, ofs, m_stat->rhl.comlen, m_stat->community); 8036918: 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; 803691c: 18ff adds r7, r7, r3 803691e: b2bf uxth r7, r7 snmp_asn1_enc_raw(p, ofs, m_stat->rhl.comlen, m_stat->community); 8036920: 4639 mov r1, r7 8036922: f104 0318 add.w r3, r4, #24 8036926: 4628 mov r0, r5 8036928: f7fc ffac bl 8033884 ofs += m_stat->rhl.comlen; 803692c: f8b4 3128 ldrh.w r3, [r4, #296] ; 0x128 8036930: 18ff adds r7, r7, r3 8036932: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_RESP)); 8036934: 4639 mov r1, r7 ofs += 1; 8036936: 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)); 8036938: 22a2 movs r2, #162 ; 0xa2 ofs += 1; 803693a: 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)); 803693c: 4628 mov r0, r5 803693e: f7fc fe65 bl 803360c ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.pdulen); 8036942: 4639 mov r1, r7 8036944: f8b4 2126 ldrh.w r2, [r4, #294] ; 0x126 8036948: 4628 mov r0, r5 803694a: f7fc fe73 bl 8033634 ofs += m_stat->rhl.pdulenlen; 803694e: f894 311b ldrb.w r3, [r4, #283] ; 0x11b 8036952: 18ff adds r7, r7, r3 8036954: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8036956: 4639 mov r1, r7 ofs += 1; 8036958: 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)); 803695a: 2202 movs r2, #2 ofs += 1; 803695c: 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)); 803695e: 4628 mov r0, r5 8036960: f7fc fe54 bl 803360c ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.ridlen); 8036964: 4639 mov r1, r7 8036966: f8b4 2124 ldrh.w r2, [r4, #292] ; 0x124 803696a: 4628 mov r0, r5 803696c: f7fc fe62 bl 8033634 ofs += m_stat->rhl.ridlenlen; 8036970: f894 311a ldrb.w r3, [r4, #282] ; 0x11a snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.ridlen, m_stat->rid); 8036974: 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; 8036978: 18ff adds r7, r7, r3 803697a: b2bf uxth r7, r7 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.ridlen, m_stat->rid); 803697c: 4639 mov r1, r7 803697e: 68e3 ldr r3, [r4, #12] 8036980: 4628 mov r0, r5 8036982: f7fc fedf bl 8033744 ofs += m_stat->rhl.ridlen; 8036986: f8b4 3124 ldrh.w r3, [r4, #292] ; 0x124 803698a: 18ff adds r7, r7, r3 803698c: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 803698e: 4639 mov r1, r7 ofs += 1; 8036990: 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)); 8036992: 2202 movs r2, #2 ofs += 1; 8036994: 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)); 8036996: 4628 mov r0, r5 8036998: f7fc fe38 bl 803360c ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.errstatlen); 803699c: 4639 mov r1, r7 803699e: f8b4 2122 ldrh.w r2, [r4, #290] ; 0x122 80369a2: 4628 mov r0, r5 80369a4: f7fc fe46 bl 8033634 ofs += m_stat->rhl.errstatlenlen; 80369a8: f894 3119 ldrb.w r3, [r4, #281] ; 0x119 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.errstatlen, m_stat->error_status); 80369ac: 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; 80369b0: 18ff adds r7, r7, r3 80369b2: b2bf uxth r7, r7 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.errstatlen, m_stat->error_status); 80369b4: 4639 mov r1, r7 80369b6: 6923 ldr r3, [r4, #16] 80369b8: 4628 mov r0, r5 80369ba: f7fc fec3 bl 8033744 ofs += m_stat->rhl.errstatlen; 80369be: f8b4 3122 ldrh.w r3, [r4, #290] ; 0x122 80369c2: 18ff adds r7, r7, r3 80369c4: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 80369c6: 4639 mov r1, r7 ofs += 1; 80369c8: 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)); 80369ca: 2202 movs r2, #2 ofs += 1; 80369cc: 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)); 80369ce: 4628 mov r0, r5 80369d0: f7fc fe1c bl 803360c ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.erridxlen); 80369d4: 4639 mov r1, r7 80369d6: f8b4 2120 ldrh.w r2, [r4, #288] ; 0x120 80369da: 4628 mov r0, r5 80369dc: f7fc fe2a bl 8033634 ofs += m_stat->rhl.erridxlenlen; 80369e0: f894 3118 ldrb.w r3, [r4, #280] ; 0x118 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.erridxlen, m_stat->error_index); 80369e4: 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; 80369e8: 18ff adds r7, r7, r3 80369ea: b2bf uxth r7, r7 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.erridxlen, m_stat->error_index); 80369ec: 4639 mov r1, r7 80369ee: 6963 ldr r3, [r4, #20] 80369f0: 4628 mov r0, r5 80369f2: f7fc fea7 bl 8033744 ofs += m_stat->rhl.erridxlen; 80369f6: f8b4 3120 ldrh.w r3, [r4, #288] ; 0x120 80369fa: 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); 80369fc: 4630 mov r0, r6 80369fe: 4629 mov r1, r5 8036a00: b292 uxth r2, r2 8036a02: f7ff fe9b bl 803673c switch (m_stat->error_status) 8036a06: 6923 ldr r3, [r4, #16] 8036a08: 3b01 subs r3, #1 8036a0a: 2b04 cmp r3, #4 8036a0c: d80f bhi.n 8036a2e 8036a0e: e8df f003 tbb [pc, r3] 8036a12: 0603 .short 0x0603 8036a14: 0e09 .short 0x0e09 8036a16: 0c .byte 0x0c 8036a17: 00 .byte 0x00 { case SNMP_ES_TOOBIG: snmp_inc_snmpouttoobigs(); 8036a18: f7fe fa0c bl 8034e34 break; 8036a1c: e007 b.n 8036a2e case SNMP_ES_NOSUCHNAME: snmp_inc_snmpoutnosuchnames(); 8036a1e: f7fe fa11 bl 8034e44 break; 8036a22: e004 b.n 8036a2e case SNMP_ES_BADVALUE: snmp_inc_snmpoutbadvalues(); 8036a24: f7fe fa16 bl 8034e54 break; 8036a28: e001 b.n 8036a2e case SNMP_ES_GENERROR: snmp_inc_snmpoutgenerrs(); 8036a2a: f7fe fa1b bl 8034e64 break; } snmp_inc_snmpoutgetresponses(); 8036a2e: f7fe fa21 bl 8034e74 snmp_inc_snmpoutpkts(); 8036a32: f7fe f97f bl 8034d34 /** @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); 8036a36: 8922 ldrh r2, [r4, #8] 8036a38: 6820 ldr r0, [r4, #0] 8036a3a: 1d21 adds r1, r4, #4 8036a3c: f7fb ffa2 bl 8032984 err = udp_send(m_stat->pcb, p); 8036a40: 4629 mov r1, r5 8036a42: 6820 ldr r0, [r4, #0] 8036a44: f7fb ff99 bl 803297a /** @todo release some memory, retry and return tooBig? tooMuchHassle? */ err = ERR_MEM; } else { err = ERR_OK; 8036a48: f1b0 3fff cmp.w r0, #4294967295 8036a4c: bf0c ite eq 8036a4e: f04f 36ff moveq.w r6, #4294967295 8036a52: 2600 movne r6, #0 } /** disassociate remote address and port with this pcb */ udp_disconnect(m_stat->pcb); 8036a54: 6820 ldr r0, [r4, #0] 8036a56: f7fb ffbb bl 80329d0 pbuf_free(p); 8036a5a: 4628 mov r0, r5 8036a5c: f7f9 f956 bl 802fd0c 8036a60: e000 b.n 8036a64 } else { /* first pbuf alloc try or retry alloc failed very low on memory, couldn't return tooBig */ return ERR_MEM; 8036a62: 26ff movs r6, #255 ; 0xff } } 8036a64: b270 sxtb r0, r6 8036a66: b005 add sp, #20 8036a68: bdf0 pop {r4, r5, r6, r7, pc} 8036a6a: bf00 nop 8036a6c: 08045768 .word 0x08045768 08036a70 : * 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) { 8036a70: 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)) 8036a74: 4b11 ldr r3, [pc, #68] ; (8036abc ) * 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) { 8036a76: 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)) 8036a78: 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) { 8036a7a: b085 sub sp, #20 8036a7c: 4605 mov r5, r0 8036a7e: 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)) 8036a80: 2a00 cmp r2, #0 8036a82: f000 81b8 beq.w 8036df6 8036a86: 6818 ldr r0, [r3, #0] 8036a88: 2800 cmp r0, #0 8036a8a: f000 81b4 beq.w 8036df6 { /* network order trap destination */ ip_addr_copy(trap_msg.dip, td->dip); 8036a8e: 4c0c ldr r4, [pc, #48] ; (8036ac0 ) 8036a90: 6060 str r0, [r4, #4] /* lookup current source address for this dst */ dst_if = ip_route(&td->dip); 8036a92: 4618 mov r0, r3 8036a94: f7fc f9e6 bl 8032e64 ip_addr_copy(dst_ip, dst_if->ip_addr); 8036a98: 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; 8036a9a: 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); 8036a9c: 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); 8036aa0: 7323 strb r3, [r4, #12] trap_msg.sip_raw[1] = ip4_addr2(&dst_ip); 8036aa2: 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) 8036aa4: 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); 8036aa6: f3c3 4207 ubfx r2, r3, #16, #8 trap_msg.sip_raw[3] = ip4_addr4(&dst_ip); 8036aaa: 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); 8036aae: 73a2 strb r2, [r4, #14] trap_msg.sip_raw[3] = ip4_addr4(&dst_ip); 8036ab0: 73e3 strb r3, [r4, #15] trap_msg.gen_trap = generic_trap; trap_msg.spc_trap = specific_trap; 8036ab2: 6167 str r7, [r4, #20] if (generic_trap == SNMP_GENTRAP_ENTERPRISESPC) 8036ab4: d106 bne.n 8036ac4 { /* enterprise-Specific trap */ trap_msg.enterprise = eoid; 8036ab6: 60a6 str r6, [r4, #8] 8036ab8: e008 b.n 8036acc 8036aba: bf00 nop 8036abc: 2000f81c .word 0x2000f81c 8036ac0: 2000f824 .word 0x2000f824 } else { /* generic (MIB-II) trap */ snmp_get_snmpgrpid_ptr(&trap_msg.enterprise); 8036ac4: f104 0008 add.w r0, r4, #8 8036ac8: f7fe f9e4 bl 8034e94 } snmp_get_sysuptime(&trap_msg.ts); 8036acc: 48bb ldr r0, [pc, #748] ; (8036dbc ) struct snmp_trap_header_lengths *thl; thl = &m_trap->thl; tot_len = vb_len; snmp_asn1_enc_u32t_cnt(m_trap->ts, &thl->tslen); 8036ace: 4cbc ldr r4, [pc, #752] ; (8036dc0 ) else { /* generic (MIB-II) trap */ snmp_get_snmpgrpid_ptr(&trap_msg.enterprise); } snmp_get_sysuptime(&trap_msg.ts); 8036ad0: f7fd fd42 bl 8034558 /* pass 0, calculate length fields */ tot_len = snmp_varbind_list_sum(&trap_msg.outvb); 8036ad4: 48bb ldr r0, [pc, #748] ; (8036dc4 ) 8036ad6: f7ff fd53 bl 8036580 struct snmp_trap_header_lengths *thl; thl = &m_trap->thl; tot_len = vb_len; snmp_asn1_enc_u32t_cnt(m_trap->ts, &thl->tslen); 8036ada: 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); 8036ade: 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); 8036ae0: 69a0 ldr r0, [r4, #24] 8036ae2: f7fc fd51 bl 8033588 snmp_asn1_enc_length_cnt(thl->tslen, &thl->tslenlen); 8036ae6: 8e60 ldrh r0, [r4, #50] ; 0x32 8036ae8: f104 0128 add.w r1, r4, #40 ; 0x28 8036aec: f7fc fd41 bl 8033572 tot_len += 1 + thl->tslen + thl->tslenlen; 8036af0: f8b4 c032 ldrh.w ip, [r4, #50] ; 0x32 snmp_asn1_enc_s32t_cnt(m_trap->spc_trap, &thl->strplen); 8036af4: 6960 ldr r0, [r4, #20] 8036af6: f8cd c004 str.w ip, [sp, #4] 8036afa: 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; 8036afe: f894 9028 ldrb.w r9, [r4, #40] ; 0x28 snmp_asn1_enc_s32t_cnt(m_trap->spc_trap, &thl->strplen); 8036b02: f7fc fd56 bl 80335b2 snmp_asn1_enc_length_cnt(thl->strplen, &thl->strplenlen); 8036b06: 8ea0 ldrh r0, [r4, #52] ; 0x34 8036b08: f104 0129 add.w r1, r4, #41 ; 0x29 8036b0c: f7fc fd31 bl 8033572 tot_len += 1 + thl->strplen + thl->strplenlen; 8036b10: 8ea3 ldrh r3, [r4, #52] ; 0x34 snmp_asn1_enc_s32t_cnt(m_trap->gen_trap, &thl->gtrplen); 8036b12: 6920 ldr r0, [r4, #16] 8036b14: 9302 str r3, [sp, #8] 8036b16: 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; 8036b1a: 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; 8036b1e: 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); 8036b20: f7fc fd47 bl 80335b2 snmp_asn1_enc_length_cnt(thl->gtrplen, &thl->gtrplenlen); 8036b24: 8ee0 ldrh r0, [r4, #54] ; 0x36 8036b26: f104 012a add.w r1, r4, #42 ; 0x2a 8036b2a: f7fc fd22 bl 8033572 tot_len += 1 + thl->gtrplen + thl->gtrplenlen; thl->aaddrlen = 4; snmp_asn1_enc_length_cnt(thl->aaddrlen, &thl->aaddrlenlen); 8036b2e: 4628 mov r0, r5 8036b30: 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; 8036b34: f8b4 b036 ldrh.w fp, [r4, #54] ; 0x36 8036b38: f894 702a ldrb.w r7, [r4, #42] ; 0x2a thl->aaddrlen = 4; 8036b3c: 8725 strh r5, [r4, #56] ; 0x38 snmp_asn1_enc_length_cnt(thl->aaddrlen, &thl->aaddrlenlen); 8036b3e: f7fc fd18 bl 8033572 tot_len += 1 + thl->aaddrlen + thl->aaddrlenlen; 8036b42: f894 202b ldrb.w r2, [r4, #43] ; 0x2b snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); 8036b46: 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; 8036b48: 9203 str r2, [sp, #12] snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); 8036b4a: 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; 8036b4e: f8b4 a038 ldrh.w sl, [r4, #56] ; 0x38 snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); 8036b52: f104 023a add.w r2, r4, #58 ; 0x3a 8036b56: f7fc fd41 bl 80335dc snmp_asn1_enc_length_cnt(thl->eidlen, &thl->eidlenlen); 8036b5a: 8f60 ldrh r0, [r4, #58] ; 0x3a 8036b5c: f104 012c add.w r1, r4, #44 ; 0x2c 8036b60: f7fc fd07 bl 8033572 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; 8036b64: f8dd c004 ldr.w ip, [sp, #4] 8036b68: 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; 8036b6a: 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; 8036b6c: 4463 add r3, ip 8036b6e: 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; 8036b70: 449b add fp, r3 8036b72: 44da add sl, fp 8036b74: 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; 8036b78: 44d1 add r9, sl 8036b7a: 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; 8036b7c: 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; 8036b7e: 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; 8036b82: 19df adds r7, r3, r7 8036b84: f894 302c ldrb.w r3, [r4, #44] ; 0x2c 8036b88: 18ff adds r7, r7, r3 8036b8a: fa16 f687 uxtah r6, r6, r7 8036b8e: b2b6 uxth r6, r6 thl->pdulen = tot_len; snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); 8036b90: 4630 mov r0, r6 8036b92: f104 012d add.w r1, r4, #45 ; 0x2d tot_len += 1 + thl->pdulenlen; thl->comlen = sizeof(snmp_publiccommunity) - 1; 8036b96: 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; 8036b98: 87a6 strh r6, [r4, #60] ; 0x3c snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); 8036b9a: f7fc fcea bl 8033572 tot_len += 1 + thl->pdulenlen; thl->comlen = sizeof(snmp_publiccommunity) - 1; snmp_asn1_enc_length_cnt(thl->comlen, &thl->comlenlen); 8036b9e: 4638 mov r0, r7 8036ba0: 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; 8036ba4: f894 a02d ldrb.w sl, [r4, #45] ; 0x2d thl->comlen = sizeof(snmp_publiccommunity) - 1; 8036ba8: 87e7 strh r7, [r4, #62] ; 0x3e snmp_asn1_enc_length_cnt(thl->comlen, &thl->comlenlen); 8036baa: f7fc fce2 bl 8033572 tot_len += 1 + thl->comlenlen + thl->comlen; snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); 8036bae: 4b86 ldr r3, [pc, #536] ; (8036dc8 ) 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; 8036bb0: f894 902e ldrb.w r9, [r4, #46] ; 0x2e snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); 8036bb4: 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; 8036bb8: f8b4 b03e ldrh.w fp, [r4, #62] ; 0x3e snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); 8036bbc: 4640 mov r0, r8 8036bbe: f104 0140 add.w r1, r4, #64 ; 0x40 8036bc2: f7fc fcf6 bl 80335b2 snmp_asn1_enc_length_cnt(thl->verlen, &thl->verlenlen); 8036bc6: f8b4 0040 ldrh.w r0, [r4, #64] ; 0x40 8036bca: f104 012f add.w r1, r4, #47 ; 0x2f 8036bce: f7fc fcd0 bl 8033572 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; 8036bd2: f8b4 3040 ldrh.w r3, [r4, #64] ; 0x40 8036bd6: 449b add fp, r3 8036bd8: 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; 8036bdc: 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; 8036be0: 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; 8036be2: 44d1 add r9, sl 8036be4: 4499 add r9, r3 8036be6: fa16 f689 uxtah r6, r6, r9 8036bea: b2b6 uxth r6, r6 thl->seqlen = tot_len; snmp_asn1_enc_length_cnt(thl->seqlen, &thl->seqlenlen); 8036bec: 4630 mov r0, r6 8036bee: 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; 8036bf2: f8a4 6042 strh.w r6, [r4, #66] ; 0x42 snmp_asn1_enc_length_cnt(thl->seqlen, &thl->seqlenlen); 8036bf6: f7fc fcbc bl 8033572 tot_len += 1 + thl->seqlenlen; 8036bfa: f894 3030 ldrb.w r3, [r4, #48] ; 0x30 8036bfe: 3301 adds r3, #1 8036c00: 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); 8036c02: 2000 movs r0, #0 8036c04: b289 uxth r1, r1 8036c06: 2203 movs r2, #3 8036c08: f7f9 f8cd bl 802fda6 if (p != NULL) 8036c0c: 4606 mov r6, r0 8036c0e: 2800 cmp r0, #0 8036c10: f000 80f3 beq.w 8036dfa 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)); 8036c14: 2100 movs r1, #0 8036c16: 2230 movs r2, #48 ; 0x30 8036c18: f7fc fcf8 bl 803360c ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.seqlen); 8036c1c: 2101 movs r1, #1 8036c1e: f8b4 2042 ldrh.w r2, [r4, #66] ; 0x42 8036c22: 4630 mov r0, r6 8036c24: f7fc fd06 bl 8033634 ofs += m_trap->thl.seqlenlen; 8036c28: f894 9030 ldrb.w r9, [r4, #48] ; 0x30 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8036c2c: 2202 movs r2, #2 8036c2e: f109 0101 add.w r1, r9, #1 8036c32: 4630 mov r0, r6 ofs += 1; 8036c34: 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)); 8036c38: f7fc fce8 bl 803360c ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.verlen); 8036c3c: 4649 mov r1, r9 8036c3e: f8b4 2040 ldrh.w r2, [r4, #64] ; 0x40 8036c42: 4630 mov r0, r6 8036c44: f7fc fcf6 bl 8033634 ofs += m_trap->thl.verlenlen; 8036c48: f894 302f ldrb.w r3, [r4, #47] ; 0x2f snmp_asn1_enc_s32t(p, ofs, m_trap->thl.verlen, snmp_version); 8036c4c: 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; 8036c50: 4499 add r9, r3 snmp_asn1_enc_s32t(p, ofs, m_trap->thl.verlen, snmp_version); 8036c52: 4649 mov r1, r9 8036c54: 4643 mov r3, r8 8036c56: 4630 mov r0, r6 8036c58: f7fc fd74 bl 8033744 ofs += m_trap->thl.verlen; 8036c5c: f8b4 3040 ldrh.w r3, [r4, #64] ; 0x40 8036c60: 4499 add r9, r3 8036c62: fa1f f989 uxth.w r9, r9 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); 8036c66: 462a mov r2, r5 ofs += 1; 8036c68: 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)); 8036c6c: 4649 mov r1, r9 ofs += 1; 8036c6e: 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)); 8036c70: 4630 mov r0, r6 8036c72: f7fc fccb bl 803360c ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.comlen); 8036c76: 4629 mov r1, r5 8036c78: 8fe2 ldrh r2, [r4, #62] ; 0x3e 8036c7a: 4630 mov r0, r6 8036c7c: f7fc fcda bl 8033634 ofs += m_trap->thl.comlenlen; 8036c80: f894 302e ldrb.w r3, [r4, #46] ; 0x2e snmp_asn1_enc_raw(p, ofs, m_trap->thl.comlen, (u8_t *)&snmp_publiccommunity[0]); 8036c84: 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; 8036c86: 18ed adds r5, r5, r3 8036c88: b2ad uxth r5, r5 snmp_asn1_enc_raw(p, ofs, m_trap->thl.comlen, (u8_t *)&snmp_publiccommunity[0]); 8036c8a: 4629 mov r1, r5 8036c8c: 4b4f ldr r3, [pc, #316] ; (8036dcc ) 8036c8e: 4630 mov r0, r6 8036c90: f7fc fdf8 bl 8033884 ofs += m_trap->thl.comlen; 8036c94: 8fe3 ldrh r3, [r4, #62] ; 0x3e 8036c96: 18ed adds r5, r5, r3 8036c98: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_TRAP)); 8036c9a: 4629 mov r1, r5 ofs += 1; 8036c9c: 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)); 8036c9e: 22a4 movs r2, #164 ; 0xa4 ofs += 1; 8036ca0: 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)); 8036ca2: 4630 mov r0, r6 8036ca4: f7fc fcb2 bl 803360c ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.pdulen); 8036ca8: 4629 mov r1, r5 8036caa: 8fa2 ldrh r2, [r4, #60] ; 0x3c 8036cac: 4630 mov r0, r6 8036cae: f7fc fcc1 bl 8033634 ofs += m_trap->thl.pdulenlen; 8036cb2: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 8036cb6: 18ed adds r5, r5, r3 8036cb8: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); 8036cba: 4629 mov r1, r5 ofs += 1; 8036cbc: 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)); 8036cbe: 463a mov r2, r7 ofs += 1; 8036cc0: 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)); 8036cc2: 4630 mov r0, r6 8036cc4: f7fc fca2 bl 803360c ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.eidlen); 8036cc8: 4629 mov r1, r5 8036cca: 8f62 ldrh r2, [r4, #58] ; 0x3a 8036ccc: 4630 mov r0, r6 8036cce: f7fc fcb1 bl 8033634 ofs += m_trap->thl.eidlenlen; 8036cd2: f894 302c ldrb.w r3, [r4, #44] ; 0x2c 8036cd6: 18ed adds r5, r5, r3 snmp_asn1_enc_oid(p, ofs, m_trap->enterprise->len, &m_trap->enterprise->id[0]); 8036cd8: 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; 8036cda: b2ad uxth r5, r5 snmp_asn1_enc_oid(p, ofs, m_trap->enterprise->len, &m_trap->enterprise->id[0]); 8036cdc: 4629 mov r1, r5 8036cde: f813 2b04 ldrb.w r2, [r3], #4 8036ce2: 4630 mov r0, r6 8036ce4: f7fc fd5b bl 803379e ofs += m_trap->thl.eidlen; 8036ce8: 8f63 ldrh r3, [r4, #58] ; 0x3a 8036cea: 18ed adds r5, r5, r3 8036cec: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR)); 8036cee: 4629 mov r1, r5 ofs += 1; 8036cf0: 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)); 8036cf2: 2240 movs r2, #64 ; 0x40 ofs += 1; 8036cf4: 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)); 8036cf6: 4630 mov r0, r6 8036cf8: f7fc fc88 bl 803360c ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.aaddrlen); 8036cfc: 4629 mov r1, r5 8036cfe: 8f22 ldrh r2, [r4, #56] ; 0x38 8036d00: 4630 mov r0, r6 8036d02: f7fc fc97 bl 8033634 ofs += m_trap->thl.aaddrlenlen; 8036d06: f894 302b ldrb.w r3, [r4, #43] ; 0x2b snmp_asn1_enc_raw(p, ofs, m_trap->thl.aaddrlen, &m_trap->sip_raw[0]); 8036d0a: 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; 8036d0c: 18ed adds r5, r5, r3 8036d0e: b2ad uxth r5, r5 snmp_asn1_enc_raw(p, ofs, m_trap->thl.aaddrlen, &m_trap->sip_raw[0]); 8036d10: 4629 mov r1, r5 8036d12: f104 030c add.w r3, r4, #12 8036d16: 4630 mov r0, r6 8036d18: f7fc fdb4 bl 8033884 ofs += m_trap->thl.aaddrlen; 8036d1c: 8f23 ldrh r3, [r4, #56] ; 0x38 8036d1e: 18ed adds r5, r5, r3 8036d20: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8036d22: 4629 mov r1, r5 ofs += 1; 8036d24: 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)); 8036d26: 2202 movs r2, #2 ofs += 1; 8036d28: 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)); 8036d2a: 4630 mov r0, r6 8036d2c: f7fc fc6e bl 803360c ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.gtrplen); 8036d30: 4629 mov r1, r5 8036d32: 8ee2 ldrh r2, [r4, #54] ; 0x36 8036d34: 4630 mov r0, r6 8036d36: f7fc fc7d bl 8033634 ofs += m_trap->thl.gtrplenlen; 8036d3a: f894 302a ldrb.w r3, [r4, #42] ; 0x2a snmp_asn1_enc_u32t(p, ofs, m_trap->thl.gtrplen, m_trap->gen_trap); 8036d3e: 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; 8036d40: 18ed adds r5, r5, r3 8036d42: b2ad uxth r5, r5 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.gtrplen, m_trap->gen_trap); 8036d44: 4629 mov r1, r5 8036d46: 6923 ldr r3, [r4, #16] 8036d48: 4630 mov r0, r6 8036d4a: f7fc fcbb bl 80336c4 ofs += m_trap->thl.gtrplen; 8036d4e: 8ee3 ldrh r3, [r4, #54] ; 0x36 8036d50: 18ed adds r5, r5, r3 8036d52: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8036d54: 4629 mov r1, r5 ofs += 1; 8036d56: 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)); 8036d58: 2202 movs r2, #2 ofs += 1; 8036d5a: 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)); 8036d5c: 4630 mov r0, r6 8036d5e: f7fc fc55 bl 803360c ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.strplen); 8036d62: 4629 mov r1, r5 8036d64: 8ea2 ldrh r2, [r4, #52] ; 0x34 8036d66: 4630 mov r0, r6 8036d68: f7fc fc64 bl 8033634 ofs += m_trap->thl.strplenlen; 8036d6c: f894 3029 ldrb.w r3, [r4, #41] ; 0x29 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.strplen, m_trap->spc_trap); 8036d70: 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; 8036d72: 18ed adds r5, r5, r3 8036d74: b2ad uxth r5, r5 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.strplen, m_trap->spc_trap); 8036d76: 4629 mov r1, r5 8036d78: 6963 ldr r3, [r4, #20] 8036d7a: 4630 mov r0, r6 8036d7c: f7fc fca2 bl 80336c4 ofs += m_trap->thl.strplen; 8036d80: 8ea3 ldrh r3, [r4, #52] ; 0x34 8036d82: 18ed adds r5, r5, r3 8036d84: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS)); 8036d86: 4629 mov r1, r5 ofs += 1; 8036d88: 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)); 8036d8a: 2243 movs r2, #67 ; 0x43 ofs += 1; 8036d8c: 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)); 8036d8e: 4630 mov r0, r6 8036d90: f7fc fc3c bl 803360c ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.tslen); 8036d94: 4629 mov r1, r5 8036d96: 8e62 ldrh r2, [r4, #50] ; 0x32 8036d98: 4630 mov r0, r6 8036d9a: f7fc fc4b bl 8033634 ofs += m_trap->thl.tslenlen; 8036d9e: f894 3028 ldrb.w r3, [r4, #40] ; 0x28 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.tslen, m_trap->ts); 8036da2: 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; 8036da4: 18ed adds r5, r5, r3 8036da6: b2ad uxth r5, r5 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.tslen, m_trap->ts); 8036da8: 4629 mov r1, r5 8036daa: 69a3 ldr r3, [r4, #24] 8036dac: 4630 mov r0, r6 8036dae: f7fc fc89 bl 80336c4 ofs += m_trap->thl.tslen; 8036db2: 8e63 ldrh r3, [r4, #50] ; 0x32 8036db4: 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); 8036db6: 4631 mov r1, r6 8036db8: e00a b.n 8036dd0 8036dba: bf00 nop 8036dbc: 2000f83c .word 0x2000f83c 8036dc0: 2000f824 .word 0x2000f824 8036dc4: 2000f840 .word 0x2000f840 8036dc8: 08045768 .word 0x08045768 8036dcc: 0804576c .word 0x0804576c 8036dd0: b292 uxth r2, r2 8036dd2: f104 001c add.w r0, r4, #28 8036dd6: f7ff fcb1 bl 803673c snmp_inc_snmpouttraps(); 8036dda: f7fe f853 bl 8034e84 snmp_inc_snmpoutpkts(); 8036dde: f7fd ffa9 bl 8034d34 /** send to the TRAP destination */ udp_sendto(trap_msg.pcb, p, &trap_msg.dip, SNMP_TRAP_PORT); 8036de2: 4622 mov r2, r4 8036de4: 4631 mov r1, r6 8036de6: f852 0b04 ldr.w r0, [r2], #4 8036dea: 23a2 movs r3, #162 ; 0xa2 8036dec: f7fb fdb1 bl 8032952 pbuf_free(p); 8036df0: 4630 mov r0, r6 8036df2: f7f8 ff8b bl 802fd0c { return ERR_MEM; } } } return ERR_OK; 8036df6: 2000 movs r0, #0 8036df8: e000 b.n 8036dfc pbuf_free(p); } else { return ERR_MEM; 8036dfa: 20ff movs r0, #255 ; 0xff } } } return ERR_OK; } 8036dfc: b240 sxtb r0, r0 8036dfe: b005 add sp, #20 8036e00: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 08036e04 : snmp_send_trap(SNMP_GENTRAP_COLDSTART, NULL, 0); } void snmp_authfail_trap(void) { 8036e04: b507 push {r0, r1, r2, lr} u8_t enable; snmp_get_snmpenableauthentraps(&enable); 8036e06: f10d 0007 add.w r0, sp, #7 8036e0a: f7fe f849 bl 8034ea0 if (enable == 1) 8036e0e: f89d 3007 ldrb.w r3, [sp, #7] 8036e12: 2b01 cmp r3, #1 8036e14: d109 bne.n 8036e2a { trap_msg.outvb.head = NULL; 8036e16: 2100 movs r1, #0 8036e18: 4b04 ldr r3, [pc, #16] ; (8036e2c ) trap_msg.outvb.tail = NULL; trap_msg.outvb.count = 0; snmp_send_trap(SNMP_GENTRAP_AUTHFAIL, NULL, 0); 8036e1a: 2004 movs r0, #4 8036e1c: 460a mov r2, r1 { u8_t enable; snmp_get_snmpenableauthentraps(&enable); if (enable == 1) { trap_msg.outvb.head = NULL; 8036e1e: 61d9 str r1, [r3, #28] trap_msg.outvb.tail = NULL; 8036e20: 6219 str r1, [r3, #32] trap_msg.outvb.count = 0; 8036e22: f883 1024 strb.w r1, [r3, #36] ; 0x24 snmp_send_trap(SNMP_GENTRAP_AUTHFAIL, NULL, 0); 8036e26: f7ff fe23 bl 8036a70 } } 8036e2a: bd0e pop {r1, r2, r3, pc} 8036e2c: 2000f824 .word 0x2000f824 08036e30 : * @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) { 8036e30: b5f8 push {r3, r4, r5, r6, r7, lr} struct eth_hdr *ethhdr = (struct eth_hdr *)p->payload; 8036e32: 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) { 8036e34: 4606 mov r6, r0 8036e36: 460d mov r5, r1 8036e38: 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); 8036e3a: 4619 mov r1, r3 8036e3c: 2206 movs r2, #6 8036e3e: 4620 mov r0, r4 8036e40: f7ea fda4 bl 802198c ETHADDR16_COPY(ðhdr->src, src); 8036e44: 4639 mov r1, r7 8036e46: 1da0 adds r0, r4, #6 8036e48: 2206 movs r2, #6 8036e4a: f7ea fd9f bl 802198c ethhdr->type = PP_HTONS(ETHTYPE_IP); 8036e4e: 2308 movs r3, #8 8036e50: 7323 strb r3, [r4, #12] 8036e52: 2300 movs r3, #0 8036e54: 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); 8036e56: 69b3 ldr r3, [r6, #24] 8036e58: 4630 mov r0, r6 8036e5a: 4629 mov r1, r5 8036e5c: 4798 blx r3 } 8036e5e: bdf8 pop {r3, r4, r5, r6, r7, pc} 08036e60 : #endif /* ARP_QUEUEING */ /** Clean up ARP table entries */ static void etharp_free_entry(int i) { 8036e60: b570 push {r4, r5, r6, lr} /* remove from SNMP ARP index tree */ snmp_delete_arpidx_tree(arp_table[i].netif, &arp_table[i].ipaddr); 8036e62: 4d0b ldr r5, [pc, #44] ; (8036e90 ) 8036e64: 2414 movs r4, #20 8036e66: 4344 muls r4, r0 8036e68: 1929 adds r1, r5, r4 #endif /* ARP_QUEUEING */ /** Clean up ARP table entries */ static void etharp_free_entry(int i) { 8036e6a: 4606 mov r6, r0 /* remove from SNMP ARP index tree */ snmp_delete_arpidx_tree(arp_table[i].netif, &arp_table[i].ipaddr); 8036e6c: 3104 adds r1, #4 8036e6e: 6848 ldr r0, [r1, #4] 8036e70: f7fd fc4c bl 803470c /* and empty packet queue */ if (arp_table[i].q != NULL) { 8036e74: 5928 ldr r0, [r5, r4] 8036e76: b118 cbz r0, 8036e80 /* 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); 8036e78: f7f8 ff48 bl 802fd0c arp_table[i].q = NULL; 8036e7c: 2300 movs r3, #0 8036e7e: 512b str r3, [r5, r4] } /* recycle entry for re-use */ arp_table[i].state = ETHARP_STATE_EMPTY; 8036e80: 2314 movs r3, #20 8036e82: fb03 5506 mla r5, r3, r6, r5 8036e86: 2300 movs r3, #0 8036e88: 74ab strb r3, [r5, #18] 8036e8a: 3510 adds r5, #16 8036e8c: bd70 pop {r4, r5, r6, pc} 8036e8e: bf00 nop 8036e90: 2000c6fc .word 0x2000c6fc 08036e94 : * @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) { 8036e94: 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; 8036e98: 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; 8036e9a: 240a movs r4, #10 8036e9c: 4a35 ldr r2, [pc, #212] ; (8036f74 ) * @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) { 8036e9e: 9101 str r1, [sp, #4] 8036ea0: 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; 8036ea2: 46a8 mov r8, r5 8036ea4: 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) { 8036ea6: 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; 8036ea8: 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; 8036eaa: 46a4 mov ip, r4 8036eac: 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)) { 8036eae: 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; 8036eb0: 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)) { 8036eb4: d104 bne.n 8036ec0 8036eb6: f1b9 0f00 cmp.w r9, #0 8036eba: d104 bne.n 8036ec6 LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_find_entry: found empty entry %"U16_F"\n", (u16_t)i)); /* remember first empty entry */ empty = i; 8036ebc: b2df uxtb r7, r3 8036ebe: e023 b.n 8036f08 } else if (state != ETHARP_STATE_EMPTY) { 8036ec0: f1b9 0f00 cmp.w r9, #0 8036ec4: d020 beq.n 8036f08 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)) { 8036ec6: b12e cbz r6, 8036ed4 8036ec8: 6830 ldr r0, [r6, #0] 8036eca: 6851 ldr r1, [r2, #4] 8036ecc: 4288 cmp r0, r1 8036ece: d101 bne.n 8036ed4 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; 8036ed0: 4618 mov r0, r3 8036ed2: e04b b.n 8036f6c } /* pending entry? */ if (state == ETHARP_STATE_PENDING) { 8036ed4: f1b9 0f01 cmp.w r9, #1 8036ed8: d10e bne.n 8036ef8 /* pending with queued packets? */ if (arp_table[i].q != NULL) { 8036eda: 6810 ldr r0, [r2, #0] if (arp_table[i].ctime >= age_queue) { 8036edc: 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) { 8036ee0: b120 cbz r0, 8036eec if (arp_table[i].ctime >= age_queue) { 8036ee2: 45a9 cmp r9, r5 8036ee4: d310 bcc.n 8036f08 old_queue = i; 8036ee6: b2dc uxtb r4, r3 8036ee8: 464d mov r5, r9 8036eea: e00d b.n 8036f08 age_queue = arp_table[i].ctime; } } else /* pending without queued packets? */ { if (arp_table[i].ctime >= age_pending) { 8036eec: 45d1 cmp r9, sl 8036eee: d30b bcc.n 8036f08 old_pending = i; 8036ef0: fa5f fb83 uxtb.w fp, r3 8036ef4: 46ca mov sl, r9 8036ef6: e007 b.n 8036f08 age_pending = arp_table[i].ctime; } } /* stable entry? */ } else if (state >= ETHARP_STATE_STABLE) { 8036ef8: d906 bls.n 8036f08 /* 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) { 8036efa: f892 9013 ldrb.w r9, [r2, #19] 8036efe: 45c1 cmp r9, r8 old_stable = i; 8036f00: bf24 itt cs 8036f02: fa5f fc83 uxtbcs.w ip, r3 8036f06: 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) { 8036f08: 3301 adds r3, #1 8036f0a: b2db uxtb r3, r3 8036f0c: 3214 adds r2, #20 8036f0e: 2b0a cmp r3, #10 8036f10: d1cd bne.n 8036eae } } /* { we have no match } => try to create a new entry */ /* don't create new entry, only search? */ if (((flags & ETHARP_FLAG_FIND_ONLY) != 0) || 8036f12: 9a01 ldr r2, [sp, #4] 8036f14: f002 0302 and.w r3, r2, #2 8036f18: b2db uxtb r3, r3 8036f1a: bb33 cbnz r3, 8036f6a 8036f1c: 2f0a cmp r7, #10 8036f1e: d102 bne.n 8036f26 /* or no empty entry found and not allowed to recycle? */ ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) { 8036f20: 07d3 lsls r3, r2, #31 8036f22: d402 bmi.n 8036f2a 8036f24: e021 b.n 8036f6a * { ETHARP_FLAG_TRY_HARD is set at this point } */ /* 1) empty entry available? */ if (empty < ARP_TABLE_SIZE) { i = empty; 8036f26: b2fc uxtb r4, r7 8036f28: e011 b.n 8036f4e 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) { 8036f2a: f1bc 0f0a cmp.w ip, #10 8036f2e: d002 beq.n 8036f36 /* recycle oldest stable*/ i = old_stable; 8036f30: fa5f f48c uxtb.w r4, ip 8036f34: e008 b.n 8036f48 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) { 8036f36: f1bb 0f0a cmp.w fp, #10 8036f3a: d002 beq.n 8036f42 /* recycle oldest pending */ i = old_pending; 8036f3c: fa5f f48b uxtb.w r4, fp 8036f40: e002 b.n 8036f48 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) { 8036f42: 2c0a cmp r4, #10 8036f44: d011 beq.n 8036f6a /* recycle oldest pending (queued packets are free in etharp_free_entry) */ i = old_queue; 8036f46: 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); 8036f48: 4620 mov r0, r4 8036f4a: f7ff ff89 bl 8036e60 8036f4e: 4b09 ldr r3, [pc, #36] ; (8036f74 ) 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) { 8036f50: b126 cbz r6, 8036f5c /* set IP address */ ip_addr_copy(arp_table[i].ipaddr, *ipaddr); 8036f52: 2214 movs r2, #20 8036f54: 6831 ldr r1, [r6, #0] 8036f56: fb02 3204 mla r2, r2, r4, r3 8036f5a: 6051 str r1, [r2, #4] } arp_table[i].ctime = 0; 8036f5c: 2214 movs r2, #20 8036f5e: fb02 3304 mla r3, r2, r4, r3 8036f62: 2200 movs r2, #0 8036f64: 74da strb r2, [r3, #19] return (err_t)i; 8036f66: 4620 mov r0, r4 8036f68: e000 b.n 8036f6c /* 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; 8036f6a: 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; } 8036f6c: b240 sxtb r0, r0 8036f6e: e8bd 8ffe ldmia.w sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8036f72: bf00 nop 8036f74: 2000c6fc .word 0x2000c6fc 08036f78 : * 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) { 8036f78: b570 push {r4, r5, r6, lr} 8036f7a: 4c0d ldr r4, [pc, #52] ; (8036fb0 ) 8036f7c: 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; 8036f7e: 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 8036f80: 7ca3 ldrb r3, [r4, #18] 8036f82: b183 cbz r3, 8036fa6 #if ETHARP_SUPPORT_STATIC_ENTRIES && (state != ETHARP_STATE_STATIC) #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ ) { arp_table[i].ctime++; 8036f84: 7ce2 ldrb r2, [r4, #19] 8036f86: 3201 adds r2, #1 8036f88: b2d2 uxtb r2, r2 if ((arp_table[i].ctime >= ARP_MAXAGE) || 8036f8a: 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++; 8036f8c: 74e2 strb r2, [r4, #19] if ((arp_table[i].ctime >= ARP_MAXAGE) || 8036f8e: d803 bhi.n 8036f98 8036f90: 2b01 cmp r3, #1 8036f92: d105 bne.n 8036fa0 ((arp_table[i].state == ETHARP_STATE_PENDING) && 8036f94: 2a01 cmp r2, #1 8036f96: d906 bls.n 8036fa6 (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); 8036f98: 4628 mov r0, r5 8036f9a: f7ff ff61 bl 8036e60 8036f9e: e002 b.n 8036fa6 } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING) { 8036fa0: 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; 8036fa2: bf08 it eq 8036fa4: 74a6 strbeq r6, [r4, #18] 8036fa6: 3501 adds r5, #1 8036fa8: 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) { 8036faa: 2d0a cmp r5, #10 8036fac: d1e8 bne.n 8036f80 /* resend an ARP query here? */ } #endif /* ARP_QUEUEING */ } } } 8036fae: bd70 pop {r4, r5, r6, pc} 8036fb0: 2000c6fc .word 0x2000c6fc 08036fb4 : * Remove all ARP table entries of the specified netif. * * @param netif points to a network interface */ void etharp_cleanup_netif(struct netif *netif) { 8036fb4: b570 push {r4, r5, r6, lr} 8036fb6: 4d08 ldr r5, [pc, #32] ; (8036fd8 ) 8036fb8: 4606 mov r6, r0 8036fba: 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)) { 8036fbc: 7cab ldrb r3, [r5, #18] 8036fbe: b12b cbz r3, 8036fcc 8036fc0: 68ab ldr r3, [r5, #8] 8036fc2: 42b3 cmp r3, r6 8036fc4: d102 bne.n 8036fcc etharp_free_entry(i); 8036fc6: 4620 mov r0, r4 8036fc8: f7ff ff4a bl 8036e60 8036fcc: 3401 adds r4, #1 8036fce: 3514 adds r5, #20 */ void etharp_cleanup_netif(struct netif *netif) { u8_t i; for (i = 0; i < ARP_TABLE_SIZE; ++i) { 8036fd0: 2c0a cmp r4, #10 8036fd2: d1f3 bne.n 8036fbc u8_t state = arp_table[i].state; if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) { etharp_free_entry(i); } } } 8036fd4: bd70 pop {r4, r5, r6, pc} 8036fd6: bf00 nop 8036fd8: 2000c6fc .word 0x2000c6fc 08036fdc : * @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) { 8036fdc: 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); 8036fde: 4608 mov r0, r1 8036fe0: 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) { 8036fe2: 4616 mov r6, r2 8036fe4: 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); 8036fe6: f7ff ff55 bl 8036e94 if((i >= 0) && (arp_table[i].state >= ETHARP_STATE_STABLE)) { 8036fea: 2800 cmp r0, #0 8036fec: db0c blt.n 8037008 8036fee: 2414 movs r4, #20 8036ff0: 4d07 ldr r5, [pc, #28] ; (8037010 ) 8036ff2: 4344 muls r4, r0 8036ff4: 1929 adds r1, r5, r4 8036ff6: 7c8b ldrb r3, [r1, #18] 8036ff8: 2b01 cmp r3, #1 8036ffa: d905 bls.n 8037008 *eth_ret = &arp_table[i].ethaddr; 8036ffc: 460c mov r4, r1 8036ffe: 340c adds r4, #12 *ip_ret = &arp_table[i].ipaddr; 8037000: 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; 8037002: 6034 str r4, [r6, #0] *ip_ret = &arp_table[i].ipaddr; 8037004: 6039 str r1, [r7, #0] return i; 8037006: e000 b.n 803700a } return -1; 8037008: 20ff movs r0, #255 ; 0xff } 803700a: b240 sxtb r0, r0 803700c: bdf8 pop {r3, r4, r5, r6, r7, pc} 803700e: bf00 nop 8037010: 2000c6fc .word 0x2000c6fc 08037014 : * 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) { 8037014: 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); 8037018: 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) { 803701a: 4606 mov r6, r0 803701c: 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, 803701e: f100 0727 add.w r7, r0, #39 ; 0x27 8037022: 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); 8037026: 212a movs r1, #42 ; 0x2a 8037028: 2003 movs r0, #3 803702a: f7f8 febc bl 802fda6 /* could allocate a pbuf for an ARP request? */ if (p == NULL) { 803702e: 4605 mov r5, r0 8037030: 2800 cmp r0, #0 8037032: d03c beq.n 80370ae 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; 8037034: 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); 8037036: 2001 movs r0, #1 8037038: f7f7 fd2a bl 802ea90 * '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); 803703c: 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); 803703e: 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); 8037040: 2206 movs r2, #6 8037042: f104 0016 add.w r0, r4, #22 8037046: f7ea fca1 bl 802198c ETHADDR16_COPY(&hdr->dhwaddr, hwdst_addr); 803704a: 2206 movs r2, #6 803704c: f104 0020 add.w r0, r4, #32 8037050: 4919 ldr r1, [pc, #100] ; (80370b8 ) 8037052: f7ea fc9b bl 802198c /* Write the Ethernet MAC-Addresses */ #if LWIP_AUTOIP ETHADDR16_COPY(ðhdr->dest, ethdst_hwaddr); #else /* LWIP_AUTOIP */ ETHADDR16_COPY(ðhdr->dest, ethdst_addr); 8037056: 2206 movs r2, #6 8037058: 4620 mov r0, r4 803705a: 4918 ldr r1, [pc, #96] ; (80370bc ) 803705c: f7ea fc96 bl 802198c #endif /* LWIP_AUTOIP */ ETHADDR16_COPY(ðhdr->src, ethsrc_addr); 8037060: 1da0 adds r0, r4, #6 8037062: 4639 mov r1, r7 8037064: 2206 movs r2, #6 8037066: f7ea fc91 bl 802198c /* Copy struct ip_addr2 to aligned ip_addr, to support compilers without * structure packing. */ IPADDR2_COPY(&hdr->sipaddr, ipsrc_addr); 803706a: 4649 mov r1, r9 803706c: 2204 movs r2, #4 803706e: f104 001c add.w r0, r4, #28 8037072: f7ea fc8b bl 802198c IPADDR2_COPY(&hdr->dipaddr, ipdst_addr); 8037076: 4641 mov r1, r8 8037078: 2204 movs r2, #4 803707a: f104 0026 add.w r0, r4, #38 ; 0x26 803707e: f7ea fc85 bl 802198c hdr->hwtype = PP_HTONS(HWTYPE_ETHERNET); 8037082: 2300 movs r3, #0 8037084: 2201 movs r2, #1 8037086: 73a3 strb r3, [r4, #14] 8037088: 73e2 strb r2, [r4, #15] hdr->proto = PP_HTONS(ETHTYPE_IP); 803708a: 7463 strb r3, [r4, #17] 803708c: 2208 movs r2, #8 /* set hwlen and protolen */ hdr->hwlen = ETHARP_HWADDR_LEN; 803708e: 2306 movs r3, #6 hdr->protolen = sizeof(ip_addr_t); 8037090: 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); 8037092: 7422 strb r2, [r4, #16] /* set hwlen and protolen */ hdr->hwlen = ETHARP_HWADDR_LEN; hdr->protolen = sizeof(ip_addr_t); 8037094: 74e1 strb r1, [r4, #19] ethhdr->type = PP_HTONS(ETHTYPE_ARP); 8037096: 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; 8037098: 74a3 strb r3, [r4, #18] hdr->protolen = sizeof(ip_addr_t); ethhdr->type = PP_HTONS(ETHTYPE_ARP); 803709a: 7363 strb r3, [r4, #13] /* send ARP query */ result = netif->linkoutput(netif, p); 803709c: 69b3 ldr r3, [r6, #24] 803709e: 4630 mov r0, r6 80370a0: 4629 mov r1, r5 80370a2: 4798 blx r3 80370a4: 4604 mov r4, r0 ETHARP_STATS_INC(etharp.xmit); /* free ARP query packet */ pbuf_free(p); 80370a6: 4628 mov r0, r5 80370a8: f7f8 fe30 bl 802fd0c 80370ac: e000 b.n 80370b0 /* 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; 80370ae: 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); } 80370b0: b260 sxtb r0, r4 80370b2: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 80370b6: bf00 nop 80370b8: 08045779 .word 0x08045779 80370bc: 08045773 .word 0x08045773 080370c0 : * - 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) { 80370c0: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 80370c4: 4607 mov r7, r0 80370c6: 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) || 80370c8: 6808 ldr r0, [r1, #0] 80370ca: 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) { 80370cc: 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) || 80370ce: f7fb fdd9 bl 8032c84 80370d2: 2800 cmp r0, #0 80370d4: d157 bne.n 8037186 ip_addr_ismulticast(ipaddr) || 80370d6: 6833 ldr r3, [r6, #0] 80370d8: 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) || 80370dc: 2ae0 cmp r2, #224 ; 0xe0 80370de: d052 beq.n 8037186 ip_addr_ismulticast(ipaddr) || ip_addr_isany(ipaddr)) { 80370e0: 2b00 cmp r3, #0 80370e2: d050 beq.n 8037186 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); 80370e4: 2101 movs r1, #1 80370e6: 4630 mov r0, r6 80370e8: f7ff fed4 bl 8036e94 /* could not find or create entry? */ if (i < 0) { 80370ec: 1e04 subs r4, r0, #0 80370ee: db4f blt.n 8037190 } return (err_t)i; } /* mark a fresh entry as pending (we just sent a request) */ if (arp_table[i].state == ETHARP_STATE_EMPTY) { 80370f0: 4931 ldr r1, [pc, #196] ; (80371b8 ) 80370f2: 2214 movs r2, #20 80370f4: fb02 1304 mla r3, r2, r4, r1 80370f8: 3310 adds r3, #16 80370fa: 7898 ldrb r0, [r3, #2] 80370fc: b908 cbnz r0, 8037102 arp_table[i].state = ETHARP_STATE_PENDING; 80370fe: 2001 movs r0, #1 8037100: 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)) { 8037102: fb02 1204 mla r2, r2, r4, r1 8037106: 7c93 ldrb r3, [r2, #18] 8037108: 2b01 cmp r3, #1 803710a: d000 beq.n 803710e 803710c: b935 cbnz r5, 803711c /* try to resolve it; send out ARP request */ result = etharp_request(netif, ipaddr); 803710e: 4638 mov r0, r7 8037110: 4631 mov r1, r6 8037112: f7ff ff7f bl 8037014 8037116: 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) { 8037118: b90d cbnz r5, 803711e 803711a: e036 b.n 803718a */ 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; 803711c: 22ff movs r2, #255 ; 0xff } /* packet given? */ LWIP_ASSERT("q != NULL", q != NULL); /* stable entry? */ if (arp_table[i].state >= ETHARP_STATE_STABLE) { 803711e: 2314 movs r3, #20 8037120: 4925 ldr r1, [pc, #148] ; (80371b8 ) 8037122: 4363 muls r3, r4 8037124: 18c8 adds r0, r1, r3 8037126: 7c80 ldrb r0, [r0, #18] 8037128: 2801 cmp r0, #1 803712a: d90b bls.n 8037144 /* we have a valid IP->Ethernet address mapping */ ETHARP_SET_HINT(netif, i); 803712c: 4a23 ldr r2, [pc, #140] ; (80371bc ) /* send the packet */ result = etharp_send_ip(netif, q, srcaddr, &(arp_table[i].ethaddr)); 803712e: 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); 8037130: 7014 strb r4, [r2, #0] /* send the packet */ result = etharp_send_ip(netif, q, srcaddr, &(arp_table[i].ethaddr)); 8037132: 4638 mov r0, r7 8037134: 4629 mov r1, r5 8037136: f107 0227 add.w r2, r7, #39 ; 0x27 803713a: 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; } 803713c: 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)); 8037140: f7ff be76 b.w 8036e30 /* pending entry? (either just created or already pending */ } else if (arp_table[i].state == ETHARP_STATE_PENDING) { 8037144: d123 bne.n 803718e 8037146: 462b mov r3, r5 8037148: e003 b.n 8037152 * 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) { 803714a: 7b1a ldrb r2, [r3, #12] 803714c: 2a01 cmp r2, #1 803714e: d128 bne.n 80371a2 copy_needed = 1; break; } p = p->next; 8037150: 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) { 8037152: 2b00 cmp r3, #0 8037154: d1f9 bne.n 803714a 8037156: e01e b.n 8037196 } 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) { 8037158: 4629 mov r1, r5 803715a: f7f8 fedb bl 802ff14 803715e: b120 cbz r0, 803716a pbuf_free(p); 8037160: 4630 mov r0, r6 8037162: f7f8 fdd3 bl 802fd0c 8037166: e024 b.n 80371b2 /* referencing the old pbuf is enough */ p = q; pbuf_ref(p); } /* packet could be taken over? */ if (p != NULL) { 8037168: 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) { 803716a: 2314 movs r3, #20 803716c: 4a12 ldr r2, [pc, #72] ; (80371b8 ) 803716e: fb03 f104 mul.w r1, r3, r4 8037172: 4615 mov r5, r2 8037174: 5850 ldr r0, [r2, r1] 8037176: 461f mov r7, r3 8037178: b108 cbz r0, 803717e 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); 803717a: f7f8 fdc7 bl 802fd0c } arp_table[i].q = p; 803717e: 437c muls r4, r7 8037180: 512e str r6, [r5, r4] result = ERR_OK; 8037182: 2400 movs r4, #0 8037184: e004 b.n 8037190 /* 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; 8037186: 24f2 movs r4, #242 ; 0xf2 8037188: e002 b.n 8037190 /* 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; 803718a: 4604 mov r4, r0 803718c: e000 b.n 8037190 /* 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) { 803718e: 4614 mov r4, r2 8037190: b260 sxtb r0, r4 8037192: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} } } } else { /* referencing the old pbuf is enough */ p = q; pbuf_ref(p); 8037196: 4628 mov r0, r5 8037198: f7f8 fe95 bl 802fec6 } /* packet could be taken over? */ if (p != NULL) { 803719c: 2d00 cmp r5, #0 803719e: d1e3 bne.n 8037168 80371a0: e007 b.n 80371b2 } p = p->next; } if(copy_needed) { /* copy the whole packet into new pbufs */ p = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM); 80371a2: 2003 movs r0, #3 80371a4: 8919 ldrh r1, [r3, #8] 80371a6: 2200 movs r2, #0 80371a8: f7f8 fdfd bl 802fda6 if(p != NULL) { 80371ac: 4606 mov r6, r0 80371ae: 2800 cmp r0, #0 80371b0: d1d2 bne.n 8037158 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; 80371b2: 24ff movs r4, #255 ; 0xff 80371b4: e7ec b.n 8037190 80371b6: bf00 nop 80371b8: 2000c6fc .word 0x2000c6fc 80371bc: 2000c6f8 .word 0x2000c6f8 080371c0 : /** 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) { 80371c0: 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) && 80371c4: 4b10 ldr r3, [pc, #64] ; (8037208 ) /** 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) { 80371c6: 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) && 80371c8: 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) { 80371ca: 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) && 80371cc: 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) { 80371d0: 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) && 80371d2: 7c8a ldrb r2, [r1, #18] 80371d4: 2a02 cmp r2, #2 80371d6: f101 0410 add.w r4, r1, #16 80371da: d108 bne.n 80371ee 80371dc: 7cca ldrb r2, [r1, #19] 80371de: 2ae3 cmp r2, #227 ; 0xe3 80371e0: d905 bls.n 80371ee (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED)) { if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) { 80371e2: 3104 adds r1, #4 80371e4: f7ff ff16 bl 8037014 80371e8: b908 cbnz r0, 80371ee arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING; 80371ea: 2303 movs r3, #3 80371ec: 70a3 strb r3, [r4, #2] } } return etharp_send_ip(netif, q, (struct eth_addr*)(netif->hwaddr), 80371ee: 4b06 ldr r3, [pc, #24] ; (8037208 ) 80371f0: 2214 movs r2, #20 80371f2: fb02 3305 mla r3, r2, r5, r3 80371f6: 4638 mov r0, r7 80371f8: 4631 mov r1, r6 80371fa: f107 0227 add.w r2, r7, #39 ; 0x27 80371fe: 330c adds r3, #12 &arp_table[arp_idx].ethaddr); } 8037200: 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), 8037204: f7ff be14 b.w 8036e30 8037208: 2000c6fc .word 0x2000c6fc 0803720c : * - 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) { 803720c: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} 803720e: 4604 mov r4, r0 8037210: 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) { 8037212: 4608 mov r0, r1 8037214: 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) { 8037216: 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) { 8037218: f7f8 fd4d bl 802fcb6 803721c: 2800 cmp r0, #0 803721e: d163 bne.n 80372e8 /* 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)) { 8037220: 6828 ldr r0, [r5, #0] 8037222: 4621 mov r1, r4 8037224: f7fb fd2e bl 8032c84 8037228: 2800 cmp r0, #0 803722a: d155 bne.n 80372d8 /* broadcast on Ethernet also */ dest = (struct eth_addr *)ðbroadcast; /* multicast destination IP address? */ } else if (ip_addr_ismulticast(ipaddr)) { 803722c: 682b ldr r3, [r5, #0] 803722e: f003 02f0 and.w r2, r3, #240 ; 0xf0 8037232: 2ae0 cmp r2, #224 ; 0xe0 8037234: d114 bne.n 8037260 /* Hash IP multicast address to MAC address.*/ mcastaddr.addr[0] = LL_MULTICAST_ADDR_0; 8037236: 2301 movs r3, #1 8037238: f88d 3000 strb.w r3, [sp] mcastaddr.addr[1] = LL_MULTICAST_ADDR_1; mcastaddr.addr[2] = LL_MULTICAST_ADDR_2; 803723c: 235e movs r3, #94 ; 0x5e 803723e: f88d 3002 strb.w r3, [sp, #2] mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f; 8037242: 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; 8037244: f88d 0001 strb.w r0, [sp, #1] mcastaddr.addr[2] = LL_MULTICAST_ADDR_2; mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f; 8037248: f003 037f and.w r3, r3, #127 ; 0x7f 803724c: f88d 3003 strb.w r3, [sp, #3] mcastaddr.addr[4] = ip4_addr3(ipaddr); 8037250: 78ab ldrb r3, [r5, #2] 8037252: f88d 3004 strb.w r3, [sp, #4] mcastaddr.addr[5] = ip4_addr4(ipaddr); 8037256: 78eb ldrb r3, [r5, #3] 8037258: f88d 3005 strb.w r3, [sp, #5] /* destination Ethernet address is multicast */ dest = &mcastaddr; 803725c: 466b mov r3, sp 803725e: e03c b.n 80372da /* 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)) && 8037260: 6862 ldr r2, [r4, #4] 8037262: ea83 0102 eor.w r1, r3, r2 8037266: 68a2 ldr r2, [r4, #8] 8037268: 4211 tst r1, r2 803726a: d009 beq.n 8037280 !ip_addr_islinklocal(ipaddr)) { 803726c: 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)) && 803726e: f64f 62a9 movw r2, #65193 ; 0xfea9 8037272: 4293 cmp r3, r2 8037274: d004 beq.n 8037280 router for forwarding". */ if (!ip_addr_islinklocal(&iphdr->src)) #endif /* LWIP_AUTOIP */ { /* interface has default gateway? */ if (!ip_addr_isany(&netif->gw)) { 8037276: 68e3 ldr r3, [r4, #12] 8037278: f104 010c add.w r1, r4, #12 803727c: b90b cbnz r3, 8037282 803727e: e035 b.n 80372ec /* 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)) && 8037280: 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) && 8037282: 4b1c ldr r3, [pc, #112] ; (80372f4 ) 8037284: 781a ldrb r2, [r3, #0] 8037286: 4b1c ldr r3, [pc, #112] ; (80372f8 ) 8037288: 2014 movs r0, #20 803728a: fb00 3302 mla r3, r0, r2, r3 803728e: 7c98 ldrb r0, [r3, #18] 8037290: 2801 cmp r0, #1 8037292: d904 bls.n 803729e 8037294: 6808 ldr r0, [r1, #0] 8037296: 685b ldr r3, [r3, #4] 8037298: 4298 cmp r0, r3 803729a: d100 bne.n 803729e 803729c: e00d b.n 80372ba 803729e: 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) 80372a0: 4f15 ldr r7, [pc, #84] ; (80372f8 ) 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) && 80372a2: 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) 80372a4: 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) && 80372a6: 7c85 ldrb r5, [r0, #18] 80372a8: 2d01 cmp r5, #1 80372aa: d90b bls.n 80372c4 80372ac: 680d ldr r5, [r1, #0] 80372ae: 6840 ldr r0, [r0, #4] 80372b0: 4285 cmp r5, r0 80372b2: d107 bne.n 80372c4 (ip_addr_cmp(dst_addr, &arp_table[i].ipaddr))) { /* found an existing, stable entry */ ETHARP_SET_HINT(netif, i); 80372b4: 4b0f ldr r3, [pc, #60] ; (80372f4 ) 80372b6: b2d2 uxtb r2, r2 80372b8: 701a strb r2, [r3, #0] return etharp_output_to_arp_index(netif, q, i); 80372ba: 4620 mov r0, r4 80372bc: 4631 mov r1, r6 80372be: f7ff ff7f bl 80371c0 80372c2: e014 b.n 80372ee 80372c4: 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++) { 80372c6: 3201 adds r2, #1 80372c8: 2bc8 cmp r3, #200 ; 0xc8 80372ca: b2d2 uxtb r2, r2 80372cc: d1ea bne.n 80372a4 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); 80372ce: 4620 mov r0, r4 80372d0: 4632 mov r2, r6 80372d2: f7ff fef5 bl 80370c0 80372d6: e00a b.n 80372ee * 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; 80372d8: 4b08 ldr r3, [pc, #32] ; (80372fc ) } /* 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); 80372da: 4620 mov r0, r4 80372dc: 4631 mov r1, r6 80372de: f104 0227 add.w r2, r4, #39 ; 0x27 80372e2: f7ff fda5 bl 8036e30 80372e6: e002 b.n 80372ee 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; 80372e8: 20fe movs r0, #254 ; 0xfe 80372ea: e000 b.n 80372ee /* 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; 80372ec: 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); } 80372ee: b240 sxtb r0, r0 80372f0: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 80372f2: bf00 nop 80372f4: 2000c6f8 .word 0x2000c6f8 80372f8: 2000c6fc .word 0x2000c6fc 80372fc: 08045773 .word 0x08045773 08037300 : * @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) { 8037300: 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) { 8037304: 8943 ldrh r3, [r0, #10] 8037306: 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) { 8037308: b087 sub sp, #28 803730a: 4604 mov r4, r0 803730c: 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) { 803730e: f240 80ed bls.w 80374ec 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; 8037312: 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) { 8037314: 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; 8037316: 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) { 8037318: 07da lsls r2, r3, #31 803731a: d513 bpl.n 8037344 /* this might be a multicast or broadcast packet */ if (ethhdr->dest.addr[0] == LL_MULTICAST_ADDR_0) { 803731c: 2b01 cmp r3, #1 803731e: d108 bne.n 8037332 if ((ethhdr->dest.addr[1] == LL_MULTICAST_ADDR_1) && 8037320: 7843 ldrb r3, [r0, #1] 8037322: b97b cbnz r3, 8037344 8037324: 7883 ldrb r3, [r0, #2] 8037326: 2b5e cmp r3, #94 ; 0x5e 8037328: d10c bne.n 8037344 (ethhdr->dest.addr[2] == LL_MULTICAST_ADDR_2)) { /* mark the pbuf as link-layer multicast */ p->flags |= PBUF_FLAG_LLMCAST; 803732a: 7b63 ldrb r3, [r4, #13] 803732c: f043 0310 orr.w r3, r3, #16 8037330: e007 b.n 8037342 } } else if (eth_addr_cmp(ðhdr->dest, ðbroadcast)) { 8037332: 4972 ldr r1, [pc, #456] ; (80374fc ) 8037334: 2206 movs r2, #6 8037336: f7ea faf7 bl 8021928 803733a: b918 cbnz r0, 8037344 /* mark the pbuf as link-layer broadcast */ p->flags |= PBUF_FLAG_LLBCAST; 803733c: 7b63 ldrb r3, [r4, #13] 803733e: f043 0308 orr.w r3, r3, #8 8037342: 7363 strb r3, [r4, #13] } } switch (type) { 8037344: 2e08 cmp r6, #8 8037346: d004 beq.n 8037352 8037348: f5b6 6fc1 cmp.w r6, #1544 ; 0x608 803734c: f040 80ce bne.w 80374ec 8037350: e014 b.n 803737c #if LWIP_ARP /* IP packet? */ case PP_HTONS(ETHTYPE_IP): if (!(netif->flags & NETIF_FLAG_ETHARP)) { 8037352: f895 302d ldrb.w r3, [r5, #45] ; 0x2d 8037356: f003 0320 and.w r3, r3, #32 803735a: b2db uxtb r3, r3 803735c: 2b00 cmp r3, #0 803735e: f000 80c5 beq.w 80374ec #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)) { 8037362: 4620 mov r0, r4 8037364: f06f 010d mvn.w r1, #13 8037368: f7f8 fca5 bl 802fcb6 803736c: 2800 cmp r0, #0 803736e: f040 80bd bne.w 80374ec LWIP_ASSERT("Can't move over header in packet", 0); goto free_and_return; } else { /* pass to IP layer */ ip_input(p, netif); 8037372: 4620 mov r0, r4 8037374: 4629 mov r1, r5 8037376: f7fb fd99 bl 8032eac } break; 803737a: e0ba b.n 80374f2 case PP_HTONS(ETHTYPE_ARP): if (!(netif->flags & NETIF_FLAG_ETHARP)) { 803737c: f895 302d ldrb.w r3, [r5, #45] ; 0x2d 8037380: f003 0320 and.w r3, r3, #32 8037384: b2db uxtb r3, r3 8037386: 2b00 cmp r3, #0 8037388: f000 80b0 beq.w 80374ec 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) { 803738c: 8963 ldrh r3, [r4, #10] 803738e: 2b29 cmp r3, #41 ; 0x29 8037390: d800 bhi.n 8037394 8037392: e0ab b.n 80374ec ETHARP_STATS_INC(etharp.drop); pbuf_free(p); return; } ethhdr = (struct eth_hdr *)p->payload; 8037394: 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)) || 8037396: 89f3 ldrh r3, [r6, #14] 8037398: f5b3 7f80 cmp.w r3, #256 ; 0x100 803739c: f040 80a6 bne.w 80374ec 80373a0: 7cb3 ldrb r3, [r6, #18] 80373a2: 2b06 cmp r3, #6 80373a4: f040 80a2 bne.w 80374ec (hdr->hwlen != ETHARP_HWADDR_LEN) || 80373a8: 7cf7 ldrb r7, [r6, #19] 80373aa: 2f04 cmp r7, #4 80373ac: f040 809e bne.w 80374ec (hdr->protolen != sizeof(ip_addr_t)) || 80373b0: 8a33 ldrh r3, [r6, #16] 80373b2: 2b08 cmp r3, #8 80373b4: f040 809a bne.w 80374ec 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); 80373b8: f106 0a1c add.w sl, r6, #28 80373bc: 4651 mov r1, sl 80373be: 463a mov r2, r7 80373c0: a804 add r0, sp, #16 80373c2: f7ea fae3 bl 802198c IPADDR2_COPY(&dipaddr, &hdr->dipaddr); 80373c6: f106 0226 add.w r2, r6, #38 ; 0x26 80373ca: 9203 str r2, [sp, #12] 80373cc: 4611 mov r1, r2 80373ce: a805 add r0, sp, #20 80373d0: 463a mov r2, r7 80373d2: f7ea fadb bl 802198c /* this interface is not configured? */ if (ip_addr_isany(&netif->ip_addr)) { 80373d6: 686b ldr r3, [r5, #4] 80373d8: b12b cbz r3, 80373e6 for_us = 0; } else { /* ARP packet directed to us? */ for_us = (u8_t)ip_addr_cmp(&dipaddr, &(netif->ip_addr)); 80373da: 9a05 ldr r2, [sp, #20] 80373dc: 1ad1 subs r1, r2, r3 80373de: 424a negs r2, r1 80373e0: 414a adcs r2, r1 80373e2: 9201 str r2, [sp, #4] 80373e4: e000 b.n 80373e8 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; 80373e6: 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), 80373e8: 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) || 80373ea: 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), 80373ec: f106 0716 add.w r7, r6, #22 80373f0: 2b00 cmp r3, #0 80373f2: bf0c ite eq 80373f4: f04f 0802 moveq.w r8, #2 80373f8: 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); 80373fc: 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) || 8037400: 2800 cmp r0, #0 8037402: d03d beq.n 8037480 ip_addr_isbroadcast(ipaddr, netif) || 8037404: 4629 mov r1, r5 8037406: f7fb fc3d bl 8032c84 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) || 803740a: 9002 str r0, [sp, #8] 803740c: 2800 cmp r0, #0 803740e: d137 bne.n 8037480 ip_addr_isbroadcast(ipaddr, netif) || ip_addr_ismulticast(ipaddr)) { 8037410: 9a04 ldr r2, [sp, #16] 8037412: 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) || 8037416: 2ae0 cmp r2, #224 ; 0xe0 8037418: d032 beq.n 8037480 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); 803741a: a804 add r0, sp, #16 803741c: 4641 mov r1, r8 803741e: f7ff fd39 bl 8036e94 /* bail out if no entry could be found */ if (i < 0) { 8037422: 2800 cmp r0, #0 8037424: db2c blt.n 8037480 arp_table[i].state = ETHARP_STATE_STATIC; } else #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ { /* mark it stable */ arp_table[i].state = ETHARP_STATE_STABLE; 8037426: 4b36 ldr r3, [pc, #216] ; (8037500 ) 8037428: f04f 0814 mov.w r8, #20 803742c: fb08 f800 mul.w r8, r8, r0 8037430: eb03 0108 add.w r1, r3, r8 8037434: 2202 movs r2, #2 8037436: 748a strb r2, [r1, #18] } /* record network interface */ arp_table[i].netif = netif; 8037438: 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; 803743a: 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); 803743e: 4628 mov r0, r5 8037440: 3104 adds r1, #4 8037442: 9300 str r3, [sp, #0] 8037444: f7fd f900 bl 8034648 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); 8037448: 9b00 ldr r3, [sp, #0] 803744a: eb03 0008 add.w r0, r3, r8 803744e: 2206 movs r2, #6 8037450: 300c adds r0, #12 8037452: 4639 mov r1, r7 8037454: f7ea fa9a bl 802198c /* reset time stamp */ arp_table[i].ctime = 0; 8037458: 9a02 ldr r2, [sp, #8] 803745a: 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) { 803745e: 9b00 ldr r3, [sp, #0] 8037460: f853 b008 ldr.w fp, [r3, r8] 8037464: f1bb 0f00 cmp.w fp, #0 8037468: d00a beq.n 8037480 struct pbuf *p = arp_table[i].q; arp_table[i].q = NULL; 803746a: 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); 803746e: 4628 mov r0, r5 8037470: 4659 mov r1, fp 8037472: 464a mov r2, r9 8037474: 463b mov r3, r7 8037476: f7ff fcdb bl 8036e30 /* free the queued IP packet */ pbuf_free(p); 803747a: 4658 mov r0, fp 803747c: f7f8 fc46 bl 802fd0c -> 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) { 8037480: 8ab3 ldrh r3, [r6, #20] 8037482: f5b3 7f80 cmp.w r3, #256 ; 0x100 8037486: d003 beq.n 8037490 8037488: f5b3 7f00 cmp.w r3, #512 ; 0x200 803748c: d12e bne.n 80374ec 803748e: e029 b.n 80374e4 * 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) { 8037490: 9b01 ldr r3, [sp, #4] 8037492: b35b cbz r3, 80374ec 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); 8037494: 2002 movs r0, #2 8037496: f7f7 fafb bl 802ea90 803749a: 82b0 strh r0, [r6, #20] IPADDR2_COPY(&hdr->dipaddr, &hdr->sipaddr); 803749c: 4651 mov r1, sl 803749e: 2204 movs r2, #4 80374a0: 9803 ldr r0, [sp, #12] 80374a2: f7ea fa73 bl 802198c IPADDR2_COPY(&hdr->sipaddr, &netif->ip_addr); 80374a6: 1d29 adds r1, r5, #4 80374a8: 2204 movs r2, #4 80374aa: 4650 mov r0, sl 80374ac: f7ea fa6e bl 802198c * '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); 80374b0: 4639 mov r1, r7 80374b2: 2206 movs r2, #6 80374b4: f106 0020 add.w r0, r6, #32 80374b8: f7ea fa68 bl 802198c #if LWIP_AUTOIP ETHADDR16_COPY(ðhdr->dest, ethdst_hwaddr); #else /* LWIP_AUTOIP */ ETHADDR16_COPY(ðhdr->dest, &hdr->shwaddr); 80374bc: 4639 mov r1, r7 80374be: 2206 movs r2, #6 80374c0: 4630 mov r0, r6 80374c2: f7ea fa63 bl 802198c #endif /* LWIP_AUTOIP */ ETHADDR16_COPY(&hdr->shwaddr, ethaddr); 80374c6: 4649 mov r1, r9 80374c8: 2206 movs r2, #6 80374ca: 4638 mov r0, r7 80374cc: f7ea fa5e bl 802198c ETHADDR16_COPY(ðhdr->src, ethaddr); 80374d0: 4649 mov r1, r9 80374d2: 1db0 adds r0, r6, #6 80374d4: 2206 movs r2, #6 80374d6: f7ea fa59 bl 802198c /* 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); 80374da: 69ab ldr r3, [r5, #24] 80374dc: 4628 mov r0, r5 80374de: 4621 mov r1, r4 80374e0: 4798 blx r3 80374e2: e003 b.n 80374ec #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); 80374e4: 4628 mov r0, r5 80374e6: a904 add r1, sp, #16 80374e8: f7f7 ffa8 bl 802f43c /* 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); 80374ec: 4620 mov r0, r4 80374ee: f7f8 fc0d bl 802fd0c return ERR_OK; } 80374f2: 2000 movs r0, #0 80374f4: b007 add sp, #28 80374f6: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80374fa: bf00 nop 80374fc: 08045773 .word 0x08045773 8037500: 2000c6fc .word 0x2000c6fc 08037504 : return ERR_OK; } static void arp_timer(void *arg) { 8037504: b508 push {r3, lr} etharp_tmr(); 8037506: f7ff fd37 bl 8036f78 sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 803750a: 4904 ldr r1, [pc, #16] ; (803751c ) 803750c: f241 3088 movw r0, #5000 ; 0x1388 8037510: 2200 movs r2, #0 } 8037512: e8bd 4008 ldmia.w sp!, {r3, lr} static void arp_timer(void *arg) { etharp_tmr(); sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 8037516: f7fa bfa1 b.w 803245c 803751a: bf00 nop 803751c: 08037505 .word 0x08037505 08037520 : } } */ void ethernetif_input(void * pvParameters) { 8037520: 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) 8037524: f8df 80c4 ldr.w r8, [pc, #196] ; 80375ec } } */ void ethernetif_input(void * pvParameters) { 8037528: b085 sub sp, #20 struct pbuf *p; for( ;; ) { if(xSemaphoreTake(s_xSemaphore, emacBLOCK_TIME_WAITING_FOR_INPUT)==pdTRUE) 803752a: 2100 movs r1, #0 803752c: 2264 movs r2, #100 ; 0x64 803752e: f8d8 0000 ldr.w r0, [r8] 8037532: 460b mov r3, r1 8037534: f7f3 f8f1 bl 802a71a 8037538: 2801 cmp r0, #1 803753a: d1f6 bne.n 803752a } } /* Release descriptors to DMA */ /* Check if received frame with multiple DMA buffer segments */ if (DMA_RX_FRAME_infos->Seg_Count > 1) 803753c: f8df a0b0 ldr.w sl, [pc, #176] ; 80375f0 /* 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) 8037540: f8df 90b0 ldr.w r9, [pc, #176] ; 80375f4 __IO ETH_DMADESCTypeDef *DMARxNextDesc; p = NULL; /* Get received frame */ frame = ETH_Get_Received_Frame_interrupt(); 8037544: a801 add r0, sp, #4 8037546: f001 fc7f bl 8038e48 803754a: 9e03 ldr r6, [sp, #12] /* check that frame has no error */ if ((frame.descriptor->Status & ETH_DMARxDesc_ES) == (uint32_t)RESET) 803754c: 6837 ldr r7, [r6, #0] 803754e: f417 4700 ands.w r7, r7, #32768 ; 0x8000 8037552: d001 beq.n 8037558 uint32_t l=0,i =0; FrameTypeDef frame; u8 *buffer; __IO ETH_DMADESCTypeDef *DMARxNextDesc; p = NULL; 8037554: 2400 movs r4, #0 8037556: e016 b.n 8037586 /* 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); 8037558: 2003 movs r0, #3 803755a: 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; 803755e: 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); 8037562: 4602 mov r2, r0 8037564: f7f8 fc1f bl 802fda6 /* Copy received frame from ethernet driver buffer to stack buffer */ if (p != NULL) 8037568: 4604 mov r4, r0 803756a: 2800 cmp r0, #0 803756c: d0f2 beq.n 8037554 803756e: 4605 mov r5, r0 { for (q = p; q != NULL; q = q->next) { memcpy((u8_t*)q->payload, (u8_t*)&buffer[l], q->len); 8037570: 6868 ldr r0, [r5, #4] 8037572: 896a ldrh r2, [r5, #10] 8037574: eb0b 0107 add.w r1, fp, r7 8037578: f7ea fa08 bl 802198c l = l + q->len; 803757c: 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) 803757e: 682d ldr r5, [r5, #0] { memcpy((u8_t*)q->payload, (u8_t*)&buffer[l], q->len); l = l + q->len; 8037580: 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) 8037582: 2d00 cmp r5, #0 8037584: d1f4 bne.n 8037570 } } /* Release descriptors to DMA */ /* Check if received frame with multiple DMA buffer segments */ if (DMA_RX_FRAME_infos->Seg_Count > 1) 8037586: f8da 3000 ldr.w r3, [sl] 803758a: 689a ldr r2, [r3, #8] 803758c: 2a01 cmp r2, #1 { DMARxNextDesc = DMA_RX_FRAME_infos->FS_Rx_Desc; 803758e: bf88 it hi 8037590: 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; 8037592: f04f 4000 mov.w r0, #2147483648 ; 0x80000000 uint32_t l=0,i =0; FrameTypeDef frame; u8 *buffer; __IO ETH_DMADESCTypeDef *DMARxNextDesc; p = NULL; 8037596: 2200 movs r2, #0 8037598: e002 b.n 80375a0 } /* Set Own bit in Rx descriptors: gives the buffers back to DMA */ for (i=0; iSeg_Count; i++) { DMARxNextDesc->Status = ETH_DMARxDesc_OWN; 803759a: 6030 str r0, [r6, #0] DMARxNextDesc = (ETH_DMADESCTypeDef *)(DMARxNextDesc->Buffer2NextDescAddr); 803759c: 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++) 803759e: 3201 adds r2, #1 80375a0: 6899 ldr r1, [r3, #8] 80375a2: 428a cmp r2, r1 80375a4: d3f9 bcc.n 803759a DMARxNextDesc->Status = ETH_DMARxDesc_OWN; DMARxNextDesc = (ETH_DMADESCTypeDef *)(DMARxNextDesc->Buffer2NextDescAddr); } /* Clear Segment_Count */ DMA_RX_FRAME_infos->Seg_Count =0; 80375a6: 2200 movs r2, #0 80375a8: 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) 80375aa: f8d9 3000 ldr.w r3, [r9] 80375ae: 061b lsls r3, r3, #24 80375b0: d504 bpl.n 80375bc { /* Clear RBUS ETHERNET DMA flag */ ETH->DMASR = ETH_DMASR_RBUS; 80375b2: 2380 movs r3, #128 ; 0x80 80375b4: f8c9 3000 str.w r3, [r9] /* Resume DMA reception */ ETH->DMARPDR = 0; 80375b8: 4b0a ldr r3, [pc, #40] ; (80375e4 ) 80375ba: 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) 80375bc: 2c00 cmp r4, #0 80375be: d0b4 beq.n 803752a { if (ERR_OK != s_pxNetIf->input( p, s_pxNetIf)) 80375c0: 4b09 ldr r3, [pc, #36] ; (80375e8 ) 80375c2: 6819 ldr r1, [r3, #0] 80375c4: 4620 mov r0, r4 80375c6: 690b ldr r3, [r1, #16] 80375c8: 4798 blx r3 80375ca: 4601 mov r1, r0 80375cc: b118 cbz r0, 80375d6 { pbuf_free(p); 80375ce: 4620 mov r0, r4 80375d0: f7f8 fb9c bl 802fd0c 80375d4: e7a9 b.n 803752a p=NULL; } else { xSemaphoreTake(s_xSemaphore, 0); 80375d6: f8d8 0000 ldr.w r0, [r8] 80375da: 460a mov r2, r1 80375dc: 460b mov r3, r1 80375de: f7f3 f89c bl 802a71a goto GET_NEXT_FRAGMENT; 80375e2: e7af b.n 8037544 80375e4: 40029008 .word 0x40029008 80375e8: 2000c7c4 .word 0x2000c7c4 80375ec: 2000c7c8 .word 0x2000c7c8 80375f0: 20011adc .word 0x20011adc 80375f4: 40029014 .word 0x40029014 080375f8 : * 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) { 80375f8: b570 push {r4, r5, r6, lr} static SemaphoreHandle_t xTxSemaphore = NULL; struct pbuf *q; uint32_t l = 0; u8 *buffer ; if (xTxSemaphore == NULL) 80375fa: 4e19 ldr r6, [pc, #100] ; (8037660 ) 80375fc: 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) { 80375fe: 460c mov r4, r1 static SemaphoreHandle_t xTxSemaphore = NULL; struct pbuf *q; uint32_t l = 0; u8 *buffer ; if (xTxSemaphore == NULL) 8037600: b95d cbnz r5, 803761a { vSemaphoreCreateBinary (xTxSemaphore); 8037602: 2001 movs r0, #1 8037604: 4629 mov r1, r5 8037606: 2203 movs r2, #3 8037608: f7f2 ff0a bl 802a420 803760c: 6030 str r0, [r6, #0] 803760e: b120 cbz r0, 803761a 8037610: 4629 mov r1, r5 8037612: 462a mov r2, r5 8037614: 462b mov r3, r5 8037616: f7f2 ff40 bl 802a49a } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) 803761a: 4b11 ldr r3, [pc, #68] ; (8037660 ) 803761c: 2100 movs r1, #0 803761e: 6818 ldr r0, [r3, #0] 8037620: 22fa movs r2, #250 ; 0xfa 8037622: 460b mov r3, r1 8037624: f7f3 f879 bl 802a71a 8037628: b1c0 cbz r0, 803765c { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); 803762a: 4b0e ldr r3, [pc, #56] ; (8037664 ) 803762c: 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; 803762e: 2500 movs r5, #0 vSemaphoreCreateBinary (xTxSemaphore); } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); 8037630: 689e ldr r6, [r3, #8] 8037632: e007 b.n 8037644 for(q = p; q != NULL; q = q->next) { memcpy((u8_t*)&buffer[l], q->payload, q->len); 8037634: 1970 adds r0, r6, r5 8037636: 6861 ldr r1, [r4, #4] 8037638: 8962 ldrh r2, [r4, #10] 803763a: f7ea f9a7 bl 802198c l = l + q->len; 803763e: 8963 ldrh r3, [r4, #10] } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); for(q = p; q != NULL; q = q->next) 8037640: 6824 ldr r4, [r4, #0] { memcpy((u8_t*)&buffer[l], q->payload, q->len); l = l + q->len; 8037642: 18ed adds r5, r5, r3 } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); for(q = p; q != NULL; q = q->next) 8037644: 2c00 cmp r4, #0 8037646: d1f5 bne.n 8037634 { memcpy((u8_t*)&buffer[l], q->payload, q->len); l = l + q->len; } ETH_Prepare_Transmit_Descriptors(l); 8037648: b2a8 uxth r0, r5 803764a: f001 fc4d bl 8038ee8 xSemaphoreGive(xTxSemaphore); 803764e: 4b04 ldr r3, [pc, #16] ; (8037660 ) 8037650: 4621 mov r1, r4 8037652: 6818 ldr r0, [r3, #0] 8037654: 4622 mov r2, r4 8037656: 4623 mov r3, r4 8037658: f7f2 ff1f bl 802a49a } return ERR_OK; } 803765c: 2000 movs r0, #0 803765e: bd70 pop {r4, r5, r6, pc} 8037660: 2000c7cc .word 0x2000c7cc 8037664: 2000fc70 .word 0x2000fc70 08037668 : #if LWIP_NETIF_HOSTNAME /* Initialize interface hostname */ netif->hostname = "lwip"; #endif /* LWIP_NETIF_HOSTNAME */ netif->name[0] = IFNAME0; 8037668: 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) { 803766a: b530 push {r4, r5, lr} #if LWIP_NETIF_HOSTNAME /* Initialize interface hostname */ netif->hostname = "lwip"; #endif /* LWIP_NETIF_HOSTNAME */ netif->name[0] = IFNAME0; 803766c: f880 302e strb.w r3, [r0, #46] ; 0x2e netif->name[1] = IFNAME1; 8037670: 2374 movs r3, #116 ; 0x74 8037672: f880 302f strb.w r3, [r0, #47] ; 0x2f netif->output = etharp_output; 8037676: 4b37 ldr r3, [pc, #220] ; (8037754 ) 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) 8037678: 4d37 ldr r5, [pc, #220] ; (8037758 ) #endif /* LWIP_NETIF_HOSTNAME */ netif->name[0] = IFNAME0; netif->name[1] = IFNAME1; netif->output = etharp_output; 803767a: 6143 str r3, [r0, #20] netif->linkoutput = low_level_output; 803767c: 4b37 ldr r3, [pc, #220] ; (803775c ) * @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) { 803767e: b087 sub sp, #28 netif->name[0] = IFNAME0; netif->name[1] = IFNAME1; netif->output = etharp_output; netif->linkoutput = low_level_output; 8037680: 6183 str r3, [r0, #24] { uint8_t mac[6]; uint32_t i; /* set netif MAC hardware address length */ netif->hwaddr_len = ETHARP_HWADDR_LEN; 8037682: 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) { 8037684: 4604 mov r4, r0 { uint8_t mac[6]; uint32_t i; /* set netif MAC hardware address length */ netif->hwaddr_len = ETHARP_HWADDR_LEN; 8037686: f880 3026 strb.w r3, [r0, #38] ; 0x26 /* set netif MAC hardware address */ SETTINGS_GetMac(mac); 803768a: a804 add r0, sp, #16 803768c: f7f1 f9a4 bl 80289d8 netif->hwaddr[0] = mac[0]; 8037690: 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) 8037694: 6829 ldr r1, [r5, #0] /* set netif MAC hardware address */ SETTINGS_GetMac(mac); netif->hwaddr[0] = mac[0]; 8037696: f884 3027 strb.w r3, [r4, #39] ; 0x27 netif->hwaddr[1] = mac[1]; 803769a: f89d 3011 ldrb.w r3, [sp, #17] 803769e: f884 3028 strb.w r3, [r4, #40] ; 0x28 netif->hwaddr[2] = mac[2]; 80376a2: f89d 3012 ldrb.w r3, [sp, #18] 80376a6: f884 3029 strb.w r3, [r4, #41] ; 0x29 netif->hwaddr[3] = mac[3]; 80376aa: f89d 3013 ldrb.w r3, [sp, #19] 80376ae: f884 302a strb.w r3, [r4, #42] ; 0x2a netif->hwaddr[4] = mac[4]; 80376b2: f89d 3014 ldrb.w r3, [sp, #20] 80376b6: f884 302b strb.w r3, [r4, #43] ; 0x2b netif->hwaddr[5] = mac[5]; 80376ba: f89d 3015 ldrb.w r3, [sp, #21] 80376be: f884 302c strb.w r3, [r4, #44] ; 0x2c /* set netif maximum transfer unit */ netif->mtu = 1500; 80376c2: f240 53dc movw r3, #1500 ; 0x5dc 80376c6: 84a3 strh r3, [r4, #36] ; 0x24 /* Accept broadcast address and ARP traffic */ netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP; 80376c8: 2322 movs r3, #34 ; 0x22 80376ca: f884 302d strb.w r3, [r4, #45] ; 0x2d s_pxNetIf =netif; 80376ce: 4b24 ldr r3, [pc, #144] ; (8037760 ) 80376d0: 601c str r4, [r3, #0] /* create binary semaphore used for informing ethernetif of frame reception */ if (s_xSemaphore == NULL) 80376d2: b919 cbnz r1, 80376dc { s_xSemaphore= xSemaphoreCreateCounting(20,0); 80376d4: 2014 movs r0, #20 80376d6: f7f2 feca bl 802a46e 80376da: 6028 str r0, [r5, #0] } /* initialize MAC address in ethernet MAC */ ETH_MACAddressConfig(ETH_MAC_Address0, netif->hwaddr); 80376dc: f104 0127 add.w r1, r4, #39 ; 0x27 80376e0: 2000 movs r0, #0 80376e2: f001 fb99 bl 8038e18 /* Initialize Tx Descriptors list: Chain Mode */ ETH_DMATxDescChainInit(DMATxDscrTab, &Tx_Buff[0][0], ETH_TXBUFNB); 80376e6: 481f ldr r0, [pc, #124] ; (8037764 ) 80376e8: 491f ldr r1, [pc, #124] ; (8037768 ) /* 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); 80376ec: 2205 movs r2, #5 80376ee: f001 fc81 bl 8038ff4 /* Initialize Rx Descriptors list: Chain Mode */ ETH_DMARxDescChainInit(DMARxDscrTab, &Rx_Buff[0][0], ETH_RXBUFNB); 80376f2: 481e ldr r0, [pc, #120] ; (803776c ) 80376f4: 491e ldr r1, [pc, #120] ; (8037770 ) 80376f6: 2205 movs r2, #5 80376f8: f001 fc50 bl 8038f9c /* 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, 8037724: 2400 movs r4, #0 8037726: 2304 movs r3, #4 8037728: 2296 movs r2, #150 ; 0x96 803772a: e88d 0018 stmia.w sp, {r3, r4} 803772e: 4911 ldr r1, [pc, #68] ; (8037774 ) 8037730: 9402 str r4, [sp, #8] 8037732: 4623 mov r3, r4 8037734: 9403 str r4, [sp, #12] 8037736: 4810 ldr r0, [pc, #64] ; (8037778 ) 8037738: f7f3 f948 bl 802a9cc netifINTERFACE_TASK_PRIORITY,NULL); /* Enable MAC and DMA transmission and reception */ ETH_Start(); 803773c: f001 fcd6 bl 80390ec /* initialize the hardware */ low_level_init(netif); etharp_init(); sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 8037740: f241 3088 movw r0, #5000 ; 0x1388 8037744: 490d ldr r1, [pc, #52] ; (803777c ) 8037746: 4622 mov r2, r4 8037748: f7fa fe88 bl 803245c return ERR_OK; } 803774c: 4620 mov r0, r4 803774e: b007 add sp, #28 8037750: bd30 pop {r4, r5, pc} 8037752: bf00 nop 8037754: 0803720d .word 0x0803720d 8037758: 2000c7c8 .word 0x2000c7c8 803775c: 080375f9 .word 0x080375f9 8037760: 2000c7c4 .word 0x2000c7c4 8037764: 2000fc74 .word 0x2000fc74 8037768: 20011b80 .word 0x20011b80 803776c: 20011ae0 .word 0x20011ae0 8037770: 2000fd14 .word 0x2000fd14 8037774: 0804577f .word 0x0804577f 8037778: 08037521 .word 0x08037521 803777c: 08037505 .word 0x08037505 08037780 : * 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 ) { 8037780: b510 push {r4, lr} err_t xReturn = ERR_MEM; *pxMailBox = xQueueCreate( iSize, sizeof( void * ) ); 8037782: 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 ) { 8037784: 4604 mov r4, r0 err_t xReturn = ERR_MEM; *pxMailBox = xQueueCreate( iSize, sizeof( void * ) ); 8037786: 4608 mov r0, r1 8037788: 2104 movs r1, #4 803778a: f7f2 fe49 bl 802a420 803778e: 6020 str r0, [r4, #0] xReturn = ERR_OK; SYS_STATS_INC_USED( mbox ); } return xReturn; } 8037790: 2800 cmp r0, #0 8037792: bf14 ite ne 8037794: 2000 movne r0, #0 8037796: f06f 0000 mvneq.w r0, #0 803779a: bd10 pop {r4, pc} 0803779c : * sys_mbox_t mbox -- Handle of mailbox * Outputs: * sys_mbox_t -- Handle to new mailbox *---------------------------------------------------------------------------*/ void sys_mbox_free( sys_mbox_t *pxMailBox ) { 803779c: b510 push {r4, lr} 803779e: 4604 mov r4, r0 unsigned long ulMessagesWaiting; ulMessagesWaiting = uxQueueMessagesWaiting( *pxMailBox ); 80377a0: 6800 ldr r0, [r0, #0] 80377a2: f7f3 f896 bl 802a8d2 configASSERT( ( ulMessagesWaiting == 0 ) ); 80377a6: b110 cbz r0, 80377ae 80377a8: f7f3 ffb8 bl 802b71c 80377ac: e7fe b.n 80377ac SYS_STATS_DEC( mbox.used ); } #endif /* SYS_STATS */ vQueueDelete( *pxMailBox ); 80377ae: 6820 ldr r0, [r4, #0] } 80377b0: e8bd 4010 ldmia.w sp!, {r4, lr} SYS_STATS_DEC( mbox.used ); } #endif /* SYS_STATS */ vQueueDelete( *pxMailBox ); 80377b4: f7f3 b8a9 b.w 802a90a 080377b8 : * Inputs: * sys_mbox_t mbox -- Handle of mailbox * void *data -- Pointer to data to post *---------------------------------------------------------------------------*/ void sys_mbox_post( sys_mbox_t *pxMailBox, void *pxMessageToPost ) { 80377b8: b537 push {r0, r1, r2, r4, r5, lr} 80377ba: ac02 add r4, sp, #8 80377bc: 4605 mov r5, r0 80377be: f844 1d04 str.w r1, [r4, #-4]! while( xQueueSendToBack( *pxMailBox, &pxMessageToPost, portMAX_DELAY ) != pdTRUE ); 80377c2: 2300 movs r3, #0 80377c4: 6828 ldr r0, [r5, #0] 80377c6: 4621 mov r1, r4 80377c8: f04f 32ff mov.w r2, #4294967295 80377cc: f7f2 fe65 bl 802a49a 80377d0: 2801 cmp r0, #1 80377d2: d1f6 bne.n 80377c2 } 80377d4: bd3e pop {r1, r2, r3, r4, r5, pc} 80377d6: 0000 movs r0, r0 080377d8 : * Outputs: * err_t -- ERR_OK if message posted, else ERR_MEM * if not. *---------------------------------------------------------------------------*/ err_t sys_mbox_trypost( sys_mbox_t *pxMailBox, void *pxMessageToPost ) { 80377d8: b51f push {r0, r1, r2, r3, r4, lr} err_t xReturn; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if( xInsideISR != pdFALSE ) 80377da: 4a0b ldr r2, [pc, #44] ; (8037808 ) * Outputs: * err_t -- ERR_OK if message posted, else ERR_MEM * if not. *---------------------------------------------------------------------------*/ err_t sys_mbox_trypost( sys_mbox_t *pxMailBox, void *pxMessageToPost ) { 80377dc: 9101 str r1, [sp, #4] err_t xReturn; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if( xInsideISR != pdFALSE ) 80377de: 6812 ldr r2, [r2, #0] { xReturn = xQueueSendFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken ); 80377e0: 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; 80377e2: 2300 movs r3, #0 80377e4: 9303 str r3, [sp, #12] if( xInsideISR != pdFALSE ) { xReturn = xQueueSendFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken ); 80377e6: 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 ) 80377e8: b11a cbz r2, 80377f2 { xReturn = xQueueSendFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken ); 80377ea: aa03 add r2, sp, #12 80377ec: f7f2 ff19 bl 802a622 80377f0: e002 b.n 80377f8 } else { xReturn = xQueueSend( *pxMailBox, &pxMessageToPost, ( TickType_t ) 0 ); 80377f2: 4613 mov r3, r2 80377f4: f7f2 fe51 bl 802a49a 80377f8: b2c0 uxtb r0, r0 xReturn = ERR_MEM; SYS_STATS_INC( mbox.err ); } return xReturn; } 80377fa: 3801 subs r0, #1 80377fc: bf18 it ne 80377fe: f06f 0000 mvnne.w r0, #0 8037802: b005 add sp, #20 8037804: bd00 pop {pc} 8037806: bf00 nop 8037808: 2000c7d0 .word 0x2000c7d0 0803780c : * 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 ) { 803780c: e92d 41f3 stmdb sp!, {r0, r1, r4, r5, r6, r7, r8, lr} 8037810: 4607 mov r7, r0 8037812: 460c mov r4, r1 8037814: 4690 mov r8, r2 void *pvDummy; TickType_t xStartTime, xEndTime, xElapsed; unsigned long ulReturn; xStartTime = xTaskGetTickCount(); 8037816: f7f3 fa41 bl 802ac9c 803781a: 4605 mov r5, r0 if( NULL == ppvBuffer ) 803781c: b904 cbnz r4, 8037820 { ppvBuffer = &pvDummy; 803781e: ac01 add r4, sp, #4 } if( ulTimeOut != 0UL ) 8037820: f1b8 0f00 cmp.w r8, #0 8037824: d015 beq.n 8037852 { configASSERT( xInsideISR == ( portBASE_TYPE ) 0 ); 8037826: 4b13 ldr r3, [pc, #76] ; (8037874 ) 8037828: 681e ldr r6, [r3, #0] 803782a: b116 cbz r6, 8037832 803782c: f7f3 ff76 bl 802b71c 8037830: e7fe b.n 8037830 if( pdTRUE == xQueueReceive( *pxMailBox, &( *ppvBuffer ), ulTimeOut/ portTICK_PERIOD_MS ) ) 8037832: 6838 ldr r0, [r7, #0] 8037834: 4621 mov r1, r4 8037836: 4642 mov r2, r8 8037838: 4633 mov r3, r6 803783a: f7f2 ff6e bl 802a71a 803783e: 2801 cmp r0, #1 8037840: d103 bne.n 803784a { xEndTime = xTaskGetTickCount(); 8037842: f7f3 fa2b bl 802ac9c xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS; 8037846: 1b40 subs r0, r0, r5 8037848: e011 b.n 803786e ulReturn = xElapsed; } else { /* Timed out. */ *ppvBuffer = NULL; 803784a: 6026 str r6, [r4, #0] ulReturn = SYS_ARCH_TIMEOUT; 803784c: f04f 30ff mov.w r0, #4294967295 8037850: e00d b.n 803786e } } else { while( pdTRUE != xQueueReceive( *pxMailBox, &( *ppvBuffer ), portMAX_DELAY ) ); 8037852: 2300 movs r3, #0 8037854: 6838 ldr r0, [r7, #0] 8037856: 4621 mov r1, r4 8037858: f04f 32ff mov.w r2, #4294967295 803785c: f7f2 ff5d bl 802a71a 8037860: 2801 cmp r0, #1 8037862: d1f6 bne.n 8037852 xEndTime = xTaskGetTickCount(); 8037864: f7f3 fa1a bl 802ac9c xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS; if( xElapsed == 0UL ) 8037868: 1b40 subs r0, r0, r5 803786a: bf08 it eq 803786c: 2001 moveq r0, #1 ulReturn = xElapsed; } return ulReturn; } 803786e: e8bd 81fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, pc} 8037872: bf00 nop 8037874: 2000c7d0 .word 0x2000c7d0 08037878 : * Outputs: * u32_t -- SYS_MBOX_EMPTY if no messages. Otherwise, * return ERR_OK. *---------------------------------------------------------------------------*/ u32_t sys_arch_mbox_tryfetch( sys_mbox_t *pxMailBox, void **ppvBuffer ) { 8037878: b507 push {r0, r1, r2, lr} void *pvDummy; unsigned long ulReturn; long lResult; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; 803787a: 2300 movs r3, #0 803787c: 9301 str r3, [sp, #4] if( ppvBuffer== NULL ) 803787e: b901 cbnz r1, 8037882 { ppvBuffer = &pvDummy; 8037880: 4669 mov r1, sp } if( xInsideISR != pdFALSE ) 8037882: 4b08 ldr r3, [pc, #32] ; (80378a4 ) { lResult = xQueueReceiveFromISR( *pxMailBox, &( *ppvBuffer ), &xHigherPriorityTaskWoken ); 8037884: 6800 ldr r0, [r0, #0] if( ppvBuffer== NULL ) { ppvBuffer = &pvDummy; } if( xInsideISR != pdFALSE ) 8037886: 681a ldr r2, [r3, #0] 8037888: b11a cbz r2, 8037892 { lResult = xQueueReceiveFromISR( *pxMailBox, &( *ppvBuffer ), &xHigherPriorityTaskWoken ); 803788a: aa01 add r2, sp, #4 803788c: f7f2 ffe8 bl 802a860 8037890: e002 b.n 8037898 } else { lResult = xQueueReceive( *pxMailBox, &( *ppvBuffer ), 0UL ); 8037892: 4613 mov r3, r2 8037894: f7f2 ff41 bl 802a71a { ulReturn = SYS_MBOX_EMPTY; } return ulReturn; } 8037898: 2801 cmp r0, #1 803789a: bf14 ite ne 803789c: f04f 30ff movne.w r0, #4294967295 80378a0: 2000 moveq r0, #0 80378a2: bd0e pop {r1, r2, r3, pc} 80378a4: 2000c7d0 .word 0x2000c7d0 080378a8 : * u8_t ucCount -- Initial ucCount of semaphore (1 or 0) * Outputs: * sys_sem_t -- Created semaphore or 0 if could not create. *---------------------------------------------------------------------------*/ err_t sys_sem_new( sys_sem_t *pxSemaphore, u8_t ucCount ) { 80378a8: b538 push {r3, r4, r5, lr} err_t xReturn = ERR_MEM; vSemaphoreCreateBinary( ( *pxSemaphore ) ); 80378aa: 2203 movs r2, #3 * u8_t ucCount -- Initial ucCount of semaphore (1 or 0) * Outputs: * sys_sem_t -- Created semaphore or 0 if could not create. *---------------------------------------------------------------------------*/ err_t sys_sem_new( sys_sem_t *pxSemaphore, u8_t ucCount ) { 80378ac: 4605 mov r5, r0 80378ae: 460c mov r4, r1 err_t xReturn = ERR_MEM; vSemaphoreCreateBinary( ( *pxSemaphore ) ); 80378b0: 2001 movs r0, #1 80378b2: 2100 movs r1, #0 80378b4: f7f2 fdb4 bl 802a420 80378b8: 6028 str r0, [r5, #0] 80378ba: b120 cbz r0, 80378c6 80378bc: 2100 movs r1, #0 80378be: 460a mov r2, r1 80378c0: 460b mov r3, r1 80378c2: f7f2 fdea bl 802a49a if( *pxSemaphore != NULL ) 80378c6: 6828 ldr r0, [r5, #0] 80378c8: b130 cbz r0, 80378d8 { if( ucCount == 0U ) 80378ca: b93c cbnz r4, 80378dc { xSemaphoreTake( *pxSemaphore, 1UL ); 80378cc: 4621 mov r1, r4 80378ce: 2201 movs r2, #1 80378d0: 4623 mov r3, r4 80378d2: f7f2 ff22 bl 802a71a 80378d6: e001 b.n 80378dc * Outputs: * sys_sem_t -- Created semaphore or 0 if could not create. *---------------------------------------------------------------------------*/ err_t sys_sem_new( sys_sem_t *pxSemaphore, u8_t ucCount ) { err_t xReturn = ERR_MEM; 80378d8: 20ff movs r0, #255 ; 0xff 80378da: e000 b.n 80378de if( ucCount == 0U ) { xSemaphoreTake( *pxSemaphore, 1UL ); } xReturn = ERR_OK; 80378dc: 2000 movs r0, #0 { SYS_STATS_INC( sem.err ); } return xReturn; } 80378de: b240 sxtb r0, r0 80378e0: bd38 pop {r3, r4, r5, pc} 080378e2 : * u32_t timeout -- Number of milliseconds until timeout * Outputs: * u32_t -- Time elapsed or SYS_ARCH_TIMEOUT. *---------------------------------------------------------------------------*/ u32_t sys_arch_sem_wait( sys_sem_t *pxSemaphore, u32_t ulTimeout ) { 80378e2: b570 push {r4, r5, r6, lr} 80378e4: 4605 mov r5, r0 80378e6: 460e mov r6, r1 TickType_t xStartTime, xEndTime, xElapsed; unsigned long ulReturn; xStartTime = xTaskGetTickCount(); 80378e8: f7f3 f9d8 bl 802ac9c 80378ec: 4604 mov r4, r0 if( ulTimeout != 0UL ) 80378ee: b15e cbz r6, 8037908 { if( xSemaphoreTake( *pxSemaphore, ulTimeout / portTICK_PERIOD_MS ) == pdTRUE ) 80378f0: 2100 movs r1, #0 80378f2: 6828 ldr r0, [r5, #0] 80378f4: 4632 mov r2, r6 80378f6: 460b mov r3, r1 80378f8: f7f2 ff0f bl 802a71a 80378fc: 2801 cmp r0, #1 80378fe: d112 bne.n 8037926 { xEndTime = xTaskGetTickCount(); 8037900: f7f3 f9cc bl 802ac9c xElapsed = (xEndTime - xStartTime) * portTICK_PERIOD_MS; 8037904: 1b00 subs r0, r0, r4 8037906: bd70 pop {r4, r5, r6, pc} ulReturn = SYS_ARCH_TIMEOUT; } } else { while( xSemaphoreTake( *pxSemaphore, portMAX_DELAY ) != pdTRUE ); 8037908: 2100 movs r1, #0 803790a: 6828 ldr r0, [r5, #0] 803790c: f04f 32ff mov.w r2, #4294967295 8037910: 460b mov r3, r1 8037912: f7f2 ff02 bl 802a71a 8037916: 2801 cmp r0, #1 8037918: d1f6 bne.n 8037908 xEndTime = xTaskGetTickCount(); 803791a: f7f3 f9bf bl 802ac9c xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS; if( xElapsed == 0UL ) 803791e: 1b00 subs r0, r0, r4 8037920: bf08 it eq 8037922: 2001 moveq r0, #1 8037924: bd70 pop {r4, r5, r6, pc} xElapsed = (xEndTime - xStartTime) * portTICK_PERIOD_MS; ulReturn = xElapsed; } else { ulReturn = SYS_ARCH_TIMEOUT; 8037926: f04f 30ff mov.w r0, #4294967295 ulReturn = xElapsed; } return ulReturn; } 803792a: bd70 pop {r4, r5, r6, pc} 0803792c : /** 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 ) { 803792c: b510 push {r4, lr} 803792e: 4604 mov r4, r0 err_t xReturn = ERR_MEM; *pxMutex = xSemaphoreCreateMutex(); 8037930: 2001 movs r0, #1 8037932: f7f2 fe4c bl 802a5ce 8037936: 6020 str r0, [r4, #0] { SYS_STATS_INC( mutex.err ); } return xReturn; } 8037938: 2800 cmp r0, #0 803793a: bf14 ite ne 803793c: 2000 movne r0, #0 803793e: f06f 0000 mvneq.w r0, #0 8037942: bd10 pop {r4, pc} 08037944 : /** Lock a mutex * @param mutex the mutex to lock */ void sys_mutex_lock( sys_mutex_t *pxMutex ) { 8037944: b510 push {r4, lr} 8037946: 4604 mov r4, r0 while( xSemaphoreTake( *pxMutex, portMAX_DELAY ) != pdPASS ); 8037948: 2100 movs r1, #0 803794a: 6820 ldr r0, [r4, #0] 803794c: f04f 32ff mov.w r2, #4294967295 8037950: 460b mov r3, r1 8037952: f7f2 fee2 bl 802a71a 8037956: 2801 cmp r0, #1 8037958: d1f6 bne.n 8037948 } 803795a: bd10 pop {r4, pc} 0803795c : /** Unlock a mutex * @param mutex the mutex to unlock */ void sys_mutex_unlock(sys_mutex_t *pxMutex ) { xSemaphoreGive( *pxMutex ); 803795c: 2100 movs r1, #0 803795e: 6800 ldr r0, [r0, #0] 8037960: 460a mov r2, r1 8037962: 460b mov r3, r1 8037964: f7f2 bd99 b.w 802a49a 08037968 : * Signals (releases) a semaphore * Inputs: * sys_sem_t sem -- Semaphore to signal *---------------------------------------------------------------------------*/ void sys_sem_signal( sys_sem_t *pxSemaphore ) { 8037968: b507 push {r0, r1, r2, lr} portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; 803796a: 2300 movs r3, #0 803796c: 9301 str r3, [sp, #4] if( xInsideISR != pdFALSE ) 803796e: 4b06 ldr r3, [pc, #24] ; (8037988 ) { xSemaphoreGiveFromISR( *pxSemaphore, &xHigherPriorityTaskWoken ); 8037970: 6800 ldr r0, [r0, #0] *---------------------------------------------------------------------------*/ void sys_sem_signal( sys_sem_t *pxSemaphore ) { portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if( xInsideISR != pdFALSE ) 8037972: 6819 ldr r1, [r3, #0] 8037974: b119 cbz r1, 803797e { xSemaphoreGiveFromISR( *pxSemaphore, &xHigherPriorityTaskWoken ); 8037976: a901 add r1, sp, #4 8037978: f7f2 fe9d bl 802a6b6 803797c: e003 b.n 8037986 } else { xSemaphoreGive( *pxSemaphore ); 803797e: 460a mov r2, r1 8037980: 460b mov r3, r1 8037982: f7f2 fd8a bl 802a49a } } 8037986: bd0e pop {r1, r2, r3, pc} 8037988: 2000c7d0 .word 0x2000c7d0 0803798c : * sys_sem_t sem -- Semaphore to free *---------------------------------------------------------------------------*/ void sys_sem_free( sys_sem_t *pxSemaphore ) { SYS_STATS_DEC(sem.used); vQueueDelete( *pxSemaphore ); 803798c: 6800 ldr r0, [r0, #0] 803798e: f7f2 bfbc b.w 802a90a 08037992 : *---------------------------------------------------------------------------* * Description: * Initialize sys arch *---------------------------------------------------------------------------*/ void sys_init(void) { 8037992: 4770 bx lr 08037994 : } u32_t sys_now(void) { return xTaskGetTickCount(); 8037994: f7f3 b982 b.w 802ac9c 08037998 : * 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 ) { 8037998: b570 push {r4, r5, r6, lr} 803799a: b086 sub sp, #24 803799c: 4606 mov r6, r0 TaskHandle_t xCreatedTask; portBASE_TYPE xResult; sys_thread_t xReturn; xResult = xTaskCreate( pxThread, pcName, iStackSize, pvArg, iPriority, &xCreatedTask ); 803799e: 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 ) { 80379a0: 4615 mov r5, r2 TaskHandle_t xCreatedTask; portBASE_TYPE xResult; sys_thread_t xReturn; xResult = xTaskCreate( pxThread, pcName, iStackSize, pvArg, iPriority, &xCreatedTask ); 80379a2: 9400 str r4, [sp, #0] 80379a4: aa05 add r2, sp, #20 80379a6: 2400 movs r4, #0 80379a8: 9201 str r2, [sp, #4] 80379aa: 9402 str r4, [sp, #8] 80379ac: b29a uxth r2, r3 80379ae: 9403 str r4, [sp, #12] 80379b0: 4608 mov r0, r1 80379b2: 462b mov r3, r5 80379b4: 4631 mov r1, r6 80379b6: f7f3 f809 bl 802a9cc if( xResult == pdPASS ) 80379ba: 2801 cmp r0, #1 { xReturn = xCreatedTask; 80379bc: bf0c ite eq 80379be: 9805 ldreq r0, [sp, #20] } else { xReturn = NULL; 80379c0: 4620 movne r0, r4 } return xReturn; } 80379c2: b006 add sp, #24 80379c4: bd70 pop {r4, r5, r6, pc} 80379c6: 0000 movs r0, r0 080379c8 : * operating system. * Outputs: * sys_prot_t -- Previous protection level (not used here) *---------------------------------------------------------------------------*/ sys_prot_t sys_arch_protect( void ) { 80379c8: b508 push {r3, lr} if( xInsideISR == pdFALSE ) 80379ca: 4b03 ldr r3, [pc, #12] ; (80379d8 ) 80379cc: 681b ldr r3, [r3, #0] 80379ce: b90b cbnz r3, 80379d4 { taskENTER_CRITICAL(); 80379d0: f7f3 feac bl 802b72c } return ( sys_prot_t ) 1; } 80379d4: 2001 movs r0, #1 80379d6: bd08 pop {r3, pc} 80379d8: 2000c7d0 .word 0x2000c7d0 080379dc : * sys_prot_t -- Previous protection level (not used here) *---------------------------------------------------------------------------*/ void sys_arch_unprotect( sys_prot_t xValue ) { (void) xValue; if( xInsideISR == pdFALSE ) 80379dc: 4b02 ldr r3, [pc, #8] ; (80379e8 ) 80379de: 681b ldr r3, [r3, #0] 80379e0: b90b cbnz r3, 80379e6 { taskEXIT_CRITICAL(); 80379e2: f7f3 becf b.w 802b784 80379e6: 4770 bx lr 80379e8: 2000c7d0 .word 0x2000c7d0 080379ec : * Если флаг не устанавливается в положенное время, то сбрасывается * флаг sSettings.sFlags.netsettingsChanged, сохраняется вся структура * настроек в памяти и контроллер перезагружается. */ void vTaskWebReinit(void * pvParameters) { 80379ec: b538 push {r3, r4, r5, lr} static uint16_t timeCounter = 0; for (;;) { /* Контроль времени работы задачи */ if (timeCounter++ > TIME_COUNTER_10_MIN) 80379ee: 4c1b ldr r4, [pc, #108] ; (8037a5c ) if (fConfirmWebParams) { fConfirmWebParams = false; /* Сохраняем временные сетевые настройки в постоянные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 80379f0: 4d1b ldr r5, [pc, #108] ; (8037a60 ) static uint16_t timeCounter = 0; for (;;) { /* Контроль времени работы задачи */ if (timeCounter++ > TIME_COUNTER_10_MIN) 80379f2: 8823 ldrh r3, [r4, #0] 80379f4: 1c5a adds r2, r3, #1 80379f6: f5b3 7f16 cmp.w r3, #600 ; 0x258 80379fa: 8022 strh r2, [r4, #0] 80379fc: d90a bls.n 8037a14 { SetWebReinitFlag(false); 80379fe: 2000 movs r0, #0 8037a00: f7f0 fb90 bl 8028124 HTTP_SaveSettings(); 8037a04: f7f6 f984 bl 802dd10 vTaskDelay(1010); 8037a08: f240 30f2 movw r0, #1010 ; 0x3f2 8037a0c: f7f3 fa78 bl 802af00 Reboot(); 8037a10: f7f1 fb28 bl 8029064 } if (fConfirmWebParams) 8037a14: 4b13 ldr r3, [pc, #76] ; (8037a64 ) 8037a16: 781a ldrb r2, [r3, #0] 8037a18: b1d2 cbz r2, 8037a50 { fConfirmWebParams = false; 8037a1a: 2200 movs r2, #0 /* Сохраняем временные сетевые настройки в постоянные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 8037a1c: 4812 ldr r0, [pc, #72] ; (8037a68 ) Reboot(); } if (fConfirmWebParams) { fConfirmWebParams = false; 8037a1e: 701a strb r2, [r3, #0] /* Сохраняем временные сетевые настройки в постоянные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 8037a20: f895 3063 ldrb.w r3, [r5, #99] ; 0x63 strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 8037a24: f100 0131 add.w r1, r0, #49 ; 0x31 if (fConfirmWebParams) { fConfirmWebParams = false; /* Сохраняем временные сетевые настройки в постоянные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 8037a28: f885 3032 strb.w r3, [r5, #50] ; 0x32 strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 8037a2c: f7ea f9e2 bl 8021df4 strcpy(sSettings.sWebParams.gate, sSettings.sWebTempParams.gate); 8037a30: 480e ldr r0, [pc, #56] ; (8037a6c ) 8037a32: f100 0131 add.w r1, r0, #49 ; 0x31 8037a36: f7ea f9dd bl 8021df4 strcpy(sSettings.sWebParams.mask, sSettings.sWebTempParams.mask); 8037a3a: 480d ldr r0, [pc, #52] ; (8037a70 ) 8037a3c: f100 0131 add.w r1, r0, #49 ; 0x31 8037a40: f7ea f9d8 bl 8021df4 HTTP_SaveSettings(); 8037a44: f7f6 f964 bl 802dd10 vTaskDelete(xHandleWebReinit); 8037a48: 4b0a ldr r3, [pc, #40] ; (8037a74 ) 8037a4a: 6818 ldr r0, [r3, #0] 8037a4c: f7f3 f896 bl 802ab7c } vTaskDelay(1000); 8037a50: f44f 707a mov.w r0, #1000 ; 0x3e8 8037a54: f7f3 fa54 bl 802af00 } 8037a58: e7cb b.n 80379f2 8037a5a: bf00 nop 8037a5c: 2000c7e0 .word 0x2000c7e0 8037a60: 2000cfc0 .word 0x2000cfc0 8037a64: 20000b10 .word 0x20000b10 8037a68: 2000cfc2 .word 0x2000cfc2 8037a6c: 2000cfd2 .word 0x2000cfd2 8037a70: 2000cfe2 .word 0x2000cfe2 8037a74: 2000c7d8 .word 0x2000c7d8 08037a78 : * @brief LwIP_DHCP_Process_Handle * @param None * @retval None */ void LwIP_DHCP_task(void * pvParameters) { 8037a78: b530 push {r4, r5, lr} DHCP_state = DHCP_TIMEOUT; /* Stop DHCP */ dhcp_stop(&xnetif); if (sSettings.sFlags.netsettingsChanged == true) 8037a7a: 4d48 ldr r5, [pc, #288] ; (8037b9c ) * @brief LwIP_DHCP_Process_Handle * @param None * @retval None */ void LwIP_DHCP_task(void * pvParameters) { 8037a7c: b085 sub sp, #20 struct ip_addr ipaddr; struct ip_addr netmask; struct ip_addr gw; uint8_t DHCP_state; DHCP_state = DHCP_START; 8037a7e: 2400 movs r4, #0 for (;;) { switch (DHCP_state) 8037a80: b11c cbz r4, 8037a8a 8037a82: 2c01 cmp r4, #1 8037a84: f040 8085 bne.w 8037b92 8037a88: e004 b.n 8037a94 { case DHCP_START: { dhcp_start(&xnetif); 8037a8a: 4845 ldr r0, [pc, #276] ; (8037ba0 ) 8037a8c: f7f7 fe42 bl 802f714 DHCP_state = DHCP_WAIT_ADDRESS; 8037a90: 2401 movs r4, #1 //PRINT_USART("\n\rLooking for DHCP server please wait...\n\r"); } break; 8037a92: e07e b.n 8037b92 case DHCP_WAIT_ADDRESS: { /* Read the new IP address */ ipaddr = xnetif.ip_addr; 8037a94: 4842 ldr r0, [pc, #264] ; (8037ba0 ) netmask = xnetif.netmask; 8037a96: 6882 ldr r2, [r0, #8] break; case DHCP_WAIT_ADDRESS: { /* Read the new IP address */ ipaddr = xnetif.ip_addr; 8037a98: 6843 ldr r3, [r0, #4] netmask = xnetif.netmask; 8037a9a: 9202 str r2, [sp, #8] gw = xnetif.gw; 8037a9c: 68c2 ldr r2, [r0, #12] break; case DHCP_WAIT_ADDRESS: { /* Read the new IP address */ ipaddr = xnetif.ip_addr; 8037a9e: 9301 str r3, [sp, #4] netmask = xnetif.netmask; gw = xnetif.gw; 8037aa0: 9203 str r2, [sp, #12] if (ipaddr.addr != 0) 8037aa2: 2b00 cmp r3, #0 8037aa4: d045 beq.n 8037b32 { DHCP_state = DHCP_ADDRESS_ASSIGNED; dhcp_stop(&xnetif); 8037aa6: f7f7 fe1d bl 802f6e4 /* Сохранение полученных сетевый параметров */ /* Если настройки изменили, то сохраняем во временные настройки */ if (sSettings.sFlags.netsettingsChanged == true) 8037aaa: f895 3120 ldrb.w r3, [r5, #288] ; 0x120 { sprintf(sSettings.sWebTempParams.ip, "%s", ipaddr_ntoa(&ipaddr)); 8037aae: a801 add r0, sp, #4 DHCP_state = DHCP_ADDRESS_ASSIGNED; dhcp_stop(&xnetif); /* Сохранение полученных сетевый параметров */ /* Если настройки изменили, то сохраняем во временные настройки */ if (sSettings.sFlags.netsettingsChanged == true) 8037ab0: b103 cbz r3, 8037ab4 8037ab2: e01b b.n 8037aec 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)); 8037ab4: f7fb f9d0 bl 8032e58 8037ab8: 493a ldr r1, [pc, #232] ; (8037ba4 ) 8037aba: 4602 mov r2, r0 8037abc: 483a ldr r0, [pc, #232] ; (8037ba8 ) 8037abe: f7ef fea9 bl 8027814 sprintf(sSettings.sWebParams.mask, "%s", ipaddr_ntoa(&netmask)); 8037ac2: a802 add r0, sp, #8 8037ac4: f7fb f9c8 bl 8032e58 8037ac8: 4936 ldr r1, [pc, #216] ; (8037ba4 ) 8037aca: 4602 mov r2, r0 8037acc: 4837 ldr r0, [pc, #220] ; (8037bac ) 8037ace: f7ef fea1 bl 8027814 sprintf(sSettings.sWebParams.gate, "%s", ipaddr_ntoa(&gw)); 8037ad2: a803 add r0, sp, #12 8037ad4: f7fb f9c0 bl 8032e58 8037ad8: 4932 ldr r1, [pc, #200] ; (8037ba4 ) 8037ada: 4602 mov r2, r0 8037adc: 4834 ldr r0, [pc, #208] ; (8037bb0 ) 8037ade: f7ef fe99 bl 8027814 /* Обновляем временные настройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; 8037ae2: f895 3032 ldrb.w r3, [r5, #50] ; 0x32 sprintf(sSettings.sWebTempParams.ip, "%s", ipaddr_ntoa(&ipaddr)); 8037ae6: 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; 8037ae8: f885 3063 strb.w r3, [r5, #99] ; 0x63 sprintf(sSettings.sWebTempParams.ip, "%s", ipaddr_ntoa(&ipaddr)); 8037aec: f7fb f9b4 bl 8032e58 8037af0: 492c ldr r1, [pc, #176] ; (8037ba4 ) 8037af2: 4602 mov r2, r0 8037af4: 482f ldr r0, [pc, #188] ; (8037bb4 ) 8037af6: f7ef fe8d bl 8027814 sprintf(sSettings.sWebTempParams.mask, "%s", ipaddr_ntoa(&netmask)); 8037afa: a802 add r0, sp, #8 8037afc: f7fb f9ac bl 8032e58 8037b00: 4928 ldr r1, [pc, #160] ; (8037ba4 ) 8037b02: 4602 mov r2, r0 8037b04: 482c ldr r0, [pc, #176] ; (8037bb8 ) 8037b06: f7ef fe85 bl 8027814 sprintf(sSettings.sWebTempParams.gate, "%s", ipaddr_ntoa(&gw)); 8037b0a: a803 add r0, sp, #12 8037b0c: f7fb f9a4 bl 8032e58 8037b10: 4924 ldr r1, [pc, #144] ; (8037ba4 ) 8037b12: 4602 mov r2, r0 8037b14: 4829 ldr r0, [pc, #164] ; (8037bbc ) 8037b16: f7ef fe7d bl 8027814 PRINT_USART("Gateway: "); PRINT_USART(ipaddr_ntoa(&gw)); PRINT_USART("\n\r"); vTaskDelay(50); 8037b1a: 2032 movs r0, #50 ; 0x32 8037b1c: f7f3 f9f0 bl 802af00 /* Установлен динамический IP, можно отправить трап о перезагрузке устройства */ SNMP_SendUserTrap(DEVICE_REBOOTED); 8037b20: 2004 movs r0, #4 8037b22: f000 fa8b bl 803803c vTaskDelete(xHandleDHCP); 8037b26: 4b26 ldr r3, [pc, #152] ; (8037bc0 ) 8037b28: 6818 ldr r0, [r3, #0] 8037b2a: f7f3 f827 bl 802ab7c netmask = xnetif.netmask; gw = xnetif.gw; if (ipaddr.addr != 0) { DHCP_state = DHCP_ADDRESS_ASSIGNED; 8037b2e: 2402 movs r4, #2 8037b30: e02f b.n 8037b92 vTaskDelete(xHandleDHCP); } else { /* DHCP timeout */ if (xnetif.dhcp->tries > MAX_DHCP_TRIES) 8037b32: 6a03 ldr r3, [r0, #32] 8037b34: 7b5b ldrb r3, [r3, #13] 8037b36: 2b03 cmp r3, #3 8037b38: d92b bls.n 8037b92 { DHCP_state = DHCP_TIMEOUT; /* Stop DHCP */ dhcp_stop(&xnetif); 8037b3a: f7f7 fdd3 bl 802f6e4 if (sSettings.sFlags.netsettingsChanged == true) 8037b3e: f895 3120 ldrb.w r3, [r5, #288] ; 0x120 8037b42: b14b cbz r3, 8037b58 { ipaddr.addr = ipaddr_addr(sSettings.sWebTempParams.ip); 8037b44: 481b ldr r0, [pc, #108] ; (8037bb4 ) 8037b46: f7fb f934 bl 8032db2 8037b4a: 9001 str r0, [sp, #4] netmask.addr = ipaddr_addr(sSettings.sWebTempParams.mask); 8037b4c: 481a ldr r0, [pc, #104] ; (8037bb8 ) 8037b4e: f7fb f930 bl 8032db2 8037b52: 9002 str r0, [sp, #8] gw.addr = ipaddr_addr(sSettings.sWebTempParams.gate); 8037b54: 4819 ldr r0, [pc, #100] ; (8037bbc ) 8037b56: e008 b.n 8037b6a } else { ipaddr.addr = ipaddr_addr(sSettings.sWebParams.ip); 8037b58: 4813 ldr r0, [pc, #76] ; (8037ba8 ) 8037b5a: f7fb f92a bl 8032db2 8037b5e: 9001 str r0, [sp, #4] netmask.addr = ipaddr_addr(sSettings.sWebParams.mask); 8037b60: 4812 ldr r0, [pc, #72] ; (8037bac ) 8037b62: f7fb f926 bl 8032db2 8037b66: 9002 str r0, [sp, #8] gw.addr = ipaddr_addr(sSettings.sWebParams.gate); 8037b68: 4811 ldr r0, [pc, #68] ; (8037bb0 ) 8037b6a: f7fb f922 bl 8032db2 } /* Static address used */ netif_set_addr(&xnetif, &ipaddr , &netmask, &gw); 8037b6e: a901 add r1, sp, #4 8037b70: aa02 add r2, sp, #8 8037b72: 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); 8037b74: 9003 str r0, [sp, #12] } /* Static address used */ netif_set_addr(&xnetif, &ipaddr , &netmask, &gw); 8037b76: 480a ldr r0, [pc, #40] ; (8037ba0 ) 8037b78: f7f8 f824 bl 802fbc4 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); 8037b7c: 2032 movs r0, #50 ; 0x32 8037b7e: f7f3 f9bf bl 802af00 /* Установлен статический IP, можно отправить трап о перезагрузке устройства */ SNMP_SendUserTrap(DEVICE_REBOOTED); 8037b82: 2004 movs r0, #4 8037b84: f000 fa5a bl 803803c vTaskDelete(xHandleDHCP); 8037b88: 4b0d ldr r3, [pc, #52] ; (8037bc0 ) 8037b8a: 6818 ldr r0, [r3, #0] 8037b8c: f7f2 fff6 bl 802ab7c else { /* DHCP timeout */ if (xnetif.dhcp->tries > MAX_DHCP_TRIES) { DHCP_state = DHCP_TIMEOUT; 8037b90: 2403 movs r4, #3 break; default: break; } vTaskDelay(250); 8037b92: 20fa movs r0, #250 ; 0xfa 8037b94: f7f3 f9b4 bl 802af00 } 8037b98: e772 b.n 8037a80 8037b9a: bf00 nop 8037b9c: 2000cfc0 .word 0x2000cfc0 8037ba0: 2000f868 .word 0x2000f868 8037ba4: 0803987b .word 0x0803987b 8037ba8: 2000cfc2 .word 0x2000cfc2 8037bac: 2000cfe2 .word 0x2000cfe2 8037bb0: 2000cfd2 .word 0x2000cfd2 8037bb4: 2000cff3 .word 0x2000cff3 8037bb8: 2000d013 .word 0x2000d013 8037bbc: 2000d003 .word 0x2000d003 8037bc0: 2000c7dc .word 0x2000c7dc 08037bc4 : TaskHandle_t xHandleWebReinit = NULL; bool dhcp = false; void LwIP_Init(void) { 8037bc4: b530 push {r4, r5, lr} struct ip_addr ipaddr; struct ip_addr netmask; struct ip_addr gw; char str[20]; tcpip_init( NULL, NULL ); 8037bc6: 2000 movs r0, #0 /* Если настройки изменили, то используем временные параметры */ if (sSettings.sFlags.netsettingsChanged == true) 8037bc8: 4c50 ldr r4, [pc, #320] ; (8037d0c ) TaskHandle_t xHandleWebReinit = NULL; bool dhcp = false; void LwIP_Init(void) { 8037bca: b08d sub sp, #52 ; 0x34 struct ip_addr ipaddr; struct ip_addr netmask; struct ip_addr gw; char str[20]; tcpip_init( NULL, NULL ); 8037bcc: 4601 mov r1, r0 8037bce: f7f6 ff3d bl 802ea4c /* Если настройки изменили, то используем временные параметры */ if (sSettings.sFlags.netsettingsChanged == true) 8037bd2: f894 3120 ldrb.w r3, [r4, #288] ; 0x120 8037bd6: 2b00 cmp r3, #0 8037bd8: d032 beq.n 8037c40 { if (sSettings.sWebTempParams.dhcpEnable) 8037bda: f894 5063 ldrb.w r5, [r4, #99] ; 0x63 8037bde: b12d cbz r5, 8037bec { ipaddr.addr = 0; 8037be0: 2300 movs r3, #0 8037be2: 9304 str r3, [sp, #16] netmask.addr = 0; 8037be4: 9305 str r3, [sp, #20] gw.addr = 0; 8037be6: 9306 str r3, [sp, #24] netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 8037be8: 9300 str r3, [sp, #0] 8037bea: e015 b.n 8037c18 netif_set_default(&xnetif); netif_set_up(&xnetif); } else { ipaddr.addr = ipaddr_addr(sSettings.sWebTempParams.ip); 8037bec: f104 0033 add.w r0, r4, #51 ; 0x33 8037bf0: f7fb f8df bl 8032db2 8037bf4: 9004 str r0, [sp, #16] netmask.addr = ipaddr_addr(sSettings.sWebTempParams.mask); 8037bf6: f104 0053 add.w r0, r4, #83 ; 0x53 8037bfa: f7fb f8da bl 8032db2 8037bfe: 9005 str r0, [sp, #20] gw.addr = ipaddr_addr(sSettings.sWebTempParams.gate); 8037c00: f104 0043 add.w r0, r4, #67 ; 0x43 8037c04: f7fb f8d5 bl 8032db2 sprintf(str, " %s\n\r", sSettings.sWebTempParams.ip); 8037c08: 4941 ldr r1, [pc, #260] ; (8037d10 ) } else { ipaddr.addr = ipaddr_addr(sSettings.sWebTempParams.ip); netmask.addr = ipaddr_addr(sSettings.sWebTempParams.mask); gw.addr = ipaddr_addr(sSettings.sWebTempParams.gate); 8037c0a: 9006 str r0, [sp, #24] sprintf(str, " %s\n\r", sSettings.sWebTempParams.ip); 8037c0c: f104 0233 add.w r2, r4, #51 ; 0x33 8037c10: a807 add r0, sp, #28 8037c12: f7ef fdff bl 8027814 PRINT_USART("\n\rStatic IP address \n\r"); PRINT_USART(str); netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 8037c16: 9500 str r5, [sp, #0] 8037c18: 4b3e ldr r3, [pc, #248] ; (8037d14 ) 8037c1a: 483f ldr r0, [pc, #252] ; (8037d18 ) 8037c1c: 9301 str r3, [sp, #4] 8037c1e: 4b3f ldr r3, [pc, #252] ; (8037d1c ) 8037c20: a904 add r1, sp, #16 8037c22: aa05 add r2, sp, #20 8037c24: 9302 str r3, [sp, #8] 8037c26: ab06 add r3, sp, #24 8037c28: f7f7 ffda bl 802fbe0 netif_set_default(&xnetif); 8037c2c: 483a ldr r0, [pc, #232] ; (8037d18 ) 8037c2e: f7f7 ffff bl 802fc30 netif_set_up(&xnetif); 8037c32: 4839 ldr r0, [pc, #228] ; (8037d18 ) 8037c34: f7f8 f80c bl 802fc50 } if (sSettings.sWebTempParams.dhcpEnable) { 8037c38: 4b34 ldr r3, [pc, #208] ; (8037d0c ) 8037c3a: f893 3063 ldrb.w r3, [r3, #99] ; 0x63 8037c3e: e043 b.n 8037cc8 } } /* Настройки не менялись, используем обычне настройки из флеш памяти */ else { if (sSettings.sWebParams.dhcpEnable) 8037c40: f894 5032 ldrb.w r5, [r4, #50] ; 0x32 8037c44: b125 cbz r5, 8037c50 { ipaddr.addr = 0; 8037c46: 9304 str r3, [sp, #16] netmask.addr = 0; 8037c48: 9305 str r3, [sp, #20] gw.addr = 0; 8037c4a: 9306 str r3, [sp, #24] netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 8037c4c: 9300 str r3, [sp, #0] 8037c4e: e028 b.n 8037ca2 netif_set_default(&xnetif); netif_set_up(&xnetif); } else { ipaddr.addr = ipaddr_addr(sSettings.sWebParams.ip); 8037c50: 1ca0 adds r0, r4, #2 8037c52: f7fb f8ae bl 8032db2 8037c56: 9004 str r0, [sp, #16] netmask.addr = ipaddr_addr(sSettings.sWebParams.mask); 8037c58: f104 0022 add.w r0, r4, #34 ; 0x22 8037c5c: f7fb f8a9 bl 8032db2 8037c60: 9005 str r0, [sp, #20] gw.addr = ipaddr_addr(sSettings.sWebParams.gate); 8037c62: f104 0012 add.w r0, r4, #18 8037c66: f7fb f8a4 bl 8032db2 /* Обновляем временные настройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; 8037c6a: 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); 8037c6e: 9006 str r0, [sp, #24] /* Обновляем временные настройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; strcpy(sSettings.sWebTempParams.ip, sSettings.sWebParams.ip); 8037c70: 1ca1 adds r1, r4, #2 8037c72: 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; 8037c76: f884 3063 strb.w r3, [r4, #99] ; 0x63 strcpy(sSettings.sWebTempParams.ip, sSettings.sWebParams.ip); 8037c7a: f7ea f8bb bl 8021df4 strcpy(sSettings.sWebTempParams.mask, sSettings.sWebParams.mask); 8037c7e: f104 0122 add.w r1, r4, #34 ; 0x22 8037c82: f104 0053 add.w r0, r4, #83 ; 0x53 8037c86: f7ea f8b5 bl 8021df4 strcpy(sSettings.sWebTempParams.gate, sSettings.sWebParams.gate); 8037c8a: f104 0112 add.w r1, r4, #18 8037c8e: f104 0043 add.w r0, r4, #67 ; 0x43 8037c92: f7ea f8af bl 8021df4 sprintf(str, " %s\n\r", sSettings.sWebParams.ip); 8037c96: a807 add r0, sp, #28 8037c98: 491d ldr r1, [pc, #116] ; (8037d10 ) 8037c9a: 1ca2 adds r2, r4, #2 8037c9c: f7ef fdba bl 8027814 PRINT_USART("\n\rStatic IP address \n\r"); PRINT_USART(str); netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 8037ca0: 9500 str r5, [sp, #0] 8037ca2: 4b1c ldr r3, [pc, #112] ; (8037d14 ) 8037ca4: 481c ldr r0, [pc, #112] ; (8037d18 ) 8037ca6: 9301 str r3, [sp, #4] 8037ca8: 4b1c ldr r3, [pc, #112] ; (8037d1c ) 8037caa: a904 add r1, sp, #16 8037cac: aa05 add r2, sp, #20 8037cae: 9302 str r3, [sp, #8] 8037cb0: ab06 add r3, sp, #24 8037cb2: f7f7 ff95 bl 802fbe0 netif_set_default(&xnetif); 8037cb6: 4818 ldr r0, [pc, #96] ; (8037d18 ) 8037cb8: f7f7 ffba bl 802fc30 netif_set_up(&xnetif); 8037cbc: 4816 ldr r0, [pc, #88] ; (8037d18 ) 8037cbe: f7f7 ffc7 bl 802fc50 } if (sSettings.sWebParams.dhcpEnable) { 8037cc2: 4b12 ldr r3, [pc, #72] ; (8037d0c ) 8037cc4: f893 3032 ldrb.w r3, [r3, #50] ; 0x32 8037cc8: b17b cbz r3, 8037cea xTaskCreate(LwIP_DHCP_task, "DHCPClient", configMINIMAL_STACK_SIZE * 2, NULL, 8037cca: 2302 movs r3, #2 8037ccc: 9300 str r3, [sp, #0] 8037cce: 4b14 ldr r3, [pc, #80] ; (8037d20 ) 8037cd0: 4814 ldr r0, [pc, #80] ; (8037d24 ) 8037cd2: 9301 str r3, [sp, #4] 8037cd4: 2300 movs r3, #0 8037cd6: 9302 str r3, [sp, #8] 8037cd8: 9303 str r3, [sp, #12] 8037cda: f44f 7280 mov.w r2, #256 ; 0x100 8037cde: 4912 ldr r1, [pc, #72] ; (8037d28 ) 8037ce0: f7f2 fe74 bl 802a9cc tskIDLE_PRIORITY + 2, &xHandleDHCP); dhcp = true; 8037ce4: 4b11 ldr r3, [pc, #68] ; (8037d2c ) 8037ce6: 2201 movs r2, #1 8037ce8: 701a strb r2, [r3, #0] } } /* Если настройки изменились, запускаем задачу по отсчету времени реакции пользователя*/ if (sSettings.sFlags.netsettingsChanged == true) 8037cea: 4b08 ldr r3, [pc, #32] ; (8037d0c ) 8037cec: f893 3120 ldrb.w r3, [r3, #288] ; 0x120 8037cf0: b153 cbz r3, 8037d08 xTaskCreate(vTaskWebReinit, "webReinit", configMINIMAL_STACK_SIZE, NULL, 8037cf2: 4a0f ldr r2, [pc, #60] ; (8037d30 ) 8037cf4: 480f ldr r0, [pc, #60] ; (8037d34 ) 8037cf6: 9201 str r2, [sp, #4] 8037cf8: 2300 movs r3, #0 8037cfa: 9300 str r3, [sp, #0] 8037cfc: 9302 str r3, [sp, #8] 8037cfe: 9303 str r3, [sp, #12] 8037d00: 490d ldr r1, [pc, #52] ; (8037d38 ) 8037d02: 2280 movs r2, #128 ; 0x80 8037d04: f7f2 fe62 bl 802a9cc tskIDLE_PRIORITY, &xHandleWebReinit); } 8037d08: b00d add sp, #52 ; 0x34 8037d0a: bd30 pop {r4, r5, pc} 8037d0c: 2000cfc0 .word 0x2000cfc0 8037d10: 08045786 .word 0x08045786 8037d14: 08037669 .word 0x08037669 8037d18: 2000f868 .word 0x2000f868 8037d1c: 0802e9d9 .word 0x0802e9d9 8037d20: 2000c7dc .word 0x2000c7dc 8037d24: 08037a79 .word 0x08037a79 8037d28: 0804578c .word 0x0804578c 8037d2c: 2000c7d4 .word 0x2000c7d4 8037d30: 2000c7d8 .word 0x2000c7d8 8037d34: 080379ed .word 0x080379ed 8037d38: 08045797 .word 0x08045797 08037d3c : vTaskDelay(1000); } } void SaveWEBparam(void) { 8037d3c: b510 push {r4, lr} sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 8037d3e: 4c0c ldr r4, [pc, #48] ; (8037d70 ) 8037d40: f894 3063 ldrb.w r3, [r4, #99] ; 0x63 strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 8037d44: f104 0133 add.w r1, r4, #51 ; 0x33 8037d48: 1ca0 adds r0, r4, #2 } } void SaveWEBparam(void) { sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 8037d4a: f884 3032 strb.w r3, [r4, #50] ; 0x32 strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 8037d4e: f7ea f851 bl 8021df4 strcpy(sSettings.sWebParams.gate, sSettings.sWebTempParams.gate); 8037d52: f104 0143 add.w r1, r4, #67 ; 0x43 8037d56: f104 0012 add.w r0, r4, #18 8037d5a: f7ea f84b bl 8021df4 strcpy(sSettings.sWebParams.mask, sSettings.sWebTempParams.mask); 8037d5e: f104 0022 add.w r0, r4, #34 ; 0x22 8037d62: f104 0153 add.w r1, r4, #83 ; 0x53 } 8037d66: e8bd 4010 ldmia.w sp!, {r4, lr} void SaveWEBparam(void) { sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); strcpy(sSettings.sWebParams.gate, sSettings.sWebTempParams.gate); strcpy(sSettings.sWebParams.mask, sSettings.sWebTempParams.mask); 8037d6a: f7ea b843 b.w 8021df4 8037d6e: bf00 nop 8037d70: 2000cfc0 .word 0x2000cfc0 08037d74 : /** * @brief Возвращает true если сетевые параметры изменились */ bool GetStateWebReinit(void) { 8037d74: b510 push {r4, lr} /* Статус dhcp изменился? */ if (sSettings.sWebParams.dhcpEnable != sSettings.sWebTempParams.dhcpEnable) 8037d76: 4c12 ldr r4, [pc, #72] ; (8037dc0 ) 8037d78: f894 2032 ldrb.w r2, [r4, #50] ; 0x32 8037d7c: f894 3063 ldrb.w r3, [r4, #99] ; 0x63 8037d80: 429a cmp r2, r3 8037d82: d004 beq.n 8037d8e { /* Включили dhcp */ if (sSettings.sWebTempParams.dhcpEnable == 1) { /* Устанавилваем флаг */ SetWebReinitFlag(true); 8037d84: 2001 movs r0, #1 8037d86: f7f0 f9cd bl 8028124 return true; 8037d8a: 2001 movs r0, #1 8037d8c: bd10 pop {r4, pc} return true; } } /* Изменился IP? */ if (strstr(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip) == 0) 8037d8e: 1ca0 adds r0, r4, #2 8037d90: f104 0133 add.w r1, r4, #51 ; 0x33 8037d94: f7ea fb0c bl 80223b0 8037d98: 2800 cmp r0, #0 8037d9a: d0f3 beq.n 8037d84 SetWebReinitFlag(true); return true; } /* Изменился шлюз? */ if (strstr(sSettings.sWebParams.gate, sSettings.sWebTempParams.gate) == 0) 8037d9c: f104 0012 add.w r0, r4, #18 8037da0: f104 0143 add.w r1, r4, #67 ; 0x43 8037da4: f7ea fb04 bl 80223b0 8037da8: 2800 cmp r0, #0 8037daa: d0eb beq.n 8037d84 SetWebReinitFlag(true); return true; } /* Изменилась маска? */ if (strstr(sSettings.sWebParams.mask, sSettings.sWebTempParams.mask) == 0) 8037dac: f104 0022 add.w r0, r4, #34 ; 0x22 8037db0: f104 0153 add.w r1, r4, #83 ; 0x53 8037db4: f7ea fafc bl 80223b0 8037db8: 2800 cmp r0, #0 8037dba: d0e3 beq.n 8037d84 /* Устанавилваем флаг */ SetWebReinitFlag(true); return true; } return false; 8037dbc: 2000 movs r0, #0 } 8037dbe: bd10 pop {r4, pc} 8037dc0: 2000cfc0 .word 0x2000cfc0 08037dc4 : \param len - длина переменной в байтах \param value - указатель на значение переменной \return нет ------------------------------------------------------------------------------*/ static void signals_set_value (struct obj_def *od, u16_t len, void *value) { 8037dc4: b530 push {r4, r5, lr} 8037dc6: 4605 mov r5, r0 8037dc8: b087 sub sp, #28 8037dca: 4614 mov r4, r2 u8_t id; uint32_t val; char *val_string; char str[20]; memset(str, 0, 20); 8037dcc: a801 add r0, sp, #4 8037dce: 2100 movs r1, #0 8037dd0: 2214 movs r2, #20 8037dd2: f7e9 fe95 bl 8021b00 id = od->id_inst_ptr[0]; 8037dd6: 68ab ldr r3, [r5, #8] switch (id) 8037dd8: 781b ldrb r3, [r3, #0] 8037dda: 3b02 subs r3, #2 8037ddc: 2b04 cmp r3, #4 8037dde: d83f bhi.n 8037e60 8037de0: e8df f003 tbb [pc, r3] 8037de4: 103e0903 .word 0x103e0903 8037de8: 26 .byte 0x26 8037de9: 00 .byte 0x00 { case 2: /* RestoreSignal */ val = *((s32_t*)value); if (val == 1) { 8037dea: 6823 ldr r3, [r4, #0] 8037dec: 2b01 cmp r3, #1 8037dee: d137 bne.n 8037e60 HTTP_ResetSettings(); 8037df0: f7f5 ff7a bl 802dce8 8037df4: e034 b.n 8037e60 } break; case 3: /* RebootSignal */ val = *((s32_t*)value); if (val == 1) 8037df6: 6823 ldr r3, [r4, #0] 8037df8: 2b01 cmp r3, #1 8037dfa: d131 bne.n 8037e60 HTTP_StartResetTask(false); 8037dfc: 2000 movs r0, #0 8037dfe: f7f5 ff93 bl 802dd28 8037e02: e02d b.n 8037e60 break; case 5: /* DO1 */ if(sSettings.sInOuts.ro_type_source[0] == SNMP_SET){ 8037e04: 4b17 ldr r3, [pc, #92] ; (8037e64 ) 8037e06: f893 3374 ldrb.w r3, [r3, #884] ; 0x374 8037e0a: 2b03 cmp r3, #3 8037e0c: d128 bne.n 8037e60 val_string = (char*)value; SetROStr(val_string, 0); 8037e0e: 2100 movs r1, #0 8037e10: 4620 mov r0, r4 8037e12: f7f0 fb7d bl 8028510 if(val_string[0] == 0x31) 8037e16: 7823 ldrb r3, [r4, #0] 8037e18: 2b31 cmp r3, #49 ; 0x31 strcat(str, "Замкнуто"); 8037e1a: bf0c ite eq 8037e1c: 4912 ldreq r1, [pc, #72] ; (8037e68 ) else strcat(str, "Разомкнуто"); 8037e1e: 4913 ldrne r1, [pc, #76] ; (8037e6c ) 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, "Замкнуто"); 8037e20: a801 add r0, sp, #4 else strcat(str, "Разомкнуто"); 8037e22: f7e9 fed3 bl 8021bcc SNMP_SendUserTrap(DO0_TOGGLED); 8037e26: 2007 movs r0, #7 8037e28: f000 f908 bl 803803c log_event_data(LOG_DO0_STATE, str); 8037e2c: 2008 movs r0, #8 8037e2e: e014 b.n 8037e5a } break; case 6: /* DO2 */ if(sSettings.sInOuts.ro_type_source[1] == SNMP_SET){ 8037e30: 4b0c ldr r3, [pc, #48] ; (8037e64 ) 8037e32: f893 3375 ldrb.w r3, [r3, #885] ; 0x375 8037e36: 2b03 cmp r3, #3 8037e38: d112 bne.n 8037e60 val_string = (char*)value; SetROStr(val_string, 1); 8037e3a: 2101 movs r1, #1 8037e3c: 4620 mov r0, r4 8037e3e: f7f0 fb67 bl 8028510 if(val_string[0] == 0x31) 8037e42: 7823 ldrb r3, [r4, #0] 8037e44: 2b31 cmp r3, #49 ; 0x31 strcat(str, "Замкнуто"); 8037e46: bf0c ite eq 8037e48: 4907 ldreq r1, [pc, #28] ; (8037e68 ) else strcat(str, "Разомкнуто"); 8037e4a: 4908 ldrne r1, [pc, #32] ; (8037e6c ) 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, "Замкнуто"); 8037e4c: a801 add r0, sp, #4 else strcat(str, "Разомкнуто"); 8037e4e: f7e9 febd bl 8021bcc SNMP_SendUserTrap(DO1_TOGGLED); 8037e52: 2008 movs r0, #8 8037e54: f000 f8f2 bl 803803c log_event_data(LOG_DO1_STATE, str); 8037e58: 2009 movs r0, #9 8037e5a: a901 add r1, sp, #4 8037e5c: f7f1 fd98 bl 8029990 break; default : break; }; } 8037e60: b007 add sp, #28 8037e62: bd30 pop {r4, r5, pc} 8037e64: 2000cfc0 .word 0x2000cfc0 8037e68: 080399fb .word 0x080399fb 8037e6c: 08039a0c .word 0x08039a0c 08037e70 : \param len - длина переменной в байтах \param value - указатель на значение переменной \return нет ------------------------------------------------------------------------------*/ static void signals_get_value (struct obj_def *od, u16_t len, void *value) { 8037e70: 4613 mov r3, r2 u8_t id; id = od->id_inst_ptr[0]; 8037e72: 6882 ldr r2, [r0, #8] switch (id) 8037e74: 7812 ldrb r2, [r2, #0] 8037e76: 3a01 subs r2, #1 \param len - длина переменной в байтах \param value - указатель на значение переменной \return нет ------------------------------------------------------------------------------*/ static void signals_get_value (struct obj_def *od, u16_t len, void *value) { 8037e78: b510 push {r4, lr} 8037e7a: 460c mov r4, r1 u8_t id; id = od->id_inst_ptr[0]; switch (id) 8037e7c: 2a11 cmp r2, #17 8037e7e: d814 bhi.n 8037eaa 8037e80: e8df f002 tbb [pc, r2] 8037e84: 0c09090c .word 0x0c09090c 8037e88: 09090c0c .word 0x09090c0c 8037e8c: 0c0c0c0c .word 0x0c0c0c0c 8037e90: 0c0c0c0c .word 0x0c0c0c0c 8037e94: 0c0c .short 0x0c0c break; case 7: /* BatTest */ *((s32_t*)value) = 0; break; case 8: /* Shutdown UPS */ *((s32_t*)value) = 0; 8037e96: 2200 movs r2, #0 8037e98: 601a str r2, [r3, #0] break; 8037e9a: 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); 8037e9c: 4903 ldr r1, [pc, #12] ; (8037eac ) 8037e9e: 4618 mov r0, r3 8037ea0: 4622 mov r2, r4 break; default : break; }; } 8037ea2: 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); 8037ea6: f7fc ba31 b.w 803430c 8037eaa: bd10 pop {r4, pc} 8037eac: 2000f9b4 .word 0x2000f9b4 08037eb0 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8037eb0: 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) { 8037eb2: b538 push {r3, r4, r5, lr} 8037eb4: 4614 mov r4, r2 u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8037eb6: f040 8081 bne.w 8037fbc { od->id_inst_len = ident_len; 8037eba: 2302 movs r3, #2 8037ebc: 7193 strb r3, [r2, #6] { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 8037ebe: 1f0a subs r2, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8037ec0: 60a2 str r2, [r4, #8] id = ident[0]; switch (id) 8037ec2: f811 2c04 ldrb.w r2, [r1, #-4] 8037ec6: 3a01 subs r2, #1 8037ec8: 2a11 cmp r2, #17 8037eca: d877 bhi.n 8037fbc 8037ecc: e8df f002 tbb [pc, r2] 8037ed0: 0f242409 .word 0x0f242409 8037ed4: 2a241a15 .word 0x2a241a15 8037ed8: 453f3932 .word 0x453f3932 8037edc: 5d57514b .word 0x5d57514b 8037ee0: 6963 .short 0x6963 { case 1: /* FWVersion */ GetVersionStr(paramStr, ¶mLength); 8037ee2: 4d38 ldr r5, [pc, #224] ; (8037fc4 ) 8037ee4: 4838 ldr r0, [pc, #224] ; (8037fc8 ) 8037ee6: 4629 mov r1, r5 8037ee8: f7ef fee8 bl 8027cbc 8037eec: e05e b.n 8037fac 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); 8037eee: 4d35 ldr r5, [pc, #212] ; (8037fc4 ) 8037ef0: 4835 ldr r0, [pc, #212] ; (8037fc8 ) 8037ef2: 4629 mov r1, r5 8037ef4: f7ef ff4e bl 8027d94 8037ef8: e058 b.n 8037fac 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); 8037efa: 4d32 ldr r5, [pc, #200] ; (8037fc4 ) 8037efc: 4832 ldr r0, [pc, #200] ; (8037fc8 ) 8037efe: 4629 mov r1, r5 8037f00: 2200 movs r2, #0 8037f02: e003 b.n 8037f0c 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); 8037f04: 4d2f ldr r5, [pc, #188] ; (8037fc4 ) 8037f06: 4830 ldr r0, [pc, #192] ; (8037fc8 ) 8037f08: 4629 mov r1, r5 8037f0a: 2201 movs r2, #1 8037f0c: f7ef fe54 bl 8027bb8 od->instance = MIB_OBJECT_SCALAR; 8037f10: 2301 movs r3, #1 8037f12: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_WRITE; 8037f14: 2303 movs r3, #3 8037f16: e04b b.n 8037fb0 od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 7: /* BatTest*/ od->instance = MIB_OBJECT_SCALAR; 8037f18: 2201 movs r2, #1 od->access = MIB_OBJECT_WRITE_ONLY; 8037f1a: 7063 strb r3, [r4, #1] od->asn_type = SNMP_ASN1_INTEG; 8037f1c: 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; 8037f1e: 7022 strb r2, [r4, #0] od->access = MIB_OBJECT_WRITE_ONLY; od->asn_type = SNMP_ASN1_INTEG; od->v_len = sizeof(s32_t); 8037f20: 2304 movs r3, #4 8037f22: e049 b.n 8037fb8 break; case 8: /* Shutdown UPS*/ od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_WRITE_ONLY; 8037f24: 7063 strb r3, [r4, #1] od->asn_type = SNMP_ASN1_OC_STR; 8037f26: 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; 8037f28: 2201 movs r2, #1 od->access = MIB_OBJECT_WRITE_ONLY; od->asn_type = SNMP_ASN1_OC_STR; 8037f2a: 70a3 strb r3, [r4, #2] od->v_len = paramLength; 8037f2c: 4b25 ldr r3, [pc, #148] ; (8037fc4 ) od->asn_type = SNMP_ASN1_INTEG; od->v_len = sizeof(s32_t); break; case 8: /* Shutdown UPS*/ od->instance = MIB_OBJECT_SCALAR; 8037f2e: 7022 strb r2, [r4, #0] od->access = MIB_OBJECT_WRITE_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; 8037f30: 781b ldrb r3, [r3, #0] 8037f32: e041 b.n 8037fb8 break; case 9: /* DIO*/ GetDINStatusStr(paramStr, ¶mLength, 0); 8037f34: 4d23 ldr r5, [pc, #140] ; (8037fc4 ) 8037f36: 4824 ldr r0, [pc, #144] ; (8037fc8 ) 8037f38: 4629 mov r1, r5 8037f3a: 2200 movs r2, #0 8037f3c: f7ef fe02 bl 8027b44 8037f40: e034 b.n 8037fac od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 10: /* IntTemp */ GetInternalTempStr(paramStr, ¶mLength); 8037f42: 4d20 ldr r5, [pc, #128] ; (8037fc4 ) 8037f44: 4820 ldr r0, [pc, #128] ; (8037fc8 ) 8037f46: 4629 mov r1, r5 8037f48: f7ef fcfe bl 8027948 8037f4c: e02e b.n 8037fac od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 11: /* InFreq */ GetInputFreqStr(paramStr, ¶mLength); 8037f4e: 4d1d ldr r5, [pc, #116] ; (8037fc4 ) 8037f50: 481d ldr r0, [pc, #116] ; (8037fc8 ) 8037f52: 4629 mov r1, r5 8037f54: f7ef fc6a bl 802782c 8037f58: e028 b.n 8037fac od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 12: /* InVoltVAC */ GetInputVoltageStr(paramStr, ¶mLength); 8037f5a: 4d1a ldr r5, [pc, #104] ; (8037fc4 ) 8037f5c: 481a ldr r0, [pc, #104] ; (8037fc8 ) 8037f5e: 4629 mov r1, r5 8037f60: f7ef fc90 bl 8027884 8037f64: e022 b.n 8037fac od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 13: /* OutVoltVAC */ GetOutputVoltageStr(paramStr, ¶mLength); 8037f66: 4d17 ldr r5, [pc, #92] ; (8037fc4 ) 8037f68: 4817 ldr r0, [pc, #92] ; (8037fc8 ) 8037f6a: 4629 mov r1, r5 8037f6c: f7ef fca0 bl 80278b0 8037f70: e01c b.n 8037fac od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 14: /* Power */ GetPowerStr(paramStr, ¶mLength); 8037f72: 4d14 ldr r5, [pc, #80] ; (8037fc4 ) 8037f74: 4814 ldr r0, [pc, #80] ; (8037fc8 ) 8037f76: 4629 mov r1, r5 8037f78: f7ef fcb0 bl 80278dc 8037f7c: e016 b.n 8037fac od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 15: /* BatCap */ GetBatCapacityStr(paramStr, ¶mLength); 8037f7e: 4d11 ldr r5, [pc, #68] ; (8037fc4 ) 8037f80: 4811 ldr r0, [pc, #68] ; (8037fc8 ) 8037f82: 4629 mov r1, r5 8037f84: f7ef fcbc bl 8027900 8037f88: e010 b.n 8037fac od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 16: /* BatTime */ GetRuntimeStr(paramStr, ¶mLength); 8037f8a: 4d0e ldr r5, [pc, #56] ; (8037fc4 ) 8037f8c: 480e ldr r0, [pc, #56] ; (8037fc8 ) 8037f8e: 4629 mov r1, r5 8037f90: f7ef fcc8 bl 8027924 8037f94: e00a b.n 8037fac od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 17: /* ConnectMonitor */ GetConnectMonitorStr(paramStr, ¶mLength); 8037f96: 4d0b ldr r5, [pc, #44] ; (8037fc4 ) 8037f98: 480b ldr r0, [pc, #44] ; (8037fc8 ) 8037f9a: 4629 mov r1, r5 8037f9c: f7ef fcfc bl 8027998 8037fa0: e004 b.n 8037fac od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 18: /* Alarms */ GetAlarmStr(paramStr, ¶mLength); 8037fa2: 4d08 ldr r5, [pc, #32] ; (8037fc4 ) 8037fa4: 4808 ldr r0, [pc, #32] ; (8037fc8 ) 8037fa6: 4629 mov r1, r5 8037fa8: f7ef fd08 bl 80279bc od->instance = MIB_OBJECT_SCALAR; 8037fac: 2301 movs r3, #1 8037fae: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8037fb0: 7063 strb r3, [r4, #1] od->asn_type = SNMP_ASN1_OC_STR; 8037fb2: 2304 movs r3, #4 8037fb4: 70a3 strb r3, [r4, #2] od->v_len = paramLength; 8037fb6: 782b ldrb r3, [r5, #0] 8037fb8: 80a3 strh r3, [r4, #4] break; 8037fba: bd38 pop {r3, r4, r5, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("planar_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8037fbc: 2300 movs r3, #0 8037fbe: 7023 strb r3, [r4, #0] 8037fc0: bd38 pop {r3, r4, r5, pc} 8037fc2: bf00 nop 8037fc4: 2000c7e2 .word 0x2000c7e2 8037fc8: 2000f9b4 .word 0x2000f9b4 08037fcc : \param value - указатель на значение переменной \return 0 - некорректное значение 1 - корректное значение ------------------------------------------------------------------------------*/ static u8_t signals_set_test (struct obj_def *od, u16_t len, void *value) { 8037fcc: b508 push {r3, lr} u8_t id, set_ok; char *val_string; LWIP_UNUSED_ARG(value); set_ok = 0; id = od->id_inst_ptr[0]; 8037fce: 6883 ldr r3, [r0, #8] switch (id) 8037fd0: 781b ldrb r3, [r3, #0] 8037fd2: 3b02 subs r3, #2 8037fd4: 2b04 cmp r3, #4 8037fd6: d81f bhi.n 8038018 8037fd8: e8df f003 tbb [pc, r3] 8037fdc: 051e0303 .word 0x051e0303 8037fe0: 14 .byte 0x14 8037fe1: 00 .byte 0x00 { u8_t id, set_ok; char *val_string; LWIP_UNUSED_ARG(value); set_ok = 0; 8037fe2: 2904 cmp r1, #4 8037fe4: e00a b.n 8037ffc { set_ok = 1; } break; case 5: /* DO1 */ if ( len >= 1 ) 8037fe6: b901 cbnz r1, 8037fea 8037fe8: e016 b.n 8038018 { val_string = (char*)value; if(atoi(val_string) <= 1){ 8037fea: 4610 mov r0, r2 8037fec: f7e9 fc68 bl 80218c0 8037ff0: 2801 cmp r0, #1 8037ff2: dc11 bgt.n 8038018 if(sSettings.sInOuts.ro_type_source[0] == SNMP_SET) 8037ff4: 4b09 ldr r3, [pc, #36] ; (803801c ) 8037ff6: f893 0374 ldrb.w r0, [r3, #884] ; 0x374 { u8_t id, set_ok; char *val_string; LWIP_UNUSED_ARG(value); set_ok = 0; 8037ffa: 2803 cmp r0, #3 8037ffc: bf14 ite ne 8037ffe: 2000 movne r0, #0 8038000: 2001 moveq r0, #1 8038002: bd08 pop {r3, pc} set_ok = 1; } } break; case 6: /* DO2 */ if ( len >= 1 ) 8038004: b141 cbz r1, 8038018 { val_string = (char*)value; if(atoi(val_string) <= 1){ 8038006: 4610 mov r0, r2 8038008: f7e9 fc5a bl 80218c0 803800c: 2801 cmp r0, #1 803800e: dc03 bgt.n 8038018 if(sSettings.sInOuts.ro_type_source[1] == SNMP_SET) 8038010: 4b02 ldr r3, [pc, #8] ; (803801c ) 8038012: f893 0375 ldrb.w r0, [r3, #885] ; 0x375 8038016: e7f0 b.n 8037ffa { u8_t id, set_ok; char *val_string; LWIP_UNUSED_ARG(value); set_ok = 0; 8038018: 2000 movs r0, #0 break; }; return set_ok; } 803801a: bd08 pop {r3, pc} 803801c: 2000cfc0 .word 0x2000cfc0 08038020 : /** * @brief Системный тик SNMP. Таск должен вызываться с частотой 100Гц. * @retval */ void SNMP_SysUpTimeTask(void *arg) { 8038020: b513 push {r0, r1, r4, lr} TickType_t xLastWakeTime; const TickType_t xFrequency = 10; xLastWakeTime = xTaskGetTickCount(); 8038022: f7f2 fe3b bl 802ac9c 8038026: ac02 add r4, sp, #8 8038028: f844 0d04 str.w r0, [r4, #-4]! while(1) { vTaskDelayUntil( &xLastWakeTime, xFrequency ); 803802c: 4620 mov r0, r4 803802e: 210a movs r1, #10 8038030: f7f2 ff98 bl 802af64 snmp_inc_sysuptime(); 8038034: f7fc fa88 bl 8034548 8038038: e7f8 b.n 803802c 803803a: 0000 movs r0, r0 0803803c : * FIFO буфера. * Если в настройках трапа отправка отключена, то трап игнорируется. * @retval */ void SNMP_SendUserTrap(uint8_t trapName) { 803803c: b51f push {r0, r1, r2, r3, r4, lr} uint16_t availableSpace; uint8_t dummyTrap; if (traps[trapName].trapEnable) 803803e: 4b0d ldr r3, [pc, #52] ; (8038074 ) * FIFO буфера. * Если в настройках трапа отправка отключена, то трап игнорируется. * @retval */ void SNMP_SendUserTrap(uint8_t trapName) { 8038040: f88d 0007 strb.w r0, [sp, #7] uint16_t availableSpace; uint8_t dummyTrap; if (traps[trapName].trapEnable) 8038044: eb03 00c0 add.w r0, r3, r0, lsl #3 8038048: 78c3 ldrb r3, [r0, #3] 803804a: b193 cbz r3, 8038072 { availableSpace = uxQueueSpacesAvailable(SNMP_TrapQueue); 803804c: 4c0a ldr r4, [pc, #40] ; (8038078 ) 803804e: 6820 ldr r0, [r4, #0] 8038050: f7f2 fc4c bl 802a8ec if (availableSpace == 0) 8038054: b282 uxth r2, r0 8038056: b92a cbnz r2, 8038064 xQueueReceive(SNMP_TrapQueue, &dummyTrap, 0); 8038058: 6820 ldr r0, [r4, #0] 803805a: f10d 010f add.w r1, sp, #15 803805e: 4613 mov r3, r2 8038060: f7f2 fb5b bl 802a71a xQueueSend(SNMP_TrapQueue, &trapName, 0); 8038064: 2200 movs r2, #0 8038066: 6820 ldr r0, [r4, #0] 8038068: f10d 0107 add.w r1, sp, #7 803806c: 4613 mov r3, r2 803806e: f7f2 fa14 bl 802a49a } } 8038072: bd1f pop {r0, r1, r2, r3, r4, pc} 8038074: 2000fab8 .word 0x2000fab8 8038078: 2000fab4 .word 0x2000fab4 0803807c : * @brief Установить SNMP Descriptor * @retval */ // TODO void SNMP_SetObjDescr(void) { 803807c: b538 push {r3, r4, r5, lr} static uint8_t len; strcpy(sSettings.sSnmp.sysDescr, sSettings.sSnmp.sysName); 803807e: 4c15 ldr r4, [pc, #84] ; (80380d4 ) strcat(sSettings.sSnmp.sysDescr, " "); 8038080: 4d15 ldr r5, [pc, #84] ; (80380d8 ) // TODO void SNMP_SetObjDescr(void) { static uint8_t len; strcpy(sSettings.sSnmp.sysDescr, sSettings.sSnmp.sysName); 8038082: f104 01fa add.w r1, r4, #250 ; 0xfa 8038086: 4620 mov r0, r4 8038088: f7e9 feb4 bl 8021df4 strcat(sSettings.sSnmp.sysDescr, " "); 803808c: 4629 mov r1, r5 803808e: 4620 mov r0, r4 8038090: f7e9 fd9c bl 8021bcc strcat(sSettings.sSnmp.sysDescr, VERSION); 8038094: 4620 mov r0, r4 8038096: 4911 ldr r1, [pc, #68] ; (80380dc ) 8038098: f7e9 fd98 bl 8021bcc strcat(sSettings.sSnmp.sysDescr, " "); 803809c: 4629 mov r1, r5 803809e: 4620 mov r0, r4 80380a0: f7e9 fd94 bl 8021bcc strcat(sSettings.sSnmp.sysDescr, sSettings.sSnmp.sysContact); 80380a4: f104 01c8 add.w r1, r4, #200 ; 0xc8 80380a8: 4620 mov r0, r4 80380aa: f7e9 fd8f bl 8021bcc strcat(sSettings.sSnmp.sysDescr, " "); 80380ae: 4629 mov r1, r5 80380b0: 4620 mov r0, r4 80380b2: f7e9 fd8b bl 8021bcc strcat(sSettings.sSnmp.sysDescr, sSettings.sInfo.serialNumber); 80380b6: f1a4 0193 sub.w r1, r4, #147 ; 0x93 80380ba: 4620 mov r0, r4 80380bc: f7e9 fd86 bl 8021bcc len = strlen(sSettings.sSnmp.sysDescr); 80380c0: 4620 mov r0, r4 80380c2: f7e9 fef5 bl 8021eb0 80380c6: 4906 ldr r1, [pc, #24] ; (80380e0 ) 80380c8: 7008 strb r0, [r1, #0] snmp_set_sysdesr((u8_t*)sSettings.sSnmp.sysDescr, &len); 80380ca: 4620 mov r0, r4 } 80380cc: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} strcat(sSettings.sSnmp.sysDescr, sSettings.sSnmp.sysContact); strcat(sSettings.sSnmp.sysDescr, " "); strcat(sSettings.sSnmp.sysDescr, sSettings.sInfo.serialNumber); len = strlen(sSettings.sSnmp.sysDescr); snmp_set_sysdesr((u8_t*)sSettings.sSnmp.sysDescr, &len); 80380d0: f7fc ba26 b.w 8034520 80380d4: 2000d0f1 .word 0x2000d0f1 80380d8: 080399a6 .word 0x080399a6 80380dc: 08039899 .word 0x08039899 80380e0: 2000c7e9 .word 0x2000c7e9 080380e4 : /** * @brief Установить SNMP Community для чтения */ void SNMP_SetReadCommunity(char *comm) { 80380e4: 4601 mov r1, r0 strcpy(sSettings.sSnmp.readCommunity, comm); 80380e6: 4801 ldr r0, [pc, #4] ; (80380ec ) 80380e8: f7e9 be84 b.w 8021df4 80380ec: 2000d191 .word 0x2000d191 080380f0 : /** * @brief Установить SNMP Community для записи */ void SNMP_SetWriteCommunity(char *comm) { 80380f0: 4601 mov r1, r0 strcpy(sSettings.sSnmp.writeCommunity, comm); 80380f2: 4801 ldr r0, [pc, #4] ; (80380f8 ) 80380f4: f7e9 be7e b.w 8021df4 80380f8: 2000d1a5 .word 0x2000d1a5 080380fc : /** * @brief Установить SNMP SysContact * @retval */ void SNMP_SetSysContact(char *con) { 80380fc: b510 push {r4, lr} 80380fe: 4604 mov r4, r0 static uint8_t len; len = strlen(con); 8038100: f7e9 fed6 bl 8021eb0 8038104: 4903 ldr r1, [pc, #12] ; (8038114 ) 8038106: 7008 strb r0, [r1, #0] snmp_set_syscontact((u8_t*)con, &len); 8038108: 4620 mov r0, r4 } 803810a: 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); 803810e: f7fc ba6b b.w 80345e8 8038112: bf00 nop 8038114: 2000c7e8 .word 0x2000c7e8 08038118 : /** * @brief Установить SNMP SysName * @retval */ void SNMP_SetSysName(char *name) { 8038118: b510 push {r4, lr} 803811a: 4604 mov r4, r0 static uint8_t len; len = strlen(name); 803811c: f7e9 fec8 bl 8021eb0 8038120: 4903 ldr r1, [pc, #12] ; (8038130 ) 8038122: 7008 strb r0, [r1, #0] snmp_set_sysname((u8_t*)name, &len); 8038124: 4620 mov r0, r4 } 8038126: 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); 803812a: f7fc ba67 b.w 80345fc 803812e: bf00 nop 8038130: 2000c7eb .word 0x2000c7eb 08038134 : /** * @brief Установить SNMP SysLocation * @retval */ void SNMP_SetSysLocation(char *loc) { 8038134: b510 push {r4, lr} 8038136: 4604 mov r4, r0 static uint8_t len; len = strlen(loc); 8038138: f7e9 feba bl 8021eb0 803813c: 4903 ldr r1, [pc, #12] ; (803814c ) 803813e: 7008 strb r0, [r1, #0] snmp_set_syslocation((u8_t*)loc, &len); 8038140: 4620 mov r0, r4 } 8038142: 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); 8038146: f7fc ba63 b.w 8034610 803814a: bf00 nop 803814c: 2000c7ea .word 0x2000c7ea 08038150 : /** * @brief Установить SNMP SysManagerIP * @retval */ void SNMP_SetManagerIP(char *ip) { 8038150: b510 push {r4, lr} static ip_addr_t trap_addr; ipaddr_aton(ip, &trap_addr); 8038152: 4c05 ldr r4, [pc, #20] ; (8038168 ) 8038154: 4621 mov r1, r4 8038156: f7fa fdae bl 8032cb6 snmp_trap_dst_ip_set(0, &trap_addr); 803815a: 2000 movs r0, #0 803815c: 4621 mov r1, r4 } 803815e: 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); 8038162: f7fe bb6f b.w 8036844 8038166: bf00 nop 8038168: 2000c7e4 .word 0x2000c7e4 0803816c : /** * @brief Тестовый таск для проверки отправки трапов * @retval */ void snmp_trap_tread(void *arg) { 803816c: b537 push {r0, r1, r2, r4, r5, lr} uint8_t trapName; while(1) { if (xQueueReceive(SNMP_TrapQueue, &trapName, 0) == pdTRUE) 803816e: 4d13 ldr r5, [pc, #76] ; (80381bc ) { SNMP_SetManagerIP(sSettings.sSnmp.managerIP); SNMP_SendVarbindTrap(&traps[trapName]); 8038170: 4c13 ldr r4, [pc, #76] ; (80381c0 ) { uint8_t trapName; while(1) { if (xQueueReceive(SNMP_TrapQueue, &trapName, 0) == pdTRUE) 8038172: 2200 movs r2, #0 8038174: 6828 ldr r0, [r5, #0] 8038176: f10d 0107 add.w r1, sp, #7 803817a: 4613 mov r3, r2 803817c: f7f2 facd bl 802a71a 8038180: 2801 cmp r0, #1 8038182: d1f6 bne.n 8038172 { SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 8038184: 480f ldr r0, [pc, #60] ; (80381c4 ) 8038186: f7ff ffe3 bl 8038150 SNMP_SendVarbindTrap(&traps[trapName]); 803818a: f89d 0007 ldrb.w r0, [sp, #7] 803818e: eb04 00c0 add.w r0, r4, r0, lsl #3 8038192: f000 fa2d bl 80385f0 SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); 8038196: 480c ldr r0, [pc, #48] ; (80381c8 ) 8038198: f7ff ffda bl 8038150 SNMP_SendVarbindTrap(&traps[trapName]); 803819c: f89d 0007 ldrb.w r0, [sp, #7] 80381a0: eb04 00c0 add.w r0, r4, r0, lsl #3 80381a4: f000 fa24 bl 80385f0 SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); 80381a8: 4808 ldr r0, [pc, #32] ; (80381cc ) 80381aa: f7ff ffd1 bl 8038150 SNMP_SendVarbindTrap(&traps[trapName]); 80381ae: f89d 0007 ldrb.w r0, [sp, #7] 80381b2: eb04 00c0 add.w r0, r4, r0, lsl #3 80381b6: f000 fa1b bl 80385f0 80381ba: e7da b.n 8038172 80381bc: 2000fab4 .word 0x2000fab4 80381c0: 2000fab8 .word 0x2000fab8 80381c4: 2000d26d .word 0x2000d26d 80381c8: 2000d281 .word 0x2000d281 80381cc: 2000d295 .word 0x2000d295 080381d0 : */ 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); 80381d0: 4801 ldr r0, [pc, #4] ; (80381d8 ) 80381d2: f7fc b9af b.w 8034534 80381d6: bf00 nop 80381d8: 20000a28 .word 0x20000a28 080381dc : /** * @brief Вкл/выкл трапы * @retval */ void SNMP_SetTrapOnOff(uint8_t state) { 80381dc: 4601 mov r1, r0 snmp_trap_dst_enable(0, (u8_t)state); 80381de: 2000 movs r0, #0 80381e0: f7fe bb2a b.w 8036838 080381e4 : /** * @brief Инициализация SNMP агента * @retval */ void SNMP_AgentInit(void) { 80381e4: b510 push {r4, lr} SNMP_SetObjDescr(); SNMP_SetReadCommunity(sSettings.sSnmp.readCommunity); 80381e6: 4c16 ldr r4, [pc, #88] ; (8038240 ) * @brief Инициализация SNMP агента * @retval */ void SNMP_AgentInit(void) { SNMP_SetObjDescr(); 80381e8: f7ff ff48 bl 803807c SNMP_SetReadCommunity(sSettings.sSnmp.readCommunity); 80381ec: 4620 mov r0, r4 80381ee: f7ff ff79 bl 80380e4 SNMP_SetWriteCommunity(sSettings.sSnmp.writeCommunity); 80381f2: f104 0014 add.w r0, r4, #20 80381f6: f7ff ff7b bl 80380f0 SNMP_SetSysContact(sSettings.sSnmp.sysContact); 80381fa: f104 0028 add.w r0, r4, #40 ; 0x28 80381fe: f7ff ff7d bl 80380fc SNMP_SetSysName(sSettings.sSnmp.sysName); 8038202: f104 005a add.w r0, r4, #90 ; 0x5a 8038206: f7ff ff87 bl 8038118 SNMP_SetSysLocation(sSettings.sSnmp.sysLocation); 803820a: f104 006e add.w r0, r4, #110 ; 0x6e 803820e: f7ff ff91 bl 8038134 SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 8038212: f104 00dc add.w r0, r4, #220 ; 0xdc 8038216: f7ff ff9b bl 8038150 SNMP_SetObjID(); 803821a: f7ff ffd9 bl 80381d0 SNMP_SetTrapOnOff(1); 803821e: 2001 movs r0, #1 8038220: f7ff ffdc bl 80381dc SNMP_InitTrapsBase(); 8038224: f000 f928 bl 8038478 snmp_init(); 8038228: f7fd f9e2 bl 80355f0 udp_init(); 803822c: f7fa fa1a bl 8032664 SNMP_TrapQueue = xQueueCreate(SNMP_TRAP_QUEUE_SIZE, sizeof(uint8_t)); 8038230: 2064 movs r0, #100 ; 0x64 8038232: 2101 movs r1, #1 8038234: 2200 movs r2, #0 8038236: f7f2 f8f3 bl 802a420 803823a: 4b02 ldr r3, [pc, #8] ; (8038244 ) 803823c: 6018 str r0, [r3, #0] 803823e: bd10 pop {r4, pc} 8038240: 2000d191 .word 0x2000d191 8038244: 2000fab4 .word 0x2000fab4 08038248 : * @retval */ void SNMP_Init(void) { //SETTINGS_SetSnmpDef(); SNMP_AgentInit(); 8038248: f7ff bfcc b.w 80381e4 803824c: 0000 movs r0, r0 803824e: 0000 movs r0, r0 08038250 : SNTP_Enable(sSettings.sSNTP.sntpEnable); } static void recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, struct ip_addr *addr, u16_t port) { 8038250: b570 push {r4, r5, r6, lr} 8038252: 4616 mov r6, r2 time_t t; int utcSec = 0; TM_RTC_t data; if (p->len == sizeof(struct sntp_packet)) 8038254: 8952 ldrh r2, [r2, #10] 8038256: 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) { 8038258: b094 sub sp, #80 ; 0x50 time_t t; int utcSec = 0; TM_RTC_t data; if (p->len == sizeof(struct sntp_packet)) 803825a: d149 bne.n 80382f0 { int i; struct sntp_packet aligned; //myassert(p->len == p->tot_len); /* don't accept chained pbuf */ memcpy(&aligned, p->payload, sizeof(aligned)); 803825c: a808 add r0, sp, #32 803825e: 6871 ldr r1, [r6, #4] 8038260: f7e9 fb94 bl 802198c i = (aligned.status >> 3) & 7; 8038264: f89d 3020 ldrb.w r3, [sp, #32] if ((i < 1) || (i > 4)) /* SNTP version 1..4 */ 8038268: f3c3 02c2 ubfx r2, r3, #3, #3 803826c: 3a01 subs r2, #1 803826e: 2a03 cmp r2, #3 8038270: d83e bhi.n 80382f0 goto out; i = aligned.status & 7; if ((i != 4) && (i != 5)) /* mode 4 or 5: server or broadcast */ 8038272: f003 0307 and.w r3, r3, #7 8038276: 3b04 subs r3, #4 8038278: 2b01 cmp r3, #1 803827a: d839 bhi.n 80382f0 goto out; if (aligned.xmt == 0) 803827c: e9dd 4512 ldrd r4, r5, [sp, #72] ; 0x48 8038280: ea54 0305 orrs.w r3, r4, r5 8038284: d034 beq.n 80382f0 goto out; utcSec = (int)(3600.0*sSettings.sSNTP.timeZone); 8038286: 4b20 ldr r3, [pc, #128] ; (8038308 ) 8038288: f8d3 0370 ldr.w r0, [r3, #880] ; 0x370 803828c: f7e8 f944 bl 8020518 <__aeabi_f2d> 8038290: a31b add r3, pc, #108 ; (adr r3, 8038300 ) 8038292: e9d3 2300 ldrd r2, r3, [r3] 8038296: f7e8 f993 bl 80205c0 <__aeabi_dmul> 803829a: f7e8 fc2b bl 8020af4 <__aeabi_d2iz> 803829e: 4605 mov r5, r0 t = (ntohl(aligned.xmt) - 2208988800 + utcSec ); 80382a0: 4620 mov r0, r4 80382a2: f7f6 fc01 bl 802eaa8 80382a6: 4b19 ldr r3, [pc, #100] ; (803830c ) 80382a8: 18eb adds r3, r5, r3 TM_RTC_SetDataTimeUnix((uint32_t)t); 80382aa: 1818 adds r0, r3, r0 80382ac: f7ee fa08 bl 80266c0 /* Сохраним время последней синхронизации */ TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 80382b0: a804 add r0, sp, #16 80382b2: 2100 movs r1, #0 80382b4: f7ee f8e8 bl 8026488 memset(sSettings.sSNTP.data, 0, sizeof(sSettings.sSNTP.data)); 80382b8: 2100 movs r1, #0 80382ba: 221e movs r2, #30 80382bc: 4814 ldr r0, [pc, #80] ; (8038310 ) 80382be: f7e9 fc1f bl 8021b00 sprintf(sSettings.sSNTP.data, "%02d.%02d.%02d %02d:%02d:%02d", 80382c2: f89d 1019 ldrb.w r1, [sp, #25] 80382c6: f89d 2017 ldrb.w r2, [sp, #23] 80382ca: 9100 str r1, [sp, #0] 80382cc: f89d 1015 ldrb.w r1, [sp, #21] 80382d0: f89d 3018 ldrb.w r3, [sp, #24] 80382d4: 9101 str r1, [sp, #4] 80382d6: f89d 1014 ldrb.w r1, [sp, #20] 80382da: 480d ldr r0, [pc, #52] ; (8038310 ) 80382dc: 9102 str r1, [sp, #8] 80382de: f89d 1010 ldrb.w r1, [sp, #16] 80382e2: 9103 str r1, [sp, #12] 80382e4: 490b ldr r1, [pc, #44] ; (8038314 ) 80382e6: f7ef fa95 bl 8027814 data.date, data.month, data.year, data.hours, data.minutes, data.seconds); timeout = VALID_TIMEOUT; 80382ea: 4a0b ldr r2, [pc, #44] ; (8038318 ) 80382ec: 4b0b ldr r3, [pc, #44] ; (803831c ) 80382ee: 601a str r2, [r3, #0] } out: pbuf_free(p); 80382f0: 4630 mov r0, r6 80382f2: f7f7 fd0b bl 802fd0c } 80382f6: b014 add sp, #80 ; 0x50 80382f8: bd70 pop {r4, r5, r6, pc} 80382fa: bf00 nop 80382fc: f3af 8000 nop.w 8038300: 00000000 .word 0x00000000 8038304: 40ac2000 .word 0x40ac2000 8038308: 2000cfc0 .word 0x2000cfc0 803830c: 7c558180 .word 0x7c558180 8038310: 2000d311 .word 0x2000d311 8038314: 08045920 .word 0x08045920 8038318: 01b77400 .word 0x01b77400 803831c: 2000c7f8 .word 0x2000c7f8 08038320 : void SNTP_Enable(bool enable) { 8038320: b538 push {r3, r4, r5, lr} if (enable) 8038322: 4605 mov r5, r0 8038324: 4c0f ldr r4, [pc, #60] ; (8038364 ) 8038326: b1b8 cbz r0, 8038358 { if (upcb == 0) 8038328: 6825 ldr r5, [r4, #0] 803832a: b9d5 cbnz r5, 8038362 { err_t ret; upcb = udp_new(); 803832c: f7fa fb78 bl 8032a20 8038330: 6020 str r0, [r4, #0] if (upcb != 0) 8038332: b1b0 cbz r0, 8038362 { ret = udp_bind(upcb, IP_ADDR_ANY, port); 8038334: 227b movs r2, #123 ; 0x7b 8038336: 490c ldr r1, [pc, #48] ; (8038368 ) 8038338: f7fa fa5a bl 80327f0 if (ret != ERR_OK) 803833c: 4602 mov r2, r0 { udp_remove(upcb); 803833e: 6820 ldr r0, [r4, #0] upcb = udp_new(); if (upcb != 0) { ret = udp_bind(upcb, IP_ADDR_ANY, port); if (ret != ERR_OK) 8038340: b11a cbz r2, 803834a { udp_remove(upcb); 8038342: f7fa fb51 bl 80329e8 upcb = 0; 8038346: 6025 str r5, [r4, #0] 8038348: e002 b.n 8038350 } else { udp_recv(upcb, recv, 0); 803834a: 4908 ldr r1, [pc, #32] ; (803836c ) 803834c: f7fa fb48 bl 80329e0 } timeout = 0; 8038350: 4b07 ldr r3, [pc, #28] ; (8038370 ) 8038352: 2200 movs r2, #0 8038354: 601a str r2, [r3, #0] 8038356: bd38 pop {r3, r4, r5, pc} } } } else if (upcb != 0) 8038358: 6820 ldr r0, [r4, #0] 803835a: b110 cbz r0, 8038362 { udp_remove(upcb); 803835c: f7fa fb44 bl 80329e8 upcb = 0; 8038360: 6025 str r5, [r4, #0] 8038362: bd38 pop {r3, r4, r5, pc} 8038364: 2000c7f4 .word 0x2000c7f4 8038368: 08044e44 .word 0x08044e44 803836c: 08038251 .word 0x08038251 8038370: 2000c7f8 .word 0x2000c7f8 08038374 : { return upcb != 0; } void SNTP_SetServerAddr(char *addr) { 8038374: b508 push {r3, lr} server.addr = ipaddr_addr(addr); 8038376: f7fa fd1c bl 8032db2 803837a: 4b01 ldr r3, [pc, #4] ; (8038380 ) 803837c: 6018 str r0, [r3, #0] 803837e: bd08 pop {r3, pc} 8038380: 2000c7f0 .word 0x2000c7f0 08038384 : /** * @brief Инициализация SNTP. * @retval */ void SNTP_Init(void) { 8038384: b508 push {r3, lr} SNTP_SetServerAddr(sSettings.sSNTP.ip); 8038386: 4805 ldr r0, [pc, #20] ; (803839c ) 8038388: f7ff fff4 bl 8038374 SNTP_Enable(sSettings.sSNTP.sntpEnable); 803838c: 4b04 ldr r3, [pc, #16] ; (80383a0 ) 803838e: f893 0340 ldrb.w r0, [r3, #832] ; 0x340 } 8038392: e8bd 4008 ldmia.w sp!, {r3, lr} void SNTP_Init(void) { SNTP_SetServerAddr(sSettings.sSNTP.ip); SNTP_Enable(sSettings.sSNTP.sntpEnable); 8038396: f7ff bfc3 b.w 8038320 803839a: bf00 nop 803839c: 2000d301 .word 0x2000d301 80383a0: 2000cfc0 .word 0x2000cfc0 080383a4 : pbuf_free(psend); } } void SNTP_Poll(void) { 80383a4: b530 push {r4, r5, lr} if (upcb) 80383a6: 4d15 ldr r5, [pc, #84] ; (80383fc ) 80383a8: 682b ldr r3, [r5, #0] pbuf_free(psend); } } void SNTP_Poll(void) { 80383aa: b08d sub sp, #52 ; 0x34 if (upcb) 80383ac: b31b cbz r3, 80383f6 static void send_request(void) { struct sntp_packet packet; struct pbuf* psend; memset(&packet, 0, sizeof(packet)); 80383ae: 2100 movs r1, #0 80383b0: 2230 movs r2, #48 ; 0x30 80383b2: 4668 mov r0, sp 80383b4: f7e9 fba4 bl 8021b00 packet.status = (3 << 3) /* SNTP vesion 3 */ | (3 << 0); /* Mode: client */ 80383b8: 231b movs r3, #27 psend = pbuf_alloc(PBUF_RAW, sizeof(packet), PBUF_REF); 80383ba: 2003 movs r0, #3 80383bc: 2130 movs r1, #48 ; 0x30 80383be: 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 */ 80383c0: f88d 3000 strb.w r3, [sp] psend = pbuf_alloc(PBUF_RAW, sizeof(packet), PBUF_REF); 80383c4: f7f7 fcef bl 802fda6 if (psend != 0) 80383c8: 4604 mov r4, r0 80383ca: b1a0 cbz r0, 80383f6 { psend->payload = &packet; 80383cc: ab00 add r3, sp, #0 80383ce: 6043 str r3, [r0, #4] timeout = (udp_sendto(upcb, psend, &server, port) == ERR_OK) ? SENT_TIMEOUT : SENDFAIL_TIMEOUT; 80383d0: 4621 mov r1, r4 80383d2: 4a0b ldr r2, [pc, #44] ; (8038400 ) 80383d4: 6828 ldr r0, [r5, #0] 80383d6: 237b movs r3, #123 ; 0x7b 80383d8: f7fa fabb bl 8032952 80383dc: f64e 2360 movw r3, #60000 ; 0xea60 80383e0: f241 3288 movw r2, #5000 ; 0x1388 80383e4: 4907 ldr r1, [pc, #28] ; (8038404 ) 80383e6: 2800 cmp r0, #0 80383e8: bf14 ite ne 80383ea: 4610 movne r0, r2 80383ec: 4618 moveq r0, r3 80383ee: 6008 str r0, [r1, #0] pbuf_free(psend); 80383f0: 4620 mov r0, r4 80383f2: f7f7 fc8b bl 802fd0c void SNTP_Poll(void) { if (upcb) send_request(); } 80383f6: b00d add sp, #52 ; 0x34 80383f8: bd30 pop {r4, r5, pc} 80383fa: bf00 nop 80383fc: 2000c7f4 .word 0x2000c7f4 8038400: 2000c7f0 .word 0x2000c7f0 8038404: 2000c7f8 .word 0x2000c7f8 08038408 : * @brief Периодическая синхронизация времени. * Выполняется раз в сутки с 0 часов. * @retval */ void vTaskPeriodicSynchro(void *arg) { 8038408: b530 push {r4, r5, lr} static uint8_t fSinhro = 0; for (;;) { vTaskDelay(10000); if (sSettings.sSNTP.sntpEnable) 803840a: 4d0f ldr r5, [pc, #60] ; (8038448 ) fSinhro = 1; //printf("Periodic time sinhro\n\r"); } if (data.hours > 1) fSinhro = 0; 803840c: 4c0f ldr r4, [pc, #60] ; (803844c ) * @brief Периодическая синхронизация времени. * Выполняется раз в сутки с 0 часов. * @retval */ void vTaskPeriodicSynchro(void *arg) { 803840e: b085 sub sp, #20 static uint8_t fSinhro = 0; for (;;) { vTaskDelay(10000); 8038410: f242 7010 movw r0, #10000 ; 0x2710 8038414: f7f2 fd74 bl 802af00 if (sSettings.sSNTP.sntpEnable) 8038418: f895 3340 ldrb.w r3, [r5, #832] ; 0x340 803841c: 2b00 cmp r3, #0 803841e: d0f7 beq.n 8038410 { TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8038420: 4668 mov r0, sp 8038422: 2100 movs r1, #0 8038424: f7ee f830 bl 8026488 /* Если пришло время синхронизации */ if ((data.hours == 0) && (fSinhro == 0)) 8038428: f89d 3005 ldrb.w r3, [sp, #5] 803842c: b92b cbnz r3, 803843a 803842e: 7823 ldrb r3, [r4, #0] 8038430: b91b cbnz r3, 803843a { SNTP_Poll(); 8038432: f7ff ffb7 bl 80383a4 fSinhro = 1; 8038436: 2301 movs r3, #1 8038438: 7023 strb r3, [r4, #0] //printf("Periodic time sinhro\n\r"); } if (data.hours > 1) 803843a: f89d 3005 ldrb.w r3, [sp, #5] 803843e: 2b01 cmp r3, #1 8038440: d9e6 bls.n 8038410 fSinhro = 0; 8038442: 2300 movs r3, #0 8038444: 7023 strb r3, [r4, #0] 8038446: e7e3 b.n 8038410 8038448: 2000cfc0 .word 0x2000cfc0 803844c: 2000c7ec .word 0x2000c7ec 08038450 : /** * @brief Синхронизация времени единоразово при включении контроллера * @retval */ void vTaskOnceSynchro(void *arg) { 8038450: b538 push {r3, r4, r5, lr} for (;;) { if (sSettings.sSNTP.sntpEnable) 8038452: 4d07 ldr r5, [pc, #28] ; (8038470 ) 8038454: 4c07 ldr r4, [pc, #28] ; (8038474 ) 8038456: f895 3340 ldrb.w r3, [r5, #832] ; 0x340 803845a: b12b cbz r3, 8038468 { vTaskDelay(7000); 803845c: f641 3058 movw r0, #7000 ; 0x1b58 8038460: f7f2 fd4e bl 802af00 SNTP_Poll(); 8038464: f7ff ff9e bl 80383a4 //printf("Once time sinhro\n\r"); vTaskDelete(xHandleSntpOnceSinhro); } else vTaskDelete(xHandleSntpOnceSinhro); 8038468: 6820 ldr r0, [r4, #0] 803846a: f7f2 fb87 bl 802ab7c 803846e: e7f2 b.n 8038456 8038470: 2000cfc0 .word 0x2000cfc0 8038474: 20000b04 .word 0x20000b04 08038478 : * @retval */ void SNMP_InitTrapsBase(void) { /* 1. FWVersionUpdate */ // + traps[FW_VERSION_UPDATE].trapId = FW_VERSION_UPDATE; 8038478: 4b53 ldr r3, [pc, #332] ; (80385c8 ) traps[FW_VERSION_UPDATE].varbindId = 1; traps[FW_VERSION_UPDATE].trapEnable = true; traps[FW_VERSION_UPDATE].handle = GetVersionStr; /* FWVersion */ 803847a: 4954 ldr r1, [pc, #336] ; (80385cc ) /* 2. FWVersionUpdated */ // + traps[FW_VERSION_UPDATED].trapId = FW_VERSION_UPDATED; 803847c: 2002 movs r0, #2 /** * @brief Инициализация базы трапов * @retval */ void SNMP_InitTrapsBase(void) { 803847e: 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; 8038480: 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; 8038482: 2003 movs r0, #3 8038484: 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; 8038486: 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; 8038488: 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; 803848a: 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; 803848e: 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 */ 8038490: 4d4f ldr r5, [pc, #316] ; (80385d0 ) 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; 8038492: 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; 8038496: 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; 803849a: 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; 803849e: 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 */ 80384a2: 4c4c ldr r4, [pc, #304] ; (80385d4 ) /* 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 */ 80384a4: 484c ldr r0, [pc, #304] ; (80385d8 ) { /* 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 */ 80384a6: 60d9 str r1, [r3, #12] * @retval */ void SNMP_InitTrapsBase(void) { /* 1. FWVersionUpdate */ // + traps[FW_VERSION_UPDATE].trapId = FW_VERSION_UPDATE; 80384a8: 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 */ 80384aa: 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 */ 80384ac: 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 */ 80384ae: 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 */ 80384b0: 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; 80384b2: 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 */ 80384b4: 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 */ 80384b6: 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; 80384b8: 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; 80384ba: 2408 movs r4, #8 traps[DO1_TOGGLED].varbindId = 6; traps[DO1_TOGGLED].trapEnable = true; traps[DO1_TOGGLED].handle = GetDOUT1StatusStr; /* State DO1 */ 80384bc: 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 */ 80384be: 4847 ldr r0, [pc, #284] ; (80385dc ) 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; 80384c0: 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; 80384c4: 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; 80384c8: 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; 80384cc: f883 4041 strb.w r4, [r3, #65] ; 0x41 * @retval */ void SNMP_InitTrapsBase(void) { /* 1. FWVersionUpdate */ // + traps[FW_VERSION_UPDATE].trapId = FW_VERSION_UPDATE; 80384d0: 725a strb r2, [r3, #9] traps[FW_VERSION_UPDATE].varbindId = 1; 80384d2: 729a strb r2, [r3, #10] traps[FW_VERSION_UPDATE].trapEnable = true; 80384d4: 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; 80384d6: 749a strb r2, [r3, #18] traps[FW_VERSION_UPDATED].trapEnable = true; 80384d8: 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; 80384da: 769a strb r2, [r3, #26] traps[DEVICE_RESTORED].trapEnable = true; 80384dc: 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; 80384de: f883 2022 strb.w r2, [r3, #34] ; 0x22 traps[DEVICE_REBOOTED].trapEnable = true; 80384e2: 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; 80384e6: 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; 80384ea: 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; 80384ee: 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; 80384f2: 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; 80384f6: f883 1049 strb.w r1, [r3, #73] ; 0x49 traps[BATTERY_TEMPERATURE_NORM].varbindId = 10; 80384fa: 210a movs r1, #10 80384fc: f883 104a strb.w r1, [r3, #74] ; 0x4a traps[BATTERY_TEMPERATURE_NORM].trapEnable = true; traps[BATTERY_TEMPERATURE_NORM].handle = GetInternalTempStr; /* BatteryTemperature */ 8038500: 64d8 str r0, [r3, #76] ; 0x4c /* 10. BatteryTemperatureAlarm */ // + traps[BATTERY_TEMPERATURE_ALARM].trapId = BATTERY_TEMPERATURE_ALARM; 8038502: f883 1051 strb.w r1, [r3, #81] ; 0x51 traps[BATTERY_TEMPERATURE_ALARM].varbindId = 10; 8038506: f883 1052 strb.w r1, [r3, #82] ; 0x52 traps[BATTERY_TEMPERATURE_ALARM].trapEnable = true; traps[BATTERY_TEMPERATURE_ALARM].handle = GetInternalTempStr; /* BatteryTemperature */ 803850a: 6558 str r0, [r3, #84] ; 0x54 /* 11. LineAlarm */ // + traps[LINE_ALARM].trapId = LINE_ALARM; 803850c: 210b movs r1, #11 traps[LINE_ALARM].varbindId = 12; traps[LINE_ALARM].trapEnable = true; traps[LINE_ALARM].handle = GetInputVoltageStr; /* LineAlarm */ 803850e: 4834 ldr r0, [pc, #208] ; (80385e0 ) 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; 8038510: f883 1059 strb.w r1, [r3, #89] ; 0x59 traps[LINE_ALARM].varbindId = 12; 8038514: 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; 8038516: 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 */ 8038518: 4d32 ldr r5, [pc, #200] ; (80385e4 ) 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; 803851a: f883 105a strb.w r1, [r3, #90] ; 0x5a traps[LINE_ALARM].trapEnable = true; traps[LINE_ALARM].handle = GetInputVoltageStr; /* LineAlarm */ 803851e: 65d8 str r0, [r3, #92] ; 0x5c /* 12. LineNorm */ // + traps[LINE_NORM].trapId = LINE_NORM; 8038520: f883 1061 strb.w r1, [r3, #97] ; 0x61 traps[LINE_NORM].varbindId = 12; 8038524: f883 1062 strb.w r1, [r3, #98] ; 0x62 traps[LINE_NORM].trapEnable = true; traps[LINE_NORM].handle = GetInputVoltageStr; /* LineNorm */ 8038528: 6658 str r0, [r3, #100] ; 0x64 /* 13. LowBatAlarm */ // + traps[LOW_BAT_ALARM].trapId = LOW_BAT_ALARM; 803852a: 210d movs r1, #13 traps[LOW_BAT_ALARM].varbindId = 15; traps[LOW_BAT_ALARM].trapEnable = true; traps[LOW_BAT_ALARM].handle = GetBatCapacityStr; /* LowBatAlarm */ 803852c: 482e ldr r0, [pc, #184] ; (80385e8 ) 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; 803852e: 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; 8038532: 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; 8038536: 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; 8038538: 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; 803853c: 2610 movs r6, #16 traps[POWER_NORM].varbindId = 14; 803853e: 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; 8038542: 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 */ 8038544: 67dd str r5, [r3, #124] ; 0x7c /* 16. PowerNorm */ // + traps[POWER_NORM].trapId = POWER_NORM; 8038546: f883 6081 strb.w r6, [r3, #129] ; 0x81 traps[POWER_NORM].varbindId = 14; traps[POWER_NORM].trapEnable = true; traps[POWER_NORM].handle = GetPowerStr; /* PowerNorm */ 803854a: f8c3 5084 str.w r5, [r3, #132] ; 0x84 /* 17. ConnectMonitorAlarm */ // traps[CONNECT_MONITOR_ALARM].trapId = CONNECT_MONITOR_ALARM; 803854e: f883 4089 strb.w r4, [r3, #137] ; 0x89 traps[CONNECT_MONITOR_ALARM].varbindId = 17; 8038552: f883 408a strb.w r4, [r3, #138] ; 0x8a traps[CONNECT_MONITOR_ALARM].trapEnable = true; traps[CONNECT_MONITOR_ALARM].handle = GetConnectMonitorStr;//GetConnectMonitorStr; /* ConnectMonitor */ 8038556: 4d25 ldr r5, [pc, #148] ; (80385ec ) 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; 8038558: 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; 803855c: 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; 8038560: 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; 8038564: 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; 8038568: f883 106a strb.w r1, [r3, #106] ; 0x6a traps[LOW_BAT_ALARM].trapEnable = true; 803856c: f883 206b strb.w r2, [r3, #107] ; 0x6b traps[LOW_BAT_ALARM].handle = GetBatCapacityStr; /* LowBatAlarm */ 8038570: 66d8 str r0, [r3, #108] ; 0x6c /* 14. LowBatNorm */ // + traps[LOW_BAT_NORM].trapId = LOW_BAT_NORM; traps[LOW_BAT_NORM].varbindId = 15; 8038572: f883 1072 strb.w r1, [r3, #114] ; 0x72 traps[LOW_BAT_NORM].trapEnable = true; 8038576: f883 2073 strb.w r2, [r3, #115] ; 0x73 traps[LOW_BAT_NORM].handle = GetBatCapacityStr; /* LowBatNorm */ 803857a: 6758 str r0, [r3, #116] ; 0x74 /* 15. PowerAlarm */ // + traps[POWER_ALARM].trapId = POWER_ALARM; 803857c: f883 1079 strb.w r1, [r3, #121] ; 0x79 traps[POWER_ALARM].varbindId = 14; traps[POWER_ALARM].trapEnable = true; 8038580: 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; 8038584: 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; 8038588: 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; 803858c: 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; 8038590: 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; 8038592: 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; 8038594: 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; 8038598: 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 */ 803859a: f8c3 508c str.w r5, [r3, #140] ; 0x8c /* 18. ConnectMonitorNorm */ // traps[CONNECT_MONITOR_NORM].trapId = CONNECT_MONITOR_NORM; 803859e: f883 6091 strb.w r6, [r3, #145] ; 0x91 traps[CONNECT_MONITOR_NORM].varbindId = 17; traps[CONNECT_MONITOR_NORM].trapEnable = true; 80385a2: f883 2093 strb.w r2, [r3, #147] ; 0x93 traps[CONNECT_MONITOR_NORM].handle = GetConnectMonitorStr;//GetConnectMonitorStr; /* ConnectMonitor */ 80385a6: f8c3 5094 str.w r5, [r3, #148] ; 0x94 /* 19. BatteryConnectAlarm */ // + traps[BATTERY_CONNECT_ALARM].trapId = BATTERY_CONNECT_ALARM; traps[BATTERY_CONNECT_ALARM].varbindId = 15; 80385aa: f883 109a strb.w r1, [r3, #154] ; 0x9a traps[BATTERY_CONNECT_ALARM].trapEnable = true; 80385ae: f883 209b strb.w r2, [r3, #155] ; 0x9b traps[BATTERY_CONNECT_ALARM].handle = GetBatCapacityStr; /* LowBatAlarm */ 80385b2: f8c3 009c str.w r0, [r3, #156] ; 0x9c /* 20. BatteryConnectNorm */ // + traps[BATTERY_CONNECT_NORM].trapId = BATTERY_CONNECT_NORM; 80385b6: f883 40a1 strb.w r4, [r3, #161] ; 0xa1 traps[BATTERY_CONNECT_NORM].varbindId = 15; 80385ba: f883 10a2 strb.w r1, [r3, #162] ; 0xa2 traps[BATTERY_CONNECT_NORM].trapEnable = true; 80385be: f883 20a3 strb.w r2, [r3, #163] ; 0xa3 traps[BATTERY_CONNECT_NORM].handle = GetBatCapacityStr; /* LowBatNorm */ 80385c2: f8c3 00a4 str.w r0, [r3, #164] ; 0xa4 80385c6: bd70 pop {r4, r5, r6, pc} 80385c8: 2000fab8 .word 0x2000fab8 80385cc: 08027cbd .word 0x08027cbd 80385d0: 08027b6d .word 0x08027b6d 80385d4: 08027be1 .word 0x08027be1 80385d8: 08027c05 .word 0x08027c05 80385dc: 08027949 .word 0x08027949 80385e0: 08027885 .word 0x08027885 80385e4: 080278dd .word 0x080278dd 80385e8: 08027901 .word 0x08027901 80385ec: 08027999 .word 0x08027999 080385f0 : /** * @brief Отправка трапа с переменной, зарегистрированного в базе. * @retval */ bool SNMP_SendVarbindTrap(TRAP_t *trap) { 80385f0: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} char msg[255]; uint8_t len = 0; 80385f4: 2500 movs r5, #0 /** * @brief Отправка трапа с переменной, зарегистрированного в базе. * @retval */ bool SNMP_SendVarbindTrap(TRAP_t *trap) { 80385f6: f5ad 7d07 sub.w sp, sp, #540 ; 0x21c 80385fa: 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}}; 80385fc: 4629 mov r1, r5 80385fe: 2284 movs r2, #132 ; 0x84 8038600: a804 add r0, sp, #16 * @retval */ bool SNMP_SendVarbindTrap(TRAP_t *trap) { char msg[255]; uint8_t len = 0; 8038602: 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}}; 8038606: f7e9 fa7b bl 8021b00 803860a: 2202 movs r2, #2 803860c: 2401 movs r4, #1 803860e: 2603 movs r6, #3 8038610: 230b movs r3, #11 8038612: f04f 0804 mov.w r8, #4 8038616: 2706 movs r7, #6 8038618: f24a 3b18 movw fp, #41752 ; 0xa318 803861c: f240 3a8f movw sl, #911 ; 0x38f 8038620: 920e str r2, [sp, #56] ; 0x38 struct snmp_obj_id varObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 1, 1}}; 8038622: 4629 mov r1, r5 8038624: 2284 movs r2, #132 ; 0x84 8038626: 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}}; 8038628: f88d 3010 strb.w r3, [sp, #16] 803862c: 9606 str r6, [sp, #24] 803862e: 960d str r6, [sp, #52] ; 0x34 struct snmp_obj_id varObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 1, 1}}; 8038630: 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}}; 8038632: 9405 str r4, [sp, #20] 8038634: 9707 str r7, [sp, #28] 8038636: 9408 str r4, [sp, #32] 8038638: f8cd 8024 str.w r8, [sp, #36] ; 0x24 803863c: 940a str r4, [sp, #40] ; 0x28 803863e: f8cd b02c str.w fp, [sp, #44] ; 0x2c 8038642: 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}}; 8038646: f7e9 fa5b bl 8021b00 803864a: 9b01 ldr r3, [sp, #4] 803864c: 9627 str r6, [sp, #156] ; 0x9c 803864e: f88d 3094 strb.w r3, [sp, #148] ; 0x94 trapObjId.id[trapObjId.len - 1] = trap->trapId; 8038652: 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}}; 8038656: 962e str r6, [sp, #184] ; 0xb8 trapObjId.id[trapObjId.len - 1] = trap->trapId; 8038658: 930f str r3, [sp, #60] ; 0x3c varObjId.id[varObjId.len - 1] = trap->varbindId; 803865a: 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}}; 803865e: 9426 str r4, [sp, #152] ; 0x98 trapObjId.id[trapObjId.len - 1] = trap->trapId; varObjId.id[varObjId.len - 1] = trap->varbindId; 8038660: 9330 str r3, [sp, #192] ; 0xc0 trap->handle(msg, &len); 8038662: a846 add r0, sp, #280 ; 0x118 8038664: 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}}; 8038668: 9728 str r7, [sp, #160] ; 0xa0 trapObjId.id[trapObjId.len - 1] = trap->trapId; varObjId.id[varObjId.len - 1] = trap->varbindId; trap->handle(msg, &len); 803866a: 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}}; 803866e: 9429 str r4, [sp, #164] ; 0xa4 8038670: f8cd 80a8 str.w r8, [sp, #168] ; 0xa8 8038674: 942b str r4, [sp, #172] ; 0xac 8038676: f8cd b0b0 str.w fp, [sp, #176] ; 0xb0 803867a: f8cd a0b4 str.w sl, [sp, #180] ; 0xb4 803867e: 942f str r4, [sp, #188] ; 0xbc trapObjId.id[trapObjId.len - 1] = trap->trapId; varObjId.id[varObjId.len - 1] = trap->varbindId; trap->handle(msg, &len); 8038680: 4798 blx r3 vb = snmp_varbind_alloc(&varObjId, SNMP_ASN1_OC_STR, len); 8038682: a825 add r0, sp, #148 ; 0x94 8038684: 4641 mov r1, r8 8038686: f89d 200f ldrb.w r2, [sp, #15] 803868a: f7fc ffd5 bl 8035638 if(vb != NULL ) { 803868e: 4606 mov r6, r0 8038690: b198 cbz r0, 80386ba memcpy(vb->value, msg, len); 8038692: f89d 200f ldrb.w r2, [sp, #15] 8038696: 6940 ldr r0, [r0, #20] 8038698: a946 add r1, sp, #280 ; 0x118 803869a: f7e9 f977 bl 802198c snmp_varbind_tail_add(&trap_msg.outvb, vb); 803869e: 4809 ldr r0, [pc, #36] ; (80386c4 ) 80386a0: 4631 mov r1, r6 80386a2: f7fd f875 bl 8035790 snmp_send_trap(SNMP_GENTRAP_ENTERPRISESPC, &trapObjId, 0); 80386a6: a904 add r1, sp, #16 80386a8: 462a mov r2, r5 80386aa: 4638 mov r0, r7 80386ac: f7fe f9e0 bl 8036a70 snmp_varbind_list_free(&trap_msg.outvb); 80386b0: 4804 ldr r0, [pc, #16] ; (80386c4 ) 80386b2: f7fd f814 bl 80356de return true; 80386b6: 4620 mov r0, r4 80386b8: e7ff b.n 80386ba } else { return false; } } 80386ba: f50d 7d07 add.w sp, sp, #540 ; 0x21c 80386be: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80386c2: bf00 nop 80386c4: 2000f840 .word 0x2000f840 080386c8 : char dataBuf1[DATA_BUF_LEN1]; static uint8_t udp_type_message = 0; //0 - идентификационное сообщение; 1 - сообщение с настройками сети void udp_message(char *buf) { 80386c8: b570 push {r4, r5, r6, lr} uint8_t len2 = 0; 80386ca: 2600 movs r6, #0 char dataBuf1[DATA_BUF_LEN1]; static uint8_t udp_type_message = 0; //0 - идентификационное сообщение; 1 - сообщение с настройками сети void udp_message(char *buf) { 80386cc: b09a sub sp, #104 ; 0x68 80386ce: 4604 mov r4, r0 uint8_t len2 = 0; char str[97]; memset(str, 0, 97); 80386d0: 2261 movs r2, #97 ; 0x61 80386d2: 4631 mov r1, r6 80386d4: a801 add r0, sp, #4 GetModelStr(str, &len2); strncat(buf, str, len2); strcat(buf, ";"); 80386d6: 4d2b ldr r5, [pc, #172] ; (8038784 ) static uint8_t udp_type_message = 0; //0 - идентификационное сообщение; 1 - сообщение с настройками сети void udp_message(char *buf) { uint8_t len2 = 0; 80386d8: f88d 6003 strb.w r6, [sp, #3] char str[97]; memset(str, 0, 97); 80386dc: f7e9 fa10 bl 8021b00 GetModelStr(str, &len2); 80386e0: a801 add r0, sp, #4 80386e2: f10d 0103 add.w r1, sp, #3 80386e6: f7ef fac5 bl 8027c74 strncat(buf, str, len2); 80386ea: f89d 2003 ldrb.w r2, [sp, #3] 80386ee: a901 add r1, sp, #4 80386f0: 4620 mov r0, r4 80386f2: f7e9 fc0d bl 8021f10 strcat(buf, ";"); 80386f6: 4629 mov r1, r5 80386f8: 4620 mov r0, r4 80386fa: f7e9 fa67 bl 8021bcc GetSerialNumberStr(str, &len2); 80386fe: a801 add r0, sp, #4 8038700: f10d 0103 add.w r1, sp, #3 8038704: f7ef fafe bl 8027d04 strncat(buf, str, len2); 8038708: f89d 2003 ldrb.w r2, [sp, #3] 803870c: a901 add r1, sp, #4 803870e: 4620 mov r0, r4 8038710: f7e9 fbfe bl 8021f10 strcat(buf, ";"); 8038714: 4629 mov r1, r5 8038716: 4620 mov r0, r4 8038718: f7e9 fa58 bl 8021bcc GetMacStr(str, &len2); 803871c: a801 add r0, sp, #4 803871e: f10d 0103 add.w r1, sp, #3 8038722: f7ef fadd bl 8027ce0 strncat(buf, str, len2); 8038726: f89d 2003 ldrb.w r2, [sp, #3] 803872a: a901 add r1, sp, #4 803872c: 4620 mov r0, r4 803872e: f7e9 fbef bl 8021f10 strcat(buf, ";"); 8038732: 4629 mov r1, r5 8038734: 4620 mov r0, r4 8038736: f7e9 fa49 bl 8021bcc GetVersionStr(str, &len2); 803873a: a801 add r0, sp, #4 803873c: f10d 0103 add.w r1, sp, #3 8038740: f7ef fabc bl 8027cbc strncat(buf, str, len2); 8038744: f89d 2003 ldrb.w r2, [sp, #3] 8038748: a901 add r1, sp, #4 803874a: 4620 mov r0, r4 803874c: f7e9 fbe0 bl 8021f10 strcat(buf, ";;;"); 8038750: 4620 mov r0, r4 8038752: 490d ldr r1, [pc, #52] ; (8038788 ) 8038754: f7e9 fa3a bl 8021bcc memset(str, 0, 97); 8038758: 2261 movs r2, #97 ; 0x61 803875a: 4631 mov r1, r6 803875c: a801 add r0, sp, #4 803875e: f7e9 f9cf bl 8021b00 GetSTM32IDStr(str, &len2); 8038762: a801 add r0, sp, #4 8038764: f10d 0103 add.w r1, sp, #3 8038768: f7ee f9dc bl 8026b24 strncat(buf, str, len2); 803876c: a901 add r1, sp, #4 803876e: 4620 mov r0, r4 8038770: f89d 2003 ldrb.w r2, [sp, #3] 8038774: f7e9 fbcc bl 8021f10 strcat(buf, ";;;T2OK;;"); 8038778: 4620 mov r0, r4 803877a: 4904 ldr r1, [pc, #16] ; (803878c ) 803877c: f7e9 fa26 bl 8021bcc } 8038780: b01a add sp, #104 ; 0x68 8038782: bd70 pop {r4, r5, r6, pc} 8038784: 08045955 .word 0x08045955 8038788: 08045953 .word 0x08045953 803878c: 08045957 .word 0x08045957 08038790 : void udp_message_netSettings(char *buf) { 8038790: b510 push {r4, lr} 8038792: b09a sub sp, #104 ; 0x68 8038794: 4604 mov r4, r0 char str[100]; uint8_t len; /* S/N */ GetSerialNumberStr(str, &len); 8038796: f10d 0103 add.w r1, sp, #3 803879a: a801 add r0, sp, #4 803879c: f7ef fab2 bl 8027d04 strcat(buf, "{\"serno\":\""); 80387a0: 4620 mov r0, r4 80387a2: 4926 ldr r1, [pc, #152] ; (803883c ) 80387a4: f7e9 fa12 bl 8021bcc strncat(buf, str, len); 80387a8: f89d 2003 ldrb.w r2, [sp, #3] 80387ac: a901 add r1, sp, #4 80387ae: 4620 mov r0, r4 80387b0: f7e9 fbae bl 8021f10 /* WEB */ GetDhcpStateUDP(str, &len); 80387b4: a801 add r0, sp, #4 80387b6: f10d 0103 add.w r1, sp, #3 80387ba: f7ef fb9b bl 8027ef4 strcat(buf, "\",\"dhcp\":\""); 80387be: 4620 mov r0, r4 80387c0: 491f ldr r1, [pc, #124] ; (8038840 ) 80387c2: f7e9 fa03 bl 8021bcc strncat(buf, str, len); 80387c6: f89d 2003 ldrb.w r2, [sp, #3] 80387ca: a901 add r1, sp, #4 80387cc: 4620 mov r0, r4 80387ce: f7e9 fb9f bl 8021f10 GetIpStr(str, &len); 80387d2: a801 add r0, sp, #4 80387d4: f10d 0103 add.w r1, sp, #3 80387d8: f7ef fb36 bl 8027e48 strcat(buf, "\",\"ipaddress\":\""); 80387dc: 4620 mov r0, r4 80387de: 4919 ldr r1, [pc, #100] ; (8038844 ) 80387e0: f7e9 f9f4 bl 8021bcc strncat(buf, str, len); 80387e4: f89d 2003 ldrb.w r2, [sp, #3] 80387e8: a901 add r1, sp, #4 80387ea: 4620 mov r0, r4 80387ec: f7e9 fb90 bl 8021f10 GetGatewayStr(str, &len); 80387f0: a801 add r0, sp, #4 80387f2: f10d 0103 add.w r1, sp, #3 80387f6: f7ef fb3d bl 8027e74 strcat(buf, "\",\"gateway\":\""); 80387fa: 4620 mov r0, r4 80387fc: 4912 ldr r1, [pc, #72] ; (8038848 ) 80387fe: f7e9 f9e5 bl 8021bcc strncat(buf, str, len); 8038802: f89d 2003 ldrb.w r2, [sp, #3] 8038806: a901 add r1, sp, #4 8038808: 4620 mov r0, r4 803880a: f7e9 fb81 bl 8021f10 GetMaskStr(str, &len); 803880e: a801 add r0, sp, #4 8038810: f10d 0103 add.w r1, sp, #3 8038814: f7ef fb44 bl 8027ea0 strcat(buf, "\",\"mask\":\""); 8038818: 4620 mov r0, r4 803881a: 490c ldr r1, [pc, #48] ; (803884c ) 803881c: f7e9 f9d6 bl 8021bcc strncat(buf, str, len); 8038820: a901 add r1, sp, #4 8038822: f89d 2003 ldrb.w r2, [sp, #3] 8038826: 4620 mov r0, r4 8038828: f7e9 fb72 bl 8021f10 strncat(buf, "\"}", 2); 803882c: 4620 mov r0, r4 803882e: 4908 ldr r1, [pc, #32] ; (8038850 ) 8038830: 2202 movs r2, #2 8038832: f7e9 fb6d bl 8021f10 } 8038836: b01a add sp, #104 ; 0x68 8038838: bd10 pop {r4, pc} 803883a: bf00 nop 803883c: 08045961 .word 0x08045961 8038840: 0804596c .word 0x0804596c 8038844: 08045977 .word 0x08045977 8038848: 08045987 .word 0x08045987 803884c: 08044c22 .word 0x08044c22 8038850: 08044b8b .word 0x08044b8b 08038854 : uint8_t GetUDPParamValue(char *inStr, char *paramName, char *paramValue, uint8_t *paramLen) { 8038854: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8038858: 4690 mov r8, r2 803885a: 461f mov r7, r3 char *beginValue = 0; char *endValue = 0; int len = 0; char *strPtr = 0; strPtr = strstr(inStr, paramName); 803885c: f7e9 fda8 bl 80223b0 if (strPtr != 0) 8038860: 4605 mov r5, r0 8038862: b310 cbz r0, 80388aa { beginValue = strpbrk(strPtr,":"); 8038864: 4912 ldr r1, [pc, #72] ; (80388b0 ) 8038866: f7e9 fc0d bl 8022084 endValue = strpbrk(strPtr,","); 803886a: 4912 ldr r1, [pc, #72] ; (80388b4 ) strPtr = strstr(inStr, paramName); if (strPtr != 0) { beginValue = strpbrk(strPtr,":"); 803886c: 4606 mov r6, r0 endValue = strpbrk(strPtr,","); 803886e: 4628 mov r0, r5 8038870: f7e9 fc08 bl 8022084 if (endValue == 0) 8038874: 4604 mov r4, r0 8038876: b950 cbnz r0, 803888e { endValue = strpbrk(strPtr,"}"); 8038878: 4628 mov r0, r5 803887a: 490f ldr r1, [pc, #60] ; (80388b8 ) 803887c: f7e9 fc02 bl 8022084 if (endValue == 0) 8038880: 4604 mov r4, r0 8038882: b920 cbnz r0, 803888e endValue = strpbrk(strPtr," "); 8038884: 4628 mov r0, r5 8038886: 490d ldr r1, [pc, #52] ; (80388bc ) 8038888: f7e9 fbfc bl 8022084 803888c: 4604 mov r4, r0 } len = endValue - beginValue - 3; 803888e: 1ba5 subs r5, r4, r6 8038890: 3d03 subs r5, #3 strncpy(paramValue, beginValue + 2, len); 8038892: 4640 mov r0, r8 8038894: 1cb1 adds r1, r6, #2 8038896: 462a mov r2, r5 8038898: f7e9 fbc2 bl 8022020 *endValue = '0'; 803889c: 2330 movs r3, #48 ; 0x30 803889e: 7023 strb r3, [r4, #0] *beginValue = '0'; *paramLen = len; return 1; 80388a0: 2001 movs r0, #1 endValue = strpbrk(strPtr," "); } len = endValue - beginValue - 3; strncpy(paramValue, beginValue + 2, len); *endValue = '0'; *beginValue = '0'; 80388a2: 7033 strb r3, [r6, #0] *paramLen = len; 80388a4: 703d strb r5, [r7, #0] return 1; 80388a6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} } else { *paramLen = 0; 80388aa: 7038 strb r0, [r7, #0] return 0; } } 80388ac: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80388b0: 08044c85 .word 0x08044c85 80388b4: 08039a49 .word 0x08039a49 80388b8: 08044b8c .word 0x08044b8c 80388bc: 080399a6 .word 0x080399a6 080388c0 : void udp_recieve_parser(char *buf, u16_t rcvlen) { 80388c0: b530 push {r4, r5, lr} uint8_t valueLen = 0; 80388c2: 2500 movs r5, #0 return 0; } } void udp_recieve_parser(char *buf, u16_t rcvlen) { 80388c4: b0b5 sub sp, #212 ; 0xd4 80388c6: 4604 mov r4, r0 uint8_t len2 = 0; const uint8_t len = 100; char value[100]; char str[100]; memset(str, 0, 100); 80388c8: 4629 mov r1, r5 80388ca: 2264 movs r2, #100 ; 0x64 80388cc: a81b add r0, sp, #108 ; 0x6c } } void udp_recieve_parser(char *buf, u16_t rcvlen) { uint8_t valueLen = 0; 80388ce: f88d 5006 strb.w r5, [sp, #6] uint8_t len2 = 0; 80388d2: f88d 5007 strb.w r5, [sp, #7] const uint8_t len = 100; char value[100]; char str[100]; memset(str, 0, 100); 80388d6: f7e9 f913 bl 8021b00 // ClearParamString(buf); memset(value, 0, len); 80388da: 4629 mov r1, r5 80388dc: 2264 movs r2, #100 ; 0x64 80388de: a802 add r0, sp, #8 80388e0: f7e9 f90e bl 8021b00 memset(str, 0, len); 80388e4: 4629 mov r1, r5 80388e6: 2264 movs r2, #100 ; 0x64 80388e8: a81b add r0, sp, #108 ; 0x6c 80388ea: f7e9 f909 bl 8021b00 DBG buf[rcvlen]='\0'; DBG printf("Rcvd (%d bytes): \t%s\r\n", rcvlen, buf); GetUDPParamValue(buf, "\"serno\"", value, &valueLen); 80388ee: f10d 0306 add.w r3, sp, #6 80388f2: 4620 mov r0, r4 80388f4: 493f ldr r1, [pc, #252] ; (80389f4 ) 80388f6: aa02 add r2, sp, #8 80388f8: f7ff ffac bl 8038854 if(valueLen != 0) 80388fc: f89d 3006 ldrb.w r3, [sp, #6] 8038900: 2b00 cmp r3, #0 8038902: d074 beq.n 80389ee GetSerialNumberStr(str, &len2); 8038904: a81b add r0, sp, #108 ; 0x6c 8038906: f10d 0107 add.w r1, sp, #7 803890a: f7ef f9fb bl 8027d04 else return; if(strncmp(value, str, len2) == 0) 803890e: a802 add r0, sp, #8 8038910: a91b add r1, sp, #108 ; 0x6c 8038912: f89d 2007 ldrb.w r2, [sp, #7] 8038916: f7e9 fb2d bl 8021f74 803891a: 4605 mov r5, r0 803891c: 2800 cmp r0, #0 803891e: d166 bne.n 80389ee { memset(str, 0, len); 8038920: 4629 mov r1, r5 8038922: 2264 movs r2, #100 ; 0x64 8038924: a81b add r0, sp, #108 ; 0x6c 8038926: f7e9 f8eb bl 8021b00 GetUDPParamValue(buf, "\"dhcp\"", str, &valueLen); 803892a: f10d 0306 add.w r3, sp, #6 803892e: 4932 ldr r1, [pc, #200] ; (80389f8 ) 8038930: aa1b add r2, sp, #108 ; 0x6c 8038932: 4620 mov r0, r4 8038934: f7ff ff8e bl 8038854 // memset(str, 0, len); memset(value, 0, len); 8038938: 4629 mov r1, r5 803893a: 2264 movs r2, #100 ; 0x64 803893c: a802 add r0, sp, #8 803893e: f7e9 f8df bl 8021b00 GetUDPParamValue(buf, "\"ipaddress\"", value, &valueLen); 8038942: f10d 0306 add.w r3, sp, #6 8038946: 4620 mov r0, r4 8038948: 492c ldr r1, [pc, #176] ; (80389fc ) 803894a: aa02 add r2, sp, #8 803894c: f7ff ff82 bl 8038854 if(valueLen != 0) 8038950: f89d 3006 ldrb.w r3, [sp, #6] 8038954: b163 cbz r3, 8038970 { SetUDPDhcpStateStr(str); 8038956: a81b add r0, sp, #108 ; 0x6c 8038958: f7ef fc14 bl 8028184 SetIPStr(value); 803895c: a802 add r0, sp, #8 803895e: f7ef fbed bl 802813c else{ udp_type_message = 1; return; } if (strncmp(str, "True", 4) != 0) // Если dhcp off устанавливаем параметры 8038962: a81b add r0, sp, #108 ; 0x6c 8038964: 4926 ldr r1, [pc, #152] ; (8038a00 ) 8038966: 2204 movs r2, #4 8038968: f7e9 fb04 bl 8021f74 803896c: b920 cbnz r0, 8038978 803896e: e02d b.n 80389cc { SetUDPDhcpStateStr(str); SetIPStr(value); } else{ udp_type_message = 1; 8038970: 4b24 ldr r3, [pc, #144] ; (8038a04 ) 8038972: 2201 movs r2, #1 8038974: 701a strb r2, [r3, #0] 8038976: e03a b.n 80389ee return; } if (strncmp(str, "True", 4) != 0) // Если dhcp off устанавливаем параметры { memset(value, 0, len); 8038978: 4629 mov r1, r5 803897a: 2264 movs r2, #100 ; 0x64 803897c: a802 add r0, sp, #8 803897e: f7e9 f8bf bl 8021b00 GetUDPParamValue(buf, "\"gateway\"", value, &valueLen); 8038982: f10d 0306 add.w r3, sp, #6 8038986: 4620 mov r0, r4 8038988: 491f ldr r1, [pc, #124] ; (8038a08 ) 803898a: aa02 add r2, sp, #8 803898c: f7ff ff62 bl 8038854 if(valueLen != 0) 8038990: f89d 3006 ldrb.w r3, [sp, #6] 8038994: b113 cbz r3, 803899c SetGatewayStr(value); 8038996: a802 add r0, sp, #8 8038998: f7ef fbd6 bl 8028148 memset(value, 0, len); 803899c: 2100 movs r1, #0 803899e: 2264 movs r2, #100 ; 0x64 80389a0: a802 add r0, sp, #8 80389a2: f7e9 f8ad bl 8021b00 GetUDPParamValue(buf, "\"mask\"", value, &valueLen); 80389a6: f10d 0306 add.w r3, sp, #6 80389aa: 4620 mov r0, r4 80389ac: 4917 ldr r1, [pc, #92] ; (8038a0c ) 80389ae: aa02 add r2, sp, #8 80389b0: f7ff ff50 bl 8038854 if(valueLen != 0) 80389b4: f89d 3006 ldrb.w r3, [sp, #6] 80389b8: b113 cbz r3, 80389c0 SetMaskStr(value); 80389ba: a802 add r0, sp, #8 80389bc: f7ef fbca bl 8028154 memset(value, 0, len); 80389c0: a802 add r0, sp, #8 80389c2: 2100 movs r1, #0 80389c4: 2264 movs r2, #100 ; 0x64 80389c6: f7e9 f89b bl 8021b00 80389ca: e002 b.n 80389d2 } else SetUDPDhcpStateStr(str); 80389cc: a81b add r0, sp, #108 ; 0x6c 80389ce: f7ef fbd9 bl 8028184 // Если параметры WEB изменились выставляем флаг, сохраняем настройки и перезагружаемся if (GetStateWebReinit() == true) 80389d2: f7ff f9cf bl 8037d74 80389d6: b150 cbz r0, 80389ee { // _message_add_to_log("Изменение сетевых настр", "Инфо", "ND"); SetWebReinitFlag(false); 80389d8: 2000 movs r0, #0 80389da: f7ef fba3 bl 8028124 SetConfirmWebParamsFlag(); 80389de: f7ef fba7 bl 8028130 SaveWEBparam(); 80389e2: f7ff f9ab bl 8037d3c HTTP_SaveSettings(); 80389e6: f7f5 f993 bl 802dd10 Reboot(); 80389ea: f7f0 fb3b bl 8029064 } } } 80389ee: b035 add sp, #212 ; 0xd4 80389f0: bd30 pop {r4, r5, pc} 80389f2: bf00 nop 80389f4: 08045995 .word 0x08045995 80389f8: 0804599d .word 0x0804599d 80389fc: 080459a4 .word 0x080459a4 8038a00: 08040c95 .word 0x08040c95 8038a04: 2000c7fc .word 0x2000c7fc 8038a08: 080459b0 .word 0x080459b0 8038a0c: 080459ba .word 0x080459ba 08038a10 : bool http_server_serve(struct netconn *conn) { 8038a10: b51f push {r0, r1, r2, r3, r4, lr} err_t res; char* buf; u16_t buflen; bool flag = false; netconn_set_recvtimeout(conn, RCV_TIMEOUT); 8038a12: f44f 737a mov.w r3, #1000 ; 0x3e8 8038a16: 6183 str r3, [r0, #24] res = netconn_recv(conn, &inbuf); 8038a18: a902 add r1, sp, #8 8038a1a: f7f5 fa8d bl 802df38 // DBG printf("recv failed %d\n", res); if (res == ERR_OK) 8038a1e: b978 cbnz r0, 8038a40 { netbuf_data(inbuf, (void**)&buf, &buflen); 8038a20: f10d 0206 add.w r2, sp, #6 8038a24: a903 add r1, sp, #12 8038a26: 9802 ldr r0, [sp, #8] 8038a28: f7f5 ff81 bl 802e92e udp_recieve_parser(buf, buflen); 8038a2c: 9803 ldr r0, [sp, #12] 8038a2e: f8bd 1006 ldrh.w r1, [sp, #6] 8038a32: f7ff ff45 bl 80388c0 flag = true; netbuf_delete(inbuf); 8038a36: 9802 ldr r0, [sp, #8] 8038a38: f7f5 ff53 bl 802e8e2 if (res == ERR_OK) { netbuf_data(inbuf, (void**)&buf, &buflen); udp_recieve_parser(buf, buflen); flag = true; 8038a3c: 2001 movs r0, #1 8038a3e: e000 b.n 8038a42 { struct netbuf *inbuf; err_t res; char* buf; u16_t buflen; bool flag = false; 8038a40: 2000 movs r0, #0 /* TODO remove if tested */ /* Delete the buffer (netconn_recv gives us ownership, so we have to make sure to deallocate the buffer) */ //netbuf_delete(inbuf); return flag; } 8038a42: b005 add sp, #20 8038a44: bd00 pop {pc} 8038a46: 0000 movs r0, r0 08038a48 : void udp_netsettings_task(void *arg) { 8038a48: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} err_t err; TickType_t timestamp = 0; uint32_t len; vTaskDelay(5000); 8038a4c: f241 3088 movw r0, #5000 ; 0x1388 8038a50: f7f2 fa56 bl 802af00 udp_conn = netconn_new( NETCONN_UDP ); 8038a54: 2100 movs r1, #0 8038a56: 2020 movs r0, #32 8038a58: 460a mov r2, r1 8038a5a: f7f5 f9df bl 802de1c if (udp_conn != NULL) 8038a5e: 4604 mov r4, r0 8038a60: 2800 cmp r0, #0 8038a62: d04a beq.n 8038afa { err = netconn_bind(udp_conn, IP_ADDR_ANY, UDP_PORT); 8038a64: 4927 ldr r1, [pc, #156] ; (8038b04 ) 8038a66: f64b 7299 movw r2, #49049 ; 0xbf99 8038a6a: f7f5 fa0d bl 802de88 if (err == ERR_OK) 8038a6e: 2800 cmp r0, #0 8038a70: d140 bne.n 8038af4 for( ;; ) { netconn_connect(udp_conn, IP_ADDR_BROADCAST, UDP_PORT); memset(dataBuf1, 0, DATA_BUF_LEN1); switch(udp_type_message) 8038a72: 4f25 ldr r7, [pc, #148] ; (8038b08 ) if (udp_conn != NULL) { err = netconn_bind(udp_conn, IP_ADDR_ANY, UDP_PORT); if (err == ERR_OK) 8038a74: 4606 mov r6, r0 { for( ;; ) { netconn_connect(udp_conn, IP_ADDR_BROADCAST, UDP_PORT); 8038a76: 4925 ldr r1, [pc, #148] ; (8038b0c ) 8038a78: f64b 7299 movw r2, #49049 ; 0xbf99 8038a7c: 4620 mov r0, r4 8038a7e: f7f5 fa21 bl 802dec4 memset(dataBuf1, 0, DATA_BUF_LEN1); 8038a82: 4823 ldr r0, [pc, #140] ; (8038b10 ) 8038a84: 2100 movs r1, #0 8038a86: 22ff movs r2, #255 ; 0xff 8038a88: f7e9 f83a bl 8021b00 switch(udp_type_message) 8038a8c: 783b ldrb r3, [r7, #0] 8038a8e: b113 cbz r3, 8038a96 8038a90: 2b01 cmp r3, #1 8038a92: d112 bne.n 8038aba 8038a94: e00c b.n 8038ab0 { case 0: if (timestamp + SEND_TIMEOUT < xTaskGetTickCount()) { 8038a96: f7f2 f901 bl 802ac9c 8038a9a: f506 63fa add.w r3, r6, #2000 ; 0x7d0 8038a9e: 4283 cmp r3, r0 8038aa0: d20b bcs.n 8038aba udp_message(dataBuf1); 8038aa2: 481b ldr r0, [pc, #108] ; (8038b10 ) 8038aa4: f7ff fe10 bl 80386c8 timestamp = xTaskGetTickCount(); 8038aa8: f7f2 f8f8 bl 802ac9c 8038aac: 4606 mov r6, r0 8038aae: e004 b.n 8038aba } break; case 1: udp_message_netSettings(dataBuf1); 8038ab0: 4817 ldr r0, [pc, #92] ; (8038b10 ) 8038ab2: f7ff fe6d bl 8038790 udp_type_message = 0; 8038ab6: 2300 movs r3, #0 8038ab8: 703b strb r3, [r7, #0] break; default: break; } len = strlen(dataBuf1); 8038aba: 4815 ldr r0, [pc, #84] ; (8038b10 ) 8038abc: f7e9 f9f8 bl 8021eb0 if (len > 0) { 8038ac0: 4605 mov r5, r0 8038ac2: b180 cbz r0, 8038ae6 buf_snd = netbuf_new(); 8038ac4: f7f5 ff02 bl 802e8cc data_snd = netbuf_alloc(buf_snd,len); 8038ac8: b2a9 uxth r1, r5 } len = strlen(dataBuf1); if (len > 0) { buf_snd = netbuf_new(); 8038aca: 4680 mov r8, r0 data_snd = netbuf_alloc(buf_snd,len); 8038acc: f7f5 ff1a bl 802e904 memcpy(data_snd, dataBuf1, len); 8038ad0: 490f ldr r1, [pc, #60] ; (8038b10 ) 8038ad2: 462a mov r2, r5 8038ad4: f7e8 ff5a bl 802198c netconn_send(udp_conn, buf_snd); 8038ad8: 4620 mov r0, r4 8038ada: 4641 mov r1, r8 8038adc: f7f5 fa66 bl 802dfac netbuf_delete(buf_snd); 8038ae0: 4640 mov r0, r8 8038ae2: f7f5 fefe bl 802e8e2 DBG printf("\r\nSent (%u bytes): \t%s\r\n", (unsigned int)len, dataBuf1); } netconn_disconnect(udp_conn); 8038ae6: 4620 mov r0, r4 8038ae8: f7f5 fa0a bl 802df00 /* TODO remove if tested */ //if(http_server_serve(udp_conn)) //vTaskDelay(1000); http_server_serve(udp_conn); 8038aec: 4620 mov r0, r4 8038aee: f7ff ff8f bl 8038a10 } 8038af2: e7c0 b.n 8038a76 } else { netconn_delete(udp_conn); 8038af4: 4620 mov r0, r4 8038af6: f7f5 f9b5 bl 802de64 else DBG printf("udp_netsettings_task: can't create new UDP netconn\r\n"); for( ;; ) { vTaskDelay(10000); 8038afa: f242 7010 movw r0, #10000 ; 0x2710 8038afe: f7f2 f9ff bl 802af00 8038b02: e7fa b.n 8038afa 8038b04: 08044e44 .word 0x08044e44 8038b08: 2000c7fc .word 0x2000c7fc 8038b0c: 08044e40 .word 0x08044e40 8038b10: 2000fb60 .word 0x2000fb60 08038b14 : } } void UDP_netsetting_init() { 8038b14: b51f push {r0, r1, r2, r3, r4, lr} xTaskCreate(udp_netsettings_task, ( char * ) "udp_netsettings_task", 4*configMINIMAL_STACK_SIZE , NULL, tskIDLE_PRIORITY, NULL); 8038b16: 2300 movs r3, #0 8038b18: 9300 str r3, [sp, #0] 8038b1a: 9301 str r3, [sp, #4] 8038b1c: 9302 str r3, [sp, #8] 8038b1e: 9303 str r3, [sp, #12] 8038b20: 4903 ldr r1, [pc, #12] ; (8038b30 ) 8038b22: 4804 ldr r0, [pc, #16] ; (8038b34 ) 8038b24: f44f 7200 mov.w r2, #512 ; 0x200 8038b28: f7f1 ff50 bl 802a9cc } 8038b2c: b005 add sp, #20 8038b2e: bd00 pop {pc} 8038b30: 080459c1 .word 0x080459c1 8038b34: 08038a49 .word 0x08038a49 08038b38 : * @brief ETH_BSP_Config * @param None * @retval None */ void ETH_BSP_Config(void) { 8038b38: 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 8038b3a: 2007 movs r0, #7 * @brief ETH_BSP_Config * @param None * @retval None */ void ETH_BSP_Config(void) { 8038b3c: b0b4 sub sp, #208 ; 0xd0 { volatile uint32_t i; GPIO_InitTypeDef GPIO_InitStructure; /* Enable GPIOs clocks */ RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB 8038b3e: 2101 movs r1, #1 8038b40: f7ec fe04 bl 802574c | RCC_AHB1Periph_GPIOC, ENABLE); /* Enable SYSCFG clock */ RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE); 8038b44: 2101 movs r1, #1 8038b46: f44f 4080 mov.w r0, #16384 ; 0x4000 8038b4a: f7ec fe23 bl 8025794 /* MII/RMII Media interface selection --------------------------------------*/ SYSCFG_ETH_MediaInterfaceConfig(SYSCFG_ETH_MediaInterface_RMII); 8038b4e: 2001 movs r0, #1 8038b50: f7ed f814 bl 8025b7c ETH_RST_PIN -------> PE2 - замена на PE13 */ /* Configure PA1,PA2 and PA7 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_7; 8038b54: 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; 8038b56: 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; 8038b58: 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; 8038b5a: 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); 8038b5c: 4864 ldr r0, [pc, #400] ; (8038cf0 ) */ /* 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; 8038b5e: 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; 8038b62: 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); 8038b64: 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; 8038b66: f88d 3011 strb.w r3, [sp, #17] GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; 8038b6a: f88d 4012 strb.w r4, [sp, #18] GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ; 8038b6e: f88d 4013 strb.w r4, [sp, #19] GPIO_Init(GPIOA, &GPIO_InitStructure); 8038b72: f7ec fd0b bl 802558c GPIO_PinAFConfig(GPIOA, GPIO_PinSource1, GPIO_AF_ETH); 8038b76: 2101 movs r1, #1 8038b78: 220b movs r2, #11 8038b7a: 485d ldr r0, [pc, #372] ; (8038cf0 ) 8038b7c: f7ec fd4f bl 802561e GPIO_PinAFConfig(GPIOA, GPIO_PinSource2, GPIO_AF_ETH); 8038b80: 220b movs r2, #11 8038b82: 485b ldr r0, [pc, #364] ; (8038cf0 ) 8038b84: 4629 mov r1, r5 8038b86: f7ec fd4a bl 802561e GPIO_PinAFConfig(GPIOA, GPIO_PinSource7, GPIO_AF_ETH); 8038b8a: 220b movs r2, #11 8038b8c: 2107 movs r1, #7 8038b8e: 4858 ldr r0, [pc, #352] ; (8038cf0 ) 8038b90: f7ec fd45 bl 802561e /* Configure PB10,PB11,PB12 and PB13 */ GPIO_InitStructure.GPIO_Pin = /* GPIO_Pin_10 | */ GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_13; 8038b94: f44f 5360 mov.w r3, #14336 ; 0x3800 GPIO_Init(GPIOB, &GPIO_InitStructure); 8038b98: 4856 ldr r0, [pc, #344] ; (8038cf4 ) 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; 8038b9a: 9303 str r3, [sp, #12] GPIO_Init(GPIOB, &GPIO_InitStructure); 8038b9c: a903 add r1, sp, #12 8038b9e: f7ec fcf5 bl 802558c //GPIO_PinAFConfig(GPIOB, GPIO_PinSource10, GPIO_AF_ETH); GPIO_PinAFConfig(GPIOB, GPIO_PinSource11, GPIO_AF_ETH); 8038ba2: 210b movs r1, #11 8038ba4: 460a mov r2, r1 8038ba6: 4853 ldr r0, [pc, #332] ; (8038cf4 ) 8038ba8: f7ec fd39 bl 802561e GPIO_PinAFConfig(GPIOB, GPIO_PinSource12, GPIO_AF_ETH); 8038bac: 210c movs r1, #12 8038bae: 220b movs r2, #11 8038bb0: 4850 ldr r0, [pc, #320] ; (8038cf4 ) 8038bb2: f7ec fd34 bl 802561e GPIO_PinAFConfig(GPIOB, GPIO_PinSource13, GPIO_AF_ETH); 8038bb6: 220b movs r2, #11 8038bb8: 210d movs r1, #13 8038bba: 484e ldr r0, [pc, #312] ; (8038cf4 ) 8038bbc: f7ec fd2f bl 802561e /* Configure PC1, PC4 and PC5 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_4 | GPIO_Pin_5; 8038bc0: 2332 movs r3, #50 ; 0x32 GPIO_Init(GPIOC, &GPIO_InitStructure); 8038bc2: 484d ldr r0, [pc, #308] ; (8038cf8 ) 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; 8038bc4: 9303 str r3, [sp, #12] GPIO_Init(GPIOC, &GPIO_InitStructure); 8038bc6: a903 add r1, sp, #12 8038bc8: f7ec fce0 bl 802558c GPIO_PinAFConfig(GPIOC, GPIO_PinSource1, GPIO_AF_ETH); 8038bcc: 484a ldr r0, [pc, #296] ; (8038cf8 ) 8038bce: 2101 movs r1, #1 8038bd0: 220b movs r2, #11 8038bd2: f7ec fd24 bl 802561e GPIO_PinAFConfig(GPIOC, GPIO_PinSource4, GPIO_AF_ETH); 8038bd6: 4848 ldr r0, [pc, #288] ; (8038cf8 ) 8038bd8: 2104 movs r1, #4 8038bda: 220b movs r2, #11 8038bdc: f7ec fd1f bl 802561e GPIO_PinAFConfig(GPIOC, GPIO_PinSource5, GPIO_AF_ETH); 8038be0: 220b movs r2, #11 8038be2: 4845 ldr r0, [pc, #276] ; (8038cf8 ) 8038be4: 2105 movs r1, #5 8038be6: f7ec fd1a bl 802561e /* Configure the PHY RST pin */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13; 8038bea: f44f 5600 mov.w r6, #8192 ; 0x2000 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; 8038bee: 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); 8038bf0: 4842 ldr r0, [pc, #264] ; (8038cfc ) 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; 8038bf2: 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); 8038bf6: 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; 8038bf8: 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; 8038bfc: 9603 str r6, [sp, #12] GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; 8038bfe: f88d 4012 strb.w r4, [sp, #18] GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; 8038c02: f88d 5011 strb.w r5, [sp, #17] GPIO_Init(GPIOE, &GPIO_InitStructure); 8038c06: f7ec fcc1 bl 802558c GPIO_ResetBits(GPIOE, GPIO_Pin_13); 8038c0a: 483c ldr r0, [pc, #240] ; (8038cfc ) 8038c0c: 4631 mov r1, r6 8038c0e: f7ec fd04 bl 802561a for (i = 0; i < 20000; i++); 8038c12: 9401 str r4, [sp, #4] 8038c14: f644 631f movw r3, #19999 ; 0x4e1f 8038c18: e002 b.n 8038c20 8038c1a: 9a01 ldr r2, [sp, #4] 8038c1c: 3201 adds r2, #1 8038c1e: 9201 str r2, [sp, #4] 8038c20: 9a01 ldr r2, [sp, #4] 8038c22: 429a cmp r2, r3 8038c24: d9f9 bls.n 8038c1a GPIO_SetBits(GPIOE, GPIO_Pin_13); 8038c26: 4835 ldr r0, [pc, #212] ; (8038cfc ) 8038c28: f44f 5100 mov.w r1, #8192 ; 0x2000 8038c2c: f7ec fcf3 bl 8025616 for (i = 0; i < 20000; i++); 8038c30: 2300 movs r3, #0 8038c32: 9301 str r3, [sp, #4] 8038c34: f644 631f movw r3, #19999 ; 0x4e1f 8038c38: e002 b.n 8038c40 8038c3a: 9a01 ldr r2, [sp, #4] 8038c3c: 3201 adds r2, #1 8038c3e: 9201 str r2, [sp, #4] 8038c40: 9a01 ldr r2, [sp, #4] 8038c42: 429a cmp r2, r3 8038c44: d9f9 bls.n 8038c3a static void ETH_MACDMA_Config(void) { ETH_InitTypeDef ETH_InitStructure; /* Enable ETHERNET clock */ RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_ETH_MAC | RCC_AHB1Periph_ETH_MAC_Tx | 8038c46: f04f 6060 mov.w r0, #234881024 ; 0xe000000 8038c4a: 2101 movs r1, #1 8038c4c: f7ec fd7e bl 802574c RCC_AHB1Periph_ETH_MAC_Rx, ENABLE); /* Reset ETHERNET on AHB Bus */ ETH_DeInit(); 8038c50: f000 f868 bl 8038d24 /* Software reset */ ETH_SoftwareReset(); 8038c54: f000 f9fe bl 8039054 /* Wait for software reset */ while (ETH_GetSoftwareResetStatus() == SET); 8038c58: f000 fa04 bl 8039064 8038c5c: 2801 cmp r0, #1 8038c5e: d0fb beq.n 8038c58 /* ETHERNET Configuration --------------------------------------------------*/ /* Call ETH_StructInit if you don't like to configure all ETH_InitStructure parameter */ ETH_StructInit(Ð_InitStructure); 8038c60: a805 add r0, sp, #20 8038c62: f000 f86c bl 8038d3e //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; 8038c66: f44f 7300 mov.w r3, #512 ; 0x200 8038c6a: 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; 8038c6c: f04f 7300 mov.w r3, #33554432 ; 0x2000000 8038c70: 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; 8038c72: 932e str r3, [sp, #184] ; 0xb8 ETH_InitStructure.ETH_FixedBurst = ETH_FixedBurst_Enable; 8038c74: f44f 3380 mov.w r3, #65536 ; 0x10000 8038c78: 932f str r3, [sp, #188] ; 0xbc ETH_InitStructure.ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; 8038c7a: 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; 8038c7e: 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; 8038c80: 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; 8038c84: 9330 str r3, [sp, #192] ; 0xc0 ETH_InitStructure.ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; 8038c86: 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; 8038c8a: 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; 8038c8c: 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; 8038c8e: 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; 8038c90: 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; 8038c92: f44f 4380 mov.w r3, #16384 ; 0x4000 /* Configure Ethernet */ EthInitStatus = ETH_Init(Ð_InitStructure, LAN8720_PHY_ADDRESS); 8038c96: 4629 mov r1, r5 8038c98: 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; 8038c9a: 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; 8038c9c: 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; 8038c9e: 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; 8038ca0: 940c str r4, [sp, #48] ; 0x30 ETH_InitStructure.ETH_RetryTransmission = ETH_RetryTransmission_Disable; ETH_InitStructure.ETH_AutomaticPadCRCStrip = ETH_AutomaticPadCRCStrip_Disable; 8038ca2: 9410 str r4, [sp, #64] ; 0x40 ETH_InitStructure.ETH_ReceiveAll = ETH_ReceiveAll_Disable; 8038ca4: 9413 str r4, [sp, #76] ; 0x4c ETH_InitStructure.ETH_BroadcastFramesReception = ETH_BroadcastFramesReception_Enable; 8038ca6: 9416 str r4, [sp, #88] ; 0x58 ETH_InitStructure.ETH_PromiscuousMode = ETH_PromiscuousMode_Disable; 8038ca8: 9418 str r4, [sp, #96] ; 0x60 ETH_InitStructure.ETH_MulticastFramesFilter = ETH_MulticastFramesFilter_Perfect; 8038caa: 9419 str r4, [sp, #100] ; 0x64 ETH_InitStructure.ETH_UnicastFramesFilter = ETH_UnicastFramesFilter_Perfect; 8038cac: 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; 8038cae: 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; 8038cb0: 942a str r4, [sp, #168] ; 0xa8 ETH_InitStructure.ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; 8038cb2: 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); 8038cb4: f000 fa80 bl 80391b8 8038cb8: 4e11 ldr r6, [pc, #68] ; (8038d00 ) /* Enable the Ethernet Rx Interrupt */ ETH_DMAITConfig(ETH_DMA_IT_NIS | ETH_DMA_IT_R, ENABLE); 8038cba: 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); 8038cbc: 6030 str r0, [r6, #0] /* Enable the Ethernet Rx Interrupt */ ETH_DMAITConfig(ETH_DMA_IT_NIS | ETH_DMA_IT_R, ENABLE); 8038cbe: 4811 ldr r0, [pc, #68] ; (8038d04 ) 8038cc0: f000 f9e2 bl 8039088 void ETH_NVIC_Config(void) { NVIC_InitTypeDef NVIC_InitStructure; /* 2 bit for pre-emption priority, 2 bits for subpriority */ NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); 8038cc4: f44f 7040 mov.w r0, #768 ; 0x300 8038cc8: f7ec fae0 bl 802528c /* Enable the Ethernet global Interrupt */ NVIC_InitStructure.NVIC_IRQChannel = ETH_IRQn; 8038ccc: 233d movs r3, #61 ; 0x3d 8038cce: 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); 8038cd2: 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; 8038cd4: 2305 movs r3, #5 8038cd6: f88d 3009 strb.w r3, [sp, #9] NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; 8038cda: f88d 400a strb.w r4, [sp, #10] NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; 8038cde: f88d 500b strb.w r5, [sp, #11] NVIC_Init(&NVIC_InitStructure); 8038ce2: f7ec fadd bl 80252a0 ETH_MACDMA_Config(); /* Config NVIC for Ethernet */ ETH_NVIC_Config(); if (EthInitStatus == 0) { 8038ce6: 6833 ldr r3, [r6, #0] 8038ce8: b903 cbnz r3, 8038cec 8038cea: e7fe b.n 8038cea // LCD_DisplayStringLine(Line5, (uint8_t*)" Ethernet Init "); // LCD_DisplayStringLine(Line6, (uint8_t*)" failed "); // STM_EVAL_LEDOn(LED5); while(1); } } 8038cec: b034 add sp, #208 ; 0xd0 8038cee: bd70 pop {r4, r5, r6, pc} 8038cf0: 40020000 .word 0x40020000 8038cf4: 40020400 .word 0x40020400 8038cf8: 40020800 .word 0x40020800 8038cfc: 40021000 .word 0x40021000 8038d00: 2000c800 .word 0x2000c800 8038d04: 00010040 .word 0x00010040 08038d08 : * @brief Inserts a delay time. * @param nCount: specifies the delay time length. * @retval None */ static void ETH_Delay(__IO uint32_t nCount) { 8038d08: b084 sub sp, #16 __IO uint32_t index = 0; 8038d0a: 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) { 8038d0c: 9001 str r0, [sp, #4] __IO uint32_t index = 0; 8038d0e: 9303 str r3, [sp, #12] for(index = nCount; index != 0; index--) 8038d10: 9b01 ldr r3, [sp, #4] 8038d12: e001 b.n 8038d18 8038d14: 9b03 ldr r3, [sp, #12] 8038d16: 3b01 subs r3, #1 8038d18: 9303 str r3, [sp, #12] 8038d1a: 9b03 ldr r3, [sp, #12] 8038d1c: 2b00 cmp r3, #0 8038d1e: d1f9 bne.n 8038d14 { } } 8038d20: b004 add sp, #16 8038d22: 4770 bx lr 08038d24 : * @brief Deinitializes the ETHERNET peripheral registers to their default reset values. * @param None * @retval None */ void ETH_DeInit(void) { 8038d24: b508 push {r3, lr} RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_ETH_MAC, ENABLE); 8038d26: 2101 movs r1, #1 8038d28: f04f 7000 mov.w r0, #33554432 ; 0x2000000 8038d2c: f7ec fd3e bl 80257ac RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_ETH_MAC, DISABLE); 8038d30: f04f 7000 mov.w r0, #33554432 ; 0x2000000 8038d34: 2100 movs r1, #0 } 8038d36: 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); 8038d3a: f7ec bd37 b.w 80257ac 08038d3e : /* 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; 8038d3e: f44f 4280 mov.w r2, #16384 ; 0x4000 8038d42: 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; 8038d44: f44f 6200 mov.w r2, #2048 ; 0x800 8038d48: 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; 8038d4a: 2240 movs r2, #64 ; 0x40 8038d4c: 6402 str r2, [r0, #64] ; 0x40 /* Disable reception of Broadcast frames */ ETH_InitStruct->ETH_BroadcastFramesReception = ETH_BroadcastFramesReception_Disable; 8038d4e: 2220 movs r2, #32 8038d50: 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; 8038d52: 2280 movs r2, #128 ; 0x80 { /* ETH_InitStruct members default value */ /*------------------------ MAC Configuration ---------------------------*/ /* PHY Auto-negotiation enabled */ ETH_InitStruct->ETH_AutoNegotiation = ETH_AutoNegotiation_Enable; 8038d54: 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; 8038d56: 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; 8038d58: 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; 8038d5c: 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; 8038d5e: 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; 8038d62: 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; 8038d64: 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; 8038d68: 6043 str r3, [r0, #4] /* MAC Jabber enabled in Half-duplex mode */ ETH_InitStruct->ETH_Jabber = ETH_Jabber_Enable; 8038d6a: 6083 str r3, [r0, #8] /* Ethernet interframe gap set to 96 bits */ ETH_InitStruct->ETH_InterFrameGap = ETH_InterFrameGap_96Bit; 8038d6c: 60c3 str r3, [r0, #12] /* Carrier Sense Enabled in Half-Duplex mode */ ETH_InitStruct->ETH_CarrierSense = ETH_CarrierSense_Enable; 8038d6e: 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; 8038d70: 6183 str r3, [r0, #24] /* MAC MII loopback disabled */ ETH_InitStruct->ETH_LoopbackMode = ETH_LoopbackMode_Disable; 8038d72: 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; 8038d74: 6243 str r3, [r0, #36] ; 0x24 /* Retry Transmission enabled for half-duplex mode */ ETH_InitStruct->ETH_RetryTransmission = ETH_RetryTransmission_Enable; 8038d76: 6283 str r3, [r0, #40] ; 0x28 /* Automatic PAD/CRC strip disabled*/ ETH_InitStruct->ETH_AutomaticPadCRCStrip = ETH_AutomaticPadCRCStrip_Disable; 8038d78: 62c3 str r3, [r0, #44] ; 0x2c /* half-duplex mode retransmission Backoff time_limit = 10 slot times*/ ETH_InitStruct->ETH_BackOffLimit = ETH_BackOffLimit_10; 8038d7a: 6303 str r3, [r0, #48] ; 0x30 /* half-duplex mode Deferral check disabled */ ETH_InitStruct->ETH_DeferralCheck = ETH_DeferralCheck_Disable; 8038d7c: 6343 str r3, [r0, #52] ; 0x34 /* Receive all frames disabled */ ETH_InitStruct->ETH_ReceiveAll = ETH_ReceiveAll_Disable; 8038d7e: 6383 str r3, [r0, #56] ; 0x38 /* Source address filtering (on the optional MAC addresses) disabled */ ETH_InitStruct->ETH_SourceAddrFilter = ETH_SourceAddrFilter_Disable; 8038d80: 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; 8038d82: 6483 str r3, [r0, #72] ; 0x48 /* Promiscuous address filtering mode disabled */ ETH_InitStruct->ETH_PromiscuousMode = ETH_PromiscuousMode_Disable; 8038d84: 64c3 str r3, [r0, #76] ; 0x4c /* Perfect address filtering for multicast addresses */ ETH_InitStruct->ETH_MulticastFramesFilter = ETH_MulticastFramesFilter_Perfect; 8038d86: 6503 str r3, [r0, #80] ; 0x50 /* Perfect address filtering for unicast addresses */ ETH_InitStruct->ETH_UnicastFramesFilter = ETH_UnicastFramesFilter_Perfect; 8038d88: 6543 str r3, [r0, #84] ; 0x54 /* Initialize hash table high and low regs */ ETH_InitStruct->ETH_HashTableHigh = 0x0; 8038d8a: 6583 str r3, [r0, #88] ; 0x58 ETH_InitStruct->ETH_HashTableLow = 0x0; 8038d8c: 65c3 str r3, [r0, #92] ; 0x5c /* Flow control config (flow control disabled)*/ ETH_InitStruct->ETH_PauseTime = 0x0; 8038d8e: 6603 str r3, [r0, #96] ; 0x60 ETH_InitStruct->ETH_ZeroQuantaPause = ETH_ZeroQuantaPause_Disable; ETH_InitStruct->ETH_PauseLowThreshold = ETH_PauseLowThreshold_Minus4; 8038d90: 6683 str r3, [r0, #104] ; 0x68 ETH_InitStruct->ETH_UnicastPauseFrameDetect = ETH_UnicastPauseFrameDetect_Disable; 8038d92: 66c3 str r3, [r0, #108] ; 0x6c ETH_InitStruct->ETH_ReceiveFlowControl = ETH_ReceiveFlowControl_Disable; 8038d94: 6703 str r3, [r0, #112] ; 0x70 ETH_InitStruct->ETH_TransmitFlowControl = ETH_TransmitFlowControl_Disable; 8038d96: 6743 str r3, [r0, #116] ; 0x74 /* VLANtag config (VLAN field not checked) */ ETH_InitStruct->ETH_VLANTagComparison = ETH_VLANTagComparison_16Bit; 8038d98: 6783 str r3, [r0, #120] ; 0x78 ETH_InitStruct->ETH_VLANTagIdentifier = 0x0; 8038d9a: 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; 8038d9c: 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; 8038da0: 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; 8038da4: f44f 3280 mov.w r2, #65536 ; 0x10000 8038da8: 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; 8038dac: 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; 8038db0: 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; 8038db4: f8c0 20ac str.w r2, [r0, #172] ; 0xac ETH_InitStruct->ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; 8038db8: 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; 8038dbc: f8c0 3088 str.w r3, [r0, #136] ; 0x88 /* Store and forward mode enabled for transmit */ ETH_InitStruct->ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable; 8038dc0: 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; 8038dc4: f8c0 3090 str.w r3, [r0, #144] ; 0x90 /* Disable forwarding frames with errors (short frames, CRC,...)*/ ETH_InitStruct->ETH_ForwardErrorFrames = ETH_ForwardErrorFrames_Disable; 8038dc8: f8c0 3094 str.w r3, [r0, #148] ; 0x94 /* Disable undersized good frames */ ETH_InitStruct->ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; 8038dcc: 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; 8038dd0: 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; 8038dd4: 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; 8038dd8: f8c0 20b0 str.w r2, [r0, #176] ; 0xb0 /* DMA Ring mode skip length = 0 */ ETH_InitStruct->ETH_DescriptorSkipLength = 0x0; 8038ddc: 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; 8038de0: f8c0 30b8 str.w r3, [r0, #184] ; 0xb8 8038de4: 4770 bx lr 8038de6: 0000 movs r0, r0 08038de8 : * @param NewState: new state of the MAC transmission. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_MACTransmissionCmd(FunctionalState NewState) { 8038de8: 4b04 ldr r3, [pc, #16] ; (8038dfc ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the MAC transmission */ ETH->MACCR |= ETH_MACCR_TE; 8038dea: 681a ldr r2, [r3, #0] void ETH_MACTransmissionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8038dec: b110 cbz r0, 8038df4 { /* Enable the MAC transmission */ ETH->MACCR |= ETH_MACCR_TE; 8038dee: f042 0208 orr.w r2, r2, #8 8038df2: e001 b.n 8038df8 } else { /* Disable the MAC transmission */ ETH->MACCR &= ~ETH_MACCR_TE; 8038df4: f022 0208 bic.w r2, r2, #8 8038df8: 601a str r2, [r3, #0] 8038dfa: 4770 bx lr 8038dfc: 40028000 .word 0x40028000 08038e00 : * @param NewState: new state of the MAC reception. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_MACReceptionCmd(FunctionalState NewState) { 8038e00: 4b04 ldr r3, [pc, #16] ; (8038e14 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the MAC reception */ ETH->MACCR |= ETH_MACCR_RE; 8038e02: 681a ldr r2, [r3, #0] void ETH_MACReceptionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8038e04: b110 cbz r0, 8038e0c { /* Enable the MAC reception */ ETH->MACCR |= ETH_MACCR_RE; 8038e06: f042 0204 orr.w r2, r2, #4 8038e0a: e001 b.n 8038e10 } else { /* Disable the MAC reception */ ETH->MACCR &= ~ETH_MACCR_RE; 8038e0c: f022 0204 bic.w r2, r2, #4 8038e10: 601a str r2, [r3, #0] 8038e12: 4770 bx lr 8038e14: 40028000 .word 0x40028000 08038e18 : 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]; 8038e18: 790b ldrb r3, [r1, #4] 8038e1a: 794a ldrb r2, [r1, #5] 8038e1c: 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; 8038e20: 4b07 ldr r3, [pc, #28] ; (8038e40 ) 8038e22: 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]; 8038e24: 788a ldrb r2, [r1, #2] 8038e26: 78cb ldrb r3, [r1, #3] 8038e28: 0412 lsls r2, r2, #16 8038e2a: ea42 6203 orr.w r2, r2, r3, lsl #24 8038e2e: 780b ldrb r3, [r1, #0] 8038e30: 431a orrs r2, r3 8038e32: 784b ldrb r3, [r1, #1] 8038e34: 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; 8038e38: 4b02 ldr r3, [pc, #8] ; (8038e44 ) 8038e3a: 50c2 str r2, [r0, r3] 8038e3c: 4770 bx lr 8038e3e: bf00 nop 8038e40: 40028040 .word 0x40028040 8038e44: 40028044 .word 0x40028044 08038e48 : * the receive frame (should be used with interrupt mode only) * @param None * @retval Structure of type FrameTypeDef */ FrameTypeDef ETH_Get_Received_Frame_interrupt(void) { 8038e48: b537 push {r0, r1, r2, r4, r5, lr} FrameTypeDef frame={0,0,0}; __IO uint32_t descriptor_scan_counter = 0; 8038e4a: 2300 movs r3, #0 8038e4c: 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; 8038e4e: 4b24 ldr r3, [pc, #144] ; (8038ee0 ) 8038e50: 681a ldr r2, [r3, #0] 8038e52: 4b24 ldr r3, [pc, #144] ; (8038ee4 ) DMA_RX_FRAME_infos->Seg_Count = 1; 8038e54: 2401 movs r4, #1 8038e56: 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)&& 8038e58: e033 b.n 8038ec2 (descriptor_scan_counterStatus & ETH_DMARxDesc_FS) != (uint32_t)RESET)&& 8038e60: 6819 ldr r1, [r3, #0] 8038e62: 0589 lsls r1, r1, #22 8038e64: d505 bpl.n 8038e72 ((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)) 8038e66: 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)&& 8038e68: 05c9 lsls r1, r1, #23 8038e6a: d402 bmi.n 8038e72 ((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)) { DMA_RX_FRAME_infos->FS_Rx_Desc = DMARxDescToGet; 8038e6c: 6013 str r3, [r2, #0] DMA_RX_FRAME_infos->Seg_Count = 1; 8038e6e: 6094 str r4, [r2, #8] 8038e70: e009 b.n 8038e86 DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); } /* check if intermediate segment */ else if (((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)&& 8038e72: 6819 ldr r1, [r3, #0] 8038e74: 05c9 lsls r1, r1, #23 8038e76: d408 bmi.n 8038e8a ((DMARxDescToGet->Status & ETH_DMARxDesc_FS) == (uint32_t)RESET)) 8038e78: 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)&& 8038e7a: 0589 lsls r1, r1, #22 8038e7c: d500 bpl.n 8038e80 8038e7e: e004 b.n 8038e8a ((DMARxDescToGet->Status & ETH_DMARxDesc_FS) == (uint32_t)RESET)) { (DMA_RX_FRAME_infos->Seg_Count) ++; 8038e80: 6891 ldr r1, [r2, #8] 8038e82: 3101 adds r1, #1 8038e84: 6091 str r1, [r2, #8] DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); 8038e86: 68db ldr r3, [r3, #12] 8038e88: e01b b.n 8038ec2 8038e8a: 4a16 ldr r2, [pc, #88] ; (8038ee4 ) 8038e8c: 6013 str r3, [r2, #0] /* should be last segment */ else { /* last segment */ DMA_RX_FRAME_infos->LS_Rx_Desc = DMARxDescToGet; 8038e8e: 4a14 ldr r2, [pc, #80] ; (8038ee0 ) 8038e90: 6812 ldr r2, [r2, #0] 8038e92: 6053 str r3, [r2, #4] (DMA_RX_FRAME_infos->Seg_Count)++; 8038e94: 6891 ldr r1, [r2, #8] 8038e96: 3101 adds r1, #1 8038e98: 6091 str r1, [r2, #8] /* first segment is last segment */ if ((DMA_RX_FRAME_infos->Seg_Count)==1) 8038e9a: 6891 ldr r1, [r2, #8] 8038e9c: 2901 cmp r1, #1 DMA_RX_FRAME_infos->FS_Rx_Desc = DMARxDescToGet; 8038e9e: bf08 it eq 8038ea0: 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; 8038ea2: 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) 8038ea4: 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; 8038ea6: f3c1 410d ubfx r1, r1, #16, #14 8038eaa: 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) 8038eac: 2c01 cmp r4, #1 { frame.buffer =(DMA_RX_FRAME_infos->FS_Rx_Desc)->Buffer1Addr; 8038eae: bf8a itet hi 8038eb0: 6812 ldrhi r2, [r2, #0] } else { frame.buffer = DMARxDescToGet->Buffer1Addr; 8038eb2: 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; 8038eb4: 6892 ldrhi r2, [r2, #8] } frame.descriptor = DMARxDescToGet; /* Update the ETHERNET DMA global Rx descriptor with next Rx descriptor */ DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); 8038eb6: 4c0b ldr r4, [pc, #44] ; (8038ee4 ) 8038eb8: 68dd ldr r5, [r3, #12] /* Return Frame */ return (frame); 8038eba: 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); 8038ebe: 6025 str r5, [r4, #0] 8038ec0: e007 b.n 8038ed2 { 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)&& 8038ec2: 6819 ldr r1, [r3, #0] 8038ec4: 2900 cmp r1, #0 8038ec6: da06 bge.n 8038ed6 8038ec8: 4a06 ldr r2, [pc, #24] ; (8038ee4 ) 8038eca: 6013 str r3, [r2, #0] /* Return Frame */ return (frame); } } return (frame); 8038ecc: 2300 movs r3, #0 8038ece: 6003 str r3, [r0, #0] 8038ed0: 6043 str r3, [r0, #4] 8038ed2: 6083 str r3, [r0, #8] 8038ed4: e003 b.n 8038ede 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)&& 8038ed8: 2904 cmp r1, #4 8038eda: d9be bls.n 8038e5a 8038edc: e7f4 b.n 8038ec8 /* Return Frame */ return (frame); } } return (frame); } 8038ede: bd3e pop {r1, r2, r3, r4, r5, pc} 8038ee0: 20011adc .word 0x20011adc 8038ee4: 2000fc6c .word 0x2000fc6c 08038ee8 : { 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) 8038ee8: 4b29 ldr r3, [pc, #164] ; (8038f90 ) 8038eea: 681b ldr r3, [r3, #0] 8038eec: 681a ldr r2, [r3, #0] 8038eee: 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) { 8038ef0: 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) 8038ef2: db48 blt.n 8038f86 return ETH_ERROR; } DMATxNextDesc = DMATxDescToSet; if (FrameLength > ETH_TX_BUF_SIZE) 8038ef4: f240 52f4 movw r2, #1524 ; 0x5f4 8038ef8: 4290 cmp r0, r2 8038efa: d917 bls.n 8038f2c { buf_count = FrameLength/ETH_TX_BUF_SIZE; 8038efc: fbb0 f4f2 udiv r4, r0, r2 if (FrameLength%ETH_TX_BUF_SIZE) buf_count++; 8038f00: fb02 0214 mls r2, r2, r4, r0 8038f04: b292 uxth r2, r2 DMATxNextDesc = DMATxDescToSet; if (FrameLength > ETH_TX_BUF_SIZE) { buf_count = FrameLength/ETH_TX_BUF_SIZE; 8038f06: b2a1 uxth r1, r4 if (FrameLength%ETH_TX_BUF_SIZE) buf_count++; 8038f08: b10a cbz r2, 8038f0e 8038f0a: 3101 adds r1, #1 8038f0c: e001 b.n 8038f12 } else buf_count =1; if (buf_count ==1) 8038f0e: 2901 cmp r1, #1 8038f10: d00c beq.n 8038f2c if (i== (buf_count-1)) { /* Setting the last segment bit */ DMATxNextDesc->Status |= ETH_DMATxDesc_LS; size = FrameLength - (buf_count-1)*ETH_TX_BUF_SIZE; 8038f12: 4d20 ldr r5, [pc, #128] ; (8038f94 ) 8038f14: f200 50f4 addw r0, r0, #1524 ; 0x5f4 8038f18: fb05 0501 mla r5, r5, r1, r0 DMATxNextDesc->ControlBufferSize = (size & ETH_DMATxDesc_TBS1); 8038f1c: 04ed lsls r5, r5, #19 8038f1e: 0ced lsrs r5, r5, #19 8038f20: 461a mov r2, r3 8038f22: 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); 8038f24: f240 56f4 movw r6, #1524 ; 0x5f4 if (i== (buf_count-1)) 8038f28: 1e4f subs r7, r1, #1 8038f2a: e00c b.n 8038f46 else buf_count =1; if (buf_count ==1) { /*set LAST and FIRST segment */ DMATxDescToSet->Status |=ETH_DMATxDesc_FS|ETH_DMATxDesc_LS; 8038f2c: 681a ldr r2, [r3, #0] /* Set frame size */ DMATxDescToSet->ControlBufferSize = (FrameLength& ETH_DMATxDesc_TBS1); 8038f2e: 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; 8038f30: f042 5240 orr.w r2, r2, #805306368 ; 0x30000000 /* Set frame size */ DMATxDescToSet->ControlBufferSize = (FrameLength& ETH_DMATxDesc_TBS1); 8038f34: 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; 8038f36: 601a str r2, [r3, #0] /* Set frame size */ DMATxDescToSet->ControlBufferSize = (FrameLength& ETH_DMATxDesc_TBS1); 8038f38: 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; 8038f3a: 681a ldr r2, [r3, #0] 8038f3c: f042 4200 orr.w r2, r2, #2147483648 ; 0x80000000 8038f40: 601a str r2, [r3, #0] DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); 8038f42: 68da ldr r2, [r3, #12] 8038f44: e014 b.n 8038f70 } else { for (i=0; i< buf_count; i++) { if (i==0) 8038f46: b918 cbnz r0, 8038f50 { /* Setting the first segment bit */ DMATxDescToSet->Status |= ETH_DMATxDesc_FS; 8038f48: 681c ldr r4, [r3, #0] 8038f4a: f044 5480 orr.w r4, r4, #268435456 ; 0x10000000 8038f4e: 601c str r4, [r3, #0] } /* Program size */ DMATxNextDesc->ControlBufferSize = (ETH_TX_BUF_SIZE & ETH_DMATxDesc_TBS1); if (i== (buf_count-1)) 8038f50: 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); 8038f52: 6056 str r6, [r2, #4] if (i== (buf_count-1)) 8038f54: d104 bne.n 8038f60 { /* Setting the last segment bit */ DMATxNextDesc->Status |= ETH_DMATxDesc_LS; 8038f56: 6814 ldr r4, [r2, #0] 8038f58: f044 5400 orr.w r4, r4, #536870912 ; 0x20000000 8038f5c: 6014 str r4, [r2, #0] size = FrameLength - (buf_count-1)*ETH_TX_BUF_SIZE; DMATxNextDesc->ControlBufferSize = (size & ETH_DMATxDesc_TBS1); 8038f5e: 6055 str r5, [r2, #4] } /*give back descriptor to DMA */ DMATxNextDesc->Status |= ETH_DMATxDesc_OWN; 8038f60: 6814 ldr r4, [r2, #0] DMATxDescToSet->Status |= ETH_DMATxDesc_OWN; DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); } else { for (i=0; i< buf_count; i++) 8038f62: 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; 8038f64: f044 4400 orr.w r4, r4, #2147483648 ; 0x80000000 8038f68: 6014 str r4, [r2, #0] DMATxDescToSet->Status |= ETH_DMATxDesc_OWN; DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); } else { for (i=0; i< buf_count; i++) 8038f6a: 4288 cmp r0, r1 } /*give back descriptor to DMA */ DMATxNextDesc->Status |= ETH_DMATxDesc_OWN; DMATxNextDesc = (ETH_DMADESCTypeDef *)(DMATxNextDesc->Buffer2NextDescAddr); 8038f6c: 68d2 ldr r2, [r2, #12] DMATxDescToSet->Status |= ETH_DMATxDesc_OWN; DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); } else { for (i=0; i< buf_count; i++) 8038f6e: d3ea bcc.n 8038f46 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 ; 8038f70: 4b07 ldr r3, [pc, #28] ; (8038f90 ) 8038f72: 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) 8038f74: 4b08 ldr r3, [pc, #32] ; (8038f98 ) 8038f76: 695a ldr r2, [r3, #20] 8038f78: 0750 lsls r0, r2, #29 8038f7a: d506 bpl.n 8038f8a { /* Clear TBUS ETHERNET DMA flag */ ETH->DMASR = ETH_DMASR_TBUS; 8038f7c: 2204 movs r2, #4 8038f7e: 615a str r2, [r3, #20] /* Resume DMA transmission*/ ETH->DMATPDR = 0; 8038f80: 2200 movs r2, #0 8038f82: 605a str r2, [r3, #4] 8038f84: e001 b.n 8038f8a /* 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; 8038f86: 2000 movs r0, #0 8038f88: bdf0 pop {r4, r5, r6, r7, pc} /* Resume DMA transmission*/ ETH->DMATPDR = 0; } /* Return SUCCESS */ return ETH_SUCCESS; 8038f8a: 2001 movs r0, #1 } 8038f8c: bdf0 pop {r4, r5, r6, r7, pc} 8038f8e: bf00 nop 8038f90: 2000fc70 .word 0x2000fc70 8038f94: fffffa0c .word 0xfffffa0c 8038f98: 40029000 .word 0x40029000 08038f9c : { uint32_t i = 0; ETH_DMADESCTypeDef *DMARxDesc; /* Set the DMARxDescToGet pointer with the first one of the DMARxDescTab list */ DMARxDescToGet = DMARxDescTab; 8038f9c: 4b11 ldr r3, [pc, #68] ; (8038fe4 ) * @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) { 8038f9e: 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; 8038fa0: 6018 str r0, [r3, #0] /* Fill each DMARxDesc descriptor with the right values */ for(i=0; i < RxBuffCount; i++) 8038fa2: 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) 8038fa4: 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; 8038fa8: 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; 8038fac: 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)) 8038fb0: 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++) 8038fb2: e00f b.n 8038fd4 /* 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); 8038fb4: 42bc cmp r4, r7 8038fb6: bf2c ite cs 8038fb8: 4684 movcs ip, r0 8038fba: 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]); 8038fbc: 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; 8038fc0: 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; 8038fc4: 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); 8038fc8: 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++) 8038fcc: 3401 adds r4, #1 8038fce: 3320 adds r3, #32 8038fd0: f201 51f4 addw r1, r1, #1524 ; 0x5f4 8038fd4: 4294 cmp r4, r2 8038fd6: d1ed bne.n 8038fb4 DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab); } } /* Set Receive Descriptor List Address Register */ ETH->DMARDLAR = (uint32_t) DMARxDescTab; 8038fd8: 4b03 ldr r3, [pc, #12] ; (8038fe8 ) DMA_RX_FRAME_infos = &RX_Frame_Descriptor; 8038fda: 4a04 ldr r2, [pc, #16] ; (8038fec ) DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab); } } /* Set Receive Descriptor List Address Register */ ETH->DMARDLAR = (uint32_t) DMARxDescTab; 8038fdc: 60d8 str r0, [r3, #12] DMA_RX_FRAME_infos = &RX_Frame_Descriptor; 8038fde: 4b04 ldr r3, [pc, #16] ; (8038ff0 ) 8038fe0: 601a str r2, [r3, #0] 8038fe2: bdf0 pop {r4, r5, r6, r7, pc} 8038fe4: 2000fc6c .word 0x2000fc6c 8038fe8: 40029000 .word 0x40029000 8038fec: 2000fc60 .word 0x2000fc60 8038ff0: 20011adc .word 0x20011adc 08038ff4 : { uint32_t i = 0; ETH_DMADESCTypeDef *DMATxDesc; /* Set the DMATxDescToSet pointer with the first one of the DMATxDescTab list */ DMATxDescToSet = DMATxDescTab; 8038ff4: 4b0e ldr r3, [pc, #56] ; (8039030 ) * @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) { 8038ff6: 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; 8038ff8: 6018 str r0, [r3, #0] /* Fill each DMATxDesc descriptor with the right values */ for(i=0; i < TxBuffCount; i++) 8038ffa: 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) 8038ffc: 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; 8039000: 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)) 8039004: 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++) 8039006: e00d b.n 8039024 /* 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); 8039008: 42b4 cmp r4, r6 803900a: bf2c ite cs 803900c: 4607 movcs r7, r0 803900e: 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]); 8039010: 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; 8039014: 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); 8039018: 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++) 803901c: 3401 adds r4, #1 803901e: 3320 adds r3, #32 8039020: f201 51f4 addw r1, r1, #1524 ; 0x5f4 8039024: 4294 cmp r4, r2 8039026: d1ef bne.n 8039008 DMATxDesc->Buffer2NextDescAddr = (uint32_t) DMATxDescTab; } } /* Set Transmit Desciptor List Address Register */ ETH->DMATDLAR = (uint32_t) DMATxDescTab; 8039028: 4b02 ldr r3, [pc, #8] ; (8039034 ) 803902a: 6118 str r0, [r3, #16] 803902c: bdf0 pop {r4, r5, r6, r7, pc} 803902e: bf00 nop 8039030: 2000fc70 .word 0x2000fc70 8039034: 40029000 .word 0x40029000 08039038 : { /* 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; 8039038: 6803 ldr r3, [r0, #0] 803903a: 4319 orrs r1, r3 803903c: 6001 str r1, [r0, #0] 803903e: 4770 bx lr 08039040 : * @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) { 8039040: 6843 ldr r3, [r0, #4] /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8039042: b111 cbz r1, 803904a { /* Enable the DMA Rx Desc receive interrupt */ DMARxDesc->ControlBufferSize &=(~(uint32_t)ETH_DMARxDesc_DIC); 8039044: f023 4300 bic.w r3, r3, #2147483648 ; 0x80000000 8039048: e001 b.n 803904e } else { /* Disable the DMA Rx Desc receive interrupt */ DMARxDesc->ControlBufferSize |= ETH_DMARxDesc_DIC; 803904a: f043 4300 orr.w r3, r3, #2147483648 ; 0x80000000 803904e: 6043 str r3, [r0, #4] 8039050: 4770 bx lr 8039052: 0000 movs r0, r0 08039054 : */ 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; 8039054: 4b02 ldr r3, [pc, #8] ; (8039060 ) 8039056: 681a ldr r2, [r3, #0] 8039058: f042 0201 orr.w r2, r2, #1 803905c: 601a str r2, [r3, #0] 803905e: 4770 bx lr 8039060: 40029000 .word 0x40029000 08039064 : * @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) 8039064: 4b02 ldr r3, [pc, #8] ; (8039070 ) 8039066: 6818 ldr r0, [r3, #0] else { bitstatus = RESET; } return bitstatus; } 8039068: f000 0001 and.w r0, r0, #1 803906c: 4770 bx lr 803906e: bf00 nop 8039070: 40029000 .word 0x40029000 08039074 : 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) 8039074: 4b03 ldr r3, [pc, #12] ; (8039084 ) 8039076: 695b ldr r3, [r3, #20] 8039078: 4218 tst r0, r3 else { bitstatus = RESET; } return bitstatus; } 803907a: bf0c ite eq 803907c: 2000 moveq r0, #0 803907e: 2001 movne r0, #1 8039080: 4770 bx lr 8039082: bf00 nop 8039084: 40029000 .word 0x40029000 08039088 : * @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) { 8039088: 4b04 ldr r3, [pc, #16] ; (803909c ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the selected ETHERNET DMA interrupts */ ETH->DMAIER |= ETH_DMA_IT; 803908a: 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) 803908c: b109 cbz r1, 8039092 { /* Enable the selected ETHERNET DMA interrupts */ ETH->DMAIER |= ETH_DMA_IT; 803908e: 4310 orrs r0, r2 8039090: e001 b.n 8039096 } else { /* Disable the selected ETHERNET DMA interrupts */ ETH->DMAIER &=(~(uint32_t)ETH_DMA_IT); 8039092: ea22 0000 bic.w r0, r2, r0 8039096: 61d8 str r0, [r3, #28] 8039098: 4770 bx lr 803909a: bf00 nop 803909c: 40029000 .word 0x40029000 080390a0 : { /* 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; 80390a0: 4b01 ldr r3, [pc, #4] ; (80390a8 ) 80390a2: 6158 str r0, [r3, #20] 80390a4: 4770 bx lr 80390a6: bf00 nop 80390a8: 40029000 .word 0x40029000 080390ac : * @retval None */ void ETH_FlushTransmitFIFO(void) { /* Set the Flush Transmit FIFO bit */ ETH->DMAOMR |= ETH_DMAOMR_FTF; 80390ac: 4b02 ldr r3, [pc, #8] ; (80390b8 ) 80390ae: 699a ldr r2, [r3, #24] 80390b0: f442 1280 orr.w r2, r2, #1048576 ; 0x100000 80390b4: 619a str r2, [r3, #24] 80390b6: 4770 bx lr 80390b8: 40029000 .word 0x40029000 080390bc : * @param NewState: new state of the DMA transmission. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_DMATransmissionCmd(FunctionalState NewState) { 80390bc: 4b04 ldr r3, [pc, #16] ; (80390d0 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the DMA transmission */ ETH->DMAOMR |= ETH_DMAOMR_ST; 80390be: 699a ldr r2, [r3, #24] void ETH_DMATransmissionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 80390c0: b110 cbz r0, 80390c8 { /* Enable the DMA transmission */ ETH->DMAOMR |= ETH_DMAOMR_ST; 80390c2: f442 5200 orr.w r2, r2, #8192 ; 0x2000 80390c6: e001 b.n 80390cc } else { /* Disable the DMA transmission */ ETH->DMAOMR &= ~ETH_DMAOMR_ST; 80390c8: f422 5200 bic.w r2, r2, #8192 ; 0x2000 80390cc: 619a str r2, [r3, #24] 80390ce: 4770 bx lr 80390d0: 40029000 .word 0x40029000 080390d4 : * @param NewState: new state of the DMA reception. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_DMAReceptionCmd(FunctionalState NewState) { 80390d4: 4b04 ldr r3, [pc, #16] ; (80390e8 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the DMA reception */ ETH->DMAOMR |= ETH_DMAOMR_SR; 80390d6: 699a ldr r2, [r3, #24] void ETH_DMAReceptionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 80390d8: b110 cbz r0, 80390e0 { /* Enable the DMA reception */ ETH->DMAOMR |= ETH_DMAOMR_SR; 80390da: f042 0202 orr.w r2, r2, #2 80390de: e001 b.n 80390e4 } else { /* Disable the DMA reception */ ETH->DMAOMR &= ~ETH_DMAOMR_SR; 80390e0: f022 0202 bic.w r2, r2, #2 80390e4: 619a str r2, [r3, #24] 80390e6: 4770 bx lr 80390e8: 40029000 .word 0x40029000 080390ec : * @brief Enables ENET MAC and DMA reception/transmission * @param None * @retval None */ void ETH_Start(void) { 80390ec: b508 push {r3, lr} /* Enable transmit state machine of the MAC for transmission on the MII */ ETH_MACTransmissionCmd(ENABLE); 80390ee: 2001 movs r0, #1 80390f0: f7ff fe7a bl 8038de8 /* Flush Transmit FIFO */ ETH_FlushTransmitFIFO(); 80390f4: f7ff ffda bl 80390ac /* Enable receive state machine of the MAC for reception from the MII */ ETH_MACReceptionCmd(ENABLE); 80390f8: 2001 movs r0, #1 80390fa: f7ff fe81 bl 8038e00 /* Start DMA transmission */ ETH_DMATransmissionCmd(ENABLE); 80390fe: 2001 movs r0, #1 8039100: f7ff ffdc bl 80390bc /* Start DMA reception */ ETH_DMAReceptionCmd(ENABLE); 8039104: 2001 movs r0, #1 } 8039106: e8bd 4008 ldmia.w sp!, {r3, lr} ETH_MACReceptionCmd(ENABLE); /* Start DMA transmission */ ETH_DMATransmissionCmd(ENABLE); /* Start DMA reception */ ETH_DMAReceptionCmd(ENABLE); 803910a: f7ff bfe3 b.w 80390d4 803910e: 0000 movs r0, r0 08039110 : * @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) { 8039110: b082 sub sp, #8 uint32_t tmpreg = 0; __IO uint32_t timeout = 0; 8039112: 2300 movs r3, #0 8039114: 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; 8039116: 4b11 ldr r3, [pc, #68] ; (803915c ) 8039118: 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 */ 803911a: 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; 803911c: 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 */ 8039120: 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 */ 8039122: ea42 4210 orr.w r2, r2, r0, lsr #16 tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */ 8039126: f401 61f8 and.w r1, r1, #1984 ; 0x7c0 tmpreg &= ~ETH_MACMIIAR_MW; /* Set the read mode */ 803912a: 430a orrs r2, r1 tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ 803912c: f042 0201 orr.w r2, r2, #1 /* Write the result value into the MII Address register */ ETH->MACMIIAR = tmpreg; 8039130: 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)); 8039132: 4a0b ldr r2, [pc, #44] ; (8039160 ) /* Write the result value into the MII Address register */ ETH->MACMIIAR = tmpreg; /* Check for the Busy flag */ do { timeout++; 8039134: 9901 ldr r1, [sp, #4] 8039136: 3101 adds r1, #1 8039138: 9101 str r1, [sp, #4] tmpreg = ETH->MACMIIAR; 803913a: 6919 ldr r1, [r3, #16] } while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_READ_TO)); 803913c: 07c9 lsls r1, r1, #31 803913e: d502 bpl.n 8039146 8039140: 9901 ldr r1, [sp, #4] 8039142: 4291 cmp r1, r2 8039144: d9f6 bls.n 8039134 /* Return ERROR in case of timeout */ if(timeout == PHY_READ_TO) 8039146: 4b07 ldr r3, [pc, #28] ; (8039164 ) 8039148: 9a01 ldr r2, [sp, #4] 803914a: 429a cmp r2, r3 { return (uint16_t)ETH_ERROR; } /* Return data register value */ return (uint16_t)(ETH->MACMIIDR); 803914c: bf1d ittte ne 803914e: 4b03 ldrne r3, [pc, #12] ; (803915c ) 8039150: 6958 ldrne r0, [r3, #20] 8039152: 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; 8039154: 2000 moveq r0, #0 } /* Return data register value */ return (uint16_t)(ETH->MACMIIDR); } 8039156: b002 add sp, #8 8039158: 4770 bx lr 803915a: bf00 nop 803915c: 40028000 .word 0x40028000 8039160: 0004fffe .word 0x0004fffe 8039164: 0004ffff .word 0x0004ffff 08039168 : * @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) { 8039168: b513 push {r0, r1, r4, lr} uint32_t tmpreg = 0; __IO uint32_t timeout = 0; 803916a: 2300 movs r3, #0 803916c: 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; 803916e: 4b0f ldr r3, [pc, #60] ; (80391ac ) 8039170: 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; 8039172: 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; 8039174: 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 */ 8039178: f044 0403 orr.w r4, r4, #3 803917c: 06c0 lsls r0, r0, #27 tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */ 803917e: 0189 lsls r1, r1, #6 8039180: ea44 4410 orr.w r4, r4, r0, lsr #16 8039184: 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 */ 8039188: 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)); 803918a: 4a09 ldr r2, [pc, #36] ; (80391b0 ) 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; 803918c: 611c str r4, [r3, #16] /* Check for the Busy flag */ do { timeout++; 803918e: 9901 ldr r1, [sp, #4] 8039190: 3101 adds r1, #1 8039192: 9101 str r1, [sp, #4] tmpreg = ETH->MACMIIAR; 8039194: 6919 ldr r1, [r3, #16] } while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_WRITE_TO)); 8039196: 07c8 lsls r0, r1, #31 8039198: d502 bpl.n 80391a0 803919a: 9901 ldr r1, [sp, #4] 803919c: 4291 cmp r1, r2 803919e: d9f6 bls.n 803918e /* Return ERROR in case of timeout */ if(timeout == PHY_WRITE_TO) 80391a0: 9801 ldr r0, [sp, #4] return ETH_ERROR; } /* Return SUCCESS */ return ETH_SUCCESS; } 80391a2: 4b04 ldr r3, [pc, #16] ; (80391b4 ) 80391a4: 1ac0 subs r0, r0, r3 80391a6: bf18 it ne 80391a8: 2001 movne r0, #1 80391aa: bd1c pop {r2, r3, r4, pc} 80391ac: 40028000 .word 0x40028000 80391b0: 0004fffe .word 0x0004fffe 80391b4: 0004ffff .word 0x0004ffff 080391b8 : * @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) { 80391b8: b5f0 push {r4, r5, r6, r7, lr} 80391ba: b087 sub sp, #28 uint32_t RegValue = 0, tmpreg = 0; __IO uint32_t i = 0; 80391bc: 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; 80391be: 4f90 ldr r7, [pc, #576] ; (8039400 ) * 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; 80391c0: 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) { 80391c2: 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; 80391c4: 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); 80391c6: 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) { 80391c8: 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; 80391ca: 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); 80391cc: f7ec fa5a bl 8025684 hclk = rcc_clocks.HCLK_Frequency; 80391d0: 9b03 ldr r3, [sp, #12] /* Set CR bits depending on hclk value */ if((hclk >= 20000000)&&(hclk < 35000000)) 80391d2: 4a8c ldr r2, [pc, #560] ; (8039404 ) 80391d4: 498c ldr r1, [pc, #560] ; (8039408 ) 80391d6: 189a adds r2, r3, r2 80391d8: 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; 80391da: 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)) 80391de: d802 bhi.n 80391e6 { /* CSR Clock Range between 20-35 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div16; 80391e0: f045 0508 orr.w r5, r5, #8 80391e4: e015 b.n 8039212 } else if((hclk >= 35000000)&&(hclk < 60000000)) 80391e6: 4a89 ldr r2, [pc, #548] ; (803940c ) 80391e8: 4989 ldr r1, [pc, #548] ; (8039410 ) 80391ea: 189a adds r2, r3, r2 80391ec: 428a cmp r2, r1 80391ee: d802 bhi.n 80391f6 { /* CSR Clock Range between 35-60 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div26; 80391f0: f045 050c orr.w r5, r5, #12 80391f4: e00d b.n 8039212 } else if((hclk >= 60000000)&&(hclk < 100000000)) 80391f6: 4a87 ldr r2, [pc, #540] ; (8039414 ) 80391f8: 4987 ldr r1, [pc, #540] ; (8039418 ) 80391fa: 189a adds r2, r3, r2 80391fc: 428a cmp r2, r1 80391fe: d908 bls.n 8039212 { /* CSR Clock Range between 60-100 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div42; } else if((hclk >= 100000000)&&(hclk < 150000000)) 8039200: 4a86 ldr r2, [pc, #536] ; (803941c ) 8039202: 189a adds r2, r3, r2 8039204: 4b86 ldr r3, [pc, #536] ; (8039420 ) 8039206: 429a cmp r2, r3 { /* CSR Clock Range between 100-150 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div62; 8039208: bf94 ite ls 803920a: 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; 803920e: f045 0510 orrhi.w r5, r5, #16 } /* Write to ETHERNET MAC MIIAR: Configure the ETHERNET CSR Clock Range */ ETH->MACMIIAR = (uint32_t)tmpreg; 8039212: 613d str r5, [r7, #16] /*-------------------- PHY initialization and configuration ----------------*/ /* Put the PHY in reset mode */ if(!(ETH_WritePHYRegister(PHYAddress, PHY_BCR, PHY_Reset))) 8039214: 4630 mov r0, r6 8039216: 2100 movs r1, #0 8039218: f44f 4200 mov.w r2, #32768 ; 0x8000 803921c: f7ff ffa4 bl 8039168 8039220: b908 cbnz r0, 8039226 { /* Return ERROR in case of write timeout */ return ETH_ERROR; 8039222: 2000 movs r0, #0 8039224: e0e9 b.n 80393fa } /* Delay to assure PHY reset */ _eth_delay_(PHY_RESET_DELAY); 8039226: 487f ldr r0, [pc, #508] ; (8039424 ) 8039228: f7ff fd6e bl 8038d08 if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) 803922c: 6821 ldr r1, [r4, #0] 803922e: 2900 cmp r1, #0 8039230: d050 beq.n 80392d4 { /* We wait for linked status... */ do { timeout++; } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 8039232: 4d7d ldr r5, [pc, #500] ; (8039428 ) if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) { /* We wait for linked status... */ do { timeout++; 8039234: 9b01 ldr r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 8039236: 4630 mov r0, r6 if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) { /* We wait for linked status... */ do { timeout++; 8039238: 3301 adds r3, #1 } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 803923a: 2101 movs r1, #1 if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) { /* We wait for linked status... */ do { timeout++; 803923c: 9301 str r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 803923e: f7ff ff67 bl 8039110 8039242: f000 0004 and.w r0, r0, #4 8039246: b280 uxth r0, r0 8039248: b910 cbnz r0, 8039250 803924a: 9b01 ldr r3, [sp, #4] 803924c: 42ab cmp r3, r5 803924e: d9f1 bls.n 8039234 /* Return ERROR in case of timeout */ if(timeout == PHY_READ_TO) 8039250: 9a01 ldr r2, [sp, #4] 8039252: 4b76 ldr r3, [pc, #472] ; (803942c ) 8039254: 429a cmp r2, r3 8039256: d0e4 beq.n 8039222 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 8039258: 2100 movs r1, #0 /* Enable Auto-Negotiation */ if(!(ETH_WritePHYRegister(PHYAddress, PHY_BCR, PHY_AutoNegotiation))) 803925a: 4630 mov r0, r6 803925c: f44f 5280 mov.w r2, #4096 ; 0x1000 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 8039260: 9101 str r1, [sp, #4] /* Enable Auto-Negotiation */ if(!(ETH_WritePHYRegister(PHYAddress, PHY_BCR, PHY_AutoNegotiation))) 8039262: f7ff ff81 bl 8039168 8039266: 2800 cmp r0, #0 8039268: d0db beq.n 8039222 /* 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)); 803926a: 4d6f ldr r5, [pc, #444] ; (8039428 ) } /* Wait until the auto-negotiation will be completed */ do { timeout++; 803926c: 9b01 ldr r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_AutoNego_Complete) && (timeout < (uint32_t)PHY_READ_TO)); 803926e: 4630 mov r0, r6 } /* Wait until the auto-negotiation will be completed */ do { timeout++; 8039270: 3301 adds r3, #1 } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_AutoNego_Complete) && (timeout < (uint32_t)PHY_READ_TO)); 8039272: 2101 movs r1, #1 } /* Wait until the auto-negotiation will be completed */ do { timeout++; 8039274: 9301 str r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_AutoNego_Complete) && (timeout < (uint32_t)PHY_READ_TO)); 8039276: f7ff ff4b bl 8039110 803927a: f000 0020 and.w r0, r0, #32 803927e: b280 uxth r0, r0 8039280: b910 cbnz r0, 8039288 8039282: 9b01 ldr r3, [sp, #4] 8039284: 42ab cmp r3, r5 8039286: d9f1 bls.n 803926c /* Return ERROR in case of timeout */ if(timeout == PHY_READ_TO) 8039288: 9a01 ldr r2, [sp, #4] 803928a: 4b68 ldr r3, [pc, #416] ; (803942c ) 803928c: 429a cmp r2, r3 803928e: d0c8 beq.n 8039222 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 8039290: 2500 movs r5, #0 /* Read the result of the auto-negotiation */ RegValue = ETH_ReadPHYRegister(PHYAddress, PHY_SR); 8039292: 211f movs r1, #31 8039294: 4630 mov r0, r6 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 8039296: 9501 str r5, [sp, #4] /* Read the result of the auto-negotiation */ RegValue = ETH_ReadPHYRegister(PHYAddress, PHY_SR); 8039298: f7ff ff3a bl 8039110 switch (RegValue & PHY_DUPLEX_SPEED_STATUS_MASK) 803929c: f000 001c and.w r0, r0, #28 80392a0: 2808 cmp r0, #8 80392a2: d00b beq.n 80392bc 80392a4: d802 bhi.n 80392ac 80392a6: 2804 cmp r0, #4 80392a8: d123 bne.n 80392f2 80392aa: e010 b.n 80392ce 80392ac: 280e cmp r0, #14 80392ae: d00a beq.n 80392c6 80392b0: 2812 cmp r0, #18 80392b2: d11e bne.n 80392f2 { case PHY_100BTX_FULL: ETH_InitStruct->ETH_Mode = ETH_Mode_FullDuplex; 80392b4: f44f 6300 mov.w r3, #2048 ; 0x800 80392b8: 6223 str r3, [r4, #32] 80392ba: e000 b.n 80392be ETH_InitStruct->ETH_Speed = ETH_Speed_100M; break; case PHY_100BTX_HALF: ETH_InitStruct->ETH_Mode = ETH_Mode_HalfDuplex; 80392bc: 6225 str r5, [r4, #32] ETH_InitStruct->ETH_Speed = ETH_Speed_100M; 80392be: f44f 4380 mov.w r3, #16384 ; 0x4000 80392c2: 6163 str r3, [r4, #20] break; 80392c4: e015 b.n 80392f2 case PHY_10M_FULL: ETH_InitStruct->ETH_Mode = ETH_Mode_FullDuplex; 80392c6: f44f 6300 mov.w r3, #2048 ; 0x800 80392ca: 6223 str r3, [r4, #32] 80392cc: e000 b.n 80392d0 ETH_InitStruct->ETH_Speed = ETH_Speed_10M; break; case PHY_10M_HALF: ETH_InitStruct->ETH_Mode = ETH_Mode_HalfDuplex; 80392ce: 6225 str r5, [r4, #32] ETH_InitStruct->ETH_Speed = ETH_Speed_10M; 80392d0: 6165 str r5, [r4, #20] break; 80392d2: e00e b.n 80392f2 break; } } else { if(!ETH_WritePHYRegister(PHYAddress, PHY_BCR, ((uint16_t)(ETH_InitStruct->ETH_Mode >> 3) | 80392d4: 6a22 ldr r2, [r4, #32] (uint16_t)(ETH_InitStruct->ETH_Speed >> 1)))) 80392d6: 6963 ldr r3, [r4, #20] break; } } else { if(!ETH_WritePHYRegister(PHYAddress, PHY_BCR, ((uint16_t)(ETH_InitStruct->ETH_Mode >> 3) | 80392d8: 08d2 lsrs r2, r2, #3 80392da: ea42 0253 orr.w r2, r2, r3, lsr #1 80392de: 4630 mov r0, r6 80392e0: b292 uxth r2, r2 80392e2: f7ff ff41 bl 8039168 80392e6: 2800 cmp r0, #0 80392e8: d09b beq.n 8039222 { /* Return ERROR in case of write timeout */ return ETH_ERROR; } /* Delay to assure PHY configuration */ _eth_delay_(PHY_CONFIG_DELAY); 80392ea: f06f 407f mvn.w r0, #4278190080 ; 0xff000000 80392ee: f7ff fd0b bl 8038d08 } /*------------------------ ETHERNET MACCR Configuration --------------------*/ /* Get the ETHERNET MACCR value */ tmpreg = ETH->MACCR; 80392f2: 4b43 ldr r3, [pc, #268] ; (8039400 ) /* Clear WD, PCE, PS, TE and RE bits */ tmpreg &= MACCR_CLEAR_MASK; 80392f4: 4a4e ldr r2, [pc, #312] ; (8039430 ) _eth_delay_(PHY_CONFIG_DELAY); } /*------------------------ ETHERNET MACCR Configuration --------------------*/ /* Get the ETHERNET MACCR value */ tmpreg = ETH->MACCR; 80392f6: 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 | 80392f8: 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; 80392fa: 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 | 80392fc: 6861 ldr r1, [r4, #4] 80392fe: 4308 orrs r0, r1 ETH_InitStruct->ETH_Jabber | 8039300: 68e1 ldr r1, [r4, #12] 8039302: 4308 orrs r0, r1 ETH_InitStruct->ETH_InterFrameGap | 8039304: 6921 ldr r1, [r4, #16] 8039306: 4308 orrs r0, r1 ETH_InitStruct->ETH_CarrierSense | 8039308: 6961 ldr r1, [r4, #20] 803930a: 4308 orrs r0, r1 ETH_InitStruct->ETH_Speed | 803930c: 69a1 ldr r1, [r4, #24] 803930e: 4308 orrs r0, r1 ETH_InitStruct->ETH_ReceiveOwn | 8039310: 69e1 ldr r1, [r4, #28] 8039312: 4308 orrs r0, r1 ETH_InitStruct->ETH_LoopbackMode | 8039314: 6a21 ldr r1, [r4, #32] 8039316: 4308 orrs r0, r1 ETH_InitStruct->ETH_Mode | 8039318: 6a61 ldr r1, [r4, #36] ; 0x24 803931a: 4308 orrs r0, r1 ETH_InitStruct->ETH_ChecksumOffload | 803931c: 6aa1 ldr r1, [r4, #40] ; 0x28 803931e: 4308 orrs r0, r1 ETH_InitStruct->ETH_RetryTransmission | 8039320: 6ae1 ldr r1, [r4, #44] ; 0x2c 8039322: 4308 orrs r0, r1 ETH_InitStruct->ETH_AutomaticPadCRCStrip | 8039324: 6b21 ldr r1, [r4, #48] ; 0x30 8039326: 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 | 8039328: 6b61 ldr r1, [r4, #52] ; 0x34 803932a: 4301 orrs r1, r0 803932c: 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; 803932e: 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 | 8039330: 6ba2 ldr r2, [r4, #56] ; 0x38 8039332: 6be1 ldr r1, [r4, #60] ; 0x3c 8039334: 4311 orrs r1, r2 ETH_InitStruct->ETH_SourceAddrFilter | 8039336: 6c22 ldr r2, [r4, #64] ; 0x40 8039338: 4311 orrs r1, r2 ETH_InitStruct->ETH_PassControlFrames | 803933a: 6c62 ldr r2, [r4, #68] ; 0x44 803933c: 4311 orrs r1, r2 ETH_InitStruct->ETH_BroadcastFramesReception | 803933e: 6ca2 ldr r2, [r4, #72] ; 0x48 8039340: 4311 orrs r1, r2 ETH_InitStruct->ETH_DestinationAddrFilter | 8039342: 6ce2 ldr r2, [r4, #76] ; 0x4c 8039344: 4311 orrs r1, r2 ETH_InitStruct->ETH_PromiscuousMode | 8039346: 6d22 ldr r2, [r4, #80] ; 0x50 8039348: 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 | 803934a: 6d62 ldr r2, [r4, #84] ; 0x54 803934c: 430a orrs r2, r1 803934e: 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; 8039350: 6da2 ldr r2, [r4, #88] ; 0x58 8039352: 609a str r2, [r3, #8] /* Write to ETHERNET MACHTLR */ ETH->MACHTLR = (uint32_t)ETH_InitStruct->ETH_HashTableLow; 8039354: 6de2 ldr r2, [r4, #92] ; 0x5c 8039356: 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) | 8039358: 6e62 ldr r2, [r4, #100] ; 0x64 803935a: 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; 803935c: 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) | 803935e: 4311 orrs r1, r2 ETH_InitStruct->ETH_ZeroQuantaPause | 8039360: 6ee2 ldr r2, [r4, #108] ; 0x6c 8039362: 4311 orrs r1, r2 ETH_InitStruct->ETH_PauseLowThreshold | 8039364: 6f22 ldr r2, [r4, #112] ; 0x70 8039366: 4311 orrs r1, r2 ETH_InitStruct->ETH_UnicastPauseFrameDetect | 8039368: 6f62 ldr r2, [r4, #116] ; 0x74 803936a: 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; 803936c: f64f 7241 movw r2, #65345 ; 0xff41 8039370: 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) | 8039372: 430a orrs r2, r1 8039374: 6e21 ldr r1, [r4, #96] ; 0x60 8039376: 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; 803937a: 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 | 803937c: 6fe1 ldr r1, [r4, #124] ; 0x7c 803937e: 6fa2 ldr r2, [r4, #120] ; 0x78 8039380: 430a orrs r2, r1 8039382: 61da str r2, [r3, #28] ETH_InitStruct->ETH_VLANTagIdentifier); /*-------------------------------- DMA Config ------------------------------*/ /*----------------------- ETHERNET DMAOMR Configuration --------------------*/ /* Get the ETHERNET DMAOMR value */ tmpreg = ETH->DMAOMR; 8039384: f503 5380 add.w r3, r3, #4096 ; 0x1000 /* Clear xx bits */ tmpreg &= DMAOMR_CLEAR_MASK; 8039388: 4a2a ldr r2, [pc, #168] ; (8039434 ) ETH_InitStruct->ETH_VLANTagIdentifier); /*-------------------------------- DMA Config ------------------------------*/ /*----------------------- ETHERNET DMAOMR Configuration --------------------*/ /* Get the ETHERNET DMAOMR value */ tmpreg = ETH->DMAOMR; 803938a: 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 | 803938c: 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; 8039390: 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 | 8039392: f8d4 1080 ldr.w r1, [r4, #128] ; 0x80 8039396: 4308 orrs r0, r1 ETH_InitStruct->ETH_ReceiveStoreForward | 8039398: f8d4 1088 ldr.w r1, [r4, #136] ; 0x88 803939c: 4308 orrs r0, r1 ETH_InitStruct->ETH_FlushReceivedFrame | 803939e: f8d4 108c ldr.w r1, [r4, #140] ; 0x8c 80393a2: 4308 orrs r0, r1 ETH_InitStruct->ETH_TransmitStoreForward | 80393a4: f8d4 1090 ldr.w r1, [r4, #144] ; 0x90 80393a8: 4308 orrs r0, r1 ETH_InitStruct->ETH_TransmitThresholdControl | 80393aa: f8d4 1094 ldr.w r1, [r4, #148] ; 0x94 80393ae: 4308 orrs r0, r1 ETH_InitStruct->ETH_ForwardErrorFrames | 80393b0: f8d4 1098 ldr.w r1, [r4, #152] ; 0x98 80393b4: 4308 orrs r0, r1 ETH_InitStruct->ETH_ForwardUndersizedGoodFrames | 80393b6: f8d4 109c ldr.w r1, [r4, #156] ; 0x9c 80393ba: 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 | 80393bc: f8d4 10a0 ldr.w r1, [r4, #160] ; 0xa0 80393c0: 4301 orrs r1, r0 80393c2: 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; 80393c4: 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 | 80393c6: f8d4 20a8 ldr.w r2, [r4, #168] ; 0xa8 80393ca: f8d4 10a4 ldr.w r1, [r4, #164] ; 0xa4 80393ce: 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 */ 80393d0: 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 | 80393d4: 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 */ 80393d8: 4311 orrs r1, r2 ETH_InitStruct->ETH_TxDMABurstLength | 80393da: f8d4 20b0 ldr.w r2, [r4, #176] ; 0xb0 80393de: 4311 orrs r1, r2 (ETH_InitStruct->ETH_DescriptorSkipLength << 2) | 80393e0: f8d4 20b8 ldr.w r2, [r4, #184] ; 0xb8 80393e4: 430a orrs r2, r1 80393e6: 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 | 80393ea: ea42 0281 orr.w r2, r2, r1, lsl #2 80393ee: 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; 80393f0: 681a ldr r2, [r3, #0] 80393f2: f042 0280 orr.w r2, r2, #128 ; 0x80 80393f6: 601a str r2, [r3, #0] #endif /* USE_ENHANCED_DMA_DESCRIPTORS */ /* Return Ethernet configuration success */ return ETH_SUCCESS; 80393f8: 2001 movs r0, #1 } 80393fa: b007 add sp, #28 80393fc: bdf0 pop {r4, r5, r6, r7, pc} 80393fe: bf00 nop 8039400: 40028000 .word 0x40028000 8039404: feced300 .word 0xfeced300 8039408: 00e4e1bf .word 0x00e4e1bf 803940c: fde9f140 .word 0xfde9f140 8039410: 017d783f .word 0x017d783f 8039414: fc6c7900 .word 0xfc6c7900 8039418: 026259ff .word 0x026259ff 803941c: fa0a1f00 .word 0xfa0a1f00 8039420: 02faf07f .word 0x02faf07f 8039424: 000fffff .word 0x000fffff 8039428: 0004fffe .word 0x0004fffe 803942c: 0004ffff .word 0x0004ffff 8039430: ff20810f .word 0xff20810f 8039434: f8de3f23 .word 0xf8de3f23 08039438 <_sbrk>: extern char _ebss; // Defined by the linker extern char __bss_end__; static char *heap_end; char *prev_heap_end; if (heap_end == 0) { 8039438: 4b0a ldr r3, [pc, #40] ; (8039464 <_sbrk+0x2c>) 803943a: 681a ldr r2, [r3, #0] 803943c: b90a cbnz r2, 8039442 <_sbrk+0xa> //heap_end = &_ebss; heap_end = &__bss_end__; 803943e: 4a0a ldr r2, [pc, #40] ; (8039468 <_sbrk+0x30>) 8039440: 601a str r2, [r3, #0] } prev_heap_end = heap_end; 8039442: 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) ); 8039444: f3ef 8208 mrs r2, MSP char * stack = (char*) __get_MSP(); if (heap_end + incr > stack) 8039448: 1818 adds r0, r3, r0 803944a: 4290 cmp r0, r2 803944c: d905 bls.n 803945a <_sbrk+0x22> { _write (STDERR_FILENO, "Heap and stack collision\n", 25); errno = ENOMEM; 803944e: 4b07 ldr r3, [pc, #28] ; (803946c <_sbrk+0x34>) 8039450: 220c movs r2, #12 8039452: 601a str r2, [r3, #0] return (caddr_t) -1; 8039454: f04f 33ff mov.w r3, #4294967295 8039458: e001 b.n 803945e <_sbrk+0x26> //abort (); } heap_end += incr; 803945a: 4a02 ldr r2, [pc, #8] ; (8039464 <_sbrk+0x2c>) 803945c: 6010 str r0, [r2, #0] return (caddr_t) prev_heap_end; } 803945e: 4618 mov r0, r3 8039460: 4770 bx lr 8039462: bf00 nop 8039464: 2000c804 .word 0x2000c804 8039468: 20013a48 .word 0x20013a48 803946c: 20013944 .word 0x20013944 08039470 : .weak Reset_Handler .type Reset_Handler, %function Reset_Handler: /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 8039470: 2100 movs r1, #0 b LoopCopyDataInit 8039472: f000 b804 b.w 803947e 08039476 : CopyDataInit: ldr r3, =_sidata 8039476: 4b0d ldr r3, [pc, #52] ; (80394ac ) ldr r3, [r3, r1] 8039478: 585b ldr r3, [r3, r1] str r3, [r0, r1] 803947a: 5043 str r3, [r0, r1] adds r1, r1, #4 803947c: 3104 adds r1, #4 0803947e : LoopCopyDataInit: ldr r0, =_sdata 803947e: 480c ldr r0, [pc, #48] ; (80394b0 ) ldr r3, =_edata 8039480: 4b0c ldr r3, [pc, #48] ; (80394b4 ) adds r2, r0, r1 8039482: 1842 adds r2, r0, r1 cmp r2, r3 8039484: 429a cmp r2, r3 bcc CopyDataInit 8039486: f4ff aff6 bcc.w 8039476 ldr r2, =_sbss 803948a: 4a0b ldr r2, [pc, #44] ; (80394b8 ) b LoopFillZerobss 803948c: f000 b803 b.w 8039496 08039490 : /* Zero fill the bss segment. */ FillZerobss: movs r3, #0 8039490: 2300 movs r3, #0 str r3, [r2], #4 8039492: f842 3b04 str.w r3, [r2], #4 08039496 : LoopFillZerobss: ldr r3, = _ebss 8039496: 4b09 ldr r3, [pc, #36] ; (80394bc ) cmp r2, r3 8039498: 429a cmp r2, r3 bcc FillZerobss 803949a: f4ff aff9 bcc.w 8039490 /* Call the clock system intitialization function.*/ bl SystemInit 803949e: f7ec fc71 bl 8025d84 /* Call static constructors */ bl __libc_init_array 80394a2: f7e8 fa15 bl 80218d0 <__libc_init_array> /* Call the application's entry point.*/ bl main 80394a6: f7ed fd4f bl 8026f48
bx lr 80394aa: 4770 bx lr /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 b LoopCopyDataInit CopyDataInit: ldr r3, =_sidata 80394ac: 08045a40 .word 0x08045a40 ldr r3, [r3, r1] str r3, [r0, r1] adds r1, r1, #4 LoopCopyDataInit: ldr r0, =_sdata 80394b0: 20000000 .word 0x20000000 ldr r3, =_edata 80394b4: 20000aac .word 0x20000aac adds r2, r0, r1 cmp r2, r3 bcc CopyDataInit ldr r2, =_sbss 80394b8: 20000aac .word 0x20000aac FillZerobss: movs r3, #0 str r3, [r2], #4 LoopFillZerobss: ldr r3, = _ebss 80394bc: 20013a48 .word 0x20013a48 080394c0 : * @retval None */ .section .text.Default_Handler,"ax",%progbits Default_Handler: Infinite_Loop: b Infinite_Loop 80394c0: f7ff bffe b.w 80394c0 080394c4 <_ctype_>: 80394c4: 2000 2020 2020 2020 2020 2828 2828 2028 . ((((( 80394d4: 2020 2020 2020 2020 2020 2020 2020 2020 80394e4: 8820 1010 1010 1010 1010 1010 1010 1010 ............... 80394f4: 0410 0404 0404 0404 0404 1004 1010 1010 ................ 8039504: 1010 4141 4141 4141 0101 0101 0101 0101 ..AAAAAA........ 8039514: 0101 0101 0101 0101 0101 0101 1010 1010 ................ 8039524: 1010 4242 4242 4242 0202 0202 0202 0202 ..BBBBBB........ 8039534: 0202 0202 0202 0202 0202 0202 1010 1010 ................ 8039544: 0020 0000 0000 0000 0000 0000 0000 0000 ............... 8039554: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8039564: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8039574: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8039584: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8039594: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80395a4: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80395b4: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80395c4: 0000 0000 .... 080395c8 : 80395c8: 89bc 97d8 d2b2 3c9c a733 d5a8 f623 3949 .......<3...#.I9 80395d8: a73d 44f4 0ffd 32a5 979d cf8c ba08 255b =..D...2......[% 80395e8: 6f43 64ac 0628 0e18 Co.d(... 080395f0 : 80395f0: 0005 0000 0019 0000 007d 0000 0000 0000 ........}....... 08039600 <__mprec_tens>: 8039600: 0000 0000 0000 3ff0 0000 0000 0000 4024 .......?......$@ 8039610: 0000 0000 0000 4059 0000 0000 4000 408f ......Y@.....@.@ 8039620: 0000 0000 8800 40c3 0000 0000 6a00 40f8 .......@.....j.@ 8039630: 0000 0000 8480 412e 0000 0000 12d0 4163 .......A......cA 8039640: 0000 0000 d784 4197 0000 0000 cd65 41cd .......A....e..A 8039650: 0000 2000 a05f 4202 0000 e800 4876 4237 ... _..B....vH7B 8039660: 0000 a200 1a94 426d 0000 e540 309c 42a2 ......mB..@..0.B 8039670: 0000 1e90 bcc4 42d6 0000 2634 6bf5 430c .......B..4&.k.C 8039680: 8000 37e0 c379 4341 a000 85d8 3457 4376 ...7y.AC....W4vC 8039690: c800 674e c16d 43ab 3d00 6091 58e4 43e1 ..Ngm..C.=.`.X.C 80396a0: 8c40 78b5 af1d 4415 ef50 d6e2 1ae4 444b @..x...DP.....KD 80396b0: d592 064d f0cf 4480 4af6 c7e1 2d02 44b5 ..M....D.J...-.D 80396c0: 9db4 79d9 7843 44ea ...yCx.D 080396c8 <__mprec_tinytens>: 80396c8: 89bc 97d8 d2b2 3c9c a733 d5a8 f623 3949 .......<3...#.I9 80396d8: a73d 44f4 0ffd 32a5 979d cf8c ba08 255b =..D...2......[% 80396e8: 6f43 64ac 0628 0ac8 Co.d(... 080396f0 <__mprec_bigtens>: 80396f0: 8000 37e0 c379 4341 6e17 b505 b8b5 4693 ...7y.AC.n.....F 8039700: f9f5 e93f 4f03 4d38 1d32 f930 7748 5a82 ..?..O8M2.0.Hw.Z 8039710: bf3c 7f73 4fdd 7515 3025 5832 4c00 4445 <.s..O.u%02X.LED 8039720: 425f 696c 6b6e 4200 7475 6f74 736e 5500 _Blink.Buttons.U 8039730: 5350 4d5f 6e6f 7469 726f 7300 6d6e 5370 PS_Monitor.snmpS 8039740: 7379 7055 6954 656d 7300 6d6e 5470 6172 ysUpTime.snmpTra 8039750: 5470 7365 0074 6e73 7074 6e4f 6563 6953 pTest.sntpOnceSi 8039760: 686e 6f72 7300 746e 5070 7265 6f69 6964 nhro.sntpPeriodi 8039770: 5363 6e69 7268 006f 6e49 7469 6154 6b73 cSinhro.InitTask 8039780: 4800 7261 4664 7561 746c 0a3a 000d 0d0a .HardFault:..... 8039790: 6552 6967 7473 7265 3a73 0d0a 5300 2050 Registers:...SP 80397a0: 2020 2020 2020 2020 3020 2578 3830 786c 0x%08lx 80397b0: 0d0a 5200 2030 2020 2020 2020 2020 3020 ...R0 0 80397c0: 2578 3830 786c 0d0a 5200 2031 2020 2020 x%08lx...R1 80397d0: 2020 2020 3020 2578 3830 786c 0d0a 5200 0x%08lx...R 80397e0: 2032 2020 2020 2020 2020 3020 2578 3830 2 0x%08 80397f0: 786c 0d0a 5200 2033 2020 2020 2020 2020 lx...R3 8039800: 3020 2578 3830 786c 0d0a 5200 3231 2020 0x%08lx...R12 8039810: 2020 2020 2020 3020 2578 3830 786c 0d0a 0x%08lx.. 8039820: 4c00 2052 2020 2020 2020 2020 3020 2578 .LR 0x% 8039830: 3830 786c 0d0a 5000 2043 2020 2020 2020 08lx...PC 8039840: 2020 3020 2578 3830 786c 0d0a 5000 5253 0x%08lx...PSR 8039850: 2020 2020 2020 2020 3020 2578 3830 786c 0x%08lx 8039860: 0d0a 2500 2e30 6631 2500 0064 3025 6934 ...%0.1f.%d.%04i 8039870: 252d 3230 2d69 3025 6932 2500 0073 6425 -%02i-%02i.%s.%d 8039880: d020 d0b4 2ebd 2520 2064 87d1 202e 6425 ..... %d ... %d 8039890: d020 d0bc d0b8 2ebd 3100 302e 4600 6c61 ........1.0.Fal 80398a0: 6573 7400 7572 0065 6166 736c 0065 6e6f se.true.false.on 80398b0: 2d00 3130 252d 3230 3a69 3025 6932 2500 .-01-%02i:%02i.% 80398c0: 3230 2d69 3025 6932 252d 3230 2d69 3130 02i-%02i-%02i-01 80398d0: 002d 3931 2e32 3631 2e38 2e31 0032 3931 -.192.168.1.2.19 80398e0: 2e32 3631 2e38 2e31 0031 3532 2e35 3532 2.168.1.1.255.25 80398f0: 2e35 3532 2e35 0030 7570 6c62 6369 4200 5.255.0.public.B 8039900: 2d54 3736 3230 3000 302e 302e 302e 3000 T-6702.0.0.0.0.0 8039910: 2e39 3031 322e 3130 0035 4345 342d 2d43 9.10.2015.EC-4C- 8039920: 4434 302d 2d30 3030 302d 0041 4e4b 302d 4D-00-00-0A.KN-0 8039930: 2d33 3030 3030 0033 6461 696d 006e 3231 3-00003.admin.12 8039940: 3433 0035 7375 7265 3100 3332 0034 3838 345.user.1234.88 8039950: 312e 3734 322e 3435 322e 3533 6e00 6e6f .147.254.235.non 8039960: 0065 3231 2e37 2e30 2e30 0031 a3d0 81d1 e.127.0.0.1..... 8039970: bfd0 b5d0 88d1 bdd0 bed0 5400 4f32 004b ...........T2OK. 8039980: 90d0 b4d0 bcd0 b8d0 bdd0 b8d0 81d1 82d1 ................ 8039990: 80d1 b0d0 82d1 bed0 80d1 2500 2e73 6425 ...........%s.%d 80399a0: 7325 6425 000d 0020 5452 504d 4920 0049 %s%d.. .RTMP II. 80399b0: 4341 004b 434e 004b 6572 7571 7365 5f74 ACK.NCK.request_ 80399c0: 6174 6b73 5100 0d31 5400 0d4c 5400 5100 task.Q1..TL..T.Q 80399d0: 000d 0053 0052 0d43 4300 0d54 4900 000d ..S.R.C..CT..I.. 80399e0: 0d46 d000 d090 d0b2 d1b0 d080 d1b8 008f F............... 80399f0: 9dd0 bed0 80d1 bcd0 b0d0 d000 d097 d0b0 ................ 8039a00: d0bc d0ba d1bd d183 d082 00be a0d0 b0d0 ................ 8039a10: b7d0 bed0 bcd0 bad0 bdd0 83d1 82d1 bed0 ................ 8039a20: 6c00 676f 745f 7361 006b 3025 6932 252e .log_task.%02i.% 8039a30: 3230 2e69 3025 6932 2520 3230 3a69 3025 02i.%02i %02i:%0 8039a40: 6932 253a 3230 0069 2c22 d000 d09f d1b5 2i:%02i.",...... 8039a50: d080 d0b5 d0b7 d0b0 d1b3 d180 d083 d0b7 ................ 8039a60: d0ba 20b0 bad0 bed0 bdd0 82d1 80d1 bed0 ... ............ 8039a70: bbd0 bbd0 b5d0 80d1 b0d0 d000 d0a1 d1b1 ................ 8039a80: d080 d1be 2081 bdd0 b0d0 81d1 82d1 80d1 ..... .......... 8039a90: bed0 b5d0 bad0 d000 d09e d0b1 d0bd d0be ................ 8039aa0: d0b2 d0bb d0b5 d0bd d0b8 20b5 9fd0 9ed0 ........... .... 8039ab0: d000 d0a1 d0bc d0b5 d0bd 20b0 bfd0 b0d0 ........... .... 8039ac0: 80d1 bed0 bbd0 8fd1 d000 d090 d1b2 d082 ................ 8039ad0: d1be d080 d0b8 d0b7 d1b0 d086 d1b8 008f ................ 8039ae0: a2d0 b5d0 81d1 82d1 d020 d098 d091 009f ........ ....... 8039af0: 92d0 8bd1 bad0 bbd0 8ed1 87d1 b5d0 bdd0 ................ 8039b00: b8d0 b5d0 d020 d098 d091 009f 90d0 b2d0 .... ........... 8039b10: b0d0 80d1 b8d0 8fd1 d020 d0b4 d1b8 d081 ........ ....... 8039b20: d1ba 2e80 d020 d1b2 d085 d0be d0b4 20b0 .... .......... 8039b30: 0031 a1d0 bed0 81d1 82d1 bed0 8fd1 bdd0 1............... 8039b40: b8d0 b5d0 d020 d1b2 d18b d085 d0be d0b4 .... ........... 8039b50: 20b0 0031 a1d0 bed0 81d1 82d1 bed0 8fd1 . 1............. 8039b60: bdd0 b8d0 b5d0 d020 d1b2 d18b d085 d0be ...... ......... 8039b70: d0b4 20b0 0032 90d0 b2d0 b0d0 80d1 b8d0 ... 2........... 8039b80: 8fd1 d120 d082 d0b5 d0bc d0bf d1b5 d080 .. ............. 8039b90: d1b0 d182 d183 d180 008b 90d0 b2d0 b0d0 ................ 8039ba0: 80d1 b8d0 8fd1 d020 d1b2 2e85 d020 d0bd ...... ..... ... 8039bb0: d0b0 d1bf d180 d08f d0b6 d0b5 d0bd d1b8 ................ 8039bc0: 008f 9dd0 b8d0 b7d0 bad0 b8d0 b9d0 d020 .............. . 8039bd0: d0b7 d1b0 d180 d08f 20b4 90d0 9ad0 91d0 ......... ...... 8039be0: d000 d090 d0b2 d1b0 d080 d1b8 208f bdd0 ............. .. 8039bf0: b0d0 b3d0 80d1 83d1 b7d0 bad0 b8d0 d000 ................ 8039c00: d090 d0b2 d1b0 d080 d1b8 208f 81d1 b2d0 ........... .... 8039c10: 8fd1 b7d0 b8d0 d120 2081 98d0 91d0 9fd0 ...... .. ...... 8039c20: d000 d090 d0b2 d1b0 d080 d1b8 208f bed0 ............. .. 8039c30: 82d1 bad0 bbd0 8ed1 87d1 b5d0 bdd0 b8d0 ................ 8039c40: 8fd1 d020 d090 d09a 0091 6972 676e 7366 .. .......ringfs 8039c50: 615f 7070 6e65 3a64 6320 726f 7572 7470 _append: corrupt 8039c60: 6465 6620 6c69 7365 7379 6574 0d6d 000a ed filesystem... 8039c70: 4449 454c 0900 6325 2509 0975 7525 2509 IDLE..%c.%u.%u.% 8039c80: 0d75 000a 6d54 2072 7653 0063 u...Tmr Svc. 08039c8c : 8039c8c: 722f 746f 6b65 702e 676e 0000 5448 5054 /rotek.png..HTTP 8039c9c: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 8039cac: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 8039cbc: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 8039ccc: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 8039cdc: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 8039cec: 6e65 2d74 654c 676e 6874 203a 3935 3935 ent-Length: 5959 8039cfc: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 8039d0c: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 8039d1c: 3a65 6920 616d 6567 702f 676e 0a0d 6143 e: image/png..Ca 8039d2c: 6863 2d65 6f43 746e 6f72 3a6c 7020 6972 che-Control: pri 8039d3c: 6176 6574 202c 616d 2d78 6761 3d65 3638 vate, max-age=86 8039d4c: 3034 0d30 0d0a 890a 4e50 0d47 1a0a 000a 400.....PNG..... 8039d5c: 0000 490d 4448 0052 0100 0057 0000 08ae ...IHDR...W..... 8039d6c: 0006 0000 db82 7d4e 0000 0e17 4449 5441 ......N}....IDAT 8039d7c: da78 9ded ac7d 672c c059 a1cf 7a80 3285 x...}.,gY....z.2 8039d8c: 4b45 1014 4db6 a62d ae0a b68a 52d8 45c7 EK...M-......R.E 8039d9c: 4131 1b2d 1045 0b7a 7a53 bc69 6060 634d 1A-.E.z.Szi.``Mc 8039dac: d894 c326 6c55 d2ac c6c5 285e 2c91 951f ..&.Ul....^(.,.. 8039dbc: 4a92 885d 4ad5 dd02 6a3f 9352 1ba2 36ac .J]..J..?jR....6 8039dcc: a246 011b 6d69 e76b 72d2 71fb 7729 df7d F...imk..r.q)w}. 8039ddc: 7793 9c75 cece 9fbc b333 7e7b fc7f 6f72 .wu.....3.{~..ro 8039dec: 39ce fb3b bf39 e67d 9e79 79f7 9677 e5cb .9;.9.}.y..yw... 8039dfc: 000e f800 1785 0001 b900 0002 5720 0000 ............ W.. 8039e0c: 0ae4 0000 15c8 0000 02b9 2000 0057 4000 ........... W..@ 8039e1c: 00ae c800 0015 b900 0002 7200 0005 ae40 ...........r..@. 8039e2c: 0000 15c8 0000 2b90 0000 0572 4000 00ae .......+..r..@.. 8039e3c: 8000 015c 9000 002b 7200 0005 e400 000a ..\...+..r...... 8039e4c: 5c80 0001 2b90 0000 5720 0000 0ae4 8000 .\...+.. W...... 8039e5c: 015c 0000 02b9 2000 0057 e400 000a c800 \...... W....... 8039e6c: 0015 b900 0002 5720 0000 eae4 c19f 5f6b ...... W......k_ 8039e7c: 96b7 8fdd bede 440d 3882 9a47 ff23 def3 .......D.8G.#... 8039e8c: 3c96 d6df ed38 377d 7e56 009e c824 3375 .<..8.}7V~..$.u3 8039e9c: dae5 8c17 1304 5cc1 b4b0 de40 aa6e 138e .......\..@.n... 8039eac: 4d23 0ae4 75c8 ca3f 4655 89a5 6192 2966 #M...u?.UF...af) 8039ebc: 3ad3 7532 44fc 1fdd 4522 80ae b75c ae56 .:2u.D.."E..\.V. 8039ecc: 8ab1 974e 202d 3b45 a644 15c8 eb90 c936 ..N.- E;D.....6. 8039edc: 4655 8b8f a496 645a 3441 5c8b b901 ba6e UF....ZdA4.\..n. 8039eec: bb5c d524 b4b2 08c1 22b9 4057 9bae d724 \.$......"W@..$. 8039efc: a1d8 5530 2cc5 2450 231b e457 c801 cbb5 ..0U.,P$.#W..... 8039f0c: 9572 da97 0763 cdd1 edd5 1557 48ff 5db3 r...c.....W..H.] 8039f1c: 512b 9bb7 e63b 2364 0ae4 5c80 26bb bed7 +Q..;.d#...\.&.. 8039f2c: 0a45 5320 ae05 47a1 45b1 78ea 8b13 844e E. S...G.E.x..N. 8039f3c: 3f6c bd16 2b90 d720 caee 6475 7971 54df l?...+ ...udqy.T 8039f4c: 2951 48b1 8c27 2b91 7200 5b6d 13ae a943 Q).H'..+.rm[..C. 8039f5c: 95b6 ecdf 3c59 08d6 02b9 d720 e5a6 191a ....Y<.... ..... 8039f6c: 38e4 1d67 1a2a 0cf5 d922 7ef9 2c10 0572 .8g.*..."..~.,r. 8039f7c: dae4 b91d 8aea b5d5 a9dd 9857 1023 9c7b ..........W.#.{. 8039f8c: 302b ccd4 cec9 7db7 017e 0572 dae4 b90d +0.....}~.r..... 8039f9c: 8aea 6675 a521 caa1 ce77 722c 63b8 c28b ..uf!...w.,r.c.. 8039fac: a458 04ba 75f6 8b04 015c b6b9 572f b15d X....u..\.../W]. 8039fbc: 86a6 9d42 faee ea5f 189a bd16 adf6 9160 ..B..._.......`. 8039fcc: 202b 4d57 06b9 ec14 53d4 532b d2a4 a105 + WM.....S+S.... 8039fdc: 6f57 4a65 3af4 ec52 a46b e609 15c8 2b90 WoeJ.:R.k......+ 8039fec: f572 58cd 6443 8efd 892e 34cd 69a3 c11d r..XCd.....4.i.. 8039ffc: 904e 202b e457 8bea 07a1 f6b1 2d03 f55f N.+ W........-_. 803a00c: d4bd 4755 09b0 0572 8ae4 7d5c 59e4 4733 ..UG..r...\}.Y3G 803a01c: 8eb1 bb76 b435 7525 6c14 4db6 041d 15c8 ..v.5.%u.l.M.... 803a02c: ab90 5c81 0a3d 2eb6 1acf 88d7 6279 9059 ...\=.......ybY. 803a03c: 6b4a 0be6 e6ac 8c0a 872c d76e 122d 13a8 Jk......,.n.-... 803a04c: 0cec 02b9 4572 a1ae 01d2 4f23 0c8b 4bf2 ....rE....#O...K 803a05c: 5d62 af1f e749 5d41 4007 f0e2 91fc 202b b]..I.A].@....+ 803a06c: e457 56ba 8b8e e89a 87d2 2758 2e01 4db1 W..V......X'...M 803a07c: ba96 09d6 5c76 1e93 9088 202b 7dd7 5726 ....v\....+ .}&W 803a08c: c147 35a6 a185 51c8 f3ac 9606 eac4 752e G..5...Q.......u 803a09c: 13ad 7cec bb9b 9007 202b e6d7 5ae4 c457 ...|....+ ...ZW. 803a0ac: 1d8a b472 8ba6 9a0c da9a af35 bfc9 dd56 ..r.......5...V. 803a0bc: 87b6 015c eeb9 b933 0a5a b536 074c 01a4 ..\...3.Z.6.L... 803a0cc: a5e6 9e46 0ae6 f6b8 8eb0 35b7 457a 80ae ..F........5zE.. 803a0dc: 9b5c 6b91 d45d abda dad8 c7c5 8322 2155 \..k].......".U! 803a0ec: 6749 b5d8 f6e9 3ad9 1d82 7e7a 905d 202b Ig.....:..z~].+ 803a0fc: 6dd7 ab95 60a1 8b13 f9cb e2ba 8e97 2358 .m...`........X# 803a10c: fc75 376c 52ec 9d57 d61e 22c8 f732 ea91 u.l7.RW...."2... 803a11c: 0d58 f1ad 58c5 ae3d 2ab4 afda 6b91 8824 X....X=..*...k$. 803a12c: a905 2c60 8198 9277 6bc2 323e bdbc 07ae ..`,..w..k>2.... 803a13c: de5c 1ebf 7572 ec17 22c2 ab3a 074b 1ac4 \...ru...":.K... 803a14c: 542d 52b6 19b5 5873 d827 4589 baf4 20f0 -T.R..sX'..E... 803a15c: a6d7 a956 f38d 65ef 5c89 7523 cf82 4b05 ..V....e.\#u...K 803a16c: ce08 f0a8 cffa 6e0c 2bab 89d7 63e5 04cb .......n.+...c.. 803a17c: 227d 7757 f6b9 842d 73d3 85ec 049d 4892 }"Ww..-..s.....H 803a18c: 22dd c481 48b2 5a95 14a4 5f5c 50fb d7c8 ."...H.Z..\_.P.. 803a19c: ca3e b5c9 70e7 8212 713d 5ce1 0ccd 3b6e >....p..=q.\..n; 803a1ac: 280e c5d6 ac4a d5c8 b05d 4555 be9b 36c5 .(..J...].UE...6 803a1bc: 332f 8b8f 6c0c 9377 2c8d 1b3b be6c 5c4c /3...lw..,;.l.L\ 803a1cc: 5b0a ddc3 e696 082d c6b9 24ea 7445 90ed .[....-....$Et.. 803a1dc: 473f 8e7b 6f51 0af1 f6c4 63ea 6eae ce4f ?G{.Qo.....c.nO. 803a1ec: 93d5 1760 6d86 914a fae5 26fb aac4 5823 ..`..mJ....&..#X 803a1fc: 22db b4d5 39e2 e887 0e2b 77ca e07c cb33 ."...9..+..w|.3. 803a20c: 5f0b 3177 6b92 4587 fce1 1d8c 5ea3 621f ._w1.k.E.....^.b 803a21c: 169d 8ac5 dd5c dae4 b8b3 1fb4 1659 7478 ....\.......Y.xt 803a22c: a897 3aae 7a01 8f25 6875 0ab8 a6cb 7607 ...:.z%.uh.....v 803a23c: 916c b052 185d dd31 716d cd98 bf99 07fd l.R.].1.mq...... 803a24c: ae88 8a1d d339 f0d4 91f6 b167 e84e 7016 ....9.....g.N..p 803a25c: ab6c 9430 cf4c d230 aaad 8fb8 fd76 892e l.0.L.0.....v... 803a26c: 348d cd66 6dd6 bd97 8c30 a344 5d00 8b03 .4f..m..0.D..].. 803a27c: e536 8cfa bd3f d10d 43b5 90ea 5d1f 9c94 6...?....C...].. 803a28c: 7ddb 9cc3 6ead 018a 3ab9 7608 5862 ef05 .}...n...:.vbX.. 803a29c: 885b a7ac 06d1 5b65 8a14 3a35 fa0e 8b1e [.....e[..5:.... 803a2ac: 3354 d3cf 5ab2 c51f a3f8 de87 ec85 679a T3...Z.........g 803a2bc: 3858 e72f 510e 8baf 1358 5cfa ca3d 20b5 X8/..Q..X..\=.. 803a2cc: 45d8 915d f0a6 a9f7 a445 f13b c8b4 f7c0 .E].....E.;..... 803a2dc: c098 a2c8 5548 fcf5 be6d 9018 feeb 5fa4 ....HU..m......_ 803a2ec: 2738 a36d d8de ac52 c959 4063 beae 7ae4 8'm...R.Y.c@...z 803a2fc: fae0 4ee9 d4dd 57fd e9bc 45ad cf21 f2ea ...N...W...E!... 803a30c: 059b d719 6cb5 1af9 52e2 d827 61be 73ce .....l...R'..a.s 803a31c: 2161 d344 892f a2c4 accd 508a cd72 9537 a!D./......Pr.7. 803a32c: 102f f7a3 814e 65be 99b4 68f8 42b5 feae /...N..e...h.B.. 803a33c: dae5 7213 891d 9c76 a4a5 144c eff2 72f2 ...r..v...L....r 803a34c: 2715 4ee1 ce5d dcf1 2e4b 8937 7d74 720f .'.N]...K.7.t}.r 803a35c: 5919 a244 8255 0c8b dda3 7038 80a7 61af .YD.U.....8p...a 803a36c: 3a35 cd72 8454 5654 8938 241d 6b1b 5a92 5:r.T.TV8..$.k.Z 803a37c: 0de4 0363 ab4c b1e8 f267 e7af 22d0 b5ea ..c.L...g....".. 803a38c: eb15 cd7c 8a7b 2b5c 845e 87fc 5532 881f ..|.{.\+^...2U.. 803a39c: b455 9b61 598f b90a ab66 88e3 7093 ab26 U.a..Y..f....p&. 803a3ac: dfcb d577 f7fb 2c84 795b 62f2 8f91 2563 ..w....,[y.b..c% 803a3bc: 9cd7 8d60 5f8a f43f dff6 79da afe5 dc1c ..`.._?....y.... 803a3cc: c9f9 5e37 23ba 6bee 95e7 bfaf ef64 1e98 ..7^.#.k....d... 803a3dc: 440a 4599 c4b7 593a 9e66 2cbe 8666 6b51 .D.E..:Yf..,f.Qk 803a3ec: e388 7f2e cde2 56bf 0276 6af6 ba4e 52c8 .......Vv..jN..R 803a3fc: b1b0 49e6 3a9d 8244 1a3b dd8f f8a5 9be4 ...I.:D.;....... 803a40c: e2d4 78f1 b56b ae42 27ff 9ed7 d6fa bb1a ...xk.B..'...... 803a41c: d38a f217 14e4 9412 258f 2215 564c 1c97 .........%."LV.. 803a42c: e235 8b4a 7d42 a5f9 bebf ae56 1fa2 e773 5.J.B}....V...s. 803a43c: 5ffc f64d e67e a970 f7dd cb24 2799 9ab9 ._M.~.p...$..'.. 803a44c: fd2c 849d ab92 6443 fb13 4cae 98e7 563a ,.....Cd...L..:V 803a45c: 7dcf ee3e b038 675c 9c0d 13a7 b706 cbd4 .}>.8.\g........ 803a46c: dd35 bc94 9092 5ce4 ba46 5fa7 e1fd 96bd 5......\F.._.... 803a47c: b29f 97e2 a894 5ca9 166b 4444 7d16 a6bb .......\k.DD.}.. 803a48c: 9cb2 8c5a 3465 9c79 e2ae 6ed6 92ef 8def ..Z.e4y....n.... 803a49c: 914d b2c3 6dca 0512 0c2e b223 9190 1462 M....m....#...b. 803a4ac: ae58 f3a1 c9d8 a980 db58 d725 08b2 ecf7 X.......X.%..... 803a4bc: 8e2b 9dec 52d0 e72e 3c1d 2d64 9ad7 7608 +....R..... ..\.. 803a53c: d542 5738 4ac0 bf2d f351 9fb7 28f8 5982 B.8W.J-.Q....(.Y 803a54c: 10a6 4216 e3ae 6895 e575 26ba 9045 806e ...B...hu..&E.n. 803a55c: 275c 9116 3aeb 3646 68cb 850b 91ac c9e5 \'...:F6.h...... 803a56c: 0717 ab90 2569 34dc d195 eb76 7155 6b86 ....i%.4..v.Uq.k 803a57c: c8c8 4235 0dae 62b7 d019 2753 fc90 a7c0 ..5B...b..S'.... 803a58c: 70aa 0f35 5a2d d119 810a b6f6 ae58 36b3 .p5.-Z......X..6 803a59c: 0e17 d214 4b01 ee8d 2680 3ae5 841e 14eb .....K...&.:.... 803a5ac: b7e8 d620 c799 bae7 341c e9dc 5c80 621b .. ......4...\.b 803a5bc: b425 07dc 1135 dbd2 5ceb 3108 4961 5cca %...5....\.1aI.\ 803a5cc: 2076 c954 44b5 33b0 82c3 1b53 ed72 5892 v T..D.3..S.r..X 803a5dc: 0ee7 099f 28d3 e473 b2f9 167d 8d38 fa11 .....(s...}.8... 803a5ec: 3cf2 8a74 39c2 457a edae 75c8 290f f93d ...6 803a66c: 5791 145d ba15 7fc1 82da e35c f38a edaf .W].......\..... 803a67c: 1a82 0d72 d724 62b4 b91d a8f7 1577 cad9 ..r.$..b....w... 803a68c: aa7c bc8f caad c6ff b905 2d8e cb06 ee84 |..........-.... 803a69c: 6d8b 407d 5cb6 b74d 6a26 6d75 3792 c2f9 .m}@.\M.&jum.7.. 803a6ac: 0c5c 6fda 6ff0 3663 d442 a742 8b00 5a08 \..o.oc6B.B....Z 803a6bc: 6b96 586c 8824 7894 b927 84ee 50c8 7bae .klX$..x'....P.{ 803a6cc: 009d d2ea f7be 8b8a 1b2f 4929 16ba 620c ......../.)I...b 803a6dc: 8dcb 6304 de8b 9b52 c37d 1f5a 2d90 d823 ...c..R.}.Z..-#. 803a6ec: 8235 95b5 30eb 09c0 ba1e bfc1 1ded da07 5....0.......... 803a6fc: 514c 90f4 736b ed72 445b d904 0f9a f690 LQ..ksr.[D...... 803a70c: 59e5 ae4e 423b 7bae d3b9 6895 225d 1fda .YN.;B.{...h]".. 803a71c: cb7f 4ce1 15e6 c50d 3a67 b042 a1e7 7fd1 ...L....g:B..... 803a72c: 56de ab31 dbd0 2aea d357 fc66 e7a1 6663 .V1....*W.f...cf 803a73c: 3b81 4c1b c187 d194 b00f e081 32dc 9f02 .;.L.........2.. 803a74c: d720 0b66 a65a b879 a7a9 fa0f 391e eeb9 .f.Z.y......9.. 803a75c: 3ffd 8b97 6d4a e12f 7e64 30b1 a654 09aa .?..Jm/.d~.0T... 803a76c: 6e7f 9c58 1c4a fd1b 1f5b 2d90 dcbe 2c7c .nX.J...[..-..|, 803a77c: 348f 17cd 0166 b872 e9a6 d0ab b3fd cca6 .4..f.r......... 803a78c: c52d 391a c54c 21ea e6d7 3ae4 5c33 9daf -..9L..!...:3\.. 803a79c: 4458 2326 bc75 d551 9b9b eb93 bbff bcf4 XD&#u.Q......... 803a7ac: f5e0 b66f 422a b9c8 6a06 c1a6 3578 a620 ..o.*B...j..x5 . 803a7bc: 55d0 b7d0 cb58 363f 3b4c 2eb8 1d7b 1c56 .U..X.?6L;..{.V. 803a7cc: 3527 fe1c c7b2 0ecb a6ff 6a8f 34f2 d450 '5.........j.4P. 803a7dc: b214 1e0a 7fb2 67d6 a360 1afb 1236 22bd .......g`...6.." 803a7ec: 7b57 86c6 4691 1964 2c49 690a b184 646e W{...Fd.I,.i..nd 803a7fc: e420 8f9a 8d66 0e3a 9464 2226 54d9 faae ...f.:.d.&".T.. 803a80c: 912a c4eb 8262 c2d6 6871 e98b ec80 c6be *...b...qh...... 803a81c: 5792 4dd7 b309 11c0 6ea0 64c4 343b a77a .W.M.....n.d;4z. 803a82c: 5103 cfb1 9c94 14ae 26d3 57a2 6ae4 d0cf .Q.......&.W.j.. 803a83c: ef22 b53a e378 15fa ff09 d14a b92a 4f16 ".:.x.....J.*..O 803a84c: a36e 6d6f a139 2e4b cdad b5c9 772a f0ba n.om9.K.....*w.. 803a85c: 53b8 136e b203 8ea7 3572 6969 d9b2 69af .Sn.....r5ii...i 803a86c: 0832 2053 cd33 6715 0683 ebaa 9e81 7f6b 2.S 3..g......k. 803a87c: a04d 8593 5e8e ab91 913d 65c5 6257 8df9 M....^..=..eWb.. 803a88c: 175f acf1 630a df5a a2ac 3580 8934 d446 _....cZ....54.F. 803a89c: b20a e554 2746 b79e ef14 b6ed 2037 48db ..T.F'......7 .H 803a8ac: 15d8 badb 45d4 a382 91c0 9752 6406 7977 .....E....R..dwy 803a8bc: 185b cb1f 6367 dae4 0acc 99ad 1145 6162 [...gc......E.ba 803a8cc: 1559 189e 965c 3525 cd72 8157 0667 ec51 Y...\.%5r.W.g.Q. 803a8dc: a2a2 a0ab 7b6a 85f0 be63 d435 ec80 d778 ....j{..c.5...x. 803a8ec: 9edf 9359 89c2 b7d7 52b9 6cb0 eff2 80d2 ..Y......R.l.... 803a8fc: 2eec f731 5858 4e34 207b 3757 1646 ad79 ..1.XX4N{ W7F.y. 803a90c: 61c4 b33d 8449 a992 e76f 855e ad5c 2b24 .a=.I...o.^.\.$+ 803a91c: abb7 2831 c564 5b16 bb8a 0a76 21a4 1ae4 ..1(d..[..v..!.. 803a92c: 0662 8584 5c14 e7ab 07a1 7764 ba89 3ae7 b....\....dw...: 803a93c: 1909 22bd 70d7 81a9 6599 3af4 c8d5 6539 ...".p...e.:..9e 803a94c: 1f16 58b2 4a33 8ad1 64b4 9714 25db 2aa1 ...X3J...d...%.* 803a95c: 9d6a faec f5d9 c435 6c80 e5a3 0db4 2109 j.....5..l.....! 803a96c: 68b3 09fb ecb9 9375 9ae5 fc0e c716 a28c .h....u......... 803a97c: e457 ceea e2d4 ae1b 292e d63f fa90 32c4 W........)?....2 803a98c: d222 14a9 3a27 9702 9c91 01da b477 1ada "...':......w... 803a99c: a07c 3dbf dcf8 df70 df2c b203 728d f2ae |..=..p.,....r.. 803a9ac: a48b b121 03f6 b65f 0e9b 4ec8 5836 f1ae ..!..._....N6X.. 803a9bc: 6fc0 8427 b1d1 6b91 a5d8 33b0 3c87 8e99 .o'....k...3.<.. 803a9cc: 7b04 b24a 91a6 42ec 1073 5688 22d4 6ea7 .{J....Bs..V.".n 803a9dc: 96c9 12ad 4eb9 862c b8c1 ceae 42ca d16c .....N,......Bl. 803a9ec: bf2d 3a44 d628 1a26 7bfc 2c1b 5ed7 9cc0 -.D:(.&..{.,.^.. 803a9fc: 0cf2 36b9 7233 6170 0df1 d3a7 620e 0972 ...63rpa.....br. 803aa0c: 1c37 dfac 36d9 edcb 30c0 5c34 de57 f9d3 7....6...04\W... 803aa1c: 9776 5b2d e3ab f46a 6691 6286 e935 3573 v.-[..j..f.b5.s5 803aa2c: 0d99 ed3b 5c88 0e17 9aab 7642 b40a bdb9 ..;..\....Bv.... 803aa3c: c84b 014e 435f 6269 1ae4 ae5e 6589 5675 K.N._Cib..^..euV 803aa4c: 5be7 3273 bf08 a68b bcae bab3 b1d9 1252 .[s2..........R. 803aa5c: be2f daf2 d6ba d4a9 ae42 edba e358 00dd /.......B...X... 803aa6c: 1abb 9404 d4eb fdf1 a26d dfc1 47a6 6db7 ........m....G.m 803aa7c: 0d66 3ea4 c866 99b5 d961 cb0b 3408 ccd1 f..>f...a....4.. 803aa8c: f695 203b 48d8 3fa3 1330 9d72 44d6 91ad ..; .H.?0.r..D.. 803aa9c: 5ca5 8d23 3368 2109 35d7 5b83 a35c a1d5 .\#.h3.!.5.[\... 803aaac: f787 a9a4 ff06 4b7e 0763 1a9b 9d74 8ef9 ......~Kc...t... 803aabc: 915e 336b d7b9 5cba 6e97 7343 301a cd8a ^.k3...\.nCs.0.. 803aacc: 58e7 35a7 aaf9 aeda ef82 723d 75d4 5645 .X.5......=r.uEV 803aadc: 0b5d 64d5 1e4d de36 b40d 971f e8a7 316d ]..dM.6.......m1 803aaec: b0f0 736d 9d43 6502 919f 8a91 bad8 da2e ..msC..e........ 803aafc: a0d1 ae99 0588 6d72 b226 399b 9114 ab74 ......rm&..9..t. 803ab0c: 99ff c967 1546 07b3 eeaa 36a7 3d8a 8afb ..g.F......6.=.. 803ab1c: ae23 021d 229d 9727 c5b9 3809 b1f6 057b #...."'....8..{. 803ab2c: 0e6c d5c8 f6ff 992f 0f43 c8eb 5f22 5897 l...../.C..."_.X 803ab3c: 768a d9a8 5069 f977 995a 958b 0c63 a32d .v..iPw.Z...c.-. 803ab4c: 2eca b5ca e5f8 ab12 2cf7 435d 91dc 397c .........,]C..|9 803ab5c: d720 d8ad 30a0 cc75 0d7b 2f2d e73f 9db9 ....0u.{.-/?... 803ab6c: 860e c325 d387 375c cd81 4fe5 26bf 9dfa ..%...\7...O.&.. 803ab7c: 08d5 3c76 df28 7671 e553 800a 5b5c fdd8 ..v<(.qvS...\[.. 803ab8c: 4eb5 8960 0446 ef3c ee48 a4ca b698 8bf6 .N`.F.<.H....... 803ab9c: bce5 8783 ad8a c85a 9015 722b cab5 6663 ......Z...+r..cf 803abac: f703 0245 a0e9 16dd 9b18 4802 f15c f798 ..E........H\... 803abbc: 8b04 015c 22b9 90d7 03dd f2ba 39ea 980c ..\..".......9.. 803abcc: d970 b2f1 f9a7 8cd8 6f22 d8b9 a1c0 0b15 p......."o...... 803abdc: 02b9 4572 daae ac3d bdba 3d87 3395 150d ..rE..=....=.3.. 803abec: 66c9 5206 77cd ac37 e45b 3550 c0ff dfa8 .f.R.w7.[.P5.... 803abfc: b912 7202 ae45 fdb6 7373 49c3 8948 14ea ...rE...ss.IH... 803ac0c: 21f0 d35a 838e e2b2 5555 365e 16dd 22c1 .!Z.....UU^6..." 803ac1c: 400c ddae ab92 0f6e 666b f8d1 5abc 3339 .@....n.kf...Z93 803ac2c: f752 d551 bddc 2f9a c930 09b5 5cf9 9b02 R.Q..../0....\.. 803ac3c: cc59 ddb0 c128 0c22 ae40 93dd e9ab 024e Y...(.".@.....N. 803ac4c: 8ebd 507d 037a 69fd 89f7 fae1 64f4 0453 ..}Pz..i.....dS. 803ac5c: 308b b900 5376 a6ae 2203 1dc6 4068 0c8f .0..vS..."..h@.. 803ac6c: 163b 1ac6 7651 3ae6 1463 02b9 4572 d6ae ;...Qv.:c...rE.. 803ac7c: a883 3507 b55b 1034 9aa9 81b6 0625 9ec7 ...5[.4.....%... 803ac8c: 98fb 8a65 015c 22b9 b2d7 ce08 9174 d4c0 ..e.\.."....t... 803ac9c: c0f3 aa8f b125 67a1 4691 cf25 617f a913 ....%..g.F%..a.. 803acac: 5723 ae40 d5c8 7c66 badf 7668 da25 87be #W@...f|..hv%... 803acbc: 3508 d819 66ed 3ae0 b48b b04c f3b6 9146 .5...f.:..L...F. 803accc: 202b e457 bf6a 6029 174d b8c0 ae62 ac40 + W.j.)`M...b.@. 803acdc: 9e7e 2f9f d2e0 e5c6 166b 9969 c760 c72e ~../....k.i.`... 803acec: ae44 5c80 6b91 96d7 b6ba ee31 9d70 8760 D..\.k....1.p.`. 803acfc: 5e21 e463 c80a 7f75 d5ca 3aa6 c5df b125 !^c...u....:..%. 803ad0c: 043e 859b 94e8 ae40 5c80 aff7 8b5c 5d92 >.....@..\..\..] 803ad1c: 2474 6d52 5ba2 df21 35a6 7221 e405 5c8a t$Rm.[!..5!r...\ 803ad2c: 3343 6834 f7e0 69b9 d25e 73c2 bbed 5ce6 C34h...i^..s...\ 803ad3c: 2b91 5720 6ae4 cd13 5aae 7ca5 b447 750b .+ W.j...Z.|G..u 803ad4c: 64dc c5b0 f393 2b91 5720 aae4 db2b 0ed5 .d.....+ W..+... 803ad5c: 7503 0573 12f2 a99d 74c8 59d5 dbd0 1f2f .us......t.Y../. 803ad6c: e476 c80a 0015 9000 002b 7200 0005 ae40 v.......+..r..@. 803ad7c: 0000 5c80 0001 2b90 0000 0572 0000 0ae4 ...\...+..r..... 803ad8c: 8000 015c 9000 002b 2000 0057 e400 000a ..\...+.. W..... 803ad9c: 5c80 0001 b900 0002 5720 0000 0ae4 0000 .\...... W...... 803adac: 15c8 0000 02b9 2000 0057 4000 00ae c800 ....... W..@.... 803adbc: 0015 b900 0002 7200 0005 ae40 0000 15c8 .......r..@..... 803adcc: 0000 2b90 0000 0572 4000 00ae fb00 ae5c ...+..r..@....\. 803addc: f63f 6685 ca79 1883 db0e 3781 001f 6b90 ?..fy......7...k 803adec: b940 75b6 9aff 3f92 cb76 ad45 89c3 d002 @..u...?v.E..... 803adfc: b96d 761e eb90 0433 0917 283e 82f8 41e0 m..v..3...>(...A 803ae0c: 49c1 23c1 7f82 dc13 7822 e087 0d79 f5cb .I.#...."x..y... 803ae1c: 824d 3af3 d72c 0b97 412e 00ae 2bdb 8bd7 M..:,....A...+.. 803ae2c: 9905 5c85 2e9f 4cb8 9ff0 a582 2706 d704 ...\...L.....'.. 803ae3c: be0b 01bb 1eb9 7c10 7045 60a7 83b7 dd72 .......|Ep.`..r. 803ae4c: dc15 f821 e09a c859 6015 e4fb 103a 213c ..!...Y..`..:...\?.F.:r.[ 803b13c: 0a70 0572 2308 a4d7 9044 ac7f d621 9577 p.r..#..D...!.w. 803b14c: eedc 6a4b 9665 c8e9 7cc1 7ae4 8543 de8c ..Kje....|.zC... 803b15c: 905d 3dd7 bfaa 4ab5 7160 e661 8980 0f5c ]..=...J`qa...\. 803b16c: f455 eab4 75c8 eea9 943f 2f5c b5c8 d95e U....u..?.\/..^. 803b17c: 55c8 1872 02b9 9184 6cab fffa 495c d4fb .Ur......l..\I.. 803b18c: 2a6b 7924 e091 92c9 0245 5967 73ce e7cd k*$y....E.gY.s.. 803b19c: 6f5c 235b b7a2 a417 eff5 456a 9d56 df20 \o[#......jEV. . 803b1ac: 996a 3d73 7055 079f ceb9 8a4b 3e6c 2ae4 j.s=Up....K.l>.* 803b1bc: 0317 55dc 4d21 b95d 2fde 9088 402b 8298 ...U!M]../..+@.. 803b1cc: 19d6 8782 b20b 4fbc 3df0 c31a 9658 572a .......O.=..X.*W 803b1dc: ae7b b0c3 7cec c0b7 3531 35bf a12f 8583 {....|..15.5/... 803b1ec: a725 0472 59e1 c59a 8fa8 6ee5 9377 5c81 %.r..Y.....nw..\ 803b1fc: a9af bc99 2ba5 65d7 12e5 7b5e 26b9 c215 .....+.e..^{.&.. 803b20c: 9134 e4ab e45a 100a 5bae 6de0 9725 b7f9 4...Z....[.m%... 803b21c: c8a9 f576 cf37 7c13 f0a5 4f37 48aa 65d6 ..v.7..|..7O.H.e 803b22c: 8227 3eaa d7d7 9e0a fdcc 01ee 4795 6dd5 '..>.........G.m 803b23c: fffc 45ba eb9f 0bf7 f71e d728 52ff b091 ...E......(..R.. 803b24c: b92f 5b3e af70 b947 109e 04bc 02b9 9184 /.>[p.G......... 803b25c: 94ab 5fe8 0897 a476 7f7e 64a0 cb18 1653 ..._..v.~..d..S. 803b26c: 3809 f36c b652 eb42 8555 5909 6252 1ae7 .8l.R.B.U..YRb.. 803b27c: fe34 5717 3d68 5357 53ae 998d 26b1 9572 4..Wh=WS.S...&r. 803b28c: a1fc b947 5d5e 4b23 b953 6e4a ae45 e100 ..G.^]#KS.JnE... 803b29c: 1116 5f3c 50f0 9e41 0b8f 447e 5370 5889 ..<_.PA...~DpS.X 803b2ac: f3af 87b8 a0d6 3664 f1c0 d4c2 9fa9 1036 ......d6......6. 803b2bc: 4beb ab0a 74b3 0b67 4abc 2073 a9b7 1f5c .K...tg..Js ..\. 803b2cc: 1157 abb1 cf5c f350 7d59 55cb 6af2 0ae4 W...\.P.Y}.U.j.. 803b2dc: 6e10 d685 4b1b fa24 4988 ab2f 06c3 7f85 .n...K$..I/..... 803b2ec: 46b5 324c fd7a 0379 cab1 b4bd a5fe dfd0 .FL2z.y......... 803b2fc: 02fa b90d c2ca ddd3 729a e995 9b89 2715 .........r.....' 803b30c: 6f34 69f3 720f 94fd 28a6 a84f ae19 0792 4o.i.r...(O..... 803b31c: 6f34 8f73 e9e0 15c8 dc20 d7f2 28b2 cf35 4os..... ....(5. 803b32c: aabc d597 ae41 2e2f 73cc ed5d f040 0306 ....A./..s].@... 803b33c: feb1 daa0 70b4 9a59 ad6b eb96 cb61 656d .....pY.k...a.me 803b34c: f84c 0719 c6b9 929a e174 c89d 2015 5c9c L.......t.... .\ 803b35c: 134f 797c 588d 4165 85eb b701 2ed6 89db O.|y.XeA........ 803b36c: e640 cf40 28d6 fd5e c39e 044e c872 fdcb @.@..(^...N.r... 803b37c: 9206 57bc e4f5 50de 78f2 b8ab 6d5b 68bc ...W...P.x..[m.h 803b38c: d72a d453 563c 495d 213e 41b8 af71 edc1 *.S.!.Aq... 803b39c: 141e 177c 0572 3708 65b8 3250 f03e d511 ..|.r..7.eP2>... 803b3ac: b58a 5013 abae b43d 978e b044 0bb7 54ae ...P..=...D....T 803b3bc: 3fbf ed5f 25a5 cda3 af8f 7bc9 6f5e 87b0 .?_..%.....{^o.. 803b3cc: b5d6 1186 69a8 35ce 61cf b90b 321e 408c .....i.5.a...2.@ 803b3dc: 726d 2bae 43ae 00ae a761 bd62 b6cf cae5 mr.+.C..a.b..... 803b3ec: ae51 be92 eec3 8faf ee18 fafe 0603 d379 Q.............y. 803b3fc: dcfc 33d6 0f15 de1b 01f6 2915 caeb 54f5 ...3.......)...T 803b40c: ecd5 226f 87c8 6705 ee2a bc32 1cad 7dae ..o"...g*.2....} 803b41c: 720e 0805 5727 6339 1fe0 5c95 f0af 9e31 .r..'W9c...\..1. 803b42c: 40d0 3bae f2ea f2f9 90c2 2aea a84e f568 .@.;.......*N.h. 803b43c: ed74 fd35 dd4f a65e c629 7206 a3fd 7206 t.5.O.^.)..r...r 803b44c: 45ad 8b3e 015c cec2 7d73 bad9 81f1 c80d .E>.\...s}...... 803b45c: 3f35 fb14 9522 94df 5a83 541e fa82 5a86 5?.."....Z.T...Z 803b46c: fb06 8217 a877 012e 21b3 76d5 bfbb c3fa ....w....!.v.... 803b47c: b0df 60ec a270 9800 3ff3 637f aecb 24e6 ...`p....?.c...$ 803b48c: 24ed 0000 0000 4549 444e 42ae 8260 .$....IEND.B`. 0803b49a : 803b49a: 722f 6c6f 2e65 736a 0000 0000 5448 5054 /role.js....HTTP 803b4aa: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 803b4ba: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 803b4ca: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 803b4da: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 803b4ea: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 803b4fa: 6e65 2d74 654c 676e 6874 203a 3332 3934 ent-Length: 2349 803b50a: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 803b51a: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 803b52a: 3a65 6120 7070 696c 6163 6974 6e6f 782f e: application/x 803b53a: 6a2d 7661 7361 7263 7069 0d74 430a 6e6f -javascript..Con 803b54a: 6574 746e 452d 636e 646f 6e69 3a67 6720 tent-Encoding: g 803b55a: 697a 0d70 430a 6361 6568 432d 6e6f 7274 zip..Cache-Contr 803b56a: 6c6f 203a 7270 7669 7461 2c65 6d20 7861 ol: private, max 803b57a: 612d 6567 383d 3436 3030 0a0d 0a0d 8b1f -age=86400...... 803b58a: 0008 0000 0000 0a04 58b5 8eef c6db 7f11 .........X...... 803b59a: de15 b8c6 2d23 2d1e a939 8b0b 13c7 677c ....#-.-9.....|g 803b5aa: 7637 b3e0 9c83 a68a 1838 72c6 2577 47d1 7v......8..rw%.G 803b5ba: 5971 a972 7ab3 a027 d035 2d4f b410 8a9f qYr..z'.5.O-.... 803b5ca: 687e 37d0 8b48 0818 26d0 a0cf a37b 76fe ~h.7H....&..{..v 803b5da: 8a49 ce94 8db2 8502 44ed 9ddc 9d99 3f9d I........D.....? 803b5ea: 99bf 51d9 3091 c915 62c4 a099 9c4a e116 ...Q.0...b..J... 803b5fa: 3a33 c68b af54 ced9 8ce5 1666 b80d c564 3:..T.....f...d. 803b60a: 2454 2bca 1e89 42c5 d97f 4784 e233 d4f8 T$.+...B...G3... 803b61a: 3163 f3cd 7467 022a 1792 4261 c467 8cd7 c1..gt*...aBg... 803b62a: 56e1 22c6 5f06 e6d8 9303 7f85 cd21 35f6 .V."._......!..5 803b63a: 4bbf 9a3d 22a6 c7e1 2893 76e6 18e8 2c81 .K=.."...(.v..., 803b64a: db38 4aa6 111c 7dc7 e6df 9f0b 759d 785f 8..J...}.....u_x 803b65a: 9251 ec88 f0f1 69e4 77b0 ad40 2649 0146 Q......i.w@.I&F. 803b66a: 4499 92b9 dcd9 a89b 4c69 970e 58ff b4fe .D......iL...X.. 803b67a: e7fc 1ff5 dfaf 7f2c feb8 5ac6 0dfe 3f9f ......,....Z...? 803b68a: bf5e feb9 fe1d 6fff 79fc 5f8b 1ddf a1dc ^......o.y._.... 803b69a: 7b87 3b2e bdeb 625b e691 6f2f bd4a 3dfe .{.;..[b../oJ..= 803b6aa: fe64 fd74 f2cd e5c7 cb0f d6b7 aff2 3fcb d.t............? 803b6ba: bf2f 252d 3b91 e46b 7041 2511 5e5c b178 /.-%.;k.Ap.%\^x. 803b6ca: c664 5e15 d54a 8124 0785 16e6 832d b853 d..^J.$.....-.S. 803b6da: 266f 9f48 b9dc e871 2976 bbbb d1b6 a6fd o&H...q.v)...... 803b6ea: c71c d70d af2c bb8f d6b9 dac3 bb2d f672 ....,.......-.r. 803b6fa: 3888 2c6b 59d4 ea8c baa8 5365 32e7 aa13 .8k,.Y....eS.2.. 803b70a: 12c8 e56b b19d 5550 1d08 9fcd 5070 f434 ..k...PU....pP4. 803b71a: 170c 8f3e 4892 3e69 0b16 3d9a 9449 66c8 ..>..Hi>...=I..f 803b72a: b634 3455 b215 8e50 0acb 6bb8 ac7a 4129 4.U4..P....kz.)A 803b73a: 56e5 41eb d42e b68a e245 c4f6 ada7 6203 .V.A....E......b 803b74a: 7e39 285e 7644 54a5 292c faff e9e4 c943 9~^(Dv.T,)....C. 803b75a: 826c 1c3d b1e0 3471 9d20 1813 cbdc bc28 l.=...q4 .....(. 803b76a: b530 971d fe7c 4868 fadc 605a 22e7 4a16 0...|.hH..Z`.".J 803b77a: 4b1c 1e79 9b09 3264 3a16 d6fe 2316 a58e .Ky...d2.:...#.. 803b78a: 3f4d 1196 0777 4547 1949 0b70 ddc7 35e9 M?..w.GEI.p....5 803b79a: 6816 4429 d0dd 2e65 b32f f850 0ea2 e80a .h)D..e./.P..... 803b7aa: 58fb f4a9 f12b 429b 6ae4 8890 6b0b a97d .X..+..B.j...k}. 803b7ba: 97af 93aa 981f f8f8 79fa 4af8 a430 49ec .........y.J0..I 803b7ca: 32c4 cb99 f291 cb34 f870 7425 9e14 aa44 .2....4.p.%t..D. 803b7da: a1d9 dd4b ae9d 84fe 2b29 8fe1 e505 b322 ..K.....)+....". 803b7ea: b1c9 1b84 b512 9c3f 82a7 04b8 19b9 6547 ......?.......Ge 803b7fa: de64 9579 04cb acd9 7e13 43e4 0254 e120 d.y......~.CT. . 803b80a: 5cf3 4d01 84d8 6326 b411 f6cc 1059 cf08 .\.M..&c....Y... 803b81a: 9c10 026a e1c4 0b08 b89a ddc8 ddbb 106e ..j...........n. 803b82a: 068c 7a76 9fc1 c7e4 cb32 b1a0 cf21 9953 ..vz....2...!.S. 803b83a: 62e4 5e28 972b c2d4 1048 2828 4723 db16 .b(^+...H.((#G.. 803b84a: 65dd 003a b9e3 1c2d cfa7 0b40 2077 c675 .e:...-...@.w u. 803b85a: 7936 6594 2332 b38e b730 b84a 5bcd 40b1 6y.e2#..0.J..[.@ 803b86a: 3f39 9995 b509 cc91 0dec 6ac8 34a2 9a3f 9?.........j.4?. 803b87a: d71f 8708 07a0 0d0b bf8d d059 d9f5 e841 ..........Y...A. 803b88a: 22c5 ab19 cf89 1d3a 3c27 2f63 083c 347e ."....:.'.W.>.?....4 803b9fa: 4016 a465 ad3c e5bd e8a1 32a4 9db5 2e01 .@e.<......2.... 803ba0a: 2031 fc7d 9777 bcf8 b244 ad12 8745 84bc 1 }.w...D...E... 803ba1a: ecbd d8da 634e 8361 2073 2f7e e956 a340 ....Nca.s ~/V.@. 803ba2a: f0ae 5981 1d7c d0b3 ad11 1661 d81d d022 ...Y|.....a...". 803ba3a: 4126 ce99 6172 f26b b306 3e50 604b ae42 &A..rak...P>K`B. 803ba4a: 8802 8ac0 06be ab8e cc91 1362 cec1 499f ..........b....I 803ba5a: 8d15 a8e6 442c 8565 55c0 a09b 8927 0850 ....,De..U..'.P. 803ba6a: 0513 e77f 4b2f 454c 1969 c818 597b a06f ..../KLEi...{Yo. 803ba7a: 41b3 3b8e 8dfd 1455 2854 0284 5bd6 c917 .A.;..U.T(...[.. 803ba8a: 2cc5 6262 945f 38f8 3f28 9a5f 5acf dad2 .,bb_..8(?_..Z.. 803ba9a: 255a 51a7 ea1a 497d 3a33 51d5 5ce0 6056 Z%.Q..}I3:.Q.\V` 803baaa: 5f84 461a 6eac 4abf ea94 da2e c96f 3534 ._.F.n.J....o.45 803baba: 6318 def5 39b1 cbcd bbbd f737 94c4 f146 .c...9....7...F. 803baca: 39a2 0b98 4d16 3c69 4794 4251 b9b3 c006 .9...Mi<.GQB.... 803bada: 30f2 1e9b 221e 90c5 551e dc6e d96d 3438 .0..."...Un.m.84 803baea: 43c4 b0f9 6ee4 2cb8 32e3 0e74 48b8 819b .C...n.,.2t..H.. 803bafa: fa85 bd04 4b8a 50e9 8160 666e e33c c12c .....K.P`.nf<.,. 803bb0a: bd07 d77e 30af 1d82 841c 7e8d cb34 dce8 ..~..0.....~4... 803bb1a: 9ef0 5cd0 2877 3b86 6a0c 8481 5d85 a1d2 ...\w(.;.j...].. 803bb2a: 2a2e 6b2d f62f 62f4 a9cf 6e85 bc2a ed79 .*-k/..b...n*.y. 803bb3a: 8af0 9a21 3156 c264 2aa7 47c9 75f2 b6a9 ..!.V1d..*.G.u.. 803bb4a: d941 6008 9ae4 325f a5d5 0f23 41c2 bfd8 A..`.._2..#..A.. 803bb5a: b85c 2a64 9cf2 058e 1289 bdab 757f b765 \.d*.........ue. 803bb6a: bd3f 2c8a 1b20 f467 c7ad 8e22 f5a5 992b ?.., .g..."...+. 803bb7a: 7cc5 2507 848b 2663 d463 0fdb ac08 02c8 .|.%..c&c....... 803bb8a: 49f2 7bb7 feff 7bbd 559a b8a1 147f 8af3 .I.{...{.U...... 803bb9a: ec10 11a3 4f7a e497 7913 a1f1 3533 a04d ....zO...y..35M. 803bbaa: 1bbb 6452 87f1 4188 ec12 9cf4 2b45 cb05 ..Rd...A....E+.. 803bbba: ef0e aaea a4b5 bbfb 2bab eed2 b6e5 dc77 .........+....w. 803bbca: ea30 5b87 c741 a07d c783 334b a4a9 6eee 0..[A.}...K3...n 803bbda: 8a90 bc5c 3e7e f702 9d96 8ea0 d280 61e3 ..\.~>.........a 803bbea: 5e10 755d 9557 6aaf ea22 e4fe f430 4b9d .^]uW..j"...0..K 803bbfa: 38d4 deed 10b3 ae65 73a9 dfa1 84e9 7955 .8....e..s....Uy 803bc0a: efdb ca2d ae7e ad6a 1ddb 7377 739e 1f59 ..-.~.j...ws.sY. 803bc1a: d16d 9d26 5eec 90f7 480e 0317 7109 b43a m.&..^...H...q:. 803bc2a: d009 4310 dd5c 5374 d43b ac58 a02b 38ed ...C\.tS;.X.+..8 803bc3a: e21d f421 a5cb f413 1399 e9db caf4 4355 ..!...........UC 803bc4a: 8bf6 8e22 8d7f 0049 c4cb 515a 963e 9645 .."...I...ZQ>.E. 803bc5a: ee1b 6afe 24ed d04a 6d42 9eae b40a 5c84 ...j.$J.Bm.....\ 803bc6a: 2eaf 1e4c 19d7 ab56 a75f 7728 5045 0ad7 ..L...V._.(wEP.. 803bc7a: a29f 5d35 4b95 dae8 581e cdd0 f661 e508 ..5].K...X..a... 803bc8a: d46b 5ca0 d1cd ca6b b294 cd48 a003 0a2c k..\..k...H...,. 803bc9a: 2d76 a804 d06f 2cbe a8eb b7e6 ac1b 3a71 v-..o..,......q: 803bcaa: c4f7 b767 5d79 7e92 132b 7cf1 0234 4398 ..g.y].~+..|4..C 803bcba: e04d d882 68e7 5bc4 f692 6b59 ddbc cfae M....h.[..Yk.... 803bcca: 6a47 4cdd a6c1 2d34 b616 57e3 29e1 3d13 Gj.L..4-...W.).= 803bcda: b481 8cdd 5980 f20b ed9d be51 0bbb 63cf .....Y....Q....c 803bcea: 95bf b425 1350 e034 0406 2f5b 9b09 d057 ..%.P.4...[/..W. 803bcfa: 3f43 e50a 17d6 3303 b3df dbad cd14 f31b C?.....3........ 803bd0a: e1ca 15ea d19d 659c aa51 33fa 7119 ebbb .......eQ..3.q.. 803bd1a: c4f8 ad65 9fc9 ff2c f182 0ffe e798 b7bf ..e...,......... 803bd2a: d26c 2969 e85b 1b11 4b71 cd1c 1321 b6d3 l.i)[...qK..!... 803bd3a: 99a3 33d6 0623 4063 3569 1224 b57c e786 ...3#.c@i5$.|... 803bd4a: 7272 8bd4 bf28 57ab b80b f36c 6319 70b1 rr..(..W..l..c.p 803bd5a: 5037 2d74 23d9 61b5 9df8 255b 4716 d9dc 7Pt-.#.a..[%.G.. 803bd6a: 5ddd 6543 680d ac37 e5ba 067d 1b7a 88de .]Ce.h7...}.z... 803bd7a: a143 da96 e989 f639 2475 a363 e50c b290 C.....9.u$c..... 803bd8a: 71f3 0b26 bd3c 2c68 192f caab 55e1 bdc8 .q&.<.h,/....U.. 803bd9a: 3622 bd88 b24e 67c2 b8d3 776d 5a68 dbb6 "6..N..g..mwhZ.. 803bdaa: a7a1 aa19 72f1 525d 7755 d86e ad70 7998 .....r]RUwn.p..y 803bdba: eac0 3eba f2af c375 980c 94ab 9919 fb58 ...>..u.......X. 803bdca: a1f2 2c4a dbfc 7ae7 cd46 a3f6 2664 2532 ..J,...zF...d&2% 803bdda: 76b8 5b7c b225 56fc 0a07 6e5e 65fe 7e9e .v|[%..V..^n.e.~ 803bdea: c7be d0ab eb9b 693f 6432 6b6b a9c6 05a2 ......?i2dkk.... 803bdfa: 71d3 846b 23df 359d 41af 0edb 73d9 f0f7 .qk..#.5.A...s.. 803be0a: b09c 5ae7 ca45 8101 6a29 83b0 5fe0 158f ...ZE...)j..._.. 803be1a: 2ce6 a42a ba06 ba98 31ed 309a 1f11 db99 .,*......1.0.... 803be2a: 7794 70c6 e5b0 6e69 6775 aefe 5f3b 2cd0 .w.p..inug..;_., 803be3a: 3741 bad9 6eb4 3568 4d92 8669 8997 62a7 A7...nh5.Mi....b 803be4a: 02a4 b3f2 7114 37c1 f1ac 5877 3fe2 b7cb .....q.7..wX.?.. 803be5a: c378 4efa fe6f 360f af28 cbf1 b68f 4604 x..No..6(......F 803be6a: d5f6 432d e7c9 e4c8 ae1c 123a ef98 ca04 ..-C......:..... 803be7a: fade d326 860f 24cf b917 b979 e11a e2fd ..&....$..y..... 803be8a: 6249 6937 bce4 0537 9b4d 91bb 2d83 0ade Ib7i..7.M....-.. 803be9a: 9ac5 7f15 f0fd 4c4c 4ce5 6f94 7896 5ad6 ......LL.L.o.x.Z 803beaa: fff8 8b05 d809 5f38 0015 2f00 ......8_... 0803beb5 : 803beb5: 6c2f 676f 6e69 682e 6d74 006c 5448 5054 /login.html.HTTP 803bec5: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 803bed5: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 803bee5: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 803bef5: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 803bf05: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 803bf15: 6e65 2d74 654c 676e 6874 203a 3835 0d37 ent-Length: 587. 803bf25: 430a 6e6f 656e 7463 6f69 3a6e 4320 6f6c .Connection: Clo 803bf35: 6573 0a0d 6f43 746e 6e65 2d74 7974 6570 se..Content-type 803bf45: 203a 6574 7478 682f 6d74 0d6c 430a 6e6f : text/html..Con 803bf55: 6574 746e 452d 636e 646f 6e69 3a67 6720 tent-Encoding: g 803bf65: 697a 0d70 0d0a 1f0a 088b 0000 0000 0400 zip............. 803bf75: 7d0a cd54 d46e 1030 157e 2463 754e 7bb7 .}T.n.0.~.c$Nu.{ 803bf85: a841 91c4 e950 1381 401c a382 cc93 5c6e A...P....@....n\ 803bf95: db1c 93d8 eeec e2ad 09c0 c409 2415 015e .............$^. 803bfa5: 03d1 8845 433e 8df6 2718 6ddb a423 e21e ..E.>C...'.m#... 803bfb5: d8f5 e333 67ef d9b4 a7bd 4fcf be5e 7179 ..3..g.....O^.yq 803bfc5: 6aca 4c6c a59e 1995 9765 7392 408a 7955 .jlL....e..s.@Uy 803bfd5: 00d6 562a 2ad6 4044 5bc9 885c 7447 9c37 ..*V.*D@.[\.Gt7. 803bfe5: 88d6 c05e 56bb 9277 16bf 9eaf 1388 78d7 ..^..Vw........x 803bff5: ba85 c030 e959 822c 92a5 a767 aa12 5c25 ..0.Y.,...g...%\ 803c005: 5917 80d5 9de4 9586 0177 e56f 74ad b585 .Y......w.o..t.. 803c015: a0ac 25d3 2188 d038 a356 4656 52c4 9019 ...%.!8.V.VF.R.. 803c025: 83f3 ad46 d375 fb36 8db8 8610 d140 f293 ..F.u.6.....@... 803c035: 9e88 8d40 f206 5bfe d57f edff b72f fbef ..@....[..../... 803c045: edab 7f79 fb49 6c8b de36 4665 b7db 0eac ..y.I..l6.eF.... 803c055: 90b0 51bc 1eda 3196 1672 48c0 711e 2063 ...Q...1r..H.qc 803c065: 00d6 9d48 1962 47b4 1b86 704f d611 3b38 ..H.b..G..Op..8; 803c075: 9d53 4f1a 8b39 94a1 383c 8703 9167 6792 S..O9...<8..g..g 803c085: 39e3 466d 0ad1 6d57 acf2 1dd2 8d2b 518a .9mF..Wm....+..Q 803c095: ab72 42ba 3605 88fe 160a 35aa 1d78 f42e r..B.6.....5x... 803c0a5: 2a1a ce81 a753 6aff ea44 6108 cabc b533 .*..S..jD..a..3. 803c0b5: 7e83 949f 5b1b b71b 0974 a282 aa8f eba7 .~...[..t....... 803c0c5: 76ad a0ab a7bc 4c46 9257 dcef baa1 9e7a .v....FLW.....z. 803c0d5: 9ff7 9ffb a97b f57e b63f 481f 4fba 65c4 ....{.~.?..H.O.e 803c0e5: c13e 95e3 c305 f586 c19a f014 9578 d3b8 >...........x... 803c0f5: c2f9 8685 12a9 b3b5 1392 a4c6 52f4 4673 .............RsF 803c105: 5393 423b 5de0 ee4c 39ef 2b68 0952 1a55 .S;B.]L..9h+R.U. 803c115: d055 143b eaec de78 257f 2f3f 8f92 0fc7 U.;...x..%?/.... 803c125: 116c e3fd 366c e524 b699 bdbe d26d 63be l...l6$.....m..c 803c135: 25ea 4b12 8932 d093 e869 1406 ff23 96dd .%.K2...i...#... 803c145: ca06 5d80 dcd2 f9f1 7243 0d35 1a40 408b ...]....Cr5.@..@ 803c155: 4570 cbd0 8f1a fcd9 afc8 a8a7 593c a04a pE..........hB...S. 803c195: 2a25 17fd f802 cc9b 24bd b30a ca24 3e74 %*.......$..$.t> 803c1a5: 1376 ce33 6ceb 17f8 07f8 a233 8ac5 0415 v.3..l....3..... 803c1b5: 0000 .. 0803c1b7 : 803c1b7: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 803c1c7: dc00 . 0803c1c8 : 803c1c8: c1dc 0803 cc53 0803 cc63 0803 1233 0000 ....S...c...3... 803c1d8: 0001 0000 .... 0803c1dc : 803c1dc: 4a8c 0804 9c8c 0803 9c98 0803 1802 0000 .J.............. 803c1ec: 0001 0000 .... 0803c1f0 : 803c1f0: 4a78 0804 c218 0803 c224 0803 04e3 0000 xJ......$....... 803c200: 0001 0000 .... 0803c204 : 803c204: 44bc 0804 1054 0804 1060 0804 2a56 0000 .D..T...`...V*.. 803c214: 0001 0000 .... 0803c218 : 803c218: 692f 646e 7865 682e 6d74 006c 5448 5054 /index.html.HTTP 803c228: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 803c238: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 803c248: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 803c258: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 803c268: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 803c278: 6e65 2d74 654c 676e 6874 203a 3031 3937 ent-Length: 1079 803c288: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 803c298: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 803c2a8: 3a65 7420 7865 2f74 7468 6c6d 0a0d 6f43 e: text/html..Co 803c2b8: 746e 6e65 2d74 6e45 6f63 6964 676e 203a ntent-Encoding: 803c2c8: 7a67 7069 0a0d 0a0d 8b1f 0008 0000 0000 gzip............ 803c2d8: 0a04 56bd 6f5d 44e3 fd14 832b 6979 baa5 ...V]o.D..+.yi.. 803c2e8: fba1 2084 54b6 8bba 4fb4 10ac f620 9a29 ... .T...O.. .). 803c2f8: 93d8 1678 ed7f 9278 6fb4 60fd 5161 8291 ..x...x..o.`aQ.. 803c308: a010 e17d 17f3 8174 9a40 dda6 30bf 47fe ..}...t.@....0.G 803c318: 3b9c bb8e 3521 5961 7d89 93b0 e7b1 7bde .;..!5aY.}.....{ 803c328: b9ee 5ee7 fb4f dbb5 edef 707d deff 161d ...^O.....}p.... 803c338: 24e9 dbf6 6774 4f31 9efb 60e3 7825 b7e8 .$..tg1O...`%x.. 803c348: a113 0b39 ae22 a10a 673d 7ba0 9bee 6778 ..9."...=g.{..xg 803c358: 469f e75a 78ae 9038 cf43 d8f9 70fd ddd7 .FZ..x8.C....p.. 803c368: 92cb 6b9c 8dd9 c385 2c82 22d5 c985 3bdd ...k.....,."...; 803c378: 089e a2fb 4a36 2279 673c c528 cf28 5e94 ....6Jy"...Vc...nN.. 803c668: fc2b 9a94 7ece 5783 0387 a0e5 2265 b13a +....~.W....e":. 803c678: d9e8 b581 273a 07fe 4045 3f09 e923 d047 ....:'..E@.?#.G. 803c688: ea2c c20e 0c41 d78d c599 8f58 f0d7 5655 ,...A.....X...UV 803c698: 1bfe ccb4 0011 3580 2140 9e45 8913 7e76 .......5@!E...v~ 803c6a8: f435 284f d677 fd55 7027 817f 76cb e564 5.O(w.U.'p...vd. 803c6b8: 3169 d8a8 834e 9537 acbd 5bb7 de8d 356e i1..N.7....[..n5 803c6c8: 6b61 e3aa cba2 d3ab 0bd2 b81c 79ec efed ak...........y.. 803c6d8: ae07 56b5 c87e 7f35 c717 bba7 c6e9 56e6 ...V~.5........V 803c6e8: 15ce 8a4f 05f7 7c86 6d11 be6c ae8d 67b1 ..O....|.ml....g 803c6f8: b43c 3d8f fefc 4905 2b6e 0ce6 000b 2f00 <..=...In+..... 0803c707 : 803c707: 662f 7661 6369 6e6f 692e 6f63 0000 0000 /favicon.ico.... 803c717: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 803c727: 530a 7265 6576 3a72 6c20 4977 2f50 2e31 .Server: lwIP/1. 803c737: 2e33 2031 6828 7474 3a70 2f2f 6173 6176 3.1 (http://sava 803c747: 6e6e 6861 6e2e 6e6f 6e67 2e75 726f 2f67 nnah.nongnu.org/ 803c757: 7270 6a6f 6365 7374 6c2f 6977 2970 0a0d projects/lwip).. 803c767: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 803c777: 3131 3035 0a0d 6f43 6e6e 6365 6974 6e6f 1150..Connection 803c787: 203a 6c43 736f 0d65 430a 6e6f 6574 746e : Close..Content 803c797: 742d 7079 3a65 6920 616d 6567 782f 692d -type: image/x-i 803c7a7: 6f63 0d6e 430a 6361 6568 432d 6e6f 7274 con..Cache-Contr 803c7b7: 6c6f 203a 7270 7669 7461 2c65 6d20 7861 ol: private, max 803c7c7: 612d 6567 383d 3436 3030 0a0d 0a0d 0000 -age=86400...... 803c7d7: 0001 0001 1010 0000 0000 0020 0468 0000 .......... .h... 803c7e7: 0016 0000 0028 0000 0010 0000 0020 0000 ....(....... ... 803c7f7: 0001 0020 0000 0000 0440 0000 0000 0000 .. .....@....... 803c807: 0000 0000 0000 0000 0000 0000 ffff 01ff ................ 803c817: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803c827: ffff 01ff ffff 01ff d2d2 ffd2 d2d2 ffd2 ................ 803c837: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803c847: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803c857: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803c867: 8d8d ff8d 8484 ff84 8989 ff89 8989 ff89 ................ 803c877: 8484 ff84 8d8d ff8d ffff 01ff ffff 01ff ................ 803c887: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803c897: ffff 01ff ffff 01ff a4a4 ffa4 8484 ff84 ................ 803c8a7: aeae ffae ffff 01ff ffff 01ff ffff 01ff ................ 803c8b7: ffff 01ff aeae ffae 8484 ff84 a4a4 ffa4 ................ 803c8c7: ffff 01ff ffff 01ff 8181 ff81 ffff 01ff ................ 803c8d7: ffff 01ff a0a0 ffa0 9a9a ff9a ffff 01ff ................ 803c8e7: c7c7 ffc7 8f8f ff8f 8585 ff85 8585 ff85 ................ 803c8f7: 8f8f ff8f caca ffca ffff 01ff d5d5 ffd5 ................ 803c907: ffff 01ff 7777 ff77 ffff 01ff ffff 01ff ....www......... 803c917: d5d5 ffd5 8484 ff84 ffff 01ff a8a8 ffa8 ................ 803c927: 8c8c ff8c bbbb ffbb ffff 01ff ffff 01ff ................ 803c937: baba ffba afaf ffaf ffff 01ff ffff 01ff ................ 803c947: 6465 ff5b ffff 01ff ffff 01ff ffff 01ff ed[............. 803c957: 9898 ff98 b0b0 ffb0 d5d5 ffd5 8484 ff84 ................ 803c967: dada ffda 9595 ff95 8484 ff84 9d9d ff9d ................ 803c977: d7d7 ffd7 ffff 01ff 9898 ff97 7a7b ff73 ............{zs. 803c987: cedb ff79 c0d2 ff55 ffff 01ff ffff 01ff ..y...U......... 803c997: 9393 ff93 ffff 01ff a4a4 ffa4 bebe ffbe ................ 803c9a7: bdbd ffbd d1d1 ffd1 ffff 01ff ffff 01ff ................ 803c9b7: b4b5 ffae 5f5f ff5d 979d ff6b c0d2 ff55 ....__]...k...U. 803c9c7: ffff 01ff b5c9 ff35 ffff 01ff ffff 01ff ......5......... 803c9d7: f0f0 fff0 ffff 01ff f1f1 fff1 ffff 01ff ................ 803c9e7: d5d5 ffd5 cfd0 ffce 8585 ff85 6060 ff60 ............```. 803c9f7: 9194 ff85 b5ca ff37 ffff 01ff b9cc ff41 ......7.......A. 803ca07: ffff 01ff b4c9 ff33 ffff 01ff 6262 ff62 ......3.....bbb. 803ca17: 5d5e ff5c 5c5c ff5c 5d5e ff5c 6161 ff60 ^]\.\\\.^]\.aa`. 803ca27: 6567 ff5b 8486 ff7b ffff 01ff ffff 01ff ge[...{......... 803ca37: ffff 01ff b5ca ff37 ffff 01ff b9cc ff41 ......7.......A. 803ca47: ffff 01ff b4c9 ff33 ffff 01ff ffff 01ff ......3......... 803ca57: b5c9 ff35 ffff 01ff c0d2 ff55 ffff 01ff ..5.......U..... 803ca67: c4d4 ff5e c3d4 ff5c ffff 01ff ffff 01ff ..^...\......... 803ca77: c3d4 ff5c c4d4 ff5e cedb ff79 c0d2 ff55 ..\...^...y...U. 803ca87: ffff 01ff b5c9 ff35 ffff 01ff ffff 01ff ......5......... 803ca97: c0d1 ff54 cfdc ff7d ffff 01ff b4c9 ff33 ..T...}.......3. 803caa7: ffff 01ff bed0 ff50 b4c9 ff33 b4c9 ff33 ......P...3...3. 803cab7: c0d2 ff55 ffff 01ff b4c9 ff33 ffff 01ff ..U.......3..... 803cac7: cedb ff79 c0d2 ff55 ffff 01ff ffff 01ff ..y...U......... 803cad7: ffff 01ff b4c9 ff33 ffff 01ff cad9 ff6f ......3.......o. 803cae7: b9cc ff41 d6e1 ff8f ffff 01ff ffff 01ff ..A............. 803caf7: d5e0 ff8c b9cc ff40 cedb ff79 ffff 01ff ......@...y..... 803cb07: b4c9 ff33 ffff 01ff ffff 01ff ffff 01ff ..3............. 803cb17: ffff 01ff c5d5 ff62 c1d2 ff58 ffff 01ff ......b...X..... 803cb27: ffff 01ff bbce ff46 b5c9 ff35 b5c9 ff35 ......F...5...5. 803cb37: bbce ff46 ffff 01ff ffff 01ff c0d2 ff55 ..F...........U. 803cb47: c5d5 ff62 ffff 01ff ffff 01ff ffff 01ff ..b............. 803cb57: ffff 01ff ffff 01ff c8d7 ff69 b4c9 ff33 ..........i...3. 803cb67: cedb ff79 ffff 01ff ffff 01ff ffff 01ff ..y............. 803cb77: ffff 01ff cedb ff79 b4c9 ff33 c8d7 ff69 ......y...3...i. 803cb87: ffff 01ff ffff 01ff ffff 01ff ffff 0dff ................ 803cb97: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803cba7: b9cd ff42 b4c9 ff33 b7cb ff3b b7cb ff3b ..B...3...;...;. 803cbb7: b4c9 ff33 b9cd ff42 ffff 01ff ffff 01ff ..3...B......... 803cbc7: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803cbd7: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803cbe7: ffff 01ff ffff 01ff e4eb ffb5 e4eb ffb5 ................ 803cbf7: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803cc07: ffff 01ff ffff 01ff ffff 01ff 0000 ffff ................ 803cc17: 0000 ffff 0000 ffff 0000 ffff 0000 ffff ................ 803cc27: 0000 ffff 0000 ffff 0000 ffff 0000 ffff ................ 803cc37: 0000 ffff 0000 ffff 0000 ffff 0000 ffff ................ 803cc47: 0000 ffff 0000 ffff 0000 ffff ............ 0803cc53 : 803cc53: 732f 7465 6974 676e 2e73 7468 6c6d 0000 /settings.html.. 803cc63: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 803cc73: 530a 7265 6576 3a72 6c20 4977 2f50 2e31 .Server: lwIP/1. 803cc83: 2e33 2031 6828 7474 3a70 2f2f 6173 6176 3.1 (http://sava 803cc93: 6e6e 6861 6e2e 6e6f 6e67 2e75 726f 2f67 nnah.nongnu.org/ 803cca3: 7270 6a6f 6365 7374 6c2f 6977 2970 0a0d projects/lwip).. 803ccb3: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 803ccc3: 3434 3738 0a0d 6f43 6e6e 6365 6974 6e6f 4487..Connection 803ccd3: 203a 6c43 736f 0d65 430a 6e6f 6574 746e : Close..Content 803cce3: 742d 7079 3a65 7420 7865 2f74 7468 6c6d -type: text/html 803ccf3: 0a0d 6f43 746e 6e65 2d74 6e45 6f63 6964 ..Content-Encodi 803cd03: 676e 203a 7a67 7069 0a0d 0a0d 8b1f 0008 ng: gzip........ 803cd13: 0000 0000 0a04 5bdd 736b d51b fe19 cb2b .......[ks....+. 803cd23: 3286 d8f2 2d92 205f 2c71 da75 6524 5332 .2...-_ q,u.$e2S 803cd33: 8788 0538 793e d2d6 5ada ed22 d58a 4eca ..8.>y...Z"....N 803cd43: c99a 2e4c d2d0 8521 8424 50c2 0848 7ebd ..L...!.$..PH..~ 803cd53: 35a1 e6e4 f95c ab0b d47f 79e7 d9cf a49b .5..\......y.... 803cd63: e595 7ce0 87e9 bb38 3dab 7de7 7bce df7f ...|..8..=.}.{.. 803cd73: 7673 a5e9 27a3 ac8e bbbc cc7c 0468 66ad sv...'....|.h..f 803cd83: 8975 8d7f e5a6 546e 134c b677 af55 b52e u.....nTL.w.U... 803cd93: c0ec 6a32 cb0d d8ef c541 06ec c5eb f883 ..2j....A....... 803cda3: 9e4d 8236 5da0 dfb4 3aef 159b 9df3 a9e2 M.6..]...:...... 803cdb3: 155f 788f b6ad 3815 4d6b 34db 9e6a d81b _..x...8kM.4j... 803cdc3: 862e 3f1c b156 1beb 3476 b5c8 765a dcc5 ...?V...v4..Zv.. 803cdd3: ec74 b6ad 07e7 f7a9 9cb6 d07a d4a8 4ded t.........z....M 803cde3: 66a7 e517 ca66 9d71 b1c0 c59a cd4e da6a .f..f.q.....N.j. 803cdf3: f295 cb54 e33a bab4 f8ad dbbe 7db1 b1b9 ..T.:........}.. 803ce03: b240 0332 8112 3413 6aed 4df8 ddb8 d8bb @.2....4.j.M.... 803ce13: d4bb 10bb 0b3e 861f c28f a59d f569 52cb ....>.......i..R 803ce23: 71d3 1b4f df0d af5e 2d98 71cb b54b c74e .qO...^..-.qK.N. 803ce33: 7c34 59bb 3b31 d9c1 dda6 d869 8076 3a79 4|.Y1;....i.v.y: 803ce43: df35 0769 7046 0db6 81b0 267d 7e98 dacf 5.i.Fp....}&.~.. 803ce53: d4b4 d353 f8e8 8ab5 7be9 bb4d 5ef4 2f07 ..S......{M..^./ 803ce63: ab4f b8e7 2c50 f35b 67ea 4bab 6775 70d3 O...P,[..g.Kug.p 803ce73: 15ea e6b3 dd75 b8a0 5be5 bc6d 799a f758 ....u....[m..yX. 803ce83: 5cb6 6b3c c357 80af a9f3 fbc6 7c38 de1c .\.. 803cf13: 1aee 8fe1 bca4 7143 e5e0 bd27 06cb 8516 ......Cq..'..... 803cf23: 16d7 4205 6ec7 b5da 50c0 d14a 36f4 771c ...B.n...PJ..6.w 803cf33: d795 5aa6 0648 29d1 1b08 d2ea c004 498a ...ZH..).......I 803cf43: 456c 18aa 00a4 5e30 289b 4d8d d9ab bc85 lE....0^.(.M.... 803cf53: 6acc bd78 71f7 83f8 66f0 7487 f009 a819 .jx..q...f.t.... 803cf63: 015e 9f07 3f85 2c02 00c1 d2c5 1ab4 3fda ^....?.,.......? 803cf73: 3505 accb 6ff2 1bde bd56 40e5 f27a f25f .5...o..V..@z._. 803cf83: b4ce 505a 6975 57cd 1cff ddb7 640d 5e35 ..ZPui.W.....d5^ 803cf93: deb3 aade 5a9b daa7 9f11 ae87 68c8 ad37 .....Z.......h7. 803cfa3: dd9a 10c0 afdb e198 4a77 bd72 853f e13b ........wJr.?.;. 803cfb3: 34c3 afb3 0cc4 de11 3341 df9d 0183 33b3 .4......A3.....3 803cfc3: 9710 a675 bb69 301b b329 aafc 39a9 0c4c ..u.i..0)....9L. 803cfd3: 0c20 0d8e 73e2 9161 89cf 1bef 1532 ff1c ....sa.....2... 803cfe3: d859 7f48 3634 6edf 16db 865c cab2 713d Y.H.46.n..\...=q 803cff3: 96f0 bc20 3e14 9683 2342 577a a5a8 07fb .. ..>..B#zW.... 803d003: 2dfa ac85 ad9f e80a 375a 3c08 ab57 d374 .-......Z7.. 803d063: eccc a3ed 8985 97a9 59ca 3f82 5f81 30db .........Y.?._.0 803d073: e118 d419 9a66 1786 8e79 7fc4 c268 b5ae ....f...y...h... 803d083: 66b9 d0f9 fe35 ac57 ebdb b756 e349 db96 .f..5.W...V.I... 803d093: e775 5d8c 062f e45e 3306 8a63 9cf4 3934 u..]/.^..3c...49 803d0a3: c87a 92ea 5da5 e3b4 edd6 2533 a586 7178 z....]....3%..xq 803d0b3: 7450 408f 2cac 688a 01c4 e7c5 ed96 8b76 Pt.@.,.h......v. 803d0c3: 1c0e 7e84 dbb5 988c 3403 2211 aa5c 79b7 ...~.....4."\..y 803d0d3: 4551 1868 b84a de1a e712 4db6 d3ee f747 QEh.J......M..G. 803d0e3: 563e f9d4 7a7e 020c e064 1bb8 2c9d 3a5e >V..~z..d....,^: 803d0f3: 4dd0 bf44 3161 6b89 9fe8 71c5 3dd7 4335 .MD.a1.k...q.=5C 803d103: fc35 4112 03e1 d9d1 8027 07f0 0148 6b0e 5..A....'...H..k 803d113: a0d8 d386 3c09 6cff ee34 bd2f 90cb 1c1b .....<.l4./..... 803d123: f873 7938 ba7f 088b 203f c632 36a5 ab1d s.8y....? 2..6.. 803d133: 550a b312 8bc1 7946 6028 5e3c 2b02 2ef9 .U....Fy(`<^.+.. 803d143: d2d4 23a9 7bd8 716e 3bcd 3643 7e73 1989 ...#.{nq.;C6s~.. 803d153: 99fc d017 28a5 c47c a9bc 386d 2849 3e59 .....(|...m8I(Y> 803d163: 7271 2305 a0a3 5818 786b a30f 6ab4 7ba8 qr.#...Xkx...j.{ 803d173: 82f5 4dd0 439e f462 6962 1ff6 b8e8 76ad ...M.Cb.bi.....v 803d183: 0462 ef8a d62b 599a f93d 1be6 09cb 321f b...+..Y=......2 803d193: 1c63 ebd7 9a22 b785 b1c1 e10f 115d 1e29 c...".......].). 803d1a3: 2fc1 1620 7983 208f 1ced 1f59 ed70 8b60 ./ ..y. ..Y.p.`. 803d1b3: a8e3 f012 f4ce 127e 1865 7706 94d5 8803 ......~.e..w.... 803d1c3: 4c2b f473 1704 c0c4 e62e f440 7aad c1d7 +Ls.......@..z.. 803d1d3: c362 a0ab 3da2 1318 5181 70fa 0dc0 0ac0 b....=...Q.p.... 803d1e3: 4186 0d66 d24f d36a 06a7 5594 7196 3ae0 .Af.O.j....U.q.: 803d1f3: 05f2 445b 89b7 c07c ea65 1146 ee69 c7f3 ..[D..|.e.F.i... 803d203: d8a6 942b 623d 9c6e 6449 625e 6422 1074 ..+.=bn.Id^b"dt. 803d213: 19e0 379c af7c 67db 35fb 69af 3930 2d59 ...7|..g.5.i09Y- 803d223: 7aaf abeb 14b3 b5a8 3766 280d d30f d733 .z......f7.(..3. 803d233: 2782 be3c eb1c c0c3 c2eb 727e f98f 1952 .'<.......~r..R. 803d243: c4b6 19d1 03b0 3243 937e 5d89 3b3c 3635 ......C2~..]<;56 803d253: 294e c544 0853 8254 3c92 2c88 1869 d9de N)D.S.T..<.,i... 803d263: ca78 ea01 c019 2fb3 300e f420 2621 9573 x....../.0 .!&s. 803d273: 0ff1 3c83 2637 b9e4 0717 1019 20fa 8dcf ...<7&....... .. 803d283: 3c84 263f f9e4 0717 1019 20fa 8fcf bc84 .2&...o.G.be.. 803d303: 20b1 c1bc 11aa 1841 0c21 ef71 8aa9 bab0 . ....A.!.q..... 803d313: 64ac 6e5c a3cc 67de 1fe5 214d 5837 a053 .d\n...g..M!7XS. 803d323: f0ca 2500 d058 8b88 156b d1d0 6808 c7a8 ...%X...k....h.. 803d333: 1037 1f19 594a f48a bc36 7ea7 e698 bc20 7...JY..6..~.. . 803d343: ad22 408f f215 4f32 8abd 12f8 1fa0 7fc2 "..@..2O........ 803d353: aa99 eeb5 6320 1861 0b95 ff1d c132 bfa4 .... ca.....2... 803d363: 2cb8 3233 cf23 6c78 c320 16bb 4ade c7ca .,32#.xl ....J.. 803d373: 1d6c 9f0b d4cd 58c5 8e41 bc96 9713 0298 l......XA....... 803d383: 0347 4856 85a7 9103 4fa3 3689 6e66 681c G.VH.....O.6fn.h 803d393: 3147 5bfe 0670 083d 4e74 a662 ac7f f9aa G1.[p.=.tNb..... 803d3a3: 607d 97fb f2c2 e867 3c5c db05 3d1f db37 }`....g.\<...=7. 803d3b3: 4f7d 5db3 c62e fb65 d057 7626 7604 73a4 }O.]..e.W.&v.v.s 803d3c3: ed02 1e42 8e85 4b05 661c 926e 0f60 08ef ..B....K.fn.`... 803d3d3: 1840 e148 41d9 de79 1019 44cf 279c ad8f @.H..Ay....D.'.. 803d3e3: 948c d6a6 a437 4307 cdf5 10f7 a9dd 726f ....7..C......or 803d3f3: fff1 f0b4 6d69 5970 1e35 cde6 fb24 994e ....impY5...$.N. 803d403: 733d 5dd2 d99c 89ae 7efa b4b9 d9b4 bcb1 =s.].....~...... 803d413: 7546 6684 4ea8 2374 a6e7 6922 9335 4a8d Fu.f.Nt#.."i5..J 803d423: ce31 4a5a e887 a37a d6d6 459e 50ae 4bbc 1.ZJ..z....E.P.K 803d433: 0ea5 834f 93fb 1581 85d8 b409 5002 b29f ..O..........P.. 803d443: 75b7 2a19 5aad c71b 8b97 e8d0 e2bb 2f38 .u.*.Z........8/ 803d453: 728a 6eb3 f940 b6ca a257 68f9 ea8a 4334 .r.n@...W..h..4C 803d463: 38b1 0e15 b69d af55 28a3 dad4 c315 dc8f .8....U..(...... 803d473: 9647 4802 cdc7 ed56 b750 b9e3 ecd3 b888 G..H..V.P....... 803d483: 4d10 5993 2efe 78c9 4904 43c5 177d bab9 .M.Y...x.I.C}... 803d493: f414 ad8d 61b1 047f 7dae 52c2 df6a 12c1 .....a...}.Rj... 803d4a3: 0284 ab8a 2021 565b 74e7 cc3e 6bf0 4a48 ....! [V.t>..kHJ 803d4b3: 937c 5bea c5de 430d 2260 fdb0 aa62 a1c2 |..[...C`"..b... 803d4c3: ca90 8475 6d35 ea74 249a 58a5 a5d4 a46b ..u.5mt..$.X..k. 803d4d3: e31b 12a5 d0ac 2aa2 3317 c90d f63b 2b56 .......*.3..;.V+ 803d4e3: 36b2 1518 aec2 b3c2 d7b3 7e8d db33 d4bc .6.........~3... 803d4f3: 007f e1d0 07ec 0431 fbfa e47b f329 d508 ......1...{.)... 803d503: d3a3 c59d 61a8 b5a7 6a3f e9a7 967e c469 .....a..?j..~.i. 803d513: b45d 2b35 b158 413b dce1 d77a 2dad f2be ].5+X.;A..z..-.. 803d523: d77e 0e0b 11a3 56d3 e757 9c61 dae8 f1b1 ~......VW.a..... 803d533: adbd 8dba 370c 6e06 a9ef 4b87 8ad3 ba12 .....7.n...K.... 803d543: fb79 bf47 74ee 5bb8 61b3 40a7 017c 3f00 y.G..t.[.a.@|..? 803d553: 4ad1 47c3 f229 c46c 333f 85c0 f0ed ba01 .J.G).l.?3...... 803d563: 9f5a 16e2 f096 2002 4e05 a34b e299 e2e5 Z...... .NK..... 803d573: 05cb 2d85 ef00 9356 271f d24a 14ea 0db6 ...-..V..'J..... 803d583: 1c47 4ba3 2217 ec23 6e28 a47f 5d57 2380 G..K."#.(n..W].# 803d593: 09dc 4e9f abec ebd1 6d26 db39 4778 9ddf ...N....&m9.xG.. 803d5a3: 1326 33af 0576 4989 f50d bbb0 f769 ed90 &..3v..I....i... 803d5b3: e7a2 6350 5342 6511 3555 c3de 1be1 313a ..PcBS.eU5....:1 803d5c3: f7d7 a6a8 1f9c 79db df45 f35e 763c 6ea3 .......yE.^..4...&..o.|.s8 803d713: 3ded d7d3 2791 6d95 489c c6bd b4ca 36ff .=...'.m.H.....6 803d723: 6f90 ad32 46e3 1196 18ee 41d8 0d92 2421 .o2..F.....A..!$ 803d733: 08be 838f 50e1 eded 2dec a715 5274 dc56 .....P...-..tRV. 803d743: 6a0d 0c23 5fe2 d952 08f0 0e06 88e6 477b .j#.._R.......{G 803d753: 8e72 2f9d c1ed 9ed2 dfb5 a298 9bae b636 r../..........6. 803d763: 874c 174d 425b 769b 8bc1 aefe b15b 5b3c L.M.[B.v....[.<[ 803d773: 11c2 c2a1 6feb 18ac 5eb8 999c 3099 efc2 .....o...^...0.. 803d783: 0ba5 0dc5 5624 8fc8 0ca6 1328 415a d9e0 ....$V....(.ZA.. 803d793: fc7d 4dd5 a4b0 935b cfed cb15 d4e5 658c }..M..[........e 803d7a3: a335 fc24 32e0 68d6 90a0 41db 7e1d f7b9 5.$..2.h...A.~.. 803d7b3: f0e7 a621 8dbe 9f29 07e0 3c64 7bc3 c54c ..!...)...d<.{L. 803d7c3: 4cf2 c26a 3519 67e1 4518 0f48 b029 719c .Lj..5.g.EH.)..q 803d7d3: 9287 8761 a8d4 52ab 48f6 9911 ea3b 3260 ..a....R.H..;.`2 803d7e3: a0ea f51a da1d 3c03 03b6 4056 5045 b0b5 .......<..V@EP.. 803d7f3: c064 f21d ad28 e839 1596 90b0 877f 4557 d...(.9.......WE 803d803: be9f 4be2 07f8 431d 9d42 ee83 84b5 6bce ...K...CB......k 803d813: 9ad1 1ca4 d9fb bf33 cc9a aafc f99a 549f ......3........T 803d823: ee6d 03d2 cf14 30fb 1c1f 3d0b f3e4 d435 m......0...=..5. 803d833: 9b80 58c0 ee71 165a 8a12 8a0b 75e2 2504 ...Xq.Z......u.% 803d843: 78d6 a5aa 3e39 6bb5 7640 a307 1d50 f682 .x..9>.k@v..P... 803d853: 415f 0d17 5c9a f3ba dd09 4579 2af7 3e46 _A...\....yE.*F> 803d863: 1916 9ba5 033a d3f4 1212 56f5 d43b bbc8 ....:......V;... 803d873: 177b ee85 5176 14c2 308c 7c47 2573 3f04 {...vQ...0G|s%.? 803d883: 3665 8b73 b473 6f9a 577a 7e90 807c e429 e6s.s..ozW.~|.). 803d893: 9934 b74e 8eef 2198 bc36 0539 9afe e808 4.N....!6.9..... 803d8a3: 1601 98fd 574d b900 6626 7102 2ef5 b116 ....MW..&f.q.... 803d8b3: fdd5 8e90 104a 80de 5229 605b e492 4915 ....J...)R[`...I 803d8c3: 12e6 594a 36b8 dbf0 079c 5163 51f1 3017 ..JY.6....cQ.Q.0 803d8d3: 0e75 20db dc8a d369 ae66 cf99 6483 45c8 u.. ..i.f....d.E 803d8e3: 1e68 6652 0e88 1680 1b5d 99e5 37b9 2fc2 h.Rf....]....7./ 803d8f3: 8200 84de 08ea d04a deb5 18c7 2b9c d8ef ......J......+.. 803d903: 800f 52db 8b0b c18d d8d2 fead 8c5c 19f1 ...R........\... 803d913: dd0f 0489 5e71 2b01 5fc4 e3b9 3b51 8ccc ....q^.+._..Q;.. 803d923: 485a 813d e802 d17b 0016 a5ce ac9a 5273 ZH=...{.......sR 803d933: 337b 09c8 e692 3c84 772e 0405 7b58 38e2 {3.....<.w..X{.8 803d943: 4822 01de 3b91 c2bc 7453 a4ac 08e1 8777 "H...;..St....w. 803d953: 753b 6660 bc27 c79f 44d1 934e 4e5a 915f ;u`f'....DN.ZN_. 803d963: e18d 428f 8e80 f297 3fe2 769c d4e4 fe78 ...B.....?.v..x. 803d973: e81f 6681 d5c0 07de 4c78 cd43 ca5d 6c5c ...f....xLC.].\l 803d983: 932f e55a a6be 304c c944 be87 29f8 784f /.Z...L0D....)Ox 803d993: fb50 fde9 0599 c4e3 fe25 01de 6bb1 36b2 P.......%....k.6 803d9a3: 3578 fd21 ef7d 3142 96fc 1a8a 2ae6 6279 x5!.}.B1.....*yb 803d9b3: 2025 5628 53c2 e07b 660f a904 4e3c 7624 % (V.S{..f.....AM@ 803d9f3: 3b42 a0e4 0e29 0d0a ff37 e1c4 6a4d f787 B;..)...7...Mj.. 803da03: f939 39ae 1146 5c25 dec3 100e c830 bb11 9..9F.%\....0... 803da13: 1de2 9008 ac03 051f 76e5 23ef 178c 9d27 .........v.#..'. 803da23: 324f b946 50a0 57d2 c13e d894 c293 c424 O2F..P.W>.....$. 803da33: df4c 858e d3c3 ff2b 2919 f2a0 e26a c8a0 L.....+..)..j... 803da43: 5a43 2e5d 1637 af4a 08a5 2fcd d6c0 9688 CZ].7.J..../.... 803da53: ecc7 1ca8 dc08 0879 b893 a933 0ee3 2de2 ......y...3....- 803da63: 3187 02d1 0a42 0d0f f0c8 a09e fe45 f1af .1..B.......E... 803da73: bae7 2498 4e44 10ea 0d49 8da4 fc31 2f32 ...$DN..I...1.2/ 803da83: 87f9 23dc 926b 99e9 509d a80a f286 206d ...#k....P....m 803da93: ef89 3a93 43be 31d5 420c 24c3 58d2 9510 ...:.C.1.B.$.X.. 803daa3: adba 0d2c b253 7849 bf01 067d b0a2 f90e ..,.S.Ix..}..... 803dab3: 277b 098f d249 a931 8e93 6aff c091 30cc {'..I.1....j...0 803dac3: 77c9 8e44 9fa9 9ae1 2655 b13a bab8 1d09 .wD.....U&:..... 803dad3: ec11 14f2 7924 1734 921a 9acb 7143 01f8 ....$y4.....Cq.. 803dae3: d119 abd9 76f0 ec14 2636 8987 2262 1bf0 .....v..6&..b".. 803daf3: 7053 371f d0d7 a952 64d5 a759 d756 1265 Sp.7..R..dY.V.e. 803db03: 0706 a3e4 882a f20b 486c 9f17 fecb da84 ....*...lH...... 803db13: 10e4 24ef eb21 2c33 ca09 c79e 549f 3876 ...$!.3,.....Tv8 803db23: d659 94fe 7a6a ff07 5b00 7084 3c1b ca52 Y...jz...[.p.es 803dc93: 3e16 f7bf 0321 2c08 e939 c0b1 ee31 88d5 .>..!..,9...1... 803dca3: d976 4e80 34a3 6c0d 49b3 96e3 7ec7 55d4 v..N.4.l.I...~.U 803dcb3: 97ac 46e9 fa4e 6dba 27c8 1546 3e53 5a6e ...FN..m.'F.S>nZ 803dcc3: cf2c fccc 6302 d9c6 6bf9 4efb f2cb 8ecf ,....c...k.N.... 803dcd3: c838 beaf f800 8e0d 76b0 29d4 ec7e 80b6 8........v.)~... 803dce3: ac27 9929 cbaa 80b9 75b8 e63f 4e3e 87ff '.)......u?.>N.. 803dcf3: f408 6ab3 073f 55ae c73a 903f 6ced e8df ...j?..U:.?..l.. 803dd03: 434d 55f5 3b11 5533 5bdd 569a 9307 f8c6 MC.U.;3U.[.V.... 803dd13: 4a9c c6be 7eca 354e 5472 e8f5 6fbb beae .J...~N5rT...o.. 803dd23: ec7d a5d7 9c15 2f1a 5101 5db7 e738 17d4 }....../.Q.]8... 803dd33: b44d e4c9 f914 be14 39de 79e2 1da7 b3bb M........9.y.... 803dd43: d2f8 f9cc c389 fc9b 2134 1472 e3bf 42a7 ........4!r....B 803dd53: f187 1ca2 7fd9 d8fd d80a 72f6 d641 f7a7 ...........rA... 803dd63: 2693 b04a f959 825a bbbb c23c 985c 8738 .&J.Y.Z...<.\.8. 803dd73: 0a2f 1dd6 55bf 5530 04fa b2e6 c477 1ff2 /....U0U....w... 803dd83: 35cd 97c9 f7a4 a0c0 350e 57e5 f85c 89fc .5.......5.W\... 803dd93: bb09 3d84 7684 b124 e712 2075 0446 2d97 ...=.v$...u F..- 803dda3: 5faa 139a bcaf 6852 567a 9dfd 7e37 d47b ._....RhzV..7~{. 803ddb3: 15ab f5cc 55ad a405 23c4 53f3 2026 139a .....U...#.S& .. 803ddc3: e253 963c a9f9 c4c6 e279 ef4d 0ddf cc05 S.<.....y.M..... 803ddd3: 9277 d00f 6026 f8d7 adca 9d04 bb85 5b3d w...&`........=[ 803dde3: d731 5e9a b4ed cc99 1cb4 967d f394 22a6 1..^......}...." 803ddf3: f03a 4b11 e92e 2fc1 f4b8 2f2e d2be 5522 :..K.../.../.."U 803de03: 51fd f654 fea1 6912 43d8 09fd f650 51a7 .QT....i.C..P..Q 803de13: 740b 9c3d 1a0c 7d67 a2f2 2f2c f1d1 cba1 .t=...g}..,/.... 803de23: b48a c0c1 9be9 5b73 42f8 dbc5 812a f28b ......s[.B..*... 803de33: 4429 7d49 0859 97e7 14fe 7ce4 52b9 b0d9 )DI}Y......|.R.. 803de43: 2383 1faf e02f 1bc3 26fc 8522 71c0 02b9 .#../....&"..q.. 803de53: 882f 104f f60a d954 539e 4d32 99ed 050e /.O...T..S2M.... 803de63: 3d40 47c6 6a5e 50a7 3aa6 109c a9b0 e347 @=.G^j.P.:....G. 803de73: 9d0b 21aa 219f c8e6 4a7b cb78 0a37 cd2f ...!.!..{Jx.7./. 803de83: e740 a70e 763f 37e4 ffa3 1103 a13e 43e5 @...?v.7....>..C 803de93: 003a 2f00 :.. 0803de96 : 803de96: 6d2f 6961 2e6e 7363 0073 0000 5448 5054 /main.css...HTTP 803dea6: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 803deb6: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 803dec6: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 803ded6: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 803dee6: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 803def6: 6e65 2d74 654c 676e 6874 203a 3031 3435 ent-Length: 1054 803df06: 0d35 430a 6e6f 656e 7463 6f69 3a6e 4320 5..Connection: C 803df16: 6f6c 6573 0a0d 6f43 746e 6e65 2d74 7974 lose..Content-ty 803df26: 6570 203a 6574 7478 632f 7373 0a0d 6f43 pe: text/css..Co 803df36: 746e 6e65 2d74 6e45 6f63 6964 676e 203a ntent-Encoding: 803df46: 7a67 7069 0a0d 6143 6863 2d65 6f43 746e gzip..Cache-Cont 803df56: 6f72 3a6c 7020 6972 6176 6574 202c 616d rol: private, ma 803df66: 2d78 6761 3d65 3638 3034 0d30 0d0a 1f0a x-age=86400..... 803df76: 088b 0000 0000 0400 d50a 6b7d 238f 7239 ..........}k.#9r 803df86: 5fe0 a791 e7d0 6dae a349 bd57 d854 79c2 ._.....mI.W.T..y 803df96: f6c6 80f9 c05b bd80 da9f 418d 994a ca55 ....[......AJ.U. 803dfa6: 496d 4829 eeaa d1aa 3fe9 0718 3818 70e0 mI)H.....?...8.p 803dfb6: ec7e f01f e95f e49f 9278 2641 a533 ef6a ~..._...x.A&3.j. 803dfc6: bb87 9dad 2519 119f 88c1 3060 2418 fc7f .....%....`0.$.. 803dfd6: 9fcd d675 76d5 2d95 5fcb fe8b b77c 7ceb ..u..v.-._..|..| 803dfe6: f719 fd07 e751 767f f77e ffdf f3be ca3f ....Q..v~.....?. 803dff6: b179 15de f5f0 ee54 65fb a3f5 db2b cdf9 y.....T..e..+... 803e006: fd8f f565 7554 edb3 9cbe 8b2f b66e f32b ..e.Tu..../.n.+. 803e016: 9ba2 fb17 5cac baee e58f 3cd3 ecdb 6acb .....\.....<...j 803e026: 3f8d b79f f745 aab1 c5f6 bbb6 b228 ff1c .?..E.......(... 803e036: b4f3 9ead dd37 5655 bbae 62ab dcfd 675d ....7.UV...b..]g 803e046: ba5f 62bb 354e cf76 55ab 7db6 e43d 6ee5 _..bN5v..U.}=..n 803e056: ccb3 a75e 65b3 ff35 ec7c 36ef 7ae5 bd56 ..^..e5.|..6.zV. 803e066: 2efc 7edb e6ee eb8f 63c3 deb5 76f7 d7fb ...~.....c...v.. 803e076: 3165 f72d c080 d8fc 5687 d966 bbb6 9e7b e1-......Vf...{. 803e086: 3fc1 c39b daa6 d895 74e2 2c5b 7db3 a5f9 .?.......t[,.}.. 803e096: 12a0 cb0f 21f2 f6eb d937 58ba 10f6 729e .....!..7..X...r 803e0a6: d4fd efed d9b3 78b2 e3d8 c3f7 0b7e fa3f .......x....~.?. 803e0b6: c59b 5961 01ec dee8 936e a1cd b4d0 183f ..aY....n.....?. 803e0c6: ab15 3f63 3003 14bf fedd bf6c 3fee f356 ..c?.0....l..?V. 803e0d6: 1de7 9cfd 9f9a ea8b 200b e089 6750 e59a ......... ..Pg.. 803e0e6: 29be b0ff 5e2f bdf6 98bc 5b57 0e00 5ca0 .)../^....W[...\ 803e0f6: 6b57 b086 bcfb 7844 f8a0 b0ee 772c 258a Wk....Dx....,w.% 803e106: 23e7 7e19 5eaa 44ba f80f 29d1 9bd7 7de7 .#.~.^.D...)...} 803e116: fe97 71fd baff 7e29 2bbb edb2 f17c d0e9 ...q..)~.+..|... 803e126: 5afb 3ecc fb97 b65e 40d9 b64a 179e c5d2 .Z.>..^..@J..... 803e136: cb2c 189f c3fe 45d7 2fb9 4108 fccc cdba ,......E./.A.... 803e146: 4736 89c0 aa86 634f cd34 711e fadc 3832 6G....Oc4..q..28 803e156: 1807 6ceb 9d3b fb55 b1c5 3d5c 9775 53c5 ...l;.U...\=u..S 803e166: ceb1 b30f 0b6a 3ac3 1c1d bbf9 cfbb fbbb ....j..:........ 803e176: 61c5 e593 5c48 5e48 57ec 1e4b c7b0 556c .a..H\H^.WK...lU 803e186: 5f2e 7fa7 2db1 65b3 6ff7 e58a 0297 27f8 ._...-.e.o.....' 803e196: eeeb f5b2 b7ae b62b e3e5 82bd e44d 01d9 ......+.....M... 803e1a6: f65f fcb2 cf0f fdbb 3874 bc18 efbb 76ad _.......t8.....v 803e1b6: 64bd 71ce e556 07af 9c60 72a7 1d3d cfdc .d.qV...`..r=... 803e1c6: f9b2 4467 9d60 e6f7 b2d5 4eda fe2f f6ea ..gD`......N/... 803e1d6: 7eaf ebfa bde1 8d7c e3c7 1c7b c7a5 f565 .~....|...{...e. 803e1e6: f7b5 dd3a b7cd 72d5 bf79 ca28 05a7 74f7 ..:....ry.(....t 803e1f6: 9ecc b2f3 ceea f5b3 6c97 ddd7 ab6c 6da7 .........l..l..m 803e206: dbb1 bf75 9b00 8e57 cb35 b2f5 175c e23d ..u...W.5...\.=. 803e216: 7bd0 0d68 5971 80f6 9f19 d3d6 b659 302b .{h.qY......Y.+0 803e226: 1b97 ea02 dfee 9c7f cf03 4742 4fbb ae97 ..........BG.O.. 803e236: 1c09 ed55 7077 b8fc f328 58bc ea7f 8bee ..U.wp..(..X.... 803e246: 3015 beff ca08 b31d 0d43 3daf 2c8c e830 .0......C..=.,0. 803e256: 58b6 8fef 54d9 3378 329b 558b 7bcf 0104 .X...Tx3.2.U.{.. 803e266: 2046 cd9b 1fb6 e5f7 597e 927c ead1 20c1 F ......~Y|.... 803e276: abee 74d5 79b8 e4e9 b3f0 8fc8 6eb3 d9b5 ...t.y.......n.. 803e286: 68b3 00ee f5ce 8f13 57d9 caa6 00cd 7206 .h.......W.....r 803e296: 24a8 5fee 14df ceab 9ee0 10c5 6986 c28a .$._.........i.. 803e2a6: f401 7cff 1210 060f 1876 17a6 8f8f e383 ...|....v....... 803e2b6: 540e 708d 0e02 f4ed f076 a8ee eae2 ba5b .T.p....v.....[. 803e2c6: 7ab9 4f77 9584 18f1 d234 c516 5f7c a66d .zwO....4...|_m. 803e2d6: febd f415 2d0e 7201 5584 3faf 94a2 4f2f .....-.r.U.?../O 803e2e6: f944 16e9 fa98 a0f2 3e23 3265 591f 2939 D.......#>e2.Y9) 803e2f6: 434a 6840 d832 1cbc db17 eb83 d959 5411 JC@h2.......Y..T 803e306: 0f4f 4640 c67e 0451 0372 5f01 1f80 5fab O.@F~.Q.r.._..._ 803e316: 47f1 2f2a 7c9d 80dc 443a 8616 cb31 443c .G*/.|..:D..1. 803e356: 909d c520 e5a7 017a b772 c117 2f90 c969 .. ...z.r..../i. 803e366: f783 dca5 a095 b521 6007 686d 5592 7118 ......!..`mh.U.q 803e376: 23e0 22cc 5ea2 cd54 e935 1458 d254 39b1 .#.".^T.5.X.T..9 803e386: d8e8 e6b4 f6ed 1551 8a6d 076d 8e18 ddc4 ......Q.m.m..... 803e396: f277 e98c 1073 852e 9505 6b0b d641 4c7f w...s......kA..L 803e3a6: 4f84 054c 024e 2dd1 41f6 b00a aaca 27dc .OL.N..-.A.....' 803e3b6: 2495 bfd7 3f9f 776f 37a0 5536 a309 95bd .$...?ow.76U.... 803e3c6: 3ece a4c2 3384 fe45 6ba9 75ba 0789 94a9 .>...3E..k.u.... 803e3d6: 8f17 f3d9 7f72 5a34 be79 e628 819f 0223 ....r.4Zy.(...#. 803e3e6: b628 fb30 1e54 c308 ac30 9351 662c d2b2 (.0.T...0.Q.,f.. 803e3f6: bc15 35de affd 579f 62b3 69fb 553a 2e86 ...5...W.b.i:U.. 803e406: 6bd7 db9a 75ca b2cf 130d 56ac 341a 5849 .k...u.....V.4IX 803e416: 255a f884 f4d6 cf13 063e ffc4 dc9c 89b8 Z%......>....... 803e426: ccc1 c867 8f1a b165 2dcc 05a5 8f02 2729 ..g...e..-....)' 803e436: 40f4 cf95 ca61 23af 54db cfc1 2dcd e973 .@..a..#.T...-s. 803e446: dd7e 8d23 53d9 fff5 8680 a701 e4e9 12e9 ~.#..S.......... 803e456: 8592 0566 0f08 c7cf 7dbd 2d55 84c1 15b1 ..f......}U-.... 803e466: 4935 d18b fc0c be58 1968 edf7 800a 8354 5I....X.h.....T. 803e476: 0561 f5c3 7cb8 732e 2e57 ae4a af15 9c15 a....|.sW.J..... 803e486: 916a 0c1c 6aa5 fe5b 2d8a 3b2c 6bb9 96b2 j....j[..-,;.k.. 803e496: 15ae 1b50 2ad8 5360 4240 5060 15b4 66d1 ..P..*`S@B`P...f 803e4a6: 5556 d30e db29 0a23 905d 05a6 e541 3e68 VU..).#.]...A.h> 803e4b6: 34fe 40c9 344c 9600 66d9 9857 4122 5472 .4.@L4...fW."ArT 803e4c6: 6d9c a8d4 24b0 4586 32c3 dbae f64d c604 .m...$.E.2..M... 803e4d6: 1890 fc4e f5a1 ead8 0d44 f3e8 0ed1 14a5 ..N.....D....... 803e4e6: b42d bead 2e6a e4fe 6764 9008 0aa5 9ada -...j...dg...... 803e4f6: a0e6 0fe9 1f9d f798 7cc1 9526 e2ac e46d .........|&...m. 803e506: 28ce 788c 32ba c959 6a0a ca0d 0914 b9fc .(.x.2Y..j...... 803e516: 5e99 364d 7f2f ae56 d536 9f76 f7ad a4f7 .^M6/.V.6.v..... 803e526: d99e d9e4 f5a2 ff74 ccb5 0bf7 d6b6 12c4 ......t......... 803e536: 7c78 3c7c 7aea ec00 5342 5963 ee3c 8fb5 x||<.z..BScY<... 803e546: 3e87 4522 ab9c 63a6 5a8f b684 5260 cbce .>"E...c.Z..`R.. 803e556: 0f2f e6b4 7038 a307 d5c9 45e6 a72d fc5b /...8p.....E-.[. 803e566: f32d 951a 92e6 5ade 3e9a 976f b7ef d860 -......Z.>o...`. 803e576: ee7e d66f 974f 1e9d e854 86f4 eff8 d575 ~.o.O...T.....u. 803e586: 16db 2260 9007 fccb da8f 29cd df1e ce1a ..`".......).... 803e596: 05f6 01d8 f320 0162 7378 66d3 bd55 9d74 .... .b.xs.fU.t. 803e5a6: ea64 8fb1 13d6 8f58 ecab 5d0f 1bf7 4856 d.....X....]..VH 803e5b6: 1bfc 76ac 55f9 767d c0cc a796 fc50 d3da ...v.U}v....P... 803e5c6: 0863 2463 30f4 d434 1c14 11c5 0014 37e3 c.c$.04........7 803e5d6: 4fdb 0c79 6fa8 d968 1683 6c93 e9d0 8cdd .Oy..oh....l.... 803e5e6: 7a03 b2f9 904c 0de1 dab4 bdb9 d181 f032 .z..L.........2. 803e5f6: 34b7 bbd9 0ac2 d3df f66c b687 c766 d5df .4......l...f... 803e606: 502c adb8 21d1 f7d0 b04d 2a82 3d02 5873 ,P...!..M..*.=sX 803e616: 0cc1 17eb 4816 ce1b b580 591f a609 5d4f .....H.....Y..O] 803e626: 80ab dcc0 3c93 b22e 341c a0c0 4683 f23a .....<...4...F:. 803e636: f6ea 9669 1fbd f174 3faf 8cba ea5b cb68 ..i...t..?..[.h. 803e646: 5833 e414 876a c78f d937 a6ec acbd a259 3X..j...7.....Y. 803e656: 6aa2 c814 f6c2 4d64 32a1 0d9d a387 7b9b .j....dM.2.....{ 803e666: 02c3 619c 23d7 4e0a 1cdc 002a ee85 a6e6 ...a.#.N..*..... 803e676: 3419 13a0 a02d 1561 ab0c a52c b161 5b12 .4..-.a...,.a..[ 803e686: 82f5 b331 3036 008a 17a9 773f ab7b 3114 ..1.60....?w{..1 803e696: 3d63 b07e 2f9c 01a3 91ff 5664 6a63 3b25 c=~../....dVcj%; 803e6a6: 31c2 0d34 1955 b14e 48bc a24d ba1a 04d7 .14.U.N..HM..... 803e6b6: 6b5d 22a1 aa43 0538 c287 cb07 ee55 a60c ]k."C.8.....U... 803e6c6: 5a01 0cbc d5ee c1f7 4c0b 02aa 783d 4297 .Z.......L..=x.B 803e6d6: b7dd aae1 bb88 a184 c87d a7b4 04e9 8265 ........}.....e. 803e6e6: a375 89e6 432b 6287 9a32 5e3c 804d 70f1 u...+C.b2.<^M..p 803e6f6: af31 80b0 e922 aaec 9965 2e77 c306 386c 1..."...e.w...l8 803e706: 142b df27 6760 0b7c 2d68 d24b cfb9 0f7b +.'.`g|.h-K...{. 803e716: 365b 9a83 3860 a3de 21c2 b07a 1f3e 2b01 [6..`8...!z.>..+ 803e726: b23b ccc6 c0c1 5b49 bf00 165f 6ff6 e861 ;.....I[.._..oa. 803e736: 719d c11b cb49 6cd8 28b7 fbf2 7b5f 3ae5 .q..I..l.(.._{.: 803e746: 5e2f c7a0 91d1 4b66 1458 4a12 c8ea 7581 /^....fKX..J...u 803e756: 2729 cb38 5760 12c0 961a eddb 2cfc 9873 )'8.`W.......,s. 803e766: 9492 1986 5750 9498 9864 5224 dc42 30cd ....PW..d.$RB..0 803e776: 6998 c7f1 3b1f ecab 67a5 c252 1ff1 9b11 .i...;...gR..... 803e786: b550 bd87 2e5f b5b9 4b92 cbf2 3427 7892 P..._....K..'4.x 803e796: e551 b94a 5f24 b9ca 60b7 912a 5de6 f792 Q.J.$_...`*..].. 803e7a6: 20d7 81fc f5c4 a327 abdb e19b 1c64 c3af . ....'.....d... 803e7b6: e057 58ad d102 9a98 ca34 5d9e 3cf2 263f W..X....4..]..A.h. 803e866: 25e5 39ea 1338 5cf5 8e9e 3927 ace5 8400 .%.98..\..'9.... 803e876: 18d8 f53f ad39 5e89 7d12 6c03 e3a0 4e0a ..?.9..^.}.l...N 803e886: 72be 4663 ba75 2fde d57a 0f63 c8dd abef .rcFu../z.c..... 803e896: bf3c b14c ddc5 fc23 0b69 66e4 c474 0b14 <.L...#.i..ft... 803e8a6: 66a1 5c13 5e3c 1fe1 e32b 480e c7d4 32f9 .f.\<^..+..H...2 803e8b6: eddb f37e f85b fbd9 e7e4 dd8b c41e ee7b ..~.[.........{. 803e8c6: 3266 1a46 3cca d6af ab62 0f92 199c 9f77 f2F..<..b.....w. 803e8d6: ad07 2574 1175 9ea4 bb6a a700 db2f ec02 ..t%u...j.../... 803e8e6: a75d 1c46 a03e 702d c01b 57ac 3f60 fc04 ].F.>.-p...W`?.. 803e8f6: aa20 ffdd e7e2 c69f 5b3f a727 dfb3 1f6e .......?['...n. 803e906: efe1 bd3e 207f f87d 6f41 8374 6c8d 68d7 ..>.. }.Aot..l.h 803e916: d429 a7a7 ec0b ba08 2a02 93a1 205b 39a2 )........*..[ .9 803e926: dc53 13b6 db70 90b2 32c3 b767 d6a9 d83b S...p....2g...;. 803e936: b0bd 6946 307f e77c e17d 57e0 4f40 7fe4 ..Fi.0|.}..W@O.. 803e946: 155d 9979 c075 5e2f eb14 580e 9d93 7ef7 ].y.u./^...X...~ 803e956: baca 06b9 ff13 50f2 b56f 4671 85c3 ef96 .......Po.qF.... 803e966: 55e3 affc cde4 9f57 ecac a0e5 1f83 0021 .U....W.......!. 803e976: 2d0f 5af8 ec7b 0798 4dcb 8866 c906 98f0 .-.Z{....Mf..... 803e986: 883d 0b42 d467 0904 a0a4 6c1d 1499 9d0d =.B.g......l.... 803e996: 85ea 689c bad7 d87c f93b 5277 56d9 ada8 ...h..|.;.wR.V.. 803e9a6: c725 6d1c b92d 8b42 3ee4 f10e 1d59 a717 %..m-.B..>..Y... 803e9b6: 6513 706e 46f3 514b 244b 593b 1235 75cc .enp.FKQK$;Y5..u 803e9c6: 6a62 de2e d35a f393 6bbb b9be 474f fcd3 bj..Z....k..OG.. 803e9d6: 7dad 9aba 9f41 013a 9db3 175f 6144 14b0 .}..A.:..._.Da.. 803e9e6: f2bd 2829 b149 de5b e848 55b7 7434 cefe ..)(I.[.H..U4t.. 803e9f6: 8b8a 8237 68ea 56f5 5d1c db45 d2a3 1798 ..7..h.V.]E..... 803ea06: cd17 5ea2 b227 db01 865b c8e7 5041 59b1 ...^'...[...AP.Y 803ea16: 4d90 428f a0e4 b362 9f70 a8a8 0276 e314 .M.B..b.p...v... 803ea26: e305 b611 c0b2 0e0d 1cbb d9a4 0f59 740f ............Y..t 803ea36: e261 9816 31b8 164a 0a11 f93d 0f22 9ea1 a....1J...=."... 803ea46: 95c4 6a47 2192 047f f1ed 3ae2 2d8b b313 ..Gj.!.....:.-.. 803ea56: f7d2 322e 09dc 736b 0c5a 2eaf 8401 85d3 ...2..ksZ....... 803ea66: bc04 6d1e ca59 124e ffb8 3770 379c 1928 ...mY.N...p7.7(. 803ea76: 07fc c7d9 e987 5c8f b6bc 8448 629a 2e4c .......\..H..bL. 803ea86: 9800 745a 4715 d30b 4d0e 4c50 251b 1a6a ..Zt.G...MPL.%j. 803ea96: 60d3 55a2 9128 a12d 87c9 be7e 36ad b1e0 .`.U(.-...~..6.. 803eaa6: 7759 2fdc 2458 3d3e 8041 0084 f16a e461 Yw./X$>=A...j.a. 803eab6: fa1e 29b4 141a 3490 a71f d540 cfe2 3d44 ...)...4..@...D= 803eac6: 824a 3345 a943 799b 6fb6 0aa5 18ad d722 J.E3C..y.o....". 803ead6: a289 bc83 6c5a 0453 6ef2 a14e 9883 421f ....ZlS..nN....B 803eae6: d4b9 900a ccd8 4b8e 0cc7 0f63 0fc2 6e56 .......K..c...Vn 803eaf6: d978 9e3b cb1a 1d5a 7995 38b1 2980 b595 x.;...Z..y.8.).. 803eb06: b87b f6a9 73bc 6e1c b6bb bd3a a4d6 3ccd {....s.n..:....< 803eb16: 2403 bc5b 2db5 9505 ee29 d529 39c3 a141 .$[..-..).)..9A. 803eb26: c705 88aa 7a26 d815 6b67 64f2 0264 bc5c ....&z..gk.dd.\. 803eb36: aeae ef77 cef3 c4c1 6e97 496b 50f1 a39d ..w......nkI.P.. 803eb46: f2f0 0d77 28e4 423b 21d6 63c4 022e a1f4 ..w..(;B.!.c.... 803eb56: 9c45 a0eb 7599 c2bd b486 3db3 a639 11a8 E....u.....=9... 803eb66: d415 d781 da26 332f 8abe 03a2 17ca 1b3c ....&./3......<. 803eb76: d108 82c0 aca6 1bb2 82c7 354c db97 b860 ..........L5..`. 803eb86: e4a9 fd2a 1efd 444c 2f4c d440 4752 5eb7 ..*...LDL/@.RG.^ 803eb96: b898 7162 53a4 73eb 969f 6d53 dba0 6809 ..bq.S.s..Sm...h 803eba6: abd0 9377 1b8c a0d4 2011 2ce8 c0f8 b8f6 ..w...... .,.... 803ebb6: 8e43 dbc7 98e4 5d2e 8221 075b cb05 3986 C......]!.[....9 803ebc6: 8aa6 642d a098 4cb6 2d10 0d44 4db3 e56a ..-d...L.-D..Mj. 803ebd6: 3c17 f667 83b3 a25e d637 5370 8932 23b9 ... T.. 803ed06: bbf8 0bec b8b4 1b5f 8138 0336 6ac5 e054 ......_.8.6..jT. 803ed16: 91df 00a2 a37a ff2e 6c77 dbf6 7cdc bb23 ....z...wl...|#. 803ed26: b448 824b 0331 91bd 04c4 6e4c 49de b1fd H.K.1.....Ln.I.. 803ed36: 8ca4 c021 5b90 349a 84b7 1973 cc0f d268 ..!..[.4..s...h. 803ed46: 409f 0e05 740f ecbb 0a48 c433 c615 ef03 .@...t..H.3..... 803ed56: 515f 15b4 2539 1582 5193 7f0e 22f7 aa43 _Q..9%...Q..."C. 803ed66: c515 48db 4018 b34c 08a3 caaf 564e 5e3f ...H.@L.....NV?^ 803ed76: b860 af74 ac04 e803 fc04 642b dd31 1d27 `.t.......+d1.'. 803ed86: 07e0 373b 3ba9 3123 dd53 a3cb da70 79ea ..;7.;#1S...p..y 803ed96: e8be c0e1 1041 2af2 975b 679b 970c d6ae ....A..*[..g.... 803eda6: 6db0 94d7 0613 b9c7 dfe5 8433 42f0 2f18 .m........3..B./ 803edb6: a206 3f10 7070 2244 d775 25ab 09c6 cd10 ...?ppD"u..%.... 803edc6: de4a 8365 57b1 d354 c98b 0264 94de 7819 J.e..WT...d....x 803edd6: 330d f8d8 d542 dbc2 665f 555e 9816 e3bc .3..B..._f^U.... 803ede6: 613d 520e 1761 d52e d72d d58f bac9 0aea =a.Ra...-....... 803edf6: d6ad d7cb 66ce d10b 0780 d7d9 6896 87db .....f.......h.. 803ee06: 25e7 cc6d 9382 7e12 c306 0c72 272a a99d .%m....~..r.*'.. 803ee16: e99d 35cd b86c 37a9 82d5 e8d3 8e17 44f6 ...5l..7.......D 803ee26: 2a31 efd7 0e92 10fb 9b98 13e2 ac1b bc7c 1*............|. 803ee36: 2f98 f5b2 f153 e0b7 ff86 bc0a 85d7 886f ./..S.........o. 803ee46: fc4f 26fd 4d87 4c50 5eec 316c 1f1c 0abc O..&.MPL.^l1.... 803ee56: dddb d5cf 021a bb65 cf17 881b c917 0eff ......e......... 803ee66: e282 ad61 a3bb dbb8 e0e1 179d dd0c 3dd2 ..a............= 803ee76: 974d 177b ef9a 88b6 becd 5bae 6264 30cc M.{........[db.0 803ee86: 4206 e390 8401 f754 6504 da23 01ab 60da .B....T..e#....` 803ee96: fa36 0af5 c522 2efd c830 6c29 e32a 3fee 6..."...0.)l*..? 803eea6: 2def d1bb 965a c1d6 be2e bf7d 201d 4542 .-..Z.....}.. BE 803eeb6: dcaa e781 3ada 6fb5 822d f32f 6d37 402f .....:.o-./.7m/@ 803eec6: 3f5c 1040 2302 a39a 74ee 28b8 e28a aa98 \?@..#...t.(.... 803eed6: 3961 d13c 3609 b10f 8e02 830f 9761 39be a9<..6......a..9 803eee6: c15a 0cf2 4b04 7aab bd45 6dc6 e898 8c01 Z....K.zE..m.... 803eef6: 368d 1ae9 6039 b225 c1b8 d53f 41e6 0130 .6..9`%...?..A0. 803ef06: 032b a1a5 0b6f a4c7 8e95 fef1 d9cd 37d4 +...o..........7 803ef16: 19b8 a4cc 9d67 65d1 8632 7368 6d05 a1d0 ....g..e2.hs.m.. 803ef26: f240 c623 d270 8eb1 8e5e b262 8885 dc02 @.#.p...^.b..... 803ef36: 2e73 7b72 23fa d3ce 7be8 000a b415 f2c2 s.r{.#...{...... 803ef46: f01c 9413 1d43 6e94 c83d ea09 1680 d302 ....C..n=....... 803ef56: 35e2 5b68 82d2 bb72 f9e7 0e1c a42d 8f9b .5h[..r.....-... 803ef66: 8333 5f9a edb3 b71a 925f c768 b699 85a6 3.._...._.h..... 803ef76: a5c9 9b57 ed62 637d 11e2 2a63 d485 f6ed ..W.b.}c..c*.... 803ef86: 8a5b f132 8ada 1404 2b6b c428 2b6a 9312 [.2.....k+(.j+.. 803ef96: ada7 4c6c 5c10 686c c2ac 8943 73e7 aa38 ..lL.\lh..C..s8. 803efa6: 371a 3f12 2745 8c77 d431 5183 927d 3a43 .7.?E'w.1..Q}.C: 803efb6: b317 2fe5 e58f 6612 e016 9544 db11 adae .../...f..D..... 803efc6: d627 862a ca59 1dbe 564d 7cc1 4103 7968 '.*.Y...MV.|.Ahy 803efd6: 05f1 740e 36f1 4eb0 7e3b 2f6b 85cc 19d8 ...t.6.N;~k/.... 803efe6: fc88 e4b9 886c 85fd 4f7d 09b2 a03a d67d ....l...}O..:.}. 803eff6: 0ef9 0a5c 6485 c06a cae9 b0f7 5f29 a620 ..\..dj.....)_ . 803f006: 8e95 4d35 3087 81b3 0136 b749 f406 4c1d ..5M.0..6.I....L 803f016: 2779 3964 fd08 78c1 3046 9e97 50f1 4694 y'd9...xF0...P.F 803f026: 8f9e 4661 93b0 e70f cc52 4d5a e1bf b7a6 ..aF....R.ZM.... 803f036: b508 9a1f 32ee 159b 34f6 ff4a 740e 1845 .....2...4J..tE. 803f046: c57a 7b67 ac94 1ec1 cf28 6cda aa7f 2ab5 z.g{....(..l...* 803f056: 9dff e988 4d11 b81d 513a 38be 9578 0433 .....M..:Q.8x.3. 803f066: eee8 3f43 9cbc f1ab b85b 4041 a8ce 993f ..C?....[.A@..?. 803f076: a400 7df5 5869 d451 744f 04e9 8c6a f9cb ...}iXQ.Ot..j... 803f086: ae7c 1a7a 420f 2cc9 8e42 e333 52b8 6b50 |.z..B.,B.3..RPk 803f096: 1c2c e3c6 c7f5 0b00 4cf6 bf71 e1f2 43b1 ,........Lq....C 803f0a6: 20e4 ac57 0052 ce1d f909 5ff9 e68f 9025 . W.R......_..%. 803f0b6: 0d49 4284 757d 6575 59cc 495d 6b7a 9c81 I..B}uue.Y]Izk.. 803f0c6: b080 90b8 0a18 57c4 6490 21a3 4395 9b8e .......W.d.!.C.. 803f0d6: 0d44 c199 5553 559c 080f 1caa dd98 128d D...SU.U........ 803f0e6: 6662 1df6 de8e ea44 e8db c1cd ec0d 4084 bf....D........@ 803f0f6: 37b5 3f14 e45e 8068 b2fd 5d80 0a90 480e .7.?^.h....]...H 803f106: 233a 11ca 1651 0331 0913 528c 5762 2401 :#..Q.1....RbW.$ 803f116: ec05 30b4 1527 cd58 51c8 5803 eb6f 67ec ...0'.X..Q.Xo..g 803f126: b853 5452 b492 e49b 63f8 9d8b d965 c881 S.RT.....c..e... 803f136: 1f3d 8c5e 0cea 35d9 b301 69da a423 6886 =.^....5...i#..h 803f146: 6bb2 3088 beb8 aa39 1412 1a69 d2e8 5106 .k.0..9...i....Q 803f156: c872 0b3b c712 046f 0942 1761 5314 0da9 r.;...o.B.a..S.. 803f166: 0d0f e1ca 0c01 593b 0e31 be61 c09b 0750 ......;Y1.a...P. 803f176: c793 ca29 67f7 933e b4d9 617e 5182 226d ..)..g>...~a.Qm" 803f186: bd78 4a53 f7ae c9c5 1771 ca9c 432d bc48 x.SJ....q...-CH. 803f196: f6b4 70b7 f59a 08a0 088f a761 3060 f96c ...p......a.`0l. 803f1a6: 2acd d866 4ebf 986a 87ff 8c17 3d75 7767 .*f..Nj.....u=gw 803f1b6: 5528 ddfc 90e6 531b 28a2 9f8f 0275 cd83 (U.....S.(..u... 803f1c6: 7fba 6c6f 4bed bca6 ca77 03c6 567b ba13 ..ol.K..w...{V.. 803f1d6: e841 05b6 3043 015a 8820 8de2 cbc5 0c00 A...C0Z. ....... 803f1e6: bf3f 477c 074b 11a1 e6fa 4d48 06ea f394 ?.|GK.....HM.... 803f1f6: 8aed 2c77 34cc 65e2 e949 c509 3494 35bb ..w,.4.eI....4.5 803f206: 4a42 1293 0120 3124 af74 0ed7 470a 3d04 BJ.. .$1t....G.= 803f216: da51 a7d0 3e0d 894b 76e4 1092 c822 7433 Q....>K..v..".3t 803f226: bde8 88ec 0114 6ea4 eba4 7230 878a 0988 .......n..0r.... 803f236: d714 a33e 151e 9b39 8845 cdc3 5c28 e0d6 ..>...9.E...(\.. 803f246: 6b68 420f 3f84 8833 3b2f 9825 884e 0b44 hk.B.?3./;%.N.D. 803f256: 4dd1 f870 0f4b 4bc9 9e8a 0036 988a d14c .Mp.K..K..6...L. 803f266: f580 5314 7f9c f41e 335c 5b9f ecee e517 ...S....\3.[.... 803f276: 5efa 74d3 a61e 815e 618f 4315 0ab3 58bb .^.t..^..a.C...X 803f286: ea71 9290 e910 08f8 f3f3 47b4 9111 2c11 q..........G..., 803f296: e61e d8f0 f903 b198 b9ac 4005 7700 0d50 ...........@.wP. 803f2a6: 3f9c 312c e3b9 1a09 2200 05b0 a386 2a30 .?,1....."....0* 803f2b6: ed42 a686 4cb2 3d5d 4a75 f063 bf51 c13e B....L]=uJc.Q.>. 803f2c6: 0b8d 091c 93e2 4268 a987 4e97 f6b2 2f8a ......hB...N.../ 803f2d6: cc60 60ef e164 b9e0 f1f8 1180 1c20 8e1b `..`d....... ... 803f2e6: 43c2 3cf4 3aac f360 9a7f 372d ec8b b8bd .C.<.:`...-7.... 803f2f6: 7f3a 0d7b 2a00 0d61 d452 fc46 eead fed1 :.{..*a.R.F..... 803f306: 15f5 848b 852c 320f 1bb9 538b d052 233c ....,..2...SR.<# 803f316: cd5d 35d7 2400 fe9d d778 e029 2f90 40ac ]..5.$..x.)../.@ 803f326: 307b 415e 9643 baf6 3234 a35c c149 2a8c {0^AC...42\.I..* 803f336: 1830 7256 64c5 3e96 f2b9 e00c 3e77 b52a 0.Vr.d.>....w>*. 803f346: 8b3d fc6b 3993 1348 1cb3 42ff 75e0 58a0 =.k..9H....B.u.X 803f356: d474 a04d 49a9 5cdc e7a6 854a afbe 2979 t.M..I.\..J...y) 803f366: 7d6c 5b66 6345 08a5 9e34 0273 7d20 0a72 l}f[Ec..4.s. }r. 803f376: 934a ef5b 67cd e0a6 b934 55ad d219 fe06 J.[..g..4..U.... 803f386: 8a56 f134 e6bf ec2b 9a27 8611 513a b14a V.4...+.'...:QJ. 803f396: 5539 d18c 553a f08a 2f4b 23ec 02c6 0989 9U..:U..K/.#.... 803f3a6: 2ab8 22de b743 8d69 5545 f577 fdc4 0ca1 .*."C.i.EUw..... 803f3b6: cb4d 44a6 3c69 1636 3bf5 f9ce 192c 65ce M..Di<6..;..,..e 803f3c6: 5e2d 2b28 298d 94c7 99a6 d6d1 93a4 28d2 -^(+.).........( 803f3d6: db05 1f81 3081 b066 2444 b1d7 e34a e7e8 .....0f.D$..J... 803f3e6: dbab d85b b035 abc0 30f8 4ba3 4edb 946e ..[.5....0.K.Nn. 803f3f6: 9257 1255 ba48 ca8a c917 568a c509 f23d W.U.H......V..=. 803f406: 136c e340 a3a5 3921 a505 94af d300 a667 l.@...!9......g. 803f416: 34e0 f5b9 31f1 ed99 28d2 3588 a34a 2e22 .4...1...(.5J.". 803f426: 68f3 6893 b168 0176 5292 cd8a c689 fe84 .h.hh.v..R...... 803f436: 4aa7 4935 9ca3 0c3a 2b79 1821 4c91 b56a .J5I..:.y+!..Lj. 803f446: a09a dba1 f2ce 7389 2aba 738b 75db 4e81 .......s.*.s.u.N 803f456: 6f2c 8a74 3125 6b3d 154e b9d2 534e e4cc ,ot.%1=kN...NS.. 803f466: eb33 e10c 94f2 49f8 1254 ef2c 9e2b f22b 3......IT.,.+.+. 803f476: 86ae 2612 b8ad 95ce d77d 2b5c 0eca 66ad ...&....}.\+...f 803f486: 20fb a126 e0d5 a5c6 249b d38c 8118 7b6c . &......$....l{ 803f496: 54d0 b53f e8c2 491a 7ac8 29bd 9187 83d1 .T?....I.z.).... 803f4a6: 5289 432d faed 684b d72b d792 6914 7cd4 .R-C..Kh+....i.| 803f4b6: 2b7e a66e 0b58 be44 2b54 a676 79d8 9d8d ~+n.X.D.T+v..y.. 803f4c6: e3a5 ca1c 94a7 2b9d 18a8 509f be41 433c .......+...PA.. 803fcb6: 8f04 2945 ca82 8188 c34f 8e30 e2c2 394e ..E)....O.0...N9 803fcc6: 9b9a d01f 0f86 5297 21ee d383 bda6 92d7 .......R.!...... 803fcd6: 863e 8eb3 05c9 fc1a 9f8c 2d3f 1df7 36c6 >.........?-...6 803fce6: 51b4 ab5b 12a2 7fc6 63e2 21c3 fe85 b7bf .Q[......c.!.... 803fcf6: edff c370 6da3 a0f8 7822 e6b1 a2c5 825a ..p..m.."x....Z. 803fd06: 50ab cde7 3bbb ce58 c5c8 704b 37a2 84a8 .P...;X...Kp.7.. 803fd16: 5287 09d9 ae93 1518 4f37 c1e0 0cd5 9d0d .R......7O...... 803fd26: ead5 1f40 0bc5 7798 b1b9 c595 3336 51de ..@....w....63.Q 803fd36: 10e5 6330 882d 811f e58d c0dd 1d30 80de ..0c-.......0... 803fd46: 71cc 4c9e db1f 4db2 bbd4 1bc5 9a62 6268 .q.L...M....b.hb 803fd56: 4c3a 45b9 8683 87eb 8ec0 4aa8 7df1 00ca :L.E.......J.}.. 803fd66: 83d8 3fa8 115a 3e80 dc49 af11 8f9c b1c6 ...?Z..>I....... 803fd76: e5cc 32f6 c188 21e5 43d4 dd78 bed0 155c ...2...!.Cx...\. 803fd86: 783d 37e3 7e5b ba0a 86eb e145 cbcd a2fd =x.7[~....E..... 803fd96: 04b5 d636 005a 0a7b 200b f838 ab3f c625 ..6.Z.{.. 8.?.%. 803fda6: d778 f784 cada cdba 44af 199c aaa8 6d89 x........D.....m 803fdb6: 330e a183 d45e 4709 2a0d 3bb4 92dc 5830 .3..^..G.*.;..0X 803fdc6: f204 bd87 831d 3ba6 d85f 72e8 535d 2dc2 .......;_..r]S.- 803fdd6: fa22 d653 5690 6be3 9416 35e2 69a7 1281 ".S..V.k...5.i.. 803fde6: 2334 9751 3df3 6eb6 6d45 03f0 fd02 9dc3 4#Q..=.nEm...... 803fdf6: c822 d5de e410 0e0f 813a 03e0 7203 8d30 ".......:....r0. 803fe06: 0be0 9e6c 0222 1489 2f97 450f e68d 74c1 ..l."..../.E...t 803fe16: e0d0 5284 4832 1e6b 64a8 0267 76a2 206d ...R2Hk..dg..vm 803fe26: cf75 1133 34aa 3bdd a4fc dbb8 f4a4 e2e3 u.3..4.;........ 803fe36: 8292 aec1 2797 c782 5385 ab32 48e8 6d7b .....'...S2..H{m 803fe46: 1445 54c1 e619 f608 3451 b7e6 5034 a5e7 E..T....Q4..4P.. 803fe56: 2b44 90a6 9d82 f878 61d4 35dd 99e5 8d01 D+....x..a.5.... 803fe66: 32fe ae79 64ad 974d 2beb baeb 1cde 3d70 .2y..dM..+....p= 803fe76: 4a06 ee86 2b8f 56e7 50fa d5fe a2ec 1aad .J...+.V.P...... 803fe86: 0cf4 998a d7a1 6174 7092 0888 00f8 e76e ......ta.p....n. 803fe96: fbe0 e075 68ad 4338 f7cb c1e9 6355 dc15 ..u..h8C....Uc.. 803fea6: f6a2 364a c254 616a 82af ff75 c15c 1d73 ..J6T.ja..u.\.s. 803feb6: 4c60 af3e 39f7 64ba 364f 50ca dac0 d695 `L>..9.dO6.P.... 803fec6: b4aa 8e44 7e0d ab68 5787 1d5e 6154 11b1 ..D..~h..W^.Ta.. 803fed6: afa7 c3a3 a25b ec70 1d97 ecbc 1182 1523 ....[.p.......#. 803fee6: ead7 c981 adeb 993c acf8 0265 9e76 405e ......<...e.v.^@ 803fef6: 1501 0687 8689 9d7e 634c 13d7 4ae8 394d ......~.Lc...JM9 803ff06: 687c e74f 7a51 4f74 efd6 b16d d624 6a7e |hO.QztO..m.$.~j 803ff16: 8d74 0018 ee47 1235 ef7e 4524 10e7 8f6e t...G.5.~.$E..n. 803ff26: dc3c 789e 6d77 d62d 780b 13a6 7a5e 7fdc <..xwm-..x..^z.. 803ff36: 96a9 21fb 9cdc bfe7 c146 38d7 9af8 a21c ...!....F..8.... 803ff46: 9550 7861 f9e4 704f 5f45 c07a e13d 9661 P.ax..OpE_z.=.a. 803ff56: 6797 e4b8 3bf2 0a1c 32b8 7853 b95b 198a .g...;...2Sx[... 803ff66: 4c77 4a17 06a6 d709 327a 6d46 d051 1d6f wL.J....z2FmQ.o. 803ff76: ff23 bb42 518c 677c 7461 a121 332c 340c #.B..Q|gat!.,3.4 803ff86: f1ec 8f00 5f22 651c 5004 194c ee7c e53b ...."_.e.PL.|.;. 803ff96: c242 8865 4fb9 e74a 272d 36eb 2f93 529b B.e..OJ.-'.6./.R 803ffa6: 5439 10be 8b67 2c35 6168 8aab 2904 764d 9T..g.5,ha...)Mv 803ffb6: 2682 4318 7781 222a a587 0448 bdef ff59 .&.C.w*"..H...Y. 803ffc6: bd0c a4ad bcb9 35be c5d9 fe15 d805 883c .......5......<. 803ffd6: 088b 13df 4830 64fa f2b9 2140 69e3 da0f ....0H.d..@!.i.. 803ffe6: dc54 6f70 8bdc 3a83 ff28 887a 017f 9a20 T.po...:(.z... . 803fff6: 3705 6b12 68ba 3518 1314 9ecb add4 0307 .7.k.h.5........ 8040006: 7fbc 3dc0 ceb5 4c0f b6e8 5343 f3f9 6e9b ...=...L..CS...n 8040016: 4ea0 3fa7 1b07 df78 244a 7329 2590 8c20 .N.?..x.J$)s.% . 8040026: e2aa 4f4c 59ff 2ef2 734b 09ab 6edc aba6 ..LO.Y..Ks...n.. 8040036: 8a46 8021 c2f5 82b2 602d 19b8 bb7a 7612 F.!.....-`..z..v 8040046: f153 9153 95a3 f336 0df0 0786 0af8 f8d6 S.S...6......... 8040056: 4b73 6efb 0143 26eb 49c1 38c3 1a0e 8f6f sK.nC..&.I.8..o. 8040066: d7d3 f50a b8da 3083 484e 701b dae6 8225 .......0NH.p..%. 8040076: 9fed 26a3 008c b386 d927 7f82 7c02 ca70 ...&....'....|p. 8040086: f8f2 5344 15b4 29b7 f5dd 43a6 2ee0 4a05 ..DS...)...C...J 8040096: 0083 48a3 c58f f01b 4c75 19b0 ec78 6bf6 ...H....uL..x..k 80400a6: 6eef a300 6fa6 de3a 86f1 3c00 50d7 553d .n...o:....<.P=U 80400b6: ca4d 5bc3 f2b7 19ee 04aa c59a 1e75 0fa5 M..[........u... 80400c6: a9d3 3997 19be 2135 3444 c7b5 4292 4689 ...9..5!D4...B.F 80400d6: e81c f8db 6849 866f a454 f17b ef15 f3d9 ....Iho.T.{..... 80400e6: a137 80aa fde0 8ab6 6e39 f8d4 ac3a 4504 7.......9n..:..E 80400f6: bb03 6787 7cc8 64b2 fb57 8d89 b0e8 0dbe ...g.|.dW....... 8040106: 887c 1355 8ec8 a7b9 41e6 06ae 2276 e324 |.U......A..v"$. 8040116: 16a7 dc84 16fe f802 4a3d ddcf fd4d 1a3d ........=J..M.=. 8040126: c8ef ef3c 4ce9 97ef 09da 7fa1 e777 086e ..<..L......w.n. 8040136: bf7e fb72 7749 30b7 c12b 89b5 69ff 78f2 ~.r.Iw.0+....i.x 8040146: 40fe 9bff 4ff1 26b1 130d 5963 cbe0 d1ad .@...O.&..cY.... 8040156: d169 2f9b f9cb 2ee7 fb6e e875 ebc6 8913 i../....n.u..... 8040166: 7d32 5b44 e296 1b71 fedc 3adc c9bd 9834 2}D[..q....:..4. 8040176: 53d3 e4ae bafe 2a80 5d70 b973 2321 edda .S.....*p]s.!#.. 8040186: b8c6 a985 cb4a 7070 2b8d 9535 d1c1 9a0d ....J.pp.+5..... 8040196: ca91 c4ad b184 18fc 6891 19b6 111d 43bd .........h.....C 80401a6: e810 99b1 cb4a 5408 1930 f2d6 e762 ba27 ....J..T0...b.'. 80401b6: 1d0c 7d3e 7a10 1055 ff28 03b4 73e5 3a69 ..>}.zU.(....si: 80401c6: 7cd7 fcb3 6a14 99f4 5a5a 1b00 c960 7cd2 .|...j..ZZ..`..| 80401d6: a2ac 54b9 6c3d 5f9f 7220 8d22 663e 72f3 ...T=l._ r".>f.r 80401e6: 8438 780d a5e6 4f74 9d40 1ee5 f06f 274f 8..x..tO@...o.O' 80401f6: b577 bc61 583d f0cc f34f 6d71 4fc7 08f3 w.a.=X..O.qm.O.. 8040206: d080 6d0c 3a31 ee10 0404 0247 4ab0 60b6 ...m1:....G..J.` 8040216: c350 6803 00cc 2df2 943b 6e75 9350 9d97 P..h...-;.unP... 8040226: ac32 dd3c 81c5 22ee 6633 bac6 4edf 211e 2.<...."3f...N.! 8040236: 6324 78f6 5bb1 5f54 b6e1 1cc5 eef6 05f9 $c.x.[T_........ 8040246: 6d02 7adc 621f 5548 8929 06de 29b3 112e .m.z.bHU)....).. 8040256: aeef a0fe 51e4 6f55 c8aa 0708 3b58 f45a .....QUo....X;Z. 8040266: 4871 b21b 7388 f21a 4f80 1c82 b1f0 46ca qH...s...O.....F 8040276: e76f 0707 722c 94a6 9402 99e8 deb1 8d10 o...,r.......... 8040286: e240 91a3 245b b2b0 2ce5 21d1 5350 03f9 @...[$...,.!PS.. 8040296: b6dd 54b5 6cbb abe4 48af 7115 b22f 0ea9 ...T.l...H.q/... 80402a6: 8bd3 b132 4407 e728 ecd9 cc5e cf08 f5db ..2..D(...^..... 80402b6: ccde e225 fd32 bbd4 d4b0 8ba2 f1cd 7106 ..%.2..........q 80402c6: 1469 9671 006e 9012 4c50 6d50 c689 025b i.q.n...PLPm..[. 80402d6: 6a57 d24f b01b d6c5 01db b109 c925 9865 WjO.........%.e. 80402e6: 009a ade0 a25a ba65 2675 8e9c c7aa 3086 ....Z.e.u&.....0 80402f6: 9445 7243 7e9a 4870 9855 7704 2e19 ebd1 E.Cr.~pHU..w.... 8040306: a066 8c83 7b08 aa3f 2c01 2a82 6442 2dc8 f....{?..,.*Bd.- 8040316: 4003 346b 48be 24e0 b418 a481 838c 2df5 .@k4.H.$.......- 8040326: 88b2 8d21 0c8c fb62 46a8 12e8 eb45 9ac8 ..!...b..F..E... 8040336: 46e4 0d54 821c 4328 f4c1 d115 5832 f732 .FT...(C....2X2. 8040346: f4b4 b16f dbe4 0379 96a7 1053 fc0f 4316 ..o...y...S....C 8040356: a990 fa26 7c18 4658 81c5 a00e 6417 6df9 ..&..|XF.....d.m 8040366: 0d11 91fe 9878 ceb7 d2d8 d088 4797 ca7a ....x........Gz. 8040376: 9baf 8c50 b16d 3bb3 22ef 304c 08dd c40c ..P.m..;."L0.... 8040386: 6ec7 9dba a85e 8153 c079 224f 96da 7698 .n..^.S.y.O"...v 8040396: 501c 87bb 01c6 bd61 b072 df87 cc41 253b .P....a.r...A.;% 80403a6: 05c4 04f8 cb46 e3f5 4b58 1469 a7c2 9fe2 ....F...XKi..... 80403b6: 49bc 1781 1cc5 4a0b d990 dd38 b400 fbe6 .I.....J..8..... 80403c6: a865 336b faf5 48fd 2ed3 4d4c c1b4 8864 e.k3...H..LM..d. 80403d6: 49a0 f275 9cb8 0c88 adce 235a cf98 ac69 .Iu.......Z#..i. 80403e6: 2422 41d4 4ef1 0f58 4f92 c1ab b264 1ea2 "$.A.NX..O..d... 80403f6: 4e7c 2a0d d593 895c 4ae1 a938 a429 8917 |N.*..\..J8.)... 8040406: 78db c310 588e 035b 6fc2 456d f614 32d6 .x...X[..omE...2 8040416: 448c 916b 40a6 f9a1 ff10 5e74 4112 ebd2 .Dk..@....t^.A.. 8040426: 9e0b 3fb6 37fd 7fb3 43e8 491a 9fe6 c5b6 ...?.7...C.I.... 8040436: 702b 9652 f13f d0bb 0cde e671 fa33 a258 +pR.?.....q.3.X. 8040446: 5900 538c 8eb6 9beb 20c1 6cdc d2b7 f35c .Y.S..... .l..\. 8040456: a74b 258f 8604 eb34 7a23 8acc 9b60 ab16 K..%..4.#z..`... 8040466: fecd a0f5 1836 622e ff89 2621 4085 b677 ....6..b..!&.@w. 8040476: f7a0 d26f 0d74 0e6a 00c2 88b1 209c 2fd1 ..o.t.j...... ./ 8040486: a526 39d1 6504 76ec 970b 4231 dea7 536e &..9.e.v..1B..nS 8040496: a6c0 8501 ea06 788b c0a8 c979 fa4c 035b .......x..y.L.[. 80404a6: cc85 f19d 8863 bc1b d03c 7093 ff7d 7432 ....c...<..p}.2t 80404b6: 128f 11f0 c6b8 7a1c 7d98 28be f997 b87b .......z.}.(..{. 80404c6: df4f 53db 8974 3f27 5eab f06b ebf4 c650 O..St.'?.^k...P. 80404d6: 35fc 133e 28b3 1242 9cfb 7e86 f6e0 d855 .5>..(B....~..U. 80404e6: 0ec3 0587 5576 1719 2c19 ae44 b69e dde0 ....vU...,D..... 80404f6: 5d57 d1a2 1bcb 91e7 3a60 c02b 564f 3e80 W]......`:+.OV.> 8040506: bb66 cff5 fdbf b7e3 05ff fcff b7eb fdff f............... 8040516: dfed bcff d011 d0dc 7471 6f59 5fe4 81a8 ........qtYo._.. 8040526: a67f ff7f dbf1 7d3f e3fb 4d79 138d fd4d ......?}..yM..M. 8040536: 542b 3fff fedf bce9 2606 0689 edfe 3fdb +T.?.....&.....? 8040546: fb7f 6fb7 847f ff7f b7fb 0bff 9d68 d4d9 ...o........h... 8040556: f2f0 2e2c 9d1a 6c57 5e7c c9b1 aea5 78df ..,...Wl|^.....x 8040566: 0031 399b 8d67 50c1 3ef1 6613 b119 4ab3 1..9g..P.>.f...J 8040576: 41bb ab39 1fb4 a701 9c45 017f b7ad 3229 .A9.....E.....)2 8040586: 6aa7 7143 a3c1 8bbc c0f2 6d2b bf81 3aad .jCq......+m...: 8040596: 419c 4af4 1133 811a 3ada a241 6c05 0b63 .A.J3....:A..lc. 80405a6: 3af0 eeaf 39df 1775 5b99 b000 1a31 9a8c .:...9u..[..1... 80405b6: b5d3 7a8b 8ccd b3c4 041b 087d d441 e8d1 ...z......}.A... 80405c6: 0212 7822 85b7 d41d 9d4d f053 6f1e aa45 .."x....M.S..oE. 80405d6: 4758 61f1 2d6a 0d91 1a15 3074 b979 a818 XG.aj-....t0y... 80405e6: 7f66 110c 31f9 955b d7cb 2ee9 ef5b bde0 f....1[.....[... 80405f6: 6db1 5189 e563 f8b2 bd3d 9550 4d20 eb1c .m.Qc...=.P. M.. 8040606: 4a6c efb3 b05c 55f3 f0dd 9ae3 2064 06cb lJ..\..U....d .. 8040616: 048d 0480 6f45 22e0 c070 925b 3aba 7079 ....Eo."p.[..:yp 8040626: bc69 b428 1405 28cd 821c 5dde 57ec eb4b i.(....(...].WK. 8040636: 97c7 f4c8 6b60 80bc d1d0 1f60 3d5d ead3 ....`k....`.]=.. 8040646: caa4 9b36 db22 eb66 3179 fae5 2191 ac7f ..6.".f.y1...!.. 8040656: 1836 e7d2 a6ed 2ac0 b9c0 ab96 1c49 d916 6......*....I... 8040666: 1023 b00b b62e 470c 5d3d 1f25 c248 057c #......G=]%.H.|. 8040676: fc11 63b4 041f ae3f 5761 5b23 0672 1ed1 ...c..?.aW#[r... 8040686: e29e 155a 26dc 136f 76b8 d4d0 6f20 f19d ..Z..&o..v.. o.. 8040696: 253d 44ce 6dc5 65d9 428d eb02 dd2b d497 =%.D.m.e.B..+... 80406a6: e7d8 e388 98d4 6f60 3991 48c2 0828 6c64 ......`o.9.H(.dl 80406b6: 8d0f 2bd0 dbab c4e1 a1d4 8dbc 0f60 3b43 ...+........`.C; 80406c6: 8716 e07b 7560 a402 4faf 0729 b491 3a0d ..{.`u...O)....: 80406d6: 1ac8 6274 cd4b 582f caac ca6e bc18 9662 ..tbK./X..n...b. 80406e6: e9c1 8350 5607 b57b f2e8 a005 a491 c11f ..P..V{......... 80406f6: 9848 bba3 df02 8373 cb83 f960 52d6 45e8 H.....s...`..R.E 8040706: b56e 746c 86e5 cb98 9ae8 c84e 8b34 d45b n.lt......N.4.[. 8040716: 1871 6ed1 cab1 ef5d 7795 dc36 8bf7 201c q..n..]..w6.... 8040726: 7270 7ec4 b8cb 8635 9e86 dd71 5fed fc97 pr.~..5...q.._.. 8040736: 1238 46af ca39 9501 6bb3 3fa3 43c6 705f 8..F9....k.?.C_p 8040746: 78ef faa0 f4a6 5a92 877f d9ef b3c1 4a89 .x.....Z.......J 8040756: 2f76 c7cb 9d3e e4a9 79a5 3e57 0b22 87e3 v/..>....yW>"... 8040766: ee1f 5795 44c8 3a91 5f87 6aab 8535 4478 ...W.D.:._.j5.xD 8040776: af50 e6a1 5316 e090 4663 0e99 e1df 305b P....S..cF....[0 8040786: e0ef 0aff ef31 c08f 2ee0 ba26 a4b6 c313 ....1.....&..... 8040796: 6ae8 65ff 4bf4 f8f5 be8b 496c 26e7 5c20 .j.e.K....lI.& \ 80407a6: d218 3687 727d 4efb cd0d b87a f3bd 4f85 ...6}r.N..z....O 80407b6: 4764 a101 c034 06c0 6f89 4f10 25ff 957b dG..4....o.O.%{. 80407c6: 6352 56ec d59f e034 9810 7e9a dd7d 421f Rc.V..4....~}..B 80407d6: b368 5769 c673 fea3 fae8 b02d d07a c0e0 h.iWs.....-.z... 80407e6: 0799 3f4d e0ea 1100 dcb9 2104 289d b8a2 ..M?.......!.(.. 80407f6: 854f 4988 97aa 8b2e 3e97 74d8 e933 9003 O..I.....>.t3... 8040806: 3ba6 98cd f5dc 9a47 0341 19a0 71a3 4dff .;....G.A....q.M 8040816: e043 9ad1 b458 83f4 d2d0 3a8f e0c8 c33e C...X......:..>. 8040826: fe55 d903 f4dc e5e0 5e02 ec89 aaef a52d U........^....-. 8040836: b86b 9353 c6db be1f 7317 b680 4856 c093 k.S......s..VH.. 8040846: d133 03b0 0185 60b7 28c8 b3ab 331e 189e 3......`.(...3.. 8040856: 6b33 af8b 83ae 4e2f 96b3 77bd 0156 1487 3k..../N...wV... 8040866: f689 c3d0 c834 f633 624a e689 af8d 37fa ....4.3.Jb.....7 8040876: a9f3 3fa8 6298 c221 a00f aafc 8ea7 21fa ...?.b!........! 8040886: 0fc8 d6ba f489 0e96 0d3d 38d8 733e 57e0 ........=..8>s.W 8040896: f736 26a1 5527 1ff4 d92c ab43 a31b 0000 6..&'U..,.C..... 80408a6: 5825 4c00 676f 756f 5474 726d 3f00 6600 %X.LogoutTmr.?.f 80408b6: 6e75 0063 7322 6f74 2270 d000 d0a2 d1b5 unc."stop"...... 80408c6: d181 2082 bed0 81d1 82d1 b0d0 bdd0 bed0 ... ............ 80408d6: b2d0 bbd0 b5d0 bdd0 0021 a2d0 b5d0 81d1 ........!....... 80408e6: 82d1 d020 d0bd 20b5 83d1 b4d0 b0d0 bbd0 .. .... ........ 80408f6: bed0 81d1 8cd1 d020 d1be d181 d082 d0b0 ...... ......... 8040906: d0bd d0be d0b2 d1b8 d182 218c 2200 6964 ...........!."di 8040916: 6373 6168 6772 2265 d000 d0a2 d1b5 d181 scharge"........ 8040926: 2082 b7d0 b0d0 bfd0 83d1 89d1 b5d0 bdd0 . .............. 8040936: 0021 a2d0 b5d0 81d1 82d1 d020 d0bd 20b5 !......... .... 8040946: 83d1 b4d0 b0d0 bbd0 bed0 81d1 8cd1 d020 .............. . 8040956: d0b7 d0b0 d1bf d183 d181 d082 d1b8 d182 ................ 8040966: 218c 2200 6974 656d 0022 6322 6e61 6563 .!."time"."cance 8040976: 226c d000 d192 d08b d0ba d1bb d18e d087 l".............. 8040986: d0b5 d0bd d0b8 20b5 98d0 91d0 9fd0 d020 ....... ...... . 8040996: d1be d082 d0bc d0b5 d0bd d0b5 d0bd 21be ...............! 80409a6: d000 d192 d08b d0ba d1bb d18e d087 d0b5 ................ 80409b6: d0bd d0b8 20b5 98d0 91d0 9fd0 d020 d0bd ..... ...... ... 80409c6: 20b5 83d1 b4d0 b0d0 bbd0 bed0 81d1 8cd1 . .............. 80409d6: d020 d1be d082 d0bc d0b5 d0bd d1b8 d182 ............... 80409e6: 218c 2200 666f 2266 6100 7466 7265 7400 .!."off".after.t 80409f6: 006f 9fd0 b5d0 80d1 b5d0 b7d0 b0d0 b3d0 o............... 8040a06: 80d1 83d1 b7d0 bad0 b0d0 d020 d098 d091 .......... ..... 8040a16: 219f d000 d19e d082 d0bc d0b5 d0bd 20b0 .!............. 8040a26: bfd0 b5d0 80d1 b5d0 b7d0 b0d0 b3d0 80d1 ................ 8040a36: 83d1 b7d0 bad0 b8d0 d020 d098 d091 219f ........ ......! 8040a46: 4800 5454 2f50 2e31 2030 3032 2030 4b4f .HTTP/1.0 200 OK 8040a56: 0a0d 6f43 746e 6e65 2d74 7954 6570 743a ..Content-Type:t 8040a66: 7865 2f74 7468 6c6d 0a0d 6553 2d74 6f43 ext/html..Set-Co 8040a76: 6b6f 6569 203a 6e75 6d61 3d65 0d00 530a okie: uname=...S 8040a86: 7465 432d 6f6f 696b 3a65 6920 3d64 0d00 et-Cookie: id=.. 8040a96: 530a 7465 432d 6f6f 696b 3a65 7220 6c6f .Set-Cookie: rol 8040aa6: 3d65 0030 0a0d 6553 2d74 6f43 6b6f 6569 e=0...Set-Cookie 8040ab6: 203a 7561 6874 303d 3c00 4421 434f 5954 : auth=0. 8040b26: 0a0d 0a0d 2600 6c00 676f 6e69 003d 6170 .....&.login=.pa 8040b36: 7373 6f77 6472 003d 0a0d 6553 2d74 6f43 ssword=...Set-Co 8040b46: 6b6f 6569 203a 6f72 656c 003d 9fd0 bed0 okie: role=..... 8040b56: bbd0 8cd1 b7d0 bed0 b2d0 b0d0 82d1 b5d0 ................ 8040b66: bbd0 8cd1 6f00 6e77 7265 003d 7973 4c73 .....owner=.sysL 8040b76: 636f 7461 6f69 3d6e 6300 6d6f 656d 746e ocation=.comment 8040b86: 003d 6572 6461 635f 6d6f 756d 696e 7974 =.read_community 8040b96: 003d 7277 7469 5f65 6f63 6d6d 6e75 7469 =.write_communit 8040ba6: 3d79 6d00 6e61 6761 7265 5049 003d 616d y=.managerIP=.ma 8040bb6: 616e 6567 4972 3250 003d 616d 616e 6567 nagerIP2=.manage 8040bc6: 4972 3350 003d 616d 616e 6567 4972 3450 rIP3=.managerIP4 8040bd6: 003d 616d 616e 6567 4972 3550 003d 6864 =.managerIP5=.dh 8040be6: 7063 003d 7069 6461 7264 003d 7767 003d cp=.ipaddr=.gw=. 8040bf6: 616d 6b73 003d 7561 6874 003d 7372 655f mask=.auth=.rs_e 8040c06: 616e 6c62 6465 003d 7372 735f 7265 6576 nabled=.rs_serve 8040c16: 3d72 7200 5f73 6f70 7472 003d 7372 705f r=.rs_port=.rs_p 8040c26: 6477 003d 7372 6b5f 7965 003d 6964 3d31 wd=.rs_key=.di1= 8040c36: 7200 316f 003d 6f72 3d32 6e00 7074 003d .ro1=.ro2=.ntp=. 8040c46: 746e 7370 7265 6976 3d70 7400 6d69 3d65 ntpservip=.time= 8040c56: 7500 6374 003d 5448 5054 7000 6f72 6164 .utc=.HTTP.proda 8040c66: 6574 003d 5448 5054 312f 302e 3220 3030 te=.HTTP/1.0 200 8040c76: 4f20 0d4b 430a 6e6f 6574 746e 542d 7079 OK..Content-Typ 8040c86: 3a65 6574 7478 682f 6d74 0d6c 0d0a 540a e:text/html....T 8040c96: 7572 0065 6170 6567 003d 6c61 006c 5448 rue.page=.all.HT 8040ca6: 5054 312f 312e 3220 3030 4f20 0d4b 430a TP/1.1 200 OK..C 8040cb6: 6e6f 6574 746e 4c2d 6e65 7467 3a68 6c25 ontent-Length:%l 8040cc6: 0d75 0d0a 000a 7375 7265 616e 656d 003d u.....username=. 8040cd6: 6c6f 7064 7361 3d73 6e00 7765 6170 7373 oldpass=.newpass 8040ce6: 003d 9fd0 b0d0 80d1 bed0 bbd0 8cd1 d120 =............. . 8040cf6: d183 d081 d0bf d1b5 d088 d0bd 20be b8d0 ............. .. 8040d06: b7d0 bcd0 b5d0 bdd0 91d1 bdd0 d000 d092 ................ 8040d16: d0b2 d0b5 d0b4 d0b5 d1bd 208b bdd0 b5d0 ........... .... 8040d26: bad0 bed0 80d1 80d1 b5d0 bad0 82d1 bdd0 ................ 8040d36: 8bd1 b5d0 d020 d0b4 d0b0 d0bd d1bd d08b .... ........... 8040d46: 21b5 d000 d092 d0b2 d0b5 d1b4 d091 20bd .!............. 8040d56: bdd0 b5d0 b2d0 b5d0 80d1 bdd0 8bd1 b9d0 ................ 8040d66: d020 d0bf d1b0 d080 d0be d1bb 218c 4700 ............!.G 8040d76: 5445 2f20 616d 6e69 632e 7373 4700 5445 ET /main.css.GET 8040d86: 2f20 6f72 6574 2e6b 6e70 0067 4547 2054 /rotek.png.GET 8040d96: 662f 7661 6369 6e6f 692e 6f63 4700 5445 /favicon.ico.GET 8040da6: 2f20 6f72 656c 6a2e 0073 4f50 5453 2f20 /role.js.POST / 8040db6: 6f6c 6967 2e6e 6763 0069 6c2f 676f 6e69 login.cgi./login 8040dc6: 682e 6d74 006c 6f54 206f 6f6c 676e 5020 .html.Too long P 8040dd6: 534f 2054 6572 7571 7365 2174 0a0d 4700 OST request!...G 8040de6: 5445 2f20 616d 6e69 6a2e 0073 4547 2054 ET /main.js.GET 8040df6: 732f 7465 6974 676e 2e73 7468 6c6d 2f00 /settings.html./ 8040e06: 6e69 6564 2e78 7468 6c6d 4700 5445 2f20 index.html.GET / 8040e16: 6e69 6f66 682e 6d74 006c 4547 2054 682f info.html.GET /h 8040e26: 7369 6f74 7972 682e 6d74 006c 4547 2054 istory.html.GET 8040e36: 752f 7370 685f 7369 6f74 7972 682e 6d74 /ups_history.htm 8040e46: 006c 4547 2054 672f 7465 734a 6e6f 632e l.GET /getJson.c 8040e56: 6967 4700 5445 2f20 6573 7474 6e69 7367 gi.GET /settings 8040e66: 632e 6967 5000 534f 2054 732f 7465 6974 .cgi.POST /setti 8040e76: 676e 2e73 6763 0069 5448 5054 312f 312e ngs.cgi.HTTP/1.1 8040e86: 3220 3030 4f20 0d4b 000a 213c 4f44 5443 200 OK........GET /in 8040f06: 6f66 632e 6967 5000 534f 2054 692f 666e fo.cgi.POST /inf 8040f16: 2e6f 6763 0069 213c 4f44 5443 5059 2045 o.cgi..... 8040f86: 4700 5445 2f20 6968 7473 726f 2e79 6763 .GET /history.cg 8040f96: 0069 4547 2054 752f 7370 685f 7369 6f74 i.GET /ups_histo 8040fa6: 7972 632e 6967 5000 534f 2054 622f 7461 ry.cgi.POST /bat 8040fb6: 745f 7365 2e74 6763 0069 4f50 5453 2f20 _test.cgi.POST / 8040fc6: 7075 5f73 6f70 6577 2e72 6763 0069 4547 ups_power.cgi.GE 8040fd6: 2054 722f 7365 7465 632e 6967 4700 5445 T /reset.cgi.GET 8040fe6: 2f20 6572 6f62 746f 632e 6967 4700 5445 /reboot.cgi.GET 8040ff6: 2f20 6f63 666e 7269 2e6d 6763 0069 4547 /confirm.cgi.GE 8041006: 2054 662f 5f77 7075 6164 6574 632e 6967 T /fw_update.cgi 8041016: 5000 534f 2054 632f 6168 676e 7065 6477 .POST /changepwd 8041026: 632e 6967 4700 5445 2f20 6573 5074 6f72 .cgi.GET /setPro 8041036: 6164 6574 632e 6967 0000 date.cgi.. 08041040 : 8041040: c1c8 0803 44d0 0804 44e4 0804 0541 0000 .....D...D..A... 8041050: 0001 0000 .... 08041054 : 8041054: 6d2f 6961 2e6e 736a 0000 0000 5448 5054 /main.js....HTTP 8041064: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 8041074: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 8041084: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 8041094: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 80410a4: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 80410b4: 6e65 2d74 654c 676e 6874 203a 3031 3136 ent-Length: 1061 80410c4: 0d31 430a 6e6f 656e 7463 6f69 3a6e 4320 1..Connection: C 80410d4: 6f6c 6573 0a0d 6f43 746e 6e65 2d74 7974 lose..Content-ty 80410e4: 6570 203a 7061 6c70 6369 7461 6f69 2f6e pe: application/ 80410f4: 2d78 616a 6176 6373 6972 7470 0a0d 6f43 x-javascript..Co 8041104: 746e 6e65 2d74 6e45 6f63 6964 676e 203a ntent-Encoding: 8041114: 7a67 7069 0a0d 6143 6863 2d65 6f43 746e gzip..Cache-Cont 8041124: 6f72 3a6c 7020 6972 6176 6574 202c 616d rol: private, ma 8041134: 2d78 6761 3d65 3638 3034 0d30 0d0a 1f0a x-age=86400..... 8041144: 088b 0000 0000 0400 ed0a 097d 1b73 9647 ..........}.s.G. 8041154: 5fe6 d629 2978 2cc0 b880 0178 212a 4a28 ._).x).,..x.*!(J 8041164: 35b6 6ba1 da24 599e cd8a 0ba8 8940 0a00 .5.k$..Y....@... 8041174: 1542 c948 2324 eedc 99e9 688e 78c7 77a3 B.H.$#.....h.x.w 8041184: 7763 6363 f67b 05f8 8f6e ad35 d5f1 f311 cwcc{...n.5..... 8041194: c00b 347f 7bdf 5999 0595 1480 bb65 3d3d ...4.{.Y....e.== 80411a4: 1331 9121 9995 af2f 2f97 be5f 932b c99d 1.!.../../_.+... 80411b4: 4bd0 68c2 bc68 7055 278a 20e3 8c99 8687 .K.hh.Up.'. .... 80411c4: 791f 4193 4c30 ddca b920 0fdd f3e8 8be6 .y.A0L.. ....... 80411d4: 3e3b ce20 0a3a e3be c1f8 619d b54c 729c ;> .:......aL..r 80411e4: bc9c 07e8 68e5 78e4 f261 aec2 2958 5b94 .....h.xa...X).[ 80411f4: 9e28 391c c363 47b3 38ce de0e 47e9 524e (..9c..G.8...GNR 8041204: 8198 b62f 4ec2 e0a1 d8ad 4ae5 78bd baa3 ../..N.....J.x.. 8041214: 2f64 e655 f4db d45a 6f8c 871f 3f43 2e3a d/U...Z..o..C?:. 8041224: 838f 9367 4e20 19de 833b 60a0 94ca 6c59 ..g. N..;..`..Yl 8041234: 05f9 78b7 5676 c6d0 3be9 f389 8f0e 4315 ...xvV...;.....C 8041244: 44e9 02e3 e3b5 7bd8 678e 9ef9 0e15 3a0f .D.....{.g.....: 8041254: 6da8 9345 7c44 8e8c 96c7 24eb 9e07 4233 .mE.D|.....$..3B 8041264: 30e1 1f18 c124 4460 4959 0838 41fa b127 .0..$.`DYI8..A'. 8041274: 87e2 71d1 b630 9be2 0bc8 2fc6 2df6 aed7 ...q0....../.-.. 8041284: dcb4 4eeb 1fb9 bb0c af49 aee5 14ac ec53 ...N....I.....S. 8041294: b9ec dafb de60 bddb d777 071b 124e de10 ....`...w...N... 80412a4: 2468 9dae 5b22 dc14 b892 d4c7 84ba 42f8 h$.."[.........B 80412b4: f2d1 6166 9ae4 4c14 3c3f a4c2 5669 995e ..fa...L?<..iV^. 80412c4: 4b47 d81d cb4e 772b 71c2 ec9c c2f4 dfbe GK..N.+w.q...... 80412d4: ba2a 6765 0a34 3e86 0127 9599 5b15 c572 *.eg4..>'....[r. 80412e4: d9dd 2d85 9638 bf3b 150a ad4b 1f9d a3c6 ...-8.;...K..... 80412f4: f3be 76c2 4f4f b74d 791f 6687 e8b6 5c9e ...vOOM..y.f...\ 8041304: f774 8bb5 d2ee afa2 b85d eee8 1755 9bdd t.......]...U... 8041314: 7459 6460 81f0 0fd3 f8b1 6da0 1c39 c8cc Yt`d.......m9... 8041324: a2c2 815b b1d5 56ba 0acf a7ad a1d6 b7d5 ..[....V........ 8041334: 2d06 7ec7 888b f1c8 bc0f 3068 0c98 c441 .-.~......h0..A. 8041344: 1166 8acb e3dc 9871 b904 8f6c 07b2 d0ce f.....q...l..... 8041354: 06e9 3be3 010f e7e7 6a32 09c8 3972 e475 ...;....2j..r9u. 8041364: 7274 0d39 74e4 3973 c86b 51e9 384e 7c72 tr9..ts9k..QN8r| 8041374: 8c7f 4854 eea9 be31 0a9e f8c8 df10 f487 ..TH..1......... 8041384: 8e3d e20f 7c60 1014 5f58 8c66 71a2 e482 =...`|..X_f..q.. 8041394: 2640 030f 80cc 37b1 76c4 ab52 ba8c cf7e @&.....7.vR...~. 80413a4: 991b b2c5 0bd7 c3bc 3fc0 2d3d 3448 7705 .........?=-H4.w 80413b4: 521e 41c7 171c 967a dc69 5879 7e9a fd3e .R.A..z.i.yX.~>. 80413c4: fcf2 e9e3 f3cb 1b9f bfe7 ff38 f9f9 4827 ..........8...'H 80413d4: 377c 27fd 9afa 317e dcfd a22c 1a32 16af |7.'..~1..,.2... 80413e4: f9ad c226 26f9 357e fafd effc bfa6 4d7f ..&..&~5.......M 80413f4: a7c5 3996 dcfd fe98 e9ef e7e7 9f3f 457e ...9........?.~E 8041404: 7f9f a740 225f 12f1 bedd 3aca 5a2d 1102 ..@._".....:-Z.. 8041414: d0c1 fb71 9f81 694d 7979 94c1 e70e f3c6 ..q...Miyy...... 8041424: fb68 9dd6 1ff7 dc1b c7f0 cf98 cc4b d16e h...........K.n. 8041434: ee9c 064f 306e f42e c0d1 fff4 bf4c ff3b ..O.n0......L.;. 8041444: fcf8 e313 75aa fbb7 9ea3 0433 1d27 5e87 .....u....3.'..^ 8041454: 4061 fc2d 9a2f 818c 11c9 5f32 7f4d c407 a@-./.....2_M... 8041464: 827e 3a49 079e bfc4 ddae 8845 a8f6 ffd5 ~.I:......E..... 8041474: a3c7 39e7 8f18 dfef 687b 3354 a53c 938b ...9....{hT3<... 8041484: 8c1b 9963 408f c6ee 464e 73ee 99ab e0ab ..c..@..NF.s.... 8041494: e65a b487 2e13 91ad 9091 70bf d858 731a Z..........pX..s 80414a4: 64bd 8275 7585 79b0 a92e 59d3 0758 ebdb .du..u.y...YX... 80414b4: 3a92 85dd b075 d301 c33a 198c 93ce f336 .:..u...:.....6. 80414c4: 7145 cda4 ee70 2b94 43f7 3dec 58c9 be75 Eq..p..+.C.=.Xu. 80414d4: 4e6c 3b7f 397d 03fd 1a51 ee28 3615 a7c4 lN.;}9..Q.(..6.. 80414e4: 6fd3 dfa7 b419 a62b e25f b7ff 8ae6 62bb .o....+._......b 80414f4: 992e ead6 0acf b5b5 4abd 6d69 b4ff 5f86 .........Jim..._ 8041504: 7d8d d8fc 3fda abdd f754 fcdb 3fc9 c5da .}...?..T....?.. 8041514: e527 1d7f b7b8 cb56 8e09 9c5f 47e4 7f4e '.....V..._..GN. 8041524: 1412 4bdb 6695 1b01 2912 73c9 6e4b 1cf4 ...K.f...).sKn.. 8041534: 329b f077 2d14 8b70 dc79 2dca 13f6 b621 .2w..-p.y..-..!. 8041544: ded4 e27b f797 0a57 66ed 6a50 f13f 8a57 ..{...W..fPj?.W. 8041554: 1fed 3675 6db9 c573 e139 5908 19fd a92d ..u6.ms.9..Y..-. 8041564: fa53 bb68 9ff4 57f7 5ade 4c5d e03f d340 S.h....W.Z]L?.@. 8041574: a7af 0d2f 13a6 fa63 920d 48ff 919c 18f8 ../...c....H.... 8041584: 0b38 81f3 647f f2f6 01a9 02ce 9060 57d8 8....d......`..W 8041594: 6244 535f 682e 5bee 7e40 df85 0d2f 3ee2 Db_S.h.[@~../..> 80415a4: fcf8 fce2 c6d7 95f4 fe71 d337 e757 0d7f ........q.7.W... 80415b4: f6f6 d36b 7ff2 c584 278d 20ee de4c 39c1 ..k......'. L..9 80415c4: e31c f5f8 21a2 8e84 c141 fe9c dd06 5fa1 .....!..A......_ 80415d4: 70c1 625f 4838 2dfe d50d ff38 d825 862b .p_b8H.-..8.%.+. 80415e4: ff88 1c18 92ed 9857 4020 eb28 53fc 1f03 ......W. @(..S.. 80415f4: 1438 31d4 9344 9b68 7045 907b 30dd 9519 8..1D.h.Ep{..0.. 8041604: 21c2 b5ce 4934 63e7 0748 345d 0922 de20 .!..4I.cH.]4". . 8041614: efab 520b f3a5 0531 d497 cd6b 0b8a 006d ...R..1...k...m. 8041624: 1e51 68f8 4c59 50a4 2e6c 6f22 f721 592a Q..hYL.Pl."o!.*Y 8041634: 0a48 1a42 f389 fb31 c3f0 405b aa01 d17b H.B...1...[@..{. 8041644: 9864 8e94 0ec7 6c0d 5561 d43a 0a18 ee32 d......laU:...2. 8041654: 42f0 14a0 9742 b973 1dab 379c 40dd 2874 .B..B.s....7.@t( 8041664: 5ce4 506a 3a64 7c71 8d1c f7fd 1a81 ccb4 .\jPd:q|........ 8041674: 56fb 3888 df51 1d1f 09d3 f22a be58 0619 .V.8Q.....*.X... 8041684: 7ac7 8b1e 2238 1c6f 208c a6bf c1d0 e53c .z..8"o.. ....<. 8041694: 6c56 76db 30a5 7a7c 294a 972f 65f2 edaa Vl.v.0|zJ)/..e.. 80416a4: 83f4 0271 609a 3eaa 8cff 1856 4f2b 90cc ..q..`.>..V.+O.. 80416b4: fd0e 29af 0449 64b2 9b16 92de fb6d c2ed ...)I..d....m... 80416c4: 0d6c 26c8 fa80 888e fa78 c90d 9f0a 6c83 l..&....x......l 80416d4: 8b78 9250 e39a f18d 9505 8710 ff3d f3bb x.P.........=... 80416e4: d04f a11c 3f39 db6b 2934 3f33 5ced 7e66 O...9?k.4)3?.\f~ 80416f4: 28de 362a 134d 7373 69d2 b980 3c1b df92 .(*6M.ss.i...<.. 8041704: 8731 56ff 2ec8 03b4 4f7f e443 f80d 7692 1..V.....OC....v 8041714: 81a4 7ca1 f34d cec5 d224 31e7 03ff 52ed ...|M...$..1...R 8041724: f19a d877 d898 800a fa21 bec7 79f8 1b7e ..w.....!....y~. 8041734: 93a4 ff3c 3094 8813 eacd f682 a7e5 7d97 ..<..0.........} 8041744: c5fa 3436 ff2e ef2f 85dd a15a 0128 5b0b ..64../...Z.(..[ 8041754: baf6 7b61 4a02 4218 b27f 15cd c567 265c ..a{.J.B....g.\& 8041764: 8084 9046 19c2 4cb4 1098 8829 0f18 3c1f ..F....L..)....< 8041774: cdde 7be4 b310 8758 17a4 d0c6 e2c4 3611 ...{..X........6 8041784: b058 3c1b 8a4f 5496 a0cf b010 8de4 ea52 X....b 80417d4: 469b f42f 60fd 0828 1926 aca5 2ae6 e830 .F/..`(.&....*0. 80417e4: 3b78 c649 3ba1 0a81 f508 162d abd2 7d95 x;I..;....-....} 80417f4: 7132 1ca6 652a 8268 5dbf 0e36 7109 1e85 2q..*eh..]6..q.. 8041804: 0bb8 284c 5f89 f290 083f 9d2e 0ea2 0978 ..L(._..?.....x. 8041814: a026 cd6a 63b4 9583 8df5 e478 0f0c 07aa &.j..c....x..... 8041824: e751 c6a0 2318 bd38 9b19 6d39 2709 3244 Q....#8...9m.'D2 8041834: fa8e 320c a43f 4dc5 dc11 9a6b bd92 838d ...2?..M..k..... 8041844: 7441 2c14 3cc2 42e3 7436 1409 97c8 83d8 At.,.<.B6t...... 8041854: ed5a c23c 8f16 052e cd7e 7510 4bb8 c046 Z.<.....~..u.KF. 8041864: 69ec 9cee 259b 058b 4cd8 0969 f19b 2c42 .i...%...Li...B, 8041874: 86bc 1624 f0cf ca22 3058 7988 98ea 48d9 ..$...".X0.y...H 8041884: 64b3 5331 4f3c 0b12 7400 cf44 cb14 afe6 .d1S.L6.}#. 80419f4: b45c f242 2be1 ed69 3d13 19fb 2e86 381a \.B..+i..=.....8 8041a04: d5cc 37af cccb da68 0c4f b5d2 7f07 ca0a ...7..h.O....... 8041a14: cc36 4b4f f7ce a3b2 0d08 0ef5 0708 f2e4 6.OK............ 8041a24: 68a3 afda 9620 d50b a85b 9fdf 4d09 967b .h.. ...[....M{. 8041a34: 4936 264d 237b 13e5 671b ff95 6a7b f0ca 6IM&{#...g..{j.. 8041a44: fd34 e3f9 f707 edc9 7960 2562 56fd eeea 4.......`yb%.V.. 8041a54: 0281 5ef3 8c92 091e 4faf ca1b 9189 6acf ...^.....O.....j 8041a64: 9652 1e3c 21b7 1ed3 7f05 c0f9 0a7d be91 R.<..!......}... 8041a74: de60 bd0b 1471 9d47 4ca4 7655 1f77 b8e2 `...q.G..LUvw... 8041a84: 61f4 0817 0586 ddf3 d0db 1c6b 1b0b b29c .a........k..... 8041a94: e486 7802 d311 2871 6674 3b5b c5b2 0c3e ...x..q(tf[;..>. 8041aa4: 0d5a a228 b060 6400 83ae d953 0641 9a55 Z.(.`..d..S.A.U. 8041ab4: 56c4 02ad c275 1769 9b02 5326 9f66 8157 .V..u.i...&Sf.W. 8041ac4: 75c0 c91d 042d 6845 10b4 8a13 e867 8636 .u..-.Eh....g.6. 8041ad4: 4667 e457 2327 5612 7046 a82f 6fdd 1dab gFW.'#.VFp/..o.. 8041ae4: 068e 1e93 6ca9 b8e5 7a1f a141 956a 8ad6 .....l...zA.j... 8041af4: f8ad 4c38 1ebc 1d49 139e 2607 5318 0e12 ..8L..I....&.S.. 8041b04: b1bb c4d9 2ed7 6444 b6f8 2a0a 1313 0966 ......Dd...*..f. 8041b14: e5a0 0a62 2d87 00ae 2e2d c689 cc2f d626 ..b..-..-.../.&. 8041b24: 21e0 4b75 c432 3c64 f706 51a0 0e28 1702 .!uK2.d<...Q(... 8041b34: 428b 0187 9dc8 ef77 82a4 980e 9093 e068 .B....w.......h. 8041b44: 4144 a44f 425d 7635 1b80 7ecf 8263 be84 DAO.]B5v...~c... 8041b54: 0a4b 77f4 9df8 7e19 a284 05f8 c5a9 97c8 K..w...~........ 8041b64: ac06 0645 a2a1 3185 51b8 03f4 0107 4636 ..E....1.Q....6F 8041b74: 811e ac97 fe9f cc03 bf62 97c0 ce18 6702 ........b......g 8041b84: 77c8 1fd8 58e8 dcac 9b0f a93d c2ff a1a4 .w...X....=..... 8041b94: 4f66 f12a e777 02bf fc43 fa62 f9d5 162f fO*.w...C.b.../. 8041ba4: 633a 7fb8 5daf 9570 347f 3bbf f87e 7186 :c...]p..4.;~..q 8041bb4: 37e7 2b8c 9729 4f76 28f3 7d0a 92a3 c811 .7.+).vO.(.}.... 8041bc4: df76 b981 334f 167f e59c f5ea 6eeb c6f1 v...O3.......n.. 8041bd4: 370d b6e5 3819 e688 080e de05 f264 923a .7...8......d.:. 8041be4: 5a2b 5b13 934d 9c3d b982 319b e7b4 1761 +Z.[M.=....1..a. 8041bf4: 95e4 8140 3a8f db86 8b86 e9b5 b182 5a57 ..@..:........WZ 8041c04: 75fe 6965 f96a c270 79f2 5c10 3ce8 2b25 .ueij.p..y.\.<%+ 8041c14: a07d c3f5 d823 f6f3 fdfc 72fd 0de8 ec2d }...#......r..-. 8041c24: 7632 936b 0e47 de5d ef85 36d7 95ab 73d1 2vk.G.]....6...s 8041c34: 4513 9849 03f4 af5b 39c2 f238 7631 eadd .EI...[..98.1v.. 8041c44: e81d 06fb c10c c419 028f 9cf8 1ee3 b7b6 ................ 8041c54: 7ae2 7d26 d1c4 ed90 e632 3dca f36c d8f2 .z&}....2..=l... 8041c64: a781 007b aff7 75da 76e9 57b3 f29c c0e4 ..{....u.v.W.... 8041c74: 1421 37c3 c48c 2640 7b7c 1f6f 47ce e8fc !..7..@&|{o..G.. 8041c84: 62d8 5c05 8d6b 8d5c d12a 29c0 bea3 c837 .b.\k.\.*..)..7. 8041c94: a8e3 7512 3872 04aa 93a4 69a7 9d62 8e9c ...ur8.....ib... 8041ca4: a4aa 6c56 3981 ef6c 2780 6a64 ce45 bfb3 ..Vl.9l..'djE... 8041cb4: 53bd 815c ea4b ac37 33c8 40a0 4c22 d101 .S\.K.7..3.@"L.. 8041cc4: 6d38 a367 ded8 bbbe e8fd c1de dba3 9ab7 8mg............. 8041cd4: ebe2 47dd 6fb7 27df e989 25d6 dfad 5bd2 ...G.o.'...%...[ 8041ce4: c067 6d37 3a5d 2ffc 809e e004 fc59 4857 g.7m]:./....Y.WH 8041cf4: 343f aca4 9bd2 a776 0ae2 ee2e 414f 3ae4 ?4....v.....OA.: 8041d04: 9954 f6a8 3da6 8022 e2e1 50ce fd48 27fc T....="....PH..' 8041d14: 959e 9c80 df6f 2ab3 2c97 68cf f910 2674 ....o..*.,.h..t& 8041d24: eb64 69df 379b 905f d0b1 9a6c a337 4e28 d..i.7_...l.7.(N 8041d34: 688c dc6c 509c 4048 edb7 4797 9013 19ba .hl..PH@...G.... 8041d44: 873c 6c79 0e10 2cd9 b308 caa5 c21f eecc <.yl...,........ 8041d54: c2c0 f566 5052 c70f d41d e6c2 d270 5bef ..f.RP......p..[ 8041d64: 9a61 f71d ac26 ab5e 4112 9e93 0755 3f4d a...&.^..A..U.M? 8041d74: 136d 6c30 a2a1 b4b3 0cd1 ada6 66ca c207 m.0l.........f.. 8041d84: 3cbd 8b4d d029 4103 771d a823 62b1 8704 ..I\ 8041ed4: 6f26 364a 9646 4c66 7309 c100 c1de 240a &oJ6F.fL.s.....$ 8041ee4: 9570 c0ec 0dde 1b01 a47e 1096 5c6c f708 p.......~...l\.. 8041ef4: 80dd d78e b205 edb7 c510 4010 843f 355b ...........@?.[5 8041f04: 0547 62a2 ca9c be48 0e11 a90d 5d42 fc2c G..b..H.....B],. 8041f14: 3824 2025 ec25 145d 90c3 21c0 7d68 c2ef $8% %.]....!h}.. 8041f24: 56fd af67 2902 028a 38e8 8d24 aaa4 2232 .Vg..)...8$...2" 8041f34: 42c6 6428 b32d f7b8 c1de edc3 db47 20f7 .B(d-.......G.. 8041f44: 30a8 6f9c bd9b 5e03 03ec 0573 5a11 0939 .0.o...^..s..Z9. 8041f54: 408a d630 2abd 641a e0c0 9808 4063 7991 .@0..*.d....c@.y 8041f64: 2f49 3fb7 7db8 177f d132 834c 6e55 a6b0 I/.?.}..2.L.Un.. 8041f74: 241a 8b85 16d9 de75 a3d9 4bfc bcda bdb5 .$....u....K.... 8041f84: 7b7b cef7 dbbd cdf3 d0d6 d62c 6669 67b9 {{........,.if.g 8041f94: c1a4 6e2b 772b b6f1 6fca af15 381f b563 ..+n+w...o...8c. 8041fa4: 7059 c2ba 4703 6d3f a68d c1f5 5cc0 116c Yp...G?m.....\l. 8041fb4: 9f51 0465 66ca 84df 50bc aa20 91d4 8c3d Q.e..f...P ...=. 8041fc4: 0186 6373 689c a644 8239 76bb 57bd 31bd ..sc.hD.9..v.W.1 8041fd4: effd 52d8 431f c153 134e d64e 9ddf 1aff ...R.CS.N.N..... 8041fe4: 9ba6 d357 ba7f 8abe ebf2 4d08 d834 6623 ..W........M4.#f 8041ff4: 6e83 4187 e0df 259f e83f 9338 627e 03ce .n.A...%?.8.~b.. 8042004: 7a94 aa50 b449 31bf 7bfd 7756 077e fd8e .zP.I..1.{Vw~... 8042014: f5f9 3455 e374 c8fa b660 9b65 77b4 b04a ..U4t...`.e..wJ. 8042024: 758f 4d87 c3c3 82c8 0b71 fe15 861b adf1 .u.M....q....... 8042034: d2d8 f606 27fd f9d8 f4e0 916c 02fa f05f .....'....l..._. 8042044: 96fa afaf 6e8e c688 e9ae 7a5b 3d06 caa9 .....n....[z.=.. 8042054: e7cd 4c31 17f7 c329 2bad 8032 cc34 11d3 ..1L..)..+2.4... 8042064: 1bfb 0561 811c d1ea 952e 2b26 aef6 f467 ..a.......&+..g. 8042074: c9ef c200 81de 7422 70e4 6100 388f a288 ......"t.p.a.8.. 8042084: 0f54 aed1 9d1a 7bba e2de a61d 38ab 40f3 T......{.....8.@ 8042094: 8372 2e74 296d f8a3 b90b 9890 7c5e 7df6 r.t.m)......^|.} 80420a4: 5229 b2e3 2c43 43f1 bab0 afab 7385 5f5d )R..C,.C.....s]_ 80420b4: 9d2e 6a4d 96ac 4382 159c 6abb 5c65 eb5c ..Mj...C...je\\. 80420c4: 3474 8e0e acde 0453 f32a 53d1 a8ba f449 t4....S.*..S..I. 80420d4: fef3 c7c3 a8dc 607e 464c 81f1 baa4 38ff ......~`LF.....8 80420e4: 4434 3970 6e3c e83f f9b8 07fe f7d5 39af 4Dp9 8042154: aa1a 810f d92f e505 a55e b10b ef52 9588 ..../...^...R... 8042164: f562 b67f 0697 b2f7 7aa6 ba81 96a2 f284 b........z...... 8042174: d2ae cdc7 9d6d 6616 5fdb f6e3 55d7 74fb ....m..f._...U.t 8042184: 40fb 81ce aef2 fed2 edee 0f7b 0279 d2ac .@........{.y... 8042194: b6cd cebf 6fed f6a8 e185 f65a b940 0f69 .....o....Z.@.i. 80421a4: 44b3 78fc 7b77 fdf7 f3c7 cf42 3706 a9b8 .D.xw{....B..7.. 80421b4: d41a 28e4 bbca b9b0 12c5 26d4 fb1a 9353 ...(.......&..S. 80421c4: 34a0 cd86 fc12 487f 2451 e592 a8a4 2805 .4.....HQ$.....( 80421d4: faba 9de9 524a 2b5a 9c17 6f8c 4d20 8ca5 ....JRZ+...o M.. 80421e4: 1335 32a7 9a0e 5409 bf19 1e43 c9df 1de8 5..2...T..C..... 80421f4: dc64 7909 2b7c 77a3 7290 6413 d5f1 de8c d..y|+.w.r.d.... 8042204: dc81 c8fa 1be0 3d1a b736 2760 8321 69af .......=6.`'!..i 8042214: 0ef4 cdd2 2c85 a8be 1801 b70a 9822 f09c .....,......"... 8042224: 31a6 59bd 6d11 ecf6 c5d0 d7b9 d356 bef8 .1.Y.m......V... 8042234: e12e 525d 8e6f 7793 3db5 fafc 8a7a f737 ..]Ro..w.=..z.7. 8042244: 56ae 9e6b 86dd ab57 e798 4fa1 56af cf29 .Vk...W....O.V). 8042254: 0f18 4ab5 48b3 bc57 7fae 8c09 6060 863f ...J.HW.....``?. 8042264: ac40 7dd1 c19e f268 0929 4ac5 949a 0141 @..}..h.)..J..A. 8042274: 76e2 65d5 ca3a cb1b aac5 7207 2a4d 83b7 .v.e:......rM*.. 8042284: a241 2ab1 72b8 33d7 b1d2 9faa 786b 7492 A..*.r.3....kx.t 8042294: 0f36 c0fc 4183 7c99 4a1b 7235 ee29 c3d6 6....A.|.J5r)... 80422a4: 422d d2e1 ef49 91d5 c74b ac43 2c26 e34f -B..I...K.C.&,O. 80422b4: d41d 4ed9 300a 7ab5 aa37 8db5 7e36 6a56 ...N.0.z7...6~Vj 80422c4: 480d f8f8 86b5 e380 67b6 2b57 f5d5 b566 .H.......gW+..f. 80422d4: a15a 7b24 ab22 7a95 910d 2b52 63f6 2176 Z.${"..z..R+.cv! 80422e4: 3b95 68e3 23b0 2adb a578 c6cd dc26 28b2 .;.h.#.*x...&..( 80422f4: 3d16 eb70 55ca 5da5 1b8f 21c4 b2d4 ac71 .=p..U.]...!..q. 8042304: 2bdd 4e53 a1b7 1473 1d76 52f8 14cb bb5a .+SN..s.v..R..Z. 8042314: 85dd 8a7a 6b08 3407 a084 07d2 b81d 1fa2 ..z..k.4........ 8042324: b9df a46d 4377 c04a ae11 2dcf 55a8 381e ..m.wCJ....-.U.8 8042334: d1e4 dd5d 871d 3408 ca4d 8f6f 9e8f 2a60 ..]....4M.o...`* 8042344: ca4f 7cab 62d3 9aa9 0e2d deee 77b9 c429 O..|.b..-....w). 8042354: 3a56 c3ce 5ef8 86e4 707d 0789 0b8f 7950 V:...^..}p....Py 8042364: cb32 ee18 4952 17cb 4359 b917 4511 f4b4 2...RI..YC...E.. 8042374: 2ff9 d7a1 3a93 becd 8a7f c669 d527 7b25 ./...:....i.'.%{ 8042384: 27da aeb0 01fd df19 72c1 86c6 182b 106b .'.......r..+.k. 8042394: ef52 c451 ee0d c21a 4c67 1cf6 eb4d e282 R.Q.....gL..M... 80423a4: 4e6a 9eff ba3d c39f 49b3 cef1 ead0 19e1 jN..=....I...... 80423b4: 0bb0 191d 6e07 ef91 16fe 5b14 44f0 753b .....n.....[.D;u 80423c4: 975f eaa1 7c52 dbb5 9b76 ba5d 4a88 0510 _...R|..v.]..J.. 80423d4: 7e48 9ee0 be9c d307 7c04 5968 7bc6 64d1 H~.......|hY.{.d 80423e4: cb8c b206 1c34 c422 9296 4154 245c d9ec ....4."...TA\$.. 80423f4: 81f3 6003 a6e6 5774 fb2b a614 1e56 a345 ...`..tW+...V.E. 8042404: b142 b08d b6e8 a4d9 68e0 d5b3 3dd3 21a0 B........h...=.! 8042414: 855a afa1 8e90 069c 7648 0298 99ac dd70 Z.......Hv....p. 8042424: 7f29 5c3f 3694 0add c970 0298 c124 b32e ).?\.6..p...$... 8042434: 0828 1735 dbfe c32b 78df 4c9b 775c 98e1 (.5...+..x.L\w.. 8042444: 600f 2b41 1498 9d44 c00b a3ce 961c 6131 .`A+..D.......1a 8042454: 3dd5 fd0e 87a4 939d ce2f 88af 881d 4be2 .=....../......K 8042464: a122 68ce d112 7a90 15b5 c01b 8e79 ba6b "..h...z....y.k. 8042474: e01c 7360 b7e0 dc38 4304 4570 9a96 5d37 ..`s..8..CpE..7] 8042484: cde8 93ed 3222 dda4 232b 41f7 d8fc 0a39 ...."2..+#.A..9. 8042494: 8c1e 201f e314 7026 7c54 442d 6e01 f85e ... ..&pT|-D.n^. 80424a4: fb6c 7071 6122 8c39 d703 3992 184f df52 l.qp"a9....9O.R. 80424b4: 747f 2cb7 d2ae 088a a410 2971 6418 81ea .t.,......q).d.. 80424c4: 2f16 68b2 2cc2 eadb 3994 129e 43d7 3605 ./.h.,...9...C.6 80424d4: f36d 8c28 6c43 5c26 6d07 98aa 4eef 4299 m.(.Cl&\.m...N.B 80424e4: 193c 7e33 3ca6 91ba 22ff 626f ba84 6083 <.3~.<..."ob...` 80424f4: d0ed 843b 3b41 94ed 04c1 c5de dc5d 9c0e ..;.A;......]... 8042504: 67c3 eb8c 38d1 02ea 717d 6f86 c470 974b .g...8..}q.op.K. 8042514: 0f91 e263 60fe 5890 c0a8 755f 49ca 3894 ..c..`.X.._u.I.8 8042524: b7fd 95ab c80a 9d9e fa7c 9cc6 92a1 d7d7 ........|....... 8042534: 91a7 46cd b0a7 f1fd d241 5503 8062 d658 ...F....A..Ub.X. 8042544: 5cfa bcf8 8922 da74 3562 ebd2 2c71 014a .\..".t.b5..q,J. 8042554: 6edf 5c99 c2f8 67a4 6e5a db16 1b3e ec3f .n.\...gZn..>.?. 8042564: d6b2 e2a8 0198 61c9 766e 381a 888d 49b0 .......anv.8...I 8042574: 6c80 07b1 ce06 1bb8 770e 91a3 d672 6993 .l.......w..r..i 8042584: 828a ee59 cce3 2f00 6b06 6e4e 3806 026c ..Y..../.kNn.8l. 8042594: 1390 2f39 279e 438f 0fb7 a3cb 2320 9303 ..9/.'.C.... #.. 80425a4: a9c2 baae 8a2b 88e9 315b fe2a 95ba 536b ....+...[1*...kS 80425b4: 515f 89ba b6ac 818c ceed 12ce dd44 fb60 _Q..........D.`. 80425c4: 72a4 caae 2126 db57 02d5 e89f bb5a 2c5c .r..&!W.....Z.\, 80425d4: 0aa7 bf17 70ba ea4c 8511 e91f 9277 a853 .....pL.....w.S. 80425e4: 017c ce81 5fdd 614e 4a67 3808 84ed 44fc |...._NagJ.8...D 80425f4: c902 cf5a 1cb5 2e08 ce66 d483 2073 458d ..Z.....f...s .E 8042604: 8d20 081c 5dae b7ce 46b2 c220 2721 2106 ....]...F .!'.! 8042614: 715c 2b94 6e9c 2e69 2292 1b37 6030 14e1 \q.+.ni.."7.0`.. 8042624: dca3 5a34 cd58 6444 1150 0807 ecab 31ee ..4ZX.DdP......1 8042634: c965 6078 4995 ca49 47ce e344 a730 2a0c e.x`.II..GD.0..* 8042644: 43d0 5568 34a5 024f f0c8 ad5e 7298 6154 .ChU.4O...^..rTa 8042654: e776 cd0a 7852 b1ed 8b2f 1c44 56ac 190d v...Rx../.D..V.. 8042664: 68b2 983e eb94 6cca ca02 c047 69a2 20ca .h>....l..G..i. 8042674: 5742 1797 e496 b81d e2f4 ba8a 8723 8273 BW..........#.s. 8042684: 84fb 70d4 6805 93b0 8037 4f86 a185 f8ff ...p.h..7..O.... 8042694: e1cc 2e02 cc00 18a4 d100 39a9 f6c3 eea4 ...........9.... 80426a4: 90fe 21ec 016e ebb1 02e3 b568 692a e131 ...!n.....h.*i1. 80426b4: 4d3c e5a0 998b 0ccd cea0 d479 a9c5 a1b4 {,n& 8042714: 63e4 2da5 e22d a2db c86e 45d9 b997 1bd0 .c.--...n..E.... 8042724: 522a 9e24 109c be0a e78f e73a cb62 cab9 *R$.......:.b... 8042734: 6132 8dfa ccdd cfba 8609 8a03 9123 2807 2a..........#..( 8042744: 530b 1c92 36e9 f361 cce4 f3d2 6a10 0836 .S...6a......j6. 8042754: 9796 794d 63a1 0549 2dbe 9980 bacb b5b1 ..My.cI..-...... 8042764: 9455 4d77 d8d4 df35 769a 8efb fa44 5f29 U.wM..5..v..D.)_ 8042774: fc41 d202 4bff fd19 f78b 5816 87c8 c646 A....K.....X..F. 8042784: 1961 3418 599f 122d 1038 7862 970b 110a a..4.Y-.8.bx.... 8042794: 3dfd 3d77 c790 84a1 5dc1 b01c 8ef2 5ce4 .=w=.....].....\ 80427a4: 08be 39b1 38b3 565a f644 0c51 4e40 244b ...9.8ZVD.Q.@NK$ 80427b4: 91d5 5c1e d079 5ce9 b182 d1cb 74e3 28e0 ...\y..\.....t.( 80427c4: 5e5c e1ce f387 a080 881f 5c22 84f9 8346 \^........"\..F. 80427d4: 2db7 6010 a320 81a5 c835 9710 288f 6689 .-.` ...5....(.f 80427e4: 9386 3f44 58ca d510 3f30 121a b18c 6486 ..D?.X..0?.....d 80427f4: 1867 2a11 fa7f a445 f110 0377 663c 4993 g..*..E...w.w.x...|'"..pt.) 8042844: 5de4 84ef a8f3 7730 0345 921c 54d3 c2a0 .]....0wE....T.. 8042854: 35b8 174e 88bf caef 5f7b 3104 6973 9503 .5N.....{_.1si.. 8042864: 0e65 d215 a5f2 9cc3 3ce9 a657 1780 8a61 e........... 8042904: ca2f 29ba 1ac2 5339 cb7e e086 da5f c649 /..)..9S~..._.I. 8042914: 1dfd 6171 4aca cf83 f36c 3acf b59d 5aca ..qa.J..l..:...Z 8042924: a105 1c5a fbaa b757 deef f07d 6521 1c57 ..Z...W...}.!eW. 8042934: 81bf 10f0 cd91 bb71 adc8 3dd7 02af 8a60 ......q....=..`. 8042944: b13f 7864 2c0f ef11 701d 0184 e47c 1def ?.dx.,...p..|... 8042954: 30a8 bb02 4966 36ab a400 f809 4003 db28 .0..fI.6.....@(. 8042964: ca33 e7e5 5d8e 0057 c376 a362 bdaf 9166 3....]W.v.b...f. 8042974: d71d b75e 9184 ded6 c8b0 6b12 5a6f f4ca ..^........koZ.. 8042984: 9f65 0f6c 31fd d202 4a9b 0311 91db 60a7 e.l..1...J.....` 8042994: 7d66 4d48 ca74 26d8 ad2b 0886 b98f 77d9 f}HMt..&+......w 80429a4: c3bc 889b 7b54 66f1 646d b8f5 d819 dee0 ....T{.fmd...... 80429b4: 7eac b0f8 c887 d39b 6f10 e131 e447 2b73 .~.......o1.G.s+ 80429c4: 8fb0 9d8c 6b37 ab87 f718 61c2 2dc8 c87c ....7k.....a.-|. 80429d4: a68f 6fc5 c6d6 db9d 92c2 2dc8 c338 9845 ...o.......-8.E. 80429e4: 1850 4b2f 15dc 8a10 e69b b865 65c8 5db3 P./K......e..e.] 80429f4: 0352 a1e3 20e6 68e4 2771 cce6 ec42 ff54 R.... .hq'..B.T. 8042a04: 5e05 12bb 347a efdb 4e38 1430 6577 466f .^..z4..8N0.weoF 8042a14: a1cf 10f0 494c 98c1 09d6 c244 f118 8823 ....LI....D...#. 8042a24: fcbc e40d 7a1a 8145 99cc 8ab8 a566 2f2f .....zE.....f.// 8042a34: cfe8 c88b 9b53 98a2 91e8 97a9 86f4 f9c3 ....S........... 8042a44: c92f 99ec 37bd 72f2 95fa a078 f660 0675 /....7.r..x.`.u. 8042a54: 1504 9402 0c62 44bf f15d 09ac 6e5e a180 ....b..D]...^n.. 8042a64: d3f4 31b2 9ffd 08dc 0304 2544 10d1 a3c4 ...1......D%.... 8042a74: 5f2b 7052 7512 ee27 fcb9 e48a 7a06 e585 +_Rp.u'......z.. 8042a84: 7a0b e5b3 92a5 0023 ad5d 1bd0 f42f 0b68 .z....#.].../.h. 8042a94: 942a 2361 72e9 7d18 b693 d8a6 646d 5569 *.a#.r.}....mdiU 8042aa4: f579 dd7a 26b4 7ee3 c713 3f08 22b7 d74e y.z..&.~...?."N. 8042ab4: 17b8 371d 5b25 0985 4942 b8c4 0f6c fd79 ...7%[..BI..l.y. 8042ac4: 0d7a 3eb6 9811 c079 9981 518b 0f9c bcdd z..>..y....Q.... 8042ad4: c10c d598 e717 4d9f 8f7f 4bc8 ce3c d901 .......M...K<... 8042ae4: 984d 318f ba01 481e 40eb 614f 62e0 6121 M..1...H.@Oa.b!a 8042af4: 2f06 651d 0a53 3ec0 6bea a5a6 a94f e9d3 ./.eS..>.k..O... 8042b04: 1898 ade0 babf f07f ede1 b69b 7dfc 7a7a .............}zz 8042b14: d672 df92 b665 da94 3827 9baf c1a9 d669 r...e...'8....i. 8042b24: da80 194e 5b01 61c9 3c44 6df1 7e3c 54b6 ..N..[.aD<.m<~.T 8042b34: 5e85 0b3c 890c af16 15c4 b2cf 22dd eb4d .^<.........."M. 8042b44: 4d00 c712 71eb e08f 43e6 95d8 5771 cced .M...q...C..qW.. 8042b54: f612 ac9f 917b 99ce 2f70 c11d f802 064b ....{...p/....K. 8042b64: 07e1 070b eb71 bdc1 d130 9cc6 3cb2 9587 ....q...0....<.. 8042b74: 490a 0100 95d9 e931 4604 20b2 8bc1 ea57 .I....1..F. ..W. 8042b84: a213 3c46 a4f6 ae8d 0808 faf2 f600 8896 ..F<............ 8042b94: 63d7 7cc8 7e96 2ab4 031d 6f96 407a e852 .c.|.~.*...oz@R. 8042ba4: c09d 3c2e d415 ee16 8d97 8e1e 3cf1 bc24 ...<.........<$. 8042bb4: f023 709b 3363 7a79 906b 9c7a 17a1 6ff4 #..pc3yzk.z....o 8042bc4: 5c4e 25c4 fae2 352d 4672 5b71 3cbb dcec N\.%..-5rFq[.<.. 8042bd4: 712c eefb 80f8 5d71 1466 4740 3a90 9a8b ,q....q]f.@G.:.. 8042be4: 729a 90e2 a5bb 843c 48f4 22da 0a04 c917 .r....<..H.".... 8042bf4: 594c b1c7 7e0a a8a3 ec4a fb12 5c04 eb45 LY...~..J....\E. 8042c04: ee8d 8a26 0407 1985 af03 b608 9894 5e9f ..&............^ 8042c14: 2248 5367 b797 7911 ac2c 192e 77fd 3c71 H"gS...y,....wq< 8042c24: d817 c16b c55f 5a95 6de3 edef 0af5 a3fd ..k._..Z.m...... 8042c34: f90b 32f0 6177 7dbc def7 f0ae 914d 211b ...2wa.}....M..! 8042c44: 66a5 a38f 6daf 21b8 72e0 8608 2ee4 ff7b .f...m.!.r....{. 8042c54: 1dd1 dd3c 7786 b057 3042 af6e 7a14 b36d ..<..wW.B0n..zm. 8042c64: 0465 47cf b421 402e f0f5 0d36 7d72 a5ca e..G!..@..6.r}.. 8042c74: 833b f2c8 5645 5940 57b8 84e4 6a43 644d ;...EV@Y.W..CjMd 8042c84: 06e2 0b47 4ac6 1e04 8807 378e d241 b5c0 ..G..J.....7A... 8042c94: 6f36 37cd 7b97 928c 2607 26dd adab f127 6o.7.{...&.&..'. 8042ca4: 176a c6c3 2c3d 1d0a 1be1 5058 5c83 529b j...=,....XP.\.R 8042cb4: 7896 4814 c279 2e78 a545 0a9a 6017 4e7e .x.Hy.x.E....`~N 8042cc4: 86f2 72a3 adfe 6154 10ff 6bef d316 d5b7 ...r..Ta...k.... 8042cd4: eae8 6e06 0650 6d7d e2a8 28fa 4248 20ac ...nP.}m...(HB. 8042ce4: 65f9 1140 9258 e8c5 b82c 8a1a 815c 2f0d .e@.X...,...\../ 8042cf4: 2287 338f ec35 f6ee 9626 a951 fe96 19dc .".35...&.Q..... 8042d04: 3696 462a d2a5 7fa4 0355 078b 65cc f424 .6*F....U....e$. 8042d14: 127e 41f6 8ae9 28a2 3609 e135 3d47 0373 ~..A...(.65.G=s. 8042d24: 0696 f166 a78c 0b08 cb75 273d 707e a43c ..f.....u.='~p<. 8042d34: 034d f573 f80b 968e 9797 841c 6278 f426 M.s.........xb&. 8042d44: 26cb 358f e9d6 ad2d 74a5 a7c7 c553 e5e4 .&.5..-..t..S... 8042d54: 568e b7cf cc66 bcb4 b8eb b79a 4b01 5eac .V..f........K.^ 8042d64: 7576 5140 ac27 432a 1246 8c68 55b1 84b2 vu@Q'.*CF.h..U.. 8042d74: 4f30 6cb8 4743 a328 a01f 4b54 9e9d a6aa 0O.lCG(...TK.... 8042d84: 7720 5b29 f0c6 a1c0 b96b 11d8 8e00 d4b2 w)[....k....... 8042d94: c005 5c90 0112 5f48 4033 15a4 f7f5 2bc8 ...\..H_3@.....+ 8042da4: cfb0 277e 1870 2a82 4e50 2cf1 45e5 b200 ..~'p..*PN.,.E.. 8042db4: 3fd1 b2b1 8e08 f211 9c35 d8c8 be7a 83d9 .?......5...z... 8042dc4: bc22 ab14 4287 9e93 a8ec a653 2b4c ff06 "....B....S.L+.. 8042dd4: 5aad e640 2031 957f 9816 bd01 0cab 2842 .Z@.1 ........B( 8042de4: 031c 8972 be0b dc45 3263 56ca 2e48 5c34 ..r...E.c2.VH.4\ 8042df4: 7b51 64fb f021 9569 8e6f 63a3 8ea8 278f Q{.d!.i.o..c...' 8042e04: b223 630d a7e3 f07e ed0e 1b24 8f1c e2df #..c..~...$..... 8042e14: f78d 083a 2439 7817 8bd9 3263 b2d1 ff01 ..:.9$.x..c2.... 8042e24: 5d31 7c51 0bdc e640 005c 1747 6d00 de0f 1]Q|..@.\.G..m.. 8042e34: 1c15 d26c 66e9 3bcd 9510 ddb3 2741 9ec1 ..l..f.;....A'.. 8042e44: dfb3 d072 b934 fd33 2502 dae9 dc03 b33f ..r.4.3..%....?. 8042e54: d3c3 22e7 7cf1 b101 2f2d 282f 6f88 d8be ...".|..-//(.o.. 8042e64: ba75 8cf4 ec12 1359 c578 e13b 6f10 a677 u.....Y.x.;..ow. 8042e74: ad26 1194 fbe8 f675 3e7c 4d3d d65b 63ce &.....u.|>=M[..c 8042e84: 18e5 1687 1fa6 ea83 c41e 93ec d6af 8ad0 ................ 8042e94: 6d70 e89b dbc8 46b7 e4f8 c5d3 b18d acd3 pm.....F........ 8042ea4: 3867 910c e384 8930 73de 7b70 294d c5ee g8....0..sp{M).. 8042eb4: 40d6 f114 f701 e20e fe07 8262 62cb 6792 .@........b..b.g 8042ec4: 66a3 eda4 cc12 4fa1 905d 2562 0568 536d .f.....O].b%h.mS 8042ed4: d0f0 3da0 f668 7ddb c1a6 d6f4 98c6 c1d6 ...=h..}........ 8042ee4: ed1e f78d 635b 04ac a3a8 614b e010 f0dc ....[c....Ka.... 8042ef4: cd10 078e c8d7 2286 878f 6487 a440 5bd4 ......."...d@..[ 8042f04: 7e5e db66 741d f38c 5907 b588 e0f4 26a8 ^~f..t...Y.....& 8042f14: 3987 9b62 a7b0 2fc7 7a4e f7a8 0156 2eae .9b..../Nz..V... 8042f24: d008 3108 b188 9f43 4b82 b53d 8201 0efa ...1..C..K=..... 8042f34: b3b5 eb03 5c6c 7bc0 bc9c 0365 35d0 acbd ....l\.{..e..5.. 8042f44: 15a7 85e1 5158 10f4 fd91 eafc 2c1e e239 ....XQ.......,9. 8042f54: b8c6 487d 092d 43e2 ac0b eb84 2e3e bc0b ..}H-..C....>... 8042f64: 5245 ca4e b025 b848 0f06 7531 1c87 81a6 ERN.%.H...1u.... 8042f74: f05f 2770 05df 1601 90ba 8aaf 2167 4466 _.p'........g!fD 8042f84: 70b6 43b8 74c5 22c2 7471 1531 b77c 870b .p.C.t."qt1.|... 8042f94: cbcb b887 040a ec40 3029 1da4 1831 7434 ......@.)0..1.4t 8042fa4: f248 4807 d168 f49c 9992 6129 d525 c284 H..Hh.....)a%... 8042fb4: 7362 ed09 453f 5a8f da4b 9e68 eae2 86b7 bs..?E.ZK.h..... 8042fc4: bd29 8255 8aca b605 a6b4 1451 3311 ee64 ).U.......Q..3d. 8042fd4: 4e25 625d d922 932e 0417 e858 0460 6cb8 %N]b".....X.`..l 8042fe4: 5c5a 8a0a 0f49 c37c 0da0 9b7b 53ee cc15 Z\..I.|...{..S.. 8042ff4: 91fb 8b01 3d00 61f9 f470 fc08 4699 c682 .....=.ap....F.. 8043004: c482 d5c0 0eec 271e 11f2 40d8 876c 6862 .......'...@l.bh 8043014: 93b2 7b01 7192 bb43 5612 c77c 8a85 4b8c ...{.qC..V|....K 8043024: e68c 6f04 8171 f4b0 fbe7 7616 6b2a 3018 ...oq......v*k.0 8043034: 062b 1ba2 c23a 20e0 bd96 a753 558a 1440 +...:.. ..S..U@. 8043044: 8f80 d729 e4b7 d007 48e2 d0ec 2088 8243 ..)......H... C. 8043054: 2f47 4b36 cb81 08ee 080a 33b0 f6c4 5705 G/6K.......3...W 8043064: e9ec 0fa7 8668 f1c0 82b0 084e b81d e5b2 ....h.....N..... 8043074: e682 4208 866c fadc 68b5 cc9b 34ac 9110 ...Bl....h...4.. 8043084: 78a3 7bb9 3a42 6727 41d6 829b 3101 5af6 .x.{B:'g.A...1.Z 8043094: 8062 f9c9 fb7c c0c5 8ab6 10bc a067 570f b...|.......g..W 80430a4: d24d 0c23 0d95 bcb6 a7d0 5b41 70d8 7014 M.#.......A[.p.p 80430b4: eb48 4ea5 74b3 88f4 e8de 98e5 3d0c a120 H..N.t.......= . 80430c4: ba94 ad0e 4518 a46e ad87 06c2 a509 14ae .....En......... 80430d4: c190 bca7 f119 e49e c84d 96ea b286 ff0c ........M....... 80430e4: e4a4 d09c e8d1 120b 2b14 5680 9ee4 e22c .........+.V..,. 80430f4: 93d0 702e 1c66 fc78 bf37 f41d 94c2 88ab ...pf.x.7....... 8043104: 70cd ee26 09fe 98fe 0975 3857 acdb d849 .p&.....u.W8..I. 8043114: ebc6 a091 f818 8e9d 760f cf41 8682 d203 .........vA..... 8043124: 70e0 5f41 28dc 90b3 0ea9 3a34 7d35 5675 .pA_.(....4:5}uV 8043134: fcb2 a949 f979 09b3 9147 4ba2 410e fc83 ..I.y...G..K.A.. 8043144: 1409 8789 1635 9d8a 2d6a d884 6299 1b5d ....5...j-...b]. 8043154: 9835 4096 4614 7ccd d17b 41d0 88ca 59aa 5..@.F.|{..A...Y 8043164: f434 0f2e bbbd eadf 138a f680 bf9e a5d7 4............... 8043174: 6a28 4011 b106 8699 427d a499 340f 0349 (j.@....}B...4I. 8043184: 1dc5 f2bf 28d3 6bc4 8426 7e06 e3d7 002c .....(.k&..~..,. 8043194: 0f4b af68 fc58 23b6 c9c1 06e0 99ac 87a8 K.h.X..#........ 80431a4: e237 8531 ad0c 35d8 157c 9e9a 3b13 e9c3 7.1....5|....;.. 80431b4: 3aff 48c9 7493 0b1c 4b47 d038 c110 2191 .:.H.t..GK8....! 80431c4: cc32 952e cabe a404 0e70 0ce5 82a9 d5d2 2.......p....... 80431d4: 7f56 24f6 395e ffc5 56b7 8abb 105d e155 V..$^9...V..].U. 80431e4: 798d 73bc 5ae2 94ac 6b88 e1dd 8147 3968 .y.s.Z...k..G.h9 80431f4: 4feb 49b1 f57b 8c49 f436 b826 b717 3698 .O.I{.I.6.&....6 8043204: 0f45 1366 51a7 5cc7 08d6 391d 7abc 2b1e E.f..Q.\...9.z.+ 8043214: 8f6f ee82 e7ed 82a3 e4f9 0b89 adec 6ff0 o..............o 8043224: cccb ecbd 9f2c e640 6e5b 3ec4 1953 9d44 ....,.@.[n.>S.D. 8043234: 5937 bce3 b487 9413 58d2 3d23 45e8 4462 7Y.......X#=.EbD 8043244: c2cb 6cad 148a 68c6 1db5 d334 06a6 dd8e ...l...h..4..... 8043254: 8339 bd21 19fd 880c 46d3 076a 19fa b590 9.!......Fj..... 8043264: cd2f 7c1e 2062 32a0 6fb5 7b80 58e4 7a78 /..|b .2.o.{.Xxz 8043274: a87c bdb5 9ca8 7354 dd28 8bf8 6f01 4f67 |.....Ts(....ogO 8043284: c87a 2b37 24e8 a1cb 641c a84a 9467 0243 z.7+.$...dJ.g.C. 8043294: 699a 1d53 2e1b 6d05 7057 54db 1aee 04f9 .iS....mWp.T.... 80432a4: a52a 78b3 0822 f20b 01b9 cfca 238e 7356 *..x"........#Vs 80432b4: 8917 3972 141c 304f 0466 4a21 8a0b 0592 ..r9..O0f.!J.... 80432c4: c45b 70a0 d330 4a89 a14f 6338 f20f fa93 [..p0..JO.8c.... 80432d4: b74a 052c c279 799d 41e2 119b ea40 1eed J.,.y..y.A..@... 80432e4: 3238 f704 d65a 57b8 c980 7b78 7ec1 102b 82..Z..W..x{.~+. 80432f4: 002c 1c12 0a52 86d2 decd 11c7 97ca 7d9e ,...R..........} 8043304: 885c 1855 6fa7 9ec9 934c 95a7 af0a 5cda \.U..o..L......\ 8043314: 6ef0 6eab ca0b 84cd 54e2 fc29 0a0d d40e .n.n.....T)..... 8043324: 1528 fab0 d467 4da1 f073 8ada 5637 ba40 (...g..Ms...7V@. 8043334: f4cd 1711 7b9f 0f7b d727 3b95 95c2 c967 .....{{.'..;..g. 8043344: 7978 0043 306b 8812 14cf 6437 b18d 1466 xyC.k0....7d..f. 8043354: ad1c 6c83 baab 36f4 b562 cd7d 0634 1f81 ...l...6b.}.4... 8043364: 883a 60e1 91cf ac69 78de bc32 bcd6 f266 :..`..i..x2...f. 8043374: 56ef 32aa 9b70 6b85 864f 11d7 75f1 e068 .V.2p..kO....uh. 8043384: 5a7d 2154 2a1d 1d26 6f0a 02bb b607 0d79 }ZT!.*&..o....y. 8043394: e22f 6592 1b2f a3c1 3f49 74b8 3300 dffd /..e/...I?.t.3.. 80433a4: d6b8 6f34 8b98 e5fa 8cde f42c 156d 1cea ..4o......,.m... 80433b4: f43a 11e8 ebde 5cab 637a 059e 44e3 f254 :......\zc...DT. 80433c4: e1b2 8292 a69e afe8 a46d 5709 01c5 0c2b ........m..W..+. 80433d4: 9e9f edba ec02 31c1 bdcc 63e5 3c67 0524 .......1...cg<$. 80433e4: 5e87 d1ec 8883 09a9 e159 db69 e685 581a .^......Y.i....X 80433f4: f524 cf56 a9d4 1c7f 87b8 2261 df9f 1eda $.V.......a".... 8043404: 9086 6130 e3c7 bebf 52c2 fc80 2c03 2533 ..0a.....R...,3% 8043414: 5b1d 862c e374 1bd9 9beb c0f4 ec19 5d82 .[,.t..........] 8043424: a97b e3e0 62c1 7c32 3f41 c60f bd38 7c11 {....b2|A?..8..| 8043434: 05e6 a5ed 736a 42a9 b941 9c38 56c8 9f06 ....js.BA.8..V.. 8043444: 1199 86c6 901b 0b3c 8413 210f 70ca bc0c ......<....!.p.. 8043454: 1635 c1e3 709d 3242 9e27 e2aa 06bf ef93 5....pB2'....... 8043464: f0de 9851 0044 2776 965d 20b7 c297 60fb ..Q.D.v'].. ...` 8043474: 23ac b103 10ca a172 2cf5 432f ea5f 8229 .#....r..,/C_.). 8043484: 2204 e8b2 fa3d 377b b927 acfb dffa d1bf ."..=.{7'....... 8043494: 82fe d90b c0f9 8f7a 6471 367a ddbf 7033 ......z.qdz6..3p 80434a4: 179e ad9e d754 a741 e9aa 3e6c 43fa 4ea0 ....T.A...l>.C.N 80434b4: 99e1 844d 95e6 4070 aba7 c9d8 63d6 3c7b ..M...p@.....c{< 80434c4: 5e76 1664 fc0c 96ed 423e a019 d8f1 1ece v^d.....>B...... 80434d4: 00e2 de79 4ae6 7fb4 ea7a 0dec 6965 01d6 ..y..J..z...ei.. 80434e4: 44e8 abae a078 9e89 d84b 5773 fb46 67e0 .D..x...K.sWF..g 80434f4: c9f2 22a6 a752 81a7 a985 83b7 21e6 941e ..."R........!.. 8043504: c6ce cdd1 1693 621f ce4a 5bf2 75de 9265 .......bJ..[.ue. 8043514: 796b 5b82 6da1 d3a8 24fb c8e0 294f c88f ky.[.m...$..O).. 8043524: f841 504c fe6c 3990 d3b3 381b 76a3 0861 A.LPl..9...8.va. 8043534: dc97 9b28 5604 4041 99ef 6c3b c617 20a1 ..(..VA@..;l... 8043544: 243e 9a41 f9fb 980a 7cb5 c5ed c9c1 911d >$A......|...... 8043554: 832d dfee 6100 aec2 f02c 6785 f0d8 0dd0 -....a..,..g.... 8043564: 09ac 753c d9bf a3c7 d934 e9d4 2675 c639 ..d.k+z....! 8043764: dc38 ba8f ae37 6621 4f11 f1c7 40b3 f12f 8...7.!f.O...@/. 8043774: 3bd7 9ee0 e726 7d30 eb88 af39 3fce 0883 .;..&.0}..9..?.. 8043784: 7b97 eaa6 23a7 4d91 432c b1ad 0479 129c .{...#.M,C..y... 8043794: d746 30b1 0346 6cc8 01ac bded 6d52 fd6d F..0F..l....Rmm. 80437a4: a959 0eb6 692a a1ac 5688 5f13 2547 a706 Y...*i...V._G%.. 80437b4: 4e02 5c27 23d8 8260 0345 4fc8 a5b8 068f .N'\.#`.E..O.... 80437c4: 1075 6554 bd6d aa5f 1a6d 0810 7440 4dd4 u.Tem._.m...@t.M 80437d4: 82ad 12b5 e11d b663 ac2b 7520 4046 8ee8 ......c.+. uF@.. 80437e4: 96aa 5544 72ee 7383 4693 c183 447a a2c9 ..DU.r.s.F..zD.. 80437f4: 645b c770 4000 73db 834b 9c77 ae16 7fcb [dp..@.sK.w..... 8043804: 8381 5f9a e5a0 1085 d52a b64f b502 2dad ..._....*.O....- 8043814: b363 ef5a 1a97 9ab5 ff81 cfc0 c096 4d2a c.Z...........*M 8043824: a045 081d 6ad8 7fd0 942a 80ff c63b 1f7d E....j..*...;.}. 8043834: 1cdb ae08 e33d 4c12 309b 0bc7 afd0 3636 ....=..L.0....66 8043844: ebb0 4037 6bb2 fb20 45b5 1510 1670 8bae ..7@.k ..E..p... 8043854: e8ce ad1f 5c88 6ab7 6aa3 d66c db79 bbff .....\.j.jl.y... 8043864: ccdd eb1c 90b4 7e66 9b8b 1f6d a053 b609 ......f~..m.S... 8043874: 7aae eea8 a327 f599 86f5 b9b1 4eb5 7d4c .z..'........NL} 8043884: bd6d 8eb4 b50d 89b5 4375 0d6e 8feb 06ff m.......uCn..... 8043894: 41be 9b2f 7ac6 7e95 8401 0972 ff82 b7d3 .A/..z.~..r..... 80438a4: a128 dde5 19ac b49b ead1 b00d dafc be3a (.............:. 80438b4: 1b6a 6795 b00d 9ace 05b1 0ace 9026 d66c j..g........&.l. 80438c4: a5b1 2ad6 90cf a8d5 17a1 b6a4 03f0 49f4 ...*...........I 80438d4: 773c 9f13 4acf 6ee8 ed03 55af 5391 acdd : 8043ab6: 692f 666e 2e6f 7468 6c6d 0000 5448 5054 /info.html..HTTP 8043ac6: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 8043ad6: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 8043ae6: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 8043af6: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 8043b06: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 8043b16: 6e65 2d74 654c 676e 6874 203a 3031 3839 ent-Length: 1098 8043b26: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 8043b36: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 8043b46: 3a65 7420 7865 2f74 7468 6c6d 0a0d 6f43 e: text/html..Co 8043b56: 746e 6e65 2d74 6e45 6f63 6964 676e 203a ntent-Encoding: 8043b66: 7a67 7069 0a0d 0a0d 8b1f 0008 0000 0000 gzip............ 8043b76: 0a04 569d 6edd 36db 7e14 5615 69bb 2881 ...V.n.6.~.V.i.( 8043b86: 766e 6035 8096 2b22 0286 1aeb 1da0 5eb0 nv5`.."+.......^ 8043b96: b40d db44 256c 9352 c728 4bbe adb2 68bb ..D.l%R.(..K...h 8043ba6: 0e81 30c1 4114 aed7 827b 6b74 b4b6 d389 ...0.A..{.tk.... 8043bb6: a057 68de 21df 272d 9c5e e7ec 3642 c88f W..h.!-'^...B6.. 8043bc6: f7f3 ef9d aa1c e57b 3b93 f7eb 6fee 64dc ......{..;...o.d 8043bd6: 9343 7167 7e97 c659 20d5 020a 8248 71a7 C.gq.~Y.. ..H..q 8043be6: 1737 b386 c864 4acb 2898 4da8 fc3f 7b08 7...d..J.(.M?..{ 8043bf6: edee 98d0 1422 d75f 1472 5f05 5f86 08dc ...."._.r.._._.. 8043c06: 75d7 705e 7b23 0899 a258 1195 2a0a 6eb7 .u^p#{..X....*.n 8043c16: 2246 881d 4956 5cf1 c144 8a48 42cd e697 F"..VI.\D.H..B.. 8043c26: b9cc 994d 619a 8a94 4c91 e844 1584 a4a9 ..M..a...LD..... 8043c36: 3c91 ab0b 6784 5a22 c95b 58f9 75e6 973e .<...g"Z[..X.u>. 8043c46: 4aeb 4e94 70e0 5d19 0b87 4d23 6226 ccfb .J.N.p.]..#M&b.. 8043c56: 9b4e ed6f b349 8f65 7eed c8f3 361e bb4f N.o.I.e..~...6O. 8043c66: bf1d cdd7 7aa4 86c8 e8a5 4147 a5ce 4d5a .....z....GA..ZM 8043c76: 2aaa a560 a2c8 32a0 4c93 4354 0c21 552c .*`....2.LTC!.,U 8043c86: 2949 c30b a4cc b840 8c46 e74d 1f01 ff71 I)....@.F.M...q. 8043c96: 6036 9955 4144 33a9 fab1 c2a0 8ee1 8f7f 6`U.DA.3........ 8043ca6: 0785 a7ad 49d3 4ddc 88e5 1925 aaaf 5028 .....I.M..%...(P 8043cb6: d47c 25e3 7ff3 2a61 bcfa 4cce f62b 58e5 |..%..a*...L+..X 8043cc6: a1a4 05d1 9d2c 09d3 a2c9 fd28 dc56 b3e5 ....,.....(.V... 8043cd6: a5d0 c54a 9578 060a bd08 4c8f 340f c2c5 ..J.x......L.4.. 8043ce6: c0f1 fb4c 6adb 107c 9930 6722 eaa1 a250 ..L..j|.0."g..P. 8043cf6: b33a 75a3 ead6 b823 2236 fd2c 5a69 80c4 :..u..#.6",.iZ.. 8043d06: a96c d8e3 04be 5bba 1f76 1f28 3b34 56cd l......[v.(.4;.V 8043d16: d8f3 a77b 67f3 4075 231d a0d5 f1f2 f6c6 ..{..gu@.#...... 8043d26: a867 936d 3d82 6fb1 3bed b87b 4d5c beaa g.m..=.o.;{.\M.. 8043d36: 4c5e 2791 8e46 a540 05e5 c4a6 eeff 287a ^L.'F.@.......z( 8043d46: a32b 49cb f9eb e6a7 781b 229d a3e4 9f53 +..I.....x."..S. 8043d56: 1a9d f7dc 9d90 7f81 e4b3 0145 1de0 336a ..........E...j3 8043d66: 0336 e18b 05da b1de 05d1 8498 88f1 3267 6.............g2 8043d76: 2345 1568 f4f6 8098 0f26 5d7d 6ee6 eefb E#h.....&.}].n.. 8043d86: b7e7 2837 80b7 3e51 455a cb81 1934 80c8 ..7(..Q>ZE..4... 8043d96: b1a1 1a86 3626 dcee 07bd 4345 6ecc e40b ....&6....EC.n.. 8043da6: 5985 735c 9912 e85e e18c 27b0 299f 8969 .Y\s..^....'.)i. 8043db6: cc06 82aa f8c3 c087 0f6b 4f48 8867 d91f ........k.HOg... 8043dc6: 9423 0b6b 310d 6444 1a74 d72b c6eb d6f3 #.k..1Ddt.+..... 8043dd6: 4819 af5b 2b4a 3481 474a bb42 f80b ec0e .H[.J+.4JGB..... 8043de6: f371 b994 bfc2 9346 50ed 0dd9 8546 aa59 q.....F..P..F.Y. 8043df6: 52e3 0bae 7323 019a a0ee ea73 c4bd 39f6 .R..#s....s....9 8043e06: 7b42 9b03 cd47 b993 4719 9d54 6c8a c6a9 B{..G....GT..l.. 8043e16: a08f 8ecf 67dd bdf6 d063 fda1 fed3 4646 .....g..c.....FF 8043e26: 5388 ed58 982f 4a29 528d 772c 4bbd 3438 .SX./.)J.R,w.K84 8043e36: 34db 181e fcb8 4162 bfb1 1239 8565 2cf2 .4....bA..9.e.., 8043e46: e18b 8df6 0675 bd12 3421 ed9a bd05 279c ....u...!4.....' 8043e56: 4d3c 61a9 e7cf 8afa da1c 9043 da7e b63c ... 8043ea6: 0060 6b07 69d7 9e90 fd8f 6539 800a ec4f `..k.i....9e..O. 8043eb6: 3c7b 7847 40fe 5318 7364 cff0 5461 ea93 {..o.K.b....s 8043fa6: daf5 67c7 09bf e3e8 2fea 307b 75b5 096c ...g...../{0.ul. 8043fb6: 0000 .. 08043fb8 : 8043fb8: 682f 7369 6f74 7972 682e 6d74 006c 0000 /history.html... 8043fc8: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 8043fd8: 530a 7265 6576 3a72 6c20 4977 2f50 2e31 .Server: lwIP/1. 8043fe8: 2e33 2031 6828 7474 3a70 2f2f 6173 6176 3.1 (http://sava 8043ff8: 6e6e 6861 6e2e 6e6f 6e67 2e75 726f 2f67 nnah.nongnu.org/ 8044008: 7270 6a6f 6365 7374 6c2f 6977 2970 0a0d projects/lwip).. 8044018: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 8044028: 3031 3339 0a0d 6f43 6e6e 6365 6974 6e6f 1093..Connection 8044038: 203a 6c43 736f 0d65 430a 6e6f 6574 746e : Close..Content 8044048: 742d 7079 3a65 7420 7865 2f74 7468 6c6d -type: text/html 8044058: 0a0d 6f43 746e 6e65 2d74 6e45 6f63 6964 ..Content-Encodi 8044068: 676e 203a 7a67 7069 0a0d 0a0d 8b1f 0008 ng: gzip........ 8044078: 0000 0000 0a04 568d 8f5f 44db ff10 5b2a .......V_..D..*[ 8044088: 9d53 2962 2e4e 05e2 d891 0a15 a87d a084 S.b)N.......}... 8044098: 2952 a782 dad3 d89e 5bdb baef 6bbb 02e7 R).......[...k.. 80440a8: 4487 e05b 48a5 7895 bc40 c420 3837 4e90 .D[..H.x@. .78.N 80440b8: d2ba 7deb e706 311b b5eb 8f83 c746 4a29 ...}...1....F.)J 80440c8: dff6 cecc 6fcc 337e c59b 8f9d 5b3f fe7e .....o~3....?[~. 80440d8: c3d5 24fb 0537 168f 97f6 2a70 d0b2 70f3 ...$7.....p*...p 80440e8: 3405 168d 1805 924a 2a9c 260d 2af4 0ab3 .4....J..*.&.*.. 80440f8: c03e 76b3 3737 0ca6 69e0 eac5 fbd0 7832 >..v77...i....2x 8044108: 51fc 94b0 4945 8b0d 7839 9124 80c2 9540 .Q..EI..9x$...@. 8044118: f707 4843 e833 0495 202d 6af4 eb06 2a52 ..CH3...- .j..R* 8044128: 9033 b35b e4d4 0a61 4b35 6820 6317 9826 3.[...a.5K h.c&. 8044138: 9461 3a07 1ca1 d9c2 a0b8 ac27 8aa8 badd a..:......'..... 8044148: a0d2 05da 9345 21e1 309a 70cc 9a88 b65f ....E..!.0.p.._. 8044158: b62f 35df 9b6f e6b3 d90d 6b3e 9aae b73f /..5o.....>k..?. 8044168: b72f 9bcf e68b 6935 c6fe dbe5 73ed bf3c /.....5i.....s<. 8044178: de6a e7e0 671c 8b67 d3a9 705c 8e26 ae49 j....gg...\p&.I. 8044188: 1560 057a 6265 6892 11ed 3c05 b4f4 70d9 `.z.eb.h...<...p 8044198: 39d0 4180 3a3b ac51 c434 4a6c c60c 89c0 .9.A;:Q.4.lJ.... 80441a8: 3e99 35a1 bb75 d11e 092a 253d 4c39 689e .>.5u...*.=%9L.h 80441b8: 9e14 7dba 389c 6348 6e99 45a2 6aca 7092 ...}.8Hc.n.E.j.p 80441c8: 75aa 09e8 c75a 1154 0437 ac29 c568 bf4d .u..Z.T.7.).h.M. 80441d8: b15c 4813 2303 bc4b 1de9 c09d 08de 1dca \..H.#K......... 80441e8: 0b45 b9da 44ce 270a 9b13 044e d9d8 32e0 E....D.'..N....2 80441f8: d693 8a17 bc5f ffa6 35ed f3de 4b08 6631 ...._....5...K1f 8044208: 5510 30c0 9d77 c568 7d7b ae74 08f7 4ea7 .U.0w.h.{}t....N 8044218: 4eda 8422 af6c a8e1 bdf9 b339 36d8 8897 .N".l.....9..6.. 8044228: e231 7dbd ace9 f95b 0ea1 cb12 9130 e769 1..}..[.....0.i. 8044238: d46f 86fc cf6a 04ba c6bd 5d74 57ec 6263 o...j.....t].Wcb 8044248: 7b25 5f95 a331 37df 6857 12ed 7f95 2e6c %{._1..7Wh....l. 8044258: afb6 2bf6 4ce5 a91b d736 a1a1 6189 1235 ...+.L..6....a5. 8044268: 4874 7f9b a7d5 5615 8386 006c a5bf f237 tH.....V..l...7. 8044278: a103 716f 55d3 608c 10ac 2e8d 89d7 6a02 ..oq.U.`.......j 8044288: 51e0 7f15 6b4a 6196 4851 f231 03e7 b42a .Q..Jk.aQH1...*. 8044298: 1839 b85c b456 fb2c baeb c1e2 f2eb 35d9 9.\.V.,........5 80442a8: 6eb7 66cb 1b54 c592 02d8 1409 52e8 dd0a .n.fT........R.. 80442b8: bac6 b768 df5a d9db 278e bf6e a6f3 22e7 ..h.Z....'n...." 80442c8: 623a 771c b28d 9ed3 6514 a88e 31fd afa8 :b.w.....e...1.. 80442d8: 2c73 7ca4 849f 28cd e826 1615 45e5 5fb3 s,.|...(&....E._ 80442e8: 67ea df4c 7379 5369 ef67 5a98 3853 bb6b .gL.ysiSg..ZS8k. 80442f8: b190 d335 db7a f065 a528 a286 d35b c4f6 ..5.z.e.(...[... 8044308: 368e 1c44 b877 3a5a 1c5b 0eb1 116d a85a .6D.w.Z:[...m.Z. 8044318: 16ed a9a6 c7cb e42e 88d8 5320 b2b2 1615 .......... S.... 8044328: c657 d148 87c7 c427 769e e925 2911 ce12 W.H...'..v%..).. 8044338: e392 cbd0 3cc0 19a4 668c 2a3e 92e9 420a .....<...f>*...B 8044348: a315 ce41 14d2 b604 5504 a121 0f4e 7d38 ..A......U!.N.8} 8044358: 495a 769b 4094 dce7 11ed b5b9 5299 dd41 ZI.v.@.......RA. 8044368: b9da 0cc9 515a 1dea c323 97fc 6334 25a2 ....ZQ..#...4c.% 8044378: 7a21 44cb 0d59 975b 7063 2952 fd85 251a !z.DY.[.cpR)...% 8044388: 79b1 f66b f635 99b5 1d17 5888 f397 1ba9 .yk.5......X.... 8044398: 9c5c 4416 c52b c159 15b0 ee1e 6b82 bf91 \..D+.Y......k.. 80443a8: 7e2d 7b02 ffe6 a607 05f6 7b76 faf4 9524 -~.{......v{..$. 80443b8: f5f6 207a e8cc e8ee f300 e661 ff3b d2dd ..z ......a.;... 80443c8: d89f be16 2f74 7f96 d423 4daa e9e8 e82e ....t/..#..M.... 80443d8: a32e ef1d 47f6 2a5f 5056 09b5 a898 1941 .....G_*VP....A. 80443e8: 1d48 29e0 3497 ea3d 3ce8 5660 65cc 09fc H..).4=..<`V.e.. 80443f8: 751e f6ae 2b1d d8c9 eb3d 4876 7739 8f5e .u...+..=.vH9w^. 8044408: b0dd d013 b775 706f c26b 5dd2 361c 3163 ....u.opk..].6c1 8044418: b23f ba31 dd72 d0fe 65f6 452c b36c 913f ?.1.r....e,El.?. 8044428: 2fe6 7cb2 45f4 521f 285f b1a8 9c62 6123 ./.|.E.R_(..b.#a 8044438: f7ba 7ae2 fda8 fb66 dd96 39e2 5f6c ebd3 ...z..f....9l_.. 8044448: e1cf 5a8d 9f51 99bc be3f f23b f486 27f4 ...ZQ...?.;....' 8044458: 1c52 06c3 036b cf1f 2555 7db0 7763 ff05 R...k...U%.}cw.. 8044468: 381b 1d3d b841 d7c6 ae4f 5027 9d23 79fd .8=.A...O.'P#..y 8044478: 1f6d 10d6 a826 94b0 4a29 64c0 b39d 9f24 m...&...)J.d..$. 8044488: 302b 1295 ecde 2f7d c50c 51bd 6e6f 95c0 +0....}/...Qon.. 8044498: 18ff 29ad c0af c7f7 6677 87fe 64b5 3929 ...)....wf...d)9 80444a8: 76fc d0d8 bfdb ff50 1100 94f1 524b 0009 .v....P.....KR.. 80444b8: 0000 0000 .... 080444bc : 80444bc: 4a64 0804 de96 0803 dea2 0803 2a04 0000 dJ...........*.. 80444cc: 0001 0000 .... 080444d0 : 80444d0: 752f 7370 685f 7369 6f74 7972 682e 6d74 /ups_history.htm 80444e0: 006c 0000 5448 5054 312f 312e 3220 3030 l...HTTP/1.1 200 80444f0: 4f20 0d4b 530a 7265 6576 3a72 6c20 4977 OK..Server: lwI 8044500: 2f50 2e31 2e33 2031 6828 7474 3a70 2f2f P/1.3.1 (http:// 8044510: 6173 6176 6e6e 6861 6e2e 6e6f 6e67 2e75 savannah.nongnu. 8044520: 726f 2f67 7270 6a6f 6365 7374 6c2f 6977 org/projects/lwi 8044530: 2970 0a0d 6f43 746e 6e65 2d74 654c 676e p)..Content-Leng 8044540: 6874 203a 3131 3337 0a0d 6f43 6e6e 6365 th: 1173..Connec 8044550: 6974 6e6f 203a 6c43 736f 0d65 430a 6e6f tion: Close..Con 8044560: 6574 746e 742d 7079 3a65 7420 7865 2f74 tent-type: text/ 8044570: 7468 6c6d 0a0d 6f43 746e 6e65 2d74 6e45 html..Content-En 8044580: 6f63 6964 676e 203a 7a67 7069 0a0d 0a0d coding: gzip.... 8044590: 8b1f 0008 0000 0000 0a04 568d 6edd 44dc ...........V.n.D 80445a0: 7e14 d715 d154 8a5a 59bd 41b8 ed64 850a .~..T.Z..Y.Ad... 80445b0: 545e 1042 1429 55c1 b634 aecf 99a7 bb1d ^TB.)..U4....... 80445c0: b1e3 5b37 9482 14a4 8a2e 9a54 540b a121 ..7[......T..T!. 80445d0: 3caa 0441 28aa 6d3f 615f 46fc 999c 17b1 ...h 8044620: ba1d f95f 3f77 77f6 59f2 2441 198d 4eb8 .._.w?.w.YA$...N 8044630: 7392 1c09 ee59 0edc 9d21 c742 c9c4 420c .s..Y...!.B....B 8044640: a6b7 2f30 2172 747b 9a73 2cca a14c 09a6 ..0/r!{ts..,L... 8044650: 66f8 49b3 9539 3094 4cbf 8308 b470 2339 .f.I9..0.L..p.9# 8044660: 7487 cd56 fb96 04aa 3661 5504 5b86 42a8 .tV.....a6.U.[.B 8044670: c952 5220 373f 9b0f f563 9d5a 7fab e69c R. R?7..c.Z..... 8044680: bd44 4e69 539a 7ffc 4782 9aaf 8e27 a67a D.iN.S...G..'.z. 8044690: aa9e e3e7 a5a1 331e 0fca 4c9c 24c0 6774 .......3...L.$tg 80446a0: f284 2920 d74b c011 b742 0b94 6506 2006 .. )K...B....e. 80446b0: 7651 0899 485a 2e47 740a c240 1ca1 23de Qv..ZHG..t@....# 80446c0: b135 aea7 8a53 7424 ce45 b820 2257 d0f1 5...S.$tE. .W".. 80446d0: e39e 86c2 ce31 45d3 4e34 ed69 8c24 6594 ....1..E4Ni.$..e 80446e0: 72e8 c752 3844 e3f6 30a7 1521 dd93 4276 .rR.D8...0!...vB 80446f0: 210f 65f5 a05e 4ba4 be3c 0896 5ec2 6345 .!.e^..K<....^Ec 8044700: 9ad2 794e 870a 4e81 0621 ead5 f960 d734 ..Ny...N!...`.4. 8044710: 10b6 a1fc ee98 e3bf cf78 6875 3e8a af03 ........x.uh.>.. 8044720: 8a7c 6af9 2b49 f1d6 71a3 459d b4b8 7ad4 |..jI+...q.E...z 8044730: 6111 56c8 8e2a 73d4 8e75 3f91 ff57 97aa .a.V*..su..?W... 8044740: 69cd dc73 b63c 35da 9f7d c107 2924 969f .is.<..5}...$).. 8044750: ded6 fd48 6c8a 2398 7d64 fea3 7f52 57ab ..H..l.#d}..R..W 8044760: d9ab 9f28 1de4 33cb baf5 0ef9 7a93 ba8c ..(....3.....z.. 8044770: 9bce 75ef 5762 5533 b945 d19f e652 7162 ...ubW3UE...R.bq 8044780: 3c31 9124 46b4 f660 f2e1 88bf 8561 6115 1<$..F`.....a..a 8044790: d6c3 814b 3586 0462 6fc3 5762 3156 6406 ..K..5b..obWV1.d 80447a0: 1182 f369 089d 1220 aaf6 33f8 d352 1629 ..i... ....3R.). 80447b0: ce43 de07 0f76 260e 3d0f 7381 8a41 13a2 C...v..&.=.sA... 80447c0: 16d7 8a0d 46cb cc17 0eba 48c5 07da d489 .....F.....H.... 80447d0: e0c5 280b 9c8b c697 b1bf 3239 9af6 12d5 ...(......92.... 80447e0: f61f b5bc c3a0 2a20 1697 52b3 65e8 8607 ...... *...R.e.. 80447f0: 7b22 431f d675 0a3c 531c 6f59 e39b 4b00 "{.Cu.<..SYo...K 8044800: bb28 834c 54c9 d6fa 39d0 77ea 5964 784d (.L..T...9.wdYMx 8044810: 3cd6 535e 1fdc a508 ea87 444f f9c6 a255 .<^S......OD..U. 8044820: aed0 07e6 230b c544 55e9 ef84 f718 fa93 .....#D..U...... 8044830: 3d45 2d5d 37f2 12f5 f5a1 8116 808c 6c46 E=]-.7........Fl 8044840: 96ea 8572 17f6 9f5a 3921 2d59 0ceb 5179 ..r...Z.!9Y-..yQ 8044850: 869a 8ea8 50d8 1687 a657 4ac3 1bdd 764c .....P..W..J..Lv 8044860: 945a a7ee 1244 c34c dcd0 afe8 294e 977e Z...D.L.....N)~. 8044870: d1d8 ab65 82b1 46fd 1b37 270d 847d 6c50 ..e....F7..'}.Pl 8044880: b731 714c b92c 153f a579 493b 495c f399 1.Lq,.?.y.;I\I.. 8044890: 9f2e e378 dbe8 f5b6 4eb8 13ce 9346 d083 ..x......N..F... 80448a0: 829d bbbc b7bb a64b 1830 c879 1657 3b84 ......K.0.y.W..; 80448b0: 5044 67e2 4d34 6381 13f7 d615 d1cd 2306 DP.g4M.c.......# 80448c0: abf7 a35c 291b 3ed0 20ab d672 54d6 a808 ..\..).>. r..T.. 80448d0: 553b 69d7 4542 5c42 d3d2 7d47 a641 9b94 ;U.iBEB\..G}A... 80448e0: 4372 2983 aa2f a37e b5b6 549a e042 4244 rC.)/.~....TB.DB 80448f0: 1c4a 254f 807d 7c5d 46e4 3c1b 8b2e a1ed J.O%}.]|.F.<.... 8044900: 58fd 7557 3528 a315 8a33 7f8d e96b 899f .XWu(5..3...k... 8044910: baff e451 2138 f2d6 ac4d 6df2 18fd b2f6 ..Q.8!..M..m.... 8044920: e855 7d29 cb87 cdc1 06c1 4626 2f6e b0bd U.)}......&Fn/.. 8044930: 2f5b 63d0 c76b 664e daef 0b80 d993 a5a3 [/.ck.Nf........ 8044940: 6deb 5b6a ae0c 418e e821 888c 4f85 0d79 .mj[...A!....Oy. 8044950: 4242 c36a b29e a49c 035d a1ee 662c fc79 BBj.....]...,fy. 8044960: 5e29 a6b5 bbf6 3274 b7a5 e9b4 6121 5acc )^....t2....!a.Z 8044970: 69be 173f ca88 bdba 5893 0137 974d e8fe .i?......X7.M... 8044980: c5fc 5f6c 8afb eb1d 7605 4783 74ba f0cd ..l_.....v.G.t.. 8044990: 6d3f c47e e48e ecec d97d d6b9 0f15 4c72 ?m~.....}.....rL 80449a0: 6328 9f08 5676 745e 3bb9 7334 8d7c 80a7 (c..vV^t.;4s|... 80449b0: 4979 7c5c 5c0a 15cb f2f5 f238 6f36 dc0e yI\|.\....8.6o.. 80449c0: 5e3e 20bd 07e7 c0b0 c17a c3b7 e2a4 b938 >^. ....z.....8. 80449d0: b070 f780 1c0d 0d1d 9c20 f0e3 e7cf d401 p....... ....... 80449e0: 6f88 bb6f efd6 108a 6402 c9d8 a453 6080 .oo......d..S..` 80449f0: d19e db24 2016 c12b d1dd 6e07 f218 835b ..$.. +....n..[. 8044a00: c69e 721e d1de 135b 8156 6de7 18de 1f79 ...r..[.V..m..y. 8044a10: 39d5 9d4d 6fad e3fb 3ccc ff1c 2503 ce74 .9M..o...<...%t. 8044a20: 4891 000a 0000 0000 .H...... 08044a28 : 8044a28: 0000 0000 c707 0803 c717 0803 053c 0000 ............<... 8044a38: 0001 0000 .... 08044a3c : 8044a3c: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 8044a4c: 0d0a 000a .... 08044a50 : 8044a50: c1f0 0803 3ab6 0804 3ac2 0804 04f6 0000 .....:...:...... 8044a60: 0001 0000 .... 08044a64 : 8044a64: 4a50 0804 beb5 0803 bec1 0803 02f6 0000 PJ.............. 8044a74: 0001 0000 .... 08044a78 : 8044a78: 4a28 0804 3fb8 0804 3fc8 0804 04f1 0000 (J...?...?...... 8044a88: 0001 0000 .... 08044a8c : 8044a8c: c204 0803 b49a 0803 b4a6 0803 0a0f 0000 ................ 8044a9c: 0001 0000 5448 5054 312f 302e 3220 3030 ....HTTP/1.0 200 8044aac: 4f20 0d4b 430a 6e6f 6574 746e 542d 7079 OK..Content-Typ 8044abc: 3a65 6574 7478 682f 6d74 0d6c 0d0a 000a e:text/html..... 8044acc: 227b 4341 3a22 0022 2c22 4422 2243 223a {"AC":".","DC":" 8044adc: 2200 222c 6e69 665f 6572 2271 223a 2200 .","in_freq":"." 8044aec: 222c 756f 5f74 7266 7165 3a22 0022 2c22 ,"out_freq":".", 8044afc: 7022 7277 3a22 0022 2c22 6222 7461 635f "pwr":".","bat_c 8044b0c: 7061 3a22 0022 2c22 6922 6e6e 7265 745f ap":".","inner_t 8044b1c: 6d65 2270 223a 2200 222c 6162 5f74 6974 emp":".","bat_ti 8044b2c: 656d 6c5f 6665 2274 223a 2200 222c 6964 me_left":".","di 8044b3c: 2231 223a 2200 222c 6f72 2231 223a 2200 1":".","ro1":"." 8044b4c: 222c 6f72 2232 223a 2200 222c 5f6d 6c61 ,"ro2":".","m_al 8044b5c: 7261 226d 223a 2200 222c 5f75 6c61 7261 arm":".","u_alar 8044b6c: 226d 223a 2200 222c 656e 7374 7465 6974 m":".","netsetti 8044b7c: 676e 5f73 6863 6e61 6567 2264 223a 2200 ngs_changed":"." 8044b8c: 007d 227b 6572 6461 635f 6d6f 756d 696e }.{"read_communi 8044b9c: 7974 3a22 0022 2c22 7722 6972 6574 635f ty":".","write_c 8044bac: 6d6f 756d 696e 7974 3a22 0022 2c22 6d22 ommunity":".","m 8044bbc: 6e61 6761 7265 5049 3a22 0022 2c22 6d22 anagerIP":".","m 8044bcc: 6e61 6761 7265 5049 2232 223a 2200 222c anagerIP2":"."," 8044bdc: 616d 616e 6567 4972 3350 3a22 0022 2c22 managerIP3":".", 8044bec: 6d22 6e61 6761 7265 5049 2234 223a 2200 "managerIP4":"." 8044bfc: 222c 616d 616e 6567 4972 3550 3a22 0022 ,"managerIP5":". 8044c0c: 2c22 6922 6170 6464 2272 223a 2200 222c ","ipaddr":"."," 8044c1c: 7767 3a22 0022 2c22 6d22 7361 226b 223a gw":".","mask":" 8044c2c: 2200 222c 6864 7063 3a22 2c00 6122 7475 .","dhcp":.,"aut 8044c3c: 2268 003a 222c 7372 735f 7265 6576 2272 h":.,"rs_server" 8044c4c: 223a 2200 222c 7372 705f 726f 2274 223a :".","rs_port":" 8044c5c: 2200 222c 7372 705f 6477 3a22 0022 2c22 .","rs_pwd":".", 8044c6c: 7222 5f73 656b 2279 223a 2200 222c 7372 "rs_key":".","rs 8044c7c: 655f 616e 6c62 6465 3a22 2c00 6422 7461 _enabled":.,"dat 8044c8c: 2265 223a 2200 222c 6974 656d 3a22 0022 e":".","time":". 8044c9c: 2c22 6e22 7074 3a22 0022 2c22 6e22 7074 ","ntp":".","ntp 8044cac: 6573 7672 7069 3a22 0022 2c22 7522 6374 servip":".","utc 8044cbc: 3a22 0022 2c22 7522 6d74 3a22 0022 2c22 ":".","utm":".", 8044ccc: 6c22 7361 7374 6e79 7463 6d69 2265 223a "lastsynctime":" 8044cdc: 7b00 7522 7470 6d69 2265 223a 2200 222c .{"uptime":"."," 8044cec: 6f6d 6564 226c 223a 2200 222c 7270 646f model":".","prod 8044cfc: 7461 2265 223a 2200 222c 7766 6576 7372 ate":".","fwvers 8044d0c: 6f69 226e 223a 2200 222c 616d 6163 6464 ion":".","macadd 8044d1c: 2272 223a 2200 222c 6573 6e72 226f 223a r":".","serno":" 8044d2c: 2200 222c 776f 656e 2272 223a 2200 222c .","owner":"."," 8044d3c: 7973 4c73 636f 7461 6f69 226e 223a 2200 sysLocation":"." 8044d4c: 222c 6f63 6d6d 6e65 2274 223a 2200 222c ,"comment":"."," 8044d5c: 7075 5f73 6f6d 6564 226c 223a 2200 222c ups_model":"."," 8044d6c: 7075 5f73 7766 6576 7372 6f69 226e 223a ups_fwversion":" 8044d7c: 4800 5454 2f50 2e31 2031 3032 2030 4b4f .HTTP/1.1 200 OK 8044d8c: 0a0d 6f43 746e 6e65 2d74 7954 6570 743a ..Content-Type:t 8044d9c: 7865 2f74 7468 6c6d 0a0d 0a0d 7b00 7022 ext/html.....{"p 8044dac: 6761 2265 203a 005b 6925 5d00 222c 6170 age": [.%i.],"pa 8044dbc: 6567 2273 223a 5200 6265 6f6f 5474 7361 ges":".RebootTas 8044dcc: 006b 6374 6970 5f70 6874 6572 6461 0000 k.tcpip_thread.. 08044ddc : 8044ddc: 0004 0006 000c 0005 0019 0010 0006 0008 ................ 8044dec: 0014 000a 001e 0032 0005 0009 0032 0019 ......2.....2... 08044dfc : 8044dfc: 001c 0020 0094 001c 0010 0010 002c 0014 .. .........,... 8044e0c: 0014 0010 0020 0010 0024 0080 0010 0614 .... ...$....... 08044e1c : 8044e1c: f6c0 2000 f6c8 2000 f6b8 2000 f6cc 2000 ... ... ... ... 08044e2c : 8044e2c: 0201 0403 0605 0707 0707 0707 0307 ............. 08044e39 : 8044e39: 0603 180c 6030 ff78 ....0`x 08044e40 : 8044e40: ffff ffff .... 08044e44 : 8044e44: 0000 0000 .... 08044e48 : 8044e48: 0000 0000 .... 08044e4c : 8044e4c: 4295 0803 3d49 0803 42d9 0803 3e5d 0803 .B..I=...B..]>.. 8044e5c: 0001 0000 .... 08044e60 : 8044e60: 076c 2000 076c 2000 l.. l.. 08044e68 : 8044e68: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 8044e78: 0002 0001 4f98 0804 50c0 0804 .....O...P.. 08044e84 : 8044e84: 5690 0804 5258 0804 0734 2000 5734 0804 .V..XR..4.. 4W.. 8044e94: 5058 0804 5228 0804 5484 0804 4ff4 0804 XP..(R...T...O.. 08044ea4 : 8044ea4: 079c 2000 079c 2000 079c 2000 079c 2000 ... ... ... ... 8044eb4: 079c 2000 079c 2000 079c 2000 079c 2000 ... ... ... ... 8044ec4: 079c 2000 079c 2000 079c 2000 079c 2000 ... ... ... ... 8044ed4: 079c 2000 ... 08044ed8 : 8044ed8: 0002 0000 0000 0000 0000 0000 0000 0000 ................ 8044ee8: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8044ef8: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8044f08: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8044f18: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8044f28: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8044f38: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8044f48: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8044f58: 0000 0000 .... 08044f5c : 8044f5c: 5146 4e44 752d 6b6e 0000 0000 FQDN-unk.... 08044f68 : 8044f68: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 08044f78 : 8044f78: 399d 0803 39bd 0803 38eb 0803 38ef 0803 .9...9...8...8.. 8044f88: 0001 0000 .... 08044f8c : 8044f8c: 0000 0000 .... 08044f90 : 8044f90: 0001 0000 0002 0000 ........ 08044f98 : 8044f98: 0001 0000 .... 08044f9c : 8044f9c: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 8044fac: 0002 0001 568c 0804 5480 0804 .....V...T.. 08044fb8 : 8044fb8: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8044fc8: 0005 0000 0006 0000 0007 0000 000b 0000 ................ 08044fd8 : 8044fd8: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 8044fe8: 0002 0008 4fb8 0804 4e84 0804 .....O...N.. 08044ff4 : 8044ff4: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 8045004: 0002 001c 5578 0804 5410 0804 ....xU...T.. 08045010 : 8045010: 4209 0803 3c41 0803 38eb 0803 38ef 0803 .B..A<...8...8.. 8045020: 0001 0000 .... 08045024 : 8045024: 5164 0804 5164 0804 5164 0804 5164 0804 dQ..dQ..dQ..dQ.. 8045034: 5164 0804 5164 0804 5164 0804 dQ..dQ..dQ.. 08045040 : 8045040: 0002 0000 .... 08045044 : 8045044: 50ac 0804 50ac 0804 50ac 0804 50ac 0804 .P...P...P...P.. 8045054: 0750 2000 P.. 08045058 : 8045058: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 8045068: 0002 001a 5324 0804 51b4 0804 ....$S...Q.. 08045074 : 8045074: 411d 0803 39d1 0803 3a91 0803 38ef 0803 .A...9...:...8.. 8045084: 0001 0000 .... 08045088 : 8045088: 0001 0000 0002 0000 ........ 08045090 : 8045090: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 80450a0: 0002 0004 4f68 0804 5248 0804 ....hO..HR.. 080450ac : 80450ac: 3ce5 0803 3d11 0803 38eb 0803 38ef 0803 .<...=...8...8.. 80450bc: 0001 0000 .... 080450c0 : 80450c0: 5148 0804 HQ.. 080450c4 : 80450c4: 0002 0000 0000 0000 0000 0000 0000 0000 ................ 80450d4: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80450e4: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80450f4: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8045104: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8045114: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8045124: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8045134: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8045144: 0000 0000 .... 08045148 : 8045148: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 8045158: 0002 0003 52a8 0804 53a0 0804 .....R...S.. 08045164 : 8045164: 38f1 0803 4575 0803 4081 0803 4321 0803 .8..uE...@..!C.. 8045174: 0001 0000 .... 08045178 : 8045178: 5010 0804 5010 0804 5010 0804 5010 0804 .P...P...P...P.. 8045188: 5010 0804 5010 0804 5010 0804 5010 0804 .P...P...P...P.. 8045198: 5010 0804 5010 0804 5010 0804 5010 0804 .P...P...P...P.. 80451a8: 089c 2000 5010 0804 5010 0804 ... .P...P.. 080451b4 : 80451b4: 565c 0804 565c 0804 565c 0804 565c 0804 \V..\V..\V..\V.. 80451c4: 565c 0804 565c 0804 565c 0804 565c 0804 \V..\V..\V..\V.. 80451d4: 565c 0804 565c 0804 565c 0804 565c 0804 \V..\V..\V..\V.. 80451e4: 565c 0804 565c 0804 565c 0804 565c 0804 \V..\V..\V..\V.. 80451f4: 565c 0804 565c 0804 565c 0804 565c 0804 \V..\V..\V..\V.. 8045204: 565c 0804 565c 0804 565c 0804 565c 0804 \V..\V..\V..\V.. 8045214: 565c 0804 565c 0804 \V..\V.. 0804521c : 804521c: 0004 0000 .... 08045220 : 8045220: 4f78 0804 093c 2000 xO..<.. 08045228 : 8045228: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 8045238: 0002 000f 53d4 0804 5178 0804 .....S..xQ.. 08045244 : 8045244: 0000 0000 .... 08045248 : 8045248: 0a00 2000 0a00 2000 0a00 2000 0a00 2000 ... ... ... ... 08045258 : 8045258: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 8045268: 0002 0002 4f90 0804 5220 0804 .....O.. R.. 08045274 : 8045274: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8045284: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 8045294: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 80452a4: 000d 0000 .... 080452a8 : 80452a8: 0001 0000 0002 0000 0003 0000 ............ 080452b4 : 80452b4: 08c4 2000 08c4 2000 08c4 2000 08c4 2000 ... ... ... ... 80452c4: 08c4 2000 ... 080452c8 : 80452c8: 5074 0804 5074 0804 5074 0804 5074 0804 tP..tP..tP..tP.. 80452d8: 5074 0804 5074 0804 5074 0804 5074 0804 tP..tP..tP..tP.. 80452e8: 5074 0804 5074 0804 5074 0804 5074 0804 tP..tP..tP..tP.. 80452f8: 5074 0804 5074 0804 5074 0804 5074 0804 tP..tP..tP..tP.. 8045308: 5074 0804 5074 0804 5074 0804 08f0 2000 tP..tP..tP..... 8045318: 0958 2000 0718 2000 5074 0804 X.. ... tP.. 08045324 : 8045324: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8045334: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 8045344: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 8045354: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 8045364: 0011 0000 0012 0000 0013 0000 0014 0000 ................ 8045374: 0015 0000 0016 0000 0017 0000 0018 0000 ................ 8045384: 0019 0000 001a 0000 ........ 0804538c : 804538c: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 804539c: 0005 0000 .... 080453a0 : 80453a0: 0910 2000 0910 2000 0910 2000 ... ... ... 080453ac : 80453ac: 086c 2000 086c 2000 086c 2000 086c 2000 l.. l.. l.. l.. 80453bc: 086c 2000 l.. 080453c0 : 80453c0: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 80453d0: 0005 0000 .... 080453d4 : 80453d4: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 80453e4: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 80453f4: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 8045404: 000d 0000 000e 0000 000f 0000 ............ 08045410 : 8045410: 4e4c 0804 4e4c 0804 4e4c 0804 4e4c 0804 LN..LN..LN..LN.. 8045420: 4e4c 0804 4e4c 0804 4e4c 0804 4e4c 0804 LN..LN..LN..LN.. 8045430: 4e4c 0804 4e4c 0804 4e4c 0804 4e4c 0804 LN..LN..LN..LN.. 8045440: 4e4c 0804 4e4c 0804 4e4c 0804 4e4c 0804 LN..LN..LN..LN.. 8045450: 4e4c 0804 4e4c 0804 4e4c 0804 4e4c 0804 LN..LN..LN..LN.. 8045460: 4e4c 0804 4e4c 0804 4e4c 0804 4e4c 0804 LN..LN..LN..LN.. 8045470: 4e4c 0804 4e4c 0804 4e4c 0804 4e4c 0804 LN..LN..LN..LN.. 08045480 : 8045480: 4fd8 0804 .O.. 08045484 : 8045484: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 8045494: 0002 0005 538c 0804 5044 0804 .....S..DP.. 080454a0 : 80454a0: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 80454b0: 0002 000d 5274 0804 4ea4 0804 ....tR...N.. 080454bc : 80454bc: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 80454cc: 0002 0016 5604 0804 56dc 0804 .....V...V.. 080454d8 : 80454d8: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 80454e8: 0002 0002 5088 0804 4e60 0804 .....P..`N.. 080454f4 : 80454f4: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8045504: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 8045514: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 8045524: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 8045534: 0011 0000 0012 0000 0013 0000 0014 0000 ................ 8045544: 0015 0000 0016 0000 0017 0000 ............ 08045550 : 8045550: 776c 5049 0800 lwIP. 08045555 : 8045555: 0008 e300 ... 08045558 : 8045558: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 8045568: 0002 0005 56c8 0804 52b4 0804 .....V...R.. 08045574 : 8045574: 0000 0000 .... 08045578 : 8045578: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8045588: 0005 0000 0006 0000 0008 0000 0009 0000 ................ 8045598: 000a 0000 000b 0000 000c 0000 000d 0000 ................ 80455a8: 000e 0000 000f 0000 0010 0000 0011 0000 ................ 80455b8: 0012 0000 0013 0000 0014 0000 0015 0000 ................ 80455c8: 0016 0000 0018 0000 0019 0000 001a 0000 ................ 80455d8: 001b 0000 001c 0000 001d 0000 001e 0000 ................ 080455e8 : 80455e8: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 80455f8: 0005 0000 0006 0000 0007 0000 ............ 08045604 : 8045604: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8045614: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 8045624: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 8045634: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 8045644: 0011 0000 0012 0000 0013 0000 0014 0000 ................ 8045654: 0015 0000 0016 0000 ........ 0804565c : 804565c: 3b19 0803 3b45 0803 38eb 0803 38ef 0803 .;..E;...8...8.. 804566c: 0001 0000 .... 08045670 : 8045670: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 8045680: 0002 0002 08e4 2000 5750 0804 ....... PW.. 0804568c : 804568c: 0001 0000 .... 08045690 : 8045690: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 80456a0: 0002 0007 55e8 0804 5024 0804 .....U..$P.. 080456ac : 80456ac: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 80456bc: 0002 0005 53c0 0804 53ac 0804 .....S...S.. 080456c8 : 80456c8: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 80456d8: 0005 0000 .... 080456dc : 80456dc: 07c4 2000 07c4 2000 07c4 2000 07c4 2000 ... ... ... ... 80456ec: 07c4 2000 07c4 2000 07c4 2000 07c4 2000 ... ... ... ... 80456fc: 07c4 2000 07c4 2000 07c4 2000 07c4 2000 ... ... ... ... 804570c: 07c4 2000 07c4 2000 07c4 2000 07c4 2000 ... ... ... ... 804571c: 07c4 2000 07c4 2000 07c4 2000 07c4 2000 ... ... ... ... 804572c: 07c4 2000 07c4 2000 ... ... 08045734 : 8045734: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 8045744: 0002 0017 54f4 0804 52c8 0804 .....T...R.. 08045750 : 8045750: 4f9c 0804 5884 0804 .O...X.. 08045758 : 8045758: 0001 0000 0003 0000 0006 0000 0001 0000 ................ 08045768 : 8045768: 0000 0000 .... 0804576c : 804576c: 7570 6c62 6369 ff00 public. 08045773 : 8045773: ffff ffff ffff ...... 08045779 : 8045779: 0000 0000 0000 7445 5f68 6669 2000 7325 ......Eth_if. %s 8045789: 0d0a 4400 4348 4350 696c 6e65 0074 6577 ...DHCPClient.we 8045799: 5262 6965 696e 0074 6552 6e69 7469 6557 bReinit.ReinitWe 80457a9: 0062 1800 b.. 080457ac : 80457ac: a318 0000 .... 080457b0 : 80457b0: 0001 0000 .... 080457b4 : 80457b4: 5804 0804 .X.. 080457b8 : 80457b8: 58a0 0804 .X.. 080457bc : 80457bc: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 80457cc: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 80457dc: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 80457ec: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 80457fc: 0011 0000 0012 0000 ........ 08045804 : 8045804: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 8045814: 0002 0001 57b0 0804 5918 0804 .....W...Y.. 08045820 : 8045820: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 8045830: 0002 0001 591c 0804 57b8 0804 .....Y...W.. 0804583c : 804583c: 5904 0804 5904 0804 5904 0804 5904 0804 .Y...Y...Y...Y.. 804584c: 5904 0804 5904 0804 5904 0804 5904 0804 .Y...Y...Y...Y.. 804585c: 5904 0804 5904 0804 5904 0804 5904 0804 .Y...Y...Y...Y.. 804586c: 5904 0804 5904 0804 5904 0804 5904 0804 .Y...Y...Y...Y.. 804587c: 5904 0804 5904 0804 .Y...Y.. 08045884 : 8045884: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 8045894: 0002 0001 58bc 0804 58c4 0804 .....X...X.. 080458a0 : 80458a0: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 80458b0: 0002 0001 58c0 0804 57b4 0804 .....X...W.. 080458bc : 80458bc: 0001 0000 .... 080458c0 : 80458c0: 0003 0000 .... 080458c4 : 80458c4: 58c8 0804 .X.. 080458c8 : 80458c8: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 80458d8: 0002 0001 57ac 0804 58e4 0804 .....W...X.. 080458e4 : 80458e4: 5820 0804 X.. 080458e8 : 80458e8: 38e3 0803 38e9 0803 38eb 0803 38ef 0803 .8...8...8...8.. 80458f8: 0002 0012 57bc 0804 583c 0804 .....W..: 8045904: 7eb1 0803 7e71 0803 7fcd 0803 7dc5 0803 .~..q~.......}.. 8045914: 0001 0000 .... 08045918 : 8045918: 58e8 0804 .X.. 0804591c : 804591c: 038f 0000 3025 6432 252e 3230 2e64 3025 ....%02d.%02d.%0 804592c: 6432 2520 3230 3a64 3025 6432 253a 3230 2d %02d:%02d:%02 804593c: 0064 6425 252e 2e64 6425 2520 3a64 6425 d.%d.%d.%d %d:%d 804594c: 253a 2064 0d0a 3b00 3b3b 3b00 3b3b 3254 :%d ...;;;.;;;T2 804595c: 4b4f 3b3b 7b00 7322 7265 6f6e 3a22 0022 OK;;.{"serno":". 804596c: 2c22 6422 6368 2270 223a 2200 222c 7069 ","dhcp":".","ip 804597c: 6461 7264 7365 2273 223a 2200 222c 6167 address":".","ga 804598c: 6574 6177 2279 223a 2200 6573 6e72 226f teway":"."serno" 804599c: 2200 6864 7063 0022 6922 6170 6464 6572 ."dhcp"."ipaddre 80459ac: 7373 0022 6722 7461 7765 7961 0022 6d22 ss"."gateway"."m 80459bc: 7361 226b 7500 7064 6e5f 7465 6573 7474 ask".udp_netsett 80459cc: 6e69 7367 745f 7361 006b 0000 666e 0000 ings_task...nf.. 80459dc: 6e69 7469 0079 0000 6e61 0000 4241 4443 inity...an..ABCD 80459ec: 4645 0000 6261 6463 6665 0000 3130 3332 EF..abcdef..0123 80459fc: 3534 3736 3938 0000 0043 0000 4f50 4953 456789..C...POSI 8045a0c: 0058 0000 0000 0000 002e 0000 X........... 08045a18 <_init>: 8045a18: b5f8 push {r3, r4, r5, r6, r7, lr} 8045a1a: bf00 nop 8045a1c: bcf8 pop {r3, r4, r5, r6, r7} 8045a1e: bc08 pop {r3} 8045a20: 469e mov lr, r3 8045a22: 4770 bx lr 08045a24 <_fini>: 8045a24: b5f8 push {r3, r4, r5, r6, r7, lr} 8045a26: bf00 nop 8045a28: bcf8 pop {r3, r4, r5, r6, r7} 8045a2a: bc08 pop {r3} 8045a2c: 469e mov lr, r3 8045a2e: 4770 bx lr