../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 00025a6c 08020188 08020188 00008188 2**3 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .ARM 00000008 08045bf4 08045bf4 0002dbf4 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .init_array 00000004 08045bfc 08045bfc 0002dbfc 2**2 CONTENTS, ALLOC, LOAD, DATA 4 .fini_array 00000004 08045c00 08045c00 0002dc00 2**2 CONTENTS, ALLOC, LOAD, DATA 5 .data 00000ab4 20000000 08045c04 00030000 2**2 CONTENTS, ALLOC, LOAD, DATA 6 .fill 00079944 080466b8 080466b8 000366b8 2**0 CONTENTS, ALLOC, LOAD, DATA 7 .crc 00000004 080bfffc 080bfffc 000afffc 2**2 CONTENTS, ALLOC, LOAD, DATA 8 .bss 00012f98 20000ab4 080466b8 000b0ab4 2**2 ALLOC 9 ._user_heap_stack 00000200 20013a4c 08059650 000b0ab4 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 00055307 00000000 00000000 000b002f 2**0 CONTENTS, READONLY, DEBUGGING 13 .debug_abbrev 0000d6d4 00000000 00000000 00105336 2**0 CONTENTS, READONLY, DEBUGGING 14 .debug_loc 0002810c 00000000 00000000 00112a0a 2**0 CONTENTS, READONLY, DEBUGGING 15 .debug_aranges 000032e0 00000000 00000000 0013ab18 2**3 CONTENTS, READONLY, DEBUGGING 16 .debug_ranges 00003c40 00000000 00000000 0013ddf8 2**3 CONTENTS, READONLY, DEBUGGING 17 .debug_macro 00021afa 00000000 00000000 00141a38 2**0 CONTENTS, READONLY, DEBUGGING 18 .debug_line 00028106 00000000 00000000 00163532 2**0 CONTENTS, READONLY, DEBUGGING 19 .debug_str 000823cc 00000000 00000000 0018b638 2**0 CONTENTS, READONLY, DEBUGGING 20 .comment 00000030 00000000 00000000 0020da04 2**0 CONTENTS, READONLY 21 .debug_frame 000089c0 00000000 00000000 0020da34 2**2 CONTENTS, READONLY, DEBUGGING Disassembly of section .text: 08020188 : 8020188: b508 push {r3, lr} 802018a: f640 20b4 movw r0, #2740 ; 0xab4 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: 20000ab7 .word 0x20000ab7 080201b0 : 80201b0: b508 push {r3, lr} 80201b2: f640 20b4 movw r0, #2740 ; 0xab4 80201b6: f640 23b4 movw r3, #2740 ; 0xab4 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 24b4 movw r4, #2740 ; 0xab4 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 30dc movw r0, #23516 ; 0x5bdc 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 30dc movw r0, #23516 ; 0x5bdc 8020220: f640 21b8 movw r1, #2744 ; 0xab8 8020224: f6c0 0004 movt r0, #2052 ; 0x804 8020228: f2c2 0100 movt r1, #8192 ; 0x2000 802022c: f3af 8000 nop.w 8020230: f640 20b4 movw r0, #2740 ; 0xab4 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 36fc movw r6, #23548 ; 0x5bfc 80218d6: f645 35fc movw r5, #23548 ; 0x5bfc 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 4600 movw r6, #23552 ; 0x5c00 80218fc: f645 35fc movw r5, #23548 ; 0x5bfc 8021900: f6c0 0604 movt r6, #2052 ; 0x804 8021904: f6c0 0504 movt r5, #2052 ; 0x804 8021908: 1b76 subs r6, r6, r5 802190a: f024 f967 bl 8045bdc <_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 7340 movw r3, #38720 ; 0x9740 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 7140 movw r1, #38720 ; 0x9740 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 7140 movw r1, #38720 ; 0x9740 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: 08045ba7 .word 0x08045ba7 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: f649 0a30 movw sl, #38960 ; 0x9830 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: 08045b9b .word 0x08045b9b 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 7340 movw r3, #38720 ; 0x9740 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 7508 movw r5, #38664 ; 0x9708 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 7440 movw r4, #38720 ; 0x9740 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 7340 movw r3, #38720 ; 0x9740 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: 08045b9f .word 0x08045b9f 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 23d4 movw r3, #2772 ; 0xad4 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 21d4 movw r1, #2772 ; 0xad4 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 23d0 movw r3, #2768 ; 0xad0 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 30bc movw r0, #23484 ; 0x5bbc 8023994: f643 134c movw r3, #14668 ; 0x394c 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 30b4 movw r0, #23476 ; 0x5bb4 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 30ac movw r0, #23468 ; 0x5bac 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 164c movw r6, #14668 ; 0x394c 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 194c movw r9, #14668 ; 0x394c 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 134c movw r3, #14668 ; 0x394c 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 184c movw r8, #14668 ; 0x394c 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 31cc movw r1, #23500 ; 0x5bcc 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 30c8 movw r0, #23496 ; 0x5bc8 8024116: f6c0 0004 movt r0, #2052 ; 0x804 802411a: bd10 pop {r4, pc} 802411c: f645 31c8 movw r1, #23496 ; 0x5bc8 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 31d4 movw r1, #23508 ; 0x5bd4 8024132: 4620 mov r0, r4 8024134: f6c0 0104 movt r1, #2052 ; 0x804 8024138: f7fd fd6e bl 8021c18 802413c: f645 33c8 movw r3, #23496 ; 0x5bc8 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 29d0 movw r9, #2768 ; 0xad0 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 22d0 movw r2, #2768 ; 0xad0 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 22d0 movw r2, #2768 ; 0xad0 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 22d0 movw r2, #2768 ; 0xad0 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 7230 movw r2, #38704 ; 0x9730 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 7330 movw r3, #38704 ; 0x9730 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 1448 movw r4, #14664 ; 0x3948 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 fa33 bl 8039578 <_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: 2000c810 .word 0x2000c810 8026244: 2000c820 .word 0x2000c820 8026248: 2000c814 .word 0x2000c814 802624c: 20000b04 .word 0x20000b04 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: 2000c810 .word 0x2000c810 80264e0: 40002800 .word 0x40002800 80264e4: 2000c820 .word 0x2000c820 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: 20000b04 .word 0x20000b04 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: 2000c840 .word 0x2000c840 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: 08039858 .word 0x08039858 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: 2000cb8c .word 0x2000cb8c 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 fc4c bl 802a53a 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 fa48 bl 8029140 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 fa43 bl 8029140 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: 2000cb9c .word 0x2000cb9c 8026cd0: 2000c85c .word 0x2000c85c 8026cd4: 2000cb7c .word 0x2000cb7c 8026cd8: 2000c84c .word 0x2000c84c 8026cdc: 2000c9ec .word 0x2000c9ec 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 fa25 bl 802914c 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 fa40 bl 802918e 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: 2000cb7c .word 0x2000cb7c 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 fd55 bl 802a7e6 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 fa0e bl 8029164 // 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: 2000cb9c .word 0x2000cb9c 8026d58: 2000c84c .word 0x2000c84c 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 f9eb bl 8029164 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 f9bd bl 802914c 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 f9d9 bl 802918e 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 fcc8 bl 802a782 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: 2000cb7c .word 0x2000cb7c 8026e08: 2000c84c .word 0x2000c84c 8026e0c: 20000b08 .word 0x20000b08 8026e10: 2000cb9c .word 0x2000cb9c 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 f954 bl 80290d0 // ----------------------------------------------------------------------------- // RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE); /* SETTINGS_SetDefaultDebug(); SETTINGS_Save();*/ SETTINGS_Load(); 8026e28: f001 fd84 bl 8028934 set_mode_jumper(); 8026e2c: f001 feaa bl 8028b84 #endif // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- #ifdef LED_ENABLE LED_Init(); 8026e30: f001 fe04 bl 8028a3c /* Простая мигалка для подтверждения живучести контроллера */ 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 fe28 bl 802aa98 #endif // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- #ifdef BUTTON_ENABLE BUTTON_Init(); 8026e48: f001 fe54 bl 8028af4 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 fe1c bl 802aa98 //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 fef5 bl 8038c54 // ----------------------------------------------------------------------------- #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 fe0d bl 802aa98 #endif // ----------------------------------------------------------------------------- /* Random number generator */ RNG_Init(); 8026e7e: f7ff f91b bl 80260b8 // ----------------------------------------------------------------------------- #ifdef NET_ENABLE ETH_BSP_Config(); 8026e82: f011 fef9 bl 8038c78 LwIP_Init(); 8026e86: f010 ff1d bl 8037cc4 #ifdef WEB_SERVER_ENABLE HTTP_Init(); 8026e8a: f004 ffcd bl 802be28 #endif #ifdef SNMP_ENABLE SNMP_Init(); 8026e8e: f011 fa7b bl 8038388 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 fdf9 bl 802aa98 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 fdee bl 802aa98 #endif #endif // ----------------------------------------------------------------------------- /* SNTP */ SNTP_Init(); 8026ebc: f011 fb02 bl 80384c4 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 fde0 bl 802aa98 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 fdd5 bl 802aa98 //TEST_IO(); /* Контроль успешной загрузки. Сброс флага bootry */ /* Сброс флага и сохранение нового значения во флеш памяти происходт после некоторой задержки для запуска всех задач */ vTaskDelay(4000); 8026eee: f44f 607a mov.w r0, #4000 ; 0xfa0 8026ef2: f004 f86b bl 802afcc SETTINGS_ResetBootTry(); 8026ef6: f001 fd51 bl 802899c /* if (!dhcp) SNMP_SendUserTrap(DEVICE_REBOOTED); printf("Hello world\r\n");*/ vTaskDelete(NULL); 8026efa: 4620 mov r0, r4 8026efc: f003 fea4 bl 802ac48 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 bc63 b.w 802b7d0 8026f0a: bf00 nop 8026f0c: 0803985d .word 0x0803985d 8026f10: 08028a61 .word 0x08028a61 8026f14: 08039867 .word 0x08039867 8026f18: 08028b71 .word 0x08028b71 8026f1c: 0803986f .word 0x0803986f 8026f20: 0802983d .word 0x0802983d 8026f24: 0803987b .word 0x0803987b 8026f28: 08038121 .word 0x08038121 8026f2c: 08039889 .word 0x08039889 8026f30: 08038281 .word 0x08038281 8026f34: 20000b0c .word 0x20000b0c 8026f38: 08039896 .word 0x08039896 8026f3c: 08038591 .word 0x08038591 8026f40: 080398a5 .word 0x080398a5 8026f44: 08038549 .word 0x08038549 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 fc98 bl 80298cc //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 fd73 bl 802aa98 vTaskStartScheduler(); 8026fb2: f003 fea3 bl 802acfc /*while(1) { }*/ } 8026fb6: 4620 mov r0, r4 8026fb8: b004 add sp, #16 8026fba: bd10 pop {r4, pc} 8026fbc: e000ed00 .word 0xe000ed00 8026fc0: 080398b8 .word 0x080398b8 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: 080398c1 .word 0x080398c1 8027048: 080398ce .word 0x080398ce 802704c: 080398dd .word 0x080398dd 8027050: 080398f3 .word 0x080398f3 8027054: 08039909 .word 0x08039909 8027058: 0803991f .word 0x0803991f 802705c: 08039935 .word 0x08039935 8027060: 0803994b .word 0x0803994b 8027064: 08039961 .word 0x08039961 8027068: 08039977 .word 0x08039977 802706c: 0803998d .word 0x0803998d 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: f012 f884 bl 80391b4 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 fb64 bl 802a782 } /* 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: f012 f890 bl 80391e0 ETH_DMAClearITPendingBit(ETH_DMA_IT_NIS); 80270c0: f44f 3080 mov.w r0, #65536 ; 0x10000 80270c4: f012 f88c bl 80391e0 // 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: 2000c7cc .word 0x2000c7cc 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: 20000b14 .word 0x20000b14 80277a0: 20000b10 .word 0x20000b10 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: 2000cba8 .word 0x2000cba8 8027854: 080399a3 .word 0x080399a3 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: 2000cba8 .word 0x2000cba8 8027880: 080399a3 .word 0x080399a3 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: 2000cba8 .word 0x2000cba8 80278ac: 080399a3 .word 0x080399a3 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: 2000cba8 .word 0x2000cba8 80278d8: 080399a3 .word 0x080399a3 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: 2000cba8 .word 0x2000cba8 80278fc: 080399a9 .word 0x080399a9 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: 2000cba8 .word 0x2000cba8 8027920: 080399a9 .word 0x080399a9 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: 2000cba8 .word 0x2000cba8 8027944: 080399a9 .word 0x080399a9 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: 2000cba8 .word 0x2000cba8 8027970: 080399a3 .word 0x080399a3 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: 2000cba8 .word 0x2000cba8 8027994: 080399a9 .word 0x080399a9 08027998 : /** * @brief */ void GetConnectMonitorStr(char *str, uint8_t *len) { 8027998: b538 push {r3, r4, r5, lr} if(UPS.Present) 802799a: 4b08 ldr r3, [pc, #32] ; (80279bc ) 802799c: f893 302c ldrb.w r3, [r3, #44] ; 0x2c /** * @brief */ void GetConnectMonitorStr(char *str, uint8_t *len) { 80279a0: 4605 mov r5, r0 80279a2: 460c mov r4, r1 if(UPS.Present) 80279a4: b10b cbz r3, 80279aa strcpy(str, "0"); 80279a6: 4906 ldr r1, [pc, #24] ; (80279c0 ) 80279a8: e000 b.n 80279ac else strcpy(str, "1"); 80279aa: 4906 ldr r1, [pc, #24] ; (80279c4 ) 80279ac: f7fa fa22 bl 8021df4 *len = strlen(str); 80279b0: 4628 mov r0, r5 80279b2: f7fa fa7d bl 8021eb0 80279b6: 7020 strb r0, [r4, #0] 80279b8: bd38 pop {r3, r4, r5, pc} 80279ba: bf00 nop 80279bc: 2000cba8 .word 0x2000cba8 80279c0: 08039a51 .word 0x08039a51 80279c4: 08039cb4 .word 0x08039cb4 080279c8 : /** * @brief Индикация аварийных ситуаций */ void GetAlarmStr(char *str, uint8_t *len) { 80279c8: b538 push {r3, r4, r5, lr} sprintf(str, "%d", UPS.Status); 80279ca: 4b06 ldr r3, [pc, #24] ; (80279e4 ) /** * @brief Индикация аварийных ситуаций */ void GetAlarmStr(char *str, uint8_t *len) { 80279cc: 4605 mov r5, r0 80279ce: 460c mov r4, r1 sprintf(str, "%d", UPS.Status); 80279d0: 7cda ldrb r2, [r3, #19] 80279d2: 4905 ldr r1, [pc, #20] ; (80279e8 ) 80279d4: f7ff ff1e bl 8027814 *len = strlen(str); 80279d8: 4628 mov r0, r5 80279da: f7fa fa69 bl 8021eb0 80279de: 7020 strb r0, [r4, #0] 80279e0: bd38 pop {r3, r4, r5, pc} 80279e2: bf00 nop 80279e4: 2000cba8 .word 0x2000cba8 80279e8: 080399a9 .word 0x080399a9 080279ec : /** * @brief Дата (Ready for PRS!) */ void GetDateStr(char *str, uint8_t *len) { 80279ec: b530 push {r4, r5, lr} 80279ee: b087 sub sp, #28 80279f0: 4604 mov r4, r0 80279f2: 460d mov r5, r1 TM_RTC_t data; uint16_t sys_year ; TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 80279f4: a802 add r0, sp, #8 80279f6: 2100 movs r1, #0 80279f8: f7fe fd46 bl 8026488 sys_year = 2000 + data.year; sprintf(str, "%04i-%02i-%02i", sys_year, data.month, data.date); 80279fc: 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; 8027a00: f89d 2011 ldrb.w r2, [sp, #17] sprintf(str, "%04i-%02i-%02i", sys_year, data.month, data.date); 8027a04: f89d 3010 ldrb.w r3, [sp, #16] 8027a08: 9100 str r1, [sp, #0] 8027a0a: f502 62fa add.w r2, r2, #2000 ; 0x7d0 8027a0e: 4905 ldr r1, [pc, #20] ; (8027a24 ) 8027a10: 4620 mov r0, r4 8027a12: f7ff feff bl 8027814 *len = strlen(str); 8027a16: 4620 mov r0, r4 8027a18: f7fa fa4a bl 8021eb0 8027a1c: 7028 strb r0, [r5, #0] } 8027a1e: b007 add sp, #28 8027a20: bd30 pop {r4, r5, pc} 8027a22: bf00 nop 8027a24: 080399ac .word 0x080399ac 08027a28 : /** * @brief Время (Ready for PRS!) */ void GetTimeStr(char *str, uint8_t *len) { 8027a28: b530 push {r4, r5, lr} 8027a2a: b085 sub sp, #20 8027a2c: 4604 mov r4, r0 8027a2e: 460d mov r5, r1 TM_RTC_t data; TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8027a30: 4668 mov r0, sp 8027a32: 2100 movs r1, #0 8027a34: f7fe fd28 bl 8026488 sprintf(str, "%02i:%02i", data.hours, data.minutes); 8027a38: 4906 ldr r1, [pc, #24] ; (8027a54 ) 8027a3a: f89d 2005 ldrb.w r2, [sp, #5] 8027a3e: f89d 3004 ldrb.w r3, [sp, #4] 8027a42: 4620 mov r0, r4 8027a44: f7ff fee6 bl 8027814 *len = strlen(str); 8027a48: 4620 mov r0, r4 8027a4a: f7fa fa31 bl 8021eb0 8027a4e: 7028 strb r0, [r5, #0] } 8027a50: b005 add sp, #20 8027a52: bd30 pop {r4, r5, pc} 8027a54: 080399f5 .word 0x080399f5 08027a58 : /** * @brief Время (Ready for PRS!) */ void GetUnixTimeStr(char *str, uint8_t *len) { 8027a58: b530 push {r4, r5, lr} 8027a5a: b085 sub sp, #20 8027a5c: 4604 mov r4, r0 8027a5e: 460d mov r5, r1 TM_RTC_t data; TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8027a60: 4668 mov r0, sp 8027a62: 2100 movs r1, #0 8027a64: f7fe fd10 bl 8026488 sprintf(str, "%d", data.unix); 8027a68: 4905 ldr r1, [pc, #20] ; (8027a80 ) 8027a6a: 9a03 ldr r2, [sp, #12] 8027a6c: 4620 mov r0, r4 8027a6e: f7ff fed1 bl 8027814 *len = strlen(str); 8027a72: 4620 mov r0, r4 8027a74: f7fa fa1c bl 8021eb0 8027a78: 7028 strb r0, [r5, #0] } 8027a7a: b005 add sp, #20 8027a7c: bd30 pop {r4, r5, pc} 8027a7e: bf00 nop 8027a80: 080399a9 .word 0x080399a9 08027a84 : /** * @brief Состояние SNTP (Ready for PRS!) */ void GetSntpStateStr(char *str, uint8_t *len) { 8027a84: b538 push {r3, r4, r5, lr} if (sSettings.sSNTP.sntpEnable) 8027a86: 4b08 ldr r3, [pc, #32] ; (8027aa8 ) 8027a88: f893 3340 ldrb.w r3, [r3, #832] ; 0x340 /** * @brief Состояние SNTP (Ready for PRS!) */ void GetSntpStateStr(char *str, uint8_t *len) { 8027a8c: 460c mov r4, r1 8027a8e: 4605 mov r5, r0 if (sSettings.sSNTP.sntpEnable) { sprintf(str, "%s", "1"); //авто 8027a90: 4906 ldr r1, [pc, #24] ; (8027aac ) /** * @brief Состояние SNTP (Ready for PRS!) */ void GetSntpStateStr(char *str, uint8_t *len) { if (sSettings.sSNTP.sntpEnable) 8027a92: b10b cbz r3, 8027a98 { sprintf(str, "%s", "1"); //авто 8027a94: 4a06 ldr r2, [pc, #24] ; (8027ab0 ) 8027a96: e000 b.n 8027a9a *len = strlen(str); } else { sprintf(str, "%s", "0"); //ручной 8027a98: 4a06 ldr r2, [pc, #24] ; (8027ab4 ) 8027a9a: f7ff febb bl 8027814 *len = strlen(str); 8027a9e: 4628 mov r0, r5 8027aa0: f7fa fa06 bl 8021eb0 8027aa4: 7020 strb r0, [r4, #0] 8027aa6: bd38 pop {r3, r4, r5, pc} 8027aa8: 2000cfc4 .word 0x2000cfc4 8027aac: 080399bb .word 0x080399bb 8027ab0: 08039cb4 .word 0x08039cb4 8027ab4: 08039a51 .word 0x08039a51 08027ab8 : /** * @brief IP адрес SNTP сервера (Ready for PRS!) */ void GetSntpServerIpStr(char *str, uint8_t *len) { 8027ab8: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSNTP.ip); 8027aba: 4a05 ldr r2, [pc, #20] ; (8027ad0 ) /** * @brief IP адрес SNTP сервера (Ready for PRS!) */ void GetSntpServerIpStr(char *str, uint8_t *len) { 8027abc: 4605 mov r5, r0 8027abe: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSNTP.ip); 8027ac0: 4904 ldr r1, [pc, #16] ; (8027ad4 ) 8027ac2: f7ff fea7 bl 8027814 *len = strlen(str); 8027ac6: 4628 mov r0, r5 8027ac8: f7fa f9f2 bl 8021eb0 8027acc: 7020 strb r0, [r4, #0] 8027ace: bd38 pop {r3, r4, r5, pc} 8027ad0: 2000d305 .word 0x2000d305 8027ad4: 080399bb .word 0x080399bb 08027ad8 : /** * @brief Часовой пояс контроллера (Ready for PRS!) */ void GetSntpTimeZoneStr(char *str, uint8_t *len) { 8027ad8: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", sSettings.sSNTP.timeZone); 8027ada: 4b09 ldr r3, [pc, #36] ; (8027b00 ) /** * @brief Часовой пояс контроллера (Ready for PRS!) */ void GetSntpTimeZoneStr(char *str, uint8_t *len) { 8027adc: 4604 mov r4, r0 sprintf(str, "%0.1f", sSettings.sSNTP.timeZone); 8027ade: f8d3 0370 ldr.w r0, [r3, #880] ; 0x370 /** * @brief Часовой пояс контроллера (Ready for PRS!) */ void GetSntpTimeZoneStr(char *str, uint8_t *len) { 8027ae2: 460d mov r5, r1 sprintf(str, "%0.1f", sSettings.sSNTP.timeZone); 8027ae4: f7f8 fd18 bl 8020518 <__aeabi_f2d> 8027ae8: 4602 mov r2, r0 8027aea: 460b mov r3, r1 8027aec: 4620 mov r0, r4 8027aee: 4905 ldr r1, [pc, #20] ; (8027b04 ) 8027af0: f7ff fe90 bl 8027814 *len = strlen(str); 8027af4: 4620 mov r0, r4 8027af6: f7fa f9db bl 8021eb0 8027afa: 7028 strb r0, [r5, #0] 8027afc: bd38 pop {r3, r4, r5, pc} 8027afe: bf00 nop 8027b00: 2000cfc4 .word 0x2000cfc4 8027b04: 080399a3 .word 0x080399a3 08027b08 : /** * @brief Дата последней синхронизации SNTP (Ready for PRS!) */ void GetSntpLastDataStr(char *str, uint8_t *len) { 8027b08: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSNTP.data); 8027b0a: 4a05 ldr r2, [pc, #20] ; (8027b20 ) /** * @brief Дата последней синхронизации SNTP (Ready for PRS!) */ void GetSntpLastDataStr(char *str, uint8_t *len) { 8027b0c: 4605 mov r5, r0 8027b0e: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSNTP.data); 8027b10: 4904 ldr r1, [pc, #16] ; (8027b24 ) 8027b12: f7ff fe7f bl 8027814 *len = strlen(str); 8027b16: 4628 mov r0, r5 8027b18: f7fa f9ca bl 8021eb0 8027b1c: 7020 strb r0, [r4, #0] 8027b1e: bd38 pop {r3, r4, r5, pc} 8027b20: 2000d315 .word 0x2000d315 8027b24: 080399bb .word 0x080399bb 08027b28 : /** * @brief Тип действий при срабатывание сухих контактов */ void GetDINTypeActStr(char *str, uint8_t *len, uint8_t num) { 8027b28: b538 push {r3, r4, r5, lr} sprintf(str, "%d", sSettings.sInOuts.din_type_act[num]); 8027b2a: 4b07 ldr r3, [pc, #28] ; (8027b48 ) 8027b2c: 189a adds r2, r3, r2 /** * @brief Тип действий при срабатывание сухих контактов */ void GetDINTypeActStr(char *str, uint8_t *len, uint8_t num) { 8027b2e: 4605 mov r5, r0 8027b30: 460c mov r4, r1 sprintf(str, "%d", sSettings.sInOuts.din_type_act[num]); 8027b32: f892 2376 ldrb.w r2, [r2, #886] ; 0x376 8027b36: 4905 ldr r1, [pc, #20] ; (8027b4c ) 8027b38: f7ff fe6c bl 8027814 *len = strlen(str); 8027b3c: 4628 mov r0, r5 8027b3e: f7fa f9b7 bl 8021eb0 8027b42: 7020 strb r0, [r4, #0] 8027b44: bd38 pop {r3, r4, r5, pc} 8027b46: bf00 nop 8027b48: 2000cfc4 .word 0x2000cfc4 8027b4c: 080399a9 .word 0x080399a9 08027b50 : /** * @brief Состояние сухого контакта */ void GetDINStatusStr(char *str, uint8_t *len, uint8_t num) { sprintf(str, "%d", get_state_din_outs(DIN1+num)); 8027b50: 3206 adds r2, #6 /** * @brief Состояние сухого контакта */ void GetDINStatusStr(char *str, uint8_t *len, uint8_t num) { 8027b52: b538 push {r3, r4, r5, lr} 8027b54: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DIN1+num)); 8027b56: b2d0 uxtb r0, r2 /** * @brief Состояние сухого контакта */ void GetDINStatusStr(char *str, uint8_t *len, uint8_t num) { 8027b58: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DIN1+num)); 8027b5a: f001 f81d bl 8028b98 8027b5e: 4905 ldr r1, [pc, #20] ; (8027b74 ) 8027b60: 4602 mov r2, r0 8027b62: 4620 mov r0, r4 8027b64: f7ff fe56 bl 8027814 *len = strlen(str); 8027b68: 4620 mov r0, r4 8027b6a: f7fa f9a1 bl 8021eb0 8027b6e: 7028 strb r0, [r5, #0] 8027b70: bd38 pop {r3, r4, r5, pc} 8027b72: bf00 nop 8027b74: 080399a9 .word 0x080399a9 08027b78 : /** * @brief Состояние сухого контакта */ void GetDIN0StatusStr(char *str, uint8_t *len) { 8027b78: b538 push {r3, r4, r5, lr} 8027b7a: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DIN1)); 8027b7c: 2006 movs r0, #6 /** * @brief Состояние сухого контакта */ void GetDIN0StatusStr(char *str, uint8_t *len) { 8027b7e: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DIN1)); 8027b80: f001 f80a bl 8028b98 8027b84: 4904 ldr r1, [pc, #16] ; (8027b98 ) 8027b86: 4602 mov r2, r0 8027b88: 4620 mov r0, r4 8027b8a: f7ff fe43 bl 8027814 *len = strlen(str); 8027b8e: 4620 mov r0, r4 8027b90: f7fa f98e bl 8021eb0 8027b94: 7028 strb r0, [r5, #0] 8027b96: bd38 pop {r3, r4, r5, pc} 8027b98: 080399a9 .word 0x080399a9 08027b9c : /** * @brief Источник срабатывания реле */ void GetROTypeActStr(char *str, uint8_t *len, uint8_t num) { 8027b9c: b538 push {r3, r4, r5, lr} sprintf(str, "%d", sSettings.sInOuts.ro_type_source[num]); 8027b9e: 4b07 ldr r3, [pc, #28] ; (8027bbc ) 8027ba0: 189a adds r2, r3, r2 /** * @brief Источник срабатывания реле */ void GetROTypeActStr(char *str, uint8_t *len, uint8_t num) { 8027ba2: 4605 mov r5, r0 8027ba4: 460c mov r4, r1 sprintf(str, "%d", sSettings.sInOuts.ro_type_source[num]); 8027ba6: f892 2374 ldrb.w r2, [r2, #884] ; 0x374 8027baa: 4905 ldr r1, [pc, #20] ; (8027bc0 ) 8027bac: f7ff fe32 bl 8027814 *len = strlen(str); 8027bb0: 4628 mov r0, r5 8027bb2: f7fa f97d bl 8021eb0 8027bb6: 7020 strb r0, [r4, #0] 8027bb8: bd38 pop {r3, r4, r5, pc} 8027bba: bf00 nop 8027bbc: 2000cfc4 .word 0x2000cfc4 8027bc0: 080399a9 .word 0x080399a9 08027bc4 : /** * @brief Состояние релейного выхода */ void GetDOUTStatusStr(char *str, uint8_t *len, uint8_t num) { sprintf(str, "%d", get_state_din_outs(DOUT1+num)); 8027bc4: 3207 adds r2, #7 /** * @brief Состояние релейного выхода */ void GetDOUTStatusStr(char *str, uint8_t *len, uint8_t num) { 8027bc6: b538 push {r3, r4, r5, lr} 8027bc8: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DOUT1+num)); 8027bca: b2d0 uxtb r0, r2 /** * @brief Состояние релейного выхода */ void GetDOUTStatusStr(char *str, uint8_t *len, uint8_t num) { 8027bcc: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DOUT1+num)); 8027bce: f000 ffe3 bl 8028b98 8027bd2: 4905 ldr r1, [pc, #20] ; (8027be8 ) 8027bd4: 4602 mov r2, r0 8027bd6: 4620 mov r0, r4 8027bd8: f7ff fe1c bl 8027814 *len = strlen(str); 8027bdc: 4620 mov r0, r4 8027bde: f7fa f967 bl 8021eb0 8027be2: 7028 strb r0, [r5, #0] 8027be4: bd38 pop {r3, r4, r5, pc} 8027be6: bf00 nop 8027be8: 080399a9 .word 0x080399a9 08027bec : /** * @brief Состояние релейного выхода */ void GetDOUT0StatusStr(char *str, uint8_t *len) { 8027bec: b538 push {r3, r4, r5, lr} 8027bee: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DOUT1)); 8027bf0: 2007 movs r0, #7 /** * @brief Состояние релейного выхода */ void GetDOUT0StatusStr(char *str, uint8_t *len) { 8027bf2: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DOUT1)); 8027bf4: f000 ffd0 bl 8028b98 8027bf8: 4904 ldr r1, [pc, #16] ; (8027c0c ) 8027bfa: 4602 mov r2, r0 8027bfc: 4620 mov r0, r4 8027bfe: f7ff fe09 bl 8027814 *len = strlen(str); 8027c02: 4620 mov r0, r4 8027c04: f7fa f954 bl 8021eb0 8027c08: 7028 strb r0, [r5, #0] 8027c0a: bd38 pop {r3, r4, r5, pc} 8027c0c: 080399a9 .word 0x080399a9 08027c10 : /** * @brief Состояние релейного выхода */ void GetDOUT1StatusStr(char *str, uint8_t *len) { 8027c10: b538 push {r3, r4, r5, lr} 8027c12: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DOUT2)); 8027c14: 2008 movs r0, #8 /** * @brief Состояние релейного выхода */ void GetDOUT1StatusStr(char *str, uint8_t *len) { 8027c16: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DOUT2)); 8027c18: f000 ffbe bl 8028b98 8027c1c: 4904 ldr r1, [pc, #16] ; (8027c30 ) 8027c1e: 4602 mov r2, r0 8027c20: 4620 mov r0, r4 8027c22: f7ff fdf7 bl 8027814 *len = strlen(str); 8027c26: 4620 mov r0, r4 8027c28: f7fa f942 bl 8021eb0 8027c2c: 7028 strb r0, [r5, #0] 8027c2e: bd38 pop {r3, r4, r5, pc} 8027c30: 080399a9 .word 0x080399a9 08027c34 : /** * @brief Время работы устройства */ void GetWorkTimeStr(char *str, uint8_t *len) { 8027c34: b57f push {r0, r1, r2, r3, r4, r5, r6, lr} 8027c36: 4604 mov r4, r0 u32_t tick; uint16_t day; uint8_t hour; uint8_t min; snmp_get_sysuptime(&tick); 8027c38: a803 add r0, sp, #12 /** * @brief Время работы устройства */ void GetWorkTimeStr(char *str, uint8_t *len) { 8027c3a: 460e mov r6, r1 u32_t tick; uint16_t day; uint8_t hour; uint8_t min; snmp_get_sysuptime(&tick); 8027c3c: f00c fd0c bl 8034658 day = tick/8640000; 8027c40: 9803 ldr r0, [sp, #12] tick = tick%8640000; 8027c42: 4b0c ldr r3, [pc, #48] ; (8027c74 ) hour = tick/360000; tick = tick%360000; 8027c44: 4d0c ldr r5, [pc, #48] ; (8027c78 ) snmp_get_sysuptime(&tick); day = tick/8640000; tick = tick%8640000; 8027c46: fbb0 f2f3 udiv r2, r0, r3 8027c4a: fb03 0012 mls r0, r3, r2, r0 hour = tick/360000; tick = tick%360000; 8027c4e: fbb0 f3f5 udiv r3, r0, r5 8027c52: fb05 0013 mls r0, r5, r3, r0 min = tick/6000; 8027c56: f241 7170 movw r1, #6000 ; 0x1770 day = tick/8640000; tick = tick%8640000; hour = tick/360000; tick = tick%360000; 8027c5a: 9003 str r0, [sp, #12] min = tick/6000; 8027c5c: fbb0 f0f1 udiv r0, r0, r1 sprintf(str, "%d дн. %d ч. %d мин.", day, hour, min); 8027c60: 9000 str r0, [sp, #0] 8027c62: 4906 ldr r1, [pc, #24] ; (8027c7c ) 8027c64: 4620 mov r0, r4 8027c66: f7ff fdd5 bl 8027814 *len = strlen(str); 8027c6a: 4620 mov r0, r4 8027c6c: f7fa f920 bl 8021eb0 8027c70: 7030 strb r0, [r6, #0] } 8027c72: bd7f pop {r0, r1, r2, r3, r4, r5, r6, pc} 8027c74: 0083d600 .word 0x0083d600 8027c78: 00057e40 .word 0x00057e40 8027c7c: 080399be .word 0x080399be 08027c80 : /** * @brief Модель устройства */ void GetModelStr(char *str, uint8_t *len) { 8027c80: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sSnmp.sysName); 8027c82: 4c07 ldr r4, [pc, #28] ; (8027ca0 ) /** * @brief Модель устройства */ void GetModelStr(char *str, uint8_t *len) { 8027c84: 4605 mov r5, r0 *len = strlen(sSettings.sSnmp.sysName); 8027c86: 4620 mov r0, r4 /** * @brief Модель устройства */ void GetModelStr(char *str, uint8_t *len) { 8027c88: 460e mov r6, r1 *len = strlen(sSettings.sSnmp.sysName); 8027c8a: f7fa f911 bl 8021eb0 8027c8e: 4602 mov r2, r0 8027c90: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sSnmp.sysName, *len); 8027c92: 4621 mov r1, r4 8027c94: 4628 mov r0, r5 8027c96: b2d2 uxtb r2, r2 } 8027c98: 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); 8027c9c: f7fa b9c0 b.w 8022020 8027ca0: 2000d1ef .word 0x2000d1ef 08027ca4 : /** * @brief Дата производства */ void GetProductionDataStr(char *str, uint8_t *len) { 8027ca4: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.productionData); 8027ca6: 4c07 ldr r4, [pc, #28] ; (8027cc4 ) /** * @brief Дата производства */ void GetProductionDataStr(char *str, uint8_t *len) { 8027ca8: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.productionData); 8027caa: 4620 mov r0, r4 /** * @brief Дата производства */ void GetProductionDataStr(char *str, uint8_t *len) { 8027cac: 460e mov r6, r1 *len = strlen(sSettings.sInfo.productionData); 8027cae: f7fa f8ff bl 8021eb0 8027cb2: 4602 mov r2, r0 8027cb4: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.productionData, *len); 8027cb6: 4621 mov r1, r4 8027cb8: 4628 mov r0, r5 8027cba: b2d2 uxtb r2, r2 } 8027cbc: 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); 8027cc0: f7fa b9ae b.w 8022020 8027cc4: 2000d028 .word 0x2000d028 08027cc8 : /** * @brief Версия ПО */ void GetVersionStr(char *str, uint8_t *len) // + { 8027cc8: b570 push {r4, r5, r6, lr} *len = strlen(VERSION); 8027cca: 4c07 ldr r4, [pc, #28] ; (8027ce8 ) /** * @brief Версия ПО */ void GetVersionStr(char *str, uint8_t *len) // + { 8027ccc: 4605 mov r5, r0 *len = strlen(VERSION); 8027cce: 4620 mov r0, r4 /** * @brief Версия ПО */ void GetVersionStr(char *str, uint8_t *len) // + { 8027cd0: 460e mov r6, r1 *len = strlen(VERSION); 8027cd2: f7fa f8ed bl 8021eb0 8027cd6: 4602 mov r2, r0 8027cd8: 7030 strb r0, [r6, #0] strncpy(str, VERSION, *len); 8027cda: 4621 mov r1, r4 8027cdc: 4628 mov r0, r5 8027cde: b2d2 uxtb r2, r2 } 8027ce0: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief Версия ПО */ void GetVersionStr(char *str, uint8_t *len) // + { *len = strlen(VERSION); strncpy(str, VERSION, *len); 8027ce4: f7fa b99c b.w 8022020 8027ce8: 080399d9 .word 0x080399d9 08027cec : /** * @brief MAC адрес устройства */ void GetMacStr(char *str, uint8_t *len) { 8027cec: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.mac); 8027cee: 4c07 ldr r4, [pc, #28] ; (8027d0c ) /** * @brief MAC адрес устройства */ void GetMacStr(char *str, uint8_t *len) { 8027cf0: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.mac); 8027cf2: 4620 mov r0, r4 /** * @brief MAC адрес устройства */ void GetMacStr(char *str, uint8_t *len) { 8027cf4: 460e mov r6, r1 *len = strlen(sSettings.sInfo.mac); 8027cf6: f7fa f8db bl 8021eb0 8027cfa: 4602 mov r2, r0 8027cfc: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.mac, *len); 8027cfe: 4621 mov r1, r4 8027d00: 4628 mov r0, r5 8027d02: b2d2 uxtb r2, r2 } 8027d04: 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); 8027d08: f7fa b98a b.w 8022020 8027d0c: 2000d050 .word 0x2000d050 08027d10 : /** * @brief Серийный номер устройства */ void GetSerialNumberStr(char *str, uint8_t *len) { 8027d10: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.serialNumber); 8027d12: 4c07 ldr r4, [pc, #28] ; (8027d30 ) /** * @brief Серийный номер устройства */ void GetSerialNumberStr(char *str, uint8_t *len) { 8027d14: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.serialNumber); 8027d16: 4620 mov r0, r4 /** * @brief Серийный номер устройства */ void GetSerialNumberStr(char *str, uint8_t *len) { 8027d18: 460e mov r6, r1 *len = strlen(sSettings.sInfo.serialNumber); 8027d1a: f7fa f8c9 bl 8021eb0 8027d1e: 4602 mov r2, r0 8027d20: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.serialNumber, *len); 8027d22: 4621 mov r1, r4 8027d24: 4628 mov r0, r5 8027d26: b2d2 uxtb r2, r2 } 8027d28: 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); 8027d2c: f7fa b978 b.w 8022020 8027d30: 2000d062 .word 0x2000d062 08027d34 : /** * @brief Владелец устройства */ void GetOwnerStr(char *str, uint8_t *len) { 8027d34: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sSnmp.sysContact); 8027d36: 4c07 ldr r4, [pc, #28] ; (8027d54 ) /** * @brief Владелец устройства */ void GetOwnerStr(char *str, uint8_t *len) { 8027d38: 4605 mov r5, r0 *len = strlen(sSettings.sSnmp.sysContact); 8027d3a: 4620 mov r0, r4 /** * @brief Владелец устройства */ void GetOwnerStr(char *str, uint8_t *len) { 8027d3c: 460e mov r6, r1 *len = strlen(sSettings.sSnmp.sysContact); 8027d3e: f7fa f8b7 bl 8021eb0 8027d42: 4602 mov r2, r0 8027d44: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sSnmp.sysContact, *len); 8027d46: 4621 mov r1, r4 8027d48: 4628 mov r0, r5 8027d4a: b2d2 uxtb r2, r2 } 8027d4c: 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); 8027d50: f7fa b966 b.w 8022020 8027d54: 2000d1bd .word 0x2000d1bd 08027d58 : /** * @brief Местоположение устройства */ void GetLocationStr(char *str, uint8_t *len) { 8027d58: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sSnmp.sysLocation); 8027d5a: 4c07 ldr r4, [pc, #28] ; (8027d78 ) /** * @brief Местоположение устройства */ void GetLocationStr(char *str, uint8_t *len) { 8027d5c: 4605 mov r5, r0 *len = strlen(sSettings.sSnmp.sysLocation); 8027d5e: 4620 mov r0, r4 /** * @brief Местоположение устройства */ void GetLocationStr(char *str, uint8_t *len) { 8027d60: 460e mov r6, r1 *len = strlen(sSettings.sSnmp.sysLocation); 8027d62: f7fa f8a5 bl 8021eb0 8027d66: 4602 mov r2, r0 8027d68: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sSnmp.sysLocation, *len); 8027d6a: 4621 mov r1, r4 8027d6c: 4628 mov r0, r5 8027d6e: b2d2 uxtb r2, r2 } 8027d70: 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); 8027d74: f7fa b954 b.w 8022020 8027d78: 2000d203 .word 0x2000d203 08027d7c : /** * @brief Комментарии */ void GetCommentsStr(char *str, uint8_t *len) { 8027d7c: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.comments); 8027d7e: 4c07 ldr r4, [pc, #28] ; (8027d9c ) /** * @brief Комментарии */ void GetCommentsStr(char *str, uint8_t *len) { 8027d80: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.comments); 8027d82: 4620 mov r0, r4 /** * @brief Комментарии */ void GetCommentsStr(char *str, uint8_t *len) { 8027d84: 460e mov r6, r1 *len = strlen(sSettings.sInfo.comments); 8027d86: f7fa f893 bl 8021eb0 8027d8a: 4602 mov r2, r0 8027d8c: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.comments, *len); 8027d8e: 4621 mov r1, r4 8027d90: 4628 mov r0, r5 8027d92: b2d2 uxtb r2, r2 } 8027d94: 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); 8027d98: f7fa b942 b.w 8022020 8027d9c: 2000d072 .word 0x2000d072 08027da0 : /** * @brief Модель UPS */ void GetUPSModelStr(char *str, uint8_t *len) { 8027da0: b570 push {r4, r5, r6, lr} *len = strlen(UPS.model); 8027da2: 4c07 ldr r4, [pc, #28] ; (8027dc0 ) /** * @brief Модель UPS */ void GetUPSModelStr(char *str, uint8_t *len) { 8027da4: 4605 mov r5, r0 *len = strlen(UPS.model); 8027da6: 4620 mov r0, r4 /** * @brief Модель UPS */ void GetUPSModelStr(char *str, uint8_t *len) { 8027da8: 460e mov r6, r1 *len = strlen(UPS.model); 8027daa: f7fa f881 bl 8021eb0 8027dae: 4602 mov r2, r0 8027db0: 7030 strb r0, [r6, #0] strncpy(str, UPS.model, *len); 8027db2: 4621 mov r1, r4 8027db4: 4628 mov r0, r5 8027db6: b2d2 uxtb r2, r2 } 8027db8: 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); 8027dbc: f7fa b930 b.w 8022020 8027dc0: 2000cbbd .word 0x2000cbbd 08027dc4 : /** * @brief Версия UPS ПО */ void GetUPSVersionStr(char *str, uint8_t *len) // + { 8027dc4: b570 push {r4, r5, r6, lr} *len = strlen(UPS.vertion); 8027dc6: 4c07 ldr r4, [pc, #28] ; (8027de4 ) /** * @brief Версия UPS ПО */ void GetUPSVersionStr(char *str, uint8_t *len) // + { 8027dc8: 4605 mov r5, r0 *len = strlen(UPS.vertion); 8027dca: 4620 mov r0, r4 /** * @brief Версия UPS ПО */ void GetUPSVersionStr(char *str, uint8_t *len) // + { 8027dcc: 460e mov r6, r1 *len = strlen(UPS.vertion); 8027dce: f7fa f86f bl 8021eb0 8027dd2: 4602 mov r2, r0 8027dd4: 7030 strb r0, [r6, #0] strncpy(str, UPS.vertion, *len); 8027dd6: 4621 mov r1, r4 8027dd8: 4628 mov r0, r5 8027dda: b2d2 uxtb r2, r2 } 8027ddc: 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); 8027de0: f7fa b91e b.w 8022020 8027de4: 2000cbc8 .word 0x2000cbc8 08027de8 : // ************************************************************************** // // Настройки аутентификации void GetUserLogin(uint8_t user_id, char *str, uint8_t *len) { 8027de8: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sAuth[user_id].login); 8027dea: 4b08 ldr r3, [pc, #32] ; (8027e0c ) // ************************************************************************** // // Настройки аутентификации void GetUserLogin(uint8_t user_id, char *str, uint8_t *len) { 8027dec: 4615 mov r5, r2 sprintf(str, "%s", sSettings.sAuth[user_id].login); 8027dee: 2217 movs r2, #23 8027df0: fb02 3200 mla r2, r2, r0, r3 // ************************************************************************** // // Настройки аутентификации void GetUserLogin(uint8_t user_id, char *str, uint8_t *len) { 8027df4: 460c mov r4, r1 sprintf(str, "%s", sSettings.sAuth[user_id].login); 8027df6: 4608 mov r0, r1 8027df8: 3202 adds r2, #2 8027dfa: 4905 ldr r1, [pc, #20] ; (8027e10 ) 8027dfc: f7ff fd0a bl 8027814 *len = strlen(str); 8027e00: 4620 mov r0, r4 8027e02: f7fa f855 bl 8021eb0 8027e06: 7028 strb r0, [r5, #0] 8027e08: bd38 pop {r3, r4, r5, pc} 8027e0a: bf00 nop 8027e0c: 2000d2d4 .word 0x2000d2d4 8027e10: 080399bb .word 0x080399bb 08027e14 : } void GetUserPassword(uint8_t user_id, char *str, uint8_t *len) { 8027e14: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sAuth[user_id].password); 8027e16: 4b08 ldr r3, [pc, #32] ; (8027e38 ) sprintf(str, "%s", sSettings.sAuth[user_id].login); *len = strlen(str); } void GetUserPassword(uint8_t user_id, char *str, uint8_t *len) { 8027e18: 4615 mov r5, r2 sprintf(str, "%s", sSettings.sAuth[user_id].password); 8027e1a: 2217 movs r2, #23 8027e1c: 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) { 8027e20: 460c mov r4, r1 sprintf(str, "%s", sSettings.sAuth[user_id].password); 8027e22: 4608 mov r0, r1 8027e24: 3205 adds r2, #5 8027e26: 4905 ldr r1, [pc, #20] ; (8027e3c ) 8027e28: f7ff fcf4 bl 8027814 *len = strlen(str); 8027e2c: 4620 mov r0, r4 8027e2e: f7fa f83f bl 8021eb0 8027e32: 7028 strb r0, [r5, #0] 8027e34: bd38 pop {r3, r4, r5, pc} 8027e36: bf00 nop 8027e38: 2000d2dc .word 0x2000d2dc 8027e3c: 080399bb .word 0x080399bb 08027e40 : *len = strlen(str); } void GetUserLevelInt(uint8_t user_id, uint8_t *value) { *value = sSettings.sAuth[user_id].level; 8027e40: 4b03 ldr r3, [pc, #12] ; (8027e50 ) 8027e42: 2217 movs r2, #23 8027e44: fb02 3000 mla r0, r2, r0, r3 8027e48: f890 3311 ldrb.w r3, [r0, #785] ; 0x311 8027e4c: 700b strb r3, [r1, #0] 8027e4e: 4770 bx lr 8027e50: 2000cfc4 .word 0x2000cfc4 08027e54 : * @brief Текущий IP адрес */ void GetIpStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027e54: 4a08 ldr r2, [pc, #32] ; (8027e78 ) /** * @brief Текущий IP адрес */ void GetIpStr(char *str, uint8_t *len) { 8027e56: b538 push {r3, r4, r5, lr} /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027e58: f892 3120 ldrb.w r3, [r2, #288] ; 0x120 /** * @brief Текущий IP адрес */ void GetIpStr(char *str, uint8_t *len) { 8027e5c: 460c mov r4, r1 8027e5e: 4605 mov r5, r0 /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) sprintf(str, "%s", sSettings.sWebTempParams.ip); 8027e60: 4906 ldr r1, [pc, #24] ; (8027e7c ) * @brief Текущий IP адрес */ void GetIpStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027e62: b10b cbz r3, 8027e68 sprintf(str, "%s", sSettings.sWebTempParams.ip); 8027e64: 3233 adds r2, #51 ; 0x33 8027e66: e000 b.n 8027e6a else sprintf(str, "%s", sSettings.sWebParams.ip); 8027e68: 3202 adds r2, #2 8027e6a: f7ff fcd3 bl 8027814 *len = strlen(str); 8027e6e: 4628 mov r0, r5 8027e70: f7fa f81e bl 8021eb0 8027e74: 7020 strb r0, [r4, #0] 8027e76: bd38 pop {r3, r4, r5, pc} 8027e78: 2000cfc4 .word 0x2000cfc4 8027e7c: 080399bb .word 0x080399bb 08027e80 : * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027e80: 4a08 ldr r2, [pc, #32] ; (8027ea4 ) /** * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { 8027e82: b538 push {r3, r4, r5, lr} /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027e84: f892 3120 ldrb.w r3, [r2, #288] ; 0x120 /** * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { 8027e88: 460c mov r4, r1 8027e8a: 4605 mov r5, r0 /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) sprintf(str, "%s", sSettings.sWebTempParams.gate); 8027e8c: 4906 ldr r1, [pc, #24] ; (8027ea8 ) * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027e8e: b10b cbz r3, 8027e94 sprintf(str, "%s", sSettings.sWebTempParams.gate); 8027e90: 3243 adds r2, #67 ; 0x43 8027e92: e000 b.n 8027e96 else sprintf(str, "%s", sSettings.sWebParams.gate); 8027e94: 3212 adds r2, #18 8027e96: f7ff fcbd bl 8027814 *len = strlen(str); 8027e9a: 4628 mov r0, r5 8027e9c: f7fa f808 bl 8021eb0 8027ea0: 7020 strb r0, [r4, #0] 8027ea2: bd38 pop {r3, r4, r5, pc} 8027ea4: 2000cfc4 .word 0x2000cfc4 8027ea8: 080399bb .word 0x080399bb 08027eac : * @brief Текущая маска подсети */ void GetMaskStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027eac: 4a08 ldr r2, [pc, #32] ; (8027ed0 ) /** * @brief Текущая маска подсети */ void GetMaskStr(char *str, uint8_t *len) { 8027eae: b538 push {r3, r4, r5, lr} /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027eb0: f892 3120 ldrb.w r3, [r2, #288] ; 0x120 /** * @brief Текущая маска подсети */ void GetMaskStr(char *str, uint8_t *len) { 8027eb4: 460c mov r4, r1 8027eb6: 4605 mov r5, r0 /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) sprintf(str, "%s", sSettings.sWebTempParams.mask); 8027eb8: 4906 ldr r1, [pc, #24] ; (8027ed4 ) * @brief Текущая маска подсети */ void GetMaskStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027eba: b10b cbz r3, 8027ec0 sprintf(str, "%s", sSettings.sWebTempParams.mask); 8027ebc: 3253 adds r2, #83 ; 0x53 8027ebe: e000 b.n 8027ec2 else sprintf(str, "%s", sSettings.sWebParams.mask); 8027ec0: 3222 adds r2, #34 ; 0x22 8027ec2: f7ff fca7 bl 8027814 *len = strlen(str); 8027ec6: 4628 mov r0, r5 8027ec8: f7f9 fff2 bl 8021eb0 8027ecc: 7020 strb r0, [r4, #0] 8027ece: bd38 pop {r3, r4, r5, pc} 8027ed0: 2000cfc4 .word 0x2000cfc4 8027ed4: 080399bb .word 0x080399bb 08027ed8 : * @brief Настройка DHCP */ void GetDhcpStateStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027ed8: 4b08 ldr r3, [pc, #32] ; (8027efc ) 8027eda: f893 2120 ldrb.w r2, [r3, #288] ; 0x120 8027ede: b112 cbz r2, 8027ee6 { if (sSettings.sWebTempParams.dhcpEnable) 8027ee0: f893 3063 ldrb.w r3, [r3, #99] ; 0x63 8027ee4: e001 b.n 8027eea else *str = '0'; } else { if (sSettings.sWebParams.dhcpEnable) 8027ee6: f893 3032 ldrb.w r3, [r3, #50] ; 0x32 8027eea: b10b cbz r3, 8027ef0 *str = '1'; 8027eec: 2331 movs r3, #49 ; 0x31 8027eee: e000 b.n 8027ef2 else *str = '0'; 8027ef0: 2330 movs r3, #48 ; 0x30 8027ef2: 7003 strb r3, [r0, #0] } *len = 1; 8027ef4: 2301 movs r3, #1 8027ef6: 700b strb r3, [r1, #0] 8027ef8: 4770 bx lr 8027efa: bf00 nop 8027efc: 2000cfc4 .word 0x2000cfc4 08027f00 : /** * @brief Настройка DHCP */ void GetDhcpStateUDP(char *str, uint8_t *len) { 8027f00: b538 push {r3, r4, r5, lr} /* Если сейчас временные настройки или был загружен файл конфигурации */ if (sSettings.sFlags.netsettingsChanged) 8027f02: 4b0c ldr r3, [pc, #48] ; (8027f34 ) 8027f04: f893 2120 ldrb.w r2, [r3, #288] ; 0x120 /** * @brief Настройка DHCP */ void GetDhcpStateUDP(char *str, uint8_t *len) { 8027f08: 4604 mov r4, r0 8027f0a: 460d mov r5, r1 /* Если сейчас временные настройки или был загружен файл конфигурации */ if (sSettings.sFlags.netsettingsChanged) 8027f0c: b152 cbz r2, 8027f24 { if (sSettings.sWebTempParams.dhcpEnable) 8027f0e: f893 3063 ldrb.w r3, [r3, #99] ; 0x63 sprintf(str, "%s", "True"); 8027f12: 4620 mov r0, r4 8027f14: 4908 ldr r1, [pc, #32] ; (8027f38 ) void GetDhcpStateUDP(char *str, uint8_t *len) { /* Если сейчас временные настройки или был загружен файл конфигурации */ if (sSettings.sFlags.netsettingsChanged) { if (sSettings.sWebTempParams.dhcpEnable) 8027f16: b10b cbz r3, 8027f1c sprintf(str, "%s", "True"); 8027f18: 4a08 ldr r2, [pc, #32] ; (8027f3c ) 8027f1a: e000 b.n 8027f1e else sprintf(str, "%s", "False"); 8027f1c: 4a08 ldr r2, [pc, #32] ; (8027f40 ) 8027f1e: f7ff fc79 bl 8027814 8027f22: e002 b.n 8027f2a } else { if (sSettings.sWebParams.dhcpEnable) 8027f24: f893 3032 ldrb.w r3, [r3, #50] ; 0x32 8027f28: e7f3 b.n 8027f12 sprintf(str, "%s", "True"); else sprintf(str, "%s", "False"); } *len = strlen(str); 8027f2a: 4620 mov r0, r4 8027f2c: f7f9 ffc0 bl 8021eb0 8027f30: 7028 strb r0, [r5, #0] 8027f32: bd38 pop {r3, r4, r5, pc} 8027f34: 2000cfc4 .word 0x2000cfc4 8027f38: 080399bb .word 0x080399bb 8027f3c: 08040e43 .word 0x08040e43 8027f40: 080399dd .word 0x080399dd 08027f44 : /** * @brief Текущее community для чтения */ void GetReadCommunity(char *str, uint8_t *len) { 8027f44: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.readCommunity); 8027f46: 4a05 ldr r2, [pc, #20] ; (8027f5c ) /** * @brief Текущее community для чтения */ void GetReadCommunity(char *str, uint8_t *len) { 8027f48: 4605 mov r5, r0 8027f4a: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.readCommunity); 8027f4c: 4904 ldr r1, [pc, #16] ; (8027f60 ) 8027f4e: f7ff fc61 bl 8027814 *len = strlen(str); 8027f52: 4628 mov r0, r5 8027f54: f7f9 ffac bl 8021eb0 8027f58: 7020 strb r0, [r4, #0] 8027f5a: bd38 pop {r3, r4, r5, pc} 8027f5c: 2000d195 .word 0x2000d195 8027f60: 080399bb .word 0x080399bb 08027f64 : /** * @brief Текущее community для записи */ void GetWriteCommunity(char *str, uint8_t *len) { 8027f64: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.writeCommunity); 8027f66: 4a05 ldr r2, [pc, #20] ; (8027f7c ) /** * @brief Текущее community для записи */ void GetWriteCommunity(char *str, uint8_t *len) { 8027f68: 4605 mov r5, r0 8027f6a: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.writeCommunity); 8027f6c: 4904 ldr r1, [pc, #16] ; (8027f80 ) 8027f6e: f7ff fc51 bl 8027814 *len = strlen(str); 8027f72: 4628 mov r0, r5 8027f74: f7f9 ff9c bl 8021eb0 8027f78: 7020 strb r0, [r4, #0] 8027f7a: bd38 pop {r3, r4, r5, pc} 8027f7c: 2000d1a9 .word 0x2000d1a9 8027f80: 080399bb .word 0x080399bb 08027f84 : /** * @brief IP SNMP менеджера */ void GetManagerIp(char *str, uint8_t *len) { 8027f84: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP); 8027f86: 4a05 ldr r2, [pc, #20] ; (8027f9c ) /** * @brief IP SNMP менеджера */ void GetManagerIp(char *str, uint8_t *len) { 8027f88: 4605 mov r5, r0 8027f8a: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP); 8027f8c: 4904 ldr r1, [pc, #16] ; (8027fa0 ) 8027f8e: f7ff fc41 bl 8027814 *len = strlen(str); 8027f92: 4628 mov r0, r5 8027f94: f7f9 ff8c bl 8021eb0 8027f98: 7020 strb r0, [r4, #0] 8027f9a: bd38 pop {r3, r4, r5, pc} 8027f9c: 2000d271 .word 0x2000d271 8027fa0: 080399bb .word 0x080399bb 08027fa4 : } void GetManagerIp2(char *str, uint8_t *len) { 8027fa4: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP2); 8027fa6: 4a05 ldr r2, [pc, #20] ; (8027fbc ) sprintf(str, "%s", sSettings.sSnmp.managerIP); *len = strlen(str); } void GetManagerIp2(char *str, uint8_t *len) { 8027fa8: 4605 mov r5, r0 8027faa: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP2); 8027fac: 4904 ldr r1, [pc, #16] ; (8027fc0 ) 8027fae: f7ff fc31 bl 8027814 *len = strlen(str); 8027fb2: 4628 mov r0, r5 8027fb4: f7f9 ff7c bl 8021eb0 8027fb8: 7020 strb r0, [r4, #0] 8027fba: bd38 pop {r3, r4, r5, pc} 8027fbc: 2000d285 .word 0x2000d285 8027fc0: 080399bb .word 0x080399bb 08027fc4 : } void GetManagerIp3(char *str, uint8_t *len) { 8027fc4: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP3); 8027fc6: 4a05 ldr r2, [pc, #20] ; (8027fdc ) sprintf(str, "%s", sSettings.sSnmp.managerIP2); *len = strlen(str); } void GetManagerIp3(char *str, uint8_t *len) { 8027fc8: 4605 mov r5, r0 8027fca: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP3); 8027fcc: 4904 ldr r1, [pc, #16] ; (8027fe0 ) 8027fce: f7ff fc21 bl 8027814 *len = strlen(str); 8027fd2: 4628 mov r0, r5 8027fd4: f7f9 ff6c bl 8021eb0 8027fd8: 7020 strb r0, [r4, #0] 8027fda: bd38 pop {r3, r4, r5, pc} 8027fdc: 2000d299 .word 0x2000d299 8027fe0: 080399bb .word 0x080399bb 08027fe4 : } void GetManagerIp4(char *str, uint8_t *len) { 8027fe4: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP4); 8027fe6: 4a05 ldr r2, [pc, #20] ; (8027ffc ) sprintf(str, "%s", sSettings.sSnmp.managerIP3); *len = strlen(str); } void GetManagerIp4(char *str, uint8_t *len) { 8027fe8: 4605 mov r5, r0 8027fea: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP4); 8027fec: 4904 ldr r1, [pc, #16] ; (8028000 ) 8027fee: f7ff fc11 bl 8027814 *len = strlen(str); 8027ff2: 4628 mov r0, r5 8027ff4: f7f9 ff5c bl 8021eb0 8027ff8: 7020 strb r0, [r4, #0] 8027ffa: bd38 pop {r3, r4, r5, pc} 8027ffc: 2000d2ad .word 0x2000d2ad 8028000: 080399bb .word 0x080399bb 08028004 : } void GetManagerIp5(char *str, uint8_t *len) { 8028004: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP5); 8028006: 4a05 ldr r2, [pc, #20] ; (802801c ) sprintf(str, "%s", sSettings.sSnmp.managerIP4); *len = strlen(str); } void GetManagerIp5(char *str, uint8_t *len) { 8028008: 4605 mov r5, r0 802800a: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP5); 802800c: 4904 ldr r1, [pc, #16] ; (8028020 ) 802800e: f7ff fc01 bl 8027814 *len = strlen(str); 8028012: 4628 mov r0, r5 8028014: f7f9 ff4c bl 8021eb0 8028018: 7020 strb r0, [r4, #0] 802801a: bd38 pop {r3, r4, r5, pc} 802801c: 2000d2c1 .word 0x2000d2c1 8028020: 080399bb .word 0x080399bb 08028024 : /** * @brief Текущий IP адрес */ void GetRDSIpStr(char *str, uint8_t *len) { 8028024: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sRADIUS.ServerIP); 8028026: 4a05 ldr r2, [pc, #20] ; (802803c ) /** * @brief Текущий IP адрес */ void GetRDSIpStr(char *str, uint8_t *len) { 8028028: 4605 mov r5, r0 802802a: 460c mov r4, r1 sprintf(str, "%s", sSettings.sRADIUS.ServerIP); 802802c: 4904 ldr r1, [pc, #16] ; (8028040 ) 802802e: f7ff fbf1 bl 8027814 *len = strlen(str); 8028032: 4628 mov r0, r5 8028034: f7f9 ff3c bl 8021eb0 8028038: 7020 strb r0, [r4, #0] 802803a: bd38 pop {r3, r4, r5, pc} 802803c: 2000d33d .word 0x2000d33d 8028040: 080399bb .word 0x080399bb 08028044 : /** * @brief Текущий Порт */ void GetRDSPortStr(char *str, uint8_t *len) { 8028044: b538 push {r3, r4, r5, lr} sprintf(str, "%d", sSettings.sRADIUS.port); 8028046: 4b06 ldr r3, [pc, #24] ; (8028060 ) /** * @brief Текущий Порт */ void GetRDSPortStr(char *str, uint8_t *len) { 8028048: 4605 mov r5, r0 802804a: 460c mov r4, r1 sprintf(str, "%d", sSettings.sRADIUS.port); 802804c: f8d3 239c ldr.w r2, [r3, #924] ; 0x39c 8028050: 4904 ldr r1, [pc, #16] ; (8028064 ) 8028052: f7ff fbdf bl 8027814 *len = strlen(str); 8028056: 4628 mov r0, r5 8028058: f7f9 ff2a bl 8021eb0 802805c: 7020 strb r0, [r4, #0] 802805e: bd38 pop {r3, r4, r5, pc} 8028060: 2000cfc4 .word 0x2000cfc4 8028064: 080399a9 .word 0x080399a9 08028068 : /** * @brief Текущий Код access */ void GetRDSKeyAccesstStr(char *str, uint8_t *len) { 8028068: b538 push {r3, r4, r5, lr} sprintf(str, "%d", sSettings.sRADIUS.key_access); 802806a: 4b06 ldr r3, [pc, #24] ; (8028084 ) /** * @brief Текущий Код access */ void GetRDSKeyAccesstStr(char *str, uint8_t *len) { 802806c: 4605 mov r5, r0 802806e: 460c mov r4, r1 sprintf(str, "%d", sSettings.sRADIUS.key_access); 8028070: f8d3 23a0 ldr.w r2, [r3, #928] ; 0x3a0 8028074: 4904 ldr r1, [pc, #16] ; (8028088 ) 8028076: f7ff fbcd bl 8027814 *len = strlen(str); 802807a: 4628 mov r0, r5 802807c: f7f9 ff18 bl 8021eb0 8028080: 7020 strb r0, [r4, #0] 8028082: bd38 pop {r3, r4, r5, pc} 8028084: 2000cfc4 .word 0x2000cfc4 8028088: 080399a9 .word 0x080399a9 0802808c : /** * @brief Текущая пароль RADIUS */ void GetRDSPasswordkStr(char *str, uint8_t *len) { 802808c: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sRADIUS.rds_password); 802808e: 4a05 ldr r2, [pc, #20] ; (80280a4 ) /** * @brief Текущая пароль RADIUS */ void GetRDSPasswordkStr(char *str, uint8_t *len) { 8028090: 4605 mov r5, r0 8028092: 460c mov r4, r1 sprintf(str, "%s", sSettings.sRADIUS.rds_password); 8028094: 4904 ldr r1, [pc, #16] ; (80280a8 ) 8028096: f7ff fbbd bl 8027814 *len = strlen(str); 802809a: 4628 mov r0, r5 802809c: f7f9 ff08 bl 8021eb0 80280a0: 7020 strb r0, [r4, #0] 80280a2: bd38 pop {r3, r4, r5, pc} 80280a4: 2000d34d .word 0x2000d34d 80280a8: 080399bb .word 0x080399bb 080280ac : /** * @brief Настройка вкл/ выкл RADIUS сервера */ void GetRDSEnableStateStr(char *str, uint8_t *len) { if (sSettings.sRADIUS.RDSEnable) 80280ac: 4b05 ldr r3, [pc, #20] ; (80280c4 ) 80280ae: f893 339a ldrb.w r3, [r3, #922] ; 0x39a 80280b2: b10b cbz r3, 80280b8 *str = '1'; 80280b4: 2331 movs r3, #49 ; 0x31 80280b6: e000 b.n 80280ba else *str = '0'; 80280b8: 2330 movs r3, #48 ; 0x30 80280ba: 7003 strb r3, [r0, #0] *len = 1; 80280bc: 2301 movs r3, #1 80280be: 700b strb r3, [r1, #0] 80280c0: 4770 bx lr 80280c2: bf00 nop 80280c4: 2000cfc4 .word 0x2000cfc4 080280c8 : /** * @brief Настройка вкл/ выкл авторизации */ void GetAuthEnableStateStr(char *str, uint8_t *len) { if (sSettings.sRADIUS.Auth_enable) 80280c8: 4b05 ldr r3, [pc, #20] ; (80280e0 ) 80280ca: f893 3378 ldrb.w r3, [r3, #888] ; 0x378 80280ce: b10b cbz r3, 80280d4 *str = '1'; 80280d0: 2331 movs r3, #49 ; 0x31 80280d2: e000 b.n 80280d6 else *str = '0'; 80280d4: 2330 movs r3, #48 ; 0x30 80280d6: 7003 strb r3, [r0, #0] *len = 1; 80280d8: 2301 movs r3, #1 80280da: 700b strb r3, [r1, #0] 80280dc: 4770 bx lr 80280de: bf00 nop 80280e0: 2000cfc4 .word 0x2000cfc4 080280e4 : /** * @brief Вернуть признак изменения сетевых параметров */ void GetWebReinitFlag(char *str, uint8_t *len) { 80280e4: b538 push {r3, r4, r5, lr} if (sSettings.sFlags.netsettingsChanged) 80280e6: 4b08 ldr r3, [pc, #32] ; (8028108 ) 80280e8: f893 3120 ldrb.w r3, [r3, #288] ; 0x120 /** * @brief Вернуть признак изменения сетевых параметров */ void GetWebReinitFlag(char *str, uint8_t *len) { 80280ec: 460c mov r4, r1 80280ee: 4605 mov r5, r0 if (sSettings.sFlags.netsettingsChanged) { sprintf(str, "%s", "true"); 80280f0: 4906 ldr r1, [pc, #24] ; (802810c ) /** * @brief Вернуть признак изменения сетевых параметров */ void GetWebReinitFlag(char *str, uint8_t *len) { if (sSettings.sFlags.netsettingsChanged) 80280f2: b10b cbz r3, 80280f8 { sprintf(str, "%s", "true"); 80280f4: 4a06 ldr r2, [pc, #24] ; (8028110 ) 80280f6: e000 b.n 80280fa *len = strlen(str); } else { sprintf(str, "%s", "false"); 80280f8: 4a06 ldr r2, [pc, #24] ; (8028114 ) 80280fa: f7ff fb8b bl 8027814 *len = strlen(str); 80280fe: 4628 mov r0, r5 8028100: f7f9 fed6 bl 8021eb0 8028104: 7020 strb r0, [r4, #0] 8028106: bd38 pop {r3, r4, r5, pc} 8028108: 2000cfc4 .word 0x2000cfc4 802810c: 080399bb .word 0x080399bb 8028110: 080399e3 .word 0x080399e3 8028114: 080399e8 .word 0x080399e8 08028118 : * @brief Установить признак обновления ПО. */ void SetLoadMode(void) { /* Set loadMode = 1 */ RTC_WriteBackupRegister(RTC_BKP_DR1, 1); 8028118: 2001 movs r0, #1 /** * @brief Установить признак обновления ПО. */ void SetLoadMode(void) { 802811a: b508 push {r3, lr} /* Set loadMode = 1 */ RTC_WriteBackupRegister(RTC_BKP_DR1, 1); 802811c: 4601 mov r1, r0 802811e: f7fd fce7 bl 8025af0 /* Set bootTry = 0 */ RTC_WriteBackupRegister(RTC_BKP_DR2, 0); 8028122: 2002 movs r0, #2 8028124: 2100 movs r1, #0 } 8028126: 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); 802812a: f7fd bce1 b.w 8025af0 802812e: 0000 movs r0, r0 08028130 : /** * @brief Установить признак изменения сетевых параметров */ void SetWebReinitFlag(bool value) { sSettings.sFlags.netsettingsChanged = value; 8028130: 4b01 ldr r3, [pc, #4] ; (8028138 ) 8028132: f883 0120 strb.w r0, [r3, #288] ; 0x120 8028136: 4770 bx lr 8028138: 2000cfc4 .word 0x2000cfc4 0802813c : /** * @brief Установить флаг подтверждения сетевых настроек пользователем */ void SetConfirmWebParamsFlag(void) { fConfirmWebParams = true; 802813c: 4b01 ldr r3, [pc, #4] ; (8028144 ) 802813e: 2201 movs r2, #1 8028140: 701a strb r2, [r3, #0] 8028142: 4770 bx lr 8028144: 20000b18 .word 0x20000b18 08028148 : // Сетевые параметры /** * @brief IP адрес */ void SetIPStr(char *str) { 8028148: 4601 mov r1, r0 //strcpy(sSettings.sWebParams.ip, str); strcpy(sSettings.sWebTempParams.ip, str); 802814a: 4801 ldr r0, [pc, #4] ; (8028150 ) 802814c: f7f9 be52 b.w 8021df4 8028150: 2000cff7 .word 0x2000cff7 08028154 : /** * @brief Шлюз */ void SetGatewayStr(char *str) { 8028154: 4601 mov r1, r0 //strcpy(sSettings.sWebParams.gate, str); strcpy(sSettings.sWebTempParams.gate, str); 8028156: 4801 ldr r0, [pc, #4] ; (802815c ) 8028158: f7f9 be4c b.w 8021df4 802815c: 2000d007 .word 0x2000d007 08028160 : /** * @brief Текущая маска подсети */ void SetMaskStr(char *str) { 8028160: 4601 mov r1, r0 //strcpy(sSettings.sWebParams.mask, str); strcpy(sSettings.sWebTempParams.mask, str); 8028162: 4801 ldr r0, [pc, #4] ; (8028168 ) 8028164: f7f9 be46 b.w 8021df4 8028168: 2000d017 .word 0x2000d017 0802816c : /** * @brief Настройка DHCP */ void SetDhcpStateStr(char *str) { 802816c: b508 push {r3, lr} if (strncmp(str, "on", 2) == 0) 802816e: 4906 ldr r1, [pc, #24] ; (8028188 ) 8028170: 2202 movs r2, #2 8028172: f7f9 feff bl 8021f74 8028176: 4b05 ldr r3, [pc, #20] ; (802818c ) 8028178: b908 cbnz r0, 802817e //sSettings.sWebParams.dhcpEnable = 1; sSettings.sWebTempParams.dhcpEnable = 1; 802817a: 2201 movs r2, #1 802817c: e000 b.n 8028180 else //sSettings.sWebParams.dhcpEnable = 0; sSettings.sWebTempParams.dhcpEnable = 0; 802817e: 2200 movs r2, #0 8028180: f883 2063 strb.w r2, [r3, #99] ; 0x63 8028184: bd08 pop {r3, pc} 8028186: bf00 nop 8028188: 080399ee .word 0x080399ee 802818c: 2000cfc4 .word 0x2000cfc4 08028190 : /** * @brief Настройка DHCP */ void SetUDPDhcpStateStr(char *str) { 8028190: b510 push {r4, lr} if (strncmp(str, "True", 4) == 0) 8028192: 490a ldr r1, [pc, #40] ; (80281bc ) 8028194: 2204 movs r2, #4 /** * @brief Настройка DHCP */ void SetUDPDhcpStateStr(char *str) { 8028196: 4604 mov r4, r0 if (strncmp(str, "True", 4) == 0) 8028198: f7f9 feec bl 8021f74 802819c: b920 cbnz r0, 80281a8 sSettings.sWebTempParams.dhcpEnable = 1; 802819e: 4b08 ldr r3, [pc, #32] ; (80281c0 ) 80281a0: 2201 movs r2, #1 80281a2: f883 2063 strb.w r2, [r3, #99] ; 0x63 80281a6: bd10 pop {r4, pc} else if (strncmp(str, "False", 5) == 0) 80281a8: 4620 mov r0, r4 80281aa: 4906 ldr r1, [pc, #24] ; (80281c4 ) 80281ac: 2205 movs r2, #5 80281ae: f7f9 fee1 bl 8021f74 80281b2: b910 cbnz r0, 80281ba sSettings.sWebTempParams.dhcpEnable = 0; 80281b4: 4b02 ldr r3, [pc, #8] ; (80281c0 ) 80281b6: f883 0063 strb.w r0, [r3, #99] ; 0x63 80281ba: bd10 pop {r4, pc} 80281bc: 08040e43 .word 0x08040e43 80281c0: 2000cfc4 .word 0x2000cfc4 80281c4: 080399dd .word 0x080399dd 080281c8 : /** * @brief Community для чтения */ void SetReadCommunity(char *str) { 80281c8: 4601 mov r1, r0 strcpy(sSettings.sSnmp.readCommunity, str); 80281ca: 4801 ldr r0, [pc, #4] ; (80281d0 ) 80281cc: f7f9 be12 b.w 8021df4 80281d0: 2000d195 .word 0x2000d195 080281d4 : /** * @brief Community для записи */ void SetWriteCommunity(char *str) { 80281d4: 4601 mov r1, r0 strcpy(sSettings.sSnmp.writeCommunity, str); 80281d6: 4801 ldr r0, [pc, #4] ; (80281dc ) 80281d8: f7f9 be0c b.w 8021df4 80281dc: 2000d1a9 .word 0x2000d1a9 080281e0 : /** * @brief IP SNMP менеджера */ void SetManagerIp(char *str) { 80281e0: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP, str); 80281e2: 4c05 ldr r4, [pc, #20] ; (80281f8 ) /** * @brief IP SNMP менеджера */ void SetManagerIp(char *str) { 80281e4: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP, str); 80281e6: 4620 mov r0, r4 80281e8: f7f9 fe04 bl 8021df4 SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 80281ec: 4620 mov r0, r4 } 80281ee: e8bd 4010 ldmia.w sp!, {r4, lr} * @brief IP SNMP менеджера */ void SetManagerIp(char *str) { strcpy(sSettings.sSnmp.managerIP, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 80281f2: f010 b837 b.w 8038264 80281f6: bf00 nop 80281f8: 2000d271 .word 0x2000d271 080281fc : } void SetManagerIp2(char *str) { 80281fc: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP2, str); 80281fe: 4c05 ldr r4, [pc, #20] ; (8028214 ) strcpy(sSettings.sSnmp.managerIP, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP); } void SetManagerIp2(char *str) { 8028200: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP2, str); 8028202: 4620 mov r0, r4 8028204: f7f9 fdf6 bl 8021df4 SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); 8028208: 4620 mov r0, r4 } 802820a: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp2(char *str) { strcpy(sSettings.sSnmp.managerIP2, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); 802820e: f010 b829 b.w 8038264 8028212: bf00 nop 8028214: 2000d285 .word 0x2000d285 08028218 : } void SetManagerIp3(char *str) { 8028218: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP3, str); 802821a: 4c05 ldr r4, [pc, #20] ; (8028230 ) strcpy(sSettings.sSnmp.managerIP2, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); } void SetManagerIp3(char *str) { 802821c: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP3, str); 802821e: 4620 mov r0, r4 8028220: f7f9 fde8 bl 8021df4 SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); 8028224: 4620 mov r0, r4 } 8028226: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp3(char *str) { strcpy(sSettings.sSnmp.managerIP3, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); 802822a: f010 b81b b.w 8038264 802822e: bf00 nop 8028230: 2000d299 .word 0x2000d299 08028234 : } void SetManagerIp4(char *str) { 8028234: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP4, str); 8028236: 4c05 ldr r4, [pc, #20] ; (802824c ) strcpy(sSettings.sSnmp.managerIP3, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); } void SetManagerIp4(char *str) { 8028238: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP4, str); 802823a: 4620 mov r0, r4 802823c: f7f9 fdda bl 8021df4 SNMP_SetManagerIP(sSettings.sSnmp.managerIP4); 8028240: 4620 mov r0, r4 } 8028242: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp4(char *str) { strcpy(sSettings.sSnmp.managerIP4, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP4); 8028246: f010 b80d b.w 8038264 802824a: bf00 nop 802824c: 2000d2ad .word 0x2000d2ad 08028250 : } void SetManagerIp5(char *str) { 8028250: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP5, str); 8028252: 4c05 ldr r4, [pc, #20] ; (8028268 ) strcpy(sSettings.sSnmp.managerIP4, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP4); } void SetManagerIp5(char *str) { 8028254: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP5, str); 8028256: 4620 mov r0, r4 8028258: f7f9 fdcc bl 8021df4 SNMP_SetManagerIP(sSettings.sSnmp.managerIP5); 802825c: 4620 mov r0, r4 } 802825e: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp5(char *str) { strcpy(sSettings.sSnmp.managerIP5, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP5); 8028262: f00f bfff b.w 8038264 8028266: bf00 nop 8028268: 2000d2c1 .word 0x2000d2c1 0802826c : /** * @brief Установить владельца */ void SetOwner(char *str) { 802826c: b510 push {r4, lr} strcpy(sSettings.sSnmp.sysContact, str); 802826e: 4c06 ldr r4, [pc, #24] ; (8028288 ) /** * @brief Установить владельца */ void SetOwner(char *str) { 8028270: 4601 mov r1, r0 strcpy(sSettings.sSnmp.sysContact, str); 8028272: 4620 mov r0, r4 8028274: f7f9 fdbe bl 8021df4 SNMP_SetSysContact(sSettings.sSnmp.sysContact); 8028278: 4620 mov r0, r4 802827a: f00f ffc9 bl 8038210 SNMP_SetObjDescr(); } 802827e: e8bd 4010 ldmia.w sp!, {r4, lr} */ void SetOwner(char *str) { strcpy(sSettings.sSnmp.sysContact, str); SNMP_SetSysContact(sSettings.sSnmp.sysContact); SNMP_SetObjDescr(); 8028282: f00f bf7b b.w 803817c 8028286: bf00 nop 8028288: 2000d1bd .word 0x2000d1bd 0802828c : /** * @brief Установить местоположение */ void SetLocation(char *str) { 802828c: b510 push {r4, lr} strcpy(sSettings.sSnmp.sysLocation, str); 802828e: 4c05 ldr r4, [pc, #20] ; (80282a4 ) /** * @brief Установить местоположение */ void SetLocation(char *str) { 8028290: 4601 mov r1, r0 strcpy(sSettings.sSnmp.sysLocation, str); 8028292: 4620 mov r0, r4 8028294: f7f9 fdae bl 8021df4 SNMP_SetSysLocation(sSettings.sSnmp.sysLocation); 8028298: 4620 mov r0, r4 } 802829a: e8bd 4010 ldmia.w sp!, {r4, lr} * @brief Установить местоположение */ void SetLocation(char *str) { strcpy(sSettings.sSnmp.sysLocation, str); SNMP_SetSysLocation(sSettings.sSnmp.sysLocation); 802829e: f00f bfd3 b.w 8038248 80282a2: bf00 nop 80282a4: 2000d203 .word 0x2000d203 080282a8 : /** * @brief Установить комментарий */ void SetComment(char *str) { 80282a8: 4601 mov r1, r0 strcpy(sSettings.sInfo.comments, str); 80282aa: 4801 ldr r0, [pc, #4] ; (80282b0 ) 80282ac: f7f9 bda2 b.w 8021df4 80282b0: 2000d072 .word 0x2000d072 080282b4 : // Сетевые параметры RADIUS сервера /** * @brief IP адрес */ void SetRDSIpStr(char *str) { 80282b4: 4601 mov r1, r0 strcpy(sSettings.sRADIUS.ServerIP, str); 80282b6: 4801 ldr r0, [pc, #4] ; (80282bc ) 80282b8: f7f9 bd9c b.w 8021df4 80282bc: 2000d33d .word 0x2000d33d 080282c0 : /** * @brief Порт */ void SetRDSPortStr(char *str) { 80282c0: b508 push {r3, lr} sSettings.sRADIUS.port = atoi(str); 80282c2: f7f9 fafd bl 80218c0 80282c6: 4b02 ldr r3, [pc, #8] ; (80282d0 ) 80282c8: f8c3 039c str.w r0, [r3, #924] ; 0x39c 80282cc: bd08 pop {r3, pc} 80282ce: bf00 nop 80282d0: 2000cfc4 .word 0x2000cfc4 080282d4 : /** * @brief Код access */ void SetRDSKeyAccesstStr(char *str) { 80282d4: b508 push {r3, lr} sSettings.sRADIUS.key_access = atoi(str); 80282d6: f7f9 faf3 bl 80218c0 80282da: 4b02 ldr r3, [pc, #8] ; (80282e4 ) 80282dc: f8c3 03a0 str.w r0, [r3, #928] ; 0x3a0 80282e0: bd08 pop {r3, pc} 80282e2: bf00 nop 80282e4: 2000cfc4 .word 0x2000cfc4 080282e8 : /** * @brief пароль RADIUS */ void SetRDSPasswordkStr(char *str) { 80282e8: 4601 mov r1, r0 strcpy(sSettings.sRADIUS.rds_password, str); 80282ea: 4801 ldr r0, [pc, #4] ; (80282f0 ) 80282ec: f7f9 bd82 b.w 8021df4 80282f0: 2000d34d .word 0x2000d34d 080282f4 : /** * @brief Настройка вкл/ выкл RADIUS сервера */ void SetRDSEnableStateStr(char *str) { 80282f4: b508 push {r3, lr} if (strncmp(str, "on", 2) == 0) 80282f6: 4906 ldr r1, [pc, #24] ; (8028310 ) 80282f8: 2202 movs r2, #2 80282fa: f7f9 fe3b bl 8021f74 80282fe: 4b05 ldr r3, [pc, #20] ; (8028314 ) 8028300: b908 cbnz r0, 8028306 sSettings.sRADIUS.RDSEnable = 1; 8028302: 2201 movs r2, #1 8028304: e000 b.n 8028308 else sSettings.sRADIUS.RDSEnable = 0; 8028306: 2200 movs r2, #0 8028308: f883 239a strb.w r2, [r3, #922] ; 0x39a 802830c: bd08 pop {r3, pc} 802830e: bf00 nop 8028310: 080399ee .word 0x080399ee 8028314: 2000cfc4 .word 0x2000cfc4 08028318 : /** * @brief Настройка вкл/ выкл авторизации */ void SetAuthEnableStateStr(char *str) { 8028318: b508 push {r3, lr} if (strncmp(str, "on", 2) == 0) 802831a: 4906 ldr r1, [pc, #24] ; (8028334 ) 802831c: 2202 movs r2, #2 802831e: f7f9 fe29 bl 8021f74 8028322: 4b05 ldr r3, [pc, #20] ; (8028338 ) 8028324: b908 cbnz r0, 802832a sSettings.sRADIUS.Auth_enable = 1; 8028326: 2201 movs r2, #1 8028328: e000 b.n 802832c else sSettings.sRADIUS.Auth_enable = 0; 802832a: 2200 movs r2, #0 802832c: f883 2378 strb.w r2, [r3, #888] ; 0x378 8028330: bd08 pop {r3, pc} 8028332: bf00 nop 8028334: 080399ee .word 0x080399ee 8028338: 2000cfc4 .word 0x2000cfc4 0802833c : /** * @brief Дата */ void SetDateStr(char *str) { 802833c: b510 push {r4, lr} 802833e: b08c sub sp, #48 ; 0x30 8028340: 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); 8028342: 2100 movs r1, #0 8028344: 2212 movs r2, #18 8028346: a807 add r0, sp, #28 8028348: f7f9 fbda bl 8021b00 memset(str_time, 0, 9); 802834c: 2100 movs r1, #0 802834e: 2209 movs r2, #9 8028350: 4668 mov r0, sp 8028352: f7f9 fbd5 bl 8021b00 str += 2; strncpy(str_data, (str + 6), 2); 8028356: f104 0108 add.w r1, r4, #8 802835a: 2202 movs r2, #2 802835c: a807 add r0, sp, #28 802835e: f7f9 fe5f bl 8022020 strncat(str_data, (str + 2), 4); 8028362: 1d21 adds r1, r4, #4 8028364: 2204 movs r2, #4 8028366: a807 add r0, sp, #28 8028368: f7f9 fdd2 bl 8021f10 strncat(str_data, str, 2); 802836c: 2202 movs r2, #2 802836e: 1ca1 adds r1, r4, #2 8028370: a807 add r0, sp, #28 8028372: f7f9 fdcd bl 8021f10 TM_RTC_GetDateTime(&tmp_data, TM_RTC_Format_BIN); 8028376: a803 add r0, sp, #12 8028378: 2100 movs r1, #0 802837a: f7fe f885 bl 8026488 sprintf(str_time, "-01-%02i:%02i", tmp_data.hours, tmp_data.minutes); 802837e: f89d 2011 ldrb.w r2, [sp, #17] 8028382: f89d 3010 ldrb.w r3, [sp, #16] 8028386: 4908 ldr r1, [pc, #32] ; (80283a8 ) 8028388: 4668 mov r0, sp 802838a: f7ff fa43 bl 8027814 len = strlen(str_time); 802838e: 4668 mov r0, sp 8028390: f7f9 fd8e bl 8021eb0 strncat(str_data, str_time, len); 8028394: 4669 mov r1, sp 8028396: b2c2 uxtb r2, r0 8028398: a807 add r0, sp, #28 802839a: f7f9 fdb9 bl 8021f10 TM_RTC_SetDateTimeString(&str_data); 802839e: a807 add r0, sp, #28 80283a0: f7fd ff58 bl 8026254 } 80283a4: b00c add sp, #48 ; 0x30 80283a6: bd10 pop {r4, pc} 80283a8: 080399f1 .word 0x080399f1 080283ac : /** * @brief Время */ void SetTimeStr(char *str) { 80283ac: b510 push {r4, lr} 80283ae: b090 sub sp, #64 ; 0x40 80283b0: 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); 80283b2: 2100 movs r1, #0 80283b4: 2212 movs r2, #18 80283b6: a80b add r0, sp, #44 ; 0x2c 80283b8: f7f9 fba2 bl 8021b00 memset(str_date, 0, 14); 80283bc: 220e movs r2, #14 80283be: 2100 movs r1, #0 80283c0: a803 add r0, sp, #12 80283c2: f7f9 fb9d bl 8021b00 TM_RTC_GetDateTime(&tmp_data, TM_RTC_Format_BIN); 80283c6: a807 add r0, sp, #28 80283c8: 2100 movs r1, #0 80283ca: f7fe f85d bl 8026488 sprintf(str_date, "%02i-%02i-%02i-01-", tmp_data.date, tmp_data.month, tmp_data.year); 80283ce: f89d 1025 ldrb.w r1, [sp, #37] ; 0x25 80283d2: f89d 3024 ldrb.w r3, [sp, #36] ; 0x24 80283d6: f89d 2023 ldrb.w r2, [sp, #35] ; 0x23 80283da: 9100 str r1, [sp, #0] 80283dc: a803 add r0, sp, #12 80283de: 490a ldr r1, [pc, #40] ; (8028408 ) 80283e0: f7ff fa18 bl 8027814 len = strlen(str_date); 80283e4: a803 add r0, sp, #12 80283e6: f7f9 fd63 bl 8021eb0 strncat(str_data, str_date, len); 80283ea: a903 add r1, sp, #12 80283ec: b2c2 uxtb r2, r0 80283ee: a80b add r0, sp, #44 ; 0x2c 80283f0: f7f9 fd8e bl 8021f10 strncat(str_data, str, 5); 80283f4: a80b add r0, sp, #44 ; 0x2c 80283f6: 4621 mov r1, r4 80283f8: 2205 movs r2, #5 80283fa: f7f9 fd89 bl 8021f10 TM_RTC_SetDateTimeString(&str_data); 80283fe: a80b add r0, sp, #44 ; 0x2c 8028400: f7fd ff28 bl 8026254 } 8028404: b010 add sp, #64 ; 0x40 8028406: bd10 pop {r4, pc} 8028408: 080399ff .word 0x080399ff 0802840c : /** * @brief Состояние SNTP */ void SetSntpStateStr(char *str) { 802840c: b538 push {r3, r4, r5, lr} bool old_sntpEnable = sSettings.sSNTP.sntpEnable; 802840e: 4c0d ldr r4, [pc, #52] ; (8028444 ) if (strncmp(str, "1", 1) == 0){ 8028410: 490d ldr r1, [pc, #52] ; (8028448 ) /** * @brief Состояние SNTP */ void SetSntpStateStr(char *str) { bool old_sntpEnable = sSettings.sSNTP.sntpEnable; 8028412: f894 5340 ldrb.w r5, [r4, #832] ; 0x340 if (strncmp(str, "1", 1) == 0){ 8028416: 2201 movs r2, #1 8028418: f7f9 fdac bl 8021f74 802841c: b948 cbnz r0, 8028432 sSettings.sSNTP.sntpEnable = true; 802841e: 2001 movs r0, #1 8028420: f884 0340 strb.w r0, [r4, #832] ; 0x340 if(old_sntpEnable != sSettings.sSNTP.sntpEnable){ 8028424: b965 cbnz r5, 8028440 SNTP_Enable(sSettings.sSNTP.sntpEnable); 8028426: f010 f81b bl 8038460 } else{ sSettings.sSNTP.sntpEnable = false; SNTP_Enable(sSettings.sSNTP.sntpEnable); } } 802842a: 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(); 802842e: f010 b859 b.w 80384e4 } } else{ sSettings.sSNTP.sntpEnable = false; 8028432: 2000 movs r0, #0 8028434: f884 0340 strb.w r0, [r4, #832] ; 0x340 SNTP_Enable(sSettings.sSNTP.sntpEnable); } } 8028438: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} SNTP_Poll(); } } else{ sSettings.sSNTP.sntpEnable = false; SNTP_Enable(sSettings.sSNTP.sntpEnable); 802843c: f010 b810 b.w 8038460 8028440: bd38 pop {r3, r4, r5, pc} 8028442: bf00 nop 8028444: 2000cfc4 .word 0x2000cfc4 8028448: 08039cb4 .word 0x08039cb4 0802844c : /** * @brief IP адрес SNTP сервера */ void SetSntpServerIpStr(char *str) { 802844c: 4601 mov r1, r0 strcpy(sSettings.sSNTP.ip, str); 802844e: 4801 ldr r0, [pc, #4] ; (8028454 ) 8028450: f7f9 bcd0 b.w 8021df4 8028454: 2000d305 .word 0x2000d305 08028458 : /** * @brief Часовой пояс контроллера */ void SetSntpTimeZoneStr(char *str) { 8028458: b570 push {r4, r5, r6, lr} float newUtc; newUtc = atof(str); 802845a: f7f9 fa2d bl 80218b8 802845e: f7f8 fb91 bl 8020b84 <__aeabi_d2f> if (sSettings.sSNTP.timeZone > 0) 8028462: 4b27 ldr r3, [pc, #156] ; (8028500 ) 8028464: f8d3 4370 ldr.w r4, [r3, #880] ; 0x370 */ void SetSntpTimeZoneStr(char *str) { float newUtc; newUtc = atof(str); 8028468: 4606 mov r6, r0 if (sSettings.sSNTP.timeZone > 0) 802846a: 2100 movs r1, #0 802846c: 4620 mov r0, r4 802846e: f7f8 fd53 bl 8020f18 <__aeabi_fcmpgt> 8028472: b100 cbz r0, 8028476 8028474: e033 b.n 80284de { TM_RTC_Correction(newUtc - sSettings.sSNTP.timeZone); } } else if (sSettings.sSNTP.timeZone < 0) 8028476: 4620 mov r0, r4 8028478: 2100 movs r1, #0 802847a: f7f8 fd2f bl 8020edc <__aeabi_fcmplt> 802847e: 2800 cmp r0, #0 8028480: d032 beq.n 80284e8 { if (newUtc >= 0) 8028482: 4630 mov r0, r6 8028484: 2100 movs r1, #0 8028486: f7f8 fd3d bl 8020f04 <__aeabi_fcmpge> 802848a: b170 cbz r0, 80284aa { TM_RTC_Correction(newUtc + fabs(sSettings.sSNTP.timeZone)); 802848c: 4620 mov r0, r4 802848e: f7f8 f843 bl 8020518 <__aeabi_f2d> 8028492: f7fc fef7 bl 8025284 8028496: 4604 mov r4, r0 8028498: 460d mov r5, r1 802849a: 4630 mov r0, r6 802849c: f7f8 f83c bl 8020518 <__aeabi_f2d> 80284a0: 4622 mov r2, r4 80284a2: 462b mov r3, r5 80284a4: f7f7 feda bl 802025c <__adddf3> 80284a8: e016 b.n 80284d8 } else { if (newUtc >= sSettings.sSNTP.timeZone) 80284aa: 4630 mov r0, r6 80284ac: 4621 mov r1, r4 80284ae: f7f8 fd29 bl 8020f04 <__aeabi_fcmpge> 80284b2: b1a0 cbz r0, 80284de TM_RTC_Correction(fabs(sSettings.sSNTP.timeZone) - fabs(newUtc)); 80284b4: 4620 mov r0, r4 80284b6: f7f8 f82f bl 8020518 <__aeabi_f2d> 80284ba: f7fc fee3 bl 8025284 80284be: 4604 mov r4, r0 80284c0: 4630 mov r0, r6 80284c2: 460d mov r5, r1 80284c4: f7f8 f828 bl 8020518 <__aeabi_f2d> 80284c8: f7fc fedc bl 8025284 80284cc: 4602 mov r2, r0 80284ce: 460b mov r3, r1 80284d0: 4620 mov r0, r4 80284d2: 4629 mov r1, r5 80284d4: f7f7 fec0 bl 8020258 <__aeabi_dsub> 80284d8: f7f8 fb54 bl 8020b84 <__aeabi_d2f> 80284dc: e00a b.n 80284f4 else TM_RTC_Correction(newUtc - sSettings.sSNTP.timeZone); 80284de: 4630 mov r0, r6 80284e0: 4621 mov r1, r4 80284e2: f7f8 fba3 bl 8020c2c <__aeabi_fsub> 80284e6: e005 b.n 80284f4 } } else if (sSettings.sSNTP.timeZone == 0) 80284e8: 4620 mov r0, r4 80284ea: 2100 movs r1, #0 80284ec: f7f8 fcec bl 8020ec8 <__aeabi_fcmpeq> 80284f0: b110 cbz r0, 80284f8 { TM_RTC_Correction(newUtc); 80284f2: 4630 mov r0, r6 80284f4: f7fe f8c4 bl 8026680 } sSettings.sSNTP.timeZone = newUtc; // atof(str); 80284f8: 4b01 ldr r3, [pc, #4] ; (8028500 ) 80284fa: f8c3 6370 str.w r6, [r3, #880] ; 0x370 80284fe: bd70 pop {r4, r5, r6, pc} 8028500: 2000cfc4 .word 0x2000cfc4 08028504 : /** * @brief Тип действий при срабатывание сухих контактов */ void SetDINTypeActStr(char *str, uint8_t num) { 8028504: b510 push {r4, lr} 8028506: 460c mov r4, r1 sSettings.sInOuts.din_type_act[num] = atoi(str); 8028508: f7f9 f9da bl 80218c0 802850c: 4902 ldr r1, [pc, #8] ; (8028518 ) 802850e: 1909 adds r1, r1, r4 8028510: f881 0376 strb.w r0, [r1, #886] ; 0x376 8028514: bd10 pop {r4, pc} 8028516: bf00 nop 8028518: 2000cfc4 .word 0x2000cfc4 0802851c : /** * @brief */ void SetROStr(char *str, uint8_t num) { 802851c: b510 push {r4, lr} 802851e: 460c mov r4, r1 set_state_douts((DOUT1+num), atoi(str)); 8028520: f7f9 f9ce bl 80218c0 8028524: 1de3 adds r3, r4, #7 8028526: b2c1 uxtb r1, r0 8028528: b2d8 uxtb r0, r3 } 802852a: e8bd 4010 ldmia.w sp!, {r4, lr} /** * @brief */ void SetROStr(char *str, uint8_t num) { set_state_douts((DOUT1+num), atoi(str)); 802852e: f000 bb35 b.w 8028b9c 08028532 : /** * @brief */ void SetROInt(uint8_t val, uint8_t num) { 8028532: 4603 mov r3, r0 set_state_douts((DOUT1+num), val); 8028534: 3107 adds r1, #7 8028536: b2c8 uxtb r0, r1 8028538: 4619 mov r1, r3 802853a: f000 bb2f b.w 8028b9c 802853e: 0000 movs r0, r0 08028540 : /** * @brief Источник срабатывания реле */ void SetROTypeActStr(char *str, uint8_t num) { 8028540: b510 push {r4, lr} 8028542: 460c mov r4, r1 sSettings.sInOuts.ro_type_source[num] = atoi(str); 8028544: f7f9 f9bc bl 80218c0 8028548: 4b04 ldr r3, [pc, #16] ; (802855c ) 802854a: 191b adds r3, r3, r4 SetROInt(0, num); 802854c: 4621 mov r1, r4 /** * @brief Источник срабатывания реле */ void SetROTypeActStr(char *str, uint8_t num) { sSettings.sInOuts.ro_type_source[num] = atoi(str); 802854e: f883 0374 strb.w r0, [r3, #884] ; 0x374 SetROInt(0, num); 8028552: 2000 movs r0, #0 } 8028554: 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); 8028558: f7ff bfeb b.w 8028532 802855c: 2000cfc4 .word 0x2000cfc4 08028560 : /** * @brief Установить параметры обновления ПО по умолчанию */ void SETTINGS_SetBootParamsDef(void) { sSettings.bootParams.loadMode = 0; 8028560: 4b02 ldr r3, [pc, #8] ; (802856c ) 8028562: 2200 movs r2, #0 8028564: 701a strb r2, [r3, #0] sSettings.bootParams.bootTry = 0; 8028566: 705a strb r2, [r3, #1] 8028568: 4770 bx lr 802856a: bf00 nop 802856c: 2000cfc4 .word 0x2000cfc4 08028570 : /** * @brief Установить параметры сетевого подключения по умолчанию */ void SETTINGS_SetWebParamsDef(void) { 8028570: b510 push {r4, lr} strcpy(sSettings.sWebParams.ip, "192.168.1.2"); 8028572: 4c09 ldr r4, [pc, #36] ; (8028598 ) 8028574: 4909 ldr r1, [pc, #36] ; (802859c ) 8028576: 4620 mov r0, r4 8028578: f7f9 fc3c bl 8021df4 strcpy(sSettings.sWebParams.gate, "192.168.1.1"); 802857c: 4908 ldr r1, [pc, #32] ; (80285a0 ) 802857e: f104 0010 add.w r0, r4, #16 8028582: f7f9 fc37 bl 8021df4 strcpy(sSettings.sWebParams.mask, "255.255.255.0"); 8028586: f104 0020 add.w r0, r4, #32 802858a: 4906 ldr r1, [pc, #24] ; (80285a4 ) 802858c: f7f9 fc32 bl 8021df4 sSettings.sWebParams.dhcpEnable = 1; 8028590: 2201 movs r2, #1 8028592: f884 2030 strb.w r2, [r4, #48] ; 0x30 8028596: bd10 pop {r4, pc} 8028598: 2000cfc6 .word 0x2000cfc6 802859c: 08039a12 .word 0x08039a12 80285a0: 08039a1e .word 0x08039a1e 80285a4: 08039a2a .word 0x08039a2a 080285a8 : /** * @brief Установить временные параметры сетевого подключения по умолчанию */ void SETTINGS_SetTempWebParamsDef(void) { 80285a8: b510 push {r4, lr} strcpy(sSettings.sWebParams.ip, "192.168.1.2"); 80285aa: 4c09 ldr r4, [pc, #36] ; (80285d0 ) 80285ac: 4909 ldr r1, [pc, #36] ; (80285d4 ) 80285ae: 4620 mov r0, r4 80285b0: f7f9 fc20 bl 8021df4 strcpy(sSettings.sWebParams.gate, "192.168.1.1"); 80285b4: 4908 ldr r1, [pc, #32] ; (80285d8 ) 80285b6: f104 0010 add.w r0, r4, #16 80285ba: f7f9 fc1b bl 8021df4 strcpy(sSettings.sWebParams.mask, "255.255.255.0"); 80285be: f104 0020 add.w r0, r4, #32 80285c2: 4906 ldr r1, [pc, #24] ; (80285dc ) 80285c4: f7f9 fc16 bl 8021df4 sSettings.sWebParams.dhcpEnable = 1; 80285c8: 2201 movs r2, #1 80285ca: f884 2030 strb.w r2, [r4, #48] ; 0x30 80285ce: bd10 pop {r4, pc} 80285d0: 2000cfc6 .word 0x2000cfc6 80285d4: 08039a12 .word 0x08039a12 80285d8: 08039a1e .word 0x08039a1e 80285dc: 08039a2a .word 0x08039a2a 080285e0 : /** * @brief Установить параметры SNMP по умолчанию */ void SETTINGS_SetSnmpDef(void) { 80285e0: b570 push {r4, r5, r6, lr} strcpy(sSettings.sSnmp.sysDescr, ""); 80285e2: 4c1e ldr r4, [pc, #120] ; (802865c ) 80285e4: 4d1e ldr r5, [pc, #120] ; (8028660 ) strcpy(sSettings.sSnmp.readCommunity, "public"); 80285e6: 4e1f ldr r6, [pc, #124] ; (8028664 ) /** * @brief Установить параметры SNMP по умолчанию */ void SETTINGS_SetSnmpDef(void) { strcpy(sSettings.sSnmp.sysDescr, ""); 80285e8: 4629 mov r1, r5 80285ea: 4620 mov r0, r4 80285ec: f7f9 fc02 bl 8021df4 strcpy(sSettings.sSnmp.readCommunity, "public"); 80285f0: 4631 mov r1, r6 80285f2: f104 00a0 add.w r0, r4, #160 ; 0xa0 80285f6: f7f9 fbfd bl 8021df4 strcpy(sSettings.sSnmp.writeCommunity, "public"); 80285fa: 4631 mov r1, r6 80285fc: f104 00b4 add.w r0, r4, #180 ; 0xb4 8028600: f7f9 fbf8 bl 8021df4 strcpy(sSettings.sSnmp.sysContact, ""); 8028604: 4629 mov r1, r5 8028606: f104 00c8 add.w r0, r4, #200 ; 0xc8 802860a: f7f9 fbf3 bl 8021df4 strcpy(sSettings.sSnmp.sysName, SERIAL); 802860e: f104 00fa add.w r0, r4, #250 ; 0xfa 8028612: 4915 ldr r1, [pc, #84] ; (8028668 ) 8028614: f7f9 fbee bl 8021df4 strcpy(sSettings.sSnmp.sysLocation, ""); 8028618: 4629 mov r1, r5 strcpy(sSettings.sSnmp.managerIP, "0.0.0.0"); 802861a: 4d14 ldr r5, [pc, #80] ; (802866c ) strcpy(sSettings.sSnmp.sysDescr, ""); strcpy(sSettings.sSnmp.readCommunity, "public"); strcpy(sSettings.sSnmp.writeCommunity, "public"); strcpy(sSettings.sSnmp.sysContact, ""); strcpy(sSettings.sSnmp.sysName, SERIAL); strcpy(sSettings.sSnmp.sysLocation, ""); 802861c: f504 7087 add.w r0, r4, #270 ; 0x10e 8028620: f7f9 fbe8 bl 8021df4 strcpy(sSettings.sSnmp.managerIP, "0.0.0.0"); 8028624: 4629 mov r1, r5 8028626: f504 70be add.w r0, r4, #380 ; 0x17c 802862a: f7f9 fbe3 bl 8021df4 strcpy(sSettings.sSnmp.managerIP2, "0.0.0.0"); 802862e: 4629 mov r1, r5 8028630: f504 70c8 add.w r0, r4, #400 ; 0x190 8028634: f7f9 fbde bl 8021df4 strcpy(sSettings.sSnmp.managerIP3, "0.0.0.0"); 8028638: 4629 mov r1, r5 802863a: f504 70d2 add.w r0, r4, #420 ; 0x1a4 802863e: f7f9 fbd9 bl 8021df4 strcpy(sSettings.sSnmp.managerIP4, "0.0.0.0"); 8028642: 4629 mov r1, r5 8028644: f504 70dc add.w r0, r4, #440 ; 0x1b8 8028648: f7f9 fbd4 bl 8021df4 strcpy(sSettings.sSnmp.managerIP5, "0.0.0.0"); 802864c: f504 70e6 add.w r0, r4, #460 ; 0x1cc 8028650: 4629 mov r1, r5 } 8028652: 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"); 8028656: f7f9 bbcd b.w 8021df4 802865a: bf00 nop 802865c: 2000d0f5 .word 0x2000d0f5 8028660: 08041134 .word 0x08041134 8028664: 08039a38 .word 0x08039a38 8028668: 08039a3f .word 0x08039a3f 802866c: 08039a4b .word 0x08039a4b 08028670 : /** * @brief Установить Информацию об устройстве по умолчанию */ void SETTINGS_SetInfoDef(void) { 8028670: b510 push {r4, lr} strcpy(sSettings.sInfo.productionData, "09.10.2015"); 8028672: 4c0b ldr r4, [pc, #44] ; (80286a0 ) 8028674: 490b ldr r1, [pc, #44] ; (80286a4 ) 8028676: 4620 mov r0, r4 8028678: f7f9 fbbc bl 8021df4 strcpy(sSettings.sInfo.mac, DEVICE_MAC); 802867c: f104 0028 add.w r0, r4, #40 ; 0x28 8028680: 4909 ldr r1, [pc, #36] ; (80286a8 ) 8028682: f7f9 fbb7 bl 8021df4 strcpy(sSettings.sInfo.serialNumber, SERIAL); 8028686: f104 003a add.w r0, r4, #58 ; 0x3a 802868a: 4908 ldr r1, [pc, #32] ; (80286ac ) 802868c: f7f9 fbb2 bl 8021df4 strcpy(sSettings.sInfo.comments, ""); 8028690: 4907 ldr r1, [pc, #28] ; (80286b0 ) 8028692: f104 004a add.w r0, r4, #74 ; 0x4a } 8028696: 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, SERIAL); strcpy(sSettings.sInfo.comments, ""); 802869a: f7f9 bbab b.w 8021df4 802869e: bf00 nop 80286a0: 2000d028 .word 0x2000d028 80286a4: 08039a53 .word 0x08039a53 80286a8: 08039a5e .word 0x08039a5e 80286ac: 08039a3f .word 0x08039a3f 80286b0: 08041134 .word 0x08041134 080286b4 : /** * @brief Установить значение сервисных настроек по умолчанию */ void SETTINGS_SetServiceDef(void) { 80286b4: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 80286b8: 4d14 ldr r5, [pc, #80] ; (802870c ) 80286ba: 2400 movs r4, #0 } /** * @brief Установить значение сервисных настроек по умолчанию */ void SETTINGS_SetServiceDef(void) 80286bc: 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; 80286be: 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) { 80286c2: f014 03ff ands.w r3, r4, #255 ; 0xff 80286c6: d108 bne.n 80286da /* 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"); 80286c8: 4911 ldr r1, [pc, #68] ; (8028710 ) 80286ca: 4812 ldr r0, [pc, #72] ; (8028714 ) 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; 80286cc: f885 3311 strb.w r3, [r5, #785] ; 0x311 strcpy(sSettings.sAuth[user_id].login, "admin"); 80286d0: f7f9 fb90 bl 8021df4 strcpy(sSettings.sAuth[user_id].password, "12345"); 80286d4: 4810 ldr r0, [pc, #64] ; (8028718 ) 80286d6: 4911 ldr r1, [pc, #68] ; (802871c ) 80286d8: e010 b.n 80286fc } /** * @brief Установить значение сервисных настроек по умолчанию */ void SETTINGS_SetServiceDef(void) 80286da: fb07 f604 mul.w r6, r7, r4 80286de: 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"); 80286e0: f506 7044 add.w r0, r6, #784 ; 0x310 80286e4: 1828 adds r0, r5, r0 80286e6: 490e ldr r1, [pc, #56] ; (8028720 ) strcpy(sSettings.sAuth[user_id].login, "admin"); strcpy(sSettings.sAuth[user_id].password, "12345"); break; case 1: default: sSettings.sAuth[user_id].level = USER; 80286e8: f883 8311 strb.w r8, [r3, #785] ; 0x311 strcpy(sSettings.sAuth[user_id].login, "user"); 80286ec: 3002 adds r0, #2 strcpy(sSettings.sAuth[user_id].password, "1234"); 80286ee: 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"); 80286f2: f7f9 fb7f bl 8021df4 strcpy(sSettings.sAuth[user_id].password, "1234"); 80286f6: 19a8 adds r0, r5, r6 80286f8: 490a ldr r1, [pc, #40] ; (8028724 ) 80286fa: 3005 adds r0, #5 80286fc: 3401 adds r4, #1 80286fe: f7f9 fb79 bl 8021df4 */ void SETTINGS_SetServiceDef(void) { uint8_t user_id; for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { 8028702: 2c02 cmp r4, #2 8028704: d1dd bne.n 80286c2 strcpy(sSettings.sAuth[user_id].login, "user"); strcpy(sSettings.sAuth[user_id].password, "1234"); break; } } } 8028706: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802870a: bf00 nop 802870c: 2000cfc4 .word 0x2000cfc4 8028710: 08039a70 .word 0x08039a70 8028714: 2000d2d6 .word 0x2000d2d6 8028718: 2000d2e1 .word 0x2000d2e1 802871c: 08039a76 .word 0x08039a76 8028720: 08039a7c .word 0x08039a7c 8028724: 08039a81 .word 0x08039a81 08028728 : /** * @brief Установить параметры SNTP по умолчанию */ void SETTINGS_SetSntpDef(void) { 8028728: b510 push {r4, lr} sSettings.sSNTP.sntpEnable = true; 802872a: 4c08 ldr r4, [pc, #32] ; (802874c ) strcpy(sSettings.sSNTP.ip, "88.147.254.235"); 802872c: 4908 ldr r1, [pc, #32] ; (8028750 ) 802872e: 4809 ldr r0, [pc, #36] ; (8028754 ) /** * @brief Установить параметры SNTP по умолчанию */ void SETTINGS_SetSntpDef(void) { sSettings.sSNTP.sntpEnable = true; 8028730: 2301 movs r3, #1 8028732: f884 3340 strb.w r3, [r4, #832] ; 0x340 strcpy(sSettings.sSNTP.ip, "88.147.254.235"); 8028736: f7f9 fb5d bl 8021df4 sSettings.sSNTP.timeZone = 3.0; 802873a: 4b07 ldr r3, [pc, #28] ; (8028758 ) strcpy(sSettings.sSNTP.data, "none"); 802873c: 4807 ldr r0, [pc, #28] ; (802875c ) 802873e: 4908 ldr r1, [pc, #32] ; (8028760 ) */ void SETTINGS_SetSntpDef(void) { sSettings.sSNTP.sntpEnable = true; strcpy(sSettings.sSNTP.ip, "88.147.254.235"); sSettings.sSNTP.timeZone = 3.0; 8028740: f8c4 3370 str.w r3, [r4, #880] ; 0x370 strcpy(sSettings.sSNTP.data, "none"); } 8028744: 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"); 8028748: f7f9 bb54 b.w 8021df4 802874c: 2000cfc4 .word 0x2000cfc4 8028750: 08039a86 .word 0x08039a86 8028754: 2000d305 .word 0x2000d305 8028758: 40400000 .word 0x40400000 802875c: 2000d315 .word 0x2000d315 8028760: 08039a95 .word 0x08039a95 08028764 : /** * @brief Установить параметры настроек сухих контактов / реле по умолчанию */ void SETTINGS_SetINOUTSDef(void) { sSettings.sInOuts.ro_type_source[0] = CRITICAL; 8028764: 4b05 ldr r3, [pc, #20] ; (802877c ) 8028766: 2201 movs r2, #1 8028768: f883 2374 strb.w r2, [r3, #884] ; 0x374 sSettings.sInOuts.ro_type_source[1] = SNMP_SET; 802876c: 2203 movs r2, #3 802876e: f883 2375 strb.w r2, [r3, #885] ; 0x375 sSettings.sInOuts.din_type_act[0] = SNMP_TRAP; 8028772: 2202 movs r2, #2 8028774: f883 2376 strb.w r2, [r3, #886] ; 0x376 8028778: 4770 bx lr 802877a: bf00 nop 802877c: 2000cfc4 .word 0x2000cfc4 08028780 : /** * @brief Установить параметры RADIUS по умолчанию */ void SETTINGS_SetRADIUSDef(void) { 8028780: b510 push {r4, lr} sSettings.sRADIUS.Auth_enable = true; 8028782: 4c0b ldr r4, [pc, #44] ; (80287b0 ) sSettings.sRADIUS.RDSEnable = true; strcpy(sSettings.sRADIUS.ServerIP, "127.0.0.1"); 8028784: 490b ldr r1, [pc, #44] ; (80287b4 ) 8028786: 480c ldr r0, [pc, #48] ; (80287b8 ) /** * @brief Установить параметры RADIUS по умолчанию */ void SETTINGS_SetRADIUSDef(void) { sSettings.sRADIUS.Auth_enable = true; 8028788: 2301 movs r3, #1 802878a: f884 3378 strb.w r3, [r4, #888] ; 0x378 sSettings.sRADIUS.RDSEnable = true; 802878e: f884 339a strb.w r3, [r4, #922] ; 0x39a strcpy(sSettings.sRADIUS.ServerIP, "127.0.0.1"); 8028792: f7f9 fb2f bl 8021df4 sSettings.sRADIUS.port = 1227; 8028796: f240 43cb movw r3, #1227 ; 0x4cb sSettings.sRADIUS.key_access = 123; strcpy(sSettings.sRADIUS.rds_password, "12345"); 802879a: 4808 ldr r0, [pc, #32] ; (80287bc ) 802879c: 4908 ldr r1, [pc, #32] ; (80287c0 ) 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; 802879e: f8c4 339c str.w r3, [r4, #924] ; 0x39c sSettings.sRADIUS.key_access = 123; 80287a2: 237b movs r3, #123 ; 0x7b 80287a4: f8c4 33a0 str.w r3, [r4, #928] ; 0x3a0 strcpy(sSettings.sRADIUS.rds_password, "12345"); } 80287a8: 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"); 80287ac: f7f9 bb22 b.w 8021df4 80287b0: 2000cfc4 .word 0x2000cfc4 80287b4: 08039a9a .word 0x08039a9a 80287b8: 2000d33d .word 0x2000d33d 80287bc: 2000d34d .word 0x2000d34d 80287c0: 08039a76 .word 0x08039a76 080287c4 : */ void SETTINGS_ReadFromFlash(uint8_t *data, uint32_t size) { uint32_t baseAddress = SETTINGS_SECTOR; for (uint32_t i = 0; i < size; i++) 80287c4: 2300 movs r3, #0 80287c6: e006 b.n 80287d6 *data++ = (*(uint32_t*)baseAddress++);; 80287c8: f103 6200 add.w r2, r3, #134217728 ; 0x8000000 80287cc: f502 4280 add.w r2, r2, #16384 ; 0x4000 80287d0: 6812 ldr r2, [r2, #0] 80287d2: 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++) 80287d4: 3301 adds r3, #1 80287d6: 428b cmp r3, r1 80287d8: d1f6 bne.n 80287c8 *data++ = (*(uint32_t*)baseAddress++);; } 80287da: 4770 bx lr 080287dc : */ void SETTINGS_EraseFlashSector(void) { FLASH_Status status; if ((status = FLASH_EraseSector(FLASH_Sector_1, VoltageRange_3)) != FLASH_COMPLETE) { 80287dc: 2008 movs r0, #8 80287de: 2102 movs r1, #2 80287e0: f7fc be32 b.w 8025448 080287e4 : /** * @brief * @retval */ uint32_t SETTINGS_GetCRC(void) { 80287e4: b508 push {r3, lr} CRC_ResetDR(); 80287e6: f7fc fd99 bl 802531c return CRC_CalcBlockCRC((uint32_t*)&sSettings, sizeof(sSettings)/4 - 1); 80287ea: 4803 ldr r0, [pc, #12] ; (80287f8 ) 80287ec: 21e9 movs r1, #233 ; 0xe9 } 80287ee: 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); 80287f2: f7fc bd99 b.w 8025328 80287f6: bf00 nop 80287f8: 2000cfc4 .word 0x2000cfc4 080287fc : /** * @brief */ void SETTINGS_WriteToFlash(uint8_t *data, uint32_t size) { 80287fc: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8028800: 4606 mov r6, r0 8028802: 468a mov sl, r1 uint32_t baseAddress = SETTINGS_SECTOR; uint32_t checkCrc = 0; uint32_t crc = SETTINGS_GetCRC(); 8028804: f7ff ffee bl 80287e4 /** * @brief */ void SETTINGS_WriteToFlash(uint8_t *data, uint32_t size) { uint32_t baseAddress = SETTINGS_SECTOR; 8028808: 4c17 ldr r4, [pc, #92] ; (8028868 ) uint32_t checkCrc = 0; uint32_t crc = SETTINGS_GetCRC(); 802880a: 4680 mov r8, r0 802880c: 2703 movs r7, #3 FLASH_Status status; for (uint8_t i = 0; i < 3; i++) { fAlarm = 0; FLASH_Unlock(); 802880e: f7fc fd9b bl 8025348 8028812: 4635 mov r5, r6 SETTINGS_EraseFlashSector(); 8028814: f7ff ffe2 bl 80287dc } /** * @brief */ void SETTINGS_WriteToFlash(uint8_t *data, uint32_t size) 8028818: eb04 0b0a add.w fp, r4, sl fAlarm = 0; FLASH_Unlock(); SETTINGS_EraseFlashSector(); for (uint32_t i = 0; i < size; i++) 802881c: e00a b.n 8028834 if ((status = FLASH_ProgramByte(baseAddress++, *data++)) != FLASH_COMPLETE) { 802881e: f815 1b01 ldrb.w r1, [r5], #1 8028822: 4620 mov r0, r4 8028824: f7fc fdd6 bl 80253d4 8028828: f104 0901 add.w r9, r4, #1 802882c: 2808 cmp r0, #8 802882e: 462e mov r6, r5 8028830: 464c mov r4, r9 8028832: d102 bne.n 802883a fAlarm = 0; FLASH_Unlock(); SETTINGS_EraseFlashSector(); for (uint32_t i = 0; i < size; i++) 8028834: 455c cmp r4, fp 8028836: 462e mov r6, r5 8028838: d1f1 bne.n 802881e 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) { 802883a: 4641 mov r1, r8 802883c: 480b ldr r0, [pc, #44] ; (802886c ) 802883e: f7fc fde5 bl 802540c DBG printf("FLASH_ProgramWord error: status = %d\r\n", status); } FLASH_Lock(); 8028842: f7fc fd8f bl 8025364 /* Считываем что записали */ SETTINGS_ReadFromFlash((uint8_t*)&sSettings, sizeof(sSettings)); 8028846: 480a ldr r0, [pc, #40] ; (8028870 ) 8028848: f44f 716a mov.w r1, #936 ; 0x3a8 802884c: f7ff ffba bl 80287c4 checkCrc = SETTINGS_GetCRC(); 8028850: f7ff ffc8 bl 80287e4 /* Проверяем CRC того что было записано */ if (checkCrc == crc) 8028854: 4540 cmp r0, r8 8028856: d004 beq.n 8028862 8028858: 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++) 802885a: f017 07ff ands.w r7, r7, #255 ; 0xff 802885e: d1d6 bne.n 802880e 8028860: e7fe b.n 8028860 8028862: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8028866: bf00 nop 8028868: 08004000 .word 0x08004000 802886c: 08005f9c .word 0x08005f9c 8028870: 2000cfc4 .word 0x2000cfc4 08028874 : /** * @brief * @retval */ uint32_t SETTINGS_GetCritSecCRC(void) { 8028874: b508 push {r3, lr} CRC_ResetDR(); 8028876: f7fc fd51 bl 802531c uint32_t critsec_len = (uint32_t)((uint8_t *)(&sSettings.CritSecCRC) - (uint8_t *)&sSettings) / 4; return CRC_CalcBlockCRC((uint32_t *)&sSettings, critsec_len); 802887a: 4803 ldr r0, [pc, #12] ; (8028888 ) 802887c: 2147 movs r1, #71 ; 0x47 } 802887e: 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); 8028882: f7fc bd51 b.w 8025328 8028886: bf00 nop 8028888: 2000cfc4 .word 0x2000cfc4 0802888c : /** * @brief Запись структуры настроек во flesh */ void SETTINGS_Save(void) { 802888c: b508 push {r3, lr} /* Calc critical section CRC and store to the settings structure */ sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 802888e: f7ff fff1 bl 8028874 8028892: 4b05 ldr r3, [pc, #20] ; (80288a8 ) SETTINGS_WriteToFlash((uint8_t*)&sSettings, sizeof(sSettings)); 8028894: 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(); 8028898: f8c3 011c str.w r0, [r3, #284] ; 0x11c SETTINGS_WriteToFlash((uint8_t*)&sSettings, sizeof(sSettings)); 802889c: 4618 mov r0, r3 } 802889e: 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)); 80288a2: f7ff bfab b.w 80287fc 80288a6: bf00 nop 80288a8: 2000cfc4 .word 0x2000cfc4 080288ac : /** * @brief Установка настроек для отладки */ void SETTINGS_SetDefaultDebug(void) { 80288ac: b510 push {r4, lr} /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 80288ae: 4c0d ldr r4, [pc, #52] ; (80288e4 ) /** * @brief Установка настроек для отладки */ void SETTINGS_SetDefaultDebug(void) { SETTINGS_SetWebParamsDef(); 80288b0: f7ff fe5e bl 8028570 SETTINGS_SetTempWebParamsDef(); 80288b4: f7ff fe78 bl 80285a8 SETTINGS_SetSnmpDef(); 80288b8: f7ff fe92 bl 80285e0 SETTINGS_SetBootParamsDef(); 80288bc: f7ff fe50 bl 8028560 /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 80288c0: 2300 movs r3, #0 80288c2: f884 3120 strb.w r3, [r4, #288] ; 0x120 SETTINGS_SetTempWebParamsDef(); SETTINGS_SetSnmpDef(); SETTINGS_SetBootParamsDef(); SETTINGS_SetFlagsDef(); //SETTINGS_SetServiceDef(); SETTINGS_SetSntpDef(); 80288c6: f7ff ff2f bl 8028728 SETTINGS_SetINOUTSDef(); 80288ca: f7ff ff4b bl 8028764 SETTINGS_SetRADIUSDef(); 80288ce: f7ff ff57 bl 8028780 //SETTINGS_SetInfoDef(); sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 80288d2: f7ff ffcf bl 8028874 sSettings.controlWorld = SETTINGS_CONTROL_WORD; 80288d6: 4b04 ldr r3, [pc, #16] ; (80288e8 ) SETTINGS_SetSntpDef(); SETTINGS_SetINOUTSDef(); SETTINGS_SetRADIUSDef(); //SETTINGS_SetInfoDef(); sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 80288d8: f8c4 011c str.w r0, [r4, #284] ; 0x11c sSettings.controlWorld = SETTINGS_CONTROL_WORD; 80288dc: f8c4 33a4 str.w r3, [r4, #932] ; 0x3a4 80288e0: bd10 pop {r4, pc} 80288e2: bf00 nop 80288e4: 2000cfc4 .word 0x2000cfc4 80288e8: 075bcd15 .word 0x075bcd15 080288ec : /** * @brief Сброс всех настроек в значения по умолчанию */ void SETTINGS_SetAllDefault(void) { 80288ec: b510 push {r4, lr} /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 80288ee: 4c0f ldr r4, [pc, #60] ; (802892c ) /** * @brief Сброс всех настроек в значения по умолчанию */ void SETTINGS_SetAllDefault(void) { SETTINGS_SetBootParamsDef(); 80288f0: f7ff fe36 bl 8028560 SETTINGS_SetWebParamsDef(); 80288f4: f7ff fe3c bl 8028570 SETTINGS_SetTempWebParamsDef(); 80288f8: f7ff fe56 bl 80285a8 SETTINGS_SetSnmpDef(); 80288fc: f7ff fe70 bl 80285e0 SETTINGS_SetInfoDef(); 8028900: f7ff feb6 bl 8028670 /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8028904: 2300 movs r3, #0 8028906: f884 3120 strb.w r3, [r4, #288] ; 0x120 SETTINGS_SetWebParamsDef(); SETTINGS_SetTempWebParamsDef(); SETTINGS_SetSnmpDef(); SETTINGS_SetInfoDef(); SETTINGS_SetFlagsDef(); SETTINGS_SetServiceDef(); 802890a: f7ff fed3 bl 80286b4 SETTINGS_SetSntpDef(); 802890e: f7ff ff0b bl 8028728 SETTINGS_SetINOUTSDef(); 8028912: f7ff ff27 bl 8028764 SETTINGS_SetRADIUSDef(); 8028916: f7ff ff33 bl 8028780 sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 802891a: f7ff ffab bl 8028874 sSettings.controlWorld = SETTINGS_CONTROL_WORD; 802891e: 4b04 ldr r3, [pc, #16] ; (8028930 ) SETTINGS_SetServiceDef(); SETTINGS_SetSntpDef(); SETTINGS_SetINOUTSDef(); SETTINGS_SetRADIUSDef(); sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028920: f8c4 011c str.w r0, [r4, #284] ; 0x11c sSettings.controlWorld = SETTINGS_CONTROL_WORD; 8028924: f8c4 33a4 str.w r3, [r4, #932] ; 0x3a4 8028928: bd10 pop {r4, pc} 802892a: bf00 nop 802892c: 2000cfc4 .word 0x2000cfc4 8028930: 075bcd15 .word 0x075bcd15 08028934 : /** * @brief Загрузка структуры настроек из flesh */ void SETTINGS_Load(void) { 8028934: b510 push {r4, lr} uint32_t loadCRC; // CRC из flash uint32_t newCRC; // CRC загруженной структуры настроек SETTINGS_ReadFromFlash((uint8_t*)&sSettings, sizeof(sSettings)); 8028936: 4809 ldr r0, [pc, #36] ; (802895c ) 8028938: f44f 716a mov.w r1, #936 ; 0x3a8 802893c: f7ff ff42 bl 80287c4 /* Считываем CRC из флеш памяти */ loadCRC = (*(uint32_t*)CRC_ADDRESS); 8028940: 4b07 ldr r3, [pc, #28] ; (8028960 ) 8028942: 681c ldr r4, [r3, #0] /* Рассчитываем CRC для структуры настроек */ newCRC = SETTINGS_GetCRC(); 8028944: f7ff ff4e bl 80287e4 if (loadCRC != newCRC) { 8028948: 4284 cmp r4, r0 802894a: d005 beq.n 8028958 SETTINGS_SetAllDefault(); 802894c: f7ff ffce bl 80288ec SETTINGS_Save(); } } 8028950: e8bd 4010 ldmia.w sp!, {r4, lr} /* Рассчитываем CRC для структуры настроек */ newCRC = SETTINGS_GetCRC(); if (loadCRC != newCRC) { SETTINGS_SetAllDefault(); SETTINGS_Save(); 8028954: f7ff bf9a b.w 802888c 8028958: bd10 pop {r4, pc} 802895a: bf00 nop 802895c: 2000cfc4 .word 0x2000cfc4 8028960: 08005f9c .word 0x08005f9c 08028964 : /** * @brief Сброс всех настроек в значения по умолчанию кроме сетевых настроек */ void SETTINGS_SetPartDefault(void) { 8028964: b510 push {r4, lr} /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8028966: 4c0b ldr r4, [pc, #44] ; (8028994 ) /** * @brief Сброс всех настроек в значения по умолчанию кроме сетевых настроек */ void SETTINGS_SetPartDefault(void) { SETTINGS_SetBootParamsDef(); 8028968: f7ff fdfa bl 8028560 SETTINGS_SetSnmpDef(); 802896c: f7ff fe38 bl 80285e0 /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8028970: 2300 movs r3, #0 8028972: f884 3120 strb.w r3, [r4, #288] ; 0x120 { SETTINGS_SetBootParamsDef(); SETTINGS_SetSnmpDef(); SETTINGS_SetFlagsDef(); // SETTINGS_SetServiceDef(); SETTINGS_SetSntpDef(); 8028976: f7ff fed7 bl 8028728 SETTINGS_SetINOUTSDef(); 802897a: f7ff fef3 bl 8028764 SETTINGS_SetRADIUSDef(); 802897e: f7ff feff bl 8028780 sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028982: f7ff ff77 bl 8028874 sSettings.controlWorld = SETTINGS_CONTROL_WORD; 8028986: 4b04 ldr r3, [pc, #16] ; (8028998 ) // SETTINGS_SetServiceDef(); SETTINGS_SetSntpDef(); SETTINGS_SetINOUTSDef(); SETTINGS_SetRADIUSDef(); sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028988: f8c4 011c str.w r0, [r4, #284] ; 0x11c sSettings.controlWorld = SETTINGS_CONTROL_WORD; 802898c: f8c4 33a4 str.w r3, [r4, #932] ; 0x3a4 8028990: bd10 pop {r4, pc} 8028992: bf00 nop 8028994: 2000cfc4 .word 0x2000cfc4 8028998: 075bcd15 .word 0x075bcd15 0802899c : /** * @brief Сброс флага boottry в регистре RTC */ void SETTINGS_ResetBootTry(void) { uint8_t bootTry = RTC_ReadBackupRegister(RTC_BKP_DR2); 802899c: 2002 movs r0, #2 /** * @brief Сброс флага boottry в регистре RTC */ void SETTINGS_ResetBootTry(void) { 802899e: b508 push {r3, lr} uint8_t bootTry = RTC_ReadBackupRegister(RTC_BKP_DR2); 80289a0: f7fd f8b6 bl 8025b10 if (bootTry > 0 ) 80289a4: f010 0fff tst.w r0, #255 ; 0xff 80289a8: d014 beq.n 80289d4 { bootTry = 0; RTC_WriteBackupRegister(RTC_BKP_DR2, 0); 80289aa: 2002 movs r0, #2 80289ac: 2100 movs r1, #0 80289ae: f7fd f89f bl 8025af0 /* Check FW update flag */ if (RTC_ReadBackupRegister(RTC_BKP_DR3)) { 80289b2: 2003 movs r0, #3 80289b4: f7fd f8ac bl 8025b10 80289b8: b160 cbz r0, 80289d4 /* Отправка трапа об успешном обновлении ПО */ SNMP_SendUserTrap(FW_VERSION_UPDATED); 80289ba: 2002 movs r0, #2 80289bc: f00f fbbe bl 803813c log_event_data(LOG_UPDATE_SOFT, "Успешно"); 80289c0: 2002 movs r0, #2 80289c2: 4905 ldr r1, [pc, #20] ; (80289d8 ) 80289c4: f001 f84a bl 8029a5c /* Clear FW update flag */ RTC_WriteBackupRegister(RTC_BKP_DR3, 0); 80289c8: 2003 movs r0, #3 80289ca: 2100 movs r1, #0 //taskENTER_CRITICAL(); SETTINGS_Save(); //taskEXIT_CRITICAL(); } */ } 80289cc: 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); 80289d0: f7fd b88e b.w 8025af0 80289d4: bd08 pop {r3, pc} 80289d6: bf00 nop 80289d8: 08039aa4 .word 0x08039aa4 080289dc : /** * @brief Преобразует mac адрес строкового формата в массив uint8_t * @param mac - буфер для вывода mac адреса */ void SETTINGS_GetMac(uint8_t *mac) { 80289dc: 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); 80289de: 4e0a ldr r6, [pc, #40] ; (8028a08 ) /** * @brief Преобразует mac адрес строкового формата в массив uint8_t * @param mac - буфер для вывода mac адреса */ void SETTINGS_GetMac(uint8_t *mac) 80289e0: 1e45 subs r5, r0, #1 80289e2: 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); 80289e4: 1931 adds r1, r6, r4 80289e6: 318c adds r1, #140 ; 0x8c 80289e8: 2202 movs r2, #2 80289ea: a801 add r0, sp, #4 80289ec: f7f9 fb18 bl 8022020 mac[i] = (uint8_t)strtol(dummy, NULL, 16); 80289f0: 2100 movs r1, #0 80289f2: 2210 movs r2, #16 80289f4: a801 add r0, sp, #4 80289f6: f7fa fe49 bl 802368c 80289fa: 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++) 80289fc: 2c12 cmp r4, #18 { strncpy(dummy, macPtr+i*3, 2); mac[i] = (uint8_t)strtol(dummy, NULL, 16); 80289fe: 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++) 8028a02: d1ef bne.n 80289e4 { strncpy(dummy, macPtr+i*3, 2); mac[i] = (uint8_t)strtol(dummy, NULL, 16); } } 8028a04: bd7c pop {r2, r3, r4, r5, r6, pc} 8028a06: bf00 nop 8028a08: 2000cfc4 .word 0x2000cfc4 08028a0c : /** * @brief Установить дату производства */ void SETTINGS_SetProDate(char *proDate, uint8_t len) { 8028a0c: b570 push {r4, r5, r6, lr} memset(sSettings.sInfo.productionData, 0, 40); 8028a0e: 4c07 ldr r4, [pc, #28] ; (8028a2c ) /** * @brief Установить дату производства */ void SETTINGS_SetProDate(char *proDate, uint8_t len) { 8028a10: 4606 mov r6, r0 8028a12: 460d mov r5, r1 memset(sSettings.sInfo.productionData, 0, 40); 8028a14: 2228 movs r2, #40 ; 0x28 8028a16: 2100 movs r1, #0 8028a18: 4620 mov r0, r4 8028a1a: f7f9 f871 bl 8021b00 memcpy(sSettings.sInfo.productionData, proDate, len); 8028a1e: 4620 mov r0, r4 8028a20: 4631 mov r1, r6 8028a22: 462a mov r2, r5 } 8028a24: 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); 8028a28: f7f8 bfb0 b.w 802198c 8028a2c: 2000d028 .word 0x2000d028 08028a30 : /** * @brief */ void LED_On(gpio_t pin) { gpio_set(pin, 1); 8028a30: 2101 movs r1, #1 8028a32: f7fd ba7d b.w 8025f30 08028a36 : /** * @brief */ void LED_Off(gpio_t pin) { gpio_set(pin, 0); 8028a36: 2100 movs r1, #0 8028a38: f7fd ba7a b.w 8025f30 08028a3c : /** * @brief * @retval */ void LED_Init(void) { 8028a3c: b508 push {r3, lr} LED_Off(LED_INIT_R); 8028a3e: 2009 movs r0, #9 8028a40: f7ff fff9 bl 8028a36 LED_Off(LED_INIT_G); 8028a44: 200a movs r0, #10 8028a46: f7ff fff6 bl 8028a36 LED_Off(LED_MAJOR_R); 8028a4a: 200b movs r0, #11 8028a4c: f7ff fff3 bl 8028a36 LED_Off(LED_MINOR_G); 8028a50: 200c movs r0, #12 8028a52: f7ff fff0 bl 8028a36 LED_Off(LED_MINOR_R); 8028a56: 200d movs r0, #13 } 8028a58: 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); 8028a5c: f7ff bfeb b.w 8028a36 08028a60 : /** * @brief Задача простой мигалки */ void vTaskLedBlink(void *arg) { 8028a60: 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; 8028a62: 4e0e ldr r6, [pc, #56] ; (8028a9c ) LED_Off(LED_INIT_R); LED_Toggle(LED_INIT_G); } start_status_old = start_status; vTaskDelay(statusLedFreq); 8028a64: 4d0e ldr r5, [pc, #56] ; (8028aa0 ) * @brief Задача простой мигалки */ void vTaskLedBlink(void *arg) { uint8_t start_status = 0; uint8_t start_status_old = 0; 8028a66: 2300 movs r3, #0 start_status = (UPS.Status >> 7) & 0x01; for (;;) { start_status = (UPS.Status >> 7) & 0x01; 8028a68: 7cf4 ldrb r4, [r6, #19] /* Просто отражает состояние контроллера - "живой" */ if((UPS.Status >> 7) & 0x01){ 8028a6a: 09e4 lsrs r4, r4, #7 8028a6c: d009 beq.n 8028a82 if(start_status_old != start_status) 8028a6e: 42a3 cmp r3, r4 8028a70: d002 beq.n 8028a78 LED_Off(LED_INIT_G); 8028a72: 200a movs r0, #10 8028a74: f7ff ffdf bl 8028a36 /** * @brief Изменить состояние LED */ void LED_Toggle(gpio_t pin) { gpio_invert_output(pin); 8028a78: 200a movs r0, #10 8028a7a: f7fd faed bl 8026058 8028a7e: 2009 movs r0, #9 8028a80: e005 b.n 8028a8e LED_Off(LED_INIT_G); LED_Toggle(LED_INIT_G); LED_Toggle(LED_INIT_R); } else{ if(start_status_old != start_status) 8028a82: 42a3 cmp r3, r4 8028a84: d002 beq.n 8028a8c LED_Off(LED_INIT_R); 8028a86: 2009 movs r0, #9 8028a88: f7ff ffd5 bl 8028a36 /** * @brief Изменить состояние LED */ void LED_Toggle(gpio_t pin) { gpio_invert_output(pin); 8028a8c: 200a movs r0, #10 8028a8e: f7fd fae3 bl 8026058 LED_Off(LED_INIT_R); LED_Toggle(LED_INIT_G); } start_status_old = start_status; vTaskDelay(statusLedFreq); 8028a92: 8828 ldrh r0, [r5, #0] 8028a94: f002 fa9a bl 802afcc uint8_t start_status = 0; uint8_t start_status_old = 0; start_status = (UPS.Status >> 7) & 0x01; for (;;) { start_status = (UPS.Status >> 7) & 0x01; 8028a98: 4623 mov r3, r4 LED_Toggle(LED_INIT_G); } start_status_old = start_status; vTaskDelay(statusLedFreq); } 8028a9a: e7e5 b.n 8028a68 8028a9c: 2000cba8 .word 0x2000cba8 8028aa0: 20000660 .word 0x20000660 08028aa4 : /** * @brief Изменить состояние LED */ void LED_Toggle(gpio_t pin) { gpio_invert_output(pin); 8028aa4: f7fd bad8 b.w 8026058 08028aa8 : /** * @brief */ void LED_SetStatusLedFreq(uint16_t freq) { statusLedFreq = freq; 8028aa8: 4b01 ldr r3, [pc, #4] ; (8028ab0 ) 8028aaa: 8018 strh r0, [r3, #0] 8028aac: 4770 bx lr 8028aae: bf00 nop 8028ab0: 20000660 .word 0x20000660 08028ab4 : /** * @brief Заглушка */ void BUTTON_VoidHandler(void) { 8028ab4: 4770 bx lr 8028ab6: 0000 movs r0, r0 08028ab8 : /** * @brief Хендлер кнопки DEFAULT. Сброс всех настроек, сохранение и перезагрузка */ void BUTTON_DEF_DownHandler(void) { 8028ab8: b508 push {r3, lr} //taskENTER_CRITICAL(); SNMP_SendUserTrap(DEVICE_RESTORED); 8028aba: 2003 movs r0, #3 8028abc: f00f fb3e bl 803813c log_event_data(LOG_SYSTEM_DEFCONFIG, "Администратор"); 8028ac0: 4909 ldr r1, [pc, #36] ; (8028ae8 ) 8028ac2: 2001 movs r0, #1 8028ac4: f000 ffca bl 8029a5c vTaskDelay(500); 8028ac8: f44f 70fa mov.w r0, #500 ; 0x1f4 8028acc: f002 fa7e bl 802afcc SETTINGS_SetDefaultDebug(); 8028ad0: f7ff feec bl 80288ac SETTINGS_Save(); 8028ad4: f7ff feda bl 802888c vTaskDelay(1010); 8028ad8: f240 30f2 movw r0, #1010 ; 0x3f2 8028adc: f002 fa76 bl 802afcc Reboot(); //taskEXIT_CRITICAL(); } 8028ae0: e8bd 4008 ldmia.w sp!, {r3, lr} vTaskDelay(500); SETTINGS_SetDefaultDebug(); SETTINGS_Save(); vTaskDelay(1010); Reboot(); 8028ae4: f000 bb0e b.w 8029104 8028ae8: 08039ab8 .word 0x08039ab8 08028aec : /** * @brief Возвращает сотояние ключа */ BUTTON_STATE_t BUTTON_GetState(BUTTON_NO_FIX_t *button) { return (BUTTON_STATE_t)gpio_get(button->id_pin); 8028aec: 7800 ldrb r0, [r0, #0] 8028aee: f7fd bac3 b.w 8026078 8028af2: 0000 movs r0, r0 08028af4 : /** * @brief * @retval */ void BUTTON_Init(void) { 8028af4: b510 push {r4, lr} defButton.id_pin = KEY_DEF; 8028af6: 4c09 ldr r4, [pc, #36] ; (8028b1c ) 8028af8: 230f movs r3, #15 8028afa: 7023 strb r3, [r4, #0] defButton.timeDelay = 5; 8028afc: 2305 movs r3, #5 8028afe: 8063 strh r3, [r4, #2] defButton.pressHandler = BUTTON_VoidHandler; 8028b00: 4b07 ldr r3, [pc, #28] ; (8028b20 ) 8028b02: 60a3 str r3, [r4, #8] defButton.unpressHandler = BUTTON_DEF_DownHandler; 8028b04: 4b07 ldr r3, [pc, #28] ; (8028b24 ) defButton.counterActivation = 0; defButton.timeActivation = 40; 8028b06: 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; 8028b08: 60e3 str r3, [r4, #12] defButton.counterActivation = 0; defButton.timeActivation = 40; defButton.fActivation = false; defButton.stateOld = BUTTON_GetState(&defButton); 8028b0a: 4620 mov r0, r4 { defButton.id_pin = KEY_DEF; defButton.timeDelay = 5; defButton.pressHandler = BUTTON_VoidHandler; defButton.unpressHandler = BUTTON_DEF_DownHandler; defButton.counterActivation = 0; 8028b0c: 2300 movs r3, #0 8028b0e: 6163 str r3, [r4, #20] defButton.timeActivation = 40; 8028b10: 8322 strh r2, [r4, #24] defButton.fActivation = false; 8028b12: 76a3 strb r3, [r4, #26] defButton.stateOld = BUTTON_GetState(&defButton); 8028b14: f7ff ffea bl 8028aec 8028b18: 71a0 strb r0, [r4, #6] 8028b1a: bd10 pop {r4, pc} 8028b1c: 2000d36c .word 0x2000d36c 8028b20: 08028ab5 .word 0x08028ab5 8028b24: 08028ab9 .word 0x08028ab9 08028b28 : время нажатия. * @param *button: указатель на структуру типа BUTTON_NO_FIX * @retval нет */ void BUTTON_DellayHandler(BUTTON_NO_FIX_t *button) { 8028b28: b510 push {r4, lr} 8028b2a: 4604 mov r4, r0 /* Кнопка нажата. Ведем отсчет времени удержания */ if (gpio_get(button->id_pin) == 0) // определяем текущее (новое) состояние кнопки 8028b2c: 7800 ldrb r0, [r0, #0] 8028b2e: f7fd faa3 bl 8026078 8028b32: 6963 ldr r3, [r4, #20] 8028b34: b950 cbnz r0, 8028b4c { button->counterActivation++; button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) 8028b36: 8b22 ldrh r2, [r4, #24] { /* Кнопка нажата. Ведем отсчет времени удержания */ if (gpio_get(button->id_pin) == 0) // определяем текущее (новое) состояние кнопки { button->counterActivation++; button->fActivation = false; 8028b38: 76a0 strb r0, [r4, #26] void BUTTON_DellayHandler(BUTTON_NO_FIX_t *button) { /* Кнопка нажата. Ведем отсчет времени удержания */ if (gpio_get(button->id_pin) == 0) // определяем текущее (новое) состояние кнопки { button->counterActivation++; 8028b3a: 3301 adds r3, #1 button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) 8028b3c: 4293 cmp r3, r2 void BUTTON_DellayHandler(BUTTON_NO_FIX_t *button) { /* Кнопка нажата. Ведем отсчет времени удержания */ if (gpio_get(button->id_pin) == 0) // определяем текущее (новое) состояние кнопки { button->counterActivation++; 8028b3e: 6163 str r3, [r4, #20] button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) 8028b40: d914 bls.n 8028b6c LED_SetStatusLedFreq(100); 8028b42: 2064 movs r0, #100 ; 0x64 } else button->counterActivation = 0; } } 8028b44: e8bd 4010 ldmia.w sp!, {r4, lr} button->counterActivation++; button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) LED_SetStatusLedFreq(100); 8028b48: f7ff bfae b.w 8028aa8 } /* Кнопку отжата. Если до этого она была нажата нужное время - вызываем хендлер */ else { if ((button->counterActivation > button->timeActivation) 8028b4c: 8b22 ldrh r2, [r4, #24] 8028b4e: 4293 cmp r3, r2 8028b50: d90a bls.n 8028b68 && button->fActivation == false) 8028b52: 7ea3 ldrb r3, [r4, #26] 8028b54: b943 cbnz r3, 8028b68 { button->fActivation = true; 8028b56: 2301 movs r3, #1 8028b58: 76a3 strb r3, [r4, #26] LED_SetStatusLedFreq(1000); 8028b5a: f44f 707a mov.w r0, #1000 ; 0x3e8 8028b5e: f7ff ffa3 bl 8028aa8 button->unpressHandler(); 8028b62: 68e3 ldr r3, [r4, #12] 8028b64: 4798 blx r3 8028b66: bd10 pop {r4, pc} } else button->counterActivation = 0; 8028b68: 2300 movs r3, #0 8028b6a: 6163 str r3, [r4, #20] 8028b6c: bd10 pop {r4, pc} 8028b6e: 0000 movs r0, r0 08028b70 : /** * @brief Опрос кнопок */ void vTaskButtons(void *pvParameters) { 8028b70: b508 push {r3, lr} for (;;) { BUTTON_DellayHandler(&defButton); 8028b72: 4803 ldr r0, [pc, #12] ; (8028b80 ) 8028b74: f7ff ffd8 bl 8028b28 vTaskDelay(100); //20 8028b78: 2064 movs r0, #100 ; 0x64 8028b7a: f002 fa27 bl 802afcc 8028b7e: e7f8 b.n 8028b72 8028b80: 2000d36c .word 0x2000d36c 08028b84 : #include "gpio.h" bool value_jumper; void set_mode_jumper(void) { 8028b84: b508 push {r3, lr} value_jumper = gpio_get(MODE_JUMPER); 8028b86: 200e movs r0, #14 8028b88: f7fd fa76 bl 8026078 8028b8c: 4b01 ldr r3, [pc, #4] ; (8028b94 ) 8028b8e: 7018 strb r0, [r3, #0] 8028b90: bd08 pop {r3, pc} 8028b92: bf00 nop 8028b94: 2000d388 .word 0x2000d388 08028b98 : /* 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); 8028b98: f7fd ba6e b.w 8026078 08028b9c : return res; } void set_state_douts(gpio_t pin, uint8_t value) { gpio_set(pin, value); 8028b9c: 3100 adds r1, #0 8028b9e: bf18 it ne 8028ba0: 2101 movne r1, #1 8028ba2: f7fd b9c5 b.w 8025f30 8028ba6: 0000 movs r0, r0 08028ba8 : extern bool flUpdateLog; void init_UPS_value(void) { 8028ba8: b538 push {r3, r4, r5, lr} UPS.Freq_in = 0; 8028baa: 4c10 ldr r4, [pc, #64] ; (8028bec ) UPS.VAC_in = 0; UPS.VAC_out = 0; UPS.Temp = 0; UPS.Load = 0; 8028bac: 2500 movs r5, #0 extern bool flUpdateLog; void init_UPS_value(void) { UPS.Freq_in = 0; 8028bae: 2300 movs r3, #0 UPS.Alarm = 0; UPS.cnt_err_ups = 0; UPS.Flag_Present = false; UPS.Present = false; memset(UPS.model, 0, 11); 8028bb0: 4629 mov r1, r5 8028bb2: 220b movs r2, #11 8028bb4: f104 0015 add.w r0, r4, #21 extern bool flUpdateLog; void init_UPS_value(void) { UPS.Freq_in = 0; 8028bb8: 6023 str r3, [r4, #0] UPS.VAC_in = 0; 8028bba: 6063 str r3, [r4, #4] UPS.VAC_out = 0; 8028bbc: 60a3 str r3, [r4, #8] UPS.Temp = 0; 8028bbe: 60e3 str r3, [r4, #12] UPS.Load = 0; 8028bc0: 7425 strb r5, [r4, #16] UPS.SOC = 0; 8028bc2: 7465 strb r5, [r4, #17] UPS.work_time = 0; 8028bc4: 74a5 strb r5, [r4, #18] UPS.Status = 0; 8028bc6: 74e5 strb r5, [r4, #19] UPS.Alarm = 0; 8028bc8: 7525 strb r5, [r4, #20] UPS.cnt_err_ups = 0; 8028bca: f884 502b strb.w r5, [r4, #43] ; 0x2b UPS.Flag_Present = false; 8028bce: f884 502d strb.w r5, [r4, #45] ; 0x2d UPS.Present = false; 8028bd2: f884 502c strb.w r5, [r4, #44] ; 0x2c memset(UPS.model, 0, 11); 8028bd6: f7f8 ff93 bl 8021b00 memset(UPS.vertion, 0, 11); 8028bda: f104 0020 add.w r0, r4, #32 8028bde: 4629 mov r1, r5 8028be0: 220b movs r2, #11 } 8028be2: 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); 8028be6: f7f8 bf8b b.w 8021b00 8028bea: bf00 nop 8028bec: 2000cba8 .word 0x2000cba8 08028bf0 : } void send_MegaTec_cmd(cmdMegaTecEnums_t command) { 8028bf0: b510 push {r4, lr} if(command == ups_test_time){ 8028bf2: 2803 cmp r0, #3 memset(UPS.model, 0, 11); memset(UPS.vertion, 0, 11); } void send_MegaTec_cmd(cmdMegaTecEnums_t command) { 8028bf4: b086 sub sp, #24 if(command == ups_test_time){ 8028bf6: d10d bne.n 8028c14 uint8_t req[10]; memset(req, 0, 10); 8028bf8: 2100 movs r1, #0 8028bfa: 220a movs r2, #10 8028bfc: a803 add r0, sp, #12 8028bfe: f7f8 ff7f bl 8021b00 sprintf(req, "%s%d\r", MegaTecCMD[command], TimeParam); 8028c02: 4b18 ldr r3, [pc, #96] ; (8028c64 ) 8028c04: 4918 ldr r1, [pc, #96] ; (8028c68 ) 8028c06: 68da ldr r2, [r3, #12] 8028c08: 4b18 ldr r3, [pc, #96] ; (8028c6c ) 8028c0a: a803 add r0, sp, #12 8028c0c: 881b ldrh r3, [r3, #0] 8028c0e: f7fe fe01 bl 8027814 8028c12: e015 b.n 8028c40 ups_send_block(req, strlen(req)); } else if(command == ups_shutdown){ 8028c14: 2805 cmp r0, #5 8028c16: d022 beq.n 8028c5e } else if(command == ups_shutdown_restore){ 8028c18: 2806 cmp r0, #6 8028c1a: 4c12 ldr r4, [pc, #72] ; (8028c64 ) 8028c1c: d116 bne.n 8028c4c uint8_t req[10]; memset(req, 0, 10); 8028c1e: 2100 movs r1, #0 8028c20: 220a movs r2, #10 8028c22: a803 add r0, sp, #12 8028c24: f7f8 ff6c bl 8021b00 sprintf(req, "%s.%d%s%d\r", MegaTecCMD[command-1], TimeParam, MegaTecCMD[command], TimeParam2); 8028c28: 69a2 ldr r2, [r4, #24] 8028c2a: 4b10 ldr r3, [pc, #64] ; (8028c6c ) 8028c2c: 4910 ldr r1, [pc, #64] ; (8028c70 ) 8028c2e: 881b ldrh r3, [r3, #0] 8028c30: 9200 str r2, [sp, #0] 8028c32: 4a10 ldr r2, [pc, #64] ; (8028c74 ) 8028c34: 8812 ldrh r2, [r2, #0] 8028c36: 9201 str r2, [sp, #4] 8028c38: a803 add r0, sp, #12 8028c3a: 6962 ldr r2, [r4, #20] 8028c3c: f7fe fdea bl 8027814 ups_send_block(req, strlen(req)); 8028c40: a803 add r0, sp, #12 8028c42: f7f9 f935 bl 8021eb0 8028c46: b2c1 uxtb r1, r0 8028c48: a803 add r0, sp, #12 8028c4a: e006 b.n 8028c5a } else{ ups_send_block(MegaTecCMD[command], strlen(MegaTecCMD[command])); 8028c4c: f854 4020 ldr.w r4, [r4, r0, lsl #2] 8028c50: 4620 mov r0, r4 8028c52: f7f9 f92d bl 8021eb0 8028c56: b2c1 uxtb r1, r0 8028c58: 4620 mov r0, r4 8028c5a: f7fe f843 bl 8026ce4 } } 8028c5e: b006 add sp, #24 8028c60: bd10 pop {r4, pc} 8028c62: bf00 nop 8028c64: 20000664 .word 0x20000664 8028c68: 08039ad8 .word 0x08039ad8 8028c6c: 20000b50 .word 0x20000b50 8028c70: 08039ad3 .word 0x08039ad3 8028c74: 20000b1a .word 0x20000b1a 08028c78 : bool ups_megatec_rx_pdu(void) { 8028c78: b510 push {r4, lr} int c = 0; ups_pdu.len = 0; 8028c7a: 4c0e ldr r4, [pc, #56] ; (8028cb4 ) 8028c7c: 2000 movs r0, #0 8028c7e: 8660 strh r0, [r4, #50] ; 0x32 while ((ups_pdu.len < UPS_PDU_MAX_LEN) && (c != 0x0d)) { 8028c80: e00d b.n 8028c9e c = ups_getchar(500);//portMAX_DELAY 8028c82: f44f 70fa mov.w r0, #500 ; 0x1f4 8028c86: f7fe f851 bl 8026d2c if(c < 0) 8028c8a: 2800 cmp r0, #0 8028c8c: da03 bge.n 8028c96 { ups_pdu.len = 0; 8028c8e: 4b09 ldr r3, [pc, #36] ; (8028cb4 ) 8028c90: 2200 movs r2, #0 8028c92: 865a strh r2, [r3, #50] ; 0x32 break; 8028c94: e008 b.n 8028ca8 } ups_pdu.data[ups_pdu.len++] = c; 8028c96: 8e63 ldrh r3, [r4, #50] ; 0x32 8028c98: 54e0 strb r0, [r4, r3] 8028c9a: 3301 adds r3, #1 8028c9c: 8663 strh r3, [r4, #50] ; 0x32 { int c = 0; ups_pdu.len = 0; while ((ups_pdu.len < UPS_PDU_MAX_LEN) && (c != 0x0d)) { 8028c9e: 8e63 ldrh r3, [r4, #50] ; 0x32 8028ca0: 2b31 cmp r3, #49 ; 0x31 8028ca2: d801 bhi.n 8028ca8 8028ca4: 280d cmp r0, #13 8028ca6: d1ec bne.n 8028c82 break; } ups_pdu.data[ups_pdu.len++] = c; } if (ups_pdu.len == 0) 8028ca8: 4b02 ldr r3, [pc, #8] ; (8028cb4 ) 8028caa: 8e58 ldrh r0, [r3, #50] ; 0x32 return false; return true; } 8028cac: 3000 adds r0, #0 8028cae: bf18 it ne 8028cb0: 2001 movne r0, #1 8028cb2: bd10 pop {r4, pc} 8028cb4: 20000b1c .word 0x20000b1c 08028cb8 : void ups_status_response(char *data) { 8028cb8: 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] != '(') 8028cbc: 7803 ldrb r3, [r0, #0] 8028cbe: 2b28 cmp r3, #40 ; 0x28 return true; } void ups_status_response(char *data) { 8028cc0: 4604 mov r4, r0 uint8_t i; char *endValue; char value[10]; uint8_t len = 0; if(data[0] != '(') 8028cc2: f040 80e4 bne.w 8028e8e return; UPS.Present = true; 8028cc6: 4b78 ldr r3, [pc, #480] ; (8028ea8 ) 8028cc8: 2201 movs r2, #1 8028cca: f883 202c strb.w r2, [r3, #44] ; 0x2c UPS.Flag_Present = true; 8028cce: f883 202d strb.w r2, [r3, #45] ; 0x2d UPS.cnt_err_ups = 0; 8028cd2: 2200 movs r2, #0 8028cd4: f883 202b strb.w r2, [r3, #43] ; 0x2b if(flUpdateLog){ 8028cd8: 4b74 ldr r3, [pc, #464] ; (8028eac ) 8028cda: 7819 ldrb r1, [r3, #0] 8028cdc: b111 cbz r1, 8028ce4 flUpdateLog = false; 8028cde: 701a strb r2, [r3, #0] log_add(data); 8028ce0: f000 fecc bl 8029a7c } data++; 8028ce4: 3401 adds r4, #1 memset(value, 0, 10); 8028ce6: 220a movs r2, #10 8028ce8: 2100 movs r1, #0 8028cea: a801 add r0, sp, #4 8028cec: f7f8 ff08 bl 8021b00 endValue = strpbrk(data," "); 8028cf0: 4620 mov r0, r4 8028cf2: 496f ldr r1, [pc, #444] ; (8028eb0 ) 8028cf4: f7f9 f9c6 bl 8022084 len = endValue - data; 8028cf8: 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); } 8028cfa: b2c6 uxtb r6, r0 data++; memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028cfc: 4632 mov r2, r6 8028cfe: 4621 mov r1, r4 8028d00: a801 add r0, sp, #4 8028d02: f7f9 f98d bl 8022020 data += (len + 1); UPS.VAC_in = atof(value); 8028d06: a801 add r0, sp, #4 8028d08: f7f8 fdd6 bl 80218b8 8028d0c: f7f7 ff3a bl 8020b84 <__aeabi_d2f> memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8028d10: 3601 adds r6, #1 8028d12: 19a6 adds r6, r4, r6 UPS.VAC_in = atof(value); 8028d14: 4c64 ldr r4, [pc, #400] ; (8028ea8 ) //TODO memset(value, 0, 10); 8028d16: 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); 8028d18: 6060 str r0, [r4, #4] //TODO memset(value, 0, 10); 8028d1a: 2100 movs r1, #0 8028d1c: a801 add r0, sp, #4 8028d1e: f7f8 feef bl 8021b00 endValue = strpbrk(data," "); 8028d22: 4630 mov r0, r6 8028d24: 4962 ldr r1, [pc, #392] ; (8028eb0 ) 8028d26: f7f9 f9ad bl 8022084 len = endValue - data; 8028d2a: 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); } 8028d2c: b2c5 uxtb r5, r0 //TODO memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028d2e: 4631 mov r1, r6 8028d30: 462a mov r2, r5 8028d32: a801 add r0, sp, #4 data += (len + 1); 8028d34: 3501 adds r5, #1 //TODO memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028d36: f7f9 f973 bl 8022020 data += (len + 1); 8028d3a: 1975 adds r5, r6, r5 memset(value, 0, 10); 8028d3c: 220a movs r2, #10 8028d3e: 2100 movs r1, #0 8028d40: a801 add r0, sp, #4 8028d42: f7f8 fedd bl 8021b00 endValue = strpbrk(data," "); 8028d46: 4628 mov r0, r5 8028d48: 4959 ldr r1, [pc, #356] ; (8028eb0 ) 8028d4a: f7f9 f99b bl 8022084 len = endValue - data; 8028d4e: 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); } 8028d50: fa5f f880 uxtb.w r8, r0 data += (len + 1); memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028d54: 4642 mov r2, r8 8028d56: 4629 mov r1, r5 8028d58: a801 add r0, sp, #4 8028d5a: f7f9 f961 bl 8022020 data += (len + 1); UPS.VAC_out = atof(value); 8028d5e: a801 add r0, sp, #4 8028d60: f7f8 fdaa bl 80218b8 8028d64: f7f7 ff0e bl 8020b84 <__aeabi_d2f> memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8028d68: f108 0801 add.w r8, r8, #1 8028d6c: 44a8 add r8, r5 UPS.VAC_out = atof(value); memset(value, 0, 10); 8028d6e: 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); 8028d70: 60a0 str r0, [r4, #8] memset(value, 0, 10); 8028d72: 2100 movs r1, #0 8028d74: a801 add r0, sp, #4 8028d76: f7f8 fec3 bl 8021b00 endValue = strpbrk(data," "); 8028d7a: 494d ldr r1, [pc, #308] ; (8028eb0 ) 8028d7c: 4640 mov r0, r8 8028d7e: f7f9 f981 bl 8022084 len = endValue - data; 8028d82: 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); } 8028d86: b2c7 uxtb r7, r0 UPS.VAC_out = atof(value); memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028d88: 463a mov r2, r7 8028d8a: 4641 mov r1, r8 8028d8c: a801 add r0, sp, #4 8028d8e: f7f9 f947 bl 8022020 data += (len + 1); UPS.Load = atoi(value); 8028d92: a801 add r0, sp, #4 8028d94: f7f8 fd94 bl 80218c0 memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8028d98: 3701 adds r7, #1 8028d9a: 4447 add r7, r8 UPS.Load = atoi(value); memset(value, 0, 10); 8028d9c: 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); 8028d9e: 7420 strb r0, [r4, #16] memset(value, 0, 10); 8028da0: 2100 movs r1, #0 8028da2: a801 add r0, sp, #4 8028da4: f7f8 feac bl 8021b00 endValue = strpbrk(data," "); 8028da8: 4941 ldr r1, [pc, #260] ; (8028eb0 ) 8028daa: 4638 mov r0, r7 8028dac: f7f9 f96a bl 8022084 len = endValue - data; 8028db0: 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); } 8028db2: b2c6 uxtb r6, r0 UPS.Load = atoi(value); memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028db4: 4632 mov r2, r6 8028db6: 4639 mov r1, r7 8028db8: a801 add r0, sp, #4 8028dba: f7f9 f931 bl 8022020 data += (len + 1); UPS.Freq_in = atof(value); 8028dbe: a801 add r0, sp, #4 8028dc0: f7f8 fd7a bl 80218b8 8028dc4: f7f7 fede bl 8020b84 <__aeabi_d2f> memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8028dc8: 3601 adds r6, #1 8028dca: 19be adds r6, r7, r6 UPS.Freq_in = atof(value); 8028dcc: 6020 str r0, [r4, #0] //TODO memset(value, 0, 10); 8028dce: 220a movs r2, #10 8028dd0: 2100 movs r1, #0 8028dd2: a801 add r0, sp, #4 8028dd4: f7f8 fe94 bl 8021b00 endValue = strpbrk(data," "); 8028dd8: 4630 mov r0, r6 8028dda: 4935 ldr r1, [pc, #212] ; (8028eb0 ) 8028ddc: f7f9 f952 bl 8022084 len = endValue - data; 8028de0: 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); } 8028de2: b2c5 uxtb r5, r0 //TODO memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028de4: 462a mov r2, r5 8028de6: 4631 mov r1, r6 8028de8: a801 add r0, sp, #4 8028dea: f7f9 f919 bl 8022020 data += (len + 1); UPS.SOC = 100*((atof(value)) - 1.6)/0.7; 8028dee: a801 add r0, sp, #4 8028df0: f7f8 fd62 bl 80218b8 8028df4: a328 add r3, pc, #160 ; (adr r3, 8028e98 ) 8028df6: e9d3 2300 ldrd r2, r3, [r3] 8028dfa: f7f7 fa2d bl 8020258 <__aeabi_dsub> 8028dfe: 2200 movs r2, #0 8028e00: 4b2c ldr r3, [pc, #176] ; (8028eb4 ) 8028e02: f7f7 fbdd bl 80205c0 <__aeabi_dmul> 8028e06: a326 add r3, pc, #152 ; (adr r3, 8028ea0 ) 8028e08: e9d3 2300 ldrd r2, r3, [r3] 8028e0c: f7f7 fd02 bl 8020814 <__aeabi_ddiv> 8028e10: f7f7 fe98 bl 8020b44 <__aeabi_d2uiz> //TODO memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8028e14: 3501 adds r5, #1 8028e16: 1975 adds r5, r6, r5 UPS.SOC = 100*((atof(value)) - 1.6)/0.7; 8028e18: 7460 strb r0, [r4, #17] memset(value, 0, 10); 8028e1a: 220a movs r2, #10 8028e1c: 2100 movs r1, #0 8028e1e: a801 add r0, sp, #4 8028e20: f7f8 fe6e bl 8021b00 endValue = strpbrk(data," "); 8028e24: 4628 mov r0, r5 8028e26: 4922 ldr r1, [pc, #136] ; (8028eb0 ) 8028e28: f7f9 f92c bl 8022084 len = endValue - data; 8028e2c: 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); } 8028e2e: b2c6 uxtb r6, r0 UPS.SOC = 100*((atof(value)) - 1.6)/0.7; memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028e30: 4632 mov r2, r6 8028e32: 4629 mov r1, r5 8028e34: a801 add r0, sp, #4 8028e36: f7f9 f8f3 bl 8022020 data += (len + 1); UPS.Temp = atof(value); 8028e3a: a801 add r0, sp, #4 8028e3c: f7f8 fd3c bl 80218b8 8028e40: f7f7 fea0 bl 8020b84 <__aeabi_d2f> memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8028e44: 3601 adds r6, #1 8028e46: 19ad adds r5, r5, r6 UPS.Temp = atof(value); 8028e48: 60e0 str r0, [r4, #12] memset(value, 0, 10); 8028e4a: 220a movs r2, #10 8028e4c: 2100 movs r1, #0 8028e4e: a801 add r0, sp, #4 8028e50: f7f8 fe56 bl 8021b00 endValue = strpbrk(data,"\r"); 8028e54: 4918 ldr r1, [pc, #96] ; (8028eb8 ) 8028e56: 4628 mov r0, r5 8028e58: f7f9 f914 bl 8022084 len = endValue - data; 8028e5c: 1b40 subs r0, r0, r5 8028e5e: b2c4 uxtb r4, r0 strncpy(value, data, len); 8028e60: 4629 mov r1, r5 8028e62: a801 add r0, sp, #4 8028e64: 4622 mov r2, r4 8028e66: f7f9 f8db bl 8022020 uint8_t stat = 0; for(i = 0; i < len; i ++) 8028e6a: 2300 movs r3, #0 memset(value, 0, 10); endValue = strpbrk(data,"\r"); len = endValue - data; strncpy(value, data, len); uint8_t stat = 0; 8028e6c: 4619 mov r1, r3 for(i = 0; i < len; i ++) 8028e6e: e009 b.n 8028e84 { stat |= (value[i] - 0x30) << (7-i); 8028e70: aa01 add r2, sp, #4 return false; return true; } void ups_status_response(char *data) 8028e72: 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); 8028e76: 5c9a ldrb r2, [r3, r2] 8028e78: 3a30 subs r2, #48 ; 0x30 8028e7a: fa02 f200 lsl.w r2, r2, r0 8028e7e: 4311 orrs r1, r2 8028e80: b2c9 uxtb r1, r1 8028e82: 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 ++) 8028e84: b2da uxtb r2, r3 8028e86: 42a2 cmp r2, r4 8028e88: d3f2 bcc.n 8028e70 { stat |= (value[i] - 0x30) << (7-i); } UPS.Status = stat; 8028e8a: 4b07 ldr r3, [pc, #28] ; (8028ea8 ) 8028e8c: 74d9 strb r1, [r3, #19] } 8028e8e: e8bd 81ff ldmia.w sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, pc} 8028e92: bf00 nop 8028e94: f3af 8000 nop.w 8028e98: 9999999a .word 0x9999999a 8028e9c: 3ff99999 .word 0x3ff99999 8028ea0: 66666666 .word 0x66666666 8028ea4: 3fe66666 .word 0x3fe66666 8028ea8: 2000cba8 .word 0x2000cba8 8028eac: 20000bc0 .word 0x20000bc0 8028eb0: 08039ade .word 0x08039ade 8028eb4: 40590000 .word 0x40590000 8028eb8: 08045b15 .word 0x08045b15 8028ebc: f3af 8000 nop.w 08028ec0 : void ups_info_response(char *data) { 8028ec0: b538 push {r3, r4, r5, lr} uint8_t i = 0; char *endValue; uint8_t len = 0; if(data[0] != '#') 8028ec2: 7803 ldrb r3, [r0, #0] 8028ec4: 2b23 cmp r3, #35 ; 0x23 8028ec6: d131 bne.n 8028f2c return; UPS.Present = true; 8028ec8: 4b19 ldr r3, [pc, #100] ; (8028f30 ) 8028eca: 2201 movs r2, #1 8028ecc: f883 202c strb.w r2, [r3, #44] ; 0x2c UPS.Flag_Present = true; 8028ed0: f883 202d strb.w r2, [r3, #45] ; 0x2d UPS.cnt_err_ups = 0; data++; data += 16; 8028ed4: 3011 adds r0, #17 if(data[0] != '#') return; UPS.Present = true; UPS.Flag_Present = true; UPS.cnt_err_ups = 0; 8028ed6: 2200 movs r2, #0 8028ed8: f883 202b strb.w r2, [r3, #43] ; 0x2b data++; data += 16; while(data[0] == ' '){ 8028edc: 4603 mov r3, r0 8028ede: 461c mov r4, r3 stat |= (value[i] - 0x30) << (7-i); } UPS.Status = stat; } void ups_info_response(char *data) 8028ee0: 1a1a subs r2, r3, r0 data++; data += 16; while(data[0] == ' '){ 8028ee2: 7821 ldrb r1, [r4, #0] 8028ee4: 3301 adds r3, #1 8028ee6: 2920 cmp r1, #32 stat |= (value[i] - 0x30) << (7-i); } UPS.Status = stat; } void ups_info_response(char *data) 8028ee8: b2d2 uxtb r2, r2 data++; data += 16; while(data[0] == ' '){ 8028eea: d0f8 beq.n 8028ede data ++; i ++; } if(i < 11){ 8028eec: 2a0a cmp r2, #10 8028eee: d80d bhi.n 8028f0c endValue = strpbrk(data," "); 8028ef0: 4620 mov r0, r4 8028ef2: 4910 ldr r1, [pc, #64] ; (8028f34 ) 8028ef4: f7f9 f8c6 bl 8022084 len = endValue - data; 8028ef8: 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); } 8028efa: b2c5 uxtb r5, r0 i ++; } if(i < 11){ endValue = strpbrk(data," "); len = endValue - data; strncpy(UPS.model, data, len); 8028efc: 4621 mov r1, r4 8028efe: 462a mov r2, r5 8028f00: 480d ldr r0, [pc, #52] ; (8028f38 ) data += (len + 1); 8028f02: 3501 adds r5, #1 i ++; } if(i < 11){ endValue = strpbrk(data," "); len = endValue - data; strncpy(UPS.model, data, len); 8028f04: f7f9 f88c bl 8022020 data += (len + 1); 8028f08: 1964 adds r4, r4, r5 8028f0a: e003 b.n 8028f14 } else { strcpy(UPS.model, "RTMP II"); 8028f0c: 480a ldr r0, [pc, #40] ; (8028f38 ) 8028f0e: 490b ldr r1, [pc, #44] ; (8028f3c ) 8028f10: f7f8 ff70 bl 8021df4 } endValue = strpbrk(data,"\r"); 8028f14: 4620 mov r0, r4 8028f16: 490a ldr r1, [pc, #40] ; (8028f40 ) 8028f18: f7f9 f8b4 bl 8022084 len = endValue - data; 8028f1c: 1b02 subs r2, r0, r4 strncpy(UPS.vertion, data, len); 8028f1e: 4809 ldr r0, [pc, #36] ; (8028f44 ) 8028f20: 4621 mov r1, r4 8028f22: b2d2 uxtb r2, r2 } 8028f24: 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); 8028f28: f7f9 b87a b.w 8022020 8028f2c: bd38 pop {r3, r4, r5, pc} 8028f2e: bf00 nop 8028f30: 2000cba8 .word 0x2000cba8 8028f34: 08039ade .word 0x08039ade 8028f38: 2000cbbd .word 0x2000cbbd 8028f3c: 08039ae0 .word 0x08039ae0 8028f40: 08045b15 .word 0x08045b15 8028f44: 2000cbc8 .word 0x2000cbc8 08028f48 : } void ups_remain_time_response(char *data) { 8028f48: b530 push {r4, r5, lr} char value[10]; if(data[0] != '(') 8028f4a: 7803 ldrb r3, [r0, #0] 8028f4c: 2b28 cmp r3, #40 ; 0x28 strncpy(UPS.vertion, data, len); } void ups_remain_time_response(char *data) { 8028f4e: b085 sub sp, #20 8028f50: 4605 mov r5, r0 char value[10]; if(data[0] != '(') 8028f52: d116 bne.n 8028f82 return; UPS.Present = true; 8028f54: 4c0c ldr r4, [pc, #48] ; (8028f88 ) 8028f56: 2301 movs r3, #1 UPS.Flag_Present = true; UPS.cnt_err_ups = 0; data++; memset(value, 0, 10); 8028f58: 220a movs r2, #10 if(data[0] != '(') return; UPS.Present = true; UPS.Flag_Present = true; UPS.cnt_err_ups = 0; 8028f5a: 2100 movs r1, #0 data++; memset(value, 0, 10); 8028f5c: a801 add r0, sp, #4 { char value[10]; if(data[0] != '(') return; UPS.Present = true; 8028f5e: f884 302c strb.w r3, [r4, #44] ; 0x2c UPS.Flag_Present = true; 8028f62: f884 302d strb.w r3, [r4, #45] ; 0x2d UPS.cnt_err_ups = 0; 8028f66: f884 102b strb.w r1, [r4, #43] ; 0x2b data++; memset(value, 0, 10); 8028f6a: f7f8 fdc9 bl 8021b00 strcpy(value, data); 8028f6e: 1c69 adds r1, r5, #1 8028f70: a801 add r0, sp, #4 8028f72: f7f8 ff3f bl 8021df4 UPS.work_time = atof(value); 8028f76: a801 add r0, sp, #4 8028f78: f7f8 fc9e bl 80218b8 8028f7c: f7f7 fde2 bl 8020b44 <__aeabi_d2uiz> 8028f80: 74a0 strb r0, [r4, #18] } 8028f82: b005 add sp, #20 8028f84: bd30 pop {r4, r5, pc} 8028f86: bf00 nop 8028f88: 2000cba8 .word 0x2000cba8 08028f8c : } return -1; } void request_task(void) { 8028f8c: b5f8 push {r3, r4, r5, r6, r7, lr} for(;;) { if(UPS.Present == true){ 8028f8e: 4c31 ldr r4, [pc, #196] ; (8029054 ) memset(UPS.model, 0, 11); memset(UPS.vertion, 0, 11); } } } if(megatec_send){ 8028f90: 4d31 ldr r5, [pc, #196] ; (8029058 ) if(UPS.Flag_Present == false) { if(UPS.cnt_err_ups != 2) UPS.cnt_err_ups++; else{ UPS.Freq_in = 0; 8028f92: 2700 movs r7, #0 void request_task(void) { for(;;) { if(UPS.Present == true){ 8028f94: f894 302c ldrb.w r3, [r4, #44] ; 0x2c 8028f98: b1fb cbz r3, 8028fda if(UPS.Flag_Present == false) 8028f9a: f894 602d ldrb.w r6, [r4, #45] ; 0x2d 8028f9e: b9e6 cbnz r6, 8028fda { if(UPS.cnt_err_ups != 2) 8028fa0: f894 302b ldrb.w r3, [r4, #43] ; 0x2b 8028fa4: 2b02 cmp r3, #2 8028fa6: d003 beq.n 8028fb0 UPS.cnt_err_ups++; 8028fa8: 3301 adds r3, #1 8028faa: f884 302b strb.w r3, [r4, #43] ; 0x2b 8028fae: e014 b.n 8028fda UPS.work_time = 0; UPS.Status = 0; UPS.Alarm = 0; UPS.Present = false; memset(UPS.model, 0, 11); 8028fb0: 4631 mov r1, r6 8028fb2: 220b movs r2, #11 8028fb4: 4829 ldr r0, [pc, #164] ; (802905c ) if(UPS.Flag_Present == false) { if(UPS.cnt_err_ups != 2) UPS.cnt_err_ups++; else{ UPS.Freq_in = 0; 8028fb6: 6027 str r7, [r4, #0] UPS.VAC_in = 0; 8028fb8: 6067 str r7, [r4, #4] UPS.VAC_out = 0; 8028fba: 60a7 str r7, [r4, #8] UPS.Temp = 0; 8028fbc: 60e7 str r7, [r4, #12] UPS.Load = 0; 8028fbe: 7426 strb r6, [r4, #16] UPS.SOC = 0; 8028fc0: 7466 strb r6, [r4, #17] UPS.work_time = 0; 8028fc2: 74a6 strb r6, [r4, #18] UPS.Status = 0; 8028fc4: 74e6 strb r6, [r4, #19] UPS.Alarm = 0; 8028fc6: 7526 strb r6, [r4, #20] UPS.Present = false; 8028fc8: f884 602c strb.w r6, [r4, #44] ; 0x2c memset(UPS.model, 0, 11); 8028fcc: f7f8 fd98 bl 8021b00 memset(UPS.vertion, 0, 11); 8028fd0: 4823 ldr r0, [pc, #140] ; (8029060 ) 8028fd2: 4631 mov r1, r6 8028fd4: 220b movs r2, #11 8028fd6: f7f8 fd93 bl 8021b00 } } } if(megatec_send){ 8028fda: 782b ldrb r3, [r5, #0] 8028fdc: b16b cbz r3, 8028ffa megatec_send= false; 8028fde: 2000 movs r0, #0 8028fe0: 7028 strb r0, [r5, #0] UPS.Flag_Present = false; 8028fe2: f884 002d strb.w r0, [r4, #45] ; 0x2d send_MegaTec_cmd(ups_status_req); 8028fe6: f7ff fe03 bl 8028bf0 if (ups_megatec_rx_pdu()) 8028fea: f7ff fe45 bl 8028c78 8028fee: b110 cbz r0, 8028ff6 void ups_megatec_process_pdu(cmdMegaTecEnums_t command) { switch(command) { case ups_status_req: ups_status_response(ups_pdu.data); 8028ff0: 481c ldr r0, [pc, #112] ; (8029064 ) 8028ff2: f7ff fe61 bl 8028cb8 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; 8028ff6: 2301 movs r3, #1 8028ff8: 702b strb r3, [r5, #0] } if(megatec_send){ 8028ffa: 782b ldrb r3, [r5, #0] 8028ffc: b19b cbz r3, 8029026 memset(ups_pdu.data, 0, UPS_PDU_MAX_LEN); 8028ffe: 2100 movs r1, #0 8029000: 2232 movs r2, #50 ; 0x32 8029002: 4818 ldr r0, [pc, #96] ; (8029064 ) 8029004: f7f8 fd7c bl 8021b00 megatec_send= false; 8029008: 2300 movs r3, #0 UPS.Flag_Present = false; send_MegaTec_cmd(ups_remain_time_reg); 802900a: 200b movs r0, #11 megatec_send=true; } if(megatec_send){ memset(ups_pdu.data, 0, UPS_PDU_MAX_LEN); megatec_send= false; 802900c: 702b strb r3, [r5, #0] UPS.Flag_Present = false; 802900e: f884 302d strb.w r3, [r4, #45] ; 0x2d send_MegaTec_cmd(ups_remain_time_reg); 8029012: f7ff fded bl 8028bf0 if (ups_megatec_rx_pdu()) 8029016: f7ff fe2f bl 8028c78 802901a: b110 cbz r0, 8029022 break; case ups_rating_info: break; case ups_remain_time_reg: ups_remain_time_response(ups_pdu.data); 802901c: 4811 ldr r0, [pc, #68] ; (8029064 ) 802901e: f7ff ff93 bl 8028f48 UPS.Flag_Present = false; send_MegaTec_cmd(ups_remain_time_reg); if (ups_megatec_rx_pdu()) ups_megatec_process_pdu(ups_remain_time_reg); megatec_send=true; 8029022: 2301 movs r3, #1 8029024: 702b strb r3, [r5, #0] } //vTaskDelay(100); if(megatec_send){ 8029026: 782b ldrb r3, [r5, #0] 8029028: b173 cbz r3, 8029048 megatec_send = false; 802902a: 2300 movs r3, #0 UPS.Flag_Present = false; send_MegaTec_cmd(ups_info); 802902c: 2009 movs r0, #9 megatec_send=true; } //vTaskDelay(100); if(megatec_send){ megatec_send = false; 802902e: 702b strb r3, [r5, #0] UPS.Flag_Present = false; 8029030: f884 302d strb.w r3, [r4, #45] ; 0x2d send_MegaTec_cmd(ups_info); 8029034: f7ff fddc bl 8028bf0 if (ups_megatec_rx_pdu()) 8029038: f7ff fe1e bl 8028c78 802903c: b110 cbz r0, 8029044 { case ups_status_req: ups_status_response(ups_pdu.data); break; case ups_info: ups_info_response(ups_pdu.data); 802903e: 4809 ldr r0, [pc, #36] ; (8029064 ) 8029040: f7ff ff3e bl 8028ec0 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; 8029044: 2301 movs r3, #1 8029046: 702b strb r3, [r5, #0] } vTaskDelay(1000); 8029048: f44f 707a mov.w r0, #1000 ; 0x3e8 802904c: f001 ffbe bl 802afcc } 8029050: e7a0 b.n 8028f94 8029052: bf00 nop 8029054: 2000cba8 .word 0x2000cba8 8029058: 20000662 .word 0x20000662 802905c: 2000cbbd .word 0x2000cbbd 8029060: 2000cbc8 .word 0x2000cbc8 8029064: 20000b1c .word 0x20000b1c 08029068 : break; } } int ups_metac_service_pdu(cmdMegaTecEnums_t command) { 8029068: b570 push {r4, r5, r6, lr} 802906a: 4606 mov r6, r0 while(!megatec_send) 802906c: 4c14 ldr r4, [pc, #80] ; (80290c0 ) 802906e: e002 b.n 8029076 { vTaskDelay(50); 8029070: 2032 movs r0, #50 ; 0x32 8029072: f001 ffab bl 802afcc } } int ups_metac_service_pdu(cmdMegaTecEnums_t command) { while(!megatec_send) 8029076: 7823 ldrb r3, [r4, #0] 8029078: 4d11 ldr r5, [pc, #68] ; (80290c0 ) 802907a: 2b00 cmp r3, #0 802907c: d0f8 beq.n 8029070 { vTaskDelay(50); } megatec_send = false; 802907e: 2300 movs r3, #0 send_MegaTec_cmd(command); 8029080: 4630 mov r0, r6 { while(!megatec_send) { vTaskDelay(50); } megatec_send = false; 8029082: 702b strb r3, [r5, #0] send_MegaTec_cmd(command); 8029084: f7ff fdb4 bl 8028bf0 if (ups_megatec_rx_pdu()) 8029088: f7ff fdf6 bl 8028c78 802908c: b190 cbz r0, 80290b4 { megatec_send = true; 802908e: 2401 movs r4, #1 if(strncmp(ups_pdu.data, "ACK", 3) == 0) 8029090: 480c ldr r0, [pc, #48] ; (80290c4 ) 8029092: 490d ldr r1, [pc, #52] ; (80290c8 ) } megatec_send = false; send_MegaTec_cmd(command); if (ups_megatec_rx_pdu()) { megatec_send = true; 8029094: 702c strb r4, [r5, #0] if(strncmp(ups_pdu.data, "ACK", 3) == 0) 8029096: 2203 movs r2, #3 8029098: f7f8 ff6c bl 8021f74 802909c: b168 cbz r0, 80290ba return 1; else if(strncmp(ups_pdu.data, "NCK", 3) == 0) 802909e: 490b ldr r1, [pc, #44] ; (80290cc ) 80290a0: 4808 ldr r0, [pc, #32] ; (80290c4 ) 80290a2: 2203 movs r2, #3 80290a4: f7f8 ff66 bl 8021f74 return 0; 80290a8: 2800 cmp r0, #0 80290aa: bf14 ite ne 80290ac: f04f 30ff movne.w r0, #4294967295 80290b0: 2000 moveq r0, #0 80290b2: bd70 pop {r4, r5, r6, pc} } return -1; 80290b4: f04f 30ff mov.w r0, #4294967295 80290b8: 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; 80290ba: 4620 mov r0, r4 else if(strncmp(ups_pdu.data, "NCK", 3) == 0) return 0; } return -1; } 80290bc: bd70 pop {r4, r5, r6, pc} 80290be: bf00 nop 80290c0: 20000662 .word 0x20000662 80290c4: 20000b1c .word 0x20000b1c 80290c8: 08039ae8 .word 0x08039ae8 80290cc: 08039aec .word 0x08039aec 080290d0 : vTaskDelay(1000); } } void ups_megatec_init(void) { 80290d0: b51f push {r0, r1, r2, r3, r4, lr} init_UPS_value(); 80290d2: f7ff fd69 bl 8028ba8 UPS.Present = true; 80290d6: 4b08 ldr r3, [pc, #32] ; (80290f8 ) xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); 80290d8: 4908 ldr r1, [pc, #32] ; (80290fc ) 80290da: 4809 ldr r0, [pc, #36] ; (8029100 ) } } void ups_megatec_init(void) { init_UPS_value(); UPS.Present = true; 80290dc: 2201 movs r2, #1 80290de: f883 202c strb.w r2, [r3, #44] ; 0x2c xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); 80290e2: 2300 movs r3, #0 80290e4: 9300 str r3, [sp, #0] 80290e6: 9301 str r3, [sp, #4] 80290e8: 9302 str r3, [sp, #8] 80290ea: 9303 str r3, [sp, #12] 80290ec: f44f 7280 mov.w r2, #256 ; 0x100 80290f0: f001 fcd2 bl 802aa98 } 80290f4: b005 add sp, #20 80290f6: bd00 pop {pc} 80290f8: 2000cba8 .word 0x2000cba8 80290fc: 08039af0 .word 0x08039af0 8029100: 08028f8d .word 0x08028f8d 08029104 : #include "trap_api.h" #include #include "FreeRTOS.h" #include "task.h" void Reboot(void) { 8029104: b508 push {r3, lr} SNMP_SendUserTrap(DEVICE_REBOOTED); 8029106: 2004 movs r0, #4 8029108: f00f f818 bl 803813c log_event_data(LOG_SYSTEM_BOOT, "Администратор"); 802910c: 2000 movs r0, #0 802910e: 4909 ldr r1, [pc, #36] ; (8029134 ) 8029110: f000 fca4 bl 8029a5c vTaskDelay(1010); 8029114: f240 30f2 movw r0, #1010 ; 0x3f2 8029118: f001 ff58 bl 802afcc 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"); 802911c: 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) | 8029120: 4a05 ldr r2, [pc, #20] ; (8029138 ) 8029122: 4b06 ldr r3, [pc, #24] ; (802913c ) 8029124: 68d1 ldr r1, [r2, #12] 8029126: f401 61e0 and.w r1, r1, #1792 ; 0x700 802912a: 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) | 802912c: 60d3 str r3, [r2, #12] 802912e: f3bf 8f4f dsb sy 8029132: e7fe b.n 8029132 8029134: 08039ab8 .word 0x08039ab8 8029138: e000ed00 .word 0xe000ed00 802913c: 05fa0004 .word 0x05fa0004 08029140 : #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; 8029140: 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; 8029142: e880 0006 stmia.w r0, {r1, r2} rbuf32->read_index = 0; 8029146: 6083 str r3, [r0, #8] rbuf32->write_index = 0; 8029148: 60c3 str r3, [r0, #12] 802914a: 4770 bx lr 0802914c : return full_space; } bool rbuf_isfull(rbuf_t *rbuf) { int r_tmp; if (rbuf->write_index == (rbuf->size - 1)) { 802914c: 6842 ldr r2, [r0, #4] 802914e: 68c3 ldr r3, [r0, #12] 8029150: 6880 ldr r0, [r0, #8] 8029152: 1e51 subs r1, r2, #1 8029154: 428b cmp r3, r1 r_tmp = rbuf->read_index + rbuf->size; 8029156: bf08 it eq 8029158: 1810 addeq r0, r2, r0 } else r_tmp = rbuf->read_index; if (r_tmp - rbuf->write_index == 1) 802915a: 1ac0 subs r0, r0, r3 return true; else return false; } 802915c: 1e42 subs r2, r0, #1 802915e: 4250 negs r0, r2 8029160: 4150 adcs r0, r2 8029162: 4770 bx lr 08029164 : rbuf64->read_index = 0; rbuf64->write_index = 0; } bool rbuf_isempty(rbuf_t *rbuf) { if (rbuf->read_index == rbuf->write_index) 8029164: 6883 ldr r3, [r0, #8] 8029166: 68c2 ldr r2, [r0, #12] 8029168: 4293 cmp r3, r2 802916a: d105 bne.n 8029178 802916c: e002 b.n 8029174 /* 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; 802916e: 2300 movs r3, #0 8029170: 6083 str r3, [r0, #8] 8029172: e00a b.n 802918a return true; } else return false; 8029174: 2000 movs r0, #0 8029176: 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++]; 8029178: 6802 ldr r2, [r0, #0] 802917a: f852 2023 ldr.w r2, [r2, r3, lsl #2] 802917e: 600a str r2, [r1, #0] /* swap the read pointer */ if (rbuf32->read_index == (rbuf32->size)) 8029180: 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++]; 8029182: 3301 adds r3, #1 /* swap the read pointer */ if (rbuf32->read_index == (rbuf32->size)) 8029184: 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++]; 8029186: 6083 str r3, [r0, #8] /* swap the read pointer */ if (rbuf32->read_index == (rbuf32->size)) 8029188: d0f1 beq.n 802916e rbuf32->read_index = 0; return true; 802918a: 2001 movs r0, #1 } else return false; } 802918c: 4770 bx lr 0802918e : /* * 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) { 802918e: b538 push {r3, r4, r5, lr} 8029190: 4604 mov r4, r0 8029192: 460d mov r5, r1 if(!rbuf_isfull(rbuf32)) 8029194: f7ff ffda bl 802914c 8029198: b950 cbnz r0, 80291b0 { rbuf32->buf_ptr[rbuf32->write_index++] = data; 802919a: 68e3 ldr r3, [r4, #12] 802919c: 6822 ldr r2, [r4, #0] 802919e: f842 5023 str.w r5, [r2, r3, lsl #2] /* swap the write pointer */ if (rbuf32->write_index == (rbuf32->size)) 80291a2: 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; 80291a4: 3301 adds r3, #1 /* swap the write pointer */ if (rbuf32->write_index == (rbuf32->size)) 80291a6: 4293 cmp r3, r2 */ bool rbuf32_put(rbuf_t *rbuf32, uint32_t data) { if(!rbuf_isfull(rbuf32)) { rbuf32->buf_ptr[rbuf32->write_index++] = data; 80291a8: 60e3 str r3, [r4, #12] /* swap the write pointer */ if (rbuf32->write_index == (rbuf32->size)) 80291aa: d103 bne.n 80291b4 rbuf32->write_index = 0; 80291ac: 60e0 str r0, [r4, #12] 80291ae: e001 b.n 80291b4 return true; } else return false; 80291b0: 2000 movs r0, #0 80291b2: 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)) 80291b4: 2001 movs r0, #1 rbuf32->write_index = 0; return true; } else return false; } 80291b6: bd38 pop {r3, r4, r5, pc} 080291b8 : #include #include /* Converts a hex character to its integer value */ char from_hex(char ch) { return isdigit(ch) ? ch - '0' : tolower(ch) - 'a' + 10; 80291b8: 4b08 ldr r3, [pc, #32] ; (80291dc ) 80291ba: 681b ldr r3, [r3, #0] 80291bc: 181b adds r3, r3, r0 80291be: 785b ldrb r3, [r3, #1] 80291c0: f003 0204 and.w r2, r3, #4 80291c4: b2d2 uxtb r2, r2 80291c6: b10a cbz r2, 80291cc 80291c8: 3830 subs r0, #48 ; 0x30 80291ca: e005 b.n 80291d8 80291cc: f003 0303 and.w r3, r3, #3 80291d0: 2b01 cmp r3, #1 80291d2: bf08 it eq 80291d4: 3020 addeq r0, #32 80291d6: 3857 subs r0, #87 ; 0x57 80291d8: b2c0 uxtb r0, r0 } 80291da: 4770 bx lr 80291dc: 20000000 .word 0x20000000 080291e0 : 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) { 80291e0: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 80291e4: 4607 mov r7, r0 80291e6: 460e mov r6, r1 char *pstr = inbuf, *buf = outbuf, *pbuf = buf; 80291e8: 4604 mov r4, r0 80291ea: 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++ = ' '; 80291ec: 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) { 80291f0: e01e b.n 8029230 if (*pstr == '%') { 80291f2: 2b25 cmp r3, #37 ; 0x25 80291f4: d112 bne.n 802921c if (pstr[1] && pstr[2]) { 80291f6: 7868 ldrb r0, [r5, #1] 80291f8: b1c0 cbz r0, 802922c 80291fa: f895 8002 ldrb.w r8, [r5, #2] 80291fe: f1b8 0f00 cmp.w r8, #0 8029202: d013 beq.n 802922c *pbuf++ = from_hex(pstr[1]) << 4 | from_hex(pstr[2]); 8029204: f7ff ffd8 bl 80291b8 8029208: 4682 mov sl, r0 802920a: 4640 mov r0, r8 802920c: f7ff ffd4 bl 80291b8 8029210: ea40 100a orr.w r0, r0, sl, lsl #4 8029214: f804 0b01 strb.w r0, [r4], #1 pstr += 2; 8029218: 3502 adds r5, #2 802921a: e007 b.n 802922c } } else if (*pstr == '+') { 802921c: 2b2b cmp r3, #43 ; 0x2b 802921e: f104 0201 add.w r2, r4, #1 *pbuf++ = ' '; 8029222: bf0c ite eq 8029224: f884 9000 strbeq.w r9, [r4] } else { *pbuf++ = *pstr; 8029228: 7023 strbne r3, [r4, #0] 802922a: 4614 mov r4, r2 } pstr++; 802922c: 3501 adds r5, #1 outlen--; 802922e: 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) { 8029230: 782b ldrb r3, [r5, #0] 8029232: b10b cbz r3, 8029238 8029234: 2e01 cmp r6, #1 8029236: d8dc bhi.n 80291f2 *pbuf++ = *pstr; } pstr++; outlen--; } *pbuf = '\0'; 8029238: 2300 movs r3, #0 802923a: 7023 strb r3, [r4, #0] return buf; } 802923c: 4638 mov r0, r7 802923e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 8029242: 0000 movs r0, r0 08029244 : /** * @brief Мониторинг бита DI0 state */ void UPS_DI0Monitor(void) { 8029244: b510 push {r4, lr} static bool isValueRecv = false; static uint8_t DI0OldState = 0; uint8_t DI0StateCurrent; DI0StateCurrent = get_state_din_outs(DIN1); 8029246: 2006 movs r0, #6 8029248: f7ff fca6 bl 8028b98 if (!isValueRecv) { 802924c: 4a16 ldr r2, [pc, #88] ; (80292a8 ) 802924e: 4b17 ldr r3, [pc, #92] ; (80292ac ) 8029250: 7811 ldrb r1, [r2, #0] { static bool isValueRecv = false; static uint8_t DI0OldState = 0; uint8_t DI0StateCurrent; DI0StateCurrent = get_state_din_outs(DIN1); 8029252: 4604 mov r4, r0 if (!isValueRecv) { 8029254: b961 cbnz r1, 8029270 isValueRecv = true; 8029256: 2101 movs r1, #1 8029258: 7011 strb r1, [r2, #0] DI0OldState = DI0StateCurrent; 802925a: 7018 strb r0, [r3, #0] if (!DI0StateCurrent){ 802925c: bb18 cbnz r0, 80292a6 log_event_data(LOG_ALARM_DIO, "Авария"); 802925e: 2008 movs r0, #8 8029260: 4913 ldr r1, [pc, #76] ; (80292b0 ) 8029262: f000 fbfb bl 8029a5c SNMP_SendUserTrap(DI0_ALARM); 8029266: 2006 movs r0, #6 } } } DI0OldState = DI0StateCurrent; } 8029268: 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); 802926c: f00e bf66 b.w 803813c } return; } if (!DI0StateCurrent) 8029270: b910 cbnz r0, 8029278 flCriticalAlarm = true; 8029272: 4a10 ldr r2, [pc, #64] ; (80292b4 ) 8029274: 2101 movs r1, #1 8029276: 7011 strb r1, [r2, #0] // Значение параметра изменилось if (DI0StateCurrent != DI0OldState) 8029278: 781b ldrb r3, [r3, #0] 802927a: 42a3 cmp r3, r4 802927c: d011 beq.n 80292a2 { if(sSettings.sInOuts.din_type_act[0] == SNMP_TRAP) 802927e: 4b0e ldr r3, [pc, #56] ; (80292b8 ) 8029280: f893 3376 ldrb.w r3, [r3, #886] ; 0x376 8029284: 2b02 cmp r3, #2 8029286: d10c bne.n 80292a2 { if (DI0StateCurrent){ log_event_data(LOG_ALARM_DIO, "Норма"); 8029288: 2008 movs r0, #8 // Значение параметра изменилось if (DI0StateCurrent != DI0OldState) { if(sSettings.sInOuts.din_type_act[0] == SNMP_TRAP) { if (DI0StateCurrent){ 802928a: b124 cbz r4, 8029296 log_event_data(LOG_ALARM_DIO, "Норма"); 802928c: 490b ldr r1, [pc, #44] ; (80292bc ) 802928e: f000 fbe5 bl 8029a5c SNMP_SendUserTrap(DI0_NORM); 8029292: 2005 movs r0, #5 8029294: e003 b.n 802929e } else{ log_event_data(LOG_ALARM_DIO, "Авария"); 8029296: 4906 ldr r1, [pc, #24] ; (80292b0 ) 8029298: f000 fbe0 bl 8029a5c SNMP_SendUserTrap(DI0_ALARM); 802929c: 2006 movs r0, #6 802929e: f00e ff4d bl 803813c } } } DI0OldState = DI0StateCurrent; 80292a2: 4b02 ldr r3, [pc, #8] ; (80292ac ) 80292a4: 701c strb r4, [r3, #0] 80292a6: bd10 pop {r4, pc} 80292a8: 20000b57 .word 0x20000b57 80292ac: 20000b55 .word 0x20000b55 80292b0: 08039b1f .word 0x08039b1f 80292b4: 20000b5e .word 0x20000b5e 80292b8: 2000cfc4 .word 0x2000cfc4 80292bc: 08039b2c .word 0x08039b2c 080292c0 : /** * @brief Мониторинг бита CriticalAlarm */ void UPS_CriticalAlarmMonitor(void) { 80292c0: b5f0 push {r4, r5, r6, r7, lr} 80292c2: b089 sub sp, #36 ; 0x24 static uint8_t OldRO2type_Sourse = 0; uint8_t CurrRO2type_Sourse = 0; uint8_t CurrRO1type_Sourse = 0; char str[30]; memset(str, 0, 30); 80292c4: 2100 movs r1, #0 80292c6: 4668 mov r0, sp 80292c8: 221e movs r2, #30 80292ca: f7f8 fc19 bl 8021b00 CurrRO1type_Sourse = sSettings.sInOuts.ro_type_source[0]; 80292ce: 4b45 ldr r3, [pc, #276] ; (80293e4 ) 80292d0: f893 5374 ldrb.w r5, [r3, #884] ; 0x374 CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; 80292d4: f893 7375 ldrb.w r7, [r3, #885] ; 0x375 CriticalAlarmCurrent = flCriticalAlarm; 80292d8: 4b43 ldr r3, [pc, #268] ; (80293e8 ) 80292da: 781c ldrb r4, [r3, #0] if (!isValueRecv) { 80292dc: 4b43 ldr r3, [pc, #268] ; (80293ec ) 80292de: 7819 ldrb r1, [r3, #0] 80292e0: bb29 cbnz r1, 802932e isValueRecv = true; 80292e2: 2201 movs r2, #1 80292e4: 701a strb r2, [r3, #0] CriticalAlarmOldState = CriticalAlarmCurrent; 80292e6: 4b42 ldr r3, [pc, #264] ; (80293f0 ) 80292e8: 701c strb r4, [r3, #0] OldRO0type_Sourse = CurrRO1type_Sourse; 80292ea: 4b42 ldr r3, [pc, #264] ; (80293f4 ) 80292ec: 701d strb r5, [r3, #0] OldRO2type_Sourse = CurrRO2type_Sourse; 80292ee: 4b42 ldr r3, [pc, #264] ; (80293f8 ) if(OldRO0type_Sourse == CRITICAL){ 80292f0: 4295 cmp r5, r2 if (!isValueRecv) { isValueRecv = true; CriticalAlarmOldState = CriticalAlarmCurrent; OldRO0type_Sourse = CurrRO1type_Sourse; OldRO2type_Sourse = CurrRO2type_Sourse; 80292f2: 701f strb r7, [r3, #0] if(OldRO0type_Sourse == CRITICAL){ 80292f4: d10a bne.n 802930c if(CriticalAlarmCurrent){ 80292f6: b14c cbz r4, 802930c SetROInt(1, 0); 80292f8: 4628 mov r0, r5 80292fa: f7ff f91a bl 8028532 SNMP_SendUserTrap(DO0_TOGGLED); 80292fe: 2007 movs r0, #7 8029300: f00e ff1c bl 803813c log_event_data(LOG_DO0_STATE, "Замкнуто"); 8029304: 2009 movs r0, #9 8029306: 493d ldr r1, [pc, #244] ; (80293fc ) 8029308: f000 fba8 bl 8029a5c } } if(OldRO2type_Sourse == CRITICAL){ 802930c: 4b3a ldr r3, [pc, #232] ; (80293f8 ) 802930e: 7818 ldrb r0, [r3, #0] 8029310: 2801 cmp r0, #1 8029312: d165 bne.n 80293e0 if(CriticalAlarmCurrent){ 8029314: 2c00 cmp r4, #0 8029316: d063 beq.n 80293e0 SetROInt(1, 1); 8029318: 4601 mov r1, r0 802931a: f7ff f90a bl 8028532 SNMP_SendUserTrap(DO1_TOGGLED); 802931e: 2008 movs r0, #8 8029320: f00e ff0c bl 803813c log_event_data(LOG_DO1_STATE, "Замкнуто"); 8029324: 200a movs r0, #10 8029326: 4935 ldr r1, [pc, #212] ; (80293fc ) 8029328: f000 fb98 bl 8029a5c 802932c: e058 b.n 80293e0 } } return; } if(CriticalAlarmCurrent){ 802932e: b154 cbz r4, 8029346 if (UPS.Present) 8029330: 4b33 ldr r3, [pc, #204] ; (8029400 ) 8029332: f893 302c ldrb.w r3, [r3, #44] ; 0x2c LED_Toggle(LED_MAJOR_R); 8029336: 200b movs r0, #11 } return; } if(CriticalAlarmCurrent){ if (UPS.Present) 8029338: b113 cbz r3, 8029340 LED_Toggle(LED_MAJOR_R); 802933a: f7ff fbb3 bl 8028aa4 802933e: e005 b.n 802934c else LED_On(LED_MAJOR_R); 8029340: f7ff fb76 bl 8028a30 8029344: e002 b.n 802934c } else{ LED_Off(LED_MAJOR_R); 8029346: 200b movs r0, #11 8029348: f7ff fb75 bl 8028a36 } // Значение параметра изменилось if (CriticalAlarmCurrent != CriticalAlarmOldState) 802934c: 4b28 ldr r3, [pc, #160] ; (80293f0 ) 802934e: 781b ldrb r3, [r3, #0] 8029350: 42a3 cmp r3, r4 8029352: d03f beq.n 80293d4 { if(OldRO0type_Sourse == CRITICAL){ 8029354: 4b27 ldr r3, [pc, #156] ; (80293f4 ) 8029356: 781e ldrb r6, [r3, #0] 8029358: 2e01 cmp r6, #1 802935a: d11b bne.n 8029394 memset(str, 0, 30); 802935c: 4668 mov r0, sp 802935e: 2100 movs r1, #0 8029360: 221e movs r2, #30 8029362: f7f8 fbcd bl 8021b00 if(CriticalAlarmCurrent){ 8029366: b134 cbz r4, 8029376 SetROInt(1, 0); 8029368: 4630 mov r0, r6 802936a: 2100 movs r1, #0 802936c: f7ff f8e1 bl 8028532 strcat(str, "Замкнуто"); 8029370: 4668 mov r0, sp 8029372: 4922 ldr r1, [pc, #136] ; (80293fc ) 8029374: e005 b.n 8029382 } else{ SetROInt(0, 0); 8029376: 4620 mov r0, r4 8029378: 4621 mov r1, r4 802937a: f7ff f8da bl 8028532 strcat(str, "Разомкнуто"); 802937e: 4921 ldr r1, [pc, #132] ; (8029404 ) 8029380: 4668 mov r0, sp 8029382: f7f8 fc23 bl 8021bcc } SNMP_SendUserTrap(DO0_TOGGLED); 8029386: 2007 movs r0, #7 8029388: f00e fed8 bl 803813c log_event_data(LOG_DO0_STATE, str); 802938c: 2009 movs r0, #9 802938e: 4669 mov r1, sp 8029390: f000 fb64 bl 8029a5c } if(OldRO2type_Sourse == CRITICAL){ 8029394: 4b18 ldr r3, [pc, #96] ; (80293f8 ) 8029396: 781e ldrb r6, [r3, #0] 8029398: 2e01 cmp r6, #1 802939a: d11b bne.n 80293d4 memset(str, 0, 30); 802939c: 4668 mov r0, sp 802939e: 2100 movs r1, #0 80293a0: 221e movs r2, #30 80293a2: f7f8 fbad bl 8021b00 if(CriticalAlarmCurrent){ 80293a6: b134 cbz r4, 80293b6 SetROInt(1, 1); 80293a8: 4630 mov r0, r6 80293aa: 4631 mov r1, r6 80293ac: f7ff f8c1 bl 8028532 strcat(str, "Замкнуто"); 80293b0: 4668 mov r0, sp 80293b2: 4912 ldr r1, [pc, #72] ; (80293fc ) 80293b4: e005 b.n 80293c2 } else{ SetROInt(0, 1); 80293b6: 4620 mov r0, r4 80293b8: 4631 mov r1, r6 80293ba: f7ff f8ba bl 8028532 strcat(str, "Разомкнуто"); 80293be: 4911 ldr r1, [pc, #68] ; (8029404 ) 80293c0: 4668 mov r0, sp 80293c2: f7f8 fc03 bl 8021bcc } SNMP_SendUserTrap(DO1_TOGGLED); 80293c6: 2008 movs r0, #8 80293c8: f00e feb8 bl 803813c log_event_data(LOG_DO1_STATE, str); 80293cc: 200a movs r0, #10 80293ce: 4669 mov r1, sp 80293d0: f000 fb44 bl 8029a5c SNMP_SendUserTrap(DO1_TOGGLED); log_event_data(LOG_DO1_STATE, str); } } OldRO0type_Sourse = CurrRO1type_Sourse; 80293d4: 4b07 ldr r3, [pc, #28] ; (80293f4 ) 80293d6: 701d strb r5, [r3, #0] OldRO2type_Sourse = CurrRO2type_Sourse; 80293d8: 4b07 ldr r3, [pc, #28] ; (80293f8 ) 80293da: 701f strb r7, [r3, #0] CriticalAlarmOldState = CriticalAlarmCurrent; 80293dc: 4b04 ldr r3, [pc, #16] ; (80293f0 ) 80293de: 701c strb r4, [r3, #0] } 80293e0: b009 add sp, #36 ; 0x24 80293e2: bdf0 pop {r4, r5, r6, r7, pc} 80293e4: 2000cfc4 .word 0x2000cfc4 80293e8: 20000b5e .word 0x20000b5e 80293ec: 20000b5d .word 0x20000b5d 80293f0: 20000b5a .word 0x20000b5a 80293f4: 20000b66 .word 0x20000b66 80293f8: 20000b54 .word 0x20000b54 80293fc: 08039b37 .word 0x08039b37 8029400: 2000cba8 .word 0x2000cba8 8029404: 08039b48 .word 0x08039b48 08029408 : /** * @brief Мониторинг бита NonCriticalAlarm */ void UPS_NonCriticalAlarmMonitor(void) { 8029408: b5f0 push {r4, r5, r6, r7, lr} 802940a: b089 sub sp, #36 ; 0x24 static uint8_t OldRO0type_Sourse = 0; static uint8_t OldRO2type_Sourse = 0; uint8_t CurrRO2type_Sourse = 0; uint8_t CurrRO1type_Sourse = 0; char str[30]; memset(str, 0, 30); 802940c: 2100 movs r1, #0 802940e: 221e movs r2, #30 8029410: 4668 mov r0, sp 8029412: f7f8 fb75 bl 8021b00 CurrRO1type_Sourse = sSettings.sInOuts.ro_type_source[0]; CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; NonCriticalAlarmCurrent = flNonCriticalAlarm; if (!isValueRecv) { 8029416: 4f3d ldr r7, [pc, #244] ; (802950c ) uint8_t CurrRO2type_Sourse = 0; uint8_t CurrRO1type_Sourse = 0; char str[30]; memset(str, 0, 30); CurrRO1type_Sourse = sSettings.sInOuts.ro_type_source[0]; 8029418: 4b3d ldr r3, [pc, #244] ; (8029510 ) CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; NonCriticalAlarmCurrent = flNonCriticalAlarm; if (!isValueRecv) { 802941a: 7839 ldrb r1, [r7, #0] uint8_t CurrRO2type_Sourse = 0; uint8_t CurrRO1type_Sourse = 0; char str[30]; memset(str, 0, 30); CurrRO1type_Sourse = sSettings.sInOuts.ro_type_source[0]; 802941c: f893 5374 ldrb.w r5, [r3, #884] ; 0x374 CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; 8029420: f893 6375 ldrb.w r6, [r3, #885] ; 0x375 NonCriticalAlarmCurrent = flNonCriticalAlarm; 8029424: 4b3b ldr r3, [pc, #236] ; (8029514 ) 8029426: 4a3c ldr r2, [pc, #240] ; (8029518 ) 8029428: 781c ldrb r4, [r3, #0] 802942a: 4b3c ldr r3, [pc, #240] ; (802951c ) if (!isValueRecv) { 802942c: bb19 cbnz r1, 8029476 isValueRecv = true; NonCriticalAlarmOldState = NonCriticalAlarmCurrent; OldRO0type_Sourse = CurrRO1type_Sourse; 802942e: 701d strb r5, [r3, #0] OldRO2type_Sourse = CurrRO2type_Sourse; 8029430: 4b3b ldr r3, [pc, #236] ; (8029520 ) CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; NonCriticalAlarmCurrent = flNonCriticalAlarm; if (!isValueRecv) { isValueRecv = true; NonCriticalAlarmOldState = NonCriticalAlarmCurrent; 8029432: 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; 8029434: 2001 movs r0, #1 NonCriticalAlarmOldState = NonCriticalAlarmCurrent; OldRO0type_Sourse = CurrRO1type_Sourse; OldRO2type_Sourse = CurrRO2type_Sourse; if(OldRO0type_Sourse == NON_CRITICAL){ 8029436: 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; 8029438: 7038 strb r0, [r7, #0] NonCriticalAlarmOldState = NonCriticalAlarmCurrent; OldRO0type_Sourse = CurrRO1type_Sourse; OldRO2type_Sourse = CurrRO2type_Sourse; 802943a: 701e strb r6, [r3, #0] if(OldRO0type_Sourse == NON_CRITICAL){ 802943c: d109 bne.n 8029452 if(NonCriticalAlarmCurrent){ 802943e: b144 cbz r4, 8029452 SetROInt(1, 0); 8029440: f7ff f877 bl 8028532 SNMP_SendUserTrap(DO0_TOGGLED); 8029444: 2007 movs r0, #7 8029446: f00e fe79 bl 803813c log_event_data(LOG_DO0_STATE, "Замкнуто"); 802944a: 2009 movs r0, #9 802944c: 4935 ldr r1, [pc, #212] ; (8029524 ) 802944e: f000 fb05 bl 8029a5c } } if(OldRO2type_Sourse == NON_CRITICAL){ 8029452: 4b33 ldr r3, [pc, #204] ; (8029520 ) 8029454: 781b ldrb r3, [r3, #0] 8029456: 2b02 cmp r3, #2 8029458: d155 bne.n 8029506 if(NonCriticalAlarmCurrent){ 802945a: 2c00 cmp r4, #0 802945c: d053 beq.n 8029506 SetROInt(1, 1); 802945e: 2001 movs r0, #1 8029460: 4601 mov r1, r0 8029462: f7ff f866 bl 8028532 SNMP_SendUserTrap(DO1_TOGGLED); 8029466: 2008 movs r0, #8 8029468: f00e fe68 bl 803813c log_event_data(LOG_DO1_STATE, "Замкнуто"); 802946c: 200a movs r0, #10 802946e: 492d ldr r1, [pc, #180] ; (8029524 ) 8029470: f000 faf4 bl 8029a5c 8029474: e047 b.n 8029506 } return; } // Значение параметра изменилось if (NonCriticalAlarmCurrent != NonCriticalAlarmOldState) 8029476: 7812 ldrb r2, [r2, #0] 8029478: 42a2 cmp r2, r4 802947a: d03e beq.n 80294fa { if(OldRO0type_Sourse == NON_CRITICAL){ 802947c: 781b ldrb r3, [r3, #0] 802947e: 2b02 cmp r3, #2 8029480: d11b bne.n 80294ba memset(str, 0, 30); 8029482: 4668 mov r0, sp 8029484: 2100 movs r1, #0 8029486: 221e movs r2, #30 8029488: f7f8 fb3a bl 8021b00 if(NonCriticalAlarmCurrent){ 802948c: b134 cbz r4, 802949c SetROInt(1, 0); 802948e: 2001 movs r0, #1 8029490: 2100 movs r1, #0 8029492: f7ff f84e bl 8028532 strcat(str, "Замкнуто"); 8029496: 4668 mov r0, sp 8029498: 4922 ldr r1, [pc, #136] ; (8029524 ) 802949a: e005 b.n 80294a8 } else{ SetROInt(0, 0); 802949c: 4620 mov r0, r4 802949e: 4621 mov r1, r4 80294a0: f7ff f847 bl 8028532 strcat(str, "Разомкнуто"); 80294a4: 4920 ldr r1, [pc, #128] ; (8029528 ) 80294a6: 4668 mov r0, sp 80294a8: f7f8 fb90 bl 8021bcc } SNMP_SendUserTrap(DO0_TOGGLED); 80294ac: 2007 movs r0, #7 80294ae: f00e fe45 bl 803813c log_event_data(LOG_DO0_STATE, str); 80294b2: 2009 movs r0, #9 80294b4: 4669 mov r1, sp 80294b6: f000 fad1 bl 8029a5c } if(OldRO2type_Sourse == NON_CRITICAL){ 80294ba: 4b19 ldr r3, [pc, #100] ; (8029520 ) 80294bc: 781b ldrb r3, [r3, #0] 80294be: 2b02 cmp r3, #2 80294c0: d11b bne.n 80294fa memset(str, 0, 30); 80294c2: 4668 mov r0, sp 80294c4: 2100 movs r1, #0 80294c6: 221e movs r2, #30 80294c8: f7f8 fb1a bl 8021b00 if(NonCriticalAlarmCurrent){ 80294cc: b134 cbz r4, 80294dc SetROInt(1, 1); 80294ce: 2001 movs r0, #1 80294d0: 4601 mov r1, r0 80294d2: f7ff f82e bl 8028532 strcat(str, "Разомкнуто"); 80294d6: 4668 mov r0, sp 80294d8: 4913 ldr r1, [pc, #76] ; (8029528 ) 80294da: e005 b.n 80294e8 } else{ SetROInt(0, 1); 80294dc: 4620 mov r0, r4 80294de: 2101 movs r1, #1 80294e0: f7ff f827 bl 8028532 strcat(str, "Замкнуто"); 80294e4: 490f ldr r1, [pc, #60] ; (8029524 ) 80294e6: 4668 mov r0, sp 80294e8: f7f8 fb70 bl 8021bcc } SNMP_SendUserTrap(DO1_TOGGLED); 80294ec: 2008 movs r0, #8 80294ee: f00e fe25 bl 803813c log_event_data(LOG_DO1_STATE, str); 80294f2: 200a movs r0, #10 80294f4: 4669 mov r1, sp 80294f6: f000 fab1 bl 8029a5c SNMP_SendUserTrap(DO1_TOGGLED); log_event_data(LOG_DO1_STATE, str); } } OldRO0type_Sourse = CurrRO1type_Sourse; 80294fa: 4b08 ldr r3, [pc, #32] ; (802951c ) 80294fc: 701d strb r5, [r3, #0] OldRO2type_Sourse = CurrRO2type_Sourse; 80294fe: 4b08 ldr r3, [pc, #32] ; (8029520 ) 8029500: 701e strb r6, [r3, #0] NonCriticalAlarmOldState = NonCriticalAlarmCurrent; 8029502: 4b05 ldr r3, [pc, #20] ; (8029518 ) 8029504: 701c strb r4, [r3, #0] } 8029506: b009 add sp, #36 ; 0x24 8029508: bdf0 pop {r4, r5, r6, r7, pc} 802950a: bf00 nop 802950c: 20000b62 .word 0x20000b62 8029510: 2000cfc4 .word 0x2000cfc4 8029514: 20000b64 .word 0x20000b64 8029518: 20000b5c .word 0x20000b5c 802951c: 20000b56 .word 0x20000b56 8029520: 20000b59 .word 0x20000b59 8029524: 08039b37 .word 0x08039b37 8029528: 08039b48 .word 0x08039b48 0802952c : /** * @brief Мониторинг бита LainFail */ void UPS_LineFailMonitor(void) { 802952c: b538 push {r3, r4, r5, lr} static bool isValueRecv = false; static uint8_t lineFailOldState = 0; uint8_t lineFailCurrent; lineFailCurrent = (UPS.Status >> 7) & 0x01; 802952e: 4b15 ldr r3, [pc, #84] ; (8029584 ) 8029530: 4d15 ldr r5, [pc, #84] ; (8029588 ) 8029532: 7cdc ldrb r4, [r3, #19] if (!isValueRecv) { 8029534: 4b15 ldr r3, [pc, #84] ; (802958c ) 8029536: 781a ldrb r2, [r3, #0] { static bool isValueRecv = false; static uint8_t lineFailOldState = 0; uint8_t lineFailCurrent; lineFailCurrent = (UPS.Status >> 7) & 0x01; 8029538: 09e4 lsrs r4, r4, #7 if (!isValueRecv) { 802953a: b962 cbnz r2, 8029556 isValueRecv = true; 802953c: 2201 movs r2, #1 802953e: 701a strb r2, [r3, #0] lineFailOldState = lineFailCurrent; 8029540: 702c strb r4, [r5, #0] if (lineFailCurrent){ 8029542: b1ec cbz r4, 8029580 log_event_data(LOG_ALARM_LINE, "Авария"); 8029544: 200c movs r0, #12 8029546: 4912 ldr r1, [pc, #72] ; (8029590 ) 8029548: f000 fa88 bl 8029a5c SNMP_SendUserTrap(LINE_ALARM); 802954c: 200b movs r0, #11 SNMP_SendUserTrap(LINE_NORM); } } lineFailOldState = lineFailCurrent; } 802954e: 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); 8029552: f00e bdf3 b.w 803813c } return; } if (lineFailCurrent) 8029556: b114 cbz r4, 802955e flCriticalAlarm = true; 8029558: 4b0e ldr r3, [pc, #56] ; (8029594 ) 802955a: 2201 movs r2, #1 802955c: 701a strb r2, [r3, #0] // Значение параметра изменилось if (lineFailCurrent != lineFailOldState) 802955e: 782b ldrb r3, [r5, #0] 8029560: 42a3 cmp r3, r4 8029562: d00c beq.n 802957e { if (lineFailCurrent){ log_event_data(LOG_ALARM_LINE, "Авария"); 8029564: 200c movs r0, #12 flCriticalAlarm = true; // Значение параметра изменилось if (lineFailCurrent != lineFailOldState) { if (lineFailCurrent){ 8029566: b124 cbz r4, 8029572 log_event_data(LOG_ALARM_LINE, "Авария"); 8029568: 4909 ldr r1, [pc, #36] ; (8029590 ) 802956a: f000 fa77 bl 8029a5c SNMP_SendUserTrap(LINE_ALARM); 802956e: 200b movs r0, #11 8029570: e003 b.n 802957a } else{ log_event_data(LOG_ALARM_LINE, "Норма"); 8029572: 4909 ldr r1, [pc, #36] ; (8029598 ) 8029574: f000 fa72 bl 8029a5c SNMP_SendUserTrap(LINE_NORM); 8029578: 200c movs r0, #12 802957a: f00e fddf bl 803813c } } lineFailOldState = lineFailCurrent; 802957e: 702c strb r4, [r5, #0] 8029580: bd38 pop {r3, r4, r5, pc} 8029582: bf00 nop 8029584: 2000cba8 .word 0x2000cba8 8029588: 20000b67 .word 0x20000b67 802958c: 20000b61 .word 0x20000b61 8029590: 08039b1f .word 0x08039b1f 8029594: 20000b5e .word 0x20000b5e 8029598: 08039b2c .word 0x08039b2c 0802959c : /** * @brief Мониторинг бита LowBat */ void UPS_LowBatMonitor(void) { 802959c: b538 push {r3, r4, r5, lr} static bool isValueRecv = false; static uint8_t lowBatOldState = 0; uint8_t lowBatCurrent; if((UPS.Status >> 7) & 0x01) 802959e: 4b17 ldr r3, [pc, #92] ; (80295fc ) 80295a0: 4d17 ldr r5, [pc, #92] ; (8029600 ) 80295a2: 7cdb ldrb r3, [r3, #19] 80295a4: 09dc lsrs r4, r3, #7 lowBatCurrent = (UPS.Status >> 6) & 0x01; 80295a6: bf18 it ne 80295a8: f3c3 1480 ubfxne r4, r3, #6, #1 else lowBatCurrent = 0; if (!isValueRecv) { 80295ac: 4b15 ldr r3, [pc, #84] ; (8029604 ) 80295ae: 781a ldrb r2, [r3, #0] 80295b0: b962 cbnz r2, 80295cc isValueRecv = true; 80295b2: 2201 movs r2, #1 80295b4: 701a strb r2, [r3, #0] lowBatOldState = lowBatCurrent; 80295b6: 702c strb r4, [r5, #0] if (lowBatCurrent){ 80295b8: b1f4 cbz r4, 80295f8 log_event_data(LOG_ALARM_LOW_BAT, "Авария"); 80295ba: 200d movs r0, #13 80295bc: 4912 ldr r1, [pc, #72] ; (8029608 ) 80295be: f000 fa4d bl 8029a5c SNMP_SendUserTrap(LOW_BAT_ALARM); 80295c2: 200d movs r0, #13 log_event_data(LOG_ALARM_LOW_BAT, "Норма"); } } lowBatOldState = lowBatCurrent; } 80295c4: 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); 80295c8: f00e bdb8 b.w 803813c } return; } if (lowBatCurrent) 80295cc: b114 cbz r4, 80295d4 flNonCriticalAlarm = true; 80295ce: 4b0f ldr r3, [pc, #60] ; (802960c ) 80295d0: 2201 movs r2, #1 80295d2: 701a strb r2, [r3, #0] // Значение параметра изменилось if (lowBatCurrent != lowBatOldState) 80295d4: 782b ldrb r3, [r5, #0] 80295d6: 42a3 cmp r3, r4 80295d8: d00d beq.n 80295f6 { if (lowBatCurrent){ 80295da: b12c cbz r4, 80295e8 SNMP_SendUserTrap(LOW_BAT_ALARM); 80295dc: 200d movs r0, #13 80295de: f00e fdad bl 803813c log_event_data(LOG_ALARM_LOW_BAT, "Авария"); 80295e2: 200d movs r0, #13 80295e4: 4908 ldr r1, [pc, #32] ; (8029608 ) 80295e6: e004 b.n 80295f2 } else{ SNMP_SendUserTrap(LOW_BAT_NORM); 80295e8: 200e movs r0, #14 80295ea: f00e fda7 bl 803813c log_event_data(LOG_ALARM_LOW_BAT, "Норма"); 80295ee: 4908 ldr r1, [pc, #32] ; (8029610 ) 80295f0: 200d movs r0, #13 80295f2: f000 fa33 bl 8029a5c } } lowBatOldState = lowBatCurrent; 80295f6: 702c strb r4, [r5, #0] 80295f8: bd38 pop {r3, r4, r5, pc} 80295fa: bf00 nop 80295fc: 2000cba8 .word 0x2000cba8 8029600: 20000b60 .word 0x20000b60 8029604: 20000b65 .word 0x20000b65 8029608: 08039b1f .word 0x08039b1f 802960c: 20000b64 .word 0x20000b64 8029610: 08039b2c .word 0x08039b2c 08029614 : /** * @brief Мониторинг нагрузки */ void UPS_PowerMonitor(void) { 8029614: b538 push {r3, r4, r5, lr} float load; static uint8_t stateCurrent = HYST_IDLE; load = UPS.Load; 8029616: 4c20 ldr r4, [pc, #128] ; (8029698 ) 8029618: 7c20 ldrb r0, [r4, #16] 802961a: f7f7 fbb9 bl 8020d90 <__aeabi_ui2f> /* Отслеживается переход через верхнюю границу */ if (load > UPS_LOAD) 802961e: 491f ldr r1, [pc, #124] ; (802969c ) void UPS_PowerMonitor(void) { float load; static uint8_t stateCurrent = HYST_IDLE; load = UPS.Load; 8029620: 4605 mov r5, r0 /* Отслеживается переход через верхнюю границу */ if (load > UPS_LOAD) 8029622: f7f7 fc79 bl 8020f18 <__aeabi_fcmpgt> 8029626: b1c0 cbz r0, 802965a { flCriticalAlarm = true; 8029628: 4b1d ldr r3, [pc, #116] ; (80296a0 ) 802962a: 2501 movs r5, #1 802962c: 701d strb r5, [r3, #0] UPS.Alarm = (UPS.Alarm & 0x0e) | (1 << 0); 802962e: 7d23 ldrb r3, [r4, #20] 8029630: f003 030e and.w r3, r3, #14 8029634: 432b orrs r3, r5 8029636: 7523 strb r3, [r4, #20] if (stateCurrent == HYST_IDLE) 8029638: 4c1a ldr r4, [pc, #104] ; (80296a4 ) 802963a: 7823 ldrb r3, [r4, #0] 802963c: 2b00 cmp r3, #0 802963e: d12a bne.n 8029696 { LED_On(LED_MINOR_R); 8029640: 200d movs r0, #13 8029642: f7ff f9f5 bl 8028a30 LED_On(LED_MINOR_G); 8029646: 200c movs r0, #12 8029648: f7ff f9f2 bl 8028a30 stateCurrent = HYST_UP; log_event_data(LOG_ALARM_POWER, "Авария"); 802964c: 200e movs r0, #14 802964e: 4916 ldr r1, [pc, #88] ; (80296a8 ) UPS.Alarm = (UPS.Alarm & 0x0e) | (1 << 0); if (stateCurrent == HYST_IDLE) { LED_On(LED_MINOR_R); LED_On(LED_MINOR_G); stateCurrent = HYST_UP; 8029650: 7025 strb r5, [r4, #0] log_event_data(LOG_ALARM_POWER, "Авария"); 8029652: f000 fa03 bl 8029a5c // Отправка трапа о завышении SNMP_SendUserTrap(POWER_ALARM); 8029656: 200f movs r0, #15 8029658: e019 b.n 802968e } } /* Отслеживается нормализация */ else if (load < (UPS_LOAD - UPS_LOAD_HIST)) 802965a: 4628 mov r0, r5 802965c: 4913 ldr r1, [pc, #76] ; (80296ac ) 802965e: f7f7 fc3d bl 8020edc <__aeabi_fcmplt> 8029662: b1c0 cbz r0, 8029696 { UPS.Alarm = (UPS.Alarm & 0x0e); 8029664: 7d23 ldrb r3, [r4, #20] 8029666: f003 030e and.w r3, r3, #14 802966a: 7523 strb r3, [r4, #20] if (stateCurrent == HYST_UP) 802966c: 4c0d ldr r4, [pc, #52] ; (80296a4 ) 802966e: 7823 ldrb r3, [r4, #0] 8029670: 2b01 cmp r3, #1 8029672: d110 bne.n 8029696 { LED_Off(LED_MINOR_R); 8029674: 200d movs r0, #13 8029676: f7ff f9de bl 8028a36 LED_Off(LED_MINOR_G); 802967a: 200c movs r0, #12 802967c: f7ff f9db bl 8028a36 stateCurrent = HYST_IDLE; 8029680: 2300 movs r3, #0 log_event_data(LOG_ALARM_POWER, "Норма"); 8029682: 200e movs r0, #14 8029684: 490a ldr r1, [pc, #40] ; (80296b0 ) UPS.Alarm = (UPS.Alarm & 0x0e); if (stateCurrent == HYST_UP) { LED_Off(LED_MINOR_R); LED_Off(LED_MINOR_G); stateCurrent = HYST_IDLE; 8029686: 7023 strb r3, [r4, #0] log_event_data(LOG_ALARM_POWER, "Норма"); 8029688: f000 f9e8 bl 8029a5c // Отправка трапа о нормализации SNMP_SendUserTrap(POWER_NORM); 802968c: 2010 movs r0, #16 } } } 802968e: 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); 8029692: f00e bd53 b.w 803813c 8029696: bd38 pop {r3, r4, r5, pc} 8029698: 2000cba8 .word 0x2000cba8 802969c: 428c0000 .word 0x428c0000 80296a0: 20000b5e .word 0x20000b5e 80296a4: 20000b53 .word 0x20000b53 80296a8: 08039b1f .word 0x08039b1f 80296ac: 428a0000 .word 0x428a0000 80296b0: 08039b2c .word 0x08039b2c 080296b4 : /** * @brief Мониторинг температуры */ void UPS_TemperatureMonitor(void) { 80296b4: b538 push {r3, r4, r5, lr} float temperature; static uint8_t stateCurrent = HYST_IDLE; temperature = UPS.Temp; 80296b6: 4c19 ldr r4, [pc, #100] ; (802971c ) /* Отслеживается переход через верхнюю границу */ if (temperature > UPS_TEMPERATURE) 80296b8: 4919 ldr r1, [pc, #100] ; (8029720 ) void UPS_TemperatureMonitor(void) { float temperature; static uint8_t stateCurrent = HYST_IDLE; temperature = UPS.Temp; 80296ba: 68e5 ldr r5, [r4, #12] /* Отслеживается переход через верхнюю границу */ if (temperature > UPS_TEMPERATURE) 80296bc: 4628 mov r0, r5 80296be: f7f7 fc2b bl 8020f18 <__aeabi_fcmpgt> 80296c2: b190 cbz r0, 80296ea { flCriticalAlarm = true; 80296c4: 4b17 ldr r3, [pc, #92] ; (8029724 ) 80296c6: 2201 movs r2, #1 80296c8: 701a strb r2, [r3, #0] UPS.Alarm = (UPS.Alarm & 0x0d) | (1 << 1); 80296ca: 7d23 ldrb r3, [r4, #20] 80296cc: f003 030d and.w r3, r3, #13 80296d0: f043 0302 orr.w r3, r3, #2 80296d4: 7523 strb r3, [r4, #20] if (stateCurrent == HYST_IDLE) 80296d6: 4b14 ldr r3, [pc, #80] ; (8029728 ) 80296d8: 7819 ldrb r1, [r3, #0] 80296da: b9f1 cbnz r1, 802971a { stateCurrent = HYST_UP; log_event_data(LOG_ALARM_TEMP, "Авария"); 80296dc: 200b movs r0, #11 80296de: 4913 ldr r1, [pc, #76] ; (802972c ) { flCriticalAlarm = true; UPS.Alarm = (UPS.Alarm & 0x0d) | (1 << 1); if (stateCurrent == HYST_IDLE) { stateCurrent = HYST_UP; 80296e0: 701a strb r2, [r3, #0] log_event_data(LOG_ALARM_TEMP, "Авария"); 80296e2: f000 f9bb bl 8029a5c // Отправка трапа о завышении SNMP_SendUserTrap(BATTERY_TEMPERATURE_ALARM); 80296e6: 200a movs r0, #10 80296e8: e013 b.n 8029712 } } /* Отслеживается нормализация */ else if (temperature < (UPS_TEMPERATURE - UPS_TEMPERATURE_HIST)) 80296ea: 4628 mov r0, r5 80296ec: 4910 ldr r1, [pc, #64] ; (8029730 ) 80296ee: f7f7 fbf5 bl 8020edc <__aeabi_fcmplt> 80296f2: b190 cbz r0, 802971a { UPS.Alarm = (UPS.Alarm & 0x0d); 80296f4: 7d23 ldrb r3, [r4, #20] 80296f6: f003 030d and.w r3, r3, #13 80296fa: 7523 strb r3, [r4, #20] if (stateCurrent == HYST_UP) 80296fc: 4b0a ldr r3, [pc, #40] ; (8029728 ) 80296fe: 781a ldrb r2, [r3, #0] 8029700: 2a01 cmp r2, #1 8029702: d10a bne.n 802971a { stateCurrent = HYST_IDLE; 8029704: 2200 movs r2, #0 log_event_data(LOG_ALARM_TEMP, "Норма"); 8029706: 200b movs r0, #11 8029708: 490a ldr r1, [pc, #40] ; (8029734 ) else if (temperature < (UPS_TEMPERATURE - UPS_TEMPERATURE_HIST)) { UPS.Alarm = (UPS.Alarm & 0x0d); if (stateCurrent == HYST_UP) { stateCurrent = HYST_IDLE; 802970a: 701a strb r2, [r3, #0] log_event_data(LOG_ALARM_TEMP, "Норма"); 802970c: f000 f9a6 bl 8029a5c // Отправка трапа о нормализации SNMP_SendUserTrap(BATTERY_TEMPERATURE_NORM); 8029710: 2009 movs r0, #9 } } } 8029712: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} { stateCurrent = HYST_IDLE; log_event_data(LOG_ALARM_TEMP, "Норма"); // Отправка трапа о нормализации SNMP_SendUserTrap(BATTERY_TEMPERATURE_NORM); 8029716: f00e bd11 b.w 803813c 802971a: bd38 pop {r3, r4, r5, pc} 802971c: 2000cba8 .word 0x2000cba8 8029720: 42200000 .word 0x42200000 8029724: 20000b5e .word 0x20000b5e 8029728: 20000b5b .word 0x20000b5b 802972c: 08039b1f .word 0x08039b1f 8029730: 421c0000 .word 0x421c0000 8029734: 08039b2c .word 0x08039b2c 08029738 : /** * @brief Мониторинг параметра upsParams.connect */ void UPS_ConnectMonitor(void) { 8029738: b538 push {r3, r4, r5, lr} static bool isValueRecv = false; static uint8_t connectOldState = 0; uint8_t connectCurrent; connectCurrent = UPS.Present; 802973a: 4b19 ldr r3, [pc, #100] ; (80297a0 ) 802973c: 4d19 ldr r5, [pc, #100] ; (80297a4 ) UPS.Alarm = (UPS.Alarm & 0x0b) | ((connectCurrent^1) << 2); 802973e: 7d1a ldrb r2, [r3, #20] { static bool isValueRecv = false; static uint8_t connectOldState = 0; uint8_t connectCurrent; connectCurrent = UPS.Present; 8029740: f893 402c ldrb.w r4, [r3, #44] ; 0x2c UPS.Alarm = (UPS.Alarm & 0x0b) | ((connectCurrent^1) << 2); 8029744: f002 020b and.w r2, r2, #11 8029748: f084 0101 eor.w r1, r4, #1 802974c: ea42 0281 orr.w r2, r2, r1, lsl #2 8029750: 751a strb r2, [r3, #20] if (!isValueRecv) { 8029752: 4b15 ldr r3, [pc, #84] ; (80297a8 ) 8029754: 781a ldrb r2, [r3, #0] 8029756: b962 cbnz r2, 8029772 isValueRecv = true; 8029758: 2201 movs r2, #1 802975a: 701a strb r2, [r3, #0] connectOldState = connectCurrent; 802975c: 702c strb r4, [r5, #0] if (!connectCurrent){ 802975e: b9ec cbnz r4, 802979c log_event_data(LOG_ALARM_UPS, "Авария"); 8029760: 200f movs r0, #15 8029762: 4912 ldr r1, [pc, #72] ; (80297ac ) 8029764: f000 f97a bl 8029a5c SNMP_SendUserTrap(CONNECT_MONITOR_ALARM); 8029768: 2011 movs r0, #17 SNMP_SendUserTrap(CONNECT_MONITOR_ALARM); } } connectOldState = connectCurrent; } 802976a: 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); 802976e: f00e bce5 b.w 803813c } return; } if (!connectCurrent) 8029772: b914 cbnz r4, 802977a flCriticalAlarm = true; 8029774: 4b0e ldr r3, [pc, #56] ; (80297b0 ) 8029776: 2201 movs r2, #1 8029778: 701a strb r2, [r3, #0] // Значение параметра изменилось if (connectCurrent != connectOldState) 802977a: 782b ldrb r3, [r5, #0] 802977c: 42a3 cmp r3, r4 802977e: d00c beq.n 802979a { if (connectCurrent){ log_event_data(LOG_ALARM_UPS, "Норма"); 8029780: 200f movs r0, #15 if (!connectCurrent) flCriticalAlarm = true; // Значение параметра изменилось if (connectCurrent != connectOldState) { if (connectCurrent){ 8029782: b124 cbz r4, 802978e log_event_data(LOG_ALARM_UPS, "Норма"); 8029784: 490b ldr r1, [pc, #44] ; (80297b4 ) 8029786: f000 f969 bl 8029a5c SNMP_SendUserTrap(CONNECT_MONITOR_NORM); 802978a: 2012 movs r0, #18 802978c: e003 b.n 8029796 } else{ log_event_data(LOG_ALARM_UPS, "Авария"); 802978e: 4907 ldr r1, [pc, #28] ; (80297ac ) 8029790: f000 f964 bl 8029a5c SNMP_SendUserTrap(CONNECT_MONITOR_ALARM); 8029794: 2011 movs r0, #17 8029796: f00e fcd1 bl 803813c } } connectOldState = connectCurrent; 802979a: 702c strb r4, [r5, #0] 802979c: bd38 pop {r3, r4, r5, pc} 802979e: bf00 nop 80297a0: 2000cba8 .word 0x2000cba8 80297a4: 20000b58 .word 0x20000b58 80297a8: 20000b52 .word 0x20000b52 80297ac: 08039b1f .word 0x08039b1f 80297b0: 20000b5e .word 0x20000b5e 80297b4: 08039b2c .word 0x08039b2c 080297b8 : /** * @brief Мониторинг параметра upsParams.connect */ void UPS_BatteryConnectMonitor(void) { 80297b8: b538 push {r3, r4, r5, lr} static bool isValueRecv = false; static uint8_t AKBconnectOldState = 0; uint8_t AKBconnectCurrent; if(((UPS.Status >> 7) & 0x01) == 0) 80297ba: 4b1a ldr r3, [pc, #104] ; (8029824 ) 80297bc: 4d1a ldr r5, [pc, #104] ; (8029828 ) 80297be: 7cdc ldrb r4, [r3, #19] 80297c0: 09e2 lsrs r2, r4, #7 AKBconnectCurrent = (UPS.Status >> 6) & 0x01; else{ AKBconnectCurrent = 0; } UPS.Alarm = (UPS.Alarm & 0x07) | (AKBconnectCurrent << 3); 80297c2: 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; 80297c4: bf08 it eq 80297c6: f3c4 1480 ubfxeq r4, r4, #6, #1 else{ AKBconnectCurrent = 0; } UPS.Alarm = (UPS.Alarm & 0x07) | (AKBconnectCurrent << 3); 80297ca: f002 0207 and.w r2, r2, #7 uint8_t AKBconnectCurrent; if(((UPS.Status >> 7) & 0x01) == 0) AKBconnectCurrent = (UPS.Status >> 6) & 0x01; else{ AKBconnectCurrent = 0; 80297ce: bf18 it ne 80297d0: 2400 movne r4, #0 } UPS.Alarm = (UPS.Alarm & 0x07) | (AKBconnectCurrent << 3); 80297d2: ea42 02c4 orr.w r2, r2, r4, lsl #3 80297d6: 751a strb r2, [r3, #20] if (!isValueRecv) { 80297d8: 4b14 ldr r3, [pc, #80] ; (802982c ) 80297da: 781a ldrb r2, [r3, #0] 80297dc: b962 cbnz r2, 80297f8 isValueRecv = true; 80297de: 2201 movs r2, #1 80297e0: 701a strb r2, [r3, #0] AKBconnectOldState = AKBconnectCurrent; 80297e2: 702c strb r4, [r5, #0] if (AKBconnectCurrent){ 80297e4: b1ec cbz r4, 8029822 log_event_data(LOG_ALARM_AKB, "Авария"); 80297e6: 2010 movs r0, #16 80297e8: 4911 ldr r1, [pc, #68] ; (8029830 ) 80297ea: f000 f937 bl 8029a5c SNMP_SendUserTrap(BATTERY_CONNECT_ALARM); 80297ee: 2013 movs r0, #19 SNMP_SendUserTrap(BATTERY_CONNECT_ALARM); } } AKBconnectOldState = AKBconnectCurrent; } 80297f0: 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); 80297f4: f00e bca2 b.w 803813c } return; } if (AKBconnectCurrent) 80297f8: b114 cbz r4, 8029800 flCriticalAlarm = true; 80297fa: 4b0e ldr r3, [pc, #56] ; (8029834 ) 80297fc: 2201 movs r2, #1 80297fe: 701a strb r2, [r3, #0] // Значение параметра изменилось if (AKBconnectCurrent != AKBconnectOldState) 8029800: 782b ldrb r3, [r5, #0] 8029802: 42a3 cmp r3, r4 8029804: d00c beq.n 8029820 { if (!AKBconnectCurrent){ log_event_data(LOG_ALARM_AKB, "Норма"); 8029806: 2010 movs r0, #16 if (AKBconnectCurrent) flCriticalAlarm = true; // Значение параметра изменилось if (AKBconnectCurrent != AKBconnectOldState) { if (!AKBconnectCurrent){ 8029808: b924 cbnz r4, 8029814 log_event_data(LOG_ALARM_AKB, "Норма"); 802980a: 490b ldr r1, [pc, #44] ; (8029838 ) 802980c: f000 f926 bl 8029a5c SNMP_SendUserTrap(BATTERY_CONNECT_NORM); 8029810: 2014 movs r0, #20 8029812: e003 b.n 802981c } else{ log_event_data(LOG_ALARM_AKB, "Авария"); 8029814: 4906 ldr r1, [pc, #24] ; (8029830 ) 8029816: f000 f921 bl 8029a5c SNMP_SendUserTrap(BATTERY_CONNECT_ALARM); 802981a: 2013 movs r0, #19 802981c: f00e fc8e bl 803813c } } AKBconnectOldState = AKBconnectCurrent; 8029820: 702c strb r4, [r5, #0] 8029822: bd38 pop {r3, r4, r5, pc} 8029824: 2000cba8 .word 0x2000cba8 8029828: 20000b63 .word 0x20000b63 802982c: 20000b5f .word 0x20000b5f 8029830: 08039b1f .word 0x08039b1f 8029834: 20000b5e .word 0x20000b5e 8029838: 08039b2c .word 0x08039b2c 0802983c : /** * @brief Задача мониторинга параметров UPS */ void UPS_Monitor(void *params) { 802983c: b570 push {r4, r5, r6, lr} vTaskDelay(5000); 802983e: f241 3088 movw r0, #5000 ; 0x1388 8029842: f001 fbc3 bl 802afcc for (;;) { flCriticalAlarm = false; 8029846: 4d10 ldr r5, [pc, #64] ; (8029888 ) flNonCriticalAlarm = false; 8029848: 4e10 ldr r6, [pc, #64] ; (802988c ) void UPS_Monitor(void *params) { vTaskDelay(5000); for (;;) { flCriticalAlarm = false; 802984a: 2400 movs r4, #0 flNonCriticalAlarm = false; // Проверяем флаг подключения UPS if (UPS.Present) 802984c: 4b10 ldr r3, [pc, #64] ; (8029890 ) void UPS_Monitor(void *params) { vTaskDelay(5000); for (;;) { flCriticalAlarm = false; 802984e: 702c strb r4, [r5, #0] flNonCriticalAlarm = false; // Проверяем флаг подключения UPS if (UPS.Present) 8029850: f893 302c ldrb.w r3, [r3, #44] ; 0x2c { vTaskDelay(5000); for (;;) { flCriticalAlarm = false; flNonCriticalAlarm = false; 8029854: 7034 strb r4, [r6, #0] // Проверяем флаг подключения UPS if (UPS.Present) 8029856: b14b cbz r3, 802986c { UPS_LineFailMonitor(); 8029858: f7ff fe68 bl 802952c UPS_LowBatMonitor(); 802985c: f7ff fe9e bl 802959c UPS_PowerMonitor(); 8029860: f7ff fed8 bl 8029614 UPS_TemperatureMonitor(); 8029864: f7ff ff26 bl 80296b4 UPS_BatteryConnectMonitor(); 8029868: f7ff ffa6 bl 80297b8 } UPS_ConnectMonitor(); 802986c: f7ff ff64 bl 8029738 UPS_DI0Monitor(); 8029870: f7ff fce8 bl 8029244 UPS_CriticalAlarmMonitor(); 8029874: f7ff fd24 bl 80292c0 UPS_NonCriticalAlarmMonitor(); 8029878: f7ff fdc6 bl 8029408 vTaskDelay(1000); 802987c: f44f 707a mov.w r0, #1000 ; 0x3e8 8029880: f001 fba4 bl 802afcc } 8029884: e7e2 b.n 802984c 8029886: bf00 nop 8029888: 20000b5e .word 0x20000b5e 802988c: 20000b64 .word 0x20000b64 8029890: 2000cba8 .word 0x2000cba8 08029894 : } 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); 8029894: 4608 mov r0, r1 8029896: 4611 mov r1, r2 8029898: 461a mov r2, r3 802989a: 2300 movs r3, #0 802989c: f7fd b82c b.w 80268f8 080298a0 : } 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); 80298a0: 4608 mov r0, r1 80298a2: 4611 mov r1, r2 80298a4: 461a mov r2, r3 80298a6: 2300 movs r3, #0 80298a8: f7fd b875 b.w 8026996 080298ac : #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); 80298ac: 4608 mov r0, r1 80298ae: 2100 movs r1, #0 80298b0: f7fd b881 b.w 80269b6 080298b4 : static struct ringfs fs2; static SemaphoreHandle_t log_mutex; void log_task(void) { 80298b4: b508 push {r3, lr} for(;;){ flUpdateLog = true; 80298b6: 4c03 ldr r4, [pc, #12] ; (80298c4 ) 80298b8: 2501 movs r5, #1 vTaskDelay(LOG_TIME); 80298ba: 4803 ldr r0, [pc, #12] ; (80298c8 ) static SemaphoreHandle_t log_mutex; void log_task(void) { for(;;){ flUpdateLog = true; 80298bc: 7025 strb r5, [r4, #0] vTaskDelay(LOG_TIME); 80298be: f001 fb85 bl 802afcc 80298c2: e7fa b.n 80298ba 80298c4: 20000bc0 .word 0x20000bc0 80298c8: 000927c0 .word 0x000927c0 080298cc : } } void log_init(bool format) { 80298cc: b51f push {r0, r1, r2, r3, r4, lr} DBG printf(">>> Event log\n"); if (!spi_flash_desc.present) 80298ce: 4b22 ldr r3, [pc, #136] ; (8029958 ) 80298d0: 781a ldrb r2, [r3, #0] flUpdateLog = true; vTaskDelay(LOG_TIME); } } void log_init(bool format) { 80298d2: 4604 mov r4, r0 DBG printf(">>> Event log\n"); if (!spi_flash_desc.present) 80298d4: 2a00 cmp r2, #0 80298d6: d03e beq.n 8029956 return; ringfs_flash.sector_size = spi_flash_desc.sector_size; 80298d8: 685a ldr r2, [r3, #4] ringfs_flash.sector_count = spi_flash_desc.sector_count/2 - LOG_FLASH_SECTOR_OFFSET; 80298da: 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; 80298dc: 491f ldr r1, [pc, #124] ; (802995c ) 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)); 80298de: 4820 ldr r0, [pc, #128] ; (8029960 ) 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; 80298e0: 600a str r2, [r1, #0] ringfs_flash.sector_count = spi_flash_desc.sector_count/2 - LOG_FLASH_SECTOR_OFFSET; 80298e2: 085b lsrs r3, r3, #1 80298e4: 3b04 subs r3, #4 80298e6: 608b str r3, [r1, #8] ringfs_init(&fs, &ringfs_flash, LOG_ENTRY_VERSION, sizeof(log_entry_t)); 80298e8: 2201 movs r2, #1 80298ea: 2337 movs r3, #55 ; 0x37 80298ec: f000 fb87 bl 8029ffe if (format || ringfs_scan(&fs) != 0) 80298f0: b11c cbz r4, 80298fa ringfs_format(&fs); 80298f2: 481b ldr r0, [pc, #108] ; (8029960 ) 80298f4: f000 fb8d bl 802a012 80298f8: e004 b.n 8029904 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) 80298fa: 4819 ldr r0, [pc, #100] ; (8029960 ) 80298fc: f000 fc6b bl 802a1d6 8029900: 2800 cmp r0, #0 8029902: d1f6 bne.n 80298f2 ringfs_format(&fs); ringfs_flash2.sector_size = spi_flash_desc.sector_size; 8029904: 4b14 ldr r3, [pc, #80] ; (8029958 ) 8029906: 4917 ldr r1, [pc, #92] ; (8029964 ) 8029908: 685a ldr r2, [r3, #4] ringfs_flash2.sector_count = spi_flash_desc.sector_count/2 - LOG_FLASH_SECTOR_OFFSET; 802990a: 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; 802990c: 600a str r2, [r1, #0] ringfs_flash2.sector_count = spi_flash_desc.sector_count/2 - LOG_FLASH_SECTOR_OFFSET; 802990e: 085b lsrs r3, r3, #1 8029910: 3b04 subs r3, #4 8029912: 608b str r3, [r1, #8] ringfs_init(&fs2, &ringfs_flash2, LOG_ENTRY_VERSION, sizeof(log_entry_t)); 8029914: 4814 ldr r0, [pc, #80] ; (8029968 ) 8029916: 2201 movs r2, #1 8029918: 2337 movs r3, #55 ; 0x37 802991a: f000 fb70 bl 8029ffe if (format || ringfs_scan(&fs2) != 0) 802991e: b11c cbz r4, 8029928 ringfs_format(&fs2); 8029920: 4811 ldr r0, [pc, #68] ; (8029968 ) 8029922: f000 fb76 bl 802a012 8029926: e004 b.n 8029932 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) 8029928: 480f ldr r0, [pc, #60] ; (8029968 ) 802992a: f000 fc54 bl 802a1d6 802992e: 2800 cmp r0, #0 8029930: d1f6 bne.n 8029920 ringfs_format(&fs2); fLogInit = true; 8029932: 4b0e ldr r3, [pc, #56] ; (802996c ) 8029934: 2001 movs r0, #1 8029936: 7018 strb r0, [r3, #0] log_mutex = xSemaphoreCreateMutex(); 8029938: f000 feaf bl 802a69a 802993c: 4b0c ldr r3, [pc, #48] ; (8029970 ) xTaskCreate(log_task, ( char * ) "log_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); 802993e: 490d ldr r1, [pc, #52] ; (8029974 ) if (format || ringfs_scan(&fs2) != 0) ringfs_format(&fs2); fLogInit = true; log_mutex = xSemaphoreCreateMutex(); 8029940: 6018 str r0, [r3, #0] xTaskCreate(log_task, ( char * ) "log_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); 8029942: 2300 movs r3, #0 8029944: 9300 str r3, [sp, #0] 8029946: 9301 str r3, [sp, #4] 8029948: 9302 str r3, [sp, #8] 802994a: 9303 str r3, [sp, #12] 802994c: 480a ldr r0, [pc, #40] ; (8029978 ) 802994e: f44f 7280 mov.w r2, #256 ; 0x100 8029952: f001 f8a1 bl 802aa98 } 8029956: bd1f pop {r0, r1, r2, r3, r4, pc} 8029958: 2000c840 .word 0x2000c840 802995c: 200006ac .word 0x200006ac 8029960: 20000b94 .word 0x20000b94 8029964: 20000694 .word 0x20000694 8029968: 20000b68 .word 0x20000b68 802996c: 20000bc8 .word 0x20000bc8 8029970: 20000bc4 .word 0x20000bc4 8029974: 08039b5d .word 0x08039b5d 8029978: 080298b5 .word 0x080298b5 0802997c : } return 0; } int log_append(log_entry_t *entry) { 802997c: b530 push {r4, r5, lr} int ret; TM_RTC_t data; ret = xSemaphoreTake( log_mutex, portMAX_DELAY ); 802997e: 4b12 ldr r3, [pc, #72] ; (80299c8 ) 8029980: 2100 movs r1, #0 } return 0; } int log_append(log_entry_t *entry) { 8029982: b085 sub sp, #20 8029984: 4604 mov r4, r0 int ret; TM_RTC_t data; ret = xSemaphoreTake( log_mutex, portMAX_DELAY ); 8029986: f04f 32ff mov.w r2, #4294967295 802998a: 6818 ldr r0, [r3, #0] 802998c: 460b mov r3, r1 802998e: f000 ff2a bl 802a7e6 if (ret == pdFALSE) 8029992: 4605 mov r5, r0 8029994: b1a8 cbz r0, 80299c2 return ret; if (!entry->timestamp){ 8029996: 6821 ldr r1, [r4, #0] 8029998: b921 cbnz r1, 80299a4 TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 802999a: 4668 mov r0, sp 802999c: f7fc fd74 bl 8026488 entry->timestamp = data.unix; 80299a0: 9b03 ldr r3, [sp, #12] 80299a2: 6023 str r3, [r4, #0] } if(entry->type == LOG_VALUE) 80299a4: 7923 ldrb r3, [r4, #4] 80299a6: 2b11 cmp r3, #17 ringfs_append(&fs, entry); 80299a8: bf0c ite eq 80299aa: 4808 ldreq r0, [pc, #32] ; (80299cc ) else ringfs_append(&fs2, entry); 80299ac: 4808 ldrne r0, [pc, #32] ; (80299d0 ) 80299ae: 4621 mov r1, r4 80299b0: f000 fb62 bl 802a078 xSemaphoreGive(log_mutex); 80299b4: 4b04 ldr r3, [pc, #16] ; (80299c8 ) 80299b6: 2100 movs r1, #0 80299b8: 6818 ldr r0, [r3, #0] 80299ba: 460a mov r2, r1 80299bc: 460b mov r3, r1 80299be: f000 fdd2 bl 802a566 return ret; } 80299c2: 4628 mov r0, r5 80299c4: b005 add sp, #20 80299c6: bd30 pop {r4, r5, pc} 80299c8: 20000bc4 .word 0x20000bc4 80299cc: 20000b94 .word 0x20000b94 80299d0: 20000b68 .word 0x20000b68 080299d4 : int log_fetch(log_entry_t *entry, uint32_t timeout) { 80299d4: b570 push {r4, r5, r6, lr} int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 80299d6: 4e0d ldr r6, [pc, #52] ; (8029a0c ) ringfs_append(&fs2, entry); xSemaphoreGive(log_mutex); return ret; } int log_fetch(log_entry_t *entry, uint32_t timeout) { 80299d8: 460a mov r2, r1 int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 80299da: 2100 movs r1, #0 ringfs_append(&fs2, entry); xSemaphoreGive(log_mutex); return ret; } int log_fetch(log_entry_t *entry, uint32_t timeout) { 80299dc: 4605 mov r5, r0 int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 80299de: 460b mov r3, r1 80299e0: 6830 ldr r0, [r6, #0] 80299e2: f000 ff00 bl 802a7e6 if (ret == pdFALSE) 80299e6: 4604 mov r4, r0 80299e8: b170 cbz r0, 8029a08 return ret; if(entry->type == LOG_VALUE) 80299ea: 792b ldrb r3, [r5, #4] 80299ec: 2b11 cmp r3, #17 ret = ringfs_fetch(&fs, entry); 80299ee: bf0c ite eq 80299f0: 4807 ldreq r0, [pc, #28] ; (8029a10 ) else ret = ringfs_fetch(&fs2, entry); 80299f2: 4808 ldrne r0, [pc, #32] ; (8029a14 ) 80299f4: 4629 mov r1, r5 80299f6: f000 fba9 bl 802a14c xSemaphoreGive(log_mutex); 80299fa: 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); 80299fc: 4604 mov r4, r0 xSemaphoreGive(log_mutex); 80299fe: 460a mov r2, r1 8029a00: 6830 ldr r0, [r6, #0] 8029a02: 460b mov r3, r1 8029a04: f000 fdaf bl 802a566 return ret; } 8029a08: 4620 mov r0, r4 8029a0a: bd70 pop {r4, r5, r6, pc} 8029a0c: 20000bc4 .word 0x20000bc4 8029a10: 20000b94 .word 0x20000b94 8029a14: 20000b68 .word 0x20000b68 08029a18 : int log_rewind(log_entry_t *entry, uint32_t timeout) { 8029a18: b570 push {r4, r5, r6, lr} int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 8029a1a: 4d0d ldr r5, [pc, #52] ; (8029a50 ) ret = ringfs_fetch(&fs2, entry); xSemaphoreGive(log_mutex); return ret; } int log_rewind(log_entry_t *entry, uint32_t timeout) { 8029a1c: 460a mov r2, r1 int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 8029a1e: 2100 movs r1, #0 ret = ringfs_fetch(&fs2, entry); xSemaphoreGive(log_mutex); return ret; } int log_rewind(log_entry_t *entry, uint32_t timeout) { 8029a20: 4606 mov r6, r0 int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 8029a22: 460b mov r3, r1 8029a24: 6828 ldr r0, [r5, #0] 8029a26: f000 fede bl 802a7e6 if (ret == pdFALSE) 8029a2a: 4604 mov r4, r0 8029a2c: b168 cbz r0, 8029a4a return ret; if(entry->type == LOG_VALUE) 8029a2e: 7933 ldrb r3, [r6, #4] 8029a30: 2b11 cmp r3, #17 ret = ringfs_rewind(&fs); 8029a32: bf0c ite eq 8029a34: 4807 ldreq r0, [pc, #28] ; (8029a54 ) else ret = ringfs_rewind(&fs2); 8029a36: 4808 ldrne r0, [pc, #32] ; (8029a58 ) 8029a38: f000 fbc2 bl 802a1c0 xSemaphoreGive(log_mutex); 8029a3c: 2100 movs r1, #0 if (ret == pdFALSE) return ret; if(entry->type == LOG_VALUE) ret = ringfs_rewind(&fs); else ret = ringfs_rewind(&fs2); 8029a3e: 4604 mov r4, r0 xSemaphoreGive(log_mutex); 8029a40: 460a mov r2, r1 8029a42: 6828 ldr r0, [r5, #0] 8029a44: 460b mov r3, r1 8029a46: f000 fd8e bl 802a566 return ret; } 8029a4a: 4620 mov r0, r4 8029a4c: bd70 pop {r4, r5, r6, pc} 8029a4e: bf00 nop 8029a50: 20000bc4 .word 0x20000bc4 8029a54: 20000b94 .word 0x20000b94 8029a58: 20000b68 .word 0x20000b68 08029a5c : xSemaphoreGive(log_mutex); return ret; } void log_event_data(log_type_t type, char *data) { 8029a5c: b500 push {lr} 8029a5e: b08f sub sp, #60 ; 0x3c log_entry_t entry_data; entry_data.timestamp = 0; 8029a60: 2300 movs r3, #0 8029a62: 9300 str r3, [sp, #0] entry_data.type = type; strncpy(entry_data.data, data, 50); 8029a64: 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; 8029a66: f88d 0004 strb.w r0, [sp, #4] strncpy(entry_data.data, data, 50); 8029a6a: 2232 movs r2, #50 ; 0x32 8029a6c: 1d58 adds r0, r3, #5 8029a6e: f7f8 fad7 bl 8022020 log_append(&entry_data); 8029a72: 4668 mov r0, sp 8029a74: f7ff ff82 bl 802997c } 8029a78: b00f add sp, #60 ; 0x3c 8029a7a: bd00 pop {pc} 08029a7c : void log_add(char *log_data) { 8029a7c: b530 push {r4, r5, lr} 8029a7e: b08f sub sp, #60 ; 0x3c 8029a80: 4605 mov r5, r0 char buf_value[50]; uint8_t i, len; memset(buf_value, 0, 50); 8029a82: 2100 movs r1, #0 8029a84: 2232 movs r2, #50 ; 0x32 8029a86: a801 add r0, sp, #4 8029a88: f7f8 f83a bl 8021b00 len = strlen(log_data); 8029a8c: 4628 mov r0, r5 8029a8e: f7f8 fa0f bl 8021eb0 8029a92: b2c4 uxtb r4, r0 strncpy(buf_value, log_data, len); 8029a94: 4629 mov r1, r5 8029a96: a801 add r0, sp, #4 8029a98: 4622 mov r2, r4 8029a9a: f7f8 fac1 bl 8022020 buf_value[0] = '\"'; 8029a9e: 2322 movs r3, #34 ; 0x22 8029aa0: f88d 3004 strb.w r3, [sp, #4] for(i = 0; i < len; i++) { if(buf_value[i] == ' ') buf_value[i] = ';'; 8029aa4: 203b movs r0, #59 ; 0x3b len = strlen(log_data); strncpy(buf_value, log_data, len); buf_value[0] = '\"'; for(i = 0; i < len; i++) 8029aa6: 2300 movs r3, #0 8029aa8: e004 b.n 8029ab4 { if(buf_value[i] == ' ') 8029aaa: 5cca ldrb r2, [r1, r3] 8029aac: 2a20 cmp r2, #32 buf_value[i] = ';'; 8029aae: bf08 it eq 8029ab0: 54c8 strbeq r0, [r1, r3] 8029ab2: 3301 adds r3, #1 len = strlen(log_data); strncpy(buf_value, log_data, len); buf_value[0] = '\"'; for(i = 0; i < len; i++) 8029ab4: b2da uxtb r2, r3 8029ab6: 42a2 cmp r2, r4 8029ab8: a901 add r1, sp, #4 8029aba: d3f6 bcc.n 8029aaa { if(buf_value[i] == ' ') buf_value[i] = ';'; } buf_value[len - 1] = ';'; 8029abc: ab0e add r3, sp, #56 ; 0x38 8029abe: 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); 8029ac0: 2011 movs r0, #17 for(i = 0; i < len; i++) { if(buf_value[i] == ' ') buf_value[i] = ';'; } buf_value[len - 1] = ';'; 8029ac2: 233b movs r3, #59 ; 0x3b 8029ac4: 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); 8029ac8: f7ff ffc8 bl 8029a5c } else log_event_data(LOG_VALUE, buf_value); } 8029acc: b00f add sp, #60 ; 0x3c 8029ace: bd30 pop {r4, r5, pc} 08029ad0 : * @brief Возвращает true если журнал проинициализирован */ bool LOG_IsInit() { return fLogInit; } 8029ad0: 4b01 ldr r3, [pc, #4] ; (8029ad8 ) 8029ad2: 7818 ldrb r0, [r3, #0] 8029ad4: 4770 bx lr 8029ad6: bf00 nop 8029ad8: 20000bc8 .word 0x20000bc8 08029adc : /** * @brief Возвращает общее количество страниц */ uint32_t LOG_GetPageCount(void) { 8029adc: b508 push {r3, lr} return (((ringfs_count_estimate(&fs)) / 10) + 1); 8029ade: 4804 ldr r0, [pc, #16] ; (8029af0 ) 8029ae0: f000 fab8 bl 802a054 8029ae4: 230a movs r3, #10 8029ae6: fb90 f0f3 sdiv r0, r0, r3 } 8029aea: 3001 adds r0, #1 8029aec: bd08 pop {r3, pc} 8029aee: bf00 nop 8029af0: 20000b94 .word 0x20000b94 08029af4 : uint32_t LOG_GetTotalSTRCount(void) { return ringfs_count_estimate(&fs); 8029af4: 4801 ldr r0, [pc, #4] ; (8029afc ) 8029af6: f000 baad b.w 802a054 8029afa: bf00 nop 8029afc: 20000b94 .word 0x20000b94 08029b00 : } void LOG_GetPage(char *str, uint32_t page) { 8029b00: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 8029b04: b09d sub sp, #116 ; 0x74 8029b06: 460d mov r5, r1 8029b08: 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); 8029b0a: f7ff fff3 bl 8029af4 memset(buf, 0, 20); 8029b0e: 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); 8029b10: 4604 mov r4, r0 memset(buf, 0, 20); 8029b12: 2214 movs r2, #20 8029b14: a809 add r0, sp, #36 ; 0x24 for(i=0; i < 10; i++){ fs.cursor_position = start - 10*(page-1) - 1 - i; 8029b16: 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); 8029b1a: f7f7 fff1 bl 8021b00 for(i=0; i < 10; i++){ fs.cursor_position = start - 10*(page-1) - 1 - i; 8029b1e: fb08 4805 mla r8, r8, r5, r4 8029b22: 4c29 ldr r4, [pc, #164] ; (8029bc8 ) 8029b24: f108 0809 add.w r8, r8, #9 8029b28: 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)); 8029b2a: 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) 8029b2e: 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) 8029b32: 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; 8029b34: 62a3 str r3, [r4, #40] ; 0x28 if(fs.cursor_position < 0) 8029b36: db43 blt.n 8029bc0 break; else{ fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; 8029b38: f8d4 900c ldr.w r9, [r4, #12] 8029b3c: 6920 ldr r0, [r4, #16] 8029b3e: 6821 ldr r1, [r4, #0] 8029b40: fb93 f2f9 sdiv r2, r3, r9 8029b44: eb02 0e00 add.w lr, r2, r0 8029b48: 6888 ldr r0, [r1, #8] 8029b4a: fb9e fcf0 sdiv ip, lr, r0 8029b4e: fb00 e01c mls r0, r0, ip, lr fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; 8029b52: 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; 8029b56: 6220 str r0, [r4, #32] fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; 8029b58: 6263 str r3, [r4, #36] ; 0x24 } entry.type = LOG_VALUE; log_fetch(&entry, portMAX_DELAY); 8029b5a: 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; 8029b5e: 2311 movs r3, #17 log_fetch(&entry, portMAX_DELAY); 8029b60: 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; 8029b62: f88d 303c strb.w r3, [sp, #60] ; 0x3c log_fetch(&entry, portMAX_DELAY); 8029b66: f7ff ff35 bl 80299d4 strncat(str, entry.data, strlen(entry.data)); 8029b6a: 4638 mov r0, r7 8029b6c: f7f8 f9a0 bl 8021eb0 8029b70: 4639 mov r1, r7 8029b72: 4602 mov r2, r0 8029b74: 4630 mov r0, r6 8029b76: f7f8 f9cb bl 8021f10 TM_RTC_GetDateTimeFromUnix(&rtc_data, entry.timestamp); 8029b7a: a805 add r0, sp, #20 8029b7c: 990e ldr r1, [sp, #56] ; 0x38 8029b7e: f7fc fd13 bl 80265a8 sprintf(buf, "%02i.%02i.%02i %02i:%02i:%02i", rtc_data.date, rtc_data.month, 8029b82: f89d 101d ldrb.w r1, [sp, #29] 8029b86: f89d 201b ldrb.w r2, [sp, #27] 8029b8a: 9100 str r1, [sp, #0] 8029b8c: f89d 1019 ldrb.w r1, [sp, #25] 8029b90: f89d 301c ldrb.w r3, [sp, #28] 8029b94: 9101 str r1, [sp, #4] 8029b96: f89d 1018 ldrb.w r1, [sp, #24] 8029b9a: 9102 str r1, [sp, #8] 8029b9c: f89d 1014 ldrb.w r1, [sp, #20] 8029ba0: a809 add r0, sp, #36 ; 0x24 8029ba2: 9103 str r1, [sp, #12] 8029ba4: 4909 ldr r1, [pc, #36] ; (8029bcc ) 8029ba6: f7fd fe35 bl 8027814 rtc_data.year, rtc_data.hours, rtc_data.minutes, rtc_data.seconds); strcat(str, buf); 8029baa: a909 add r1, sp, #36 ; 0x24 8029bac: 4630 mov r0, r6 8029bae: f7f8 f80d bl 8021bcc 8029bb2: 3501 adds r5, #1 strcat(str, "\","); 8029bb4: 4630 mov r0, r6 8029bb6: 4906 ldr r1, [pc, #24] ; (8029bd0 ) 8029bb8: f7f8 f808 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++){ 8029bbc: 2d0a cmp r5, #10 8029bbe: d1b6 bne.n 8029b2e 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, "\","); } } 8029bc0: b01d add sp, #116 ; 0x74 8029bc2: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 8029bc6: bf00 nop 8029bc8: 20000b94 .word 0x20000b94 8029bcc: 08039b66 .word 0x08039b66 8029bd0: 08039b84 .word 0x08039b84 08029bd4 : uint32_t LOG_GetData(int ptr, char *str, uint32_t size, bool start) { 8029bd4: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8029bd8: b09c sub sp, #112 ; 0x70 8029bda: 4690 mov r8, r2 TM_RTC_t rtc_data; log_entry_t entry; char buf[20]; uint8_t i; entry.type = LOG_VALUE; 8029bdc: 2211 movs r2, #17 strcat(str, "\","); } } uint32_t LOG_GetData(int ptr, char *str, uint32_t size, bool start) { 8029bde: 4605 mov r5, r0 8029be0: 460c mov r4, r1 TM_RTC_t rtc_data; log_entry_t entry; char buf[20]; uint8_t i; entry.type = LOG_VALUE; 8029be2: f88d 203c strb.w r2, [sp, #60] ; 0x3c if(start) 8029be6: b123 cbz r3, 8029bf2 log_rewind(&entry, portMAX_DELAY); 8029be8: a80e add r0, sp, #56 ; 0x38 8029bea: f04f 31ff mov.w r1, #4294967295 8029bee: f7ff ff13 bl 8029a18 fs.cursor_position = ptr/STRING_SIZE; 8029bf2: 4b29 ldr r3, [pc, #164] ; (8029c98 ) 8029bf4: 2040 movs r0, #64 ; 0x40 8029bf6: fb95 f0f0 sdiv r0, r5, r0 fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; 8029bfa: 681e ldr r6, [r3, #0] 8029bfc: 68dd ldr r5, [r3, #12] 8029bfe: 691f ldr r7, [r3, #16] 8029c00: 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; 8029c02: 6298 str r0, [r3, #40] ; 0x28 fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; 8029c04: fb90 f1f5 sdiv r1, r0, r5 8029c08: 19cf adds r7, r1, r7 8029c0a: fb97 f2f6 sdiv r2, r7, r6 8029c0e: fb06 7612 mls r6, r6, r2, r7 fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; 8029c12: 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; 8029c16: 621e str r6, [r3, #32] fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; 8029c18: 6258 str r0, [r3, #36] ; 0x24 for(i = 0; i < size/STRING_SIZE; i++) 8029c1a: ea4f 1798 mov.w r7, r8, lsr #6 8029c1e: 2500 movs r5, #0 { log_fetch(&entry, portMAX_DELAY); strncat(str, &entry.data[1], (strlen(entry.data) - 1)); 8029c20: 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++) 8029c24: e02f b.n 8029c86 { log_fetch(&entry, portMAX_DELAY); 8029c26: f04f 31ff mov.w r1, #4294967295 8029c2a: a80e add r0, sp, #56 ; 0x38 8029c2c: f7ff fed2 bl 80299d4 strncat(str, &entry.data[1], (strlen(entry.data) - 1)); 8029c30: 4630 mov r0, r6 8029c32: f7f8 f93d bl 8021eb0 8029c36: f10d 013e add.w r1, sp, #62 ; 0x3e 8029c3a: 1e42 subs r2, r0, #1 8029c3c: 4620 mov r0, r4 8029c3e: f7f8 f967 bl 8021f10 TM_RTC_GetDateTimeFromUnix(&rtc_data, entry.timestamp); 8029c42: a805 add r0, sp, #20 8029c44: 990e ldr r1, [sp, #56] ; 0x38 8029c46: f7fc fcaf bl 80265a8 sprintf(buf, "%02i.%02i.%02i %02i:%02i:%02i", rtc_data.date, rtc_data.month, 8029c4a: f89d 101d ldrb.w r1, [sp, #29] 8029c4e: f89d 201b ldrb.w r2, [sp, #27] 8029c52: 9100 str r1, [sp, #0] 8029c54: f89d 1019 ldrb.w r1, [sp, #25] 8029c58: f89d 301c ldrb.w r3, [sp, #28] 8029c5c: 9101 str r1, [sp, #4] 8029c5e: f89d 1018 ldrb.w r1, [sp, #24] 8029c62: 9102 str r1, [sp, #8] 8029c64: f89d 1014 ldrb.w r1, [sp, #20] 8029c68: a809 add r0, sp, #36 ; 0x24 8029c6a: 9103 str r1, [sp, #12] 8029c6c: 490b ldr r1, [pc, #44] ; (8029c9c ) 8029c6e: f7fd fdd1 bl 8027814 rtc_data.year, rtc_data.hours, rtc_data.minutes, rtc_data.seconds); strcat(str, buf); 8029c72: a909 add r1, sp, #36 ; 0x24 8029c74: 4620 mov r0, r4 8029c76: f7f7 ffa9 bl 8021bcc strcat(str, "\n"); 8029c7a: 4620 mov r0, r4 8029c7c: 4908 ldr r1, [pc, #32] ; (8029ca0 ) 8029c7e: f7f7 ffa5 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++) 8029c82: 3501 adds r5, #1 8029c84: b2ed uxtb r5, r5 8029c86: 42bd cmp r5, r7 8029c88: d3cd bcc.n 8029c26 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); 8029c8a: 4620 mov r0, r4 8029c8c: f7f8 f910 bl 8021eb0 } 8029c90: b01c add sp, #112 ; 0x70 8029c92: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8029c96: bf00 nop 8029c98: 20000b94 .word 0x20000b94 8029c9c: 08039b66 .word 0x08039b66 8029ca0: 08041133 .word 0x08041133 08029ca4 : /** * @brief Возвращает общее количество страниц */ uint32_t History_GetPageCount(void) { 8029ca4: b508 push {r3, lr} return (((ringfs_count_estimate(&fs2)) / 10) + 1); 8029ca6: 4804 ldr r0, [pc, #16] ; (8029cb8 ) 8029ca8: f000 f9d4 bl 802a054 8029cac: 230a movs r3, #10 8029cae: fb90 f0f3 sdiv r0, r0, r3 } 8029cb2: 3001 adds r0, #1 8029cb4: bd08 pop {r3, pc} 8029cb6: bf00 nop 8029cb8: 20000b68 .word 0x20000b68 08029cbc : uint32_t History_GetTotalSTRCount(void) { return ringfs_count_estimate(&fs2); 8029cbc: 4801 ldr r0, [pc, #4] ; (8029cc4 ) 8029cbe: f000 b9c9 b.w 802a054 8029cc2: bf00 nop 8029cc4: 20000b68 .word 0x20000b68 08029cc8 : } void History_GetPage(char *str, uint32_t page) { 8029cc8: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 8029ccc: b09d sub sp, #116 ; 0x74 8029cce: 460e mov r6, r1 8029cd0: 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); 8029cd2: f7ff fff3 bl 8029cbc memset(buf, 0, 20); 8029cd6: 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); 8029cd8: 4605 mov r5, r0 memset(buf, 0, 20); 8029cda: 2214 movs r2, #20 8029cdc: a809 add r0, sp, #36 ; 0x24 for(i=0; i < 10; i++){ fs2.cursor_position = start - 10*(page-1) - 1 - i; 8029cde: 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); 8029ce2: f7f7 ff0d bl 8021b00 for(i=0; i < 10; i++){ fs2.cursor_position = start - 10*(page-1) - 1 - i; 8029ce6: fb09 5906 mla r9, r9, r6, r5 8029cea: 4d36 ldr r5, [pc, #216] ; (8029dc4 ) 8029cec: f109 0909 add.w r9, r9, #9 8029cf0: 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) )); 8029cf2: 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) 8029cf6: 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) 8029cfa: 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; 8029cfc: 62ab str r3, [r5, #40] ; 0x28 if(fs2.cursor_position < 0) 8029cfe: db5e blt.n 8029dbe break; else{ fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs.slots_per_sector)%fs2.flash->sector_count; 8029d00: 4a31 ldr r2, [pc, #196] ; (8029dc8 ) 8029d02: 68d1 ldr r1, [r2, #12] 8029d04: 692a ldr r2, [r5, #16] 8029d06: fb93 f1f1 sdiv r1, r3, r1 8029d0a: 1889 adds r1, r1, r2 8029d0c: 682a ldr r2, [r5, #0] 8029d0e: 6892 ldr r2, [r2, #8] 8029d10: fb91 f0f2 sdiv r0, r1, r2 8029d14: fb02 1210 mls r2, r2, r0, r1 8029d18: 622a str r2, [r5, #32] fs2.cursor.slot = fs2.cursor_position%fs2.slots_per_sector; 8029d1a: 68ea ldr r2, [r5, #12] 8029d1c: fb93 f1f2 sdiv r1, r3, r2 8029d20: fb02 3311 mls r3, r2, r1, r3 8029d24: 626b str r3, [r5, #36] ; 0x24 } entry.type = LOG_LOGIN; log_fetch(&entry, portMAX_DELAY); 8029d26: 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; 8029d2a: 2305 movs r3, #5 log_fetch(&entry, portMAX_DELAY); 8029d2c: 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; 8029d2e: f88d 303c strb.w r3, [sp, #60] ; 0x3c log_fetch(&entry, portMAX_DELAY); 8029d32: f7ff fe4f bl 80299d4 strcat(str, "\""); 8029d36: 4925 ldr r1, [pc, #148] ; (8029dcc ) 8029d38: 4620 mov r0, r4 8029d3a: f7f7 ff47 bl 8021bcc strncat(str, logsStrShortRu[entry.type], (strlen(logsStrShortRu[entry.type]) )); 8029d3e: 4b24 ldr r3, [pc, #144] ; (8029dd0 ) 8029d40: f89d 203c ldrb.w r2, [sp, #60] ; 0x3c 8029d44: f853 8022 ldr.w r8, [r3, r2, lsl #2] 8029d48: 4640 mov r0, r8 8029d4a: f7f8 f8b1 bl 8021eb0 8029d4e: 4641 mov r1, r8 8029d50: 4602 mov r2, r0 8029d52: 4620 mov r0, r4 8029d54: f7f8 f8dc bl 8021f10 strcat(str, ";"); 8029d58: 491e ldr r1, [pc, #120] ; (8029dd4 ) 8029d5a: 4620 mov r0, r4 8029d5c: f7f7 ff36 bl 8021bcc strncat(str, entry.data, (strlen(entry.data) )); 8029d60: 4638 mov r0, r7 8029d62: f7f8 f8a5 bl 8021eb0 8029d66: 4639 mov r1, r7 8029d68: 4602 mov r2, r0 8029d6a: 4620 mov r0, r4 8029d6c: f7f8 f8d0 bl 8021f10 strcat(str, ";"); 8029d70: 4918 ldr r1, [pc, #96] ; (8029dd4 ) 8029d72: 4620 mov r0, r4 8029d74: f7f7 ff2a bl 8021bcc TM_RTC_GetDateTimeFromUnix(&rtc_data, entry.timestamp); 8029d78: a805 add r0, sp, #20 8029d7a: 990e ldr r1, [sp, #56] ; 0x38 8029d7c: f7fc fc14 bl 80265a8 sprintf(buf, "%02i.%02i.%02i %02i:%02i:%02i", rtc_data.date, rtc_data.month, 8029d80: f89d 101d ldrb.w r1, [sp, #29] 8029d84: f89d 201b ldrb.w r2, [sp, #27] 8029d88: 9100 str r1, [sp, #0] 8029d8a: f89d 1019 ldrb.w r1, [sp, #25] 8029d8e: f89d 301c ldrb.w r3, [sp, #28] 8029d92: 9101 str r1, [sp, #4] 8029d94: f89d 1018 ldrb.w r1, [sp, #24] 8029d98: 9102 str r1, [sp, #8] 8029d9a: f89d 1014 ldrb.w r1, [sp, #20] 8029d9e: a809 add r0, sp, #36 ; 0x24 8029da0: 9103 str r1, [sp, #12] 8029da2: 490d ldr r1, [pc, #52] ; (8029dd8 ) 8029da4: f7fd fd36 bl 8027814 rtc_data.year, rtc_data.hours, rtc_data.minutes, rtc_data.seconds); strcat(str, buf); 8029da8: a909 add r1, sp, #36 ; 0x24 8029daa: 4620 mov r0, r4 8029dac: f7f7 ff0e bl 8021bcc 8029db0: 3601 adds r6, #1 strcat(str, "\","); 8029db2: 4620 mov r0, r4 8029db4: 4909 ldr r1, [pc, #36] ; (8029ddc ) 8029db6: f7f7 ff09 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++){ 8029dba: 2e0a cmp r6, #10 8029dbc: d19b bne.n 8029cf6 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, "\","); } } 8029dbe: b01d add sp, #116 ; 0x74 8029dc0: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 8029dc4: 20000b68 .word 0x20000b68 8029dc8: 20000b94 .word 0x20000b94 8029dcc: 08044d03 .word 0x08044d03 8029dd0: 200006c4 .word 0x200006c4 8029dd4: 08045b19 .word 0x08045b19 8029dd8: 08039b66 .word 0x08039b66 8029ddc: 08039b84 .word 0x08039b84 08029de0 : uint32_t History_GetData(int ptr, char *str, uint32_t size, bool start) { 8029de0: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8029de4: f5ad 6d8b sub.w sp, sp, #1112 ; 0x458 8029de8: 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; 8029dea: 2205 movs r2, #5 strcat(str, "\","); } } uint32_t History_GetData(int ptr, char *str, uint32_t size, bool start) { 8029dec: 4604 mov r4, r0 8029dee: 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; 8029df0: f88d 203c strb.w r2, [sp, #60] ; 0x3c if(start) 8029df4: b123 cbz r3, 8029e00 log_rewind(&entry, portMAX_DELAY); 8029df6: a80e add r0, sp, #56 ; 0x38 8029df8: f04f 31ff mov.w r1, #4294967295 8029dfc: f7ff fe0c bl 8029a18 fs2.cursor_position = ptr/STRING_SIZE_HISTORY; 8029e00: 4b42 ldr r3, [pc, #264] ; (8029f0c ) 8029e02: 2164 movs r1, #100 ; 0x64 fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs2.slots_per_sector)%fs2.flash->sector_count; 8029e04: 68de ldr r6, [r3, #12] 8029e06: 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; 8029e08: fb94 f4f1 sdiv r4, r4, r1 fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs2.slots_per_sector)%fs2.flash->sector_count; 8029e0c: fb94 f0f6 sdiv r0, r4, r6 8029e10: eb00 0e07 add.w lr, r0, r7 8029e14: 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; 8029e16: 629c str r4, [r3, #40] ; 0x28 fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs2.slots_per_sector)%fs2.flash->sector_count; 8029e18: 68bf ldr r7, [r7, #8] 8029e1a: fb9e f2f7 sdiv r2, lr, r7 fs2.cursor.slot = fs2.cursor_position%fs2.slots_per_sector; 8029e1e: 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; 8029e22: fb07 e712 mls r7, r7, r2, lr fs2.cursor.slot = fs2.cursor_position%fs2.slots_per_sector; 8029e26: 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; 8029e28: 621f str r7, [r3, #32] fs2.cursor.slot = fs2.cursor_position%fs2.slots_per_sector; for(i = 0; i < size/STRING_SIZE_HISTORY; i++) 8029e2a: fbb8 f8f1 udiv r8, r8, r1 8029e2e: 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))); 8029e30: 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++) 8029e34: e05f b.n 8029ef6 { memset(temp_str, 0, 100); 8029e36: 2264 movs r2, #100 ; 0x64 8029e38: 2100 movs r1, #0 8029e3a: a81c add r0, sp, #112 ; 0x70 8029e3c: f7f7 fe60 bl 8021b00 log_fetch(&entry, portMAX_DELAY); 8029e40: f04f 31ff mov.w r1, #4294967295 8029e44: a80e add r0, sp, #56 ; 0x38 8029e46: f7ff fdc5 bl 80299d4 strncat(temp_str, logsStrShortRu[entry.type], (strlen(logsStrShortRu[entry.type]))); 8029e4a: 4b31 ldr r3, [pc, #196] ; (8029f10 ) 8029e4c: f89d 203c ldrb.w r2, [sp, #60] ; 0x3c 8029e50: f853 7022 ldr.w r7, [r3, r2, lsl #2] 8029e54: 4638 mov r0, r7 8029e56: f7f8 f82b bl 8021eb0 8029e5a: 4639 mov r1, r7 8029e5c: 4602 mov r2, r0 8029e5e: a81c add r0, sp, #112 ; 0x70 8029e60: f7f8 f856 bl 8021f10 strcat(temp_str, ";"); 8029e64: 492b ldr r1, [pc, #172] ; (8029f14 ) 8029e66: a81c add r0, sp, #112 ; 0x70 8029e68: f7f7 feb0 bl 8021bcc strncat(temp_str, entry.data, (strlen(entry.data))); 8029e6c: 4630 mov r0, r6 8029e6e: f7f8 f81f bl 8021eb0 8029e72: 4631 mov r1, r6 8029e74: 4602 mov r2, r0 8029e76: a81c add r0, sp, #112 ; 0x70 8029e78: f7f8 f84a bl 8021f10 strcat(temp_str, ";"); 8029e7c: 4925 ldr r1, [pc, #148] ; (8029f14 ) 8029e7e: a81c add r0, sp, #112 ; 0x70 8029e80: f7f7 fea4 bl 8021bcc TM_RTC_GetDateTimeFromUnix(&rtc_data, entry.timestamp); 8029e84: a805 add r0, sp, #20 8029e86: 990e ldr r1, [sp, #56] ; 0x38 8029e88: f7fc fb8e bl 80265a8 sprintf(buf, "%02i.%02i.%02i %02i:%02i:%02i", rtc_data.date, rtc_data.month, 8029e8c: f89d 101d ldrb.w r1, [sp, #29] 8029e90: f89d 301c ldrb.w r3, [sp, #28] 8029e94: 9100 str r1, [sp, #0] 8029e96: f89d 1019 ldrb.w r1, [sp, #25] 8029e9a: f89d 201b ldrb.w r2, [sp, #27] 8029e9e: 9101 str r1, [sp, #4] 8029ea0: f89d 1018 ldrb.w r1, [sp, #24] 8029ea4: 9102 str r1, [sp, #8] 8029ea6: f89d 1014 ldrb.w r1, [sp, #20] 8029eaa: a809 add r0, sp, #36 ; 0x24 8029eac: 9103 str r1, [sp, #12] 8029eae: 491a ldr r1, [pc, #104] ; (8029f18 ) 8029eb0: f7fd fcb0 bl 8027814 rtc_data.year, rtc_data.hours, rtc_data.minutes, rtc_data.seconds); strcat(temp_str, buf); 8029eb4: a909 add r1, sp, #36 ; 0x24 8029eb6: a81c add r0, sp, #112 ; 0x70 8029eb8: f7f7 fe88 bl 8021bcc len = strlen(temp_str); 8029ebc: a81c add r0, sp, #112 ; 0x70 8029ebe: f7f7 fff7 bl 8021eb0 if (len <= STRING_SIZE_HISTORY - 1) 8029ec2: b283 uxth r3, r0 8029ec4: 2b63 cmp r3, #99 ; 0x63 8029ec6: d80c bhi.n 8029ee2 strncat(str, temp_str, STRING_SIZE_HISTORY); } return strlen(str); } 8029ec8: 461a mov r2, r3 len = strlen(temp_str); if (len <= STRING_SIZE_HISTORY - 1) { memset(&temp_str[len], ' ', STRING_SIZE_HISTORY - len - 1); 8029eca: ab1c add r3, sp, #112 ; 0x70 8029ecc: 1898 adds r0, r3, r2 8029ece: 2120 movs r1, #32 8029ed0: f1c2 0263 rsb r2, r2, #99 ; 0x63 8029ed4: f7f7 fe14 bl 8021b00 strcat(temp_str, "\n"); 8029ed8: a81c add r0, sp, #112 ; 0x70 8029eda: 4910 ldr r1, [pc, #64] ; (8029f1c ) 8029edc: f7f7 fe76 bl 8021bcc 8029ee0: e002 b.n 8029ee8 } else { temp_str[STRING_SIZE - 1] = 0xa; 8029ee2: 230a movs r3, #10 8029ee4: f88d 30af strb.w r3, [sp, #175] ; 0xaf } strncat(str, temp_str, STRING_SIZE_HISTORY); 8029ee8: 4628 mov r0, r5 8029eea: a91c add r1, sp, #112 ; 0x70 8029eec: 2264 movs r2, #100 ; 0x64 8029eee: f7f8 f80f 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++) 8029ef2: 3401 adds r4, #1 8029ef4: b2e4 uxtb r4, r4 8029ef6: 4544 cmp r4, r8 8029ef8: d39d bcc.n 8029e36 temp_str[STRING_SIZE - 1] = 0xa; } strncat(str, temp_str, STRING_SIZE_HISTORY); } return strlen(str); 8029efa: 4628 mov r0, r5 8029efc: f7f7 ffd8 bl 8021eb0 } 8029f00: b016 add sp, #88 ; 0x58 8029f02: f50d 6d80 add.w sp, sp, #1024 ; 0x400 8029f06: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8029f0a: bf00 nop 8029f0c: 20000b68 .word 0x20000b68 8029f10: 200006c4 .word 0x200006c4 8029f14: 08045b19 .word 0x08045b19 8029f18: 08039b66 .word 0x08039b66 8029f1c: 08041133 .word 0x08041133 08029f20 <_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; 8029f20: 6803 ldr r3, [r0, #0] 8029f22: 680a ldr r2, [r1, #0] struct slot_header { uint32_t status; }; static int _slot_address(struct ringfs *fs, struct ringfs_loc *loc) { 8029f24: 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; 8029f26: 685c ldr r4, [r3, #4] 8029f28: 18a2 adds r2, r4, r2 8029f2a: 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; 8029f2c: 6883 ldr r3, [r0, #8] 8029f2e: 6848 ldr r0, [r1, #4] 8029f30: 3304 adds r3, #4 8029f32: 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) + 8029f34: fb04 3002 mla r0, r4, r2, r3 (sizeof(struct slot_header) + fs->object_size) * loc->slot; } 8029f38: 3008 adds r0, #8 8029f3a: bd10 pop {r4, pc} 08029f3c <_slot_get_status>: static int _slot_get_status(struct ringfs *fs, struct ringfs_loc *loc, uint32_t *status) { 8029f3c: b570 push {r4, r5, r6, lr} return fs->flash->read(fs->flash, 8029f3e: 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) { 8029f40: 4616 mov r6, r2 return fs->flash->read(fs->flash, 8029f42: f7ff ffed bl 8029f20 <_slot_address> 8029f46: 6965 ldr r5, [r4, #20] 8029f48: 4601 mov r1, r0 8029f4a: 4632 mov r2, r6 8029f4c: 4620 mov r0, r4 8029f4e: 2304 movs r3, #4 8029f50: 47a8 blx r5 _slot_address(fs, loc) + offsetof(struct slot_header, status), status, sizeof(*status)); } 8029f52: bd70 pop {r4, r5, r6, pc} 08029f54 <_slot_set_status>: static int _slot_set_status(struct ringfs *fs, struct ringfs_loc *loc, uint32_t status) { 8029f54: b573 push {r0, r1, r4, r5, r6, lr} 8029f56: ac02 add r4, sp, #8 return fs->flash->program(fs->flash, 8029f58: 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) { 8029f5a: f844 2d04 str.w r2, [r4, #-4]! return fs->flash->program(fs->flash, 8029f5e: f7ff ffdf bl 8029f20 <_slot_address> 8029f62: 692e ldr r6, [r5, #16] 8029f64: 4601 mov r1, r0 8029f66: 4622 mov r2, r4 8029f68: 4628 mov r0, r5 8029f6a: 2304 movs r3, #4 8029f6c: 47b0 blx r6 _slot_address(fs, loc) + offsetof(struct slot_header, status), &status, sizeof(status)); } 8029f6e: bd7c pop {r2, r3, r4, r5, r6, pc} 08029f70 <_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, 8029f70: 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; 8029f72: 6843 ldr r3, [r0, #4] 8029f74: 18cb adds r3, r1, r3 8029f76: 6801 ldr r1, [r0, #0] } static int _sector_get_status(struct ringfs *fs, int sector, uint32_t *status) { 8029f78: b510 push {r4, lr} return fs->flash->read(fs->flash, 8029f7a: 4359 muls r1, r3 8029f7c: 6944 ldr r4, [r0, #20] 8029f7e: 2304 movs r3, #4 8029f80: 47a0 blx r4 _sector_address(fs, sector) + offsetof(struct sector_header, status), status, sizeof(*status)); } 8029f82: bd10 pop {r4, pc} 08029f84 <_sector_set_status>: static int _sector_set_status(struct ringfs *fs, int sector, uint32_t status) { 8029f84: b513 push {r0, r1, r4, lr} return fs->flash->program(fs->flash, 8029f86: 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) { 8029f88: ab02 add r3, sp, #8 return fs->flash->program(fs->flash, 8029f8a: 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) { 8029f8c: 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; 8029f90: 6842 ldr r2, [r0, #4] 8029f92: 188a adds r2, r1, r2 8029f94: 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, 8029f96: 4351 muls r1, r2 8029f98: 461a mov r2, r3 8029f9a: 2304 movs r3, #4 8029f9c: 47a0 blx r4 _sector_address(fs, sector) + offsetof(struct sector_header, status), &status, sizeof(status)); } 8029f9e: bd1c pop {r2, r3, r4, pc} 08029fa0 <_sector_free>: static int _sector_free(struct ringfs *fs, int sector) { 8029fa0: 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; 8029fa2: 6803 ldr r3, [r0, #0] 8029fa4: 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) { 8029fa6: 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; 8029fa8: 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); 8029faa: 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; 8029fae: 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) { 8029fb0: 460e mov r6, r1 int sector_addr = _sector_address(fs, sector); _sector_set_status(fs, sector, SECTOR_ERASING); 8029fb2: f7ff ffe7 bl 8029f84 <_sector_set_status> fs->flash->sector_erase(fs->flash, sector_addr); 8029fb6: 6820 ldr r0, [r4, #0] 8029fb8: 4629 mov r1, r5 8029fba: 68c3 ldr r3, [r0, #12] 8029fbc: 4798 blx r3 fs->flash->program(fs->flash, 8029fbe: 4622 mov r2, r4 8029fc0: 1d29 adds r1, r5, #4 8029fc2: f852 0b04 ldr.w r0, [r2], #4 8029fc6: 2304 movs r3, #4 8029fc8: 6907 ldr r7, [r0, #16] 8029fca: 47b8 blx r7 sector_addr + offsetof(struct sector_header, version), &fs->version, sizeof(fs->version)); _sector_set_status(fs, sector, SECTOR_FREE); 8029fcc: 4620 mov r0, r4 8029fce: 4631 mov r1, r6 8029fd0: f06f 02ff mvn.w r2, #255 ; 0xff 8029fd4: f7ff ffd6 bl 8029f84 <_sector_set_status> return 0; } 8029fd8: 2000 movs r0, #0 8029fda: bdf8 pop {r3, r4, r5, r6, r7, pc} 08029fdc <_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++; 8029fdc: 684b ldr r3, [r1, #4] if (loc->slot >= fs->slots_per_sector) 8029fde: 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++; 8029fe0: 3301 adds r3, #1 if (loc->slot >= fs->slots_per_sector) 8029fe2: 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++; 8029fe4: 604b str r3, [r1, #4] if (loc->slot >= fs->slots_per_sector) 8029fe6: db09 blt.n 8029ffc <_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) 8029fe8: 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++; 8029fea: 680a ldr r2, [r1, #0] if (loc->sector >= fs->flash->sector_count) 8029fec: 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++; 8029fee: 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; 8029ff0: 2300 movs r3, #0 loc->sector++; if (loc->sector >= fs->flash->sector_count) 8029ff2: 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; 8029ff4: e881 000c stmia.w r1, {r2, r3} loc->sector++; if (loc->sector >= fs->flash->sector_count) loc->sector = 0; 8029ff8: bfa8 it ge 8029ffa: 600b strge r3, [r1, #0] 8029ffc: 4770 bx lr 08029ffe : 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; 8029ffe: e880 000e stmia.w r0, {r1, r2, r3} /* Precalculate commonly used values. */ fs->slots_per_sector = (fs->flash->sector_size - sizeof(struct sector_header)) / 802a002: 680a ldr r2, [r1, #0] (sizeof(struct slot_header) + fs->object_size); 802a004: 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)) / 802a006: 3a08 subs r2, #8 802a008: fbb2 f3f3 udiv r3, r2, r3 802a00c: 60c3 str r3, [r0, #12] (sizeof(struct slot_header) + fs->object_size); return 0; } 802a00e: 2000 movs r0, #0 802a010: 4770 bx lr 0802a012 : int ringfs_format(struct ringfs *fs) { 802a012: b538 push {r3, r4, r5, lr} 802a014: 4604 mov r4, r0 /* Mark all sectors to prevent half-erased filesystems. */ for (int sector=0; sectorflash->sector_count; sector++) 802a016: 2500 movs r5, #0 802a018: e005 b.n 802a026 _sector_set_status(fs, sector, SECTOR_FORMATTING); 802a01a: 4629 mov r1, r5 802a01c: 4620 mov r0, r4 802a01e: 2200 movs r2, #0 802a020: f7ff ffb0 bl 8029f84 <_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++) 802a024: 3501 adds r5, #1 802a026: 6823 ldr r3, [r4, #0] 802a028: 689b ldr r3, [r3, #8] 802a02a: 429d cmp r5, r3 802a02c: dbf5 blt.n 802a01a 802a02e: 2500 movs r5, #0 802a030: e004 b.n 802a03c _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); 802a032: 4629 mov r1, r5 802a034: 4620 mov r0, r4 802a036: f7ff ffb3 bl 8029fa0 <_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++) 802a03a: 3501 adds r5, #1 802a03c: 6823 ldr r3, [r4, #0] 802a03e: 689b ldr r3, [r3, #8] 802a040: 429d cmp r5, r3 802a042: dbf6 blt.n 802a032 _sector_free(fs, sector); /* Start reading & writing at the first sector. */ fs->read.sector = 0; 802a044: 2000 movs r0, #0 802a046: 6120 str r0, [r4, #16] fs->read.slot = 0; 802a048: 6160 str r0, [r4, #20] fs->write.sector = 0; 802a04a: 61a0 str r0, [r4, #24] fs->write.slot = 0; 802a04c: 61e0 str r0, [r4, #28] fs->cursor.sector = 0; 802a04e: 6220 str r0, [r4, #32] fs->cursor.slot = 0; 802a050: 6260 str r0, [r4, #36] ; 0x24 return 0; } 802a052: bd38 pop {r3, r4, r5, pc} 0802a054 : 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) % 802a054: 6803 ldr r3, [r0, #0] 802a056: 6981 ldr r1, [r0, #24] 802a058: 6902 ldr r2, [r0, #16] 802a05a: 689b ldr r3, [r3, #8] 802a05c: 1a8a subs r2, r1, r2 802a05e: 18d2 adds r2, r2, r3 802a060: fb92 f1f3 sdiv r1, r2, r3 802a064: fb03 2311 mls r3, r3, r1, r2 { return fs->slots_per_sector * (fs->flash->sector_count - 1); } int ringfs_count_estimate(struct ringfs *fs) { 802a068: 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; 802a06a: 69c1 ldr r1, [r0, #28] 802a06c: 68c4 ldr r4, [r0, #12] 802a06e: 6940 ldr r0, [r0, #20] 802a070: fb04 1103 mla r1, r4, r3, r1 } 802a074: 1a08 subs r0, r1, r0 802a076: bd10 pop {r4, pc} 0802a078 : * - 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; 802a078: 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) { 802a07a: 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; 802a07c: 6985 ldr r5, [r0, #24] 802a07e: 689b ldr r3, [r3, #8] 802a080: 3501 adds r5, #1 802a082: fb95 f2f3 sdiv r2, r5, r3 802a086: 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) { 802a08a: 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); 802a08c: aa01 add r2, sp, #4 802a08e: 4629 mov r1, r5 int ringfs_cursor_position(struct ringfs *fs) { return fs->cursor_position; } int ringfs_append(struct ringfs *fs, const void *object) { 802a090: 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); 802a092: f7ff ff6d bl 8029f70 <_sector_get_status> if (status != SECTOR_FREE) { 802a096: 9b01 ldr r3, [sp, #4] 802a098: f513 7f80 cmn.w r3, #256 ; 0x100 802a09c: d01b beq.n 802a0d6 /* Next sector must be freed. But first... */ /* Move the read & cursor heads out of the way. */ if (fs->read.sector == next_sector) 802a09e: 6923 ldr r3, [r4, #16] 802a0a0: 42ab cmp r3, r5 802a0a2: d108 bne.n 802a0b6 /** 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) 802a0a4: 6821 ldr r1, [r4, #0] 802a0a6: 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++; 802a0a8: 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; 802a0aa: 2300 movs r3, #0 loc->sector++; if (loc->sector >= fs->flash->sector_count) 802a0ac: 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++; 802a0ae: 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; 802a0b0: 6163 str r3, [r4, #20] loc->sector++; if (loc->sector >= fs->flash->sector_count) loc->sector = 0; 802a0b2: bfa8 it ge 802a0b4: 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) 802a0b6: 6a23 ldr r3, [r4, #32] 802a0b8: 42ab cmp r3, r5 802a0ba: d108 bne.n 802a0ce /** 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) 802a0bc: 6821 ldr r1, [r4, #0] 802a0be: 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++; 802a0c0: 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; 802a0c2: 2300 movs r3, #0 loc->sector++; if (loc->sector >= fs->flash->sector_count) 802a0c4: 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++; 802a0c6: 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; 802a0c8: 6263 str r3, [r4, #36] ; 0x24 loc->sector++; if (loc->sector >= fs->flash->sector_count) loc->sector = 0; 802a0ca: bfa8 it ge 802a0cc: 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); 802a0ce: 4620 mov r0, r4 802a0d0: 4629 mov r1, r5 802a0d2: f7ff ff65 bl 8029fa0 <_sector_free> } /* Now we can make sure the current write sector is writable. */ _sector_get_status(fs, fs->write.sector, &status); 802a0d6: 4620 mov r0, r4 802a0d8: 69a1 ldr r1, [r4, #24] 802a0da: aa01 add r2, sp, #4 802a0dc: f7ff ff48 bl 8029f70 <_sector_get_status> if (status == SECTOR_FREE) { 802a0e0: 9b01 ldr r3, [sp, #4] 802a0e2: f513 7f80 cmn.w r3, #256 ; 0x100 802a0e6: d105 bne.n 802a0f4 /* Free sector. Mark as used. */ _sector_set_status(fs, fs->write.sector, SECTOR_IN_USE); 802a0e8: 4620 mov r0, r4 802a0ea: 69a1 ldr r1, [r4, #24] 802a0ec: 4a15 ldr r2, [pc, #84] ; (802a144 ) 802a0ee: f7ff ff49 bl 8029f84 <_sector_set_status> 802a0f2: e008 b.n 802a106 } else if (status != SECTOR_IN_USE) { 802a0f4: f513 3f80 cmn.w r3, #65536 ; 0x10000 802a0f8: d005 beq.n 802a106 printf("ringfs_append: corrupted filesystem\r\n"); 802a0fa: 4813 ldr r0, [pc, #76] ; (802a148 ) 802a0fc: f7fd fb3e bl 802777c return -1; 802a100: f04f 30ff mov.w r0, #4294967295 802a104: e01d b.n 802a142 } /* Preallocate slot. */ _slot_set_status(fs, &fs->write, SLOT_RESERVED); 802a106: f104 0518 add.w r5, r4, #24 802a10a: f06f 02ff mvn.w r2, #255 ; 0xff 802a10e: 4629 mov r1, r5 802a110: 4620 mov r0, r4 802a112: f7ff ff1f bl 8029f54 <_slot_set_status> /* Write object. */ fs->flash->program(fs->flash, _slot_address(fs, &fs->write) + sizeof(struct slot_header), 802a116: 4629 mov r1, r5 802a118: 4620 mov r0, r4 802a11a: f7ff ff01 bl 8029f20 <_slot_address> /* Preallocate slot. */ _slot_set_status(fs, &fs->write, SLOT_RESERVED); /* Write object. */ fs->flash->program(fs->flash, 802a11e: 6826 ldr r6, [r4, #0] 802a120: 68a3 ldr r3, [r4, #8] 802a122: f8d6 c010 ldr.w ip, [r6, #16] _slot_address(fs, &fs->write) + sizeof(struct slot_header), 802a126: 1d01 adds r1, r0, #4 /* Preallocate slot. */ _slot_set_status(fs, &fs->write, SLOT_RESERVED); /* Write object. */ fs->flash->program(fs->flash, 802a128: 463a mov r2, r7 802a12a: 4630 mov r0, r6 802a12c: 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); 802a12e: 4629 mov r1, r5 802a130: 4a04 ldr r2, [pc, #16] ; (802a144 ) 802a132: 4620 mov r0, r4 802a134: f7ff ff0e bl 8029f54 <_slot_set_status> /* Advance the write head. */ _loc_advance_slot(fs, &fs->write); 802a138: 4620 mov r0, r4 802a13a: 4629 mov r1, r5 802a13c: f7ff ff4e bl 8029fdc <_loc_advance_slot> return 0; 802a140: 2000 movs r0, #0 } 802a142: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 802a144: ffff0000 .word 0xffff0000 802a148: 08039dac .word 0x08039dac 0802a14c : int ringfs_fetch(struct ringfs *fs, void *object) { 802a14c: e92d 41f3 stmdb sp!, {r0, r1, r4, r5, r6, r7, r8, lr} 802a150: 4604 mov r4, r0 802a152: 4688 mov r8, r1 /* Advance forward in search of a valid slot. */ while (!_loc_equal(&fs->cursor, &fs->write)) { 802a154: f100 0520 add.w r5, r0, #32 802a158: e021 b.n 802a19e uint32_t status; _slot_get_status(fs, &fs->cursor, &status); 802a15a: 4620 mov r0, r4 802a15c: 4629 mov r1, r5 802a15e: aa01 add r2, sp, #4 802a160: f7ff feec bl 8029f3c <_slot_get_status> if (status == SLOT_VALID) { 802a164: 9b01 ldr r3, [sp, #4] 802a166: f513 3f80 cmn.w r3, #65536 ; 0x10000 802a16a: d114 bne.n 802a196 fs->flash->read(fs->flash, _slot_address(fs, &fs->cursor) + sizeof(struct slot_header), 802a16c: 4629 mov r1, r5 802a16e: 4620 mov r0, r4 802a170: f7ff fed6 bl 8029f20 <_slot_address> uint32_t status; _slot_get_status(fs, &fs->cursor, &status); if (status == SLOT_VALID) { fs->flash->read(fs->flash, 802a174: 6827 ldr r7, [r4, #0] 802a176: 68a3 ldr r3, [r4, #8] 802a178: f8d7 c014 ldr.w ip, [r7, #20] _slot_address(fs, &fs->cursor) + sizeof(struct slot_header), 802a17c: 1d01 adds r1, r0, #4 uint32_t status; _slot_get_status(fs, &fs->cursor, &status); if (status == SLOT_VALID) { fs->flash->read(fs->flash, 802a17e: 4642 mov r2, r8 802a180: 4638 mov r0, r7 802a182: 47e0 blx ip _slot_address(fs, &fs->cursor) + sizeof(struct slot_header), object, fs->object_size); _loc_advance_slot(fs, &fs->cursor); 802a184: 4620 mov r0, r4 802a186: 4629 mov r1, r5 802a188: f7ff ff28 bl 8029fdc <_loc_advance_slot> fs->cursor_position++; 802a18c: 6aa3 ldr r3, [r4, #40] ; 0x28 802a18e: 3301 adds r3, #1 802a190: 62a3 str r3, [r4, #40] ; 0x28 return 0; 802a192: 4630 mov r0, r6 802a194: e012 b.n 802a1bc } _loc_advance_slot(fs, &fs->cursor); 802a196: 4620 mov r0, r4 802a198: 4629 mov r1, r5 802a19a: f7ff ff1f bl 8029fdc <_loc_advance_slot> * @{ */ static bool _loc_equal(struct ringfs_loc *a, struct ringfs_loc *b) { return (a->sector == b->sector) && (a->slot == b->slot); 802a19e: 6a22 ldr r2, [r4, #32] 802a1a0: 69a3 ldr r3, [r4, #24] 802a1a2: 429a cmp r2, r3 802a1a4: d105 bne.n 802a1b2 802a1a6: 6a66 ldr r6, [r4, #36] ; 0x24 802a1a8: 69e3 ldr r3, [r4, #28] 802a1aa: 1af1 subs r1, r6, r3 802a1ac: 424e negs r6, r1 802a1ae: 414e adcs r6, r1 802a1b0: e000 b.n 802a1b4 802a1b2: 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)) { 802a1b4: 2e00 cmp r6, #0 802a1b6: d0d0 beq.n 802a15a } _loc_advance_slot(fs, &fs->cursor); } return -1; 802a1b8: f04f 30ff mov.w r0, #4294967295 } 802a1bc: e8bd 81fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, pc} 0802a1c0 : return 0; } int ringfs_rewind(struct ringfs *fs) { fs->cursor = fs->read; 802a1c0: f100 0110 add.w r1, r0, #16 fs->cursor_position = 0; return 0; } int ringfs_rewind(struct ringfs *fs) { 802a1c4: 4603 mov r3, r0 fs->cursor = fs->read; 802a1c6: f100 0220 add.w r2, r0, #32 802a1ca: c903 ldmia r1, {r0, r1} 802a1cc: e882 0003 stmia.w r2, {r0, r1} fs->cursor_position = 0; 802a1d0: 2000 movs r0, #0 802a1d2: 6298 str r0, [r3, #40] ; 0x28 return 0; } 802a1d4: 4770 bx lr 0802a1d6 : return 0; } int ringfs_scan(struct ringfs *fs) { 802a1d6: 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; 802a1da: 6803 ldr r3, [r0, #0] 802a1dc: 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++) { 802a1de: 2500 movs r5, #0 return 0; } int ringfs_scan(struct ringfs *fs) { 802a1e0: b085 sub sp, #20 802a1e2: 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; 802a1e4: 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; 802a1e6: 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; 802a1e8: 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; 802a1ea: 46a9 mov r9, r5 return 0; } int ringfs_scan(struct ringfs *fs) { uint32_t previous_sector_status = SECTOR_FREE; 802a1ec: 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++) { 802a1f0: e031 b.n 802a256 uint32_t version; }; static int _sector_address(struct ringfs *fs, int sector_offset) { return (fs->flash->sector_offset + sector_offset) * fs->flash->sector_size; 802a1f2: 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)); 802a1f4: 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; 802a1f8: eb05 0b03 add.w fp, r5, r3 802a1fc: 6803 ldr r3, [r0, #0] 802a1fe: 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)); 802a202: 4659 mov r1, fp 802a204: 2308 movs r3, #8 802a206: aa02 add r2, sp, #8 802a208: 47e0 blx ip /* Detect partially-formatted partitions. */ if (header.status == SECTOR_FORMATTING) { 802a20a: 9b02 ldr r3, [sp, #8] 802a20c: 2b00 cmp r3, #0 802a20e: d06b beq.n 802a2e8 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) { 802a210: f1b3 4f7f cmp.w r3, #4278190080 ; 0xff000000 802a214: d001 beq.n 802a21a 802a216: 3301 adds r3, #1 802a218: d106 bne.n 802a228 _sector_free(fs, addr); 802a21a: 4620 mov r0, r4 802a21c: 4659 mov r1, fp 802a21e: f7ff febf bl 8029fa0 <_sector_free> header.status = SECTOR_FREE; 802a222: f06f 03ff mvn.w r3, #255 ; 0xff 802a226: 9302 str r3, [sp, #8] } /* Detect corrupted sectors. */ if (header.status != SECTOR_FREE && header.status != SECTOR_IN_USE) { 802a228: 9b02 ldr r3, [sp, #8] 802a22a: f513 7f80 cmn.w r3, #256 ; 0x100 802a22e: d002 beq.n 802a236 802a230: f513 3f80 cmn.w r3, #65536 ; 0x10000 802a234: d158 bne.n 802a2e8 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) { 802a236: 6862 ldr r2, [r4, #4] 802a238: 9903 ldr r1, [sp, #12] 802a23a: 4291 cmp r1, r2 802a23c: d154 bne.n 802a2e8 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) 802a23e: f513 7f80 cmn.w r3, #256 ; 0x100 802a242: d05b beq.n 802a2fc free_seen = true; /* Record the presence of a IN_USE sector. */ if (header.status == SECTOR_IN_USE) 802a244: f513 3f80 cmn.w r3, #65536 ; 0x10000 802a248: d103 bne.n 802a252 802a24a: e050 b.n 802a2ee fs->cursor.slot = 0; return 0; } int ringfs_scan(struct ringfs *fs) 802a24c: 1e6e subs r6, r5, #1 return -1; } /* Record the presence of a FREE sector. */ if (header.status == SECTOR_FREE) free_seen = true; 802a24e: 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++) { 802a252: 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) { 802a254: 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++) { 802a256: 6820 ldr r0, [r4, #0] 802a258: 6883 ldr r3, [r0, #8] 802a25a: 429d cmp r5, r3 802a25c: dbc9 blt.n 802a1f2 previous_sector_status = header.status; } /* Detect the lack of a FREE sector. */ if (!free_seen) { 802a25e: f1b8 0f00 cmp.w r8, #0 802a262: d041 beq.n 802a2e8 return -1; } /* Start writing at the first sector if the filesystem is empty. */ if (!used_seen) { write_sector = 0; 802a264: f1ba 0f00 cmp.w sl, #0 802a268: bf08 it eq 802a26a: 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; 802a26c: 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; 802a26e: 61a6 str r6, [r4, #24] fs->write.slot = 0; 802a270: 61e3 str r3, [r4, #28] while (fs->write.sector == write_sector) { uint32_t status; _slot_get_status(fs, &fs->write, &status); 802a272: 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) { 802a276: e00b b.n 802a290 uint32_t status; _slot_get_status(fs, &fs->write, &status); 802a278: 4620 mov r0, r4 802a27a: 4629 mov r1, r5 802a27c: aa01 add r2, sp, #4 802a27e: f7ff fe5d bl 8029f3c <_slot_get_status> if (status == SLOT_ERASED) 802a282: 9b01 ldr r3, [sp, #4] 802a284: 3301 adds r3, #1 802a286: d006 beq.n 802a296 break; _loc_advance_slot(fs, &fs->write); 802a288: 4620 mov r0, r4 802a28a: 4629 mov r1, r5 802a28c: f7ff fea6 bl 8029fdc <_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) { 802a290: 69a3 ldr r3, [r4, #24] 802a292: 42b3 cmp r3, r6 802a294: d0f0 beq.n 802a278 /* 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; 802a296: 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; 802a298: f8c4 9010 str.w r9, [r4, #16] fs->read.slot = 0; 802a29c: 6163 str r3, [r4, #20] while (!_loc_equal(&fs->read, &fs->write)) { 802a29e: f104 0510 add.w r5, r4, #16 802a2a2: e00c b.n 802a2be uint32_t status; _slot_get_status(fs, &fs->read, &status); 802a2a4: 4620 mov r0, r4 802a2a6: 4629 mov r1, r5 802a2a8: aa01 add r2, sp, #4 802a2aa: f7ff fe47 bl 8029f3c <_slot_get_status> if (status == SLOT_VALID) 802a2ae: 9b01 ldr r3, [sp, #4] 802a2b0: f513 3f80 cmn.w r3, #65536 ; 0x10000 802a2b4: d013 beq.n 802a2de break; _loc_advance_slot(fs, &fs->read); 802a2b6: 4620 mov r0, r4 802a2b8: 4629 mov r1, r5 802a2ba: f7ff fe8f bl 8029fdc <_loc_advance_slot> * @{ */ static bool _loc_equal(struct ringfs_loc *a, struct ringfs_loc *b) { return (a->sector == b->sector) && (a->slot == b->slot); 802a2be: 6922 ldr r2, [r4, #16] 802a2c0: 69a3 ldr r3, [r4, #24] 802a2c2: 429a cmp r2, r3 802a2c4: d108 bne.n 802a2d8 802a2c6: 69e3 ldr r3, [r4, #28] 802a2c8: 6962 ldr r2, [r4, #20] 802a2ca: ebb2 0e03 subs.w lr, r2, r3 802a2ce: f1de 0300 rsbs r3, lr, #0 802a2d2: eb53 030e adcs.w r3, r3, lr 802a2d6: e000 b.n 802a2da 802a2d8: 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)) { 802a2da: 2b00 cmp r3, #0 802a2dc: d0e2 beq.n 802a2a4 _loc_advance_slot(fs, &fs->read); } /* Move the read cursor to the read head position. */ ringfs_rewind(fs); 802a2de: 4620 mov r0, r4 802a2e0: f7ff ff6e bl 802a1c0 return 0; 802a2e4: 2000 movs r0, #0 802a2e6: e00d b.n 802a304 } /* Detect the lack of a FREE sector. */ if (!free_seen) { DBG printf("ringfs_scan: invariant violated: no FREE sector found\r\n"); return -1; 802a2e8: f04f 30ff mov.w r0, #4294967295 802a2ec: e00a b.n 802a304 /* 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) 802a2ee: f517 7f80 cmn.w r7, #256 ; 0x100 802a2f2: bf08 it eq 802a2f4: 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; 802a2f6: f04f 0a01 mov.w sl, #1 802a2fa: e7aa b.n 802a252 /* 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) 802a2fc: f517 3f80 cmn.w r7, #65536 ; 0x10000 802a300: d0a4 beq.n 802a24c 802a302: e7a4 b.n 802a24e /* Move the read cursor to the read head position. */ ringfs_rewind(fs); return 0; } 802a304: b005 add sp, #20 802a306: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0802a30a : 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. */ 802a30a: f100 0308 add.w r3, r0, #8 802a30e: 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; 802a310: 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. */ 802a314: 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. */ 802a316: 6103 str r3, [r0, #16] pxList->uxNumberOfItems = ( UBaseType_t ) 0U; 802a318: 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; 802a31a: 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; 802a31c: 6003 str r3, [r0, #0] 802a31e: 4770 bx lr 0802a320 : /*-----------------------------------------------------------*/ void vListInitialiseItem( ListItem_t * const pxItem ) { /* Make sure the list item is not recorded as being on a list. */ pxItem->pvContainer = NULL; 802a320: 2300 movs r3, #0 802a322: 6103 str r3, [r0, #16] 802a324: 4770 bx lr 0802a326 : } /*-----------------------------------------------------------*/ void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem ) { ListItem_t * const pxIndex = pxList->pxIndex; 802a326: 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; 802a328: 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; 802a32a: 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; 802a32c: 604b str r3, [r1, #4] pxNewListItem->pxPrevious = pxIndex->pxPrevious; 802a32e: 608a str r2, [r1, #8] pxIndex->pxPrevious->pxNext = pxNewListItem; 802a330: 689a ldr r2, [r3, #8] pxIndex->pxPrevious = pxNewListItem; 802a332: 6099 str r1, [r3, #8] /* Remember which list the item is in. */ pxNewListItem->pvContainer = ( void * ) pxList; ( pxList->uxNumberOfItems )++; 802a334: 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; 802a336: 6051 str r1, [r2, #4] pxIndex->pxPrevious = pxNewListItem; /* Remember which list the item is in. */ pxNewListItem->pvContainer = ( void * ) pxList; ( pxList->uxNumberOfItems )++; 802a338: 3301 adds r3, #1 802a33a: 6003 str r3, [r0, #0] 802a33c: 4770 bx lr 0802a33e : /*-----------------------------------------------------------*/ void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) { ListItem_t *pxIterator; const TickType_t xValueOfInsertion = pxNewListItem->xItemValue; 802a33e: 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 ) 802a340: 1c53 adds r3, r2, #1 ( pxList->uxNumberOfItems )++; } /*-----------------------------------------------------------*/ void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) { 802a342: 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 ) 802a344: d101 bne.n 802a34a { pxIterator = pxList->xListEnd.pxPrevious; 802a346: 6903 ldr r3, [r0, #16] 802a348: e007 b.n 802a35a 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. */ 802a34a: f100 0308 add.w r3, r0, #8 802a34e: e000 b.n 802a352 802a350: 4623 mov r3, r4 802a352: 685c ldr r4, [r3, #4] 802a354: 6825 ldr r5, [r4, #0] 802a356: 4295 cmp r5, r2 802a358: d9fa bls.n 802a350 /* There is nothing to do here, just iterating to the wanted insertion position. */ } } pxNewListItem->pxNext = pxIterator->pxNext; 802a35a: 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; 802a35c: 6108 str r0, [r1, #16] /* There is nothing to do here, just iterating to the wanted insertion position. */ } } pxNewListItem->pxNext = pxIterator->pxNext; 802a35e: 604a str r2, [r1, #4] pxNewListItem->pxNext->pxPrevious = pxNewListItem; 802a360: 6091 str r1, [r2, #8] pxNewListItem->pxPrevious = pxIterator; pxIterator->pxNext = pxNewListItem; 802a362: 6059 str r1, [r3, #4] } } pxNewListItem->pxNext = pxIterator->pxNext; pxNewListItem->pxNext->pxPrevious = pxNewListItem; pxNewListItem->pxPrevious = pxIterator; 802a364: 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 )++; 802a366: 6803 ldr r3, [r0, #0] 802a368: 3301 adds r3, #1 802a36a: 6003 str r3, [r0, #0] 802a36c: bd30 pop {r4, r5, pc} 0802a36e : { /* 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; 802a36e: 6841 ldr r1, [r0, #4] 802a370: 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; 802a372: 6903 ldr r3, [r0, #16] pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious; 802a374: 608a str r2, [r1, #8] pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext; 802a376: 6882 ldr r2, [r0, #8] 802a378: 6051 str r1, [r2, #4] /* Make sure the index is left pointing to a valid item. */ if( pxList->pxIndex == pxItemToRemove ) 802a37a: 6859 ldr r1, [r3, #4] 802a37c: 4281 cmp r1, r0 { pxList->pxIndex = pxItemToRemove->pxPrevious; 802a37e: bf08 it eq 802a380: 605a streq r2, [r3, #4] else { mtCOVERAGE_TEST_MARKER(); } pxItemToRemove->pvContainer = NULL; 802a382: 2200 movs r2, #0 802a384: 6102 str r2, [r0, #16] ( pxList->uxNumberOfItems )--; 802a386: 6818 ldr r0, [r3, #0] 802a388: 3801 subs r0, #1 802a38a: 6018 str r0, [r3, #0] return pxList->uxNumberOfItems; } 802a38c: 4770 bx lr 0802a38e : } } /*-----------------------------------------------------------*/ static void prvUnlockQueue( Queue_t * const pxQueue ) { 802a38e: b538 push {r3, r4, r5, lr} 802a390: 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 ) 802a392: 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(); 802a396: f001 fa2f bl 802b7f8 { /* See if data was added to the queue while it was locked. */ while( pxQueue->xTxLock > queueLOCKED_UNMODIFIED ) 802a39a: e00a b.n 802a3b2 } #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 ) 802a39c: 6a63 ldr r3, [r4, #36] ; 0x24 802a39e: b15b cbz r3, 802a3b8 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 802a3a0: 4628 mov r0, r5 802a3a2: f000 ff1d bl 802b1e0 802a3a6: b108 cbz r0, 802a3ac { /* The task waiting has a higher priority so record that a context switch is required. */ vTaskMissedYield(); 802a3a8: f000 ff94 bl 802b2d4 break; } } #endif /* configUSE_QUEUE_SETS */ --( pxQueue->xTxLock ); 802a3ac: 6ca3 ldr r3, [r4, #72] ; 0x48 802a3ae: 3b01 subs r3, #1 802a3b0: 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 ) 802a3b2: 6ca3 ldr r3, [r4, #72] ; 0x48 802a3b4: 2b00 cmp r3, #0 802a3b6: dcf1 bgt.n 802a39c #endif /* configUSE_QUEUE_SETS */ --( pxQueue->xTxLock ); } pxQueue->xTxLock = queueUNLOCKED; 802a3b8: f04f 33ff mov.w r3, #4294967295 802a3bc: 64a3 str r3, [r4, #72] ; 0x48 } taskEXIT_CRITICAL(); 802a3be: f001 fa47 bl 802b850 { while( pxQueue->xRxLock > queueLOCKED_UNMODIFIED ) { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 802a3c2: f104 0510 add.w r5, r4, #16 pxQueue->xTxLock = queueUNLOCKED; } taskEXIT_CRITICAL(); /* Do the same for the Rx lock. */ taskENTER_CRITICAL(); 802a3c6: f001 fa17 bl 802b7f8 { while( pxQueue->xRxLock > queueLOCKED_UNMODIFIED ) 802a3ca: e00a b.n 802a3e2 { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 802a3cc: 6923 ldr r3, [r4, #16] 802a3ce: b15b cbz r3, 802a3e8 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 802a3d0: 4628 mov r0, r5 802a3d2: f000 ff05 bl 802b1e0 802a3d6: b108 cbz r0, 802a3dc { vTaskMissedYield(); 802a3d8: f000 ff7c bl 802b2d4 else { mtCOVERAGE_TEST_MARKER(); } --( pxQueue->xRxLock ); 802a3dc: 6c63 ldr r3, [r4, #68] ; 0x44 802a3de: 3b01 subs r3, #1 802a3e0: 6463 str r3, [r4, #68] ; 0x44 taskEXIT_CRITICAL(); /* Do the same for the Rx lock. */ taskENTER_CRITICAL(); { while( pxQueue->xRxLock > queueLOCKED_UNMODIFIED ) 802a3e2: 6c63 ldr r3, [r4, #68] ; 0x44 802a3e4: 2b00 cmp r3, #0 802a3e6: dcf1 bgt.n 802a3cc { break; } } pxQueue->xRxLock = queueUNLOCKED; 802a3e8: f04f 33ff mov.w r3, #4294967295 802a3ec: 6463 str r3, [r4, #68] ; 0x44 } taskEXIT_CRITICAL(); } 802a3ee: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} } } pxQueue->xRxLock = queueUNLOCKED; } taskEXIT_CRITICAL(); 802a3f2: f001 ba2d b.w 802b850 0802a3f6 : } /*-----------------------------------------------------------*/ static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer ) { if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) 802a3f6: 6c02 ldr r2, [r0, #64] ; 0x40 return xReturn; } /*-----------------------------------------------------------*/ static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer ) { 802a3f8: b530 push {r4, r5, lr} 802a3fa: 4603 mov r3, r0 if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) 802a3fc: b16a cbz r2, 802a41a { pxQueue->u.pcReadFrom += pxQueue->uxItemSize; 802a3fe: 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. */ 802a400: 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; 802a402: 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. */ 802a404: 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; 802a406: 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; 802a408: bf24 itt cs 802a40a: 6804 ldrcs r4, [r0, #0] 802a40c: 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. */ 802a40e: 4608 mov r0, r1 802a410: 68d9 ldr r1, [r3, #12] } } 802a412: 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. */ 802a416: f7f7 bab9 b.w 802198c 802a41a: bd30 pop {r4, r5, pc} 0802a41c : #endif /* configUSE_TRACE_FACILITY */ /*-----------------------------------------------------------*/ static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition ) { 802a41c: b538 push {r3, r4, r5, lr} 802a41e: 4615 mov r5, r2 BaseType_t xReturn = pdFALSE; if( pxQueue->uxItemSize == ( UBaseType_t ) 0 ) 802a420: 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 ) { 802a422: 4604 mov r4, r0 BaseType_t xReturn = pdFALSE; if( pxQueue->uxItemSize == ( UBaseType_t ) 0 ) 802a424: b93a cbnz r2, 802a436 { #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 802a426: 6805 ldr r5, [r0, #0] 802a428: b105 cbz r5, 802a42c 802a42a: e028 b.n 802a47e { /* The mutex is no longer being held. */ xReturn = xTaskPriorityDisinherit( ( void * ) pxQueue->pxMutexHolder ); 802a42c: 6840 ldr r0, [r0, #4] 802a42e: f000 ffb3 bl 802b398 pxQueue->pxMutexHolder = NULL; 802a432: 6065 str r5, [r4, #4] 802a434: e024 b.n 802a480 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_MUTEXES */ } else if( xPosition == queueSEND_TO_BACK ) 802a436: b96d cbnz r5, 802a454 { ( 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. */ 802a438: 6880 ldr r0, [r0, #8] 802a43a: f7f7 faa7 bl 802198c pxQueue->pcWriteTo += pxQueue->uxItemSize; 802a43e: 68a2 ldr r2, [r4, #8] 802a440: 6c23 ldr r3, [r4, #64] ; 0x40 802a442: 18d3 adds r3, r2, r3 if( pxQueue->pcWriteTo >= pxQueue->pcTail ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 802a444: 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; 802a446: 60a3 str r3, [r4, #8] if( pxQueue->pcWriteTo >= pxQueue->pcTail ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 802a448: 4293 cmp r3, r2 802a44a: d318 bcc.n 802a47e { pxQueue->pcWriteTo = pxQueue->pcHead; 802a44c: 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; 802a44e: 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; 802a450: 60a3 str r3, [r4, #8] 802a452: e015 b.n 802a480 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. */ 802a454: 68c0 ldr r0, [r0, #12] 802a456: f7f7 fa99 bl 802198c pxQueue->u.pcReadFrom -= pxQueue->uxItemSize; 802a45a: 6c23 ldr r3, [r4, #64] ; 0x40 802a45c: 68e2 ldr r2, [r4, #12] if( pxQueue->u.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 802a45e: 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; 802a460: 425b negs r3, r3 802a462: 18d2 adds r2, r2, r3 if( pxQueue->u.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 802a464: 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; 802a466: 60e2 str r2, [r4, #12] if( pxQueue->u.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 802a468: d202 bcs.n 802a470 { pxQueue->u.pcReadFrom = ( pxQueue->pcTail - pxQueue->uxItemSize ); 802a46a: 6862 ldr r2, [r4, #4] 802a46c: 18d3 adds r3, r2, r3 802a46e: 60e3 str r3, [r4, #12] else { mtCOVERAGE_TEST_MARKER(); } if( xPosition == queueOVERWRITE ) 802a470: 2d02 cmp r5, #2 802a472: d104 bne.n 802a47e { if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 ) 802a474: 6ba3 ldr r3, [r4, #56] ; 0x38 802a476: b113 cbz r3, 802a47e { /* 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 ); 802a478: 6ba3 ldr r3, [r4, #56] ; 0x38 802a47a: 3b01 subs r3, #1 802a47c: 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; 802a47e: 2000 movs r0, #0 { mtCOVERAGE_TEST_MARKER(); } } ++( pxQueue->uxMessagesWaiting ); 802a480: 6ba3 ldr r3, [r4, #56] ; 0x38 802a482: 3301 adds r3, #1 802a484: 63a3 str r3, [r4, #56] ; 0x38 return xReturn; } 802a486: bd38 pop {r3, r4, r5, pc} 0802a488 : } \ taskEXIT_CRITICAL() /*-----------------------------------------------------------*/ BaseType_t xQueueGenericReset( QueueHandle_t xQueue, BaseType_t xNewQueue ) { 802a488: b538 push {r3, r4, r5, lr} 802a48a: 460d mov r5, r1 Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802a48c: 4604 mov r4, r0 802a48e: b910 cbnz r0, 802a496 802a490: f001 f9aa bl 802b7e8 802a494: e7fe b.n 802a494 taskENTER_CRITICAL(); 802a496: f001 f9af bl 802b7f8 { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); 802a49a: 6823 ldr r3, [r4, #0] 802a49c: 6be0 ldr r0, [r4, #60] ; 0x3c 802a49e: 6c22 ldr r2, [r4, #64] ; 0x40 pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; pxQueue->pcWriteTo = pxQueue->pcHead; 802a4a0: 60a3 str r3, [r4, #8] configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); 802a4a2: 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 ); 802a4a6: 3801 subs r0, #1 802a4a8: fb02 3300 mla r3, r2, r0, r3 configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); 802a4ac: 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 ); 802a4ae: 60e3 str r3, [r4, #12] configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; 802a4b0: 2100 movs r1, #0 pxQueue->pcWriteTo = pxQueue->pcHead; pxQueue->u.pcReadFrom = pxQueue->pcHead + ( ( pxQueue->uxLength - ( UBaseType_t ) 1U ) * pxQueue->uxItemSize ); pxQueue->xRxLock = queueUNLOCKED; 802a4b2: f04f 33ff mov.w r3, #4294967295 configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; 802a4b6: 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; 802a4b8: 6463 str r3, [r4, #68] ; 0x44 pxQueue->xTxLock = queueUNLOCKED; 802a4ba: 64a3 str r3, [r4, #72] ; 0x48 if( xNewQueue == pdFALSE ) 802a4bc: b955 cbnz r5, 802a4d4 /* 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 ) 802a4be: 6923 ldr r3, [r4, #16] 802a4c0: b183 cbz r3, 802a4e4 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) == pdTRUE ) 802a4c2: f104 0010 add.w r0, r4, #16 802a4c6: f000 fe8b bl 802b1e0 802a4ca: 2801 cmp r0, #1 802a4cc: d10a bne.n 802a4e4 { queueYIELD_IF_USING_PREEMPTION(); 802a4ce: f001 f97f bl 802b7d0 802a4d2: e007 b.n 802a4e4 } } else { /* Ensure the event queues start in the correct state. */ vListInitialise( &( pxQueue->xTasksWaitingToSend ) ); 802a4d4: f104 0010 add.w r0, r4, #16 802a4d8: f7ff ff17 bl 802a30a vListInitialise( &( pxQueue->xTasksWaitingToReceive ) ); 802a4dc: f104 0024 add.w r0, r4, #36 ; 0x24 802a4e0: f7ff ff13 bl 802a30a } } taskEXIT_CRITICAL(); 802a4e4: f001 f9b4 bl 802b850 /* A value is returned for calling semantic consistency with previous versions. */ return pdPASS; } 802a4e8: 2001 movs r0, #1 802a4ea: bd38 pop {r3, r4, r5, pc} 0802a4ec : /*-----------------------------------------------------------*/ QueueHandle_t xQueueGenericCreate( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType ) { 802a4ec: b5f8 push {r3, r4, r5, r6, r7, lr} 802a4ee: 460d mov r5, r1 802a4f0: 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 ); 802a4f2: 4606 mov r6, r0 802a4f4: b910 cbnz r0, 802a4fc 802a4f6: f001 f977 bl 802b7e8 802a4fa: e7fe b.n 802a4fa if( uxItemSize == ( UBaseType_t ) 0 ) 802a4fc: b111 cbz r1, 802a504 } 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. */ 802a4fe: 4348 muls r0, r1 802a500: 3001 adds r0, #1 802a502: e000 b.n 802a506 configASSERT( uxQueueLength > ( UBaseType_t ) 0 ); if( uxItemSize == ( UBaseType_t ) 0 ) { /* There is not going to be a queue storage area. */ xQueueSizeInBytes = ( size_t ) 0; 802a504: 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 ); 802a506: 3054 adds r0, #84 ; 0x54 802a508: f001 fa84 bl 802ba14 if( pcAllocatedBuffer != NULL ) 802a50c: 4604 mov r4, r0 802a50e: b138 cbz r0, 802a520 { 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 ) 802a510: b90d cbnz r5, 802a516 { /* 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; 802a512: 6020 str r0, [r4, #0] 802a514: e007 b.n 802a526 } 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 ); 802a516: f100 0354 add.w r3, r0, #84 ; 0x54 802a51a: 6003 str r3, [r0, #0] 802a51c: e003 b.n 802a526 802a51e: e7fe b.n 802a51e else { mtCOVERAGE_TEST_MARKER(); } configASSERT( xReturn ); 802a520: f001 f962 bl 802b7e8 802a524: e7fb b.n 802a51e pxNewQueue->pcHead = pcAllocatedBuffer + sizeof( Queue_t ); } /* Initialise the queue members as described above where the queue type is defined. */ pxNewQueue->uxLength = uxQueueLength; 802a526: 63e6 str r6, [r4, #60] ; 0x3c pxNewQueue->uxItemSize = uxItemSize; 802a528: 6425 str r5, [r4, #64] ; 0x40 ( void ) xQueueGenericReset( pxNewQueue, pdTRUE ); 802a52a: 4620 mov r0, r4 802a52c: 2101 movs r1, #1 802a52e: f7ff ffab bl 802a488 #if ( configUSE_TRACE_FACILITY == 1 ) { pxNewQueue->ucQueueType = ucQueueType; 802a532: f884 7050 strb.w r7, [r4, #80] ; 0x50 } configASSERT( xReturn ); return xReturn; } 802a536: 4620 mov r0, r4 802a538: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802a53a : /*-----------------------------------------------------------*/ #if ( configUSE_COUNTING_SEMAPHORES == 1 ) QueueHandle_t xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount ) { 802a53a: b510 push {r4, lr} 802a53c: 460c mov r4, r1 QueueHandle_t xHandle; configASSERT( uxMaxCount != 0 ); 802a53e: b910 cbnz r0, 802a546 802a540: f001 f952 bl 802b7e8 802a544: e7fe b.n 802a544 configASSERT( uxInitialCount <= uxMaxCount ); 802a546: 4281 cmp r1, r0 802a548: d902 bls.n 802a550 802a54a: f001 f94d bl 802b7e8 802a54e: e7fe b.n 802a54e xHandle = xQueueGenericCreate( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_COUNTING_SEMAPHORE ); 802a550: 2100 movs r1, #0 802a552: 2202 movs r2, #2 802a554: f7ff ffca bl 802a4ec if( xHandle != NULL ) 802a558: b110 cbz r0, 802a560 { ( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount; 802a55a: 6384 str r4, [r0, #56] ; 0x38 802a55c: bd10 pop {r4, pc} 802a55e: e7fe b.n 802a55e else { traceCREATE_COUNTING_SEMAPHORE_FAILED(); } configASSERT( xHandle ); 802a560: f001 f942 bl 802b7e8 802a564: e7fb b.n 802a55e 0802a566 : #endif /* configUSE_COUNTING_SEMAPHORES */ /*-----------------------------------------------------------*/ BaseType_t xQueueGenericSend( QueueHandle_t xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, const BaseType_t xCopyPosition ) { 802a566: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 802a56a: b085 sub sp, #20 802a56c: 460f mov r7, r1 802a56e: 9201 str r2, [sp, #4] 802a570: 461d mov r5, r3 BaseType_t xEntryTimeSet = pdFALSE, xYieldRequired; TimeOut_t xTimeOut; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802a572: 4604 mov r4, r0 802a574: b910 cbnz r0, 802a57c 802a576: f001 f937 bl 802b7e8 802a57a: e7fe b.n 802a57a configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802a57c: 2900 cmp r1, #0 802a57e: d17b bne.n 802a678 802a580: 6c03 ldr r3, [r0, #64] ; 0x40 802a582: 2b00 cmp r3, #0 802a584: d078 beq.n 802a678 802a586: e074 b.n 802a672 802a588: e7fe b.n 802a588 configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 802a58a: 6be3 ldr r3, [r4, #60] ; 0x3c 802a58c: 2b01 cmp r3, #1 802a58e: d176 bne.n 802a67e 802a590: e078 b.n 802a684 802a592: e7fe b.n 802a592 #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 802a594: 9e01 ldr r6, [sp, #4] 802a596: b126 cbz r6, 802a5a2 802a598: e079 b.n 802a68e 802a59a: e7fe b.n 802a59a 802a59c: 2601 movs r6, #1 802a59e: e002 b.n 802a5a6 802a5a0: 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 ); 802a5a2: 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(); 802a5a6: f001 f927 bl 802b7f8 { /* 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 ) ) 802a5aa: 6ba2 ldr r2, [r4, #56] ; 0x38 802a5ac: 6be3 ldr r3, [r4, #60] ; 0x3c 802a5ae: 429a cmp r2, r3 802a5b0: d301 bcc.n 802a5b6 802a5b2: 2d02 cmp r5, #2 802a5b4: d115 bne.n 802a5e2 { traceQUEUE_SEND( pxQueue ); xYieldRequired = prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition ); 802a5b6: 4620 mov r0, r4 802a5b8: 4639 mov r1, r7 802a5ba: 462a mov r2, r5 802a5bc: f7ff ff2e bl 802a41c } #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 ) 802a5c0: 6a63 ldr r3, [r4, #36] ; 0x24 802a5c2: b143 cbz r3, 802a5d6 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) == pdTRUE ) 802a5c4: f104 0024 add.w r0, r4, #36 ; 0x24 802a5c8: f000 fe0a bl 802b1e0 802a5cc: 2801 cmp r0, #1 802a5ce: d104 bne.n 802a5da { /* 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(); 802a5d0: f001 f8fe bl 802b7d0 802a5d4: e001 b.n 802a5da else { mtCOVERAGE_TEST_MARKER(); } } else if( xYieldRequired != pdFALSE ) 802a5d6: 2800 cmp r0, #0 802a5d8: d1fa bne.n 802a5d0 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_QUEUE_SETS */ taskEXIT_CRITICAL(); 802a5da: f001 f939 bl 802b850 return pdPASS; 802a5de: 2001 movs r0, #1 802a5e0: e058 b.n 802a694 } else { if( xTicksToWait == ( TickType_t ) 0 ) 802a5e2: f8dd 9004 ldr.w r9, [sp, #4] 802a5e6: f1b9 0f00 cmp.w r9, #0 802a5ea: d102 bne.n 802a5f2 { /* The queue was full and no block time is specified (or the block time has expired) so leave now. */ taskEXIT_CRITICAL(); 802a5ec: f001 f930 bl 802b850 802a5f0: e03d b.n 802a66e /* Return to the original privilege level before exiting the function. */ traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; } else if( xEntryTimeSet == pdFALSE ) 802a5f2: b916 cbnz r6, 802a5fa { /* The queue was full and a block time was specified so configure the timeout structure. */ vTaskSetTimeOutState( &xTimeOut ); 802a5f4: a802 add r0, sp, #8 802a5f6: f000 fe2f bl 802b258 /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); 802a5fa: f001 f929 bl 802b850 /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); 802a5fe: f000 fbab bl 802ad58 prvLockQueue( pxQueue ); 802a602: f001 f8f9 bl 802b7f8 802a606: 6c63 ldr r3, [r4, #68] ; 0x44 802a608: 3301 adds r3, #1 802a60a: bf08 it eq 802a60c: f8c4 8044 streq.w r8, [r4, #68] ; 0x44 802a610: 6ca3 ldr r3, [r4, #72] ; 0x48 802a612: 3301 adds r3, #1 802a614: bf08 it eq 802a616: f8c4 8048 streq.w r8, [r4, #72] ; 0x48 802a61a: f001 f919 bl 802b850 /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 802a61e: a802 add r0, sp, #8 802a620: a901 add r1, sp, #4 802a622: f000 fe29 bl 802b278 802a626: b9e8 cbnz r0, 802a664 static BaseType_t prvIsQueueFull( const Queue_t *pxQueue ) { BaseType_t xReturn; taskENTER_CRITICAL(); 802a628: f001 f8e6 bl 802b7f8 { if( pxQueue->uxMessagesWaiting == pxQueue->uxLength ) 802a62c: f8d4 9038 ldr.w r9, [r4, #56] ; 0x38 802a630: 6be6 ldr r6, [r4, #60] ; 0x3c else { xReturn = pdFALSE; } } taskEXIT_CRITICAL(); 802a632: f001 f90d bl 802b850 prvLockQueue( pxQueue ); /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) { if( prvIsQueueFull( pxQueue ) != pdFALSE ) 802a636: 45b1 cmp r9, r6 802a638: d10e bne.n 802a658 { traceBLOCKING_ON_QUEUE_SEND( pxQueue ); vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait ); 802a63a: f104 0010 add.w r0, r4, #16 802a63e: 9901 ldr r1, [sp, #4] 802a640: f000 fd72 bl 802b128 /* 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 ); 802a644: 4620 mov r0, r4 802a646: f7ff fea2 bl 802a38e /* 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 ) 802a64a: f000 fc21 bl 802ae90 802a64e: 2800 cmp r0, #0 802a650: d1a4 bne.n 802a59c { portYIELD_WITHIN_API(); 802a652: f001 f8bd bl 802b7d0 802a656: e7a1 b.n 802a59c } } else { /* Try again. */ prvUnlockQueue( pxQueue ); 802a658: 4620 mov r0, r4 802a65a: f7ff fe98 bl 802a38e ( void ) xTaskResumeAll(); 802a65e: f000 fc17 bl 802ae90 802a662: e79b b.n 802a59c } } else { /* The timeout has expired. */ prvUnlockQueue( pxQueue ); 802a664: 4620 mov r0, r4 802a666: f7ff fe92 bl 802a38e ( void ) xTaskResumeAll(); 802a66a: f000 fc11 bl 802ae90 /* Return to the original privilege level before exiting the function. */ traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; 802a66e: 2000 movs r0, #0 802a670: e010 b.n 802a694 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 ) ) ); 802a672: f001 f8b9 bl 802b7e8 802a676: e787 b.n 802a588 configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 802a678: 2d02 cmp r5, #2 802a67a: d103 bne.n 802a684 802a67c: e785 b.n 802a58a 802a67e: f001 f8b3 bl 802b7e8 802a682: e786 b.n 802a592 #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 802a684: f000 fe2c bl 802b2e0 802a688: 2800 cmp r0, #0 802a68a: d189 bne.n 802a5a0 802a68c: e782 b.n 802a594 802a68e: f001 f8ab bl 802b7e8 802a692: e782 b.n 802a59a function. */ traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; } } } 802a694: b005 add sp, #20 802a696: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 0802a69a : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) QueueHandle_t xQueueCreateMutex( const uint8_t ucQueueType ) { 802a69a: b570 push {r4, r5, r6, lr} 802a69c: 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 ) ); 802a69e: 2054 movs r0, #84 ; 0x54 802a6a0: f001 f9b8 bl 802ba14 if( pxNewQueue != NULL ) 802a6a4: 4604 mov r4, r0 802a6a6: b108 cbz r0, 802a6ac 802a6a8: e003 b.n 802a6b2 802a6aa: e7fe b.n 802a6aa else { traceCREATE_MUTEX_FAILED(); } configASSERT( pxNewQueue ); 802a6ac: f001 f89c bl 802b7e8 802a6b0: e7fb b.n 802a6aa /* 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; 802a6b2: 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; 802a6b4: 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; 802a6b6: 63c3 str r3, [r0, #60] ; 0x3c pxNewQueue->uxItemSize = ( UBaseType_t ) 0U; pxNewQueue->xRxLock = queueUNLOCKED; 802a6b8: 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; 802a6bc: 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; 802a6be: 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; 802a6c0: 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; 802a6c2: 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; 802a6c4: 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; 802a6c6: 6085 str r5, [r0, #8] pxNewQueue->u.pcReadFrom = NULL; 802a6c8: 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; 802a6ca: 6405 str r5, [r0, #64] ; 0x40 pxNewQueue->xRxLock = queueUNLOCKED; pxNewQueue->xTxLock = queueUNLOCKED; #if ( configUSE_TRACE_FACILITY == 1 ) { pxNewQueue->ucQueueType = ucQueueType; 802a6cc: f880 6050 strb.w r6, [r0, #80] ; 0x50 pxNewQueue->pxQueueSetContainer = NULL; } #endif /* Ensure the event queues start with the correct state. */ vListInitialise( &( pxNewQueue->xTasksWaitingToSend ) ); 802a6d0: 3010 adds r0, #16 802a6d2: f7ff fe1a bl 802a30a vListInitialise( &( pxNewQueue->xTasksWaitingToReceive ) ); 802a6d6: f104 0024 add.w r0, r4, #36 ; 0x24 802a6da: f7ff fe16 bl 802a30a traceCREATE_MUTEX( pxNewQueue ); /* Start with the semaphore in the expected state. */ ( void ) xQueueGenericSend( pxNewQueue, NULL, ( TickType_t ) 0U, queueSEND_TO_BACK ); 802a6de: 4620 mov r0, r4 802a6e0: 4629 mov r1, r5 802a6e2: 462a mov r2, r5 802a6e4: 462b mov r3, r5 802a6e6: f7ff ff3e bl 802a566 traceCREATE_MUTEX_FAILED(); } configASSERT( pxNewQueue ); return pxNewQueue; } 802a6ea: 4620 mov r0, r4 802a6ec: bd70 pop {r4, r5, r6, pc} 0802a6ee : #endif /* configUSE_ALTERNATIVE_API */ /*-----------------------------------------------------------*/ BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue, const void * const pvItemToQueue, BaseType_t * const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition ) { 802a6ee: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802a6f2: 460f mov r7, r1 802a6f4: 4616 mov r6, r2 802a6f6: 461d mov r5, r3 BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802a6f8: 4604 mov r4, r0 802a6fa: b910 cbnz r0, 802a702 802a6fc: f001 f874 bl 802b7e8 802a700: e7fe b.n 802a700 configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802a702: bb41 cbnz r1, 802a756 802a704: 6c03 ldr r3, [r0, #64] ; 0x40 802a706: b333 cbz r3, 802a756 802a708: e022 b.n 802a750 802a70a: e7fe b.n 802a70a configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 802a70c: 6be3 ldr r3, [r4, #60] ; 0x3c 802a70e: 2b01 cmp r3, #1 802a710: d124 bne.n 802a75c 802a712: e026 b.n 802a762 802a714: e7fe b.n 802a714 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 ) ) 802a716: 2d02 cmp r5, #2 802a718: d118 bne.n 802a74c /* 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 ); 802a71a: 4620 mov r0, r4 802a71c: 4639 mov r1, r7 802a71e: 462a mov r2, r5 802a720: f7ff fe7c bl 802a41c /* 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 ) 802a724: 6ca3 ldr r3, [r4, #72] ; 0x48 802a726: 3301 adds r3, #1 802a728: d10b bne.n 802a742 } } } #else /* configUSE_QUEUE_SETS */ { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 802a72a: 6a63 ldr r3, [r4, #36] ; 0x24 802a72c: b903 cbnz r3, 802a730 802a72e: e00b b.n 802a748 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 802a730: f104 0024 add.w r0, r4, #36 ; 0x24 802a734: f000 fd54 bl 802b1e0 802a738: b130 cbz r0, 802a748 { /* The task waiting has a higher priority so record that a context switch is required. */ if( pxHigherPriorityTaskWoken != NULL ) 802a73a: b12e cbz r6, 802a748 { *pxHigherPriorityTaskWoken = pdTRUE; 802a73c: 2401 movs r4, #1 802a73e: 6034 str r4, [r6, #0] 802a740: e019 b.n 802a776 } else { /* Increment the lock count so the task that unlocks the queue knows that data was posted while it was locked. */ ++( pxQueue->xTxLock ); 802a742: 6ca3 ldr r3, [r4, #72] ; 0x48 802a744: 3301 adds r3, #1 802a746: 64a3 str r3, [r4, #72] ; 0x48 } xReturn = pdPASS; 802a748: 2401 movs r4, #1 802a74a: e014 b.n 802a776 } else { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; 802a74c: 2400 movs r4, #0 802a74e: e012 b.n 802a776 BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802a750: f001 f84a bl 802b7e8 802a754: e7d9 b.n 802a70a configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 802a756: 2d02 cmp r5, #2 802a758: d103 bne.n 802a762 802a75a: e7d7 b.n 802a70c 802a75c: f001 f844 bl 802b7e8 802a760: e7d8 b.n 802a714 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(); 802a762: f001 f911 bl 802b988 /* 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(); 802a766: f001 f83f bl 802b7e8 { if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) 802a76a: 6ba2 ldr r2, [r4, #56] ; 0x38 802a76c: 6be3 ldr r3, [r4, #60] ; 0x3c 802a76e: 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(); 802a770: 4680 mov r8, r0 { if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) 802a772: d2d0 bcs.n 802a716 802a774: e7d1 b.n 802a71a { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); 802a776: 4640 mov r0, r8 802a778: f001 f866 bl 802b848 return xReturn; } 802a77c: 4620 mov r0, r4 802a77e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 0802a782 : /*-----------------------------------------------------------*/ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue, BaseType_t * const pxHigherPriorityTaskWoken ) { 802a782: b5f8 push {r3, r4, r5, r6, r7, lr} 802a784: 460d mov r5, r1 BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802a786: 4604 mov r4, r0 802a788: b910 cbnz r0, 802a790 802a78a: f001 f82d bl 802b7e8 802a78e: e7fe b.n 802a78e /* xQueueGenericSendFromISR() should be used in the item size is not 0. */ configASSERT( pxQueue->uxItemSize == 0 ); 802a790: 6c06 ldr r6, [r0, #64] ; 0x40 802a792: b116 cbz r6, 802a79a 802a794: f001 f828 bl 802b7e8 802a798: e7fe b.n 802a798 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(); 802a79a: f001 f8f5 bl 802b988 /* 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(); 802a79e: f001 f823 bl 802b7e8 { /* 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 ) 802a7a2: 6ba2 ldr r2, [r4, #56] ; 0x38 802a7a4: 6be3 ldr r3, [r4, #60] ; 0x3c 802a7a6: 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(); 802a7a8: 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 ) 802a7aa: d216 bcs.n 802a7da 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 ); 802a7ac: 6ba3 ldr r3, [r4, #56] ; 0x38 802a7ae: 3301 adds r3, #1 802a7b0: 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 ) 802a7b2: 6ca3 ldr r3, [r4, #72] ; 0x48 802a7b4: 3301 adds r3, #1 802a7b6: d10b bne.n 802a7d0 } } } #else /* configUSE_QUEUE_SETS */ { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 802a7b8: 6a63 ldr r3, [r4, #36] ; 0x24 802a7ba: b903 cbnz r3, 802a7be 802a7bc: e00b b.n 802a7d6 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 802a7be: f104 0024 add.w r0, r4, #36 ; 0x24 802a7c2: f000 fd0d bl 802b1e0 802a7c6: b130 cbz r0, 802a7d6 { /* The task waiting has a higher priority so record that a context switch is required. */ if( pxHigherPriorityTaskWoken != NULL ) 802a7c8: b12d cbz r5, 802a7d6 { *pxHigherPriorityTaskWoken = pdTRUE; 802a7ca: 2401 movs r4, #1 802a7cc: 602c str r4, [r5, #0] 802a7ce: e005 b.n 802a7dc } else { /* Increment the lock count so the task that unlocks the queue knows that data was posted while it was locked. */ ++( pxQueue->xTxLock ); 802a7d0: 6ca3 ldr r3, [r4, #72] ; 0x48 802a7d2: 3301 adds r3, #1 802a7d4: 64a3 str r3, [r4, #72] ; 0x48 } xReturn = pdPASS; 802a7d6: 2401 movs r4, #1 802a7d8: e000 b.n 802a7dc } else { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; 802a7da: 4634 mov r4, r6 } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); 802a7dc: 4638 mov r0, r7 802a7de: f001 f833 bl 802b848 return xReturn; } 802a7e2: 4620 mov r0, r4 802a7e4: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802a7e6 : /*-----------------------------------------------------------*/ BaseType_t xQueueGenericReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait, const BaseType_t xJustPeeking ) { 802a7e6: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 802a7ea: b085 sub sp, #20 802a7ec: 460e mov r6, r1 802a7ee: 9201 str r2, [sp, #4] 802a7f0: 4699 mov r9, r3 BaseType_t xEntryTimeSet = pdFALSE; TimeOut_t xTimeOut; int8_t *pcOriginalReadPosition; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802a7f2: 4604 mov r4, r0 802a7f4: b910 cbnz r0, 802a7fc 802a7f6: f000 fff7 bl 802b7e8 802a7fa: e7fe b.n 802a7fa configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802a7fc: 2900 cmp r1, #0 802a7fe: f040 8089 bne.w 802a914 802a802: 6c03 ldr r3, [r0, #64] ; 0x40 802a804: 2b00 cmp r3, #0 802a806: f000 8085 beq.w 802a914 802a80a: e080 b.n 802a90e 802a80c: e7fe b.n 802a80c #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 802a80e: 9d01 ldr r5, [sp, #4] 802a810: b125 cbz r5, 802a81c 802a812: e085 b.n 802a920 802a814: e7fe b.n 802a814 802a816: 2501 movs r5, #1 802a818: e001 b.n 802a81e 802a81a: 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 ); 802a81c: 2700 movs r7, #0 statements within the function itself. This is done in the interest of execution time efficiency. */ for( ;; ) { taskENTER_CRITICAL(); 802a81e: f000 ffeb bl 802b7f8 { /* 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 ) 802a822: 6ba3 ldr r3, [r4, #56] ; 0x38 802a824: b33b cbz r3, 802a876 { /* Remember the read position in case the queue is only being peeked. */ pcOriginalReadPosition = pxQueue->u.pcReadFrom; prvCopyDataFromQueue( pxQueue, pvBuffer ); 802a826: 4620 mov r0, r4 802a828: 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; 802a82a: 68e5 ldr r5, [r4, #12] prvCopyDataFromQueue( pxQueue, pvBuffer ); 802a82c: f7ff fde3 bl 802a3f6 if( xJustPeeking == pdFALSE ) 802a830: f1b9 0f00 cmp.w r9, #0 802a834: d112 bne.n 802a85c { traceQUEUE_RECEIVE( pxQueue ); /* Actually removing data, not just peeking. */ --( pxQueue->uxMessagesWaiting ); 802a836: 6ba3 ldr r3, [r4, #56] ; 0x38 802a838: 3b01 subs r3, #1 802a83a: 63a3 str r3, [r4, #56] ; 0x38 #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 802a83c: 6823 ldr r3, [r4, #0] 802a83e: b913 cbnz r3, 802a846 { /* 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. */ 802a840: f000 fde8 bl 802b414 802a844: 6060 str r0, [r4, #4] mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_MUTEXES */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 802a846: 6923 ldr r3, [r4, #16] 802a848: b18b cbz r3, 802a86e { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) == pdTRUE ) 802a84a: f104 0010 add.w r0, r4, #16 802a84e: f000 fcc7 bl 802b1e0 802a852: 2801 cmp r0, #1 802a854: d10b bne.n 802a86e { queueYIELD_IF_USING_PREEMPTION(); 802a856: f000 ffbb bl 802b7d0 802a85a: e008 b.n 802a86e 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 ) 802a85c: 6a63 ldr r3, [r4, #36] ; 0x24 { traceQUEUE_PEEK( pxQueue ); /* The data is not being removed, so reset the read pointer. */ pxQueue->u.pcReadFrom = pcOriginalReadPosition; 802a85e: 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 ) 802a860: b12b cbz r3, 802a86e { /* 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 ) 802a862: f104 0024 add.w r0, r4, #36 ; 0x24 802a866: f000 fcbb bl 802b1e0 802a86a: 2800 cmp r0, #0 802a86c: d1f3 bne.n 802a856 { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 802a86e: f000 ffef bl 802b850 return pdPASS; 802a872: 2001 movs r0, #1 802a874: e057 b.n 802a926 } else { if( xTicksToWait == ( TickType_t ) 0 ) 802a876: f8dd 8004 ldr.w r8, [sp, #4] 802a87a: f1b8 0f00 cmp.w r8, #0 802a87e: d102 bne.n 802a886 { /* The queue was empty and no block time is specified (or the block time has expired) so leave now. */ taskEXIT_CRITICAL(); 802a880: f000 ffe6 bl 802b850 802a884: e041 b.n 802a90a traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; } else if( xEntryTimeSet == pdFALSE ) 802a886: b915 cbnz r5, 802a88e { /* The queue was empty and a block time was specified so configure the timeout structure. */ vTaskSetTimeOutState( &xTimeOut ); 802a888: a802 add r0, sp, #8 802a88a: f000 fce5 bl 802b258 /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); 802a88e: f000 ffdf bl 802b850 /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); 802a892: f000 fa61 bl 802ad58 prvLockQueue( pxQueue ); 802a896: f000 ffaf bl 802b7f8 802a89a: 6c63 ldr r3, [r4, #68] ; 0x44 802a89c: 3301 adds r3, #1 802a89e: bf08 it eq 802a8a0: 6467 streq r7, [r4, #68] ; 0x44 802a8a2: 6ca3 ldr r3, [r4, #72] ; 0x48 802a8a4: 3301 adds r3, #1 802a8a6: bf08 it eq 802a8a8: 64a7 streq r7, [r4, #72] ; 0x48 802a8aa: f000 ffd1 bl 802b850 /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 802a8ae: a802 add r0, sp, #8 802a8b0: a901 add r1, sp, #4 802a8b2: f000 fce1 bl 802b278 802a8b6: bb18 cbnz r0, 802a900 static BaseType_t prvIsQueueEmpty( const Queue_t *pxQueue ) { BaseType_t xReturn; taskENTER_CRITICAL(); 802a8b8: f000 ff9e bl 802b7f8 { if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 ) 802a8bc: 6ba5 ldr r5, [r4, #56] ; 0x38 else { xReturn = pdFALSE; } } taskEXIT_CRITICAL(); 802a8be: f000 ffc7 bl 802b850 prvLockQueue( pxQueue ); /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) { if( prvIsQueueEmpty( pxQueue ) != pdFALSE ) 802a8c2: b9bd cbnz r5, 802a8f4 { traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue ); #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 802a8c4: 6823 ldr r3, [r4, #0] 802a8c6: b933 cbnz r3, 802a8d6 { taskENTER_CRITICAL(); 802a8c8: f000 ff96 bl 802b7f8 { vTaskPriorityInherit( ( void * ) pxQueue->pxMutexHolder ); 802a8cc: 6860 ldr r0, [r4, #4] 802a8ce: f000 fd17 bl 802b300 } taskEXIT_CRITICAL(); 802a8d2: f000 ffbd bl 802b850 mtCOVERAGE_TEST_MARKER(); } } #endif vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); 802a8d6: f104 0024 add.w r0, r4, #36 ; 0x24 802a8da: 9901 ldr r1, [sp, #4] 802a8dc: f000 fc24 bl 802b128 prvUnlockQueue( pxQueue ); 802a8e0: 4620 mov r0, r4 802a8e2: f7ff fd54 bl 802a38e if( xTaskResumeAll() == pdFALSE ) 802a8e6: f000 fad3 bl 802ae90 802a8ea: 2800 cmp r0, #0 802a8ec: d193 bne.n 802a816 { portYIELD_WITHIN_API(); 802a8ee: f000 ff6f bl 802b7d0 802a8f2: e790 b.n 802a816 } } else { /* Try again. */ prvUnlockQueue( pxQueue ); 802a8f4: 4620 mov r0, r4 802a8f6: f7ff fd4a bl 802a38e ( void ) xTaskResumeAll(); 802a8fa: f000 fac9 bl 802ae90 802a8fe: e78a b.n 802a816 } } else { prvUnlockQueue( pxQueue ); 802a900: 4620 mov r0, r4 802a902: f7ff fd44 bl 802a38e ( void ) xTaskResumeAll(); 802a906: f000 fac3 bl 802ae90 traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; 802a90a: 2000 movs r0, #0 802a90c: e00b b.n 802a926 TimeOut_t xTimeOut; int8_t *pcOriginalReadPosition; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802a90e: f000 ff6b bl 802b7e8 802a912: e77b b.n 802a80c #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 802a914: f000 fce4 bl 802b2e0 802a918: 2800 cmp r0, #0 802a91a: f47f af7e bne.w 802a81a 802a91e: e776 b.n 802a80e 802a920: f000 ff62 bl 802b7e8 802a924: e776 b.n 802a814 ( void ) xTaskResumeAll(); traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; } } } 802a926: b005 add sp, #20 802a928: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 0802a92c : /*-----------------------------------------------------------*/ BaseType_t xQueueReceiveFromISR( QueueHandle_t xQueue, void * const pvBuffer, BaseType_t * const pxHigherPriorityTaskWoken ) { 802a92c: b5f8 push {r3, r4, r5, r6, r7, lr} 802a92e: 460e mov r6, r1 802a930: 4615 mov r5, r2 BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802a932: 4604 mov r4, r0 802a934: b910 cbnz r0, 802a93c 802a936: f000 ff57 bl 802b7e8 802a93a: e7fe b.n 802a93a configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802a93c: bb09 cbnz r1, 802a982 802a93e: 6c03 ldr r3, [r0, #64] ; 0x40 802a940: b1fb cbz r3, 802a982 802a942: e01b b.n 802a97c 802a944: e7fe b.n 802a944 /* 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 ); 802a946: 4620 mov r0, r4 802a948: 4631 mov r1, r6 802a94a: f7ff fd54 bl 802a3f6 --( pxQueue->uxMessagesWaiting ); 802a94e: 6ba3 ldr r3, [r4, #56] ; 0x38 802a950: 3b01 subs r3, #1 802a952: 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 ) 802a954: 6c63 ldr r3, [r4, #68] ; 0x44 802a956: 3301 adds r3, #1 802a958: d10b bne.n 802a972 { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 802a95a: 6923 ldr r3, [r4, #16] 802a95c: b903 cbnz r3, 802a960 802a95e: e00b b.n 802a978 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 802a960: f104 0010 add.w r0, r4, #16 802a964: f000 fc3c bl 802b1e0 802a968: b130 cbz r0, 802a978 { /* The task waiting has a higher priority than us so force a context switch. */ if( pxHigherPriorityTaskWoken != NULL ) 802a96a: b12d cbz r5, 802a978 { *pxHigherPriorityTaskWoken = pdTRUE; 802a96c: 2401 movs r4, #1 802a96e: 602c str r4, [r5, #0] 802a970: e010 b.n 802a994 } else { /* Increment the lock count so the task that unlocks the queue knows that data was removed while it was locked. */ ++( pxQueue->xRxLock ); 802a972: 6c63 ldr r3, [r4, #68] ; 0x44 802a974: 3301 adds r3, #1 802a976: 6463 str r3, [r4, #68] ; 0x44 } xReturn = pdPASS; 802a978: 2401 movs r4, #1 802a97a: e00b b.n 802a994 BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802a97c: f000 ff34 bl 802b7e8 802a980: e7e0 b.n 802a944 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(); 802a982: f001 f801 bl 802b988 uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 802a986: f000 ff2f bl 802b7e8 { /* Cannot block in an ISR, so check there is data available. */ if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 ) 802a98a: 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(); 802a98c: 4607 mov r7, r0 { /* Cannot block in an ISR, so check there is data available. */ if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 ) 802a98e: 2b00 cmp r3, #0 802a990: d1d9 bne.n 802a946 xReturn = pdPASS; } else { xReturn = pdFAIL; 802a992: 461c mov r4, r3 traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue ); } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); 802a994: 4638 mov r0, r7 802a996: f000 ff57 bl 802b848 return xReturn; } 802a99a: 4620 mov r0, r4 802a99c: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802a99e : return xReturn; } /*-----------------------------------------------------------*/ UBaseType_t uxQueueMessagesWaiting( const QueueHandle_t xQueue ) { 802a99e: b510 push {r4, lr} UBaseType_t uxReturn; configASSERT( xQueue ); 802a9a0: 4604 mov r4, r0 802a9a2: b910 cbnz r0, 802a9aa 802a9a4: f000 ff20 bl 802b7e8 802a9a8: e7fe b.n 802a9a8 taskENTER_CRITICAL(); 802a9aa: f000 ff25 bl 802b7f8 { uxReturn = ( ( Queue_t * ) xQueue )->uxMessagesWaiting; 802a9ae: 6ba4 ldr r4, [r4, #56] ; 0x38 } taskEXIT_CRITICAL(); 802a9b0: f000 ff4e bl 802b850 return uxReturn; } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ 802a9b4: 4620 mov r0, r4 802a9b6: bd10 pop {r4, pc} 0802a9b8 : /*-----------------------------------------------------------*/ UBaseType_t uxQueueSpacesAvailable( const QueueHandle_t xQueue ) { 802a9b8: b510 push {r4, lr} UBaseType_t uxReturn; Queue_t *pxQueue; pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802a9ba: 4604 mov r4, r0 802a9bc: b910 cbnz r0, 802a9c4 802a9be: f000 ff13 bl 802b7e8 802a9c2: e7fe b.n 802a9c2 taskENTER_CRITICAL(); 802a9c4: f000 ff18 bl 802b7f8 { uxReturn = pxQueue->uxLength - pxQueue->uxMessagesWaiting; 802a9c8: 6ba3 ldr r3, [r4, #56] ; 0x38 802a9ca: 6be4 ldr r4, [r4, #60] ; 0x3c 802a9cc: 1ae4 subs r4, r4, r3 } taskEXIT_CRITICAL(); 802a9ce: f000 ff3f bl 802b850 return uxReturn; } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ 802a9d2: 4620 mov r0, r4 802a9d4: bd10 pop {r4, pc} 0802a9d6 : return uxReturn; } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ /*-----------------------------------------------------------*/ void vQueueDelete( QueueHandle_t xQueue ) { 802a9d6: b508 push {r3, lr} Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802a9d8: b910 cbnz r0, 802a9e0 802a9da: f000 ff05 bl 802b7e8 802a9de: e7fe b.n 802a9de { vQueueUnregisterQueue( pxQueue ); } #endif vPortFree( pxQueue ); } 802a9e0: e8bd 4008 ldmia.w sp!, {r3, lr} #if ( configQUEUE_REGISTRY_SIZE > 0 ) { vQueueUnregisterQueue( pxQueue ); } #endif vPortFree( pxQueue ); 802a9e4: f001 b89c b.w 802bb20 0802a9e8 : /*-----------------------------------------------------------*/ #if ( configUSE_TIMERS == 1 ) void vQueueWaitForMessageRestricted( QueueHandle_t xQueue, TickType_t xTicksToWait ) { 802a9e8: b538 push {r3, r4, r5, lr} 802a9ea: 4604 mov r4, r0 802a9ec: 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 ); 802a9ee: f000 ff03 bl 802b7f8 802a9f2: 6c63 ldr r3, [r4, #68] ; 0x44 802a9f4: 3301 adds r3, #1 802a9f6: d101 bne.n 802a9fc 802a9f8: 2300 movs r3, #0 802a9fa: 6463 str r3, [r4, #68] ; 0x44 802a9fc: 6ca3 ldr r3, [r4, #72] ; 0x48 802a9fe: 3301 adds r3, #1 802aa00: d101 bne.n 802aa06 802aa02: 2300 movs r3, #0 802aa04: 64a3 str r3, [r4, #72] ; 0x48 802aa06: f000 ff23 bl 802b850 if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0U ) 802aa0a: 6ba3 ldr r3, [r4, #56] ; 0x38 802aa0c: b923 cbnz r3, 802aa18 { /* There is nothing in the queue, block for the specified period. */ vTaskPlaceOnEventListRestricted( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); 802aa0e: f104 0024 add.w r0, r4, #36 ; 0x24 802aa12: 4629 mov r1, r5 802aa14: f000 fbbc bl 802b190 } else { mtCOVERAGE_TEST_MARKER(); } prvUnlockQueue( pxQueue ); 802aa18: 4620 mov r0, r4 } 802aa1a: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} } else { mtCOVERAGE_TEST_MARKER(); } prvUnlockQueue( pxQueue ); 802aa1e: f7ff bcb6 b.w 802a38e 802aa22: 0000 movs r0, r0 0802aa24 : static void prvResetNextTaskUnblockTime( void ) { TCB_t *pxTCB; if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 802aa24: 4a06 ldr r2, [pc, #24] ; (802aa40 ) 802aa26: 6813 ldr r3, [r2, #0] 802aa28: 6819 ldr r1, [r3, #0] 802aa2a: 4b06 ldr r3, [pc, #24] ; (802aa44 ) 802aa2c: b911 cbnz r1, 802aa34 /* 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; 802aa2e: f04f 32ff mov.w r2, #4294967295 802aa32: e003 b.n 802aa3c { /* 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 ); 802aa34: 6812 ldr r2, [r2, #0] 802aa36: 68d2 ldr r2, [r2, #12] xNextTaskUnblockTime = listGET_LIST_ITEM_VALUE( &( ( pxTCB )->xGenericListItem ) ); 802aa38: 68d2 ldr r2, [r2, #12] 802aa3a: 6852 ldr r2, [r2, #4] 802aa3c: 601a str r2, [r3, #0] 802aa3e: 4770 bx lr 802aa40: 20000bd0 .word 0x20000bd0 802aa44: 20000708 .word 0x20000708 0802aa48 : /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake ) { /* The list item will be inserted in wake time order. */ listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake ); 802aa48: 4b0e ldr r3, [pc, #56] ; (802aa84 ) 802aa4a: 681a ldr r2, [r3, #0] #endif /* vTaskDelete */ } /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake ) { 802aa4c: b510 push {r4, lr} /* The list item will be inserted in wake time order. */ listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake ); 802aa4e: 6050 str r0, [r2, #4] if( xTimeToWake < xTickCount ) 802aa50: 4a0d ldr r2, [pc, #52] ; (802aa88 ) 802aa52: 6812 ldr r2, [r2, #0] 802aa54: 4290 cmp r0, r2 #endif /* vTaskDelete */ } /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake ) { 802aa56: 4604 mov r4, r0 /* The list item will be inserted in wake time order. */ listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake ); if( xTimeToWake < xTickCount ) 802aa58: d207 bcs.n 802aa6a { /* Wake time has overflowed. Place this item in the overflow list. */ vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xGenericListItem ) ); 802aa5a: 4a0c ldr r2, [pc, #48] ; (802aa8c ) 802aa5c: 6810 ldr r0, [r2, #0] 802aa5e: 6819 ldr r1, [r3, #0] 802aa60: 3104 adds r1, #4 else { mtCOVERAGE_TEST_MARKER(); } } } 802aa62: 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 ) ); 802aa66: f7ff bc6a b.w 802a33e } else { /* The wake time has not overflowed, so the current block list is used. */ vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xGenericListItem ) ); 802aa6a: 4a09 ldr r2, [pc, #36] ; (802aa90 ) 802aa6c: 6810 ldr r0, [r2, #0] 802aa6e: 6819 ldr r1, [r3, #0] 802aa70: 3104 adds r1, #4 802aa72: f7ff fc64 bl 802a33e /* 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 ) 802aa76: 4b07 ldr r3, [pc, #28] ; (802aa94 ) 802aa78: 681a ldr r2, [r3, #0] 802aa7a: 4294 cmp r4, r2 { xNextTaskUnblockTime = xTimeToWake; 802aa7c: bf38 it cc 802aa7e: 601c strcc r4, [r3, #0] 802aa80: bd10 pop {r4, pc} 802aa82: bf00 nop 802aa84: 20000c80 .word 0x20000c80 802aa88: 20000c9c .word 0x20000c9c 802aa8c: 20000ca0 .word 0x20000ca0 802aa90: 20000bd0 .word 0x20000bd0 802aa94: 20000708 .word 0x20000708 0802aa98 : #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. */ { 802aa98: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 802aa9c: 9d0a ldr r5, [sp, #40] ; 0x28 802aa9e: f8dd 802c ldr.w r8, [sp, #44] ; 0x2c 802aaa2: 9e0c ldr r6, [sp, #48] ; 0x30 802aaa4: 460f mov r7, r1 802aaa6: 4693 mov fp, r2 802aaa8: 469a mov sl, r3 BaseType_t xReturn; TCB_t * pxNewTCB; StackType_t *pxTopOfStack; configASSERT( pxTaskCode ); 802aaaa: 4681 mov r9, r0 802aaac: b910 cbnz r0, 802aab4 802aaae: f000 fe9b bl 802b7e8 802aab2: e7fe b.n 802aab2 configASSERT( ( ( uxPriority & ( ~portPRIVILEGE_BIT ) ) < configMAX_PRIORITIES ) ); 802aab4: 2d04 cmp r5, #4 802aab6: d902 bls.n 802aabe 802aab8: f000 fe96 bl 802b7e8 802aabc: e7fe b.n 802aabc #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. */ 802aabe: b936 cbnz r6, 802aace 802aac0: 0090 lsls r0, r2, #2 802aac2: f000 ffa7 bl 802ba14 if( pxStack != NULL ) 802aac6: 4606 mov r6, r0 802aac8: 2800 cmp r0, #0 802aaca: f000 809e beq.w 802ac0a { /* 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 ) ); 802aace: 205c movs r0, #92 ; 0x5c 802aad0: f000 ffa0 bl 802ba14 if( pxNewTCB != NULL ) 802aad4: 4604 mov r4, r0 802aad6: b178 cbz r0, 802aaf8 { /* Store the stack location in the TCB. */ pxNewTCB->pxStack = pxStack; 802aad8: 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 ) ); 802aada: ea4f 028b mov.w r2, fp, lsl #2 802aade: 4630 mov r0, r6 802aae0: 21a5 movs r1, #165 ; 0xa5 802aae2: f7f7 f80d 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 ); 802aae6: 6b23 ldr r3, [r4, #48] ; 0x30 802aae8: f10b 3bff add.w fp, fp, #4294967295 802aaec: 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. */ 802aaf0: 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++ ) 802aaf4: 2600 movs r6, #0 802aaf6: e003 b.n 802ab00 } else { /* The stack cannot be used as the TCB was not created. Free it again. */ vPortFree( pxStack ); 802aaf8: 4630 mov r0, r6 802aafa: f001 f811 bl 802bb20 802aafe: e084 b.n 802ac0a 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. */ 802ab00: 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 ]; 802ab02: 5dba ldrb r2, [r7, r6] 802ab04: 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 ) 802ab08: 5dbb ldrb r3, [r7, r6] 802ab0a: b113 cbz r3, 802ab12 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++ ) 802ab0c: 3601 adds r6, #1 802ab0e: 2e10 cmp r6, #16 802ab10: d1f6 bne.n 802ab00 } } /* 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'; 802ab12: 2600 movs r6, #0 pxTCB->uxBasePriority = uxPriority; pxTCB->uxMutexesHeld = 0; } #endif /* configUSE_MUTEXES */ vListInitialiseItem( &( pxTCB->xGenericListItem ) ); 802ab14: 1d27 adds r7, r4, #4 802ab16: 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'; 802ab18: f884 6043 strb.w r6, [r4, #67] ; 0x43 else { mtCOVERAGE_TEST_MARKER(); } pxTCB->uxPriority = uxPriority; 802ab1c: 62e5 str r5, [r4, #44] ; 0x2c #if ( configUSE_MUTEXES == 1 ) { pxTCB->uxBasePriority = uxPriority; 802ab1e: 64e5 str r5, [r4, #76] ; 0x4c pxTCB->uxMutexesHeld = 0; 802ab20: 6526 str r6, [r4, #80] ; 0x50 } #endif /* configUSE_MUTEXES */ vListInitialiseItem( &( pxTCB->xGenericListItem ) ); 802ab22: f7ff fbfd bl 802a320 vListInitialiseItem( &( pxTCB->xEventListItem ) ); 802ab26: f104 0018 add.w r0, r4, #24 802ab2a: f7ff fbf9 bl 802a320 /* 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. */ 802ab2e: f1c5 0305 rsb r3, r5, #5 } #endif /* portUSING_MPU_WRAPPERS */ #if ( configUSE_TASK_NOTIFICATIONS == 1 ) { pxTCB->ulNotifiedValue = 0; 802ab32: 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 ); 802ab34: 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. */ 802ab36: 61a3 str r3, [r4, #24] listSET_LIST_ITEM_OWNER( &( pxTCB->xEventListItem ), pxTCB ); 802ab38: 6264 str r4, [r4, #36] ; 0x24 #endif /* portUSING_MPU_WRAPPERS */ #if ( configUSE_TASK_NOTIFICATIONS == 1 ) { pxTCB->ulNotifiedValue = 0; pxTCB->eNotifyState = eNotWaitingNotification; 802ab3a: 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 ); 802ab3e: 4658 mov r0, fp 802ab40: 4649 mov r1, r9 802ab42: 4652 mov r2, sl 802ab44: f000 fe24 bl 802b790 802ab48: 6020 str r0, [r4, #0] } #endif /* portUSING_MPU_WRAPPERS */ if( ( void * ) pxCreatedTask != NULL ) 802ab4a: f1b8 0f00 cmp.w r8, #0 802ab4e: d001 beq.n 802ab54 { /* 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; 802ab50: f8c8 4000 str.w r4, [r8] mtCOVERAGE_TEST_MARKER(); } /* Ensure interrupts don't access the task lists while they are being updated. */ taskENTER_CRITICAL(); 802ab54: f000 fe50 bl 802b7f8 { uxCurrentNumberOfTasks++; 802ab58: 4a2e ldr r2, [pc, #184] ; (802ac14 ) 802ab5a: 6813 ldr r3, [r2, #0] 802ab5c: 3301 adds r3, #1 802ab5e: 6013 str r3, [r2, #0] if( pxCurrentTCB == NULL ) 802ab60: 4b2d ldr r3, [pc, #180] ; (802ac18 ) 802ab62: 681e ldr r6, [r3, #0] 802ab64: bb36 cbnz r6, 802abb4 { /* There are no other tasks, or all the other tasks are in the suspended state - make this the current task. */ pxCurrentTCB = pxNewTCB; 802ab66: 601c str r4, [r3, #0] if( uxCurrentNumberOfTasks == ( UBaseType_t ) 1 ) 802ab68: 6813 ldr r3, [r2, #0] 802ab6a: 2b01 cmp r3, #1 802ab6c: d12a bne.n 802abc4 { UBaseType_t uxPriority; for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); 802ab6e: f8df 80d0 ldr.w r8, [pc, #208] ; 802ac40 802ab72: f04f 0914 mov.w r9, #20 802ab76: 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++ ) 802ab7a: 3601 adds r6, #1 { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); 802ab7c: f7ff fbc5 bl 802a30a static void prvInitialiseTaskLists( void ) { UBaseType_t uxPriority; for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) 802ab80: 2e05 cmp r6, #5 802ab82: d1f8 bne.n 802ab76 { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); } vListInitialise( &xDelayedTaskList1 ); 802ab84: f8df 80bc ldr.w r8, [pc, #188] ; 802ac44 vListInitialise( &xDelayedTaskList2 ); 802ab88: 4e24 ldr r6, [pc, #144] ; (802ac1c ) for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); } vListInitialise( &xDelayedTaskList1 ); 802ab8a: 4640 mov r0, r8 802ab8c: f7ff fbbd bl 802a30a vListInitialise( &xDelayedTaskList2 ); 802ab90: 4630 mov r0, r6 802ab92: f7ff fbba bl 802a30a vListInitialise( &xPendingReadyList ); 802ab96: 4822 ldr r0, [pc, #136] ; (802ac20 ) 802ab98: f7ff fbb7 bl 802a30a #if ( INCLUDE_vTaskDelete == 1 ) { vListInitialise( &xTasksWaitingTermination ); 802ab9c: 4821 ldr r0, [pc, #132] ; (802ac24 ) 802ab9e: f7ff fbb4 bl 802a30a } #endif /* INCLUDE_vTaskDelete */ #if ( INCLUDE_vTaskSuspend == 1 ) { vListInitialise( &xSuspendedTaskList ); 802aba2: 4821 ldr r0, [pc, #132] ; (802ac28 ) 802aba4: f7ff fbb1 bl 802a30a } #endif /* INCLUDE_vTaskSuspend */ /* Start with pxDelayedTaskList using list1 and the pxOverflowDelayedTaskList using list2. */ pxDelayedTaskList = &xDelayedTaskList1; 802aba8: 4b20 ldr r3, [pc, #128] ; (802ac2c ) 802abaa: f8c3 8000 str.w r8, [r3] pxOverflowDelayedTaskList = &xDelayedTaskList2; 802abae: 4b20 ldr r3, [pc, #128] ; (802ac30 ) 802abb0: 601e str r6, [r3, #0] 802abb2: e007 b.n 802abc4 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 ) 802abb4: 4a1f ldr r2, [pc, #124] ; (802ac34 ) 802abb6: 6812 ldr r2, [r2, #0] 802abb8: b922 cbnz r2, 802abc4 { if( pxCurrentTCB->uxPriority <= uxPriority ) 802abba: 681a ldr r2, [r3, #0] 802abbc: 6ad2 ldr r2, [r2, #44] ; 0x2c 802abbe: 42aa cmp r2, r5 { pxCurrentTCB = pxNewTCB; 802abc0: bf98 it ls 802abc2: 601c strls r4, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } } uxTaskNumber++; 802abc4: 4a1c ldr r2, [pc, #112] ; (802ac38 ) 802abc6: 6813 ldr r3, [r2, #0] 802abc8: 3301 adds r3, #1 802abca: 6013 str r3, [r2, #0] pxNewTCB->uxTCBNumber = uxTaskNumber; } #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyList( pxNewTCB ); 802abcc: 4a1b ldr r2, [pc, #108] ; (802ac3c ) uxTaskNumber++; #if ( configUSE_TRACE_FACILITY == 1 ) { /* Add a counter into the TCB for tracing only. */ pxNewTCB->uxTCBNumber = uxTaskNumber; 802abce: 6463 str r3, [r4, #68] ; 0x44 } #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyList( pxNewTCB ); 802abd0: 6ae3 ldr r3, [r4, #44] ; 0x2c 802abd2: 6811 ldr r1, [r2, #0] 802abd4: 2401 movs r4, #1 802abd6: fa04 f003 lsl.w r0, r4, r3 802abda: 4301 orrs r1, r0 802abdc: 6011 str r1, [r2, #0] 802abde: 4a18 ldr r2, [pc, #96] ; (802ac40 ) 802abe0: 2014 movs r0, #20 802abe2: fb00 2003 mla r0, r0, r3, r2 802abe6: 4639 mov r1, r7 802abe8: f7ff fb9d bl 802a326 xReturn = pdPASS; portSETUP_TCB( pxNewTCB ); } taskEXIT_CRITICAL(); 802abec: f000 fe30 bl 802b850 traceTASK_CREATE_FAILED(); } if( xReturn == pdPASS ) { if( xSchedulerRunning != pdFALSE ) 802abf0: 4b10 ldr r3, [pc, #64] ; (802ac34 ) 802abf2: 681b ldr r3, [r3, #0] 802abf4: b133 cbz r3, 802ac04 { /* If the created task is of a higher priority than the current task then it should run now. */ if( pxCurrentTCB->uxPriority < uxPriority ) 802abf6: 4b08 ldr r3, [pc, #32] ; (802ac18 ) 802abf8: 681b ldr r3, [r3, #0] 802abfa: 6adb ldr r3, [r3, #44] ; 0x2c 802abfc: 42ab cmp r3, r5 802abfe: d201 bcs.n 802ac04 { taskYIELD_IF_USING_PREEMPTION(); 802ac00: f000 fde6 bl 802b7d0 #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyList( pxNewTCB ); xReturn = pdPASS; 802ac04: 4620 mov r0, r4 802ac06: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} } taskEXIT_CRITICAL(); } else { xReturn = errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY; 802ac0a: f04f 30ff mov.w r0, #4294967295 mtCOVERAGE_TEST_MARKER(); } } return xReturn; } 802ac0e: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 802ac12: bf00 nop 802ac14: 20000ca8 .word 0x20000ca8 802ac18: 20000c80 .word 0x20000c80 802ac1c: 20000bf0 .word 0x20000bf0 802ac20: 20000c84 .word 0x20000c84 802ac24: 20000c6c .word 0x20000c6c 802ac28: 20000cac .word 0x20000cac 802ac2c: 20000bd0 .word 0x20000bd0 802ac30: 20000ca0 .word 0x20000ca0 802ac34: 20000bd4 .word 0x20000bd4 802ac38: 20000ca4 .word 0x20000ca4 802ac3c: 20000cc0 .word 0x20000cc0 802ac40: 20000c08 .word 0x20000c08 802ac44: 20000bdc .word 0x20000bdc 0802ac48 : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelete == 1 ) void vTaskDelete( TaskHandle_t xTaskToDelete ) { 802ac48: b538 push {r3, r4, r5, lr} 802ac4a: 4604 mov r4, r0 TCB_t *pxTCB; taskENTER_CRITICAL(); 802ac4c: f000 fdd4 bl 802b7f8 { /* If null is passed in here then it is the calling task that is being deleted. */ pxTCB = prvGetTCBFromHandle( xTaskToDelete ); 802ac50: b90c cbnz r4, 802ac56 802ac52: 4b22 ldr r3, [pc, #136] ; (802acdc ) 802ac54: 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 ) 802ac56: 1d25 adds r5, r4, #4 802ac58: 4628 mov r0, r5 802ac5a: f7ff fb88 bl 802a36e 802ac5e: b968 cbnz r0, 802ac7c { taskRESET_READY_PRIORITY( pxTCB->uxPriority ); 802ac60: 6ae2 ldr r2, [r4, #44] ; 0x2c 802ac62: 491f ldr r1, [pc, #124] ; (802ace0 ) 802ac64: 2314 movs r3, #20 802ac66: 4353 muls r3, r2 802ac68: 58cb ldr r3, [r1, r3] 802ac6a: b93b cbnz r3, 802ac7c 802ac6c: 4b1d ldr r3, [pc, #116] ; (802ace4 ) 802ac6e: 2001 movs r0, #1 802ac70: 6819 ldr r1, [r3, #0] 802ac72: fa00 f202 lsl.w r2, r0, r2 802ac76: ea21 0202 bic.w r2, r1, r2 802ac7a: 601a str r2, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } /* Is the task waiting on an event also? */ if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) 802ac7c: 6aa3 ldr r3, [r4, #40] ; 0x28 802ac7e: b11b cbz r3, 802ac88 { ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 802ac80: f104 0018 add.w r0, r4, #24 802ac84: f7ff fb73 bl 802a36e else { mtCOVERAGE_TEST_MARKER(); } vListInsertEnd( &xTasksWaitingTermination, &( pxTCB->xGenericListItem ) ); 802ac88: 4817 ldr r0, [pc, #92] ; (802ace8 ) 802ac8a: 4629 mov r1, r5 802ac8c: f7ff fb4b bl 802a326 /* 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; 802ac90: 4b16 ldr r3, [pc, #88] ; (802acec ) 802ac92: 681a ldr r2, [r3, #0] 802ac94: 3201 adds r2, #1 802ac96: 601a str r2, [r3, #0] /* Increment the uxTaskNumberVariable also so kernel aware debuggers can detect that the task lists need re-generating. */ uxTaskNumber++; 802ac98: 4b15 ldr r3, [pc, #84] ; (802acf0 ) 802ac9a: 681a ldr r2, [r3, #0] 802ac9c: 3201 adds r2, #1 802ac9e: 601a str r2, [r3, #0] traceTASK_DELETE( pxTCB ); } taskEXIT_CRITICAL(); 802aca0: f000 fdd6 bl 802b850 /* Force a reschedule if it is the currently running task that has just been deleted. */ if( xSchedulerRunning != pdFALSE ) 802aca4: 4b13 ldr r3, [pc, #76] ; (802acf4 ) 802aca6: 681b ldr r3, [r3, #0] 802aca8: 2b00 cmp r3, #0 802acaa: d015 beq.n 802acd8 { if( pxTCB == pxCurrentTCB ) 802acac: 4b0b ldr r3, [pc, #44] ; (802acdc ) 802acae: 681b ldr r3, [r3, #0] 802acb0: 429c cmp r4, r3 802acb2: d109 bne.n 802acc8 { configASSERT( uxSchedulerSuspended == 0 ); 802acb4: 4b10 ldr r3, [pc, #64] ; (802acf8 ) 802acb6: 681b ldr r3, [r3, #0] 802acb8: b113 cbz r3, 802acc0 802acba: f000 fd95 bl 802b7e8 802acbe: e7fe b.n 802acbe prvResetNextTaskUnblockTime(); } taskEXIT_CRITICAL(); } } } 802acc0: 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(); 802acc4: f000 bd84 b.w 802b7d0 } else { /* Reset the next expected unblock time in case it referred to the task that has just been deleted. */ taskENTER_CRITICAL(); 802acc8: f000 fd96 bl 802b7f8 { prvResetNextTaskUnblockTime(); 802accc: f7ff feaa bl 802aa24 } taskEXIT_CRITICAL(); } } } 802acd0: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} the task that has just been deleted. */ taskENTER_CRITICAL(); { prvResetNextTaskUnblockTime(); } taskEXIT_CRITICAL(); 802acd4: f000 bdbc b.w 802b850 802acd8: bd38 pop {r3, r4, r5, pc} 802acda: bf00 nop 802acdc: 20000c80 .word 0x20000c80 802ace0: 20000c08 .word 0x20000c08 802ace4: 20000cc0 .word 0x20000cc0 802ace8: 20000c6c .word 0x20000c6c 802acec: 20000bd8 .word 0x20000bd8 802acf0: 20000ca4 .word 0x20000ca4 802acf4: 20000bd4 .word 0x20000bd4 802acf8: 20000c98 .word 0x20000c98 0802acfc : #endif /* ( ( INCLUDE_xTaskResumeFromISR == 1 ) && ( INCLUDE_vTaskSuspend == 1 ) ) */ /*-----------------------------------------------------------*/ void vTaskStartScheduler( void ) { 802acfc: b530 push {r4, r5, lr} 802acfe: 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. */ 802ad00: 2400 movs r4, #0 802ad02: 2280 movs r2, #128 ; 0x80 802ad04: 9400 str r4, [sp, #0] 802ad06: 9401 str r4, [sp, #4] 802ad08: 9402 str r4, [sp, #8] 802ad0a: 9403 str r4, [sp, #12] 802ad0c: 480e ldr r0, [pc, #56] ; (802ad48 ) 802ad0e: 490f ldr r1, [pc, #60] ; (802ad4c ) 802ad10: 4623 mov r3, r4 802ad12: f7ff fec1 bl 802aa98 } #endif /* INCLUDE_xTaskGetIdleTaskHandle */ #if ( configUSE_TIMERS == 1 ) { if( xReturn == pdPASS ) 802ad16: 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. */ 802ad18: 4605 mov r5, r0 } #endif /* INCLUDE_xTaskGetIdleTaskHandle */ #if ( configUSE_TIMERS == 1 ) { if( xReturn == pdPASS ) 802ad1a: d10f bne.n 802ad3c { xReturn = xTimerCreateTimerTask(); 802ad1c: f000 fbce bl 802b4bc mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_TIMERS */ if( xReturn == pdPASS ) 802ad20: 2801 cmp r0, #1 #if ( configUSE_TIMERS == 1 ) { if( xReturn == pdPASS ) { xReturn = xTimerCreateTimerTask(); 802ad22: 4605 mov r5, r0 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_TIMERS */ if( xReturn == pdPASS ) 802ad24: d10a bne.n 802ad3c /* 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(); 802ad26: f000 fd5f bl 802b7e8 structure specific to the task that will run first. */ _impure_ptr = &( pxCurrentTCB->xNewLib_reent ); } #endif /* configUSE_NEWLIB_REENTRANT */ xSchedulerRunning = pdTRUE; 802ad2a: 4b09 ldr r3, [pc, #36] ; (802ad50 ) 802ad2c: 601d str r5, [r3, #0] xTickCount = ( TickType_t ) 0U; 802ad2e: 4b09 ldr r3, [pc, #36] ; (802ad54 ) 802ad30: 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 ); } } 802ad32: b005 add sp, #20 802ad34: 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 ) 802ad38: f000 bde2 b.w 802b900 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 ); 802ad3c: b915 cbnz r5, 802ad44 802ad3e: f000 fd53 bl 802b7e8 802ad42: e7fe b.n 802ad42 } } 802ad44: b005 add sp, #20 802ad46: bd30 pop {r4, r5, pc} 802ad48: 0802af69 .word 0x0802af69 802ad4c: 08039dd2 .word 0x08039dd2 802ad50: 20000bd4 .word 0x20000bd4 802ad54: 20000c9c .word 0x20000c9c 0802ad58 : { /* 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; 802ad58: 4b02 ldr r3, [pc, #8] ; (802ad64 ) 802ad5a: 681a ldr r2, [r3, #0] 802ad5c: 3201 adds r2, #1 802ad5e: 601a str r2, [r3, #0] 802ad60: 4770 bx lr 802ad62: bf00 nop 802ad64: 20000c98 .word 0x20000c98 0802ad68 : TickType_t xTicks; /* Critical section required if running on a 16 bit processor. */ portTICK_TYPE_ENTER_CRITICAL(); { xTicks = xTickCount; 802ad68: 4b01 ldr r3, [pc, #4] ; (802ad70 ) 802ad6a: 6818 ldr r0, [r3, #0] } portTICK_TYPE_EXIT_CRITICAL(); return xTicks; } 802ad6c: 4770 bx lr 802ad6e: bf00 nop 802ad70: 20000c9c .word 0x20000c9c 0802ad74 : /* 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 ) 802ad74: 4b3b ldr r3, [pc, #236] ; (802ae64 ) 802ad76: 681b ldr r3, [r3, #0] #endif /* configUSE_TICKLESS_IDLE */ /*----------------------------------------------------------*/ BaseType_t xTaskIncrementTick( void ) { 802ad78: 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 ) 802ad7c: 2b00 cmp r3, #0 802ad7e: d15b bne.n 802ae38 { /* Increment the RTOS tick, switching the delayed and overflowed delayed lists if it wraps to 0. */ ++xTickCount; 802ad80: 4b39 ldr r3, [pc, #228] ; (802ae68 ) 802ad82: 681a ldr r2, [r3, #0] 802ad84: 3201 adds r2, #1 802ad86: 601a str r2, [r3, #0] { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 802ad88: 681e ldr r6, [r3, #0] if( xConstTickCount == ( TickType_t ) 0U ) 802ad8a: b98e cbnz r6, 802adb0 { taskSWITCH_DELAYED_LISTS(); 802ad8c: 4b37 ldr r3, [pc, #220] ; (802ae6c ) 802ad8e: 681a ldr r2, [r3, #0] 802ad90: 6812 ldr r2, [r2, #0] 802ad92: b112 cbz r2, 802ad9a 802ad94: f000 fd28 bl 802b7e8 802ad98: e7fe b.n 802ad98 802ad9a: 4a35 ldr r2, [pc, #212] ; (802ae70 ) 802ad9c: 6819 ldr r1, [r3, #0] 802ad9e: 6810 ldr r0, [r2, #0] 802ada0: 6018 str r0, [r3, #0] 802ada2: 4b34 ldr r3, [pc, #208] ; (802ae74 ) 802ada4: 6011 str r1, [r2, #0] 802ada6: 681a ldr r2, [r3, #0] 802ada8: 3201 adds r2, #1 802adaa: 601a str r2, [r3, #0] 802adac: f7ff fe3a bl 802aa24 /* 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 ) 802adb0: 4b31 ldr r3, [pc, #196] ; (802ae78 ) 802adb2: 681b ldr r3, [r3, #0] 802adb4: 2400 movs r4, #0 802adb6: 429e cmp r6, r3 802adb8: d200 bcs.n 802adbc 802adba: e032 b.n 802ae22 { for( ;; ) { if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 802adbc: 4f2b ldr r7, [pc, #172] ; (802ae6c ) mtCOVERAGE_TEST_MARKER(); } /* Place the unblocked task into the appropriate ready list. */ prvAddTaskToReadyList( pxTCB ); 802adbe: f8df 80cc ldr.w r8, [pc, #204] ; 802ae8c 802adc2: f8df a0bc ldr.w sl, [pc, #188] ; 802ae80 look any further down the list. */ if( xConstTickCount >= xNextTaskUnblockTime ) { for( ;; ) { if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 802adc6: 683b ldr r3, [r7, #0] 802adc8: 681b ldr r3, [r3, #0] 802adca: 2b00 cmp r3, #0 802adcc: d13a bne.n 802ae44 /* 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; 802adce: 4b2a ldr r3, [pc, #168] ; (802ae78 ) 802add0: f04f 32ff mov.w r2, #4294967295 802add4: 601a str r2, [r3, #0] break; 802add6: e024 b.n 802ae22 /* 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; 802add8: 4a27 ldr r2, [pc, #156] ; (802ae78 ) 802adda: 6013 str r3, [r2, #0] break; 802addc: e021 b.n 802ae22 { mtCOVERAGE_TEST_MARKER(); } /* It is time to remove the item from the Blocked state. */ ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 802adde: f105 0904 add.w r9, r5, #4 802ade2: 4648 mov r0, r9 802ade4: f7ff fac3 bl 802a36e /* Is the task waiting on an event also? If so remove it from the event list. */ if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) 802ade8: 6aab ldr r3, [r5, #40] ; 0x28 802adea: b11b cbz r3, 802adf4 { ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 802adec: f105 0018 add.w r0, r5, #24 802adf0: f7ff fabd bl 802a36e mtCOVERAGE_TEST_MARKER(); } /* Place the unblocked task into the appropriate ready list. */ prvAddTaskToReadyList( pxTCB ); 802adf4: 6aeb ldr r3, [r5, #44] ; 0x2c 802adf6: f8d8 1000 ldr.w r1, [r8] 802adfa: 2201 movs r2, #1 802adfc: fa02 f203 lsl.w r2, r2, r3 802ae00: 2014 movs r0, #20 802ae02: 430a orrs r2, r1 802ae04: fb00 a003 mla r0, r0, r3, sl 802ae08: 4649 mov r1, r9 802ae0a: f8c8 2000 str.w r2, [r8] 802ae0e: f7ff fa8a bl 802a326 { /* 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 ) 802ae12: 4b1a ldr r3, [pc, #104] ; (802ae7c ) 802ae14: 6aea ldr r2, [r5, #44] ; 0x2c 802ae16: 681b ldr r3, [r3, #0] 802ae18: 6adb ldr r3, [r3, #44] ; 0x2c { xSwitchRequired = pdTRUE; 802ae1a: 429a cmp r2, r3 802ae1c: bf28 it cs 802ae1e: 2401 movcs r4, #1 802ae20: e7d1 b.n 802adc6 /* 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 ) 802ae22: 4b16 ldr r3, [pc, #88] ; (802ae7c ) 802ae24: 681b ldr r3, [r3, #0] 802ae26: 6adb ldr r3, [r3, #44] ; 0x2c 802ae28: 2214 movs r2, #20 802ae2a: 4353 muls r3, r2 802ae2c: 4a14 ldr r2, [pc, #80] ; (802ae80 ) 802ae2e: 58d3 ldr r3, [r2, r3] { xSwitchRequired = pdTRUE; 802ae30: 2b01 cmp r3, #1 802ae32: bf88 it hi 802ae34: 2401 movhi r4, #1 802ae36: e00c b.n 802ae52 } #endif /* configUSE_TICK_HOOK */ } else { ++uxPendedTicks; 802ae38: 4b12 ldr r3, [pc, #72] ; (802ae84 ) 802ae3a: 681a ldr r2, [r3, #0] 802ae3c: 3201 adds r2, #1 802ae3e: 601a str r2, [r3, #0] BaseType_t xTaskIncrementTick( void ) { TCB_t * pxTCB; TickType_t xItemValue; BaseType_t xSwitchRequired = pdFALSE; 802ae40: 2400 movs r4, #0 802ae42: e006 b.n 802ae52 { /* 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 ); 802ae44: 683b ldr r3, [r7, #0] 802ae46: 68db ldr r3, [r3, #12] 802ae48: 68dd ldr r5, [r3, #12] xItemValue = listGET_LIST_ITEM_VALUE( &( pxTCB->xGenericListItem ) ); 802ae4a: 686b ldr r3, [r5, #4] if( xConstTickCount < xItemValue ) 802ae4c: 429e cmp r6, r3 802ae4e: d2c6 bcs.n 802adde 802ae50: e7c2 b.n 802add8 #endif } #if ( configUSE_PREEMPTION == 1 ) { if( xYieldPending != pdFALSE ) 802ae52: 4b0d ldr r3, [pc, #52] ; (802ae88 ) 802ae54: 681b ldr r3, [r3, #0] { xSwitchRequired = pdTRUE; 802ae56: 2b00 cmp r3, #0 802ae58: bf18 it ne 802ae5a: 2401 movne r4, #1 } } #endif /* configUSE_PREEMPTION */ return xSwitchRequired; } 802ae5c: 4620 mov r0, r4 802ae5e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802ae62: bf00 nop 802ae64: 20000c98 .word 0x20000c98 802ae68: 20000c9c .word 0x20000c9c 802ae6c: 20000bd0 .word 0x20000bd0 802ae70: 20000ca0 .word 0x20000ca0 802ae74: 20000bcc .word 0x20000bcc 802ae78: 20000708 .word 0x20000708 802ae7c: 20000c80 .word 0x20000c80 802ae80: 20000c08 .word 0x20000c08 802ae84: 20000c04 .word 0x20000c04 802ae88: 20000cc4 .word 0x20000cc4 802ae8c: 20000cc0 .word 0x20000cc0 0802ae90 : #endif /* configUSE_TICKLESS_IDLE */ /*----------------------------------------------------------*/ BaseType_t xTaskResumeAll( void ) { 802ae90: 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 ); 802ae94: 4c2c ldr r4, [pc, #176] ; (802af48 ) 802ae96: 6823 ldr r3, [r4, #0] 802ae98: b913 cbnz r3, 802aea0 802ae9a: f000 fca5 bl 802b7e8 802ae9e: e7fe b.n 802ae9e /* 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(); 802aea0: f000 fcaa bl 802b7f8 { --uxSchedulerSuspended; 802aea4: 6823 ldr r3, [r4, #0] 802aea6: 3b01 subs r3, #1 802aea8: 6023 str r3, [r4, #0] if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 802aeaa: 6823 ldr r3, [r4, #0] 802aeac: b10b cbz r3, 802aeb2 /*----------------------------------------------------------*/ BaseType_t xTaskResumeAll( void ) { TCB_t *pxTCB; BaseType_t xAlreadyYielded = pdFALSE; 802aeae: 2400 movs r4, #0 802aeb0: e044 b.n 802af3c { --uxSchedulerSuspended; if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) 802aeb2: 4b26 ldr r3, [pc, #152] ; (802af4c ) 802aeb4: 681b ldr r3, [r3, #0] 802aeb6: bb0b cbnz r3, 802aefc 802aeb8: e7f9 b.n 802aeae { /* 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 ) ); 802aeba: 68f3 ldr r3, [r6, #12] 802aebc: 68dc ldr r4, [r3, #12] ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 802aebe: 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 ) ); 802aec2: f104 0018 add.w r0, r4, #24 802aec6: f7ff fa52 bl 802a36e ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 802aeca: 4640 mov r0, r8 802aecc: f7ff fa4f bl 802a36e prvAddTaskToReadyList( pxTCB ); 802aed0: 6ae3 ldr r3, [r4, #44] ; 0x2c 802aed2: 682a ldr r2, [r5, #0] 802aed4: 2701 movs r7, #1 802aed6: fa07 f103 lsl.w r1, r7, r3 802aeda: 2014 movs r0, #20 802aedc: 430a orrs r2, r1 802aede: fb00 9003 mla r0, r0, r3, r9 802aee2: 4641 mov r1, r8 802aee4: 602a str r2, [r5, #0] 802aee6: f7ff fa1e bl 802a326 /* If the moved task has a priority higher than the current task then a yield must be performed. */ if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority ) 802aeea: 4b19 ldr r3, [pc, #100] ; (802af50 ) 802aeec: 6ae2 ldr r2, [r4, #44] ; 0x2c 802aeee: 681b ldr r3, [r3, #0] 802aef0: 6adb ldr r3, [r3, #44] ; 0x2c 802aef2: 429a cmp r2, r3 802aef4: d306 bcc.n 802af04 { xYieldPending = pdTRUE; 802aef6: 4b17 ldr r3, [pc, #92] ; (802af54 ) 802aef8: 601f str r7, [r3, #0] 802aefa: e003 b.n 802af04 { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) { /* Move any readied tasks from the pending list into the appropriate ready list. */ while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) 802aefc: 4e16 ldr r6, [pc, #88] ; (802af58 ) { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xPendingReadyList ) ); ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); prvAddTaskToReadyList( pxTCB ); 802aefe: 4d17 ldr r5, [pc, #92] ; (802af5c ) 802af00: f8df 9060 ldr.w r9, [pc, #96] ; 802af64 { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) { /* Move any readied tasks from the pending list into the appropriate ready list. */ while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) 802af04: 6833 ldr r3, [r6, #0] 802af06: 2b00 cmp r3, #0 802af08: d1d7 bne.n 802aeba /* 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 ) 802af0a: 4c15 ldr r4, [pc, #84] ; (802af60 ) 802af0c: 6823 ldr r3, [r4, #0] 802af0e: b96b cbnz r3, 802af2c else { mtCOVERAGE_TEST_MARKER(); } if( xYieldPending == pdTRUE ) 802af10: 4b10 ldr r3, [pc, #64] ; (802af54 ) 802af12: 681c ldr r4, [r3, #0] 802af14: 2c01 cmp r4, #1 802af16: d1ca bne.n 802aeae 802af18: e00e b.n 802af38 time. */ if( uxPendedTicks > ( UBaseType_t ) 0U ) { while( uxPendedTicks > ( UBaseType_t ) 0U ) { if( xTaskIncrementTick() != pdFALSE ) 802af1a: f7ff ff2b bl 802ad74 802af1e: b108 cbz r0, 802af24 { xYieldPending = pdTRUE; 802af20: 2301 movs r3, #1 802af22: 6033 str r3, [r6, #0] } else { mtCOVERAGE_TEST_MARKER(); } --uxPendedTicks; 802af24: 682b ldr r3, [r5, #0] 802af26: 3b01 subs r3, #1 802af28: 602b str r3, [r5, #0] 802af2a: e001 b.n 802af30 { while( uxPendedTicks > ( UBaseType_t ) 0U ) { if( xTaskIncrementTick() != pdFALSE ) { xYieldPending = pdTRUE; 802af2c: 4e09 ldr r6, [pc, #36] ; (802af54 ) 802af2e: 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 ) 802af30: 6823 ldr r3, [r4, #0] 802af32: 2b00 cmp r3, #0 802af34: d1f1 bne.n 802af1a 802af36: e7eb b.n 802af10 #if( configUSE_PREEMPTION != 0 ) { xAlreadyYielded = pdTRUE; } #endif taskYIELD_IF_USING_PREEMPTION(); 802af38: f000 fc4a bl 802b7d0 else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 802af3c: f000 fc88 bl 802b850 return xAlreadyYielded; } 802af40: 4620 mov r0, r4 802af42: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 802af46: bf00 nop 802af48: 20000c98 .word 0x20000c98 802af4c: 20000ca8 .word 0x20000ca8 802af50: 20000c80 .word 0x20000c80 802af54: 20000cc4 .word 0x20000cc4 802af58: 20000c84 .word 0x20000c84 802af5c: 20000cc0 .word 0x20000cc0 802af60: 20000c04 .word 0x20000c04 802af64: 20000c08 .word 0x20000c08 0802af68 : * * void prvIdleTask( void *pvParameters ); * */ static portTASK_FUNCTION( prvIdleTask, pvParameters ) { 802af68: 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 ) 802af6a: 4c14 ldr r4, [pc, #80] ; (802afbc ) { vTaskSuspendAll(); { xListIsEmpty = listLIST_IS_EMPTY( &xTasksWaitingTermination ); 802af6c: 4e14 ldr r6, [pc, #80] ; (802afc0 ) taskENTER_CRITICAL(); { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xTasksWaitingTermination ) ); ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); --uxCurrentNumberOfTasks; 802af6e: 4f15 ldr r7, [pc, #84] ; (802afc4 ) { BaseType_t xListIsEmpty; /* ucTasksDeleted is used to prevent vTaskSuspendAll() being called too often in the idle task. */ while( uxTasksDeleted > ( UBaseType_t ) 0U ) 802af70: 6823 ldr r3, [r4, #0] 802af72: b1e3 cbz r3, 802afae { vTaskSuspendAll(); 802af74: f7ff fef0 bl 802ad58 { xListIsEmpty = listLIST_IS_EMPTY( &xTasksWaitingTermination ); 802af78: 6835 ldr r5, [r6, #0] } ( void ) xTaskResumeAll(); 802af7a: f7ff ff89 bl 802ae90 if( xListIsEmpty == pdFALSE ) 802af7e: 2d00 cmp r5, #0 802af80: d0f6 beq.n 802af70 { TCB_t *pxTCB; taskENTER_CRITICAL(); 802af82: f000 fc39 bl 802b7f8 { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xTasksWaitingTermination ) ); 802af86: 68f3 ldr r3, [r6, #12] 802af88: 68dd ldr r5, [r3, #12] ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 802af8a: 1d28 adds r0, r5, #4 802af8c: f7ff f9ef bl 802a36e --uxCurrentNumberOfTasks; 802af90: 683b ldr r3, [r7, #0] 802af92: 3b01 subs r3, #1 802af94: 603b str r3, [r7, #0] --uxTasksDeleted; 802af96: 6823 ldr r3, [r4, #0] 802af98: 3b01 subs r3, #1 802af9a: 6023 str r3, [r4, #0] } taskEXIT_CRITICAL(); 802af9c: f000 fc58 bl 802b850 vPortFreeAligned( pxTCB->pxStack ); } } #else { vPortFreeAligned( pxTCB->pxStack ); 802afa0: 6b28 ldr r0, [r5, #48] ; 0x30 802afa2: f000 fdbd bl 802bb20 } #endif vPortFree( pxTCB ); 802afa6: 4628 mov r0, r5 802afa8: f000 fdba bl 802bb20 802afac: e7e0 b.n 802af70 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 ) 802afae: 4b06 ldr r3, [pc, #24] ; (802afc8 ) 802afb0: 681b ldr r3, [r3, #0] 802afb2: 2b01 cmp r3, #1 802afb4: d9dc bls.n 802af70 { taskYIELD(); 802afb6: f000 fc0b bl 802b7d0 802afba: e7d9 b.n 802af70 802afbc: 20000bd8 .word 0x20000bd8 802afc0: 20000c6c .word 0x20000c6c 802afc4: 20000ca8 .word 0x20000ca8 802afc8: 20000c08 .word 0x20000c08 0802afcc : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelay == 1 ) void vTaskDelay( const TickType_t xTicksToDelay ) { 802afcc: 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 ) 802afce: 4604 mov r4, r0 802afd0: b918 cbnz r0, 802afda } else { mtCOVERAGE_TEST_MARKER(); } } 802afd2: 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(); 802afd6: f000 bbfb b.w 802b7d0 /* A delay time of zero just forces a reschedule. */ if( xTicksToDelay > ( TickType_t ) 0U ) { configASSERT( uxSchedulerSuspended == 0 ); 802afda: 4b11 ldr r3, [pc, #68] ; (802b020 ) 802afdc: 681b ldr r3, [r3, #0] 802afde: b113 cbz r3, 802afe6 802afe0: f000 fc02 bl 802b7e8 802afe4: e7fe b.n 802afe4 vTaskSuspendAll(); 802afe6: f7ff feb7 bl 802ad58 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; 802afea: 4b0e ldr r3, [pc, #56] ; (802b024 ) 802afec: 681d ldr r5, [r3, #0] 802afee: 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 ) 802aff0: 4c0d ldr r4, [pc, #52] ; (802b028 ) 802aff2: 6820 ldr r0, [r4, #0] 802aff4: 3004 adds r0, #4 802aff6: f7ff f9ba bl 802a36e 802affa: b948 cbnz r0, 802b010 { /* 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 ); 802affc: 4b0b ldr r3, [pc, #44] ; (802b02c ) 802affe: 6819 ldr r1, [r3, #0] 802b000: 6822 ldr r2, [r4, #0] 802b002: 6ad2 ldr r2, [r2, #44] ; 0x2c 802b004: 2001 movs r0, #1 802b006: fa00 f202 lsl.w r2, r0, r2 802b00a: ea21 0202 bic.w r2, r1, r2 802b00e: 601a str r2, [r3, #0] } else { mtCOVERAGE_TEST_MARKER(); } prvAddCurrentTaskToDelayedList( xTimeToWake ); 802b010: 4628 mov r0, r5 802b012: f7ff fd19 bl 802aa48 } xAlreadyYielded = xTaskResumeAll(); 802b016: f7ff ff3b bl 802ae90 mtCOVERAGE_TEST_MARKER(); } /* Force a reschedule if xTaskResumeAll has not already done so, we may have put ourselves to sleep. */ if( xAlreadyYielded == pdFALSE ) 802b01a: 2800 cmp r0, #0 802b01c: d0d9 beq.n 802afd2 } else { mtCOVERAGE_TEST_MARKER(); } } 802b01e: bd38 pop {r3, r4, r5, pc} 802b020: 20000c98 .word 0x20000c98 802b024: 20000c9c .word 0x20000c9c 802b028: 20000c80 .word 0x20000c80 802b02c: 20000cc0 .word 0x20000cc0 0802b030 : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelayUntil == 1 ) void vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement ) { 802b030: b570 push {r4, r5, r6, lr} 802b032: 460c mov r4, r1 TickType_t xTimeToWake; BaseType_t xAlreadyYielded, xShouldDelay = pdFALSE; configASSERT( pxPreviousWakeTime ); 802b034: 4605 mov r5, r0 802b036: b910 cbnz r0, 802b03e 802b038: f000 fbd6 bl 802b7e8 802b03c: e7fe b.n 802b03c configASSERT( ( xTimeIncrement > 0U ) ); 802b03e: b911 cbnz r1, 802b046 802b040: f000 fbd2 bl 802b7e8 802b044: e7fe b.n 802b044 configASSERT( uxSchedulerSuspended == 0 ); 802b046: 4b1c ldr r3, [pc, #112] ; (802b0b8 ) 802b048: 681e ldr r6, [r3, #0] 802b04a: b116 cbz r6, 802b052 802b04c: f000 fbcc bl 802b7e8 802b050: e7fe b.n 802b050 vTaskSuspendAll(); 802b052: f7ff fe81 bl 802ad58 { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 802b056: 4b19 ldr r3, [pc, #100] ; (802b0bc ) /* Generate the tick time at which the task wants to wake. */ xTimeToWake = *pxPreviousWakeTime + xTimeIncrement; 802b058: 682a ldr r2, [r5, #0] vTaskSuspendAll(); { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 802b05a: 6818 ldr r0, [r3, #0] /* Generate the tick time at which the task wants to wake. */ xTimeToWake = *pxPreviousWakeTime + xTimeIncrement; if( xConstTickCount < *pxPreviousWakeTime ) 802b05c: 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; 802b05e: 4414 add r4, r2 if( xConstTickCount < *pxPreviousWakeTime ) 802b060: d202 bcs.n 802b068 /* 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 ) ) 802b062: 4294 cmp r4, r2 802b064: d207 bcs.n 802b076 802b066: e001 b.n 802b06c 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 ) ) 802b068: 4294 cmp r4, r2 802b06a: d306 bcc.n 802b07a 802b06c: 4284 cmp r4, r0 802b06e: bf94 ite ls 802b070: 2300 movls r3, #0 802b072: 2301 movhi r3, #1 802b074: e002 b.n 802b07c #if ( INCLUDE_vTaskDelayUntil == 1 ) void vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement ) { TickType_t xTimeToWake; BaseType_t xAlreadyYielded, xShouldDelay = pdFALSE; 802b076: 4633 mov r3, r6 802b078: e000 b.n 802b07c /* 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; 802b07a: 2301 movs r3, #1 mtCOVERAGE_TEST_MARKER(); } } /* Update the wake time ready for the next call. */ *pxPreviousWakeTime = xTimeToWake; 802b07c: 602c str r4, [r5, #0] if( xShouldDelay != pdFALSE ) 802b07e: b193 cbz r3, 802b0a6 { 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 ) 802b080: 4d0f ldr r5, [pc, #60] ; (802b0c0 ) 802b082: 6828 ldr r0, [r5, #0] 802b084: 3004 adds r0, #4 802b086: f7ff f972 bl 802a36e 802b08a: b948 cbnz r0, 802b0a0 { /* 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 ); 802b08c: 4b0d ldr r3, [pc, #52] ; (802b0c4 ) 802b08e: 6819 ldr r1, [r3, #0] 802b090: 682a ldr r2, [r5, #0] 802b092: 6ad2 ldr r2, [r2, #44] ; 0x2c 802b094: 2001 movs r0, #1 802b096: fa00 f202 lsl.w r2, r0, r2 802b09a: ea21 0202 bic.w r2, r1, r2 802b09e: 601a str r2, [r3, #0] else { mtCOVERAGE_TEST_MARKER(); } prvAddCurrentTaskToDelayedList( xTimeToWake ); 802b0a0: 4620 mov r0, r4 802b0a2: f7ff fcd1 bl 802aa48 else { mtCOVERAGE_TEST_MARKER(); } } xAlreadyYielded = xTaskResumeAll(); 802b0a6: f7ff fef3 bl 802ae90 /* Force a reschedule if xTaskResumeAll has not already done so, we may have put ourselves to sleep. */ if( xAlreadyYielded == pdFALSE ) 802b0aa: b918 cbnz r0, 802b0b4 } else { mtCOVERAGE_TEST_MARKER(); } } 802b0ac: 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(); 802b0b0: f000 bb8e b.w 802b7d0 802b0b4: bd70 pop {r4, r5, r6, pc} 802b0b6: bf00 nop 802b0b8: 20000c98 .word 0x20000c98 802b0bc: 20000c9c .word 0x20000c9c 802b0c0: 20000c80 .word 0x20000c80 802b0c4: 20000cc0 .word 0x20000cc0 0802b0c8 : #endif /* configUSE_APPLICATION_TASK_TAG */ /*-----------------------------------------------------------*/ void vTaskSwitchContext( void ) { 802b0c8: b508 push {r3, lr} if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE ) 802b0ca: 4b12 ldr r3, [pc, #72] ; (802b114 ) 802b0cc: 681a ldr r2, [r3, #0] 802b0ce: 4b12 ldr r3, [pc, #72] ; (802b118 ) 802b0d0: b10a cbz r2, 802b0d6 { /* The scheduler is currently suspended - do not allow a context switch. */ xYieldPending = pdTRUE; 802b0d2: 2201 movs r2, #1 802b0d4: e01c b.n 802b110 } else { xYieldPending = pdFALSE; 802b0d6: 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(); 802b0d8: 4b10 ldr r3, [pc, #64] ; (802b11c ) 802b0da: 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 ) ); 802b0dc: fab2 f282 clz r2, r2 802b0e0: b2d2 uxtb r2, r2 802b0e2: 2314 movs r3, #20 802b0e4: f1c2 021f rsb r2, r2, #31 802b0e8: 490d ldr r1, [pc, #52] ; (802b120 ) 802b0ea: 435a muls r2, r3 802b0ec: 188b adds r3, r1, r2 802b0ee: 588a ldr r2, [r1, r2] 802b0f0: b912 cbnz r2, 802b0f8 802b0f2: f000 fb79 bl 802b7e8 802b0f6: e7fe b.n 802b0f6 802b0f8: 685a ldr r2, [r3, #4] 802b0fa: 6852 ldr r2, [r2, #4] 802b0fc: f103 0108 add.w r1, r3, #8 802b100: 428a cmp r2, r1 802b102: 605a str r2, [r3, #4] 802b104: bf04 itt eq 802b106: 6852 ldreq r2, [r2, #4] 802b108: 605a streq r2, [r3, #4] 802b10a: 685b ldr r3, [r3, #4] 802b10c: 68da ldr r2, [r3, #12] 802b10e: 4b05 ldr r3, [pc, #20] ; (802b124 ) 802b110: 601a str r2, [r3, #0] 802b112: bd08 pop {r3, pc} 802b114: 20000c98 .word 0x20000c98 802b118: 20000cc4 .word 0x20000cc4 802b11c: 20000cc0 .word 0x20000cc0 802b120: 20000c08 .word 0x20000c08 802b124: 20000c80 .word 0x20000c80 0802b128 : } } /*-----------------------------------------------------------*/ void vTaskPlaceOnEventList( List_t * const pxEventList, const TickType_t xTicksToWait ) { 802b128: b538 push {r3, r4, r5, lr} 802b12a: 460d mov r5, r1 TickType_t xTimeToWake; configASSERT( pxEventList ); 802b12c: b910 cbnz r0, 802b134 802b12e: f000 fb5b bl 802b7e8 802b132: e7fe b.n 802b132 /* 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 ) ); 802b134: 4c12 ldr r4, [pc, #72] ; (802b180 ) 802b136: 6821 ldr r1, [r4, #0] 802b138: 3118 adds r1, #24 802b13a: f7ff f900 bl 802a33e /* 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 ) 802b13e: 6820 ldr r0, [r4, #0] 802b140: 3004 adds r0, #4 802b142: f7ff f914 bl 802a36e 802b146: b948 cbnz r0, 802b15c { /* 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 ); 802b148: 4b0e ldr r3, [pc, #56] ; (802b184 ) 802b14a: 6819 ldr r1, [r3, #0] 802b14c: 6822 ldr r2, [r4, #0] 802b14e: 6ad2 ldr r2, [r2, #44] ; 0x2c 802b150: 2001 movs r0, #1 802b152: fa00 f202 lsl.w r2, r0, r2 802b156: ea21 0202 bic.w r2, r1, r2 802b15a: 601a str r2, [r3, #0] mtCOVERAGE_TEST_MARKER(); } #if ( INCLUDE_vTaskSuspend == 1 ) { if( xTicksToWait == portMAX_DELAY ) 802b15c: 1c69 adds r1, r5, #1 802b15e: d107 bne.n 802b170 { /* 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 ) ); 802b160: 4b07 ldr r3, [pc, #28] ; (802b180 ) 802b162: 4809 ldr r0, [pc, #36] ; (802b188 ) 802b164: 6819 ldr r1, [r3, #0] 802b166: 3104 adds r1, #4 will handle it. */ xTimeToWake = xTickCount + xTicksToWait; prvAddCurrentTaskToDelayedList( xTimeToWake ); } #endif /* INCLUDE_vTaskSuspend */ } 802b168: 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 ) ); 802b16c: f7ff b8db b.w 802a326 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; 802b170: 4b06 ldr r3, [pc, #24] ; (802b18c ) 802b172: 6818 ldr r0, [r3, #0] prvAddCurrentTaskToDelayedList( xTimeToWake ); 802b174: 1828 adds r0, r5, r0 will handle it. */ xTimeToWake = xTickCount + xTicksToWait; prvAddCurrentTaskToDelayedList( xTimeToWake ); } #endif /* INCLUDE_vTaskSuspend */ } 802b176: 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 ); 802b17a: f7ff bc65 b.w 802aa48 802b17e: bf00 nop 802b180: 20000c80 .word 0x20000c80 802b184: 20000cc0 .word 0x20000cc0 802b188: 20000cac .word 0x20000cac 802b18c: 20000c9c .word 0x20000c9c 0802b190 : /*-----------------------------------------------------------*/ #if configUSE_TIMERS == 1 void vTaskPlaceOnEventListRestricted( List_t * const pxEventList, const TickType_t xTicksToWait ) { 802b190: b538 push {r3, r4, r5, lr} 802b192: 460d mov r5, r1 TickType_t xTimeToWake; configASSERT( pxEventList ); 802b194: b910 cbnz r0, 802b19c 802b196: f000 fb27 bl 802b7e8 802b19a: e7fe b.n 802b19a /* 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 ) ); 802b19c: 4c0d ldr r4, [pc, #52] ; (802b1d4 ) 802b19e: 6821 ldr r1, [r4, #0] 802b1a0: 3118 adds r1, #24 802b1a2: f7ff f8c0 bl 802a326 /* 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 ) 802b1a6: 6820 ldr r0, [r4, #0] 802b1a8: 3004 adds r0, #4 802b1aa: f7ff f8e0 bl 802a36e 802b1ae: b948 cbnz r0, 802b1c4 { /* 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 ); 802b1b0: 4b09 ldr r3, [pc, #36] ; (802b1d8 ) 802b1b2: 6819 ldr r1, [r3, #0] 802b1b4: 6822 ldr r2, [r4, #0] 802b1b6: 6ad2 ldr r2, [r2, #44] ; 0x2c 802b1b8: 2001 movs r0, #1 802b1ba: fa00 f202 lsl.w r2, r0, r2 802b1be: ea21 0202 bic.w r2, r1, r2 802b1c2: 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; 802b1c4: 4b05 ldr r3, [pc, #20] ; (802b1dc ) 802b1c6: 6818 ldr r0, [r3, #0] traceTASK_DELAY_UNTIL(); prvAddCurrentTaskToDelayedList( xTimeToWake ); 802b1c8: 1828 adds r0, r5, r0 } 802b1ca: 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 ); 802b1ce: f7ff bc3b b.w 802aa48 802b1d2: bf00 nop 802b1d4: 20000c80 .word 0x20000c80 802b1d8: 20000cc0 .word 0x20000cc0 802b1dc: 20000c9c .word 0x20000c9c 0802b1e0 : #endif /* configUSE_TIMERS */ /*-----------------------------------------------------------*/ BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList ) { 802b1e0: 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 ); 802b1e2: 68c3 ldr r3, [r0, #12] 802b1e4: 68dc ldr r4, [r3, #12] configASSERT( pxUnblockedTCB ); 802b1e6: b914 cbnz r4, 802b1ee 802b1e8: f000 fafe bl 802b7e8 802b1ec: e7fe b.n 802b1ec ( void ) uxListRemove( &( pxUnblockedTCB->xEventListItem ) ); 802b1ee: f104 0518 add.w r5, r4, #24 802b1f2: 4628 mov r0, r5 802b1f4: f7ff f8bb bl 802a36e if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 802b1f8: 4b11 ldr r3, [pc, #68] ; (802b240 ) 802b1fa: 681b ldr r3, [r3, #0] 802b1fc: b983 cbnz r3, 802b220 { ( void ) uxListRemove( &( pxUnblockedTCB->xGenericListItem ) ); 802b1fe: 1d25 adds r5, r4, #4 802b200: 4628 mov r0, r5 802b202: f7ff f8b4 bl 802a36e prvAddTaskToReadyList( pxUnblockedTCB ); 802b206: 4a0f ldr r2, [pc, #60] ; (802b244 ) 802b208: 6ae3 ldr r3, [r4, #44] ; 0x2c 802b20a: 6810 ldr r0, [r2, #0] 802b20c: 2101 movs r1, #1 802b20e: fa01 f103 lsl.w r1, r1, r3 802b212: 4301 orrs r1, r0 802b214: 6011 str r1, [r2, #0] 802b216: 4a0c ldr r2, [pc, #48] ; (802b248 ) 802b218: 2014 movs r0, #20 802b21a: fb00 2003 mla r0, r0, r3, r2 802b21e: e000 b.n 802b222 } else { /* The delayed and ready lists cannot be accessed, so hold this task pending until the scheduler is resumed. */ vListInsertEnd( &( xPendingReadyList ), &( pxUnblockedTCB->xEventListItem ) ); 802b220: 480a ldr r0, [pc, #40] ; (802b24c ) 802b222: 4629 mov r1, r5 802b224: f7ff f87f bl 802a326 } if( pxUnblockedTCB->uxPriority > pxCurrentTCB->uxPriority ) 802b228: 4b09 ldr r3, [pc, #36] ; (802b250 ) 802b22a: 6ae2 ldr r2, [r4, #44] ; 0x2c 802b22c: 681b ldr r3, [r3, #0] 802b22e: 6adb ldr r3, [r3, #44] ; 0x2c 802b230: 429a cmp r2, r3 802b232: d903 bls.n 802b23c 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; 802b234: 4b07 ldr r3, [pc, #28] ; (802b254 ) 802b236: 2001 movs r0, #1 802b238: 6018 str r0, [r3, #0] 802b23a: bd38 pop {r3, r4, r5, pc} } else { xReturn = pdFALSE; 802b23c: 2000 movs r0, #0 prvResetNextTaskUnblockTime(); } #endif return xReturn; } 802b23e: bd38 pop {r3, r4, r5, pc} 802b240: 20000c98 .word 0x20000c98 802b244: 20000cc0 .word 0x20000cc0 802b248: 20000c08 .word 0x20000c08 802b24c: 20000c84 .word 0x20000c84 802b250: 20000c80 .word 0x20000c80 802b254: 20000cc4 .word 0x20000cc4 0802b258 : return xReturn; } /*-----------------------------------------------------------*/ void vTaskSetTimeOutState( TimeOut_t * const pxTimeOut ) { 802b258: b508 push {r3, lr} configASSERT( pxTimeOut ); 802b25a: b910 cbnz r0, 802b262 802b25c: f000 fac4 bl 802b7e8 802b260: e7fe b.n 802b260 pxTimeOut->xOverflowCount = xNumOfOverflows; 802b262: 4b03 ldr r3, [pc, #12] ; (802b270 ) 802b264: 681b ldr r3, [r3, #0] 802b266: 6003 str r3, [r0, #0] pxTimeOut->xTimeOnEntering = xTickCount; 802b268: 4b02 ldr r3, [pc, #8] ; (802b274 ) 802b26a: 681b ldr r3, [r3, #0] 802b26c: 6043 str r3, [r0, #4] 802b26e: bd08 pop {r3, pc} 802b270: 20000bcc .word 0x20000bcc 802b274: 20000c9c .word 0x20000c9c 0802b278 : } /*-----------------------------------------------------------*/ BaseType_t xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait ) { 802b278: b538 push {r3, r4, r5, lr} 802b27a: 460d mov r5, r1 BaseType_t xReturn; configASSERT( pxTimeOut ); 802b27c: 4604 mov r4, r0 802b27e: b910 cbnz r0, 802b286 802b280: f000 fab2 bl 802b7e8 802b284: e7fe b.n 802b284 configASSERT( pxTicksToWait ); 802b286: b911 cbnz r1, 802b28e 802b288: f000 faae bl 802b7e8 802b28c: e7fe b.n 802b28c taskENTER_CRITICAL(); 802b28e: f000 fab3 bl 802b7f8 { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 802b292: 4b0e ldr r3, [pc, #56] ; (802b2cc ) 802b294: 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 ) 802b296: 682b ldr r3, [r5, #0] 802b298: 1c59 adds r1, r3, #1 802b29a: d010 beq.n 802b2be 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. */ 802b29c: 490c ldr r1, [pc, #48] ; (802b2d0 ) 802b29e: 6808 ldr r0, [r1, #0] 802b2a0: 6821 ldr r1, [r4, #0] 802b2a2: 4288 cmp r0, r1 802b2a4: 6861 ldr r1, [r4, #4] 802b2a6: d001 beq.n 802b2ac 802b2a8: 428a cmp r2, r1 802b2aa: d20a bcs.n 802b2c2 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 ) 802b2ac: 1a50 subs r0, r2, r1 802b2ae: 4298 cmp r0, r3 802b2b0: d207 bcs.n 802b2c2 { /* Not a genuine timeout. Adjust parameters for time remaining. */ *pxTicksToWait -= ( xConstTickCount - pxTimeOut->xTimeOnEntering ); 802b2b2: 1a8a subs r2, r1, r2 802b2b4: 18d3 adds r3, r2, r3 802b2b6: 602b str r3, [r5, #0] vTaskSetTimeOutState( pxTimeOut ); 802b2b8: 4620 mov r0, r4 802b2ba: f7ff ffcd bl 802b258 /* 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; 802b2be: 2400 movs r4, #0 802b2c0: e000 b.n 802b2c4 { /* 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; 802b2c2: 2401 movs r4, #1 else { xReturn = pdTRUE; } } taskEXIT_CRITICAL(); 802b2c4: f000 fac4 bl 802b850 return xReturn; } 802b2c8: 4620 mov r0, r4 802b2ca: bd38 pop {r3, r4, r5, pc} 802b2cc: 20000c9c .word 0x20000c9c 802b2d0: 20000bcc .word 0x20000bcc 0802b2d4 : /*-----------------------------------------------------------*/ void vTaskMissedYield( void ) { xYieldPending = pdTRUE; 802b2d4: 4b01 ldr r3, [pc, #4] ; (802b2dc ) 802b2d6: 2201 movs r2, #1 802b2d8: 601a str r2, [r3, #0] 802b2da: 4770 bx lr 802b2dc: 20000cc4 .word 0x20000cc4 0802b2e0 : BaseType_t xTaskGetSchedulerState( void ) { BaseType_t xReturn; if( xSchedulerRunning == pdFALSE ) 802b2e0: 4b05 ldr r3, [pc, #20] ; (802b2f8 ) 802b2e2: 681b ldr r3, [r3, #0] 802b2e4: b133 cbz r3, 802b2f4 { xReturn = taskSCHEDULER_NOT_STARTED; } else { if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 802b2e6: 4b05 ldr r3, [pc, #20] ; (802b2fc ) 802b2e8: 6818 ldr r0, [r3, #0] { xReturn = taskSCHEDULER_RUNNING; 802b2ea: 2800 cmp r0, #0 802b2ec: bf0c ite eq 802b2ee: 2002 moveq r0, #2 802b2f0: 2000 movne r0, #0 802b2f2: 4770 bx lr { BaseType_t xReturn; if( xSchedulerRunning == pdFALSE ) { xReturn = taskSCHEDULER_NOT_STARTED; 802b2f4: 2001 movs r0, #1 xReturn = taskSCHEDULER_SUSPENDED; } } return xReturn; } 802b2f6: 4770 bx lr 802b2f8: 20000bd4 .word 0x20000bd4 802b2fc: 20000c98 .word 0x20000c98 0802b300 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) void vTaskPriorityInherit( TaskHandle_t const pxMutexHolder ) { 802b300: 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 ) 802b302: 4604 mov r4, r0 802b304: 2800 cmp r0, #0 802b306: d040 beq.n 802b38a { if( pxTCB->uxPriority < pxCurrentTCB->uxPriority ) 802b308: 4a20 ldr r2, [pc, #128] ; (802b38c ) 802b30a: 6ac3 ldr r3, [r0, #44] ; 0x2c 802b30c: 6811 ldr r1, [r2, #0] 802b30e: 6ac9 ldr r1, [r1, #44] ; 0x2c 802b310: 428b cmp r3, r1 802b312: d23a bcs.n 802b38a { /* 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 ) 802b314: 6981 ldr r1, [r0, #24] 802b316: 2900 cmp r1, #0 802b318: db04 blt.n 802b324 { 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. */ 802b31a: 6812 ldr r2, [r2, #0] 802b31c: 6ad2 ldr r2, [r2, #44] ; 0x2c 802b31e: f1c2 0205 rsb r2, r2, #5 802b322: 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 ) 802b324: 4e1a ldr r6, [pc, #104] ; (802b390 ) 802b326: 6962 ldr r2, [r4, #20] 802b328: 2714 movs r7, #20 802b32a: fb07 6303 mla r3, r7, r3, r6 802b32e: 429a cmp r2, r3 802b330: d127 bne.n 802b382 802b332: e01f b.n 802b374 { if( uxListRemove( &( pxTCB->xGenericListItem ) ) == ( UBaseType_t ) 0 ) { taskRESET_READY_PRIORITY( pxTCB->uxPriority ); 802b334: 6ae2 ldr r2, [r4, #44] ; 0x2c 802b336: 4357 muls r7, r2 802b338: 59f3 ldr r3, [r6, r7] 802b33a: b93b cbnz r3, 802b34c 802b33c: 4b15 ldr r3, [pc, #84] ; (802b394 ) 802b33e: 2001 movs r0, #1 802b340: 6819 ldr r1, [r3, #0] 802b342: fa00 f202 lsl.w r2, r0, r2 802b346: ea21 0202 bic.w r2, r1, r2 802b34a: 601a str r2, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802b34c: 4b0f ldr r3, [pc, #60] ; (802b38c ) prvAddTaskToReadyList( pxTCB ); 802b34e: 4a11 ldr r2, [pc, #68] ; (802b394 ) { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802b350: 681b ldr r3, [r3, #0] prvAddTaskToReadyList( pxTCB ); 802b352: 6810 ldr r0, [r2, #0] { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802b354: 6adb ldr r3, [r3, #44] ; 0x2c prvAddTaskToReadyList( pxTCB ); 802b356: 2101 movs r1, #1 802b358: fa01 f103 lsl.w r1, r1, r3 802b35c: 4301 orrs r1, r0 802b35e: 6011 str r1, [r2, #0] 802b360: 4a0b ldr r2, [pc, #44] ; (802b390 ) { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802b362: 62e3 str r3, [r4, #44] ; 0x2c prvAddTaskToReadyList( pxTCB ); 802b364: 2014 movs r0, #20 802b366: fb00 2003 mla r0, r0, r3, r2 802b36a: 4629 mov r1, r5 } else { mtCOVERAGE_TEST_MARKER(); } } 802b36c: 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 ); 802b370: f7fe bfd9 b.w 802a326 /* 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 ) 802b374: 1d25 adds r5, r4, #4 802b376: 4628 mov r0, r5 802b378: f7fe fff9 bl 802a36e 802b37c: 2800 cmp r0, #0 802b37e: d0d9 beq.n 802b334 802b380: e7e4 b.n 802b34c prvAddTaskToReadyList( pxTCB ); } else { /* Just inherit the priority. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802b382: 4b02 ldr r3, [pc, #8] ; (802b38c ) 802b384: 681b ldr r3, [r3, #0] 802b386: 6adb ldr r3, [r3, #44] ; 0x2c 802b388: 62e3 str r3, [r4, #44] ; 0x2c 802b38a: bdf8 pop {r3, r4, r5, r6, r7, pc} 802b38c: 20000c80 .word 0x20000c80 802b390: 20000c08 .word 0x20000c08 802b394: 20000cc0 .word 0x20000cc0 0802b398 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) { 802b398: b538 push {r3, r4, r5, lr} TCB_t * const pxTCB = ( TCB_t * ) pxMutexHolder; BaseType_t xReturn = pdFALSE; if( pxMutexHolder != NULL ) 802b39a: 4604 mov r4, r0 802b39c: b908 cbnz r0, 802b3a2 #if ( configUSE_MUTEXES == 1 ) BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) { TCB_t * const pxTCB = ( TCB_t * ) pxMutexHolder; BaseType_t xReturn = pdFALSE; 802b39e: 2000 movs r0, #0 802b3a0: bd38 pop {r3, r4, r5, pc} if( pxMutexHolder != NULL ) { configASSERT( pxTCB->uxMutexesHeld ); 802b3a2: 6d03 ldr r3, [r0, #80] ; 0x50 802b3a4: b913 cbnz r3, 802b3ac 802b3a6: f000 fa1f bl 802b7e8 802b3aa: e7fe b.n 802b3aa ( pxTCB->uxMutexesHeld )--; if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 802b3ac: 6ac1 ldr r1, [r0, #44] ; 0x2c 802b3ae: 6cc2 ldr r2, [r0, #76] ; 0x4c BaseType_t xReturn = pdFALSE; if( pxMutexHolder != NULL ) { configASSERT( pxTCB->uxMutexesHeld ); ( pxTCB->uxMutexesHeld )--; 802b3b0: 3b01 subs r3, #1 if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 802b3b2: 4291 cmp r1, r2 BaseType_t xReturn = pdFALSE; if( pxMutexHolder != NULL ) { configASSERT( pxTCB->uxMutexesHeld ); ( pxTCB->uxMutexesHeld )--; 802b3b4: 6503 str r3, [r0, #80] ; 0x50 if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 802b3b6: d0f2 beq.n 802b39e { /* Only disinherit if no other mutexes are held. */ if( pxTCB->uxMutexesHeld == ( UBaseType_t ) 0 ) 802b3b8: 2b00 cmp r3, #0 802b3ba: d1f0 bne.n 802b39e /* 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 ) 802b3bc: 1d05 adds r5, r0, #4 802b3be: 4628 mov r0, r5 802b3c0: f7fe ffd5 bl 802a36e 802b3c4: b968 cbnz r0, 802b3e2 { taskRESET_READY_PRIORITY( pxTCB->uxPriority ); 802b3c6: 6ae2 ldr r2, [r4, #44] ; 0x2c 802b3c8: 4910 ldr r1, [pc, #64] ; (802b40c ) 802b3ca: 2314 movs r3, #20 802b3cc: 4353 muls r3, r2 802b3ce: 58cb ldr r3, [r1, r3] 802b3d0: b93b cbnz r3, 802b3e2 802b3d2: 4b0f ldr r3, [pc, #60] ; (802b410 ) 802b3d4: 2001 movs r0, #1 802b3d6: 6819 ldr r1, [r3, #0] 802b3d8: fa00 f202 lsl.w r2, r0, r2 802b3dc: ea21 0202 bic.w r2, r1, r2 802b3e0: 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; 802b3e2: 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. */ 802b3e4: f1c3 0205 rsb r2, r3, #5 802b3e8: 61a2 str r2, [r4, #24] prvAddTaskToReadyList( pxTCB ); 802b3ea: 4a09 ldr r2, [pc, #36] ; (802b410 ) } /* Disinherit the priority before adding the task into the new ready list. */ traceTASK_PRIORITY_DISINHERIT( pxTCB, pxTCB->uxBasePriority ); pxTCB->uxPriority = pxTCB->uxBasePriority; 802b3ec: 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 ); 802b3ee: 6811 ldr r1, [r2, #0] 802b3f0: 2401 movs r4, #1 802b3f2: fa04 f003 lsl.w r0, r4, r3 802b3f6: 4301 orrs r1, r0 802b3f8: 6011 str r1, [r2, #0] 802b3fa: 4a04 ldr r2, [pc, #16] ; (802b40c ) 802b3fc: 2014 movs r0, #20 802b3fe: fb00 2003 mla r0, r0, r3, r2 802b402: 4629 mov r1, r5 802b404: f7fe ff8f bl 802a326 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; 802b408: 4620 mov r0, r4 { mtCOVERAGE_TEST_MARKER(); } return xReturn; } 802b40a: bd38 pop {r3, r4, r5, pc} 802b40c: 20000c08 .word 0x20000c08 802b410: 20000cc0 .word 0x20000cc0 0802b414 : void *pvTaskIncrementMutexHeldCount( void ) { /* If xSemaphoreCreateMutex() is called before any tasks have been created then pxCurrentTCB will be NULL. */ if( pxCurrentTCB != NULL ) 802b414: 4b04 ldr r3, [pc, #16] ; (802b428 ) 802b416: 681a ldr r2, [r3, #0] 802b418: b11a cbz r2, 802b422 { ( pxCurrentTCB->uxMutexesHeld )++; 802b41a: 681a ldr r2, [r3, #0] 802b41c: 6d11 ldr r1, [r2, #80] ; 0x50 802b41e: 3101 adds r1, #1 802b420: 6511 str r1, [r2, #80] ; 0x50 } return pxCurrentTCB; 802b422: 6818 ldr r0, [r3, #0] } 802b424: 4770 bx lr 802b426: bf00 nop 802b428: 20000c80 .word 0x20000c80 0802b42c : pxOverflowTimerList = pxTemp; } /*-----------------------------------------------------------*/ static void prvCheckForValidListAndQueue( void ) { 802b42c: 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 ) 802b42e: 4c0f ldr r4, [pc, #60] ; (802b46c ) 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(); 802b430: f000 f9e2 bl 802b7f8 { if( xTimerQueue == NULL ) 802b434: 6825 ldr r5, [r4, #0] 802b436: b9ad cbnz r5, 802b464 { vListInitialise( &xActiveTimerList1 ); 802b438: 4f0d ldr r7, [pc, #52] ; (802b470 ) vListInitialise( &xActiveTimerList2 ); 802b43a: 4e0e ldr r6, [pc, #56] ; (802b474 ) initialised. */ taskENTER_CRITICAL(); { if( xTimerQueue == NULL ) { vListInitialise( &xActiveTimerList1 ); 802b43c: 4638 mov r0, r7 802b43e: f7fe ff64 bl 802a30a vListInitialise( &xActiveTimerList2 ); 802b442: 4630 mov r0, r6 802b444: f7fe ff61 bl 802a30a pxCurrentTimerList = &xActiveTimerList1; 802b448: 4b0b ldr r3, [pc, #44] ; (802b478 ) 802b44a: 601f str r7, [r3, #0] pxOverflowTimerList = &xActiveTimerList2; 802b44c: 4b0b ldr r3, [pc, #44] ; (802b47c ) xTimerQueue = xQueueCreate( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, sizeof( DaemonTaskMessage_t ) ); 802b44e: 200a movs r0, #10 802b450: 210c movs r1, #12 802b452: 462a mov r2, r5 if( xTimerQueue == NULL ) { vListInitialise( &xActiveTimerList1 ); vListInitialise( &xActiveTimerList2 ); pxCurrentTimerList = &xActiveTimerList1; pxOverflowTimerList = &xActiveTimerList2; 802b454: 601e str r6, [r3, #0] xTimerQueue = xQueueCreate( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, sizeof( DaemonTaskMessage_t ) ); 802b456: f7ff f849 bl 802a4ec 802b45a: 6020 str r0, [r4, #0] configASSERT( xTimerQueue ); 802b45c: b910 cbnz r0, 802b464 802b45e: f000 f9c3 bl 802b7e8 802b462: e7fe b.n 802b462 { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); } 802b464: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr} else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 802b468: f000 b9f2 b.w 802b850 802b46c: 20000cf8 .word 0x20000cf8 802b470: 20000ccc .word 0x20000ccc 802b474: 20000ce0 .word 0x20000ce0 802b478: 20000cc8 .word 0x20000cc8 802b47c: 20000cfc .word 0x20000cfc 0802b480 : return xTimeNow; } /*-----------------------------------------------------------*/ static BaseType_t prvInsertTimerInActiveList( Timer_t * const pxTimer, const TickType_t xNextExpiryTime, const TickType_t xTimeNow, const TickType_t xCommandTime ) { 802b480: b510 push {r4, lr} 802b482: 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 ) 802b484: 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 ); 802b486: 6041 str r1, [r0, #4] listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); 802b488: 6120 str r0, [r4, #16] if( xNextExpiryTime <= xTimeNow ) 802b48a: d805 bhi.n 802b498 { /* 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 ) 802b48c: 6981 ldr r1, [r0, #24] 802b48e: 1ad2 subs r2, r2, r3 802b490: 428a cmp r2, r1 802b492: d20c bcs.n 802b4ae processed actually exceeds the timers period. */ xProcessTimerNow = pdTRUE; } else { vListInsert( pxOverflowTimerList, &( pxTimer->xTimerListItem ) ); 802b494: 4b07 ldr r3, [pc, #28] ; (802b4b4 ) 802b496: e004 b.n 802b4a2 } } else { if( ( xTimeNow < xCommandTime ) && ( xNextExpiryTime >= xCommandTime ) ) 802b498: 429a cmp r2, r3 802b49a: d201 bcs.n 802b4a0 802b49c: 4299 cmp r1, r3 802b49e: d206 bcs.n 802b4ae its expiry time and should be processed immediately. */ xProcessTimerNow = pdTRUE; } else { vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); 802b4a0: 4b05 ldr r3, [pc, #20] ; (802b4b8 ) 802b4a2: 6818 ldr r0, [r3, #0] 802b4a4: 1d21 adds r1, r4, #4 802b4a6: f7fe ff4a bl 802a33e } /*-----------------------------------------------------------*/ static BaseType_t prvInsertTimerInActiveList( Timer_t * const pxTimer, const TickType_t xNextExpiryTime, const TickType_t xTimeNow, const TickType_t xCommandTime ) { BaseType_t xProcessTimerNow = pdFALSE; 802b4aa: 2000 movs r0, #0 802b4ac: 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; 802b4ae: 2001 movs r0, #1 vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); } } return xProcessTimerNow; } 802b4b0: bd10 pop {r4, pc} 802b4b2: bf00 nop 802b4b4: 20000cfc .word 0x20000cfc 802b4b8: 20000cc8 .word 0x20000cc8 0802b4bc : static void prvProcessTimerOrBlockTask( const TickType_t xNextExpireTime, const BaseType_t xListWasEmpty ) PRIVILEGED_FUNCTION; /*-----------------------------------------------------------*/ BaseType_t xTimerCreateTimerTask( void ) { 802b4bc: 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(); 802b4be: f7ff ffb5 bl 802b42c if( xTimerQueue != NULL ) 802b4c2: 4b0b ldr r3, [pc, #44] ; (802b4f0 ) 802b4c4: 681b ldr r3, [r3, #0] 802b4c6: b913 cbnz r3, 802b4ce else { mtCOVERAGE_TEST_MARKER(); } configASSERT( xReturn ); 802b4c8: f000 f98e bl 802b7e8 802b4cc: e00d b.n 802b4ea 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); 802b4ce: 2302 movs r3, #2 802b4d0: 9300 str r3, [sp, #0] 802b4d2: 2300 movs r3, #0 802b4d4: 9301 str r3, [sp, #4] 802b4d6: 9302 str r3, [sp, #8] 802b4d8: 9303 str r3, [sp, #12] 802b4da: 4806 ldr r0, [pc, #24] ; (802b4f4 ) 802b4dc: 4906 ldr r1, [pc, #24] ; (802b4f8 ) 802b4de: f44f 7280 mov.w r2, #256 ; 0x100 802b4e2: f7ff fad9 bl 802aa98 else { mtCOVERAGE_TEST_MARKER(); } configASSERT( xReturn ); 802b4e6: b908 cbnz r0, 802b4ec 802b4e8: e7ee b.n 802b4c8 802b4ea: e7fe b.n 802b4ea return xReturn; } 802b4ec: b005 add sp, #20 802b4ee: bd00 pop {pc} 802b4f0: 20000cf8 .word 0x20000cf8 802b4f4: 0802b5f5 .word 0x0802b5f5 802b4f8: 08039de6 .word 0x08039de6 0802b4fc : /*-----------------------------------------------------------*/ 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. */ { 802b4fc: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802b500: 4680 mov r8, r0 802b502: 4617 mov r7, r2 802b504: 461e mov r6, r3 Timer_t *pxNewTimer; /* Allocate the timer structure. */ if( xTimerPeriodInTicks == ( TickType_t ) 0U ) 802b506: 460d mov r5, r1 802b508: b191 cbz r1, 802b530 { pxNewTimer = NULL; } else { pxNewTimer = ( Timer_t * ) pvPortMalloc( sizeof( Timer_t ) ); 802b50a: 202c movs r0, #44 ; 0x2c 802b50c: f000 fa82 bl 802ba14 if( pxNewTimer != NULL ) 802b510: 4604 mov r4, r0 802b512: b180 cbz r0, 802b536 { /* Ensure the infrastructure used by the timer service task has been created/initialised. */ prvCheckForValidListAndQueue(); 802b514: f7ff ff8a bl 802b42c /* Initialise the timer structure members using the function parameters. */ pxNewTimer->pcTimerName = pcTimerName; pxNewTimer->xTimerPeriodInTicks = xTimerPeriodInTicks; pxNewTimer->uxAutoReload = uxAutoReload; pxNewTimer->pvTimerID = pvTimerID; pxNewTimer->pxCallbackFunction = pxCallbackFunction; 802b518: 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; 802b51a: f8c4 8000 str.w r8, [r4] pxNewTimer->xTimerPeriodInTicks = xTimerPeriodInTicks; 802b51e: 61a5 str r5, [r4, #24] pxNewTimer->uxAutoReload = uxAutoReload; 802b520: 61e7 str r7, [r4, #28] pxNewTimer->pvTimerID = pvTimerID; 802b522: 6226 str r6, [r4, #32] pxNewTimer->pxCallbackFunction = pxCallbackFunction; 802b524: 6263 str r3, [r4, #36] ; 0x24 vListInitialiseItem( &( pxNewTimer->xTimerListItem ) ); 802b526: 1d20 adds r0, r4, #4 802b528: f7fe fefa bl 802a320 802b52c: e003 b.n 802b536 802b52e: e7fe b.n 802b52e traceTIMER_CREATE_FAILED(); } } /* 0 is not a valid value for xTimerPeriodInTicks. */ configASSERT( ( xTimerPeriodInTicks > 0 ) ); 802b530: f000 f95a bl 802b7e8 802b534: e7fb b.n 802b52e return ( TimerHandle_t ) pxNewTimer; } 802b536: 4620 mov r0, r4 802b538: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 0802b53c : /*-----------------------------------------------------------*/ BaseType_t xTimerGenericCommand( TimerHandle_t xTimer, const BaseType_t xCommandID, const TickType_t xOptionalValue, BaseType_t * const pxHigherPriorityTaskWoken, const TickType_t xTicksToWait ) { 802b53c: 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 ) 802b53e: 4c0f ldr r4, [pc, #60] ; (802b57c ) 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 ) { 802b540: 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 ) 802b542: 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 ) { 802b544: 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 ) 802b546: b1b8 cbz r0, 802b578 /* 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 ) 802b548: 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; 802b54a: 9101 str r1, [sp, #4] xMessage.u.xTimerParameters.xMessageValue = xOptionalValue; 802b54c: 9202 str r2, [sp, #8] xMessage.u.xTimerParameters.pxTimer = ( Timer_t * ) xTimer; 802b54e: 9503 str r5, [sp, #12] if( xCommandID < tmrFIRST_FROM_ISR_COMMAND ) 802b550: dc0d bgt.n 802b56e { if( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING ) 802b552: f7ff fec5 bl 802b2e0 802b556: 2802 cmp r0, #2 { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, xTicksToWait ); 802b558: a901 add r1, sp, #4 802b55a: 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 ) 802b55c: d102 bne.n 802b564 { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, xTicksToWait ); 802b55e: 9a08 ldr r2, [sp, #32] 802b560: 2300 movs r3, #0 802b562: e001 b.n 802b568 } else { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, tmrNO_DELAY ); 802b564: 2200 movs r2, #0 802b566: 4613 mov r3, r2 802b568: f7fe fffd bl 802a566 802b56c: e004 b.n 802b578 } } else { xReturn = xQueueSendToBackFromISR( xTimerQueue, &xMessage, pxHigherPriorityTaskWoken ); 802b56e: 461a mov r2, r3 802b570: a901 add r1, sp, #4 802b572: 2300 movs r3, #0 802b574: f7ff f8bb bl 802a6ee { mtCOVERAGE_TEST_MARKER(); } return xReturn; } 802b578: b005 add sp, #20 802b57a: bd30 pop {r4, r5, pc} 802b57c: 20000cf8 .word 0x20000cf8 0802b580 : } } /*-----------------------------------------------------------*/ static void prvSwitchTimerLists( void ) { 802b580: 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 ) 802b584: 4e19 ldr r6, [pc, #100] ; (802b5ec ) listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); } else { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY ); 802b586: f04f 0800 mov.w r8, #0 802b58a: e023 b.n 802b5d4 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 ); 802b58c: 68db ldr r3, [r3, #12] /* Remove the timer from the list. */ pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); 802b58e: 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 ); 802b590: 681d ldr r5, [r3, #0] /* Remove the timer from the list. */ pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); 802b592: 1d27 adds r7, r4, #4 802b594: 4638 mov r0, r7 802b596: f7fe feea bl 802a36e 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 ); 802b59a: 6a63 ldr r3, [r4, #36] ; 0x24 802b59c: 4620 mov r0, r4 802b59e: 4798 blx r3 if( pxTimer->uxAutoReload == ( UBaseType_t ) pdTRUE ) 802b5a0: 69e3 ldr r3, [r4, #28] 802b5a2: 2b01 cmp r3, #1 802b5a4: d116 bne.n 802b5d4 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 ); 802b5a6: 69a3 ldr r3, [r4, #24] 802b5a8: 18eb adds r3, r5, r3 if( xReloadTime > xNextExpireTime ) 802b5aa: 42ab cmp r3, r5 802b5ac: d906 bls.n 802b5bc { listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xReloadTime ); 802b5ae: 6063 str r3, [r4, #4] listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); 802b5b0: 6124 str r4, [r4, #16] vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); 802b5b2: 6830 ldr r0, [r6, #0] 802b5b4: 4639 mov r1, r7 802b5b6: f7fe fec2 bl 802a33e 802b5ba: e00b b.n 802b5d4 } else { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY ); 802b5bc: 2100 movs r1, #0 802b5be: f8cd 8000 str.w r8, [sp] 802b5c2: 4620 mov r0, r4 802b5c4: 462a mov r2, r5 802b5c6: 460b mov r3, r1 802b5c8: f7ff ffb8 bl 802b53c configASSERT( xResult ); 802b5cc: b910 cbnz r0, 802b5d4 802b5ce: f000 f90b bl 802b7e8 802b5d2: e7fe b.n 802b5d2 /* 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 ) 802b5d4: 6833 ldr r3, [r6, #0] 802b5d6: 681a ldr r2, [r3, #0] 802b5d8: 2a00 cmp r2, #0 802b5da: d1d7 bne.n 802b58c mtCOVERAGE_TEST_MARKER(); } } pxTemp = pxCurrentTimerList; pxCurrentTimerList = pxOverflowTimerList; 802b5dc: 4a04 ldr r2, [pc, #16] ; (802b5f0 ) 802b5de: 4803 ldr r0, [pc, #12] ; (802b5ec ) 802b5e0: 6811 ldr r1, [r2, #0] pxOverflowTimerList = pxTemp; 802b5e2: 6013 str r3, [r2, #0] mtCOVERAGE_TEST_MARKER(); } } pxTemp = pxCurrentTimerList; pxCurrentTimerList = pxOverflowTimerList; 802b5e4: 6001 str r1, [r0, #0] pxOverflowTimerList = pxTemp; } 802b5e6: e8bd 81fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, pc} 802b5ea: bf00 nop 802b5ec: 20000cc8 .word 0x20000cc8 802b5f0: 20000cfc .word 0x20000cfc 0802b5f4 : pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); } /*-----------------------------------------------------------*/ static void prvTimerTask( void *pvParameters ) { 802b5f4: 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 ) 802b5f8: f8df 816c ldr.w r8, [pc, #364] ; 802b768 pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); } /*-----------------------------------------------------------*/ static void prvTimerTask( void *pvParameters ) { 802b5fc: b087 sub sp, #28 802b5fe: 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 ); 802b600: 4b57 ldr r3, [pc, #348] ; (802b760 ) 802b602: 681b ldr r3, [r3, #0] 802b604: 681f ldr r7, [r3, #0] 802b606: f1d7 0701 rsbs r7, r7, #1 802b60a: bf38 it cc 802b60c: 2700 movcc r7, #0 if( *pxListWasEmpty == pdFALSE ) 802b60e: b917 cbnz r7, 802b616 { xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList ); 802b610: 68db ldr r3, [r3, #12] 802b612: 681d ldr r5, [r3, #0] 802b614: e000 b.n 802b618 } else { /* Ensure the task unblocks when the tick count rolls over. */ xNextExpireTime = ( TickType_t ) 0U; 802b616: 2500 movs r5, #0 static void prvProcessTimerOrBlockTask( const TickType_t xNextExpireTime, const BaseType_t xListWasEmpty ) { TickType_t xTimeNow; BaseType_t xTimerListsWereSwitched; vTaskSuspendAll(); 802b618: f7ff fb9e bl 802ad58 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(); 802b61c: f7ff fba4 bl 802ad68 if( xTimeNow < xLastTime ) 802b620: f8d8 3000 ldr.w r3, [r8] 802b624: 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(); 802b626: 4606 mov r6, r0 if( xTimeNow < xLastTime ) 802b628: d203 bcs.n 802b632 { prvSwitchTimerLists(); 802b62a: f7ff ffa9 bl 802b580 *pxTimerListsWereSwitched = pdTRUE; 802b62e: 2301 movs r3, #1 802b630: e000 b.n 802b634 } else { *pxTimerListsWereSwitched = pdFALSE; 802b632: 2300 movs r3, #0 } xLastTime = xTimeNow; 802b634: 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 ) 802b638: 2b00 cmp r3, #0 802b63a: d132 bne.n 802b6a2 { /* The tick count has not overflowed, has the timer expired? */ if( ( xListWasEmpty == pdFALSE ) && ( xNextExpireTime <= xTimeNow ) ) 802b63c: bb2f cbnz r7, 802b68a 802b63e: 42b5 cmp r5, r6 802b640: d823 bhi.n 802b68a { ( void ) xTaskResumeAll(); 802b642: f7ff fc25 bl 802ae90 /*-----------------------------------------------------------*/ 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 ); 802b646: 4b46 ldr r3, [pc, #280] ; (802b760 ) 802b648: 681b ldr r3, [r3, #0] 802b64a: 68db ldr r3, [r3, #12] 802b64c: 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 ) ); 802b64e: 1d20 adds r0, r4, #4 802b650: f7fe fe8d bl 802a36e 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 ) 802b654: 69e3 ldr r3, [r4, #28] 802b656: 2b01 cmp r3, #1 802b658: d113 bne.n 802b682 { /* 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 ) 802b65a: 69a1 ldr r1, [r4, #24] 802b65c: 4620 mov r0, r4 802b65e: 1869 adds r1, r5, r1 802b660: 4632 mov r2, r6 802b662: 462b mov r3, r5 802b664: f7ff ff0c bl 802b480 802b668: 2801 cmp r0, #1 802b66a: d10a bne.n 802b682 { /* 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 ); 802b66c: 9700 str r7, [sp, #0] 802b66e: 4620 mov r0, r4 802b670: 4639 mov r1, r7 802b672: 462a mov r2, r5 802b674: 463b mov r3, r7 802b676: f7ff ff61 bl 802b53c configASSERT( xResult ); 802b67a: b910 cbnz r0, 802b682 802b67c: f000 f8b4 bl 802b7e8 802b680: e7fe b.n 802b680 { mtCOVERAGE_TEST_MARKER(); } /* Call the timer callback. */ pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); 802b682: 6a63 ldr r3, [r4, #36] ; 0x24 802b684: 4620 mov r0, r4 802b686: 4798 blx r3 802b688: e05f b.n 802b74a 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 ) ); 802b68a: 4b36 ldr r3, [pc, #216] ; (802b764 ) 802b68c: 1ba9 subs r1, r5, r6 802b68e: 6818 ldr r0, [r3, #0] 802b690: f7ff f9aa bl 802a9e8 if( xTaskResumeAll() == pdFALSE ) 802b694: f7ff fbfc bl 802ae90 802b698: 2800 cmp r0, #0 802b69a: d156 bne.n 802b74a { /* 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(); 802b69c: f000 f898 bl 802b7d0 802b6a0: e053 b.n 802b74a } } } else { ( void ) xTaskResumeAll(); 802b6a2: f7ff fbf5 bl 802ae90 802b6a6: e050 b.n 802b74a } #endif /* INCLUDE_xTimerPendFunctionCall */ /* Commands that are positive are timer commands rather than pended function calls. */ if( xMessage.xMessageID >= ( BaseType_t ) 0 ) 802b6a8: 9b03 ldr r3, [sp, #12] 802b6aa: 2b00 cmp r3, #0 802b6ac: db4e blt.n 802b74c { /* The messages uses the xTimerParameters member to work on a software timer. */ pxTimer = xMessage.u.xTimerParameters.pxTimer; 802b6ae: 9c05 ldr r4, [sp, #20] if( listIS_CONTAINED_WITHIN( NULL, &( pxTimer->xTimerListItem ) ) == pdFALSE ) 802b6b0: 6963 ldr r3, [r4, #20] 802b6b2: b113 cbz r3, 802b6ba { /* The timer is in a list, remove it. */ ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); 802b6b4: 1d20 adds r0, r4, #4 802b6b6: f7fe fe5a bl 802a36e 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(); 802b6ba: f7ff fb55 bl 802ad68 if( xTimeNow < xLastTime ) 802b6be: f8d8 3000 ldr.w r3, [r8] 802b6c2: 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(); 802b6c4: 4605 mov r5, r0 if( xTimeNow < xLastTime ) 802b6c6: d201 bcs.n 802b6cc { prvSwitchTimerLists(); 802b6c8: f7ff ff5a bl 802b580 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 ) 802b6cc: 9b03 ldr r3, [sp, #12] else { *pxTimerListsWereSwitched = pdFALSE; } xLastTime = xTimeNow; 802b6ce: 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 ) 802b6d2: 2b09 cmp r3, #9 802b6d4: d83a bhi.n 802b74c 802b6d6: f04f 6204 mov.w r2, #138412032 ; 0x8400000 802b6da: 409a lsls r2, r3 802b6dc: d424 bmi.n 802b728 802b6de: f04f 4263 mov.w r2, #3808428032 ; 0xe3000000 802b6e2: 409a lsls r2, r3 802b6e4: d404 bmi.n 802b6f0 802b6e6: f04f 6280 mov.w r2, #67108864 ; 0x4000000 802b6ea: 409a lsls r2, r3 802b6ec: d429 bmi.n 802b742 802b6ee: e02d b.n 802b74c 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 ) 802b6f0: 9b04 ldr r3, [sp, #16] 802b6f2: 69a1 ldr r1, [r4, #24] 802b6f4: 4620 mov r0, r4 802b6f6: 1859 adds r1, r3, r1 802b6f8: 462a mov r2, r5 802b6fa: f7ff fec1 bl 802b480 802b6fe: 2801 cmp r0, #1 802b700: d124 bne.n 802b74c { /* The timer expired before it was added to the active timer list. Process it now. */ pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); 802b702: 6a63 ldr r3, [r4, #36] ; 0x24 802b704: 4620 mov r0, r4 802b706: 4798 blx r3 traceTIMER_EXPIRED( pxTimer ); if( pxTimer->uxAutoReload == ( UBaseType_t ) pdTRUE ) 802b708: 69e3 ldr r3, [r4, #28] 802b70a: 2b01 cmp r3, #1 802b70c: d11e bne.n 802b74c { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, NULL, tmrNO_DELAY ); 802b70e: 69a2 ldr r2, [r4, #24] 802b710: 9b04 ldr r3, [sp, #16] 802b712: 2100 movs r1, #0 802b714: 18d2 adds r2, r2, r3 802b716: 9100 str r1, [sp, #0] 802b718: 4620 mov r0, r4 802b71a: 460b mov r3, r1 802b71c: f7ff ff0e bl 802b53c configASSERT( xResult ); 802b720: b9a0 cbnz r0, 802b74c 802b722: f000 f861 bl 802b7e8 802b726: e7fe b.n 802b726 There is nothing to do here. */ break; case tmrCOMMAND_CHANGE_PERIOD : case tmrCOMMAND_CHANGE_PERIOD_FROM_ISR : pxTimer->xTimerPeriodInTicks = xMessage.u.xTimerParameters.xMessageValue; 802b728: 9904 ldr r1, [sp, #16] 802b72a: 61a1 str r1, [r4, #24] configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) ); 802b72c: b911 cbnz r1, 802b734 802b72e: f000 f85b bl 802b7e8 802b732: e7fe b.n 802b732 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 ); 802b734: 4620 mov r0, r4 802b736: 1869 adds r1, r5, r1 802b738: 462a mov r2, r5 802b73a: 462b mov r3, r5 802b73c: f7ff fea0 bl 802b480 802b740: e004 b.n 802b74c break; case tmrCOMMAND_DELETE : /* The timer has already been removed from the active list, just free up the memory. */ vPortFree( pxTimer ); 802b742: 4620 mov r0, r4 802b744: f000 f9ec bl 802bb20 802b748: e000 b.n 802b74c 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. */ 802b74a: 4e06 ldr r6, [pc, #24] ; (802b764 ) 802b74c: 2200 movs r2, #0 802b74e: 6830 ldr r0, [r6, #0] 802b750: a903 add r1, sp, #12 802b752: 4613 mov r3, r2 802b754: f7ff f847 bl 802a7e6 802b758: 2800 cmp r0, #0 802b75a: d1a5 bne.n 802b6a8 802b75c: e750 b.n 802b600 802b75e: bf00 nop 802b760: 20000cc8 .word 0x20000cc8 802b764: 20000cf8 .word 0x20000cf8 802b768: 20000cf4 .word 0x20000cf4 0802b76c : void *pvTimerGetTimerID( const TimerHandle_t xTimer ) { Timer_t * const pxTimer = ( Timer_t * ) xTimer; return pxTimer->pvTimerID; } 802b76c: 6a00 ldr r0, [r0, #32] 802b76e: 4770 bx lr 0802b770 : } /*-----------------------------------------------------------*/ static void prvPortStartFirstTask( void ) { __asm volatile( 802b770: 4806 ldr r0, [pc, #24] ; (802b78c ) 802b772: 6800 ldr r0, [r0, #0] 802b774: 6800 ldr r0, [r0, #0] 802b776: f380 8808 msr MSP, r0 802b77a: b662 cpsie i 802b77c: b661 cpsie f 802b77e: f3bf 8f4f dsb sy 802b782: f3bf 8f6f isb sy 802b786: df00 svc 0 802b788: bf00 nop 802b78a: 0000 .short 0x0000 802b78c: e000ed08 .word 0xe000ed08 0802b790 : 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 */ 802b790: f04f 7380 mov.w r3, #16777216 ; 0x1000000 pxTopOfStack--; *pxTopOfStack = ( StackType_t ) pxCode; /* PC */ 802b794: e900 000a stmdb r0, {r1, r3} pxTopOfStack--; *pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */ 802b798: 4b03 ldr r3, [pc, #12] ; (802b7a8 ) pxTopOfStack -= 5; /* R12, R3, R2 and R1. */ *pxTopOfStack = ( StackType_t ) pvParameters; /* R0 */ 802b79a: 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 */ 802b79e: 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; } 802b7a2: 3840 subs r0, #64 ; 0x40 802b7a4: 4770 bx lr 802b7a6: bf00 nop 802b7a8: 0802b82d .word 0x0802b82d 0802b7ac : } /*-----------------------------------------------------------*/ void vPortSVCHandler( void ) { __asm volatile ( 802b7ac: 4b07 ldr r3, [pc, #28] ; (802b7cc ) 802b7ae: 6819 ldr r1, [r3, #0] 802b7b0: 6808 ldr r0, [r1, #0] 802b7b2: e8b0 0ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp} 802b7b6: f380 8809 msr PSP, r0 802b7ba: f3bf 8f6f isb sy 802b7be: f04f 0000 mov.w r0, #0 802b7c2: f380 8811 msr BASEPRI, r0 802b7c6: f04e 0e0d orr.w lr, lr, #13 802b7ca: 4770 bx lr 0802b7cc : 802b7cc: 20000c80 .word 0x20000c80 0802b7d0 : /*-----------------------------------------------------------*/ void vPortYield( void ) { /* Set a PendSV to request a context switch. */ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; 802b7d0: 4b04 ldr r3, [pc, #16] ; (802b7e4 ) 802b7d2: f04f 5280 mov.w r2, #268435456 ; 0x10000000 802b7d6: 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" ); 802b7d8: f3bf 8f4f dsb sy __asm volatile( "isb" ); 802b7dc: f3bf 8f6f isb sy 802b7e0: 4770 bx lr 802b7e2: bf00 nop 802b7e4: e000ed04 .word 0xe000ed04 0802b7e8 : } /*-----------------------------------------------------------*/ __attribute__(( naked )) uint32_t ulPortSetInterruptMask( void ) { __asm volatile \ 802b7e8: f3ef 8011 mrs r0, BASEPRI 802b7ec: f04f 0150 mov.w r1, #80 ; 0x50 802b7f0: f381 8811 msr BASEPRI, r1 802b7f4: 4770 bx lr ); /* This return will not be reached but is necessary to prevent compiler warnings. */ return 0; } 802b7f6: 2000 movs r0, #0 0802b7f8 : __asm volatile( "isb" ); } /*-----------------------------------------------------------*/ void vPortEnterCritical( void ) { 802b7f8: b508 push {r3, lr} portDISABLE_INTERRUPTS(); 802b7fa: f7ff fff5 bl 802b7e8 uxCriticalNesting++; 802b7fe: 4a09 ldr r2, [pc, #36] ; (802b824 ) 802b800: 6813 ldr r3, [r2, #0] 802b802: 3301 adds r3, #1 802b804: 6013 str r3, [r2, #0] __asm volatile( "dsb" ); 802b806: f3bf 8f4f dsb sy __asm volatile( "isb" ); 802b80a: 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 ) 802b80e: 2b01 cmp r3, #1 802b810: d107 bne.n 802b822 { configASSERT( ( portNVIC_INT_CTRL_REG & portVECTACTIVE_MASK ) == 0 ); 802b812: 4b05 ldr r3, [pc, #20] ; (802b828 ) 802b814: 681b ldr r3, [r3, #0] 802b816: f013 0fff tst.w r3, #255 ; 0xff 802b81a: d002 beq.n 802b822 802b81c: f7ff ffe4 bl 802b7e8 802b820: e7fe b.n 802b820 802b822: bd08 pop {r3, pc} 802b824: 2000070c .word 0x2000070c 802b828: e000ed04 .word 0xe000ed04 0802b82c : return pxTopOfStack; } /*-----------------------------------------------------------*/ static void prvTaskExitError( void ) { 802b82c: 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 ); 802b82e: 4b05 ldr r3, [pc, #20] ; (802b844 ) 802b830: 681b ldr r3, [r3, #0] 802b832: 3301 adds r3, #1 802b834: d002 beq.n 802b83c 802b836: f7ff ffd7 bl 802b7e8 802b83a: e7fe b.n 802b83a portDISABLE_INTERRUPTS(); 802b83c: f7ff ffd4 bl 802b7e8 802b840: e7fe b.n 802b840 802b842: bf00 nop 802b844: 2000070c .word 0x2000070c 0802b848 : } /*-----------------------------------------------------------*/ __attribute__(( naked )) void vPortClearInterruptMask( uint32_t ulNewMaskValue ) { __asm volatile \ 802b848: f380 8811 msr BASEPRI, r0 802b84c: 4770 bx lr 802b84e: 0000 movs r0, r0 0802b850 : } } /*-----------------------------------------------------------*/ void vPortExitCritical( void ) { 802b850: b508 push {r3, lr} configASSERT( uxCriticalNesting ); 802b852: 4b07 ldr r3, [pc, #28] ; (802b870 ) 802b854: 6818 ldr r0, [r3, #0] 802b856: b910 cbnz r0, 802b85e 802b858: f7ff ffc6 bl 802b7e8 802b85c: e7fe b.n 802b85c uxCriticalNesting--; 802b85e: 3801 subs r0, #1 802b860: 6018 str r0, [r3, #0] if( uxCriticalNesting == 0 ) 802b862: b918 cbnz r0, 802b86c { portENABLE_INTERRUPTS(); } } 802b864: e8bd 4008 ldmia.w sp!, {r3, lr} { configASSERT( uxCriticalNesting ); uxCriticalNesting--; if( uxCriticalNesting == 0 ) { portENABLE_INTERRUPTS(); 802b868: f7ff bfee b.w 802b848 802b86c: bd08 pop {r3, pc} 802b86e: bf00 nop 802b870: 2000070c .word 0x2000070c 0802b874 : void xPortPendSVHandler( void ) { /* This is a naked function. */ __asm volatile 802b874: f3ef 8009 mrs r0, PSP 802b878: f3bf 8f6f isb sy 802b87c: 4b0d ldr r3, [pc, #52] ; (802b8b4 ) 802b87e: 681a ldr r2, [r3, #0] 802b880: e920 0ff0 stmdb r0!, {r4, r5, r6, r7, r8, r9, sl, fp} 802b884: 6010 str r0, [r2, #0] 802b886: e92d 4008 stmdb sp!, {r3, lr} 802b88a: f04f 0050 mov.w r0, #80 ; 0x50 802b88e: f380 8811 msr BASEPRI, r0 802b892: f7ff fc19 bl 802b0c8 802b896: f04f 0000 mov.w r0, #0 802b89a: f380 8811 msr BASEPRI, r0 802b89e: e8bd 4008 ldmia.w sp!, {r3, lr} 802b8a2: 6819 ldr r1, [r3, #0] 802b8a4: 6808 ldr r0, [r1, #0] 802b8a6: e8b0 0ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp} 802b8aa: f380 8809 msr PSP, r0 802b8ae: f3bf 8f6f isb sy 802b8b2: 4770 bx lr 0802b8b4 : 802b8b4: 20000c80 .word 0x20000c80 0802b8b8 : ); } /*-----------------------------------------------------------*/ void xPortSysTickHandler( void ) { 802b8b8: 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(); 802b8ba: f7ff ff95 bl 802b7e8 { /* Increment the RTOS tick. */ if( xTaskIncrementTick() != pdFALSE ) 802b8be: f7ff fa59 bl 802ad74 802b8c2: b118 cbz r0, 802b8cc { /* A context switch is required. Context switching is performed in the PendSV interrupt. Pend the PendSV interrupt. */ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; 802b8c4: 4b04 ldr r3, [pc, #16] ; (802b8d8 ) 802b8c6: f04f 5280 mov.w r2, #268435456 ; 0x10000000 802b8ca: 601a str r2, [r3, #0] } } portCLEAR_INTERRUPT_MASK_FROM_ISR( 0 ); 802b8cc: 2000 movs r0, #0 } 802b8ce: 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 ); 802b8d2: f7ff bfb9 b.w 802b848 802b8d6: bf00 nop 802b8d8: e000ed04 .word 0xe000ed04 0802b8dc : 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; 802b8dc: 4b06 ldr r3, [pc, #24] ; (802b8f8 ) 802b8de: 681a ldr r2, [r3, #0] 802b8e0: f44f 737a mov.w r3, #1000 ; 0x3e8 802b8e4: fbb2 f2f3 udiv r2, r2, r3 802b8e8: 4b04 ldr r3, [pc, #16] ; (802b8fc ) 802b8ea: 3a01 subs r2, #1 802b8ec: 601a str r2, [r3, #0] portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT | portNVIC_SYSTICK_ENABLE_BIT ); 802b8ee: 2207 movs r2, #7 802b8f0: f843 2c04 str.w r2, [r3, #-4] 802b8f4: 4770 bx lr 802b8f6: bf00 nop 802b8f8: 200005bc .word 0x200005bc 802b8fc: e000e014 .word 0xe000e014 0802b900 : /* * See header file for description. */ BaseType_t xPortStartScheduler( void ) { 802b900: 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; 802b902: 4b1d ldr r3, [pc, #116] ; (802b978 ) 802b904: 781a ldrb r2, [r3, #0] 802b906: 9201 str r2, [sp, #4] /* Determine the number of priority bits available. First write to all possible bits. */ *pucFirstUserPriorityRegister = portMAX_8_BIT_VALUE; 802b908: 22ff movs r2, #255 ; 0xff 802b90a: 701a strb r2, [r3, #0] /* Read the value back to see how many bits stuck. */ ucMaxPriorityValue = *pucFirstUserPriorityRegister; 802b90c: 781b ldrb r3, [r3, #0] 802b90e: f88d 3003 strb.w r3, [sp, #3] /* Use the same mask on the maximum system call priority. */ ucMaxSysCallPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY & ucMaxPriorityValue; 802b912: f89d 2003 ldrb.w r2, [sp, #3] 802b916: 4b19 ldr r3, [pc, #100] ; (802b97c ) 802b918: f002 0250 and.w r2, r2, #80 ; 0x50 802b91c: 701a strb r2, [r3, #0] /* Calculate the maximum acceptable priority group value for the number of bits read back. */ ulMaxPRIGROUPValue = portMAX_PRIGROUP_BITS; 802b91e: 4a18 ldr r2, [pc, #96] ; (802b980 ) 802b920: 2307 movs r3, #7 802b922: 6013 str r3, [r2, #0] while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE ) 802b924: e005 b.n 802b932 { ulMaxPRIGROUPValue--; ucMaxPriorityValue <<= ( uint8_t ) 0x01; 802b926: f89d 3003 ldrb.w r3, [sp, #3] 802b92a: 005b lsls r3, r3, #1 802b92c: f88d 3003 strb.w r3, [sp, #3] 802b930: 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 ) 802b932: f89d 2003 ldrb.w r2, [sp, #3] 802b936: 1e59 subs r1, r3, #1 802b938: 0612 lsls r2, r2, #24 802b93a: d4f4 bmi.n 802b926 } /* Shift the priority group value back to its position within the AIRCR register. */ ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT; ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK; 802b93c: 4a10 ldr r2, [pc, #64] ; (802b980 ) ucMaxPriorityValue <<= ( uint8_t ) 0x01; } /* Shift the priority group value back to its position within the AIRCR register. */ ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT; 802b93e: 021b lsls r3, r3, #8 ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK; 802b940: f403 63e0 and.w r3, r3, #1792 ; 0x700 802b944: 6013 str r3, [r2, #0] /* Restore the clobbered interrupt priority register to its original value. */ *pucFirstUserPriorityRegister = ulOriginalPriority; 802b946: 4b0c ldr r3, [pc, #48] ; (802b978 ) 802b948: 9a01 ldr r2, [sp, #4] 802b94a: 701a strb r2, [r3, #0] } #endif /* conifgASSERT_DEFINED */ /* Make PendSV and SysTick the lowest priority interrupts. */ portNVIC_SYSPRI2_REG |= portNVIC_PENDSV_PRI; 802b94c: f8d3 2920 ldr.w r2, [r3, #2336] ; 0x920 802b950: f442 0270 orr.w r2, r2, #15728640 ; 0xf00000 802b954: f8c3 2920 str.w r2, [r3, #2336] ; 0x920 portNVIC_SYSPRI2_REG |= portNVIC_SYSTICK_PRI; 802b958: f8d3 2920 ldr.w r2, [r3, #2336] ; 0x920 802b95c: f042 4270 orr.w r2, r2, #4026531840 ; 0xf0000000 802b960: f8c3 2920 str.w r2, [r3, #2336] ; 0x920 /* Start the timer that generates the tick ISR. Interrupts are disabled here already. */ vPortSetupTimerInterrupt(); 802b964: f7ff ffba bl 802b8dc /* Initialise the critical nesting count ready for the first task. */ uxCriticalNesting = 0; 802b968: 4b06 ldr r3, [pc, #24] ; (802b984 ) 802b96a: 2200 movs r2, #0 802b96c: 601a str r2, [r3, #0] /* Start the first task. */ prvPortStartFirstTask(); 802b96e: f7ff feff bl 802b770 /* 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(); 802b972: f7ff ff5b bl 802b82c 802b976: bf00 nop 802b978: e000e400 .word 0xe000e400 802b97c: 20000d00 .word 0x20000d00 802b980: 20000d04 .word 0x20000d04 802b984: 2000070c .word 0x2000070c 0802b988 : /*-----------------------------------------------------------*/ #if( configASSERT_DEFINED == 1 ) void vPortValidateInterruptPriority( void ) { 802b988: 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 ) ); 802b98a: f3ef 8305 mrs r3, IPSR /* Is the interrupt number a user defined interrupt? */ if( ulCurrentInterrupt >= portFIRST_USER_INTERRUPT_NUMBER ) 802b98e: 2b0f cmp r3, #15 802b990: d908 bls.n 802b9a4 { /* Look up the interrupt's priority. */ ucCurrentPriority = pcInterruptPriorityRegisters[ ulCurrentInterrupt ]; 802b992: 4a0a ldr r2, [pc, #40] ; (802b9bc ) 802b994: 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 ); 802b996: 4a0a ldr r2, [pc, #40] ; (802b9c0 ) 802b998: 7812 ldrb r2, [r2, #0] 802b99a: 429a cmp r2, r3 802b99c: d902 bls.n 802b9a4 802b99e: f7ff ff23 bl 802b7e8 802b9a2: e7fe b.n 802b9a2 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 ); 802b9a4: 4b07 ldr r3, [pc, #28] ; (802b9c4 ) 802b9a6: 681a ldr r2, [r3, #0] 802b9a8: 4b07 ldr r3, [pc, #28] ; (802b9c8 ) 802b9aa: 681b ldr r3, [r3, #0] 802b9ac: f402 62e0 and.w r2, r2, #1792 ; 0x700 802b9b0: 429a cmp r2, r3 802b9b2: d902 bls.n 802b9ba 802b9b4: f7ff ff18 bl 802b7e8 802b9b8: e7fe b.n 802b9b8 802b9ba: bd08 pop {r3, pc} 802b9bc: e000e3f0 .word 0xe000e3f0 802b9c0: 20000d00 .word 0x20000d00 802b9c4: e000ed0c .word 0xe000ed0c 802b9c8: 20000d04 .word 0x20000d04 0802b9cc : xBlockAllocatedBit = ( ( size_t ) 1 ) << ( ( sizeof( size_t ) * heapBITS_PER_BYTE ) - 1 ); } /*-----------------------------------------------------------*/ static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert ) { 802b9cc: 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 ) 802b9ce: 4b0f ldr r3, [pc, #60] ; (802ba0c ) 802b9d0: e000 b.n 802b9d4 802b9d2: 4613 mov r3, r2 802b9d4: 681a ldr r2, [r3, #0] 802b9d6: 4282 cmp r2, r0 802b9d8: d3fb bcc.n 802b9d2 } /* 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 ) 802b9da: 6859 ldr r1, [r3, #4] 802b9dc: 185c adds r4, r3, r1 802b9de: 4284 cmp r4, r0 802b9e0: d103 bne.n 802b9ea { pxIterator->xBlockSize += pxBlockToInsert->xBlockSize; 802b9e2: 6840 ldr r0, [r0, #4] 802b9e4: 1841 adds r1, r0, r1 802b9e6: 6059 str r1, [r3, #4] 802b9e8: 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 ) 802b9ea: 6841 ldr r1, [r0, #4] 802b9ec: 1844 adds r4, r0, r1 802b9ee: 4294 cmp r4, r2 802b9f0: d106 bne.n 802ba00 { if( pxIterator->pxNextFreeBlock != pxEnd ) 802b9f2: 4c07 ldr r4, [pc, #28] ; (802ba10 ) 802b9f4: 6824 ldr r4, [r4, #0] 802b9f6: 42a2 cmp r2, r4 802b9f8: d002 beq.n 802ba00 { /* Form one big block from the two blocks. */ pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize; pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock->pxNextFreeBlock; 802b9fa: 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; 802b9fc: 1861 adds r1, r4, r1 802b9fe: 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 ) 802ba00: 4283 cmp r3, r0 pxBlockToInsert->pxNextFreeBlock = pxEnd; } } else { pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock; 802ba02: 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; 802ba04: bf18 it ne 802ba06: 6018 strne r0, [r3, #0] 802ba08: bd10 pop {r4, pc} 802ba0a: bf00 nop 802ba0c: 20000d10 .word 0x20000d10 802ba10: 20000d0c .word 0x20000d0c 0802ba14 : static size_t xBlockAllocatedBit = 0; /*-----------------------------------------------------------*/ void *pvPortMalloc( size_t xWantedSize ) { 802ba14: b5f8 push {r3, r4, r5, r6, r7, lr} 802ba16: 4605 mov r5, r0 BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink; void *pvReturn = NULL; vTaskSuspendAll(); 802ba18: f7ff f99e bl 802ad58 { /* If this is the first call to malloc then the heap will require initialisation to setup the list of free blocks. */ if( pxEnd == NULL ) 802ba1c: 4b3a ldr r3, [pc, #232] ; (802bb08 ) 802ba1e: 681b ldr r3, [r3, #0] 802ba20: bb1b cbnz r3, 802ba6a 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; 802ba22: 4a3a ldr r2, [pc, #232] ; (802bb0c ) if( ( ulAddress & portBYTE_ALIGNMENT_MASK ) != 0 ) 802ba24: 0756 lsls r6, r2, #29 802ba26: d007 beq.n 802ba38 { ulAddress += ( portBYTE_ALIGNMENT - 1 ); 802ba28: 1dd3 adds r3, r2, #7 ulAddress &= ~portBYTE_ALIGNMENT_MASK; 802ba2a: f023 0307 bic.w r3, r3, #7 xTotalHeapSize -= ulAddress - ( uint32_t ) ucHeap; 802ba2e: f502 4270 add.w r2, r2, #61440 ; 0xf000 802ba32: 1ad1 subs r1, r2, r3 ulAddress = ( uint32_t ) ucHeap; if( ( ulAddress & portBYTE_ALIGNMENT_MASK ) != 0 ) { ulAddress += ( portBYTE_ALIGNMENT - 1 ); ulAddress &= ~portBYTE_ALIGNMENT_MASK; 802ba34: 461a mov r2, r3 802ba36: e001 b.n 802ba3c static void prvHeapInit( void ) { BlockLink_t *pxFirstFreeBlock; uint8_t *pucAlignedHeap; uint32_t ulAddress; size_t xTotalHeapSize = configTOTAL_HEAP_SIZE; 802ba38: 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; 802ba3c: 1851 adds r1, r2, r1 ulAddress -= xHeapStructSize; 802ba3e: 3908 subs r1, #8 ulAddress &= ~portBYTE_ALIGNMENT_MASK; 802ba40: 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; 802ba44: 4832 ldr r0, [pc, #200] ; (802bb10 ) xStart.xBlockSize = ( size_t ) 0; 802ba46: 2300 movs r3, #0 802ba48: 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; 802ba4c: 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; 802ba4e: 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; 802ba50: 1a8b subs r3, r1, r2 pxFirstFreeBlock->pxNextFreeBlock = pxEnd; 802ba52: e882 000a stmia.w r2, {r1, r3} /* Only one block exists - and it covers the entire usable heap space. */ xMinimumEverFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 802ba56: 4a2f ldr r2, [pc, #188] ; (802bb14 ) /* 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; 802ba58: 482b ldr r0, [pc, #172] ; (802bb08 ) 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; 802ba5a: 6013 str r3, [r2, #0] xFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 802ba5c: 4a2e ldr r2, [pc, #184] ; (802bb18 ) /* 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; 802ba5e: 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; 802ba60: 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 ); 802ba62: 4b2e ldr r3, [pc, #184] ; (802bb1c ) 802ba64: f04f 4200 mov.w r2, #2147483648 ; 0x80000000 802ba68: 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 ) 802ba6a: 4b2c ldr r3, [pc, #176] ; (802bb1c ) 802ba6c: 681e ldr r6, [r3, #0] 802ba6e: 4235 tst r5, r6 802ba70: d140 bne.n 802baf4 { /* The wanted size is increased so it can contain a BlockLink_t structure in addition to the requested amount of bytes. */ if( xWantedSize > 0 ) 802ba72: 2d00 cmp r5, #0 802ba74: d03f beq.n 802baf6 { xWantedSize += xHeapStructSize; 802ba76: 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 ) 802ba7a: 0758 lsls r0, r3, #29 { /* Byte alignment required. */ xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) ); 802ba7c: bf1c itt ne 802ba7e: f023 0307 bicne.w r3, r3, #7 802ba82: 3308 addne r3, #8 else { mtCOVERAGE_TEST_MARKER(); } if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) ) 802ba84: 2b00 cmp r3, #0 802ba86: d033 beq.n 802baf0 802ba88: 4a23 ldr r2, [pc, #140] ; (802bb18 ) 802ba8a: 6817 ldr r7, [r2, #0] 802ba8c: 42bb cmp r3, r7 802ba8e: d831 bhi.n 802baf4 { /* Traverse the list from the start (lowest address) block until one of adequate size is found. */ pxPreviousBlock = &xStart; pxBlock = xStart.pxNextFreeBlock; 802ba90: 4a1f ldr r2, [pc, #124] ; (802bb10 ) 802ba92: 6814 ldr r4, [r2, #0] while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) 802ba94: e001 b.n 802ba9a 802ba96: 4622 mov r2, r4 { pxPreviousBlock = pxBlock; pxBlock = pxBlock->pxNextFreeBlock; 802ba98: 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 ) ) 802ba9a: 6861 ldr r1, [r4, #4] 802ba9c: 4299 cmp r1, r3 802ba9e: d304 bcc.n 802baaa pxBlock = pxBlock->pxNextFreeBlock; } /* If the end marker was reached then a block of adequate size was not found. */ if( pxBlock != pxEnd ) 802baa0: 4819 ldr r0, [pc, #100] ; (802bb08 ) 802baa2: 6800 ldr r0, [r0, #0] 802baa4: 4284 cmp r4, r0 802baa6: d104 bne.n 802bab2 802baa8: e024 b.n 802baf4 { /* 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 ) ) 802baaa: 6820 ldr r0, [r4, #0] 802baac: 2800 cmp r0, #0 802baae: d1f2 bne.n 802ba96 802bab0: e7f6 b.n 802baa0 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; 802bab2: 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 ); 802bab4: 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; 802bab6: 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 ) 802bab8: 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 ); 802baba: 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 ) 802babc: 2a10 cmp r2, #16 802babe: d909 bls.n 802bad4 { /* 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 ); 802bac0: 18e0 adds r0, r4, r3 configASSERT( ( ( ( uint32_t ) pxNewBlockLink ) & portBYTE_ALIGNMENT_MASK ) == 0 ); 802bac2: 0741 lsls r1, r0, #29 802bac4: d002 beq.n 802bacc 802bac6: f7ff fe8f bl 802b7e8 802baca: e7fe b.n 802baca /* Calculate the sizes of two blocks split from the single block. */ pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize; 802bacc: 6042 str r2, [r0, #4] pxBlock->xBlockSize = xWantedSize; 802bace: 6063 str r3, [r4, #4] /* Insert the new block into the list of free blocks. */ prvInsertBlockIntoFreeList( ( pxNewBlockLink ) ); 802bad0: f7ff ff7c bl 802b9cc else { mtCOVERAGE_TEST_MARKER(); } xFreeBytesRemaining -= pxBlock->xBlockSize; 802bad4: 6862 ldr r2, [r4, #4] 802bad6: 4910 ldr r1, [pc, #64] ; (802bb18 ) 802bad8: 1abb subs r3, r7, r2 802bada: 600b str r3, [r1, #0] if( xFreeBytesRemaining < xMinimumEverFreeBytesRemaining ) 802badc: 490d ldr r1, [pc, #52] ; (802bb14 ) 802bade: 6808 ldr r0, [r1, #0] 802bae0: 4283 cmp r3, r0 { xMinimumEverFreeBytesRemaining = xFreeBytesRemaining; 802bae2: bf38 it cc 802bae4: 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; 802bae6: 4316 orrs r6, r2 pxBlock->pxNextFreeBlock = NULL; 802bae8: 2300 movs r3, #0 802baea: e884 0048 stmia.w r4, {r3, r6} 802baee: e002 b.n 802baf6 /*-----------------------------------------------------------*/ void *pvPortMalloc( size_t xWantedSize ) { BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink; void *pvReturn = NULL; 802baf0: 461d mov r5, r3 802baf2: e000 b.n 802baf6 802baf4: 2500 movs r5, #0 mtCOVERAGE_TEST_MARKER(); } traceMALLOC( pvReturn, xWantedSize ); } ( void ) xTaskResumeAll(); 802baf6: f7ff f9cb bl 802ae90 mtCOVERAGE_TEST_MARKER(); } } #endif configASSERT( ( ( ( uint32_t ) pvReturn ) & portBYTE_ALIGNMENT_MASK ) == 0 ); 802bafa: 076b lsls r3, r5, #29 802bafc: d002 beq.n 802bb04 802bafe: f7ff fe73 bl 802b7e8 802bb02: e7fe b.n 802bb02 return pvReturn; } 802bb04: 4628 mov r0, r5 802bb06: bdf8 pop {r3, r4, r5, r6, r7, pc} 802bb08: 20000d0c .word 0x20000d0c 802bb0c: 10000000 .word 0x10000000 802bb10: 20000d10 .word 0x20000d10 802bb14: 20000d18 .word 0x20000d18 802bb18: 20000d08 .word 0x20000d08 802bb1c: 20000d1c .word 0x20000d1c 0802bb20 : /*-----------------------------------------------------------*/ void vPortFree( void *pv ) { 802bb20: b510 push {r4, lr} uint8_t *puc = ( uint8_t * ) pv; BlockLink_t *pxLink; if( pv != NULL ) 802bb22: 4604 mov r4, r0 802bb24: b310 cbz r0, 802bb6c /* This casting is to keep the compiler from issuing warnings. */ pxLink = ( void * ) puc; /* Check the block is actually allocated. */ configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 ); 802bb26: 4a12 ldr r2, [pc, #72] ; (802bb70 ) 802bb28: f850 3c04 ldr.w r3, [r0, #-4] 802bb2c: 6812 ldr r2, [r2, #0] 802bb2e: 421a tst r2, r3 802bb30: d102 bne.n 802bb38 802bb32: f7ff fe59 bl 802b7e8 802bb36: e7fe b.n 802bb36 configASSERT( pxLink->pxNextFreeBlock == NULL ); 802bb38: f850 1c08 ldr.w r1, [r0, #-8] 802bb3c: b111 cbz r1, 802bb44 802bb3e: f7ff fe53 bl 802b7e8 802bb42: e7fe b.n 802bb42 { if( pxLink->pxNextFreeBlock == NULL ) { /* The block is being returned to the heap - it is no longer allocated. */ pxLink->xBlockSize &= ~xBlockAllocatedBit; 802bb44: ea23 0302 bic.w r3, r3, r2 802bb48: f840 3c04 str.w r3, [r0, #-4] vTaskSuspendAll(); 802bb4c: f7ff f904 bl 802ad58 { /* Add this block to the list of free blocks. */ xFreeBytesRemaining += pxLink->xBlockSize; 802bb50: 4b08 ldr r3, [pc, #32] ; (802bb74 ) 802bb52: f854 1c04 ldr.w r1, [r4, #-4] 802bb56: 681a ldr r2, [r3, #0] traceFREE( pv, pxLink->xBlockSize ); prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) ); 802bb58: f1a4 0008 sub.w r0, r4, #8 pxLink->xBlockSize &= ~xBlockAllocatedBit; vTaskSuspendAll(); { /* Add this block to the list of free blocks. */ xFreeBytesRemaining += pxLink->xBlockSize; 802bb5c: 188a adds r2, r1, r2 802bb5e: 601a str r2, [r3, #0] traceFREE( pv, pxLink->xBlockSize ); prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) ); 802bb60: f7ff ff34 bl 802b9cc else { mtCOVERAGE_TEST_MARKER(); } } } 802bb64: 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(); 802bb68: f7ff b992 b.w 802ae90 802bb6c: bd10 pop {r4, pc} 802bb6e: bf00 nop 802bb70: 20000d1c .word 0x20000d1c 802bb74: 20000d08 .word 0x20000d08 0802bb78 : static void http_sent_log_err(void * arg, err_t err) { (void)err; (void)arg; /* Clear file transfer in progress flag */ fLogTransInprog = false; 802bb78: 4b01 ldr r3, [pc, #4] ; (802bb80 ) 802bb7a: 2200 movs r2, #0 802bb7c: 701a strb r2, [r3, #0] 802bb7e: 4770 bx lr 802bb80: 20000d2c .word 0x20000d2c 0802bb84 : /** * @brief Обновление времени последней активности пользователя */ static void HTTP_UpdateUserLoginTime(uint8_t user_id) { xTimerStart(users[user_id].LogoutTimer, 0); 802bb84: 4b07 ldr r3, [pc, #28] ; (802bba4 ) 802bb86: 2214 movs r2, #20 /** * @brief Обновление времени последней активности пользователя */ static void HTTP_UpdateUserLoginTime(uint8_t user_id) { 802bb88: b513 push {r0, r1, r4, lr} xTimerStart(users[user_id].LogoutTimer, 0); 802bb8a: fb02 3000 mla r0, r2, r0, r3 802bb8e: 6904 ldr r4, [r0, #16] 802bb90: f7ff f8ea bl 802ad68 802bb94: 2300 movs r3, #0 802bb96: 4602 mov r2, r0 802bb98: 9300 str r3, [sp, #0] 802bb9a: 4620 mov r0, r4 802bb9c: 2101 movs r1, #1 802bb9e: f7ff fccd bl 802b53c } 802bba2: bd1c pop {r2, r3, r4, pc} 802bba4: 2000e23c .word 0x2000e23c 0802bba8 : * @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) { 802bba8: 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) 802bbaa: 4c09 ldr r4, [pc, #36] ; (802bbd0 ) * @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) { 802bbac: 4606 mov r6, r0 802bbae: 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)) 802bbb0: 4630 mov r0, r6 802bbb2: 6861 ldr r1, [r4, #4] 802bbb4: f7f6 f830 bl 8021c18 802bbb8: b928 cbnz r0, 802bbc6 { file->data = f->data; 802bbba: 68a3 ldr r3, [r4, #8] 802bbbc: 602b str r3, [r5, #0] file->len = f->len; 802bbbe: 68e3 ldr r3, [r4, #12] return 1; 802bbc0: 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; 802bbc2: 606b str r3, [r5, #4] return 1; 802bbc4: 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) 802bbc6: 6824 ldr r4, [r4, #0] 802bbc8: 2c00 cmp r4, #0 802bbca: d1f1 bne.n 802bbb0 file->data = f->data; file->len = f->len; return 1; } } return 0; 802bbcc: 4620 mov r0, r4 } 802bbce: bd70 pop {r4, r5, r6, pc} 802bbd0: 080411f0 .word 0x080411f0 0802bbd4 : * @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) { 802bbd4: 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)); 802bbd6: 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) { 802bbd8: 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)); 802bbda: f003 ff6d bl 802fab8 if (hs == NULL) 802bbde: 4601 mov r1, r0 802bbe0: b1a0 cbz r0, 802bc0c { return ERR_MEM; } /* Initialize the structure. */ hs->file = NULL; 802bbe2: 2500 movs r5, #0 802bbe4: 6005 str r5, [r0, #0] hs->left = 0; 802bbe6: 6045 str r5, [r0, #4] /* Tell TCP that this is the structure we wish to be passed for our callbacks. */ tcp_arg(pcb, hs); 802bbe8: 4620 mov r0, r4 802bbea: f004 fc55 bl 8030498 /* Tell TCP that we wish to be informed of incoming data by a call to the http_recv() function. */ tcp_recv(pcb, http_recv); 802bbee: 4620 mov r0, r4 802bbf0: 4908 ldr r1, [pc, #32] ; (802bc14 ) 802bbf2: f004 fc53 bl 803049c tcp_err(pcb, conn_err); 802bbf6: 4620 mov r0, r4 802bbf8: 4907 ldr r1, [pc, #28] ; (802bc18 ) 802bbfa: f004 fc53 bl 80304a4 tcp_poll(pcb, http_poll, 10); 802bbfe: 4620 mov r0, r4 802bc00: 4906 ldr r1, [pc, #24] ; (802bc1c ) 802bc02: 220a movs r2, #10 802bc04: f004 fc53 bl 80304ae return ERR_OK; 802bc08: 4628 mov r0, r5 802bc0a: e000 b.n 802bc0e /* 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; 802bc0c: 20ff movs r0, #255 ; 0xff tcp_err(pcb, conn_err); tcp_poll(pcb, http_poll, 10); return ERR_OK; } 802bc0e: b240 sxtb r0, r0 802bc10: bd38 pop {r3, r4, r5, pc} 802bc12: bf00 nop 802bc14: 0802cc8d .word 0x0802cc8d 802bc18: 0802bc63 .word 0x0802bc63 802bc1c: 0802bc4b .word 0x0802bc4b 0802bc20 : * @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) { 802bc20: 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) 802bc22: 684b ldr r3, [r1, #4] 802bc24: f8b0 5066 ldrh.w r5, [r0, #102] ; 0x66 802bc28: 429d cmp r5, r3 { len = tcp_sndbuf(pcb); } else { len = hs->left; 802bc2a: bf28 it cs 802bc2c: 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) { 802bc2e: 460c mov r4, r1 } else { len = hs->left; } err = tcp_write(pcb, hs->file, len, 0); 802bc30: 462a mov r2, r5 802bc32: 6809 ldr r1, [r1, #0] 802bc34: 2300 movs r3, #0 802bc36: f006 f834 bl 8031ca2 if (err == ERR_OK) 802bc3a: b928 cbnz r0, 802bc48 { hs->file += len; 802bc3c: 6823 ldr r3, [r4, #0] 802bc3e: 195b adds r3, r3, r5 802bc40: 6023 str r3, [r4, #0] hs->left -= len; 802bc42: 6863 ldr r3, [r4, #4] 802bc44: 1b5d subs r5, r3, r5 802bc46: 6065 str r5, [r4, #4] 802bc48: bd38 pop {r3, r4, r5, pc} 0802bc4a : * @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) { 802bc4a: b508 push {r3, lr} if (arg == NULL) 802bc4c: 4603 mov r3, r0 { tcp_close(pcb); 802bc4e: 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) 802bc50: b913 cbnz r3, 802bc58 { tcp_close(pcb); 802bc52: f004 fee5 bl 8030a20 802bc56: e002 b.n 802bc5e } else { send_data(pcb, (struct http_state *)arg); 802bc58: 4619 mov r1, r3 802bc5a: f7ff ffe1 bl 802bc20 } return ERR_OK; } 802bc5e: 2000 movs r0, #0 802bc60: bd08 pop {r3, pc} 0802bc62 : static void conn_err(void *arg, err_t err) { struct http_state *hs; hs = arg; mem_free(hs); 802bc62: f003 be61 b.w 802f928 0802bc66 : * @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) { 802bc66: b538 push {r3, r4, r5, lr} 802bc68: 4604 mov r4, r0 802bc6a: 460d mov r5, r1 tcp_arg(pcb, NULL); 802bc6c: 2100 movs r1, #0 802bc6e: f004 fc13 bl 8030498 tcp_sent(pcb, NULL); 802bc72: 4620 mov r0, r4 802bc74: 2100 movs r1, #0 802bc76: f004 fc13 bl 80304a0 tcp_recv(pcb, NULL); 802bc7a: 4620 mov r0, r4 802bc7c: 2100 movs r1, #0 802bc7e: f004 fc0d bl 803049c mem_free(hs); 802bc82: 4628 mov r0, r5 802bc84: f003 fe50 bl 802f928 tcp_close(pcb); 802bc88: 4620 mov r0, r4 } 802bc8a: 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); 802bc8e: f004 bec7 b.w 8030a20 0802bc92 : * @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) { 802bc92: b508 push {r3, lr} 802bc94: 4603 mov r3, r0 802bc96: 4608 mov r0, r1 struct http_state *hs; hs = arg; if (hs->left > 0) 802bc98: 685a ldr r2, [r3, #4] { send_data(pcb, hs); 802bc9a: 4619 mov r1, r3 { struct http_state *hs; hs = arg; if (hs->left > 0) 802bc9c: b112 cbz r2, 802bca4 { send_data(pcb, hs); 802bc9e: f7ff ffbf bl 802bc20 802bca2: e001 b.n 802bca8 } else { close_conn(pcb, hs); 802bca4: f7ff ffdf bl 802bc66 } return ERR_OK; } 802bca8: 2000 movs r0, #0 802bcaa: bd08 pop {r3, pc} 0802bcac : /** * @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) { 802bcac: b570 push {r4, r5, r6, lr} static bool start = true; (void)len; hs = arg; if (hs->left > 0) 802bcae: 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) { 802bcb0: 4604 mov r4, r0 802bcb2: 460e mov r6, r1 static bool start = true; (void)len; hs = arg; if (hs->left > 0) 802bcb4: b125 cbz r5, 802bcc0 { send_data(pcb, hs); 802bcb6: 4608 mov r0, r1 802bcb8: 4621 mov r1, r4 802bcba: f7ff ffb1 bl 802bc20 802bcbe: e036 b.n 802bd2e } else { memset(logFileBuf, 0, FILE_BUF_MAX_LEN); 802bcc0: f44f 727a mov.w r2, #1000 ; 0x3e8 802bcc4: 481b ldr r0, [pc, #108] ; (802bd34 ) 802bcc6: 4629 mov r1, r5 802bcc8: f7f5 ff1a bl 8021b00 if (log_ptr + FILE_BUF_MAX_LEN_LOG <= log_size) { 802bccc: 4b1a ldr r3, [pc, #104] ; (802bd38 ) 802bcce: 6818 ldr r0, [r3, #0] 802bcd0: 4b1a ldr r3, [pc, #104] ; (802bd3c ) 802bcd2: 681a ldr r2, [r3, #0] 802bcd4: f500 7320 add.w r3, r0, #640 ; 0x280 802bcd8: 4293 cmp r3, r2 802bcda: 4b19 ldr r3, [pc, #100] ; (802bd40 ) 802bcdc: d803 bhi.n 802bce6 nbytes = LOG_GetData(log_ptr, logFileBuf, FILE_BUF_MAX_LEN_LOG, start); 802bcde: 4915 ldr r1, [pc, #84] ; (802bd34 ) 802bce0: f44f 7220 mov.w r2, #640 ; 0x280 802bce4: e003 b.n 802bcee } else if (log_ptr < log_size) { 802bce6: 4290 cmp r0, r2 802bce8: d205 bcs.n 802bcf6 nbytes = LOG_GetData(log_ptr, logFileBuf, (log_size - log_ptr), start); 802bcea: 4912 ldr r1, [pc, #72] ; (802bd34 ) 802bcec: 1a12 subs r2, r2, r0 802bcee: 781b ldrb r3, [r3, #0] 802bcf0: f7fd ff70 bl 8029bd4 802bcf4: 4605 mov r5, r0 } else { nbytes = 0; } log_ptr += nbytes; 802bcf6: 4b10 ldr r3, [pc, #64] ; (802bd38 ) 802bcf8: 681a ldr r2, [r3, #0] 802bcfa: 18aa adds r2, r5, r2 802bcfc: 601a str r2, [r3, #0] start = false; 802bcfe: 4b10 ldr r3, [pc, #64] ; (802bd40 ) 802bd00: 2200 movs r2, #0 802bd02: 701a strb r2, [r3, #0] if (nbytes == 0) { 802bd04: b945 cbnz r5, 802bd18 /* File transfer finished. */ start = true; 802bd06: 2201 movs r2, #1 close_conn(pcb, hs); 802bd08: 4630 mov r0, r6 802bd0a: 4621 mov r1, r4 log_ptr += nbytes; start = false; if (nbytes == 0) { /* File transfer finished. */ start = true; 802bd0c: 701a strb r2, [r3, #0] close_conn(pcb, hs); 802bd0e: f7ff ffaa bl 802bc66 /* Clear file transfer in progress flag */ fLogTransInprog = false; 802bd12: 4b0c ldr r3, [pc, #48] ; (802bd44 ) 802bd14: 701d strb r5, [r3, #0] 802bd16: e00a b.n 802bd2e return ERR_OK; } hs->file = logFileBuf; 802bd18: 4b06 ldr r3, [pc, #24] ; (802bd34 ) hs->left = nbytes; send_data(pcb, hs); 802bd1a: 4630 mov r0, r6 802bd1c: 4621 mov r1, r4 return ERR_OK; } hs->file = logFileBuf; hs->left = nbytes; 802bd1e: e884 0028 stmia.w r4, {r3, r5} send_data(pcb, hs); 802bd22: f7ff ff7d bl 802bc20 tcp_sent(pcb, http_sent_log); 802bd26: 4630 mov r0, r6 802bd28: 4907 ldr r1, [pc, #28] ; (802bd48 ) 802bd2a: f004 fbb9 bl 80304a0 } return ERR_OK; } 802bd2e: 2000 movs r0, #0 802bd30: bd70 pop {r4, r5, r6, pc} 802bd32: bf00 nop 802bd34: 2000cbd9 .word 0x2000cbd9 802bd38: 20000d24 .word 0x20000d24 802bd3c: 20000d30 .word 0x20000d30 802bd40: 20000710 .word 0x20000710 802bd44: 20000d2c .word 0x20000d2c 802bd48: 0802bcad .word 0x0802bcad 0802bd4c : /** * @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) { 802bd4c: b570 push {r4, r5, r6, lr} static bool start = true; (void)len; hs = arg; if (hs->left > 0) 802bd4e: 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) { 802bd50: 4604 mov r4, r0 802bd52: 460e mov r6, r1 static bool start = true; (void)len; hs = arg; if (hs->left > 0) 802bd54: b125 cbz r5, 802bd60 { send_data(pcb, hs); 802bd56: 4608 mov r0, r1 802bd58: 4621 mov r1, r4 802bd5a: f7ff ff61 bl 802bc20 802bd5e: e036 b.n 802bdce } else { memset(logFileBuf, 0, FILE_BUF_MAX_LEN); 802bd60: f44f 727a mov.w r2, #1000 ; 0x3e8 802bd64: 481b ldr r0, [pc, #108] ; (802bdd4 ) 802bd66: 4629 mov r1, r5 802bd68: f7f5 feca bl 8021b00 if (log_ptr + FILE_BUF_MAX_LEN <= log_size) { 802bd6c: 4b1a ldr r3, [pc, #104] ; (802bdd8 ) 802bd6e: 6818 ldr r0, [r3, #0] 802bd70: 4b1a ldr r3, [pc, #104] ; (802bddc ) 802bd72: 681a ldr r2, [r3, #0] 802bd74: f500 737a add.w r3, r0, #1000 ; 0x3e8 802bd78: 4293 cmp r3, r2 802bd7a: 4b19 ldr r3, [pc, #100] ; (802bde0 ) 802bd7c: d803 bhi.n 802bd86 nbytes = History_GetData(log_ptr, logFileBuf, FILE_BUF_MAX_LEN, start); 802bd7e: 4915 ldr r1, [pc, #84] ; (802bdd4 ) 802bd80: f44f 727a mov.w r2, #1000 ; 0x3e8 802bd84: e003 b.n 802bd8e } else if (log_ptr < log_size) { 802bd86: 4290 cmp r0, r2 802bd88: d205 bcs.n 802bd96 nbytes = History_GetData(log_ptr, logFileBuf, (log_size - log_ptr), start); 802bd8a: 4912 ldr r1, [pc, #72] ; (802bdd4 ) 802bd8c: 1a12 subs r2, r2, r0 802bd8e: 781b ldrb r3, [r3, #0] 802bd90: f7fe f826 bl 8029de0 802bd94: 4605 mov r5, r0 } else { nbytes = 0; } log_ptr += nbytes; 802bd96: 4b10 ldr r3, [pc, #64] ; (802bdd8 ) 802bd98: 681a ldr r2, [r3, #0] 802bd9a: 18aa adds r2, r5, r2 802bd9c: 601a str r2, [r3, #0] start = false; 802bd9e: 4b10 ldr r3, [pc, #64] ; (802bde0 ) 802bda0: 2200 movs r2, #0 802bda2: 701a strb r2, [r3, #0] if (nbytes == 0) { 802bda4: b945 cbnz r5, 802bdb8 /* File transfer finished. */ start = true; 802bda6: 2201 movs r2, #1 close_conn(pcb, hs); 802bda8: 4630 mov r0, r6 802bdaa: 4621 mov r1, r4 log_ptr += nbytes; start = false; if (nbytes == 0) { /* File transfer finished. */ start = true; 802bdac: 701a strb r2, [r3, #0] close_conn(pcb, hs); 802bdae: f7ff ff5a bl 802bc66 /* Clear file transfer in progress flag */ fLogTransInprog = false; 802bdb2: 4b0c ldr r3, [pc, #48] ; (802bde4 ) 802bdb4: 701d strb r5, [r3, #0] 802bdb6: e00a b.n 802bdce return ERR_OK; } hs->file = logFileBuf; 802bdb8: 4b06 ldr r3, [pc, #24] ; (802bdd4 ) hs->left = nbytes; send_data(pcb, hs); 802bdba: 4630 mov r0, r6 802bdbc: 4621 mov r1, r4 return ERR_OK; } hs->file = logFileBuf; hs->left = nbytes; 802bdbe: e884 0028 stmia.w r4, {r3, r5} send_data(pcb, hs); 802bdc2: f7ff ff2d bl 802bc20 tcp_sent(pcb, http_sent_history); 802bdc6: 4630 mov r0, r6 802bdc8: 4907 ldr r1, [pc, #28] ; (802bde8 ) 802bdca: f004 fb69 bl 80304a0 } return ERR_OK; } 802bdce: 2000 movs r0, #0 802bdd0: bd70 pop {r4, r5, r6, pc} 802bdd2: bf00 nop 802bdd4: 2000cbd9 .word 0x2000cbd9 802bdd8: 20000d24 .word 0x20000d24 802bddc: 20000d30 .word 0x20000d30 802bde0: 20000712 .word 0x20000712 802bde4: 20000d2c .word 0x20000d2c 802bde8: 0802bd4d .word 0x0802bd4d 0802bdec : } /** * @brief >Callback таймера логаута пользователя */ void LogoutTimerCallback(TimerHandle_t pxTimer) { 802bdec: b51f push {r0, r1, r2, r3, r4, lr} uint8_t user_id = (uint8_t)pvTimerGetTimerID( pxTimer ); 802bdee: f7ff fcbd bl 802b76c if( sSettings.sRADIUS.Auth_enable ) 802bdf2: 4b0a ldr r3, [pc, #40] ; (802be1c ) 802bdf4: f893 3378 ldrb.w r3, [r3, #888] ; 0x378 /** * @brief >Callback таймера логаута пользователя */ void LogoutTimerCallback(TimerHandle_t pxTimer) { uint8_t user_id = (uint8_t)pvTimerGetTimerID( pxTimer ); 802bdf8: 4604 mov r4, r0 if( sSettings.sRADIUS.Auth_enable ) 802bdfa: b173 cbz r3, 802be1a 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()); 802bdfc: f7fa f966 bl 80260cc 802be00: 4907 ldr r1, [pc, #28] ; (802be20 ) 802be02: 4602 mov r2, r0 802be04: 4668 mov r0, sp 802be06: f7fb fd05 bl 8027814 /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802be0a: 4b06 ldr r3, [pc, #24] ; (802be24 ) 802be0c: b2e0 uxtb r0, r4 802be0e: 2214 movs r2, #20 802be10: fb00 3002 mla r0, r0, r2, r3 802be14: 4669 mov r1, sp 802be16: f7f5 ffed bl 8021df4 */ void LogoutTimerCallback(TimerHandle_t pxTimer) { uint8_t user_id = (uint8_t)pvTimerGetTimerID( pxTimer ); if( sSettings.sRADIUS.Auth_enable ) HTTP_ForceUserLogout(user_id); } 802be1a: bd1f pop {r0, r1, r2, r3, r4, pc} 802be1c: 2000cfc4 .word 0x2000cfc4 802be20: 080409f6 .word 0x080409f6 802be24: 2000e23c .word 0x2000e23c 0802be28 : * @brief Initialize the HTTP server (start its thread) * @param none * @retval None */ void HTTP_Init() { 802be28: b5f0 push {r4, r5, r6, r7, lr} 802be2a: 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(); 802be2c: f004 ff26 bl 8030c7c /* bind HTTP traffic to pcb */ tcp_bind(pcb, IP_ADDR_ANY, 80); 802be30: 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(); 802be32: 4604 mov r4, r0 /* bind HTTP traffic to pcb */ tcp_bind(pcb, IP_ADDR_ANY, 80); 802be34: 4913 ldr r1, [pc, #76] ; (802be84 ) /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802be36: 4f14 ldr r7, [pc, #80] ; (802be88 ) 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); 802be38: 4e14 ldr r6, [pc, #80] ; (802be8c ) //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); 802be3a: f004 fa5b bl 80302f4 /* start listening on port 80 */ pcb = tcp_listen(pcb); 802be3e: 4620 mov r0, r4 802be40: 21ff movs r1, #255 ; 0xff 802be42: f004 fa8f bl 8030364 /* define callback function for TCP connection setup */ tcp_accept(pcb, http_accept); 802be46: 4912 ldr r1, [pc, #72] ; (802be90 ) 802be48: f004 fb2f bl 80304aa 802be4c: 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()); 802be4e: f7fa f93d bl 80260cc /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802be52: 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()); 802be54: 4602 mov r2, r0 /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802be56: 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()); 802be5a: 490e ldr r1, [pc, #56] ; (802be94 ) 802be5c: a802 add r0, sp, #8 802be5e: f7fb fcd9 bl 8027814 /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802be62: a902 add r1, sp, #8 802be64: 4628 mov r0, r5 802be66: f7f5 ffc5 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); 802be6a: 2200 movs r2, #0 802be6c: 4623 mov r3, r4 802be6e: 9600 str r6, [sp, #0] 802be70: 4809 ldr r0, [pc, #36] ; (802be98 ) 802be72: 490a ldr r1, [pc, #40] ; (802be9c ) 802be74: f7ff fb42 bl 802b4fc 802be78: 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++) { 802be7a: 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 = 802be7c: 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++) { 802be7e: d1e6 bne.n 802be4e /* Create user logout timers */ users[user_id].LogoutTimer = xTimerCreate("LogoutTmr", WEB_LOGOUT_TIME, pdFALSE, ( void * ) user_id, LogoutTimerCallback); } } 802be80: b007 add sp, #28 802be82: bdf0 pop {r4, r5, r6, r7, pc} 802be84: 08045008 .word 0x08045008 802be88: 2000e23c .word 0x2000e23c 802be8c: 0802bded .word 0x0802bded 802be90: 0802bbd5 .word 0x0802bbd5 802be94: 080409f6 .word 0x080409f6 802be98: 080409f9 .word 0x080409f9 802be9c: 001b7740 .word 0x001b7740 0802bea0 : /** * @brief * @retval None */ int HTTP_SettingsPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802bea0: b570 push {r4, r5, r6, lr} 802bea2: 4602 mov r2, r0 802bea4: b088 sub sp, #32 802bea6: 460c mov r4, r1 char tempStr[30]; strncpy(tempStr, bufIn, 30); 802bea8: 4668 mov r0, sp 802beaa: 4611 mov r1, r2 802beac: 221e movs r2, #30 /** * @brief * @retval None */ int HTTP_SettingsPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802beae: 461e mov r6, r3 char tempStr[30]; strncpy(tempStr, bufIn, 30); 802beb0: f7f6 f8b6 bl 8022020 /* В запросе нет параметров, нужно формировать JSON ответ */ if (strpbrk(tempStr,"?") == 0) 802beb4: 4668 mov r0, sp 802beb6: 490b ldr r1, [pc, #44] ; (802bee4 ) 802beb8: f7f6 f8e4 bl 8022084 802bebc: 4605 mov r5, r0 /* В запросе есть параметры, нужно парсить и сохранять настройки */ else { //HTTP_SetSettings(bufIn, lenBufIn); return SEND_REQUIRED_NO; 802bebe: 2001 movs r0, #1 { char tempStr[30]; strncpy(tempStr, bufIn, 30); /* В запросе нет параметров, нужно формировать JSON ответ */ if (strpbrk(tempStr,"?") == 0) 802bec0: b975 cbnz r5, 802bee0 { memset(bufOut, 0, SEND_BUF_MAX_LEN); 802bec2: 4629 mov r1, r5 802bec4: f44f 62fa mov.w r2, #2000 ; 0x7d0 802bec8: 4620 mov r0, r4 802beca: f7f5 fe19 bl 8021b00 HTTP_GetSettings(bufOut); 802bece: 4620 mov r0, r4 802bed0: f001 fbcc bl 802d66c //printf(bufOut); *lenBufOut = strlen(bufOut); 802bed4: 4620 mov r0, r4 802bed6: f7f5 ffeb bl 8021eb0 802beda: 8030 strh r0, [r6, #0] return SEND_REQUIRED_YES; 802bedc: 4628 mov r0, r5 802bede: e7ff b.n 802bee0 { //HTTP_SetSettings(bufIn, lenBufIn); return SEND_REQUIRED_NO; } } 802bee0: b008 add sp, #32 802bee2: bd70 pop {r4, r5, r6, pc} 802bee4: 08040a03 .word 0x08040a03 0802bee8 : /** * @brief * @retval None */ int HTTP_InfoPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802bee8: b570 push {r4, r5, r6, lr} 802beea: 4602 mov r2, r0 802beec: b088 sub sp, #32 802beee: 460c mov r4, r1 char tempStr[30]; strncpy(tempStr, bufIn, 30); 802bef0: 4668 mov r0, sp 802bef2: 4611 mov r1, r2 802bef4: 221e movs r2, #30 /** * @brief * @retval None */ int HTTP_InfoPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802bef6: 461e mov r6, r3 char tempStr[30]; strncpy(tempStr, bufIn, 30); 802bef8: f7f6 f892 bl 8022020 /* В запросе нет параметров, нужно формировать JSON ответ */ if (strpbrk(tempStr,"?") == 0) 802befc: 4668 mov r0, sp 802befe: 490b ldr r1, [pc, #44] ; (802bf2c ) 802bf00: f7f6 f8c0 bl 8022084 802bf04: 4605 mov r5, r0 } /* В запросе есть параметры, нужно парсить и сохранять настройки */ else { //HTTP_SetInfo(bufIn, lenBufIn); return SEND_REQUIRED_NO; 802bf06: 2001 movs r0, #1 { char tempStr[30]; strncpy(tempStr, bufIn, 30); /* В запросе нет параметров, нужно формировать JSON ответ */ if (strpbrk(tempStr,"?") == 0) 802bf08: b975 cbnz r5, 802bf28 { memset(bufOut, 0, SEND_BUF_MAX_LEN); 802bf0a: 4629 mov r1, r5 802bf0c: f44f 62fa mov.w r2, #2000 ; 0x7d0 802bf10: 4620 mov r0, r4 802bf12: f7f5 fdf5 bl 8021b00 HTTP_GetInfo(bufOut); 802bf16: 4620 mov r0, r4 802bf18: f001 fd9a bl 802da50 *lenBufOut = strlen(bufOut); 802bf1c: 4620 mov r0, r4 802bf1e: f7f5 ffc7 bl 8021eb0 802bf22: 8030 strh r0, [r6, #0] return SEND_REQUIRED_YES; 802bf24: 4628 mov r0, r5 802bf26: e7ff b.n 802bf28 /* HTTP_SetSettings(bufIn, lenBufIn); return SEND_REQUIRED_NO; */ } } 802bf28: b008 add sp, #32 802bf2a: bd70 pop {r4, r5, r6, pc} 802bf2c: 08040a03 .word 0x08040a03 0802bf30 : /** * @brief Запуск/останов теста UPS */ void HTTP_UPSTest(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802bf30: b570 push {r4, r5, r6, lr} 802bf32: b08a sub sp, #40 ; 0x28 802bf34: 4606 mov r6, r0 802bf36: 460c mov r4, r1 char *valueLen = 0; char tempValue[20]; char tempValue2[20]; int8_t res = 0; memset(tempValue, 0, 20); 802bf38: 2214 movs r2, #20 802bf3a: 2100 movs r1, #0 802bf3c: 4668 mov r0, sp /** * @brief Запуск/останов теста UPS */ void HTTP_UPSTest(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802bf3e: 461d mov r5, r3 char *valueLen = 0; char tempValue[20]; char tempValue2[20]; int8_t res = 0; memset(tempValue, 0, 20); 802bf40: f7f5 fdde bl 8021b00 memset(tempValue2, 0, 20); 802bf44: 2214 movs r2, #20 802bf46: 2100 movs r1, #0 802bf48: a805 add r0, sp, #20 802bf4a: f7f5 fdd9 bl 8021b00 strcpy(bufOut, HTTP_200_OK); 802bf4e: 4932 ldr r1, [pc, #200] ; (802c018 ) 802bf50: 4620 mov r0, r4 802bf52: f7f5 ff4f bl 8021df4 value = strstr(bufIn, "func"); 802bf56: 4630 mov r0, r6 802bf58: 4930 ldr r1, [pc, #192] ; (802c01c ) 802bf5a: f7f6 fa29 bl 80223b0 valueLen = strpbrk(value, ":"); 802bf5e: 4930 ldr r1, [pc, #192] ; (802c020 ) 802bf60: f7f6 f890 bl 8022084 802bf64: 4606 mov r6, r0 strncpy(tempValue, (valueLen+1), (strlen(valueLen)-2)); 802bf66: f7f5 ffa3 bl 8021eb0 802bf6a: 1c71 adds r1, r6, #1 802bf6c: 1e82 subs r2, r0, #2 802bf6e: 4668 mov r0, sp 802bf70: f7f6 f856 bl 8022020 if (strcmp(tempValue, "\"stop\"") == 0){ 802bf74: 4668 mov r0, sp 802bf76: 492b ldr r1, [pc, #172] ; (802c024 ) 802bf78: f7f5 fe4e bl 8021c18 802bf7c: b998 cbnz r0, 802bfa6 res = ups_metac_service_pdu(ups_cancel_test); 802bf7e: 2008 movs r0, #8 802bf80: f7fd f872 bl 8029068 802bf84: b2c6 uxtb r6, r0 if(res == 1 || res == 0){ 802bf86: 2e01 cmp r6, #1 802bf88: d807 bhi.n 802bf9a strcat(bufOut, "Тест остановлен!"); 802bf8a: 4927 ldr r1, [pc, #156] ; (802c028 ) 802bf8c: 4620 mov r0, r4 802bf8e: f7f5 fe1d bl 8021bcc log_event_data(LOG_TEST_UPS, "Администратор (Остановлен)"); 802bf92: 2006 movs r0, #6 802bf94: 4925 ldr r1, [pc, #148] ; (802c02c ) 802bf96: f7fd fd61 bl 8029a5c } if(res == -1) 802bf9a: b276 sxtb r6, r6 802bf9c: 1c72 adds r2, r6, #1 802bf9e: d135 bne.n 802c00c strcat(bufOut, "Тест не удалось остановить!"); 802bfa0: 4620 mov r0, r4 802bfa2: 4923 ldr r1, [pc, #140] ; (802c030 ) 802bfa4: e030 b.n 802c008 *lenBufOut = strlen(bufOut); } else if (strcmp(tempValue, "\"discharge\"") == 0){ 802bfa6: 4668 mov r0, sp 802bfa8: 4922 ldr r1, [pc, #136] ; (802c034 ) 802bfaa: f7f5 fe35 bl 8021c18 802bfae: b908 cbnz r0, 802bfb4 res = ups_metac_service_pdu(ups_test_low_bat); 802bfb0: 2002 movs r0, #2 802bfb2: e017 b.n 802bfe4 } if(res == -1) strcat(bufOut, "Тест не удалось запустить!"); *lenBufOut = strlen(bufOut); } else if (strncmp(tempValue, "\"time\"", 6) == 0){ 802bfb4: 4668 mov r0, sp 802bfb6: 4920 ldr r1, [pc, #128] ; (802c038 ) 802bfb8: 2206 movs r2, #6 802bfba: f7f5 ffdb bl 8021f74 802bfbe: bb48 cbnz r0, 802c014 valueLen = strpbrk(tempValue, ":"); 802bfc0: 4917 ldr r1, [pc, #92] ; (802c020 ) 802bfc2: 4668 mov r0, sp 802bfc4: f7f6 f85e bl 8022084 802bfc8: 4606 mov r6, r0 strncpy(tempValue2, (valueLen+2), (strlen(valueLen)-2)); 802bfca: f7f5 ff71 bl 8021eb0 802bfce: 1cb1 adds r1, r6, #2 802bfd0: 1e82 subs r2, r0, #2 802bfd2: a805 add r0, sp, #20 802bfd4: f7f6 f824 bl 8022020 TimeParam = atoi(tempValue2); 802bfd8: a805 add r0, sp, #20 802bfda: f7f5 fc71 bl 80218c0 802bfde: 4b17 ldr r3, [pc, #92] ; (802c03c ) 802bfe0: 8018 strh r0, [r3, #0] res = ups_metac_service_pdu(ups_test_time); 802bfe2: 2003 movs r0, #3 802bfe4: f7fd f840 bl 8029068 802bfe8: b2c6 uxtb r6, r0 if(res == 1 || res == 0){ 802bfea: 2e01 cmp r6, #1 802bfec: d807 bhi.n 802bffe strcat(bufOut, "Тест запущен!"); 802bfee: 4914 ldr r1, [pc, #80] ; (802c040 ) 802bff0: 4620 mov r0, r4 802bff2: f7f5 fdeb bl 8021bcc log_event_data(LOG_TEST_UPS, "Администратор (Запущен)"); 802bff6: 2006 movs r0, #6 802bff8: 4912 ldr r1, [pc, #72] ; (802c044 ) 802bffa: f7fd fd2f bl 8029a5c } if(res == -1) 802bffe: b276 sxtb r6, r6 802c000: 1c73 adds r3, r6, #1 802c002: d103 bne.n 802c00c strcat(bufOut, "Тест не удалось запустить!"); 802c004: 4910 ldr r1, [pc, #64] ; (802c048 ) 802c006: 4620 mov r0, r4 802c008: f7f5 fde0 bl 8021bcc *lenBufOut = strlen(bufOut); 802c00c: 4620 mov r0, r4 802c00e: f7f5 ff4f bl 8021eb0 802c012: 8028 strh r0, [r5, #0] } } 802c014: b00a add sp, #40 ; 0x28 802c016: bd70 pop {r4, r5, r6, pc} 802c018: 08044669 .word 0x08044669 802c01c: 08040a05 .word 0x08040a05 802c020: 08044e49 .word 0x08044e49 802c024: 08040a0a .word 0x08040a0a 802c028: 08040a11 .word 0x08040a11 802c02c: 08040a30 .word 0x08040a30 802c030: 08040a62 .word 0x08040a62 802c034: 08040a95 .word 0x08040a95 802c038: 08040b17 .word 0x08040b17 802c03c: 20000b50 .word 0x20000b50 802c040: 08040aa1 .word 0x08040aa1 802c044: 08040aba .word 0x08040aba 802c048: 08040ae6 .word 0x08040ae6 0802c04c : /** * @brief Выклюение UPS */ void HTTP_UPSshutdown(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c04c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802c050: b09a sub sp, #104 ; 0x68 char *valueLenEnd = 0; char tempValue[50]; char tempValue2[50]; int8_t res = 0; memset(tempValue, 0, 50); 802c052: 2232 movs r2, #50 ; 0x32 /** * @brief Выклюение UPS */ void HTTP_UPSshutdown(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c054: 4605 mov r5, r0 802c056: 460c mov r4, r1 char *valueLenEnd = 0; char tempValue[50]; char tempValue2[50]; int8_t res = 0; memset(tempValue, 0, 50); 802c058: 4668 mov r0, sp 802c05a: 2100 movs r1, #0 /** * @brief Выклюение UPS */ void HTTP_UPSshutdown(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c05c: 461e mov r6, r3 char *valueLenEnd = 0; char tempValue[50]; char tempValue2[50]; int8_t res = 0; memset(tempValue, 0, 50); 802c05e: f7f5 fd4f bl 8021b00 strcpy(bufOut, HTTP_200_OK); 802c062: 4940 ldr r1, [pc, #256] ; (802c164 ) 802c064: 4620 mov r0, r4 802c066: f7f5 fec5 bl 8021df4 value = strstr(bufIn, "func"); 802c06a: 4628 mov r0, r5 802c06c: 493e ldr r1, [pc, #248] ; (802c168 ) 802c06e: f7f6 f99f bl 80223b0 valueLen = strpbrk(value, ":"); 802c072: 493e ldr r1, [pc, #248] ; (802c16c ) 802c074: f7f6 f806 bl 8022084 802c078: 4605 mov r5, r0 strncpy(tempValue, (valueLen+1), (strlen(valueLen)-2)); 802c07a: f7f5 ff19 bl 8021eb0 802c07e: 1c69 adds r1, r5, #1 802c080: 1e82 subs r2, r0, #2 802c082: 4668 mov r0, sp 802c084: f7f5 ffcc bl 8022020 if (strcmp(tempValue, "\"cancel\"") == 0){ 802c088: 4668 mov r0, sp 802c08a: 4939 ldr r1, [pc, #228] ; (802c170 ) 802c08c: f7f5 fdc4 bl 8021c18 802c090: b978 cbnz r0, 802c0b2 res = ups_metac_service_pdu(ups_cancel_shut_down); 802c092: 2007 movs r0, #7 802c094: f7fc ffe8 bl 8029068 802c098: b2c5 uxtb r5, r0 if(res == 1 || res == 0) 802c09a: 2d01 cmp r5, #1 802c09c: d803 bhi.n 802c0a6 strcat(bufOut, "Выключение ИБП отменено!"); 802c09e: 4620 mov r0, r4 802c0a0: 4934 ldr r1, [pc, #208] ; (802c174 ) 802c0a2: f7f5 fd93 bl 8021bcc if(res == -1) 802c0a6: b26d sxtb r5, r5 802c0a8: 1c68 adds r0, r5, #1 802c0aa: d154 bne.n 802c156 strcat(bufOut, "Выключение ИБП не удалось отменить!"); 802c0ac: 4620 mov r0, r4 802c0ae: 4932 ldr r1, [pc, #200] ; (802c178 ) 802c0b0: e04f b.n 802c152 *lenBufOut = strlen(bufOut); } else if (strncmp(tempValue, "\"off\"", 5) == 0){ 802c0b2: 4668 mov r0, sp 802c0b4: 4931 ldr r1, [pc, #196] ; (802c17c ) 802c0b6: 2205 movs r2, #5 802c0b8: f7f5 ff5c bl 8021f74 802c0bc: 4605 mov r5, r0 802c0be: 2800 cmp r0, #0 802c0c0: d14d bne.n 802c15e value = strstr(tempValue, "after"); 802c0c2: 492f ldr r1, [pc, #188] ; (802c180 ) 802c0c4: 4668 mov r0, sp 802c0c6: f7f6 f973 bl 80223b0 valueLen = strpbrk(value, ":"); 802c0ca: 4928 ldr r1, [pc, #160] ; (802c16c ) if(res == -1) strcat(bufOut, "Выключение ИБП не удалось отменить!"); *lenBufOut = strlen(bufOut); } else if (strncmp(tempValue, "\"off\"", 5) == 0){ value = strstr(tempValue, "after"); 802c0cc: 4680 mov r8, r0 valueLen = strpbrk(value, ":"); 802c0ce: f7f5 ffd9 bl 8022084 valueLenEnd = strpbrk(value, ","); 802c0d2: 492c ldr r1, [pc, #176] ; (802c184 ) strcat(bufOut, "Выключение ИБП не удалось отменить!"); *lenBufOut = strlen(bufOut); } else if (strncmp(tempValue, "\"off\"", 5) == 0){ value = strstr(tempValue, "after"); valueLen = strpbrk(value, ":"); 802c0d4: 4607 mov r7, r0 valueLenEnd = strpbrk(value, ","); 802c0d6: 4640 mov r0, r8 802c0d8: f7f5 ffd4 bl 8022084 memset(tempValue2, 0, 50); 802c0dc: 4629 mov r1, r5 802c0de: 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, ","); 802c0e0: 4680 mov r8, r0 memset(tempValue2, 0, 50); 802c0e2: a80d add r0, sp, #52 ; 0x34 802c0e4: f7f5 fd0c bl 8021b00 strncpy(tempValue2, (valueLen+2), (valueLenEnd - valueLen - 2)); 802c0e8: ebc7 0208 rsb r2, r7, r8 802c0ec: 3a02 subs r2, #2 802c0ee: 1cb9 adds r1, r7, #2 802c0f0: a80d add r0, sp, #52 ; 0x34 802c0f2: f7f5 ff95 bl 8022020 TimeParam = atoi(tempValue2); 802c0f6: a80d add r0, sp, #52 ; 0x34 802c0f8: f7f5 fbe2 bl 80218c0 802c0fc: 4b22 ldr r3, [pc, #136] ; (802c188 ) value = strstr(tempValue, "to"); 802c0fe: 4923 ldr r1, [pc, #140] ; (802c18c ) value = strstr(tempValue, "after"); valueLen = strpbrk(value, ":"); valueLenEnd = strpbrk(value, ","); memset(tempValue2, 0, 50); strncpy(tempValue2, (valueLen+2), (valueLenEnd - valueLen - 2)); TimeParam = atoi(tempValue2); 802c100: 8018 strh r0, [r3, #0] value = strstr(tempValue, "to"); 802c102: 4668 mov r0, sp 802c104: f7f6 f954 bl 80223b0 valueLen = strpbrk(value, ":"); 802c108: 4918 ldr r1, [pc, #96] ; (802c16c ) 802c10a: f7f5 ffbb bl 8022084 memset(tempValue2, 0, 50); 802c10e: 4629 mov r1, r5 802c110: 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, ":"); 802c112: 4607 mov r7, r0 memset(tempValue2, 0, 50); 802c114: a80d add r0, sp, #52 ; 0x34 802c116: f7f5 fcf3 bl 8021b00 strncpy(tempValue2, (valueLen+2), (strlen(valueLen) - 2)); 802c11a: 4638 mov r0, r7 802c11c: f7f5 fec8 bl 8021eb0 802c120: 1cb9 adds r1, r7, #2 802c122: 1e82 subs r2, r0, #2 802c124: a80d add r0, sp, #52 ; 0x34 802c126: f7f5 ff7b bl 8022020 TimeParam2 = atoi(tempValue2); 802c12a: a80d add r0, sp, #52 ; 0x34 802c12c: f7f5 fbc8 bl 80218c0 802c130: 4b17 ldr r3, [pc, #92] ; (802c190 ) 802c132: 8018 strh r0, [r3, #0] res = ups_metac_service_pdu(ups_shutdown_restore); 802c134: 2006 movs r0, #6 802c136: f7fc ff97 bl 8029068 802c13a: b2c5 uxtb r5, r0 if(res == 1 || res == 0) 802c13c: 2d01 cmp r5, #1 802c13e: d803 bhi.n 802c148 strcat(bufOut, "Перезагрузка ИБП!"); 802c140: 4620 mov r0, r4 802c142: 4914 ldr r1, [pc, #80] ; (802c194 ) 802c144: f7f5 fd42 bl 8021bcc if(res == -1) 802c148: b26d sxtb r5, r5 802c14a: 1c69 adds r1, r5, #1 802c14c: d103 bne.n 802c156 strcat(bufOut, "Отмена перезагрузки ИБП!"); 802c14e: 4912 ldr r1, [pc, #72] ; (802c198 ) 802c150: 4620 mov r0, r4 802c152: f7f5 fd3b bl 8021bcc *lenBufOut = strlen(bufOut); 802c156: 4620 mov r0, r4 802c158: f7f5 feaa bl 8021eb0 802c15c: 8030 strh r0, [r6, #0] } } 802c15e: b01a add sp, #104 ; 0x68 802c160: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802c164: 08044669 .word 0x08044669 802c168: 08040a05 .word 0x08040a05 802c16c: 08044e49 .word 0x08044e49 802c170: 08040b1e .word 0x08040b1e 802c174: 08040b27 .word 0x08040b27 802c178: 08040b55 .word 0x08040b55 802c17c: 08040b97 .word 0x08040b97 802c180: 08040b9d .word 0x08040b9d 802c184: 08039b85 .word 0x08039b85 802c188: 20000b50 .word 0x20000b50 802c18c: 08040ba3 .word 0x08040ba3 802c190: 20000b1a .word 0x20000b1a 802c194: 08040ba6 .word 0x08040ba6 802c198: 08040bc7 .word 0x08040bc7 0802c19c : /** * @brief Проверка пароля для перехода в режим bootloader * @retval None */ void HTTP_ConfirmBootPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c19c: b500 push {lr} 802c19e: b093 sub sp, #76 ; 0x4c 802c1a0: 4601 mov r1, r0 char tempStr[50]; strncpy(tempStr, bufIn, 50); 802c1a2: 2232 movs r2, #50 ; 0x32 802c1a4: a805 add r0, sp, #20 802c1a6: f7f5 ff3b bl 8022020 char value[20]; uint8_t valueLen; memset(value, 0, 20); 802c1aa: 4668 mov r0, sp 802c1ac: 2100 movs r1, #0 802c1ae: 2214 movs r2, #20 802c1b0: f7f5 fca6 bl 8021b00 //if (strcmp(BOOTLOADER_PASWORD, value) == 0) { // *bufOut = '1'; /* Запускаем задачу отложенной перезагрузки. Контроллер должен успеть отправить ответ серверу о статусе пароля */ HTTP_StartResetTask(true); 802c1b4: 2001 movs r0, #1 802c1b6: f001 fe37 bl 802de28 /* else *bufOut = '0';*/ //*lenBufOut = 1; } } 802c1ba: b013 add sp, #76 ; 0x4c 802c1bc: bd00 pop {pc} 802c1be: 0000 movs r0, r0 0802c1c0 : /* Wrong login or pass, return */ return SEND_REQUIRED_NO; } void HTTP_LOGIN(char *bufOut, uint16_t *lenBufOut) { 802c1c0: b530 push {r4, r5, lr} 802c1c2: b093 sub sp, #76 ; 0x4c 802c1c4: 4604 mov r4, r0 802c1c6: 460d mov r5, r1 char tempStr[50]; uint8_t valueLen; char WebLogin[MAX_WEB_LOGIN_LEN]; GetUserLogin(ADMIN, WebLogin, &valueLen); 802c1c8: 2000 movs r0, #0 802c1ca: a902 add r1, sp, #8 802c1cc: f10d 0207 add.w r2, sp, #7 802c1d0: f7fb fe0a bl 8027de8 memset(tempStr, 0, 50); 802c1d4: 2100 movs r1, #0 802c1d6: 2232 movs r2, #50 ; 0x32 802c1d8: a805 add r0, sp, #20 802c1da: f7f5 fc91 bl 8021b00 /* TODO replace global flag with user-pass-cookie */ Authenticated = true; 802c1de: 4b1b ldr r3, [pc, #108] ; (802c24c ) 802c1e0: 2201 movs r2, #1 802c1e2: 701a strb r2, [r3, #0] /* Generate cookie */ sprintf(tempStr, "%X", (unsigned int)GetRandomNumber()); 802c1e4: f7f9 ff72 bl 80260cc 802c1e8: 4919 ldr r1, [pc, #100] ; (802c250 ) 802c1ea: 4602 mov r2, r0 802c1ec: a805 add r0, sp, #20 802c1ee: f7fb fb11 bl 8027814 /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802c1f2: a905 add r1, sp, #20 802c1f4: 4817 ldr r0, [pc, #92] ; (802c254 ) 802c1f6: f7f5 fdfd bl 8021df4 sprintf(tempStr, "%X", (unsigned int)GetRandomNumber()); /* Set users cookie */ HTTP_SetUserCookie(tempStr, ADMIN); HTTP_UpdateUserLoginTime(ADMIN); 802c1fa: 2000 movs r0, #0 802c1fc: f7ff fcc2 bl 802bb84 /* Send login and cookie back */ strcpy(bufOut, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\nSet-Cookie: uname="); 802c200: 4915 ldr r1, [pc, #84] ; (802c258 ) 802c202: 4620 mov r0, r4 802c204: f7f5 fdf6 bl 8021df4 strcat(bufOut, WebLogin); 802c208: a902 add r1, sp, #8 802c20a: 4620 mov r0, r4 802c20c: f7f5 fcde bl 8021bcc strcat(bufOut, "\r\nSet-Cookie: id="); 802c210: 4912 ldr r1, [pc, #72] ; (802c25c ) 802c212: 4620 mov r0, r4 802c214: f7f5 fcda bl 8021bcc strcat(bufOut, tempStr); 802c218: a905 add r1, sp, #20 802c21a: 4620 mov r0, r4 802c21c: f7f5 fcd6 bl 8021bcc strcat(bufOut, "\r\nSet-Cookie: role=0"); 802c220: 490f ldr r1, [pc, #60] ; (802c260 ) 802c222: 4620 mov r0, r4 802c224: f7f5 fcd2 bl 8021bcc strcat(bufOut, "\r\nSet-Cookie: auth=0"); 802c228: 490e ldr r1, [pc, #56] ; (802c264 ) 802c22a: 4620 mov r0, r4 802c22c: f7f5 fcce bl 8021bcc strcat(bufOut, "\r\n\r\n"); 802c230: 490d ldr r1, [pc, #52] ; (802c268 ) 802c232: 4620 mov r0, r4 802c234: f7f5 fcca bl 8021bcc strcat(bufOut,"\r\n\r\n"); 802c238: 490c ldr r1, [pc, #48] ; (802c26c ) 802c23a: 4620 mov r0, r4 802c23c: f7f5 fcc6 bl 8021bcc *lenBufOut = strlen(bufOut); 802c240: 4620 mov r0, r4 802c242: f7f5 fe35 bl 8021eb0 802c246: 8028 strh r0, [r5, #0] } 802c248: b013 add sp, #76 ; 0x4c 802c24a: bd30 pop {r4, r5, pc} 802c24c: 20000d23 .word 0x20000d23 802c250: 080409f6 .word 0x080409f6 802c254: 2000e23c .word 0x2000e23c 802c258: 08040bf5 .word 0x08040bf5 802c25c: 08040c31 .word 0x08040c31 802c260: 08040c43 .word 0x08040c43 802c264: 08040c58 .word 0x08040c58 802c268: 08041130 .word 0x08041130 802c26c: 08040c6d .word 0x08040c6d 0802c270 : /** * @brief * @retval None */ uint8_t GetParamValue(char *inStr, char *paramName, char *paramValue, uint8_t *paramLen) { 802c270: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802c274: 4690 mov r8, r2 802c276: 461f mov r7, r3 char *beginValue = 0; char *endValue = 0; int len = 0; char *strPtr = 0; strPtr = strstr(inStr, paramName); 802c278: f7f6 f89a bl 80223b0 if (strPtr != 0) 802c27c: 4605 mov r5, r0 802c27e: b1e0 cbz r0, 802c2ba { beginValue = strpbrk(strPtr,"="); 802c280: 490f ldr r1, [pc, #60] ; (802c2c0 ) 802c282: f7f5 feff bl 8022084 endValue = strpbrk(strPtr,"&"); 802c286: 490f ldr r1, [pc, #60] ; (802c2c4 ) strPtr = strstr(inStr, paramName); if (strPtr != 0) { beginValue = strpbrk(strPtr,"="); 802c288: 4606 mov r6, r0 endValue = strpbrk(strPtr,"&"); 802c28a: 4628 mov r0, r5 802c28c: f7f5 fefa bl 8022084 if (endValue == 0) 802c290: 4604 mov r4, r0 802c292: b920 cbnz r0, 802c29e endValue = strpbrk(strPtr," "); 802c294: 4628 mov r0, r5 802c296: 490c ldr r1, [pc, #48] ; (802c2c8 ) 802c298: f7f5 fef4 bl 8022084 802c29c: 4604 mov r4, r0 len = endValue - beginValue - 1; 802c29e: 1ba5 subs r5, r4, r6 802c2a0: 3d01 subs r5, #1 strncpy(paramValue, beginValue + 1, len); 802c2a2: 4640 mov r0, r8 802c2a4: 1c71 adds r1, r6, #1 802c2a6: 462a mov r2, r5 802c2a8: f7f5 feba bl 8022020 *endValue = '0'; 802c2ac: 2330 movs r3, #48 ; 0x30 802c2ae: 7023 strb r3, [r4, #0] *beginValue = '0'; *paramLen = len; return 1; 802c2b0: 2001 movs r0, #1 if (endValue == 0) endValue = strpbrk(strPtr," "); len = endValue - beginValue - 1; strncpy(paramValue, beginValue + 1, len); *endValue = '0'; *beginValue = '0'; 802c2b2: 7033 strb r3, [r6, #0] *paramLen = len; 802c2b4: 703d strb r5, [r7, #0] return 1; 802c2b6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} } else { *paramLen = 0; 802c2ba: 7038 strb r0, [r7, #0] return 0; } } 802c2bc: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802c2c0: 08040de3 .word 0x08040de3 802c2c4: 08040cd9 .word 0x08040cd9 802c2c8: 08039ade .word 0x08039ade 0802c2cc : /** * @brief Проверка пароля для входа в Web * @retval None */ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c2cc: b5f0 push {r4, r5, r6, r7, lr} 802c2ce: b0a9 sub sp, #164 ; 0xa4 802c2d0: 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); 802c2d2: 2214 movs r2, #20 /** * @brief Проверка пароля для входа в Web * @retval None */ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c2d4: 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); 802c2d6: a807 add r0, sp, #28 802c2d8: 2100 movs r1, #0 /** * @brief Проверка пароля для входа в Web * @retval None */ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c2da: 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); 802c2dc: f7f5 fc10 bl 8021b00 memset(password, 0, 20); 802c2e0: 2100 movs r1, #0 802c2e2: 2214 movs r2, #20 802c2e4: a80c add r0, sp, #48 ; 0x30 802c2e6: f7f5 fc0b bl 8021b00 memset(tempStr, 0, 50); 802c2ea: 2100 movs r1, #0 802c2ec: 2232 movs r2, #50 ; 0x32 802c2ee: a81b add r0, sp, #108 ; 0x6c 802c2f0: f7f5 fc06 bl 8021b00 /* Get first 50 bytes of string */ strncpy(tempStr, bufIn, 49); 802c2f4: 2231 movs r2, #49 ; 0x31 802c2f6: 4621 mov r1, r4 802c2f8: a81b add r0, sp, #108 ; 0x6c 802c2fa: f7f5 fe91 bl 8022020 /* Add " " to the string in order GetParamValue() can be able to parse the param */ strcat(tempStr, " "); if (GetParamValue(tempStr, "login=", login, &valueLen) && 802c2fe: 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, " "); 802c302: 4941 ldr r1, [pc, #260] ; (802c408 ) 802c304: a81b add r0, sp, #108 ; 0x6c 802c306: f7f5 fc61 bl 8021bcc if (GetParamValue(tempStr, "login=", login, &valueLen) && 802c30a: a81b add r0, sp, #108 ; 0x6c 802c30c: 493f ldr r1, [pc, #252] ; (802c40c ) 802c30e: aa07 add r2, sp, #28 802c310: 4633 mov r3, r6 802c312: f7ff ffad bl 802c270 802c316: b920 cbnz r0, 802c322 } } /* No valid login and pass found */ /* TODO replace global flag with user-pass-cookie*/ Authenticated = false; 802c318: 4b3d ldr r3, [pc, #244] ; (802c410 ) 802c31a: 2200 movs r2, #0 802c31c: 701a strb r2, [r3, #0] /* Wrong login or pass, return */ return SEND_REQUIRED_NO; 802c31e: 2001 movs r0, #1 802c320: e070 b.n 802c404 /* 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)) 802c322: a81b add r0, sp, #108 ; 0x6c 802c324: 493b ldr r1, [pc, #236] ; (802c414 ) 802c326: aa0c add r2, sp, #48 ; 0x30 802c328: 4633 mov r3, r6 802c32a: f7ff ffa1 bl 802c270 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) && 802c32e: 2800 cmp r0, #0 802c330: d0f2 beq.n 802c318 802c332: 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); 802c334: 4620 mov r0, r4 802c336: a904 add r1, sp, #16 802c338: 4632 mov r2, r6 802c33a: f7fb fd55 bl 8027de8 GetUserPassword(user_id, WebPassword, &valueLen); 802c33e: 4620 mov r0, r4 802c340: a901 add r1, sp, #4 802c342: 4632 mov r2, r6 802c344: f7fb fd66 bl 8027e14 /* Check login and password */ if ((strncmp(WebLogin, login, MAX_WEB_LOGIN_LEN) == 0) && 802c348: a804 add r0, sp, #16 802c34a: a907 add r1, sp, #28 802c34c: 220b movs r2, #11 802c34e: f7f5 fe11 bl 8021f74 802c352: 2800 cmp r0, #0 802c354: d151 bne.n 802c3fa (strncmp(WebPassword, password, MAX_WEB_PASSWD_LEN) == 0)) { 802c356: a801 add r0, sp, #4 802c358: a90c add r1, sp, #48 ; 0x30 802c35a: 220b movs r2, #11 802c35c: f7f5 fe0a 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) && 802c360: 2800 cmp r0, #0 802c362: d14a bne.n 802c3fa if (user_id >= 1) { } /* TODO replace global flag with user-pass-cookie */ Authenticated = true; 802c364: 4b2a ldr r3, [pc, #168] ; (802c410 ) 802c366: 2201 movs r2, #1 802c368: 701a strb r2, [r3, #0] /* Generate cookie */ sprintf(tempStr, "%X", (unsigned int)GetRandomNumber()); 802c36a: f7f9 feaf bl 80260cc 802c36e: 492a ldr r1, [pc, #168] ; (802c418 ) 802c370: 4602 mov r2, r0 802c372: a81b add r0, sp, #108 ; 0x6c 802c374: f7fb fa4e bl 8027814 /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802c378: 4b28 ldr r3, [pc, #160] ; (802c41c ) 802c37a: 2014 movs r0, #20 802c37c: fb00 3004 mla r0, r0, r4, r3 802c380: a91b add r1, sp, #108 ; 0x6c 802c382: f7f5 fd37 bl 8021df4 sprintf(tempStr, "%X", (unsigned int)GetRandomNumber()); /* Set users cookie */ HTTP_SetUserCookie(tempStr, user_id); HTTP_UpdateUserLoginTime(user_id); 802c386: 4620 mov r0, r4 802c388: f7ff fbfc bl 802bb84 /* Send login and cookie back */ strcpy(bufOut, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\nSet-Cookie: uname="); 802c38c: 4924 ldr r1, [pc, #144] ; (802c420 ) 802c38e: 4628 mov r0, r5 802c390: f7f5 fd30 bl 8021df4 strcat(bufOut, WebLogin); 802c394: a904 add r1, sp, #16 802c396: 4628 mov r0, r5 802c398: f7f5 fc18 bl 8021bcc strcat(bufOut, "\r\nSet-Cookie: id="); 802c39c: 4921 ldr r1, [pc, #132] ; (802c424 ) 802c39e: 4628 mov r0, r5 802c3a0: f7f5 fc14 bl 8021bcc strcat(bufOut, tempStr); 802c3a4: a91b add r1, sp, #108 ; 0x6c 802c3a6: 4628 mov r0, r5 802c3a8: f7f5 fc10 bl 8021bcc sprintf(tempStr, "%d", user_id); 802c3ac: 4622 mov r2, r4 802c3ae: 491e ldr r1, [pc, #120] ; (802c428 ) 802c3b0: a81b add r0, sp, #108 ; 0x6c 802c3b2: f7fb fa2f bl 8027814 strcat(bufOut, "\r\nSet-Cookie: role="); 802c3b6: 491d ldr r1, [pc, #116] ; (802c42c ) 802c3b8: 4628 mov r0, r5 802c3ba: f7f5 fc07 bl 8021bcc strcat(bufOut, tempStr); 802c3be: a91b add r1, sp, #108 ; 0x6c 802c3c0: 4628 mov r0, r5 802c3c2: f7f5 fc03 bl 8021bcc strcat(bufOut, "\r\n\r\n"); 802c3c6: 491a ldr r1, [pc, #104] ; (802c430 ) 802c3c8: 4628 mov r0, r5 802c3ca: f7f5 fbff bl 8021bcc strcat(bufOut,"\r\n\r\n"); 802c3ce: 4919 ldr r1, [pc, #100] ; (802c434 ) 802c3d0: 4628 mov r0, r5 802c3d2: f7f5 fbfb bl 8021bcc *lenBufOut = strlen(bufOut); 802c3d6: 4628 mov r0, r5 802c3d8: f7f5 fd6a bl 8021eb0 switch (user_id) { case 0: snprintf(buf, sizeof(buf), "Администратор"); break; case 1: snprintf(buf, sizeof(buf), "Пользователь"); 802c3dc: 2128 movs r1, #40 ; 0x28 strcat(bufOut, "\r\n\r\n"); strcat(bufOut,"\r\n\r\n"); *lenBufOut = strlen(bufOut); switch (user_id) { 802c3de: 2c01 cmp r4, #1 case 0: snprintf(buf, sizeof(buf), "Администратор"); 802c3e0: bf14 ite ne 802c3e2: 4a15 ldrne r2, [pc, #84] ; (802c438 ) break; case 1: snprintf(buf, sizeof(buf), "Пользователь"); 802c3e4: 4a15 ldreq r2, [pc, #84] ; (802c43c ) strcat(bufOut, "\r\nSet-Cookie: role="); strcat(bufOut, tempStr); strcat(bufOut, "\r\n\r\n"); strcat(bufOut,"\r\n\r\n"); *lenBufOut = strlen(bufOut); 802c3e6: 8038 strh r0, [r7, #0] switch (user_id) { case 0: snprintf(buf, sizeof(buf), "Администратор"); break; case 1: snprintf(buf, sizeof(buf), "Пользователь"); 802c3e8: a811 add r0, sp, #68 ; 0x44 802c3ea: f7fb f9f5 bl 80277d8 default: snprintf(buf, sizeof(buf), "", login); break; } log_event_data(LOG_LOGIN, buf); 802c3ee: 2005 movs r0, #5 802c3f0: a911 add r1, sp, #68 ; 0x44 802c3f2: f7fd fb33 bl 8029a5c /* Запускаем задачу-таймер логаута. */ /* TODO отправить ответ серверу о статусе пароля */ return SEND_REQUIRED_YES; 802c3f6: 2000 movs r0, #0 802c3f8: e004 b.n 802c404 strcat(tempStr, " "); if (GetParamValue(tempStr, "login=", login, &valueLen) && GetParamValue(tempStr, "password=", password, &valueLen)) { for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { 802c3fa: 3401 adds r4, #1 802c3fc: b2e4 uxtb r4, r4 802c3fe: 2c02 cmp r4, #2 802c400: d08a beq.n 802c318 802c402: e797 b.n 802c334 /* TODO replace global flag with user-pass-cookie*/ Authenticated = false; /* Wrong login or pass, return */ return SEND_REQUIRED_NO; } 802c404: b029 add sp, #164 ; 0xa4 802c406: bdf0 pop {r4, r5, r6, r7, pc} 802c408: 08039ade .word 0x08039ade 802c40c: 08040cdb .word 0x08040cdb 802c410: 20000d23 .word 0x20000d23 802c414: 08040ce2 .word 0x08040ce2 802c418: 080409f6 .word 0x080409f6 802c41c: 2000e23c .word 0x2000e23c 802c420: 08040bf5 .word 0x08040bf5 802c424: 08040c31 .word 0x08040c31 802c428: 080399a9 .word 0x080399a9 802c42c: 08040cec .word 0x08040cec 802c430: 08041130 .word 0x08041130 802c434: 08040c6d .word 0x08040c6d 802c438: 08039ab8 .word 0x08039ab8 802c43c: 08040d00 .word 0x08040d00 0802c440 : /** * @brief * @retval None */ void HTTP_SetInfo(char *buf, uint16_t lenBuf) { 802c440: b530 push {r4, r5, lr} uint8_t valueLen = 0; 802c442: 2400 movs r4, #0 /** * @brief * @retval None */ void HTTP_SetInfo(char *buf, uint16_t lenBuf) { 802c444: b0bb sub sp, #236 ; 0xec 802c446: 4605 mov r5, r0 char value[110]; char str[110]; // ClearParamString(buf); memset(value, 0, len); 802c448: 4621 mov r1, r4 802c44a: 226e movs r2, #110 ; 0x6e 802c44c: a802 add r0, sp, #8 * @brief * @retval None */ void HTTP_SetInfo(char *buf, uint16_t lenBuf) { uint8_t valueLen = 0; 802c44e: f88d 4007 strb.w r4, [sp, #7] char value[110]; char str[110]; // ClearParamString(buf); memset(value, 0, len); 802c452: f7f5 fb55 bl 8021b00 /* Владелец */ GetParamValue(buf, "owner=", value, &valueLen); 802c456: f10d 0307 add.w r3, sp, #7 802c45a: aa02 add r2, sp, #8 802c45c: 4628 mov r0, r5 802c45e: 491e ldr r1, [pc, #120] ; (802c4d8 ) 802c460: f7ff ff06 bl 802c270 url_decode(str, sizeof(str), value); 802c464: 216e movs r1, #110 ; 0x6e 802c466: aa02 add r2, sp, #8 802c468: a81e add r0, sp, #120 ; 0x78 802c46a: f7fc feb9 bl 80291e0 SetOwner(str); 802c46e: a81e add r0, sp, #120 ; 0x78 802c470: f7fb fefc bl 802826c memset(value, 0, len); 802c474: 4621 mov r1, r4 802c476: 226e movs r2, #110 ; 0x6e 802c478: a802 add r0, sp, #8 802c47a: f7f5 fb41 bl 8021b00 /* Владелец */ GetParamValue(buf, "sysLocation=", value, &valueLen); 802c47e: f10d 0307 add.w r3, sp, #7 802c482: aa02 add r2, sp, #8 802c484: 4628 mov r0, r5 802c486: 4915 ldr r1, [pc, #84] ; (802c4dc ) 802c488: f7ff fef2 bl 802c270 url_decode(str, sizeof(str), value); 802c48c: 216e movs r1, #110 ; 0x6e 802c48e: aa02 add r2, sp, #8 802c490: a81e add r0, sp, #120 ; 0x78 802c492: f7fc fea5 bl 80291e0 SetLocation(str); 802c496: a81e add r0, sp, #120 ; 0x78 802c498: f7fb fef8 bl 802828c memset(value, 0, len); 802c49c: 4621 mov r1, r4 802c49e: 226e movs r2, #110 ; 0x6e 802c4a0: a802 add r0, sp, #8 802c4a2: f7f5 fb2d bl 8021b00 /* Комментарий */ GetParamValue(buf, "comment=", value, &valueLen); 802c4a6: f10d 0307 add.w r3, sp, #7 802c4aa: aa02 add r2, sp, #8 802c4ac: 4628 mov r0, r5 802c4ae: 490c ldr r1, [pc, #48] ; (802c4e0 ) 802c4b0: f7ff fede bl 802c270 url_decode(str, sizeof(str), value); 802c4b4: 216e movs r1, #110 ; 0x6e 802c4b6: aa02 add r2, sp, #8 802c4b8: a81e add r0, sp, #120 ; 0x78 802c4ba: f7fc fe91 bl 80291e0 SetComment(str); 802c4be: a81e add r0, sp, #120 ; 0x78 802c4c0: f7fb fef2 bl 80282a8 memset(value, 0, len); 802c4c4: 4621 mov r1, r4 802c4c6: 226e movs r2, #110 ; 0x6e 802c4c8: a802 add r0, sp, #8 802c4ca: f7f5 fb19 bl 8021b00 HTTP_SaveSettings(); 802c4ce: f001 fc75 bl 802ddbc } 802c4d2: b03b add sp, #236 ; 0xec 802c4d4: bd30 pop {r4, r5, pc} 802c4d6: bf00 nop 802c4d8: 08040d19 .word 0x08040d19 802c4dc: 08040d20 .word 0x08040d20 802c4e0: 08040d2d .word 0x08040d2d 0802c4e4 : /** * @brief * @retval None */ void HTTP_SetSettings(char *buf, uint16_t lenBuf) { 802c4e4: b530 push {r4, r5, lr} uint8_t valueLen = 0; 802c4e6: 2500 movs r5, #0 /** * @brief * @retval None */ void HTTP_SetSettings(char *buf, uint16_t lenBuf) { 802c4e8: b0a3 sub sp, #140 ; 0x8c 802c4ea: 4604 mov r4, r0 //printf(buf); //ClearParamString(buf); memset(value, 0, len); 802c4ec: 2240 movs r2, #64 ; 0x40 802c4ee: 4629 mov r1, r5 802c4f0: a802 add r0, sp, #8 * @brief * @retval None */ void HTTP_SetSettings(char *buf, uint16_t lenBuf) { uint8_t valueLen = 0; 802c4f2: f88d 5007 strb.w r5, [sp, #7] //printf(buf); //ClearParamString(buf); memset(value, 0, len); 802c4f6: f7f5 fb03 bl 8021b00 memset(str, 0, MAX_WEB_PARAM_LEN); 802c4fa: 2240 movs r2, #64 ; 0x40 802c4fc: 4629 mov r1, r5 802c4fe: a812 add r0, sp, #72 ; 0x48 802c500: f7f5 fafe bl 8021b00 /* SNMP */ GetParamValue(buf, "read_community=", value, &valueLen); 802c504: f10d 0307 add.w r3, sp, #7 802c508: 49b6 ldr r1, [pc, #728] ; (802c7e4 ) 802c50a: aa02 add r2, sp, #8 802c50c: 4620 mov r0, r4 802c50e: f7ff feaf bl 802c270 SetReadCommunity(value); 802c512: a802 add r0, sp, #8 802c514: f7fb fe58 bl 80281c8 memset(value, 0, len); 802c518: 2240 movs r2, #64 ; 0x40 802c51a: 4629 mov r1, r5 802c51c: a802 add r0, sp, #8 802c51e: f7f5 faef bl 8021b00 GetParamValue(buf, "write_community=", value, &valueLen); 802c522: f10d 0307 add.w r3, sp, #7 802c526: 49b0 ldr r1, [pc, #704] ; (802c7e8 ) 802c528: aa02 add r2, sp, #8 802c52a: 4620 mov r0, r4 802c52c: f7ff fea0 bl 802c270 SetWriteCommunity(value); 802c530: a802 add r0, sp, #8 802c532: f7fb fe4f bl 80281d4 memset(value, 0, len); 802c536: 2240 movs r2, #64 ; 0x40 802c538: 4629 mov r1, r5 802c53a: a802 add r0, sp, #8 802c53c: f7f5 fae0 bl 8021b00 GetParamValue(buf, "managerIP=", value, &valueLen); 802c540: f10d 0307 add.w r3, sp, #7 802c544: 49a9 ldr r1, [pc, #676] ; (802c7ec ) 802c546: aa02 add r2, sp, #8 802c548: 4620 mov r0, r4 802c54a: f7ff fe91 bl 802c270 SetManagerIp(value); 802c54e: a802 add r0, sp, #8 802c550: f7fb fe46 bl 80281e0 memset(value, 0, len); 802c554: 2240 movs r2, #64 ; 0x40 802c556: 4629 mov r1, r5 802c558: a802 add r0, sp, #8 802c55a: f7f5 fad1 bl 8021b00 GetParamValue(buf, "managerIP2=", value, &valueLen); 802c55e: f10d 0307 add.w r3, sp, #7 802c562: 49a3 ldr r1, [pc, #652] ; (802c7f0 ) 802c564: aa02 add r2, sp, #8 802c566: 4620 mov r0, r4 802c568: f7ff fe82 bl 802c270 SetManagerIp2(value); 802c56c: a802 add r0, sp, #8 802c56e: f7fb fe45 bl 80281fc memset(value, 0, len); 802c572: 2240 movs r2, #64 ; 0x40 802c574: 4629 mov r1, r5 802c576: a802 add r0, sp, #8 802c578: f7f5 fac2 bl 8021b00 GetParamValue(buf, "managerIP3=", value, &valueLen); 802c57c: f10d 0307 add.w r3, sp, #7 802c580: 499c ldr r1, [pc, #624] ; (802c7f4 ) 802c582: aa02 add r2, sp, #8 802c584: 4620 mov r0, r4 802c586: f7ff fe73 bl 802c270 SetManagerIp3(value); 802c58a: a802 add r0, sp, #8 802c58c: f7fb fe44 bl 8028218 memset(value, 0, len); 802c590: 2240 movs r2, #64 ; 0x40 802c592: 4629 mov r1, r5 802c594: a802 add r0, sp, #8 802c596: f7f5 fab3 bl 8021b00 GetParamValue(buf, "managerIP4=", value, &valueLen); 802c59a: f10d 0307 add.w r3, sp, #7 802c59e: 4996 ldr r1, [pc, #600] ; (802c7f8 ) 802c5a0: aa02 add r2, sp, #8 802c5a2: 4620 mov r0, r4 802c5a4: f7ff fe64 bl 802c270 SetManagerIp4(value); 802c5a8: a802 add r0, sp, #8 802c5aa: f7fb fe43 bl 8028234 memset(value, 0, len); 802c5ae: 2240 movs r2, #64 ; 0x40 802c5b0: 4629 mov r1, r5 802c5b2: a802 add r0, sp, #8 802c5b4: f7f5 faa4 bl 8021b00 GetParamValue(buf, "managerIP5=", value, &valueLen); 802c5b8: f10d 0307 add.w r3, sp, #7 802c5bc: 498f ldr r1, [pc, #572] ; (802c7fc ) 802c5be: aa02 add r2, sp, #8 802c5c0: 4620 mov r0, r4 802c5c2: f7ff fe55 bl 802c270 SetManagerIp5(value); 802c5c6: a802 add r0, sp, #8 802c5c8: f7fb fe42 bl 8028250 memset(value, 0, len); 802c5cc: 2240 movs r2, #64 ; 0x40 802c5ce: 4629 mov r1, r5 802c5d0: a802 add r0, sp, #8 802c5d2: f7f5 fa95 bl 8021b00 /* Сетевые параметры */ GetParamValue(buf, "dhcp=", value, &valueLen); 802c5d6: 498a ldr r1, [pc, #552] ; (802c800 ) 802c5d8: aa02 add r2, sp, #8 802c5da: f10d 0307 add.w r3, sp, #7 802c5de: 4620 mov r0, r4 802c5e0: f7ff fe46 bl 802c270 SetDhcpStateStr(value); 802c5e4: a802 add r0, sp, #8 802c5e6: f7fb fdc1 bl 802816c if (strncmp(value, "on", 2) != 0) // Если dhcp off устанавливаем параметры 802c5ea: a802 add r0, sp, #8 802c5ec: 4985 ldr r1, [pc, #532] ; (802c804 ) 802c5ee: 2202 movs r2, #2 802c5f0: f7f5 fcc0 bl 8021f74 802c5f4: 2800 cmp r0, #0 802c5f6: d031 beq.n 802c65c { memset(value, 0, len); 802c5f8: 4629 mov r1, r5 802c5fa: 2240 movs r2, #64 ; 0x40 802c5fc: a802 add r0, sp, #8 802c5fe: f7f5 fa7f bl 8021b00 GetParamValue(buf, "ipaddr=", value, &valueLen); 802c602: f10d 0307 add.w r3, sp, #7 802c606: 4980 ldr r1, [pc, #512] ; (802c808 ) 802c608: aa02 add r2, sp, #8 802c60a: 4620 mov r0, r4 802c60c: f7ff fe30 bl 802c270 SetIPStr(value); 802c610: a802 add r0, sp, #8 802c612: f7fb fd99 bl 8028148 memset(value, 0, len); 802c616: 4629 mov r1, r5 802c618: 2240 movs r2, #64 ; 0x40 802c61a: a802 add r0, sp, #8 802c61c: f7f5 fa70 bl 8021b00 GetParamValue(buf, "gw=", value, &valueLen); 802c620: f10d 0307 add.w r3, sp, #7 802c624: 4979 ldr r1, [pc, #484] ; (802c80c ) 802c626: aa02 add r2, sp, #8 802c628: 4620 mov r0, r4 802c62a: f7ff fe21 bl 802c270 SetGatewayStr(value); 802c62e: a802 add r0, sp, #8 802c630: f7fb fd90 bl 8028154 memset(value, 0, len); 802c634: 4629 mov r1, r5 802c636: 2240 movs r2, #64 ; 0x40 802c638: a802 add r0, sp, #8 802c63a: f7f5 fa61 bl 8021b00 GetParamValue(buf, "mask=", value, &valueLen); 802c63e: 4974 ldr r1, [pc, #464] ; (802c810 ) 802c640: aa02 add r2, sp, #8 802c642: f10d 0307 add.w r3, sp, #7 802c646: 4620 mov r0, r4 802c648: f7ff fe12 bl 802c270 SetMaskStr(value); 802c64c: a802 add r0, sp, #8 802c64e: f7fb fd87 bl 8028160 memset(value, 0, len); 802c652: a802 add r0, sp, #8 802c654: 4629 mov r1, r5 802c656: 2240 movs r2, #64 ; 0x40 802c658: f7f5 fa52 bl 8021b00 } memset(value, 0, len); 802c65c: 2100 movs r1, #0 802c65e: 2240 movs r2, #64 ; 0x40 802c660: a802 add r0, sp, #8 802c662: f7f5 fa4d bl 8021b00 GetParamValue(&buf[555], "auth=", value, &valueLen); 802c666: 496b ldr r1, [pc, #428] ; (802c814 ) 802c668: aa02 add r2, sp, #8 802c66a: f10d 0307 add.w r3, sp, #7 802c66e: f204 202b addw r0, r4, #555 ; 0x22b 802c672: f7ff fdfd bl 802c270 SetAuthEnableStateStr(value); 802c676: a802 add r0, sp, #8 802c678: f7fb fe4e bl 8028318 if (strncmp(value, "on", 2) == 0){ 802c67c: 4961 ldr r1, [pc, #388] ; (802c804 ) 802c67e: a802 add r0, sp, #8 802c680: 2202 movs r2, #2 802c682: f7f5 fc77 bl 8021f74 802c686: 4601 mov r1, r0 802c688: 2800 cmp r0, #0 802c68a: d156 bne.n 802c73a /* параметры RADIUS*/ memset(value, 0, len); 802c68c: 2240 movs r2, #64 ; 0x40 802c68e: a802 add r0, sp, #8 802c690: f7f5 fa36 bl 8021b00 GetParamValue(buf, "rs_enabled=", value, &valueLen); 802c694: 4960 ldr r1, [pc, #384] ; (802c818 ) 802c696: aa02 add r2, sp, #8 802c698: f10d 0307 add.w r3, sp, #7 802c69c: 4620 mov r0, r4 802c69e: f7ff fde7 bl 802c270 SetRDSEnableStateStr(value); 802c6a2: a802 add r0, sp, #8 802c6a4: f7fb fe26 bl 80282f4 if (strncmp(value, "on", 2) == 0) // Если raddius off устанавливаем параметры 802c6a8: a802 add r0, sp, #8 802c6aa: 4956 ldr r1, [pc, #344] ; (802c804 ) 802c6ac: 2202 movs r2, #2 802c6ae: f7f5 fc61 bl 8021f74 802c6b2: 4605 mov r5, r0 802c6b4: 2800 cmp r0, #0 802c6b6: d140 bne.n 802c73a { memset(value, 0, len); 802c6b8: 4629 mov r1, r5 802c6ba: 2240 movs r2, #64 ; 0x40 802c6bc: a802 add r0, sp, #8 802c6be: f7f5 fa1f bl 8021b00 GetParamValue(buf, "rs_server=", value, &valueLen); 802c6c2: f10d 0307 add.w r3, sp, #7 802c6c6: 4955 ldr r1, [pc, #340] ; (802c81c ) 802c6c8: aa02 add r2, sp, #8 802c6ca: 4620 mov r0, r4 802c6cc: f7ff fdd0 bl 802c270 SetRDSIpStr(value); 802c6d0: a802 add r0, sp, #8 802c6d2: f7fb fdef bl 80282b4 memset(value, 0, len); 802c6d6: 4629 mov r1, r5 802c6d8: 2240 movs r2, #64 ; 0x40 802c6da: a802 add r0, sp, #8 802c6dc: f7f5 fa10 bl 8021b00 GetParamValue(buf, "rs_port=", value, &valueLen); 802c6e0: f10d 0307 add.w r3, sp, #7 802c6e4: 494e ldr r1, [pc, #312] ; (802c820 ) 802c6e6: aa02 add r2, sp, #8 802c6e8: 4620 mov r0, r4 802c6ea: f7ff fdc1 bl 802c270 SetRDSPortStr(value); 802c6ee: a802 add r0, sp, #8 802c6f0: f7fb fde6 bl 80282c0 memset(value, 0, len); 802c6f4: 4629 mov r1, r5 802c6f6: 2240 movs r2, #64 ; 0x40 802c6f8: a802 add r0, sp, #8 802c6fa: f7f5 fa01 bl 8021b00 GetParamValue(buf, "rs_pwd=", value, &valueLen); 802c6fe: f10d 0307 add.w r3, sp, #7 802c702: 4948 ldr r1, [pc, #288] ; (802c824 ) 802c704: aa02 add r2, sp, #8 802c706: 4620 mov r0, r4 802c708: f7ff fdb2 bl 802c270 SetRDSPasswordkStr(value); 802c70c: a802 add r0, sp, #8 802c70e: f7fb fdeb bl 80282e8 memset(value, 0, len); 802c712: 4629 mov r1, r5 802c714: 2240 movs r2, #64 ; 0x40 802c716: a802 add r0, sp, #8 802c718: f7f5 f9f2 bl 8021b00 GetParamValue(buf, "rs_key=", value, &valueLen); 802c71c: 4942 ldr r1, [pc, #264] ; (802c828 ) 802c71e: aa02 add r2, sp, #8 802c720: f10d 0307 add.w r3, sp, #7 802c724: 4620 mov r0, r4 802c726: f7ff fda3 bl 802c270 SetRDSKeyAccesstStr(value); 802c72a: a802 add r0, sp, #8 802c72c: f7fb fdd2 bl 80282d4 memset(value, 0, len); 802c730: a802 add r0, sp, #8 802c732: 4629 mov r1, r5 802c734: 2240 movs r2, #64 ; 0x40 802c736: f7f5 f9e3 bl 8021b00 } } memset(value, 0, len); 802c73a: 2100 movs r1, #0 802c73c: 2240 movs r2, #64 ; 0x40 802c73e: a802 add r0, sp, #8 802c740: f7f5 f9de bl 8021b00 // Параметры реле и сухих контактов GetParamValue(buf, "di1=", value, &valueLen); 802c744: f10d 0307 add.w r3, sp, #7 802c748: aa02 add r2, sp, #8 802c74a: 4938 ldr r1, [pc, #224] ; (802c82c ) 802c74c: 4620 mov r0, r4 802c74e: f7ff fd8f bl 802c270 SetDINTypeActStr(value, 0); 802c752: a802 add r0, sp, #8 802c754: 2100 movs r1, #0 802c756: f7fb fed5 bl 8028504 memset(value, 0, len); 802c75a: 2100 movs r1, #0 802c75c: 2240 movs r2, #64 ; 0x40 802c75e: a802 add r0, sp, #8 802c760: f7f5 f9ce bl 8021b00 GetParamValue(buf, "ro1=", value, &valueLen); 802c764: f10d 0307 add.w r3, sp, #7 802c768: aa02 add r2, sp, #8 802c76a: 4931 ldr r1, [pc, #196] ; (802c830 ) 802c76c: 4620 mov r0, r4 802c76e: f7ff fd7f bl 802c270 SetROTypeActStr(value, 0); 802c772: a802 add r0, sp, #8 802c774: 2100 movs r1, #0 802c776: f7fb fee3 bl 8028540 memset(value, 0, len); 802c77a: 2100 movs r1, #0 802c77c: 2240 movs r2, #64 ; 0x40 802c77e: a802 add r0, sp, #8 802c780: f7f5 f9be bl 8021b00 GetParamValue(buf, "ro2=", value, &valueLen); 802c784: f10d 0307 add.w r3, sp, #7 802c788: aa02 add r2, sp, #8 802c78a: 492a ldr r1, [pc, #168] ; (802c834 ) 802c78c: 4620 mov r0, r4 802c78e: f7ff fd6f bl 802c270 SetROTypeActStr(value, 1); 802c792: a802 add r0, sp, #8 802c794: 2101 movs r1, #1 802c796: f7fb fed3 bl 8028540 memset(value, 0, len); 802c79a: 2100 movs r1, #0 802c79c: 2240 movs r2, #64 ; 0x40 802c79e: a802 add r0, sp, #8 802c7a0: f7f5 f9ae bl 8021b00 // Параметры даты и времени GetParamValue(buf, "ntp=", value, &valueLen); 802c7a4: 4924 ldr r1, [pc, #144] ; (802c838 ) 802c7a6: aa02 add r2, sp, #8 802c7a8: f10d 0307 add.w r3, sp, #7 802c7ac: 4620 mov r0, r4 802c7ae: f7ff fd5f bl 802c270 SetSntpStateStr(value); 802c7b2: a802 add r0, sp, #8 802c7b4: f7fb fe2a bl 802840c if (strncmp(value, "1", 1) == 0) // Если ntp on устанавливаем параметры 802c7b8: a802 add r0, sp, #8 802c7ba: 4920 ldr r1, [pc, #128] ; (802c83c ) 802c7bc: 2201 movs r2, #1 802c7be: f7f5 fbd9 bl 8021f74 802c7c2: 4605 mov r5, r0 { memset(value, 0, len); 802c7c4: a802 add r0, sp, #8 // Параметры даты и времени GetParamValue(buf, "ntp=", value, &valueLen); SetSntpStateStr(value); if (strncmp(value, "1", 1) == 0) // Если ntp on устанавливаем параметры 802c7c6: 2d00 cmp r5, #0 802c7c8: d140 bne.n 802c84c { memset(value, 0, len); 802c7ca: 4629 mov r1, r5 802c7cc: 2240 movs r2, #64 ; 0x40 802c7ce: f7f5 f997 bl 8021b00 GetParamValue(buf, "ntpservip=", value, &valueLen); 802c7d2: 4620 mov r0, r4 802c7d4: 491a ldr r1, [pc, #104] ; (802c840 ) 802c7d6: aa02 add r2, sp, #8 802c7d8: f10d 0307 add.w r3, sp, #7 802c7dc: f7ff fd48 bl 802c270 802c7e0: e030 b.n 802c844 802c7e2: bf00 nop 802c7e4: 08040d36 .word 0x08040d36 802c7e8: 08040d46 .word 0x08040d46 802c7ec: 08040d57 .word 0x08040d57 802c7f0: 08040d62 .word 0x08040d62 802c7f4: 08040d6e .word 0x08040d6e 802c7f8: 08040d7a .word 0x08040d7a 802c7fc: 08040d86 .word 0x08040d86 802c800: 08040d92 .word 0x08040d92 802c804: 080399ee .word 0x080399ee 802c808: 08040d98 .word 0x08040d98 802c80c: 08040da0 .word 0x08040da0 802c810: 08040da4 .word 0x08040da4 802c814: 08040daa .word 0x08040daa 802c818: 08040db0 .word 0x08040db0 802c81c: 08040dbc .word 0x08040dbc 802c820: 08040dc7 .word 0x08040dc7 802c824: 08040dd0 .word 0x08040dd0 802c828: 08040dd8 .word 0x08040dd8 802c82c: 08040de0 .word 0x08040de0 802c830: 08040de5 .word 0x08040de5 802c834: 08040dea .word 0x08040dea 802c838: 08040def .word 0x08040def 802c83c: 08039cb4 .word 0x08039cb4 802c840: 08040df4 .word 0x08040df4 SetSntpServerIpStr(value); 802c844: a802 add r0, sp, #8 802c846: f7fb fe01 bl 802844c 802c84a: e023 b.n 802c894 memset(value, 0, len); } else if (strncmp(value, "0", 1) == 0){ 802c84c: 4924 ldr r1, [pc, #144] ; (802c8e0 ) 802c84e: 2201 movs r2, #1 802c850: f7f5 fb90 bl 8021f74 802c854: 4605 mov r5, r0 802c856: bb10 cbnz r0, 802c89e GetParamValue(buf, "date=", value, &valueLen); 802c858: f10d 0307 add.w r3, sp, #7 802c85c: 4921 ldr r1, [pc, #132] ; (802c8e4 ) 802c85e: aa02 add r2, sp, #8 802c860: 4620 mov r0, r4 802c862: f7ff fd05 bl 802c270 SetDateStr(value); 802c866: a802 add r0, sp, #8 802c868: f7fb fd68 bl 802833c memset(value, 0, len); 802c86c: 4629 mov r1, r5 802c86e: 2240 movs r2, #64 ; 0x40 802c870: a802 add r0, sp, #8 802c872: f7f5 f945 bl 8021b00 GetParamValue(buf, "time=", value, &valueLen); 802c876: 491c ldr r1, [pc, #112] ; (802c8e8 ) 802c878: aa02 add r2, sp, #8 802c87a: f10d 0307 add.w r3, sp, #7 802c87e: 4620 mov r0, r4 802c880: f7ff fcf6 bl 802c270 url_decode(str, sizeof(str), value); 802c884: a812 add r0, sp, #72 ; 0x48 802c886: 2140 movs r1, #64 ; 0x40 802c888: aa02 add r2, sp, #8 802c88a: f7fc fca9 bl 80291e0 SetTimeStr(str); 802c88e: a812 add r0, sp, #72 ; 0x48 802c890: f7fb fd8c bl 80283ac memset(value, 0, len); 802c894: a802 add r0, sp, #8 802c896: 4629 mov r1, r5 802c898: 2240 movs r2, #64 ; 0x40 802c89a: f7f5 f931 bl 8021b00 } GetParamValue(buf, "utc=", value, &valueLen); 802c89e: 4913 ldr r1, [pc, #76] ; (802c8ec ) 802c8a0: aa02 add r2, sp, #8 802c8a2: f10d 0307 add.w r3, sp, #7 802c8a6: 4620 mov r0, r4 802c8a8: f7ff fce2 bl 802c270 SetSntpTimeZoneStr(value); 802c8ac: a802 add r0, sp, #8 802c8ae: f7fb fdd3 bl 8028458 memset(value, 0, len); 802c8b2: 2100 movs r1, #0 802c8b4: 2240 movs r2, #64 ; 0x40 802c8b6: a802 add r0, sp, #8 802c8b8: f7f5 f922 bl 8021b00 /* Если параметры WEB изменились выставляем флаг, сохраняем настройки и перезагружаемся */ if (GetStateWebReinit() == true) 802c8bc: f00b fada bl 8037e74 802c8c0: b150 cbz r0, 802c8d8 { SetWebReinitFlag(true); 802c8c2: 2001 movs r0, #1 802c8c4: f7fb fc34 bl 8028130 HTTP_SaveSettings(); 802c8c8: f001 fa78 bl 802ddbc /* Блокируем управление ключем на тау секунд*/ //IO_KeyBlockOn(); vTaskDelay(1010); 802c8cc: f240 30f2 movw r0, #1010 ; 0x3f2 802c8d0: f7fe fb7c bl 802afcc Reboot(); 802c8d4: f7fc fc16 bl 8029104 } HTTP_SaveSettings(); 802c8d8: f001 fa70 bl 802ddbc } 802c8dc: b023 add sp, #140 ; 0x8c 802c8de: bd30 pop {r4, r5, pc} 802c8e0: 08039a51 .word 0x08039a51 802c8e4: 08040e12 .word 0x08040e12 802c8e8: 08040dff .word 0x08040dff 802c8ec: 08040e05 .word 0x08040e05 0802c8f0 : /** * @brief * @retval None */ uint8_t GetCookieValue(char *inStr, char *paramName, char *paramValue, uint8_t *paramLen) { 802c8f0: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802c8f4: 4690 mov r8, r2 802c8f6: 461f mov r7, r3 char *beginValue = 0; char *endValue = 0; int len = 0; char *strPtr = 0; strPtr = strstr(inStr, paramName); 802c8f8: f7f5 fd5a bl 80223b0 if (strPtr != 0) 802c8fc: 4605 mov r5, r0 802c8fe: b1e0 cbz r0, 802c93a { beginValue = strpbrk(strPtr,"="); 802c900: 490f ldr r1, [pc, #60] ; (802c940 ) 802c902: f7f5 fbbf bl 8022084 endValue = strpbrk(strPtr,";"); 802c906: 490f ldr r1, [pc, #60] ; (802c944 ) strPtr = strstr(inStr, paramName); if (strPtr != 0) { beginValue = strpbrk(strPtr,"="); 802c908: 4606 mov r6, r0 endValue = strpbrk(strPtr,";"); 802c90a: 4628 mov r0, r5 802c90c: f7f5 fbba bl 8022084 if (endValue == 0) 802c910: 4604 mov r4, r0 802c912: b920 cbnz r0, 802c91e endValue = strpbrk(strPtr,"\n"); 802c914: 4628 mov r0, r5 802c916: 490c ldr r1, [pc, #48] ; (802c948 ) 802c918: f7f5 fbb4 bl 8022084 802c91c: 4604 mov r4, r0 len = endValue - beginValue - 1; 802c91e: 1ba5 subs r5, r4, r6 802c920: 3d01 subs r5, #1 strncpy(paramValue, beginValue + 1, len); 802c922: 4640 mov r0, r8 802c924: 1c71 adds r1, r6, #1 802c926: 462a mov r2, r5 802c928: f7f5 fb7a bl 8022020 *endValue = '0'; 802c92c: 2330 movs r3, #48 ; 0x30 802c92e: 7023 strb r3, [r4, #0] *beginValue = '0'; *paramLen = len; return 1; 802c930: 2001 movs r0, #1 if (endValue == 0) endValue = strpbrk(strPtr,"\n"); len = endValue - beginValue - 1; strncpy(paramValue, beginValue + 1, len); *endValue = '0'; *beginValue = '0'; 802c932: 7033 strb r3, [r6, #0] *paramLen = len; 802c934: 703d strb r5, [r7, #0] return 1; 802c936: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} } else { *paramLen = 0; 802c93a: 7038 strb r0, [r7, #0] return 0; } } 802c93c: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802c940: 08040de3 .word 0x08040de3 802c944: 08045b19 .word 0x08045b19 802c948: 08041133 .word 0x08041133 0802c94c : } } */ void ClearParamString(char *inBuf) { 802c94c: b510 push {r4, lr} uint16_t len; char *str; str = strstr(inBuf, "HTTP"); 802c94e: 4908 ldr r1, [pc, #32] ; (802c970 ) } } */ void ClearParamString(char *inBuf) { 802c950: 4604 mov r4, r0 uint16_t len; char *str; str = strstr(inBuf, "HTTP"); 802c952: f7f5 fd2d bl 80223b0 if (str != 0) 802c956: b148 cbz r0, 802c96c { len = str - inBuf; 802c958: 1b02 subs r2, r0, r4 memset(str, 0, RECIVE_BUF_MAX_LEN - len - 1); 802c95a: b292 uxth r2, r2 802c95c: f5c2 62bb rsb r2, r2, #1496 ; 0x5d8 802c960: 2100 movs r1, #0 802c962: 3203 adds r2, #3 } } 802c964: 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); 802c968: f7f5 b8ca b.w 8021b00 802c96c: bd10 pop {r4, pc} 802c96e: bf00 nop 802c970: 08040e0a .word 0x08040e0a 0802c974 : /** * @brief Установка даты производства */ // TODO Убрать заглушку! void HTTP_Prodate(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c974: b5f0 push {r4, r5, r6, r7, lr} uint8_t valueLen = 0; 802c976: 2500 movs r5, #0 /** * @brief Установка даты производства */ // TODO Убрать заглушку! void HTTP_Prodate(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c978: b087 sub sp, #28 802c97a: 4606 mov r6, r0 802c97c: 460c mov r4, r1 uint8_t valueLen = 0; char value[20]; memset(bufOut, 0, SEND_BUF_MAX_LEN); 802c97e: f44f 62fa mov.w r2, #2000 ; 0x7d0 802c982: 4608 mov r0, r1 802c984: 4629 mov r1, r5 /** * @brief Установка даты производства */ // TODO Убрать заглушку! void HTTP_Prodate(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c986: 461f mov r7, r3 uint8_t valueLen = 0; 802c988: f88d 5003 strb.w r5, [sp, #3] char value[20]; memset(bufOut, 0, SEND_BUF_MAX_LEN); 802c98c: f7f5 f8b8 bl 8021b00 ClearParamString(bufIn); 802c990: 4630 mov r0, r6 802c992: f7ff ffdb bl 802c94c memset(value, 0, 20); 802c996: 4629 mov r1, r5 802c998: 2214 movs r2, #20 802c99a: a801 add r0, sp, #4 802c99c: f7f5 f8b0 bl 8021b00 GetParamValue(bufIn, "prodate=", value, &valueLen); 802c9a0: aa01 add r2, sp, #4 802c9a2: f10d 0303 add.w r3, sp, #3 802c9a6: 490b ldr r1, [pc, #44] ; (802c9d4 ) 802c9a8: 4630 mov r0, r6 802c9aa: f7ff fc61 bl 802c270 printf(value); printf("\r\n"); */ /* Устанавливаем дату производства */ SETTINGS_SetProDate(value, valueLen); 802c9ae: f89d 1003 ldrb.w r1, [sp, #3] 802c9b2: a801 add r0, sp, #4 802c9b4: f7fc f82a bl 8028a0c /* Устанавливаем дату следующей профилактики +1 год */ RTC_SetProfTime(value); 802c9b8: a801 add r0, sp, #4 802c9ba: f7f9 fec1 bl 8026740 /* Пока отправляем true */ strcpy(bufOut, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\nTrue"); 802c9be: 4906 ldr r1, [pc, #24] ; (802c9d8 ) 802c9c0: 4620 mov r0, r4 802c9c2: f7f5 fa17 bl 8021df4 *lenBufOut = strlen(bufOut); 802c9c6: 4620 mov r0, r4 802c9c8: f7f5 fa72 bl 8021eb0 802c9cc: 8038 strh r0, [r7, #0] // TEST_SetServerFlag(); } 802c9ce: b007 add sp, #28 802c9d0: bdf0 pop {r4, r5, r6, r7, pc} 802c9d2: bf00 nop 802c9d4: 08040e0f .word 0x08040e0f 802c9d8: 08040e18 .word 0x08040e18 0802c9dc : } } } int HTTP_UpsHistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c9dc: b5f0 push {r4, r5, r6, r7, lr} uint8_t i, valueLen = 0; 802c9de: 2500 movs r5, #0 } } } int HTTP_UpsHistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c9e0: b087 sub sp, #28 802c9e2: 4607 mov r7, r0 char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802c9e4: f44f 727a mov.w r2, #1000 ; 0x3e8 802c9e8: 4608 mov r0, r1 } } } int HTTP_UpsHistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c9ea: 460c mov r4, r1 char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802c9ec: 4629 mov r1, r5 } } } int HTTP_UpsHistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c9ee: 461e mov r6, r3 uint8_t i, valueLen = 0; 802c9f0: f88d 5003 strb.w r5, [sp, #3] char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802c9f4: f7f5 f884 bl 8021b00 ClearParamString(bufIn); 802c9f8: 4638 mov r0, r7 802c9fa: f7ff ffa7 bl 802c94c memset(value, 0, 20); 802c9fe: 4629 mov r1, r5 802ca00: 2214 movs r2, #20 802ca02: a801 add r0, sp, #4 802ca04: f7f5 f87c bl 8021b00 GetParamValue(bufIn, "page=", value, &valueLen); 802ca08: 491c ldr r1, [pc, #112] ; (802ca7c ) 802ca0a: 4638 mov r0, r7 802ca0c: aa01 add r2, sp, #4 802ca0e: f10d 0303 add.w r3, sp, #3 802ca12: f7ff fc2d bl 802c270 if (strcmp(value, "all") == 0) 802ca16: a801 add r0, sp, #4 802ca18: 4919 ldr r1, [pc, #100] ; (802ca80 ) 802ca1a: f7f5 f8fd bl 8021c18 802ca1e: b9d8 cbnz r0, 802ca58 { if (!LOG_IsInit()) { 802ca20: f7fd f856 bl 8029ad0 802ca24: b908 cbnz r0, 802ca2a return SEND_REQUIRED_NO; 802ca26: 2001 movs r0, #1 802ca28: e026 b.n 802ca78 } if (fLogTransInprog == false) { 802ca2a: 4d16 ldr r5, [pc, #88] ; (802ca84 ) 802ca2c: 782b ldrb r3, [r5, #0] 802ca2e: 2b00 cmp r3, #0 802ca30: d1f9 bne.n 802ca26 // Send log as raw data log_ptr = 0; 802ca32: 4a15 ldr r2, [pc, #84] ; (802ca88 ) 802ca34: 6013 str r3, [r2, #0] log_size = LOG_GetTotalSTRCount() * STRING_SIZE; 802ca36: f7fd f85d bl 8029af4 802ca3a: 4b14 ldr r3, [pc, #80] ; (802ca8c ) sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n", log_size); 802ca3c: 4914 ldr r1, [pc, #80] ; (802ca90 ) if (fLogTransInprog == false) { // Send log as raw data log_ptr = 0; log_size = LOG_GetTotalSTRCount() * STRING_SIZE; 802ca3e: 0182 lsls r2, r0, #6 sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n", log_size); 802ca40: 4620 mov r0, r4 if (fLogTransInprog == false) { // Send log as raw data log_ptr = 0; log_size = LOG_GetTotalSTRCount() * STRING_SIZE; 802ca42: 601a str r2, [r3, #0] sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n", log_size); 802ca44: f7fa fee6 bl 8027814 *lenBufOut = strlen(bufOut); 802ca48: 4620 mov r0, r4 802ca4a: f7f5 fa31 bl 8021eb0 // Set file transfer in progress flag fLogTransInprog = true; 802ca4e: 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); 802ca50: 8030 strh r0, [r6, #0] // Set file transfer in progress flag fLogTransInprog = true; 802ca52: 702b strb r3, [r5, #0] return SEND_REQUIRED_FILE; 802ca54: 2002 movs r0, #2 802ca56: e00f b.n 802ca78 // We send nothing if file transfer already in progress return SEND_REQUIRED_NO; } } else { if (!LOG_IsInit()) { 802ca58: f7fd f83a bl 8029ad0 802ca5c: 2800 cmp r0, #0 802ca5e: d0e2 beq.n 802ca26 return SEND_REQUIRED_NO; } else { HTTP_GetUpsHistoryPage(bufOut, atoi(value)); 802ca60: a801 add r0, sp, #4 802ca62: f7f4 ff2d bl 80218c0 802ca66: 4601 mov r1, r0 802ca68: 4620 mov r0, r4 802ca6a: f001 f931 bl 802dcd0 *lenBufOut = strlen(bufOut); 802ca6e: 4620 mov r0, r4 802ca70: f7f5 fa1e bl 8021eb0 802ca74: 8030 strh r0, [r6, #0] return SEND_REQUIRED_YES; 802ca76: 4628 mov r0, r5 } } } 802ca78: b007 add sp, #28 802ca7a: bdf0 pop {r4, r5, r6, r7, pc} 802ca7c: 08040e48 .word 0x08040e48 802ca80: 08040e4e .word 0x08040e4e 802ca84: 20000d2c .word 0x20000d2c 802ca88: 20000d24 .word 0x20000d24 802ca8c: 20000d30 .word 0x20000d30 802ca90: 08040e52 .word 0x08040e52 0802ca94 : */ } } int HTTP_HistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802ca94: b5f0 push {r4, r5, r6, r7, lr} uint8_t i, valueLen = 0; 802ca96: 2500 movs r5, #0 */ } } int HTTP_HistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802ca98: b087 sub sp, #28 802ca9a: 4607 mov r7, r0 char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802ca9c: f44f 727a mov.w r2, #1000 ; 0x3e8 802caa0: 4608 mov r0, r1 */ } } int HTTP_HistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802caa2: 460c mov r4, r1 char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802caa4: 4629 mov r1, r5 */ } } int HTTP_HistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802caa6: 461e mov r6, r3 uint8_t i, valueLen = 0; 802caa8: f88d 5003 strb.w r5, [sp, #3] char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802caac: f7f5 f828 bl 8021b00 ClearParamString(bufIn); 802cab0: 4638 mov r0, r7 802cab2: f7ff ff4b bl 802c94c memset(value, 0, 20); 802cab6: 4629 mov r1, r5 802cab8: 2214 movs r2, #20 802caba: a801 add r0, sp, #4 802cabc: f7f5 f820 bl 8021b00 GetParamValue(bufIn, "page=", value, &valueLen); 802cac0: 491d ldr r1, [pc, #116] ; (802cb38 ) 802cac2: 4638 mov r0, r7 802cac4: aa01 add r2, sp, #4 802cac6: f10d 0303 add.w r3, sp, #3 802caca: f7ff fbd1 bl 802c270 if (strcmp(value, "all") == 0) 802cace: a801 add r0, sp, #4 802cad0: 491a ldr r1, [pc, #104] ; (802cb3c ) 802cad2: f7f5 f8a1 bl 8021c18 802cad6: b9e0 cbnz r0, 802cb12 { if (!LOG_IsInit()) { 802cad8: f7fc fffa bl 8029ad0 802cadc: b908 cbnz r0, 802cae2 return SEND_REQUIRED_NO; 802cade: 2001 movs r0, #1 802cae0: e027 b.n 802cb32 } if (fLogTransInprog == false) { 802cae2: 4d17 ldr r5, [pc, #92] ; (802cb40 ) 802cae4: 782b ldrb r3, [r5, #0] 802cae6: 2b00 cmp r3, #0 802cae8: d1f9 bne.n 802cade // Send log as raw data log_ptr = 0; 802caea: 4a16 ldr r2, [pc, #88] ; (802cb44 ) 802caec: 6013 str r3, [r2, #0] log_size = History_GetTotalSTRCount() * STRING_SIZE_HISTORY; 802caee: f7fd f8e5 bl 8029cbc 802caf2: 4b15 ldr r3, [pc, #84] ; (802cb48 ) sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n", log_size); 802caf4: 4915 ldr r1, [pc, #84] ; (802cb4c ) if (fLogTransInprog == false) { // Send log as raw data log_ptr = 0; log_size = History_GetTotalSTRCount() * STRING_SIZE_HISTORY; 802caf6: 2264 movs r2, #100 ; 0x64 802caf8: 4342 muls r2, r0 sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n", log_size); 802cafa: 4620 mov r0, r4 if (fLogTransInprog == false) { // Send log as raw data log_ptr = 0; log_size = History_GetTotalSTRCount() * STRING_SIZE_HISTORY; 802cafc: 601a str r2, [r3, #0] sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n", log_size); 802cafe: f7fa fe89 bl 8027814 *lenBufOut = strlen(bufOut); 802cb02: 4620 mov r0, r4 802cb04: f7f5 f9d4 bl 8021eb0 // Set file transfer in progress flag fLogTransInprog = true; 802cb08: 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); 802cb0a: 8030 strh r0, [r6, #0] // Set file transfer in progress flag fLogTransInprog = true; 802cb0c: 702b strb r3, [r5, #0] return SEND_REQUIRED_FILE; 802cb0e: 2002 movs r0, #2 802cb10: e00f b.n 802cb32 // We send nothing if file transfer already in progress return SEND_REQUIRED_NO; } } else { if (!LOG_IsInit()) { 802cb12: f7fc ffdd bl 8029ad0 802cb16: 2800 cmp r0, #0 802cb18: d0e1 beq.n 802cade return SEND_REQUIRED_NO; } else { HTTP_GetHistoryPage(bufOut, atoi(value)); 802cb1a: a801 add r0, sp, #4 802cb1c: f7f4 fed0 bl 80218c0 802cb20: 4601 mov r1, r0 802cb22: 4620 mov r0, r4 802cb24: f001 f872 bl 802dc0c *lenBufOut = strlen(bufOut); 802cb28: 4620 mov r0, r4 802cb2a: f7f5 f9c1 bl 8021eb0 802cb2e: 8030 strh r0, [r6, #0] return SEND_REQUIRED_YES; 802cb30: 4628 mov r0, r5 } } } 802cb32: b007 add sp, #28 802cb34: bdf0 pop {r4, r5, r6, r7, pc} 802cb36: bf00 nop 802cb38: 08040e48 .word 0x08040e48 802cb3c: 08040e4e .word 0x08040e4e 802cb40: 20000d2c .word 0x20000d2c 802cb44: 20000d24 .word 0x20000d24 802cb48: 20000d30 .word 0x20000d30 802cb4c: 08040e52 .word 0x08040e52 0802cb50 : /** * @brief Смена пароля пользователя * @retval None */ int HTTP_ChangeUserPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802cb50: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802cb54: b0b0 sub sp, #192 ; 0xc0 802cb56: 4605 mov r5, r0 802cb58: 460c mov r4, r1 uint8_t valueLen, valueLen2, user_id; char WebLogin[MAX_WEB_LOGIN_LEN]; (void)lenBufIn; memset(login, 0, 20); 802cb5a: 2214 movs r2, #20 802cb5c: 2100 movs r1, #0 802cb5e: a80a add r0, sp, #40 ; 0x28 /** * @brief Смена пароля пользователя * @retval None */ int HTTP_ChangeUserPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802cb60: 461e mov r6, r3 uint8_t valueLen, valueLen2, user_id; char WebLogin[MAX_WEB_LOGIN_LEN]; (void)lenBufIn; memset(login, 0, 20); 802cb62: f7f4 ffcd bl 8021b00 memset(password, 0, 20); 802cb66: 2100 movs r1, #0 802cb68: 2214 movs r2, #20 802cb6a: a80f add r0, sp, #60 ; 0x3c 802cb6c: f7f4 ffc8 bl 8021b00 memset(tempStr, 0, 50); memset(value, 0, 20); 802cb70: af05 add r7, sp, #20 (void)lenBufIn; memset(login, 0, 20); memset(password, 0, 20); memset(tempStr, 0, 50); 802cb72: 2100 movs r1, #0 802cb74: 2232 movs r2, #50 ; 0x32 802cb76: a814 add r0, sp, #80 ; 0x50 802cb78: f7f4 ffc2 bl 8021b00 memset(value, 0, 20); 802cb7c: 2100 movs r1, #0 802cb7e: 2214 movs r2, #20 802cb80: 4638 mov r0, r7 802cb82: f7f4 ffbd bl 8021b00 ClearParamString(bufIn); 802cb86: 4628 mov r0, r5 802cb88: f7ff fee0 bl 802c94c strncpy(tempStr, bufIn, 110); 802cb8c: 226e movs r2, #110 ; 0x6e 802cb8e: 4629 mov r1, r5 802cb90: a814 add r0, sp, #80 ; 0x50 802cb92: f7f5 fa45 bl 8022020 strcpy(bufOut, HTTP_200_OK); if (GetParamValue(tempStr, "username=", login, &valueLen) && 802cb96: f10d 0806 add.w r8, sp, #6 ClearParamString(bufIn); strncpy(tempStr, bufIn, 110); strcpy(bufOut, HTTP_200_OK); 802cb9a: 4933 ldr r1, [pc, #204] ; (802cc68 ) 802cb9c: 4620 mov r0, r4 802cb9e: f7f5 f929 bl 8021df4 if (GetParamValue(tempStr, "username=", login, &valueLen) && 802cba2: a814 add r0, sp, #80 ; 0x50 802cba4: 4931 ldr r1, [pc, #196] ; (802cc6c ) 802cba6: aa0a add r2, sp, #40 ; 0x28 802cba8: 4643 mov r3, r8 802cbaa: f7ff fb61 bl 802c270 802cbae: 2800 cmp r0, #0 802cbb0: d04e beq.n 802cc50 GetParamValue(tempStr, "oldpass=", password, &valueLen)) 802cbb2: a814 add r0, sp, #80 ; 0x50 802cbb4: 492e ldr r1, [pc, #184] ; (802cc70 ) 802cbb6: aa0f add r2, sp, #60 ; 0x3c 802cbb8: 4643 mov r3, r8 802cbba: f7ff fb59 bl 802c270 strncpy(tempStr, bufIn, 110); strcpy(bufOut, HTTP_200_OK); if (GetParamValue(tempStr, "username=", login, &valueLen) && 802cbbe: 2800 cmp r0, #0 802cbc0: d046 beq.n 802cc50 802cbc2: 2500 movs r5, #0 GetParamValue(tempStr, "oldpass=", password, &valueLen)) { for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { memset(value, 0, 20); 802cbc4: 2100 movs r1, #0 802cbc6: 2214 movs r2, #20 802cbc8: 4638 mov r0, r7 802cbca: f7f4 ff99 bl 8021b00 memset(WebLogin, 0, MAX_WEB_LOGIN_LEN); 802cbce: 2100 movs r1, #0 802cbd0: 220b movs r2, #11 802cbd2: a802 add r0, sp, #8 802cbd4: f7f4 ff94 bl 8021b00 GetUserLogin(user_id, WebLogin, &valueLen); 802cbd8: 4628 mov r0, r5 802cbda: a902 add r1, sp, #8 802cbdc: 4642 mov r2, r8 802cbde: f7fb f903 bl 8027de8 GetUserPassword(user_id, value, &valueLen2); 802cbe2: 4628 mov r0, r5 802cbe4: 4639 mov r1, r7 802cbe6: f10d 0207 add.w r2, sp, #7 802cbea: f7fb f913 bl 8027e14 /* Check login and password */ if ((strncmp(WebLogin, login, MAX_WEB_LOGIN_LEN) == 0) && 802cbee: a802 add r0, sp, #8 802cbf0: a90a add r1, sp, #40 ; 0x28 802cbf2: 220b movs r2, #11 802cbf4: f7f5 f9be bl 8021f74 802cbf8: bb18 cbnz r0, 802cc42 (memcmp(password, value, 11) == 0)) 802cbfa: 4639 mov r1, r7 802cbfc: a80f add r0, sp, #60 ; 0x3c 802cbfe: 220b movs r2, #11 802cc00: f7f4 fe92 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) && 802cc04: 4601 mov r1, r0 802cc06: b9e0 cbnz r0, 802cc42 (memcmp(password, value, 11) == 0)) { memset(password, 0, 20); 802cc08: 2214 movs r2, #20 802cc0a: a80f add r0, sp, #60 ; 0x3c 802cc0c: f7f4 ff78 bl 8021b00 if (GetParamValue(tempStr, "newpass=", password, &valueLen)) 802cc10: a814 add r0, sp, #80 ; 0x50 802cc12: 4918 ldr r1, [pc, #96] ; (802cc74 ) 802cc14: aa0f add r2, sp, #60 ; 0x3c 802cc16: 4643 mov r3, r8 802cc18: f7ff fb2a bl 802c270 802cc1c: b1c0 cbz r0, 802cc50 { memcpy(sSettings.sAuth[user_id].password, password, 11); 802cc1e: 4b16 ldr r3, [pc, #88] ; (802cc78 ) 802cc20: 2217 movs r2, #23 802cc22: fb02 3005 mla r0, r2, r5, r3 802cc26: a90f add r1, sp, #60 ; 0x3c 802cc28: 220b movs r2, #11 802cc2a: 3005 adds r0, #5 802cc2c: f7f4 feae bl 802198c HTTP_SaveSettings(); 802cc30: f001 f8c4 bl 802ddbc log_event_data(LOG_PSW_CHANGE, "Администратор"); 802cc34: 2003 movs r0, #3 802cc36: 4911 ldr r1, [pc, #68] ; (802cc7c ) 802cc38: f7fc ff10 bl 8029a5c strcat(bufOut, "Пароль успешно изменён"); 802cc3c: 4620 mov r0, r4 802cc3e: 4910 ldr r1, [pc, #64] ; (802cc80 ) 802cc40: e008 b.n 802cc54 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++) 802cc42: 3501 adds r5, #1 802cc44: b2ed uxtb r5, r5 802cc46: 2d02 cmp r5, #2 802cc48: d1bc bne.n 802cbc4 *lenBufOut = strlen(bufOut); return SEND_REQUIRED_YES; } } } strcat(bufOut, "Введён неверный пароль!"); 802cc4a: 4620 mov r0, r4 802cc4c: 490d ldr r1, [pc, #52] ; (802cc84 ) 802cc4e: e001 b.n 802cc54 *lenBufOut = strlen(bufOut); return SEND_REQUIRED_YES; } else { strcat(bufOut, "Введены некорректные данные!"); 802cc50: 490d ldr r1, [pc, #52] ; (802cc88 ) 802cc52: 4620 mov r0, r4 802cc54: f7f4 ffba bl 8021bcc *lenBufOut = strlen(bufOut); 802cc58: 4620 mov r0, r4 802cc5a: f7f5 f929 bl 8021eb0 802cc5e: 8030 strh r0, [r6, #0] return SEND_REQUIRED_YES; } } 802cc60: 2000 movs r0, #0 802cc62: b030 add sp, #192 ; 0xc0 802cc64: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802cc68: 08044669 .word 0x08044669 802cc6c: 08040e7a .word 0x08040e7a 802cc70: 08040e84 .word 0x08040e84 802cc74: 08040e8d .word 0x08040e8d 802cc78: 2000d2dc .word 0x2000d2dc 802cc7c: 08039ab8 .word 0x08039ab8 802cc80: 08040e96 .word 0x08040e96 802cc84: 08040ef7 .word 0x08040ef7 802cc88: 08040ec1 .word 0x08040ec1 0802cc8c : * @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) { 802cc8c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802cc90: b09d sub sp, #116 ; 0x74 802cc92: 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; 802cc94: 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) { 802cc96: 4604 mov r4, r0 802cc98: 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; 802cc9a: f88d 200a strb.w r2, [sp, #10] 802cc9e: f88d 200b strb.w r2, [sp, #11] struct fs_file file = {0, 0}; 802cca2: 9205 str r2, [sp, #20] 802cca4: 9206 str r2, [sp, #24] hs = arg; if (err == ERR_OK && p != NULL) 802cca6: 2b00 cmp r3, #0 802cca8: f040 83ac bne.w 802d404 802ccac: f1b8 0f00 cmp.w r8, #0 802ccb0: f000 83a8 beq.w 802d404 { tcp_recved(pcb, p->tot_len); 802ccb4: 4608 mov r0, r1 802ccb6: f8b8 1008 ldrh.w r1, [r8, #8] 802ccba: f003 fbbb bl 8030434 if (hs->file == NULL) 802ccbe: f8d4 9000 ldr.w r9, [r4] 802ccc2: f1b9 0f00 cmp.w r9, #0 802ccc6: f040 839a bne.w 802d3fe printLen = p->tot_len; memcpy(printBuf, p->payload , printLen); printf(printBuf); */ receivedBufLen = p->tot_len; memcpy(receiveBuf, p->payload , receivedBufLen); 802ccca: f8df a2e0 ldr.w sl, [pc, #736] ; 802cfac { tcp_recved(pcb, p->tot_len); if (hs->file == NULL) { data = p->payload; 802ccce: f8d8 6004 ldr.w r6, [r8, #4] /* printLen = p->tot_len; memcpy(printBuf, p->payload , printLen); printf(printBuf); */ receivedBufLen = p->tot_len; 802ccd2: f8b8 2008 ldrh.w r2, [r8, #8] 802ccd6: 4fa0 ldr r7, [pc, #640] ; (802cf58 ) memcpy(receiveBuf, p->payload , receivedBufLen); 802ccd8: 4650 mov r0, sl 802ccda: 4631 mov r1, r6 /* printLen = p->tot_len; memcpy(printBuf, p->payload , printLen); printf(printBuf); */ receivedBufLen = p->tot_len; 802ccdc: 803a strh r2, [r7, #0] memcpy(receiveBuf, p->payload , receivedBufLen); 802ccde: f7f4 fe55 bl 802198c receiveBuf[receivedBufLen] = '\0'; 802cce2: 883b ldrh r3, [r7, #0] // printf("receive %s \r\n", receiveBuf); /* Get cookie "uname" value */ CookiePtr = strstr(receiveBuf, "uname="); 802cce4: 499d ldr r1, [pc, #628] ; (802cf5c ) printf(printBuf); */ receivedBufLen = p->tot_len; memcpy(receiveBuf, p->payload , receivedBufLen); receiveBuf[receivedBufLen] = '\0'; 802cce6: f80a 9003 strb.w r9, [sl, r3] // printf("receive %s \r\n", receiveBuf); /* Get cookie "uname" value */ CookiePtr = strstr(receiveBuf, "uname="); 802ccea: 4650 mov r0, sl 802ccec: f7f5 fb60 bl 80223b0 strncpy(CookieBuf, CookiePtr, 50); 802ccf0: 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="); 802ccf2: 4601 mov r1, r0 strncpy(CookieBuf, CookiePtr, 50); 802ccf4: 2232 movs r2, #50 ; 0x32 802ccf6: 4638 mov r0, r7 802ccf8: f7f5 f992 bl 8022020 //printf("********CookieBuf1= %s\r\n", CookieBuf); memset(name, 0, MAX_WEB_COOKIE_LEN); 802ccfc: 4649 mov r1, r9 802ccfe: 2210 movs r2, #16 802cd00: a807 add r0, sp, #28 802cd02: f7f4 fefd bl 8021b00 GetCookieValue(CookieBuf, "uname=", name, &nameLen); 802cd06: f10d 030a add.w r3, sp, #10 802cd0a: aa07 add r2, sp, #28 802cd0c: 4993 ldr r1, [pc, #588] ; (802cf5c ) 802cd0e: 4638 mov r0, r7 802cd10: f7ff fdee bl 802c8f0 //printf("********CookieBuf2= %s\r\n", CookieBuf); //printf("********uname= %s\r\n", name); /* Get cookie "id" value */ CookiePtr = strstr(receiveBuf, "id="); 802cd14: 4650 mov r0, sl 802cd16: 4992 ldr r1, [pc, #584] ; (802cf60 ) 802cd18: f7f5 fb4a bl 80223b0 strncpy(CookieBuf, CookiePtr, 50); //printf("********CookieBuf1= %s\r\n", CookieBuf); memset(id, 0, MAX_WEB_COOKIE_LEN); 802cd1c: 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="); 802cd20: 4601 mov r1, r0 strncpy(CookieBuf, CookiePtr, 50); 802cd22: 2232 movs r2, #50 ; 0x32 802cd24: 4638 mov r0, r7 802cd26: f7f5 f97b bl 8022020 //printf("********CookieBuf1= %s\r\n", CookieBuf); memset(id, 0, MAX_WEB_COOKIE_LEN); 802cd2a: 4649 mov r1, r9 802cd2c: 2210 movs r2, #16 802cd2e: 4658 mov r0, fp 802cd30: f7f4 fee6 bl 8021b00 GetCookieValue(CookieBuf, "id=", id, &idLen); 802cd34: 465a mov r2, fp 802cd36: f10d 030b add.w r3, sp, #11 802cd3a: 4638 mov r0, r7 802cd3c: 4988 ldr r1, [pc, #544] ; (802cf60 ) 802cd3e: f7ff fdd7 bl 802c8f0 /* Id of currently logged-in user */ uint8_t user_id; /* Level of currently logged-in user */ seclevel = 0xFF; 802cd42: 4b88 ldr r3, [pc, #544] ; (802cf64 ) 802cd44: 22ff movs r2, #255 ; 0xff 802cd46: 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); 802cd48: 4b87 ldr r3, [pc, #540] ; (802cf68 ) 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); 802cd4a: 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); 802cd4c: 2214 movs r2, #20 802cd4e: fb02 3209 mla r2, r2, r9, r3 802cd52: 4986 ldr r1, [pc, #536] ; (802cf6c ) 802cd54: 9301 str r3, [sp, #4] 802cd56: 4650 mov r0, sl 802cd58: f7fa fd5c bl 8027814 *len = strlen(str); 802cd5c: 4650 mov r0, sl 802cd5e: f7f5 f8a7 bl 8021eb0 802cd62: 4602 mov r2, r0 802cd64: 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 ) { 802cd68: b2d2 uxtb r2, r2 802cd6a: 4658 mov r0, fp 802cd6c: 4651 mov r1, sl 802cd6e: f7f5 f901 bl 8021f74 802cd72: fa5f f789 uxtb.w r7, r9 802cd76: 4a7e ldr r2, [pc, #504] ; (802cf70 ) 802cd78: 9b01 ldr r3, [sp, #4] 802cd7a: b940 cbnz r0, 802cd8e GetUserLevelInt(user_id, &seclevel); 802cd7c: 4638 mov r0, r7 802cd7e: 4979 ldr r1, [pc, #484] ; (802cf64 ) 802cd80: 9201 str r2, [sp, #4] 802cd82: f7fb f85d bl 8027e40 Authenticated = true; 802cd86: 9a01 ldr r2, [sp, #4] 802cd88: 2301 movs r3, #1 802cd8a: 7013 strb r3, [r2, #0] break; 802cd8c: e00a b.n 802cda4 } Authenticated = false; 802cd8e: 2100 movs r1, #0 802cd90: 7011 strb r1, [r2, #0] 802cd92: f109 0901 add.w r9, r9, #1 seclevel = 0xFF; 802cd96: 4a73 ldr r2, [pc, #460] ; (802cf64 ) 802cd98: 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++) { 802cd9a: f1b9 0f02 cmp.w r9, #2 GetUserLevelInt(user_id, &seclevel); Authenticated = true; break; } Authenticated = false; seclevel = 0xFF; 802cd9e: 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++) { 802cda0: d1d4 bne.n 802cd4c 802cda2: 464f mov r7, r9 } Authenticated = false; seclevel = 0xFF; } if ( Authenticated == false && sSettings.sRADIUS.Auth_enable == false) 802cda4: 4b72 ldr r3, [pc, #456] ; (802cf70 ) 802cda6: 781b ldrb r3, [r3, #0] 802cda8: 2b00 cmp r3, #0 802cdaa: f040 8136 bne.w 802d01a 802cdae: 4b71 ldr r3, [pc, #452] ; (802cf74 ) 802cdb0: f893 3378 ldrb.w r3, [r3, #888] ; 0x378 802cdb4: b933 cbnz r3, 802cdc4 { HTTP_LOGIN(sendBuf, &sendBufLoadLen); 802cdb6: 4f70 ldr r7, [pc, #448] ; (802cf78 ) 802cdb8: 4e70 ldr r6, [pc, #448] ; (802cf7c ) 802cdba: 4638 mov r0, r7 802cdbc: 4631 mov r1, r6 802cdbe: f7ff f9ff bl 802c1c0 802cdc2: e306 b.n 802d3d2 tcp_sent(pcb, http_sent); } else if ( Authenticated == false )//&& sSettings.sRADIUS.Auth_enable == true { if (strncmp(data, "GET /main.css", 13) == 0) // + 802cdc4: 4630 mov r0, r6 802cdc6: 496e ldr r1, [pc, #440] ; (802cf80 ) 802cdc8: 220d movs r2, #13 802cdca: f7f5 f8d3 bl 8021f74 802cdce: b900 cbnz r0, 802cdd2 802cdd0: e129 b.n 802d026 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) // + 802cdd2: 4630 mov r0, r6 802cdd4: 496b ldr r1, [pc, #428] ; (802cf84 ) 802cdd6: 220e movs r2, #14 802cdd8: f7f5 f8cc bl 8021f74 802cddc: b900 cbnz r0, 802cde0 802cdde: e12a b.n 802d036 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) // ? 802cde0: 4630 mov r0, r6 802cde2: 4969 ldr r1, [pc, #420] ; (802cf88 ) 802cde4: 2210 movs r2, #16 802cde6: f7f5 f8c5 bl 8021f74 802cdea: b900 cbnz r0, 802cdee 802cdec: e12b b.n 802d046 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) 802cdee: 4630 mov r0, r6 802cdf0: 4966 ldr r1, [pc, #408] ; (802cf8c ) 802cdf2: 220c movs r2, #12 802cdf4: f7f5 f8be bl 8021f74 802cdf8: b900 cbnz r0, 802cdfc 802cdfa: e134 b.n 802d066 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)) 802cdfc: 4630 mov r0, r6 802cdfe: 4964 ldr r1, [pc, #400] ; (802cf90 ) 802ce00: 220f movs r2, #15 802ce02: f7f5 f8b7 bl 8021f74 802ce06: b120 cbz r0, 802ce12 802ce08: 4b62 ldr r3, [pc, #392] ; (802cf94 ) 802ce0a: 681b ldr r3, [r3, #0] 802ce0c: 2b00 cmp r3, #0 802ce0e: f000 80d5 beq.w 802cfbc { uint32_t i=0,size=0, S=1; int32_t j=0; char sizestring[6], *ptr; ContentLengthOffset =0; 802ce12: 4b61 ldr r3, [pc, #388] ; (802cf98 ) 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); 802ce14: 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; 802ce18: 2700 movs r7, #0 802ce1a: 601f str r7, [r3, #0] 802ce1c: e00a b.n 802ce34 /* find Content-Length data in packet buffer */ for (i=0;i) 802ce22: 2210 movs r2, #16 802ce24: f7f5 f8a6 bl 8021f74 802ce28: b918 cbnz r0, 802ce32 { ContentLengthOffset = i+16; 802ce2a: 4b5b ldr r3, [pc, #364] ; (802cf98 ) 802ce2c: 3710 adds r7, #16 802ce2e: 601f str r7, [r3, #0] 802ce30: e002 b.n 802ce38 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) 802ce38: 4b57 ldr r3, [pc, #348] ; (802cf98 ) 802ce3a: 681a ldr r2, [r3, #0] 802ce3c: 4618 mov r0, r3 802ce3e: b90a cbnz r2, 802ce44 * @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; 802ce40: 2200 movs r2, #0 802ce42: e01d b.n 802ce80 } /* read Content-Length value */ if (ContentLengthOffset) { i=0; ptr = (char*)(data + ContentLengthOffset); 802ce44: eb06 0e02 add.w lr, r6, r2 } } /* read Content-Length value */ if (ContentLengthOffset) { i=0; 802ce48: 2300 movs r3, #0 802ce4a: e002 b.n 802ce52 ptr = (char*)(data + ContentLengthOffset); while(*(ptr+i)!=0x0d) { sizestring[i] = *(ptr+i); 802ce4c: af03 add r7, sp, #12 802ce4e: 55d9 strb r1, [r3, r7] i++; 802ce50: 3301 adds r3, #1 /* read Content-Length value */ if (ContentLengthOffset) { i=0; ptr = (char*)(data + ContentLengthOffset); while(*(ptr+i)!=0x0d) 802ce52: f81e 1003 ldrb.w r1, [lr, r3] 802ce56: 290d cmp r1, #13 802ce58: eb03 0702 add.w r7, r3, r2 802ce5c: d1f6 bne.n 802ce4c 802ce5e: 6007 str r7, [r0, #0] { sizestring[i] = *(ptr+i); i++; ContentLengthOffset++; } if (i>0) 802ce60: 2b00 cmp r3, #0 802ce62: d0ed beq.n 802ce40 { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) 802ce64: 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; 802ce66: 2101 movs r1, #1 802ce68: 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; 802ce6a: 200a movs r0, #10 802ce6c: e006 b.n 802ce7c if (i>0) { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) { size += (sizestring[j]-0x30)*S; 802ce6e: af03 add r7, sp, #12 802ce70: 5ddf ldrb r7, [r3, r7] 802ce72: 3f30 subs r7, #48 ; 0x30 802ce74: fb01 2207 mla r2, r1, r7, r2 ContentLengthOffset++; } if (i>0) { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) 802ce78: 3b01 subs r3, #1 { size += (sizestring[j]-0x30)*S; S=S*10; 802ce7a: 4341 muls r1, r0 ContentLengthOffset++; } if (i>0) { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) 802ce7c: 2b00 cmp r3, #0 802ce7e: daf6 bge.n 802ce6e 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); 802ce80: 4f47 ldr r7, [pc, #284] ; (802cfa0 ) //printf("Content-length: %d\r\n", (int)post_data_count); if (post_data_count < MAX_POST_REQ_LEN) { 802ce82: 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); 802ce84: 603a str r2, [r7, #0] //printf("Content-length: %d\r\n", (int)post_data_count); if (post_data_count < MAX_POST_REQ_LEN) { 802ce86: d85e bhi.n 802cf46 memset(post_req_data, 0, MAX_POST_REQ_LEN); 802ce88: 4846 ldr r0, [pc, #280] ; (802cfa4 ) /* parse packet for "\r\n\r\n" */ for (i = 0; i < receivedBufLen; i++) 802ce8a: f8df 90cc ldr.w r9, [pc, #204] ; 802cf58 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); 802ce8e: 2100 movs r1, #0 802ce90: f44f 7280 mov.w r2, #256 ; 0x100 802ce94: f7f4 fe34 bl 8021b00 /* parse packet for "\r\n\r\n" */ for (i = 0; i < receivedBufLen; i++) 802ce98: 2700 movs r7, #0 802ce9a: e008 b.n 802ceae { if (strncmp ((char*)(data+i), "\r\n\r\n", 4) == 0) 802ce9c: 19f0 adds r0, r6, r7 802ce9e: 4942 ldr r1, [pc, #264] ; (802cfa8 ) 802cea0: 2204 movs r2, #4 802cea2: f7f5 f867 bl 8021f74 802cea6: b908 cbnz r0, 802ceac { offset = i+4; 802cea8: 3704 adds r7, #4 //printf("offset: %d\r\n", (int)offset); break; 802ceaa: e005 b.n 802ceb8 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++) 802ceac: 3701 adds r7, #1 802ceae: f8b9 3000 ldrh.w r3, [r9] 802ceb2: 429f cmp r7, r3 802ceb4: d3f2 bcc.n 802ce9c 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; 802ceb6: 2700 movs r7, #0 //printf("offset: %d\r\n", (int)offset); break; } } req_data_received = receivedBufLen - offset; 802ceb8: 4b27 ldr r3, [pc, #156] ; (802cf58 ) 802ceba: 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) { 802cebe: b33f cbz r7, 802cf10 /* if data was splited in two packets */ if (req_data_received < post_data_count) { 802cec0: f8df 90dc ldr.w r9, [pc, #220] ; 802cfa0 /* Copy request data to buffer */ snprintf(post_req_data, req_data_received, "%s", receiveBuf); 802cec4: 4837 ldr r0, [pc, #220] ; (802cfa4 ) /* 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) { 802cec6: f8d9 2000 ldr.w r2, [r9] //printf("offset: %d\r\n", (int)offset); break; } } req_data_received = receivedBufLen - offset; 802ceca: 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) { 802cece: 4592 cmp sl, r2 802ced0: d20b bcs.n 802ceea /* Copy request data to buffer */ snprintf(post_req_data, req_data_received, "%s", receiveBuf); 802ced2: 4b36 ldr r3, [pc, #216] ; (802cfac ) 802ced4: 4a25 ldr r2, [pc, #148] ; (802cf6c ) 802ced6: 4651 mov r1, sl 802ced8: f7fa fc7e bl 80277d8 //printf("copied: %d\r\n", (int)req_data_received); post_data_count -= req_data_received; 802cedc: f8d9 3000 ldr.w r3, [r9] 802cee0: ebca 0303 rsb r3, sl, r3 802cee4: f8c9 3000 str.w r3, [r9] 802cee8: e289 b.n 802d3fe } /* if data received completely */ else { strncat(post_req_data, (char *)(data + offset), post_data_count); 802ceea: 19f1 adds r1, r6, r7 802ceec: f7f5 f810 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) { 802cef0: 482c ldr r0, [pc, #176] ; (802cfa4 ) 802cef2: 4f21 ldr r7, [pc, #132] ; (802cf78 ) 802cef4: 4e21 ldr r6, [pc, #132] ; (802cf7c ) 802cef6: f7f4 ffdb bl 8021eb0 802cefa: 4639 mov r1, r7 802cefc: b282 uxth r2, r0 802cefe: 4633 mov r3, r6 802cf00: 4828 ldr r0, [pc, #160] ; (802cfa4 ) 802cf02: f7ff f9e3 bl 802c2cc 802cf06: 2800 cmp r0, #0 802cf08: d16f bne.n 802cfea hs->file = sendBuf; 802cf0a: 6027 str r7, [r4, #0] hs->left = sendBufLoadLen; 802cf0c: 8833 ldrh r3, [r6, #0] 802cf0e: e073 b.n 802cff8 /* request was fragmented before "\r\n\r\n" */ else { //printf("no data found!\r\n"); /* wait next packet */ log_post_reqn++; 802cf10: 4e20 ldr r6, [pc, #128] ; (802cf94 ) 802cf12: 6833 ldr r3, [r6, #0] 802cf14: 3301 adds r3, #1 /* wait max 2 requests */ if (log_post_reqn > 1) { 802cf16: 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++; 802cf18: 6033 str r3, [r6, #0] /* wait max 2 requests */ if (log_post_reqn > 1) { 802cf1a: f240 8270 bls.w 802d3fe /* Redirect to login page */ fs_open("/login.html", &file); 802cf1e: a905 add r1, sp, #20 802cf20: 4823 ldr r0, [pc, #140] ; (802cfb0 ) 802cf22: f7fe fe41 bl 802bba8 hs->file = file.data; 802cf26: 9b05 ldr r3, [sp, #20] 802cf28: 6023 str r3, [r4, #0] hs->left = file.len; 802cf2a: 9b06 ldr r3, [sp, #24] send_data(pcb, hs); 802cf2c: 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; 802cf2e: 6063 str r3, [r4, #4] send_data(pcb, hs); 802cf30: 4621 mov r1, r4 802cf32: f7fe fe75 bl 802bc20 tcp_sent(pcb, http_sent); 802cf36: 4628 mov r0, r5 802cf38: 491e ldr r1, [pc, #120] ; (802cfb4 ) 802cf3a: f003 fab1 bl 80304a0 /* End reqest */ post_data_count = 0; 802cf3e: 4b18 ldr r3, [pc, #96] ; (802cfa0 ) log_post_reqn = 0; 802cf40: 6037 str r7, [r6, #0] hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); /* End reqest */ post_data_count = 0; 802cf42: 601f str r7, [r3, #0] 802cf44: e25b b.n 802d3fe log_post_reqn = 0; } } } else { printf("Too long POST request!\r\n"); 802cf46: 481c ldr r0, [pc, #112] ; (802cfb8 ) 802cf48: f7fa fc18 bl 802777c /* Ignore request */ post_data_count = 0; log_post_reqn = 0; 802cf4c: 4a11 ldr r2, [pc, #68] ; (802cf94 ) } } else { printf("Too long POST request!\r\n"); /* Ignore request */ post_data_count = 0; 802cf4e: 2300 movs r3, #0 802cf50: 603b str r3, [r7, #0] log_post_reqn = 0; 802cf52: 6013 str r3, [r2, #0] 802cf54: e05f b.n 802d016 802cf56: bf00 nop 802cf58: 20000d34 .word 0x20000d34 802cf5c: 08040c2a .word 0x08040c2a 802cf60: 08040c3f .word 0x08040c3f 802cf64: 20000711 .word 0x20000711 802cf68: 2000e23c .word 0x2000e23c 802cf6c: 080399bb .word 0x080399bb 802cf70: 20000d23 .word 0x20000d23 802cf74: 2000cfc4 .word 0x2000cfc4 802cf78: 2000d38c .word 0x2000d38c 802cf7c: 20000d20 .word 0x20000d20 802cf80: 08040f23 .word 0x08040f23 802cf84: 08040f31 .word 0x08040f31 802cf88: 08040f40 .word 0x08040f40 802cf8c: 08040f51 .word 0x08040f51 802cf90: 08040f5e .word 0x08040f5e 802cf94: 2000e238 .word 0x2000e238 802cf98: 20000d28 .word 0x20000d28 802cf9c: 0803c319 .word 0x0803c319 802cfa0: 2000e264 .word 0x2000e264 802cfa4: 2000e138 .word 0x2000e138 802cfa8: 08041130 .word 0x08041130 802cfac: 2000db5c .word 0x2000db5c 802cfb0: 08040f6e .word 0x08040f6e 802cfb4: 0802bc93 .word 0x0802bc93 802cfb8: 08040f7a .word 0x08040f7a hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } } else if (post_data_count > 0) 802cfbc: 4b87 ldr r3, [pc, #540] ; (802d1dc ) 802cfbe: 681a ldr r2, [r3, #0] 802cfc0: 2a00 cmp r2, #0 802cfc2: d028 beq.n 802d016 { strncat(post_req_data, data, post_data_count); 802cfc4: 4631 mov r1, r6 802cfc6: 4886 ldr r0, [pc, #536] ; (802d1e0 ) 802cfc8: f7f4 ffa2 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) { 802cfcc: 4884 ldr r0, [pc, #528] ; (802d1e0 ) 802cfce: f7f4 ff6f bl 8021eb0 802cfd2: 4984 ldr r1, [pc, #528] ; (802d1e4 ) 802cfd4: 4b84 ldr r3, [pc, #528] ; (802d1e8 ) 802cfd6: b282 uxth r2, r0 802cfd8: 4881 ldr r0, [pc, #516] ; (802d1e0 ) 802cfda: f7ff f977 bl 802c2cc 802cfde: b920 cbnz r0, 802cfea hs->file = sendBuf; 802cfe0: 4b80 ldr r3, [pc, #512] ; (802d1e4 ) 802cfe2: 6023 str r3, [r4, #0] hs->left = sendBufLoadLen; 802cfe4: 4b80 ldr r3, [pc, #512] ; (802d1e8 ) 802cfe6: 881b ldrh r3, [r3, #0] 802cfe8: e006 b.n 802cff8 tcp_sent(pcb, http_sent); } else { /* Redirect to login page */ fs_open("/login.html", &file); 802cfea: 4880 ldr r0, [pc, #512] ; (802d1ec ) 802cfec: a905 add r1, sp, #20 802cfee: f7fe fddb bl 802bba8 hs->file = file.data; 802cff2: 9b05 ldr r3, [sp, #20] 802cff4: 6023 str r3, [r4, #0] hs->left = file.len; 802cff6: 9b06 ldr r3, [sp, #24] 802cff8: 6063 str r3, [r4, #4] send_data(pcb, hs); 802cffa: 4628 mov r0, r5 802cffc: 4621 mov r1, r4 802cffe: f7fe fe0f bl 802bc20 tcp_sent(pcb, http_sent); 802d002: 4628 mov r0, r5 802d004: 497a ldr r1, [pc, #488] ; (802d1f0 ) 802d006: f003 fa4b bl 80304a0 } /* End reqest */ post_data_count = 0; 802d00a: 4a74 ldr r2, [pc, #464] ; (802d1dc ) 802d00c: 2300 movs r3, #0 802d00e: 6013 str r3, [r2, #0] log_post_reqn = 0; 802d010: 4a78 ldr r2, [pc, #480] ; (802d1f4 ) 802d012: 6013 str r3, [r2, #0] 802d014: e1f3 b.n 802d3fe } else { fs_open("/login.html", &file); 802d016: 4875 ldr r0, [pc, #468] ; (802d1ec ) 802d018: e1e2 b.n 802d3e0 } else if ( Authenticated == true ) { if (strncmp(data, "GET /main.css", 13) == 0) // + 802d01a: 4630 mov r0, r6 802d01c: 4976 ldr r1, [pc, #472] ; (802d1f8 ) 802d01e: 220d movs r2, #13 802d020: f7f4 ffa8 bl 8021f74 802d024: b908 cbnz r0, 802d02a { fs_open("/main.css", &file); 802d026: 4875 ldr r0, [pc, #468] ; (802d1fc ) 802d028: e1da b.n 802d3e0 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) // + 802d02a: 4630 mov r0, r6 802d02c: 4974 ldr r1, [pc, #464] ; (802d200 ) 802d02e: 220e movs r2, #14 802d030: f7f4 ffa0 bl 8021f74 802d034: b908 cbnz r0, 802d03a { fs_open("/rotek.png", &file); 802d036: 4873 ldr r0, [pc, #460] ; (802d204 ) 802d038: e1d2 b.n 802d3e0 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) // ? 802d03a: 4630 mov r0, r6 802d03c: 4972 ldr r1, [pc, #456] ; (802d208 ) 802d03e: 2210 movs r2, #16 802d040: f7f4 ff98 bl 8021f74 802d044: b908 cbnz r0, 802d04a { fs_open("/favicon.ico", &file); 802d046: 4871 ldr r0, [pc, #452] ; (802d20c ) 802d048: e1ca b.n 802d3e0 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) // + 802d04a: 4630 mov r0, r6 802d04c: 4970 ldr r1, [pc, #448] ; (802d210 ) 802d04e: 220c movs r2, #12 802d050: f7f4 ff90 bl 8021f74 802d054: b908 cbnz r0, 802d05a { fs_open("/main.js", &file); 802d056: 486f ldr r0, [pc, #444] ; (802d214 ) 802d058: e1c2 b.n 802d3e0 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /role.js", 12) == 0) 802d05a: 4630 mov r0, r6 802d05c: 496e ldr r1, [pc, #440] ; (802d218 ) 802d05e: 220c movs r2, #12 802d060: f7f4 ff88 bl 8021f74 802d064: b908 cbnz r0, 802d06a { fs_open("/role.js", &file); 802d066: 486d ldr r0, [pc, #436] ; (802d21c ) 802d068: e1ba b.n 802d3e0 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /settings.html", 18) == 0) // + 802d06a: 4630 mov r0, r6 802d06c: 496c ldr r1, [pc, #432] ; (802d220 ) 802d06e: 2212 movs r2, #18 802d070: f7f4 ff80 bl 8021f74 802d074: b940 cbnz r0, 802d088 { HTTP_UpdateUserLoginTime(user_id); 802d076: 4638 mov r0, r7 802d078: f7fe fd84 bl 802bb84 if (seclevel == 0){ 802d07c: 4b69 ldr r3, [pc, #420] ; (802d224 ) 802d07e: 781b ldrb r3, [r3, #0] 802d080: 2b00 cmp r3, #0 802d082: f040 81ac bne.w 802d3de 802d086: e15f b.n 802d348 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } } else if (strncmp(data, "GET /info.html", 14) == 0) // + 802d088: 4630 mov r0, r6 802d08a: 4967 ldr r1, [pc, #412] ; (802d228 ) 802d08c: 220e movs r2, #14 802d08e: f7f4 ff71 bl 8021f74 802d092: b920 cbnz r0, 802d09e { HTTP_UpdateUserLoginTime(user_id); 802d094: 4638 mov r0, r7 802d096: f7fe fd75 bl 802bb84 fs_open("/info.html", &file); 802d09a: 4864 ldr r0, [pc, #400] ; (802d22c ) 802d09c: e1a0 b.n 802d3e0 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) 802d09e: 4630 mov r0, r6 802d0a0: 4963 ldr r1, [pc, #396] ; (802d230 ) 802d0a2: 2211 movs r2, #17 802d0a4: f7f4 ff66 bl 8021f74 802d0a8: b920 cbnz r0, 802d0b4 { HTTP_UpdateUserLoginTime(user_id); 802d0aa: 4638 mov r0, r7 802d0ac: f7fe fd6a bl 802bb84 fs_open("/history.html", &file); 802d0b0: 4860 ldr r0, [pc, #384] ; (802d234 ) 802d0b2: e195 b.n 802d3e0 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) 802d0b4: 4630 mov r0, r6 802d0b6: 4960 ldr r1, [pc, #384] ; (802d238 ) 802d0b8: 2215 movs r2, #21 802d0ba: f7f4 ff5b bl 8021f74 802d0be: b920 cbnz r0, 802d0ca { HTTP_UpdateUserLoginTime(user_id); 802d0c0: 4638 mov r0, r7 802d0c2: f7fe fd5f bl 802bb84 fs_open("/ups_history.html", &file); 802d0c6: 485d ldr r0, [pc, #372] ; (802d23c ) 802d0c8: e18a b.n 802d3e0 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) // + 802d0ca: 4630 mov r0, r6 802d0cc: 495c ldr r1, [pc, #368] ; (802d240 ) 802d0ce: 2210 movs r2, #16 802d0d0: f7f4 ff50 bl 8021f74 802d0d4: b940 cbnz r0, 802d0e8 { HTTP_GetParamsPage1(sendBuf); 802d0d6: 4e43 ldr r6, [pc, #268] ; (802d1e4 ) 802d0d8: 4630 mov r0, r6 802d0da: f000 f9bf bl 802d45c hs->file = sendBuf; 802d0de: 6026 str r6, [r4, #0] hs->left = strlen(sendBuf); 802d0e0: 4630 mov r0, r6 802d0e2: f7f4 fee5 bl 8021eb0 802d0e6: e042 b.n 802d16e send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /settings.cgi", 17) == 0) // + 802d0e8: 4630 mov r0, r6 802d0ea: 4956 ldr r1, [pc, #344] ; (802d244 ) 802d0ec: 2211 movs r2, #17 802d0ee: f7f4 ff41 bl 8021f74 802d0f2: b988 cbnz r0, 802d118 { SET_PAGE = SET_PAGE_PAGE2; 802d0f4: 4b54 ldr r3, [pc, #336] ; (802d248 ) 802d0f6: 2202 movs r2, #2 802d0f8: 701a strb r2, [r3, #0] if (seclevel == 0) { 802d0fa: 4b4a ldr r3, [pc, #296] ; (802d224 ) 802d0fc: 781b ldrb r3, [r3, #0] 802d0fe: 2b00 cmp r3, #0 802d100: f040 817d bne.w 802d3fe if (HTTP_SettingsPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen) == SEND_REQUIRED_YES) 802d104: 4f37 ldr r7, [pc, #220] ; (802d1e4 ) 802d106: 4e38 ldr r6, [pc, #224] ; (802d1e8 ) 802d108: 4b50 ldr r3, [pc, #320] ; (802d24c ) 802d10a: 4851 ldr r0, [pc, #324] ; (802d250 ) 802d10c: 881a ldrh r2, [r3, #0] 802d10e: 4639 mov r1, r7 802d110: 4633 mov r3, r6 802d112: f7fe fec5 bl 802bea0 802d116: e0e9 b.n 802d2ec send_data(pcb, hs); tcp_sent(pcb, http_sent); }*/ } } else if (strncmp(data, "POST /settings.cgi", 18) == 0) 802d118: 4630 mov r0, r6 802d11a: 494e ldr r1, [pc, #312] ; (802d254 ) 802d11c: 2212 movs r2, #18 802d11e: f7f4 ff29 bl 8021f74 802d122: 4681 mov r9, r0 802d124: bb28 cbnz r0, 802d172 { strncat(&receiveBuf, " ", 1); 802d126: 2201 movs r2, #1 802d128: 494b ldr r1, [pc, #300] ; (802d258 ) 802d12a: 4849 ldr r0, [pc, #292] ; (802d250 ) HTTP_SetSettings(receiveBuf, receivedBufLen); memset(sendBuf, 0, SEND_BUF_MAX_LEN); 802d12c: 4e2d ldr r6, [pc, #180] ; (802d1e4 ) }*/ } } else if (strncmp(data, "POST /settings.cgi", 18) == 0) { strncat(&receiveBuf, " ", 1); 802d12e: f7f4 feef bl 8021f10 HTTP_SetSettings(receiveBuf, receivedBufLen); 802d132: 4b46 ldr r3, [pc, #280] ; (802d24c ) 802d134: 4846 ldr r0, [pc, #280] ; (802d250 ) 802d136: 8819 ldrh r1, [r3, #0] 802d138: f7ff f9d4 bl 802c4e4 memset(sendBuf, 0, SEND_BUF_MAX_LEN); 802d13c: f44f 62fa mov.w r2, #2000 ; 0x7d0 802d140: 4649 mov r1, r9 802d142: 4630 mov r0, r6 802d144: f7f4 fcdc bl 8021b00 strcpy(sendBuf, "HTTP/1.1 200 OK\r\n"); 802d148: 4944 ldr r1, [pc, #272] ; (802d25c ) 802d14a: 4630 mov r0, r6 802d14c: f7f4 fe52 bl 8021df4 strcat(sendBuf, "\r\n\r\n"); 802d150: 4943 ldr r1, [pc, #268] ; (802d260 ) 802d152: 4630 mov r0, r6 802d154: f7f4 fd3a bl 8021bcc strcat(sendBuf,"\r\n\r\n"); 802d158: 4942 ldr r1, [pc, #264] ; (802d264 ) 802d15a: 4630 mov r0, r6 802d15c: f7f4 fd36 bl 8021bcc sendBufLoadLen = strlen(sendBuf); 802d160: 4630 mov r0, r6 802d162: f7f4 fea5 bl 8021eb0 802d166: 4b20 ldr r3, [pc, #128] ; (802d1e8 ) 802d168: 8018 strh r0, [r3, #0] hs->file = sendBuf; 802d16a: 6026 str r6, [r4, #0] hs->left = sendBufLoadLen; 802d16c: b280 uxth r0, r0 802d16e: 6060 str r0, [r4, #4] 802d170: e13d b.n 802d3ee send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /info.cgi", 13) == 0) // + 802d172: 4630 mov r0, r6 802d174: 493c ldr r1, [pc, #240] ; (802d268 ) 802d176: 220d movs r2, #13 802d178: f7f4 fefc bl 8021f74 802d17c: b948 cbnz r0, 802d192 { if (HTTP_InfoPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen) == SEND_REQUIRED_YES) 802d17e: 4f19 ldr r7, [pc, #100] ; (802d1e4 ) 802d180: 4e19 ldr r6, [pc, #100] ; (802d1e8 ) 802d182: 4b32 ldr r3, [pc, #200] ; (802d24c ) 802d184: 4832 ldr r0, [pc, #200] ; (802d250 ) 802d186: 881a ldrh r2, [r3, #0] 802d188: 4639 mov r1, r7 802d18a: 4633 mov r3, r6 802d18c: f7fe feac bl 802bee8 802d190: e0ac b.n 802d2ec hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); }*/ } else if (strncmp(data, "POST /info.cgi", 14) == 0) 802d192: 4630 mov r0, r6 802d194: 4935 ldr r1, [pc, #212] ; (802d26c ) 802d196: 220e movs r2, #14 802d198: f7f4 feec bl 8021f74 802d19c: 4681 mov r9, r0 802d19e: 2800 cmp r0, #0 802d1a0: d168 bne.n 802d274 { strncat(&receiveBuf, " ", 1); 802d1a2: 2201 movs r2, #1 802d1a4: 492c ldr r1, [pc, #176] ; (802d258 ) 802d1a6: 482a ldr r0, [pc, #168] ; (802d250 ) HTTP_SetInfo(receiveBuf, receivedBufLen); memset(sendBuf, 0, SEND_BUF_MAX_LEN); 802d1a8: 4e0e ldr r6, [pc, #56] ; (802d1e4 ) tcp_sent(pcb, http_sent); }*/ } else if (strncmp(data, "POST /info.cgi", 14) == 0) { strncat(&receiveBuf, " ", 1); 802d1aa: f7f4 feb1 bl 8021f10 HTTP_SetInfo(receiveBuf, receivedBufLen); 802d1ae: 4b27 ldr r3, [pc, #156] ; (802d24c ) 802d1b0: 4827 ldr r0, [pc, #156] ; (802d250 ) 802d1b2: 8819 ldrh r1, [r3, #0] 802d1b4: f7ff f944 bl 802c440 memset(sendBuf, 0, SEND_BUF_MAX_LEN); 802d1b8: f44f 62fa mov.w r2, #2000 ; 0x7d0 802d1bc: 4649 mov r1, r9 802d1be: 4630 mov r0, r6 802d1c0: f7f4 fc9e bl 8021b00 strcpy(sendBuf, "HTTP/1.1 200 OK\r\n"); 802d1c4: 4925 ldr r1, [pc, #148] ; (802d25c ) 802d1c6: 4630 mov r0, r6 802d1c8: f7f4 fe14 bl 8021df4 strcat(sendBuf, "\r\n\r\n"); 802d1cc: 4924 ldr r1, [pc, #144] ; (802d260 ) 802d1ce: 4630 mov r0, r6 802d1d0: f7f4 fcfc bl 8021bcc strcat(sendBuf,"\r\n\r\n"); 802d1d4: 4630 mov r0, r6 802d1d6: 4926 ldr r1, [pc, #152] ; (802d270 ) 802d1d8: e7c0 b.n 802d15c 802d1da: bf00 nop 802d1dc: 2000e264 .word 0x2000e264 802d1e0: 2000e138 .word 0x2000e138 802d1e4: 2000d38c .word 0x2000d38c 802d1e8: 20000d20 .word 0x20000d20 802d1ec: 08040f6e .word 0x08040f6e 802d1f0: 0802bc93 .word 0x0802bc93 802d1f4: 2000e238 .word 0x2000e238 802d1f8: 08040f23 .word 0x08040f23 802d1fc: 08040f27 .word 0x08040f27 802d200: 08040f31 .word 0x08040f31 802d204: 08040f35 .word 0x08040f35 802d208: 08040f40 .word 0x08040f40 802d20c: 08040f44 .word 0x08040f44 802d210: 08040f93 .word 0x08040f93 802d214: 08040f97 .word 0x08040f97 802d218: 08040f51 .word 0x08040f51 802d21c: 08040f55 .word 0x08040f55 802d220: 08040fa0 .word 0x08040fa0 802d224: 20000711 .word 0x20000711 802d228: 08040fbf .word 0x08040fbf 802d22c: 08040fc3 .word 0x08040fc3 802d230: 08040fce .word 0x08040fce 802d234: 08040fd2 .word 0x08040fd2 802d238: 08040fe0 .word 0x08040fe0 802d23c: 08040fe4 .word 0x08040fe4 802d240: 08040ff6 .word 0x08040ff6 802d244: 08041007 .word 0x08041007 802d248: 20000d22 .word 0x20000d22 802d24c: 20000d34 .word 0x20000d34 802d250: 2000db5c .word 0x2000db5c 802d254: 08041019 .word 0x08041019 802d258: 08039ade .word 0x08039ade 802d25c: 0804102c .word 0x0804102c 802d260: 08041130 .word 0x08041130 802d264: 0804103e .word 0x0804103e 802d268: 080410ad .word 0x080410ad 802d26c: 080410bb .word 0x080410bb 802d270: 080410ca .word 0x080410ca hs->file = sendBuf; hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /history.cgi", 16) == 0) 802d274: 4630 mov r0, r6 802d276: 4965 ldr r1, [pc, #404] ; (802d40c ) 802d278: 2210 movs r2, #16 802d27a: f7f4 fe7b bl 8021f74 802d27e: b9a0 cbnz r0, 802d2aa { int res; res = HTTP_HistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802d280: 4b63 ldr r3, [pc, #396] ; (802d410 ) 802d282: 4f64 ldr r7, [pc, #400] ; (802d414 ) 802d284: 4e64 ldr r6, [pc, #400] ; (802d418 ) 802d286: 881a ldrh r2, [r3, #0] 802d288: 4864 ldr r0, [pc, #400] ; (802d41c ) 802d28a: 4639 mov r1, r7 802d28c: 4633 mov r3, r6 802d28e: f7ff fc01 bl 802ca94 if (res == SEND_REQUIRED_FILE) 802d292: 2802 cmp r0, #2 802d294: d12a bne.n 802d2ec { hs->file = sendBuf; hs->left = sendBufLoadLen; 802d296: 8833 ldrh r3, [r6, #0] res = HTTP_HistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); if (res == SEND_REQUIRED_FILE) { hs->file = sendBuf; 802d298: 6027 str r7, [r4, #0] hs->left = sendBufLoadLen; send_data(pcb, hs); 802d29a: 4628 mov r0, r5 802d29c: 4621 mov r1, r4 res = HTTP_HistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); if (res == SEND_REQUIRED_FILE) { hs->file = sendBuf; hs->left = sendBufLoadLen; 802d29e: 6063 str r3, [r4, #4] send_data(pcb, hs); 802d2a0: f7fe fcbe bl 802bc20 tcp_sent(pcb, http_sent_history); 802d2a4: 4628 mov r0, r5 802d2a6: 495e ldr r1, [pc, #376] ; (802d420 ) 802d2a8: e019 b.n 802d2de hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } } else if (strncmp(data, "GET /ups_history.cgi", 19) == 0) 802d2aa: 4630 mov r0, r6 802d2ac: 495d ldr r1, [pc, #372] ; (802d424 ) 802d2ae: 2213 movs r2, #19 802d2b0: f7f4 fe60 bl 8021f74 802d2b4: b9f0 cbnz r0, 802d2f4 { int res; res = HTTP_UpsHistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802d2b6: 4b56 ldr r3, [pc, #344] ; (802d410 ) 802d2b8: 4f56 ldr r7, [pc, #344] ; (802d414 ) 802d2ba: 4e57 ldr r6, [pc, #348] ; (802d418 ) 802d2bc: 881a ldrh r2, [r3, #0] 802d2be: 4857 ldr r0, [pc, #348] ; (802d41c ) 802d2c0: 4639 mov r1, r7 802d2c2: 4633 mov r3, r6 802d2c4: f7ff fb8a bl 802c9dc if (res == SEND_REQUIRED_FILE) 802d2c8: 2802 cmp r0, #2 802d2ca: d10f bne.n 802d2ec { hs->file = sendBuf; hs->left = sendBufLoadLen; 802d2cc: 8833 ldrh r3, [r6, #0] res = HTTP_UpsHistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); if (res == SEND_REQUIRED_FILE) { hs->file = sendBuf; 802d2ce: 6027 str r7, [r4, #0] hs->left = sendBufLoadLen; send_data(pcb, hs); 802d2d0: 4628 mov r0, r5 802d2d2: 4621 mov r1, r4 res = HTTP_UpsHistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); if (res == SEND_REQUIRED_FILE) { hs->file = sendBuf; hs->left = sendBufLoadLen; 802d2d4: 6063 str r3, [r4, #4] send_data(pcb, hs); 802d2d6: f7fe fca3 bl 802bc20 tcp_sent(pcb, http_sent_log); 802d2da: 4953 ldr r1, [pc, #332] ; (802d428 ) 802d2dc: 4628 mov r0, r5 802d2de: f003 f8df bl 80304a0 tcp_err(pcb, http_sent_log_err); 802d2e2: 4628 mov r0, r5 802d2e4: 4951 ldr r1, [pc, #324] ; (802d42c ) 802d2e6: f003 f8dd bl 80304a4 802d2ea: e088 b.n 802d3fe } else if (res == SEND_REQUIRED_YES) { 802d2ec: 2800 cmp r0, #0 802d2ee: f040 8086 bne.w 802d3fe 802d2f2: e06e b.n 802d3d2 send_data(pcb, hs); tcp_sent(pcb, http_sent); } } /* Тест АКБ ИБП */ else if (strncmp(data, "POST /bat_test.cgi", 18) == 0) 802d2f4: 4630 mov r0, r6 802d2f6: 494e ldr r1, [pc, #312] ; (802d430 ) 802d2f8: 2212 movs r2, #18 802d2fa: f7f4 fe3b bl 8021f74 802d2fe: b948 cbnz r0, 802d314 { HTTP_UPSTest(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802d300: 4f44 ldr r7, [pc, #272] ; (802d414 ) 802d302: 4e45 ldr r6, [pc, #276] ; (802d418 ) 802d304: 4b42 ldr r3, [pc, #264] ; (802d410 ) 802d306: 4845 ldr r0, [pc, #276] ; (802d41c ) 802d308: 881a ldrh r2, [r3, #0] 802d30a: 4639 mov r1, r7 802d30c: 4633 mov r3, r6 802d30e: f7fe fe0f bl 802bf30 802d312: e05e b.n 802d3d2 hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Выключение ИБП */ else if (strncmp(data, "POST /ups_power.cgi", 19) == 0) 802d314: 4630 mov r0, r6 802d316: 4947 ldr r1, [pc, #284] ; (802d434 ) 802d318: 2213 movs r2, #19 802d31a: f7f4 fe2b bl 8021f74 802d31e: b948 cbnz r0, 802d334 { HTTP_UPSshutdown(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802d320: 4f3c ldr r7, [pc, #240] ; (802d414 ) 802d322: 4e3d ldr r6, [pc, #244] ; (802d418 ) 802d324: 4b3a ldr r3, [pc, #232] ; (802d410 ) 802d326: 483d ldr r0, [pc, #244] ; (802d41c ) 802d328: 881a ldrh r2, [r3, #0] 802d32a: 4639 mov r1, r7 802d32c: 4633 mov r3, r6 802d32e: f7fe fe8d bl 802c04c 802d332: e04e b.n 802d3d2 hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Сброс настроек и сохранине */ else if (strncmp(data, "GET /reset.cgi", 14) == 0) 802d334: 4630 mov r0, r6 802d336: 4940 ldr r1, [pc, #256] ; (802d438 ) 802d338: 220e movs r2, #14 802d33a: f7f4 fe1b bl 8021f74 802d33e: b928 cbnz r0, 802d34c { HTTP_ResetSettings(); 802d340: f000 fd28 bl 802dd94 HTTP_SaveSettings(); 802d344: f000 fd3a bl 802ddbc fs_open("/settings.html", &file); 802d348: 483c ldr r0, [pc, #240] ; (802d43c ) 802d34a: e049 b.n 802d3e0 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Перезагрузка контроллера */ else if (strncmp(data, "GET /reboot.cgi", 15) == 0) 802d34c: 4630 mov r0, r6 802d34e: 493c ldr r1, [pc, #240] ; (802d440 ) 802d350: 220f movs r2, #15 802d352: f7f4 fe0f bl 8021f74 802d356: b910 cbnz r0, 802d35e { HTTP_Reboot(); 802d358: f000 fd5c bl 802de14 802d35c: e04f b.n 802d3fe } /* Подтверждение новых сетевых настроек */ else if (strncmp(data, "GET /confirm.cgi", 16) == 0) 802d35e: 4630 mov r0, r6 802d360: 4938 ldr r1, [pc, #224] ; (802d444 ) 802d362: 2210 movs r2, #16 802d364: f7f4 fe06 bl 8021f74 802d368: b920 cbnz r0, 802d374 { SetWebReinitFlag(false); 802d36a: f7fa fee1 bl 8028130 SetConfirmWebParamsFlag(); 802d36e: f7fa fee5 bl 802813c 802d372: e034 b.n 802d3de hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Проверка пароля, переход в bootloader */ else if (strncmp(data, "GET /fw_update.cgi", 18) == 0) 802d374: 4630 mov r0, r6 802d376: 4934 ldr r1, [pc, #208] ; (802d448 ) 802d378: 2212 movs r2, #18 802d37a: f7f4 fdfb bl 8021f74 802d37e: b948 cbnz r0, 802d394 { HTTP_ConfirmBootPwd(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802d380: 4f24 ldr r7, [pc, #144] ; (802d414 ) 802d382: 4e25 ldr r6, [pc, #148] ; (802d418 ) 802d384: 4b22 ldr r3, [pc, #136] ; (802d410 ) 802d386: 4825 ldr r0, [pc, #148] ; (802d41c ) 802d388: 881a ldrh r2, [r3, #0] 802d38a: 4639 mov r1, r7 802d38c: 4633 mov r3, r6 802d38e: f7fe ff05 bl 802c19c 802d392: e01e b.n 802d3d2 hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Смена пароля пользователя */ else if (strncmp(data, "POST /changepwd.cgi", 19) == 0) 802d394: 4630 mov r0, r6 802d396: 492d ldr r1, [pc, #180] ; (802d44c ) 802d398: 2213 movs r2, #19 802d39a: f7f4 fdeb bl 8021f74 802d39e: b948 cbnz r0, 802d3b4 { HTTP_ChangeUserPwd(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802d3a0: 4f1c ldr r7, [pc, #112] ; (802d414 ) 802d3a2: 4e1d ldr r6, [pc, #116] ; (802d418 ) 802d3a4: 4b1a ldr r3, [pc, #104] ; (802d410 ) 802d3a6: 481d ldr r0, [pc, #116] ; (802d41c ) 802d3a8: 881a ldrh r2, [r3, #0] 802d3aa: 4639 mov r1, r7 802d3ac: 4633 mov r3, r6 802d3ae: f7ff fbcf bl 802cb50 802d3b2: e00e b.n 802d3d2 hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } // На производстве else if (strncmp(data, "GET /setProdate.cgi", 19) == 0) 802d3b4: 4630 mov r0, r6 802d3b6: 4926 ldr r1, [pc, #152] ; (802d450 ) 802d3b8: 2213 movs r2, #19 802d3ba: f7f4 fddb bl 8021f74 802d3be: b958 cbnz r0, 802d3d8 { HTTP_Prodate(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802d3c0: 4b13 ldr r3, [pc, #76] ; (802d410 ) 802d3c2: 4f14 ldr r7, [pc, #80] ; (802d414 ) 802d3c4: 4e14 ldr r6, [pc, #80] ; (802d418 ) 802d3c6: 881a ldrh r2, [r3, #0] 802d3c8: 4814 ldr r0, [pc, #80] ; (802d41c ) 802d3ca: 4639 mov r1, r7 802d3cc: 4633 mov r3, r6 802d3ce: f7ff fad1 bl 802c974 hs->file = sendBuf; 802d3d2: 6027 str r7, [r4, #0] hs->left = sendBufLoadLen; 802d3d4: 8833 ldrh r3, [r6, #0] 802d3d6: e009 b.n 802d3ec send_data(pcb, hs); tcp_sent(pcb, http_sent); } else { HTTP_UpdateUserLoginTime(user_id); 802d3d8: 4638 mov r0, r7 802d3da: f7fe fbd3 bl 802bb84 fs_open("/index.html", &file); // + 802d3de: 481d ldr r0, [pc, #116] ; (802d454 ) 802d3e0: a905 add r1, sp, #20 802d3e2: f7fe fbe1 bl 802bba8 hs->file = file.data; 802d3e6: 9b05 ldr r3, [sp, #20] 802d3e8: 6023 str r3, [r4, #0] hs->left = file.len; 802d3ea: 9b06 ldr r3, [sp, #24] 802d3ec: 6063 str r3, [r4, #4] send_data(pcb, hs); 802d3ee: 4628 mov r0, r5 802d3f0: 4621 mov r1, r4 802d3f2: f7fe fc15 bl 802bc20 tcp_sent(pcb, http_sent); 802d3f6: 4628 mov r0, r5 802d3f8: 4917 ldr r1, [pc, #92] ; (802d458 ) 802d3fa: f003 f851 bl 80304a0 } } } pbuf_free(p); 802d3fe: 4640 mov r0, r8 802d400: f002 fd04 bl 802fe0c /* if (err == ERR_OK && p == NULL) { close_conn(pcb, hs); }*/ return ERR_OK; } 802d404: 2000 movs r0, #0 802d406: b01d add sp, #116 ; 0x74 802d408: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802d40c: 08041135 .word 0x08041135 802d410: 20000d34 .word 0x20000d34 802d414: 2000d38c .word 0x2000d38c 802d418: 20000d20 .word 0x20000d20 802d41c: 2000db5c .word 0x2000db5c 802d420: 0802bd4d .word 0x0802bd4d 802d424: 08041146 .word 0x08041146 802d428: 0802bcad .word 0x0802bcad 802d42c: 0802bb79 .word 0x0802bb79 802d430: 0804115b .word 0x0804115b 802d434: 0804116e .word 0x0804116e 802d438: 08041182 .word 0x08041182 802d43c: 08040fa4 .word 0x08040fa4 802d440: 08041191 .word 0x08041191 802d444: 080411a1 .word 0x080411a1 802d448: 080411b2 .word 0x080411b2 802d44c: 080411c5 .word 0x080411c5 802d450: 080411d9 .word 0x080411d9 802d454: 08040fb3 .word 0x08040fb3 802d458: 0802bc93 .word 0x0802bc93 0802d45c : /** * @brief Возвращяет строку с настройками на первой странице * @retval None */ void HTTP_GetParamsPage1(char *buf) { 802d45c: b510 push {r4, lr} char str[40]; uint8_t len; memset(buf, 0, 1000); 802d45e: f44f 727a mov.w r2, #1000 ; 0x3e8 /** * @brief Возвращяет строку с настройками на первой странице * @retval None */ void HTTP_GetParamsPage1(char *buf) { 802d462: b08c sub sp, #48 ; 0x30 802d464: 4604 mov r4, r0 char str[40]; uint8_t len; memset(buf, 0, 1000); 802d466: 2100 movs r1, #0 802d468: f7f4 fb4a bl 8021b00 // Headers для поддержки saffari strcpy(buf, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\n"); 802d46c: 4620 mov r0, r4 802d46e: 496f ldr r1, [pc, #444] ; (802d62c ) 802d470: f7f4 fcc0 bl 8021df4 // Параметры UPS GetInputVoltageStr(str, &len); 802d474: a802 add r0, sp, #8 802d476: f10d 0107 add.w r1, sp, #7 802d47a: f7fa fa03 bl 8027884 strcat(buf, "{\"AC\":\""); 802d47e: 4620 mov r0, r4 802d480: 496b ldr r1, [pc, #428] ; (802d630 ) 802d482: f7f4 fba3 bl 8021bcc strncat(buf, str, len); 802d486: f89d 2007 ldrb.w r2, [sp, #7] 802d48a: a902 add r1, sp, #8 802d48c: 4620 mov r0, r4 802d48e: f7f4 fd3f bl 8021f10 GetOutputVoltageStr(str, &len); 802d492: a802 add r0, sp, #8 802d494: f10d 0107 add.w r1, sp, #7 802d498: f7fa fa0a bl 80278b0 strcat(buf, "\",\"DC\":\""); 802d49c: 4620 mov r0, r4 802d49e: 4965 ldr r1, [pc, #404] ; (802d634 ) 802d4a0: f7f4 fb94 bl 8021bcc strncat(buf, str, len); 802d4a4: f89d 2007 ldrb.w r2, [sp, #7] 802d4a8: a902 add r1, sp, #8 802d4aa: 4620 mov r0, r4 802d4ac: f7f4 fd30 bl 8021f10 GetInputFreqStr(str, &len); 802d4b0: a802 add r0, sp, #8 802d4b2: f10d 0107 add.w r1, sp, #7 802d4b6: f7fa f9b9 bl 802782c strcat(buf, "\",\"in_freq\":\""); 802d4ba: 4620 mov r0, r4 802d4bc: 495e ldr r1, [pc, #376] ; (802d638 ) 802d4be: f7f4 fb85 bl 8021bcc strncat(buf, str, len); 802d4c2: f89d 2007 ldrb.w r2, [sp, #7] 802d4c6: a902 add r1, sp, #8 802d4c8: 4620 mov r0, r4 802d4ca: f7f4 fd21 bl 8021f10 GetOutputFreqStr(str, &len); 802d4ce: a802 add r0, sp, #8 802d4d0: f10d 0107 add.w r1, sp, #7 802d4d4: f7fa f9c0 bl 8027858 strcat(buf, "\",\"out_freq\":\""); 802d4d8: 4620 mov r0, r4 802d4da: 4958 ldr r1, [pc, #352] ; (802d63c ) 802d4dc: f7f4 fb76 bl 8021bcc strncat(buf, str, len); 802d4e0: f89d 2007 ldrb.w r2, [sp, #7] 802d4e4: a902 add r1, sp, #8 802d4e6: 4620 mov r0, r4 802d4e8: f7f4 fd12 bl 8021f10 GetPowerStr(str, &len); 802d4ec: a802 add r0, sp, #8 802d4ee: f10d 0107 add.w r1, sp, #7 802d4f2: f7fa f9f3 bl 80278dc strcat(buf, "\",\"pwr\":\""); 802d4f6: 4620 mov r0, r4 802d4f8: 4951 ldr r1, [pc, #324] ; (802d640 ) 802d4fa: f7f4 fb67 bl 8021bcc strncat(buf, str, len); 802d4fe: f89d 2007 ldrb.w r2, [sp, #7] 802d502: a902 add r1, sp, #8 802d504: 4620 mov r0, r4 802d506: f7f4 fd03 bl 8021f10 GetBatCapacityStr(str, &len); 802d50a: a802 add r0, sp, #8 802d50c: f10d 0107 add.w r1, sp, #7 802d510: f7fa f9f6 bl 8027900 strcat(buf, "\",\"bat_cap\":\""); 802d514: 4620 mov r0, r4 802d516: 494b ldr r1, [pc, #300] ; (802d644 ) 802d518: f7f4 fb58 bl 8021bcc strncat(buf, str, len); 802d51c: f89d 2007 ldrb.w r2, [sp, #7] 802d520: a902 add r1, sp, #8 802d522: 4620 mov r0, r4 802d524: f7f4 fcf4 bl 8021f10 GetInternalTempStr(str, &len); 802d528: a802 add r0, sp, #8 802d52a: f10d 0107 add.w r1, sp, #7 802d52e: f7fa fa0b bl 8027948 strcat(buf, "\",\"inner_temp\":\""); 802d532: 4620 mov r0, r4 802d534: 4944 ldr r1, [pc, #272] ; (802d648 ) 802d536: f7f4 fb49 bl 8021bcc strncat(buf, str, len); 802d53a: f89d 2007 ldrb.w r2, [sp, #7] 802d53e: a902 add r1, sp, #8 802d540: 4620 mov r0, r4 802d542: f7f4 fce5 bl 8021f10 GetRuntimeStr(str, &len); 802d546: a802 add r0, sp, #8 802d548: f10d 0107 add.w r1, sp, #7 802d54c: f7fa f9ea bl 8027924 strcat(buf, "\",\"bat_time_left\":\""); 802d550: 4620 mov r0, r4 802d552: 493e ldr r1, [pc, #248] ; (802d64c ) 802d554: f7f4 fb3a bl 8021bcc strncat(buf, str, len); 802d558: a902 add r1, sp, #8 802d55a: f89d 2007 ldrb.w r2, [sp, #7] 802d55e: 4620 mov r0, r4 802d560: f7f4 fcd6 bl 8021f10 GetDINStatusStr(str, &len, 0); 802d564: 2200 movs r2, #0 802d566: a802 add r0, sp, #8 802d568: f10d 0107 add.w r1, sp, #7 802d56c: f7fa faf0 bl 8027b50 strcat(buf, "\",\"di1\":\""); 802d570: 4620 mov r0, r4 802d572: 4937 ldr r1, [pc, #220] ; (802d650 ) 802d574: f7f4 fb2a bl 8021bcc strncat(buf, str, len); 802d578: a902 add r1, sp, #8 802d57a: f89d 2007 ldrb.w r2, [sp, #7] 802d57e: 4620 mov r0, r4 802d580: f7f4 fcc6 bl 8021f10 GetDOUTStatusStr(str, &len, 0); 802d584: a802 add r0, sp, #8 802d586: f10d 0107 add.w r1, sp, #7 802d58a: 2200 movs r2, #0 802d58c: f7fa fb1a bl 8027bc4 strcat(buf, "\",\"ro1\":\""); 802d590: 4620 mov r0, r4 802d592: 4930 ldr r1, [pc, #192] ; (802d654 ) 802d594: f7f4 fb1a bl 8021bcc strncat(buf, str, len); 802d598: a902 add r1, sp, #8 802d59a: f89d 2007 ldrb.w r2, [sp, #7] 802d59e: 4620 mov r0, r4 802d5a0: f7f4 fcb6 bl 8021f10 GetDOUTStatusStr(str, &len, 1); 802d5a4: 2201 movs r2, #1 802d5a6: a802 add r0, sp, #8 802d5a8: f10d 0107 add.w r1, sp, #7 802d5ac: f7fa fb0a bl 8027bc4 strcat(buf, "\",\"ro2\":\""); 802d5b0: 4620 mov r0, r4 802d5b2: 4929 ldr r1, [pc, #164] ; (802d658 ) 802d5b4: f7f4 fb0a bl 8021bcc strncat(buf, str, len); 802d5b8: f89d 2007 ldrb.w r2, [sp, #7] 802d5bc: a902 add r1, sp, #8 802d5be: 4620 mov r0, r4 802d5c0: f7f4 fca6 bl 8021f10 // Мониторинг // load_monitor (нагрузка, 0 - норма, 1 - fail) // temp_monitor (внутренняя температура, 0 - норма, 1 - fail) // connect_monitor (связь с UPSом, 0 - норма, 1 - fail) GetAlarmMonitorStr(str, &len); 802d5c4: a802 add r0, sp, #8 802d5c6: f10d 0107 add.w r1, sp, #7 802d5ca: f7fa f9d3 bl 8027974 strcat(buf, "\",\"m_alarm\":\""); 802d5ce: 4620 mov r0, r4 802d5d0: 4922 ldr r1, [pc, #136] ; (802d65c ) 802d5d2: f7f4 fafb bl 8021bcc strncat(buf, str, len); 802d5d6: f89d 2007 ldrb.w r2, [sp, #7] 802d5da: a902 add r1, sp, #8 802d5dc: 4620 mov r0, r4 802d5de: f7f4 fc97 bl 8021f10 GetAlarmStr(str, &len); 802d5e2: a802 add r0, sp, #8 802d5e4: f10d 0107 add.w r1, sp, #7 802d5e8: f7fa f9ee bl 80279c8 strcat(buf, "\",\"u_alarm\":\""); 802d5ec: 4620 mov r0, r4 802d5ee: 491c ldr r1, [pc, #112] ; (802d660 ) 802d5f0: f7f4 faec bl 8021bcc strncat(buf, str, len); 802d5f4: f89d 2007 ldrb.w r2, [sp, #7] 802d5f8: a902 add r1, sp, #8 802d5fa: 4620 mov r0, r4 802d5fc: f7f4 fc88 bl 8021f10 // Признак изменения сетевых настроек GetWebReinitFlag(str, &len); 802d600: a802 add r0, sp, #8 802d602: f10d 0107 add.w r1, sp, #7 802d606: f7fa fd6d bl 80280e4 strcat(buf, "\",\"netsettings_changed\":\""); 802d60a: 4620 mov r0, r4 802d60c: 4915 ldr r1, [pc, #84] ; (802d664 ) 802d60e: f7f4 fadd bl 8021bcc strncat(buf, str, len); 802d612: a902 add r1, sp, #8 802d614: f89d 2007 ldrb.w r2, [sp, #7] 802d618: 4620 mov r0, r4 802d61a: f7f4 fc79 bl 8021f10 strncat(buf, "\"}", 2); 802d61e: 4620 mov r0, r4 802d620: 4911 ldr r1, [pc, #68] ; (802d668 ) 802d622: 2202 movs r2, #2 802d624: f7f4 fc74 bl 8021f10 //printf(buf); } 802d628: b00c add sp, #48 ; 0x30 802d62a: bd10 pop {r4, pc} 802d62c: 08044c64 .word 0x08044c64 802d630: 08044c90 .word 0x08044c90 802d634: 08044c98 .word 0x08044c98 802d638: 08044ca1 .word 0x08044ca1 802d63c: 08044caf .word 0x08044caf 802d640: 08044cbe .word 0x08044cbe 802d644: 08044cc8 .word 0x08044cc8 802d648: 08044cd6 .word 0x08044cd6 802d64c: 08044ce7 .word 0x08044ce7 802d650: 08044cfb .word 0x08044cfb 802d654: 08044d05 .word 0x08044d05 802d658: 08044d0f .word 0x08044d0f 802d65c: 08044d19 .word 0x08044d19 802d660: 08044d27 .word 0x08044d27 802d664: 08044d35 .word 0x08044d35 802d668: 08044d4f .word 0x08044d4f 0802d66c : /** * @brief Возвращяет строку с настройками на второй странице * @retval None */ void HTTP_GetSettings(char *buf) { 802d66c: 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"); 802d66e: 49bf ldr r1, [pc, #764] ; (802d96c ) /** * @brief Возвращяет строку с настройками на второй странице * @retval None */ void HTTP_GetSettings(char *buf) { 802d670: b08a sub sp, #40 ; 0x28 802d672: 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"); 802d674: f7f4 fbbe bl 8021df4 /* SNMP */ GetReadCommunity(str, &len); 802d678: a802 add r0, sp, #8 802d67a: f10d 0107 add.w r1, sp, #7 802d67e: f7fa fc61 bl 8027f44 strcat(buf, "{\"read_community\":\""); 802d682: 4620 mov r0, r4 802d684: 49ba ldr r1, [pc, #744] ; (802d970 ) 802d686: f7f4 faa1 bl 8021bcc strncat(buf, str, len); 802d68a: f89d 2007 ldrb.w r2, [sp, #7] 802d68e: a902 add r1, sp, #8 802d690: 4620 mov r0, r4 802d692: f7f4 fc3d bl 8021f10 GetWriteCommunity(str, &len); 802d696: a802 add r0, sp, #8 802d698: f10d 0107 add.w r1, sp, #7 802d69c: f7fa fc62 bl 8027f64 strcat(buf, "\",\"write_community\":\""); 802d6a0: 4620 mov r0, r4 802d6a2: 49b4 ldr r1, [pc, #720] ; (802d974 ) 802d6a4: f7f4 fa92 bl 8021bcc strncat(buf, str, len); 802d6a8: f89d 2007 ldrb.w r2, [sp, #7] 802d6ac: a902 add r1, sp, #8 802d6ae: 4620 mov r0, r4 802d6b0: f7f4 fc2e bl 8021f10 GetManagerIp(str, &len); 802d6b4: a802 add r0, sp, #8 802d6b6: f10d 0107 add.w r1, sp, #7 802d6ba: f7fa fc63 bl 8027f84 strcat(buf, "\",\"managerIP\":\""); 802d6be: 4620 mov r0, r4 802d6c0: 49ad ldr r1, [pc, #692] ; (802d978 ) 802d6c2: f7f4 fa83 bl 8021bcc strncat(buf, str, len); 802d6c6: f89d 2007 ldrb.w r2, [sp, #7] 802d6ca: a902 add r1, sp, #8 802d6cc: 4620 mov r0, r4 802d6ce: f7f4 fc1f bl 8021f10 GetManagerIp2(str, &len); 802d6d2: a802 add r0, sp, #8 802d6d4: f10d 0107 add.w r1, sp, #7 802d6d8: f7fa fc64 bl 8027fa4 strcat(buf, "\",\"managerIP2\":\""); 802d6dc: 4620 mov r0, r4 802d6de: 49a7 ldr r1, [pc, #668] ; (802d97c ) 802d6e0: f7f4 fa74 bl 8021bcc strncat(buf, str, len); 802d6e4: f89d 2007 ldrb.w r2, [sp, #7] 802d6e8: a902 add r1, sp, #8 802d6ea: 4620 mov r0, r4 802d6ec: f7f4 fc10 bl 8021f10 GetManagerIp3(str, &len); 802d6f0: a802 add r0, sp, #8 802d6f2: f10d 0107 add.w r1, sp, #7 802d6f6: f7fa fc65 bl 8027fc4 strcat(buf, "\",\"managerIP3\":\""); 802d6fa: 4620 mov r0, r4 802d6fc: 49a0 ldr r1, [pc, #640] ; (802d980 ) 802d6fe: f7f4 fa65 bl 8021bcc strncat(buf, str, len); 802d702: f89d 2007 ldrb.w r2, [sp, #7] 802d706: a902 add r1, sp, #8 802d708: 4620 mov r0, r4 802d70a: f7f4 fc01 bl 8021f10 GetManagerIp4(str, &len); 802d70e: a802 add r0, sp, #8 802d710: f10d 0107 add.w r1, sp, #7 802d714: f7fa fc66 bl 8027fe4 strcat(buf, "\",\"managerIP4\":\""); 802d718: 4620 mov r0, r4 802d71a: 499a ldr r1, [pc, #616] ; (802d984 ) 802d71c: f7f4 fa56 bl 8021bcc strncat(buf, str, len); 802d720: f89d 2007 ldrb.w r2, [sp, #7] 802d724: a902 add r1, sp, #8 802d726: 4620 mov r0, r4 802d728: f7f4 fbf2 bl 8021f10 GetManagerIp5(str, &len); 802d72c: a802 add r0, sp, #8 802d72e: f10d 0107 add.w r1, sp, #7 802d732: f7fa fc67 bl 8028004 strcat(buf, "\",\"managerIP5\":\""); 802d736: 4620 mov r0, r4 802d738: 4993 ldr r1, [pc, #588] ; (802d988 ) 802d73a: f7f4 fa47 bl 8021bcc strncat(buf, str, len); 802d73e: a902 add r1, sp, #8 802d740: f89d 2007 ldrb.w r2, [sp, #7] 802d744: 4620 mov r0, r4 802d746: f7f4 fbe3 bl 8021f10 /*Параметры реле и сухих контактов*/ GetDINTypeActStr(str, &len, 0); 802d74a: 2200 movs r2, #0 802d74c: a802 add r0, sp, #8 802d74e: f10d 0107 add.w r1, sp, #7 802d752: f7fa f9e9 bl 8027b28 strcat(buf, "\",\"di1\":\""); 802d756: 4620 mov r0, r4 802d758: 498c ldr r1, [pc, #560] ; (802d98c ) 802d75a: f7f4 fa37 bl 8021bcc strncat(buf, str, len); 802d75e: a902 add r1, sp, #8 802d760: f89d 2007 ldrb.w r2, [sp, #7] 802d764: 4620 mov r0, r4 802d766: f7f4 fbd3 bl 8021f10 GetROTypeActStr(str, &len, 0); 802d76a: 2200 movs r2, #0 802d76c: a802 add r0, sp, #8 802d76e: f10d 0107 add.w r1, sp, #7 802d772: f7fa fa13 bl 8027b9c strcat(buf, "\",\"ro1\":\""); 802d776: 4620 mov r0, r4 802d778: 4985 ldr r1, [pc, #532] ; (802d990 ) 802d77a: f7f4 fa27 bl 8021bcc strncat(buf, str, len); 802d77e: a902 add r1, sp, #8 802d780: f89d 2007 ldrb.w r2, [sp, #7] 802d784: 4620 mov r0, r4 802d786: f7f4 fbc3 bl 8021f10 GetROTypeActStr(str, &len, 1); 802d78a: 2201 movs r2, #1 802d78c: a802 add r0, sp, #8 802d78e: f10d 0107 add.w r1, sp, #7 802d792: f7fa fa03 bl 8027b9c strcat(buf, "\",\"ro2\":\""); 802d796: 4620 mov r0, r4 802d798: 497e ldr r1, [pc, #504] ; (802d994 ) 802d79a: f7f4 fa17 bl 8021bcc strncat(buf, str, len); 802d79e: f89d 2007 ldrb.w r2, [sp, #7] 802d7a2: a902 add r1, sp, #8 802d7a4: 4620 mov r0, r4 802d7a6: f7f4 fbb3 bl 8021f10 /* WEB */ GetIpStr(str, &len); 802d7aa: a802 add r0, sp, #8 802d7ac: f10d 0107 add.w r1, sp, #7 802d7b0: f7fa fb50 bl 8027e54 strcat(buf, "\",\"ipaddr\":\""); 802d7b4: 4620 mov r0, r4 802d7b6: 4978 ldr r1, [pc, #480] ; (802d998 ) 802d7b8: f7f4 fa08 bl 8021bcc strncat(buf, str, len); 802d7bc: f89d 2007 ldrb.w r2, [sp, #7] 802d7c0: a902 add r1, sp, #8 802d7c2: 4620 mov r0, r4 802d7c4: f7f4 fba4 bl 8021f10 GetGatewayStr(str, &len); 802d7c8: a802 add r0, sp, #8 802d7ca: f10d 0107 add.w r1, sp, #7 802d7ce: f7fa fb57 bl 8027e80 strcat(buf, "\",\"gw\":\""); 802d7d2: 4620 mov r0, r4 802d7d4: 4971 ldr r1, [pc, #452] ; (802d99c ) 802d7d6: f7f4 f9f9 bl 8021bcc strncat(buf, str, len); 802d7da: f89d 2007 ldrb.w r2, [sp, #7] 802d7de: a902 add r1, sp, #8 802d7e0: 4620 mov r0, r4 802d7e2: f7f4 fb95 bl 8021f10 GetMaskStr(str, &len); 802d7e6: a802 add r0, sp, #8 802d7e8: f10d 0107 add.w r1, sp, #7 802d7ec: f7fa fb5e bl 8027eac strcat(buf, "\",\"mask\":\""); 802d7f0: 4620 mov r0, r4 802d7f2: 496b ldr r1, [pc, #428] ; (802d9a0 ) 802d7f4: f7f4 f9ea bl 8021bcc strncat(buf, str, len); 802d7f8: f89d 2007 ldrb.w r2, [sp, #7] 802d7fc: a902 add r1, sp, #8 802d7fe: 4620 mov r0, r4 802d800: f7f4 fb86 bl 8021f10 GetDhcpStateStr(str, &len); 802d804: a802 add r0, sp, #8 802d806: f10d 0107 add.w r1, sp, #7 802d80a: f7fa fb65 bl 8027ed8 strcat(buf, "\",\"dhcp\":"); 802d80e: 4620 mov r0, r4 802d810: 4964 ldr r1, [pc, #400] ; (802d9a4 ) 802d812: f7f4 f9db bl 8021bcc strncat(buf, str, len); 802d816: f89d 2007 ldrb.w r2, [sp, #7] 802d81a: a902 add r1, sp, #8 802d81c: 4620 mov r0, r4 802d81e: f7f4 fb77 bl 8021f10 GetAuthEnableStateStr(str, &len); 802d822: a802 add r0, sp, #8 802d824: f10d 0107 add.w r1, sp, #7 802d828: f7fa fc4e bl 80280c8 strcat(buf, ",\"auth\":"); 802d82c: 4620 mov r0, r4 802d82e: 495e ldr r1, [pc, #376] ; (802d9a8 ) 802d830: f7f4 f9cc bl 8021bcc strncat(buf, str, len); 802d834: f89d 2007 ldrb.w r2, [sp, #7] 802d838: a902 add r1, sp, #8 802d83a: 4620 mov r0, r4 802d83c: f7f4 fb68 bl 8021f10 /* RADIUS */ GetRDSIpStr(str, &len); 802d840: a802 add r0, sp, #8 802d842: f10d 0107 add.w r1, sp, #7 802d846: f7fa fbed bl 8028024 strcat(buf, ",\"rs_server\":\""); 802d84a: 4620 mov r0, r4 802d84c: 4957 ldr r1, [pc, #348] ; (802d9ac ) 802d84e: f7f4 f9bd bl 8021bcc strncat(buf, str, len); 802d852: f89d 2007 ldrb.w r2, [sp, #7] 802d856: a902 add r1, sp, #8 802d858: 4620 mov r0, r4 802d85a: f7f4 fb59 bl 8021f10 GetRDSPortStr(str, &len); 802d85e: a802 add r0, sp, #8 802d860: f10d 0107 add.w r1, sp, #7 802d864: f7fa fbee bl 8028044 strcat(buf, "\",\"rs_port\":\""); 802d868: 4620 mov r0, r4 802d86a: 4951 ldr r1, [pc, #324] ; (802d9b0 ) 802d86c: f7f4 f9ae bl 8021bcc strncat(buf, str, len); 802d870: f89d 2007 ldrb.w r2, [sp, #7] 802d874: a902 add r1, sp, #8 802d876: 4620 mov r0, r4 802d878: f7f4 fb4a bl 8021f10 GetRDSPasswordkStr(str, &len); 802d87c: a802 add r0, sp, #8 802d87e: f10d 0107 add.w r1, sp, #7 802d882: f7fa fc03 bl 802808c strcat(buf, "\",\"rs_pwd\":\""); 802d886: 4620 mov r0, r4 802d888: 494a ldr r1, [pc, #296] ; (802d9b4 ) 802d88a: f7f4 f99f bl 8021bcc strncat(buf, str, len); 802d88e: f89d 2007 ldrb.w r2, [sp, #7] 802d892: a902 add r1, sp, #8 802d894: 4620 mov r0, r4 802d896: f7f4 fb3b bl 8021f10 GetRDSKeyAccesstStr(str, &len); 802d89a: a802 add r0, sp, #8 802d89c: f10d 0107 add.w r1, sp, #7 802d8a0: f7fa fbe2 bl 8028068 strcat(buf, "\",\"rs_key\":\""); 802d8a4: 4620 mov r0, r4 802d8a6: 4944 ldr r1, [pc, #272] ; (802d9b8 ) 802d8a8: f7f4 f990 bl 8021bcc strncat(buf, str, len); 802d8ac: f89d 2007 ldrb.w r2, [sp, #7] 802d8b0: a902 add r1, sp, #8 802d8b2: 4620 mov r0, r4 802d8b4: f7f4 fb2c bl 8021f10 GetRDSEnableStateStr(str, &len); 802d8b8: a802 add r0, sp, #8 802d8ba: f10d 0107 add.w r1, sp, #7 802d8be: f7fa fbf5 bl 80280ac strcat(buf, "\",\"rs_enabled\":"); 802d8c2: 4620 mov r0, r4 802d8c4: 493d ldr r1, [pc, #244] ; (802d9bc ) 802d8c6: f7f4 f981 bl 8021bcc strncat(buf, str, len); 802d8ca: f89d 2007 ldrb.w r2, [sp, #7] 802d8ce: a902 add r1, sp, #8 802d8d0: 4620 mov r0, r4 802d8d2: f7f4 fb1d bl 8021f10 /* Параметры даты и времени */ GetDateStr(str, &len); 802d8d6: a802 add r0, sp, #8 802d8d8: f10d 0107 add.w r1, sp, #7 802d8dc: f7fa f886 bl 80279ec strcat(buf, ",\"date\":\""); 802d8e0: 4620 mov r0, r4 802d8e2: 4937 ldr r1, [pc, #220] ; (802d9c0 ) 802d8e4: f7f4 f972 bl 8021bcc strncat(buf, str, len); 802d8e8: f89d 2007 ldrb.w r2, [sp, #7] 802d8ec: a902 add r1, sp, #8 802d8ee: 4620 mov r0, r4 802d8f0: f7f4 fb0e bl 8021f10 GetTimeStr(str, &len); 802d8f4: a802 add r0, sp, #8 802d8f6: f10d 0107 add.w r1, sp, #7 802d8fa: f7fa f895 bl 8027a28 strcat(buf, "\",\"time\":\""); 802d8fe: 4620 mov r0, r4 802d900: 4930 ldr r1, [pc, #192] ; (802d9c4 ) 802d902: f7f4 f963 bl 8021bcc strncat(buf, str, len); 802d906: f89d 2007 ldrb.w r2, [sp, #7] 802d90a: a902 add r1, sp, #8 802d90c: 4620 mov r0, r4 802d90e: f7f4 faff bl 8021f10 /* Параметры SNTP */ GetSntpStateStr(str, &len); 802d912: a802 add r0, sp, #8 802d914: f10d 0107 add.w r1, sp, #7 802d918: f7fa f8b4 bl 8027a84 strcat(buf, "\",\"ntp\":\""); 802d91c: 4620 mov r0, r4 802d91e: 492a ldr r1, [pc, #168] ; (802d9c8 ) 802d920: f7f4 f954 bl 8021bcc strncat(buf, str, len); 802d924: f89d 2007 ldrb.w r2, [sp, #7] 802d928: a902 add r1, sp, #8 802d92a: 4620 mov r0, r4 802d92c: f7f4 faf0 bl 8021f10 GetSntpServerIpStr(str, &len); 802d930: a802 add r0, sp, #8 802d932: f10d 0107 add.w r1, sp, #7 802d936: f7fa f8bf bl 8027ab8 strcat(buf, "\",\"ntpservip\":\""); 802d93a: 4620 mov r0, r4 802d93c: 4923 ldr r1, [pc, #140] ; (802d9cc ) 802d93e: f7f4 f945 bl 8021bcc strncat(buf, str, len); 802d942: f89d 2007 ldrb.w r2, [sp, #7] 802d946: a902 add r1, sp, #8 802d948: 4620 mov r0, r4 802d94a: f7f4 fae1 bl 8021f10 GetSntpTimeZoneStr(str, &len); 802d94e: a802 add r0, sp, #8 802d950: f10d 0107 add.w r1, sp, #7 802d954: f7fa f8c0 bl 8027ad8 strcat(buf, "\",\"utc\":\""); 802d958: 4620 mov r0, r4 802d95a: 491d ldr r1, [pc, #116] ; (802d9d0 ) 802d95c: f7f4 f936 bl 8021bcc strncat(buf, str, len); 802d960: f89d 2007 ldrb.w r2, [sp, #7] 802d964: a902 add r1, sp, #8 802d966: 4620 mov r0, r4 802d968: e034 b.n 802d9d4 802d96a: bf00 nop 802d96c: 08044c64 .word 0x08044c64 802d970: 08044d52 .word 0x08044d52 802d974: 08044d66 .word 0x08044d66 802d978: 08044d7c .word 0x08044d7c 802d97c: 08044d8c .word 0x08044d8c 802d980: 08044d9d .word 0x08044d9d 802d984: 08044dae .word 0x08044dae 802d988: 08044dbf .word 0x08044dbf 802d98c: 08044cfb .word 0x08044cfb 802d990: 08044d05 .word 0x08044d05 802d994: 08044d0f .word 0x08044d0f 802d998: 08044dd0 .word 0x08044dd0 802d99c: 08044ddd .word 0x08044ddd 802d9a0: 08044de6 .word 0x08044de6 802d9a4: 08044df1 .word 0x08044df1 802d9a8: 08044dfb .word 0x08044dfb 802d9ac: 08044e04 .word 0x08044e04 802d9b0: 08044e13 .word 0x08044e13 802d9b4: 08044e21 .word 0x08044e21 802d9b8: 08044e2e .word 0x08044e2e 802d9bc: 08044e3b .word 0x08044e3b 802d9c0: 08044e4b .word 0x08044e4b 802d9c4: 08044e55 .word 0x08044e55 802d9c8: 08044e60 .word 0x08044e60 802d9cc: 08044e6a .word 0x08044e6a 802d9d0: 08044e7a .word 0x08044e7a 802d9d4: f7f4 fa9c bl 8021f10 GetUnixTimeStr(str, &len); 802d9d8: a802 add r0, sp, #8 802d9da: f10d 0107 add.w r1, sp, #7 802d9de: f7fa f83b bl 8027a58 strcat(buf, "\",\"utm\":\""); 802d9e2: 4620 mov r0, r4 802d9e4: 4916 ldr r1, [pc, #88] ; (802da40 ) 802d9e6: f7f4 f8f1 bl 8021bcc strncat(buf, str, len); 802d9ea: f89d 2007 ldrb.w r2, [sp, #7] 802d9ee: a902 add r1, sp, #8 802d9f0: 4620 mov r0, r4 802d9f2: f7f4 fa8d bl 8021f10 GetSntpLastDataStr(str, &len); 802d9f6: a802 add r0, sp, #8 802d9f8: f10d 0107 add.w r1, sp, #7 802d9fc: f7fa f884 bl 8027b08 strcat(buf, "\",\"lastsynctime\":\""); 802da00: 4620 mov r0, r4 802da02: 4910 ldr r1, [pc, #64] ; (802da44 ) 802da04: f7f4 f8e2 bl 8021bcc strncat(buf, str, len); 802da08: f89d 2007 ldrb.w r2, [sp, #7] 802da0c: a902 add r1, sp, #8 802da0e: 4620 mov r0, r4 802da10: f7f4 fa7e bl 8021f10 /* Признак изменения сетевых настроек */ GetWebReinitFlag(str, &len); 802da14: a802 add r0, sp, #8 802da16: f10d 0107 add.w r1, sp, #7 802da1a: f7fa fb63 bl 80280e4 strcat(buf, "\",\"netsettings_changed\":\""); 802da1e: 4620 mov r0, r4 802da20: 4909 ldr r1, [pc, #36] ; (802da48 ) 802da22: f7f4 f8d3 bl 8021bcc strncat(buf, str, len); 802da26: a902 add r1, sp, #8 802da28: f89d 2007 ldrb.w r2, [sp, #7] 802da2c: 4620 mov r0, r4 802da2e: f7f4 fa6f bl 8021f10 strncat(buf, "\"}", 2); 802da32: 4620 mov r0, r4 802da34: 4905 ldr r1, [pc, #20] ; (802da4c ) 802da36: 2202 movs r2, #2 802da38: f7f4 fa6a bl 8021f10 //printf(buf); } 802da3c: b00a add sp, #40 ; 0x28 802da3e: bd10 pop {r4, pc} 802da40: 08044e84 .word 0x08044e84 802da44: 08044e8e .word 0x08044e8e 802da48: 08044d35 .word 0x08044d35 802da4c: 08044d4f .word 0x08044d4f 0802da50 : * @brief Возвращяет строку с информацией об устройстве * @retval None */ // TODO Согласовать максимальную длину строк void HTTP_GetInfo(char *buf) { 802da50: 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"); 802da52: 4960 ldr r1, [pc, #384] ; (802dbd4 ) * @brief Возвращяет строку с информацией об устройстве * @retval None */ // TODO Согласовать максимальную длину строк void HTTP_GetInfo(char *buf) { 802da54: b08c sub sp, #48 ; 0x30 802da56: 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"); 802da58: f7f4 f9cc bl 8021df4 GetWorkTimeStr(str, &len); 802da5c: a802 add r0, sp, #8 802da5e: f10d 0107 add.w r1, sp, #7 802da62: f7fa f8e7 bl 8027c34 strcat(buf, "{\"uptime\":\""); 802da66: 4620 mov r0, r4 802da68: 495b ldr r1, [pc, #364] ; (802dbd8 ) 802da6a: f7f4 f8af bl 8021bcc strncat(buf, str, len); 802da6e: f89d 2007 ldrb.w r2, [sp, #7] 802da72: a902 add r1, sp, #8 802da74: 4620 mov r0, r4 802da76: f7f4 fa4b bl 8021f10 GetModelStr(str, &len); 802da7a: a802 add r0, sp, #8 802da7c: f10d 0107 add.w r1, sp, #7 802da80: f7fa f8fe bl 8027c80 strcat(buf, "\",\"model\":\""); 802da84: 4620 mov r0, r4 802da86: 4955 ldr r1, [pc, #340] ; (802dbdc ) 802da88: f7f4 f8a0 bl 8021bcc strncat(buf, str, len); 802da8c: f89d 2007 ldrb.w r2, [sp, #7] 802da90: a902 add r1, sp, #8 802da92: 4620 mov r0, r4 802da94: f7f4 fa3c bl 8021f10 GetProductionDataStr(str, &len); 802da98: a802 add r0, sp, #8 802da9a: f10d 0107 add.w r1, sp, #7 802da9e: f7fa f901 bl 8027ca4 strcat(buf, "\",\"prodate\":\""); 802daa2: 4620 mov r0, r4 802daa4: 494e ldr r1, [pc, #312] ; (802dbe0 ) 802daa6: f7f4 f891 bl 8021bcc strncat(buf, str, len); 802daaa: f89d 2007 ldrb.w r2, [sp, #7] 802daae: a902 add r1, sp, #8 802dab0: 4620 mov r0, r4 802dab2: f7f4 fa2d bl 8021f10 GetVersionStr(str, &len); 802dab6: a802 add r0, sp, #8 802dab8: f10d 0107 add.w r1, sp, #7 802dabc: f7fa f904 bl 8027cc8 strcat(buf, "\",\"fwversion\":\""); 802dac0: 4620 mov r0, r4 802dac2: 4948 ldr r1, [pc, #288] ; (802dbe4 ) 802dac4: f7f4 f882 bl 8021bcc strncat(buf, str, len); 802dac8: f89d 2007 ldrb.w r2, [sp, #7] 802dacc: a902 add r1, sp, #8 802dace: 4620 mov r0, r4 802dad0: f7f4 fa1e bl 8021f10 GetMacStr(str, &len); 802dad4: a802 add r0, sp, #8 802dad6: f10d 0107 add.w r1, sp, #7 802dada: f7fa f907 bl 8027cec strcat(buf, "\",\"macaddr\":\""); 802dade: 4620 mov r0, r4 802dae0: 4941 ldr r1, [pc, #260] ; (802dbe8 ) 802dae2: f7f4 f873 bl 8021bcc strncat(buf, str, len); 802dae6: f89d 2007 ldrb.w r2, [sp, #7] 802daea: a902 add r1, sp, #8 802daec: 4620 mov r0, r4 802daee: f7f4 fa0f bl 8021f10 GetSerialNumberStr(str, &len); 802daf2: a802 add r0, sp, #8 802daf4: f10d 0107 add.w r1, sp, #7 802daf8: f7fa f90a bl 8027d10 strcat(buf, "\",\"serno\":\""); 802dafc: 4620 mov r0, r4 802dafe: 493b ldr r1, [pc, #236] ; (802dbec ) 802db00: f7f4 f864 bl 8021bcc strncat(buf, str, len); 802db04: f89d 2007 ldrb.w r2, [sp, #7] 802db08: a902 add r1, sp, #8 802db0a: 4620 mov r0, r4 802db0c: f7f4 fa00 bl 8021f10 GetOwnerStr(str, &len); 802db10: a802 add r0, sp, #8 802db12: f10d 0107 add.w r1, sp, #7 802db16: f7fa f90d bl 8027d34 strcat(buf, "\",\"owner\":\""); 802db1a: 4620 mov r0, r4 802db1c: 4934 ldr r1, [pc, #208] ; (802dbf0 ) 802db1e: f7f4 f855 bl 8021bcc strncat(buf, str, len); 802db22: f89d 2007 ldrb.w r2, [sp, #7] 802db26: a902 add r1, sp, #8 802db28: 4620 mov r0, r4 802db2a: f7f4 f9f1 bl 8021f10 GetLocationStr(str, &len); 802db2e: a802 add r0, sp, #8 802db30: f10d 0107 add.w r1, sp, #7 802db34: f7fa f910 bl 8027d58 strcat(buf, "\",\"sysLocation\":\""); 802db38: 4620 mov r0, r4 802db3a: 492e ldr r1, [pc, #184] ; (802dbf4 ) 802db3c: f7f4 f846 bl 8021bcc strncat(buf, str, len); 802db40: f89d 2007 ldrb.w r2, [sp, #7] 802db44: a902 add r1, sp, #8 802db46: 4620 mov r0, r4 802db48: f7f4 f9e2 bl 8021f10 GetCommentsStr(str, &len); 802db4c: a802 add r0, sp, #8 802db4e: f10d 0107 add.w r1, sp, #7 802db52: f7fa f913 bl 8027d7c strcat(buf, "\",\"comment\":\""); 802db56: 4620 mov r0, r4 802db58: 4927 ldr r1, [pc, #156] ; (802dbf8 ) 802db5a: f7f4 f837 bl 8021bcc strncat(buf, str, len); 802db5e: f89d 2007 ldrb.w r2, [sp, #7] 802db62: a902 add r1, sp, #8 802db64: 4620 mov r0, r4 802db66: f7f4 f9d3 bl 8021f10 GetUPSModelStr(str, &len); 802db6a: a802 add r0, sp, #8 802db6c: f10d 0107 add.w r1, sp, #7 802db70: f7fa f916 bl 8027da0 strcat(buf, "\",\"ups_model\":\""); 802db74: 4620 mov r0, r4 802db76: 4921 ldr r1, [pc, #132] ; (802dbfc ) 802db78: f7f4 f828 bl 8021bcc strncat(buf, str, len); 802db7c: f89d 2007 ldrb.w r2, [sp, #7] 802db80: a902 add r1, sp, #8 802db82: 4620 mov r0, r4 802db84: f7f4 f9c4 bl 8021f10 GetUPSVersionStr(str, &len); 802db88: a802 add r0, sp, #8 802db8a: f10d 0107 add.w r1, sp, #7 802db8e: f7fa f919 bl 8027dc4 strcat(buf, "\",\"ups_fwversion\":\""); 802db92: 4620 mov r0, r4 802db94: 491a ldr r1, [pc, #104] ; (802dc00 ) 802db96: f7f4 f819 bl 8021bcc strncat(buf, str, len); 802db9a: f89d 2007 ldrb.w r2, [sp, #7] 802db9e: a902 add r1, sp, #8 802dba0: 4620 mov r0, r4 802dba2: f7f4 f9b5 bl 8021f10 /* Признак изменения сетевых настроек */ GetWebReinitFlag(str, &len); 802dba6: a802 add r0, sp, #8 802dba8: f10d 0107 add.w r1, sp, #7 802dbac: f7fa fa9a bl 80280e4 strcat(buf, "\",\"netsettings_changed\":\""); 802dbb0: 4620 mov r0, r4 802dbb2: 4914 ldr r1, [pc, #80] ; (802dc04 ) 802dbb4: f7f4 f80a bl 8021bcc strncat(buf, str, len); 802dbb8: a902 add r1, sp, #8 802dbba: f89d 2007 ldrb.w r2, [sp, #7] 802dbbe: 4620 mov r0, r4 802dbc0: f7f4 f9a6 bl 8021f10 strncat(buf, "\"}", 2); 802dbc4: 4620 mov r0, r4 802dbc6: 4910 ldr r1, [pc, #64] ; (802dc08 ) 802dbc8: 2202 movs r2, #2 802dbca: f7f4 f9a1 bl 8021f10 } 802dbce: b00c add sp, #48 ; 0x30 802dbd0: bd10 pop {r4, pc} 802dbd2: bf00 nop 802dbd4: 08044c64 .word 0x08044c64 802dbd8: 08044ea1 .word 0x08044ea1 802dbdc: 08044ead .word 0x08044ead 802dbe0: 08044eb9 .word 0x08044eb9 802dbe4: 08044ec7 .word 0x08044ec7 802dbe8: 08044ed7 .word 0x08044ed7 802dbec: 08044ee5 .word 0x08044ee5 802dbf0: 08044ef1 .word 0x08044ef1 802dbf4: 08044efd .word 0x08044efd 802dbf8: 08044f0f .word 0x08044f0f 802dbfc: 08044f1d .word 0x08044f1d 802dc00: 08044f2d .word 0x08044f2d 802dc04: 08044d35 .word 0x08044d35 802dc08: 08044d4f .word 0x08044d4f 0802dc0c : void HTTP_GetHistoryPage(char* buf, uint32_t pageNumber) { 802dc0c: b530 push {r4, r5, lr} 802dc0e: 4605 mov r5, r0 802dc10: b087 sub sp, #28 802dc12: 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"); 802dc14: 4927 ldr r1, [pc, #156] ; (802dcb4 ) 802dc16: f7f4 f8ed bl 8021df4 strcat(buf, "{\"page\": ["); 802dc1a: 4628 mov r0, r5 802dc1c: 4926 ldr r1, [pc, #152] ; (802dcb8 ) 802dc1e: f7f3 ffd5 bl 8021bcc History_GetPage(buf, pageNumber); 802dc22: 4621 mov r1, r4 802dc24: 4628 mov r0, r5 802dc26: f7fc f84f bl 8029cc8 len = strlen(buf); 802dc2a: 4628 mov r0, r5 802dc2c: f7f4 f940 bl 8021eb0 802dc30: f8ad 0006 strh.w r0, [sp, #6] buf +=len-1; 802dc34: b280 uxth r0, r0 802dc36: 1e43 subs r3, r0, #1 802dc38: 18ec adds r4, r5, r3 *buf = 0; 802dc3a: 2100 movs r1, #0 buf -=len-1; 802dc3c: f1c0 0001 rsb r0, r0, #1 strcat(buf, "{\"page\": ["); History_GetPage(buf, pageNumber); len = strlen(buf); buf +=len-1; *buf = 0; 802dc40: 54e9 strb r1, [r5, r3] buf -=len-1; 802dc42: 1824 adds r4, r4, r0 /* Количество страниц */ memset(str, 0, 16); 802dc44: 2210 movs r2, #16 802dc46: a802 add r0, sp, #8 802dc48: f7f3 ff5a bl 8021b00 sprintf(str, "%i", History_GetPageCount()); 802dc4c: f7fc f82a bl 8029ca4 802dc50: 491a ldr r1, [pc, #104] ; (802dcbc ) 802dc52: 4602 mov r2, r0 802dc54: a802 add r0, sp, #8 802dc56: f7f9 fddd bl 8027814 strcat(buf, "],\"pages\":\""); 802dc5a: 4620 mov r0, r4 802dc5c: 4918 ldr r1, [pc, #96] ; (802dcc0 ) 802dc5e: f7f3 ffb5 bl 8021bcc strcat(buf, str); 802dc62: a902 add r1, sp, #8 802dc64: 4620 mov r0, r4 802dc66: f7f3 ffb1 bl 8021bcc /* Часовой пояс */ GetSntpTimeZoneStr(str, (uint8_t*)&len); 802dc6a: a802 add r0, sp, #8 802dc6c: f10d 0106 add.w r1, sp, #6 802dc70: f7f9 ff32 bl 8027ad8 strcat(buf, "\",\"utc\":\""); 802dc74: 4620 mov r0, r4 802dc76: 4913 ldr r1, [pc, #76] ; (802dcc4 ) 802dc78: f7f3 ffa8 bl 8021bcc strncat(buf, str, len); 802dc7c: f8bd 2006 ldrh.w r2, [sp, #6] 802dc80: a902 add r1, sp, #8 802dc82: 4620 mov r0, r4 802dc84: f7f4 f944 bl 8021f10 GetUnixTimeStr(str, (uint8_t*)&len); 802dc88: a802 add r0, sp, #8 802dc8a: f10d 0106 add.w r1, sp, #6 802dc8e: f7f9 fee3 bl 8027a58 strcat(buf, "\",\"utm\":\""); 802dc92: 4620 mov r0, r4 802dc94: 490c ldr r1, [pc, #48] ; (802dcc8 ) 802dc96: f7f3 ff99 bl 8021bcc strncat(buf, str, len); 802dc9a: a902 add r1, sp, #8 802dc9c: 4620 mov r0, r4 802dc9e: f8bd 2006 ldrh.w r2, [sp, #6] 802dca2: f7f4 f935 bl 8021f10 strcat(buf, "\"}"); 802dca6: 4620 mov r0, r4 802dca8: 4908 ldr r1, [pc, #32] ; (802dccc ) 802dcaa: f7f3 ff8f bl 8021bcc //printf(buf); } 802dcae: b007 add sp, #28 802dcb0: bd30 pop {r4, r5, pc} 802dcb2: bf00 nop 802dcb4: 08044f41 .word 0x08044f41 802dcb8: 08044f6d .word 0x08044f6d 802dcbc: 08044f78 .word 0x08044f78 802dcc0: 08044f7b .word 0x08044f7b 802dcc4: 08044e7a .word 0x08044e7a 802dcc8: 08044e84 .word 0x08044e84 802dccc: 08044d4f .word 0x08044d4f 0802dcd0 : void HTTP_GetUpsHistoryPage(char* buf, uint32_t pageNumber) { 802dcd0: b530 push {r4, r5, lr} 802dcd2: 4605 mov r5, r0 802dcd4: b087 sub sp, #28 802dcd6: 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"); 802dcd8: 4927 ldr r1, [pc, #156] ; (802dd78 ) 802dcda: f7f4 f88b bl 8021df4 strcat(buf, "{\"page\": ["); 802dcde: 4628 mov r0, r5 802dce0: 4926 ldr r1, [pc, #152] ; (802dd7c ) 802dce2: f7f3 ff73 bl 8021bcc LOG_GetPage(buf, pageNumber); 802dce6: 4621 mov r1, r4 802dce8: 4628 mov r0, r5 802dcea: f7fb ff09 bl 8029b00 len = strlen(buf); 802dcee: 4628 mov r0, r5 802dcf0: f7f4 f8de bl 8021eb0 802dcf4: f8ad 0006 strh.w r0, [sp, #6] buf +=len-1; 802dcf8: b280 uxth r0, r0 802dcfa: 1e43 subs r3, r0, #1 802dcfc: 18ec adds r4, r5, r3 *buf = 0; 802dcfe: 2100 movs r1, #0 buf -=len-1; 802dd00: f1c0 0001 rsb r0, r0, #1 strcat(buf, "{\"page\": ["); LOG_GetPage(buf, pageNumber); len = strlen(buf); buf +=len-1; *buf = 0; 802dd04: 54e9 strb r1, [r5, r3] buf -=len-1; 802dd06: 1824 adds r4, r4, r0 /* Количество страниц */ memset(str, 0, 16); 802dd08: 2210 movs r2, #16 802dd0a: a802 add r0, sp, #8 802dd0c: f7f3 fef8 bl 8021b00 sprintf(str, "%i", LOG_GetPageCount()); 802dd10: f7fb fee4 bl 8029adc 802dd14: 491a ldr r1, [pc, #104] ; (802dd80 ) 802dd16: 4602 mov r2, r0 802dd18: a802 add r0, sp, #8 802dd1a: f7f9 fd7b bl 8027814 strcat(buf, "],\"pages\":\""); 802dd1e: 4620 mov r0, r4 802dd20: 4918 ldr r1, [pc, #96] ; (802dd84 ) 802dd22: f7f3 ff53 bl 8021bcc strcat(buf, str); 802dd26: a902 add r1, sp, #8 802dd28: 4620 mov r0, r4 802dd2a: f7f3 ff4f bl 8021bcc /* Часовой пояс */ GetSntpTimeZoneStr(str, (uint8_t*)&len); 802dd2e: a802 add r0, sp, #8 802dd30: f10d 0106 add.w r1, sp, #6 802dd34: f7f9 fed0 bl 8027ad8 strcat(buf, "\",\"utc\":\""); 802dd38: 4620 mov r0, r4 802dd3a: 4913 ldr r1, [pc, #76] ; (802dd88 ) 802dd3c: f7f3 ff46 bl 8021bcc strncat(buf, str, len); 802dd40: f8bd 2006 ldrh.w r2, [sp, #6] 802dd44: a902 add r1, sp, #8 802dd46: 4620 mov r0, r4 802dd48: f7f4 f8e2 bl 8021f10 GetUnixTimeStr(str, (uint8_t*)&len); 802dd4c: a802 add r0, sp, #8 802dd4e: f10d 0106 add.w r1, sp, #6 802dd52: f7f9 fe81 bl 8027a58 strcat(buf, "\",\"utm\":\""); 802dd56: 4620 mov r0, r4 802dd58: 490c ldr r1, [pc, #48] ; (802dd8c ) 802dd5a: f7f3 ff37 bl 8021bcc strncat(buf, str, len); 802dd5e: a902 add r1, sp, #8 802dd60: 4620 mov r0, r4 802dd62: f8bd 2006 ldrh.w r2, [sp, #6] 802dd66: f7f4 f8d3 bl 8021f10 strcat(buf, "\"}"); 802dd6a: 4620 mov r0, r4 802dd6c: 4908 ldr r1, [pc, #32] ; (802dd90 ) 802dd6e: f7f3 ff2d bl 8021bcc //printf(buf); } 802dd72: b007 add sp, #28 802dd74: bd30 pop {r4, r5, pc} 802dd76: bf00 nop 802dd78: 08044f41 .word 0x08044f41 802dd7c: 08044f6d .word 0x08044f6d 802dd80: 08044f78 .word 0x08044f78 802dd84: 08044f7b .word 0x08044f7b 802dd88: 08044e7a .word 0x08044e7a 802dd8c: 08044e84 .word 0x08044e84 802dd90: 08044d4f .word 0x08044d4f 0802dd94 : /** * @brief Сброс настроек (всё кроме сетевых параметров) */ void HTTP_ResetSettings(void) { 802dd94: b508 push {r3, lr} //taskENTER_CRITICAL(); SNMP_SendUserTrap(DEVICE_RESTORED); 802dd96: 2003 movs r0, #3 802dd98: f00a f9d0 bl 803813c log_event_data(LOG_SYSTEM_DEFCONFIG, "Администратор"); 802dd9c: 4906 ldr r1, [pc, #24] ; (802ddb8 ) 802dd9e: 2001 movs r0, #1 802dda0: f7fb fe5c bl 8029a5c vTaskDelay(500); 802dda4: f44f 70fa mov.w r0, #500 ; 0x1f4 802dda8: f7fd f910 bl 802afcc SETTINGS_SetPartDefault(); 802ddac: f7fa fdda bl 8028964 SETTINGS_Save(); //taskEXIT_CRITICAL(); } 802ddb0: e8bd 4008 ldmia.w sp!, {r3, lr} SNMP_SendUserTrap(DEVICE_RESTORED); log_event_data(LOG_SYSTEM_DEFCONFIG, "Администратор"); vTaskDelay(500); SETTINGS_SetPartDefault(); SETTINGS_Save(); 802ddb4: f7fa bd6a b.w 802888c 802ddb8: 08039ab8 .word 0x08039ab8 0802ddbc : /** * @brief Сохранение настроек */ void HTTP_SaveSettings(void) { 802ddbc: b508 push {r3, lr} // taskENTER_CRITICAL(); SETTINGS_Save(); 802ddbe: f7fa fd65 bl 802888c log_event_data(LOG_SETTING_SAVE, "Администратор"); 802ddc2: 4903 ldr r1, [pc, #12] ; (802ddd0 ) 802ddc4: 2004 movs r0, #4 // taskEXIT_CRITICAL(); } 802ddc6: e8bd 4008 ldmia.w sp!, {r3, lr} { // taskENTER_CRITICAL(); SETTINGS_Save(); log_event_data(LOG_SETTING_SAVE, "Администратор"); 802ddca: f7fb be47 b.w 8029a5c 802ddce: bf00 nop 802ddd0: 08039ab8 .word 0x08039ab8 0802ddd4 : /** * @brief */ void vTaskReboot(void * pvParameters) { 802ddd4: b510 push {r4, lr} 802ddd6: 4604 mov r4, r0 for (;;) { mode = *(bool*)pvParameters; if (mode) 802ddd8: 7823 ldrb r3, [r4, #0] 802ddda: b16b cbz r3, 802ddf8 { SNMP_SendUserTrap(FW_VERSION_UPDATE); 802dddc: 2001 movs r0, #1 802ddde: f00a f9ad bl 803813c log_event_data(LOG_UPDATE_SOFT, "Администратор"); 802dde2: 2002 movs r0, #2 802dde4: 490a ldr r1, [pc, #40] ; (802de10 ) 802dde6: f7fb fe39 bl 8029a5c SetLoadMode(); 802ddea: f7fa f995 bl 8028118 HTTP_SaveSettings(); 802ddee: f7ff ffe5 bl 802ddbc vTaskDelay(2000); 802ddf2: f44f 60fa mov.w r0, #2000 ; 0x7d0 802ddf6: e001 b.n 802ddfc vTaskDelay(1010); Reboot(); } else { vTaskDelay(1000); 802ddf8: f44f 707a mov.w r0, #1000 ; 0x3e8 802ddfc: f7fd f8e6 bl 802afcc /* Блокируем управление ключем на тау секунд*/ //IO_KeyBlockOn(); vTaskDelay(1010); 802de00: f240 30f2 movw r0, #1010 ; 0x3f2 802de04: f7fd f8e2 bl 802afcc Reboot(); 802de08: f7fb f97c bl 8029104 802de0c: e7e4 b.n 802ddd8 802de0e: bf00 nop 802de10: 08039ab8 .word 0x08039ab8 0802de14 : /** * @brief Перезагрузка контроллера */ void HTTP_Reboot(void) { 802de14: b508 push {r3, lr} vTaskDelay(1010); 802de16: f240 30f2 movw r0, #1010 ; 0x3f2 802de1a: f7fd f8d7 bl 802afcc Reboot(); } 802de1e: e8bd 4008 ldmia.w sp!, {r3, lr} * @brief Перезагрузка контроллера */ void HTTP_Reboot(void) { vTaskDelay(1010); Reboot(); 802de22: f7fb b96f b.w 8029104 802de26: 0000 movs r0, r0 0802de28 : * bootloader и перезаписаны настройки * * false - обычная перезагрузка */ void HTTP_StartResetTask(bool fBootMode) { 802de28: b51f push {r0, r1, r2, r3, r4, lr} static bool temp; temp = fBootMode; 802de2a: 4b07 ldr r3, [pc, #28] ; (802de48 ) xTaskCreate(vTaskReboot, "RebootTask", configMINIMAL_STACK_SIZE, 802de2c: 4907 ldr r1, [pc, #28] ; (802de4c ) */ void HTTP_StartResetTask(bool fBootMode) { static bool temp; temp = fBootMode; 802de2e: 7018 strb r0, [r3, #0] xTaskCreate(vTaskReboot, "RebootTask", configMINIMAL_STACK_SIZE, 802de30: 2200 movs r2, #0 802de32: 9200 str r2, [sp, #0] 802de34: 9201 str r2, [sp, #4] 802de36: 9202 str r2, [sp, #8] 802de38: 9203 str r2, [sp, #12] 802de3a: 4805 ldr r0, [pc, #20] ; (802de50 ) 802de3c: 2280 movs r2, #128 ; 0x80 802de3e: f7fc fe2b bl 802aa98 (void*)&temp, tskIDLE_PRIORITY, NULL); } 802de42: b005 add sp, #20 802de44: bd00 pop {pc} 802de46: bf00 nop 802de48: 20000d36 .word 0x20000d36 802de4c: 08044f87 .word 0x08044f87 802de50: 0802ddd5 .word 0x0802ddd5 0802de54 : * @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) { 802de54: b530 push {r4, r5, lr} 802de56: b089 sub sp, #36 ; 0x24 void *buf = NULL; 802de58: 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) { 802de5a: 4604 mov r4, r0 void *buf = NULL; 802de5c: 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;); 802de5e: 460d mov r5, r1 802de60: b909 cbnz r1, 802de66 802de62: 20f2 movs r0, #242 ; 0xf2 802de64: e055 b.n 802df12 *new_buf = NULL; 802de66: 600b str r3, [r1, #0] LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL), return ERR_ARG;); 802de68: 2800 cmp r0, #0 802de6a: d0fa beq.n 802de62 LWIP_ERROR("netconn_accept: invalid recvmbox", sys_mbox_valid(&conn->recvmbox), return ERR_CONN;); 802de6c: 6903 ldr r3, [r0, #16] 802de6e: 2b00 cmp r3, #0 802de70: d04e beq.n 802df10 err = conn->last_err; 802de72: 7a00 ldrb r0, [r0, #8] if (ERR_IS_FATAL(err)) { 802de74: b243 sxtb r3, r0 802de76: 3309 adds r3, #9 802de78: db4b blt.n 802df12 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) { 802de7a: f104 0010 add.w r0, r4, #16 802de7e: a901 add r1, sp, #4 802de80: 69a2 ldr r2, [r4, #24] 802de82: f009 fd43 bl 803790c 802de86: 3001 adds r0, #1 802de88: d10b bne.n 802dea2 NETCONN_SET_SAFE_ERR(conn, ERR_TIMEOUT); 802de8a: f009 fe1d bl 8037ac8 802de8e: f994 3008 ldrsb.w r3, [r4, #8] 802de92: 3309 adds r3, #9 802de94: db01 blt.n 802de9a 802de96: 23fd movs r3, #253 ; 0xfd 802de98: 7223 strb r3, [r4, #8] 802de9a: f009 fe1f bl 8037adc return ERR_TIMEOUT; 802de9e: 20fd movs r0, #253 ; 0xfd 802dea0: e037 b.n 802df12 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) 802dea2: 7823 ldrb r3, [r4, #0] 802dea4: 2b10 cmp r3, #16 802dea6: d127 bne.n 802def8 #endif /* (LWIP_UDP || LWIP_RAW) */ { if (!netconn_get_noautorecved(conn) || (buf == NULL)) { 802dea8: 7f23 ldrb r3, [r4, #28] 802deaa: f003 0308 and.w r3, r3, #8 802deae: b2db uxtb r3, r3 802deb0: b10b cbz r3, 802deb6 802deb2: 9b01 ldr r3, [sp, #4] 802deb4: b95b cbnz r3, 802dece /* 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; 802deb6: 4b18 ldr r3, [pc, #96] ; (802df18 ) msg.msg.conn = conn; 802deb8: 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; 802deba: 9302 str r3, [sp, #8] msg.msg.conn = conn; if (buf != NULL) { 802debc: 9b01 ldr r3, [sp, #4] 802debe: b10b cbz r3, 802dec4 msg.msg.msg.r.len = ((struct pbuf *)buf)->tot_len; 802dec0: 891b ldrh r3, [r3, #8] 802dec2: e000 b.n 802dec6 } else { msg.msg.msg.r.len = 1; 802dec4: 2301 movs r3, #1 } /* don't care for the return value of do_recv */ TCPIP_APIMSG(&msg); 802dec6: 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; 802dec8: 9305 str r3, [sp, #20] } /* don't care for the return value of do_recv */ TCPIP_APIMSG(&msg); 802deca: f000 fe25 bl 802eb18 } /* If we are closed, we indicate that we no longer wish to use the socket */ if (buf == NULL) { 802dece: 9a01 ldr r2, [sp, #4] 802ded0: b982 cbnz r2, 802def4 API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0); 802ded2: 6aa3 ldr r3, [r4, #40] ; 0x28 802ded4: b113 cbz r3, 802dedc 802ded6: 4620 mov r0, r4 802ded8: 2101 movs r1, #1 802deda: 4798 blx r3 /* Avoid to lose any previous error code */ NETCONN_SET_SAFE_ERR(conn, ERR_CLSD); 802dedc: f009 fdf4 bl 8037ac8 802dee0: f994 3008 ldrsb.w r3, [r4, #8] 802dee4: 3309 adds r3, #9 802dee6: db01 blt.n 802deec 802dee8: 23f4 movs r3, #244 ; 0xf4 802deea: 7223 strb r3, [r4, #8] 802deec: f009 fdf6 bl 8037adc return ERR_CLSD; 802def0: 20f4 movs r0, #244 ; 0xf4 802def2: e00e b.n 802df12 } len = ((struct pbuf *)buf)->tot_len; 802def4: 8912 ldrh r2, [r2, #8] 802def6: e002 b.n 802defe 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); 802def8: 9b01 ldr r3, [sp, #4] 802defa: 681b ldr r3, [r3, #0] 802defc: 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); 802defe: 6aa3 ldr r3, [r4, #40] ; 0x28 802df00: b113 cbz r3, 802df08 802df02: 4620 mov r0, r4 802df04: 2101 movs r1, #1 802df06: 4798 blx r3 LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_recv_data: received %p, len=%"U16_F"\n", buf, len)); *new_buf = buf; 802df08: 9b01 ldr r3, [sp, #4] /* don't set conn->last_err: it's only ERR_OK, anyway */ return ERR_OK; 802df0a: 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; 802df0c: 602b str r3, [r5, #0] 802df0e: e000 b.n 802df12 #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;); 802df10: 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; } 802df12: b240 sxtb r0, r0 802df14: b009 add sp, #36 ; 0x24 802df16: bd30 pop {r4, r5, pc} 802df18: 0802e98d .word 0x0802e98d 0802df1c : * @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) { 802df1c: b530 push {r4, r5, lr} 802df1e: 460d mov r5, r1 802df20: b087 sub sp, #28 struct netconn *conn; struct api_msg msg; conn = netconn_alloc(t, callback); 802df22: 4611 mov r1, r2 802df24: f000 fba0 bl 802e668 if (conn != NULL) { 802df28: 4604 mov r4, r0 802df2a: b1a8 cbz r0, 802df58 msg.function = do_newconn; 802df2c: 4b0c ldr r3, [pc, #48] ; (802df60 ) msg.msg.msg.n.proto = proto; msg.msg.conn = conn; 802df2e: 9001 str r0, [sp, #4] if (TCPIP_APIMSG(&msg) != ERR_OK) { 802df30: 4668 mov r0, sp struct netconn *conn; struct api_msg msg; conn = netconn_alloc(t, callback); if (conn != NULL) { msg.function = do_newconn; 802df32: 9300 str r3, [sp, #0] msg.msg.msg.n.proto = proto; 802df34: f88d 500c strb.w r5, [sp, #12] msg.msg.conn = conn; if (TCPIP_APIMSG(&msg) != ERR_OK) { 802df38: f000 fdee bl 802eb18 802df3c: b160 cbz r0, 802df58 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); 802df3e: f104 000c add.w r0, r4, #12 802df42: f009 fda3 bl 8037a8c sys_mbox_free(&conn->recvmbox); 802df46: f104 0010 add.w r0, r4, #16 802df4a: f009 fca7 bl 803789c memp_free(MEMP_NETCONN, conn); 802df4e: 4621 mov r1, r4 802df50: 2006 movs r0, #6 802df52: f001 fe51 bl 802fbf8 return NULL; 802df56: 2400 movs r4, #0 } } return conn; } 802df58: 4620 mov r0, r4 802df5a: b007 add sp, #28 802df5c: bd30 pop {r4, r5, pc} 802df5e: bf00 nop 802df60: 0802e5d9 .word 0x0802e5d9 0802df64 : * @param conn the netconn to delete * @return ERR_OK if the connection was deleted */ err_t netconn_delete(struct netconn *conn) { 802df64: 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) { 802df66: 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) { 802df68: 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) { 802df6a: b140 cbz r0, 802df7e return ERR_OK; } msg.function = do_delconn; 802df6c: 4b05 ldr r3, [pc, #20] ; (802df84 ) msg.msg.conn = conn; tcpip_apimsg(&msg); 802df6e: 4668 mov r0, sp if (conn == NULL) { return ERR_OK; } msg.function = do_delconn; msg.msg.conn = conn; 802df70: e88d 0018 stmia.w sp, {r3, r4} tcpip_apimsg(&msg); 802df74: f000 fdd0 bl 802eb18 netconn_free(conn); 802df78: 4620 mov r0, r4 802df7a: f000 fbaf bl 802e6dc /* don't care for return value of do_delconn since it only calls void functions */ return ERR_OK; } 802df7e: 2000 movs r0, #0 802df80: b006 add sp, #24 802df82: bd10 pop {r4, pc} 802df84: 0802e77d .word 0x0802e77d 0802df88 : * @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) { 802df88: b530 push {r4, r5, lr} struct api_msg msg; err_t err; LWIP_ERROR("netconn_bind: invalid conn", (conn != NULL), return ERR_ARG;); 802df8a: 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) { 802df8c: b087 sub sp, #28 struct api_msg msg; err_t err; LWIP_ERROR("netconn_bind: invalid conn", (conn != NULL), return ERR_ARG;); 802df8e: b198 cbz r0, 802dfb8 msg.function = do_bind; 802df90: 4b0b ldr r3, [pc, #44] ; (802dfc0 ) msg.msg.conn = conn; msg.msg.msg.bc.ipaddr = addr; 802df92: 9103 str r1, [sp, #12] msg.msg.msg.bc.port = port; err = TCPIP_APIMSG(&msg); 802df94: 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; 802df96: e88d 0018 stmia.w sp, {r3, r4} msg.msg.msg.bc.ipaddr = addr; msg.msg.msg.bc.port = port; 802df9a: f8ad 2010 strh.w r2, [sp, #16] err = TCPIP_APIMSG(&msg); 802df9e: f000 fdbb bl 802eb18 802dfa2: 4605 mov r5, r0 NETCONN_SET_SAFE_ERR(conn, err); 802dfa4: f009 fd90 bl 8037ac8 802dfa8: f994 3008 ldrsb.w r3, [r4, #8] 802dfac: 3309 adds r3, #9 802dfae: bfa8 it ge 802dfb0: 7225 strbge r5, [r4, #8] 802dfb2: f009 fd93 bl 8037adc 802dfb6: e000 b.n 802dfba 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;); 802dfb8: 25f2 movs r5, #242 ; 0xf2 msg.msg.msg.bc.port = port; err = TCPIP_APIMSG(&msg); NETCONN_SET_SAFE_ERR(conn, err); return err; } 802dfba: b268 sxtb r0, r5 802dfbc: b007 add sp, #28 802dfbe: bd30 pop {r4, r5, pc} 802dfc0: 0802e80f .word 0x0802e80f 0802dfc4 : * @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) { 802dfc4: b530 push {r4, r5, lr} struct api_msg msg; err_t err; LWIP_ERROR("netconn_connect: invalid conn", (conn != NULL), return ERR_ARG;); 802dfc6: 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) { 802dfc8: b087 sub sp, #28 struct api_msg msg; err_t err; LWIP_ERROR("netconn_connect: invalid conn", (conn != NULL), return ERR_ARG;); 802dfca: b198 cbz r0, 802dff4 msg.function = do_connect; 802dfcc: 4b0b ldr r3, [pc, #44] ; (802dffc ) msg.msg.conn = conn; msg.msg.msg.bc.ipaddr = addr; 802dfce: 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); 802dfd0: 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; 802dfd2: e88d 0018 stmia.w sp, {r3, r4} msg.msg.msg.bc.ipaddr = addr; msg.msg.msg.bc.port = port; 802dfd6: f8ad 2010 strh.w r2, [sp, #16] /* This is the only function which need to not block tcpip_thread */ err = tcpip_apimsg(&msg); 802dfda: f000 fd9d bl 802eb18 802dfde: 4605 mov r5, r0 NETCONN_SET_SAFE_ERR(conn, err); 802dfe0: f009 fd72 bl 8037ac8 802dfe4: f994 3008 ldrsb.w r3, [r4, #8] 802dfe8: 3309 adds r3, #9 802dfea: bfa8 it ge 802dfec: 7225 strbge r5, [r4, #8] 802dfee: f009 fd75 bl 8037adc 802dff2: e000 b.n 802dff6 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;); 802dff4: 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; } 802dff6: b268 sxtb r0, r5 802dff8: b007 add sp, #28 802dffa: bd30 pop {r4, r5, pc} 802dffc: 0802e865 .word 0x0802e865 0802e000 : * @param conn the netconn to disconnect * @return TODO: return value is not set here... */ err_t netconn_disconnect(struct netconn *conn) { 802e000: b530 push {r4, r5, lr} struct api_msg msg; err_t err; LWIP_ERROR("netconn_disconnect: invalid conn", (conn != NULL), return ERR_ARG;); 802e002: 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) { 802e004: b087 sub sp, #28 struct api_msg msg; err_t err; LWIP_ERROR("netconn_disconnect: invalid conn", (conn != NULL), return ERR_ARG;); 802e006: b180 cbz r0, 802e02a msg.function = do_disconnect; 802e008: 4b0a ldr r3, [pc, #40] ; (802e034 ) msg.msg.conn = conn; err = TCPIP_APIMSG(&msg); 802e00a: 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; 802e00c: e88d 0018 stmia.w sp, {r3, r4} err = TCPIP_APIMSG(&msg); 802e010: f000 fd82 bl 802eb18 802e014: 4605 mov r5, r0 NETCONN_SET_SAFE_ERR(conn, err); 802e016: f009 fd57 bl 8037ac8 802e01a: f994 3008 ldrsb.w r3, [r4, #8] 802e01e: 3309 adds r3, #9 802e020: bfa8 it ge 802e022: 7225 strbge r5, [r4, #8] 802e024: f009 fd5a bl 8037adc 802e028: e000 b.n 802e02c netconn_disconnect(struct netconn *conn) { struct api_msg msg; err_t err; LWIP_ERROR("netconn_disconnect: invalid conn", (conn != NULL), return ERR_ARG;); 802e02a: 25f2 movs r5, #242 ; 0xf2 msg.msg.conn = conn; err = TCPIP_APIMSG(&msg); NETCONN_SET_SAFE_ERR(conn, err); return err; } 802e02c: b268 sxtb r0, r5 802e02e: b007 add sp, #28 802e030: bd30 pop {r4, r5, pc} 802e032: bf00 nop 802e034: 0802e8f5 .word 0x0802e8f5 0802e038 : * @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) { 802e038: b573 push {r0, r1, r4, r5, r6, lr} 802e03a: 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;); 802e03c: 460e mov r6, r1 802e03e: b909 cbnz r1, 802e044 802e040: 24f2 movs r4, #242 ; 0xf2 802e042: e031 b.n 802e0a8 *new_buf = NULL; 802e044: 2300 movs r3, #0 802e046: 600b str r3, [r1, #0] LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL), return ERR_ARG;); 802e048: 2800 cmp r0, #0 802e04a: d0f9 beq.n 802e040 LWIP_ERROR("netconn_accept: invalid recvmbox", sys_mbox_valid(&conn->recvmbox), return ERR_CONN;); 802e04c: 6902 ldr r2, [r0, #16] 802e04e: b352 cbz r2, 802e0a6 #if LWIP_TCP #if (LWIP_UDP || LWIP_RAW) if (conn->type == NETCONN_TCP) 802e050: 7802 ldrb r2, [r0, #0] 802e052: 2a10 cmp r2, #16 802e054: d123 bne.n 802e09e #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); 802e056: 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; 802e058: 9301 str r3, [sp, #4] /* This is not a listening netconn, since recvmbox is set */ buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); 802e05a: f001 fdb7 bl 802fbcc if (buf == NULL) { 802e05e: 4605 mov r5, r0 802e060: b958 cbnz r0, 802e07a NETCONN_SET_SAFE_ERR(conn, ERR_MEM); 802e062: f009 fd31 bl 8037ac8 802e066: f994 3008 ldrsb.w r3, [r4, #8] 802e06a: 3309 adds r3, #9 802e06c: db01 blt.n 802e072 802e06e: 23ff movs r3, #255 ; 0xff 802e070: 7223 strb r3, [r4, #8] 802e072: f009 fd33 bl 8037adc return ERR_MEM; 802e076: 24ff movs r4, #255 ; 0xff 802e078: e016 b.n 802e0a8 } err = netconn_recv_data(conn, (void **)&p); 802e07a: 4620 mov r0, r4 802e07c: a901 add r1, sp, #4 802e07e: f7ff fee9 bl 802de54 if (err != ERR_OK) { 802e082: 4604 mov r4, r0 802e084: b120 cbz r0, 802e090 memp_free(MEMP_NETBUF, buf); 802e086: 2005 movs r0, #5 802e088: 4629 mov r1, r5 802e08a: f001 fdb5 bl 802fbf8 802e08e: e00b b.n 802e0a8 return err; } LWIP_ASSERT("p != NULL", p != NULL); buf->p = p; 802e090: 9b01 ldr r3, [sp, #4] buf->ptr = p; buf->port = 0; 802e092: 81a8 strh r0, [r5, #12] memp_free(MEMP_NETBUF, buf); return err; } LWIP_ASSERT("p != NULL", p != NULL); buf->p = p; 802e094: 602b str r3, [r5, #0] buf->ptr = p; 802e096: 606b str r3, [r5, #4] buf->port = 0; ip_addr_set_any(&buf->addr); 802e098: 60a8 str r0, [r5, #8] *new_buf = buf; 802e09a: 6035 str r5, [r6, #0] 802e09c: e004 b.n 802e0a8 #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); 802e09e: f7ff fed9 bl 802de54 802e0a2: 4604 mov r4, r0 802e0a4: e000 b.n 802e0a8 #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;); 802e0a6: 24f3 movs r4, #243 ; 0xf3 { #if (LWIP_UDP || LWIP_RAW) return netconn_recv_data(conn, (void **)new_buf); #endif /* (LWIP_UDP || LWIP_RAW) */ } } 802e0a8: b260 sxtb r0, r4 802e0aa: bd7c pop {r2, r3, r4, r5, r6, pc} 0802e0ac : * @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) { 802e0ac: b530 push {r4, r5, lr} struct api_msg msg; err_t err; LWIP_ERROR("netconn_send: invalid conn", (conn != NULL), return ERR_ARG;); 802e0ae: 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) { 802e0b0: b087 sub sp, #28 struct api_msg msg; err_t err; LWIP_ERROR("netconn_send: invalid conn", (conn != NULL), return ERR_ARG;); 802e0b2: b188 cbz r0, 802e0d8 LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_send: sending %"U16_F" bytes\n", buf->p->tot_len)); msg.function = do_send; 802e0b4: 4b0a ldr r3, [pc, #40] ; (802e0e0 ) msg.msg.conn = conn; msg.msg.msg.b = buf; 802e0b6: 9103 str r1, [sp, #12] err = TCPIP_APIMSG(&msg); 802e0b8: 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; 802e0ba: e88d 0018 stmia.w sp, {r3, r4} msg.msg.msg.b = buf; err = TCPIP_APIMSG(&msg); 802e0be: f000 fd2b bl 802eb18 802e0c2: 4605 mov r5, r0 NETCONN_SET_SAFE_ERR(conn, err); 802e0c4: f009 fd00 bl 8037ac8 802e0c8: f994 3008 ldrsb.w r3, [r4, #8] 802e0cc: 3309 adds r3, #9 802e0ce: bfa8 it ge 802e0d0: 7225 strbge r5, [r4, #8] 802e0d2: f009 fd03 bl 8037adc 802e0d6: e000 b.n 802e0da 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;); 802e0d8: 25f2 movs r5, #242 ; 0xf2 msg.msg.msg.b = buf; err = TCPIP_APIMSG(&msg); NETCONN_SET_SAFE_ERR(conn, err); return err; } 802e0da: b268 sxtb r0, r5 802e0dc: b007 add sp, #28 802e0de: bd30 pop {r4, r5, pc} 802e0e0: 0802e91f .word 0x0802e91f 0802e0e4 : * * @param conn the TCP netconn to setup */ static void setup_tcp(struct netconn *conn) { 802e0e4: b510 push {r4, lr} struct tcp_pcb *pcb; pcb = conn->pcb.tcp; 802e0e6: 6844 ldr r4, [r0, #4] * * @param conn the TCP netconn to setup */ static void setup_tcp(struct netconn *conn) { 802e0e8: 4601 mov r1, r0 struct tcp_pcb *pcb; pcb = conn->pcb.tcp; tcp_arg(pcb, conn); 802e0ea: 4620 mov r0, r4 802e0ec: f002 f9d4 bl 8030498 tcp_recv(pcb, recv_tcp); 802e0f0: 4620 mov r0, r4 802e0f2: 4909 ldr r1, [pc, #36] ; (802e118 ) 802e0f4: f002 f9d2 bl 803049c tcp_sent(pcb, sent_tcp); 802e0f8: 4620 mov r0, r4 802e0fa: 4908 ldr r1, [pc, #32] ; (802e11c ) 802e0fc: f002 f9d0 bl 80304a0 tcp_poll(pcb, poll_tcp, 4); 802e100: 4620 mov r0, r4 802e102: 4907 ldr r1, [pc, #28] ; (802e120 ) 802e104: 2204 movs r2, #4 802e106: f002 f9d2 bl 80304ae tcp_err(pcb, err_tcp); 802e10a: 4906 ldr r1, [pc, #24] ; (802e124 ) 802e10c: 4620 mov r0, r4 } 802e10e: 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); 802e112: f002 b9c7 b.w 80304a4 802e116: bf00 nop 802e118: 0802e529 .word 0x0802e529 802e11c: 0802e58f .word 0x0802e58f 802e120: 0802e3ff .word 0x0802e3ff 802e124: 0802e279 .word 0x0802e279 0802e128 : * * @param conn the TCP netconn to close */ static void do_close_internal(struct netconn *conn) { 802e128: 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; 802e12a: 6a43 ldr r3, [r0, #36] ; 0x24 802e12c: 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; 802e12e: 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; 802e130: 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; 802e134: 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; 802e138: 425d negs r5, r3 802e13a: 415d adcs r5, r3 * * @param conn the TCP netconn to close */ static void do_close_internal(struct netconn *conn) { 802e13c: 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; 802e13e: 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) { 802e140: b11d cbz r5, 802e14a tcp_arg(conn->pcb.tcp, NULL); 802e142: 6840 ldr r0, [r0, #4] 802e144: 2100 movs r1, #0 802e146: f002 f9a7 bl 8030498 } if (conn->pcb.tcp->state == LISTEN) { 802e14a: 6860 ldr r0, [r4, #4] 802e14c: 7e03 ldrb r3, [r0, #24] 802e14e: 2b01 cmp r3, #1 802e150: d104 bne.n 802e15c tcp_accept(conn->pcb.tcp, NULL); 802e152: 2100 movs r1, #0 802e154: f002 f9a9 bl 80304aa tcp_poll(conn->pcb.tcp, NULL, 4); tcp_err(conn->pcb.tcp, NULL); } } /* Try to close the connection */ if (close) { 802e158: b9bd cbnz r5, 802e18a 802e15a: e01a b.n 802e192 } 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) { 802e15c: b137 cbz r7, 802e16c tcp_recv(conn->pcb.tcp, NULL); 802e15e: 2100 movs r1, #0 802e160: f002 f99c bl 803049c tcp_accept(conn->pcb.tcp, NULL); 802e164: 6860 ldr r0, [r4, #4] 802e166: 2100 movs r1, #0 802e168: f002 f99f bl 80304aa } if (shut_tx) { 802e16c: b11e cbz r6, 802e176 tcp_sent(conn->pcb.tcp, NULL); 802e16e: 6860 ldr r0, [r4, #4] 802e170: 2100 movs r1, #0 802e172: f002 f995 bl 80304a0 } if (close) { 802e176: b165 cbz r5, 802e192 tcp_poll(conn->pcb.tcp, NULL, 4); 802e178: 6860 ldr r0, [r4, #4] 802e17a: 2100 movs r1, #0 802e17c: 2204 movs r2, #4 802e17e: f002 f996 bl 80304ae tcp_err(conn->pcb.tcp, NULL); 802e182: 6860 ldr r0, [r4, #4] 802e184: 2100 movs r1, #0 802e186: f002 f98d bl 80304a4 } } /* Try to close the connection */ if (close) { err = tcp_close(conn->pcb.tcp); 802e18a: 6860 ldr r0, [r4, #4] 802e18c: f002 fc48 bl 8030a20 802e190: e004 b.n 802e19c } else { err = tcp_shutdown(conn->pcb.tcp, shut_rx, shut_tx); 802e192: 6860 ldr r0, [r4, #4] 802e194: 4639 mov r1, r7 802e196: 4632 mov r2, r6 802e198: f002 fc1c bl 80309d4 802e19c: 4602 mov r2, r0 } if (err == ERR_OK) { 802e19e: b9f0 cbnz r0, 802e1de /* Closing succeeded */ conn->current_msg->err = ERR_OK; 802e1a0: 6a63 ldr r3, [r4, #36] ; 0x24 802e1a2: 7118 strb r0, [r3, #4] conn->current_msg = NULL; 802e1a4: 6260 str r0, [r4, #36] ; 0x24 conn->state = NETCONN_NONE; 802e1a6: 7060 strb r0, [r4, #1] if (close) { 802e1a8: b12d cbz r5, 802e1b6 /* 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); 802e1aa: 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; 802e1ac: 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); 802e1ae: b113 cbz r3, 802e1b6 802e1b0: 4620 mov r0, r4 802e1b2: 2104 movs r1, #4 802e1b4: 4798 blx r3 } if (shut_rx) { 802e1b6: b12f cbz r7, 802e1c4 API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); 802e1b8: 6aa3 ldr r3, [r4, #40] ; 0x28 802e1ba: b11b cbz r3, 802e1c4 802e1bc: 2100 movs r1, #0 802e1be: 4620 mov r0, r4 802e1c0: 460a mov r2, r1 802e1c2: 4798 blx r3 } if (shut_tx) { 802e1c4: b12e cbz r6, 802e1d2 API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 802e1c6: 6aa3 ldr r3, [r4, #40] ; 0x28 802e1c8: b11b cbz r3, 802e1d2 802e1ca: 4620 mov r0, r4 802e1cc: 2102 movs r1, #2 802e1ce: 2200 movs r2, #0 802e1d0: 4798 blx r3 } /* wake up the application task */ sys_sem_signal(&conn->op_completed); 802e1d2: 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 */ } 802e1d6: 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); 802e1da: f009 bc45 b.w 8037a68 } 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); 802e1de: 6860 ldr r0, [r4, #4] 802e1e0: 4908 ldr r1, [pc, #32] ; (802e204 ) 802e1e2: f002 f95d bl 80304a0 tcp_poll(conn->pcb.tcp, poll_tcp, 4); 802e1e6: 6860 ldr r0, [r4, #4] 802e1e8: 4907 ldr r1, [pc, #28] ; (802e208 ) 802e1ea: 2204 movs r2, #4 802e1ec: f002 f95f bl 80304ae tcp_err(conn->pcb.tcp, err_tcp); 802e1f0: 6860 ldr r0, [r4, #4] 802e1f2: 4906 ldr r1, [pc, #24] ; (802e20c ) 802e1f4: f002 f956 bl 80304a4 tcp_arg(conn->pcb.tcp, conn); 802e1f8: 6860 ldr r0, [r4, #4] 802e1fa: 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 */ } 802e1fc: 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); 802e200: f002 b94a b.w 8030498 802e204: 0802e58f .word 0x0802e58f 802e208: 0802e3ff .word 0x0802e3ff 802e20c: 0802e279 .word 0x0802e279 0802e210 : * * @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) { 802e210: b538 push {r3, r4, r5, lr} LWIP_UNUSED_ARG(pcb); conn = (struct netconn *)arg; if (conn == NULL) { 802e212: 4604 mov r4, r0 802e214: b358 cbz r0, 802e26e 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) { 802e216: 6a43 ldr r3, [r0, #36] ; 0x24 802e218: b103 cbz r3, 802e21c conn->current_msg->err = err; 802e21a: 711a strb r2, [r3, #4] } if ((conn->type == NETCONN_TCP) && (err == ERR_OK)) { 802e21c: 7823 ldrb r3, [r4, #0] 802e21e: 2b10 cmp r3, #16 802e220: d103 bne.n 802e22a 802e222: b912 cbnz r2, 802e22a setup_tcp(conn); 802e224: 4620 mov r0, r4 802e226: f7ff ff5d bl 802e0e4 } was_blocking = !IN_NONBLOCKING_CONNECT(conn); 802e22a: 7f23 ldrb r3, [r4, #28] 802e22c: f083 0504 eor.w r5, r3, #4 SET_NONBLOCKING_CONNECT(conn, 0); 802e230: f023 0304 bic.w r3, r3, #4 802e234: 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); 802e236: f3c5 0580 ubfx r5, r5, #2, #1 SET_NONBLOCKING_CONNECT(conn, 0); conn->current_msg = NULL; 802e23a: 2300 movs r3, #0 802e23c: 6263 str r3, [r4, #36] ; 0x24 conn->state = NETCONN_NONE; 802e23e: 7063 strb r3, [r4, #1] if (!was_blocking) { 802e240: b945 cbnz r5, 802e254 NETCONN_SET_SAFE_ERR(conn, ERR_OK); 802e242: f009 fc41 bl 8037ac8 802e246: f994 3008 ldrsb.w r3, [r4, #8] 802e24a: 3309 adds r3, #9 802e24c: bfa8 it ge 802e24e: 7225 strbge r5, [r4, #8] 802e250: f009 fc44 bl 8037adc } API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 802e254: 6aa3 ldr r3, [r4, #40] ; 0x28 802e256: b11b cbz r3, 802e260 802e258: 4620 mov r0, r4 802e25a: 2102 movs r1, #2 802e25c: 2200 movs r2, #0 802e25e: 4798 blx r3 if (was_blocking) { 802e260: b13d cbz r5, 802e272 sys_sem_signal(&conn->op_completed); 802e262: f104 000c add.w r0, r4, #12 802e266: f009 fbff bl 8037a68 } return ERR_OK; 802e26a: 2000 movs r0, #0 802e26c: e002 b.n 802e274 LWIP_UNUSED_ARG(pcb); conn = (struct netconn *)arg; if (conn == NULL) { return ERR_VAL; 802e26e: 20fa movs r0, #250 ; 0xfa 802e270: e000 b.n 802e274 API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); if (was_blocking) { sys_sem_signal(&conn->op_completed); } return ERR_OK; 802e272: 4628 mov r0, r5 } 802e274: b240 sxtb r0, r0 802e276: bd38 pop {r3, r4, r5, pc} 0802e278 : * * @see tcp.h (struct tcp_pcb.err) for parameters */ static void err_tcp(void *arg, err_t err) { 802e278: b5f8 push {r3, r4, r5, r6, r7, lr} 802e27a: 4604 mov r4, r0 SYS_ARCH_DECL_PROTECT(lev); conn = (struct netconn *)arg; LWIP_ASSERT("conn != NULL", (conn != NULL)); conn->pcb.tcp = NULL; 802e27c: 2500 movs r5, #0 * * @see tcp.h (struct tcp_pcb.err) for parameters */ static void err_tcp(void *arg, err_t err) { 802e27e: 460e mov r6, r1 SYS_ARCH_DECL_PROTECT(lev); conn = (struct netconn *)arg; LWIP_ASSERT("conn != NULL", (conn != NULL)); conn->pcb.tcp = NULL; 802e280: 6045 str r5, [r0, #4] /* no check since this is always fatal! */ SYS_ARCH_PROTECT(lev); 802e282: f009 fc21 bl 8037ac8 conn->last_err = err; 802e286: 7226 strb r6, [r4, #8] SYS_ARCH_UNPROTECT(lev); 802e288: f009 fc28 bl 8037adc 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); 802e28c: 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; 802e28e: 7867 ldrb r7, [r4, #1] conn->state = NETCONN_NONE; 802e290: 7065 strb r5, [r4, #1] /* Notify the user layer about a connection error. Used to signal select. */ API_EVENT(conn, NETCONN_EVT_ERROR, 0); 802e292: b11b cbz r3, 802e29c 802e294: 4620 mov r0, r4 802e296: 2104 movs r1, #4 802e298: 462a mov r2, r5 802e29a: 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); 802e29c: 6aa3 ldr r3, [r4, #40] ; 0x28 802e29e: b11b cbz r3, 802e2a8 802e2a0: 2100 movs r1, #0 802e2a2: 4620 mov r0, r4 802e2a4: 460a mov r2, r1 802e2a6: 4798 blx r3 API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 802e2a8: 6aa3 ldr r3, [r4, #40] ; 0x28 802e2aa: b11b cbz r3, 802e2b4 802e2ac: 4620 mov r0, r4 802e2ae: 2102 movs r1, #2 802e2b0: 2200 movs r2, #0 802e2b2: 4798 blx r3 /* pass NULL-message to recvmbox to wake up pending recv */ if (sys_mbox_valid(&conn->recvmbox)) { 802e2b4: 6923 ldr r3, [r4, #16] 802e2b6: b123 cbz r3, 802e2c2 /* use trypost to prevent deadlock */ sys_mbox_trypost(&conn->recvmbox, NULL); 802e2b8: f104 0010 add.w r0, r4, #16 802e2bc: 2100 movs r1, #0 802e2be: f009 fb0b bl 80378d8 } /* pass NULL-message to acceptmbox to wake up pending accept */ if (sys_mbox_valid(&conn->acceptmbox)) { 802e2c2: 6963 ldr r3, [r4, #20] 802e2c4: b123 cbz r3, 802e2d0 /* use trypost to preven deadlock */ sys_mbox_trypost(&conn->acceptmbox, NULL); 802e2c6: f104 0014 add.w r0, r4, #20 802e2ca: 2100 movs r1, #0 802e2cc: f009 fb04 bl 80378d8 802e2d0: 2f04 cmp r7, #4 802e2d2: d815 bhi.n 802e300 802e2d4: b27f sxtb r7, r7 802e2d6: f04f 43b0 mov.w r3, #1476395008 ; 0x58000000 802e2da: 40bb lsls r3, r7 802e2dc: d510 bpl.n 802e300 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); 802e2de: 7f23 ldrb r3, [r4, #28] SET_NONBLOCKING_CONNECT(conn, 0); 802e2e0: f023 0204 bic.w r2, r3, #4 if (!was_nonblocking_connect) { 802e2e4: f003 0304 and.w r3, r3, #4 802e2e8: 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); 802e2ea: 7722 strb r2, [r4, #28] if (!was_nonblocking_connect) { 802e2ec: b943 cbnz r3, 802e300 /* set error return code */ LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); conn->current_msg->err = err; 802e2ee: 6a62 ldr r2, [r4, #36] ; 0x24 conn->current_msg = NULL; /* wake up the waiting task */ sys_sem_signal(&conn->op_completed); 802e2f0: 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; 802e2f4: 7116 strb r6, [r2, #4] conn->current_msg = NULL; 802e2f6: 6263 str r3, [r4, #36] ; 0x24 sys_sem_signal(&conn->op_completed); } } else { LWIP_ASSERT("conn->current_msg == NULL", conn->current_msg == NULL); } } 802e2f8: 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); 802e2fc: f009 bbb4 b.w 8037a68 802e300: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802e302 : * @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) { 802e302: 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) || 802e304: 7f03 ldrb r3, [r0, #28] 802e306: f003 0302 and.w r3, r3, #2 802e30a: 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) { 802e30c: 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) || 802e30e: b923 cbnz r3, 802e31a (conn->current_msg->msg.w.apiflags & NETCONN_DONTBLOCK); 802e310: 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) || 802e312: 7c1f ldrb r7, [r3, #16] 802e314: f3c7 0780 ubfx r7, r7, #2, #1 802e318: e000 b.n 802e31c 802e31a: 2701 movs r7, #1 (conn->current_msg->msg.w.apiflags & NETCONN_DONTBLOCK); u8_t apiflags = conn->current_msg->msg.w.apiflags; 802e31c: 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; 802e31e: 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; 802e320: 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; 802e322: 6891 ldr r1, [r2, #8] diff = conn->current_msg->msg.w.len - conn->write_offset; 802e324: 68d2 ldr r2, [r2, #12] if (diff > 0xffffUL) { /* max_u16_t */ 802e326: 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; 802e32a: 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; 802e32c: 1809 adds r1, r1, r0 #endif apiflags |= TCP_WRITE_FLAG_MORE; } else { len = (u16_t)diff; } available = tcp_sndbuf(conn->pcb.tcp); 802e32e: 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 */ 802e330: 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; 802e332: bf98 it ls 802e334: b295 uxthls r5, r2 } available = tcp_sndbuf(conn->pcb.tcp); 802e336: 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; 802e33a: bf88 it hi 802e33c: f043 0302 orrhi.w r3, r3, #2 } else { len = (u16_t)diff; } available = tcp_sndbuf(conn->pcb.tcp); if (available < len) { 802e340: 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) || 802e342: b2ff uxtb r7, r7 apiflags |= TCP_WRITE_FLAG_MORE; } else { len = (u16_t)diff; } available = tcp_sndbuf(conn->pcb.tcp); if (available < len) { 802e344: d206 bcs.n 802e354 /* don't try to write more than sendbuf */ len = available; if (dontblock){ 802e346: b117 cbz r7, 802e34e if (!len) { 802e348: 4615 mov r5, r2 802e34a: b16a cbz r2, 802e368 802e34c: e002 b.n 802e354 } } else { #if LWIP_TCPIP_CORE_LOCKING conn->flags |= NETCONN_FLAG_WRITE_DELAYED; #endif apiflags |= TCP_WRITE_FLAG_MORE; 802e34e: f043 0302 orr.w r3, r3, #2 802e352: 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); 802e354: 462a mov r2, r5 802e356: f003 fca4 bl 8031ca2 /* if OK or memory error, check available space */ if ((err == ERR_OK) || (err == ERR_MEM)) { 802e35a: 1c43 adds r3, r0, #1 802e35c: b2db uxtb r3, r3 802e35e: 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); 802e360: 4606 mov r6, r0 /* if OK or memory error, check available space */ if ((err == ERR_OK) || (err == ERR_MEM)) { 802e362: d83e bhi.n 802e3e2 err_mem: if (dontblock && (len < conn->current_msg->msg.w.len)) { 802e364: b187 cbz r7, 802e388 802e366: e000 b.n 802e36a if (available < len) { /* don't try to write more than sendbuf */ len = available; if (dontblock){ if (!len) { err = ERR_WOULDBLOCK; 802e368: 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)) { 802e36a: 6a63 ldr r3, [r4, #36] ; 0x24 802e36c: 68db ldr r3, [r3, #12] 802e36e: 429d cmp r5, r3 802e370: d20a bcs.n 802e388 /* 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); 802e372: 6aa3 ldr r3, [r4, #40] ; 0x28 802e374: b11b cbz r3, 802e37e 802e376: 4620 mov r0, r4 802e378: 2103 movs r1, #3 802e37a: 462a mov r2, r5 802e37c: 4798 blx r3 conn->flags |= NETCONN_FLAG_CHECK_WRITESPACE; 802e37e: 7f23 ldrb r3, [r4, #28] 802e380: f043 0310 orr.w r3, r3, #16 802e384: 7723 strb r3, [r4, #28] 802e386: e010 b.n 802e3aa } else if ((tcp_sndbuf(conn->pcb.tcp) <= TCP_SNDLOWAT) || 802e388: 6863 ldr r3, [r4, #4] 802e38a: f8b3 1066 ldrh.w r1, [r3, #102] ; 0x66 802e38e: f243 3254 movw r2, #13140 ; 0x3354 802e392: 4291 cmp r1, r2 802e394: d903 bls.n 802e39e 802e396: f8b3 3068 ldrh.w r3, [r3, #104] ; 0x68 802e39a: 2b23 cmp r3, #35 ; 0x23 802e39c: d905 bls.n 802e3aa (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); 802e39e: 6aa3 ldr r3, [r4, #40] ; 0x28 802e3a0: b11b cbz r3, 802e3aa 802e3a2: 4620 mov r0, r4 802e3a4: 2103 movs r1, #3 802e3a6: 462a mov r2, r5 802e3a8: 4798 blx r3 } } if (err == ERR_OK) { 802e3aa: b996 cbnz r6, 802e3d2 conn->write_offset += len; 802e3ac: 6a23 ldr r3, [r4, #32] 802e3ae: 18ed adds r5, r5, r3 if ((conn->write_offset == conn->current_msg->msg.w.len) || dontblock) { 802e3b0: 6a63 ldr r3, [r4, #36] ; 0x24 API_EVENT(conn, NETCONN_EVT_SENDMINUS, len); } } if (err == ERR_OK) { conn->write_offset += len; 802e3b2: 6225 str r5, [r4, #32] if ((conn->write_offset == conn->current_msg->msg.w.len) || dontblock) { 802e3b4: 68da ldr r2, [r3, #12] 802e3b6: 4295 cmp r5, r2 802e3b8: 4632 mov r2, r6 802e3ba: d000 beq.n 802e3be 802e3bc: b11f cbz r7, 802e3c6 /* return sent length */ conn->current_msg->msg.w.len = conn->write_offset; 802e3be: 60dd str r5, [r3, #12] /* everything was written */ write_finished = 1; conn->write_offset = 0; 802e3c0: 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; 802e3c2: 2501 movs r5, #1 802e3c4: e000 b.n 802e3c8 do_writemore(struct netconn *conn) { err_t err; void *dataptr; u16_t len, available; u8_t write_finished = 0; 802e3c6: 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); 802e3c8: 6860 ldr r0, [r4, #4] 802e3ca: f003 fe7d bl 80320c8 the error to the application thread. */ write_finished = 1; conn->current_msg->msg.w.len = 0; } } if (write_finished) { 802e3ce: b1a5 cbz r5, 802e3fa 802e3d0: e00a b.n 802e3e8 /* everything was written */ write_finished = 1; conn->write_offset = 0; } tcp_output(conn->pcb.tcp); } else if ((err == ERR_MEM) && !dontblock) { 802e3d2: b273 sxtb r3, r6 802e3d4: 3301 adds r3, #1 802e3d6: d104 bne.n 802e3e2 802e3d8: b91f cbnz r7, 802e3e2 /* 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); 802e3da: 6860 ldr r0, [r4, #4] 802e3dc: f003 fe74 bl 80320c8 802e3e0: e00b b.n 802e3fa #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; 802e3e2: 6a63 ldr r3, [r4, #36] ; 0x24 802e3e4: 2200 movs r2, #0 802e3e6: 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; 802e3e8: 6a63 ldr r3, [r4, #36] ; 0x24 802e3ea: 711e strb r6, [r3, #4] conn->current_msg = NULL; 802e3ec: 2300 movs r3, #0 802e3ee: 6263 str r3, [r4, #36] ; 0x24 conn->state = NETCONN_NONE; 802e3f0: 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); 802e3f2: f104 000c add.w r0, r4, #12 802e3f6: f009 fb37 bl 8037a68 #if LWIP_TCPIP_CORE_LOCKING else return ERR_MEM; #endif return ERR_OK; } 802e3fa: 2000 movs r0, #0 802e3fc: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802e3fe : struct netconn *conn = (struct netconn *)arg; LWIP_UNUSED_ARG(pcb); LWIP_ASSERT("conn != NULL", (conn != NULL)); if (conn->state == NETCONN_WRITE) { 802e3fe: 7843 ldrb r3, [r0, #1] 802e400: 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) { 802e402: b510 push {r4, lr} 802e404: 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) { 802e406: d102 bne.n 802e40e do_writemore(conn); 802e408: f7ff ff7b bl 802e302 802e40c: e003 b.n 802e416 } else if (conn->state == NETCONN_CLOSE) { 802e40e: 2b04 cmp r3, #4 802e410: d101 bne.n 802e416 do_close_internal(conn); 802e412: f7ff fe89 bl 802e128 } /* @todo: implement connect timeout here? */ /* Did a nonblocking write fail before? Then check available write-space. */ if (conn->flags & NETCONN_FLAG_CHECK_WRITESPACE) { 802e416: 7f22 ldrb r2, [r4, #28] 802e418: f002 0310 and.w r3, r2, #16 802e41c: b2db uxtb r3, r3 802e41e: b1a3 cbz r3, 802e44a /* 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) && 802e420: 6863 ldr r3, [r4, #4] 802e422: b193 cbz r3, 802e44a 802e424: f8b3 0066 ldrh.w r0, [r3, #102] ; 0x66 802e428: f243 3154 movw r1, #13140 ; 0x3354 802e42c: 4288 cmp r0, r1 802e42e: d90c bls.n 802e44a 802e430: f8b3 3068 ldrh.w r3, [r3, #104] ; 0x68 802e434: 2b23 cmp r3, #35 ; 0x23 802e436: d808 bhi.n 802e44a (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) { conn->flags &= ~NETCONN_FLAG_CHECK_WRITESPACE; API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 802e438: 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; 802e43a: f022 0210 bic.w r2, r2, #16 802e43e: 7722 strb r2, [r4, #28] API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 802e440: b11b cbz r3, 802e44a 802e442: 4620 mov r0, r4 802e444: 2102 movs r1, #2 802e446: 2200 movs r2, #0 802e448: 4798 blx r3 } } return ERR_OK; } 802e44a: 2000 movs r0, #0 802e44c: bd10 pop {r4, pc} 0802e44e : * @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) { 802e44e: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802e452: 4616 mov r6, r2 802e454: 461f mov r7, r3 802e456: 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)) { 802e45a: 4605 mov r5, r0 802e45c: b108 cbz r0, 802e462 802e45e: 6903 ldr r3, [r0, #16] 802e460: b923 cbnz r3, 802e46c #endif /* LWIP_SO_RCVBUF */ pbuf_free(p); 802e462: 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); } } 802e464: 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); 802e468: f001 bcd0 b.w 802fe0c return; } buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); 802e46c: 2005 movs r0, #5 802e46e: f001 fbad bl 802fbcc if (buf == NULL) { 802e472: 4604 mov r4, r0 802e474: 2800 cmp r0, #0 802e476: d0f4 beq.n 802e462 pbuf_free(p); return; } else { buf->p = p; 802e478: 6006 str r6, [r0, #0] buf->ptr = p; 802e47a: 6046 str r6, [r0, #4] ip_addr_set(&buf->addr, addr); 802e47c: b107 cbz r7, 802e480 802e47e: 683f ldr r7, [r7, #0] } #endif /* LWIP_NETBUF_RECVINFO */ } len = p->tot_len; if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) { 802e480: 4621 mov r1, r4 pbuf_free(p); return; } else { buf->p = p; buf->ptr = p; ip_addr_set(&buf->addr, addr); 802e482: 60a7 str r7, [r4, #8] buf->port = port; 802e484: f8a4 800c strh.w r8, [r4, #12] } #endif /* LWIP_NETBUF_RECVINFO */ } len = p->tot_len; if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) { 802e488: f105 0010 add.w r0, r5, #16 buf->toport_chksum = udphdr->dest; } #endif /* LWIP_NETBUF_RECVINFO */ } len = p->tot_len; 802e48c: 8936 ldrh r6, [r6, #8] if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) { 802e48e: f009 fa23 bl 80378d8 802e492: 4601 mov r1, r0 802e494: b120 cbz r0, 802e4a0 netbuf_delete(buf); 802e496: 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); } } 802e498: 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); 802e49c: f000 baa1 b.w 802e9e2 } 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); 802e4a0: 6aab ldr r3, [r5, #40] ; 0x28 802e4a2: b113 cbz r3, 802e4aa 802e4a4: 4628 mov r0, r5 802e4a6: 4632 mov r2, r6 802e4a8: 4798 blx r3 802e4aa: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802e4ae: 0000 movs r0, r0 0802e4b0 : * @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) { 802e4b0: b5f8 push {r3, r4, r5, r6, r7, lr} 802e4b2: 460f mov r7, r1 802e4b4: 4614 mov r4, r2 struct netconn *conn; LWIP_UNUSED_ARG(addr); conn = (struct netconn *)arg; if ((conn != NULL) && sys_mbox_valid(&conn->recvmbox)) { 802e4b6: 4605 mov r5, r0 802e4b8: 2800 cmp r0, #0 802e4ba: d031 beq.n 802e520 802e4bc: 6903 ldr r3, [r0, #16] 802e4be: 2b00 cmp r3, #0 802e4c0: d02e beq.n 802e520 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); 802e4c2: 8911 ldrh r1, [r2, #8] 802e4c4: 2003 movs r0, #3 802e4c6: 2200 movs r2, #0 802e4c8: f001 fced bl 802fea6 if(q != NULL) { 802e4cc: 4606 mov r6, r0 802e4ce: b338 cbz r0, 802e520 if (pbuf_copy(q, p) != ERR_OK) { 802e4d0: 4621 mov r1, r4 802e4d2: f001 fd9f bl 8030014 802e4d6: b1e0 cbz r0, 802e512 if (q != NULL) { u16_t len; buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); if (buf == NULL) { pbuf_free(q); 802e4d8: 4630 mov r0, r6 802e4da: f001 fc97 bl 802fe0c return 0; 802e4de: e01f b.n 802e520 } buf->p = q; buf->ptr = q; ip_addr_copy(buf->addr, *ip_current_src_addr()); 802e4e0: 4b10 ldr r3, [pc, #64] ; (802e524 ) if (buf == NULL) { pbuf_free(q); return 0; } buf->p = q; 802e4e2: 6026 str r6, [r4, #0] buf->ptr = q; ip_addr_copy(buf->addr, *ip_current_src_addr()); 802e4e4: 681b ldr r3, [r3, #0] pbuf_free(q); return 0; } buf->p = q; buf->ptr = q; 802e4e6: 6066 str r6, [r4, #4] ip_addr_copy(buf->addr, *ip_current_src_addr()); 802e4e8: 60a3 str r3, [r4, #8] buf->port = pcb->protocol; 802e4ea: 7c3b ldrb r3, [r7, #16] len = q->tot_len; 802e4ec: 8936 ldrh r6, [r6, #8] } buf->p = q; buf->ptr = q; ip_addr_copy(buf->addr, *ip_current_src_addr()); buf->port = pcb->protocol; 802e4ee: 81a3 strh r3, [r4, #12] len = q->tot_len; if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) { 802e4f0: 4621 mov r1, r4 802e4f2: f105 0010 add.w r0, r5, #16 802e4f6: f009 f9ef bl 80378d8 802e4fa: 4601 mov r1, r0 802e4fc: b118 cbz r0, 802e506 netbuf_delete(buf); 802e4fe: 4620 mov r0, r4 802e500: f000 fa6f bl 802e9e2 return 0; 802e504: e00c b.n 802e520 } 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); 802e506: 6aab ldr r3, [r5, #40] ; 0x28 802e508: b153 cbz r3, 802e520 802e50a: 4628 mov r0, r5 802e50c: 4632 mov r2, r6 802e50e: 4798 blx r3 802e510: e006 b.n 802e520 } } if (q != NULL) { u16_t len; buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); 802e512: 2005 movs r0, #5 802e514: f001 fb5a bl 802fbcc if (buf == NULL) { 802e518: 4604 mov r4, r0 802e51a: 2800 cmp r0, #0 802e51c: d1e0 bne.n 802e4e0 802e51e: e7db b.n 802e4d8 } } } return 0; /* do not eat the packet */ } 802e520: 2000 movs r0, #0 802e522: bdf8 pop {r3, r4, r5, r6, r7, pc} 802e524: 2000f6dc .word 0x2000f6dc 0802e528 : * * @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) { 802e528: b5f8 push {r3, r4, r5, r6, r7, lr} 802e52a: 4614 mov r4, r2 802e52c: 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) { 802e52e: 4605 mov r5, r0 802e530: b340 cbz r0, 802e584 return ERR_VAL; } if (!sys_mbox_valid(&conn->recvmbox)) { 802e532: 6906 ldr r6, [r0, #16] 802e534: b956 cbnz r6, 802e54c /* recvmbox already deleted */ if (p != NULL) { 802e536: b90a cbnz r2, 802e53c tcp_recved(pcb, p->tot_len); pbuf_free(p); } return ERR_OK; 802e538: 2000 movs r0, #0 802e53a: e026 b.n 802e58a return ERR_VAL; } if (!sys_mbox_valid(&conn->recvmbox)) { /* recvmbox already deleted */ if (p != NULL) { tcp_recved(pcb, p->tot_len); 802e53c: 4608 mov r0, r1 802e53e: 8911 ldrh r1, [r2, #8] 802e540: f001 ff78 bl 8030434 pbuf_free(p); 802e544: 4620 mov r0, r4 802e546: f001 fc61 bl 802fe0c 802e54a: e7f5 b.n 802e538 /* 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); 802e54c: f009 fabc bl 8037ac8 802e550: f995 3008 ldrsb.w r3, [r5, #8] 802e554: 3309 adds r3, #9 802e556: bfa8 it ge 802e558: 722f strbge r7, [r5, #8] 802e55a: f009 fabf bl 8037adc if (p != NULL) { 802e55e: b10c cbz r4, 802e564 len = p->tot_len; 802e560: 8926 ldrh r6, [r4, #8] 802e562: e000 b.n 802e566 } else { len = 0; 802e564: 4626 mov r6, r4 } if (sys_mbox_trypost(&conn->recvmbox, p) != ERR_OK) { 802e566: 4621 mov r1, r4 802e568: f105 0010 add.w r0, r5, #16 802e56c: f009 f9b4 bl 80378d8 802e570: 4604 mov r4, r0 802e572: b948 cbnz r0, 802e588 } 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); 802e574: 6aab ldr r3, [r5, #40] ; 0x28 802e576: 2b00 cmp r3, #0 802e578: d0de beq.n 802e538 802e57a: 4628 mov r0, r5 802e57c: 4621 mov r1, r4 802e57e: 4632 mov r2, r6 802e580: 4798 blx r3 802e582: e7d9 b.n 802e538 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; 802e584: 20fa movs r0, #250 ; 0xfa 802e586: e000 b.n 802e58a 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; 802e588: 20ff movs r0, #255 ; 0xff /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); } return ERR_OK; } 802e58a: b240 sxtb r0, r0 802e58c: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802e58e : * * @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) { 802e58e: 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) { 802e590: 7843 ldrb r3, [r0, #1] 802e592: 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) { 802e594: 4604 mov r4, r0 802e596: 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) { 802e598: d102 bne.n 802e5a0 do_writemore(conn); 802e59a: f7ff feb2 bl 802e302 802e59e: e003 b.n 802e5a8 } else if (conn->state == NETCONN_CLOSE) { 802e5a0: 2b04 cmp r3, #4 802e5a2: d101 bne.n 802e5a8 do_close_internal(conn); 802e5a4: f7ff fdc0 bl 802e128 } 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) && 802e5a8: 6863 ldr r3, [r4, #4] 802e5aa: b19b cbz r3, 802e5d4 802e5ac: f8b3 1066 ldrh.w r1, [r3, #102] ; 0x66 802e5b0: f243 3254 movw r2, #13140 ; 0x3354 802e5b4: 4291 cmp r1, r2 802e5b6: d90d bls.n 802e5d4 802e5b8: f8b3 3068 ldrh.w r3, [r3, #104] ; 0x68 802e5bc: 2b23 cmp r3, #35 ; 0x23 802e5be: d809 bhi.n 802e5d4 (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) { conn->flags &= ~NETCONN_FLAG_CHECK_WRITESPACE; 802e5c0: 7f23 ldrb r3, [r4, #28] 802e5c2: f023 0310 bic.w r3, r3, #16 802e5c6: 7723 strb r3, [r4, #28] API_EVENT(conn, NETCONN_EVT_SENDPLUS, len); 802e5c8: 6aa3 ldr r3, [r4, #40] ; 0x28 802e5ca: b11b cbz r3, 802e5d4 802e5cc: 4620 mov r0, r4 802e5ce: 2102 movs r1, #2 802e5d0: 462a mov r2, r5 802e5d2: 4798 blx r3 } } return ERR_OK; } 802e5d4: 2000 movs r0, #0 802e5d6: bd38 pop {r3, r4, r5, pc} 0802e5d8 : * * @param msg the api_msg_msg describing the connection type */ void do_newconn(struct api_msg_msg *msg) { 802e5d8: b538 push {r3, r4, r5, lr} msg->err = ERR_OK; 802e5da: 2300 movs r3, #0 if(msg->conn->pcb.tcp == NULL) { 802e5dc: 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; 802e5de: 7103 strb r3, [r0, #4] if(msg->conn->pcb.tcp == NULL) { 802e5e0: 686b ldr r3, [r5, #4] * * @param msg the api_msg_msg describing the connection type */ void do_newconn(struct api_msg_msg *msg) { 802e5e2: 4604 mov r4, r0 msg->err = ERR_OK; if(msg->conn->pcb.tcp == NULL) { 802e5e4: 2b00 cmp r3, #0 802e5e6: d134 bne.n 802e652 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)) { 802e5e8: 782b ldrb r3, [r5, #0] 802e5ea: f003 03f0 and.w r3, r3, #240 ; 0xf0 802e5ee: 2b20 cmp r3, #32 802e5f0: d010 beq.n 802e614 802e5f2: 2b40 cmp r3, #64 ; 0x40 802e5f4: d002 beq.n 802e5fc 802e5f6: 2b10 cmp r3, #16 802e5f8: d129 bne.n 802e64e 802e5fa: e01d b.n 802e638 #if LWIP_RAW case NETCONN_RAW: msg->conn->pcb.raw = raw_new(msg->msg.n.proto); 802e5fc: 7a00 ldrb r0, [r0, #8] 802e5fe: f001 fe31 bl 8030264 802e602: 6068 str r0, [r5, #4] if(msg->conn->pcb.raw == NULL) { 802e604: 6822 ldr r2, [r4, #0] 802e606: 6850 ldr r0, [r2, #4] 802e608: b900 cbnz r0, 802e60c 802e60a: e01b b.n 802e644 msg->err = ERR_MEM; break; } raw_recv(msg->conn->pcb.raw, recv_raw, msg->conn); 802e60c: 4914 ldr r1, [pc, #80] ; (802e660 ) 802e60e: f001 fdc7 bl 80301a0 802e612: e01e b.n 802e652 break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: msg->conn->pcb.udp = udp_new(); 802e614: f004 fa84 bl 8032b20 802e618: 6068 str r0, [r5, #4] if(msg->conn->pcb.udp == NULL) { 802e61a: 6822 ldr r2, [r4, #0] 802e61c: 6853 ldr r3, [r2, #4] 802e61e: b903 cbnz r3, 802e622 802e620: e010 b.n 802e644 #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) { 802e622: 7812 ldrb r2, [r2, #0] 802e624: 2a22 cmp r2, #34 ; 0x22 802e626: d101 bne.n 802e62c udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_NOCHKSUM); 802e628: 2201 movs r2, #1 802e62a: 741a strb r2, [r3, #16] } udp_recv(msg->conn->pcb.udp, recv_udp, msg->conn); 802e62c: 6822 ldr r2, [r4, #0] 802e62e: 490d ldr r1, [pc, #52] ; (802e664 ) 802e630: 6850 ldr r0, [r2, #4] 802e632: f004 fa55 bl 8032ae0 802e636: e00c b.n 802e652 break; #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: msg->conn->pcb.tcp = tcp_new(); 802e638: f002 fb20 bl 8030c7c 802e63c: 6068 str r0, [r5, #4] if(msg->conn->pcb.tcp == NULL) { 802e63e: 6820 ldr r0, [r4, #0] 802e640: 6843 ldr r3, [r0, #4] 802e642: b90b cbnz r3, 802e648 msg->err = ERR_MEM; 802e644: 23ff movs r3, #255 ; 0xff 802e646: e003 b.n 802e650 break; } setup_tcp(msg->conn); 802e648: f7ff fd4c bl 802e0e4 802e64c: e001 b.n 802e652 break; #endif /* LWIP_TCP */ default: /* Unsupported netconn type, e.g. protocol disabled */ msg->err = ERR_VAL; 802e64e: 23fa movs r3, #250 ; 0xfa 802e650: 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); 802e652: 6820 ldr r0, [r4, #0] 802e654: 300c adds r0, #12 } 802e656: 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); 802e65a: f009 ba05 b.w 8037a68 802e65e: bf00 nop 802e660: 0802e4b1 .word 0x0802e4b1 802e664: 0802e44f .word 0x0802e44f 0802e668 : * @return a newly allocated struct netconn or * NULL on memory error */ struct netconn* netconn_alloc(enum netconn_type t, netconn_callback callback) { 802e668: b5f8 push {r3, r4, r5, r6, r7, lr} 802e66a: 4605 mov r5, r0 struct netconn *conn; int size; conn = (struct netconn *)memp_malloc(MEMP_NETCONN); 802e66c: 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) { 802e66e: 460f mov r7, r1 struct netconn *conn; int size; conn = (struct netconn *)memp_malloc(MEMP_NETCONN); 802e670: f001 faac bl 802fbcc if (conn == NULL) { 802e674: 4604 mov r4, r0 802e676: b378 cbz r0, 802e6d8 return NULL; } conn->last_err = ERR_OK; 802e678: 2300 movs r3, #0 802e67a: 7203 strb r3, [r0, #8] conn->type = t; 802e67c: 7005 strb r5, [r0, #0] conn->pcb.tcp = NULL; 802e67e: 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)) { 802e680: f005 00f0 and.w r0, r5, #240 ; 0xf0 802e684: 2820 cmp r0, #32 802e686: d008 beq.n 802e69a 802e688: 2840 cmp r0, #64 ; 0x40 802e68a: d002 beq.n 802e692 802e68c: 2810 cmp r0, #16 802e68e: d11e bne.n 802e6ce 802e690: e001 b.n 802e696 #if LWIP_RAW case NETCONN_RAW: size = DEFAULT_RAW_RECVMBOX_SIZE; 802e692: 250a movs r5, #10 802e694: e002 b.n 802e69c size = DEFAULT_UDP_RECVMBOX_SIZE; break; #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: size = DEFAULT_TCP_RECVMBOX_SIZE; 802e696: 2546 movs r5, #70 ; 0x46 break; 802e698: e000 b.n 802e69c size = DEFAULT_RAW_RECVMBOX_SIZE; break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: size = DEFAULT_UDP_RECVMBOX_SIZE; 802e69a: 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) { 802e69c: f104 060c add.w r6, r4, #12 802e6a0: 4630 mov r0, r6 802e6a2: 2100 movs r1, #0 802e6a4: f009 f980 bl 80379a8 802e6a8: b988 cbnz r0, 802e6ce goto free_and_return; } if (sys_mbox_new(&conn->recvmbox, size) != ERR_OK) { 802e6aa: f104 0010 add.w r0, r4, #16 802e6ae: 4629 mov r1, r5 802e6b0: f009 f8e6 bl 8037880 802e6b4: b118 cbz r0, 802e6be sys_sem_free(&conn->op_completed); 802e6b6: 4630 mov r0, r6 802e6b8: f009 f9e8 bl 8037a8c goto free_and_return; 802e6bc: e007 b.n 802e6ce } #if LWIP_TCP sys_mbox_set_invalid(&conn->acceptmbox); 802e6be: 6160 str r0, [r4, #20] #endif conn->state = NETCONN_NONE; 802e6c0: 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; 802e6c2: 62a7 str r7, [r4, #40] ; 0x28 #if LWIP_TCP conn->current_msg = NULL; 802e6c4: 6260 str r0, [r4, #36] ; 0x24 conn->write_offset = 0; 802e6c6: 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; 802e6c8: 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; 802e6ca: 7720 strb r0, [r4, #28] return conn; 802e6cc: e004 b.n 802e6d8 free_and_return: memp_free(MEMP_NETCONN, conn); 802e6ce: 4621 mov r1, r4 802e6d0: 2006 movs r0, #6 802e6d2: f001 fa91 bl 802fbf8 return NULL; 802e6d6: 2400 movs r4, #0 } 802e6d8: 4620 mov r0, r4 802e6da: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802e6dc : * * @param conn the netconn to free */ void netconn_free(struct netconn *conn) { 802e6dc: b510 push {r4, lr} 802e6de: 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); 802e6e0: 300c adds r0, #12 802e6e2: f009 f9d3 bl 8037a8c sys_sem_set_invalid(&conn->op_completed); 802e6e6: 2300 movs r3, #0 memp_free(MEMP_NETCONN, conn); 802e6e8: 2006 movs r0, #6 802e6ea: 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); 802e6ec: 60e3 str r3, [r4, #12] memp_free(MEMP_NETCONN, conn); } 802e6ee: 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); 802e6f2: f001 ba81 b.w 802fbf8 0802e6f6 : #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)) { 802e6f6: 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) { 802e6f8: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} 802e6fa: 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)) { 802e6fc: b993 cbnz r3, 802e724 802e6fe: e01e b.n 802e73e while (sys_mbox_tryfetch(&conn->recvmbox, &mem) != SYS_MBOX_EMPTY) { #if LWIP_TCP if (conn->type == NETCONN_TCP) { 802e700: 7823 ldrb r3, [r4, #0] 802e702: 2b10 cmp r3, #16 802e704: d10a bne.n 802e71c if(mem != NULL) { 802e706: 9d01 ldr r5, [sp, #4] 802e708: b175 cbz r5, 802e728 p = (struct pbuf*)mem; /* pcb might be set to NULL already by err_tcp() */ if (conn->pcb.tcp != NULL) { 802e70a: 6860 ldr r0, [r4, #4] 802e70c: b110 cbz r0, 802e714 tcp_recved(conn->pcb.tcp, p->tot_len); 802e70e: 8929 ldrh r1, [r5, #8] 802e710: f001 fe90 bl 8030434 } pbuf_free(p); 802e714: 4628 mov r0, r5 802e716: f001 fb79 bl 802fe0c 802e71a: e005 b.n 802e728 } } else #endif /* LWIP_TCP */ { netbuf_delete((struct netbuf *)mem); 802e71c: 9801 ldr r0, [sp, #4] 802e71e: f000 f960 bl 802e9e2 802e722: e001 b.n 802e728 /* 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) { 802e724: f100 0610 add.w r6, r0, #16 802e728: 4630 mov r0, r6 802e72a: a901 add r1, sp, #4 802e72c: f009 f924 bl 8037978 802e730: 3001 adds r0, #1 802e732: d1e5 bne.n 802e700 #endif /* LWIP_TCP */ { netbuf_delete((struct netbuf *)mem); } } sys_mbox_free(&conn->recvmbox); 802e734: 4630 mov r0, r6 802e736: f009 f8b1 bl 803789c sys_mbox_set_invalid(&conn->recvmbox); 802e73a: 2300 movs r3, #0 802e73c: 6123 str r3, [r4, #16] } /* Delete and drain the acceptmbox. */ #if LWIP_TCP if (sys_mbox_valid(&conn->acceptmbox)) { 802e73e: 6963 ldr r3, [r4, #20] 802e740: b96b cbnz r3, 802e75e 802e742: e01a b.n 802e77a while (sys_mbox_tryfetch(&conn->acceptmbox, &mem) != SYS_MBOX_EMPTY) { struct netconn *newconn = (struct netconn *)mem; 802e744: 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); 802e746: 4628 mov r0, r5 802e748: f7ff ffd5 bl 802e6f6 if (newconn->pcb.tcp != NULL) { 802e74c: 6868 ldr r0, [r5, #4] 802e74e: b110 cbz r0, 802e756 tcp_abort(newconn->pcb.tcp); 802e750: f002 f88e bl 8030870 newconn->pcb.tcp = NULL; 802e754: 606f str r7, [r5, #4] } netconn_free(newconn); 802e756: 4628 mov r0, r5 802e758: f7ff ffc0 bl 802e6dc 802e75c: e002 b.n 802e764 } /* Delete and drain the acceptmbox. */ #if LWIP_TCP if (sys_mbox_valid(&conn->acceptmbox)) { while (sys_mbox_tryfetch(&conn->acceptmbox, &mem) != SYS_MBOX_EMPTY) { 802e75e: 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; 802e762: 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) { 802e764: 4630 mov r0, r6 802e766: a901 add r1, sp, #4 802e768: f009 f906 bl 8037978 802e76c: 3001 adds r0, #1 802e76e: d1e9 bne.n 802e744 tcp_abort(newconn->pcb.tcp); newconn->pcb.tcp = NULL; } netconn_free(newconn); } sys_mbox_free(&conn->acceptmbox); 802e770: 4630 mov r0, r6 802e772: f009 f893 bl 803789c sys_mbox_set_invalid(&conn->acceptmbox); 802e776: 2300 movs r3, #0 802e778: 6163 str r3, [r4, #20] } #endif /* LWIP_TCP */ } 802e77a: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 0802e77c : * * @param msg the api_msg_msg pointing to the connection */ void do_delconn(struct api_msg_msg *msg) { 802e77c: b510 push {r4, lr} 802e77e: 4604 mov r4, r0 /* @todo TCP: abort running write/connect? */ if ((msg->conn->state != NETCONN_NONE) && 802e780: 6800 ldr r0, [r0, #0] 802e782: 7843 ldrb r3, [r0, #1] 802e784: 2b03 cmp r3, #3 802e786: d805 bhi.n 802e794 802e788: f990 3001 ldrsb.w r3, [r0, #1] 802e78c: f04f 4230 mov.w r2, #2952790016 ; 0xb0000000 802e790: 409a lsls r2, r3 802e792: d402 bmi.n 802e79a (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; 802e794: 23fb movs r3, #251 ; 0xfb 802e796: 7123 strb r3, [r4, #4] 802e798: e030 b.n 802e7fc } 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); 802e79a: f7ff ffac bl 802e6f6 if (msg->conn->pcb.tcp != NULL) { 802e79e: 6823 ldr r3, [r4, #0] 802e7a0: 6858 ldr r0, [r3, #4] 802e7a2: b1f8 cbz r0, 802e7e4 switch (NETCONNTYPE_GROUP(msg->conn->type)) { 802e7a4: 781a ldrb r2, [r3, #0] 802e7a6: f002 02f0 and.w r2, r2, #240 ; 0xf0 802e7aa: 2a20 cmp r2, #32 802e7ac: d007 beq.n 802e7be 802e7ae: 2a40 cmp r2, #64 ; 0x40 802e7b0: d002 beq.n 802e7b8 802e7b2: 2a10 cmp r2, #16 802e7b4: d113 bne.n 802e7de 802e7b6: e008 b.n 802e7ca #if LWIP_RAW case NETCONN_RAW: raw_remove(msg->conn->pcb.raw); 802e7b8: f001 fd3e bl 8030238 break; 802e7bc: e00f b.n 802e7de #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: msg->conn->pcb.udp->recv_arg = NULL; 802e7be: 2200 movs r2, #0 802e7c0: 61c2 str r2, [r0, #28] udp_remove(msg->conn->pcb.udp); 802e7c2: 6858 ldr r0, [r3, #4] 802e7c4: f004 f990 bl 8032ae8 break; 802e7c8: e009 b.n 802e7de #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; 802e7ca: 2204 movs r2, #4 802e7cc: 705a strb r2, [r3, #1] msg->msg.sd.shut = NETCONN_SHUT_RDWR; msg->conn->current_msg = msg; do_close_internal(msg->conn); 802e7ce: 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; 802e7d0: 2203 movs r2, #3 802e7d2: 7222 strb r2, [r4, #8] msg->conn->current_msg = msg; 802e7d4: 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); } } 802e7d6: 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); 802e7da: f7ff bca5 b.w 802e128 return; #endif /* LWIP_TCP */ default: break; } msg->conn->pcb.tcp = NULL; 802e7de: 6823 ldr r3, [r4, #0] 802e7e0: 2200 movs r2, #0 802e7e2: 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); 802e7e4: 6820 ldr r0, [r4, #0] 802e7e6: 6a83 ldr r3, [r0, #40] ; 0x28 802e7e8: b113 cbz r3, 802e7f0 802e7ea: 2100 movs r1, #0 802e7ec: 460a mov r2, r1 802e7ee: 4798 blx r3 API_EVENT(msg->conn, NETCONN_EVT_SENDPLUS, 0); 802e7f0: 6820 ldr r0, [r4, #0] 802e7f2: 6a83 ldr r3, [r0, #40] ; 0x28 802e7f4: b113 cbz r3, 802e7fc 802e7f6: 2102 movs r1, #2 802e7f8: 2200 movs r2, #0 802e7fa: 4798 blx r3 } if (sys_sem_valid(&msg->conn->op_completed)) { 802e7fc: 6820 ldr r0, [r4, #0] 802e7fe: 68c3 ldr r3, [r0, #12] 802e800: b123 cbz r3, 802e80c sys_sem_signal(&msg->conn->op_completed); 802e802: 300c adds r0, #12 } } 802e804: 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); 802e808: f009 b92e b.w 8037a68 802e80c: bd10 pop {r4, pc} 0802e80e : * @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) { 802e80e: b510 push {r4, lr} if (ERR_IS_FATAL(msg->conn->last_err)) { 802e810: 6803 ldr r3, [r0, #0] 802e812: 7a1a ldrb r2, [r3, #8] 802e814: b251 sxtb r1, r2 802e816: 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) { 802e818: 4604 mov r4, r0 if (ERR_IS_FATAL(msg->conn->last_err)) { 802e81a: da01 bge.n 802e820 msg->err = msg->conn->last_err; 802e81c: 7102 strb r2, [r0, #4] 802e81e: e01b b.n 802e858 } else { msg->err = ERR_VAL; 802e820: 22fa movs r2, #250 ; 0xfa 802e822: 7102 strb r2, [r0, #4] if (msg->conn->pcb.tcp != NULL) { 802e824: 6858 ldr r0, [r3, #4] 802e826: b1b8 cbz r0, 802e858 switch (NETCONNTYPE_GROUP(msg->conn->type)) { 802e828: 781b ldrb r3, [r3, #0] 802e82a: f003 03f0 and.w r3, r3, #240 ; 0xf0 802e82e: 2b20 cmp r3, #32 802e830: d008 beq.n 802e844 802e832: 2b40 cmp r3, #64 ; 0x40 802e834: d002 beq.n 802e83c 802e836: 2b10 cmp r3, #16 802e838: d10e bne.n 802e858 802e83a: e008 b.n 802e84e #if LWIP_RAW case NETCONN_RAW: msg->err = raw_bind(msg->conn->pcb.raw, msg->msg.bc.ipaddr); 802e83c: 68a1 ldr r1, [r4, #8] 802e83e: f001 fca5 bl 803018c 802e842: e008 b.n 802e856 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); 802e844: 68a1 ldr r1, [r4, #8] 802e846: 89a2 ldrh r2, [r4, #12] 802e848: f004 f852 bl 80328f0 802e84c: e003 b.n 802e856 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); 802e84e: 68a1 ldr r1, [r4, #8] 802e850: 89a2 ldrh r2, [r4, #12] 802e852: f001 fd4f bl 80302f4 802e856: 7120 strb r0, [r4, #4] default: break; } } } TCPIP_APIMSG_ACK(msg); 802e858: 6820 ldr r0, [r4, #0] 802e85a: 300c adds r0, #12 } 802e85c: e8bd 4010 ldmia.w sp!, {r4, lr} default: break; } } } TCPIP_APIMSG_ACK(msg); 802e860: f009 b902 b.w 8037a68 0802e864 : * @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) { 802e864: b510 push {r4, lr} if (msg->conn->pcb.tcp == NULL) { 802e866: 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) { 802e868: 4604 mov r4, r0 if (msg->conn->pcb.tcp == NULL) { 802e86a: 6858 ldr r0, [r3, #4] 802e86c: b908 cbnz r0, 802e872 /* This may happen when calling netconn_connect() a second time */ msg->err = ERR_CLSD; 802e86e: 23f4 movs r3, #244 ; 0xf4 802e870: e037 b.n 802e8e2 } else { switch (NETCONNTYPE_GROUP(msg->conn->type)) { 802e872: 781a ldrb r2, [r3, #0] 802e874: f002 02f0 and.w r2, r2, #240 ; 0xf0 802e878: 2a20 cmp r2, #32 802e87a: d008 beq.n 802e88e 802e87c: 2a40 cmp r2, #64 ; 0x40 802e87e: d002 beq.n 802e886 802e880: 2a10 cmp r2, #16 802e882: d12d bne.n 802e8e0 802e884: e009 b.n 802e89a #if LWIP_RAW case NETCONN_RAW: msg->err = raw_connect(msg->conn->pcb.raw, msg->msg.bc.ipaddr); 802e886: 68a1 ldr r1, [r4, #8] 802e888: f001 fc85 bl 8030196 802e88c: e003 b.n 802e896 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); 802e88e: 68a1 ldr r1, [r4, #8] 802e890: 89a2 ldrh r2, [r4, #12] 802e892: f004 f8f7 bl 8032a84 802e896: 7120 strb r0, [r4, #4] break; 802e898: e024 b.n 802e8e4 #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: /* Prevent connect while doing any other action. */ if (msg->conn->state != NETCONN_NONE) { 802e89a: 785a ldrb r2, [r3, #1] 802e89c: b10a cbz r2, 802e8a2 msg->err = ERR_ISCONN; 802e89e: 23f7 movs r3, #247 ; 0xf7 802e8a0: e01f b.n 802e8e2 } else { setup_tcp(msg->conn); 802e8a2: 4618 mov r0, r3 802e8a4: f7ff fc1e bl 802e0e4 msg->err = tcp_connect(msg->conn->pcb.tcp, msg->msg.bc.ipaddr, 802e8a8: 6823 ldr r3, [r4, #0] 802e8aa: 68a1 ldr r1, [r4, #8] 802e8ac: 6858 ldr r0, [r3, #4] 802e8ae: 89a2 ldrh r2, [r4, #12] 802e8b0: 4b0f ldr r3, [pc, #60] ; (802e8f0 ) 802e8b2: f002 f9f5 bl 8030ca0 802e8b6: 7120 strb r0, [r4, #4] msg->msg.bc.port, do_connected); if (msg->err == ERR_OK) { 802e8b8: b9a0 cbnz r0, 802e8e4 u8_t non_blocking = netconn_is_nonblocking(msg->conn); 802e8ba: 6823 ldr r3, [r4, #0] 802e8bc: 7f1a ldrb r2, [r3, #28] msg->conn->state = NETCONN_CONNECT; 802e8be: 2103 movs r1, #3 802e8c0: 7059 strb r1, [r3, #1] SET_NONBLOCKING_CONNECT(msg->conn, non_blocking); 802e8c2: f002 0102 and.w r1, r2, #2 802e8c6: b2c9 uxtb r1, r1 802e8c8: b121 cbz r1, 802e8d4 802e8ca: f042 0204 orr.w r2, r2, #4 802e8ce: 771a strb r2, [r3, #28] if (non_blocking) { msg->err = ERR_INPROGRESS; 802e8d0: 23fb movs r3, #251 ; 0xfb 802e8d2: e006 b.n 802e8e2 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); 802e8d4: f022 0204 bic.w r2, r2, #4 802e8d8: 771a strb r2, [r3, #28] if (non_blocking) { msg->err = ERR_INPROGRESS; } else { msg->conn->current_msg = msg; 802e8da: 6823 ldr r3, [r4, #0] 802e8dc: 625c str r4, [r3, #36] ; 0x24 /* sys_sem_signal() is called from do_connected (or err_tcp()), * when the connection is established! */ return; 802e8de: bd10 pop {r4, pc} } } break; #endif /* LWIP_TCP */ default: LWIP_ERROR("Invalid netconn type", 0, do{ msg->err = ERR_VAL; }while(0)); 802e8e0: 23fa movs r3, #250 ; 0xfa 802e8e2: 7123 strb r3, [r4, #4] break; } } sys_sem_signal(&msg->conn->op_completed); 802e8e4: 6820 ldr r0, [r4, #0] 802e8e6: 300c adds r0, #12 } 802e8e8: 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); 802e8ec: f009 b8bc b.w 8037a68 802e8f0: 0802e211 .word 0x0802e211 0802e8f4 : */ void do_disconnect(struct api_msg_msg *msg) { #if LWIP_UDP if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_UDP) { 802e8f4: 6803 ldr r3, [r0, #0] 802e8f6: 781a ldrb r2, [r3, #0] 802e8f8: f002 02f0 and.w r2, r2, #240 ; 0xf0 802e8fc: 2a20 cmp r2, #32 * * @param msg the api_msg_msg pointing to the connection to disconnect */ void do_disconnect(struct api_msg_msg *msg) { 802e8fe: b510 push {r4, lr} 802e900: 4604 mov r4, r0 #if LWIP_UDP if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_UDP) { 802e902: d104 bne.n 802e90e udp_disconnect(msg->conn->pcb.udp); 802e904: 6858 ldr r0, [r3, #4] 802e906: f004 f8e3 bl 8032ad0 msg->err = ERR_OK; 802e90a: 2300 movs r3, #0 802e90c: e000 b.n 802e910 } else #endif /* LWIP_UDP */ { msg->err = ERR_VAL; 802e90e: 23fa movs r3, #250 ; 0xfa } TCPIP_APIMSG_ACK(msg); 802e910: 6820 ldr r0, [r4, #0] udp_disconnect(msg->conn->pcb.udp); msg->err = ERR_OK; } else #endif /* LWIP_UDP */ { msg->err = ERR_VAL; 802e912: 7123 strb r3, [r4, #4] } TCPIP_APIMSG_ACK(msg); 802e914: 300c adds r0, #12 } 802e916: e8bd 4010 ldmia.w sp!, {r4, lr} } else #endif /* LWIP_UDP */ { msg->err = ERR_VAL; } TCPIP_APIMSG_ACK(msg); 802e91a: f009 b8a5 b.w 8037a68 0802e91e : * * @param msg the api_msg_msg pointing to the connection */ void do_send(struct api_msg_msg *msg) { 802e91e: b510 push {r4, lr} if (ERR_IS_FATAL(msg->conn->last_err)) { 802e920: 6803 ldr r3, [r0, #0] 802e922: 7a1a ldrb r2, [r3, #8] 802e924: b251 sxtb r1, r2 802e926: 3109 adds r1, #9 * * @param msg the api_msg_msg pointing to the connection */ void do_send(struct api_msg_msg *msg) { 802e928: 4604 mov r4, r0 if (ERR_IS_FATAL(msg->conn->last_err)) { 802e92a: da01 bge.n 802e930 msg->err = msg->conn->last_err; 802e92c: 7102 strb r2, [r0, #4] 802e92e: e027 b.n 802e980 } else { msg->err = ERR_CONN; 802e930: 22f3 movs r2, #243 ; 0xf3 802e932: 7102 strb r2, [r0, #4] if (msg->conn->pcb.tcp != NULL) { 802e934: 6858 ldr r0, [r3, #4] 802e936: b318 cbz r0, 802e980 switch (NETCONNTYPE_GROUP(msg->conn->type)) { 802e938: 781b ldrb r3, [r3, #0] 802e93a: f003 03f0 and.w r3, r3, #240 ; 0xf0 802e93e: 2b20 cmp r3, #32 802e940: d00f beq.n 802e962 802e942: 2b40 cmp r3, #64 ; 0x40 802e944: d11c bne.n 802e980 #if LWIP_RAW case NETCONN_RAW: if (ip_addr_isany(&msg->msg.b->addr)) { 802e946: 68a3 ldr r3, [r4, #8] 802e948: f113 0208 adds.w r2, r3, #8 802e94c: d001 beq.n 802e952 802e94e: 6899 ldr r1, [r3, #8] 802e950: b919 cbnz r1, 802e95a msg->err = raw_send(msg->conn->pcb.raw, msg->msg.b->p); 802e952: 6819 ldr r1, [r3, #0] 802e954: f001 fc6c bl 8030230 802e958: e011 b.n 802e97e } else { msg->err = raw_sendto(msg->conn->pcb.raw, msg->msg.b->p, &msg->msg.b->addr); 802e95a: 6819 ldr r1, [r3, #0] 802e95c: f001 fc23 bl 80301a6 802e960: e00d b.n 802e97e 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)) { 802e962: 68a3 ldr r3, [r4, #8] 802e964: f113 0208 adds.w r2, r3, #8 802e968: d001 beq.n 802e96e 802e96a: 6899 ldr r1, [r3, #8] 802e96c: b919 cbnz r1, 802e976 msg->err = udp_send(msg->conn->pcb.udp, msg->msg.b->p); 802e96e: 6819 ldr r1, [r3, #0] 802e970: f004 f883 bl 8032a7a 802e974: e003 b.n 802e97e } else { msg->err = udp_sendto(msg->conn->pcb.udp, msg->msg.b->p, &msg->msg.b->addr, msg->msg.b->port); 802e976: 6819 ldr r1, [r3, #0] 802e978: 899b ldrh r3, [r3, #12] 802e97a: f004 f86a bl 8032a52 802e97e: 7120 strb r0, [r4, #4] default: break; } } } TCPIP_APIMSG_ACK(msg); 802e980: 6820 ldr r0, [r4, #0] 802e982: 300c adds r0, #12 } 802e984: e8bd 4010 ldmia.w sp!, {r4, lr} default: break; } } } TCPIP_APIMSG_ACK(msg); 802e988: f009 b86e b.w 8037a68 0802e98c : * * @param msg the api_msg_msg pointing to the connection */ void do_recv(struct api_msg_msg *msg) { 802e98c: b5f8 push {r3, r4, r5, r6, r7, lr} msg->err = ERR_OK; 802e98e: 2300 movs r3, #0 802e990: 7103 strb r3, [r0, #4] if (msg->conn->pcb.tcp != NULL) { 802e992: 6803 ldr r3, [r0, #0] 802e994: 685a ldr r2, [r3, #4] * * @param msg the api_msg_msg pointing to the connection */ void do_recv(struct api_msg_msg *msg) { 802e996: 4604 mov r4, r0 msg->err = ERR_OK; if (msg->conn->pcb.tcp != NULL) { 802e998: b92a cbnz r2, 802e9a6 remaining -= recved; }while(remaining != 0); } } } TCPIP_APIMSG_ACK(msg); 802e99a: 6820 ldr r0, [r4, #0] 802e99c: 300c adds r0, #12 } 802e99e: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr} remaining -= recved; }while(remaining != 0); } } } TCPIP_APIMSG_ACK(msg); 802e9a2: f009 b861 b.w 8037a68 void do_recv(struct api_msg_msg *msg) { msg->err = ERR_OK; if (msg->conn->pcb.tcp != NULL) { if (msg->conn->type == NETCONN_TCP) { 802e9a6: 781b ldrb r3, [r3, #0] 802e9a8: 2b10 cmp r3, #16 802e9aa: d1f6 bne.n 802e99a 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; 802e9ac: 6885 ldr r5, [r0, #8] do { u16_t recved = (remaining > 0xffff) ? 0xffff : (u16_t)remaining; 802e9ae: f64f 77ff movw r7, #65535 ; 0xffff 802e9b2: 42bd cmp r5, r7 tcp_recved(msg->conn->pcb.tcp, recved); 802e9b4: 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; 802e9b6: bf94 ite ls 802e9b8: b2ae uxthls r6, r5 802e9ba: f64f 76ff movwhi r6, #65535 ; 0xffff tcp_recved(msg->conn->pcb.tcp, recved); 802e9be: 6858 ldr r0, [r3, #4] 802e9c0: 4631 mov r1, r6 802e9c2: f001 fd37 bl 8030434 remaining -= recved; }while(remaining != 0); 802e9c6: 1bad subs r5, r5, r6 802e9c8: d1f3 bne.n 802e9b2 802e9ca: e7e6 b.n 802e99a 0802e9cc : * @return a pointer to a new netbuf * NULL on lack of memory */ struct netbuf *netbuf_new(void) { 802e9cc: b508 push {r3, lr} struct netbuf *buf; buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); 802e9ce: 2005 movs r0, #5 802e9d0: f001 f8fc bl 802fbcc if (buf != NULL) { 802e9d4: b120 cbz r0, 802e9e0 buf->p = NULL; 802e9d6: 2300 movs r3, #0 802e9d8: 6003 str r3, [r0, #0] buf->ptr = NULL; 802e9da: 6043 str r3, [r0, #4] ip_addr_set_any(&buf->addr); 802e9dc: 6083 str r3, [r0, #8] buf->port = 0; 802e9de: 8183 strh r3, [r0, #12] #endif /* LWIP_NETBUF_RECVINFO || LWIP_CHECKSUM_ON_COPY */ return buf; } else { return NULL; } } 802e9e0: bd08 pop {r3, pc} 0802e9e2 : * * @param buf pointer to a netbuf allocated by netbuf_new() */ void netbuf_delete(struct netbuf *buf) { 802e9e2: b510 push {r4, lr} if (buf != NULL) { 802e9e4: 4604 mov r4, r0 802e9e6: b160 cbz r0, 802ea02 if (buf->p != NULL) { 802e9e8: 6800 ldr r0, [r0, #0] 802e9ea: b120 cbz r0, 802e9f6 pbuf_free(buf->p); 802e9ec: f001 fa0e bl 802fe0c buf->p = buf->ptr = NULL; 802e9f0: 2300 movs r3, #0 802e9f2: 6063 str r3, [r4, #4] 802e9f4: 6023 str r3, [r4, #0] } memp_free(MEMP_NETBUF, buf); 802e9f6: 2005 movs r0, #5 802e9f8: 4621 mov r1, r4 } } 802e9fa: 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); 802e9fe: f001 b8fb b.w 802fbf8 802ea02: bd10 pop {r4, pc} 0802ea04 : * @return pointer to the allocated memory * NULL if no memory could be allocated */ void * netbuf_alloc(struct netbuf *buf, u16_t size) { 802ea04: b538 push {r3, r4, r5, lr} 802ea06: 460d mov r5, r1 LWIP_ERROR("netbuf_alloc: invalid buf", (buf != NULL), return NULL;); 802ea08: 4604 mov r4, r0 802ea0a: b908 cbnz r0, 802ea10 802ea0c: 2000 movs r0, #0 802ea0e: bd38 pop {r3, r4, r5, pc} /* Deallocate any previously allocated memory. */ if (buf->p != NULL) { 802ea10: 6800 ldr r0, [r0, #0] 802ea12: b108 cbz r0, 802ea18 pbuf_free(buf->p); 802ea14: f001 f9fa bl 802fe0c } buf->p = pbuf_alloc(PBUF_TRANSPORT, size, PBUF_RAM); 802ea18: 2000 movs r0, #0 802ea1a: 4629 mov r1, r5 802ea1c: 4602 mov r2, r0 802ea1e: f001 fa42 bl 802fea6 802ea22: 6020 str r0, [r4, #0] if (buf->p == NULL) { 802ea24: 2800 cmp r0, #0 802ea26: d0f1 beq.n 802ea0c return NULL; } LWIP_ASSERT("check that first pbuf can hold size", (buf->p->len >= size)); buf->ptr = buf->p; 802ea28: 6060 str r0, [r4, #4] return buf->p->payload; 802ea2a: 6840 ldr r0, [r0, #4] } 802ea2c: bd38 pop {r3, r4, r5, pc} 0802ea2e : * 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;); 802ea2e: b150 cbz r0, 802ea46 LWIP_ERROR("netbuf_data: invalid dataptr", (dataptr != NULL), return ERR_ARG;); 802ea30: b149 cbz r1, 802ea46 LWIP_ERROR("netbuf_data: invalid len", (len != NULL), return ERR_ARG;); 802ea32: b142 cbz r2, 802ea46 if (buf->ptr == NULL) { 802ea34: 6843 ldr r3, [r0, #4] 802ea36: b143 cbz r3, 802ea4a return ERR_BUF; } *dataptr = buf->ptr->payload; 802ea38: 685b ldr r3, [r3, #4] 802ea3a: 600b str r3, [r1, #0] *len = buf->ptr->len; 802ea3c: 6843 ldr r3, [r0, #4] 802ea3e: 895b ldrh r3, [r3, #10] return ERR_OK; 802ea40: 2000 movs r0, #0 if (buf->ptr == NULL) { return ERR_BUF; } *dataptr = buf->ptr->payload; *len = buf->ptr->len; 802ea42: 8013 strh r3, [r2, #0] return ERR_OK; 802ea44: e002 b.n 802ea4c * 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;); 802ea46: 20f2 movs r0, #242 ; 0xf2 802ea48: e000 b.n 802ea4c 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; 802ea4a: 20fe movs r0, #254 ; 0xfe } *dataptr = buf->ptr->payload; *len = buf->ptr->len; return ERR_OK; } 802ea4c: b240 sxtb r0, r0 802ea4e: 4770 bx lr 0802ea50 : tcpip_thread(void *arg) { struct tcpip_msg *msg; LWIP_UNUSED_ARG(arg); if (tcpip_init_done != NULL) { 802ea50: 4b1e ldr r3, [pc, #120] ; (802eacc ) 802ea52: 681b ldr r3, [r3, #0] * * @param arg unused argument */ static void tcpip_thread(void *arg) { 802ea54: b507 push {r0, r1, r2, lr} struct tcpip_msg *msg; LWIP_UNUSED_ARG(arg); if (tcpip_init_done != NULL) { 802ea56: b113 cbz r3, 802ea5e tcpip_init_done(tcpip_init_done_arg); 802ea58: 4a1d ldr r2, [pc, #116] ; (802ead0 ) 802ea5a: 6810 ldr r0, [r2, #0] 802ea5c: 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); 802ea5e: 481d ldr r0, [pc, #116] ; (802ead4 ) 802ea60: a901 add r1, sp, #4 802ea62: f003 fe49 bl 80326f8 LOCK_TCPIP_CORE(); switch (msg->type) { 802ea66: 9b01 ldr r3, [sp, #4] 802ea68: 781a ldrb r2, [r3, #0] 802ea6a: 2a05 cmp r2, #5 802ea6c: d8f7 bhi.n 802ea5e 802ea6e: e8df f002 tbb [pc, r2] 802ea72: 0703 .short 0x0703 802ea74: 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)); 802ea78: 6898 ldr r0, [r3, #8] 802ea7a: 6803 ldr r3, [r0, #0] 802ea7c: 3004 adds r0, #4 802ea7e: e7ed b.n 802ea5c #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)) { 802ea80: 68d9 ldr r1, [r3, #12] ethernet_input(msg->msg.inp.p, msg->msg.inp.netif); 802ea82: 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)) { 802ea84: f891 202d ldrb.w r2, [r1, #45] ; 0x2d 802ea88: f012 0f60 tst.w r2, #96 ; 0x60 802ea8c: d002 beq.n 802ea94 ethernet_input(msg->msg.inp.p, msg->msg.inp.netif); 802ea8e: f008 fcb7 bl 8037400 802ea92: e001 b.n 802ea98 } else #endif /* LWIP_ETHERNET */ { ip_input(msg->msg.inp.p, msg->msg.inp.netif); 802ea94: f004 fa8a bl 8032fac } memp_free(MEMP_TCPIP_MSG_INPKT, msg); 802ea98: 2008 movs r0, #8 802ea9a: e00e b.n 802eaba #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); 802ea9c: f103 0008 add.w r0, r3, #8 802eaa0: c807 ldmia r0, {r0, r1, r2} 802eaa2: f003 fd5b bl 803255c 802eaa6: e007 b.n 802eab8 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); 802eaa8: 68d8 ldr r0, [r3, #12] 802eaaa: 6919 ldr r1, [r3, #16] 802eaac: f003 fe00 bl 80326b0 802eab0: e002 b.n 802eab8 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); 802eab2: 689a ldr r2, [r3, #8] 802eab4: 68d8 ldr r0, [r3, #12] 802eab6: 4790 blx r2 memp_free(MEMP_TCPIP_MSG_API, msg); 802eab8: 2007 movs r0, #7 802eaba: 9901 ldr r1, [sp, #4] 802eabc: f001 f89c bl 802fbf8 break; 802eac0: e7cd b.n 802ea5e 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); 802eac2: 689a ldr r2, [r3, #8] 802eac4: 68d8 ldr r0, [r3, #12] 802eac6: 4790 blx r2 break; 802eac8: e7c9 b.n 802ea5e 802eaca: bf00 nop 802eacc: 20000d40 .word 0x20000d40 802ead0: 20000d3c .word 0x20000d3c 802ead4: 20000d38 .word 0x20000d38 0802ead8 : * 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) { 802ead8: 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)) { 802eada: 4d0e ldr r5, [pc, #56] ; (802eb14 ) 802eadc: 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) { 802eade: 4606 mov r6, r0 802eae0: 460f mov r7, r1 UNLOCK_TCPIP_CORE(); return ret; #else /* LWIP_TCPIP_CORE_LOCKING_INPUT */ struct tcpip_msg *msg; if (!sys_mbox_valid(&mbox)) { 802eae2: b193 cbz r3, 802eb0a return ERR_VAL; } msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT); 802eae4: 2008 movs r0, #8 802eae6: f001 f871 bl 802fbcc if (msg == NULL) { 802eaea: 4604 mov r4, r0 802eaec: b178 cbz r0, 802eb0e return ERR_MEM; } msg->type = TCPIP_MSG_INPKT; 802eaee: 2301 movs r3, #1 802eaf0: 7003 strb r3, [r0, #0] msg->msg.inp.p = p; 802eaf2: 6086 str r6, [r0, #8] msg->msg.inp.netif = inp; 802eaf4: 60c7 str r7, [r0, #12] if (sys_mbox_trypost(&mbox, msg) != ERR_OK) { 802eaf6: 4621 mov r1, r4 802eaf8: 4628 mov r0, r5 802eafa: f008 feed bl 80378d8 802eafe: b138 cbz r0, 802eb10 memp_free(MEMP_TCPIP_MSG_INPKT, msg); 802eb00: 2008 movs r0, #8 802eb02: 4621 mov r1, r4 802eb04: f001 f878 bl 802fbf8 802eb08: e001 b.n 802eb0e return ret; #else /* LWIP_TCPIP_CORE_LOCKING_INPUT */ struct tcpip_msg *msg; if (!sys_mbox_valid(&mbox)) { return ERR_VAL; 802eb0a: 20fa movs r0, #250 ; 0xfa 802eb0c: e000 b.n 802eb10 } msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT); if (msg == NULL) { return ERR_MEM; 802eb0e: 20ff movs r0, #255 ; 0xff memp_free(MEMP_TCPIP_MSG_INPKT, msg); return ERR_MEM; } return ERR_OK; #endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */ } 802eb10: b240 sxtb r0, r0 802eb12: bdf8 pop {r3, r4, r5, r6, r7, pc} 802eb14: 20000d38 .word 0x20000d38 0802eb18 : * @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) { 802eb18: b530 push {r4, r5, lr} 802eb1a: 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)) { 802eb1c: 480a ldr r0, [pc, #40] ; (802eb48 ) 802eb1e: 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) { 802eb20: 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)) { 802eb22: b16b cbz r3, 802eb40 msg.type = TCPIP_MSG_API; 802eb24: 2500 movs r5, #0 msg.msg.apimsg = apimsg; sys_mbox_post(&mbox, &msg); 802eb26: 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; 802eb28: f88d 5004 strb.w r5, [sp, #4] msg.msg.apimsg = apimsg; 802eb2c: 9403 str r4, [sp, #12] sys_mbox_post(&mbox, &msg); 802eb2e: f008 fec3 bl 80378b8 sys_arch_sem_wait(&apimsg->msg.conn->op_completed, 0); 802eb32: 6860 ldr r0, [r4, #4] 802eb34: 4629 mov r1, r5 802eb36: 300c adds r0, #12 802eb38: f008 ff53 bl 80379e2 return apimsg->msg.err; 802eb3c: 7a20 ldrb r0, [r4, #8] 802eb3e: e000 b.n 802eb42 } return ERR_VAL; 802eb40: 20fa movs r0, #250 ; 0xfa } 802eb42: b240 sxtb r0, r0 802eb44: b007 add sp, #28 802eb46: bd30 pop {r4, r5, pc} 802eb48: 20000d38 .word 0x20000d38 0802eb4c : * @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) { 802eb4c: b537 push {r0, r1, r2, r4, r5, lr} 802eb4e: 4604 mov r4, r0 802eb50: 460d mov r5, r1 lwip_init(); 802eb52: f000 feb3 bl 802f8bc tcpip_init_done = initfunc; 802eb56: 4b09 ldr r3, [pc, #36] ; (802eb7c ) tcpip_init_done_arg = arg; if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 802eb58: 4809 ldr r0, [pc, #36] ; (802eb80 ) void tcpip_init(tcpip_init_done_fn initfunc, void *arg) { lwip_init(); tcpip_init_done = initfunc; 802eb5a: 601c str r4, [r3, #0] tcpip_init_done_arg = arg; 802eb5c: 4b09 ldr r3, [pc, #36] ; (802eb84 ) if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 802eb5e: 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; 802eb60: 601d str r5, [r3, #0] if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 802eb62: f008 fe8d bl 8037880 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); 802eb66: 2303 movs r3, #3 802eb68: 9300 str r3, [sp, #0] 802eb6a: 4907 ldr r1, [pc, #28] ; (802eb88 ) 802eb6c: 4807 ldr r0, [pc, #28] ; (802eb8c ) 802eb6e: 2200 movs r2, #0 802eb70: f44f 73c8 mov.w r3, #400 ; 0x190 802eb74: f008 ff90 bl 8037a98 } 802eb78: bd3e pop {r1, r2, r3, r4, r5, pc} 802eb7a: bf00 nop 802eb7c: 20000d40 .word 0x20000d40 802eb80: 20000d38 .word 0x20000d38 802eb84: 20000d3c .word 0x20000d3c 802eb88: 0802ea51 .word 0x0802ea51 802eb8c: 08044f92 .word 0x08044f92 0802eb90 : * @return n in network byte order */ u16_t lwip_htons(u16_t n) { return ((n & 0xff) << 8) | ((n & 0xff00) >> 8); 802eb90: 0a03 lsrs r3, r0, #8 802eb92: ea43 2000 orr.w r0, r3, r0, lsl #8 } 802eb96: b280 uxth r0, r0 802eb98: 4770 bx lr 0802eb9a : * @return n in network byte order */ u16_t lwip_htons(u16_t n) { return ((n & 0xff) << 8) | ((n & 0xff00) >> 8); 802eb9a: 0a03 lsrs r3, r0, #8 802eb9c: ea43 2000 orr.w r0, r3, r0, lsl #8 */ u16_t lwip_ntohs(u16_t n) { return lwip_htons(n); } 802eba0: b280 uxth r0, r0 802eba2: 4770 bx lr 0802eba4 : { return ((n & 0xff) << 24) | ((n & 0xff00) << 8) | ((n & 0xff0000UL) >> 8) | ((n & 0xff000000UL) >> 24); } 802eba4: ba00 rev r0, r0 802eba6: 4770 bx lr 0802eba8 : * @return n in host byte order */ u32_t lwip_ntohl(u32_t n) { return lwip_htonl(n); 802eba8: f7ff bffc b.w 802eba4 0802ebac : * 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) { 802ebac: 7b03 ldrb r3, [r0, #12] 802ebae: 428b cmp r3, r1 802ebb0: d003 beq.n 802ebba dhcp->state = new_state; dhcp->tries = 0; 802ebb2: 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; 802ebb4: 7301 strb r1, [r0, #12] dhcp->tries = 0; 802ebb6: 7343 strb r3, [r0, #13] dhcp->request_timeout = 0; 802ebb8: 8343 strh r3, [r0, #26] 802ebba: 4770 bx lr 0802ebbc : */ 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; 802ebbc: 8b03 ldrh r3, [r0, #24] * DHCP message. * */ static void dhcp_option(struct dhcp *dhcp, u8_t option_type, u8_t option_len) { 802ebbe: 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; 802ebc0: 6944 ldr r4, [r0, #20] 802ebc2: 18e4 adds r4, r4, r3 802ebc4: f884 10f0 strb.w r1, [r4, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = option_len; 802ebc8: 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; 802ebca: 1c5c adds r4, r3, #1 dhcp->msg_out->options[dhcp->options_out_len++] = option_len; 802ebcc: fa11 f184 uxtah r1, r1, r4 802ebd0: 3302 adds r3, #2 802ebd2: f881 20f0 strb.w r2, [r1, #240] ; 0xf0 802ebd6: 8303 strh r3, [r0, #24] 802ebd8: bd10 pop {r4, pc} 0802ebda : */ 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; 802ebda: 8b03 ldrh r3, [r0, #24] 802ebdc: 6942 ldr r2, [r0, #20] 802ebde: 18d2 adds r2, r2, r3 802ebe0: 3301 adds r3, #1 802ebe2: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802ebe6: 8303 strh r3, [r0, #24] 802ebe8: 4770 bx lr 0802ebea : 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); 802ebea: 8b03 ldrh r3, [r0, #24] 802ebec: 6942 ldr r2, [r0, #20] 802ebee: 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) { 802ebf0: 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); 802ebf2: 0a0c lsrs r4, r1, #8 802ebf4: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t) (value & 0x00ffU); 802ebf8: 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); 802ebfa: 1c5c adds r4, r3, #1 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t) (value & 0x00ffU); 802ebfc: fa12 f284 uxtah r2, r2, r4 802ec00: 3302 adds r3, #2 802ec02: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802ec06: 8303 strh r3, [r0, #24] 802ec08: bd10 pop {r4, pc} 0802ec0a : 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); 802ec0a: 8b03 ldrh r3, [r0, #24] 802ec0c: 6942 ldr r2, [r0, #20] 802ec0e: 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) { 802ec10: 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); 802ec12: 0e0c lsrs r4, r1, #24 802ec14: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); 802ec18: 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); 802ec1a: 1c5c adds r4, r3, #1 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); 802ec1c: fa12 f284 uxtah r2, r2, r4 802ec20: f3c1 4407 ubfx r4, r1, #16, #8 802ec24: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); 802ec28: 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); 802ec2a: 1c9c adds r4, r3, #2 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); 802ec2c: fa12 f284 uxtah r2, r2, r4 802ec30: f3c1 2407 ubfx r4, r1, #8, #8 802ec34: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x000000ffUL)); 802ec38: 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); 802ec3a: 1cdc adds r4, r3, #3 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x000000ffUL)); 802ec3c: fa12 f284 uxtah r2, r2, r4 802ec40: 3304 adds r3, #4 802ec42: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802ec46: 8303 strh r3, [r0, #24] 802ec48: bd10 pop {r4, pc} 0802ec4a : * @param dhcp DHCP state structure */ static void dhcp_option_trailer(struct dhcp *dhcp) { LWIP_ERROR("dhcp_option_trailer: dhcp != NULL", (dhcp != NULL), return;); 802ec4a: b190 cbz r0, 802ec72 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; 802ec4c: 8b03 ldrh r3, [r0, #24] 802ec4e: 6942 ldr r2, [r0, #20] 802ec50: 18d2 adds r2, r2, r3 802ec52: 21ff movs r1, #255 ; 0xff 802ec54: 3301 adds r3, #1 802ec56: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802ec5a: 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; 802ec5c: 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)) && 802ec5e: e005 b.n 802ec6c (dhcp->options_out_len < DHCP_OPTIONS_LEN)) { /* add a fill/padding byte */ dhcp->msg_out->options[dhcp->options_out_len++] = 0; 802ec60: 6942 ldr r2, [r0, #20] 802ec62: 18d2 adds r2, r2, r3 802ec64: 3301 adds r3, #1 802ec66: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802ec6a: 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)) && 802ec6c: 8b03 ldrh r3, [r0, #24] 802ec6e: 2b43 cmp r3, #67 ; 0x43 802ec70: d9f6 bls.n 802ec60 802ec72: 4770 bx lr 0802ec74 : * @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) { 802ec74: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802ec78: 460c mov r4, r1 802ec7a: 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;); 802ec7c: 4606 mov r6, r0 802ec7e: 2800 cmp r0, #0 802ec80: f000 808e beq.w 802eda0 LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); 802ec84: 2900 cmp r1, #0 802ec86: f000 808d beq.w 802eda4 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); 802ec8a: 2000 movs r0, #0 802ec8c: f44f 719a mov.w r1, #308 ; 0x134 802ec90: 4602 mov r2, r0 802ec92: f001 f908 bl 802fea6 802ec96: 6120 str r0, [r4, #16] if (dhcp->p_out == NULL) { 802ec98: 2800 cmp r0, #0 802ec9a: f000 8085 beq.w 802eda8 } 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) { 802ec9e: 7b62 ldrb r2, [r4, #13] 802eca0: 4b43 ldr r3, [pc, #268] ; (802edb0 ) 802eca2: b912 cbnz r2, 802ecaa #if DHCP_CREATE_RAND_XID && defined(LWIP_RAND) xid = LWIP_RAND(); #else /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ xid++; 802eca4: 681a ldr r2, [r3, #0] 802eca6: 3201 adds r2, #1 802eca8: 601a str r2, [r3, #0] #endif /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ } dhcp->xid = xid; 802ecaa: 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; 802ecac: 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; 802ecae: 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; 802ecb0: 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; 802ecb2: 6162 str r2, [r4, #20] dhcp->msg_out->op = DHCP_BOOTREQUEST; 802ecb4: 7013 strb r3, [r2, #0] /* TODO: make link layer independent */ dhcp->msg_out->htype = DHCP_HTYPE_ETH; 802ecb6: 6962 ldr r2, [r4, #20] 802ecb8: 7053 strb r3, [r2, #1] dhcp->msg_out->hlen = netif->hwaddr_len; 802ecba: 6963 ldr r3, [r4, #20] 802ecbc: f896 2026 ldrb.w r2, [r6, #38] ; 0x26 802ecc0: 709a strb r2, [r3, #2] dhcp->msg_out->hops = 0; 802ecc2: 6963 ldr r3, [r4, #20] 802ecc4: 2500 movs r5, #0 802ecc6: 70dd strb r5, [r3, #3] dhcp->msg_out->xid = htonl(dhcp->xid); 802ecc8: 6820 ldr r0, [r4, #0] 802ecca: f8d4 8014 ldr.w r8, [r4, #20] 802ecce: f7ff ff69 bl 802eba4 802ecd2: f8c8 0004 str.w r0, [r8, #4] dhcp->msg_out->secs = 0; 802ecd6: 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) || 802ecd8: 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; 802ecda: 721d strb r5, [r3, #8] 802ecdc: 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; 802ecde: 729d strb r5, [r3, #10] 802ece0: 72dd strb r5, [r3, #11] ip_addr_set_zero(&dhcp->msg_out->ciaddr); 802ece2: 731d strb r5, [r3, #12] 802ece4: 735d strb r5, [r3, #13] 802ece6: 739d strb r5, [r3, #14] 802ece8: 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) || 802ecea: d007 beq.n 802ecfc 802ecec: 2f04 cmp r7, #4 802ecee: d005 beq.n 802ecfc 802ecf0: 2f03 cmp r7, #3 802ecf2: d105 bne.n 802ed00 ((message_type == DHCP_REQUEST) && /* DHCP_BOUND not used for sending! */ ((dhcp->state==DHCP_RENEWING) || dhcp->state==DHCP_REBINDING))) { 802ecf4: 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! */ 802ecf6: 3a04 subs r2, #4 802ecf8: 2a01 cmp r2, #1 802ecfa: d801 bhi.n 802ed00 ((dhcp->state==DHCP_RENEWING) || dhcp->state==DHCP_REBINDING))) { ip_addr_copy(dhcp->msg_out->ciaddr, netif->ip_addr); 802ecfc: 6872 ldr r2, [r6, #4] 802ecfe: 60da str r2, [r3, #12] } ip_addr_set_zero(&dhcp->msg_out->yiaddr); 802ed00: 2500 movs r5, #0 802ed02: 741d strb r5, [r3, #16] 802ed04: 745d strb r5, [r3, #17] 802ed06: 749d strb r5, [r3, #18] 802ed08: 74dd strb r5, [r3, #19] ip_addr_set_zero(&dhcp->msg_out->siaddr); 802ed0a: 751d strb r5, [r3, #20] 802ed0c: 755d strb r5, [r3, #21] 802ed0e: 759d strb r5, [r3, #22] 802ed10: 75dd strb r5, [r3, #23] ip_addr_set_zero(&dhcp->msg_out->giaddr); 802ed12: 761d strb r5, [r3, #24] 802ed14: 765d strb r5, [r3, #25] 802ed16: 769d strb r5, [r3, #26] 802ed18: 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*/; 802ed1a: f896 1026 ldrb.w r1, [r6, #38] ; 0x26 802ed1e: 6962 ldr r2, [r4, #20] 802ed20: b2ab uxth r3, r5 802ed22: 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) 802ed24: bf88 it hi 802ed26: 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*/; 802ed28: 442a add r2, r5 802ed2a: bf8c ite hi 802ed2c: f893 3027 ldrbhi.w r3, [r3, #39] ; 0x27 802ed30: 2300 movls r3, #0 802ed32: 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++) { 802ed34: 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*/; 802ed36: 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++) { 802ed38: d1ef bne.n 802ed1a 802ed3a: 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; 802ed3c: 4619 mov r1, r3 802ed3e: 6962 ldr r2, [r4, #20] 802ed40: 18d2 adds r2, r2, r3 802ed42: 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++) { 802ed44: 2b40 cmp r3, #64 ; 0x40 dhcp->msg_out->sname[i] = 0; 802ed46: 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++) { 802ed4a: d1f8 bne.n 802ed3e 802ed4c: 2200 movs r2, #0 dhcp->msg_out->sname[i] = 0; } for (i = 0; i < DHCP_FILE_LEN; i++) { dhcp->msg_out->file[i] = 0; 802ed4e: 4610 mov r0, r2 802ed50: 6963 ldr r3, [r4, #20] 802ed52: 1899 adds r1, r3, r2 802ed54: 3201 adds r2, #1 802ed56: 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++) { 802ed58: 2a80 cmp r2, #128 ; 0x80 dhcp->msg_out->file[i] = 0; 802ed5a: 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++) { 802ed5e: d1f7 bne.n 802ed50 dhcp->msg_out->file[i] = 0; } dhcp->msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE); 802ed60: 6962 ldr r2, [r4, #20] 802ed62: f06f 007d mvn.w r0, #125 ; 0x7d 802ed66: 2163 movs r1, #99 ; 0x63 802ed68: f882 00ed strb.w r0, [r2, #237] ; 0xed 802ed6c: 2053 movs r0, #83 ; 0x53 802ed6e: f882 10ec strb.w r1, [r2, #236] ; 0xec 802ed72: f882 00ee strb.w r0, [r2, #238] ; 0xee 802ed76: f882 10ef strb.w r1, [r2, #239] ; 0xef dhcp->options_out_len = 0; 802ed7a: 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 */ 802ed7c: 6962 ldr r2, [r4, #20] 802ed7e: 18d2 adds r2, r2, r3 802ed80: f882 30f0 strb.w r3, [r2, #240] ; 0xf0 802ed84: 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++) { 802ed86: 2b44 cmp r3, #68 ; 0x44 802ed88: d1f8 bne.n 802ed7c 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); 802ed8a: 4620 mov r0, r4 802ed8c: 2135 movs r1, #53 ; 0x35 802ed8e: 2201 movs r2, #1 802ed90: f7ff ff14 bl 802ebbc dhcp_option_byte(dhcp, message_type); 802ed94: 4620 mov r0, r4 802ed96: 4639 mov r1, r7 802ed98: f7ff ff1f bl 802ebda return ERR_OK; 802ed9c: 2000 movs r0, #0 802ed9e: e004 b.n 802edaa if (!xid_initialised) { xid = DHCP_GLOBAL_XID; xid_initialised = !xid_initialised; } #endif LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return ERR_ARG;); 802eda0: 20f2 movs r0, #242 ; 0xf2 802eda2: e002 b.n 802edaa LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); 802eda4: 20fa movs r0, #250 ; 0xfa 802eda6: e000 b.n 802edaa 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; 802eda8: 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; } 802edaa: b240 sxtb r0, r0 802edac: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802edb0: 20000714 .word 0x20000714 0802edb4 : * * @param dhcp the dhcp struct to free the request from */ static void dhcp_delete_msg(struct dhcp *dhcp) { 802edb4: b510 push {r4, lr} LWIP_ERROR("dhcp_delete_msg: dhcp != NULL", (dhcp != NULL), return;); 802edb6: 4604 mov r4, r0 802edb8: b130 cbz r0, 802edc8 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) { 802edba: 6900 ldr r0, [r0, #16] 802edbc: b108 cbz r0, 802edc2 pbuf_free(dhcp->p_out); 802edbe: f001 f825 bl 802fe0c } dhcp->p_out = NULL; 802edc2: 2300 movs r3, #0 802edc4: 6123 str r3, [r4, #16] dhcp->msg_out = NULL; 802edc6: 6163 str r3, [r4, #20] 802edc8: bd10 pop {r4, pc} 802edca: 0000 movs r0, r0 0802edcc : * * @param netif the netif under DHCP control */ static err_t dhcp_discover(struct netif *netif) { 802edcc: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802edce: 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); 802edd0: 2300 movs r3, #0 * * @param netif the netif under DHCP control */ static err_t dhcp_discover(struct netif *netif) { 802edd2: 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); 802edd4: 6263 str r3, [r4, #36] ; 0x24 dhcp_set_state(dhcp, DHCP_SELECTING); 802edd6: 4620 mov r0, r4 802edd8: 2106 movs r1, #6 802edda: f7ff fee7 bl 802ebac /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER); 802edde: 4628 mov r0, r5 802ede0: 4621 mov r1, r4 802ede2: 2201 movs r2, #1 802ede4: f7ff ff46 bl 802ec74 if (result == ERR_OK) { 802ede8: 4606 mov r6, r0 802edea: 2800 cmp r0, #0 802edec: d130 bne.n 802ee50 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); 802edee: 2202 movs r2, #2 802edf0: 4620 mov r0, r4 802edf2: 2139 movs r1, #57 ; 0x39 802edf4: f7ff fee2 bl 802ebbc dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 802edf8: 4620 mov r0, r4 802edfa: 8ca9 ldrh r1, [r5, #36] ; 0x24 802edfc: f7ff fef5 bl 802ebea dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, 4/*num options*/); 802ee00: 2204 movs r2, #4 802ee02: 4620 mov r0, r4 802ee04: 2137 movs r1, #55 ; 0x37 802ee06: f7ff fed9 bl 802ebbc dhcp_option_byte(dhcp, DHCP_OPTION_SUBNET_MASK); 802ee0a: 4620 mov r0, r4 802ee0c: 2101 movs r1, #1 802ee0e: f7ff fee4 bl 802ebda dhcp_option_byte(dhcp, DHCP_OPTION_ROUTER); 802ee12: 4620 mov r0, r4 802ee14: 2103 movs r1, #3 802ee16: f7ff fee0 bl 802ebda dhcp_option_byte(dhcp, DHCP_OPTION_BROADCAST); 802ee1a: 4620 mov r0, r4 802ee1c: 211c movs r1, #28 802ee1e: f7ff fedc bl 802ebda dhcp_option_byte(dhcp, DHCP_OPTION_DNS_SERVER); 802ee22: 2106 movs r1, #6 802ee24: 4620 mov r0, r4 802ee26: f7ff fed8 bl 802ebda dhcp_option_trailer(dhcp); 802ee2a: 4620 mov r0, r4 802ee2c: f7ff ff0d bl 802ec4a 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); 802ee30: 8b21 ldrh r1, [r4, #24] 802ee32: 6920 ldr r0, [r4, #16] 802ee34: 31f0 adds r1, #240 ; 0xf0 802ee36: b289 uxth r1, r1 802ee38: f001 f80f bl 802fe5a 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); 802ee3c: 9500 str r5, [sp, #0] 802ee3e: 6860 ldr r0, [r4, #4] 802ee40: 6921 ldr r1, [r4, #16] 802ee42: 4a0f ldr r2, [pc, #60] ; (802ee80 ) 802ee44: 2343 movs r3, #67 ; 0x43 802ee46: f003 fda3 bl 8032990 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: deleting()ing\n")); dhcp_delete_msg(dhcp); 802ee4a: 4620 mov r0, r4 802ee4c: f7ff ffb2 bl 802edb4 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++; 802ee50: 7b63 ldrb r3, [r4, #13] 802ee52: 3301 adds r3, #1 802ee54: 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; 802ee56: 2b05 cmp r3, #5 802ee58: bf98 it ls 802ee5a: 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++; 802ee5e: 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; 802ee60: bf9a itte ls 802ee62: fa02 f303 lslls.w r3, r2, r3 802ee66: b29b uxthls r3, r3 802ee68: f64e 2360 movwhi r3, #60000 ; 0xea60 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802ee6c: f44f 72fa mov.w r2, #500 ; 0x1f4 802ee70: f203 13f3 addw r3, r3, #499 ; 0x1f3 802ee74: fb93 f3f2 sdiv r3, r3, r2 802ee78: 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; } 802ee7a: 4630 mov r0, r6 802ee7c: bd7c pop {r2, r3, r4, r5, r6, pc} 802ee7e: bf00 nop 802ee80: 08045004 .word 0x08045004 0802ee84 : * * @param netif network interface which must rebind with a DHCP server */ static err_t dhcp_rebind(struct netif *netif) { 802ee84: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802ee86: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must rebind with a DHCP server */ static err_t dhcp_rebind(struct netif *netif) { 802ee88: 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); 802ee8a: 2104 movs r1, #4 802ee8c: 4620 mov r0, r4 802ee8e: f7ff fe8d bl 802ebac /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 802ee92: 4628 mov r0, r5 802ee94: 4621 mov r1, r4 802ee96: 2203 movs r2, #3 802ee98: f7ff feec bl 802ec74 if (result == ERR_OK) { 802ee9c: 4606 mov r6, r0 802ee9e: b9d8 cbnz r0, 802eed8 dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 802eea0: 2202 movs r2, #2 802eea2: 4620 mov r0, r4 802eea4: 2139 movs r1, #57 ; 0x39 802eea6: f7ff fe89 bl 802ebbc dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 802eeaa: 8ca9 ldrh r1, [r5, #36] ; 0x24 802eeac: 4620 mov r0, r4 802eeae: f7ff fe9c bl 802ebea dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); dhcp_option_long(dhcp, ntohl(dhcp->server_ip_addr.addr)); #endif dhcp_option_trailer(dhcp); 802eeb2: 4620 mov r0, r4 802eeb4: f7ff fec9 bl 802ec4a pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802eeb8: 8b21 ldrh r1, [r4, #24] 802eeba: 6920 ldr r0, [r4, #16] 802eebc: 31f0 adds r1, #240 ; 0xf0 802eebe: b289 uxth r1, r1 802eec0: f000 ffcb bl 802fe5a /* broadcast to server */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802eec4: 9500 str r5, [sp, #0] 802eec6: 6860 ldr r0, [r4, #4] 802eec8: 6921 ldr r1, [r4, #16] 802eeca: 4a0e ldr r2, [pc, #56] ; (802ef04 ) 802eecc: 2343 movs r3, #67 ; 0x43 802eece: f003 fd5f bl 8032990 dhcp_delete_msg(dhcp); 802eed2: 4620 mov r0, r4 802eed4: f7ff ff6e bl 802edb4 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++; 802eed8: 7b63 ldrb r3, [r4, #13] 802eeda: 3301 adds r3, #1 802eedc: b2db uxtb r3, r3 msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802eede: 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++; 802eee0: 7363 strb r3, [r4, #13] msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802eee2: d804 bhi.n 802eeee 802eee4: f44f 727a mov.w r2, #1000 ; 0x3e8 802eee8: 4353 muls r3, r2 802eeea: b29b uxth r3, r3 802eeec: e001 b.n 802eef2 802eeee: f242 7310 movw r3, #10000 ; 0x2710 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802eef2: f44f 72fa mov.w r2, #500 ; 0x1f4 802eef6: f203 13f3 addw r3, r3, #499 ; 0x1f3 802eefa: fb93 f3f2 sdiv r3, r3, r2 802eefe: 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; } 802ef00: 4630 mov r0, r6 802ef02: bd7c pop {r2, r3, r4, r5, r6, pc} 802ef04: 08045004 .word 0x08045004 0802ef08 : * * @param netif network interface which must reboot */ static err_t dhcp_reboot(struct netif *netif) { 802ef08: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802ef0a: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must reboot */ static err_t dhcp_reboot(struct netif *netif) { 802ef0c: 4605 mov r5, r0 struct dhcp *dhcp = netif->dhcp; err_t result; u16_t msecs; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot()\n")); dhcp_set_state(dhcp, DHCP_REBOOTING); 802ef0e: 2103 movs r1, #3 802ef10: 4620 mov r0, r4 802ef12: f7ff fe4b bl 802ebac /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 802ef16: 4628 mov r0, r5 802ef18: 4621 mov r1, r4 802ef1a: 2203 movs r2, #3 802ef1c: f7ff feaa bl 802ec74 if (result == ERR_OK) { 802ef20: 4606 mov r6, r0 802ef22: bb40 cbnz r0, 802ef76 dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 802ef24: 2202 movs r2, #2 802ef26: 4620 mov r0, r4 802ef28: 2139 movs r1, #57 ; 0x39 802ef2a: f7ff fe47 bl 802ebbc dhcp_option_short(dhcp, 576); 802ef2e: 4620 mov r0, r4 802ef30: f44f 7110 mov.w r1, #576 ; 0x240 802ef34: f7ff fe59 bl 802ebea dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); 802ef38: 2204 movs r2, #4 802ef3a: 2132 movs r1, #50 ; 0x32 802ef3c: 4620 mov r0, r4 802ef3e: f7ff fe3d bl 802ebbc dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); 802ef42: 6a60 ldr r0, [r4, #36] ; 0x24 802ef44: f7ff fe30 bl 802eba8 802ef48: 4601 mov r1, r0 802ef4a: 4620 mov r0, r4 802ef4c: f7ff fe5d bl 802ec0a dhcp_option_trailer(dhcp); 802ef50: 4620 mov r0, r4 802ef52: f7ff fe7a bl 802ec4a pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802ef56: 8b21 ldrh r1, [r4, #24] 802ef58: 6920 ldr r0, [r4, #16] 802ef5a: 31f0 adds r1, #240 ; 0xf0 802ef5c: b289 uxth r1, r1 802ef5e: f000 ff7c bl 802fe5a /* broadcast to server */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802ef62: 9500 str r5, [sp, #0] 802ef64: 6860 ldr r0, [r4, #4] 802ef66: 6921 ldr r1, [r4, #16] 802ef68: 4a0e ldr r2, [pc, #56] ; (802efa4 ) 802ef6a: 2343 movs r3, #67 ; 0x43 802ef6c: f003 fd10 bl 8032990 dhcp_delete_msg(dhcp); 802ef70: 4620 mov r0, r4 802ef72: f7ff ff1f bl 802edb4 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++; 802ef76: 7b63 ldrb r3, [r4, #13] 802ef78: 3301 adds r3, #1 802ef7a: b2db uxtb r3, r3 msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802ef7c: 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++; 802ef7e: 7363 strb r3, [r4, #13] msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802ef80: d804 bhi.n 802ef8c 802ef82: f44f 727a mov.w r2, #1000 ; 0x3e8 802ef86: 4353 muls r3, r2 802ef88: b29b uxth r3, r3 802ef8a: e001 b.n 802ef90 802ef8c: f242 7310 movw r3, #10000 ; 0x2710 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802ef90: f44f 72fa mov.w r2, #500 ; 0x1f4 802ef94: f203 13f3 addw r3, r3, #499 ; 0x1f3 802ef98: fb93 f3f2 sdiv r3, r3, r2 802ef9c: 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; } 802ef9e: 4630 mov r0, r6 802efa0: bd7c pop {r2, r3, r4, r5, r6, pc} 802efa2: bf00 nop 802efa4: 08045004 .word 0x08045004 0802efa8 : * @param netif the netif under DHCP control * @return lwIP specific error (see error.h) */ static err_t dhcp_select(struct netif *netif) { 802efa8: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802efaa: 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) { 802efac: 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); 802efae: 2101 movs r1, #1 802efb0: 4620 mov r0, r4 802efb2: f7ff fdfb bl 802ebac /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 802efb6: 4628 mov r0, r5 802efb8: 4621 mov r1, r4 802efba: 2203 movs r2, #3 802efbc: f7ff fe5a bl 802ec74 if (result == ERR_OK) { 802efc0: 4606 mov r6, r0 802efc2: 2800 cmp r0, #0 802efc4: d148 bne.n 802f058 dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 802efc6: 2202 movs r2, #2 802efc8: 4620 mov r0, r4 802efca: 2139 movs r1, #57 ; 0x39 802efcc: f7ff fdf6 bl 802ebbc dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 802efd0: 4620 mov r0, r4 802efd2: 8ca9 ldrh r1, [r5, #36] ; 0x24 802efd4: f7ff fe09 bl 802ebea /* MUST request the offered IP address */ dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); 802efd8: 2204 movs r2, #4 802efda: 2132 movs r1, #50 ; 0x32 802efdc: 4620 mov r0, r4 802efde: f7ff fded bl 802ebbc dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); 802efe2: 6a60 ldr r0, [r4, #36] ; 0x24 802efe4: f7ff fde0 bl 802eba8 802efe8: 4601 mov r1, r0 802efea: 4620 mov r0, r4 802efec: f7ff fe0d bl 802ec0a dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); 802eff0: 2204 movs r2, #4 802eff2: 2136 movs r1, #54 ; 0x36 802eff4: 4620 mov r0, r4 802eff6: f7ff fde1 bl 802ebbc dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->server_ip_addr))); 802effa: 6a20 ldr r0, [r4, #32] 802effc: f7ff fdd4 bl 802eba8 802f000: 4601 mov r1, r0 802f002: 4620 mov r0, r4 802f004: f7ff fe01 bl 802ec0a dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, 4/*num options*/); 802f008: 2204 movs r2, #4 802f00a: 4620 mov r0, r4 802f00c: 2137 movs r1, #55 ; 0x37 802f00e: f7ff fdd5 bl 802ebbc dhcp_option_byte(dhcp, DHCP_OPTION_SUBNET_MASK); 802f012: 4620 mov r0, r4 802f014: 2101 movs r1, #1 802f016: f7ff fde0 bl 802ebda dhcp_option_byte(dhcp, DHCP_OPTION_ROUTER); 802f01a: 4620 mov r0, r4 802f01c: 2103 movs r1, #3 802f01e: f7ff fddc bl 802ebda dhcp_option_byte(dhcp, DHCP_OPTION_BROADCAST); 802f022: 4620 mov r0, r4 802f024: 211c movs r1, #28 802f026: f7ff fdd8 bl 802ebda dhcp_option_byte(dhcp, DHCP_OPTION_DNS_SERVER); 802f02a: 2106 movs r1, #6 802f02c: 4620 mov r0, r4 802f02e: f7ff fdd4 bl 802ebda #if LWIP_NETIF_HOSTNAME dhcp_option_hostname(dhcp, netif); #endif /* LWIP_NETIF_HOSTNAME */ dhcp_option_trailer(dhcp); 802f032: 4620 mov r0, r4 802f034: f7ff fe09 bl 802ec4a /* shrink the pbuf to the actual content length */ pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802f038: 8b21 ldrh r1, [r4, #24] 802f03a: 6920 ldr r0, [r4, #16] 802f03c: 31f0 adds r1, #240 ; 0xf0 802f03e: b289 uxth r1, r1 802f040: f000 ff0b bl 802fe5a /* send broadcast to any DHCP server */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802f044: 9500 str r5, [sp, #0] 802f046: 6860 ldr r0, [r4, #4] 802f048: 6921 ldr r1, [r4, #16] 802f04a: 4a0f ldr r2, [pc, #60] ; (802f088 ) 802f04c: 2343 movs r3, #67 ; 0x43 802f04e: f003 fc9f bl 8032990 dhcp_delete_msg(dhcp); 802f052: 4620 mov r0, r4 802f054: f7ff feae bl 802edb4 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++; 802f058: 7b63 ldrb r3, [r4, #13] 802f05a: 3301 adds r3, #1 802f05c: b2db uxtb r3, r3 msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; 802f05e: 2b05 cmp r3, #5 802f060: bf98 it ls 802f062: 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++; 802f066: 7363 strb r3, [r4, #13] msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; 802f068: bf9a itte ls 802f06a: fa02 f303 lslls.w r3, r2, r3 802f06e: b29b uxthls r3, r3 802f070: f64e 2360 movwhi r3, #60000 ; 0xea60 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802f074: f44f 72fa mov.w r2, #500 ; 0x1f4 802f078: f203 13f3 addw r3, r3, #499 ; 0x1f3 802f07c: fb93 f3f2 sdiv r3, r3, r2 802f080: 8363 strh r3, [r4, #26] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_select(): set request timeout %"U16_F" msecs\n", msecs)); return result; } 802f082: 4630 mov r0, r6 802f084: bd7c pop {r2, r3, r4, r5, r6, pc} 802f086: bf00 nop 802f088: 08045004 .word 0x08045004 0802f08c : * * @param netif the netif under DHCP control */ static void dhcp_check(struct netif *netif) { 802f08c: b538 push {r3, r4, r5, lr} struct dhcp *dhcp = netif->dhcp; 802f08e: 6a04 ldr r4, [r0, #32] * * @param netif the netif under DHCP control */ static void dhcp_check(struct netif *netif) { 802f090: 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); 802f092: 2108 movs r1, #8 802f094: 4620 mov r0, r4 802f096: f7ff fd89 bl 802ebac /* 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); 802f09a: 4628 mov r0, r5 802f09c: f104 0124 add.w r1, r4, #36 ; 0x24 802f0a0: 2200 movs r2, #0 802f0a2: f008 f88d bl 80371c0 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++; 802f0a6: 7b63 ldrb r3, [r4, #13] 802f0a8: 3301 adds r3, #1 802f0aa: 7363 strb r3, [r4, #13] msecs = 500; dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802f0ac: 2301 movs r3, #1 802f0ae: 8363 strh r3, [r4, #26] 802f0b0: bd38 pop {r3, r4, r5, pc} 0802f0b2 : * * @param netif network interface to bind to the offered address */ static void dhcp_bind(struct netif *netif) { 802f0b2: 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;); 802f0b4: 4605 mov r5, r0 802f0b6: 2800 cmp r0, #0 802f0b8: d059 beq.n 802f16e dhcp = netif->dhcp; 802f0ba: 6a04 ldr r4, [r0, #32] LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;); 802f0bc: 2c00 cmp r4, #0 802f0be: d056 beq.n 802f16e 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) { 802f0c0: 6b63 ldr r3, [r4, #52] ; 0x34 802f0c2: 1c58 adds r0, r3, #1 802f0c4: d00d beq.n 802f0e2 /* 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; 802f0c6: 223c movs r2, #60 ; 0x3c 802f0c8: 331e adds r3, #30 802f0ca: fbb3 f3f2 udiv r3, r3, r2 if(timeout > 0xffff) { timeout = 0xffff; } dhcp->t1_timeout = (u16_t)timeout; 802f0ce: f64f 72ff movw r2, #65535 ; 0xffff 802f0d2: 4293 cmp r3, r2 802f0d4: bf28 it cs 802f0d6: 4613 movcs r3, r2 802f0d8: b29b uxth r3, r3 802f0da: 83a3 strh r3, [r4, #28] if (dhcp->t1_timeout == 0) { 802f0dc: b90b cbnz r3, 802f0e2 dhcp->t1_timeout = 1; 802f0de: 2301 movs r3, #1 802f0e0: 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) { 802f0e2: 6ba3 ldr r3, [r4, #56] ; 0x38 802f0e4: 1c59 adds r1, r3, #1 802f0e6: d00d beq.n 802f104 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; 802f0e8: 223c movs r2, #60 ; 0x3c 802f0ea: 331e adds r3, #30 802f0ec: fbb3 f3f2 udiv r3, r3, r2 if(timeout > 0xffff) { timeout = 0xffff; } dhcp->t2_timeout = (u16_t)timeout; 802f0f0: f64f 72ff movw r2, #65535 ; 0xffff 802f0f4: 4293 cmp r3, r2 802f0f6: bf28 it cs 802f0f8: 4613 movcs r3, r2 802f0fa: b29b uxth r3, r3 802f0fc: 83e3 strh r3, [r4, #30] if (dhcp->t2_timeout == 0) { 802f0fe: b90b cbnz r3, 802f104 dhcp->t2_timeout = 1; 802f100: 2301 movs r3, #1 802f102: 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)) { 802f104: 8be3 ldrh r3, [r4, #30] 802f106: 8ba2 ldrh r2, [r4, #28] 802f108: 429a cmp r2, r3 802f10a: d302 bcc.n 802f112 802f10c: b10b cbz r3, 802f112 dhcp->t1_timeout = 0; 802f10e: 2300 movs r3, #0 802f110: 83a3 strh r3, [r4, #28] } if (dhcp->subnet_mask_given) { 802f112: 7ba3 ldrb r3, [r4, #14] 802f114: b10b cbz r3, 802f11a /* copy offered network mask */ ip_addr_copy(sn_mask, dhcp->offered_sn_mask); 802f116: 6aa3 ldr r3, [r4, #40] ; 0x28 802f118: e00b b.n 802f132 } else { /* subnet mask not given, choose a safe subnet mask given the network class */ u8_t first_octet = ip4_addr1(&dhcp->offered_ip_addr); 802f11a: f894 3024 ldrb.w r3, [r4, #36] ; 0x24 if (first_octet <= 127) { 802f11e: 061a lsls r2, r3, #24 802f120: d401 bmi.n 802f126 ip4_addr_set_u32(&sn_mask, PP_HTONL(0xff000000UL)); 802f122: 23ff movs r3, #255 ; 0xff 802f124: e005 b.n 802f132 } else if (first_octet >= 192) { 802f126: 2bbf cmp r3, #191 ; 0xbf ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffffff00UL)); 802f128: bf8c ite hi 802f12a: f06f 437f mvnhi.w r3, #4278190080 ; 0xff000000 } else { ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffff0000UL)); 802f12e: f64f 73ff movwls r3, #65535 ; 0xffff 802f132: 9300 str r3, [sp, #0] } } ip_addr_copy(gw_addr, dhcp->offered_gw_addr); 802f134: 6ae3 ldr r3, [r4, #44] ; 0x2c 802f136: 9301 str r3, [sp, #4] /* gateway address not given? */ if (ip_addr_isany(&gw_addr)) { 802f138: b92b cbnz r3, 802f146 /* copy network address */ ip_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask); 802f13a: 6a63 ldr r3, [r4, #36] ; 0x24 802f13c: 9a00 ldr r2, [sp, #0] 802f13e: 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)); 802f140: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000 802f144: 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); 802f146: 4628 mov r0, r5 802f148: f104 0124 add.w r1, r4, #36 ; 0x24 802f14c: f000 fd6a bl 802fc24 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); 802f150: 4628 mov r0, r5 802f152: 4669 mov r1, sp 802f154: f000 fda6 bl 802fca4 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); 802f158: a901 add r1, sp, #4 802f15a: 4628 mov r0, r5 802f15c: f000 fd9e bl 802fc9c /* bring the interface up */ netif_set_up(netif); 802f160: 4628 mov r0, r5 802f162: f000 fdf5 bl 802fd50 /* netif is now bound to DHCP leased address */ dhcp_set_state(dhcp, DHCP_BOUND); 802f166: 4620 mov r0, r4 802f168: 210a movs r1, #10 802f16a: f7ff fd1f bl 802ebac } 802f16e: bd3e pop {r1, r2, r3, r4, r5, pc} 0802f170 : /** * 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) { 802f170: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802f174: 4692 mov sl, r2 802f176: 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) { 802f178: 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; 802f17c: f8d0 8020 ldr.w r8, [r0, #32] struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload; 802f180: 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) { 802f182: 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) { 802f184: 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) { 802f186: f240 81b8 bls.w 802f4fa 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) { 802f18a: 7813 ldrb r3, [r2, #0] 802f18c: 2b02 cmp r3, #2 802f18e: f040 81b4 bne.w 802f4fa 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++) { 802f192: f890 1026 ldrb.w r1, [r0, #38] ; 0x26 802f196: 2300 movs r3, #0 802f198: e008 b.n 802f1ac /** * 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) 802f19a: 18e8 adds r0, r5, r3 802f19c: 3301 adds r3, #1 802f19e: 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]) { 802f1a0: f890 0027 ldrb.w r0, [r0, #39] ; 0x27 802f1a4: 7ee4 ldrb r4, [r4, #27] 802f1a6: 4284 cmp r4, r0 802f1a8: f040 81a7 bne.w 802f4fa 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++) { 802f1ac: b2d8 uxtb r0, r3 802f1ae: 4288 cmp r0, r1 802f1b0: d3f3 bcc.n 802f19a (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) { 802f1b2: 6850 ldr r0, [r2, #4] 802f1b4: f7ff fcf8 bl 802eba8 802f1b8: f8d8 3000 ldr.w r3, [r8] 802f1bc: 4298 cmp r0, r3 802f1be: f040 819c bne.w 802f4fa struct pbuf *q; int parse_file_as_options = 0; int parse_sname_as_options = 0; /* clear received options */ dhcp_clear_all_options(dhcp); 802f1c2: 2100 movs r1, #0 802f1c4: 220a movs r2, #10 802f1c6: 489d ldr r0, [pc, #628] ; (802f43c ) 802f1c8: f7f2 fc9a bl 8021b00 /* check that beginning of dhcp_msg (up to and including chaddr) is in first pbuf */ if (p->len < DHCP_SNAME_OFS) { 802f1cc: f8ba 300a ldrh.w r3, [sl, #10] 802f1d0: 2b2b cmp r3, #43 ; 0x2b 802f1d2: f240 8192 bls.w 802f4fa return ERR_BUF; } dhcp->msg_in = (struct dhcp_msg *)p->payload; 802f1d6: 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; 802f1da: 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; 802f1de: 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; 802f1e2: f04f 0b00 mov.w fp, #0 #endif /* LWIP_DHCP_BOOTP_FILE */ /* parse options */ /* start with options field */ options_idx = DHCP_OPTIONS_OFS; 802f1e6: 22f0 movs r2, #240 ; 0xf0 802f1e8: e004 b.n 802f1f4 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; 802f1ea: f04f 0b00 mov.w fp, #0 options_idx = DHCP_SNAME_OFS; options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN; 802f1ee: 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; 802f1f2: 222c movs r2, #44 ; 0x2c #endif /* LWIP_DHCP_BOOTP_FILE */ /* parse options */ /* start with options field */ options_idx = DHCP_OPTIONS_OFS; 802f1f4: 4657 mov r7, sl 802f1f6: e009 b.n 802f20c again: q = p; while((q != NULL) && (options_idx >= q->len)) { options_idx -= q->len; options_idx_max -= q->len; q = q->next; 802f1f8: 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; 802f1fa: 1ad2 subs r2, r2, r3 options_idx_max -= q->len; 802f1fc: 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; 802f200: b292 uxth r2, r2 options_idx_max -= q->len; 802f202: 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)) { 802f206: 2f00 cmp r7, #0 802f208: f000 8177 beq.w 802f4fa 802f20c: 897b ldrh r3, [r7, #10] 802f20e: 429a cmp r2, r3 802f210: d2f2 bcs.n 802f1f8 if (q == NULL) { return ERR_BUF; } offset = options_idx; offset_max = options_idx_max; options = (u8_t*)q->payload; 802f212: 6878 ldr r0, [r7, #4] 802f214: 9003 str r0, [sp, #12] 802f216: e0db b.n 802f3d0 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) { 802f218: 897b ldrh r3, [r7, #10] 802f21a: 1c50 adds r0, r2, #1 802f21c: 4298 cmp r0, r3 802f21e: da03 bge.n 802f228 len = options[offset + 1]; 802f220: 9803 ldr r0, [sp, #12] 802f222: 1883 adds r3, r0, r2 802f224: 785b ldrb r3, [r3, #1] 802f226: e003 b.n 802f230 } else { len = (q->next != NULL ? ((u8_t*)q->next->payload)[0] : 0); 802f228: 683b ldr r3, [r7, #0] 802f22a: b10b cbz r3, 802f230 802f22c: 685b ldr r3, [r3, #4] 802f22e: 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) { 802f230: 2933 cmp r1, #51 ; 0x33 802f232: d038 beq.n 802f2a6 802f234: d807 bhi.n 802f246 802f236: 2901 cmp r1, #1 802f238: d019 beq.n 802f26e 802f23a: d311 bcc.n 802f260 802f23c: 2903 cmp r1, #3 802f23e: d01d beq.n 802f27c 802f240: 2906 cmp r1, #6 802f242: d155 bne.n 802f2f0 802f244: e021 b.n 802f28a 802f246: 2936 cmp r1, #54 ; 0x36 802f248: d03d beq.n 802f2c6 802f24a: d804 bhi.n 802f256 802f24c: 2934 cmp r1, #52 ; 0x34 802f24e: d031 beq.n 802f2b4 802f250: 2935 cmp r1, #53 ; 0x35 802f252: d14d bne.n 802f2f0 802f254: e035 b.n 802f2c2 802f256: 293a cmp r1, #58 ; 0x3a 802f258: d03c beq.n 802f2d4 802f25a: 293b cmp r1, #59 ; 0x3b 802f25c: d148 bne.n 802f2f0 802f25e: e040 b.n 802f2e2 /* case(DHCP_OPTION_END): handled above */ case(DHCP_OPTION_PAD): /* special option: no len encoded */ decode_len = len = 0; /* will be increased below */ offset--; 802f260: 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; 802f262: 2300 movs r3, #0 /* will be increased below */ offset--; 802f264: 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; 802f266: 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; 802f26a: 461e mov r6, r3 802f26c: e044 b.n 802f2f8 /* will be increased below */ offset--; break; case(DHCP_OPTION_SUBNET_MASK): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802f26e: 2b04 cmp r3, #4 802f270: f040 8143 bne.w 802f4fa 802f274: 461e mov r6, r3 802f276: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_SUBNET_MASK; 802f278: 2406 movs r4, #6 802f27a: e03d b.n 802f2f8 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;); 802f27c: 2b03 cmp r3, #3 802f27e: f240 813c bls.w 802f4fa 802f282: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_ROUTER; 802f284: 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 */ 802f286: 2604 movs r6, #4 802f288: e036 b.n 802f2f8 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;); 802f28a: 0799 lsls r1, r3, #30 802f28c: f040 8135 bne.w 802f4fa /* limit number of DNS servers */ decode_len = LWIP_MIN(len, 4 * DNS_MAX_SERVERS); 802f290: 2b08 cmp r3, #8 802f292: bf34 ite cc 802f294: 461e movcc r6, r3 802f296: 2608 movcs r6, #8 802f298: b2f6 uxtb r6, r6 LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); 802f29a: 42b3 cmp r3, r6 802f29c: f0c0 812d bcc.w 802f4fa 802f2a0: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_DNS_SERVER; 802f2a2: 2408 movs r4, #8 802f2a4: e028 b.n 802f2f8 break; case(DHCP_OPTION_LEASE_TIME): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802f2a6: 2b04 cmp r3, #4 802f2a8: f040 8127 bne.w 802f4fa 802f2ac: 461e mov r6, r3 802f2ae: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_LEASE_TIME; 802f2b0: 2403 movs r4, #3 802f2b2: e021 b.n 802f2f8 break; case(DHCP_OPTION_OVERLOAD): LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); 802f2b4: 2b01 cmp r3, #1 802f2b6: f040 8120 bne.w 802f4fa 802f2ba: 461e mov r6, r3 802f2bc: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_OVERLOAD; 802f2be: 2400 movs r4, #0 802f2c0: e01a b.n 802f2f8 break; case(DHCP_OPTION_MESSAGE_TYPE): LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); 802f2c2: 2b01 cmp r3, #1 802f2c4: e007 b.n 802f2d6 decode_idx = DHCP_OPTION_IDX_MSG_TYPE; break; case(DHCP_OPTION_SERVER_ID): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802f2c6: 2b04 cmp r3, #4 802f2c8: f040 8117 bne.w 802f4fa 802f2cc: 461e mov r6, r3 802f2ce: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_SERVER_ID; 802f2d0: 2402 movs r4, #2 802f2d2: e011 b.n 802f2f8 break; case(DHCP_OPTION_T1): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802f2d4: 2b04 cmp r3, #4 802f2d6: f040 8110 bne.w 802f4fa 802f2da: 461e mov r6, r3 802f2dc: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_T1; 802f2de: 461c mov r4, r3 802f2e0: e00a b.n 802f2f8 break; case(DHCP_OPTION_T2): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802f2e2: 2b04 cmp r3, #4 802f2e4: f040 8109 bne.w 802f4fa 802f2e8: 461e mov r6, r3 802f2ea: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_T2; 802f2ec: 2405 movs r4, #5 802f2ee: e003 b.n 802f2f8 } 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) { 802f2f0: 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; 802f2f2: 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; 802f2f6: 2600 movs r6, #0 LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", op)); break; } offset += len + 2; 802f2f8: 3102 adds r1, #2 802f2fa: fa13 f381 uxtah r3, r3, r1 802f2fe: b29b uxth r3, r3 802f300: 9301 str r3, [sp, #4] if (decode_len > 0) { 802f302: 2e00 cmp r6, #0 802f304: d04f beq.n 802f3a6 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; 802f306: 3202 adds r2, #2 802f308: 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; 802f30a: 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; 802f30c: 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; 802f30e: 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) 802f310: 4a4b ldr r2, [pc, #300] ; (802f440 ) LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", op)); break; } offset += len + 2; if (decode_len > 0) { u32_t value = 0; 802f312: 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) 802f316: 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; 802f31a: 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) 802f31c: 9206 str r2, [sp, #24] 802f31e: 9302 str r3, [sp, #8] 802f320: 9805 ldr r0, [sp, #20] 802f322: 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)) { 802f324: 4a45 ldr r2, [pc, #276] ; (802f43c ) /** * 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) 802f326: 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)) { 802f328: 4844 ldr r0, [pc, #272] ; (802f43c ) 802f32a: 18a2 adds r2, r4, r2 802f32c: 9207 str r2, [sp, #28] 802f32e: 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) 802f330: ebc1 0c06 rsb ip, r1, r6 802f334: b29b uxth r3, r3 802f336: 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)) { 802f33a: 2a00 cmp r2, #0 802f33c: d133 bne.n 802f3a6 copy_len = LWIP_MIN(decode_len, 4); pbuf_copy_partial(q, &value, copy_len, val_offset); 802f33e: f1bc 0f03 cmp.w ip, #3 802f342: bf94 ite ls 802f344: 4662 movls r2, ip 802f346: 2204 movhi r2, #4 802f348: 4638 mov r0, r7 802f34a: 9904 ldr r1, [sp, #16] 802f34c: f8cd c000 str.w ip, [sp] 802f350: f000 feaa bl 80300a8 if (decode_len > 4) { 802f354: f8dd c000 ldr.w ip, [sp] 802f358: f1bc 0f04 cmp.w ip, #4 802f35c: d90f bls.n 802f37e /* decode more than one u32_t */ LWIP_ERROR("decode_len % 4 == 0", decode_len % 4 == 0, return ERR_VAL;); 802f35e: f01c 0f03 tst.w ip, #3 802f362: f040 80ca bne.w 802f4fa dhcp_got_option(dhcp, decode_idx); 802f366: 9907 ldr r1, [sp, #28] dhcp_set_option_value(dhcp, decode_idx, htonl(value)); 802f368: 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); 802f36a: 2201 movs r2, #1 802f36c: 700a strb r2, [r1, #0] dhcp_set_option_value(dhcp, decode_idx, htonl(value)); 802f36e: f7ff fc19 bl 802eba4 802f372: 9b02 ldr r3, [sp, #8] 802f374: 9906 ldr r1, [sp, #24] decode_len -= 4; val_offset += 4; decode_idx++; 802f376: 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)); 802f378: 50c8 str r0, [r1, r3] 802f37a: 3304 adds r3, #4 802f37c: e7cf b.n 802f31e decode_len -= 4; val_offset += 4; decode_idx++; goto decode_next; } else if (decode_len == 4) { 802f37e: d104 bne.n 802f38a value = ntohl(value); 802f380: 9809 ldr r0, [sp, #36] ; 0x24 802f382: f7ff fc11 bl 802eba8 802f386: 9009 str r0, [sp, #36] ; 0x24 802f388: e006 b.n 802f398 } else { LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;); 802f38a: f1bc 0f01 cmp.w ip, #1 802f38e: f040 80b4 bne.w 802f4fa value = ((u8_t*)&value)[0]; 802f392: f89d 3024 ldrb.w r3, [sp, #36] ; 0x24 802f396: 9309 str r3, [sp, #36] ; 0x24 } dhcp_got_option(dhcp, decode_idx); 802f398: 4a28 ldr r2, [pc, #160] ; (802f43c ) dhcp_set_option_value(dhcp, decode_idx, value); 802f39a: 4829 ldr r0, [pc, #164] ; (802f440 ) 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); 802f39c: 2301 movs r3, #1 802f39e: 5513 strb r3, [r2, r4] dhcp_set_option_value(dhcp, decode_idx, value); 802f3a0: 9b09 ldr r3, [sp, #36] ; 0x24 802f3a2: f840 3024 str.w r3, [r0, r4, lsl #2] } } if (offset >= q->len) { 802f3a6: 897b ldrh r3, [r7, #10] 802f3a8: 9901 ldr r1, [sp, #4] 802f3aa: 4299 cmp r1, r3 802f3ac: d30f bcc.n 802f3ce offset -= q->len; 802f3ae: 1aca subs r2, r1, r3 offset_max -= q->len; 802f3b0: 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; 802f3b4: b292 uxth r2, r2 offset_max -= q->len; 802f3b6: fa1f f989 uxth.w r9, r9 if ((offset < offset_max) && offset_max) { 802f3ba: 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; 802f3bc: 9201 str r2, [sp, #4] offset_max -= q->len; if ((offset < offset_max) && offset_max) { 802f3be: d303 bcc.n 802f3c8 break; } } } /* is this an overloaded message? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) { 802f3c0: 4a1e ldr r2, [pc, #120] ; (802f43c ) 802f3c2: 7813 ldrb r3, [r2, #0] 802f3c4: b963 cbnz r3, 802f3e0 802f3c6: e09f b.n 802f508 } if (offset >= q->len) { offset -= q->len; offset_max -= q->len; if ((offset < offset_max) && offset_max) { q = q->next; 802f3c8: 683f ldr r7, [r7, #0] LWIP_ASSERT("next pbuf was null", q); options = (u8_t*)q->payload; 802f3ca: 687b ldr r3, [r7, #4] 802f3cc: 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); 802f3ce: 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)) { 802f3d0: 9803 ldr r0, [sp, #12] 802f3d2: 5c81 ldrb r1, [r0, r2] 802f3d4: 29ff cmp r1, #255 ; 0xff 802f3d6: d0f3 beq.n 802f3c0 802f3d8: 454a cmp r2, r9 802f3da: f4ff af1d bcc.w 802f218 802f3de: e7ef b.n 802f3c0 } } } /* 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); 802f3e0: 4b17 ldr r3, [pc, #92] ; (802f440 ) dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); 802f3e2: 4916 ldr r1, [pc, #88] ; (802f43c ) } } } /* 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); 802f3e4: 681b ldr r3, [r3, #0] dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); 802f3e6: 2200 movs r2, #0 if (overload == DHCP_OVERLOAD_FILE) { 802f3e8: 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); 802f3ea: 700a strb r2, [r1, #0] if (overload == DHCP_OVERLOAD_FILE) { 802f3ec: f000 8093 beq.w 802f516 parse_file_as_options = 1; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded file field\n")); } else if (overload == DHCP_OVERLOAD_SNAME) { 802f3f0: 2b02 cmp r3, #2 802f3f2: f43f aefa beq.w 802f1ea parse_sname_as_options = 1; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname field\n")); } else if (overload == DHCP_OVERLOAD_SNAME_FILE) { 802f3f6: 2b03 cmp r3, #3 802f3f8: f040 8086 bne.w 802f508 802f3fc: e089 b.n 802f512 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); 802f3fe: 4a10 ldr r2, [pc, #64] ; (802f440 ) 802f400: 7911 ldrb r1, [r2, #4] /* message type is DHCP ACK? */ if (msg_type == DHCP_ACK) { 802f402: 2905 cmp r1, #5 802f404: d140 bne.n 802f488 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_ACK received\n")); /* in requesting state? */ if (dhcp->state == DHCP_REQUESTING) { 802f406: f898 100c ldrb.w r1, [r8, #12] 802f40a: 2901 cmp r1, #1 802f40c: d135 bne.n 802f47a * @param netif the netif under DHCP control */ static void dhcp_handle_ack(struct netif *netif) { struct dhcp *dhcp = netif->dhcp; 802f40e: 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)) { 802f410: 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); 802f412: f8c4 b028 str.w fp, [r4, #40] ; 0x28 ip_addr_set_zero(&dhcp->offered_gw_addr); 802f416: 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)) { 802f41a: b10b cbz r3, 802f420 /* remember offered lease time */ dhcp->offered_t0_lease = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_LEASE_TIME); 802f41c: 68d3 ldr r3, [r2, #12] 802f41e: 6323 str r3, [r4, #48] ; 0x30 } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) { 802f420: 4b06 ldr r3, [pc, #24] ; (802f43c ) 802f422: 791a ldrb r2, [r3, #4] 802f424: b112 cbz r2, 802f42c /* remember given renewal period */ dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1); 802f426: 4a06 ldr r2, [pc, #24] ; (802f440 ) 802f428: 6912 ldr r2, [r2, #16] 802f42a: e001 b.n 802f430 } else { /* calculate safe periods for renewal */ dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2; 802f42c: 6b22 ldr r2, [r4, #48] ; 0x30 802f42e: 0852 lsrs r2, r2, #1 } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) { 802f430: 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; 802f432: 6362 str r2, [r4, #52] ; 0x34 } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) { 802f434: b133 cbz r3, 802f444 /* remember given rebind period */ dhcp->offered_t2_rebind = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T2); 802f436: 4b02 ldr r3, [pc, #8] ; (802f440 ) 802f438: 695b ldr r3, [r3, #20] 802f43a: e004 b.n 802f446 802f43c: 2000e268 .word 0x2000e268 802f440: 2000e274 .word 0x2000e274 } else { /* calculate safe periods for rebinding */ dhcp->offered_t2_rebind = dhcp->offered_t0_lease; 802f444: 6b23 ldr r3, [r4, #48] ; 0x30 802f446: 63a3 str r3, [r4, #56] ; 0x38 } /* (y)our internet address */ ip_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); 802f448: 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)) { 802f44a: 4a39 ldr r2, [pc, #228] ; (802f530 ) /* 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); 802f44c: 691b ldr r3, [r3, #16] 802f44e: 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)) { 802f450: 7993 ldrb r3, [r2, #6] 802f452: 4616 mov r6, r2 802f454: b12b cbz r3, 802f462 /* remember given subnet mask */ ip4_addr_set_u32(&dhcp->offered_sn_mask, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SUBNET_MASK))); 802f456: 4b37 ldr r3, [pc, #220] ; (802f534 ) 802f458: 6998 ldr r0, [r3, #24] 802f45a: f7ff fba3 bl 802eba4 dhcp->subnet_mask_given = 1; 802f45e: 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))); 802f460: 62a0 str r0, [r4, #40] ; 0x28 dhcp->subnet_mask_given = 1; } else { dhcp->subnet_mask_given = 0; 802f462: 73a3 strb r3, [r4, #14] } /* gateway router */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_ROUTER)) { 802f464: 79f3 ldrb r3, [r6, #7] 802f466: b123 cbz r3, 802f472 ip4_addr_set_u32(&dhcp->offered_gw_addr, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_ROUTER))); 802f468: 4b32 ldr r3, [pc, #200] ; (802f534 ) 802f46a: 69d8 ldr r0, [r3, #28] 802f46c: f7ff fb9a bl 802eba4 802f470: 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); 802f472: 4628 mov r0, r5 802f474: f7ff fe0a bl 802f08c 802f478: e03f b.n 802f4fa /* 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)) { 802f47a: 3903 subs r1, #3 802f47c: 2902 cmp r1, #2 802f47e: d83c bhi.n 802f4fa dhcp_bind(netif); 802f480: 4628 mov r0, r5 802f482: f7ff fe16 bl 802f0b2 802f486: e038 b.n 802f4fa } } /* received a DHCP_NAK in appropriate state? */ else if ((msg_type == DHCP_NAK) && 802f488: 2906 cmp r1, #6 802f48a: d121 bne.n 802f4d0 802f48c: f898 300c ldrb.w r3, [r8, #12] 802f490: 2b05 cmp r3, #5 802f492: d832 bhi.n 802f4fa 802f494: f998 300c ldrsb.w r3, [r8, #12] 802f498: f04f 42b8 mov.w r2, #1543503872 ; 0x5c000000 802f49c: 409a lsls r2, r3 802f49e: d52c bpl.n 802f4fa { 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); 802f4a0: 4628 mov r0, r5 * @param netif the netif under DHCP control */ static void dhcp_handle_nak(struct netif *netif) { struct dhcp *dhcp = netif->dhcp; 802f4a2: 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); 802f4a4: f000 fc6e bl 802fd84 /* remove IP address from interface */ netif_set_ipaddr(netif, IP_ADDR_ANY); 802f4a8: 4628 mov r0, r5 802f4aa: 4923 ldr r1, [pc, #140] ; (802f538 ) 802f4ac: f000 fbba bl 802fc24 netif_set_gw(netif, IP_ADDR_ANY); 802f4b0: 4628 mov r0, r5 802f4b2: 4921 ldr r1, [pc, #132] ; (802f538 ) 802f4b4: f000 fbf2 bl 802fc9c netif_set_netmask(netif, IP_ADDR_ANY); 802f4b8: 4628 mov r0, r5 802f4ba: 491f ldr r1, [pc, #124] ; (802f538 ) 802f4bc: f000 fbf2 bl 802fca4 /* Change to a defined state */ dhcp_set_state(dhcp, DHCP_BACKING_OFF); 802f4c0: 4620 mov r0, r4 802f4c2: 210c movs r1, #12 802f4c4: f7ff fb72 bl 802ebac /* We can immediately restart discovery */ dhcp_discover(netif); 802f4c8: 4628 mov r0, r5 802f4ca: f7ff fc7f bl 802edcc 802f4ce: e014 b.n 802f4fa (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)) { 802f4d0: 2902 cmp r1, #2 802f4d2: d112 bne.n 802f4fa 802f4d4: f898 100c ldrb.w r1, [r8, #12] 802f4d8: 2906 cmp r1, #6 802f4da: d10e bne.n 802f4fa { 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)) { 802f4dc: 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; 802f4de: 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; 802f4e2: 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)) { 802f4e4: b14b cbz r3, 802f4fa ip4_addr_set_u32(&dhcp->server_ip_addr, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SERVER_ID))); 802f4e6: 6890 ldr r0, [r2, #8] 802f4e8: f7ff fb5c bl 802eba4 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); 802f4ec: 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))); 802f4ee: 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); 802f4f0: 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); 802f4f2: 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); 802f4f4: 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); 802f4f6: f7ff fd57 bl 802efa8 dhcp->request_timeout = 0; /* remember offered lease */ dhcp_handle_offer(netif); } free_pbuf_and_return: dhcp->msg_in = NULL; 802f4fa: 2300 movs r3, #0 802f4fc: f8c8 3008 str.w r3, [r8, #8] pbuf_free(p); 802f500: 4650 mov r0, sl 802f502: f000 fc83 bl 802fe0c 802f506: e010 b.n 802f52a /* 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) { 802f508: f1bb 0f00 cmp.w fp, #0 802f50c: f47f ae6d bne.w 802f1ea 802f510: e005 b.n 802f51e 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; 802f512: 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; 802f516: 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; 802f51a: 226c movs r2, #108 ; 0x6c 802f51c: e66a b.n 802f1f4 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)) { 802f51e: 4b04 ldr r3, [pc, #16] ; (802f530 ) 802f520: 785a ldrb r2, [r3, #1] 802f522: 2a00 cmp r2, #0 802f524: f47f af6b bne.w 802f3fe 802f528: e7e7 b.n 802f4fa dhcp_handle_offer(netif); } free_pbuf_and_return: dhcp->msg_in = NULL; pbuf_free(p); } 802f52a: b00b add sp, #44 ; 0x2c 802f52c: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802f530: 2000e268 .word 0x2000e268 802f534: 2000e274 .word 0x2000e274 802f538: 08045008 .word 0x08045008 0802f53c : * * @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) { 802f53c: b537 push {r0, r1, r2, r4, r5, lr} LWIP_ERROR("netif != NULL", (netif != NULL), return;); 802f53e: 4605 mov r5, r0 802f540: 2800 cmp r0, #0 802f542: d037 beq.n 802f5b4 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)) { 802f544: 6a04 ldr r4, [r0, #32] 802f546: 2c00 cmp r4, #0 802f548: d034 beq.n 802f5b4 802f54a: 7b23 ldrb r3, [r4, #12] 802f54c: 2b08 cmp r3, #8 802f54e: d131 bne.n 802f5b4 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)) { 802f550: 680a ldr r2, [r1, #0] 802f552: 6a63 ldr r3, [r4, #36] ; 0x24 802f554: 429a cmp r2, r3 802f556: d12d bne.n 802f5b4 { 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); 802f558: 4620 mov r0, r4 802f55a: 210c movs r1, #12 802f55c: f7ff fb26 bl 802ebac /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_DECLINE); 802f560: 4628 mov r0, r5 802f562: 4621 mov r1, r4 802f564: 2204 movs r2, #4 802f566: f7ff fb85 bl 802ec74 if (result == ERR_OK) { 802f56a: b9f0 cbnz r0, 802f5aa dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); 802f56c: 2204 movs r2, #4 802f56e: 2132 movs r1, #50 ; 0x32 802f570: 4620 mov r0, r4 802f572: f7ff fb23 bl 802ebbc dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); 802f576: 6a60 ldr r0, [r4, #36] ; 0x24 802f578: f7ff fb16 bl 802eba8 802f57c: 4601 mov r1, r0 802f57e: 4620 mov r0, r4 802f580: f7ff fb43 bl 802ec0a dhcp_option_trailer(dhcp); 802f584: 4620 mov r0, r4 802f586: f7ff fb60 bl 802ec4a /* resize pbuf to reflect true size of options */ pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802f58a: 8b21 ldrh r1, [r4, #24] 802f58c: 6920 ldr r0, [r4, #16] 802f58e: 31f0 adds r1, #240 ; 0xf0 802f590: b289 uxth r1, r1 802f592: f000 fc62 bl 802fe5a /* per section 4.4.4, broadcast DECLINE messages */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802f596: 9500 str r5, [sp, #0] 802f598: 6860 ldr r0, [r4, #4] 802f59a: 6921 ldr r1, [r4, #16] 802f59c: 4a06 ldr r2, [pc, #24] ; (802f5b8 ) 802f59e: 2343 movs r3, #67 ; 0x43 802f5a0: f003 f9f6 bl 8032990 dhcp_delete_msg(dhcp); 802f5a4: 4620 mov r0, r4 802f5a6: f7ff fc05 bl 802edb4 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++; 802f5aa: 7b63 ldrb r3, [r4, #13] 802f5ac: 3301 adds r3, #1 802f5ae: 7363 strb r3, [r4, #13] msecs = 10*1000; dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802f5b0: 2314 movs r3, #20 802f5b2: 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); } } } 802f5b4: bd3e pop {r1, r2, r3, r4, r5, pc} 802f5b6: bf00 nop 802f5b8: 08045004 .word 0x08045004 0802f5bc : * * @param netif network interface which must renew its lease */ err_t dhcp_renew(struct netif *netif) { 802f5bc: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802f5be: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must renew its lease */ err_t dhcp_renew(struct netif *netif) { 802f5c0: 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); 802f5c2: 2105 movs r1, #5 802f5c4: 4620 mov r0, r4 802f5c6: f7ff faf1 bl 802ebac /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 802f5ca: 4628 mov r0, r5 802f5cc: 4621 mov r1, r4 802f5ce: 2203 movs r2, #3 802f5d0: f7ff fb50 bl 802ec74 if (result == ERR_OK) { 802f5d4: 4606 mov r6, r0 802f5d6: b9e0 cbnz r0, 802f612 dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 802f5d8: 2202 movs r2, #2 802f5da: 4620 mov r0, r4 802f5dc: 2139 movs r1, #57 ; 0x39 802f5de: f7ff faed bl 802ebbc dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 802f5e2: 8ca9 ldrh r1, [r5, #36] ; 0x24 802f5e4: 4620 mov r0, r4 802f5e6: f7ff fb00 bl 802ebea #if LWIP_NETIF_HOSTNAME dhcp_option_hostname(dhcp, netif); #endif /* LWIP_NETIF_HOSTNAME */ /* append DHCP message trailer */ dhcp_option_trailer(dhcp); 802f5ea: 4620 mov r0, r4 802f5ec: f7ff fb2d bl 802ec4a pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802f5f0: 8b21 ldrh r1, [r4, #24] 802f5f2: 6920 ldr r0, [r4, #16] 802f5f4: 31f0 adds r1, #240 ; 0xf0 802f5f6: b289 uxth r1, r1 802f5f8: f000 fc2f bl 802fe5a udp_sendto_if(dhcp->pcb, dhcp->p_out, &dhcp->server_ip_addr, DHCP_SERVER_PORT, netif); 802f5fc: 9500 str r5, [sp, #0] 802f5fe: 6860 ldr r0, [r4, #4] 802f600: 6921 ldr r1, [r4, #16] 802f602: f104 0220 add.w r2, r4, #32 802f606: 2343 movs r3, #67 ; 0x43 802f608: f003 f9c2 bl 8032990 dhcp_delete_msg(dhcp); 802f60c: 4620 mov r0, r4 802f60e: f7ff fbd1 bl 802edb4 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++; 802f612: 7b63 ldrb r3, [r4, #13] 802f614: 3301 adds r3, #1 802f616: b2db uxtb r3, r3 /* back-off on retries, but to a maximum of 20 seconds */ msecs = dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000; 802f618: 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++; 802f61a: 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; 802f61c: d804 bhi.n 802f628 802f61e: f44f 62fa mov.w r2, #2000 ; 0x7d0 802f622: 4353 muls r3, r2 802f624: b29b uxth r3, r3 802f626: e001 b.n 802f62c 802f628: f644 6320 movw r3, #20000 ; 0x4e20 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802f62c: f44f 72fa mov.w r2, #500 ; 0x1f4 802f630: f203 13f3 addw r3, r3, #499 ; 0x1f3 802f634: fb93 f3f2 sdiv r3, r3, r2 802f638: 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; } 802f63a: 4630 mov r0, r6 802f63c: bd7c pop {r2, r3, r4, r5, r6, pc} 802f63e: 0000 movs r0, r0 0802f640 : /** * The DHCP timer that checks for lease renewal/rebind timeouts. */ void dhcp_coarse_tmr() { 802f640: b538 push {r3, r4, r5, lr} struct netif *netif = netif_list; 802f642: 4b15 ldr r3, [pc, #84] ; (802f698 ) 802f644: 4d15 ldr r5, [pc, #84] ; (802f69c ) 802f646: 681c ldr r4, [r3, #0] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_coarse_tmr()\n")); /* iterate through all network interfaces */ while (netif != NULL) { 802f648: e023 b.n 802f692 /* only act on DHCP configured interfaces */ if (netif->dhcp != NULL) { 802f64a: 6a23 ldr r3, [r4, #32] 802f64c: b303 cbz r3, 802f690 /* timer is active (non zero), and triggers (zeroes) now? */ if (netif->dhcp->t2_timeout-- == 1) { 802f64e: 8bda ldrh r2, [r3, #30] 802f650: 1e51 subs r1, r2, #1 802f652: 2a01 cmp r2, #1 802f654: 83d9 strh r1, [r3, #30] 802f656: d10b bne.n 802f670 802f658: 7b1a ldrb r2, [r3, #12] 802f65a: 2a0a cmp r2, #10 802f65c: d818 bhi.n 802f690 802f65e: f993 300c ldrsb.w r3, [r3, #12] 802f662: fa15 f303 lsls.w r3, r5, r3 802f666: d513 bpl.n 802f690 /* 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); 802f668: 4620 mov r0, r4 802f66a: f7ff fc0b bl 802ee84 802f66e: e00f b.n 802f690 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) { 802f670: 8b9a ldrh r2, [r3, #28] 802f672: 1e51 subs r1, r2, #1 802f674: 2a01 cmp r2, #1 802f676: 8399 strh r1, [r3, #28] 802f678: d10a bne.n 802f690 802f67a: 7b1a ldrb r2, [r3, #12] 802f67c: 2a0a cmp r2, #10 802f67e: d807 bhi.n 802f690 802f680: f993 300c ldrsb.w r3, [r3, #12] 802f684: fa15 f303 lsls.w r3, r5, r3 802f688: d502 bpl.n 802f690 * 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); 802f68a: 4620 mov r0, r4 802f68c: f7ff ff96 bl 802f5bc /* this clients' renewal timeout triggered */ dhcp_t1_timeout(netif); } } /* proceed to next netif */ netif = netif->next; 802f690: 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) { 802f692: 2c00 cmp r4, #0 802f694: d1d9 bne.n 802f64a } } /* proceed to next netif */ netif = netif->next; } } 802f696: bd38 pop {r3, r4, r5, pc} 802f698: 2000f6b0 .word 0x2000f6b0 802f69c: 44200000 .word 0x44200000 0802f6a0 : * * @param netif network interface which must release its lease */ err_t dhcp_release(struct netif *netif) { 802f6a0: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802f6a2: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must release its lease */ err_t dhcp_release(struct netif *netif) { 802f6a4: 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); 802f6a6: 2100 movs r1, #0 802f6a8: 4620 mov r0, r4 802f6aa: f7ff fa7f bl 802ebac /* clean old DHCP offer */ ip_addr_set_zero(&dhcp->server_ip_addr); 802f6ae: 2300 movs r3, #0 802f6b0: 6223 str r3, [r4, #32] ip_addr_set_zero(&dhcp->offered_ip_addr); 802f6b2: 6263 str r3, [r4, #36] ; 0x24 ip_addr_set_zero(&dhcp->offered_sn_mask); 802f6b4: 62a3 str r3, [r4, #40] ; 0x28 ip_addr_set_zero(&dhcp->offered_gw_addr); 802f6b6: 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; 802f6b8: 63a3 str r3, [r4, #56] ; 0x38 802f6ba: 6363 str r3, [r4, #52] ; 0x34 802f6bc: 6323 str r3, [r4, #48] ; 0x30 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_RELEASE); 802f6be: 4628 mov r0, r5 802f6c0: 4621 mov r1, r4 802f6c2: 2207 movs r2, #7 802f6c4: f7ff fad6 bl 802ec74 if (result == ERR_OK) { 802f6c8: 4606 mov r6, r0 802f6ca: b998 cbnz r0, 802f6f4 dhcp_option_trailer(dhcp); 802f6cc: 4620 mov r0, r4 802f6ce: f7ff fabc bl 802ec4a pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802f6d2: 8b21 ldrh r1, [r4, #24] 802f6d4: 6920 ldr r0, [r4, #16] 802f6d6: 31f0 adds r1, #240 ; 0xf0 802f6d8: b289 uxth r1, r1 802f6da: f000 fbbe bl 802fe5a udp_sendto_if(dhcp->pcb, dhcp->p_out, &dhcp->server_ip_addr, DHCP_SERVER_PORT, netif); 802f6de: 9500 str r5, [sp, #0] 802f6e0: 6860 ldr r0, [r4, #4] 802f6e2: 6921 ldr r1, [r4, #16] 802f6e4: f104 0220 add.w r2, r4, #32 802f6e8: 2343 movs r3, #67 ; 0x43 802f6ea: f003 f951 bl 8032990 dhcp_delete_msg(dhcp); 802f6ee: 4620 mov r0, r4 802f6f0: f7ff fb60 bl 802edb4 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++; 802f6f4: 7b63 ldrb r3, [r4, #13] 802f6f6: 3301 adds r3, #1 802f6f8: b2db uxtb r3, r3 msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802f6fa: 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++; 802f6fc: 7363 strb r3, [r4, #13] msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802f6fe: d804 bhi.n 802f70a 802f700: f44f 727a mov.w r2, #1000 ; 0x3e8 802f704: 4353 muls r3, r2 802f706: b29b uxth r3, r3 802f708: e001 b.n 802f70e 802f70a: f242 7310 movw r3, #10000 ; 0x2710 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802f70e: f44f 72fa mov.w r2, #500 ; 0x1f4 802f712: f203 13f3 addw r3, r3, #499 ; 0x1f3 802f716: fb93 f3f2 sdiv r3, r3, r2 802f71a: 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); 802f71c: 4628 mov r0, r5 802f71e: f000 fb31 bl 802fd84 /* remove IP address from interface */ netif_set_ipaddr(netif, IP_ADDR_ANY); 802f722: 4628 mov r0, r5 802f724: 4906 ldr r1, [pc, #24] ; (802f740 ) 802f726: f000 fa7d bl 802fc24 netif_set_gw(netif, IP_ADDR_ANY); 802f72a: 4628 mov r0, r5 802f72c: 4904 ldr r1, [pc, #16] ; (802f740 ) 802f72e: f000 fab5 bl 802fc9c netif_set_netmask(netif, IP_ADDR_ANY); 802f732: 4628 mov r0, r5 802f734: 4902 ldr r1, [pc, #8] ; (802f740 ) 802f736: f000 fab5 bl 802fca4 return result; } 802f73a: 4630 mov r0, r6 802f73c: bd7c pop {r2, r3, r4, r5, r6, pc} 802f73e: bf00 nop 802f740: 08045008 .word 0x08045008 0802f744 : * 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() { 802f744: b538 push {r3, r4, r5, lr} struct netif *netif = netif_list; 802f746: 4b26 ldr r3, [pc, #152] ; (802f7e0 ) /* 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--; 802f748: 2500 movs r5, #0 * This timer checks whether an outstanding DHCP request is timed out. */ void dhcp_fine_tmr() { struct netif *netif = netif_list; 802f74a: 681c ldr r4, [r3, #0] /* loop through netif's */ while (netif != NULL) { 802f74c: e044 b.n 802f7d8 /* only act on DHCP configured interfaces */ if (netif->dhcp != NULL) { 802f74e: 6a23 ldr r3, [r4, #32] 802f750: 2b00 cmp r3, #0 802f752: d040 beq.n 802f7d6 /* timer is active (non zero), and is about to trigger now */ if (netif->dhcp->request_timeout > 1) { 802f754: 8b5a ldrh r2, [r3, #26] 802f756: 2a01 cmp r2, #1 802f758: d902 bls.n 802f760 netif->dhcp->request_timeout--; 802f75a: 3a01 subs r2, #1 802f75c: 835a strh r2, [r3, #26] 802f75e: e03a b.n 802f7d6 } else if (netif->dhcp->request_timeout == 1) { 802f760: d139 bne.n 802f7d6 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)) { 802f762: 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--; 802f764: 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)) { 802f766: 2a0c cmp r2, #12 802f768: d028 beq.n 802f7bc 802f76a: 2a06 cmp r2, #6 802f76c: d100 bne.n 802f770 802f76e: e025 b.n 802f7bc 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) { 802f770: 2a01 cmp r2, #1 802f772: d106 bne.n 802f782 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REQUESTING, DHCP request timed out\n")); if (dhcp->tries <= 5) { 802f774: 7b5b ldrb r3, [r3, #13] 802f776: 2b05 cmp r3, #5 dhcp_select(netif); 802f778: 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) { 802f77a: d81d bhi.n 802f7b8 dhcp_select(netif); 802f77c: f7ff fc14 bl 802efa8 802f780: e029 b.n 802f7d6 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) { 802f782: 2a08 cmp r2, #8 802f784: d109 bne.n 802f79a LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): CHECKING, ARP request timed out\n")); if (dhcp->tries <= 1) { 802f786: 7b5b ldrb r3, [r3, #13] 802f788: 2b01 cmp r3, #1 dhcp_check(netif); 802f78a: 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) { 802f78c: d802 bhi.n 802f794 dhcp_check(netif); 802f78e: f7ff fc7d bl 802f08c 802f792: e020 b.n 802f7d6 /* 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); 802f794: f7ff fc8d bl 802f0b2 802f798: e01d b.n 802f7d6 } #endif /* DHCP_DOES_ARP_CHECK */ } /* did not get response to renew request? */ else if (dhcp->state == DHCP_RENEWING) { 802f79a: 2a05 cmp r2, #5 802f79c: d103 bne.n 802f7a6 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); 802f79e: 4620 mov r0, r4 802f7a0: f7ff ff0c bl 802f5bc 802f7a4: e017 b.n 802f7d6 /* did not get response to rebind request? */ } else if (dhcp->state == DHCP_REBINDING) { 802f7a6: 2a04 cmp r2, #4 802f7a8: d10a bne.n 802f7c0 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REBINDING, DHCP request timed out\n")); if (dhcp->tries <= 8) { 802f7aa: 7b5b ldrb r3, [r3, #13] 802f7ac: 2b08 cmp r3, #8 dhcp_rebind(netif); 802f7ae: 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) { 802f7b0: d802 bhi.n 802f7b8 dhcp_rebind(netif); 802f7b2: f7ff fb67 bl 802ee84 802f7b6: e00e b.n 802f7d6 } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): RELEASING, DISCOVERING\n")); dhcp_release(netif); 802f7b8: f7ff ff72 bl 802f6a0 dhcp_discover(netif); 802f7bc: 4620 mov r0, r4 802f7be: e008 b.n 802f7d2 } } else if (dhcp->state == DHCP_REBOOTING) { 802f7c0: 2a03 cmp r2, #3 802f7c2: d108 bne.n 802f7d6 if (dhcp->tries < REBOOT_TRIES) { 802f7c4: 7b5b ldrb r3, [r3, #13] 802f7c6: 2b01 cmp r3, #1 dhcp_reboot(netif); 802f7c8: 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) { 802f7ca: d802 bhi.n 802f7d2 dhcp_reboot(netif); 802f7cc: f7ff fb9c bl 802ef08 802f7d0: e001 b.n 802f7d6 } else { dhcp_discover(netif); 802f7d2: f7ff fafb bl 802edcc /* this client's request timeout triggered */ dhcp_timeout(netif); } } /* proceed to next network interface */ netif = netif->next; 802f7d6: 6824 ldr r4, [r4, #0] void dhcp_fine_tmr() { struct netif *netif = netif_list; /* loop through netif's */ while (netif != NULL) { 802f7d8: 2c00 cmp r4, #0 802f7da: d1b8 bne.n 802f74e } } /* proceed to next network interface */ netif = netif->next; } } 802f7dc: bd38 pop {r3, r4, r5, pc} 802f7de: bf00 nop 802f7e0: 2000f6b0 .word 0x2000f6b0 0802f7e4 : * * @param netif The network interface to stop DHCP on */ void dhcp_stop(struct netif *netif) { 802f7e4: b510 push {r4, lr} struct dhcp *dhcp; LWIP_ERROR("dhcp_stop: netif != NULL", (netif != NULL), return;); 802f7e6: b198 cbz r0, 802f810 dhcp = netif->dhcp; /* Remove the flag that says this netif is handled by DHCP. */ netif->flags &= ~NETIF_FLAG_DHCP; 802f7e8: 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; 802f7ec: 6a04 ldr r4, [r0, #32] /* Remove the flag that says this netif is handled by DHCP. */ netif->flags &= ~NETIF_FLAG_DHCP; 802f7ee: f023 0308 bic.w r3, r3, #8 802f7f2: 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) { 802f7f6: b15c cbz r4, 802f810 autoip_stop(netif); dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; } #endif /* LWIP_DHCP_AUTOIP_COOP */ if (dhcp->pcb != NULL) { 802f7f8: 6860 ldr r0, [r4, #4] 802f7fa: b118 cbz r0, 802f804 udp_remove(dhcp->pcb); 802f7fc: f003 f974 bl 8032ae8 dhcp->pcb = NULL; 802f800: 2300 movs r3, #0 802f802: 6063 str r3, [r4, #4] } LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); dhcp_set_state(dhcp, DHCP_OFF); 802f804: 4620 mov r0, r4 802f806: 2100 movs r1, #0 } } 802f808: 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); 802f80c: f7ff b9ce b.w 802ebac 802f810: bd10 pop {r4, pc} 802f812: 0000 movs r0, r0 0802f814 : * - ERR_OK - No error * - ERR_MEM - Out of memory */ err_t dhcp_start(struct netif *netif) { 802f814: b538 push {r3, r4, r5, lr} struct dhcp *dhcp; err_t result = ERR_OK; LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;); 802f816: 4604 mov r4, r0 802f818: b908 cbnz r0, 802f81e 802f81a: 20f2 movs r0, #242 ; 0xf2 802f81c: e047 b.n 802f8ae 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; 802f81e: 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; 802f822: 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; 802f824: f023 0208 bic.w r2, r3, #8 /* check hwtype of the netif */ if ((netif->flags & NETIF_FLAG_ETHARP) == 0) { 802f828: f003 0320 and.w r3, r3, #32 802f82c: 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; 802f82e: f880 202d strb.w r2, [r0, #45] ; 0x2d /* check hwtype of the netif */ if ((netif->flags & NETIF_FLAG_ETHARP) == 0) { 802f832: 2b00 cmp r3, #0 802f834: d0f1 beq.n 802f81a 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) { 802f836: 8c83 ldrh r3, [r0, #36] ; 0x24 802f838: f5b3 7f10 cmp.w r3, #576 ; 0x240 802f83c: d200 bcs.n 802f840 802f83e: e02e b.n 802f89e 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) { 802f840: b935 cbnz r5, 802f850 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): starting new DHCP client\n")); dhcp = (struct dhcp *)mem_malloc(sizeof(struct dhcp)); 802f842: 203c movs r0, #60 ; 0x3c 802f844: f000 f938 bl 802fab8 if (dhcp == NULL) { 802f848: 4605 mov r5, r0 802f84a: b340 cbz r0, 802f89e 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; 802f84c: 6220 str r0, [r4, #32] 802f84e: e003 b.n 802f858 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) { 802f850: 6868 ldr r0, [r5, #4] 802f852: b108 cbz r0, 802f858 udp_remove(dhcp->pcb); 802f854: f003 f948 bl 8032ae8 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)); 802f858: 2100 movs r1, #0 802f85a: 223c movs r2, #60 ; 0x3c 802f85c: 4628 mov r0, r5 802f85e: f7f2 f94f bl 8021b00 /* dhcp_set_state(&dhcp, DHCP_OFF); */ /* allocate UDP PCB */ dhcp->pcb = udp_new(); 802f862: f003 f95d bl 8032b20 802f866: 6068 str r0, [r5, #4] if (dhcp->pcb == NULL) { 802f868: b1c8 cbz r0, 802f89e LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not obtain pcb\n")); return ERR_MEM; } ip_set_option(dhcp->pcb, SOF_BROADCAST); 802f86a: 7a03 ldrb r3, [r0, #8] /* set up local and remote port for the pcb */ udp_bind(dhcp->pcb, IP_ADDR_ANY, DHCP_CLIENT_PORT); 802f86c: 4911 ldr r1, [pc, #68] ; (802f8b4 ) 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); 802f86e: f043 0320 orr.w r3, r3, #32 802f872: 7203 strb r3, [r0, #8] /* set up local and remote port for the pcb */ udp_bind(dhcp->pcb, IP_ADDR_ANY, DHCP_CLIENT_PORT); 802f874: 2244 movs r2, #68 ; 0x44 802f876: 6868 ldr r0, [r5, #4] 802f878: f003 f83a bl 80328f0 udp_connect(dhcp->pcb, IP_ADDR_ANY, DHCP_SERVER_PORT); 802f87c: 490d ldr r1, [pc, #52] ; (802f8b4 ) 802f87e: 6868 ldr r0, [r5, #4] 802f880: 2243 movs r2, #67 ; 0x43 802f882: f003 f8ff bl 8032a84 /* set up the recv callback and argument */ udp_recv(dhcp->pcb, dhcp_recv, netif); 802f886: 6868 ldr r0, [r5, #4] 802f888: 490b ldr r1, [pc, #44] ; (802f8b8 ) 802f88a: 4622 mov r2, r4 802f88c: f003 f928 bl 8032ae0 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): starting DHCP configuration\n")); /* (re)start the DHCP negotiation */ result = dhcp_discover(netif); 802f890: 4620 mov r0, r4 802f892: f7ff fa9b bl 802edcc if (result != ERR_OK) { 802f896: b120 cbz r0, 802f8a2 /* free resources allocated above */ dhcp_stop(netif); 802f898: 4620 mov r0, r4 802f89a: f7ff ffa3 bl 802f7e4 return ERR_MEM; 802f89e: 20ff movs r0, #255 ; 0xff 802f8a0: e005 b.n 802f8ae } /* Set the flag that says this netif is handled by DHCP. */ netif->flags |= NETIF_FLAG_DHCP; 802f8a2: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 802f8a6: f043 0308 orr.w r3, r3, #8 802f8aa: f884 302d strb.w r3, [r4, #45] ; 0x2d return result; } 802f8ae: b240 sxtb r0, r0 802f8b0: bd38 pop {r3, r4, r5, pc} 802f8b2: bf00 nop 802f8b4: 08045008 .word 0x08045008 802f8b8: 0802f171 .word 0x0802f171 0802f8bc : /** * Perform Sanity check of user-configurable values, and initialize all modules. */ void lwip_init(void) { 802f8bc: b508 push {r3, lr} /* Modules initialization */ stats_init(); #if !NO_SYS sys_init(); 802f8be: f008 f8e8 bl 8037a92 #endif /* !NO_SYS */ mem_init(); 802f8c2: f000 f80f bl 802f8e4 memp_init(); 802f8c6: f000 f95b bl 802fb80 pbuf_init(); netif_init(); 802f8ca: f000 f9a9 bl 802fc20 #endif /* LWIP_ARP */ #if LWIP_RAW raw_init(); #endif /* LWIP_RAW */ #if LWIP_UDP udp_init(); 802f8ce: f002 ff49 bl 8032764 #endif /* LWIP_UDP */ #if LWIP_TCP tcp_init(); 802f8d2: f000 fd0d bl 80302f0 #endif /* LWIP_TCP */ #if LWIP_SNMP snmp_init(); 802f8d6: f005 ff0b bl 80356f0 #endif /* LWIP_DNS */ #if LWIP_TIMERS sys_timeouts_init(); #endif /* LWIP_TIMERS */ } 802f8da: e8bd 4008 ldmia.w sp!, {r3, lr} #if LWIP_DNS dns_init(); #endif /* LWIP_DNS */ #if LWIP_TIMERS sys_timeouts_init(); 802f8de: f002 be6b b.w 80325b8 802f8e2: 0000 movs r0, r0 0802f8e4 : 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); 802f8e4: 4b0b ldr r3, [pc, #44] ; (802f914 ) 802f8e6: 4a0c ldr r2, [pc, #48] ; (802f918 ) 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]; 802f8e8: 480c ldr r0, [pc, #48] ; (802f91c ) 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); 802f8ea: f023 0303 bic.w r3, r3, #3 802f8ee: 6013 str r3, [r2, #0] /* initialize the start of the heap */ mem = (struct mem *)(void *)ram; mem->next = MEM_SIZE_ALIGNED; 802f8f0: f44f 51a0 mov.w r1, #5120 ; 0x1400 mem->prev = 0; 802f8f4: 2200 movs r2, #0 802f8f6: 805a strh r2, [r3, #2] mem->used = 0; 802f8f8: 711a strb r2, [r3, #4] /* initialize the end of the heap */ ram_end = (struct mem *)(void *)&ram[MEM_SIZE_ALIGNED]; 802f8fa: 185a adds r2, r3, r1 802f8fc: 6002 str r2, [r0, #0] ram_end->used = 1; 802f8fe: 2001 movs r0, #1 802f900: 7110 strb r0, [r2, #4] ram_end->next = MEM_SIZE_ALIGNED; ram_end->prev = MEM_SIZE_ALIGNED; 802f902: 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; 802f904: 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) { 802f906: 4806 ldr r0, [pc, #24] ; (802f920 ) 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; 802f908: 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; 802f90a: 4a06 ldr r2, [pc, #24] ; (802f924 ) 802f90c: 6013 str r3, [r2, #0] MEM_STATS_AVAIL(avail, MEM_SIZE_ALIGNED); if(sys_mutex_new(&mem_mutex) != ERR_OK) { 802f90e: f008 b88d b.w 8037a2c 802f912: bf00 nop 802f914: 2000e29f .word 0x2000e29f 802f918: 20000d50 .word 0x20000d50 802f91c: 20000d48 .word 0x20000d48 802f920: 20000d4c .word 0x20000d4c 802f924: 20000d44 .word 0x20000d44 0802f928 : * @param rmem is the data portion of a struct mem as returned by a previous * call to mem_malloc() */ void mem_free(void *rmem) { 802f928: b570 push {r4, r5, r6, lr} struct mem *mem; LWIP_MEM_FREE_DECL_PROTECT(); if (rmem == NULL) { 802f92a: 4604 mov r4, r0 802f92c: 2800 cmp r0, #0 802f92e: d04c beq.n 802f9ca 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) { 802f930: 4b26 ldr r3, [pc, #152] ; (802f9cc ) 802f932: 681b ldr r3, [r3, #0] 802f934: 4298 cmp r0, r3 802f936: d303 bcc.n 802f940 802f938: 4b25 ldr r3, [pc, #148] ; (802f9d0 ) 802f93a: 681b ldr r3, [r3, #0] 802f93c: 4298 cmp r0, r3 802f93e: d305 bcc.n 802f94c 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); 802f940: f008 f8c2 bl 8037ac8 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(); } 802f944: 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); 802f948: f008 b8c8 b.w 8037adc return; } /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); 802f94c: 4821 ldr r0, [pc, #132] ; (802f9d4 ) 802f94e: f008 f879 bl 8037a44 /* 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; 802f952: 2300 movs r3, #0 802f954: f804 3c04 strb.w r3, [r4, #-4] if (mem < lfree) { 802f958: 4b1f ldr r3, [pc, #124] ; (802f9d8 ) 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]; 802f95a: 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) { 802f95e: 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); 802f960: 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) { 802f964: 428a cmp r2, r1 /* the newly freed struct is now the lowest */ lfree = mem; 802f966: bf38 it cc 802f968: 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]; 802f96a: 4b18 ldr r3, [pc, #96] ; (802f9cc ) 802f96c: 681b ldr r3, [r3, #0] 802f96e: 1819 adds r1, r3, r0 if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) { 802f970: 428a cmp r2, r1 802f972: d011 beq.n 802f998 802f974: 790d ldrb r5, [r1, #4] 802f976: b97d cbnz r5, 802f998 802f978: 4d15 ldr r5, [pc, #84] ; (802f9d0 ) 802f97a: 682d ldr r5, [r5, #0] 802f97c: 42a9 cmp r1, r5 802f97e: d00b beq.n 802f998 /* if mem->next is unused and not end of ram, combine mem and mem->next */ if (lfree == nmem) { 802f980: 4d15 ldr r5, [pc, #84] ; (802f9d8 ) 802f982: 682e ldr r6, [r5, #0] 802f984: 428e cmp r6, r1 lfree = mem; } mem->next = nmem->next; 802f986: 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; 802f988: bf08 it eq 802f98a: 602a streq r2, [r5, #0] } mem->next = nmem->next; 802f98c: f824 1c08 strh.w r1, [r4, #-8] ((struct mem *)(void *)&ram[nmem->next])->prev = (mem_size_t)((u8_t *)mem - ram); 802f990: 5a19 ldrh r1, [r3, r0] 802f992: 1859 adds r1, r3, r1 802f994: 1ad0 subs r0, r2, r3 802f996: 8048 strh r0, [r1, #2] } /* plug hole backward */ pmem = (struct mem *)(void *)&ram[mem->prev]; 802f998: f834 0c06 ldrh.w r0, [r4, #-6] 802f99c: 1819 adds r1, r3, r0 if (pmem != mem && pmem->used == 0) { 802f99e: 4291 cmp r1, r2 802f9a0: d00e beq.n 802f9c0 802f9a2: 790d ldrb r5, [r1, #4] 802f9a4: b965 cbnz r5, 802f9c0 /* if mem->prev is unused, combine mem and mem->prev */ if (lfree == mem) { 802f9a6: 4d0c ldr r5, [pc, #48] ; (802f9d8 ) 802f9a8: 682e ldr r6, [r5, #0] 802f9aa: 4296 cmp r6, r2 lfree = pmem; } pmem->next = mem->next; 802f9ac: 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; 802f9b0: bf08 it eq 802f9b2: 6029 streq r1, [r5, #0] } pmem->next = mem->next; 802f9b4: 521a strh r2, [r3, r0] ((struct mem *)(void *)&ram[mem->next])->prev = (mem_size_t)((u8_t *)pmem - ram); 802f9b6: f834 2c08 ldrh.w r2, [r4, #-8] 802f9ba: 189a adds r2, r3, r2 802f9bc: 1acb subs r3, r1, r3 802f9be: 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(); 802f9c0: 4804 ldr r0, [pc, #16] ; (802f9d4 ) } 802f9c2: 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(); 802f9c6: f008 b849 b.w 8037a5c 802f9ca: bd70 pop {r4, r5, r6, pc} 802f9cc: 20000d50 .word 0x20000d50 802f9d0: 20000d48 .word 0x20000d48 802f9d4: 20000d4c .word 0x20000d4c 802f9d8: 20000d44 .word 0x20000d44 0802f9dc : * 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) { 802f9dc: 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); 802f9e0: 3103 adds r1, #3 802f9e2: f64f 75fc movw r5, #65532 ; 0xfffc 802f9e6: 400d ands r5, r1 if(newsize < MIN_SIZE_ALIGNED) { 802f9e8: 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) { 802f9ea: 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) { 802f9ec: d903 bls.n 802f9f6 /* every data block must be at least MIN_SIZE_ALIGNED long */ newsize = MIN_SIZE_ALIGNED; } if (newsize > MEM_SIZE_ALIGNED) { 802f9ee: f5b5 5fa0 cmp.w r5, #5120 ; 0x1400 802f9f2: d901 bls.n 802f9f8 802f9f4: e053 b.n 802fa9e 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; 802f9f6: 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) { 802f9f8: f8df 80b8 ldr.w r8, [pc, #184] ; 802fab4 802f9fc: f8d8 3000 ldr.w r3, [r8] 802fa00: 429c cmp r4, r3 802fa02: d303 bcc.n 802fa0c 802fa04: 4a28 ldr r2, [pc, #160] ; (802faa8 ) 802fa06: 6812 ldr r2, [r2, #0] 802fa08: 4294 cmp r4, r2 802fa0a: d304 bcc.n 802fa16 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); 802fa0c: f008 f85c bl 8037ac8 MEM_STATS_INC(illegal); SYS_ARCH_UNPROTECT(lev); 802fa10: f008 f864 bl 8037adc return rmem; 802fa14: e044 b.n 802faa0 } /* Get the corresponding struct mem ... */ mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); 802fa16: 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; 802fa1a: 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); 802fa1e: 1af6 subs r6, r6, r3 size = mem->next - ptr - SIZEOF_STRUCT_MEM; 802fa20: 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); 802fa22: b2b6 uxth r6, r6 size = mem->next - ptr - SIZEOF_STRUCT_MEM; 802fa24: 1bbf subs r7, r7, r6 802fa26: b2bf uxth r7, r7 LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size); if (newsize > size) { 802fa28: 42bd cmp r5, r7 802fa2a: d838 bhi.n 802fa9e /* not supported */ return NULL; } if (newsize == size) { 802fa2c: d038 beq.n 802faa0 /* No change in size, simply return */ return rmem; } /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); 802fa2e: 481f ldr r0, [pc, #124] ; (802faac ) 802fa30: f008 f808 bl 8037a44 mem2 = (struct mem *)(void *)&ram[mem->next]; 802fa34: f8d8 3000 ldr.w r3, [r8] 802fa38: f834 1c08 ldrh.w r1, [r4, #-8] 802fa3c: 185a adds r2, r3, r1 if(mem2->used == 0) { 802fa3e: 7910 ldrb r0, [r2, #4] 802fa40: b978 cbnz r0, 802fa62 /* The next struct is unused, we can simply move it at little */ mem_size_t next; /* remember the old next pointer */ next = mem2->next; 802fa42: 5a5f ldrh r7, [r3, r1] /* create new struct mem which is moved directly after the shrinked mem */ ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; 802fa44: f106 0108 add.w r1, r6, #8 802fa48: 186d adds r5, r5, r1 if (lfree == mem2) { 802fa4a: 4919 ldr r1, [pc, #100] ; (802fab0 ) 802fa4c: 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; 802fa4e: b2ad uxth r5, r5 if (lfree == mem2) { 802fa50: 4290 cmp r0, r2 802fa52: eb03 0205 add.w r2, r3, r5 lfree = (struct mem *)(void *)&ram[ptr2]; 802fa56: bf08 it eq 802fa58: 600a streq r2, [r1, #0] } mem2 = (struct mem *)(void *)&ram[ptr2]; mem2->used = 0; 802fa5a: 2100 movs r1, #0 802fa5c: 7111 strb r1, [r2, #4] /* restore the next pointer */ mem2->next = next; 802fa5e: 535f strh r7, [r3, r5] 802fa60: e010 b.n 802fa84 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) { 802fa62: f105 0214 add.w r2, r5, #20 802fa66: 42ba cmp r2, r7 802fa68: d815 bhi.n 802fa96 * @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) { 802fa6a: 4811 ldr r0, [pc, #68] ; (802fab0 ) * 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; 802fa6c: f106 0208 add.w r2, r6, #8 802fa70: 18ad adds r5, r5, r2 mem2 = (struct mem *)(void *)&ram[ptr2]; if (mem2 < lfree) { 802fa72: 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; 802fa74: b2ad uxth r5, r5 mem2 = (struct mem *)(void *)&ram[ptr2]; 802fa76: 195a adds r2, r3, r5 if (mem2 < lfree) { 802fa78: 42ba cmp r2, r7 lfree = mem2; 802fa7a: bf38 it cc 802fa7c: 6002 strcc r2, [r0, #0] } mem2->used = 0; mem2->next = mem->next; 802fa7e: 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; 802fa80: 2000 movs r0, #0 802fa82: 7110 strb r0, [r2, #4] mem2->next = mem->next; mem2->prev = ptr; 802fa84: 8056 strh r6, [r2, #2] mem->next = ptr2; 802fa86: f824 5c08 strh.w r5, [r4, #-8] if (mem2->next != MEM_SIZE_ALIGNED) { 802fa8a: 5b5a ldrh r2, [r3, r5] 802fa8c: f5b2 5fa0 cmp.w r2, #5120 ; 0x1400 ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; 802fa90: bf1c itt ne 802fa92: 189b addne r3, r3, r2 802fa94: 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(); 802fa96: 4805 ldr r0, [pc, #20] ; (802faac ) 802fa98: f007 ffe0 bl 8037a5c return rmem; 802fa9c: e000 b.n 802faa0 /* every data block must be at least MIN_SIZE_ALIGNED long */ newsize = MIN_SIZE_ALIGNED; } if (newsize > MEM_SIZE_ALIGNED) { return NULL; 802fa9e: 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; } 802faa0: 4620 mov r0, r4 802faa2: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802faa6: bf00 nop 802faa8: 20000d48 .word 0x20000d48 802faac: 20000d4c .word 0x20000d4c 802fab0: 20000d44 .word 0x20000d44 802fab4: 20000d50 .word 0x20000d50 0802fab8 : * * Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT). */ void * mem_malloc(mem_size_t size) { 802fab8: 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) { 802faba: 2800 cmp r0, #0 802fabc: d056 beq.n 802fb6c return NULL; } /* Expand the size of the allocated memory region so that we can adjust for alignment. */ size = LWIP_MEM_ALIGN_SIZE(size); 802fabe: 3003 adds r0, #3 802fac0: f64f 74fc movw r4, #65532 ; 0xfffc 802fac4: 4004 ands r4, r0 if(size < MIN_SIZE_ALIGNED) { 802fac6: 2c0b cmp r4, #11 802fac8: d903 bls.n 802fad2 /* every data block must be at least MIN_SIZE_ALIGNED long */ size = MIN_SIZE_ALIGNED; } if (size > MEM_SIZE_ALIGNED) { 802faca: f5b4 5fa0 cmp.w r4, #5120 ; 0x1400 802face: d901 bls.n 802fad4 802fad0: e04b b.n 802fb6a 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; 802fad2: 240c movs r4, #12 if (size > MEM_SIZE_ALIGNED) { return NULL; } /* protect the heap from concurrent access */ sys_mutex_lock(&mem_mutex); 802fad4: 4826 ldr r0, [pc, #152] ; (802fb70 ) 802fad6: f007 ffb5 bl 8037a44 #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; 802fada: 4b26 ldr r3, [pc, #152] ; (802fb74 ) 802fadc: 6819 ldr r1, [r3, #0] 802fade: 4b26 ldr r3, [pc, #152] ; (802fb78 ) 802fae0: 681a ldr r2, [r3, #0] 802fae2: 1a8b subs r3, r1, r2 802fae4: b29b uxth r3, r3 802fae6: f5c4 5ea0 rsb lr, r4, #5120 ; 0x1400 802faea: e039 b.n 802fb60 ptr = ((struct mem *)(void *)&ram[ptr])->next) { mem = (struct mem *)(void *)&ram[ptr]; 802faec: 18d5 adds r5, r2, r3 local_mem_free_count = 1; break; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if ((!mem->used) && 802faee: 792f ldrb r7, [r5, #4] 802faf0: 2f00 cmp r7, #0 802faf2: d134 bne.n 802fb5e (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) { 802faf4: 5ad6 ldrh r6, [r2, r3] 802faf6: f1a6 0008 sub.w r0, r6, #8 802fafa: 1ac0 subs r0, r0, r3 local_mem_free_count = 1; break; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if ((!mem->used) && 802fafc: 42a0 cmp r0, r4 802fafe: d32e bcc.n 802fb5e (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)) { 802fb00: f104 0e14 add.w lr, r4, #20 802fb04: 4570 cmp r0, lr 802fb06: d310 bcc.n 802fb2a * 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; 802fb08: 3408 adds r4, #8 802fb0a: 191c adds r4, r3, r4 802fb0c: b2a4 uxth r4, r4 /* create mem2 struct */ mem2 = (struct mem *)(void *)&ram[ptr2]; 802fb0e: 1910 adds r0, r2, r4 mem2->used = 0; mem2->next = mem->next; 802fb10: 5316 strh r6, [r2, r4] mem2->prev = ptr; 802fb12: 8043 strh r3, [r0, #2] /* and insert it between mem and mem->next */ mem->next = ptr2; 802fb14: 802c strh r4, [r5, #0] mem->used = 1; 802fb16: 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; 802fb18: 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; 802fb1a: 712b strb r3, [r5, #4] if (mem2->next != MEM_SIZE_ALIGNED) { 802fb1c: 5b13 ldrh r3, [r2, r4] 802fb1e: f5b3 5fa0 cmp.w r3, #5120 ; 0x1400 802fb22: d004 beq.n 802fb2e ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; 802fb24: 18d2 adds r2, r2, r3 802fb26: 8054 strh r4, [r2, #2] 802fb28: e001 b.n 802fb2e * 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; 802fb2a: 2301 movs r3, #1 802fb2c: 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) { 802fb2e: 428d cmp r5, r1 802fb30: d10f bne.n 802fb52 struct mem *cur = lfree; /* Find next free block after mem and update lowest free pointer */ while (cur->used && cur != ram_end) { 802fb32: 4b12 ldr r3, [pc, #72] ; (802fb7c ) 802fb34: 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]; 802fb36: 4b10 ldr r3, [pc, #64] ; (802fb78 ) 802fb38: 6819 ldr r1, [r3, #0] 802fb3a: 462b mov r3, r5 802fb3c: e001 b.n 802fb42 802fb3e: 881b ldrh r3, [r3, #0] 802fb40: 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) { 802fb42: 7918 ldrb r0, [r3, #4] 802fb44: b910 cbnz r0, 802fb4c goto mem_malloc_adjust_lfree; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ cur = (struct mem *)(void *)&ram[cur->next]; } lfree = cur; 802fb46: 4a0b ldr r2, [pc, #44] ; (802fb74 ) 802fb48: 6013 str r3, [r2, #0] 802fb4a: e002 b.n 802fb52 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) { 802fb4c: 4293 cmp r3, r2 802fb4e: d1f6 bne.n 802fb3e 802fb50: e7f9 b.n 802fb46 } lfree = cur; LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used))); } LWIP_MEM_ALLOC_UNPROTECT(); sys_mutex_unlock(&mem_mutex); 802fb52: 4807 ldr r0, [pc, #28] ; (802fb70 ) 802fb54: f007 ff82 bl 8037a5c 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; 802fb58: f105 0008 add.w r0, r5, #8 802fb5c: 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) { 802fb5e: 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; 802fb60: 4573 cmp r3, lr 802fb62: dbc3 blt.n 802faec } 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); 802fb64: 4802 ldr r0, [pc, #8] ; (802fb70 ) 802fb66: f007 ff79 bl 8037a5c 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; 802fb6a: 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; } 802fb6c: bdf8 pop {r3, r4, r5, r6, r7, pc} 802fb6e: bf00 nop 802fb70: 20000d4c .word 0x20000d4c 802fb74: 20000d44 .word 0x20000d44 802fb78: 20000d50 .word 0x20000d50 802fb7c: 20000d48 .word 0x20000d48 0802fb80 : 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); 802fb80: 4a0e ldr r2, [pc, #56] ; (802fbbc ) 802fb82: 490f ldr r1, [pc, #60] ; (802fbc0 ) * * Carves out memp_memory into linked lists for each pool-type. */ void memp_init(void) { 802fb84: 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); 802fb86: 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) { 802fb88: 4e0e ldr r6, [pc, #56] ; (802fbc4 ) memp->next = memp_tab[i]; memp_tab[i] = memp; memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + memp_sizes[i] 802fb8a: 4f0f ldr r7, [pc, #60] ; (802fbc8 ) 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); 802fb8c: 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; 802fb90: 461d mov r5, r3 802fb92: 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) { 802fb96: f833 c006 ldrh.w ip, [r3, r6] 802fb9a: 2000 movs r0, #0 802fb9c: e008 b.n 802fbb0 memp->next = memp_tab[i]; 802fb9e: f851 4c04 ldr.w r4, [r1, #-4] 802fba2: 6014 str r4, [r2, #0] memp_tab[i] = memp; memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + memp_sizes[i] 802fba4: 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; 802fba6: 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) { 802fbaa: 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] 802fbac: 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) { 802fbae: b280 uxth r0, r0 802fbb0: 4560 cmp r0, ip 802fbb2: d1f4 bne.n 802fb9e 802fbb4: 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) { 802fbb6: 2b20 cmp r3, #32 802fbb8: d1eb bne.n 802fb92 #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 */ } 802fbba: bdf0 pop {r4, r5, r6, r7, pc} 802fbbc: 20000d57 .word 0x20000d57 802fbc0: 2000c394 .word 0x2000c394 802fbc4: 08044fa0 .word 0x08044fa0 802fbc8: 08044fc0 .word 0x08044fc0 0802fbcc : #endif { struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); 802fbcc: 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 { 802fbce: b538 push {r3, r4, r5, lr} 802fbd0: 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;); 802fbd2: d80b bhi.n 802fbec SYS_ARCH_PROTECT(old_level); 802fbd4: f007 ff78 bl 8037ac8 #if MEMP_OVERFLOW_CHECK >= 2 memp_overflow_check_all(); #endif /* MEMP_OVERFLOW_CHECK >= 2 */ memp = memp_tab[type]; 802fbd8: 4b06 ldr r3, [pc, #24] ; (802fbf4 ) 802fbda: f853 4025 ldr.w r4, [r3, r5, lsl #2] if (memp != NULL) { 802fbde: b114 cbz r4, 802fbe6 memp_tab[type] = memp->next; 802fbe0: 6822 ldr r2, [r4, #0] 802fbe2: 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); 802fbe6: f007 ff79 bl 8037adc return memp; 802fbea: e000 b.n 802fbee #endif { struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); 802fbec: 2400 movs r4, #0 } SYS_ARCH_UNPROTECT(old_level); return memp; } 802fbee: 4620 mov r0, r4 802fbf0: bd38 pop {r3, r4, r5, pc} 802fbf2: bf00 nop 802fbf4: 2000c394 .word 0x2000c394 0802fbf8 : * @param type the pool where to put mem * @param mem the memp element to free */ void memp_free(memp_t type, void *mem) { 802fbf8: b538 push {r3, r4, r5, lr} 802fbfa: 4605 mov r5, r0 struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); if (mem == NULL) { 802fbfc: 460c mov r4, r1 802fbfe: b159 cbz r1, 802fc18 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); 802fc00: f007 ff62 bl 8037ac8 #endif /* MEMP_OVERFLOW_CHECK >= 2 */ #endif /* MEMP_OVERFLOW_CHECK */ MEMP_STATS_DEC(used, type); memp->next = memp_tab[type]; 802fc04: 4b05 ldr r3, [pc, #20] ; (802fc1c ) 802fc06: f853 2025 ldr.w r2, [r3, r5, lsl #2] 802fc0a: 6022 str r2, [r4, #0] memp_tab[type] = memp; 802fc0c: 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); } 802fc10: 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); 802fc14: f007 bf62 b.w 8037adc 802fc18: bd38 pop {r3, r4, r5, pc} 802fc1a: bf00 nop 802fc1c: 2000c394 .word 0x2000c394 0802fc20 : } #endif /* LWIP_HAVE_LOOPIF */ void netif_init(void) { 802fc20: 4770 bx lr 802fc22: 0000 movs r0, r0 0802fc24 : * @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) { 802fc24: b570 push {r4, r5, r6, lr} 802fc26: 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) { 802fc28: 460d mov r5, r1 802fc2a: b941 cbnz r1, 802fc3e ip_addr_set(&(lpcb->local_ip), ipaddr); } } } #endif snmp_delete_ipaddridx_tree(netif); 802fc2c: 4620 mov r0, r4 802fc2e: f004 fed7 bl 80349e0 snmp_delete_iprteidx_tree(0,netif); 802fc32: 2000 movs r0, #0 802fc34: 4621 mov r1, r4 802fc36: f004 ff69 bl 8034b0c /* set new IP address to netif */ ip_addr_set(&(netif->ip_addr), ipaddr); 802fc3a: b9fd cbnz r5, 802fc7c 802fc3c: e01f b.n 802fc7e #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) { 802fc3e: 680a ldr r2, [r1, #0] 802fc40: 6843 ldr r3, [r0, #4] 802fc42: 429a cmp r2, r3 802fc44: d0f2 beq.n 802fc2c /* 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; 802fc46: 4b13 ldr r3, [pc, #76] ; (802fc94 ) 802fc48: 6818 ldr r0, [r3, #0] while (pcb != NULL) { 802fc4a: e007 b.n 802fc5c /* PCB bound to current local interface address? */ if (ip_addr_cmp(&(pcb->local_ip), &(netif->ip_addr)) 802fc4c: 6802 ldr r2, [r0, #0] 802fc4e: 6863 ldr r3, [r4, #4] 802fc50: 68c6 ldr r6, [r0, #12] 802fc52: 429a cmp r2, r3 802fc54: d101 bne.n 802fc5a #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); 802fc56: f000 fe0b bl 8030870 pcb = next; } else { pcb = pcb->next; 802fc5a: 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) { 802fc5c: 2800 cmp r0, #0 802fc5e: d1f5 bne.n 802fc4c pcb = next; } else { pcb = pcb->next; } } for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 802fc60: 4b0d ldr r3, [pc, #52] ; (802fc98 ) 802fc62: 681b ldr r3, [r3, #0] 802fc64: e007 b.n 802fc76 /* PCB bound to current local interface address? */ if ((!(ip_addr_isany(&(lpcb->local_ip)))) && 802fc66: 681a ldr r2, [r3, #0] 802fc68: b122 cbz r2, 802fc74 802fc6a: 6861 ldr r1, [r4, #4] 802fc6c: 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); 802fc6e: bf04 itt eq 802fc70: 682a ldreq r2, [r5, #0] 802fc72: 601a streq r2, [r3, #0] pcb = next; } else { pcb = pcb->next; } } for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 802fc74: 68db ldr r3, [r3, #12] 802fc76: 2b00 cmp r3, #0 802fc78: d1f5 bne.n 802fc66 802fc7a: e7d7 b.n 802fc2c } #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); 802fc7c: 682d ldr r5, [r5, #0] snmp_insert_ipaddridx_tree(netif); 802fc7e: 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); 802fc80: 6065 str r5, [r4, #4] snmp_insert_ipaddridx_tree(netif); 802fc82: f004 fe6b bl 803495c snmp_insert_iprteidx_tree(0,netif); 802fc86: 2000 movs r0, #0 802fc88: 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))); } 802fc8a: 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); 802fc8e: f004 bef1 b.w 8034a74 802fc92: bf00 nop 802fc94: 2000f6bc .word 0x2000f6bc 802fc98: 2000f6c4 .word 0x2000f6c4 0802fc9c : * @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); 802fc9c: b101 cbz r1, 802fca0 802fc9e: 6809 ldr r1, [r1, #0] 802fca0: 60c1 str r1, [r0, #12] 802fca2: 4770 bx lr 0802fca4 : * @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) { 802fca4: b538 push {r3, r4, r5, lr} 802fca6: 4604 mov r4, r0 802fca8: 460d mov r5, r1 snmp_delete_iprteidx_tree(0, netif); 802fcaa: 2000 movs r0, #0 802fcac: 4621 mov r1, r4 802fcae: f004 ff2d bl 8034b0c /* set new netmask to netif */ ip_addr_set(&(netif->netmask), netmask); 802fcb2: b105 cbz r5, 802fcb6 802fcb4: 682d ldr r5, [r5, #0] snmp_insert_iprteidx_tree(0, netif); 802fcb6: 2000 movs r0, #0 802fcb8: 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); 802fcba: 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))); } 802fcbc: 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); 802fcc0: f004 bed8 b.w 8034a74 0802fcc4 : * @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) { 802fcc4: b570 push {r4, r5, r6, lr} 802fcc6: 4605 mov r5, r0 802fcc8: 4616 mov r6, r2 802fcca: 461c mov r4, r3 netif_set_ipaddr(netif, ipaddr); 802fccc: f7ff ffaa bl 802fc24 netif_set_netmask(netif, netmask); 802fcd0: 4628 mov r0, r5 802fcd2: 4631 mov r1, r6 802fcd4: f7ff ffe6 bl 802fca4 * @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); 802fcd8: b104 cbz r4, 802fcdc 802fcda: 6824 ldr r4, [r4, #0] 802fcdc: 60ec str r4, [r5, #12] 802fcde: bd70 pop {r4, r5, r6, pc} 0802fce0 : * @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) { 802fce0: 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; 802fce2: 9e06 ldr r6, [sp, #24] 802fce4: 61c6 str r6, [r0, #28] netif->num = netif_num++; 802fce6: 4e10 ldr r6, [pc, #64] ; (802fd28 ) 802fce8: 7837 ldrb r7, [r6, #0] 802fcea: f880 7030 strb.w r7, [r0, #48] ; 0x30 802fcee: 3701 adds r7, #1 802fcf0: 7037 strb r7, [r6, #0] netif->input = input; 802fcf2: 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); 802fcf4: 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) { 802fcf6: 4604 mov r4, r0 LWIP_ASSERT("No init function given", init != NULL); /* reset new interface configuration state */ ip_addr_set_zero(&netif->ip_addr); 802fcf8: 6045 str r5, [r0, #4] ip_addr_set_zero(&netif->netmask); 802fcfa: 6085 str r5, [r0, #8] ip_addr_set_zero(&netif->gw); 802fcfc: 60c5 str r5, [r0, #12] netif->flags = 0; 802fcfe: f880 502d strb.w r5, [r0, #45] ; 0x2d #if LWIP_DHCP /* netif not under DHCP control by default */ netif->dhcp = NULL; 802fd02: 6205 str r5, [r0, #32] #endif /* ENABLE_LOOPBACK */ /* remember netif specific state information data */ netif->state = state; netif->num = netif_num++; netif->input = input; 802fd04: 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); 802fd06: f7ff ffdd bl 802fcc4 /* call user specified initialization function for netif */ if (init(netif) != ERR_OK) { 802fd0a: 4620 mov r0, r4 802fd0c: 9b07 ldr r3, [sp, #28] 802fd0e: 4798 blx r3 802fd10: b930 cbnz r0, 802fd20 return NULL; } /* add this netif to the list */ netif->next = netif_list; 802fd12: 4b06 ldr r3, [pc, #24] ; (802fd2c ) 802fd14: 681a ldr r2, [r3, #0] 802fd16: 6022 str r2, [r4, #0] netif_list = netif; 802fd18: 601c str r4, [r3, #0] snmp_inc_iflist(); 802fd1a: f004 fd03 bl 8034724 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; 802fd1e: e000 b.n 802fd22 netif_set_addr(netif, ipaddr, netmask, gw); /* call user specified initialization function for netif */ if (init(netif) != ERR_OK) { return NULL; 802fd20: 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; } 802fd22: 4620 mov r0, r4 802fd24: bdf8 pop {r3, r4, r5, r6, r7, pc} 802fd26: bf00 nop 802fd28: 2000c3d4 .word 0x2000c3d4 802fd2c: 2000f6b0 .word 0x2000f6b0 0802fd30 : * * @param netif the default network interface */ void netif_set_default(struct netif *netif) { 802fd30: b510 push {r4, lr} if (netif == NULL) { 802fd32: 4604 mov r4, r0 /* remove default route */ snmp_delete_iprteidx_tree(1, netif); 802fd34: 4621 mov r1, r4 802fd36: 2001 movs r0, #1 * @param netif the default network interface */ void netif_set_default(struct netif *netif) { if (netif == NULL) { 802fd38: b914 cbnz r4, 802fd40 /* remove default route */ snmp_delete_iprteidx_tree(1, netif); 802fd3a: f004 fee7 bl 8034b0c 802fd3e: e001 b.n 802fd44 } else { /* install default route */ snmp_insert_iprteidx_tree(1, netif); 802fd40: f004 fe98 bl 8034a74 } netif_default = netif; 802fd44: 4b01 ldr r3, [pc, #4] ; (802fd4c ) 802fd46: 601c str r4, [r3, #0] 802fd48: bd10 pop {r4, pc} 802fd4a: bf00 nop 802fd4c: 2000f6b4 .word 0x2000f6b4 0802fd50 : * up once configured. * * @see dhcp_start() */ void netif_set_up(struct netif *netif) { 802fd50: b510 push {r4, lr} if (!(netif->flags & NETIF_FLAG_UP)) { 802fd52: f890 302d ldrb.w r3, [r0, #45] ; 0x2d 802fd56: 07da lsls r2, r3, #31 * up once configured. * * @see dhcp_start() */ void netif_set_up(struct netif *netif) { 802fd58: 4604 mov r4, r0 if (!(netif->flags & NETIF_FLAG_UP)) { 802fd5a: d412 bmi.n 802fd82 netif->flags |= NETIF_FLAG_UP; 802fd5c: f043 0301 orr.w r3, r3, #1 802fd60: f880 302d strb.w r3, [r0, #45] ; 0x2d #if LWIP_SNMP snmp_get_sysuptime(&netif->ts); 802fd64: 3038 adds r0, #56 ; 0x38 802fd66: f004 fc77 bl 8034658 * @note: Enabling DHCP on a down interface will make it come * up once configured. * * @see dhcp_start() */ void netif_set_up(struct netif *netif) 802fd6a: 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)) { 802fd6e: f003 0330 and.w r3, r3, #48 ; 0x30 802fd72: 2b30 cmp r3, #48 ; 0x30 802fd74: d105 bne.n 802fd82 etharp_gratuitous(netif); 802fd76: 4620 mov r0, r4 802fd78: 1d21 adds r1, r4, #4 igmp_report_groups( netif); } #endif /* LWIP_IGMP */ } } } 802fd7a: 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); 802fd7e: f007 b9c9 b.w 8037114 802fd82: bd10 pop {r4, pc} 0802fd84 : * up once configured. * * @see dhcp_start() */ void netif_set_down(struct netif *netif) { 802fd84: b510 push {r4, lr} if (netif->flags & NETIF_FLAG_UP) { 802fd86: f890 302d ldrb.w r3, [r0, #45] ; 0x2d 802fd8a: 07d9 lsls r1, r3, #31 * up once configured. * * @see dhcp_start() */ void netif_set_down(struct netif *netif) { 802fd8c: 4604 mov r4, r0 if (netif->flags & NETIF_FLAG_UP) { 802fd8e: d511 bpl.n 802fdb4 netif->flags &= ~NETIF_FLAG_UP; 802fd90: f023 0301 bic.w r3, r3, #1 802fd94: f880 302d strb.w r3, [r0, #45] ; 0x2d #if LWIP_SNMP snmp_get_sysuptime(&netif->ts); 802fd98: 3038 adds r0, #56 ; 0x38 802fd9a: f004 fc5d bl 8034658 #endif #if LWIP_ARP if (netif->flags & NETIF_FLAG_ETHARP) { 802fd9e: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 802fda2: f003 0320 and.w r3, r3, #32 802fda6: b2db uxtb r3, r3 802fda8: b123 cbz r3, 802fdb4 etharp_cleanup_netif(netif); 802fdaa: 4620 mov r0, r4 } #endif /* LWIP_ARP */ NETIF_STATUS_CALLBACK(netif); } } 802fdac: 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); 802fdb0: f007 b980 b.w 80370b4 802fdb4: bd10 pop {r4, pc} 0802fdb6 : * @return non-zero on failure, zero on success. * */ u8_t pbuf_header(struct pbuf *p, s16_t header_size_increment) { 802fdb6: 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)) { 802fdb8: b321 cbz r1, 802fe04 802fdba: b330 cbz r0, 802fe0a return 0; } if (header_size_increment < 0){ 802fdbc: 2900 cmp r1, #0 802fdbe: da05 bge.n 802fdcc increment_magnitude = -header_size_increment; 802fdc0: 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;); 802fdc2: 8942 ldrh r2, [r0, #10] if ((header_size_increment == 0) || (p == NULL)) { return 0; } if (header_size_increment < 0){ increment_magnitude = -header_size_increment; 802fdc4: 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;); 802fdc6: 429a cmp r2, r3 802fdc8: d201 bcs.n 802fdce 802fdca: e01d b.n 802fe08 } else { increment_magnitude = header_size_increment; 802fdcc: 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; 802fdce: 7b02 ldrb r2, [r0, #12] /* remember current payload pointer */ payload = p->payload; 802fdd0: 6844 ldr r4, [r0, #4] /* pbuf types containing payloads? */ if (type == PBUF_RAM || type == PBUF_POOL) { 802fdd2: b10a cbz r2, 802fdd8 802fdd4: 2a03 cmp r2, #3 802fdd6: d105 bne.n 802fde4 /* set new payload pointer */ p->payload = (u8_t *)p->payload - header_size_increment; 802fdd8: 1a64 subs r4, r4, r1 /* boundary check fails? */ if ((u8_t *)p->payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) { 802fdda: f100 0310 add.w r3, r0, #16 802fdde: 429c cmp r4, r3 802fde0: d312 bcc.n 802fe08 802fde2: e008 b.n 802fdf6 p->payload = payload; /* bail out unsuccesfully */ return 1; } /* pbuf types refering to external payloads? */ } else if (type == PBUF_REF || type == PBUF_ROM) { 802fde4: 3a01 subs r2, #1 802fde6: 2a01 cmp r2, #1 802fde8: d80e bhi.n 802fe08 /* hide a header in the payload? */ if ((header_size_increment < 0) && (increment_magnitude <= p->len)) { 802fdea: 2900 cmp r1, #0 802fdec: da0c bge.n 802fe08 802fdee: 8942 ldrh r2, [r0, #10] 802fdf0: 429a cmp r2, r3 802fdf2: d309 bcc.n 802fe08 /* increase payload pointer */ p->payload = (u8_t *)p->payload - header_size_increment; 802fdf4: 1a64 subs r4, r4, r1 /* Unknown type */ LWIP_ASSERT("bad pbuf type", 0); return 1; } /* modify pbuf length fields */ p->len += header_size_increment; 802fdf6: 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; 802fdf8: 6044 str r4, [r0, #4] /* Unknown type */ LWIP_ASSERT("bad pbuf type", 0); return 1; } /* modify pbuf length fields */ p->len += header_size_increment; 802fdfa: 18cb adds r3, r1, r3 802fdfc: 8143 strh r3, [r0, #10] p->tot_len += header_size_increment; 802fdfe: 8903 ldrh r3, [r0, #8] 802fe00: 18c9 adds r1, r1, r3 802fe02: 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; 802fe04: 2000 movs r0, #0 802fe06: 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;); 802fe08: 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; } 802fe0a: bd10 pop {r4, pc} 0802fe0c : * 1->1->1 becomes ....... * */ u8_t pbuf_free(struct pbuf *p) { 802fe0c: b570 push {r4, r5, r6, lr} u16_t type; struct pbuf *q; u8_t count; if (p == NULL) { 802fe0e: 4604 mov r4, r0 802fe10: b300 cbz r0, 802fe54 802fe12: 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); 802fe14: f007 fe58 bl 8037ac8 /* 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); 802fe18: 89e6 ldrh r6, [r4, #14] 802fe1a: 3e01 subs r6, #1 802fe1c: b2b6 uxth r6, r6 802fe1e: 81e6 strh r6, [r4, #14] SYS_ARCH_UNPROTECT(old_level); 802fe20: f007 fe5c bl 8037adc /* this pbuf is no longer referenced to? */ if (ref == 0) { 802fe24: b9be cbnz r6, 802fe56 /* 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; 802fe26: 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; 802fe28: 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) { 802fe2a: 2b03 cmp r3, #3 802fe2c: d101 bne.n 802fe32 memp_free(MEMP_PBUF_POOL, p); 802fe2e: 200f movs r0, #15 802fe30: e003 b.n 802fe3a /* is this a ROM or RAM referencing pbuf? */ } else if (type == PBUF_ROM || type == PBUF_REF) { 802fe32: 3b01 subs r3, #1 802fe34: 2b01 cmp r3, #1 802fe36: d804 bhi.n 802fe42 memp_free(MEMP_PBUF, p); 802fe38: 200e movs r0, #14 802fe3a: 4621 mov r1, r4 802fe3c: f7ff fedc bl 802fbf8 802fe40: e002 b.n 802fe48 /* type == PBUF_RAM */ } else { mem_free(p); 802fe42: 4620 mov r0, r4 802fe44: f7ff fd70 bl 802f928 } } count++; 802fe48: 3501 adds r5, #1 802fe4a: 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) { 802fe4c: 4634 mov r4, r6 802fe4e: 2e00 cmp r6, #0 802fe50: d1e0 bne.n 802fe14 802fe52: e000 b.n 802fe56 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; 802fe54: 4605 mov r5, r0 } } PERF_STOP("pbuf_free"); /* return number of de-allocated pbufs */ return count; } 802fe56: 4628 mov r0, r5 802fe58: bd70 pop {r4, r5, r6, pc} 0802fe5a : * * @note Despite its name, pbuf_realloc cannot grow the size of a pbuf (chain). */ void pbuf_realloc(struct pbuf *p, u16_t new_len) { 802fe5a: 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) { 802fe5c: 8903 ldrh r3, [r0, #8] 802fe5e: 4299 cmp r1, r3 802fe60: d220 bcs.n 802fea4 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; 802fe62: 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) { 802fe64: 460d mov r5, r1 802fe66: 4604 mov r4, r0 802fe68: e005 b.n 802fe76 /* decrease remaining length by pbuf length */ rem_len -= q->len; 802fe6a: 1aed subs r5, r5, r3 /* decrease total length indicator */ LWIP_ASSERT("grow < max_u16_t", grow < 0xffff); q->tot_len += (u16_t)grow; 802fe6c: 8923 ldrh r3, [r4, #8] 802fe6e: 18d3 adds r3, r2, r3 802fe70: 8123 strh r3, [r4, #8] /* proceed to next pbuf in chain */ q = q->next; 802fe72: 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; 802fe74: 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) { 802fe76: 8963 ldrh r3, [r4, #10] 802fe78: 429d cmp r5, r3 802fe7a: d8f6 bhi.n 802fe6a /* 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)) { 802fe7c: 7b22 ldrb r2, [r4, #12] 802fe7e: b94a cbnz r2, 802fe94 802fe80: 429d cmp r5, r3 802fe82: d007 beq.n 802fe94 /* 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); 802fe84: 6863 ldr r3, [r4, #4] 802fe86: 1b1b subs r3, r3, r4 802fe88: 18e9 adds r1, r5, r3 802fe8a: 4620 mov r0, r4 802fe8c: b289 uxth r1, r1 802fe8e: f7ff fda5 bl 802f9dc 802fe92: 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) { 802fe94: 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; 802fe96: 8165 strh r5, [r4, #10] q->tot_len = q->len; 802fe98: 8125 strh r5, [r4, #8] /* any remaining pbufs in chain? */ if (q->next != NULL) { 802fe9a: b108 cbz r0, 802fea0 /* free remaining pbufs in chain */ pbuf_free(q->next); 802fe9c: f7ff ffb6 bl 802fe0c } /* q is last packet in chain */ q->next = NULL; 802fea0: 2300 movs r3, #0 802fea2: 6023 str r3, [r4, #0] 802fea4: bd38 pop {r3, r4, r5, pc} 0802fea6 : * @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) { 802fea6: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 802feaa: 460d mov r5, r1 802feac: 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) { 802feae: 2803 cmp r0, #3 802feb0: d87c bhi.n 802ffac 802feb2: e8df f000 tbb [pc, r0] 802feb6: 0802 .short 0x0802 802feb8: 0604 .short 0x0604 case PBUF_TRANSPORT: /* add room for transport (often TCP) layer header */ offset = PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN; 802feba: 2636 movs r6, #54 ; 0x36 802febc: e004 b.n 802fec8 /* 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; 802febe: 260e movs r6, #14 break; 802fec0: e002 b.n 802fec8 case PBUF_RAW: offset = 0; 802fec2: 2600 movs r6, #0 break; 802fec4: e000 b.n 802fec8 /* 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; 802fec6: 2622 movs r6, #34 ; 0x22 default: LWIP_ASSERT("pbuf_alloc: bad pbuf layer", 0); return NULL; } switch (type) { 802fec8: 2f03 cmp r7, #3 802feca: d86f bhi.n 802ffac 802fecc: e8df f007 tbb [pc, r7] 802fed0: 025e5e46 .word 0x025e5e46 case PBUF_POOL: /* allocate head of pbuf chain into p */ p = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); 802fed4: 200f movs r0, #15 802fed6: f7ff fe79 bl 802fbcc LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc: allocated pbuf %p\n", (void *)p)); if (p == NULL) { 802feda: 4604 mov r4, r0 802fedc: b900 cbnz r0, 802fee0 802fede: e065 b.n 802ffac } 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))); 802fee0: 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)); 802fee2: 3603 adds r6, #3 802fee4: 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))); 802fee8: 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)); 802feea: 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; 802feee: 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))); 802fef0: 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)); 802fef4: 3604 adds r6, #4 802fef6: 42ae cmp r6, r5 802fef8: bfa8 it ge 802fefa: 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; 802fefc: 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))); 802fefe: 6042 str r2, [r0, #4] if (p == NULL) { PBUF_POOL_IS_EMPTY(); return NULL; } p->type = type; p->next = NULL; 802ff00: 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; 802ff02: 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)); 802ff04: 8146 strh r6, [r0, #10] if (p == NULL) { PBUF_POOL_IS_EMPTY(); return NULL; } p->type = type; p->next = NULL; 802ff06: 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; 802ff08: 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; 802ff0a: 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; 802ff0c: 1bae subs r6, r5, r6 /* any remaining pbufs to be allocated? */ while (rem_len > 0) { 802ff0e: 4607 mov r7, r0 802ff10: 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); 802ff12: f240 6903 movw r9, #1539 ; 0x603 802ff16: 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) { 802ff1a: e01c b.n 802ff56 q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); 802ff1c: 200f movs r0, #15 802ff1e: f7ff fe55 bl 802fbcc if (q == NULL) { 802ff22: 4605 mov r5, r0 802ff24: b918 cbnz r0, 802ff2e PBUF_POOL_IS_EMPTY(); /* free chain so far allocated */ pbuf_free(p); 802ff26: 4620 mov r0, r4 802ff28: f7ff ff70 bl 802fe0c 802ff2c: e03e b.n 802ffac /* bail out unsuccesfully */ return NULL; } q->type = type; 802ff2e: 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); 802ff30: f100 0210 add.w r2, r0, #16 /* free chain so far allocated */ pbuf_free(p); /* bail out unsuccesfully */ return NULL; } q->type = type; 802ff34: 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; 802ff36: b2b3 uxth r3, r6 802ff38: 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); 802ff3a: 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); 802ff3c: 454b cmp r3, r9 802ff3e: bf88 it hi 802ff40: 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; 802ff42: 2201 movs r2, #1 /* bail out unsuccesfully */ return NULL; } q->type = type; q->flags = 0; q->next = NULL; 802ff44: f8c0 8000 str.w r8, [r0] pbuf_free(p); /* bail out unsuccesfully */ return NULL; } q->type = type; q->flags = 0; 802ff48: f880 800d strb.w r8, [r0, #13] q->next = NULL; /* make previous pbuf point to this pbuf */ r->next = q; 802ff4c: 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); 802ff4e: 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; 802ff50: 81c2 strh r2, [r0, #14] /* calculate remaining length to be allocated */ rem_len -= q->len; 802ff52: 1af6 subs r6, r6, r3 802ff54: 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) { 802ff56: 2e00 cmp r6, #0 802ff58: dce0 bgt.n 802ff1c 802ff5a: e022 b.n 802ffa2 /*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)); 802ff5c: f106 0013 add.w r0, r6, #19 802ff60: 1ceb adds r3, r5, #3 802ff62: f023 0303 bic.w r3, r3, #3 802ff66: f020 0003 bic.w r0, r0, #3 802ff6a: 18c0 adds r0, r0, r3 802ff6c: b280 uxth r0, r0 802ff6e: f7ff fda3 bl 802fab8 if (p == NULL) { 802ff72: 4604 mov r4, r0 802ff74: b1d0 cbz r0, 802ffac return NULL; } /* Set up internal structure of the pbuf. */ p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)); 802ff76: 1986 adds r6, r0, r6 802ff78: 3613 adds r6, #19 p->len = p->tot_len = length; p->next = NULL; 802ff7a: 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)); 802ff7c: f026 0603 bic.w r6, r6, #3 802ff80: 6046 str r6, [r0, #4] p->len = p->tot_len = length; 802ff82: 8105 strh r5, [r0, #8] 802ff84: 8145 strh r5, [r0, #10] p->next = NULL; 802ff86: 6003 str r3, [r0, #0] p->type = type; 802ff88: 7303 strb r3, [r0, #12] 802ff8a: e00a b.n 802ffa2 /* 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); 802ff8c: 200e movs r0, #14 802ff8e: f7ff fe1d bl 802fbcc if (p == NULL) { 802ff92: 4604 mov r4, r0 802ff94: b150 cbz r0, 802ffac ("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; 802ff96: 2300 movs r3, #0 802ff98: 6043 str r3, [r0, #4] p->len = p->tot_len = length; 802ff9a: 8105 strh r5, [r0, #8] 802ff9c: 8145 strh r5, [r0, #10] p->next = NULL; 802ff9e: 6003 str r3, [r0, #0] p->type = type; 802ffa0: 7307 strb r7, [r0, #12] default: LWIP_ASSERT("pbuf_alloc: erroneous type", 0); return NULL; } /* set reference count */ p->ref = 1; 802ffa2: 2301 movs r3, #1 802ffa4: 81e3 strh r3, [r4, #14] /* set flags */ p->flags = 0; 802ffa6: 2300 movs r3, #0 802ffa8: 7363 strb r3, [r4, #13] LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p)); return p; 802ffaa: e000 b.n 802ffae p->next = NULL; p->type = type; break; default: LWIP_ASSERT("pbuf_alloc: erroneous type", 0); return NULL; 802ffac: 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; } 802ffae: 4620 mov r0, r4 802ffb0: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 0802ffb4 : * @return the number of pbufs in a chain */ u8_t pbuf_clen(struct pbuf *p) { 802ffb4: 4603 mov r3, r0 u8_t len; len = 0; 802ffb6: 2000 movs r0, #0 while (p != NULL) { 802ffb8: e002 b.n 802ffc0 ++len; 802ffba: 3001 adds r0, #1 p = p->next; 802ffbc: 681b ldr r3, [r3, #0] { u8_t len; len = 0; while (p != NULL) { ++len; 802ffbe: b2c0 uxtb r0, r0 pbuf_clen(struct pbuf *p) { u8_t len; len = 0; while (p != NULL) { 802ffc0: 2b00 cmp r3, #0 802ffc2: d1fa bne.n 802ffba ++len; p = p->next; } return len; } 802ffc4: 4770 bx lr 0802ffc6 : * @param p pbuf to increase reference counter of * */ void pbuf_ref(struct pbuf *p) { 802ffc6: b510 push {r4, lr} SYS_ARCH_DECL_PROTECT(old_level); /* pbuf given? */ if (p != NULL) { 802ffc8: 4604 mov r4, r0 802ffca: b140 cbz r0, 802ffde SYS_ARCH_PROTECT(old_level); 802ffcc: f007 fd7c bl 8037ac8 ++(p->ref); 802ffd0: 89e3 ldrh r3, [r4, #14] 802ffd2: 3301 adds r3, #1 802ffd4: 81e3 strh r3, [r4, #14] SYS_ARCH_UNPROTECT(old_level); } } 802ffd6: 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); 802ffda: f007 bd7f b.w 8037adc 802ffde: bd10 pop {r4, pc} 0802ffe0 : * @see pbuf_chain() */ void pbuf_cat(struct pbuf *h, struct pbuf *t) { 802ffe0: b510 push {r4, lr} struct pbuf *p; LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)", 802ffe2: b168 cbz r0, 8030000 802ffe4: b161 cbz r1, 8030000 802ffe6: e003 b.n 802fff0 ((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; 802ffe8: 8904 ldrh r4, [r0, #8] 802ffea: 191b adds r3, r3, r4 802ffec: 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) { 802ffee: 4610 mov r0, r2 802fff0: 6802 ldr r2, [r0, #0] 802fff2: 890b ldrh r3, [r1, #8] 802fff4: 2a00 cmp r2, #0 802fff6: d1f7 bne.n 802ffe8 } /* { 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; 802fff8: 8902 ldrh r2, [r0, #8] /* chain last pbuf of head (p) with first of tail (t) */ p->next = t; 802fffa: 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; 802fffc: 189b adds r3, r3, r2 802fffe: 8103 strh r3, [r0, #8] 8030000: bd10 pop {r4, pc} 08030002 : * The ->ref field of the first pbuf of the tail chain is adjusted. * */ void pbuf_chain(struct pbuf *h, struct pbuf *t) { 8030002: b510 push {r4, lr} 8030004: 460c mov r4, r1 pbuf_cat(h, t); 8030006: f7ff ffeb bl 802ffe0 /* t is now referenced by h */ pbuf_ref(t); 803000a: 4620 mov r0, r4 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t)); } 803000c: 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); 8030010: f7ff bfd9 b.w 802ffc6 08030014 : * 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) { 8030014: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8030018: 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) && 803001a: 4605 mov r5, r0 803001c: b908 cbnz r0, 8030022 803001e: 20f2 movs r0, #242 ; 0xf2 8030020: e03f b.n 80300a2 8030022: 2900 cmp r1, #0 8030024: d0fb beq.n 803001e 8030026: 8902 ldrh r2, [r0, #8] 8030028: 890b ldrh r3, [r1, #8] 803002a: 429a cmp r2, r3 803002c: d3f7 bcc.n 803001e 803002e: 2600 movs r6, #0 8030030: 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)) { 8030032: f8b4 800a ldrh.w r8, [r4, #10] 8030036: 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); 8030038: 6861 ldr r1, [r4, #4] 803003a: 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)) { 803003c: ebc6 0808 rsb r8, r6, r8 8030040: 1bdb subs r3, r3, r7 8030042: 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; 8030044: bfb4 ite lt 8030046: 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; 803004a: 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); 803004e: 19c0 adds r0, r0, r7 8030050: 1989 adds r1, r1, r6 8030052: 4642 mov r2, r8 8030054: f7f1 fc9a bl 802198c offset_to += len; offset_from += len; 8030058: 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) { 803005a: 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; 803005c: 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) { 803005e: 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; 8030060: 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) { 8030062: 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; 8030064: bf98 it ls 8030066: 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; 8030068: 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; 803006a: bf98 it ls 803006c: 2600 movls r6, #0 p_from = p_from->next; } if (offset_to == p_to->len) { 803006e: 42bb cmp r3, r7 8030070: d105 bne.n 803007e /* on to next p_to (if any) */ offset_to = 0; p_to = p_to->next; 8030072: 682d ldr r5, [r5, #0] LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL) , return ERR_ARG;); 8030074: b915 cbnz r5, 803007c 8030076: 2c00 cmp r4, #0 8030078: d1d1 bne.n 803001e 803007a: e00f b.n 803009c offset_from = 0; p_from = p_from->next; } if (offset_to == p_to->len) { /* on to next p_to (if any) */ offset_to = 0; 803007c: 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)) { 803007e: b12c cbz r4, 803008c 8030080: 8962 ldrh r2, [r4, #10] 8030082: 8923 ldrh r3, [r4, #8] 8030084: 429a cmp r2, r3 8030086: d101 bne.n 803008c /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!\n", 8030088: 6823 ldr r3, [r4, #0] 803008a: b94b cbnz r3, 80300a0 (p_from->next == NULL), return ERR_VAL;); } if((p_to != NULL) && (p_to->len == p_to->tot_len)) { 803008c: 896a ldrh r2, [r5, #10] 803008e: 892b ldrh r3, [r5, #8] 8030090: 429a cmp r2, r3 8030092: d101 bne.n 8030098 /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!\n", 8030094: 682b ldr r3, [r5, #0] 8030096: b91b cbnz r3, 80300a0 (p_to->next == NULL), return ERR_VAL;); } } while (p_from); 8030098: 2c00 cmp r4, #0 803009a: d1ca bne.n 8030032 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n")); return ERR_OK; 803009c: 4620 mov r0, r4 803009e: e000 b.n 80300a2 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", 80300a0: 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; } 80300a2: b240 sxtb r0, r0 80300a4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 080300a8 : * @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) { 80300a8: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 80300ac: 4688 mov r8, r1 80300ae: 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;); 80300b0: b328 cbz r0, 80300fe LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;); 80300b2: b331 cbz r1, 8030102 80300b4: 2400 movs r4, #0 80300b6: 4605 mov r5, r0 80300b8: 46a1 mov r9, r4 80300ba: e01c b.n 80300f6 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)) { 80300bc: b12b cbz r3, 80300ca 80300be: 896a ldrh r2, [r5, #10] 80300c0: 4293 cmp r3, r2 80300c2: d302 bcc.n 80300ca /* don't copy from this buffer -> on to the next */ offset -= p->len; 80300c4: 1a9b subs r3, r3, r2 80300c6: b29b uxth r3, r3 80300c8: e014 b.n 80300f4 } else { /* copy from this buffer. maybe only partially. */ buf_copy_len = p->len - offset; 80300ca: 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); 80300cc: 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; 80300ce: 1aff subs r7, r7, r3 80300d0: b2bf uxth r7, r7 80300d2: 42b7 cmp r7, r6 80300d4: bf28 it cs 80300d6: 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); 80300d8: eb08 0009 add.w r0, r8, r9 80300dc: 18c9 adds r1, r1, r3 80300de: 463a mov r2, r7 copied_total += buf_copy_len; 80300e0: 193c adds r4, r7, r4 left += buf_copy_len; 80300e2: 44b9 add r9, r7 len -= buf_copy_len; 80300e4: 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); 80300e6: f7f1 fc51 bl 802198c copied_total += buf_copy_len; 80300ea: b2a4 uxth r4, r4 left += buf_copy_len; 80300ec: fa1f f989 uxth.w r9, r9 len -= buf_copy_len; 80300f0: b2b6 uxth r6, r6 offset = 0; 80300f2: 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) { 80300f4: 682d ldr r5, [r5, #0] 80300f6: b12e cbz r6, 8030104 80300f8: 2d00 cmp r5, #0 80300fa: d1df bne.n 80300bc 80300fc: e002 b.n 8030104 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;); 80300fe: 4604 mov r4, r0 8030100: e000 b.n 8030104 8030102: 460c mov r4, r1 len -= buf_copy_len; offset = 0; } } return copied_total; } 8030104: 4620 mov r0, r4 8030106: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 803010a: 0000 movs r0, r0 0803010c : * caller). * */ u8_t raw_input(struct pbuf *p, struct netif *inp) { 803010c: 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); 8030110: 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))) { 8030112: f8df a074 ldr.w sl, [pc, #116] ; 8030188 u8_t eaten = 0; LWIP_UNUSED_ARG(inp); iphdr = (struct ip_hdr *)p->payload; proto = IPH_PROTO(iphdr); 8030116: f893 9009 ldrb.w r9, [r3, #9] prev = NULL; pcb = raw_pcbs; 803011a: 4b19 ldr r3, [pc, #100] ; (8030180 ) * caller). * */ u8_t raw_input(struct pbuf *p, struct netif *inp) { 803011c: 4606 mov r6, r0 iphdr = (struct ip_hdr *)p->payload; proto = IPH_PROTO(iphdr); prev = NULL; pcb = raw_pcbs; 803011e: 681c ldr r4, [r3, #0] LWIP_UNUSED_ARG(inp); iphdr = (struct ip_hdr *)p->payload; proto = IPH_PROTO(iphdr); prev = NULL; 8030120: 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; 8030122: 4698 mov r8, r3 8030124: e023 b.n 803016e 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) && 8030126: 7c23 ldrb r3, [r4, #16] 8030128: 454b cmp r3, r9 803012a: d118 bne.n 803015e (ip_addr_isany(&pcb->local_ip) || 803012c: 6823 ldr r3, [r4, #0] 803012e: b11b cbz r3, 8030138 8030130: f8da 2000 ldr.w r2, [sl] 8030134: 4293 cmp r3, r2 8030136: d112 bne.n 803015e /* 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) { 8030138: 6967 ldr r7, [r4, #20] 803013a: b187 cbz r7, 803015e /* the receive callback function did not eat the packet? */ if (pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr()) != 0) { 803013c: 69a0 ldr r0, [r4, #24] 803013e: 4b11 ldr r3, [pc, #68] ; (8030184 ) 8030140: 4621 mov r1, r4 8030142: 4632 mov r2, r6 8030144: 47b8 blx r7 8030146: b150 cbz r0, 803015e /* receive function ate the packet */ p = NULL; eaten = 1; if (prev != NULL) { 8030148: b15d cbz r5, 8030162 /* move the pcb to the front of raw_pcbs so that is found faster next time */ prev->next = pcb->next; 803014a: 68e3 ldr r3, [r4, #12] 803014c: 60eb str r3, [r5, #12] pcb->next = raw_pcbs; 803014e: f8d8 3000 ldr.w r3, [r8] raw_pcbs = pcb; 8030152: 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; 8030156: 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; 8030158: 2600 movs r6, #0 eaten = 1; 803015a: 2301 movs r3, #1 803015c: e003 b.n 8030166 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) || 803015e: 2300 movs r3, #0 8030160: e001 b.n 8030166 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; 8030162: 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; 8030164: 462e mov r6, r5 /* no receive callback function was set for this raw PCB */ } /* drop the packet */ } prev = pcb; pcb = pcb->next; 8030166: 68e2 ldr r2, [r4, #12] 8030168: 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)) { 803016a: b92b cbnz r3, 8030178 /* no receive callback function was set for this raw PCB */ } /* drop the packet */ } prev = pcb; pcb = pcb->next; 803016c: 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)) { 803016e: 2c00 cmp r4, #0 8030170: d1d9 bne.n 8030126 8030172: 4620 mov r0, r4 8030174: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 8030178: 2001 movs r0, #1 } prev = pcb; pcb = pcb->next; } return eaten; } 803017a: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 803017e: bf00 nop 8030180: 2000c3d8 .word 0x2000c3d8 8030184: 2000f6dc .word 0x2000f6dc 8030188: 2000f6e4 .word 0x2000f6e4 0803018c : * @see raw_disconnect() */ err_t raw_bind(struct raw_pcb *pcb, ip_addr_t *ipaddr) { ip_addr_set(&pcb->local_ip, ipaddr); 803018c: b101 cbz r1, 8030190 803018e: 6809 ldr r1, [r1, #0] 8030190: 6001 str r1, [r0, #0] return ERR_OK; } 8030192: 2000 movs r0, #0 8030194: 4770 bx lr 08030196 : * @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); 8030196: b101 cbz r1, 803019a 8030198: 6809 ldr r1, [r1, #0] 803019a: 6041 str r1, [r0, #4] return ERR_OK; } 803019c: 2000 movs r0, #0 803019e: 4770 bx lr 080301a0 : */ void raw_recv(struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg) { /* remember recv() callback and user data */ pcb->recv = recv; 80301a0: 6141 str r1, [r0, #20] pcb->recv_arg = recv_arg; 80301a2: 6182 str r2, [r0, #24] 80301a4: 4770 bx lr 080301a6 : * @param ipaddr the destination address of the IP packet * */ err_t raw_sendto(struct raw_pcb *pcb, struct pbuf *p, ip_addr_t *ipaddr) { 80301a6: b5f0 push {r4, r5, r6, r7, lr} 80301a8: 4605 mov r5, r0 80301aa: b085 sub sp, #20 80301ac: 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)) { 80301ae: 4608 mov r0, r1 80301b0: 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) { 80301b2: 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)) { 80301b4: f7ff fdff bl 802fdb6 80301b8: b170 cbz r0, 80301d8 /* allocate header in new pbuf */ q = pbuf_alloc(PBUF_IP, 0, PBUF_RAM); 80301ba: 2100 movs r1, #0 80301bc: 2001 movs r0, #1 80301be: 460a mov r2, r1 80301c0: f7ff fe71 bl 802fea6 /* new header pbuf could not be allocated? */ if (q == NULL) { 80301c4: 4606 mov r6, r0 80301c6: b908 cbnz r0, 80301cc LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("raw_sendto: could not allocate header\n")); return ERR_MEM; 80301c8: 25ff movs r5, #255 ; 0xff 80301ca: e02e b.n 803022a } if (p->tot_len != 0) { 80301cc: 8923 ldrh r3, [r4, #8] 80301ce: b15b cbz r3, 80301e8 /* chain header q in front of given pbuf p */ pbuf_chain(q, p); 80301d0: 4621 mov r1, r4 80301d2: f7ff ff16 bl 8030002 80301d6: e007 b.n 80301e8 /* { 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)) { 80301d8: 4620 mov r0, r4 80301da: f06f 0113 mvn.w r1, #19 80301de: f7ff fdea bl 802fdb6 80301e2: 2800 cmp r0, #0 80301e4: d1f0 bne.n 80301c8 80301e6: 4626 mov r6, r4 LWIP_ASSERT("Can't restore header we just removed!", 0); return ERR_MEM; } } if ((netif = ip_route(ipaddr)) == NULL) { 80301e8: 4638 mov r0, r7 80301ea: f002 febb bl 8032f64 80301ee: b928 cbnz r0, 80301fc 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) { 80301f0: 42a6 cmp r6, r4 80301f2: d019 beq.n 8030228 pbuf_free(q); 80301f4: 4630 mov r0, r6 80301f6: f7ff fe09 bl 802fe0c 80301fa: e015 b.n 8030228 } return ERR_VAL; } #endif /* IP_SOF_BROADCAST */ if (ip_addr_isany(&pcb->local_ip)) { 80301fc: 4629 mov r1, r5 80301fe: b10d cbz r5, 8030204 8030200: 682b ldr r3, [r5, #0] 8030202: b903 cbnz r3, 8030206 /* use outgoing network interface IP address as source address */ src_ip = &(netif->ip_addr); 8030204: 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); 8030206: 7a6a ldrb r2, [r5, #9] 8030208: 7aab ldrb r3, [r5, #10] 803020a: 9200 str r2, [sp, #0] 803020c: 7c2a ldrb r2, [r5, #16] 803020e: 9002 str r0, [sp, #8] 8030210: 9201 str r2, [sp, #4] 8030212: 4630 mov r0, r6 8030214: 463a mov r2, r7 8030216: f002 ffa9 bl 803316c NETIF_SET_HWADDRHINT(netif, NULL); /* did we chain a header earlier? */ if (q != p) { 803021a: 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); 803021c: 4605 mov r5, r0 NETIF_SET_HWADDRHINT(netif, NULL); /* did we chain a header earlier? */ if (q != p) { 803021e: d004 beq.n 803022a /* free the header */ pbuf_free(q); 8030220: 4630 mov r0, r6 8030222: f7ff fdf3 bl 802fe0c 8030226: e000 b.n 803022a 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; 8030228: 25fc movs r5, #252 ; 0xfc if (q != p) { /* free the header */ pbuf_free(q); } return err; } 803022a: b268 sxtb r0, r5 803022c: b005 add sp, #20 803022e: bdf0 pop {r4, r5, r6, r7, pc} 08030230 : * */ err_t raw_send(struct raw_pcb *pcb, struct pbuf *p) { return raw_sendto(pcb, p, &pcb->remote_ip); 8030230: 1d02 adds r2, r0, #4 8030232: f7ff bfb8 b.w 80301a6 8030236: 0000 movs r0, r0 08030238 : void raw_remove(struct raw_pcb *pcb) { struct raw_pcb *pcb2; /* pcb to be removed is first in list? */ if (raw_pcbs == pcb) { 8030238: 4a09 ldr r2, [pc, #36] ; (8030260 ) 803023a: 6813 ldr r3, [r2, #0] 803023c: 4283 cmp r3, r0 * * @see raw_new() */ void raw_remove(struct raw_pcb *pcb) { 803023e: 4601 mov r1, r0 struct raw_pcb *pcb2; /* pcb to be removed is first in list? */ if (raw_pcbs == pcb) { 8030240: d109 bne.n 8030256 /* make list start at 2nd pcb */ raw_pcbs = raw_pcbs->next; 8030242: 68c3 ldr r3, [r0, #12] 8030244: 6013 str r3, [r2, #0] 8030246: e008 b.n 803025a /* 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) { 8030248: 68da ldr r2, [r3, #12] 803024a: b11a cbz r2, 8030254 803024c: 428a cmp r2, r1 /* remove pcb from list */ pcb2->next = pcb->next; 803024e: bf04 itt eq 8030250: 68ca ldreq r2, [r1, #12] 8030252: 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) { 8030254: 68db ldr r3, [r3, #12] 8030256: 2b00 cmp r3, #0 8030258: d1f6 bne.n 8030248 /* remove pcb from list */ pcb2->next = pcb->next; } } } memp_free(MEMP_RAW_PCB, pcb); 803025a: 2000 movs r0, #0 803025c: f7ff bccc b.w 802fbf8 8030260: 2000c3d8 .word 0x2000c3d8 08030264 : * * @see raw_remove() */ struct raw_pcb * raw_new(u8_t proto) { 8030264: b538 push {r3, r4, r5, lr} 8030266: 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); 8030268: 2000 movs r0, #0 803026a: f7ff fcaf bl 802fbcc /* could allocate RAW PCB? */ if (pcb != NULL) { 803026e: 4604 mov r4, r0 8030270: b150 cbz r0, 8030288 /* initialize PCB to all zeroes */ memset(pcb, 0, sizeof(struct raw_pcb)); 8030272: 221c movs r2, #28 8030274: 2100 movs r1, #0 8030276: f7f1 fc43 bl 8021b00 pcb->protocol = proto; pcb->ttl = RAW_TTL; 803027a: 23ff movs r3, #255 ; 0xff 803027c: 72a3 strb r3, [r4, #10] pcb->next = raw_pcbs; 803027e: 4b03 ldr r3, [pc, #12] ; (803028c ) 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; 8030280: 7425 strb r5, [r4, #16] pcb->ttl = RAW_TTL; pcb->next = raw_pcbs; 8030282: 681a ldr r2, [r3, #0] raw_pcbs = pcb; 8030284: 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; 8030286: 60e2 str r2, [r4, #12] raw_pcbs = pcb; } return pcb; } 8030288: 4620 mov r0, r4 803028a: bd38 pop {r3, r4, r5, pc} 803028c: 2000c3d8 .word 0x2000c3d8 08030290 : LWIP_UNUSED_ARG(arg); LWIP_UNUSED_ARG(pcb); LWIP_UNUSED_ARG(err); return ERR_ABRT; } 8030290: f06f 0009 mvn.w r0, #9 8030294: 4770 bx lr 8030296: 0000 movs r0, r0 08030298 : * * @return a new (free) local TCP port number */ static u16_t tcp_new_port(void) { 8030298: 4b13 ldr r3, [pc, #76] ; (80302e8 ) 803029a: b570 push {r4, r5, r6, lr} 803029c: 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) { 803029e: 4d13 ldr r5, [pc, #76] ; (80302ec ) * * @return a new (free) local TCP port number */ static u16_t tcp_new_port(void) { 80302a0: 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) { 80302a4: f64f 74ff movw r4, #65535 ; 0xffff 80302a8: 42a0 cmp r0, r4 80302aa: d002 beq.n 80302b2 80302ac: 3001 adds r0, #1 80302ae: b280 uxth r0, r0 80302b0: e001 b.n 80302b6 tcp_port = TCP_LOCAL_PORT_RANGE_START; 80302b2: f44f 4040 mov.w r0, #49152 ; 0xc000 80302b6: 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) { 80302b8: 5959 ldr r1, [r3, r5] 80302ba: 6809 ldr r1, [r1, #0] 80302bc: e00b b.n 80302d6 if (pcb->local_port == tcp_port) { 80302be: 8b4e ldrh r6, [r1, #26] 80302c0: 4286 cmp r6, r0 80302c2: d107 bne.n 80302d4 80302c4: 3a01 subs r2, #1 80302c6: b292 uxth r2, r2 if (++n > (TCP_LOCAL_PORT_RANGE_END - TCP_LOCAL_PORT_RANGE_START)) { 80302c8: 2a00 cmp r2, #0 80302ca: d1ed bne.n 80302a8 80302cc: 4b06 ldr r3, [pc, #24] ; (80302e8 ) 80302ce: 8018 strh r0, [r3, #0] return 0; 80302d0: 4610 mov r0, r2 80302d2: 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) { 80302d4: 68c9 ldr r1, [r1, #12] 80302d6: 2900 cmp r1, #0 80302d8: d1f1 bne.n 80302be 80302da: 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++) { 80302dc: 2b10 cmp r3, #16 80302de: d1eb bne.n 80302b8 80302e0: 4b01 ldr r3, [pc, #4] ; (80302e8 ) 80302e2: 8018 strh r0, [r3, #0] goto again; } } } return tcp_port; } 80302e4: bd70 pop {r4, r5, r6, pc} 80302e6: bf00 nop 80302e8: 2000071c .word 0x2000071c 80302ec: 08044fe0 .word 0x08044fe0 080302f0 : /** * Initialize this module. */ void tcp_init(void) { 80302f0: 4770 bx lr 80302f2: 0000 movs r0, r0 080302f4 : * 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) { 80302f4: 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); 80302f6: 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) { 80302f8: 4604 mov r4, r0 80302fa: 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); 80302fc: bb33 cbnz r3, 803034c if (ip_get_option(pcb, SOF_REUSEADDR)) { max_pcb_list = NUM_TCP_PCB_LISTS_NO_TIME_WAIT; } #endif /* SO_REUSE */ if (port == 0) { 80302fe: b91a cbnz r2, 8030308 port = tcp_new_port(); 8030300: f7ff ffca bl 8030298 if (port == 0) { 8030304: 4602 mov r2, r0 8030306: b318 cbz r0, 8030350 } } /* 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) { 8030308: 4f14 ldr r7, [pc, #80] ; (803035c ) * 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) { 803030a: 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) { 803030c: 59cb ldr r3, [r1, r7] 803030e: 681b ldr r3, [r3, #0] 8030310: e00a b.n 8030328 if (cpcb->local_port == port) { 8030312: 8b58 ldrh r0, [r3, #26] 8030314: 4290 cmp r0, r2 8030316: d106 bne.n 8030326 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)) || 8030318: 681e ldr r6, [r3, #0] 803031a: b1de cbz r6, 8030354 803031c: b1d5 cbz r5, 8030354 ip_addr_isany(ipaddr) || 803031e: 6828 ldr r0, [r5, #0] 8030320: b1c0 cbz r0, 8030354 8030322: 4286 cmp r6, r0 8030324: d016 beq.n 8030354 } } /* 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) { 8030326: 68db ldr r3, [r3, #12] 8030328: 2b00 cmp r3, #0 803032a: d1f2 bne.n 8030312 803032c: 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++) { 803032e: 2910 cmp r1, #16 8030330: d1ec bne.n 803030c } } } } if (!ip_addr_isany(ipaddr)) { 8030332: b115 cbz r5, 803033a 8030334: 682b ldr r3, [r5, #0] 8030336: b103 cbz r3, 803033a pcb->local_ip = *ipaddr; 8030338: 6023 str r3, [r4, #0] } pcb->local_port = port; TCP_REG(&tcp_bound_pcbs, pcb); 803033a: 4b09 ldr r3, [pc, #36] ; (8030360 ) } if (!ip_addr_isany(ipaddr)) { pcb->local_ip = *ipaddr; } pcb->local_port = port; 803033c: 8362 strh r2, [r4, #26] TCP_REG(&tcp_bound_pcbs, pcb); 803033e: 681a ldr r2, [r3, #0] 8030340: 601c str r4, [r3, #0] 8030342: 60e2 str r2, [r4, #12] 8030344: f002 f97e bl 8032644 LWIP_DEBUGF(TCP_DEBUG, ("tcp_bind: bind to port %"U16_F"\n", port)); return ERR_OK; 8030348: 2000 movs r0, #0 803034a: e004 b.n 8030356 { 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); 803034c: 20fa movs r0, #250 ; 0xfa 803034e: e002 b.n 8030356 #endif /* SO_REUSE */ if (port == 0) { port = tcp_new_port(); if (port == 0) { return ERR_BUF; 8030350: 20fe movs r0, #254 ; 0xfe 8030352: e000 b.n 8030356 #endif /* SO_REUSE */ { if (ip_addr_isany(&(cpcb->local_ip)) || ip_addr_isany(ipaddr) || ip_addr_cmp(&(cpcb->local_ip), ipaddr)) { return ERR_USE; 8030354: 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; } 8030356: b240 sxtb r0, r0 8030358: bdf8 pop {r3, r4, r5, r6, r7, pc} 803035a: bf00 nop 803035c: 08044fe0 .word 0x08044fe0 8030360: 2000f6cc .word 0x2000f6cc 08030364 : * called like this: * tpcb = tcp_listen(tpcb); */ struct tcp_pcb * tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog) { 8030364: 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); 8030366: 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) { 8030368: 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); 803036a: b10b cbz r3, 8030370 803036c: 2000 movs r0, #0 803036e: bd38 pop {r3, r4, r5, pc} } } } } #endif /* SO_REUSE */ lpcb = (struct tcp_pcb_listen *)memp_malloc(MEMP_TCP_PCB_LISTEN); 8030370: 2003 movs r0, #3 8030372: f7ff fc2b bl 802fbcc if (lpcb == NULL) { 8030376: 4605 mov r5, r0 8030378: 2800 cmp r0, #0 803037a: d0f7 beq.n 803036c return NULL; } lpcb->callback_arg = pcb->callback_arg; 803037c: 6923 ldr r3, [r4, #16] 803037e: 6103 str r3, [r0, #16] lpcb->local_port = pcb->local_port; 8030380: 8b63 ldrh r3, [r4, #26] 8030382: 8343 strh r3, [r0, #26] lpcb->state = LISTEN; 8030384: 2301 movs r3, #1 8030386: 7603 strb r3, [r0, #24] lpcb->prio = pcb->prio; 8030388: 7e63 ldrb r3, [r4, #25] 803038a: 7643 strb r3, [r0, #25] lpcb->so_options = pcb->so_options; ip_set_option(lpcb, SOF_ACCEPTCONN); 803038c: 7a23 ldrb r3, [r4, #8] 803038e: f043 0302 orr.w r3, r3, #2 8030392: 7203 strb r3, [r0, #8] lpcb->ttl = pcb->ttl; 8030394: 7aa3 ldrb r3, [r4, #10] 8030396: 7283 strb r3, [r0, #10] lpcb->tos = pcb->tos; 8030398: 7a63 ldrb r3, [r4, #9] 803039a: 7243 strb r3, [r0, #9] ip_addr_copy(lpcb->local_ip, pcb->local_ip); 803039c: 6823 ldr r3, [r4, #0] 803039e: 6003 str r3, [r0, #0] if (pcb->local_port != 0) { 80303a0: 8b63 ldrh r3, [r4, #26] 80303a2: b1ab cbz r3, 80303d0 TCP_RMV(&tcp_bound_pcbs, pcb); 80303a4: 4a11 ldr r2, [pc, #68] ; (80303ec ) 80303a6: 6813 ldr r3, [r2, #0] 80303a8: 42a3 cmp r3, r4 80303aa: d101 bne.n 80303b0 80303ac: 68e3 ldr r3, [r4, #12] 80303ae: e00c b.n 80303ca 80303b0: 4a0f ldr r2, [pc, #60] ; (80303f0 ) 80303b2: 6013 str r3, [r2, #0] 80303b4: e007 b.n 80303c6 80303b6: 68d9 ldr r1, [r3, #12] 80303b8: 42a1 cmp r1, r4 80303ba: d103 bne.n 80303c4 80303bc: 6013 str r3, [r2, #0] 80303be: 68e2 ldr r2, [r4, #12] 80303c0: 60da str r2, [r3, #12] 80303c2: e003 b.n 80303cc 80303c4: 460b mov r3, r1 80303c6: 2b00 cmp r3, #0 80303c8: d1f5 bne.n 80303b6 80303ca: 6013 str r3, [r2, #0] 80303cc: 2300 movs r3, #0 80303ce: 60e3 str r3, [r4, #12] } memp_free(MEMP_TCP_PCB, pcb); 80303d0: 2002 movs r0, #2 80303d2: 4621 mov r1, r4 80303d4: f7ff fc10 bl 802fbf8 #if LWIP_CALLBACK_API lpcb->accept = tcp_accept_null; 80303d8: 4b06 ldr r3, [pc, #24] ; (80303f4 ) 80303da: 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); 80303dc: 4b06 ldr r3, [pc, #24] ; (80303f8 ) 80303de: 681a ldr r2, [r3, #0] 80303e0: 601d str r5, [r3, #0] 80303e2: 60ea str r2, [r5, #12] 80303e4: f002 f92e bl 8032644 return (struct tcp_pcb *)lpcb; 80303e8: 4628 mov r0, r5 } 80303ea: bd38 pop {r3, r4, r5, pc} 80303ec: 2000f6cc .word 0x2000f6cc 80303f0: 2000f6c8 .word 0x2000f6c8 80303f4: 08030291 .word 0x08030291 80303f8: 2000f6c4 .word 0x2000f6c4 080303fc : * * 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) { 80303fc: 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))) { 80303fe: 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; 8030400: 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))) { 8030402: 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; 8030404: 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) { 8030406: 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))) { 8030408: f640 3068 movw r0, #2920 ; 0xb68 803040c: 4285 cmp r5, r0 803040e: bf28 it cs 8030410: 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; 8030412: 1a60 subs r0, r4, r1 if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { 8030414: 1880 adds r0, r0, r2 8030416: 1b45 subs r5, r0, r5 8030418: 2d00 cmp r5, #0 803041a: db01 blt.n 8030420 /* we can advertise more window */ pcb->rcv_ann_wnd = pcb->rcv_wnd; 803041c: 85dc strh r4, [r3, #46] ; 0x2e return new_right_edge - pcb->rcv_ann_right_edge; 803041e: bd30 pop {r4, r5, pc} } else { if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) { 8030420: 1a50 subs r0, r2, r1 8030422: 2800 cmp r0, #0 8030424: f04f 0000 mov.w r0, #0 8030428: dd01 ble.n 803042e /* 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; 803042a: 85d8 strh r0, [r3, #46] ; 0x2e 803042c: 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; 803042e: 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; 8030430: 85da strh r2, [r3, #46] ; 0x2e } return 0; } } 8030432: bd30 pop {r4, r5, pc} 08030434 : 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; 8030434: 8d83 ldrh r3, [r0, #44] ; 0x2c 8030436: 18c9 adds r1, r1, r3 8030438: b289 uxth r1, r1 if (pcb->rcv_wnd > TCP_WND) { 803043a: f241 63d0 movw r3, #5840 ; 0x16d0 803043e: 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) { 8030440: 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; 8030442: bf8c ite hi 8030444: 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; 8030446: 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) { 8030448: 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); 803044a: f7ff ffd7 bl 80303fc /* 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) { 803044e: f240 53b3 movw r3, #1459 ; 0x5b3 8030452: 4298 cmp r0, r3 8030454: dd08 ble.n 8030468 tcp_ack_now(pcb); 8030456: 7fa3 ldrb r3, [r4, #30] tcp_output(pcb); 8030458: 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); 803045a: f043 0302 orr.w r3, r3, #2 803045e: 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)); } 8030460: 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); 8030464: f001 be30 b.w 80320c8 8030468: bd10 pop {r4, pc} 0803046a : * * @param seg single tcp_seg to free */ void tcp_seg_free(struct tcp_seg *seg) { 803046a: b510 push {r4, lr} if (seg != NULL) { 803046c: 4604 mov r4, r0 803046e: b148 cbz r0, 8030484 if (seg->p != NULL) { 8030470: 6840 ldr r0, [r0, #4] 8030472: b108 cbz r0, 8030478 pbuf_free(seg->p); 8030474: f7ff fcca bl 802fe0c #if TCP_DEBUG seg->p = NULL; #endif /* TCP_DEBUG */ } memp_free(MEMP_TCP_SEG, seg); 8030478: 2004 movs r0, #4 803047a: 4621 mov r1, r4 } } 803047c: 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); 8030480: f7ff bbba b.w 802fbf8 8030484: bd10 pop {r4, pc} 08030486 : * * @param seg tcp_seg list of TCP segments to free */ void tcp_segs_free(struct tcp_seg *seg) { 8030486: b510 push {r4, lr} while (seg != NULL) { 8030488: e003 b.n 8030492 struct tcp_seg *next = seg->next; 803048a: 6804 ldr r4, [r0, #0] tcp_seg_free(seg); 803048c: f7ff ffed bl 803046a seg = next; 8030490: 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) { 8030492: 2800 cmp r0, #0 8030494: d1f9 bne.n 803048a struct tcp_seg *next = seg->next; tcp_seg_free(seg); seg = next; } } 8030496: bd10 pop {r4, pc} 08030498 : 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; 8030498: 6101 str r1, [r0, #16] 803049a: 4770 bx lr 0803049c : */ 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; 803049c: 67c1 str r1, [r0, #124] ; 0x7c 803049e: 4770 bx lr 080304a0 : */ 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; 80304a0: 6781 str r1, [r0, #120] ; 0x78 80304a2: 4770 bx lr 080304a4 : */ 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; 80304a4: f8c0 1088 str.w r1, [r0, #136] ; 0x88 80304a8: 4770 bx lr 080304aa : 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; 80304aa: 6141 str r1, [r0, #20] 80304ac: 4770 bx lr 080304ae : 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; 80304ae: f8c0 1084 str.w r1, [r0, #132] ; 0x84 #else /* LWIP_CALLBACK_API */ LWIP_UNUSED_ARG(poll); #endif /* LWIP_CALLBACK_API */ pcb->pollinterval = interval; 80304b2: f880 2020 strb.w r2, [r0, #32] 80304b6: 4770 bx lr 080304b8 : * @param pcb tcp_pcb to purge. The pcb itself is not deallocated! */ void tcp_pcb_purge(struct tcp_pcb *pcb) { if (pcb->state != CLOSED && 80304b8: 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) { 80304ba: b510 push {r4, lr} 80304bc: 4604 mov r4, r0 if (pcb->state != CLOSED && 80304be: b1bb cbz r3, 80304f0 80304c0: 2b0a cmp r3, #10 80304c2: d015 beq.n 80304f0 pcb->state != TIME_WAIT && 80304c4: 2b01 cmp r3, #1 80304c6: d013 beq.n 80304f0 } } #endif /* TCP_LISTEN_BACKLOG */ if (pcb->refused_data != NULL) { 80304c8: 6f40 ldr r0, [r0, #116] ; 0x74 80304ca: b118 cbz r0, 80304d4 LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->refused_data\n")); pbuf_free(pcb->refused_data); 80304cc: f7ff fc9e bl 802fe0c pcb->refused_data = NULL; 80304d0: 2300 movs r3, #0 80304d2: 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; 80304d4: f64f 73ff movw r3, #65535 ; 0xffff 80304d8: 86a3 strh r3, [r4, #52] ; 0x34 tcp_segs_free(pcb->unsent); 80304da: 6ee0 ldr r0, [r4, #108] ; 0x6c 80304dc: f7ff ffd3 bl 8030486 tcp_segs_free(pcb->unacked); 80304e0: 6f20 ldr r0, [r4, #112] ; 0x70 80304e2: f7ff ffd0 bl 8030486 pcb->unacked = pcb->unsent = NULL; 80304e6: 2300 movs r3, #0 80304e8: 66e3 str r3, [r4, #108] ; 0x6c 80304ea: 6723 str r3, [r4, #112] ; 0x70 #if TCP_OVERSIZE pcb->unsent_oversize = 0; 80304ec: f8a4 306a strh.w r3, [r4, #106] ; 0x6a 80304f0: bd10 pop {r4, pc} 80304f2: 0000 movs r0, r0 080304f4 : u8_t pcb_reset; /* flag if a RST should be sent when removing */ err_t err; err = ERR_OK; ++tcp_ticks; 80304f4: 4b9c ldr r3, [pc, #624] ; (8030768 ) * * Automatically called from tcp_tmr(). */ void tcp_slowtmr(void) { 80304f6: 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; 80304fa: 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; 80304fc: f8df 8284 ldr.w r8, [pc, #644] ; 8030784 u8_t pcb_reset; /* flag if a RST should be sent when removing */ err_t err; err = ERR_OK; ++tcp_ticks; 8030500: 3201 adds r2, #1 8030502: 601a str r2, [r3, #0] ++tcp_timer_ctr; 8030504: 4b99 ldr r3, [pc, #612] ; (803076c ) 8030506: 781a ldrb r2, [r3, #0] 8030508: 3201 adds r2, #1 803050a: 701a strb r2, [r3, #0] 803050c: 46c1 mov r9, r8 tcp_slowtmr_start: /* Steps through all of the active PCBs. */ prev = NULL; pcb = tcp_active_pcbs; 803050e: 4b98 ldr r3, [pc, #608] ; (8030770 ) 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) { 8030510: f8df a258 ldr.w sl, [pc, #600] ; 803076c ++tcp_timer_ctr; tcp_slowtmr_start: /* Steps through all of the active PCBs. */ prev = NULL; pcb = tcp_active_pcbs; 8030514: 681c ldr r4, [r3, #0] ++tcp_ticks; ++tcp_timer_ctr; tcp_slowtmr_start: /* Steps through all of the active PCBs. */ prev = NULL; 8030516: 2600 movs r6, #0 pcb = tcp_active_pcbs; if (pcb == NULL) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: no active pcbs\n")); } while (pcb != NULL) { 8030518: e0ff b.n 803071a 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) { 803051a: f89a 3000 ldrb.w r3, [sl] 803051e: f894 2021 ldrb.w r2, [r4, #33] ; 0x21 8030522: 429a cmp r2, r3 8030524: d101 bne.n 803052a /* skip this pcb, we have already processed it */ pcb = pcb->next; 8030526: 68e7 ldr r7, [r4, #12] continue; 8030528: e0f6 b.n 8030718 pcb->last_timer = tcp_timer_ctr; pcb_remove = 0; pcb_reset = 0; if (pcb->state == SYN_SENT && pcb->nrtx == TCP_SYNMAXRTX) { 803052a: 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; 803052c: f884 3021 strb.w r3, [r4, #33] ; 0x21 pcb_remove = 0; pcb_reset = 0; if (pcb->state == SYN_SENT && pcb->nrtx == TCP_SYNMAXRTX) { 8030530: 2902 cmp r1, #2 8030532: f894 2046 ldrb.w r2, [r4, #70] ; 0x46 8030536: d101 bne.n 803053c 8030538: 2a06 cmp r2, #6 803053a: d051 beq.n 80305e0 ++pcb_remove; LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max SYN retries reached\n")); } else if (pcb->nrtx == TCP_MAXRTX) { 803053c: 2a0c cmp r2, #12 803053e: d04f beq.n 80305e0 ++pcb_remove; LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n")); } else { if (pcb->persist_backoff > 0) { 8030540: f894 3091 ldrb.w r3, [r4, #145] ; 0x91 8030544: b1c3 cbz r3, 8030578 /* 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]) { 8030546: 498b ldr r1, [pc, #556] ; (8030774 ) 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++; 8030548: f894 2090 ldrb.w r2, [r4, #144] ; 0x90 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 803054c: 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++; 803054e: 3201 adds r2, #1 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 8030550: 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++; 8030554: b2d2 uxtb r2, r2 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 8030556: 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++; 8030558: f884 2090 strb.w r2, [r4, #144] ; 0x90 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 803055c: d900 bls.n 8030560 803055e: e03d b.n 80305dc pcb->persist_cnt = 0; 8030560: 2200 movs r2, #0 if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { 8030562: 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; 8030564: f884 2090 strb.w r2, [r4, #144] ; 0x90 if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { 8030568: d802 bhi.n 8030570 pcb->persist_backoff++; 803056a: 3301 adds r3, #1 803056c: f884 3091 strb.w r3, [r4, #145] ; 0x91 } tcp_zero_window_probe(pcb); 8030570: 4620 mov r0, r4 8030572: f001 ffa4 bl 80324be 8030576: e031 b.n 80305dc } } else { /* Increase the retransmission timer if it is running */ if(pcb->rtime >= 0) { 8030578: 8ea3 ldrh r3, [r4, #52] ; 0x34 803057a: 0418 lsls r0, r3, #16 803057c: d401 bmi.n 8030582 ++pcb->rtime; 803057e: 3301 adds r3, #1 8030580: 86a3 strh r3, [r4, #52] ; 0x34 } if (pcb->unacked != NULL && pcb->rtime >= pcb->rto) { 8030582: 6f23 ldr r3, [r4, #112] ; 0x70 8030584: b353 cbz r3, 80305dc 8030586: f9b4 0034 ldrsh.w r0, [r4, #52] ; 0x34 803058a: f9b4 3044 ldrsh.w r3, [r4, #68] ; 0x44 803058e: 4298 cmp r0, r3 8030590: db24 blt.n 80305dc " 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) { 8030592: 2902 cmp r1, #2 8030594: d00b beq.n 80305ae pcb->rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[pcb->nrtx]; 8030596: f9b4 1040 ldrsh.w r1, [r4, #64] ; 0x40 803059a: f9b4 3042 ldrsh.w r3, [r4, #66] ; 0x42 803059e: eb03 03e1 add.w r3, r3, r1, asr #3 80305a2: 4975 ldr r1, [pc, #468] ; (8030778 ) 80305a4: 5c8a ldrb r2, [r1, r2] 80305a6: fa03 f302 lsl.w r3, r3, r2 80305aa: f8a4 3044 strh.w r3, [r4, #68] ; 0x44 } /* Reset the retransmission timer. */ pcb->rtime = 0; 80305ae: 2300 movs r3, #0 /* Reduce congestion window and ssthresh. */ eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); 80305b0: 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; 80305b4: 86a3 strh r3, [r4, #52] ; 0x34 /* Reduce congestion window and ssthresh. */ eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); 80305b6: f8b4 3060 ldrh.w r3, [r4, #96] ; 0x60 pcb->ssthresh = eff_wnd >> 1; 80305ba: 4299 cmp r1, r3 80305bc: bf28 it cs 80305be: 4619 movcs r1, r3 if (pcb->ssthresh < (pcb->mss << 1)) { 80305c0: 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; 80305c2: 0849 lsrs r1, r1, #1 if (pcb->ssthresh < (pcb->mss << 1)) { 80305c4: 005a lsls r2, r3, #1 80305c6: 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; 80305c8: f8a4 104e strh.w r1, [r4, #78] ; 0x4e if (pcb->ssthresh < (pcb->mss << 1)) { pcb->ssthresh = (pcb->mss << 1); } pcb->cwnd = pcb->mss; 80305cc: 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); 80305d0: bfb8 it lt 80305d2: 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); 80305d6: 4620 mov r0, r4 80305d8: f001 fee0 bl 803239c pcb = pcb->next; continue; } pcb->last_timer = tcp_timer_ctr; pcb_remove = 0; 80305dc: 2500 movs r5, #0 80305de: e000 b.n 80305e2 pcb_reset = 0; if (pcb->state == SYN_SENT && pcb->nrtx == TCP_SYNMAXRTX) { ++pcb_remove; 80305e0: 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) { 80305e2: 7e23 ldrb r3, [r4, #24] 80305e4: 2b06 cmp r3, #6 80305e6: d10c bne.n 8030602 /* If this PCB is in FIN_WAIT_2 because of SHUT_WR don't let it time out. */ if (pcb->flags & TF_RXCLOSED) { 80305e8: 7fa2 ldrb r2, [r4, #30] 80305ea: f002 0210 and.w r2, r2, #16 80305ee: b2d2 uxtb r2, r2 80305f0: b13a cbz r2, 8030602 /* PCB was fully closed (either through close() or SHUT_RDWR): normal FIN-WAIT timeout handling. */ if ((u32_t)(tcp_ticks - pcb->tmr) > 80305f2: 4a5d ldr r2, [pc, #372] ; (8030768 ) 80305f4: 6811 ldr r1, [r2, #0] 80305f6: 6a62 ldr r2, [r4, #36] ; 0x24 80305f8: 1a8a subs r2, r1, r2 80305fa: 2a28 cmp r2, #40 ; 0x28 80305fc: d901 bls.n 8030602 TCP_FIN_WAIT_TIMEOUT / TCP_SLOW_INTERVAL) { ++pcb_remove; 80305fe: 3501 adds r5, #1 8030600: b2ed uxtb r5, r5 } } } /* Check if KEEPALIVE should be sent */ if(ip_get_option(pcb, SOF_KEEPALIVE) && 8030602: 7a27 ldrb r7, [r4, #8] 8030604: f007 0708 and.w r7, r7, #8 8030608: b2ff uxtb r7, r7 803060a: b34f cbz r7, 8030660 803060c: 2b04 cmp r3, #4 803060e: d001 beq.n 8030614 ((pcb->state == ESTABLISHED) || 8030610: 2b07 cmp r3, #7 8030612: d124 bne.n 803065e (pcb->state == CLOSE_WAIT))) { if((u32_t)(tcp_ticks - pcb->tmr) > 8030614: 4b54 ldr r3, [pc, #336] ; (8030768 ) (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) 8030616: 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) > 803061a: 681a ldr r2, [r3, #0] 803061c: 6a63 ldr r3, [r4, #36] ; 0x24 803061e: 1ad2 subs r2, r2, r3 (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) 8030620: f500 2324 add.w r3, r0, #671744 ; 0xa4000 8030624: f603 43b8 addw r3, r3, #3256 ; 0xcb8 8030628: f44f 71fa mov.w r1, #500 ; 0x1f4 803062c: 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) > 8030630: 429a cmp r2, r3 8030632: d903 bls.n 803063c { 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; 8030634: 3501 adds r5, #1 8030636: b2ed uxtb r5, r5 ++pcb_reset; 8030638: 2701 movs r7, #1 803063a: e011 b.n 8030660 } else if((u32_t)(tcp_ticks - pcb->tmr) > (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) 803063c: f894 3092 ldrb.w r3, [r4, #146] ; 0x92 8030640: 4f4e ldr r7, [pc, #312] ; (803077c ) 8030642: fb07 0003 mla r0, r7, r3, r0 / TCP_SLOW_INTERVAL) 8030646: 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) > 803064a: 428a cmp r2, r1 803064c: d907 bls.n 803065e (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) / TCP_SLOW_INTERVAL) { tcp_keepalive(pcb); 803064e: 4620 mov r0, r4 8030650: f001 ff16 bl 8032480 pcb->keep_cnt_sent++; 8030654: f894 3092 ldrb.w r3, [r4, #146] ; 0x92 8030658: 3301 adds r3, #1 803065a: f884 3092 strb.w r3, [r4, #146] ; 0x92 continue; } pcb->last_timer = tcp_timer_ctr; pcb_remove = 0; pcb_reset = 0; 803065e: 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) { 8030660: 7e23 ldrb r3, [r4, #24] 8030662: 2b03 cmp r3, #3 8030664: d108 bne.n 8030678 if ((u32_t)(tcp_ticks - pcb->tmr) > 8030666: 4b40 ldr r3, [pc, #256] ; (8030768 ) 8030668: 681a ldr r2, [r3, #0] 803066a: 6a63 ldr r3, [r4, #36] ; 0x24 803066c: 1ad3 subs r3, r2, r3 803066e: 2b28 cmp r3, #40 ; 0x28 8030670: d90a bls.n 8030688 TCP_SYN_RCVD_TIMEOUT / TCP_SLOW_INTERVAL) { ++pcb_remove; 8030672: 3501 adds r5, #1 8030674: b2ed uxtb r5, r5 8030676: e007 b.n 8030688 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) { 8030678: 2b09 cmp r3, #9 803067a: d105 bne.n 8030688 if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { 803067c: 4b3a ldr r3, [pc, #232] ; (8030768 ) 803067e: 681a ldr r2, [r3, #0] 8030680: 6a63 ldr r3, [r4, #36] ; 0x24 8030682: 1ad3 subs r3, r2, r3 8030684: 2bf0 cmp r3, #240 ; 0xf0 8030686: d800 bhi.n 803068a LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in LAST-ACK\n")); } } /* If the PCB should be removed, do it. */ if (pcb_remove) { 8030688: b345 cbz r5, 80306dc struct tcp_pcb *pcb2; tcp_err_fn err_fn; void *err_arg; tcp_pcb_purge(pcb); 803068a: 4620 mov r0, r4 803068c: f7ff ff14 bl 80304b8 8030690: 68e3 ldr r3, [r4, #12] /* Remove PCB from tcp_active_pcbs list. */ if (prev != NULL) { 8030692: b10e cbz r6, 8030698 LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs); prev->next = pcb->next; 8030694: 60f3 str r3, [r6, #12] 8030696: e001 b.n 803069c } else { /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb); tcp_active_pcbs = pcb->next; 8030698: 4a35 ldr r2, [pc, #212] ; (8030770 ) 803069a: 6013 str r3, [r2, #0] } if (pcb_reset) { 803069c: b14f cbz r7, 80306b2 tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, 803069e: 8b63 ldrh r3, [r4, #26] 80306a0: 9300 str r3, [sp, #0] 80306a2: 8ba3 ldrh r3, [r4, #28] 80306a4: 9301 str r3, [sp, #4] 80306a6: 6d20 ldr r0, [r4, #80] ; 0x50 80306a8: 6aa1 ldr r1, [r4, #40] ; 0x28 80306aa: 4622 mov r2, r4 80306ac: 1d23 adds r3, r4, #4 80306ae: f001 fe2f bl 8032310 pcb->local_port, pcb->remote_port); } err_fn = pcb->errf; 80306b2: f8d4 5088 ldr.w r5, [r4, #136] ; 0x88 err_arg = pcb->callback_arg; 80306b6: f8d4 b010 ldr.w fp, [r4, #16] pcb2 = pcb; pcb = pcb->next; 80306ba: 68e7 ldr r7, [r4, #12] memp_free(MEMP_TCP_PCB, pcb2); 80306bc: 2002 movs r0, #2 80306be: 4621 mov r1, r4 80306c0: f7ff fa9a bl 802fbf8 tcp_active_pcbs_changed = 0; 80306c4: 2300 movs r3, #0 80306c6: f888 3000 strb.w r3, [r8] TCP_EVENT_ERR(err_fn, err_arg, ERR_ABRT); 80306ca: b11d cbz r5, 80306d4 80306cc: 4658 mov r0, fp 80306ce: f06f 0109 mvn.w r1, #9 80306d2: 47a8 blx r5 if (tcp_active_pcbs_changed) { 80306d4: f899 3000 ldrb.w r3, [r9] 80306d8: b1f3 cbz r3, 8030718 80306da: e718 b.n 803050e /* 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; 80306dc: 7fe3 ldrb r3, [r4, #31] if (prev->polltmr >= prev->pollinterval) { 80306de: 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; 80306e2: 68e7 ldr r7, [r4, #12] /* We check if we should poll the connection. */ ++prev->polltmr; 80306e4: 3301 adds r3, #1 80306e6: b2db uxtb r3, r3 if (prev->polltmr >= prev->pollinterval) { 80306e8: 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; 80306ea: 77e3 strb r3, [r4, #31] if (prev->polltmr >= prev->pollinterval) { 80306ec: d813 bhi.n 8030716 prev->polltmr = 0; LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n")); tcp_active_pcbs_changed = 0; TCP_EVENT_POLL(prev, err); 80306ee: 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; 80306f2: 77e5 strb r5, [r4, #31] LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n")); tcp_active_pcbs_changed = 0; 80306f4: f888 5000 strb.w r5, [r8] TCP_EVENT_POLL(prev, err); 80306f8: b11b cbz r3, 8030702 80306fa: 6920 ldr r0, [r4, #16] 80306fc: 4621 mov r1, r4 80306fe: 4798 blx r3 8030700: e000 b.n 8030704 8030702: 4628 mov r0, r5 if (tcp_active_pcbs_changed) { 8030704: f899 3000 ldrb.w r3, [r9] 8030708: 2b00 cmp r3, #0 803070a: f47f af00 bne.w 803050e goto tcp_slowtmr_start; } /* if err == ERR_ABRT, 'prev' is already deallocated */ if (err == ERR_OK) { 803070e: b910 cbnz r0, 8030716 tcp_output(prev); 8030710: 4620 mov r0, r4 8030712: f001 fcd9 bl 80320c8 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) { 8030716: 4626 mov r6, r4 prev = pcb; pcb = pcb->next; /* We check if we should poll the connection. */ ++prev->polltmr; if (prev->polltmr >= prev->pollinterval) { 8030718: 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) { 803071a: 2c00 cmp r4, #0 803071c: f47f aefd bne.w 803051a } /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; 8030720: 4b17 ldr r3, [pc, #92] ; (8030780 ) 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) { 8030722: 4e11 ldr r6, [pc, #68] ; (8030768 ) } /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; 8030724: 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; 8030726: 461f mov r7, r3 /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; while (pcb != NULL) { 8030728: e00f b.n 803074a 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) { 803072a: 6832 ldr r2, [r6, #0] 803072c: 6a6b ldr r3, [r5, #36] ; 0x24 803072e: 1ad3 subs r3, r2, r3 8030730: 2bf0 cmp r3, #240 ; 0xf0 8030732: d810 bhi.n 8030756 8030734: e00c b.n 8030750 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; 8030736: 60e2 str r2, [r4, #12] 8030738: e000 b.n 803073c } else { /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb); tcp_tw_pcbs = pcb->next; 803073a: 603a str r2, [r7, #0] } pcb2 = pcb; pcb = pcb->next; memp_free(MEMP_TCP_PCB, pcb2); 803073c: 4629 mov r1, r5 803073e: 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; 8030740: f8d5 800c ldr.w r8, [r5, #12] memp_free(MEMP_TCP_PCB, pcb2); 8030744: f7ff fa58 bl 802fbf8 /* 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; 8030748: 4645 mov r5, r8 /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; while (pcb != NULL) { 803074a: 2d00 cmp r5, #0 803074c: d1ed bne.n 803072a 803074e: e009 b.n 8030764 pcb2 = pcb; pcb = pcb->next; memp_free(MEMP_TCP_PCB, pcb2); } else { prev = pcb; pcb = pcb->next; 8030750: 462c mov r4, r5 8030752: 68ed ldr r5, [r5, #12] 8030754: e7f9 b.n 803074a /* If the PCB should be removed, do it. */ if (pcb_remove) { struct tcp_pcb *pcb2; tcp_pcb_purge(pcb); 8030756: 4628 mov r0, r5 8030758: f7ff feae bl 80304b8 803075c: 68ea ldr r2, [r5, #12] /* Remove PCB from tcp_tw_pcbs list. */ if (prev != NULL) { 803075e: 2c00 cmp r4, #0 8030760: d1e9 bne.n 8030736 8030762: e7ea b.n 803073a } else { prev = pcb; pcb = pcb->next; } } } 8030764: e8bd 8ffe ldmia.w sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8030768: 2000f6c0 .word 0x2000f6c0 803076c: 2000c3dd .word 0x2000c3dd 8030770: 2000f6bc .word 0x2000f6bc 8030774: 08044ffd .word 0x08044ffd 8030778: 08044ff0 .word 0x08044ff0 803077c: 000124f8 .word 0x000124f8 8030780: 2000f6d0 .word 0x2000f6d0 8030784: 2000f6b8 .word 0x2000f6b8 08030788 : * @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); 8030788: 6803 ldr r3, [r0, #0] 803078a: 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) { 803078c: b510 push {r4, lr} 803078e: 460c mov r4, r1 TCP_RMV(pcblist, pcb); 8030790: d102 bne.n 8030798 8030792: 68cb ldr r3, [r1, #12] 8030794: 6003 str r3, [r0, #0] 8030796: e00d b.n 80307b4 8030798: 4a11 ldr r2, [pc, #68] ; (80307e0 ) 803079a: 6013 str r3, [r2, #0] 803079c: e007 b.n 80307ae 803079e: 68d9 ldr r1, [r3, #12] 80307a0: 42a1 cmp r1, r4 80307a2: d103 bne.n 80307ac 80307a4: 6013 str r3, [r2, #0] 80307a6: 68e2 ldr r2, [r4, #12] 80307a8: 60da str r2, [r3, #12] 80307aa: e003 b.n 80307b4 80307ac: 460b mov r3, r1 80307ae: 2b00 cmp r3, #0 80307b0: d1f5 bne.n 803079e 80307b2: 6013 str r3, [r2, #0] 80307b4: 2300 movs r3, #0 80307b6: 60e3 str r3, [r4, #12] tcp_pcb_purge(pcb); 80307b8: 4620 mov r0, r4 80307ba: f7ff fe7d bl 80304b8 /* if there is an outstanding delayed ACKs, send it */ if (pcb->state != TIME_WAIT && 80307be: 7e23 ldrb r3, [r4, #24] 80307c0: 2b0a cmp r3, #10 80307c2: d00a beq.n 80307da 80307c4: 2b01 cmp r3, #1 80307c6: d008 beq.n 80307da pcb->state != LISTEN && pcb->flags & TF_ACK_DELAY) { 80307c8: 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 && 80307ca: 07da lsls r2, r3, #31 80307cc: d505 bpl.n 80307da pcb->flags & TF_ACK_DELAY) { pcb->flags |= TF_ACK_NOW; 80307ce: f043 0302 orr.w r3, r3, #2 80307d2: 77a3 strb r3, [r4, #30] tcp_output(pcb); 80307d4: 4620 mov r0, r4 80307d6: f001 fc77 bl 80320c8 #if TCP_QUEUE_OOSEQ LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL); #endif /* TCP_QUEUE_OOSEQ */ } pcb->state = CLOSED; 80307da: 2300 movs r3, #0 80307dc: 7623 strb r3, [r4, #24] 80307de: bd10 pop {r4, pc} 80307e0: 2000f6c8 .word 0x2000f6c8 080307e4 : 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) { 80307e4: 7e03 ldrb r3, [r0, #24] 80307e6: 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) { 80307e8: e92d 43f7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, lr} 80307ec: 4604 mov r4, r0 80307ee: 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) { 80307f0: d10a bne.n 8030808 tcp_pcb_remove(&tcp_tw_pcbs, pcb); 80307f2: 4621 mov r1, r4 80307f4: 481b ldr r0, [pc, #108] ; (8030864 ) 80307f6: f7ff ffc7 bl 8030788 memp_free(MEMP_TCP_PCB, pcb); 80307fa: 2002 movs r0, #2 80307fc: 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); } } 80307fe: b003 add sp, #12 8030800: 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); 8030804: f7ff b9f8 b.w 802fbf8 } else { seqno = pcb->snd_nxt; 8030808: f8d0 8050 ldr.w r8, [r0, #80] ; 0x50 ackno = pcb->rcv_nxt; 803080c: 6a87 ldr r7, [r0, #40] ; 0x28 #if LWIP_CALLBACK_API errf = pcb->errf; 803080e: f8d0 5088 ldr.w r5, [r0, #136] ; 0x88 #endif /* LWIP_CALLBACK_API */ errf_arg = pcb->callback_arg; 8030812: 6906 ldr r6, [r0, #16] TCP_PCB_REMOVE_ACTIVE(pcb); 8030814: 4814 ldr r0, [pc, #80] ; (8030868 ) 8030816: 4621 mov r1, r4 8030818: f7ff ffb6 bl 8030788 803081c: 4b13 ldr r3, [pc, #76] ; (803086c ) if (pcb->unacked != NULL) { 803081e: 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); 8030820: 2201 movs r2, #1 8030822: 701a strb r2, [r3, #0] if (pcb->unacked != NULL) { 8030824: b108 cbz r0, 803082a tcp_segs_free(pcb->unacked); 8030826: f7ff fe2e bl 8030486 } if (pcb->unsent != NULL) { 803082a: 6ee0 ldr r0, [r4, #108] ; 0x6c 803082c: b108 cbz r0, 8030832 tcp_segs_free(pcb->unsent); 803082e: f7ff fe2a bl 8030486 #if TCP_QUEUE_OOSEQ if (pcb->ooseq != NULL) { tcp_segs_free(pcb->ooseq); } #endif /* TCP_QUEUE_OOSEQ */ if (reset) { 8030832: f1b9 0f00 cmp.w r9, #0 8030836: d009 beq.n 803084c 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); 8030838: 8b63 ldrh r3, [r4, #26] 803083a: 9300 str r3, [sp, #0] 803083c: 8ba3 ldrh r3, [r4, #28] 803083e: 4640 mov r0, r8 8030840: 9301 str r3, [sp, #4] 8030842: 4639 mov r1, r7 8030844: 4622 mov r2, r4 8030846: 1d23 adds r3, r4, #4 8030848: f001 fd62 bl 8032310 } memp_free(MEMP_TCP_PCB, pcb); 803084c: 2002 movs r0, #2 803084e: 4621 mov r1, r4 8030850: f7ff f9d2 bl 802fbf8 TCP_EVENT_ERR(errf, errf_arg, ERR_ABRT); 8030854: b11d cbz r5, 803085e 8030856: 4630 mov r0, r6 8030858: f06f 0109 mvn.w r1, #9 803085c: 47a8 blx r5 } } 803085e: b003 add sp, #12 8030860: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 8030864: 2000f6d0 .word 0x2000f6d0 8030868: 2000f6bc .word 0x2000f6bc 803086c: 2000f6b8 .word 0x2000f6b8 08030870 : * @param pcb the tcp pcb to abort */ void tcp_abort(struct tcp_pcb *pcb) { tcp_abandon(pcb, 1); 8030870: 2101 movs r1, #1 8030872: f7ff bfb7 b.w 80307e4 8030876: 0000 movs r0, r0 08030878 : * @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) { 8030878: b537 push {r0, r1, r2, r4, r5, lr} 803087a: 4604 mov r4, r0 err_t err; if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { 803087c: 2900 cmp r1, #0 803087e: d043 beq.n 8030908 8030880: 7e03 ldrb r3, [r0, #24] 8030882: 2b04 cmp r3, #4 8030884: d001 beq.n 803088a 8030886: 2b07 cmp r3, #7 8030888: d13e bne.n 8030908 if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND)) { 803088a: 6f63 ldr r3, [r4, #116] ; 0x74 803088c: b923 cbnz r3, 8030898 803088e: 8da2 ldrh r2, [r4, #44] ; 0x2c 8030890: f241 63d0 movw r3, #5840 ; 0x16d0 8030894: 429a cmp r2, r3 8030896: d037 beq.n 8030908 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, 8030898: 8b63 ldrh r3, [r4, #26] 803089a: 6d20 ldr r0, [r4, #80] ; 0x50 803089c: 9300 str r3, [sp, #0] 803089e: 8ba3 ldrh r3, [r4, #28] 80308a0: 6aa1 ldr r1, [r4, #40] ; 0x28 80308a2: 9301 str r3, [sp, #4] 80308a4: 4622 mov r2, r4 80308a6: 1d23 adds r3, r4, #4 80308a8: f001 fd32 bl 8032310 pcb->local_port, pcb->remote_port); tcp_pcb_purge(pcb); 80308ac: 4620 mov r0, r4 80308ae: f7ff fe03 bl 80304b8 TCP_RMV_ACTIVE(pcb); 80308b2: 4a42 ldr r2, [pc, #264] ; (80309bc ) 80308b4: 6813 ldr r3, [r2, #0] 80308b6: 42a3 cmp r3, r4 80308b8: d101 bne.n 80308be 80308ba: 68e3 ldr r3, [r4, #12] 80308bc: e00c b.n 80308d8 80308be: 4a40 ldr r2, [pc, #256] ; (80309c0 ) 80308c0: 6013 str r3, [r2, #0] 80308c2: e007 b.n 80308d4 80308c4: 68d9 ldr r1, [r3, #12] 80308c6: 42a1 cmp r1, r4 80308c8: d103 bne.n 80308d2 80308ca: 6013 str r3, [r2, #0] 80308cc: 68e2 ldr r2, [r4, #12] 80308ce: 60da str r2, [r3, #12] 80308d0: e003 b.n 80308da 80308d2: 460b mov r3, r1 80308d4: 2b00 cmp r3, #0 80308d6: d1f5 bne.n 80308c4 80308d8: 6013 str r3, [r2, #0] 80308da: 4b3a ldr r3, [pc, #232] ; (80309c4 ) 80308dc: 2201 movs r2, #1 80308de: 701a strb r2, [r3, #0] if (pcb->state == ESTABLISHED) { 80308e0: 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); 80308e2: 2500 movs r5, #0 if (pcb->state == ESTABLISHED) { 80308e4: 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); 80308e6: 60e5 str r5, [r4, #12] if (pcb->state == ESTABLISHED) { 80308e8: d108 bne.n 80308fc /* move to TIME_WAIT since we close actively */ pcb->state = TIME_WAIT; 80308ea: 230a movs r3, #10 80308ec: 7623 strb r3, [r4, #24] TCP_REG(&tcp_tw_pcbs, pcb); 80308ee: 4b36 ldr r3, [pc, #216] ; (80309c8 ) 80308f0: 681a ldr r2, [r3, #0] 80308f2: 601c str r4, [r3, #0] 80308f4: 60e2 str r2, [r4, #12] 80308f6: f001 fea5 bl 8032644 80308fa: e003 b.n 8030904 } else { /* CLOSE_WAIT: deallocate the pcb since we already sent a RST for it */ memp_free(MEMP_TCP_PCB, pcb); 80308fc: 2002 movs r0, #2 80308fe: 4621 mov r1, r4 8030900: f7ff f97a bl 802fbf8 } return ERR_OK; 8030904: 4628 mov r0, r5 8030906: e051 b.n 80309ac } } switch (pcb->state) { 8030908: 7e23 ldrb r3, [r4, #24] 803090a: 2b07 cmp r3, #7 803090c: d853 bhi.n 80309b6 803090e: e8df f003 tbb [pc, r3] 8030912: 1e04 .short 0x1e04 8030914: 523c3527 .word 0x523c3527 8030918: 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) { 803091a: 8b63 ldrh r3, [r4, #26] 803091c: b1ab cbz r3, 803094a TCP_RMV(&tcp_bound_pcbs, pcb); 803091e: 4a2b ldr r2, [pc, #172] ; (80309cc ) 8030920: 6813 ldr r3, [r2, #0] 8030922: 42a3 cmp r3, r4 8030924: d101 bne.n 803092a 8030926: 68e3 ldr r3, [r4, #12] 8030928: e00c b.n 8030944 803092a: 4a25 ldr r2, [pc, #148] ; (80309c0 ) 803092c: 6013 str r3, [r2, #0] 803092e: e007 b.n 8030940 8030930: 68d9 ldr r1, [r3, #12] 8030932: 42a1 cmp r1, r4 8030934: d103 bne.n 803093e 8030936: 6013 str r3, [r2, #0] 8030938: 68e2 ldr r2, [r4, #12] 803093a: 60da str r2, [r3, #12] 803093c: e003 b.n 8030946 803093e: 460b mov r3, r1 8030940: 2b00 cmp r3, #0 8030942: d1f5 bne.n 8030930 8030944: 6013 str r3, [r2, #0] 8030946: 2300 movs r3, #0 8030948: 60e3 str r3, [r4, #12] } memp_free(MEMP_TCP_PCB, pcb); 803094a: 2002 movs r0, #2 803094c: e004 b.n 8030958 pcb = NULL; break; case LISTEN: err = ERR_OK; tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb); 803094e: 4820 ldr r0, [pc, #128] ; (80309d0 ) 8030950: 4621 mov r1, r4 8030952: f7ff ff19 bl 8030788 memp_free(MEMP_TCP_PCB_LISTEN, pcb); 8030956: 2003 movs r0, #3 8030958: 4621 mov r1, r4 803095a: f7ff f94d bl 802fbf8 pcb = NULL; break; 803095e: e02a b.n 80309b6 case SYN_SENT: err = ERR_OK; TCP_PCB_REMOVE_ACTIVE(pcb); 8030960: 4621 mov r1, r4 8030962: 4816 ldr r0, [pc, #88] ; (80309bc ) 8030964: f7ff ff10 bl 8030788 8030968: 4b16 ldr r3, [pc, #88] ; (80309c4 ) 803096a: 2201 movs r2, #1 memp_free(MEMP_TCP_PCB, pcb); 803096c: 2002 movs r0, #2 803096e: 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); 8030970: 701a strb r2, [r3, #0] memp_free(MEMP_TCP_PCB, pcb); 8030972: f7ff f941 bl 802fbf8 pcb = NULL; snmp_inc_tcpattemptfails(); 8030976: f004 f957 bl 8034c28 break; 803097a: e01c b.n 80309b6 case SYN_RCVD: err = tcp_send_fin(pcb); 803097c: 4620 mov r0, r4 803097e: f001 fb5e bl 803203e if (err == ERR_OK) { 8030982: b998 cbnz r0, 80309ac snmp_inc_tcpattemptfails(); 8030984: f004 f950 bl 8034c28 8030988: e005 b.n 8030996 pcb->state = FIN_WAIT_1; } break; case ESTABLISHED: err = tcp_send_fin(pcb); 803098a: 4620 mov r0, r4 803098c: f001 fb57 bl 803203e if (err == ERR_OK) { 8030990: b960 cbnz r0, 80309ac snmp_inc_tcpestabresets(); 8030992: f004 f951 bl 8034c38 pcb->state = FIN_WAIT_1; 8030996: 2305 movs r3, #5 8030998: e006 b.n 80309a8 } break; case CLOSE_WAIT: err = tcp_send_fin(pcb); 803099a: 4620 mov r0, r4 803099c: f001 fb4f bl 803203e if (err == ERR_OK) { 80309a0: b920 cbnz r0, 80309ac snmp_inc_tcpestabresets(); 80309a2: f004 f949 bl 8034c38 pcb->state = LAST_ACK; 80309a6: 2309 movs r3, #9 80309a8: 7623 strb r3, [r4, #24] 80309aa: e001 b.n 80309b0 80309ac: b240 sxtb r0, r0 80309ae: e004 b.n 80309ba 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); 80309b0: 4620 mov r0, r4 80309b2: f001 fb89 bl 80320c8 80309b6: 2000 movs r0, #0 80309b8: e7f8 b.n 80309ac } return err; } 80309ba: bd3e pop {r1, r2, r3, r4, r5, pc} 80309bc: 2000f6bc .word 0x2000f6bc 80309c0: 2000f6c8 .word 0x2000f6c8 80309c4: 2000f6b8 .word 0x2000f6b8 80309c8: 2000f6d0 .word 0x2000f6d0 80309cc: 2000f6cc .word 0x2000f6cc 80309d0: 2000f6c4 .word 0x2000f6c4 080309d4 : * another err_t on error. */ err_t tcp_shutdown(struct tcp_pcb *pcb, int shut_rx, int shut_tx) { if (pcb->state == LISTEN) { 80309d4: 7e03 ldrb r3, [r0, #24] 80309d6: 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) { 80309d8: b570 push {r4, r5, r6, lr} 80309da: 4604 mov r4, r0 80309dc: 460e mov r6, r1 80309de: 4615 mov r5, r2 if (pcb->state == LISTEN) { 80309e0: d019 beq.n 8030a16 return ERR_CONN; } if (shut_rx) { 80309e2: b161 cbz r1, 80309fe /* shut down the receive side: set a flag not to receive any more data... */ pcb->flags |= TF_RXCLOSED; 80309e4: 7f83 ldrb r3, [r0, #30] 80309e6: f043 0310 orr.w r3, r3, #16 80309ea: 7783 strb r3, [r0, #30] if (shut_tx) { 80309ec: b10a cbz r2, 80309f2 /* shutting down the tx AND rx side is the same as closing for the raw API */ return tcp_close_shutdown(pcb, 1); 80309ee: 2101 movs r1, #1 80309f0: e00d b.n 8030a0e } /* ... and free buffered data */ if (pcb->refused_data != NULL) { 80309f2: 6f40 ldr r0, [r0, #116] ; 0x74 80309f4: b190 cbz r0, 8030a1c pbuf_free(pcb->refused_data); 80309f6: f7ff fa09 bl 802fe0c pcb->refused_data = NULL; 80309fa: 6765 str r5, [r4, #116] ; 0x74 80309fc: e00e b.n 8030a1c } } if (shut_tx) { 80309fe: b15a cbz r2, 8030a18 /* 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) { 8030a00: 2b07 cmp r3, #7 8030a02: d808 bhi.n 8030a16 8030a04: b25b sxtb r3, r3 8030a06: f04f 52c8 mov.w r2, #419430400 ; 0x19000000 8030a0a: 409a lsls r2, r3 8030a0c: d503 bpl.n 8030a16 into CLOSED state, where the PCB is deallocated. */ return ERR_CONN; } } return ERR_OK; } 8030a0e: 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); 8030a12: f7ff bf31 b.w 8030878 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; 8030a16: 25f3 movs r5, #243 ; 0xf3 8030a18: b268 sxtb r0, r5 8030a1a: bd70 pop {r4, r5, r6, pc} } } return ERR_OK; 8030a1c: 2500 movs r5, #0 8030a1e: e7fb b.n 8030a18 08030a20 : #if TCP_DEBUG LWIP_DEBUGF(TCP_DEBUG, ("tcp_close: closing in ")); tcp_debug_print_state(pcb->state); #endif /* TCP_DEBUG */ if (pcb->state != LISTEN) { 8030a20: 7e03 ldrb r3, [r0, #24] 8030a22: 2b01 cmp r3, #1 8030a24: d003 beq.n 8030a2e /* Set a flag not to receive any more data... */ pcb->flags |= TF_RXCLOSED; 8030a26: 7f83 ldrb r3, [r0, #30] 8030a28: f043 0310 orr.w r3, r3, #16 8030a2c: 7783 strb r3, [r0, #30] } /* ... and close */ return tcp_close_shutdown(pcb, 1); 8030a2e: 2101 movs r1, #1 8030a30: f7ff bf22 b.w 8030878 08030a34 : * 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) { 8030a34: b510 push {r4, lr} 8030a36: 4608 mov r0, r1 LWIP_UNUSED_ARG(arg); if (p != NULL) { 8030a38: 4614 mov r4, r2 8030a3a: b132 cbz r2, 8030a4a tcp_recved(pcb, p->tot_len); 8030a3c: 8911 ldrh r1, [r2, #8] 8030a3e: f7ff fcf9 bl 8030434 pbuf_free(p); 8030a42: 4620 mov r0, r4 8030a44: f7ff f9e2 bl 802fe0c 8030a48: e004 b.n 8030a54 } else if (err == ERR_OK) { 8030a4a: b91b cbnz r3, 8030a54 return tcp_close(pcb); } return ERR_OK; } 8030a4c: 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); 8030a50: f7ff bfe6 b.w 8030a20 } return ERR_OK; } 8030a54: 2000 movs r0, #0 8030a56: bd10 pop {r4, pc} 08030a58 : } /** Pass pcb->refused_data to the recv callback */ err_t tcp_process_refused_data(struct tcp_pcb *pcb) { 8030a58: b5f8 push {r3, r4, r5, r6, r7, lr} err_t err; u8_t refused_flags = pcb->refused_data->flags; 8030a5a: 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); 8030a5c: 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; 8030a5e: 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; 8030a60: 2300 movs r3, #0 } /** Pass pcb->refused_data to the recv callback */ err_t tcp_process_refused_data(struct tcp_pcb *pcb) { 8030a62: 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; 8030a64: 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); 8030a66: b126 cbz r6, 8030a72 8030a68: 4621 mov r1, r4 8030a6a: 462a mov r2, r5 8030a6c: 6900 ldr r0, [r0, #16] 8030a6e: 47b0 blx r6 8030a70: e005 b.n 8030a7e 8030a72: 4630 mov r0, r6 8030a74: 4621 mov r1, r4 8030a76: 462a mov r2, r5 8030a78: 4633 mov r3, r6 8030a7a: f7ff ffdb bl 8030a34 if (err == ERR_OK) { 8030a7e: b9b0 cbnz r0, 8030aae /* did refused_data include a FIN? */ if (refused_flags & PBUF_FLAG_TCP_FIN) { 8030a80: f007 0720 and.w r7, r7, #32 8030a84: b2ff uxtb r7, r7 8030a86: b1bf cbz r7, 8030ab8 /* correct rcv_wnd as the application won't call tcp_recved() for the FIN's seqno */ if (pcb->rcv_wnd != TCP_WND) { 8030a88: 8da3 ldrh r3, [r4, #44] ; 0x2c 8030a8a: f241 62d0 movw r2, #5840 ; 0x16d0 8030a8e: 4293 cmp r3, r2 8030a90: d001 beq.n 8030a96 pcb->rcv_wnd++; 8030a92: 3301 adds r3, #1 8030a94: 85a3 strh r3, [r4, #44] ; 0x2c } TCP_EVENT_CLOSED(pcb, err); 8030a96: 6fe5 ldr r5, [r4, #124] ; 0x7c 8030a98: b905 cbnz r5, 8030a9c 8030a9a: e00c b.n 8030ab6 8030a9c: 2200 movs r2, #0 8030a9e: 6920 ldr r0, [r4, #16] 8030aa0: 4621 mov r1, r4 8030aa2: 4613 mov r3, r2 8030aa4: 47a8 blx r5 if (err == ERR_ABRT) { 8030aa6: 300a adds r0, #10 8030aa8: d105 bne.n 8030ab6 return ERR_ABRT; 8030aaa: 20f6 movs r0, #246 ; 0xf6 8030aac: e004 b.n 8030ab8 } } } else if (err == ERR_ABRT) { 8030aae: b240 sxtb r0, r0 8030ab0: 300a adds r0, #10 8030ab2: d0fa beq.n 8030aaa 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; 8030ab4: 6765 str r5, [r4, #116] ; 0x74 } return ERR_OK; 8030ab6: 2000 movs r0, #0 } 8030ab8: b240 sxtb r0, r0 8030aba: bdf8 pop {r3, r4, r5, r6, r7, pc} 08030abc : * * Automatically called from tcp_tmr(). */ void tcp_fasttmr(void) { 8030abc: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} struct tcp_pcb *pcb; ++tcp_timer_ctr; 8030ac0: 4b18 ldr r3, [pc, #96] ; (8030b24 ) tcp_fasttmr_start: pcb = tcp_active_pcbs; 8030ac2: 4f19 ldr r7, [pc, #100] ; (8030b28 ) void tcp_fasttmr(void) { struct tcp_pcb *pcb; ++tcp_timer_ctr; 8030ac4: 781a ldrb r2, [r3, #0] 8030ac6: 3201 adds r2, #1 8030ac8: 701a strb r2, [r3, #0] tcp_fasttmr_start: pcb = tcp_active_pcbs; while(pcb != NULL) { if (pcb->last_timer != tcp_timer_ctr) { 8030aca: 4698 mov r8, r3 struct tcp_pcb *pcb; ++tcp_timer_ctr; tcp_fasttmr_start: pcb = tcp_active_pcbs; 8030acc: 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; 8030ace: 4d17 ldr r5, [pc, #92] ; (8030b2c ) 8030ad0: 2600 movs r6, #0 ++tcp_timer_ctr; tcp_fasttmr_start: pcb = tcp_active_pcbs; while(pcb != NULL) { 8030ad2: e022 b.n 8030b1a if (pcb->last_timer != tcp_timer_ctr) { 8030ad4: f898 2000 ldrb.w r2, [r8] 8030ad8: f894 3021 ldrb.w r3, [r4, #33] ; 0x21 8030adc: 4293 cmp r3, r2 8030ade: d020 beq.n 8030b22 struct tcp_pcb *next; pcb->last_timer = tcp_timer_ctr; 8030ae0: f884 2021 strb.w r2, [r4, #33] ; 0x21 /* send delayed ACKs */ if (pcb->flags & TF_ACK_DELAY) { 8030ae4: 7fa2 ldrb r2, [r4, #30] 8030ae6: 07d1 lsls r1, r2, #31 8030ae8: d509 bpl.n 8030afe LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n")); tcp_ack_now(pcb); 8030aea: f042 0202 orr.w r2, r2, #2 8030aee: 77a2 strb r2, [r4, #30] tcp_output(pcb); 8030af0: 4620 mov r0, r4 8030af2: f001 fae9 bl 80320c8 pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); 8030af6: 7fa3 ldrb r3, [r4, #30] 8030af8: f023 0303 bic.w r3, r3, #3 8030afc: 77a3 strb r3, [r4, #30] } next = pcb->next; /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 8030afe: 6f63 ldr r3, [r4, #116] ; 0x74 tcp_ack_now(pcb); tcp_output(pcb); pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); } next = pcb->next; 8030b00: f8d4 900c ldr.w r9, [r4, #12] /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 8030b04: b90b cbnz r3, 8030b0a 8030b06: 464c mov r4, r9 8030b08: e007 b.n 8030b1a tcp_active_pcbs_changed = 0; tcp_process_refused_data(pcb); 8030b0a: 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; 8030b0c: 702e strb r6, [r5, #0] tcp_process_refused_data(pcb); 8030b0e: f7ff ffa3 bl 8030a58 if (tcp_active_pcbs_changed) { 8030b12: 782b ldrb r3, [r5, #0] 8030b14: 2b00 cmp r3, #0 8030b16: d1d9 bne.n 8030acc 8030b18: e7f5 b.n 8030b06 ++tcp_timer_ctr; tcp_fasttmr_start: pcb = tcp_active_pcbs; while(pcb != NULL) { 8030b1a: 2c00 cmp r4, #0 8030b1c: d1da bne.n 8030ad4 8030b1e: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8030b22: e7fe b.n 8030b22 8030b24: 2000c3dd .word 0x2000c3dd 8030b28: 2000f6bc .word 0x2000f6bc 8030b2c: 2000f6b8 .word 0x2000f6b8 08030b30 : /** * Called periodically to dispatch TCP timers. */ void tcp_tmr(void) { 8030b30: b508 push {r3, lr} /* Call tcp_fasttmr() every 250 ms */ tcp_fasttmr(); 8030b32: f7ff ffc3 bl 8030abc if (++tcp_timer & 1) { 8030b36: 4a06 ldr r2, [pc, #24] ; (8030b50 ) 8030b38: 7813 ldrb r3, [r2, #0] 8030b3a: 3301 adds r3, #1 8030b3c: b2db uxtb r3, r3 8030b3e: 07d8 lsls r0, r3, #31 8030b40: 7013 strb r3, [r2, #0] 8030b42: d503 bpl.n 8030b4c /* Call tcp_tmr() every 500 ms, i.e., every other timer tcp_tmr() is called. */ tcp_slowtmr(); } } 8030b44: 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(); 8030b48: f7ff bcd4 b.w 80304f4 8030b4c: bd08 pop {r3, pc} 8030b4e: bf00 nop 8030b50: 2000c3dc .word 0x2000c3dc 08030b54 : u32_t tcp_next_iss(void) { static u32_t iss = 6510; iss += tcp_ticks; /* XXX */ 8030b54: 4b03 ldr r3, [pc, #12] ; (8030b64 ) 8030b56: 4a04 ldr r2, [pc, #16] ; (8030b68 ) 8030b58: 6810 ldr r0, [r2, #0] 8030b5a: 681a ldr r2, [r3, #0] 8030b5c: 1880 adds r0, r0, r2 8030b5e: 6018 str r0, [r3, #0] return iss; } 8030b60: 4770 bx lr 8030b62: bf00 nop 8030b64: 20000718 .word 0x20000718 8030b68: 2000f6c0 .word 0x2000f6c0 08030b6c : * @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) { 8030b6c: b5f8 push {r3, r4, r5, r6, r7, lr} 8030b6e: 4605 mov r5, r0 struct tcp_pcb *pcb; u32_t iss; pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 8030b70: 2002 movs r0, #2 8030b72: f7ff f82b bl 802fbcc if (pcb == NULL) { 8030b76: 4604 mov r4, r0 8030b78: 2800 cmp r0, #0 8030b7a: d136 bne.n 8030bea 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) { 8030b7c: 4b39 ldr r3, [pc, #228] ; (8030c64 ) if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 8030b7e: 4a3a ldr r2, [pc, #232] ; (8030c68 ) 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) { 8030b80: 681b ldr r3, [r3, #0] if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 8030b82: 6811 ldr r1, [r2, #0] 8030b84: e007 b.n 8030b96 8030b86: 6a5a ldr r2, [r3, #36] ; 0x24 8030b88: 1a8a subs r2, r1, r2 8030b8a: 42a2 cmp r2, r4 8030b8c: bf34 ite cc 8030b8e: 4622 movcc r2, r4 8030b90: 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) { 8030b92: 68db ldr r3, [r3, #12] 8030b94: 4614 mov r4, r2 8030b96: 2b00 cmp r3, #0 8030b98: d1f5 bne.n 8030b86 if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { inactivity = tcp_ticks - pcb->tmr; inactive = pcb; } } if (inactive != NULL) { 8030b9a: b108 cbz r0, 8030ba0 LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_timewait: killing oldest TIME-WAIT PCB %p (%"S32_F")\n", (void *)inactive, inactivity)); tcp_abort(inactive); 8030b9c: f7ff fe68 bl 8030870 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); 8030ba0: 2002 movs r0, #2 8030ba2: f7ff f813 bl 802fbcc if (pcb == NULL) { 8030ba6: 4604 mov r4, r0 8030ba8: b9f8 cbnz r0, 8030bea 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) { 8030baa: 4a2f ldr r2, [pc, #188] ; (8030c68 ) 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) { 8030bac: 4b2f ldr r3, [pc, #188] ; (8030c6c ) if (pcb->prio <= prio && pcb->prio <= mprio && (u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 8030bae: 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) { 8030bb0: 681b ldr r3, [r3, #0] struct tcp_pcb *pcb, *inactive; u32_t inactivity; u8_t mprio; mprio = TCP_PRIO_MAX; 8030bb2: 207f movs r0, #127 ; 0x7f /* We kill the oldest active connection that has lower priority than prio. */ inactivity = 0; inactive = NULL; 8030bb4: 4622 mov r2, r4 8030bb6: e00c b.n 8030bd2 for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { if (pcb->prio <= prio && 8030bb8: 7e59 ldrb r1, [r3, #25] 8030bba: 42a9 cmp r1, r5 8030bbc: d808 bhi.n 8030bd0 8030bbe: 4281 cmp r1, r0 8030bc0: d806 bhi.n 8030bd0 pcb->prio <= mprio && (u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 8030bc2: 6a5e ldr r6, [r3, #36] ; 0x24 8030bc4: 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 && 8030bc6: 42a6 cmp r6, r4 8030bc8: d302 bcc.n 8030bd0 8030bca: 4608 mov r0, r1 8030bcc: 4634 mov r4, r6 8030bce: 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) { 8030bd0: 68db ldr r3, [r3, #12] 8030bd2: 2b00 cmp r3, #0 8030bd4: d1f0 bne.n 8030bb8 inactivity = tcp_ticks - pcb->tmr; inactive = pcb; mprio = pcb->prio; } } if (inactive != NULL) { 8030bd6: b112 cbz r2, 8030bde LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB %p (%"S32_F")\n", (void *)inactive, inactivity)); tcp_abort(inactive); 8030bd8: 4610 mov r0, r2 8030bda: f7ff fe49 bl 8030870 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); 8030bde: 2002 movs r0, #2 8030be0: f7fe fff4 bl 802fbcc if (pcb != NULL) { /* adjust err stats: timewait PCB was freed above */ MEMP_STATS_DEC(err, MEMP_TCP_PCB); } } if (pcb != NULL) { 8030be4: 4604 mov r4, r0 8030be6: 2800 cmp r0, #0 8030be8: d039 beq.n 8030c5e memset(pcb, 0, sizeof(struct tcp_pcb)); 8030bea: 2100 movs r1, #0 8030bec: 2294 movs r2, #148 ; 0x94 8030bee: 4620 mov r0, r4 8030bf0: f7f0 ff86 bl 8021b00 pcb->prio = prio; pcb->snd_buf = TCP_SND_BUF; pcb->snd_queuelen = 0; pcb->rcv_wnd = TCP_WND; 8030bf4: 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; 8030bf8: f246 63a8 movw r3, #26280 ; 0x66a8 8030bfc: f8a4 3066 strh.w r3, [r4, #102] ; 0x66 pcb->snd_queuelen = 0; pcb->rcv_wnd = TCP_WND; 8030c00: 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; 8030c02: 2300 movs r3, #0 pcb->rcv_wnd = TCP_WND; pcb->rcv_ann_wnd = TCP_WND; 8030c04: 85e2 strh r2, [r4, #46] ; 0x2e pcb->tos = 0; pcb->ttl = TCP_TTL; 8030c06: 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; 8030c08: 7665 strb r5, [r4, #25] pcb->snd_buf = TCP_SND_BUF; pcb->snd_queuelen = 0; 8030c0a: f8a4 3068 strh.w r3, [r4, #104] ; 0x68 8030c0e: 461d mov r5, r3 pcb->rcv_wnd = TCP_WND; pcb->rcv_ann_wnd = TCP_WND; pcb->tos = 0; 8030c10: 7263 strb r3, [r4, #9] pcb->ttl = TCP_TTL; 8030c12: 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; 8030c14: 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; 8030c18: 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; 8030c1c: 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; 8030c20: 86e2 strh r2, [r4, #54] ; 0x36 pcb->rto = 3000 / TCP_SLOW_INTERVAL; pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; 8030c22: 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; 8030c24: 2206 movs r2, #6 pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; pcb->cwnd = 1; 8030c26: 2301 movs r3, #1 8030c28: 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; 8030c2c: f8a4 2044 strh.w r2, [r4, #68] ; 0x44 pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; 8030c30: f8a4 2042 strh.w r2, [r4, #66] ; 0x42 pcb->rtime = -1; pcb->cwnd = 1; iss = tcp_next_iss(); 8030c34: f7ff ff8e bl 8030b54 pcb->snd_wl2 = iss; pcb->snd_nxt = iss; pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; 8030c38: 4b0b ldr r3, [pc, #44] ; (8030c68 ) pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; pcb->cwnd = 1; iss = tcp_next_iss(); pcb->snd_wl2 = iss; 8030c3a: 65a0 str r0, [r4, #88] ; 0x58 pcb->snd_nxt = iss; pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; 8030c3c: 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; 8030c3e: 6520 str r0, [r4, #80] ; 0x50 pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; 8030c40: 6263 str r3, [r4, #36] ; 0x24 pcb->last_timer = tcp_timer_ctr; 8030c42: 4b0b ldr r3, [pc, #44] ; (8030c70 ) pcb->rtime = -1; pcb->cwnd = 1; iss = tcp_next_iss(); pcb->snd_wl2 = iss; pcb->snd_nxt = iss; pcb->lastack = iss; 8030c44: 64a0 str r0, [r4, #72] ; 0x48 pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; pcb->last_timer = tcp_timer_ctr; 8030c46: 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; 8030c48: 65e0 str r0, [r4, #92] ; 0x5c pcb->tmr = tcp_ticks; pcb->last_timer = tcp_timer_ctr; 8030c4a: f884 3021 strb.w r3, [r4, #33] ; 0x21 pcb->polltmr = 0; #if LWIP_CALLBACK_API pcb->recv = tcp_recv_null; 8030c4e: 4b09 ldr r3, [pc, #36] ; (8030c74 ) pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; pcb->last_timer = tcp_timer_ctr; pcb->polltmr = 0; 8030c50: 77e5 strb r5, [r4, #31] #if LWIP_CALLBACK_API pcb->recv = tcp_recv_null; 8030c52: 67e3 str r3, [r4, #124] ; 0x7c #endif /* LWIP_CALLBACK_API */ /* Init KEEPALIVE timer */ pcb->keep_idle = TCP_KEEPIDLE_DEFAULT; 8030c54: 4b08 ldr r3, [pc, #32] ; (8030c78 ) #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; 8030c56: 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; 8030c5a: f8c4 308c str.w r3, [r4, #140] ; 0x8c #endif /* LWIP_TCP_KEEPALIVE */ pcb->keep_cnt_sent = 0; } return pcb; } 8030c5e: 4620 mov r0, r4 8030c60: bdf8 pop {r3, r4, r5, r6, r7, pc} 8030c62: bf00 nop 8030c64: 2000f6d0 .word 0x2000f6d0 8030c68: 2000f6c0 .word 0x2000f6c0 8030c6c: 2000f6bc .word 0x2000f6bc 8030c70: 2000c3dd .word 0x2000c3dd 8030c74: 08030a35 .word 0x08030a35 8030c78: 006ddd00 .word 0x006ddd00 08030c7c : * @return a new tcp_pcb that initially is in state CLOSED */ struct tcp_pcb * tcp_new(void) { return tcp_alloc(TCP_PRIO_NORMAL); 8030c7c: 2040 movs r0, #64 ; 0x40 8030c7e: f7ff bf75 b.w 8030b6c 08030c82 : * 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) { 8030c82: b510 push {r4, lr} 8030c84: 4604 mov r4, r0 u16_t mss_s; struct netif *outif; outif = ip_route(addr); 8030c86: 4608 mov r0, r1 8030c88: f002 f96c bl 8032f64 if ((outif != NULL) && (outif->mtu != 0)) { 8030c8c: b130 cbz r0, 8030c9c 8030c8e: 8c83 ldrh r3, [r0, #36] ; 0x24 8030c90: b123 cbz r3, 8030c9c mss_s = outif->mtu - IP_HLEN - TCP_HLEN; 8030c92: 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); 8030c94: b29b uxth r3, r3 8030c96: 429c cmp r4, r3 8030c98: bf28 it cs 8030c9a: 461c movcs r4, r3 } return sendmss; } 8030c9c: 4620 mov r0, r4 8030c9e: bd10 pop {r4, pc} 08030ca0 : * 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) { 8030ca0: b5f8 push {r3, r4, r5, r6, r7, lr} 8030ca2: 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); 8030ca4: 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) { 8030ca6: 4604 mov r4, r0 8030ca8: 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); 8030caa: 2b00 cmp r3, #0 8030cac: d161 bne.n 8030d72 LWIP_DEBUGF(TCP_DEBUG, ("tcp_connect to port %"U16_F"\n", port)); if (ipaddr != NULL) { 8030cae: 2900 cmp r1, #0 8030cb0: d061 beq.n 8030d76 pcb->remote_ip = *ipaddr; 8030cb2: 680b ldr r3, [r1, #0] } else { return ERR_VAL; } pcb->remote_port = port; 8030cb4: 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; 8030cb6: 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))) { 8030cb8: 6803 ldr r3, [r0, #0] 8030cba: b933 cbnz r3, 8030cca /* no local IP address set, yet. */ struct netif *netif = ip_route(&(pcb->remote_ip)); 8030cbc: 3004 adds r0, #4 8030cbe: f002 f951 bl 8032f64 if (netif == NULL) { 8030cc2: 2800 cmp r0, #0 8030cc4: d059 beq.n 8030d7a /* 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); 8030cc6: 6843 ldr r3, [r0, #4] 8030cc8: 6023 str r3, [r4, #0] } old_local_port = pcb->local_port; 8030cca: 8b66 ldrh r6, [r4, #26] if (pcb->local_port == 0) { 8030ccc: b32e cbz r6, 8030d1a } } } } #endif /* SO_REUSE */ iss = tcp_next_iss(); 8030cce: f7ff ff41 bl 8030b54 pcb->rcv_nxt = 0; pcb->snd_nxt = iss; 8030cd2: 6520 str r0, [r4, #80] ; 0x50 pcb->lastack = iss - 1; 8030cd4: 3801 subs r0, #1 pcb->snd_lbb = iss - 1; pcb->rcv_wnd = TCP_WND; 8030cd6: f241 62d0 movw r2, #5840 ; 0x16d0 } } } #endif /* SO_REUSE */ iss = tcp_next_iss(); pcb->rcv_nxt = 0; 8030cda: 2300 movs r3, #0 pcb->snd_nxt = iss; pcb->lastack = iss - 1; 8030cdc: 64a0 str r0, [r4, #72] ; 0x48 pcb->snd_lbb = iss - 1; 8030cde: 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; 8030ce0: f44f 7006 mov.w r0, #536 ; 0x218 #if TCP_CALCULATE_EFF_SEND_MSS pcb->mss = tcp_eff_send_mss(pcb->mss, ipaddr); 8030ce4: 4629 mov r1, r5 } } } #endif /* SO_REUSE */ iss = tcp_next_iss(); pcb->rcv_nxt = 0; 8030ce6: 62a3 str r3, [r4, #40] ; 0x28 pcb->snd_nxt = iss; pcb->lastack = iss - 1; pcb->snd_lbb = iss - 1; pcb->rcv_wnd = TCP_WND; 8030ce8: 85a2 strh r2, [r4, #44] ; 0x2c pcb->rcv_ann_wnd = TCP_WND; 8030cea: 85e2 strh r2, [r4, #46] ; 0x2e pcb->rcv_ann_right_edge = pcb->rcv_nxt; 8030cec: 6323 str r3, [r4, #48] ; 0x30 pcb->snd_wnd = TCP_WND; 8030cee: 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; 8030cf2: 86e0 strh r0, [r4, #54] ; 0x36 #if TCP_CALCULATE_EFF_SEND_MSS pcb->mss = tcp_eff_send_mss(pcb->mss, ipaddr); 8030cf4: f7ff ffc5 bl 8030c82 #endif /* TCP_CALCULATE_EFF_SEND_MSS */ pcb->cwnd = 1; 8030cf8: 2301 movs r3, #1 8030cfa: f8a4 304c strh.w r3, [r4, #76] ; 0x4c pcb->ssthresh = pcb->mss * 10; 8030cfe: 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); 8030d00: 86e0 strh r0, [r4, #54] ; 0x36 #endif /* TCP_CALCULATE_EFF_SEND_MSS */ pcb->cwnd = 1; pcb->ssthresh = pcb->mss * 10; 8030d02: 4358 muls r0, r3 8030d04: f8a4 004e strh.w r0, [r4, #78] ; 0x4e #if LWIP_CALLBACK_API pcb->connected = connected; 8030d08: 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); 8030d0c: 4620 mov r0, r4 8030d0e: 2102 movs r1, #2 8030d10: f001 f94a bl 8031fa8 if (ret == ERR_OK) { 8030d14: 4605 mov r5, r0 8030d16: b130 cbz r0, 8030d26 8030d18: e032 b.n 8030d80 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(); 8030d1a: f7ff fabd bl 8030298 8030d1e: 8360 strh r0, [r4, #26] if (pcb->local_port == 0) { 8030d20: 2800 cmp r0, #0 8030d22: d1d4 bne.n 8030cce 8030d24: e02b b.n 8030d7e /* 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; 8030d26: 2302 movs r3, #2 8030d28: 7623 strb r3, [r4, #24] if (old_local_port != 0) { 8030d2a: b19e cbz r6, 8030d54 TCP_RMV(&tcp_bound_pcbs, pcb); 8030d2c: 4a15 ldr r2, [pc, #84] ; (8030d84 ) 8030d2e: 6813 ldr r3, [r2, #0] 8030d30: 42a3 cmp r3, r4 8030d32: d101 bne.n 8030d38 8030d34: 68e3 ldr r3, [r4, #12] 8030d36: e00c b.n 8030d52 8030d38: 4a13 ldr r2, [pc, #76] ; (8030d88 ) 8030d3a: 6013 str r3, [r2, #0] 8030d3c: e007 b.n 8030d4e 8030d3e: 68d9 ldr r1, [r3, #12] 8030d40: 42a1 cmp r1, r4 8030d42: d103 bne.n 8030d4c 8030d44: 6013 str r3, [r2, #0] 8030d46: 68e2 ldr r2, [r4, #12] 8030d48: 60da str r2, [r3, #12] 8030d4a: e003 b.n 8030d54 8030d4c: 460b mov r3, r1 8030d4e: 2b00 cmp r3, #0 8030d50: d1f5 bne.n 8030d3e 8030d52: 6013 str r3, [r2, #0] } TCP_REG_ACTIVE(pcb); 8030d54: 4b0d ldr r3, [pc, #52] ; (8030d8c ) 8030d56: 681a ldr r2, [r3, #0] 8030d58: 601c str r4, [r3, #0] 8030d5a: 60e2 str r2, [r4, #12] 8030d5c: f001 fc72 bl 8032644 8030d60: 4b0b ldr r3, [pc, #44] ; (8030d90 ) 8030d62: 2201 movs r2, #1 8030d64: 701a strb r2, [r3, #0] snmp_inc_tcpactiveopens(); 8030d66: f003 ff4f bl 8034c08 tcp_output(pcb); 8030d6a: 4620 mov r0, r4 8030d6c: f001 f9ac bl 80320c8 8030d70: e006 b.n 8030d80 { 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); 8030d72: 25f7 movs r5, #247 ; 0xf7 8030d74: e004 b.n 8030d80 LWIP_DEBUGF(TCP_DEBUG, ("tcp_connect to port %"U16_F"\n", port)); if (ipaddr != NULL) { pcb->remote_ip = *ipaddr; } else { return ERR_VAL; 8030d76: 25fa movs r5, #250 ; 0xfa 8030d78: e002 b.n 8030d80 /* 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; 8030d7a: 25fc movs r5, #252 ; 0xfc 8030d7c: e000 b.n 8030d80 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; 8030d7e: 25fe movs r5, #254 ; 0xfe snmp_inc_tcpactiveopens(); tcp_output(pcb); } return ret; } 8030d80: b268 sxtb r0, r5 8030d82: bdf8 pop {r3, r4, r5, r6, r7, pc} 8030d84: 2000f6cc .word 0x2000f6cc 8030d88: 2000f6c8 .word 0x2000f6c8 8030d8c: 2000f6bc .word 0x2000f6bc 8030d90: 2000f6b8 .word 0x2000f6b8 08030d94 : * * @param pcb the tcp_pcb for which a segment arrived */ static void tcp_parseopt(struct tcp_pcb *pcb) { 8030d94: 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; 8030d96: 4d1e ldr r5, [pc, #120] ; (8030e10 ) 8030d98: 682c ldr r4, [r5, #0] * * @param pcb the tcp_pcb for which a segment arrived */ static void tcp_parseopt(struct tcp_pcb *pcb) { 8030d9a: 4606 mov r6, r0 #endif opts = (u8_t *)tcphdr + TCP_HLEN; /* Parse the TCP MSS option, if present. */ if(TCPH_HDRLEN(tcphdr) > 0x5) { 8030d9c: 89a0 ldrh r0, [r4, #12] 8030d9e: f7fd fefc bl 802eb9a 8030da2: f3c0 300f ubfx r0, r0, #12, #16 8030da6: 2805 cmp r0, #5 8030da8: d931 bls.n 8030e0e max_c = (TCPH_HDRLEN(tcphdr) - 5) << 2; 8030daa: 682b ldr r3, [r5, #0] 8030dac: 8998 ldrh r0, [r3, #12] 8030dae: f7fd fef4 bl 802eb9a 8030db2: 0b00 lsrs r0, r0, #12 8030db4: 1f41 subs r1, r0, #5 8030db6: 0089 lsls r1, r1, #2 u8_t *opts, opt; #if LWIP_TCP_TIMESTAMPS u32_t tsval; #endif opts = (u8_t *)tcphdr + TCP_HLEN; 8030db8: 3414 adds r4, #20 /* Parse the TCP MSS option, if present. */ if(TCPH_HDRLEN(tcphdr) > 0x5) { max_c = (TCPH_HDRLEN(tcphdr) - 5) << 2; 8030dba: b289 uxth r1, r1 for (c = 0; c < max_c; ) { 8030dbc: 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; 8030dbe: f240 50b3 movw r0, #1459 ; 0x5b3 8030dc2: 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; ) { 8030dc6: e020 b.n 8030e0a opt = opts[c]; switch (opt) { 8030dc8: 5ce2 ldrb r2, [r4, r3] 8030dca: 2a01 cmp r2, #1 8030dcc: d005 beq.n 8030dda 8030dce: d31e bcc.n 8030e0e 8030dd0: 2a02 cmp r2, #2 8030dd2: eb04 0203 add.w r2, r4, r3 8030dd6: d114 bne.n 8030e02 8030dd8: e001 b.n 8030dde /* End of options. */ LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: EOL\n")); return; case 0x01: /* NOP option. */ ++c; 8030dda: 3301 adds r3, #1 8030ddc: e014 b.n 8030e08 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) { 8030dde: 7857 ldrb r7, [r2, #1] 8030de0: 2f04 cmp r7, #4 8030de2: d114 bne.n 8030e0e 8030de4: 1cdf adds r7, r3, #3 8030de6: 428f cmp r7, r1 8030de8: da11 bge.n 8030e0e /* 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]; 8030dea: 7897 ldrb r7, [r2, #2] 8030dec: 78d2 ldrb r2, [r2, #3] 8030dee: 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; 8030df2: 1e57 subs r7, r2, #1 8030df4: b2bf uxth r7, r7 8030df6: 4287 cmp r7, r0 8030df8: bf88 it hi 8030dfa: 462a movhi r2, r5 8030dfc: 86f2 strh r2, [r6, #54] ; 0x36 /* Advance to next option */ c += 0x04; 8030dfe: 3304 adds r3, #4 8030e00: e002 b.n 8030e08 c += 0x0A; break; #endif default: LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n")); if (opts[c + 1] == 0) { 8030e02: 7852 ldrb r2, [r2, #1] 8030e04: b11a cbz r2, 8030e0e 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]; 8030e06: 18d3 adds r3, r2, r3 8030e08: 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; ) { 8030e0a: 428b cmp r3, r1 8030e0c: d3dc bcc.n 8030dc8 8030e0e: bdf8 pop {r3, r4, r5, r6, r7, pc} 8030e10: 2000c3e0 .word 0x2000c3e0 08030e14 : * * Called from tcp_process(). */ static void tcp_receive(struct tcp_pcb *pcb) { 8030e14: 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) { 8030e18: 4ba0 ldr r3, [pc, #640] ; (803109c ) 8030e1a: 781b ldrb r3, [r3, #0] 8030e1c: f003 0310 and.w r3, r3, #16 8030e20: b2db uxtb r3, r3 * * Called from tcp_process(). */ static void tcp_receive(struct tcp_pcb *pcb) { 8030e22: 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) { 8030e24: 2b00 cmp r3, #0 8030e26: f000 816b beq.w 8031100 right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2; /* Update window. */ if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || 8030e2a: 4a9d ldr r2, [pc, #628] ; (80310a0 ) 8030e2c: 6d43 ldr r3, [r0, #84] ; 0x54 8030e2e: 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; 8030e30: f8b0 5060 ldrh.w r5, [r0, #96] ; 0x60 8030e34: 6d81 ldr r1, [r0, #88] ; 0x58 /* Update window. */ if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || 8030e36: 1a98 subs r0, r3, r2 8030e38: 2800 cmp r0, #0 8030e3a: db0e blt.n 8030e5a 8030e3c: 4293 cmp r3, r2 8030e3e: 4b99 ldr r3, [pc, #612] ; (80310a4 ) 8030e40: d103 bne.n 8030e4a (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || 8030e42: 6818 ldr r0, [r3, #0] 8030e44: 1a08 subs r0, r1, r0 8030e46: 2800 cmp r0, #0 8030e48: db07 blt.n 8030e5a 8030e4a: 681b ldr r3, [r3, #0] 8030e4c: 4299 cmp r1, r3 8030e4e: d11f bne.n 8030e90 (pcb->snd_wl2 == ackno && tcphdr->wnd > pcb->snd_wnd)) { 8030e50: 4b95 ldr r3, [pc, #596] ; (80310a8 ) 8030e52: 681b ldr r3, [r3, #0] 8030e54: 89db ldrh r3, [r3, #14] 8030e56: 42ab cmp r3, r5 8030e58: d91a bls.n 8030e90 pcb->snd_wnd = tcphdr->wnd; 8030e5a: 4b93 ldr r3, [pc, #588] ; (80310a8 ) /* keep track of the biggest window announced by the remote host to calculate the maximum segment size */ if (pcb->snd_wnd_max < tcphdr->wnd) { 8030e5c: 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; 8030e60: 681b ldr r3, [r3, #0] 8030e62: 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; 8030e64: 6562 str r2, [r4, #84] ; 0x54 pcb->snd_wl2 = ackno; 8030e66: 4a8f ldr r2, [pc, #572] ; (80310a4 ) /* 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; 8030e68: 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; 8030e6c: 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) { 8030e6e: 4286 cmp r6, r0 pcb->snd_wnd_max = tcphdr->wnd; } pcb->snd_wl1 = seqno; pcb->snd_wl2 = ackno; 8030e70: 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; 8030e72: bf38 it cc 8030e74: f8a4 0062 strhcc.w r0, [r4, #98] ; 0x62 8030e78: f894 2091 ldrb.w r2, [r4, #145] ; 0x91 } pcb->snd_wl1 = seqno; pcb->snd_wl2 = ackno; if (pcb->snd_wnd == 0) { 8030e7c: b920 cbnz r0, 8030e88 if (pcb->persist_backoff == 0) { 8030e7e: b93a cbnz r2, 8030e90 /* start persist timer */ pcb->persist_cnt = 0; 8030e80: f884 0090 strb.w r0, [r4, #144] ; 0x90 pcb->persist_backoff = 1; 8030e84: 2301 movs r3, #1 8030e86: e001 b.n 8030e8c } } else if (pcb->persist_backoff > 0) { 8030e88: b112 cbz r2, 8030e90 /* stop persist timer */ pcb->persist_backoff = 0; 8030e8a: 2300 movs r3, #0 8030e8c: 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)) { 8030e90: 4b84 ldr r3, [pc, #528] ; (80310a4 ) 8030e92: 6ca2 ldr r2, [r4, #72] ; 0x48 8030e94: 681b ldr r3, [r3, #0] 8030e96: 1a98 subs r0, r3, r2 8030e98: 2800 cmp r0, #0 8030e9a: dc34 bgt.n 8030f06 pcb->acked = 0; 8030e9c: 2000 movs r0, #0 8030e9e: f8a4 0064 strh.w r0, [r4, #100] ; 0x64 /* Clause 2 */ if (tcplen == 0) { 8030ea2: 4882 ldr r0, [pc, #520] ; (80310ac ) 8030ea4: 8800 ldrh r0, [r0, #0] 8030ea6: 2800 cmp r0, #0 8030ea8: f040 81f4 bne.w 8031294 /* Clause 3 */ if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge){ 8030eac: f8b4 6060 ldrh.w r6, [r4, #96] ; 0x60 8030eb0: 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; 8030eb2: 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){ 8030eb4: 1830 adds r0, r6, r0 8030eb6: 4288 cmp r0, r1 8030eb8: f040 81ec bne.w 8031294 /* Clause 4 */ if (pcb->rtime >= 0) { 8030ebc: f9b4 1034 ldrsh.w r1, [r4, #52] ; 0x34 8030ec0: 2900 cmp r1, #0 8030ec2: f2c0 81e7 blt.w 8031294 /* Clause 5 */ if (pcb->lastack == ackno) { 8030ec6: 429a cmp r2, r3 8030ec8: f040 81e4 bne.w 8031294 found_dupack = 1; if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) { 8030ecc: f894 2047 ldrb.w r2, [r4, #71] ; 0x47 8030ed0: 1c53 adds r3, r2, #1 8030ed2: b2db uxtb r3, r3 8030ed4: 4293 cmp r3, r2 ++pcb->dupacks; 8030ed6: bf88 it hi 8030ed8: f884 3047 strbhi.w r3, [r4, #71] ; 0x47 } if (pcb->dupacks > 3) { 8030edc: f894 3047 ldrb.w r3, [r4, #71] ; 0x47 8030ee0: 2b03 cmp r3, #3 8030ee2: d90a bls.n 8030efa /* Inflate the congestion window, but not if it means that the value overflows. */ if ((u16_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { 8030ee4: f8b4 204c ldrh.w r2, [r4, #76] ; 0x4c 8030ee8: 8ee3 ldrh r3, [r4, #54] ; 0x36 8030eea: 18d3 adds r3, r2, r3 8030eec: b29b uxth r3, r3 8030eee: 4293 cmp r3, r2 8030ef0: f240 80b2 bls.w 8031058 pcb->cwnd += pcb->mss; 8030ef4: f8a4 304c strh.w r3, [r4, #76] ; 0x4c 8030ef8: e0ae b.n 8031058 } } else if (pcb->dupacks == 3) { 8030efa: f040 80ad bne.w 8031058 /* Do fast retransmit */ tcp_rexmit_fast(pcb); 8030efe: 4620 mov r0, r4 8030f00: f001 fa92 bl 8032428 8030f04: e0a8 b.n 8031058 /* 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)){ 8030f06: 43d1 mvns r1, r2 8030f08: 42d9 cmn r1, r3 8030f0a: d47e bmi.n 803100a 8030f0c: 6d21 ldr r1, [r4, #80] ; 0x50 8030f0e: 1a59 subs r1, r3, r1 8030f10: 2900 cmp r1, #0 8030f12: dc7a bgt.n 803100a /* 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) { 8030f14: 7fa1 ldrb r1, [r4, #30] 8030f16: f001 0004 and.w r0, r1, #4 8030f1a: b2c0 uxtb r0, r0 8030f1c: b130 cbz r0, 8030f2c pcb->flags &= ~TF_INFR; 8030f1e: f021 0104 bic.w r1, r1, #4 8030f22: 77a1 strb r1, [r4, #30] pcb->cwnd = pcb->ssthresh; 8030f24: f8b4 104e ldrh.w r1, [r4, #78] ; 0x4e 8030f28: 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; 8030f2c: f9b4 5040 ldrsh.w r5, [r4, #64] ; 0x40 8030f30: f8b4 0042 ldrh.w r0, [r4, #66] ; 0x42 pcb->snd_buf += pcb->acked; /* Reset the fast retransmit variables. */ pcb->dupacks = 0; pcb->lastack = ackno; 8030f34: 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; 8030f36: 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); 8030f3a: 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; 8030f3c: 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) { 8030f40: 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; 8030f42: 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); 8030f46: f8a4 2064 strh.w r2, [r4, #100] ; 0x64 pcb->flags &= ~TF_INFR; pcb->cwnd = pcb->ssthresh; } /* Reset the number of retransmissions. */ pcb->nrtx = 0; 8030f4a: 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; 8030f4c: 1812 adds r2, r2, r0 pcb->dupacks = 0; pcb->lastack = ackno; /* Update the congestion control variables (cwnd and ssthresh). */ if (pcb->state >= ESTABLISHED) { 8030f4e: 2b03 cmp r3, #3 pcb->flags &= ~TF_INFR; pcb->cwnd = pcb->ssthresh; } /* Reset the number of retransmissions. */ pcb->nrtx = 0; 8030f50: 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; 8030f54: f8a4 2066 strh.w r2, [r4, #102] ; 0x66 /* Reset the fast retransmit variables. */ pcb->dupacks = 0; 8030f58: f884 1047 strb.w r1, [r4, #71] ; 0x47 pcb->lastack = ackno; /* Update the congestion control variables (cwnd and ssthresh). */ if (pcb->state >= ESTABLISHED) { 8030f5c: d931 bls.n 8030fc2 if (pcb->cwnd < pcb->ssthresh) { 8030f5e: f8b4 204e ldrh.w r2, [r4, #78] ; 0x4e 8030f62: f8b4 304c ldrh.w r3, [r4, #76] ; 0x4c 8030f66: 429a cmp r2, r3 if ((u16_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { 8030f68: 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) { 8030f6a: d900 bls.n 8030f6e 8030f6c: e002 b.n 8030f74 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); 8030f6e: 4352 muls r2, r2 8030f70: fb92 f2f3 sdiv r2, r2, r3 8030f74: 189a adds r2, r3, r2 8030f76: b292 uxth r2, r2 if (new_cwnd > pcb->cwnd) { 8030f78: 429a cmp r2, r3 8030f7a: d922 bls.n 8030fc2 pcb->cwnd = new_cwnd; 8030f7c: f8a4 204c strh.w r2, [r4, #76] ; 0x4c 8030f80: e01f b.n 8030fc2 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; 8030f82: 6f25 ldr r5, [r4, #112] ; 0x70 pcb->unacked = pcb->unacked->next; 8030f84: 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))); 8030f86: 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; 8030f88: 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))); 8030f8a: f7ff f813 bl 802ffb4 /* Prevent ACK for FIN to generate a sent event */ if ((pcb->acked != 0) && ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0)) { 8030f8e: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 8030f92: b153 cbz r3, 8030faa 8030f94: 68eb ldr r3, [r5, #12] 8030f96: 8998 ldrh r0, [r3, #12] 8030f98: f7fd fdff bl 802eb9a 8030f9c: 07c3 lsls r3, r0, #31 8030f9e: d504 bpl.n 8030faa pcb->acked--; 8030fa0: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 8030fa4: 3b01 subs r3, #1 8030fa6: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 } pcb->snd_queuelen -= pbuf_clen(next->p); 8030faa: 6868 ldr r0, [r5, #4] 8030fac: f8b4 7068 ldrh.w r7, [r4, #104] ; 0x68 8030fb0: f7ff f800 bl 802ffb4 8030fb4: 1a38 subs r0, r7, r0 8030fb6: f8a4 0068 strh.w r0, [r4, #104] ; 0x68 tcp_seg_free(next); 8030fba: 4628 mov r0, r5 8030fbc: f7ff fa55 bl 803046a 8030fc0: e000 b.n 8030fc4 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) + 8030fc2: 4e38 ldr r6, [pc, #224] ; (80310a4 ) 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 && 8030fc4: 6f23 ldr r3, [r4, #112] ; 0x70 8030fc6: b91b cbnz r3, 8030fd0 } } /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if(pcb->unacked == NULL) 8030fc8: 6f22 ldr r2, [r4, #112] ; 0x70 8030fca: 2300 movs r3, #0 8030fcc: b9d2 cbnz r2, 8031004 8030fce: e015 b.n 8030ffc 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) + 8030fd0: 68db ldr r3, [r3, #12] 8030fd2: 6858 ldr r0, [r3, #4] 8030fd4: f7fd fde8 bl 802eba8 8030fd8: 6f23 ldr r3, [r4, #112] ; 0x70 8030fda: 891d ldrh r5, [r3, #8] 8030fdc: 68db ldr r3, [r3, #12] 8030fde: 4607 mov r7, r0 8030fe0: 8998 ldrh r0, [r3, #12] 8030fe2: f7fd fdda bl 802eb9a 8030fe6: 6833 ldr r3, [r6, #0] 8030fe8: f010 0003 ands.w r0, r0, #3 8030fec: bf18 it ne 8030fee: 2001 movne r0, #1 8030ff0: 1afb subs r3, r7, r3 8030ff2: 1828 adds r0, r5, r0 8030ff4: 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 && 8030ff6: 2b00 cmp r3, #0 8030ff8: ddc3 ble.n 8030f82 8030ffa: e7e5 b.n 8030fc8 } /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if(pcb->unacked == NULL) pcb->rtime = -1; 8030ffc: f64f 72ff movw r2, #65535 ; 0xffff 8031000: 86a2 strh r2, [r4, #52] ; 0x34 8031002: e000 b.n 8031006 else pcb->rtime = 0; 8031004: 86a3 strh r3, [r4, #52] ; 0x34 pcb->polltmr = 0; 8031006: 77e3 strb r3, [r4, #31] 8031008: e026 b.n 8031058 } else { /* Fix bug bug #21582: out of sequence ACK, didn't really ack anything */ pcb->acked = 0; 803100a: 2300 movs r3, #0 803100c: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 8031010: e022 b.n 8031058 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; 8031012: 6ee5 ldr r5, [r4, #108] ; 0x6c pcb->unsent = pcb->unsent->next; 8031014: 682b ldr r3, [r5, #0] 8031016: 66e3 str r3, [r4, #108] ; 0x6c #if TCP_OVERSIZE if (pcb->unsent == NULL) { 8031018: b90b cbnz r3, 803101e pcb->unsent_oversize = 0; 803101a: 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))); 803101e: 6868 ldr r0, [r5, #4] 8031020: f7fe ffc8 bl 802ffb4 /* Prevent ACK for FIN to generate a sent event */ if ((pcb->acked != 0) && ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0)) { 8031024: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 8031028: b153 cbz r3, 8031040 803102a: 68eb ldr r3, [r5, #12] 803102c: 8998 ldrh r0, [r3, #12] 803102e: f7fd fdb4 bl 802eb9a 8031032: 07c7 lsls r7, r0, #31 8031034: d504 bpl.n 8031040 pcb->acked--; 8031036: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 803103a: 3b01 subs r3, #1 803103c: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 } pcb->snd_queuelen -= pbuf_clen(next->p); 8031040: 6868 ldr r0, [r5, #4] 8031042: f8b4 7068 ldrh.w r7, [r4, #104] ; 0x68 8031046: f7fe ffb5 bl 802ffb4 803104a: 1a38 subs r0, r7, r0 803104c: f8a4 0068 strh.w r0, [r4, #104] ; 0x68 tcp_seg_free(next); 8031050: 4628 mov r0, r5 8031052: f7ff fa0a bl 803046a 8031056: e000 b.n 803105a 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) + 8031058: 4e12 ldr r6, [pc, #72] ; (80310a4 ) 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 && 803105a: 6ee3 ldr r3, [r4, #108] ; 0x6c 803105c: b913 cbnz r3, 8031064 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)) { 803105e: 6ba3 ldr r3, [r4, #56] ; 0x38 8031060: bb33 cbnz r3, 80310b0 8031062: e04d b.n 8031100 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) + 8031064: 68db ldr r3, [r3, #12] 8031066: 6835 ldr r5, [r6, #0] 8031068: 6858 ldr r0, [r3, #4] 803106a: f7fd fd9d bl 802eba8 803106e: 6ee3 ldr r3, [r4, #108] ; 0x6c 8031070: 891f ldrh r7, [r3, #8] 8031072: 68db ldr r3, [r3, #12] 8031074: 4680 mov r8, r0 8031076: 8998 ldrh r0, [r3, #12] 8031078: f7fd fd8f bl 802eb9a 803107c: f010 0003 ands.w r0, r0, #3 8031080: bf18 it ne 8031082: 2001 movne r0, #1 8031084: ebc8 0505 rsb r5, r8, r5 8031088: 1838 adds r0, r7, r0 803108a: 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 && 803108c: 2d00 cmp r5, #0 803108e: dbe6 blt.n 803105e TCP_SEQ_BETWEEN(ackno, ntohl(pcb->unsent->tcphdr->seqno) + 8031090: 6832 ldr r2, [r6, #0] 8031092: 6d23 ldr r3, [r4, #80] ; 0x50 8031094: 1ad3 subs r3, r2, r3 8031096: 2b00 cmp r3, #0 8031098: ddbb ble.n 8031012 803109a: e7e0 b.n 803105e 803109c: 2000c3f0 .word 0x2000c3f0 80310a0: 2000c3e4 .word 0x2000c3e4 80310a4: 2000c3ec .word 0x2000c3ec 80310a8: 2000c3e0 .word 0x2000c3e0 80310ac: 2000c3e8 .word 0x2000c3e8 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)) { 80310b0: 497b ldr r1, [pc, #492] ; (80312a0 ) 80310b2: 6be2 ldr r2, [r4, #60] ; 0x3c 80310b4: 6809 ldr r1, [r1, #0] 80310b6: 1a52 subs r2, r2, r1 80310b8: 2a00 cmp r2, #0 80310ba: da21 bge.n 8031100 /* 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); 80310bc: 4a79 ldr r2, [pc, #484] ; (80312a4 ) 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); 80310be: 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); 80310c2: 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); 80310c4: 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); 80310c8: 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); 80310ca: 1a12 subs r2, r2, r0 80310cc: b292 uxth r2, r2 80310ce: b293 uxth r3, r2 pcb->sa += m; 80310d0: 1851 adds r1, r2, r1 80310d2: b289 uxth r1, r1 if (m < 0) { 80310d4: 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; 80310d6: f8a4 1040 strh.w r1, [r4, #64] ; 0x40 if (m < 0) { 80310da: d501 bpl.n 80310e0 m = -m; 80310dc: 4253 negs r3, r2 80310de: b29b uxth r3, r3 } m = m - (pcb->sv >> 2); 80310e0: f8b4 2042 ldrh.w r2, [r4, #66] ; 0x42 80310e4: f342 008d sbfx r0, r2, #2, #14 80310e8: 1a12 subs r2, r2, r0 pcb->sv += m; 80310ea: 18d3 adds r3, r2, r3 80310ec: b29b uxth r3, r3 pcb->rto = (pcb->sa >> 3) + pcb->sv; 80310ee: f341 01cc sbfx r1, r1, #3, #13 pcb->sa += m; if (m < 0) { m = -m; } m = m - (pcb->sv >> 2); pcb->sv += m; 80310f2: f8a4 3042 strh.w r3, [r4, #66] ; 0x42 pcb->rto = (pcb->sa >> 3) + pcb->sv; 80310f6: 185b adds r3, r3, r1 80310f8: 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; 80310fc: 2300 movs r3, #0 80310fe: 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)) { 8031100: 4b69 ldr r3, [pc, #420] ; (80312a8 ) 8031102: 4a6a ldr r2, [pc, #424] ; (80312ac ) 8031104: 8818 ldrh r0, [r3, #0] 8031106: 2800 cmp r0, #0 8031108: f000 80b3 beq.w 8031272 803110c: 7e23 ldrb r3, [r4, #24] 803110e: 2b06 cmp r3, #6 8031110: f200 80af bhi.w 8031272 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)){ 8031114: 6811 ldr r1, [r2, #0] 8031116: 6aa3 ldr r3, [r4, #40] ; 0x28 8031118: 43ca mvns r2, r1 803111a: 42da cmn r2, r3 803111c: d425 bmi.n 803116a 803111e: 1c5a adds r2, r3, #1 8031120: 1a52 subs r2, r2, r1 8031122: 1a10 subs r0, r2, r0 8031124: 2800 cmp r0, #0 8031126: dc20 bgt.n 803116a 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; 8031128: 1a59 subs r1, r3, r1 p = inseg.p; 803112a: 4b61 ldr r3, [pc, #388] ; (80312b0 ) 803112c: 6858 ldr r0, [r3, #4] LWIP_ASSERT("inseg.p != NULL", inseg.p); LWIP_ASSERT("insane offset!", (off < 0x7fff)); if (inseg.p->len < off) { 803112e: 8943 ldrh r3, [r0, #10] 8031130: 428b cmp r3, r1 8031132: da0a bge.n 803114a LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); new_tot_len = (u16_t)(inseg.p->tot_len - off); 8031134: 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; 8031136: 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); 8031138: 1a52 subs r2, r2, r1 while (p->len < off) { 803113a: e003 b.n 8031144 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; 803113c: 8102 strh r2, [r0, #8] p->len = 0; 803113e: 8145 strh r5, [r0, #10] p = p->next; 8031140: 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; 8031142: 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) { 8031144: 8943 ldrh r3, [r0, #10] 8031146: 428b cmp r3, r1 8031148: dbf8 blt.n 803113c 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)) { 803114a: 4249 negs r1, r1 803114c: b209 sxth r1, r1 803114e: f7fe fe32 bl 802fdb6 /* 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); 8031152: 4a57 ldr r2, [pc, #348] ; (80312b0 ) 8031154: 4955 ldr r1, [pc, #340] ; (80312ac ) 8031156: 8915 ldrh r5, [r2, #8] 8031158: 6808 ldr r0, [r1, #0] 803115a: 6aa3 ldr r3, [r4, #40] ; 0x28 803115c: 1940 adds r0, r0, r5 803115e: 1ac0 subs r0, r0, r3 8031160: 8110 strh r0, [r2, #8] inseg.tcphdr->seqno = seqno = pcb->rcv_nxt; 8031162: 68d2 ldr r2, [r2, #12] 8031164: 600b str r3, [r1, #0] 8031166: 6053 str r3, [r2, #4] 8031168: e006 b.n 8031178 } else { if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)){ 803116a: 1ac9 subs r1, r1, r3 803116c: 2900 cmp r1, #0 803116e: da03 bge.n 8031178 /* 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); 8031170: 7fa3 ldrb r3, [r4, #30] 8031172: f043 0302 orr.w r3, r3, #2 8031176: 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, 8031178: 4b4c ldr r3, [pc, #304] ; (80312ac ) 803117a: 6aa2 ldr r2, [r4, #40] ; 0x28 803117c: 681b ldr r3, [r3, #0] 803117e: 1a99 subs r1, r3, r2 8031180: 2900 cmp r1, #0 8031182: db71 blt.n 8031268 8031184: 1c59 adds r1, r3, #1 8031186: 8da0 ldrh r0, [r4, #44] ; 0x2c 8031188: 1a89 subs r1, r1, r2 803118a: 1a09 subs r1, r1, r0 803118c: 2900 cmp r1, #0 803118e: dc6b bgt.n 8031268 pcb->rcv_nxt + pcb->rcv_wnd - 1)){ if (pcb->rcv_nxt == seqno) { 8031190: 429a cmp r2, r3 8031192: d169 bne.n 8031268 /* 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); 8031194: 4d46 ldr r5, [pc, #280] ; (80312b0 ) 8031196: 68eb ldr r3, [r5, #12] 8031198: 892e ldrh r6, [r5, #8] 803119a: 8998 ldrh r0, [r3, #12] 803119c: f7fd fcfd bl 802eb9a 80311a0: f010 0003 ands.w r0, r0, #3 80311a4: bf18 it ne 80311a6: 2001 movne r0, #1 80311a8: 4b3f ldr r3, [pc, #252] ; (80312a8 ) 80311aa: 1830 adds r0, r6, r0 80311ac: b280 uxth r0, r0 80311ae: 8018 strh r0, [r3, #0] if (tcplen > pcb->rcv_wnd) { 80311b0: 8da3 ldrh r3, [r4, #44] ; 0x2c 80311b2: 4283 cmp r3, r0 80311b4: d230 bcs.n 8031218 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) { 80311b6: 68eb ldr r3, [r5, #12] 80311b8: 8998 ldrh r0, [r3, #12] 80311ba: f7fd fcee bl 802eb9a 80311be: 07c0 lsls r0, r0, #31 80311c0: d50c bpl.n 80311dc /* 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); 80311c2: 68ed ldr r5, [r5, #12] 80311c4: 89ae ldrh r6, [r5, #12] 80311c6: 4630 mov r0, r6 80311c8: f7fd fce7 bl 802eb9a 80311cc: f000 003e and.w r0, r0, #62 ; 0x3e 80311d0: f7fd fcde bl 802eb90 80311d4: f426 567c bic.w r6, r6, #16128 ; 0x3f00 80311d8: 4330 orrs r0, r6 80311da: 81a8 strh r0, [r5, #12] } /* Adjust length of segment to fit in the window. */ inseg.len = pcb->rcv_wnd; 80311dc: 8da3 ldrh r3, [r4, #44] ; 0x2c 80311de: 4d34 ldr r5, [pc, #208] ; (80312b0 ) 80311e0: 812b strh r3, [r5, #8] if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { 80311e2: 68eb ldr r3, [r5, #12] 80311e4: 8998 ldrh r0, [r3, #12] 80311e6: f7fd fcd8 bl 802eb9a 80311ea: f000 0002 and.w r0, r0, #2 80311ee: b280 uxth r0, r0 80311f0: b110 cbz r0, 80311f8 inseg.len -= 1; 80311f2: 892b ldrh r3, [r5, #8] 80311f4: 3b01 subs r3, #1 80311f6: 812b strh r3, [r5, #8] } pbuf_realloc(inseg.p, inseg.len); 80311f8: 6868 ldr r0, [r5, #4] 80311fa: 8929 ldrh r1, [r5, #8] 80311fc: f7fe fe2d bl 802fe5a tcplen = TCP_TCPLEN(&inseg); 8031200: 68eb ldr r3, [r5, #12] 8031202: 892e ldrh r6, [r5, #8] 8031204: 8998 ldrh r0, [r3, #12] 8031206: f7fd fcc8 bl 802eb9a 803120a: f010 0003 ands.w r0, r0, #3 803120e: bf18 it ne 8031210: 2001 movne r0, #1 8031212: 4b25 ldr r3, [pc, #148] ; (80312a8 ) 8031214: 1830 adds r0, r6, r0 8031216: 8018 strh r0, [r3, #0] pcb->ooseq = next; } } #endif /* TCP_QUEUE_OOSEQ */ pcb->rcv_nxt = seqno + tcplen; 8031218: 4b23 ldr r3, [pc, #140] ; (80312a8 ) 803121a: 4a24 ldr r2, [pc, #144] ; (80312ac ) 803121c: 881b ldrh r3, [r3, #0] 803121e: 6812 ldr r2, [r2, #0] 8031220: 189a adds r2, r3, r2 8031222: 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; 8031224: 8da2 ldrh r2, [r4, #44] ; 0x2c 8031226: 1ad3 subs r3, r2, r3 8031228: 85a3 strh r3, [r4, #44] ; 0x2c tcp_update_rcv_ann_wnd(pcb); 803122a: 4620 mov r0, r4 803122c: f7ff f8e6 bl 80303fc 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) { 8031230: 4b1f ldr r3, [pc, #124] ; (80312b0 ) 8031232: 685a ldr r2, [r3, #4] 8031234: 8911 ldrh r1, [r2, #8] 8031236: b119 cbz r1, 8031240 recv_data = inseg.p; 8031238: 491e ldr r1, [pc, #120] ; (80312b4 ) 803123a: 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; 803123c: 2200 movs r2, #0 803123e: 605a str r2, [r3, #4] } if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { 8031240: 68db ldr r3, [r3, #12] 8031242: 8998 ldrh r0, [r3, #12] 8031244: f7fd fca9 bl 802eb9a 8031248: 07c1 lsls r1, r0, #31 803124a: d504 bpl.n 8031256 LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: received FIN.\n")); recv_flags |= TF_GOT_FIN; 803124c: 4b1a ldr r3, [pc, #104] ; (80312b8 ) 803124e: 781a ldrb r2, [r3, #0] 8031250: f042 0220 orr.w r2, r2, #32 8031254: 701a strb r2, [r3, #0] } #endif /* TCP_QUEUE_OOSEQ */ /* Acknowledge the segment(s). */ tcp_ack(pcb); 8031256: 7fa3 ldrb r3, [r4, #30] 8031258: 07da lsls r2, r3, #31 803125a: d502 bpl.n 8031262 803125c: f023 0301 bic.w r3, r3, #1 8031260: e013 b.n 803128a 8031262: f043 0301 orr.w r3, r3, #1 8031266: e012 b.n 803128e } else { /* We get here if the incoming segment is out-of-sequence. */ tcp_send_empty_ack(pcb); 8031268: 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); } } } 803126a: 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); 803126e: f000 bf09 b.w 8032084 } 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)){ 8031272: 6812 ldr r2, [r2, #0] 8031274: 6aa3 ldr r3, [r4, #40] ; 0x28 8031276: 1ad1 subs r1, r2, r3 8031278: 2900 cmp r1, #0 803127a: db05 blt.n 8031288 803127c: 3201 adds r2, #1 803127e: 8da1 ldrh r1, [r4, #44] ; 0x2c 8031280: 1ad3 subs r3, r2, r3 8031282: 1a5b subs r3, r3, r1 8031284: 2b00 cmp r3, #0 8031286: dd09 ble.n 803129c tcp_ack_now(pcb); 8031288: 7fa3 ldrb r3, [r4, #30] 803128a: f043 0302 orr.w r3, r3, #2 803128e: 77a3 strb r3, [r4, #30] 8031290: 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; 8031294: 2300 movs r3, #0 8031296: f884 3047 strb.w r3, [r4, #71] ; 0x47 803129a: e6dd b.n 8031058 803129c: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80312a0: 2000c3ec .word 0x2000c3ec 80312a4: 2000f6c0 .word 0x2000f6c0 80312a8: 2000c3e8 .word 0x2000c3e8 80312ac: 2000c3e4 .word 0x2000c3e4 80312b0: 2000c3fc .word 0x2000c3fc 80312b4: 2000c3f4 .word 0x2000c3f4 80312b8: 2000c3f1 .word 0x2000c3f1 080312bc : * @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) { 80312bc: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 80312c0: 4606 mov r6, r0 80312c2: 460f mov r7, r1 err_t err; PERF_START; TCP_STATS_INC(tcp.recv); snmp_inc_tcpinsegs(); 80312c4: f003 fcc0 bl 8034c48 iphdr = (struct ip_hdr *)p->payload; 80312c8: 6873 ldr r3, [r6, #4] 80312ca: 4aa7 ldr r2, [pc, #668] ; (8031568 ) tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4); 80312cc: 4ca7 ldr r4, [pc, #668] ; (803156c ) PERF_START; TCP_STATS_INC(tcp.recv); snmp_inc_tcpinsegs(); iphdr = (struct ip_hdr *)p->payload; 80312ce: 6013 str r3, [r2, #0] tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4); 80312d0: 781a ldrb r2, [r3, #0] 80312d2: 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))) { 80312d6: 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); 80312d8: 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))) { 80312dc: 4630 mov r0, r6 80312de: 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); 80312e0: 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))) { 80312e2: f7fe fd68 bl 802fdb6 80312e6: 2800 cmp r0, #0 80312e8: f040 83ce bne.w 8031a88 80312ec: 8933 ldrh r3, [r6, #8] 80312ee: 2b13 cmp r3, #19 80312f0: f240 83ca bls.w 8031a88 TCP_STATS_INC(tcp.lenerr); goto dropped; } /* Don't even process incoming broadcasts/multicasts. */ if (ip_addr_isbroadcast(¤t_iphdr_dest, inp) || 80312f4: 4d9e ldr r5, [pc, #632] ; (8031570 ) 80312f6: 4639 mov r1, r7 80312f8: 6828 ldr r0, [r5, #0] 80312fa: f001 fd43 bl 8032d84 80312fe: 2800 cmp r0, #0 8031300: f040 83c2 bne.w 8031a88 ip_addr_ismulticast(¤t_iphdr_dest)) { 8031304: 682b ldr r3, [r5, #0] 8031306: 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) || 803130a: 2be0 cmp r3, #224 ; 0xe0 803130c: f000 83bc beq.w 8031a88 } #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); 8031310: 6823 ldr r3, [r4, #0] 8031312: 8998 ldrh r0, [r3, #12] 8031314: f7fd fc41 bl 802eb9a if(pbuf_header(p, -(hdrlen * 4))){ 8031318: f06f 0103 mvn.w r1, #3 803131c: f3c0 3307 ubfx r3, r0, #12, #8 8031320: 4359 muls r1, r3 8031322: 4630 mov r0, r6 8031324: f7fe fd47 bl 802fdb6 8031328: 4683 mov fp, r0 803132a: 2800 cmp r0, #0 803132c: f040 83ac bne.w 8031a88 TCP_STATS_INC(tcp.lenerr); goto dropped; } /* Convert fields in TCP header to host byte order. */ tcphdr->src = ntohs(tcphdr->src); 8031330: 6827 ldr r7, [r4, #0] 8031332: 8838 ldrh r0, [r7, #0] 8031334: f7fd fc31 bl 802eb9a 8031338: 8038 strh r0, [r7, #0] tcphdr->dest = ntohs(tcphdr->dest); 803133a: 6827 ldr r7, [r4, #0] 803133c: 8878 ldrh r0, [r7, #2] 803133e: f7fd fc2c bl 802eb9a 8031342: 8078 strh r0, [r7, #2] seqno = tcphdr->seqno = ntohl(tcphdr->seqno); 8031344: 6827 ldr r7, [r4, #0] 8031346: 6878 ldr r0, [r7, #4] 8031348: f7fd fc2e bl 802eba8 803134c: 4b89 ldr r3, [pc, #548] ; (8031574 ) 803134e: 6078 str r0, [r7, #4] ackno = tcphdr->ackno = ntohl(tcphdr->ackno); 8031350: 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); 8031352: 6018 str r0, [r3, #0] ackno = tcphdr->ackno = ntohl(tcphdr->ackno); 8031354: 68b8 ldr r0, [r7, #8] 8031356: f7fd fc27 bl 802eba8 803135a: 4b87 ldr r3, [pc, #540] ; (8031578 ) 803135c: 60b8 str r0, [r7, #8] tcphdr->wnd = ntohs(tcphdr->wnd); 803135e: 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); 8031360: 6018 str r0, [r3, #0] tcphdr->wnd = ntohs(tcphdr->wnd); 8031362: 89f8 ldrh r0, [r7, #14] 8031364: f7fd fc19 bl 802eb9a 8031368: 81f8 strh r0, [r7, #14] flags = TCPH_FLAGS(tcphdr); 803136a: 6823 ldr r3, [r4, #0] 803136c: 8998 ldrh r0, [r3, #12] 803136e: f7fd fc14 bl 802eb9a 8031372: 4b82 ldr r3, [pc, #520] ; (803157c ) tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 8031374: 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 && 8031378: 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); 803137a: 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); 803137e: f000 013f and.w r1, r0, #63 ; 0x3f tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 8031382: bf18 it ne 8031384: 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); 8031388: 7019 strb r1, [r3, #0] tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 803138a: 44c4 add ip, r8 803138c: 4b7c ldr r3, [pc, #496] ; (8031580 ) 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)) { 803138e: 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); 8031390: fa1f fc8c uxth.w ip, ip 8031394: 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) { 8031398: 4b7a ldr r3, [pc, #488] ; (8031584 ) 803139a: 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) && 803139e: 4b7a ldr r3, [pc, #488] ; (8031588 ) 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); 80313a0: 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) && 80313a2: 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) { 80313a6: 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; 80313a8: 4658 mov r0, fp for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 80313aa: e019 b.n 80313e0 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 && 80313ac: 8ba5 ldrh r5, [r4, #28] 80313ae: 883b ldrh r3, [r7, #0] 80313b0: 429d cmp r5, r3 80313b2: d113 bne.n 80313dc 80313b4: 8b65 ldrh r5, [r4, #26] 80313b6: 887b ldrh r3, [r7, #2] 80313b8: 429d cmp r5, r3 80313ba: d10f bne.n 80313dc pcb->local_port == tcphdr->dest && 80313bc: 6863 ldr r3, [r4, #4] 80313be: 454b cmp r3, r9 80313c0: d10c bne.n 80313dc ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src) && 80313c2: 6823 ldr r3, [r4, #0] 80313c4: 428b cmp r3, r1 80313c6: d109 bne.n 80313dc /* 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) { 80313c8: 2800 cmp r0, #0 80313ca: f000 8382 beq.w 8031ad2 prev->next = pcb->next; 80313ce: 68e3 ldr r3, [r4, #12] 80313d0: 60c3 str r3, [r0, #12] pcb->next = tcp_active_pcbs; tcp_active_pcbs = pcb; 80313d2: 4b6c ldr r3, [pc, #432] ; (8031584 ) 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; 80313d4: f8c4 a00c str.w sl, [r4, #12] tcp_active_pcbs = pcb; 80313d8: 601c str r4, [r3, #0] 80313da: e37a b.n 8031ad2 80313dc: 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) { 80313de: 68e4 ldr r4, [r4, #12] 80313e0: 2c00 cmp r4, #0 80313e2: d1e3 bne.n 80313ac 80313e4: e372 b.n 8031acc 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 && 80313e6: 8b98 ldrh r0, [r3, #28] 80313e8: 883c ldrh r4, [r7, #0] 80313ea: 4284 cmp r4, r0 80313ec: d130 bne.n 8031450 pcb->local_port == tcphdr->dest && 80313ee: 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 && 80313f0: 887d ldrh r5, [r7, #2] 80313f2: 4285 cmp r5, r0 80313f4: d12c bne.n 8031450 pcb->local_port == tcphdr->dest && 80313f6: 6858 ldr r0, [r3, #4] 80313f8: 4548 cmp r0, r9 80313fa: d129 bne.n 8031450 ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src) && 80313fc: 6818 ldr r0, [r3, #0] 80313fe: 4288 cmp r0, r1 8031400: d126 bne.n 8031450 /* 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) { 8031402: f002 0104 and.w r1, r2, #4 8031406: b2c9 uxtb r1, r1 8031408: 2900 cmp r1, #0 803140a: f040 833f bne.w 8031a8c return ERR_OK; } /* - fourth, check the SYN bit, */ if (flags & TCP_SYN) { 803140e: f002 0102 and.w r1, r2, #2 8031412: b2c9 uxtb r1, r1 8031414: b159 cbz r1, 803142e /* 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)) { 8031416: 4a57 ldr r2, [pc, #348] ; (8031574 ) 8031418: 6811 ldr r1, [r2, #0] 803141a: 6a9a ldr r2, [r3, #40] ; 0x28 803141c: 1a8a subs r2, r1, r2 803141e: d40b bmi.n 8031438 8031420: 8d98 ldrh r0, [r3, #44] ; 0x2c 8031422: 1a12 subs r2, r2, r0 8031424: 2a00 cmp r2, #0 8031426: dc07 bgt.n 8031438 /* 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(), 8031428: 9500 str r5, [sp, #0] 803142a: 9401 str r4, [sp, #4] 803142c: e041 b.n 80314b2 tcphdr->dest, tcphdr->src); return ERR_OK; } } else if (flags & TCP_FIN) { 803142e: 07d2 lsls r2, r2, #31 8031430: d502 bpl.n 8031438 /* - eighth, check the FIN bit: Remain in the TIME-WAIT state. Restart the 2 MSL time-wait timeout.*/ pcb->tmr = tcp_ticks; 8031432: 4a56 ldr r2, [pc, #344] ; (803158c ) 8031434: 6812 ldr r2, [r2, #0] 8031436: 625a str r2, [r3, #36] ; 0x24 } if ((tcplen > 0)) { 8031438: f1bc 0f00 cmp.w ip, #0 803143c: f000 8326 beq.w 8031a8c /* Acknowledge data, FIN or out-of-window SYN */ pcb->flags |= TF_ACK_NOW; 8031440: 7f9a ldrb r2, [r3, #30] 8031442: f042 0202 orr.w r2, r2, #2 8031446: 779a strb r2, [r3, #30] return tcp_output(pcb); 8031448: 4618 mov r0, r3 803144a: f000 fe3d bl 80320c8 803144e: e31d b.n 8031a8c } 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) { 8031450: 68db ldr r3, [r3, #12] 8031452: 2b00 cmp r3, #0 8031454: d1c7 bne.n 80313e6 } /* 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) { 8031456: 484e ldr r0, [pc, #312] ; (8031590 ) 8031458: 6804 ldr r4, [r0, #0] 803145a: 4625 mov r5, r4 803145c: e00f b.n 803147e if (lpcb->local_port == tcphdr->dest) { 803145e: 8b68 ldrh r0, [r5, #26] 8031460: f8b7 8002 ldrh.w r8, [r7, #2] 8031464: 4580 cmp r8, r0 8031466: d108 bne.n 803147a /* found an ANY-match */ lpcb_any = lpcb; lpcb_prev = prev; } #else /* SO_REUSE */ if (ip_addr_cmp(&(lpcb->local_ip), ¤t_iphdr_dest) || 8031468: f8d5 8000 ldr.w r8, [r5] 803146c: 4588 cmp r8, r1 803146e: f000 8342 beq.w 8031af6 ip_addr_isany(&(lpcb->local_ip))) { 8031472: f1b8 0f00 cmp.w r8, #0 8031476: f000 833e beq.w 8031af6 803147a: 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) { 803147c: 68ed ldr r5, [r5, #12] 803147e: 2d00 cmp r5, #0 8031480: d1ed bne.n 803145e 8031482: e33c b.n 8031afe 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; 8031484: 68e9 ldr r1, [r5, #12] 8031486: 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; 8031488: 4b41 ldr r3, [pc, #260] ; (8031590 ) 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; 803148a: 60ec str r4, [r5, #12] /* put this listening pcb at the head of the listening list */ tcp_listen_pcbs.listen_pcbs = lpcb; 803148c: 601d str r5, [r3, #0] tcp_listen_input(struct tcp_pcb_listen *pcb) { struct tcp_pcb *npcb; err_t rc; if (flags & TCP_RST) { 803148e: f002 0304 and.w r3, r2, #4 8031492: b2db uxtb r3, r3 8031494: 2b00 cmp r3, #0 8031496: f040 82f9 bne.w 8031a8c 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) { 803149a: f002 0810 and.w r8, r2, #16 803149e: fa5f f888 uxtb.w r8, r8 80314a2: f1b8 0f00 cmp.w r8, #0 80314a6: d00c beq.n 80314c2 /* 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(), 80314a8: 4b32 ldr r3, [pc, #200] ; (8031574 ) 80314aa: 6819 ldr r1, [r3, #0] 80314ac: 9000 str r0, [sp, #0] 80314ae: 883b ldrh r3, [r7, #0] 80314b0: 9301 str r3, [sp, #4] 80314b2: 4b31 ldr r3, [pc, #196] ; (8031578 ) 80314b4: 6818 ldr r0, [r3, #0] 80314b6: 4461 add r1, ip 80314b8: 4a2d ldr r2, [pc, #180] ; (8031570 ) 80314ba: 4b33 ldr r3, [pc, #204] ; (8031588 ) 80314bc: f000 ff28 bl 8032310 80314c0: e2e4 b.n 8031a8c ip_current_src_addr(), tcphdr->dest, tcphdr->src); } else if (flags & TCP_SYN) { 80314c2: f002 0202 and.w r2, r2, #2 80314c6: b2d2 uxtb r2, r2 80314c8: 2a00 cmp r2, #0 80314ca: f000 82df beq.w 8031a8c 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); 80314ce: 7e68 ldrb r0, [r5, #25] 80314d0: f7ff fb4c bl 8030b6c /* 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) { 80314d4: 4604 mov r4, r0 80314d6: 2800 cmp r0, #0 80314d8: f000 82d8 beq.w 8031a8c } #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); 80314dc: 4b24 ldr r3, [pc, #144] ; (8031570 ) 80314de: 681b ldr r3, [r3, #0] 80314e0: 6003 str r3, [r0, #0] npcb->local_port = pcb->local_port; 80314e2: 8b6b ldrh r3, [r5, #26] 80314e4: 8343 strh r3, [r0, #26] ip_addr_copy(npcb->remote_ip, current_iphdr_src); 80314e6: 4b28 ldr r3, [pc, #160] ; (8031588 ) 80314e8: 681b ldr r3, [r3, #0] 80314ea: 6043 str r3, [r0, #4] npcb->remote_port = tcphdr->src; 80314ec: 4b1f ldr r3, [pc, #124] ; (803156c ) 80314ee: 681b ldr r3, [r3, #0] 80314f0: 7859 ldrb r1, [r3, #1] 80314f2: 781a ldrb r2, [r3, #0] 80314f4: ea42 2201 orr.w r2, r2, r1, lsl #8 80314f8: 8382 strh r2, [r0, #28] npcb->state = SYN_RCVD; 80314fa: 2203 movs r2, #3 80314fc: 7602 strb r2, [r0, #24] npcb->rcv_nxt = seqno + 1; 80314fe: 4a1d ldr r2, [pc, #116] ; (8031574 ) 8031500: 6812 ldr r2, [r2, #0] 8031502: 1c51 adds r1, r2, #1 8031504: 6281 str r1, [r0, #40] ; 0x28 npcb->rcv_ann_right_edge = npcb->rcv_nxt; 8031506: 6301 str r1, [r0, #48] ; 0x30 npcb->snd_wnd = tcphdr->wnd; 8031508: 89db ldrh r3, [r3, #14] 803150a: f8a0 3060 strh.w r3, [r0, #96] ; 0x60 npcb->snd_wnd_max = tcphdr->wnd; 803150e: f8a0 3062 strh.w r3, [r0, #98] ; 0x62 npcb->ssthresh = npcb->snd_wnd; 8031512: 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; 8031516: 692b ldr r3, [r5, #16] 8031518: 6103 str r3, [r0, #16] #if LWIP_CALLBACK_API npcb->accept = pcb->accept; 803151a: 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 */ 803151c: 3a01 subs r2, #1 803151e: 6542 str r2, [r0, #84] ; 0x54 npcb->callback_arg = pcb->callback_arg; #if LWIP_CALLBACK_API npcb->accept = pcb->accept; 8031520: 6143 str r3, [r0, #20] #endif /* LWIP_CALLBACK_API */ /* inherit socket options */ npcb->so_options = pcb->so_options & SOF_INHERITED; 8031522: 7a2b ldrb r3, [r5, #8] 8031524: f023 0373 bic.w r3, r3, #115 ; 0x73 8031528: 7203 strb r3, [r0, #8] /* Register the new PCB so that we can begin receiving segments for it. */ TCP_REG_ACTIVE(npcb); 803152a: 4b16 ldr r3, [pc, #88] ; (8031584 ) 803152c: 681a ldr r2, [r3, #0] 803152e: 6018 str r0, [r3, #0] 8031530: 60c2 str r2, [r0, #12] 8031532: f001 f887 bl 8032644 8031536: 4b17 ldr r3, [pc, #92] ; (8031594 ) 8031538: 2201 movs r2, #1 /* Parse any options in the SYN. */ tcp_parseopt(npcb); 803153a: 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); 803153c: 701a strb r2, [r3, #0] /* Parse any options in the SYN. */ tcp_parseopt(npcb); 803153e: f7ff fc29 bl 8030d94 #if TCP_CALCULATE_EFF_SEND_MSS npcb->mss = tcp_eff_send_mss(npcb->mss, &(npcb->remote_ip)); 8031542: 1d21 adds r1, r4, #4 8031544: 8ee0 ldrh r0, [r4, #54] ; 0x36 8031546: f7ff fb9c bl 8030c82 803154a: 86e0 strh r0, [r4, #54] ; 0x36 #endif /* TCP_CALCULATE_EFF_SEND_MSS */ snmp_inc_tcppassiveopens(); 803154c: f003 fb64 bl 8034c18 /* Send a SYN|ACK together with the MSS option. */ rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK); 8031550: 4620 mov r0, r4 8031552: 2112 movs r1, #18 8031554: f000 fd28 bl 8031fa8 if (rc != ERR_OK) { 8031558: b120 cbz r0, 8031564 tcp_abandon(npcb, 0); 803155a: 4620 mov r0, r4 803155c: 4641 mov r1, r8 803155e: f7ff f941 bl 80307e4 8031562: e293 b.n 8031a8c return rc; } return tcp_output(npcb); 8031564: 4620 mov r0, r4 8031566: e770 b.n 803144a 8031568: 2000c3f8 .word 0x2000c3f8 803156c: 2000c3e0 .word 0x2000c3e0 8031570: 2000f6e4 .word 0x2000f6e4 8031574: 2000c3e4 .word 0x2000c3e4 8031578: 2000c3ec .word 0x2000c3ec 803157c: 2000c3f0 .word 0x2000c3f0 8031580: 2000c3e8 .word 0x2000c3e8 8031584: 2000f6bc .word 0x2000f6bc 8031588: 2000f6dc .word 0x2000f6dc 803158c: 2000f6c0 .word 0x2000f6c0 8031590: 2000f6c4 .word 0x2000f6c4 8031594: 2000f6b8 .word 0x2000f6b8 recv_data = NULL; recv_flags = 0; if (flags & TCP_PSH) { p->flags |= PBUF_FLAG_PUSH; 8031598: 7b73 ldrb r3, [r6, #13] 803159a: f043 0301 orr.w r3, r3, #1 803159e: 7373 strb r3, [r6, #13] } /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 80315a0: 6f63 ldr r3, [r4, #116] ; 0x74 80315a2: b163 cbz r3, 80315be if ((tcp_process_refused_data(pcb) == ERR_ABRT) || 80315a4: 4620 mov r0, r4 80315a6: f7ff fa57 bl 8030a58 80315aa: 300a adds r0, #10 80315ac: d004 beq.n 80315b8 80315ae: 6f63 ldr r3, [r4, #116] ; 0x74 80315b0: b12b cbz r3, 80315be ((pcb->refused_data != NULL) && (tcplen > 0))) { 80315b2: 4b9f ldr r3, [pc, #636] ; (8031830 ) 80315b4: 881b ldrh r3, [r3, #0] 80315b6: b113 cbz r3, 80315be /* pcb has been aborted or refused data is still refused and the new segment contains data */ TCP_STATS_INC(tcp.drop); snmp_inc_tcpinerrs(); 80315b8: f003 fb5e bl 8034c78 goto aborted; 80315bc: e249 b.n 8031a52 } } tcp_input_pcb = pcb; 80315be: 4b9d ldr r3, [pc, #628] ; (8031834 ) 80315c0: 601c str r4, [r3, #0] err_t err; err = ERR_OK; /* Process incoming RST segments. */ if (flags & TCP_RST) { 80315c2: 4b9d ldr r3, [pc, #628] ; (8031838 ) 80315c4: 781b ldrb r3, [r3, #0] 80315c6: f003 0204 and.w r2, r3, #4 80315ca: b2d2 uxtb r2, r2 80315cc: b1aa cbz r2, 80315fa /* First, determine if the reset is acceptable. */ if (pcb->state == SYN_SENT) { 80315ce: 7e23 ldrb r3, [r4, #24] 80315d0: 2b02 cmp r3, #2 80315d2: d106 bne.n 80315e2 if (ackno == pcb->snd_nxt) { 80315d4: 4b99 ldr r3, [pc, #612] ; (803183c ) 80315d6: 681a ldr r2, [r3, #0] 80315d8: 6d23 ldr r3, [r4, #80] ; 0x50 80315da: 429a cmp r2, r3 80315dc: f040 82a1 bne.w 8031b22 80315e0: e296 b.n 8031b10 acceptable = 1; } } else { if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, 80315e2: 4b97 ldr r3, [pc, #604] ; (8031840 ) 80315e4: 681a ldr r2, [r3, #0] 80315e6: 6aa3 ldr r3, [r4, #40] ; 0x28 80315e8: 1ad3 subs r3, r2, r3 80315ea: f100 829a bmi.w 8031b22 80315ee: 8da1 ldrh r1, [r4, #44] ; 0x2c 80315f0: 1a5b subs r3, r3, r1 80315f2: 2b00 cmp r3, #0 80315f4: f300 8295 bgt.w 8031b22 80315f8: e28a b.n 8031b10 seqno, pcb->rcv_nxt)); return ERR_OK; } } if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) { 80315fa: f003 0302 and.w r3, r3, #2 80315fe: b2db uxtb r3, r3 8031600: b123 cbz r3, 803160c 8031602: 7e23 ldrb r3, [r4, #24] 8031604: 3b02 subs r3, #2 8031606: 2b01 cmp r3, #1 8031608: d900 bls.n 803160c 803160a: e06b b.n 80316e4 /* Cope with new connection attempt after remote end crashed */ tcp_ack_now(pcb); return ERR_OK; } if ((pcb->flags & TF_RXCLOSED) == 0) { 803160c: 7fa3 ldrb r3, [r4, #30] 803160e: f003 0310 and.w r3, r3, #16 8031612: b2db uxtb r3, r3 8031614: b913 cbnz r3, 803161c /* Update the PCB (in)activity timer unless rx is closed (see tcp_shutdown) */ pcb->tmr = tcp_ticks; 8031616: 4b8b ldr r3, [pc, #556] ; (8031844 ) 8031618: 681b ldr r3, [r3, #0] 803161a: 6263 str r3, [r4, #36] ; 0x24 } pcb->keep_cnt_sent = 0; 803161c: 2300 movs r3, #0 803161e: f884 3092 strb.w r3, [r4, #146] ; 0x92 tcp_parseopt(pcb); 8031622: 4620 mov r0, r4 8031624: f7ff fbb6 bl 8030d94 /* Do different things depending on the TCP state. */ switch (pcb->state) { 8031628: 7e23 ldrb r3, [r4, #24] 803162a: 3b02 subs r3, #2 803162c: 2b07 cmp r3, #7 803162e: f200 8278 bhi.w 8031b22 8031632: e8df f013 tbh [pc, r3, lsl #1] 8031636: 0008 .short 0x0008 8031638: 00c90077 .word 0x00c90077 803163c: 013000da .word 0x013000da 8031640: 015200c9 .word 0x015200c9 8031644: 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) 8031646: 4b7c ldr r3, [pc, #496] ; (8031838 ) 8031648: 781b ldrb r3, [r3, #0] 803164a: f003 0312 and.w r3, r3, #18 803164e: 2b12 cmp r3, #18 8031650: d153 bne.n 80316fa && ackno == ntohl(pcb->unacked->tcphdr->seqno) + 1) { 8031652: 6f23 ldr r3, [r4, #112] ; 0x70 8031654: 4d79 ldr r5, [pc, #484] ; (803183c ) 8031656: 68db ldr r3, [r3, #12] 8031658: 682e ldr r6, [r5, #0] 803165a: 6858 ldr r0, [r3, #4] 803165c: f7fd faa4 bl 802eba8 8031660: 3001 adds r0, #1 8031662: 4286 cmp r6, r0 8031664: d149 bne.n 80316fa pcb->snd_buf++; 8031666: 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)); 803166a: 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++; 803166c: 3301 adds r3, #1 803166e: f8a4 3066 strh.w r3, [r4, #102] ; 0x66 pcb->rcv_nxt = seqno + 1; 8031672: 4b73 ldr r3, [pc, #460] ; (8031840 ) 8031674: 681b ldr r3, [r3, #0] 8031676: 1c5a adds r2, r3, #1 8031678: 62a2 str r2, [r4, #40] ; 0x28 pcb->rcv_ann_right_edge = pcb->rcv_nxt; 803167a: 6322 str r2, [r4, #48] ; 0x30 pcb->lastack = ackno; 803167c: 682a ldr r2, [r5, #0] 803167e: 64a2 str r2, [r4, #72] ; 0x48 pcb->snd_wnd = tcphdr->wnd; 8031680: 4a71 ldr r2, [pc, #452] ; (8031848 ) 8031682: 6812 ldr r2, [r2, #0] pcb->snd_wnd_max = tcphdr->wnd; pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ 8031684: 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; 8031686: 89d2 ldrh r2, [r2, #14] pcb->snd_wnd_max = tcphdr->wnd; pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ 8031688: 6563 str r3, [r4, #84] ; 0x54 pcb->state = ESTABLISHED; 803168a: 2304 movs r3, #4 803168c: 7623 strb r3, [r4, #24] #if TCP_CALCULATE_EFF_SEND_MSS pcb->mss = tcp_eff_send_mss(pcb->mss, &(pcb->remote_ip)); 803168e: 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; 8031690: f8a4 2060 strh.w r2, [r4, #96] ; 0x60 pcb->snd_wnd_max = tcphdr->wnd; 8031694: 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)); 8031698: f7ff faf3 bl 8030c82 #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; 803169c: 230a movs r3, #10 803169e: 4343 muls r3, r0 80316a0: f8a4 304e strh.w r3, [r4, #78] ; 0x4e pcb->cwnd = ((pcb->cwnd == 1) ? (pcb->mss * 2) : pcb->mss); 80316a4: 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)); 80316a8: 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); 80316aa: 2b01 cmp r3, #1 80316ac: d101 bne.n 80316b2 80316ae: 0040 lsls r0, r0, #1 80316b0: b280 uxth r0, r0 LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0)); --pcb->snd_queuelen; 80316b2: 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); 80316b6: 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; 80316ba: 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; 80316bc: 3b01 subs r3, #1 80316be: 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; 80316c2: 6803 ldr r3, [r0, #0] 80316c4: 6723 str r3, [r4, #112] ; 0x70 tcp_seg_free(rseg); 80316c6: f7fe fed0 bl 803046a /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if(pcb->unacked == NULL) 80316ca: 6f23 ldr r3, [r4, #112] ; 0x70 80316cc: b91b cbnz r3, 80316d6 pcb->rtime = -1; 80316ce: f64f 73ff movw r3, #65535 ; 0xffff 80316d2: 86a3 strh r3, [r4, #52] ; 0x34 80316d4: e003 b.n 80316de else { pcb->rtime = 0; 80316d6: 2300 movs r3, #0 80316d8: 86a3 strh r3, [r4, #52] ; 0x34 pcb->nrtx = 0; 80316da: 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); 80316de: f8d4 3080 ldr.w r3, [r4, #128] ; 0x80 80316e2: b91b cbnz r3, 80316ec if (err == ERR_ABRT) { return ERR_ABRT; } tcp_ack_now(pcb); 80316e4: 7fa3 ldrb r3, [r4, #30] 80316e6: f043 0302 orr.w r3, r3, #2 80316ea: e219 b.n 8031b20 pcb->nrtx = 0; } /* Call the user specified function to call when sucessfully * connected. */ TCP_EVENT_CONNECTED(pcb, ERR_OK, err); 80316ec: 2200 movs r2, #0 80316ee: 6920 ldr r0, [r4, #16] 80316f0: 4621 mov r1, r4 80316f2: 4798 blx r3 if (err == ERR_ABRT) { 80316f4: 300a adds r0, #10 80316f6: d1f5 bne.n 80316e4 80316f8: e1ab b.n 8031a52 return ERR_ABRT; } tcp_ack_now(pcb); } /* received ACK? possibly a half-open connection */ else if (flags & TCP_ACK) { 80316fa: 4b4f ldr r3, [pc, #316] ; (8031838 ) 80316fc: 781b ldrb r3, [r3, #0] 80316fe: f003 0310 and.w r3, r3, #16 8031702: b2db uxtb r3, r3 8031704: 2b00 cmp r3, #0 8031706: f000 820c beq.w 8031b22 /* 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); 803170a: 4b4f ldr r3, [pc, #316] ; (8031848 ) 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(), 803170c: 4a48 ldr r2, [pc, #288] ; (8031830 ) tcphdr->dest, tcphdr->src); 803170e: 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(), 8031710: 8811 ldrh r1, [r2, #0] 8031712: 8858 ldrh r0, [r3, #2] 8031714: 4a4a ldr r2, [pc, #296] ; (8031840 ) 8031716: 6812 ldr r2, [r2, #0] 8031718: 9000 str r0, [sp, #0] 803171a: 881b ldrh r3, [r3, #0] 803171c: 9301 str r3, [sp, #4] 803171e: 4b47 ldr r3, [pc, #284] ; (803183c ) 8031720: 6818 ldr r0, [r3, #0] 8031722: e03a b.n 803179a tcphdr->dest, tcphdr->src); } break; case SYN_RCVD: if (flags & TCP_ACK) { 8031724: 4b44 ldr r3, [pc, #272] ; (8031838 ) 8031726: 781b ldrb r3, [r3, #0] 8031728: f003 0210 and.w r2, r3, #16 803172c: b2d2 uxtb r2, r2 803172e: 2a00 cmp r2, #0 8031730: d039 beq.n 80317a6 /* expected ACK number? */ if (TCP_SEQ_BETWEEN(ackno, pcb->lastack+1, pcb->snd_nxt)) { 8031732: 4b42 ldr r3, [pc, #264] ; (803183c ) 8031734: 6818 ldr r0, [r3, #0] 8031736: 6ca3 ldr r3, [r4, #72] ; 0x48 8031738: 43db mvns r3, r3 803173a: 42c3 cmn r3, r0 803173c: d423 bmi.n 8031786 803173e: 6d23 ldr r3, [r4, #80] ; 0x50 8031740: 1ac3 subs r3, r0, r3 8031742: 2b00 cmp r3, #0 8031744: dc1f bgt.n 8031786 u16_t old_cwnd; pcb->state = ESTABLISHED; 8031746: 2304 movs r3, #4 8031748: 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); 803174a: 6963 ldr r3, [r4, #20] 803174c: b903 cbnz r3, 8031750 803174e: e147 b.n 80319e0 8031750: 6920 ldr r0, [r4, #16] 8031752: 4621 mov r1, r4 8031754: 2200 movs r2, #0 8031756: 4798 blx r3 if (err != ERR_OK) { 8031758: b118 cbz r0, 8031762 /* If the accept function returns with an error, we abort * the connection. */ /* Already aborted? */ if (err != ERR_ABRT) { 803175a: 300a adds r0, #10 803175c: f040 8140 bne.w 80319e0 8031760: e177 b.n 8031a52 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); 8031762: 4620 mov r0, r4 if (err != ERR_ABRT) { tcp_abort(pcb); } return ERR_ABRT; } old_cwnd = pcb->cwnd; 8031764: 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); 8031768: f7ff fb54 bl 8030e14 /* Prevent ACK for SYN to generate a sent event */ if (pcb->acked != 0) { 803176c: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 8031770: b113 cbz r3, 8031778 pcb->acked--; 8031772: 3b01 subs r3, #1 8031774: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 } pcb->cwnd = ((old_cwnd == 1) ? (pcb->mss * 2) : pcb->mss); 8031778: 8ee3 ldrh r3, [r4, #54] ; 0x36 803177a: 2d01 cmp r5, #1 803177c: bf08 it eq 803177e: 005b lsleq r3, r3, #1 8031780: f8a4 304c strh.w r3, [r4, #76] ; 0x4c 8031784: e023 b.n 80317ce 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); 8031786: 4b30 ldr r3, [pc, #192] ; (8031848 ) 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(), 8031788: 4a29 ldr r2, [pc, #164] ; (8031830 ) tcphdr->dest, tcphdr->src); 803178a: 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(), 803178c: 8811 ldrh r1, [r2, #0] 803178e: 885d ldrh r5, [r3, #2] 8031790: 4a2b ldr r2, [pc, #172] ; (8031840 ) 8031792: 6812 ldr r2, [r2, #0] 8031794: 9500 str r5, [sp, #0] 8031796: 881b ldrh r3, [r3, #0] 8031798: 9301 str r3, [sp, #4] 803179a: 1889 adds r1, r1, r2 803179c: 4b2b ldr r3, [pc, #172] ; (803184c ) 803179e: 4a2c ldr r2, [pc, #176] ; (8031850 ) 80317a0: f000 fdb6 bl 8032310 80317a4: e1bd b.n 8031b22 tcphdr->dest, tcphdr->src); } } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) { 80317a6: f003 0302 and.w r3, r3, #2 80317aa: b2db uxtb r3, r3 80317ac: 2b00 cmp r3, #0 80317ae: f000 81b8 beq.w 8031b22 80317b2: 4a23 ldr r2, [pc, #140] ; (8031840 ) 80317b4: 6aa3 ldr r3, [r4, #40] ; 0x28 80317b6: 6812 ldr r2, [r2, #0] 80317b8: 3b01 subs r3, #1 80317ba: 429a cmp r2, r3 80317bc: f040 81b1 bne.w 8031b22 /* Looks like another copy of the SYN - retransmit our SYN-ACK */ tcp_rexmit(pcb); 80317c0: 4620 mov r0, r4 80317c2: f000 fe03 bl 80323cc 80317c6: e1ac b.n 8031b22 } break; case CLOSE_WAIT: /* FALLTHROUGH */ case ESTABLISHED: tcp_receive(pcb); 80317c8: 4620 mov r0, r4 80317ca: f7ff fb23 bl 8030e14 if (recv_flags & TF_GOT_FIN) { /* passive close */ 80317ce: 4b21 ldr r3, [pc, #132] ; (8031854 ) 80317d0: 781b ldrb r3, [r3, #0] 80317d2: f003 0320 and.w r3, r3, #32 80317d6: b2db uxtb r3, r3 80317d8: 2b00 cmp r3, #0 80317da: f000 81a2 beq.w 8031b22 tcp_ack_now(pcb); 80317de: 7fa3 ldrb r3, [r4, #30] 80317e0: f043 0302 orr.w r3, r3, #2 80317e4: 77a3 strb r3, [r4, #30] pcb->state = CLOSE_WAIT; 80317e6: 2307 movs r3, #7 80317e8: e053 b.n 8031892 } break; case FIN_WAIT_1: tcp_receive(pcb); 80317ea: 4620 mov r0, r4 80317ec: f7ff fb12 bl 8030e14 if (recv_flags & TF_GOT_FIN) { 80317f0: 4b18 ldr r3, [pc, #96] ; (8031854 ) 80317f2: 781a ldrb r2, [r3, #0] 80317f4: 4b10 ldr r3, [pc, #64] ; (8031838 ) if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 80317f6: 781b ldrb r3, [r3, #0] pcb->state = CLOSE_WAIT; } break; case FIN_WAIT_1: tcp_receive(pcb); if (recv_flags & TF_GOT_FIN) { 80317f8: f002 0220 and.w r2, r2, #32 if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 80317fc: 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) { 8031800: b2d2 uxtb r2, r2 if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 8031802: b2db uxtb r3, r3 pcb->state = CLOSE_WAIT; } break; case FIN_WAIT_1: tcp_receive(pcb); if (recv_flags & TF_GOT_FIN) { 8031804: 2a00 cmp r2, #0 8031806: d03a beq.n 803187e if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 8031808: 2b00 cmp r3, #0 803180a: d032 beq.n 8031872 803180c: 4b0b ldr r3, [pc, #44] ; (803183c ) 803180e: 681a ldr r2, [r3, #0] 8031810: 6d23 ldr r3, [r4, #80] ; 0x50 8031812: 429a cmp r2, r3 8031814: d12d bne.n 8031872 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); 8031816: 7fa3 ldrb r3, [r4, #30] 8031818: f043 0302 orr.w r3, r3, #2 803181c: 77a3 strb r3, [r4, #30] tcp_pcb_purge(pcb); 803181e: 4620 mov r0, r4 8031820: f7fe fe4a bl 80304b8 TCP_RMV_ACTIVE(pcb); 8031824: 4a0c ldr r2, [pc, #48] ; (8031858 ) 8031826: 6813 ldr r3, [r2, #0] 8031828: 42a3 cmp r3, r4 803182a: d117 bne.n 803185c 803182c: e06d b.n 803190a 803182e: bf00 nop 8031830: 2000c3e8 .word 0x2000c3e8 8031834: 2000f6d4 .word 0x2000f6d4 8031838: 2000c3f0 .word 0x2000c3f0 803183c: 2000c3ec .word 0x2000c3ec 8031840: 2000c3e4 .word 0x2000c3e4 8031844: 2000f6c0 .word 0x2000f6c0 8031848: 2000c3e0 .word 0x2000c3e0 803184c: 2000f6dc .word 0x2000f6dc 8031850: 2000f6e4 .word 0x2000f6e4 8031854: 2000c3f1 .word 0x2000c3f1 8031858: 2000f6bc .word 0x2000f6bc 803185c: 4a8e ldr r2, [pc, #568] ; (8031a98 ) 803185e: 6013 str r3, [r2, #0] 8031860: e004 b.n 803186c 8031862: 68d9 ldr r1, [r3, #12] 8031864: 42a1 cmp r1, r4 8031866: d100 bne.n 803186a 8031868: e057 b.n 803191a 803186a: 460b mov r3, r1 803186c: 2b00 cmp r3, #0 803186e: d1f8 bne.n 8031862 8031870: e05a b.n 8031928 pcb->state = TIME_WAIT; TCP_REG(&tcp_tw_pcbs, pcb); } else { tcp_ack_now(pcb); 8031872: 7fa3 ldrb r3, [r4, #30] 8031874: f043 0302 orr.w r3, r3, #2 8031878: 77a3 strb r3, [r4, #30] pcb->state = CLOSING; 803187a: 2308 movs r3, #8 803187c: e009 b.n 8031892 } } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 803187e: 2b00 cmp r3, #0 8031880: f000 814f beq.w 8031b22 8031884: 4b85 ldr r3, [pc, #532] ; (8031a9c ) 8031886: 681a ldr r2, [r3, #0] 8031888: 6d23 ldr r3, [r4, #80] ; 0x50 803188a: 429a cmp r2, r3 803188c: f040 8149 bne.w 8031b22 pcb->state = FIN_WAIT_2; 8031890: 2306 movs r3, #6 8031892: 7623 strb r3, [r4, #24] 8031894: e145 b.n 8031b22 } break; case FIN_WAIT_2: tcp_receive(pcb); 8031896: 4620 mov r0, r4 8031898: f7ff fabc bl 8030e14 if (recv_flags & TF_GOT_FIN) { 803189c: 4b80 ldr r3, [pc, #512] ; (8031aa0 ) 803189e: 781b ldrb r3, [r3, #0] 80318a0: f003 0320 and.w r3, r3, #32 80318a4: b2db uxtb r3, r3 80318a6: 2b00 cmp r3, #0 80318a8: f000 813b beq.w 8031b22 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); 80318ac: 7fa3 ldrb r3, [r4, #30] 80318ae: f043 0302 orr.w r3, r3, #2 80318b2: 77a3 strb r3, [r4, #30] tcp_pcb_purge(pcb); 80318b4: 4620 mov r0, r4 80318b6: f7fe fdff bl 80304b8 TCP_RMV_ACTIVE(pcb); 80318ba: 4a7a ldr r2, [pc, #488] ; (8031aa4 ) 80318bc: 6813 ldr r3, [r2, #0] 80318be: 42a3 cmp r3, r4 80318c0: d100 bne.n 80318c4 80318c2: e022 b.n 803190a 80318c4: 4a74 ldr r2, [pc, #464] ; (8031a98 ) 80318c6: 6013 str r3, [r2, #0] 80318c8: e004 b.n 80318d4 80318ca: 68d9 ldr r1, [r3, #12] 80318cc: 42a1 cmp r1, r4 80318ce: d100 bne.n 80318d2 80318d0: e023 b.n 803191a 80318d2: 460b mov r3, r1 80318d4: 2b00 cmp r3, #0 80318d6: d1f8 bne.n 80318ca 80318d8: e026 b.n 8031928 pcb->state = TIME_WAIT; TCP_REG(&tcp_tw_pcbs, pcb); } break; case CLOSING: tcp_receive(pcb); 80318da: 4620 mov r0, r4 80318dc: f7ff fa9a bl 8030e14 if (flags & TCP_ACK && ackno == pcb->snd_nxt) { 80318e0: 4b71 ldr r3, [pc, #452] ; (8031aa8 ) 80318e2: 781b ldrb r3, [r3, #0] 80318e4: f003 0310 and.w r3, r3, #16 80318e8: b2db uxtb r3, r3 80318ea: 2b00 cmp r3, #0 80318ec: f000 8119 beq.w 8031b22 80318f0: 4b6a ldr r3, [pc, #424] ; (8031a9c ) 80318f2: 681a ldr r2, [r3, #0] 80318f4: 6d23 ldr r3, [r4, #80] ; 0x50 80318f6: 429a cmp r2, r3 80318f8: f040 8113 bne.w 8031b22 LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: CLOSING %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); tcp_pcb_purge(pcb); 80318fc: 4620 mov r0, r4 80318fe: f7fe fddb bl 80304b8 TCP_RMV_ACTIVE(pcb); 8031902: 4a68 ldr r2, [pc, #416] ; (8031aa4 ) 8031904: 6813 ldr r3, [r2, #0] 8031906: 42a3 cmp r3, r4 8031908: d101 bne.n 803190e 803190a: 68e3 ldr r3, [r4, #12] 803190c: e00c b.n 8031928 803190e: 4a62 ldr r2, [pc, #392] ; (8031a98 ) 8031910: 6013 str r3, [r2, #0] 8031912: e007 b.n 8031924 8031914: 68d9 ldr r1, [r3, #12] 8031916: 42a1 cmp r1, r4 8031918: d103 bne.n 8031922 803191a: 6013 str r3, [r2, #0] 803191c: 68e2 ldr r2, [r4, #12] 803191e: 60da str r2, [r3, #12] 8031920: e003 b.n 803192a 8031922: 460b mov r3, r1 8031924: 2b00 cmp r3, #0 8031926: d1f5 bne.n 8031914 8031928: 6013 str r3, [r2, #0] 803192a: 4b60 ldr r3, [pc, #384] ; (8031aac ) 803192c: 2201 movs r2, #1 803192e: 701a strb r2, [r3, #0] pcb->state = TIME_WAIT; 8031930: 230a movs r3, #10 8031932: 7623 strb r3, [r4, #24] TCP_REG(&tcp_tw_pcbs, pcb); 8031934: 4b5e ldr r3, [pc, #376] ; (8031ab0 ) 8031936: 681a ldr r2, [r3, #0] 8031938: 601c str r4, [r3, #0] 803193a: 60e2 str r2, [r4, #12] 803193c: f000 fe82 bl 8032644 8031940: e0ef b.n 8031b22 } break; case LAST_ACK: tcp_receive(pcb); 8031942: 4620 mov r0, r4 8031944: f7ff fa66 bl 8030e14 if (flags & TCP_ACK && ackno == pcb->snd_nxt) { 8031948: 4b57 ldr r3, [pc, #348] ; (8031aa8 ) 803194a: 781b ldrb r3, [r3, #0] 803194c: f003 0310 and.w r3, r3, #16 8031950: b2db uxtb r3, r3 8031952: 2b00 cmp r3, #0 8031954: f000 80e5 beq.w 8031b22 8031958: 4b50 ldr r3, [pc, #320] ; (8031a9c ) 803195a: 681a ldr r2, [r3, #0] 803195c: 6d23 ldr r3, [r4, #80] ; 0x50 803195e: 429a cmp r2, r3 8031960: f040 80df bne.w 8031b22 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; 8031964: 4b4e ldr r3, [pc, #312] ; (8031aa0 ) 8031966: 781a ldrb r2, [r3, #0] 8031968: f042 0210 orr.w r2, r2, #16 803196c: 701a strb r2, [r3, #0] 803196e: e0d8 b.n 8031b22 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); 8031970: f8d4 3088 ldr.w r3, [r4, #136] ; 0x88 8031974: b19b cbz r3, 803199e 8031976: 6920 ldr r0, [r4, #16] 8031978: f06f 010a mvn.w r1, #10 803197c: e00e b.n 803199c tcp_pcb_remove(&tcp_active_pcbs, pcb); memp_free(MEMP_TCP_PCB, pcb); } else if (recv_flags & TF_CLOSED) { 803197e: f003 0310 and.w r3, r3, #16 8031982: b2db uxtb r3, r3 8031984: b1a3 cbz r3, 80319b0 /* The connection has been closed and we will deallocate the PCB. */ if (!(pcb->flags & TF_RXCLOSED)) { 8031986: 7fa3 ldrb r3, [r4, #30] 8031988: f003 0310 and.w r3, r3, #16 803198c: b2db uxtb r3, r3 803198e: b933 cbnz r3, 803199e /* 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); 8031990: f8d4 3088 ldr.w r3, [r4, #136] ; 0x88 8031994: b11b cbz r3, 803199e 8031996: 6920 ldr r0, [r4, #16] 8031998: f06f 010b mvn.w r1, #11 803199c: 4798 blx r3 } tcp_pcb_remove(&tcp_active_pcbs, pcb); 803199e: 4621 mov r1, r4 80319a0: 4840 ldr r0, [pc, #256] ; (8031aa4 ) 80319a2: f7fe fef1 bl 8030788 memp_free(MEMP_TCP_PCB, pcb); 80319a6: 2002 movs r0, #2 80319a8: 4621 mov r1, r4 80319aa: f7fe f925 bl 802fbf8 80319ae: e050 b.n 8031a52 } 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) { 80319b0: f8b4 2064 ldrh.w r2, [r4, #100] ; 0x64 80319b4: b91a cbnz r2, 80319be if (err == ERR_ABRT) { goto aborted; } } if (recv_data != NULL) { 80319b6: 4b3f ldr r3, [pc, #252] ; (8031ab4 ) 80319b8: 681a ldr r2, [r3, #0] 80319ba: b94a cbnz r2, 80319d0 80319bc: e026 b.n 8031a0c 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); 80319be: 6fa3 ldr r3, [r4, #120] ; 0x78 80319c0: 2b00 cmp r3, #0 80319c2: d0f8 beq.n 80319b6 80319c4: 6920 ldr r0, [r4, #16] 80319c6: 4621 mov r1, r4 80319c8: 4798 blx r3 if (err == ERR_ABRT) { 80319ca: 300a adds r0, #10 80319cc: d1f3 bne.n 80319b6 80319ce: e040 b.n 8031a52 } } if (recv_data != NULL) { LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL); if (pcb->flags & TF_RXCLOSED) { 80319d0: 7fa3 ldrb r3, [r4, #30] 80319d2: f003 0310 and.w r3, r3, #16 80319d6: b2db uxtb r3, r3 80319d8: b133 cbz r3, 80319e8 /* received data although already closed -> abort (send RST) to notify the remote host that not all data has been processed */ pbuf_free(recv_data); 80319da: 4610 mov r0, r2 80319dc: f7fe fa16 bl 802fe0c tcp_abort(pcb); 80319e0: 4620 mov r0, r4 80319e2: f7fe ff45 bl 8030870 goto aborted; 80319e6: e034 b.n 8031a52 } /* Notify application that data has been received. */ TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err); 80319e8: 6fe5 ldr r5, [r4, #124] ; 0x7c 80319ea: b11d cbz r5, 80319f4 80319ec: 6920 ldr r0, [r4, #16] 80319ee: 4621 mov r1, r4 80319f0: 47a8 blx r5 80319f2: e004 b.n 80319fe 80319f4: 4628 mov r0, r5 80319f6: 4621 mov r1, r4 80319f8: 462b mov r3, r5 80319fa: f7ff f81b bl 8030a34 if (err == ERR_ABRT) { 80319fe: b243 sxtb r3, r0 8031a00: 330a adds r3, #10 8031a02: d026 beq.n 8031a52 goto aborted; } /* If the upper layer can't receive this data, store it */ if (err != ERR_OK) { 8031a04: b110 cbz r0, 8031a0c pcb->refused_data = recv_data; 8031a06: 4b2b ldr r3, [pc, #172] ; (8031ab4 ) 8031a08: 681b ldr r3, [r3, #0] 8031a0a: 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) { 8031a0c: 4b24 ldr r3, [pc, #144] ; (8031aa0 ) 8031a0e: 781b ldrb r3, [r3, #0] 8031a10: f003 0320 and.w r3, r3, #32 8031a14: b2db uxtb r3, r3 8031a16: b1b3 cbz r3, 8031a46 if (pcb->refused_data != NULL) { 8031a18: 6f63 ldr r3, [r4, #116] ; 0x74 8031a1a: b123 cbz r3, 8031a26 /* Delay this if we have refused data. */ pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN; 8031a1c: 7b5a ldrb r2, [r3, #13] 8031a1e: f042 0220 orr.w r2, r2, #32 8031a22: 735a strb r2, [r3, #13] 8031a24: e00f b.n 8031a46 } else { /* correct rcv_wnd as the application won't call tcp_recved() for the FIN's seqno */ if (pcb->rcv_wnd != TCP_WND) { 8031a26: 8da3 ldrh r3, [r4, #44] ; 0x2c 8031a28: f241 62d0 movw r2, #5840 ; 0x16d0 8031a2c: 4293 cmp r3, r2 8031a2e: d001 beq.n 8031a34 pcb->rcv_wnd++; 8031a30: 3301 adds r3, #1 8031a32: 85a3 strh r3, [r4, #44] ; 0x2c } TCP_EVENT_CLOSED(pcb, err); 8031a34: 6fe5 ldr r5, [r4, #124] ; 0x7c 8031a36: b135 cbz r5, 8031a46 8031a38: 2200 movs r2, #0 8031a3a: 6920 ldr r0, [r4, #16] 8031a3c: 4621 mov r1, r4 8031a3e: 4613 mov r3, r2 8031a40: 47a8 blx r5 if (err == ERR_ABRT) { 8031a42: 300a adds r0, #10 8031a44: d005 beq.n 8031a52 goto aborted; } } } tcp_input_pcb = NULL; 8031a46: 4b1c ldr r3, [pc, #112] ; (8031ab8 ) 8031a48: 2200 movs r2, #0 /* Try to send something out. */ tcp_output(pcb); 8031a4a: 4620 mov r0, r4 goto aborted; } } } tcp_input_pcb = NULL; 8031a4c: 601a str r2, [r3, #0] /* Try to send something out. */ tcp_output(pcb); 8031a4e: f000 fb3b bl 80320c8 } } /* 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; 8031a52: 4b19 ldr r3, [pc, #100] ; (8031ab8 ) recv_data = NULL; /* give up our reference to inseg.p */ if (inseg.p != NULL) 8031a54: 4d19 ldr r5, [pc, #100] ; (8031abc ) } } /* 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; 8031a56: 2400 movs r4, #0 8031a58: 601c str r4, [r3, #0] recv_data = NULL; /* give up our reference to inseg.p */ if (inseg.p != NULL) 8031a5a: 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; 8031a5c: 4b15 ldr r3, [pc, #84] ; (8031ab4 ) 8031a5e: 601c str r4, [r3, #0] /* give up our reference to inseg.p */ if (inseg.p != NULL) 8031a60: 2800 cmp r0, #0 8031a62: d067 beq.n 8031b34 { pbuf_free(inseg.p); 8031a64: f7fe f9d2 bl 802fe0c inseg.p = NULL; 8031a68: 606c str r4, [r5, #4] 8031a6a: e063 b.n 8031b34 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); 8031a6c: 4b14 ldr r3, [pc, #80] ; (8031ac0 ) 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, 8031a6e: 4a15 ldr r2, [pc, #84] ; (8031ac4 ) ip_current_dest_addr(), ip_current_src_addr(), tcphdr->dest, tcphdr->src); 8031a70: 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, 8031a72: 8811 ldrh r1, [r2, #0] 8031a74: 8858 ldrh r0, [r3, #2] 8031a76: 4a14 ldr r2, [pc, #80] ; (8031ac8 ) 8031a78: 6812 ldr r2, [r2, #0] 8031a7a: 9000 str r0, [sp, #0] 8031a7c: 881b ldrh r3, [r3, #0] 8031a7e: 9301 str r3, [sp, #4] 8031a80: 4b06 ldr r3, [pc, #24] ; (8031a9c ) 8031a82: 1889 adds r1, r1, r2 8031a84: 6818 ldr r0, [r3, #0] 8031a86: e517 b.n 80314b8 LWIP_ASSERT("tcp_input: tcp_pcbs_sane()", tcp_pcbs_sane()); PERF_STOP("tcp_input"); return; dropped: TCP_STATS_INC(tcp.drop); snmp_inc_tcpinerrs(); 8031a88: f003 f8f6 bl 8034c78 pbuf_free(p); 8031a8c: 4630 mov r0, r6 } 8031a8e: b003 add sp, #12 8031a90: 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); 8031a94: f7fe b9ba b.w 802fe0c 8031a98: 2000f6c8 .word 0x2000f6c8 8031a9c: 2000c3ec .word 0x2000c3ec 8031aa0: 2000c3f1 .word 0x2000c3f1 8031aa4: 2000f6bc .word 0x2000f6bc 8031aa8: 2000c3f0 .word 0x2000c3f0 8031aac: 2000f6b8 .word 0x2000f6b8 8031ab0: 2000f6d0 .word 0x2000f6d0 8031ab4: 2000c3f4 .word 0x2000c3f4 8031ab8: 2000f6d4 .word 0x2000f6d4 8031abc: 2000c3fc .word 0x2000c3fc 8031ac0: 2000c3e0 .word 0x2000c3e0 8031ac4: 2000c3e8 .word 0x2000c3e8 8031ac8: 2000c3e4 .word 0x2000c3e4 } 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) { 8031acc: 4b1b ldr r3, [pc, #108] ; (8031b3c ) 8031ace: 681b ldr r3, [r3, #0] 8031ad0: e4bf b.n 8031452 tcp_debug_print_state(pcb->state); #endif /* TCP_DEBUG */ #endif /* TCP_INPUT_DEBUG */ /* Set up a tcp_seg structure. */ inseg.next = NULL; 8031ad2: 4b1b ldr r3, [pc, #108] ; (8031b40 ) 8031ad4: 2100 movs r1, #0 8031ad6: 6019 str r1, [r3, #0] inseg.len = p->tot_len; 8031ad8: f8a3 8008 strh.w r8, [r3, #8] inseg.p = p; 8031adc: 605e str r6, [r3, #4] inseg.tcphdr = tcphdr; 8031ade: 60df str r7, [r3, #12] recv_data = NULL; 8031ae0: 4b18 ldr r3, [pc, #96] ; (8031b44 ) recv_flags = 0; if (flags & TCP_PSH) { 8031ae2: f002 0208 and.w r2, r2, #8 inseg.next = NULL; inseg.len = p->tot_len; inseg.p = p; inseg.tcphdr = tcphdr; recv_data = NULL; 8031ae6: 6019 str r1, [r3, #0] recv_flags = 0; 8031ae8: 4b17 ldr r3, [pc, #92] ; (8031b48 ) if (flags & TCP_PSH) { 8031aea: b2d2 uxtb r2, r2 inseg.len = p->tot_len; inseg.p = p; inseg.tcphdr = tcphdr; recv_data = NULL; recv_flags = 0; 8031aec: 7019 strb r1, [r3, #0] if (flags & TCP_PSH) { 8031aee: 2a00 cmp r2, #0 8031af0: f47f ad52 bne.w 8031598 8031af4: e554 b.n 80315a0 #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) { 8031af6: 2b00 cmp r3, #0 8031af8: f47f acc4 bne.w 8031484 8031afc: e4c7 b.n 803148e } 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)) { 8031afe: 89b8 ldrh r0, [r7, #12] 8031b00: f7fd f84b bl 802eb9a 8031b04: f000 0004 and.w r0, r0, #4 8031b08: b280 uxth r0, r0 8031b0a: 2800 cmp r0, #0 8031b0c: d1be bne.n 8031a8c 8031b0e: e7ad b.n 8031a6c } 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; 8031b10: 4b0d ldr r3, [pc, #52] ; (8031b48 ) 8031b12: 781a ldrb r2, [r3, #0] 8031b14: f042 0208 orr.w r2, r2, #8 8031b18: 701a strb r2, [r3, #0] pcb->flags &= ~TF_ACK_DELAY; 8031b1a: 7fa3 ldrb r3, [r4, #30] 8031b1c: f023 0301 bic.w r3, r3, #1 8031b20: 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) { 8031b22: 4b09 ldr r3, [pc, #36] ; (8031b48 ) 8031b24: 781b ldrb r3, [r3, #0] 8031b26: f003 0208 and.w r2, r3, #8 8031b2a: b2d2 uxtb r2, r2 8031b2c: 2a00 cmp r2, #0 8031b2e: f47f af1f bne.w 8031970 8031b32: e724 b.n 803197e return; dropped: TCP_STATS_INC(tcp.drop); snmp_inc_tcpinerrs(); pbuf_free(p); } 8031b34: b003 add sp, #12 8031b36: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8031b3a: bf00 nop 8031b3c: 2000f6d0 .word 0x2000f6d0 8031b40: 2000c3fc .word 0x2000c3fc 8031b44: 2000c3f4 .word 0x2000c3f4 8031b48: 2000c3f1 .word 0x2000c3f1 08031b4c : #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) { 8031b4c: 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) { 8031b4e: 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) { 8031b50: 460c mov r4, r1 8031b52: 461e mov r6, r3 8031b54: 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) { 8031b56: d21a bcs.n 8031b8e * * Did the user set TCP_WRITE_FLAG_MORE? * * Will the Nagle algorithm defer transmission of this segment? */ if ((apiflags & TCP_WRITE_FLAG_MORE) || 8031b58: f89d 3014 ldrb.w r3, [sp, #20] 8031b5c: f003 0302 and.w r3, r3, #2 8031b60: b2db uxtb r3, r3 8031b62: b95b cbnz r3, 8031b7c (!(pcb->flags & TF_NODELAY) && 8031b64: 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) || 8031b66: f003 0340 and.w r3, r3, #64 ; 0x40 8031b6a: b2db uxtb r3, r3 8031b6c: b97b cbnz r3, 8031b8e (!(pcb->flags & TF_NODELAY) && 8031b6e: f89d 3018 ldrb.w r3, [sp, #24] 8031b72: b11b cbz r3, 8031b7c (!first_seg || 8031b74: 6ee9 ldr r1, [r5, #108] ; 0x6c 8031b76: b909 cbnz r1, 8031b7c pcb->unsent != NULL || 8031b78: 6f2b ldr r3, [r5, #112] ; 0x70 8031b7a: b143 cbz r3, 8031b8e pcb->unacked != NULL))) { alloc = LWIP_MIN(max_length, LWIP_MEM_ALIGN_SIZE(length + TCP_OVERSIZE)); 8031b7c: f204 51b7 addw r1, r4, #1463 ; 0x5b7 8031b80: f021 0103 bic.w r1, r1, #3 8031b84: 4291 cmp r1, r2 8031b86: bfa8 it ge 8031b88: 4611 movge r1, r2 8031b8a: b289 uxth r1, r1 8031b8c: e000 b.n 8031b90 * Will the Nagle algorithm defer transmission of this segment? */ if ((apiflags & TCP_WRITE_FLAG_MORE) || (!(pcb->flags & TF_NODELAY) && (!first_seg || pcb->unsent != NULL || 8031b8e: 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); 8031b90: 2200 movs r2, #0 8031b92: f7fe f988 bl 802fea6 if (p == NULL) { 8031b96: b120 cbz r0, 8031ba2 return NULL; } LWIP_ASSERT("need unchained pbuf", p->next == NULL); *oversize = p->len - length; 8031b98: 8943 ldrh r3, [r0, #10] 8031b9a: 1b1b subs r3, r3, r4 8031b9c: 8033 strh r3, [r6, #0] /* trim p->len to the currently used size */ p->len = p->tot_len = length; 8031b9e: 8104 strh r4, [r0, #8] 8031ba0: 8144 strh r4, [r0, #10] return p; } 8031ba2: bd70 pop {r4, r5, r6, pc} 08031ba4 : * 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) { 8031ba4: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8031ba8: f89d 6020 ldrb.w r6, [sp, #32] struct tcp_seg *seg; u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); 8031bac: f006 0702 and.w r7, r6, #2 8031bb0: f016 0f01 tst.w r6, #1 8031bb4: 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) { 8031bb6: 4680 mov r8, r0 8031bb8: 469a mov sl, r3 struct tcp_seg *seg; u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); 8031bba: bf0c ite eq 8031bbc: 2300 moveq r3, #0 8031bbe: 2304 movne r3, #4 8031bc0: 2f00 cmp r7, #0 8031bc2: bf14 ite ne 8031bc4: 270c movne r7, #12 8031bc6: 2700 moveq r7, #0 if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { 8031bc8: 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) { 8031bca: 460d mov r5, r1 8031bcc: 4691 mov r9, r2 struct tcp_seg *seg; u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); 8031bce: 18ff adds r7, r7, r3 if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { 8031bd0: f7fd fffc bl 802fbcc 8031bd4: 4604 mov r4, r0 8031bd6: b918 cbnz r0, 8031be0 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_create_segment: no memory.\n")); pbuf_free(p); 8031bd8: 4628 mov r0, r5 8031bda: f7fe f917 bl 802fe0c return NULL; 8031bde: e030 b.n 8031c42 } seg->flags = optflags; 8031be0: 7286 strb r6, [r0, #10] seg->next = NULL; seg->p = p; seg->len = p->tot_len - optlen; 8031be2: 892b ldrh r3, [r5, #8] pbuf_free(p); return NULL; } seg->flags = optflags; seg->next = NULL; seg->p = p; 8031be4: 6045 str r5, [r0, #4] seg->len = p->tot_len - optlen; 8031be6: 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; 8031be8: 2600 movs r6, #0 8031bea: 6006 str r6, [r0, #0] seg->p = p; seg->len = p->tot_len - optlen; 8031bec: 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)) { 8031bee: 2114 movs r1, #20 8031bf0: 4628 mov r0, r5 8031bf2: f7fe f8e0 bl 802fdb6 8031bf6: 4605 mov r5, r0 8031bf8: b120 cbz r0, 8031c04 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); 8031bfa: 4620 mov r0, r4 8031bfc: f7fe fc35 bl 803046a return NULL; 8031c00: 4634 mov r4, r6 8031c02: e01e b.n 8031c42 } seg->tcphdr = (struct tcp_hdr *)seg->p->payload; 8031c04: 6863 ldr r3, [r4, #4] seg->tcphdr->src = htons(pcb->local_port); 8031c06: 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; 8031c0a: 685e ldr r6, [r3, #4] 8031c0c: 60e6 str r6, [r4, #12] seg->tcphdr->src = htons(pcb->local_port); 8031c0e: f7fc ffbf bl 802eb90 8031c12: 8030 strh r0, [r6, #0] seg->tcphdr->dest = htons(pcb->remote_port); 8031c14: f8b8 001c ldrh.w r0, [r8, #28] 8031c18: 68e6 ldr r6, [r4, #12] 8031c1a: f7fc ffb9 bl 802eb90 8031c1e: 8070 strh r0, [r6, #2] seg->tcphdr->seqno = htonl(seqno); 8031c20: 4650 mov r0, sl 8031c22: 68e6 ldr r6, [r4, #12] 8031c24: f7fc ffbe bl 802eba4 /* ackno is set in tcp_output */ TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), flags); 8031c28: 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); 8031c2a: 6070 str r0, [r6, #4] /* ackno is set in tcp_output */ TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), flags); 8031c2c: f507 40a0 add.w r0, r7, #20480 ; 0x5000 8031c30: ea40 0009 orr.w r0, r0, r9 8031c34: 68e6 ldr r6, [r4, #12] 8031c36: f7fc ffab bl 802eb90 8031c3a: 81b0 strh r0, [r6, #12] /* wnd and chksum are set in tcp_output */ seg->tcphdr->urgp = 0; 8031c3c: 68e3 ldr r3, [r4, #12] 8031c3e: 749d strb r5, [r3, #18] 8031c40: 74dd strb r5, [r3, #19] return seg; } 8031c42: 4620 mov r0, r4 8031c44: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 08031c48 : 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); 8031c48: 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, 8031c4a: 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); 8031c4c: 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, 8031c4e: 4605 mov r5, r0 8031c50: 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); 8031c52: 2001 movs r0, #1 8031c54: 2200 movs r2, #0 8031c56: f7fe f926 bl 802fea6 if (p != NULL) { 8031c5a: 4606 mov r6, r0 8031c5c: b1f8 cbz r0, 8031c9e LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", (p->len >= TCP_HLEN + optlen)); tcphdr = (struct tcp_hdr *)p->payload; 8031c5e: 6844 ldr r4, [r0, #4] tcphdr->src = htons(pcb->local_port); 8031c60: 8b68 ldrh r0, [r5, #26] 8031c62: f7fc ff95 bl 802eb90 8031c66: 8020 strh r0, [r4, #0] tcphdr->dest = htons(pcb->remote_port); 8031c68: 8ba8 ldrh r0, [r5, #28] 8031c6a: f7fc ff91 bl 802eb90 tcphdr->seqno = seqno_be; 8031c6e: 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); 8031c70: 8060 strh r0, [r4, #2] tcphdr->seqno = seqno_be; tcphdr->ackno = htonl(pcb->rcv_nxt); 8031c72: 6aa8 ldr r0, [r5, #40] ; 0x28 8031c74: f7fc ff96 bl 802eba4 8031c78: 60a0 str r0, [r4, #8] TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), TCP_ACK); 8031c7a: f245 0010 movw r0, #20496 ; 0x5010 8031c7e: f7fc ff87 bl 802eb90 8031c82: 81a0 strh r0, [r4, #12] tcphdr->wnd = htons(pcb->rcv_ann_wnd); 8031c84: 8de8 ldrh r0, [r5, #46] ; 0x2e 8031c86: f7fc ff83 bl 802eb90 tcphdr->chksum = 0; 8031c8a: 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); 8031c8c: 81e0 strh r0, [r4, #14] tcphdr->chksum = 0; 8031c8e: 7423 strb r3, [r4, #16] 8031c90: 7463 strb r3, [r4, #17] tcphdr->urgp = 0; 8031c92: 74a3 strb r3, [r4, #18] 8031c94: 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; 8031c96: 8dea ldrh r2, [r5, #46] ; 0x2e 8031c98: 6aab ldr r3, [r5, #40] ; 0x28 8031c9a: 18d3 adds r3, r2, r3 8031c9c: 632b str r3, [r5, #48] ; 0x30 } return p; } 8031c9e: 4630 mov r0, r6 8031ca0: bdf8 pop {r3, r4, r5, r6, r7, pc} 08031ca2 : * - 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) { 8031ca2: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8031ca6: b08f sub sp, #60 ; 0x3c 8031ca8: 4691 mov r9, r2 8031caa: 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; 8031cac: 2300 movs r3, #0 8031cae: 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) { 8031cb2: 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); 8031cb4: f8b0 2062 ldrh.w r2, [r0, #98] ; 0x62 8031cb8: 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)", 8031cba: 9106 str r1, [sp, #24] 8031cbc: 2900 cmp r1, #0 8031cbe: f000 8168 beq.w 8031f92 8031cc2: 7e01 ldrb r1, [r0, #24] 8031cc4: 2907 cmp r1, #7 8031cc6: f200 8166 bhi.w 8031f96 8031cca: f990 1018 ldrsb.w r1, [r0, #24] 8031cce: f04f 5064 mov.w r0, #956301312 ; 0x39000000 8031cd2: 4088 lsls r0, r1 8031cd4: f140 815f bpl.w 8031f96 (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) { 8031cd8: f1b9 0f00 cmp.w r9, #0 8031cdc: d00d beq.n 8031cfa return ERR_OK; } /* fail on too much data */ if (len > pcb->snd_buf) { 8031cde: f8b4 1066 ldrh.w r1, [r4, #102] ; 0x66 8031ce2: 4549 cmp r1, r9 8031ce4: d200 bcs.n 8031ce8 8031ce6: e003 b.n 8031cf0 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)) { 8031ce8: f8b4 1068 ldrh.w r1, [r4, #104] ; 0x68 8031cec: 2947 cmp r1, #71 ; 0x47 8031cee: d904 bls.n 8031cfa 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; 8031cf0: 7fa3 ldrb r3, [r4, #30] 8031cf2: f063 037f orn r3, r3, #127 ; 0x7f 8031cf6: 77a3 strb r3, [r4, #30] 8031cf8: e151 b.n 8031f9e 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); 8031cfa: 0852 lsrs r2, r2, #1 * * pos records progress as data is segmented. */ /* Find the tail of the unsent queue. */ if (pcb->unsent != NULL) { 8031cfc: 6ee6 ldr r6, [r4, #108] ; 0x6c err = tcp_write_checks(pcb, len); if (err != ERR_OK) { return err; } queuelen = pcb->snd_queuelen; 8031cfe: 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); 8031d02: 429a cmp r2, r3 8031d04: bf28 it cs 8031d06: 461a movcs r2, r3 8031d08: 920a str r2, [sp, #40] ; 0x28 * * pos records progress as data is segmented. */ /* Find the tail of the unsent queue. */ if (pcb->unsent != NULL) { 8031d0a: b90e cbnz r6, 8031d10 8031d0c: e066 b.n 8031ddc 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); 8031d0e: 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; 8031d10: 6833 ldr r3, [r6, #0] 8031d12: 2b00 cmp r3, #0 8031d14: d1fb bne.n 8031d0e last_unsent = last_unsent->next); /* Usable space at the end of the last unsent segment */ unsent_optlen = LWIP_TCP_OPT_LENGTH(last_unsent->flags); 8031d16: 7ab3 ldrb r3, [r6, #10] space = mss_local - (last_unsent->len + unsent_optlen); 8031d18: 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); 8031d1a: 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; 8031d1c: 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); 8031d20: f013 0f01 tst.w r3, #1 8031d24: f003 0302 and.w r3, r3, #2 8031d28: bf0c ite eq 8031d2a: 2100 moveq r1, #0 8031d2c: 2104 movne r1, #4 8031d2e: b2db uxtb r3, r3 8031d30: 1bc2 subs r2, r0, r7 8031d32: 2b00 cmp r3, #0 8031d34: bf14 ite ne 8031d36: 230c movne r3, #12 8031d38: 2300 moveq r3, #0 space = mss_local - (last_unsent->len + unsent_optlen); 8031d3a: 1a52 subs r2, r2, r1 8031d3c: 1ad2 subs r2, r2, r3 8031d3e: 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) { 8031d40: b91d cbnz r5, 8031d4a #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; 8031d42: 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; 8031d46: 462b mov r3, r5 8031d48: e00a b.n 8031d60 #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; 8031d4a: 45a9 cmp r9, r5 8031d4c: bf34 ite cc 8031d4e: 464b movcc r3, r9 8031d50: 462b movcs r3, r5 pos += oversize_used; oversize -= oversize_used; 8031d52: 1aed subs r5, r5, r3 space -= oversize_used; 8031d54: 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; 8031d56: f8ad 5036 strh.w r5, [sp, #54] ; 0x36 space -= oversize_used; 8031d5a: 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; 8031d5c: 461d mov r5, r3 oversize -= oversize_used; space -= oversize_used; 8031d5e: 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)) { 8031d60: 454d cmp r5, r9 8031d62: d23f bcs.n 8031de4 8031d64: 2a00 cmp r2, #0 8031d66: d03d beq.n 8031de4 8031d68: 2f00 cmp r7, #0 8031d6a: d03e beq.n 8031dea 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) { 8031d6c: 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; 8031d6e: ebc5 0a09 rsb sl, r5, r9 8031d72: 4592 cmp sl, r2 8031d74: bfa8 it ge 8031d76: 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) { 8031d78: 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; 8031d7a: 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) { 8031d7e: d514 bpl.n 8031daa /* Data is copied */ if ((concat_p = tcp_pbuf_prealloc(PBUF_RAW, seglen, space, &oversize, pcb, apiflags, 1)) == NULL) { 8031d80: 2301 movs r3, #1 8031d82: 9101 str r1, [sp, #4] 8031d84: 9302 str r3, [sp, #8] 8031d86: 9400 str r4, [sp, #0] 8031d88: 2003 movs r0, #3 8031d8a: 4641 mov r1, r8 8031d8c: f10d 0336 add.w r3, sp, #54 ; 0x36 8031d90: f7ff fedc bl 8031b4c 8031d94: 4607 mov r7, r0 8031d96: 2800 cmp r0, #0 8031d98: f000 80e9 beq.w 8031f6e 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); 8031d9c: 9a06 ldr r2, [sp, #24] 8031d9e: 6840 ldr r0, [r0, #4] 8031da0: 1951 adds r1, r2, r5 8031da2: 4642 mov r2, r8 8031da4: f7ef fdf2 bl 802198c 8031da8: e00b b.n 8031dc2 #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) { 8031daa: 2003 movs r0, #3 8031dac: 4641 mov r1, r8 8031dae: 2201 movs r2, #1 8031db0: f7fe f879 bl 802fea6 8031db4: 4607 mov r7, r0 8031db6: 2800 cmp r0, #0 8031db8: f000 80d9 beq.w 8031f6e 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; 8031dbc: 9806 ldr r0, [sp, #24] 8031dbe: 1943 adds r3, r0, r5 8031dc0: 607b str r3, [r7, #4] } pos += seglen; queuelen += pbuf_clen(concat_p); 8031dc2: 4638 mov r0, r7 8031dc4: f7fe f8f6 bl 802ffb4 #endif /* TCP_CHECKSUM_ON_COPY */ /* reference the non-volatile payload data */ concat_p->payload = (u8_t*)arg + pos; } pos += seglen; 8031dc8: 44a8 add r8, r5 8031dca: fa1f f888 uxth.w r8, r8 queuelen += pbuf_clen(concat_p); 8031dce: 4458 add r0, fp 8031dd0: 46aa mov sl, r5 8031dd2: 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; 8031dd6: 4645 mov r5, r8 queuelen += pbuf_clen(concat_p); 8031dd8: 4633 mov r3, r6 8031dda: e007 b.n 8031dec u16_t queuelen; u8_t optlen = 0; u8_t optflags = 0; #if TCP_OVERSIZE u16_t oversize = 0; u16_t oversize_used = 0; 8031ddc: 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 */ 8031dde: 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; 8031de0: 4633 mov r3, r6 8031de2: e000 b.n 8031de6 * * 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)) { 8031de4: 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; 8031de6: 2700 movs r7, #0 8031de8: e000 b.n 8031dec * * 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)) { 8031dea: 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) { 8031dec: 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) { 8031dee: 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) { 8031df2: 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) { 8031df6: 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) { 8031dfa: 9108 str r1, [sp, #32] 8031dfc: e068 b.n 8031ed0 * 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; 8031dfe: ebc5 0309 rsb r3, r5, r9 u16_t max_len = mss_local - optlen; u16_t seglen = left > max_len ? max_len : left; 8031e02: 9a0a ldr r2, [sp, #40] ; 0x28 8031e04: b29b uxth r3, r3 8031e06: 4293 cmp r3, r2 8031e08: bf38 it cc 8031e0a: 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) { 8031e0c: 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; 8031e0e: 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) { 8031e10: b1db cbz r3, 8031e4a /* 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) { 8031e12: f1d8 0301 rsbs r3, r8, #1 8031e16: 9807 ldr r0, [sp, #28] 8031e18: 9400 str r4, [sp, #0] 8031e1a: bf38 it cc 8031e1c: 2300 movcc r3, #0 8031e1e: 9001 str r0, [sp, #4] 8031e20: 9302 str r3, [sp, #8] 8031e22: 4611 mov r1, r2 8031e24: 2000 movs r0, #0 8031e26: 9a0a ldr r2, [sp, #40] ; 0x28 8031e28: f10d 0336 add.w r3, sp, #54 ; 0x36 8031e2c: f7ff fe8e bl 8031b4c 8031e30: 4684 mov ip, r0 8031e32: 2800 cmp r0, #0 8031e34: f000 809e beq.w 8031f74 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); 8031e38: 9a06 ldr r2, [sp, #24] 8031e3a: 6840 ldr r0, [r0, #4] 8031e3c: f8cd c014 str.w ip, [sp, #20] 8031e40: 1951 adds r1, r2, r5 8031e42: 9a09 ldr r2, [sp, #36] ; 0x24 8031e44: f7ef fda2 bl 802198c 8031e48: e019 b.n 8031e7e */ 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) { 8031e4a: 9808 ldr r0, [sp, #32] 8031e4c: 9909 ldr r1, [sp, #36] ; 0x24 8031e4e: 2201 movs r2, #1 8031e50: f7fe f829 bl 802fea6 8031e54: 4603 mov r3, r0 8031e56: 2800 cmp r0, #0 8031e58: f000 808c beq.w 8031f74 #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; 8031e5c: 9806 ldr r0, [sp, #24] 8031e5e: 1942 adds r2, r0, r5 /* Second, allocate a pbuf for the headers. */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 8031e60: 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; 8031e62: 605a str r2, [r3, #4] /* Second, allocate a pbuf for the headers. */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 8031e64: 4601 mov r1, r0 8031e66: 4602 mov r2, r0 8031e68: 9305 str r3, [sp, #20] 8031e6a: f7fe f81c bl 802fea6 8031e6e: 9b05 ldr r3, [sp, #20] 8031e70: b908 cbnz r0, 8031e76 /* If allocation fails, we have to deallocate the data pbuf as * well. */ pbuf_free(p2); 8031e72: 4618 mov r0, r3 8031e74: e013 b.n 8031e9e 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*/); 8031e76: 4619 mov r1, r3 8031e78: 9005 str r0, [sp, #20] 8031e7a: f7fe f8b1 bl 802ffe0 8031e7e: f8dd c014 ldr.w ip, [sp, #20] } queuelen += pbuf_clen(p); 8031e82: 4660 mov r0, ip 8031e84: f8cd c014 str.w ip, [sp, #20] 8031e88: f7fe f894 bl 802ffb4 8031e8c: 4458 add r0, fp 8031e8e: 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)) { 8031e92: f1bb 0f48 cmp.w fp, #72 ; 0x48 8031e96: f8dd c014 ldr.w ip, [sp, #20] 8031e9a: d903 bls.n 8031ea4 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_write: queue too long %"U16_F" (%"U16_F")\n", queuelen, TCP_SND_QUEUELEN)); pbuf_free(p); 8031e9c: 4660 mov r0, ip 8031e9e: f7fd ffb5 bl 802fe0c goto memerr; 8031ea2: e067 b.n 8031f74 } if ((seg = tcp_create_segment(pcb, p, 0, pcb->snd_lbb + pos, optflags)) == NULL) { 8031ea4: 6de3 ldr r3, [r4, #92] ; 0x5c 8031ea6: 2200 movs r2, #0 8031ea8: 18eb adds r3, r5, r3 8031eaa: 9200 str r2, [sp, #0] 8031eac: 4620 mov r0, r4 8031eae: 4661 mov r1, ip 8031eb0: f7ff fe78 bl 8031ba4 8031eb4: 4603 mov r3, r0 8031eb6: 2800 cmp r0, #0 8031eb8: d05c beq.n 8031f74 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) { 8031eba: f1b8 0f00 cmp.w r8, #0 8031ebe: d002 beq.n 8031ec6 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; 8031ec0: 990b ldr r1, [sp, #44] ; 0x2c 8031ec2: 6008 str r0, [r1, #0] 8031ec4: e000 b.n 8031ec8 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) { 8031ec6: 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; 8031ec8: 9a09 ldr r2, [sp, #36] ; 0x24 8031eca: 930b str r3, [sp, #44] ; 0x2c 8031ecc: 1955 adds r5, r2, r5 8031ece: 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) { 8031ed0: 454d cmp r5, r9 8031ed2: d394 bcc.n 8031dfe /* * 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) { 8031ed4: f1ba 0f00 cmp.w sl, #0 8031ed8: d019 beq.n 8031f0e struct pbuf *p; /* Bump tot_len of whole chain, len of tail */ for (p = last_unsent->p; p; p = p->next) { 8031eda: 6875 ldr r5, [r6, #4] 8031edc: e011 b.n 8031f02 p->tot_len += oversize_used; 8031ede: 892a ldrh r2, [r5, #8] 8031ee0: 4452 add r2, sl 8031ee2: 812a strh r2, [r5, #8] if (p->next == NULL) { 8031ee4: 682a ldr r2, [r5, #0] 8031ee6: b95a cbnz r2, 8031f00 TCP_DATA_COPY((char *)p->payload + p->len, arg, oversize_used, last_unsent); 8031ee8: 686a ldr r2, [r5, #4] 8031eea: 8968 ldrh r0, [r5, #10] 8031eec: 9906 ldr r1, [sp, #24] 8031eee: 9305 str r3, [sp, #20] 8031ef0: 1810 adds r0, r2, r0 8031ef2: 4652 mov r2, sl 8031ef4: f7ef fd4a bl 802198c p->len += oversize_used; 8031ef8: 896a ldrh r2, [r5, #10] 8031efa: 9b05 ldr r3, [sp, #20] 8031efc: 4452 add r2, sl 8031efe: 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) { 8031f00: 682d ldr r5, [r5, #0] 8031f02: 2d00 cmp r5, #0 8031f04: d1eb bne.n 8031ede 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; 8031f06: 8932 ldrh r2, [r6, #8] 8031f08: 4492 add sl, r2 8031f0a: 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; 8031f0e: f8bd 2036 ldrh.w r2, [sp, #54] ; 0x36 8031f12: 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) { 8031f16: b157 cbz r7, 8031f2e LWIP_ASSERT("tcp_write: cannot concatenate when pcb->unsent is empty", (last_unsent != NULL)); pbuf_cat(last_unsent->p, concat_p); 8031f18: 6870 ldr r0, [r6, #4] 8031f1a: 9305 str r3, [sp, #20] 8031f1c: 4639 mov r1, r7 8031f1e: f7fe f85f bl 802ffe0 last_unsent->len += concat_p->tot_len; 8031f22: 8939 ldrh r1, [r7, #8] 8031f24: 8932 ldrh r2, [r6, #8] 8031f26: 9b05 ldr r3, [sp, #20] 8031f28: 188a adds r2, r1, r2 8031f2a: 8132 strh r2, [r6, #8] 8031f2c: e003 b.n 8031f36 /* * Phase 3: Append queue to pcb->unsent. Queue may be NULL, but that * is harmless */ if (last_unsent == NULL) { 8031f2e: b916 cbnz r6, 8031f36 pcb->unsent = queue; 8031f30: f8c4 806c str.w r8, [r4, #108] ; 0x6c 8031f34: e001 b.n 8031f3a } else { last_unsent->next = queue; 8031f36: f8c6 8000 str.w r8, [r6] } /* * Finally update the pcb state. */ pcb->snd_lbb += len; 8031f3a: 6de2 ldr r2, [r4, #92] ; 0x5c pcb->snd_buf -= len; pcb->snd_queuelen = queuelen; 8031f3c: f8a4 b068 strh.w fp, [r4, #104] ; 0x68 } /* * Finally update the pcb state. */ pcb->snd_lbb += len; 8031f40: 444a add r2, r9 8031f42: 65e2 str r2, [r4, #92] ; 0x5c pcb->snd_buf -= len; 8031f44: f8b4 2066 ldrh.w r2, [r4, #102] ; 0x66 8031f48: ebc9 0902 rsb r9, r9, r2 8031f4c: 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)) { 8031f50: b333 cbz r3, 8031fa0 8031f52: 68dc ldr r4, [r3, #12] 8031f54: b30c cbz r4, 8031f9a 8031f56: 9b07 ldr r3, [sp, #28] 8031f58: f003 0502 and.w r5, r3, #2 8031f5c: b2ed uxtb r5, r5 8031f5e: b9e5 cbnz r5, 8031f9a TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); 8031f60: 2008 movs r0, #8 8031f62: 89a6 ldrh r6, [r4, #12] 8031f64: f7fc fe14 bl 802eb90 8031f68: 4330 orrs r0, r6 8031f6a: 81a0 strh r0, [r4, #12] 8031f6c: e015 b.n 8031f9a */ 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; 8031f6e: f04f 0800 mov.w r8, #0 8031f72: 4647 mov r7, r8 TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); } return ERR_OK; memerr: pcb->flags |= TF_NAGLEMEMERR; 8031f74: 7fa3 ldrb r3, [r4, #30] 8031f76: f063 037f orn r3, r3, #127 ; 0x7f 8031f7a: 77a3 strb r3, [r4, #30] TCP_STATS_INC(tcp.memerr); if (concat_p != NULL) { 8031f7c: b117 cbz r7, 8031f84 pbuf_free(concat_p); 8031f7e: 4638 mov r0, r7 8031f80: f7fd ff44 bl 802fe0c } if (queue != NULL) { 8031f84: f1b8 0f00 cmp.w r8, #0 8031f88: d009 beq.n 8031f9e tcp_segs_free(queue); 8031f8a: 4640 mov r0, r8 8031f8c: f7fe fa7b bl 8030486 8031f90: e005 b.n 8031f9e 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)", 8031f92: 23f2 movs r3, #242 ; 0xf2 8031f94: e004 b.n 8031fa0 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; 8031f96: 23f3 movs r3, #243 ; 0xf3 8031f98: e002 b.n 8031fa0 /* 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; 8031f9a: 2300 movs r3, #0 8031f9c: e000 b.n 8031fa0 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; 8031f9e: 23ff movs r3, #255 ; 0xff 8031fa0: b258 sxtb r0, r3 } 8031fa2: b00f add sp, #60 ; 0x3c 8031fa4: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 08031fa8 : 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)) { 8031fa8: f8b0 3068 ldrh.w r3, [r0, #104] ; 0x68 8031fac: 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) { 8031fae: b573 push {r0, r1, r4, r5, r6, lr} 8031fb0: 4604 mov r4, r0 8031fb2: 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)) { 8031fb4: d900 bls.n 8031fb8 8031fb6: e014 b.n 8031fe2 /* 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) { 8031fb8: 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; 8031fbc: 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); 8031fc0: 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) { 8031fc2: 2b00 cmp r3, #0 8031fc4: d038 beq.n 8032038 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) { 8031fc6: 2000 movs r0, #0 8031fc8: 4602 mov r2, r0 8031fca: f7fd ff6c bl 802fea6 8031fce: 4601 mov r1, r0 8031fd0: b900 cbnz r0, 8031fd4 8031fd2: e006 b.n 8031fe2 } 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) { 8031fd4: 9600 str r6, [sp, #0] 8031fd6: 4620 mov r0, r4 8031fd8: 462a mov r2, r5 8031fda: 6de3 ldr r3, [r4, #92] ; 0x5c 8031fdc: f7ff fde2 bl 8031ba4 8031fe0: b920 cbnz r0, 8031fec pcb->flags |= TF_NAGLEMEMERR; 8031fe2: 7fa3 ldrb r3, [r4, #30] 8031fe4: f063 037f orn r3, r3, #127 ; 0x7f 8031fe8: 77a3 strb r3, [r4, #30] 8031fea: e025 b.n 8032038 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) { 8031fec: 6ee3 ldr r3, [r4, #108] ; 0x6c 8031fee: b913 cbnz r3, 8031ff6 pcb->unsent = seg; 8031ff0: 66e0 str r0, [r4, #108] ; 0x6c 8031ff2: e004 b.n 8031ffe } else { struct tcp_seg *useg; for (useg = pcb->unsent; useg->next != NULL; useg = useg->next); 8031ff4: 4613 mov r3, r2 8031ff6: 681a ldr r2, [r3, #0] 8031ff8: 2a00 cmp r2, #0 8031ffa: d1fb bne.n 8031ff4 useg->next = seg; 8031ffc: 6018 str r0, [r3, #0] } #if TCP_OVERSIZE /* The new unsent tail has no space */ pcb->unsent_oversize = 0; 8031ffe: 2300 movs r3, #0 #endif /* TCP_OVERSIZE */ /* SYN and FIN bump the sequence number */ if ((flags & TCP_SYN) || (flags & TCP_FIN)) { 8032000: 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; 8032002: 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)) { 8032006: d007 beq.n 8032018 pcb->snd_lbb++; 8032008: 6de3 ldr r3, [r4, #92] ; 0x5c 803200a: 3301 adds r3, #1 803200c: 65e3 str r3, [r4, #92] ; 0x5c /* optlen does not influence snd_buf */ pcb->snd_buf--; 803200e: f8b4 3066 ldrh.w r3, [r4, #102] ; 0x66 8032012: 3b01 subs r3, #1 8032014: f8a4 3066 strh.w r3, [r4, #102] ; 0x66 } if (flags & TCP_FIN) { 8032018: 07ea lsls r2, r5, #31 803201a: d503 bpl.n 8032024 pcb->flags |= TF_FIN; 803201c: 7fa3 ldrb r3, [r4, #30] 803201e: f043 0320 orr.w r3, r3, #32 8032022: 77a3 strb r3, [r4, #30] } /* update number of segments on the queues */ pcb->snd_queuelen += pbuf_clen(seg->p); 8032024: 6840 ldr r0, [r0, #4] 8032026: f8b4 5068 ldrh.w r5, [r4, #104] ; 0x68 803202a: f7fd ffc3 bl 802ffb4 803202e: 1940 adds r0, r0, r5 8032030: 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; 8032034: 2000 movs r0, #0 8032036: e000 b.n 803203a * 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; 8032038: 20ff movs r0, #255 ; 0xff LWIP_ASSERT("tcp_enqueue_flags: invalid queue length", pcb->unacked != NULL || pcb->unsent != NULL); } return ERR_OK; } 803203a: b240 sxtb r0, r0 803203c: bd7c pop {r2, r3, r4, r5, r6, pc} 0803203e : * @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) { 803203e: b5f8 push {r3, r4, r5, r6, r7, lr} /* first, try to add the fin to the last unsent segment */ if (pcb->unsent != NULL) { 8032040: 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) { 8032042: 4605 mov r5, r0 /* first, try to add the fin to the last unsent segment */ if (pcb->unsent != NULL) { 8032044: b90c cbnz r4, 803204a 8032046: e00a b.n 803205e struct tcp_seg *last_unsent; for (last_unsent = pcb->unsent; last_unsent->next != NULL; last_unsent = last_unsent->next); 8032048: 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; 803204a: 6823 ldr r3, [r4, #0] 803204c: 2b00 cmp r3, #0 803204e: d1fb bne.n 8032048 last_unsent = last_unsent->next); if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) { 8032050: 68e3 ldr r3, [r4, #12] 8032052: 8998 ldrh r0, [r3, #12] 8032054: f7fc fda1 bl 802eb9a 8032058: f010 0607 ands.w r6, r0, #7 803205c: d005 beq.n 803206a pcb->flags |= TF_FIN; return ERR_OK; } } /* no data, no length, flags, copy=1, no optdata */ return tcp_enqueue_flags(pcb, TCP_FIN); 803205e: 4628 mov r0, r5 8032060: 2101 movs r1, #1 } 8032062: 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); 8032066: f7ff bf9f b.w 8031fa8 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); 803206a: 68e4 ldr r4, [r4, #12] 803206c: 2001 movs r0, #1 803206e: 89a7 ldrh r7, [r4, #12] 8032070: f7fc fd8e bl 802eb90 8032074: 4338 orrs r0, r7 8032076: 81a0 strh r0, [r4, #12] pcb->flags |= TF_FIN; 8032078: 7fab ldrb r3, [r5, #30] 803207a: f043 0320 orr.w r3, r3, #32 803207e: 77ab strb r3, [r5, #30] return ERR_OK; } } /* no data, no length, flags, copy=1, no optdata */ return tcp_enqueue_flags(pcb, TCP_FIN); } 8032080: 4630 mov r0, r6 8032082: bdf8 pop {r3, r4, r5, r6, r7, pc} 08032084 : * * @param pcb Protocol control block for the TCP connection to send the ACK */ err_t tcp_send_empty_ack(struct tcp_pcb *pcb) { 8032084: b537 push {r0, r1, r2, r4, r5, lr} 8032086: 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)); 8032088: 6d00 ldr r0, [r0, #80] ; 0x50 803208a: f7fc fd8b bl 802eba4 803208e: 2100 movs r1, #0 8032090: 4602 mov r2, r0 8032092: 4620 mov r0, r4 8032094: f7ff fdd8 bl 8031c48 if (p == NULL) { 8032098: 4605 mov r5, r0 803209a: b188 cbz r0, 80320c0 } 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); 803209c: 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, 803209e: 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); 80320a0: 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, 80320a4: 9200 str r2, [sp, #0] 80320a6: 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); 80320a8: 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, 80320aa: 9201 str r2, [sp, #4] 80320ac: 7aa3 ldrb r3, [r4, #10] 80320ae: 4621 mov r1, r4 80320b0: 1d22 adds r2, r4, #4 80320b2: f001 f8ab bl 803320c IP_PROTO_TCP); #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 80320b6: 4628 mov r0, r5 80320b8: f7fd fea8 bl 802fe0c return ERR_OK; 80320bc: 2000 movs r0, #0 80320be: e000 b.n 80320c2 #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; 80320c0: 20fe movs r0, #254 ; 0xfe IP_PROTO_TCP); #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); return ERR_OK; } 80320c2: b240 sxtb r0, r0 80320c4: bd3e pop {r1, r2, r3, r4, r5, pc} 80320c6: 0000 movs r0, r0 080320c8 : /* 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) { 80320c8: 4b8f ldr r3, [pc, #572] ; (8032308 ) 80320ca: 681b ldr r3, [r3, #0] 80320cc: 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) { 80320ce: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 80320d2: 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) { 80320d4: f000 8113 beq.w 80322fe return ERR_OK; } wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd); 80320d8: f8b0 304c ldrh.w r3, [r0, #76] ; 0x4c 80320dc: f8b0 9060 ldrh.w r9, [r0, #96] ; 0x60 seg = pcb->unsent; 80320e0: 6ec5 ldr r5, [r0, #108] ; 0x6c with. */ if (tcp_input_pcb == pcb) { return ERR_OK; } wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd); 80320e2: 4599 cmp r9, r3 80320e4: bf28 it cs 80320e6: 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 && 80320e8: 7f83 ldrb r3, [r0, #30] 80320ea: f003 0302 and.w r3, r3, #2 80320ee: b2db uxtb r3, r3 80320f0: b183 cbz r3, 8032114 80320f2: b92d cbnz r5, 8032100 (seg == NULL || ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd)) { return tcp_send_empty_ack(pcb); 80320f4: 4620 mov r0, r4 } #endif /* TCP_OVERSIZE */ pcb->flags &= ~TF_NAGLEMEMERR; return ERR_OK; } 80320f6: b003 add sp, #12 80320f8: 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); 80320fc: f7ff bfc2 b.w 8032084 * * 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)) { 8032100: 68eb ldr r3, [r5, #12] 8032102: 6858 ldr r0, [r3, #4] 8032104: f7fc fd50 bl 802eba8 8032108: 892a ldrh r2, [r5, #8] 803210a: 6ca3 ldr r3, [r4, #72] ; 0x48 803210c: 1ad3 subs r3, r2, r3 803210e: 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 || 8032110: 4548 cmp r0, r9 8032112: d8ef bhi.n 80320f4 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; 8032114: 6f26 ldr r6, [r4, #112] ; 0x70 if (useg != NULL) { 8032116: b90e cbnz r6, 803211c 8032118: e0d1 b.n 80322be for (; useg->next != NULL; useg = useg->next); 803211a: 461e mov r6, r3 803211c: 6833 ldr r3, [r6, #0] 803211e: 2b00 cmp r3, #0 8032120: d1fb bne.n 803211a 8032122: e0cc b.n 80322be } #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!", 8032124: 68eb ldr r3, [r5, #12] 8032126: 8998 ldrh r0, [r3, #12] 8032128: f7fc fd37 bl 802eb9a * - 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) && 803212c: 6f23 ldr r3, [r4, #112] ; 0x70 803212e: b19b cbz r3, 8032158 8032130: 7fa2 ldrb r2, [r4, #30] 8032132: f012 0f44 tst.w r2, #68 ; 0x44 8032136: d10f bne.n 8032158 8032138: 6ee3 ldr r3, [r4, #108] ; 0x6c 803213a: b12b cbz r3, 8032148 803213c: 6819 ldr r1, [r3, #0] 803213e: b959 cbnz r1, 8032158 8032140: 8919 ldrh r1, [r3, #8] 8032142: 8ee3 ldrh r3, [r4, #54] ; 0x36 8032144: 4299 cmp r1, r3 8032146: d207 bcs.n 8032158 8032148: f8b4 3066 ldrh.w r3, [r4, #102] ; 0x66 803214c: b123 cbz r3, 8032158 803214e: f8b4 3068 ldrh.w r3, [r4, #104] ; 0x68 8032152: 2b47 cmp r3, #71 ; 0x47 8032154: f240 80ce bls.w 80322f4 pcb->lastack, ntohl(seg->tcphdr->seqno), pcb->lastack, i)); ++i; #endif /* TCP_CWND_DEBUG */ pcb->unsent = seg->next; 8032158: 682b ldr r3, [r5, #0] 803215a: 66e3 str r3, [r4, #108] ; 0x6c if (pcb->state != SYN_SENT) { 803215c: 7e23 ldrb r3, [r4, #24] 803215e: 2b02 cmp r3, #2 8032160: d00c beq.n 803217c TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); 8032162: 68ef ldr r7, [r5, #12] 8032164: 2010 movs r0, #16 8032166: f8b7 b00c ldrh.w fp, [r7, #12] 803216a: f7fc fd11 bl 802eb90 803216e: ea40 000b orr.w r0, r0, fp 8032172: 81b8 strh r0, [r7, #12] pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); 8032174: 7fa3 ldrb r3, [r4, #30] 8032176: f023 0303 bic.w r3, r3, #3 803217a: 77a3 strb r3, [r4, #30] u16_t len; struct netif *netif; u32_t *opts; /** @bug Exclude retransmitted segments from this count. */ snmp_inc_tcpoutsegs(); 803217c: f002 fd6c bl 8034c58 /* The TCP header has already been constructed, but the ackno and wnd fields remain. */ seg->tcphdr->ackno = htonl(pcb->rcv_nxt); 8032180: 6aa0 ldr r0, [r4, #40] ; 0x28 8032182: 68ef ldr r7, [r5, #12] 8032184: f7fc fd0e bl 802eba4 8032188: 60b8 str r0, [r7, #8] /* advertise our receive window size in this TCP segment */ seg->tcphdr->wnd = htons(pcb->rcv_ann_wnd); 803218a: 8de0 ldrh r0, [r4, #46] ; 0x2e 803218c: 68ef ldr r7, [r5, #12] 803218e: f7fc fcff bl 802eb90 8032192: 81f8 strh r0, [r7, #14] pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; 8032194: 8de2 ldrh r2, [r4, #46] ; 0x2e 8032196: 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); 8032198: 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; 803219a: 18d3 adds r3, r2, r3 803219c: 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) { 803219e: 7aab ldrb r3, [r5, #10] 80321a0: 07d8 lsls r0, r3, #31 80321a2: d509 bpl.n 80321b8 u16_t mss; #if TCP_CALCULATE_EFF_SEND_MSS mss = tcp_eff_send_mss(TCP_MSS, &pcb->remote_ip); 80321a4: 4641 mov r1, r8 80321a6: f240 50b4 movw r0, #1460 ; 0x5b4 80321aa: f7fe fd6a bl 8030c82 #else /* TCP_CALCULATE_EFF_SEND_MSS */ mss = TCP_MSS; #endif /* TCP_CALCULATE_EFF_SEND_MSS */ *opts = TCP_BUILD_MSS_OPTION(mss); 80321ae: f040 7001 orr.w r0, r0, #33816576 ; 0x2040000 80321b2: f7fc fcf7 bl 802eba4 80321b6: 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) { 80321b8: f9b4 3034 ldrsh.w r3, [r4, #52] ; 0x34 80321bc: 3301 adds r3, #1 80321be: d101 bne.n 80321c4 pcb->rtime = 0; 80321c0: 2300 movs r3, #0 80321c2: 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))) { 80321c4: 6823 ldr r3, [r4, #0] 80321c6: b92b cbnz r3, 80321d4 netif = ip_route(&(pcb->remote_ip)); 80321c8: 4640 mov r0, r8 80321ca: f000 fecb bl 8032f64 if (netif == NULL) { 80321ce: b310 cbz r0, 8032216 return; } ip_addr_copy(pcb->local_ip, netif->ip_addr); 80321d0: 6843 ldr r3, [r0, #4] 80321d2: 6023 str r3, [r4, #0] } if (pcb->rttest == 0) { 80321d4: 6ba3 ldr r3, [r4, #56] ; 0x38 80321d6: b93b cbnz r3, 80321e8 pcb->rttest = tcp_ticks; 80321d8: f8da 3000 ldr.w r3, [sl] 80321dc: 63a3 str r3, [r4, #56] ; 0x38 pcb->rtseq = ntohl(seg->tcphdr->seqno); 80321de: 68eb ldr r3, [r5, #12] 80321e0: 6858 ldr r0, [r3, #4] 80321e2: f7fc fce1 bl 802eba8 80321e6: 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); 80321e8: 6868 ldr r0, [r5, #4] 80321ea: 68eb ldr r3, [r5, #12] 80321ec: 6842 ldr r2, [r0, #4] seg->p->len -= len; 80321ee: 8941 ldrh r1, [r0, #10] seg->p->tot_len -= len; seg->p->payload = seg->tcphdr; 80321f0: 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); 80321f2: 1a9a subs r2, r3, r2 seg->p->len -= len; 80321f4: 1a89 subs r1, r1, r2 80321f6: 8141 strh r1, [r0, #10] seg->p->tot_len -= len; 80321f8: 8901 ldrh r1, [r0, #8] 80321fa: 1a8a subs r2, r1, r2 80321fc: 8102 strh r2, [r0, #8] seg->p->payload = seg->tcphdr; seg->tcphdr->chksum = 0; 80321fe: 2200 movs r2, #0 8032200: 741a strb r2, [r3, #16] 8032202: 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, 8032204: 7a62 ldrb r2, [r4, #9] 8032206: 7aa3 ldrb r3, [r4, #10] 8032208: 9200 str r2, [sp, #0] 803220a: 2206 movs r2, #6 803220c: 9201 str r2, [sp, #4] 803220e: 4621 mov r1, r4 8032210: 4642 mov r2, r8 8032212: f000 fffb bl 803320c 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); 8032216: 68eb ldr r3, [r5, #12] 8032218: 6858 ldr r0, [r3, #4] 803221a: f7fc fcc5 bl 802eba8 803221e: 68ea ldr r2, [r5, #12] 8032220: f8b5 b008 ldrh.w fp, [r5, #8] 8032224: 4607 mov r7, r0 8032226: 8990 ldrh r0, [r2, #12] 8032228: f7fc fcb7 bl 802eb9a 803222c: f010 0003 ands.w r0, r0, #3 8032230: bf18 it ne 8032232: 2001 movne r0, #1 if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 8032234: 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); 8032236: eb0b 0300 add.w r3, fp, r0 803223a: 19db adds r3, r3, r7 if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 803223c: 1ad2 subs r2, r2, r3 803223e: 2a00 cmp r2, #0 pcb->snd_nxt = snd_nxt; 8032240: bfb8 it lt 8032242: 6523 strlt r3, [r4, #80] ; 0x50 } /* put segment on unacknowledged list if length > 0 */ if (TCP_TCPLEN(seg) > 0) { 8032244: 68eb ldr r3, [r5, #12] 8032246: 892f ldrh r7, [r5, #8] 8032248: 8998 ldrh r0, [r3, #12] 803224a: f7fc fca6 bl 802eb9a 803224e: f010 0003 ands.w r0, r0, #3 8032252: bf18 it ne 8032254: 2001 movne r0, #1 8032256: 1838 adds r0, r7, r0 8032258: b360 cbz r0, 80322b4 seg->next = NULL; 803225a: 2300 movs r3, #0 803225c: 602b str r3, [r5, #0] /* unacked list is empty? */ if (pcb->unacked == NULL) { 803225e: 6f23 ldr r3, [r4, #112] ; 0x70 8032260: b90b cbnz r3, 8032266 pcb->unacked = seg; 8032262: 6725 str r5, [r4, #112] ; 0x70 8032264: e024 b.n 80322b0 /* 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))) { 8032266: 68eb ldr r3, [r5, #12] 8032268: 6858 ldr r0, [r3, #4] 803226a: f7fc fc9d bl 802eba8 803226e: 68f3 ldr r3, [r6, #12] 8032270: 4607 mov r7, r0 8032272: 6858 ldr r0, [r3, #4] 8032274: f7fc fc98 bl 802eba8 8032278: 1a38 subs r0, r7, r0 803227a: 2800 cmp r0, #0 803227c: da17 bge.n 80322ae /* add segment to before tail of unacked list, keeping the list sorted */ struct tcp_seg **cur_seg = &(pcb->unacked); 803227e: f104 0770 add.w r7, r4, #112 ; 0x70 while (*cur_seg && 8032282: e000 b.n 8032286 TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); 8032284: 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 && 8032286: 683b ldr r3, [r7, #0] 8032288: b91b cbnz r3, 8032292 TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); } seg->next = (*cur_seg); 803228a: 683b ldr r3, [r7, #0] 803228c: 602b str r3, [r5, #0] (*cur_seg) = seg; 803228e: 603d str r5, [r7, #0] 8032290: e013 b.n 80322ba * 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))) { 8032292: 68db ldr r3, [r3, #12] 8032294: 6858 ldr r0, [r3, #4] 8032296: f7fc fc87 bl 802eba8 803229a: 68eb ldr r3, [r5, #12] 803229c: 4683 mov fp, r0 803229e: 6858 ldr r0, [r3, #4] 80322a0: f7fc fc82 bl 802eba8 80322a4: 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 && 80322a8: 2800 cmp r0, #0 80322aa: dbeb blt.n 8032284 80322ac: e7ed b.n 803228a } seg->next = (*cur_seg); (*cur_seg) = seg; } else { /* add segment to tail of unacked list */ useg->next = seg; 80322ae: 6035 str r5, [r6, #0] 80322b0: 462e mov r6, r5 80322b2: e002 b.n 80322ba useg = useg->next; } } /* do not queue empty segments on the unacked list */ } else { tcp_seg_free(seg); 80322b4: 4628 mov r0, r5 80322b6: f7fe f8d8 bl 803046a } seg = pcb->unsent; 80322ba: 6ee5 ldr r5, [r4, #108] ; 0x6c 80322bc: e003 b.n 80322c6 } ip_addr_copy(pcb->local_ip, netif->ip_addr); } if (pcb->rttest == 0) { pcb->rttest = tcp_ticks; 80322be: f8df a04c ldr.w sl, [pc, #76] ; 803230c 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); 80322c2: 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 && 80322c6: b915 cbnz r5, 80322ce tcp_seg_free(seg); } seg = pcb->unsent; } #if TCP_OVERSIZE if (pcb->unsent == NULL) { 80322c8: 6ee3 ldr r3, [r4, #108] ; 0x6c 80322ca: b973 cbnz r3, 80322ea 80322cc: e00b b.n 80322e6 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) { 80322ce: 68eb ldr r3, [r5, #12] 80322d0: 6858 ldr r0, [r3, #4] 80322d2: f7fc fc69 bl 802eba8 80322d6: 892a ldrh r2, [r5, #8] 80322d8: 6ca3 ldr r3, [r4, #72] ; 0x48 80322da: 1ad3 subs r3, r2, r3 80322dc: 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 && 80322de: 4548 cmp r0, r9 80322e0: f67f af20 bls.w 8032124 80322e4: e7f0 b.n 80322c8 seg = pcb->unsent; } #if TCP_OVERSIZE if (pcb->unsent == NULL) { /* last unsent has been removed, reset unsent_oversize */ pcb->unsent_oversize = 0; 80322e6: f8a4 306a strh.w r3, [r4, #106] ; 0x6a } #endif /* TCP_OVERSIZE */ pcb->flags &= ~TF_NAGLEMEMERR; 80322ea: 7fa3 ldrb r3, [r4, #30] 80322ec: f003 037f and.w r3, r3, #127 ; 0x7f 80322f0: 77a3 strb r3, [r4, #30] return ERR_OK; 80322f2: e004 b.n 80322fe * - 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) && 80322f4: f012 0fa0 tst.w r2, #160 ; 0xa0 80322f8: f47f af2e bne.w 8032158 80322fc: e7e4 b.n 80322c8 } #endif /* TCP_OVERSIZE */ pcb->flags &= ~TF_NAGLEMEMERR; return ERR_OK; } 80322fe: 2000 movs r0, #0 8032300: b003 add sp, #12 8032302: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8032306: bf00 nop 8032308: 2000f6d4 .word 0x2000f6d4 803230c: 2000f6c0 .word 0x2000f6c0 08032310 : */ 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) { 8032310: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8032314: 4681 mov r9, r0 8032316: 460d mov r5, r1 8032318: 4690 mov r8, r2 struct pbuf *p; struct tcp_hdr *tcphdr; p = pbuf_alloc(PBUF_IP, TCP_HLEN, PBUF_RAM); 803231a: 2001 movs r0, #1 803231c: 2114 movs r1, #20 803231e: 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) { 8032320: 461f mov r7, r3 8032322: f8bd b030 ldrh.w fp, [sp, #48] ; 0x30 8032326: f8bd a034 ldrh.w sl, [sp, #52] ; 0x34 struct pbuf *p; struct tcp_hdr *tcphdr; p = pbuf_alloc(PBUF_IP, TCP_HLEN, PBUF_RAM); 803232a: f7fd fdbc bl 802fea6 if (p == NULL) { 803232e: 4606 mov r6, r0 8032330: 2800 cmp r0, #0 8032332: d030 beq.n 8032396 return; } LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", (p->len >= sizeof(struct tcp_hdr))); tcphdr = (struct tcp_hdr *)p->payload; 8032334: 6844 ldr r4, [r0, #4] tcphdr->src = htons(local_port); 8032336: 4658 mov r0, fp 8032338: f7fc fc2a bl 802eb90 803233c: 8020 strh r0, [r4, #0] tcphdr->dest = htons(remote_port); 803233e: 4650 mov r0, sl 8032340: f7fc fc26 bl 802eb90 8032344: 8060 strh r0, [r4, #2] tcphdr->seqno = htonl(seqno); 8032346: 4648 mov r0, r9 8032348: f7fc fc2c bl 802eba4 803234c: 6060 str r0, [r4, #4] tcphdr->ackno = htonl(ackno); 803234e: 4628 mov r0, r5 8032350: f7fc fc28 bl 802eba4 8032354: 60a0 str r0, [r4, #8] TCPH_HDRLEN_FLAGS_SET(tcphdr, TCP_HLEN/4, TCP_RST | TCP_ACK); 8032356: f245 0014 movw r0, #20500 ; 0x5014 803235a: f7fc fc19 bl 802eb90 tcphdr->wnd = PP_HTONS(TCP_WND); 803235e: 2316 movs r3, #22 8032360: 2500 movs r5, #0 8032362: 73a3 strb r3, [r4, #14] 8032364: 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); 8032368: 81a0 strh r0, [r4, #12] tcphdr->wnd = PP_HTONS(TCP_WND); 803236a: 73e3 strb r3, [r4, #15] tcphdr->chksum = 0; 803236c: 7425 strb r5, [r4, #16] 803236e: 7465 strb r5, [r4, #17] tcphdr->urgp = 0; 8032370: 74a5 strb r5, [r4, #18] 8032372: 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(); 8032374: f002 fc88 bl 8034c88 /* 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); 8032378: 2306 movs r3, #6 803237a: 9301 str r3, [sp, #4] 803237c: 9500 str r5, [sp, #0] 803237e: 4630 mov r0, r6 8032380: 4641 mov r1, r8 8032382: 463a mov r2, r7 8032384: 23ff movs r3, #255 ; 0xff 8032386: f000 ff41 bl 803320c pbuf_free(p); 803238a: 4630 mov r0, r6 LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); } 803238c: b003 add sp, #12 803238e: 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); 8032392: f7fd bd3b b.w 802fe0c LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); } 8032396: b003 add sp, #12 8032398: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0803239c : void tcp_rexmit_rto(struct tcp_pcb *pcb) { struct tcp_seg *seg; if (pcb->unacked == NULL) { 803239c: 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) { 803239e: b510 push {r4, lr} struct tcp_seg *seg; if (pcb->unacked == NULL) { 80323a0: b19a cbz r2, 80323ca 80323a2: 4611 mov r1, r2 80323a4: e000 b.n 80323a8 return; } /* Move all unacked segments to the head of the unsent queue */ for (seg = pcb->unacked; seg->next != NULL; seg = seg->next); 80323a6: 4619 mov r1, r3 80323a8: 680b ldr r3, [r1, #0] 80323aa: 2b00 cmp r3, #0 80323ac: d1fb bne.n 80323a6 /* concatenate unsent queue after unacked queue */ seg->next = pcb->unsent; 80323ae: 6ec4 ldr r4, [r0, #108] ; 0x6c 80323b0: 600c str r4, [r1, #0] /* unsent queue is the concatenated queue (of unacked, unsent) */ pcb->unsent = pcb->unacked; 80323b2: 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; 80323b4: 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; 80323b8: 6703 str r3, [r0, #112] ; 0x70 /* last unsent hasn't changed, no need to reset unsent_oversize */ /* increment number of retransmissions */ ++pcb->nrtx; 80323ba: 3201 adds r2, #1 80323bc: f880 2046 strb.w r2, [r0, #70] ; 0x46 /* Don't take any RTT measurements after retransmitting. */ pcb->rttest = 0; 80323c0: 6383 str r3, [r0, #56] ; 0x38 /* Do the actual retransmission */ tcp_output(pcb); } 80323c2: 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); 80323c6: f7ff be7f b.w 80320c8 80323ca: bd10 pop {r4, pc} 080323cc : * * @param pcb the tcp_pcb for which to retransmit the first unacked segment */ void tcp_rexmit(struct tcp_pcb *pcb) { 80323cc: b5f8 push {r3, r4, r5, r6, r7, lr} struct tcp_seg *seg; struct tcp_seg **cur_seg; if (pcb->unacked == NULL) { 80323ce: 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) { 80323d0: 4604 mov r4, r0 struct tcp_seg *seg; struct tcp_seg **cur_seg; if (pcb->unacked == NULL) { 80323d2: 2d00 cmp r5, #0 80323d4: d027 beq.n 8032426 } /* Move the first unacked segment to the unsent queue */ /* Keep the unsent queue sorted. */ seg = pcb->unacked; pcb->unacked = seg->next; 80323d6: 682b ldr r3, [r5, #0] cur_seg = &(pcb->unsent); 80323d8: 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; 80323dc: 6703 str r3, [r0, #112] ; 0x70 cur_seg = &(pcb->unsent); while (*cur_seg && 80323de: e000 b.n 80323e2 TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); 80323e0: 6836 ldr r6, [r6, #0] /* Keep the unsent queue sorted. */ seg = pcb->unacked; pcb->unacked = seg->next; cur_seg = &(pcb->unsent); while (*cur_seg && 80323e2: 6833 ldr r3, [r6, #0] 80323e4: b92b cbnz r3, 80323f2 TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); } seg->next = *cur_seg; 80323e6: 6833 ldr r3, [r6, #0] 80323e8: 602b str r3, [r5, #0] *cur_seg = seg; 80323ea: 6035 str r5, [r6, #0] #if TCP_OVERSIZE if (seg->next == NULL) { 80323ec: 682b ldr r3, [r5, #0] 80323ee: b97b cbnz r3, 8032410 80323f0: e00c b.n 803240c 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))) { 80323f2: 68db ldr r3, [r3, #12] 80323f4: 6858 ldr r0, [r3, #4] 80323f6: f7fc fbd7 bl 802eba8 80323fa: 68eb ldr r3, [r5, #12] 80323fc: 4607 mov r7, r0 80323fe: 6858 ldr r0, [r3, #4] 8032400: f7fc fbd2 bl 802eba8 8032404: 1a38 subs r0, r7, r0 /* Keep the unsent queue sorted. */ seg = pcb->unacked; pcb->unacked = seg->next; cur_seg = &(pcb->unsent); while (*cur_seg && 8032406: 2800 cmp r0, #0 8032408: dbea blt.n 80323e0 803240a: e7ec b.n 80323e6 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; 803240c: f8a4 306a strh.w r3, [r4, #106] ; 0x6a } #endif /* TCP_OVERSIZE */ ++pcb->nrtx; 8032410: f894 3046 ldrb.w r3, [r4, #70] ; 0x46 8032414: 3301 adds r3, #1 8032416: f884 3046 strb.w r3, [r4, #70] ; 0x46 /* Don't take any rtt measurements after retransmitting. */ pcb->rttest = 0; 803241a: 2300 movs r3, #0 803241c: 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. */ } 803241e: 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(); 8032422: f002 bc21 b.w 8034c68 8032426: bdf8 pop {r3, r4, r5, r6, r7, pc} 08032428 : * @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)) { 8032428: 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) { 803242a: b510 push {r4, lr} 803242c: 4604 mov r4, r0 if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) { 803242e: b333 cbz r3, 803247e 8032430: 7f83 ldrb r3, [r0, #30] 8032432: f003 0304 and.w r3, r3, #4 8032436: b2db uxtb r3, r3 8032438: bb0b cbnz r3, 803247e 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); 803243a: f7ff ffc7 bl 80323cc /* Set ssthresh to half of the minimum of the current * cwnd and the advertised window */ if (pcb->cwnd > pcb->snd_wnd) { 803243e: f8b4 304c ldrh.w r3, [r4, #76] ; 0x4c 8032442: f8b4 2060 ldrh.w r2, [r4, #96] ; 0x60 8032446: 4293 cmp r3, r2 8032448: d903 bls.n 8032452 pcb->ssthresh = pcb->snd_wnd / 2; 803244a: 0852 lsrs r2, r2, #1 803244c: f8a4 204e strh.w r2, [r4, #78] ; 0x4e 8032450: e002 b.n 8032458 } else { pcb->ssthresh = pcb->cwnd / 2; 8032452: 085b lsrs r3, r3, #1 8032454: f8a4 304e strh.w r3, [r4, #78] ; 0x4e } /* The minimum value for ssthresh should be 2 MSS */ if (pcb->ssthresh < 2*pcb->mss) { 8032458: 8ee3 ldrh r3, [r4, #54] ; 0x36 803245a: f8b4 104e ldrh.w r1, [r4, #78] ; 0x4e 803245e: 005a lsls r2, r3, #1 8032460: 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; 8032462: bfb8 it lt 8032464: f8a4 204e strhlt.w r2, [r4, #78] ; 0x4e } pcb->cwnd = pcb->ssthresh + 3 * pcb->mss; 8032468: f8b4 204e ldrh.w r2, [r4, #78] ; 0x4e 803246c: 2103 movs r1, #3 803246e: fb01 2303 mla r3, r1, r3, r2 8032472: f8a4 304c strh.w r3, [r4, #76] ; 0x4c pcb->flags |= TF_INFR; 8032476: 7fa3 ldrb r3, [r4, #30] 8032478: f043 0304 orr.w r3, r3, #4 803247c: 77a3 strb r3, [r4, #30] 803247e: bd10 pop {r4, pc} 08032480 : * * @param pcb the tcp_pcb for which to send a keepalive packet */ void tcp_keepalive(struct tcp_pcb *pcb) { 8032480: b537 push {r0, r1, r2, r4, r5, lr} 8032482: 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)); 8032484: 6d00 ldr r0, [r0, #80] ; 0x50 8032486: 3801 subs r0, #1 8032488: f7fc fb8c bl 802eba4 803248c: 2100 movs r1, #0 803248e: 4602 mov r2, r0 8032490: 4620 mov r0, r4 8032492: f7ff fbd9 bl 8031c48 if(p == NULL) { 8032496: 4605 mov r5, r0 8032498: b178 cbz r0, 80324ba /* 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); 803249a: 2200 movs r2, #0 803249c: f04f 0e06 mov.w lr, #6 80324a0: e88d 4004 stmia.w sp, {r2, lr} 80324a4: 7aa3 ldrb r3, [r4, #10] 80324a6: 4621 mov r1, r4 80324a8: 1d22 adds r2, r4, #4 80324aa: f000 feaf bl 803320c #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 80324ae: 4628 mov r0, r5 LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: seqno %"U32_F" ackno %"U32_F".\n", pcb->snd_nxt - 1, pcb->rcv_nxt)); } 80324b0: b003 add sp, #12 80324b2: 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); 80324b6: f7fd bca9 b.w 802fe0c LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: seqno %"U32_F" ackno %"U32_F".\n", pcb->snd_nxt - 1, pcb->rcv_nxt)); } 80324ba: b003 add sp, #12 80324bc: bd30 pop {r4, r5, pc} 080324be : * * @param pcb the tcp_pcb for which to send a zero-window probe packet */ void tcp_zero_window_probe(struct tcp_pcb *pcb) { 80324be: 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; 80324c2: 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) { 80324c4: 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) { 80324c6: b914 cbnz r4, 80324ce seg = pcb->unsent; 80324c8: 6ec4 ldr r4, [r0, #108] ; 0x6c } if(seg == NULL) { 80324ca: 2c00 cmp r4, #0 80324cc: d042 beq.n 8032554 return; } is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); 80324ce: 68e3 ldr r3, [r4, #12] 80324d0: 8998 ldrh r0, [r3, #12] 80324d2: f7fc fb62 bl 802eb9a 80324d6: f010 0001 ands.w r0, r0, #1 80324da: d005 beq.n 80324e8 80324dc: 8921 ldrh r1, [r4, #8] 80324de: f1d1 0101 rsbs r1, r1, #1 80324e2: bf38 it cc 80324e4: 2100 movcc r1, #0 80324e6: e000 b.n 80324ea 80324e8: 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); 80324ea: 68e3 ldr r3, [r4, #12] } if(seg == NULL) { return; } is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); 80324ec: 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); 80324f0: 4628 mov r0, r5 80324f2: f081 0101 eor.w r1, r1, #1 80324f6: 685a ldr r2, [r3, #4] 80324f8: f7ff fba6 bl 8031c48 if(p == NULL) { 80324fc: 4606 mov r6, r0 80324fe: 2800 cmp r0, #0 8032500: d028 beq.n 8032554 LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n")); return; } tcphdr = (struct tcp_hdr *)p->payload; 8032502: 6847 ldr r7, [r0, #4] if (is_fin) { 8032504: f1b8 0f00 cmp.w r8, #0 8032508: d009 beq.n 803251e /* FIN segment, no data */ TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN); 803250a: 89bc ldrh r4, [r7, #12] 803250c: 2011 movs r0, #17 803250e: f7fc fb3f bl 802eb90 8032512: f424 547c bic.w r4, r4, #16128 ; 0x3f00 8032516: b2a4 uxth r4, r4 8032518: 4320 orrs r0, r4 803251a: 81b8 strh r0, [r7, #12] 803251c: e009 b.n 8032532 /* 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); 803251e: 6860 ldr r0, [r4, #4] 8032520: 8923 ldrh r3, [r4, #8] 8032522: 8902 ldrh r2, [r0, #8] 8032524: 1ad3 subs r3, r2, r3 8032526: f107 0114 add.w r1, r7, #20 803252a: 2201 movs r2, #1 803252c: b29b uxth r3, r3 803252e: f7fd fdbb bl 80300a8 /* 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); 8032532: 2200 movs r2, #0 8032534: f04f 0c06 mov.w ip, #6 8032538: e88d 1004 stmia.w sp, {r2, ip} 803253c: 7aab ldrb r3, [r5, #10] 803253e: 4630 mov r0, r6 8032540: 4629 mov r1, r5 8032542: 1d2a adds r2, r5, #4 8032544: f000 fe62 bl 803320c #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 8032548: 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)); } 803254a: b002 add sp, #8 803254c: 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); 8032550: f7fd bc5c b.w 802fe0c LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: seqno %"U32_F " ackno %"U32_F".\n", pcb->snd_nxt - 1, pcb->rcv_nxt)); } 8032554: b002 add sp, #8 8032556: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 803255a: 0000 movs r0, r0 0803255c : 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 */ { 803255c: b570 push {r4, r5, r6, lr} 803255e: 4604 mov r4, r0 struct sys_timeo *timeout, *t; timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); 8032560: 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 */ { 8032562: 460d mov r5, r1 8032564: 4616 mov r6, r2 struct sys_timeo *timeout, *t; timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); 8032566: f7fd fb31 bl 802fbcc if (timeout == NULL) { 803256a: 4603 mov r3, r0 803256c: b308 cbz r0, 80325b2 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) { 803256e: 4911 ldr r1, [pc, #68] ; (80325b4 ) 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; 8032570: 2200 movs r2, #0 timeout->h = handler; timeout->arg = arg; timeout->time = msecs; 8032572: 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) { 8032576: 680a ldr r2, [r1, #0] 8032578: b902 cbnz r2, 803257c 803257a: e005 b.n 8032588 next_timeout = timeout; return; } if (next_timeout->time > msecs) { 803257c: 6850 ldr r0, [r2, #4] 803257e: 42a0 cmp r0, r4 8032580: d90c bls.n 803259c next_timeout->time -= msecs; 8032582: 1b04 subs r4, r0, r4 8032584: 6054 str r4, [r2, #4] timeout->next = next_timeout; 8032586: 601a str r2, [r3, #0] next_timeout = timeout; 8032588: 600b str r3, [r1, #0] 803258a: 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) { 803258c: 684c ldr r4, [r1, #4] 803258e: 4284 cmp r4, r0 8032590: d80c bhi.n 80325ac 8032592: 460a mov r2, r1 8032594: e002 b.n 803259c if (t->next != NULL) { t->next->time -= timeout->time; } timeout->next = t->next; 8032596: 6019 str r1, [r3, #0] t->next = timeout; 8032598: 6013 str r3, [r2, #0] break; 803259a: 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; 803259c: 6851 ldr r1, [r2, #4] 803259e: 6858 ldr r0, [r3, #4] 80325a0: 1a40 subs r0, r0, r1 if (t->next == NULL || t->next->time > timeout->time) { 80325a2: 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; 80325a4: 6058 str r0, [r3, #4] if (t->next == NULL || t->next->time > timeout->time) { 80325a6: 2900 cmp r1, #0 80325a8: d1f0 bne.n 803258c 80325aa: e7f4 b.n 8032596 if (t->next != NULL) { t->next->time -= timeout->time; 80325ac: 1a20 subs r0, r4, r0 80325ae: 6048 str r0, [r1, #4] 80325b0: e7f1 b.n 8032596 80325b2: bd70 pop {r4, r5, r6, pc} 80325b4: 2000c410 .word 0x2000c410 080325b8 : } #endif /* LWIP_DNS */ /** Initialize this module */ void sys_timeouts_init(void) { 80325b8: 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); 80325ba: 2200 movs r2, #0 80325bc: f241 3088 movw r0, #5000 ; 0x1388 80325c0: 4908 ldr r1, [pc, #32] ; (80325e4 ) 80325c2: f7ff ffcb bl 803255c #endif /* LWIP_ARP */ #if LWIP_DHCP sys_timeout(DHCP_COARSE_TIMER_MSECS, dhcp_timer_coarse, NULL); 80325c6: 2200 movs r2, #0 80325c8: f64e 2060 movw r0, #60000 ; 0xea60 80325cc: 4906 ldr r1, [pc, #24] ; (80325e8 ) 80325ce: f7ff ffc5 bl 803255c sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL); 80325d2: 4906 ldr r1, [pc, #24] ; (80325ec ) 80325d4: f44f 70fa mov.w r0, #500 ; 0x1f4 80325d8: 2200 movs r2, #0 #if NO_SYS /* Initialise timestamp for sys_check_timeouts */ timeouts_last_time = sys_now(); #endif } 80325da: 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); 80325de: f7ff bfbd b.w 803255c 80325e2: bf00 nop 80325e4: 08032629 .word 0x08032629 80325e8: 0803260d .word 0x0803260d 80325ec: 080325f1 .word 0x080325f1 080325f0 : * * @param arg unused argument */ static void dhcp_timer_fine(void *arg) { 80325f0: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: dhcp_fine_tmr()\n")); dhcp_fine_tmr(); 80325f2: f7fd f8a7 bl 802f744 sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL); 80325f6: 4904 ldr r1, [pc, #16] ; (8032608 ) 80325f8: f44f 70fa mov.w r0, #500 ; 0x1f4 80325fc: 2200 movs r2, #0 } 80325fe: 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); 8032602: f7ff bfab b.w 803255c 8032606: bf00 nop 8032608: 080325f1 .word 0x080325f1 0803260c : * * @param arg unused argument */ static void dhcp_timer_coarse(void *arg) { 803260c: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: dhcp_coarse_tmr()\n")); dhcp_coarse_tmr(); 803260e: f7fd f817 bl 802f640 sys_timeout(DHCP_COARSE_TIMER_MSECS, dhcp_timer_coarse, NULL); 8032612: 4904 ldr r1, [pc, #16] ; (8032624 ) 8032614: f64e 2060 movw r0, #60000 ; 0xea60 8032618: 2200 movs r2, #0 } 803261a: 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); 803261e: f7ff bf9d b.w 803255c 8032622: bf00 nop 8032624: 0803260d .word 0x0803260d 08032628 : * * @param arg unused argument */ static void arp_timer(void *arg) { 8032628: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: etharp_tmr()\n")); etharp_tmr(); 803262a: f004 fd25 bl 8037078 sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 803262e: 4904 ldr r1, [pc, #16] ; (8032640 ) 8032630: f241 3088 movw r0, #5000 ; 0x1388 8032634: 2200 movs r2, #0 } 8032636: 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); 803263a: f7ff bf8f b.w 803255c 803263e: bf00 nop 8032640: 08032629 .word 0x08032629 08032644 : */ void tcp_timer_needed(void) { /* timer is off but needed again? */ if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) { 8032644: 4b08 ldr r3, [pc, #32] ; (8032668 ) 8032646: 681b ldr r3, [r3, #0] 8032648: b96b cbnz r3, 8032666 803264a: 4b08 ldr r3, [pc, #32] ; (803266c ) 803264c: 681b ldr r3, [r3, #0] 803264e: b913 cbnz r3, 8032656 8032650: 4b07 ldr r3, [pc, #28] ; (8032670 ) 8032652: 681b ldr r3, [r3, #0] 8032654: b13b cbz r3, 8032666 /* enable and start timer */ tcpip_tcp_timer_active = 1; 8032656: 4b04 ldr r3, [pc, #16] ; (8032668 ) sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 8032658: 4906 ldr r1, [pc, #24] ; (8032674 ) 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; 803265a: 2201 movs r2, #1 803265c: 601a str r2, [r3, #0] sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 803265e: 20fa movs r0, #250 ; 0xfa 8032660: 2200 movs r2, #0 8032662: f7ff bf7b b.w 803255c 8032666: 4770 bx lr 8032668: 2000c40c .word 0x2000c40c 803266c: 2000f6bc .word 0x2000f6bc 8032670: 2000f6d0 .word 0x2000f6d0 8032674: 08032679 .word 0x08032679 08032678 : * * @param arg unused argument */ static void tcpip_tcp_timer(void *arg) { 8032678: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); /* call TCP timer handler */ tcp_tmr(); 803267a: f7fe fa59 bl 8030b30 /* timer still needed? */ if (tcp_active_pcbs || tcp_tw_pcbs) { 803267e: 4b08 ldr r3, [pc, #32] ; (80326a0 ) 8032680: 681b ldr r3, [r3, #0] 8032682: b913 cbnz r3, 803268a 8032684: 4b07 ldr r3, [pc, #28] ; (80326a4 ) 8032686: 681b ldr r3, [r3, #0] 8032688: b133 cbz r3, 8032698 /* restart timer */ sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 803268a: 4907 ldr r1, [pc, #28] ; (80326a8 ) 803268c: 20fa movs r0, #250 ; 0xfa 803268e: 2200 movs r2, #0 } else { /* disable timer */ tcpip_tcp_timer_active = 0; } } 8032690: 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); 8032694: f7ff bf62 b.w 803255c } else { /* disable timer */ tcpip_tcp_timer_active = 0; 8032698: 4a04 ldr r2, [pc, #16] ; (80326ac ) 803269a: 6013 str r3, [r2, #0] 803269c: bd08 pop {r3, pc} 803269e: bf00 nop 80326a0: 2000f6bc .word 0x2000f6bc 80326a4: 2000f6d0 .word 0x2000f6d0 80326a8: 08032679 .word 0x08032679 80326ac: 2000c40c .word 0x2000c40c 080326b0 : void sys_untimeout(sys_timeout_handler handler, void *arg) { struct sys_timeo *prev_t, *t; if (next_timeout == NULL) { 80326b0: 4b10 ldr r3, [pc, #64] ; (80326f4 ) 80326b2: 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) { 80326b4: b510 push {r4, lr} struct sys_timeo *prev_t, *t; if (next_timeout == NULL) { 80326b6: b1e3 cbz r3, 80326f2 80326b8: 2200 movs r2, #0 80326ba: e000 b.n 80326be return; } for (t = next_timeout, prev_t = NULL; t != NULL; prev_t = t, t = t->next) { 80326bc: 4623 mov r3, r4 if ((t->h == handler) && (t->arg == arg)) { 80326be: 689c ldr r4, [r3, #8] 80326c0: 4284 cmp r4, r0 80326c2: d112 bne.n 80326ea 80326c4: 68dc ldr r4, [r3, #12] 80326c6: 428c cmp r4, r1 80326c8: d10f bne.n 80326ea 80326ca: 6819 ldr r1, [r3, #0] /* We have a match */ /* Unlink from previous in list */ if (prev_t == NULL) { 80326cc: b902 cbnz r2, 80326d0 next_timeout = t->next; 80326ce: 4a09 ldr r2, [pc, #36] ; (80326f4 ) } else { prev_t->next = t->next; 80326d0: 6011 str r1, [r2, #0] } /* If not the last one, add time of this one back to next */ if (t->next != NULL) { 80326d2: 681a ldr r2, [r3, #0] 80326d4: b11a cbz r2, 80326de t->next->time += t->time; 80326d6: 6850 ldr r0, [r2, #4] 80326d8: 6859 ldr r1, [r3, #4] 80326da: 1841 adds r1, r0, r1 80326dc: 6051 str r1, [r2, #4] } memp_free(MEMP_SYS_TIMEOUT, t); 80326de: 2009 movs r0, #9 80326e0: 4619 mov r1, r3 return; } } return; } 80326e2: 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); 80326e6: f7fd ba87 b.w 802fbf8 if (next_timeout == NULL) { return; } for (t = next_timeout, prev_t = NULL; t != NULL; prev_t = t, t = t->next) { 80326ea: 681c ldr r4, [r3, #0] 80326ec: 461a mov r2, r3 80326ee: 2c00 cmp r4, #0 80326f0: d1e4 bne.n 80326bc 80326f2: bd10 pop {r4, pc} 80326f4: 2000c410 .word 0x2000c410 080326f8 : * @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) { 80326f8: 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) { 80326fc: 4e18 ldr r6, [pc, #96] ; (8032760 ) * @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) { 80326fe: 4604 mov r4, r0 8032700: 460d mov r5, r1 8032702: 4637 mov r7, r6 struct sys_timeo *tmptimeout; sys_timeout_handler handler; void *arg; again: if (!next_timeout) { 8032704: 6832 ldr r2, [r6, #0] 8032706: b92a cbnz r2, 8032714 time_needed = sys_arch_mbox_fetch(mbox, msg, 0); 8032708: 4620 mov r0, r4 803270a: 4629 mov r1, r5 } else { next_timeout->time = 0; } } } } 803270c: 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); 8032710: f005 b8fc b.w 803790c } else { if (next_timeout->time > 0) { 8032714: 6852 ldr r2, [r2, #4] 8032716: b96a cbnz r2, 8032734 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; 8032718: 6839 ldr r1, [r7, #0] next_timeout = tmptimeout->next; 803271a: 680a ldr r2, [r1, #0] handler = tmptimeout->h; 803271c: 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; 8032720: 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); 8032722: 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; 8032724: 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); 8032728: f7fd fa66 bl 802fbf8 if (handler != NULL) { 803272c: f1b8 0f00 cmp.w r8, #0 8032730: d0e8 beq.n 8032704 8032732: e006 b.n 8032742 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); 8032734: 4620 mov r0, r4 8032736: 4629 mov r1, r5 8032738: f005 f8e8 bl 803790c } else { time_needed = SYS_ARCH_TIMEOUT; } if (time_needed == SYS_ARCH_TIMEOUT) { 803273c: 1c43 adds r3, r0, #1 803273e: d0eb beq.n 8032718 8032740: e002 b.n 8032748 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); 8032742: 4648 mov r0, r9 8032744: 47c0 blx r8 8032746: e7dd b.n 8032704 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) { 8032748: 4b05 ldr r3, [pc, #20] ; (8032760 ) 803274a: 681b ldr r3, [r3, #0] 803274c: 6859 ldr r1, [r3, #4] 803274e: 4288 cmp r0, r1 next_timeout->time -= time_needed; 8032750: bf34 ite cc 8032752: ebc0 0201 rsbcc r2, r0, r1 } else { next_timeout->time = 0; 8032756: 2200 movcs r2, #0 8032758: 605a str r2, [r3, #4] 803275a: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 803275e: bf00 nop 8032760: 2000c410 .word 0x2000c410 08032764 : /** * Initialize this module. */ void udp_init(void) { 8032764: 4770 bx lr 8032766: 0000 movs r0, r0 08032768 : * @param inp network interface on which the datagram was received. * */ void udp_input(struct pbuf *p, struct netif *inp) { 8032768: 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; 803276c: 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))) { 8032770: 8903 ldrh r3, [r0, #8] * @param inp network interface on which the datagram was received. * */ void udp_input(struct pbuf *p, struct netif *inp) { 8032772: 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))) { 8032774: f899 1000 ldrb.w r1, [r9] 8032778: f001 010f and.w r1, r1, #15 803277c: 1c8a adds r2, r1, #2 803277e: 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) { 8032782: b085 sub sp, #20 8032784: 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))) { 8032786: db05 blt.n 8032794 8032788: 0089 lsls r1, r1, #2 803278a: 4249 negs r1, r1 803278c: f7fd fb13 bl 802fdb6 8032790: 4683 mov fp, r0 8032792: b110 cbz r0, 803279a /* 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(); 8032794: f002 fa90 bl 8034cb8 8032798: e096 b.n 80328c8 } udphdr = (struct udp_hdr *)p->payload; /* is broadcast packet ? */ broadcast = ip_addr_isbroadcast(¤t_iphdr_dest, inp); 803279a: f8df a150 ldr.w sl, [pc, #336] ; 80328ec snmp_inc_udpinerrors(); pbuf_free(p); goto end; } udphdr = (struct udp_hdr *)p->payload; 803279e: 686c ldr r4, [r5, #4] /* is broadcast packet ? */ broadcast = ip_addr_isbroadcast(¤t_iphdr_dest, inp); 80327a0: f8da 0000 ldr.w r0, [sl] 80327a4: 4631 mov r1, r6 80327a6: f000 faed bl 8032d84 80327aa: 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); 80327ac: 8820 ldrh r0, [r4, #0] 80327ae: f7fc f9f4 bl 802eb9a 80327b2: 4607 mov r7, r0 dest = ntohs(udphdr->dest); 80327b4: 8860 ldrh r0, [r4, #2] 80327b6: f7fc f9f0 bl 802eb9a #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) { 80327ba: 2844 cmp r0, #68 ; 0x44 80327bc: d10f bne.n 80327de /* all packets for DHCP_CLIENT_PORT not coming from DHCP_SERVER_PORT are dropped! */ if (src == DHCP_SERVER_PORT) { 80327be: 2f43 cmp r7, #67 ; 0x43 80327c0: d14f bne.n 8032862 if ((inp->dhcp != NULL) && (inp->dhcp->pcb != NULL)) { 80327c2: 6a33 ldr r3, [r6, #32] 80327c4: 2b00 cmp r3, #0 80327c6: d04c beq.n 8032862 80327c8: 685c ldr r4, [r3, #4] 80327ca: 2c00 cmp r4, #0 80327cc: d049 beq.n 8032862 /* 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) || 80327ce: 6863 ldr r3, [r4, #4] 80327d0: 2b00 cmp r3, #0 80327d2: d04e beq.n 8032872 ip_addr_cmp(&(inp->dhcp->pcb->remote_ip), ¤t_iphdr_src))) { 80327d4: 4a43 ldr r2, [pc, #268] ; (80328e4 ) 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) || 80327d6: 6812 ldr r2, [r2, #0] 80327d8: 4293 cmp r3, r2 80327da: d142 bne.n 8032862 80327dc: e049 b.n 8032872 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) { 80327de: 4b42 ldr r3, [pc, #264] ; (80328e8 ) /* 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) || 80327e0: 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) { 80327e4: 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))) { 80327e8: 4b3e ldr r3, [pc, #248] ; (80328e4 ) 80327ea: 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) { 80327ec: 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))) { 80327ee: 9303 str r3, [sp, #12] } } } else #endif /* LWIP_DHCP */ { prev = NULL; 80327f0: 4659 mov r1, fp local_match = 0; uncon_pcb = NULL; 80327f2: 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) { 80327f4: e032 b.n 803285c 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) { 80327f6: 8a62 ldrh r2, [r4, #18] 80327f8: 4282 cmp r2, r0 80327fa: d12d bne.n 8032858 80327fc: 6822 ldr r2, [r4, #0] if ( 80327fe: f1b8 0f00 cmp.w r8, #0 8032802: d100 bne.n 8032806 (!broadcast && ip_addr_isany(&pcb->local_ip)) || 8032804: b15a cbz r2, 803281e 8032806: 4552 cmp r2, sl 8032808: d009 beq.n 803281e ip_addr_cmp(&(pcb->local_ip), ¤t_iphdr_dest) || 803280a: f1b8 0f00 cmp.w r8, #0 803280e: d023 beq.n 8032858 (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) || 8032810: b12a cbz r2, 803281e ip_addr_netcmp(&pcb->local_ip, ip_current_dest_addr(), &inp->netmask)))) { 8032812: ea8a 0b02 eor.w fp, sl, r2 8032816: 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) || 8032818: ea1b 0f02 tst.w fp, r2 803281c: d11c bne.n 8032858 ip_addr_netcmp(&pcb->local_ip, ip_current_dest_addr(), &inp->netmask)))) { #endif /* IP_SOF_BROADCAST_RECV */ local_match = 1; if ((uncon_pcb == NULL) && 803281e: 2b00 cmp r3, #0 8032820: d158 bne.n 80328d4 ((pcb->flags & UDP_FLAGS_CONNECTED) == 0)) { 8032822: 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) && 8032824: f003 0304 and.w r3, r3, #4 8032828: b2db uxtb r3, r3 803282a: 2b00 cmp r3, #0 803282c: bf0c ite eq 803282e: 4623 moveq r3, r4 8032830: 2300 movne r3, #0 8032832: e04f b.n 80328d4 } } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && (pcb->remote_port == src) && (ip_addr_isany(&pcb->remote_ip) || 8032834: f8d4 b004 ldr.w fp, [r4, #4] 8032838: f1bb 0f00 cmp.w fp, #0 803283c: d101 bne.n 8032842 ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src))) { /* the first fully matching PCB */ if (prev != NULL) { 803283e: b921 cbnz r1, 803284a 8032840: e017 b.n 8032872 } } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && (pcb->remote_port == src) && (ip_addr_isany(&pcb->remote_ip) || 8032842: 9a03 ldr r2, [sp, #12] 8032844: 4593 cmp fp, r2 8032846: d107 bne.n 8032858 8032848: e7f9 b.n 803283e 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; 803284a: 68e3 ldr r3, [r4, #12] 803284c: 60cb str r3, [r1, #12] pcb->next = udp_pcbs; udp_pcbs = pcb; 803284e: 4b26 ldr r3, [pc, #152] ; (80328e8 ) /* 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; 8032850: f8c4 c00c str.w ip, [r4, #12] udp_pcbs = pcb; 8032854: 601c str r4, [r3, #0] 8032856: e00c b.n 8032872 8032858: 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) { 803285a: 68e4 ldr r4, [r4, #12] 803285c: 2c00 cmp r4, #0 803285e: d1ca bne.n 80327f6 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)) { 8032860: b933 cbnz r3, 8032870 8032862: 4b22 ldr r3, [pc, #136] ; (80328ec ) 8032864: 6872 ldr r2, [r6, #4] 8032866: 681b ldr r3, [r3, #0] 8032868: 429a cmp r2, r3 803286a: d12d bne.n 80328c8 803286c: 2400 movs r4, #0 803286e: e000 b.n 8032872 8032870: 461c mov r4, r3 goto end; } } #endif /* CHECKSUM_CHECK_UDP */ } if(pbuf_header(p, -UDP_HLEN)) { 8032872: 4628 mov r0, r5 8032874: f06f 0107 mvn.w r1, #7 8032878: f7fd fa9d bl 802fdb6 803287c: 2800 cmp r0, #0 803287e: d189 bne.n 8032794 UDP_STATS_INC(udp.drop); snmp_inc_udpinerrors(); pbuf_free(p); goto end; } if (pcb != NULL) { 8032880: b154 cbz r4, 8032898 snmp_inc_udpindatagrams(); 8032882: f002 fa09 bl 8034c98 pbuf_header(p, -(s16_t)((IPH_HL(iphdr) * 4) + UDP_HLEN)); } } #endif /* SO_REUSE && SO_REUSE_RXTOALL */ /* callback */ if (pcb->recv != NULL) { 8032886: 69a6 ldr r6, [r4, #24] 8032888: b1f6 cbz r6, 80328c8 /* now the recv function is responsible for freeing p */ pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src); 803288a: 9700 str r7, [sp, #0] 803288c: 69e0 ldr r0, [r4, #28] 803288e: 4b15 ldr r3, [pc, #84] ; (80328e4 ) 8032890: 4621 mov r1, r4 8032892: 462a mov r2, r5 8032894: 47b0 blx r6 8032896: e021 b.n 80328dc 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 && 8032898: f1b8 0f00 cmp.w r8, #0 803289c: d112 bne.n 80328c4 !ip_addr_ismulticast(¤t_iphdr_dest)) { 803289e: 4b13 ldr r3, [pc, #76] ; (80328ec ) 80328a0: 681b ldr r3, [r3, #0] 80328a2: 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 && 80328a6: 2be0 cmp r3, #224 ; 0xe0 80328a8: d00c beq.n 80328c4 !ip_addr_ismulticast(¤t_iphdr_dest)) { /* move payload pointer back to ip header */ pbuf_header(p, (IPH_HL(iphdr) * 4) + UDP_HLEN); 80328aa: f899 1000 ldrb.w r1, [r9] 80328ae: f001 010f and.w r1, r1, #15 80328b2: 3102 adds r1, #2 80328b4: 0089 lsls r1, r1, #2 80328b6: 4628 mov r0, r5 80328b8: f7fd fa7d bl 802fdb6 LWIP_ASSERT("p->payload == iphdr", (p->payload == iphdr)); icmp_dest_unreach(p, ICMP_DUR_PORT); 80328bc: 4628 mov r0, r5 80328be: 2103 movs r1, #3 80328c0: f000 f9d2 bl 8032c68 } #endif /* LWIP_ICMP */ UDP_STATS_INC(udp.proterr); UDP_STATS_INC(udp.drop); snmp_inc_udpnoports(); 80328c4: f002 f9f0 bl 8034ca8 pbuf_free(p); 80328c8: 4628 mov r0, r5 } else { pbuf_free(p); } end: PERF_STOP("udp_input"); } 80328ca: b005 add sp, #20 80328cc: 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); 80328d0: f7fd ba9c b.w 802fe0c uncon_pcb = pcb; } } } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && 80328d4: 8aa2 ldrh r2, [r4, #20] 80328d6: 42ba cmp r2, r7 80328d8: d1be bne.n 8032858 80328da: e7ab b.n 8032834 } else { pbuf_free(p); } end: PERF_STOP("udp_input"); } 80328dc: b005 add sp, #20 80328de: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80328e2: bf00 nop 80328e4: 2000f6dc .word 0x2000f6dc 80328e8: 2000f6d8 .word 0x2000f6d8 80328ec: 2000f6e4 .word 0x2000f6e4 080328f0 : * * @see udp_disconnect() */ err_t udp_bind(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 80328f0: 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) { 80328f2: 4b25 ldr r3, [pc, #148] ; (8032988 ) * * @see udp_disconnect() */ err_t udp_bind(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 80328f4: 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) { 80328f6: 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; 80328f8: 2500 movs r5, #0 /* Check for double bind and rebind of the same pcb */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 80328fa: 4603 mov r3, r0 80328fc: e012 b.n 8032924 /* is this UDP PCB already on active list? */ if (pcb == ipcb) { 80328fe: 429c cmp r4, r3 8032900: d00e beq.n 8032920 !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) && 8032902: 8a5e ldrh r6, [r3, #18] 8032904: 4296 cmp r6, r2 8032906: d10c bne.n 8032922 /* IP address matches, or one is IP_ADDR_ANY? */ (ip_addr_isany(&(ipcb->local_ip)) || 8032908: 681f ldr r7, [r3, #0] 803290a: b90f cbnz r7, 8032910 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; 803290c: 20f8 movs r0, #248 ; 0xf8 803290e: e039 b.n 8032984 /* 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)) || 8032910: 2900 cmp r1, #0 8032912: d0fb beq.n 803290c ip_addr_isany(ipaddr) || 8032914: 680e ldr r6, [r1, #0] 8032916: 2e00 cmp r6, #0 8032918: d0f8 beq.n 803290c 803291a: 42b7 cmp r7, r6 803291c: d101 bne.n 8032922 803291e: e7f5 b.n 803290c /* 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; 8032920: 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) { 8032922: 68db ldr r3, [r3, #12] 8032924: 2b00 cmp r3, #0 8032926: d1ea bne.n 80328fe return ERR_USE; } } } ip_addr_set(&pcb->local_ip, ipaddr); 8032928: b101 cbz r1, 803292c 803292a: 6809 ldr r1, [r1, #0] 803292c: 6021 str r1, [r4, #0] /* no port specified? */ if (port == 0) { 803292e: b9fa cbnz r2, 8032970 8032930: 4b16 ldr r3, [pc, #88] ; (803298c ) 8032932: 881a ldrh r2, [r3, #0] 8032934: f44f 4180 mov.w r1, #16384 ; 0x4000 { u16_t n = 0; struct udp_pcb *pcb; again: if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) { 8032938: f64f 76ff movw r6, #65535 ; 0xffff 803293c: 42b2 cmp r2, r6 803293e: d002 beq.n 8032946 8032940: 3201 adds r2, #1 8032942: b292 uxth r2, r2 8032944: e001 b.n 803294a udp_port = UDP_LOCAL_PORT_RANGE_START; 8032946: f44f 4240 mov.w r2, #49152 ; 0xc000 } /* Check all PCBs. */ for(pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 803294a: 4603 mov r3, r0 803294c: e00a b.n 8032964 if (pcb->local_port == udp_port) { 803294e: 8a5f ldrh r7, [r3, #18] 8032950: 4297 cmp r7, r2 8032952: d106 bne.n 8032962 8032954: 3901 subs r1, #1 8032956: b289 uxth r1, r1 if (++n > (UDP_LOCAL_PORT_RANGE_END - UDP_LOCAL_PORT_RANGE_START)) { 8032958: 2900 cmp r1, #0 803295a: d1ef bne.n 803293c 803295c: 4b0b ldr r3, [pc, #44] ; (803298c ) 803295e: 801a strh r2, [r3, #0] 8032960: e7d4 b.n 803290c 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) { 8032962: 68db ldr r3, [r3, #12] 8032964: 2b00 cmp r3, #0 8032966: d1f2 bne.n 803294e 8032968: 4b08 ldr r3, [pc, #32] ; (803298c ) 803296a: 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) { 803296c: 2a00 cmp r2, #0 803296e: d0cd beq.n 803290c /* 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; 8032970: 8262 strh r2, [r4, #18] snmp_insert_udpidx_tree(pcb); 8032972: 4620 mov r0, r4 8032974: f002 f9b0 bl 8034cd8 /* pcb not active yet? */ if (rebind == 0) { 8032978: b91d cbnz r5, 8032982 /* place the PCB on the active list if not already there */ pcb->next = udp_pcbs; 803297a: 4b03 ldr r3, [pc, #12] ; (8032988 ) 803297c: 681a ldr r2, [r3, #0] udp_pcbs = pcb; 803297e: 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; 8032980: 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; 8032982: 2000 movs r0, #0 } 8032984: b240 sxtb r0, r0 8032986: bdf8 pop {r3, r4, r5, r6, r7, pc} 8032988: 2000f6d8 .word 0x2000f6d8 803298c: 2000071e .word 0x2000071e 08032990 : * @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) { 8032990: e92d 47ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr} 8032994: 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) { 8032996: 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) { 8032998: f8dd 8030 ldr.w r8, [sp, #48] ; 0x30 803299c: 4605 mov r5, r0 803299e: 460e mov r6, r1 80329a0: 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) { 80329a2: b132 cbz r2, 80329b2 return err; } } /* not enough space to add an UDP header to first pbuf in given p chain? */ if (pbuf_header(p, UDP_HLEN)) { 80329a4: 4630 mov r0, r6 80329a6: 2108 movs r1, #8 80329a8: f7fd fa05 bl 802fdb6 80329ac: b940 cbnz r0, 80329c0 80329ae: 4634 mov r4, r6 80329b0: e013 b.n 80329da #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); 80329b2: 4601 mov r1, r0 80329b4: f7ff ff9c bl 80328f0 if (err != ERR_OK) { 80329b8: 4607 mov r7, r0 80329ba: 2800 cmp r0, #0 80329bc: d0f2 beq.n 80329a4 80329be: e044 b.n 8032a4a } /* 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); 80329c0: 2001 movs r0, #1 80329c2: 2108 movs r1, #8 80329c4: 2200 movs r2, #0 80329c6: f7fd fa6e bl 802fea6 /* new header pbuf could not be allocated? */ if (q == NULL) { 80329ca: 4604 mov r4, r0 80329cc: 2800 cmp r0, #0 80329ce: d039 beq.n 8032a44 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) { 80329d0: 8933 ldrh r3, [r6, #8] 80329d2: b113 cbz r3, 80329da /* chain header q in front of given pbuf p (only if p contains data) */ pbuf_chain(q, p); 80329d4: 4631 mov r1, r6 80329d6: f7fd fb14 bl 8030002 } 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); 80329da: 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; 80329dc: 6867 ldr r7, [r4, #4] udphdr->src = htons(pcb->local_port); 80329de: f7fc f8d7 bl 802eb90 80329e2: 8038 strh r0, [r7, #0] udphdr->dest = htons(dst_port); 80329e4: 4648 mov r0, r9 80329e6: f7fc f8d3 bl 802eb90 /* in UDP, 0 checksum means 'no checksum' */ udphdr->chksum = 0x0000; 80329ea: 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); 80329ec: 8078 strh r0, [r7, #2] /* in UDP, 0 checksum means 'no checksum' */ udphdr->chksum = 0x0000; 80329ee: 71bb strb r3, [r7, #6] 80329f0: 71fb strb r3, [r7, #7] } #endif /* LWIP_IGMP */ /* PCB local address is IP_ANY_ADDR? */ if (ip_addr_isany(&pcb->local_ip)) { 80329f2: 682b ldr r3, [r5, #0] 80329f4: b913 cbnz r3, 80329fc /* use outgoing network interface IP address as source address */ src_ip = &(netif->ip_addr); 80329f6: f108 0904 add.w r9, r8, #4 80329fa: e00a b.n 8032a12 } 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))) { 80329fc: f8d8 2004 ldr.w r2, [r8, #4] 8032a00: 4293 cmp r3, r2 8032a02: d005 beq.n 8032a10 /* local_ip doesn't match, drop the packet */ if (q != p) { 8032a04: 42b4 cmp r4, r6 8032a06: d01f beq.n 8032a48 /* free the header pbuf */ pbuf_free(q); 8032a08: 4620 mov r0, r4 8032a0a: f7fd f9ff bl 802fe0c 8032a0e: e01b b.n 8032a48 } #endif /* LWIP_IGMP */ /* PCB local address is IP_ANY_ADDR? */ if (ip_addr_isany(&pcb->local_ip)) { 8032a10: 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); 8032a12: 8920 ldrh r0, [r4, #8] 8032a14: f7fc f8bc bl 802eb90 8032a18: 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); 8032a1a: 7a6a ldrb r2, [r5, #9] 8032a1c: 7aab ldrb r3, [r5, #10] 8032a1e: 9200 str r2, [sp, #0] 8032a20: 2211 movs r2, #17 8032a22: 9201 str r2, [sp, #4] 8032a24: 4649 mov r1, r9 8032a26: 4652 mov r2, sl 8032a28: f8cd 8008 str.w r8, [sp, #8] 8032a2c: 4620 mov r0, r4 8032a2e: f000 fb9d bl 803316c 8032a32: 4607 mov r7, r0 NETIF_SET_HWADDRHINT(netif, NULL); } /* TODO: must this be increased even if error occured? */ snmp_inc_udpoutdatagrams(); 8032a34: f002 f948 bl 8034cc8 /* did we chain a separate header pbuf earlier? */ if (q != p) { 8032a38: 42b4 cmp r4, r6 8032a3a: d006 beq.n 8032a4a /* free the header pbuf */ pbuf_free(q); 8032a3c: 4620 mov r0, r4 8032a3e: f7fd f9e5 bl 802fe0c 8032a42: e002 b.n 8032a4a /* 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; 8032a44: 27ff movs r7, #255 ; 0xff 8032a46: e000 b.n 8032a4a /* free the header pbuf */ pbuf_free(q); q = NULL; /* p is still referenced by the caller, and will live on */ } return ERR_VAL; 8032a48: 27fa movs r7, #250 ; 0xfa /* p is still referenced by the caller, and will live on */ } UDP_STATS_INC(udp.xmit); return err; } 8032a4a: b278 sxtb r0, r7 8032a4c: b004 add sp, #16 8032a4e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 08032a52 : * @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) { 8032a52: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} 8032a54: 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); 8032a56: 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) { 8032a58: 460f mov r7, r1 8032a5a: 4614 mov r4, r2 8032a5c: 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); 8032a5e: f000 fa81 bl 8032f64 #endif /* LWIP_IGMP */ /* no outgoing network interface could be found? */ if (netif == NULL) { 8032a62: b138 cbz r0, 8032a74 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); 8032a64: 9000 str r0, [sp, #0] 8032a66: 4639 mov r1, r7 8032a68: 4628 mov r0, r5 8032a6a: 4622 mov r2, r4 8032a6c: 4633 mov r3, r6 8032a6e: f7ff ff8f bl 8032990 8032a72: e000 b.n 8032a76 /* 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; 8032a74: 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 */ } 8032a76: b240 sxtb r0, r0 8032a78: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 08032a7a : */ 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); 8032a7a: 8a83 ldrh r3, [r0, #20] 8032a7c: 1d02 adds r2, r0, #4 8032a7e: f7ff bfe8 b.w 8032a52 8032a82: 0000 movs r0, r0 08032a84 : * * @see udp_disconnect() */ err_t udp_connect(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 8032a84: b570 push {r4, r5, r6, lr} 8032a86: 4616 mov r6, r2 struct udp_pcb *ipcb; if (pcb->local_port == 0) { 8032a88: 8a42 ldrh r2, [r0, #18] * * @see udp_disconnect() */ err_t udp_connect(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 8032a8a: 4604 mov r4, r0 8032a8c: 460d mov r5, r1 struct udp_pcb *ipcb; if (pcb->local_port == 0) { 8032a8e: b10a cbz r2, 8032a94 if (err != ERR_OK) { return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); 8032a90: b935 cbnz r5, 8032aa0 8032a92: e006 b.n 8032aa2 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); 8032a94: 4601 mov r1, r0 8032a96: f7ff ff2b bl 80328f0 if (err != ERR_OK) { 8032a9a: 2800 cmp r0, #0 8032a9c: d0f8 beq.n 8032a90 8032a9e: e013 b.n 8032ac8 return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); 8032aa0: 682d ldr r5, [r5, #0] pcb->remote_port = port; pcb->flags |= UDP_FLAGS_CONNECTED; 8032aa2: 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) { 8032aa4: 4a09 ldr r2, [pc, #36] ; (8032acc ) if (err != ERR_OK) { return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); 8032aa6: 6065 str r5, [r4, #4] pcb->remote_port = port; pcb->flags |= UDP_FLAGS_CONNECTED; 8032aa8: f043 0304 orr.w r3, r3, #4 8032aac: 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) { 8032aae: 6813 ldr r3, [r2, #0] return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); pcb->remote_port = port; 8032ab0: 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) { 8032ab2: 4618 mov r0, r3 8032ab4: e002 b.n 8032abc if (pcb == ipcb) { 8032ab6: 4284 cmp r4, r0 8032ab8: d005 beq.n 8032ac6 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) { 8032aba: 68c0 ldr r0, [r0, #12] 8032abc: 2800 cmp r0, #0 8032abe: d1fa bne.n 8032ab6 /* already on the list, just return */ return ERR_OK; } } /* PCB not yet on the list, add PCB now */ pcb->next = udp_pcbs; 8032ac0: 60e3 str r3, [r4, #12] udp_pcbs = pcb; 8032ac2: 6014 str r4, [r2, #0] return ERR_OK; 8032ac4: e000 b.n 8032ac8 /* 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; 8032ac6: 2000 movs r0, #0 } /* PCB not yet on the list, add PCB now */ pcb->next = udp_pcbs; udp_pcbs = pcb; return ERR_OK; } 8032ac8: b240 sxtb r0, r0 8032aca: bd70 pop {r4, r5, r6, pc} 8032acc: 2000f6d8 .word 0x2000f6d8 08032ad0 : */ void udp_disconnect(struct udp_pcb *pcb) { /* reset remote address association */ ip_addr_set_any(&pcb->remote_ip); 8032ad0: 2300 movs r3, #0 8032ad2: 6043 str r3, [r0, #4] pcb->remote_port = 0; 8032ad4: 8283 strh r3, [r0, #20] /* mark PCB as unconnected */ pcb->flags &= ~UDP_FLAGS_CONNECTED; 8032ad6: 7c03 ldrb r3, [r0, #16] 8032ad8: f023 0304 bic.w r3, r3, #4 8032adc: 7403 strb r3, [r0, #16] 8032ade: 4770 bx lr 08032ae0 : */ void udp_recv(struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg) { /* remember recv() callback and user data */ pcb->recv = recv; 8032ae0: 6181 str r1, [r0, #24] pcb->recv_arg = recv_arg; 8032ae2: 61c2 str r2, [r0, #28] 8032ae4: 4770 bx lr 8032ae6: 0000 movs r0, r0 08032ae8 : * * @see udp_new() */ void udp_remove(struct udp_pcb *pcb) { 8032ae8: b510 push {r4, lr} 8032aea: 4604 mov r4, r0 struct udp_pcb *pcb2; snmp_delete_udpidx_tree(pcb); 8032aec: f002 f938 bl 8034d60 /* pcb to be removed is first in list? */ if (udp_pcbs == pcb) { 8032af0: 4a0a ldr r2, [pc, #40] ; (8032b1c ) 8032af2: 6813 ldr r3, [r2, #0] 8032af4: 42a3 cmp r3, r4 8032af6: d109 bne.n 8032b0c /* make list start at 2nd pcb */ udp_pcbs = udp_pcbs->next; 8032af8: 68e3 ldr r3, [r4, #12] 8032afa: 6013 str r3, [r2, #0] 8032afc: e008 b.n 8032b10 /* 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) { 8032afe: 68da ldr r2, [r3, #12] 8032b00: b11a cbz r2, 8032b0a 8032b02: 42a2 cmp r2, r4 /* remove pcb from list */ pcb2->next = pcb->next; 8032b04: bf04 itt eq 8032b06: 68e2 ldreq r2, [r4, #12] 8032b08: 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) { 8032b0a: 68db ldr r3, [r3, #12] 8032b0c: 2b00 cmp r3, #0 8032b0e: d1f6 bne.n 8032afe /* remove pcb from list */ pcb2->next = pcb->next; } } } memp_free(MEMP_UDP_PCB, pcb); 8032b10: 2001 movs r0, #1 8032b12: 4621 mov r1, r4 } 8032b14: e8bd 4010 ldmia.w sp!, {r4, lr} /* remove pcb from list */ pcb2->next = pcb->next; } } } memp_free(MEMP_UDP_PCB, pcb); 8032b18: f7fd b86e b.w 802fbf8 8032b1c: 2000f6d8 .word 0x2000f6d8 08032b20 : * * @see udp_remove() */ struct udp_pcb * udp_new(void) { 8032b20: b510 push {r4, lr} struct udp_pcb *pcb; pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB); 8032b22: 2001 movs r0, #1 8032b24: f7fd f852 bl 802fbcc /* could allocate UDP PCB? */ if (pcb != NULL) { 8032b28: 4604 mov r4, r0 8032b2a: b128 cbz r0, 8032b38 /* 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)); 8032b2c: 2100 movs r1, #0 8032b2e: 2220 movs r2, #32 8032b30: f7ee ffe6 bl 8021b00 pcb->ttl = UDP_TTL; 8032b34: 23ff movs r3, #255 ; 0xff 8032b36: 72a3 strb r3, [r4, #10] } return pcb; } 8032b38: 4620 mov r0, r4 8032b3a: bd10 pop {r4, pc} 08032b3c : * @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) { 8032b3c: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 8032b40: 4604 mov r4, r0 8032b42: b085 sub sp, #20 8032b44: 460f mov r7, r1 struct icmp_echo_hdr *iecho; struct ip_hdr *iphdr; s16_t hlen; ICMP_STATS_INC(icmp.recv); snmp_inc_icmpinmsgs(); 8032b46: f002 f837 bl 8034bb8 iphdr = (struct ip_hdr *)p->payload; 8032b4a: 6865 ldr r5, [r4, #4] hlen = IPH_HL(iphdr) * 4; 8032b4c: f895 8000 ldrb.w r8, [r5] 8032b50: f008 080f and.w r8, r8, #15 8032b54: ea4f 0888 mov.w r8, r8, lsl #2 if (pbuf_header(p, -hlen) || (p->tot_len < sizeof(u16_t)*2)) { 8032b58: f1c8 0900 rsb r9, r8, #0 8032b5c: 4620 mov r0, r4 8032b5e: fa0f f189 sxth.w r1, r9 8032b62: f7fd f928 bl 802fdb6 8032b66: 2800 cmp r0, #0 8032b68: d172 bne.n 8032c50 8032b6a: 8923 ldrh r3, [r4, #8] 8032b6c: 2b03 cmp r3, #3 8032b6e: d96f bls.n 8032c50 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short ICMP (%"U16_F" bytes) received\n", p->tot_len)); goto lenerr; } type = *((u8_t *)p->payload); 8032b70: 6863 ldr r3, [r4, #4] #ifdef LWIP_DEBUG code = *(((u8_t *)p->payload)+1); #endif /* LWIP_DEBUG */ switch (type) { 8032b72: 781b ldrb r3, [r3, #0] 8032b74: 2b08 cmp r3, #8 8032b76: d165 bne.n 8032c44 #if !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING { int accepted = 1; #if !LWIP_MULTICAST_PING /* multicast destination address? */ if (ip_addr_ismulticast(¤t_iphdr_dest)) { 8032b78: 4b39 ldr r3, [pc, #228] ; (8032c60 ) 8032b7a: 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)) { 8032b7c: 4639 mov r1, r7 8032b7e: 4630 mov r0, r6 8032b80: f000 f900 bl 8032d84 8032b84: 2800 cmp r0, #0 8032b86: d15d bne.n 8032c44 #if !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING { int accepted = 1; #if !LWIP_MULTICAST_PING /* multicast destination address? */ if (ip_addr_ismulticast(¤t_iphdr_dest)) { 8032b88: 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) { 8032b8c: 2ee0 cmp r6, #224 ; 0xe0 8032b8e: d100 bne.n 8032b92 8032b90: e058 b.n 8032c44 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)) { 8032b92: 8923 ldrh r3, [r4, #8] 8032b94: 2b07 cmp r3, #7 8032b96: d95b bls.n 8032c50 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: bad ICMP echo received\n")); goto lenerr; } if (inet_chksum_pbuf(p) != 0) { 8032b98: 4620 mov r0, r4 8032b9a: f000 f8cf bl 8032d3c 8032b9e: b100 cbz r0, 8032ba2 8032ba0: e056 b.n 8032c50 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))) { 8032ba2: 4620 mov r0, r4 8032ba4: 2122 movs r1, #34 ; 0x22 ICMP_STATS_INC(icmp.recv); snmp_inc_icmpinmsgs(); iphdr = (struct ip_hdr *)p->payload; hlen = IPH_HL(iphdr) * 4; 8032ba6: 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))) { 8032baa: f7fd f904 bl 802fdb6 8032bae: b1f8 cbz r0, 8032bf0 /* 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)) { 8032bb0: 4620 mov r0, r4 8032bb2: 4641 mov r1, r8 8032bb4: f7fd f8ff bl 802fdb6 8032bb8: 4602 mov r2, r0 8032bba: 2800 cmp r0, #0 8032bbc: d148 bne.n 8032c50 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); 8032bbe: 2002 movs r0, #2 8032bc0: 8921 ldrh r1, [r4, #8] 8032bc2: f7fd f970 bl 802fea6 if (r == NULL) { 8032bc6: 4606 mov r6, r0 8032bc8: 2800 cmp r0, #0 8032bca: d041 beq.n 8032c50 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) { 8032bcc: 4621 mov r1, r4 8032bce: f7fd fa21 bl 8030014 8032bd2: 2800 cmp r0, #0 8032bd4: d13c bne.n 8032c50 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)) { 8032bd6: 4630 mov r0, r6 8032bd8: 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; 8032bdc: 6875 ldr r5, [r6, #4] /* switch r->payload back to icmp header */ if (pbuf_header(r, -hlen)) { 8032bde: f7fd f8ea bl 802fdb6 8032be2: 2800 cmp r0, #0 8032be4: d134 bne.n 8032c50 LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0); goto memerr; } /* free the original p */ pbuf_free(p); 8032be6: 4620 mov r0, r4 8032be8: f7fd f910 bl 802fe0c 8032bec: 4634 mov r4, r6 8032bee: e006 b.n 8032bfe /* 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))) { 8032bf0: 4620 mov r0, r4 8032bf2: f06f 0121 mvn.w r1, #33 ; 0x21 8032bf6: f7fd f8de bl 802fdb6 8032bfa: 2800 cmp r0, #0 8032bfc: d128 bne.n 8032c50 #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()); 8032bfe: f8df 9060 ldr.w r9, [pc, #96] ; 8032c60 } #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; 8032c02: 6863 ldr r3, [r4, #4] ip_addr_copy(iphdr->src, *ip_current_dest_addr()); 8032c04: f8d9 2000 ldr.w r2, [r9] 8032c08: 60ea str r2, [r5, #12] ip_addr_copy(iphdr->dest, *ip_current_src_addr()); 8032c0a: 4a16 ldr r2, [pc, #88] ; (8032c64 ) 8032c0c: 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); 8032c0e: 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()); 8032c10: 612a str r2, [r5, #16] ICMPH_TYPE_SET(iecho, ICMP_ER); 8032c12: 2200 movs r2, #0 8032c14: 701a strb r2, [r3, #0] //----------------------------------------------------------- // Добавил фикс 15.08.15. // Фикс исправляет баг с пингом. #ifdef CHECKSUM_BY_HARDWARE iecho->chksum = 0; 8032c16: 709a strb r2, [r3, #2] 8032c18: 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); 8032c1a: 72aa strb r2, [r5, #10] 8032c1c: 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); 8032c1e: 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(); 8032c20: f001 ffda bl 8034bd8 /* increase number of echo replies attempted to send */ snmp_inc_icmpoutechoreps(); 8032c24: f001 ffe8 bl 8034bf8 if(pbuf_header(p, hlen)) { 8032c28: 4620 mov r0, r4 8032c2a: 4641 mov r1, r8 8032c2c: f7fd f8c3 bl 802fdb6 8032c30: 4602 mov r2, r0 8032c32: b938 cbnz r0, 8032c44 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, 8032c34: 2301 movs r3, #1 8032c36: e88d 0089 stmia.w sp, {r0, r3, r7} 8032c3a: 4620 mov r0, r4 8032c3c: 4649 mov r1, r9 8032c3e: 4633 mov r3, r6 8032c40: f000 fa94 bl 803316c 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); 8032c44: 4620 mov r0, r4 pbuf_free(p); ICMP_STATS_INC(icmp.err); snmp_inc_icmpinerrors(); return; #endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ } 8032c46: b005 add sp, #20 8032c48: 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); 8032c4c: f7fd b8de b.w 802fe0c ICMP_STATS_INC(icmp.lenerr); snmp_inc_icmpinerrors(); return; #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN memerr: pbuf_free(p); 8032c50: 4620 mov r0, r4 8032c52: f7fd f8db bl 802fe0c ICMP_STATS_INC(icmp.err); snmp_inc_icmpinerrors(); return; #endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ } 8032c56: b005 add sp, #20 8032c58: 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(); 8032c5c: f001 bfb4 b.w 8034bc8 8032c60: 2000f6e4 .word 0x2000f6e4 8032c64: 2000f6dc .word 0x2000f6dc 08032c68 : * 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) { 8032c68: e92d 41ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, lr} 8032c6c: 4607 mov r7, r0 8032c6e: 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, 8032c70: 2001 movs r0, #1 8032c72: 2124 movs r1, #36 ; 0x24 8032c74: 2200 movs r2, #0 8032c76: f7fd f916 bl 802fea6 PBUF_RAM); if (q == NULL) { 8032c7a: 4606 mov r6, r0 8032c7c: b358 cbz r0, 8032cd6 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; 8032c7e: 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; 8032c80: 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; 8032c84: 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; 8032c86: 2303 movs r3, #3 icmphdr->code = code; icmphdr->id = 0; 8032c88: 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; 8032c8a: 7023 strb r3, [r4, #0] icmphdr->code = code; icmphdr->id = 0; 8032c8c: 7125 strb r5, [r4, #4] 8032c8e: 7165 strb r5, [r4, #5] icmphdr->seqno = 0; 8032c90: 71a5 strb r5, [r4, #6] 8032c92: 71e5 strb r5, [r4, #7] /* copy fields from original packet */ SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload, 8032c94: 6840 ldr r0, [r0, #4] 8032c96: 6879 ldr r1, [r7, #4] 8032c98: 221c movs r2, #28 8032c9a: 3008 adds r0, #8 8032c9c: f7ee fe76 bl 802198c IP_HLEN + ICMP_DEST_UNREACH_DATASIZE); /* calculate checksum */ icmphdr->chksum = 0; 8032ca0: 70a5 strb r5, [r4, #2] 8032ca2: 70e5 strb r5, [r4, #3] icmphdr->chksum = inet_chksum(icmphdr, q->len); 8032ca4: 8971 ldrh r1, [r6, #10] 8032ca6: 4620 mov r0, r4 8032ca8: f000 f842 bl 8032d30 8032cac: 8060 strh r0, [r4, #2] ICMP_STATS_INC(icmp.xmit); /* increase number of messages attempted to send */ snmp_inc_icmpoutmsgs(); 8032cae: f001 ff93 bl 8034bd8 /* increase number of destination unreachable messages attempted to send */ snmp_inc_icmpouttimeexcds(); 8032cb2: f001 ff99 bl 8034be8 ip_addr_copy(iphdr_src, iphdr->src); 8032cb6: f8d8 300c ldr.w r3, [r8, #12] 8032cba: aa04 add r2, sp, #16 ip_output(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP); 8032cbc: 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); 8032cbe: f842 3d04 str.w r3, [r2, #-4]! ip_output(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP); 8032cc2: 2301 movs r3, #1 8032cc4: 9301 str r3, [sp, #4] 8032cc6: 9500 str r5, [sp, #0] 8032cc8: 4629 mov r1, r5 8032cca: 23ff movs r3, #255 ; 0xff 8032ccc: f000 fa9e bl 803320c pbuf_free(q); 8032cd0: 4630 mov r0, r6 8032cd2: f7fd f89b bl 802fe0c */ void icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t) { icmp_send_response(p, ICMP_DUR, t); } 8032cd6: e8bd 81ff ldmia.w sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, pc} 08032cda : * @return host order (!) lwip checksum (non-inverted Internet sum) */ static u16_t lwip_standard_chksum(void *dataptr, int len) { 8032cda: b513 push {r0, r1, r4, lr} u8_t *pb = (u8_t *)dataptr; u16_t *ps, t = 0; 8032cdc: 2300 movs r3, #0 u32_t sum = 0; int odd = ((mem_ptr_t)pb & 1); /* Get aligned to u16_t */ if (odd && len > 0) { 8032cde: 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; 8032ce2: 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) { 8032ce6: d006 beq.n 8032cf6 8032ce8: 4299 cmp r1, r3 8032cea: dd04 ble.n 8032cf6 ((u8_t *)&t)[1] = *pb++; 8032cec: f810 3b01 ldrb.w r3, [r0], #1 len--; 8032cf0: 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++; 8032cf2: 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; 8032cf6: 2300 movs r3, #0 len--; } /* Add the bulk of the data */ ps = (u16_t *)(void *)pb; while (len > 1) { 8032cf8: e003 b.n 8032d02 sum += *ps++; 8032cfa: f830 4b02 ldrh.w r4, [r0], #2 len -= 2; 8032cfe: 3902 subs r1, #2 } /* Add the bulk of the data */ ps = (u16_t *)(void *)pb; while (len > 1) { sum += *ps++; 8032d00: 191b adds r3, r3, r4 len--; } /* Add the bulk of the data */ ps = (u16_t *)(void *)pb; while (len > 1) { 8032d02: 2901 cmp r1, #1 8032d04: dcf9 bgt.n 8032cfa len -= 2; } /* Consume left-over byte, if any */ if (len > 0) { ((u8_t *)&t)[0] = *(u8_t *)ps; 8032d06: bf04 itt eq 8032d08: 7801 ldrbeq r1, [r0, #0] 8032d0a: f88d 1006 strbeq.w r1, [sp, #6] } /* Add end bytes */ sum += t; 8032d0e: f8bd 0006 ldrh.w r0, [sp, #6] 8032d12: 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); 8032d14: b298 uxth r0, r3 8032d16: eb00 4313 add.w r3, r0, r3, lsr #16 sum = FOLD_U32T(sum); 8032d1a: b298 uxth r0, r3 8032d1c: eb00 4013 add.w r0, r0, r3, lsr #16 /* Swap if alignment was odd */ if (odd) { 8032d20: b122 cbz r2, 8032d2c sum = SWAP_BYTES_IN_WORD(sum); 8032d22: 0603 lsls r3, r0, #24 8032d24: f3c0 2007 ubfx r0, r0, #8, #8 8032d28: ea40 4013 orr.w r0, r0, r3, lsr #16 } return (u16_t)sum; } 8032d2c: b280 uxth r0, r0 8032d2e: bd1c pop {r2, r3, r4, pc} 08032d30 : * @return checksum (as u16_t) to be saved directly in the protocol header */ u16_t inet_chksum(void *dataptr, u16_t len) { 8032d30: b508 push {r3, lr} return ~LWIP_CHKSUM(dataptr, len); 8032d32: f7ff ffd2 bl 8032cda 8032d36: 43c0 mvns r0, r0 } 8032d38: b280 uxth r0, r0 8032d3a: bd08 pop {r3, pc} 08032d3c : * @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) { 8032d3c: b570 push {r4, r5, r6, lr} u32_t acc; struct pbuf *q; u8_t swapped; acc = 0; swapped = 0; 8032d3e: 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) { 8032d40: 4605 mov r5, r0 u32_t acc; struct pbuf *q; u8_t swapped; acc = 0; 8032d42: 4634 mov r4, r6 swapped = 0; for(q = p; q != NULL; q = q->next) { 8032d44: e013 b.n 8032d6e acc += LWIP_CHKSUM(q->payload, q->len); 8032d46: 8969 ldrh r1, [r5, #10] 8032d48: 6868 ldr r0, [r5, #4] 8032d4a: f7ff ffc6 bl 8032cda acc = FOLD_U32T(acc); if (q->len % 2 != 0) { 8032d4e: 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); 8032d50: 1900 adds r0, r0, r4 acc = FOLD_U32T(acc); 8032d52: b284 uxth r4, r0 if (q->len % 2 != 0) { 8032d54: 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); 8032d56: eb04 4410 add.w r4, r4, r0, lsr #16 if (q->len % 2 != 0) { 8032d5a: d507 bpl.n 8032d6c swapped = 1 - swapped; acc = SWAP_BYTES_IN_WORD(acc); 8032d5c: 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; 8032d5e: f1c6 0601 rsb r6, r6, #1 acc = SWAP_BYTES_IN_WORD(acc); 8032d62: 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; 8032d66: b2f6 uxtb r6, r6 acc = SWAP_BYTES_IN_WORD(acc); 8032d68: 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) { 8032d6c: 682d ldr r5, [r5, #0] 8032d6e: 2d00 cmp r5, #0 8032d70: d1e9 bne.n 8032d46 swapped = 1 - swapped; acc = SWAP_BYTES_IN_WORD(acc); } } if (swapped) { 8032d72: b126 cbz r6, 8032d7e acc = SWAP_BYTES_IN_WORD(acc); 8032d74: 0623 lsls r3, r4, #24 8032d76: f3c4 2407 ubfx r4, r4, #8, #8 8032d7a: ea44 4413 orr.w r4, r4, r3, lsr #16 } return (u16_t)~(acc & 0xffffUL); 8032d7e: 43e0 mvns r0, r4 } 8032d80: b280 uxth r0, r0 8032d82: bd70 pop {r4, r5, r6, pc} 08032d84 : { ip_addr_t ipaddr; ip4_addr_set_u32(&ipaddr, addr); /* all ones (broadcast) or all zeroes (old skool broadcast) */ if ((~addr == IPADDR_ANY) || 8032d84: 1e43 subs r3, r0, #1 8032d86: 3303 adds r3, #3 8032d88: d811 bhi.n 8032dae (addr == IPADDR_ANY)) { return 1; /* no broadcast support on this network interface? */ } else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) { 8032d8a: f891 302d ldrb.w r3, [r1, #45] ; 0x2d 8032d8e: f003 0302 and.w r3, r3, #2 8032d92: b2db uxtb r3, r3 8032d94: b16b cbz r3, 8032db2 /* 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)) { 8032d96: 684a ldr r2, [r1, #4] 8032d98: 4290 cmp r0, r2 8032d9a: d00a beq.n 8032db2 return 0; /* on the same (sub) network... */ } else if (ip_addr_netcmp(&ipaddr, &(netif->ip_addr), &(netif->netmask)) 8032d9c: 688b ldr r3, [r1, #8] 8032d9e: 4042 eors r2, r0 8032da0: 421a tst r2, r3 8032da2: d000 beq.n 8032da6 8032da4: e005 b.n 8032db2 /* ...and host identifier bits are all ones? =>... */ && ((addr & ~ip4_addr_get_u32(&netif->netmask)) == 8032da6: 43db mvns r3, r3 8032da8: 4018 ands r0, r3 8032daa: 4298 cmp r0, r3 8032dac: d101 bne.n 8032db2 ip4_addr_set_u32(&ipaddr, addr); /* all ones (broadcast) or all zeroes (old skool broadcast) */ if ((~addr == IPADDR_ANY) || (addr == IPADDR_ANY)) { return 1; 8032dae: 2001 movs r0, #1 8032db0: 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; 8032db2: 2000 movs r0, #0 /* => network broadcast address */ return 1; } else { return 0; } } 8032db4: 4770 bx lr 08032db6 : * @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) { 8032db6: b5f0 push {r4, r5, r6, r7, lr} u8_t base; char c; u32_t parts[4]; u32_t *pp = parts; c = *cp; 8032db8: 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) { 8032dba: b085 sub sp, #20 8032dbc: 460e mov r6, r1 u8_t base; char c; u32_t parts[4]; u32_t *pp = parts; c = *cp; 8032dbe: 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) 8032dc0: aa00 add r2, sp, #0 8032dc2: 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)) 8032dc4: f1a3 0230 sub.w r2, r3, #48 ; 0x30 8032dc8: 2a09 cmp r2, #9 8032dca: d86d bhi.n 8032ea8 return (0); val = 0; base = 10; if (c == '0') { 8032dcc: 2b30 cmp r3, #48 ; 0x30 8032dce: d10b bne.n 8032de8 c = *++cp; 8032dd0: 7843 ldrb r3, [r0, #1] if (c == 'x' || c == 'X') { 8032dd2: 2b78 cmp r3, #120 ; 0x78 8032dd4: d004 beq.n 8032de0 8032dd6: 2b58 cmp r3, #88 ; 0x58 8032dd8: d002 beq.n 8032de0 if (!isdigit(c)) return (0); val = 0; base = 10; if (c == '0') { c = *++cp; 8032dda: 3001 adds r0, #1 if (c == 'x' || c == 'X') { base = 16; c = *++cp; } else base = 8; 8032ddc: 2508 movs r5, #8 8032dde: e004 b.n 8032dea base = 10; if (c == '0') { c = *++cp; if (c == 'x' || c == 'X') { base = 16; c = *++cp; 8032de0: 7883 ldrb r3, [r0, #2] val = 0; base = 10; if (c == '0') { c = *++cp; if (c == 'x' || c == 'X') { base = 16; 8032de2: 2510 movs r5, #16 c = *++cp; 8032de4: 3002 adds r0, #2 8032de6: e000 b.n 8032dea * 0x=hex, 0=octal, 1-9=decimal. */ if (!isdigit(c)) return (0); val = 0; base = 10; 8032de8: 250a movs r5, #10 8032dea: 4602 mov r2, r0 if (c == '0') { c = *++cp; if (c == 'x' || c == 'X') { base = 16; 8032dec: 2000 movs r0, #0 8032dee: e000 b.n 8032df2 8032df0: 3201 adds r2, #1 c = *++cp; } else base = 8; } for (;;) { if (isdigit(c)) { 8032df2: f1a3 0130 sub.w r1, r3, #48 ; 0x30 8032df6: 2909 cmp r1, #9 8032df8: d803 bhi.n 8032e02 val = (val * base) + (int)(c - '0'); 8032dfa: fb05 3000 mla r0, r5, r0, r3 8032dfe: 3830 subs r0, #48 ; 0x30 8032e00: e013 b.n 8032e2a c = *++cp; } else if (base == 16 && isxdigit(c)) { 8032e02: 2d10 cmp r5, #16 8032e04: d113 bne.n 8032e2e 8032e06: f1a3 0161 sub.w r1, r3, #97 ; 0x61 8032e0a: b2c9 uxtb r1, r1 8032e0c: 2905 cmp r1, #5 8032e0e: d904 bls.n 8032e1a 8032e10: f1a3 0c41 sub.w ip, r3, #65 ; 0x41 8032e14: f1bc 0f05 cmp.w ip, #5 8032e18: d809 bhi.n 8032e2e val = (val << 4) | (int)(c + 10 - (islower(c) ? 'a' : 'A')); 8032e1a: 330a adds r3, #10 8032e1c: 2919 cmp r1, #25 8032e1e: bf8c ite hi 8032e20: 2141 movhi r1, #65 ; 0x41 8032e22: 2161 movls r1, #97 ; 0x61 8032e24: 1a5b subs r3, r3, r1 8032e26: ea43 1000 orr.w r0, r3, r0, lsl #4 c = *++cp; 8032e2a: 7853 ldrb r3, [r2, #1] 8032e2c: e7e0 b.n 8032df0 } else break; } if (c == '.') { 8032e2e: 2b2e cmp r3, #46 ; 0x2e 8032e30: d107 bne.n 8032e42 * 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) { 8032e32: 2c0c cmp r4, #12 8032e34: d038 beq.n 8032ea8 return (0); } *pp++ = val; 8032e36: f84d 0004 str.w r0, [sp, r4] c = *++cp; 8032e3a: 7853 ldrb r3, [r2, #1] 8032e3c: 1c50 adds r0, r2, #1 8032e3e: 3404 adds r4, #4 } else break; } 8032e40: e7be b.n 8032dc0 8032e42: 2b0d cmp r3, #13 8032e44: d803 bhi.n 8032e4e 8032e46: 2b09 cmp r3, #9 8032e48: d203 bcs.n 8032e52 8032e4a: b113 cbz r3, 8032e52 8032e4c: e02c b.n 8032ea8 8032e4e: 2b20 cmp r3, #32 8032e50: d12a bne.n 8032ea8 } /* * Concoct the address according to * the number of parts specified. */ switch (pp - parts + 1) { 8032e52: 466b mov r3, sp 8032e54: 1afb subs r3, r7, r3 8032e56: 109b asrs r3, r3, #2 8032e58: 3301 adds r3, #1 8032e5a: 2b04 cmp r3, #4 8032e5c: d81f bhi.n 8032e9e 8032e5e: e8df f003 tbb [pc, r3] 8032e62: 1e23 .short 0x1e23 8032e64: 0a03 .short 0x0a03 8032e66: 13 .byte 0x13 8032e67: 00 .byte 0x00 case 1: /* a -- 32 bits */ break; case 2: /* a.b -- 8.24 bits */ if (val > 0xffffffUL) { 8032e68: f1b0 7f80 cmp.w r0, #16777216 ; 0x1000000 8032e6c: d21c bcs.n 8032ea8 return (0); } val |= parts[0] << 24; 8032e6e: 9b00 ldr r3, [sp, #0] 8032e70: ea40 6003 orr.w r0, r0, r3, lsl #24 break; 8032e74: e013 b.n 8032e9e case 3: /* a.b.c -- 8.8.16 bits */ if (val > 0xffff) { 8032e76: f5b0 3f80 cmp.w r0, #65536 ; 0x10000 8032e7a: d215 bcs.n 8032ea8 return (0); } val |= (parts[0] << 24) | (parts[1] << 16); 8032e7c: 9b00 ldr r3, [sp, #0] 8032e7e: 061a lsls r2, r3, #24 8032e80: 9b01 ldr r3, [sp, #4] 8032e82: ea42 4303 orr.w r3, r2, r3, lsl #16 8032e86: e009 b.n 8032e9c break; case 4: /* a.b.c.d -- 8.8.8.8 bits */ if (val > 0xff) { 8032e88: 28ff cmp r0, #255 ; 0xff 8032e8a: d80d bhi.n 8032ea8 return (0); } val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); 8032e8c: 9b00 ldr r3, [sp, #0] 8032e8e: 061a lsls r2, r3, #24 8032e90: 9b01 ldr r3, [sp, #4] 8032e92: ea42 4203 orr.w r2, r2, r3, lsl #16 8032e96: 9b02 ldr r3, [sp, #8] 8032e98: ea42 2303 orr.w r3, r2, r3, lsl #8 8032e9c: 4318 orrs r0, r3 break; default: LWIP_ASSERT("unhandled", 0); break; } if (addr) { 8032e9e: b12e cbz r6, 8032eac ip4_addr_set_u32(addr, htonl(val)); 8032ea0: f7fb fe80 bl 802eba4 8032ea4: 6030 str r0, [r6, #0] 8032ea6: e001 b.n 8032eac * Collect number up to ``.''. * Values are specified as for C: * 0x=hex, 0=octal, 1-9=decimal. */ if (!isdigit(c)) return (0); 8032ea8: 2000 movs r0, #0 8032eaa: e000 b.n 8032eae break; } if (addr) { ip4_addr_set_u32(addr, htonl(val)); } return (1); 8032eac: 2001 movs r0, #1 } 8032eae: b005 add sp, #20 8032eb0: bdf0 pop {r4, r5, r6, r7, pc} 08032eb2 : * @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) { 8032eb2: b507 push {r0, r1, r2, lr} ip_addr_t val; if (ipaddr_aton(cp, &val)) { 8032eb4: a901 add r1, sp, #4 8032eb6: f7ff ff7e bl 8032db6 8032eba: b108 cbz r0, 8032ec0 return ip4_addr_get_u32(&val); 8032ebc: 9801 ldr r0, [sp, #4] 8032ebe: e001 b.n 8032ec4 } return (IPADDR_NONE); 8032ec0: f04f 30ff mov.w r0, #4294967295 } 8032ec4: bd0e pop {r1, r2, r3, pc} 08032ec6 : * @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) { 8032ec6: 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); 8032eca: 6803 ldr r3, [r0, #0] 8032ecc: 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) 8032ece: 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); 8032ed2: f840 3d04 str.w r3, [r0, #-4]! rp = buf; 8032ed6: 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) 8032ed8: 3801 subs r0, #1 char *rp; u8_t *ap; u8_t rem; u8_t n; u8_t i; int len = 0; 8032eda: 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; 8032edc: f04f 0c0a mov.w ip, #10 *rp++ = inv[i]; } if (len++ >= buflen) { return NULL; } *rp++ = '.'; 8032ee0: f04f 092e mov.w r9, #46 ; 0x2e 8032ee4: 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) 8032ee6: 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; 8032ee8: fbb3 f6fc udiv r6, r3, ip *ap /= (u8_t)10; inv[i++] = '0' + rem; 8032eec: 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; 8032ef0: fb0c 3a16 mls sl, ip, r6, r3 *ap /= (u8_t)10; inv[i++] = '0' + rem; 8032ef4: eb0b 0305 add.w r3, fp, r5 8032ef8: f10a 0a30 add.w sl, sl, #48 ; 0x30 8032efc: 3501 adds r5, #1 8032efe: f803 ac08 strb.w sl, [r3, #-8] } while(*ap); 8032f02: 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; 8032f06: b2ed uxtb r5, r5 } while(*ap); 8032f08: d1ee bne.n 8032ee8 8032f0a: 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) 8032f0c: 1be6 subs r6, r4, r7 8032f0e: f800 3f01 strb.w r3, [r0, #1]! 8032f12: b2ed uxtb r5, r5 8032f14: 463b mov r3, r7 8032f16: 4637 mov r7, r6 8032f18: e00b b.n 8032f32 8032f1a: 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) { 8032f1c: 4293 cmp r3, r2 8032f1e: b2e4 uxtb r4, r4 8032f20: da16 bge.n 8032f50 return NULL; } *rp++ = inv[i]; 8032f22: f10d 0a08 add.w sl, sp, #8 8032f26: 4455 add r5, sl 8032f28: f815 5c08 ldrb.w r5, [r5, #-8] 8032f2c: 54fd strb r5, [r7, r3] 8032f2e: 3301 adds r3, #1 8032f30: 4625 mov r5, r4 do { rem = *ap % (u8_t)10; *ap /= (u8_t)10; inv[i++] = '0' + rem; } while(*ap); while(i--) { 8032f32: 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) 8032f34: 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--) { 8032f38: d1ef bne.n 8032f1a if (len++ >= buflen) { return NULL; } *rp++ = inv[i]; } if (len++ >= buflen) { 8032f3a: 1c5f adds r7, r3, #1 8032f3c: 4293 cmp r3, r2 8032f3e: da07 bge.n 8032f50 s_addr = ip4_addr_get_u32(addr); rp = buf; ap = (u8_t *)&s_addr; for(n = 0; n < 4; n++) { 8032f40: 4540 cmp r0, r8 *rp++ = inv[i]; } if (len++ >= buflen) { return NULL; } *rp++ = '.'; 8032f42: 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++) { 8032f46: d1cd bne.n 8032ee4 return NULL; } *rp++ = '.'; ap++; } *--rp = 0; 8032f48: 2300 movs r3, #0 8032f4a: f804 3c01 strb.w r3, [r4, #-1] 8032f4e: e000 b.n 8032f52 *ap /= (u8_t)10; inv[i++] = '0' + rem; } while(*ap); while(i--) { if (len++ >= buflen) { return NULL; 8032f50: 2100 movs r1, #0 *rp++ = '.'; ap++; } *--rp = 0; return buf; } 8032f52: 4608 mov r0, r1 8032f54: e8bd 8ffe ldmia.w sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 08032f58 : */ char * ipaddr_ntoa(const ip_addr_t *addr) { static char str[16]; return ipaddr_ntoa_r(addr, str, 16); 8032f58: 4901 ldr r1, [pc, #4] ; (8032f60 ) 8032f5a: 2210 movs r2, #16 8032f5c: f7ff bfb3 b.w 8032ec6 8032f60: 2000c414 .word 0x2000c414 08032f64 : return netif; } #endif /* iterate through netifs */ for (netif = netif_list; netif != NULL; netif = netif->next) { 8032f64: 4b0f ldr r3, [pc, #60] ; (8032fa4 ) * @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) { 8032f66: b510 push {r4, lr} return netif; } #endif /* iterate through netifs */ for (netif = netif_list; netif != NULL; netif = netif->next) { 8032f68: 681c ldr r4, [r3, #0] 8032f6a: e00a b.n 8032f82 /* network mask matches? */ if (netif_is_up(netif)) { 8032f6c: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 8032f70: 07d9 lsls r1, r3, #31 8032f72: d505 bpl.n 8032f80 if (ip_addr_netcmp(dest, &(netif->ip_addr), &(netif->netmask))) { 8032f74: 6803 ldr r3, [r0, #0] 8032f76: 6862 ldr r2, [r4, #4] 8032f78: 405a eors r2, r3 8032f7a: 68a3 ldr r3, [r4, #8] 8032f7c: 421a tst r2, r3 8032f7e: d00e beq.n 8032f9e return netif; } #endif /* iterate through netifs */ for (netif = netif_list; netif != NULL; netif = netif->next) { 8032f80: 6824 ldr r4, [r4, #0] 8032f82: 2c00 cmp r4, #0 8032f84: d1f2 bne.n 8032f6c /* return netif on which to forward IP packet */ return netif; } } } if ((netif_default == NULL) || (!netif_is_up(netif_default))) { 8032f86: 4b08 ldr r3, [pc, #32] ; (8032fa8 ) 8032f88: 681b ldr r3, [r3, #0] 8032f8a: b12b cbz r3, 8032f98 8032f8c: f893 202d ldrb.w r2, [r3, #45] ; 0x2d 8032f90: 07d2 lsls r2, r2, #31 8032f92: bf48 it mi 8032f94: 461c movmi r4, r3 8032f96: d402 bmi.n 8032f9e 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(); 8032f98: f001 fcd8 bl 803494c return NULL; 8032f9c: e7ff b.n 8032f9e } /* no matching netif found, use default netif */ return netif_default; } 8032f9e: 4620 mov r0, r4 8032fa0: bd10 pop {r4, pc} 8032fa2: bf00 nop 8032fa4: 2000f6b0 .word 0x2000f6b0 8032fa8: 2000f6b4 .word 0x2000f6b4 08032fac : * @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) { 8032fac: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8032fb0: 4604 mov r4, r0 8032fb2: 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(); 8032fb4: f001 fc8a bl 80348cc /* identify the IP header */ iphdr = (struct ip_hdr *)p->payload; 8032fb8: 6866 ldr r6, [r4, #4] if (IPH_V(iphdr) != 4) { 8032fba: f896 8000 ldrb.w r8, [r6] 8032fbe: ea4f 1318 mov.w r3, r8, lsr #4 8032fc2: 2b04 cmp r3, #4 8032fc4: d005 beq.n 8032fd2 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); 8032fc6: 4620 mov r0, r4 8032fc8: f7fc ff20 bl 802fe0c IP_STATS_INC(ip.err); IP_STATS_INC(ip.drop); snmp_inc_ipinhdrerrors(); 8032fcc: f001 fc86 bl 80348dc return ERR_OK; 8032fd0: e0be b.n 8033150 /* 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)); 8032fd2: 8870 ldrh r0, [r6, #2] 8032fd4: f7fb fde1 bl 802eb9a return ERR_OK; } #endif /* obtain IP header length in number of 32-bit words */ iphdr_hlen = IPH_HL(iphdr); 8032fd8: 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)) { 8032fdc: 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; 8032fde: 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)) { 8032fe2: 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)); 8032fe4: 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); 8032fe6: 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)) { 8032fe8: d302 bcc.n 8032ff0 8032fea: 8923 ldrh r3, [r4, #8] 8032fec: 428b cmp r3, r1 8032fee: d202 bcs.n 8032ff6 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); 8032ff0: f7fc ff0c bl 802fe0c 8032ff4: e045 b.n 8033082 } #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); 8032ff6: f7fc ff30 bl 802fe5a /* copy IP addresses to aligned ip_addr_t */ ip_addr_copy(current_iphdr_dest, iphdr->dest); 8032ffa: 6932 ldr r2, [r6, #16] 8032ffc: 4b56 ldr r3, [pc, #344] ; (8033158 ) } #endif /* LWIP_AUTOIP */ } if (first) { first = 0; netif = netif_list; 8032ffe: f8df b168 ldr.w fp, [pc, #360] ; 8033168 /* 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); 8033002: 601a str r2, [r3, #0] ip_addr_copy(current_iphdr_src, iphdr->src); 8033004: 68f1 ldr r1, [r6, #12] 8033006: 4a55 ldr r2, [pc, #340] ; (803315c ) 8033008: 463d mov r5, r7 803300a: 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; 803300c: 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)) || 8033010: 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)))) { 8033012: f895 302d ldrb.w r3, [r5, #45] ; 0x2d 8033016: 07d8 lsls r0, r3, #31 8033018: d403 bmi.n 8033022 /* break out of for loop */ break; } #endif /* LWIP_AUTOIP */ } if (first) { 803301a: f1b9 0f00 cmp.w r9, #0 803301e: d10e bne.n 803303e 8033020: e010 b.n 8033044 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)))) { 8033022: 686b ldr r3, [r5, #4] 8033024: 2b00 cmp r3, #0 8033026: d0f8 beq.n 803301a /* unicast to this interface address? */ if (ip_addr_cmp(¤t_iphdr_dest, &(netif->ip_addr)) || 8033028: f8da 0000 ldr.w r0, [sl] 803302c: 4298 cmp r0, r3 803302e: f000 8088 beq.w 8033142 /* or broadcast on this interface network address? */ ip_addr_isbroadcast(¤t_iphdr_dest, netif)) { 8033032: 4629 mov r1, r5 8033034: f7ff fea6 bl 8032d84 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)) || 8033038: 2800 cmp r0, #0 803303a: d0ee beq.n 803301a 803303c: e081 b.n 8033142 } #endif /* LWIP_AUTOIP */ } if (first) { first = 0; netif = netif_list; 803303e: f8db 5000 ldr.w r5, [fp] 8033042: e000 b.n 8033046 } else { netif = netif->next; 8033044: 682d ldr r5, [r5, #0] } if (netif == inp) { 8033046: 42bd cmp r5, r7 netif = netif->next; 8033048: bf08 it eq 803304a: 682d ldreq r5, [r5, #0] 803304c: f04f 0900 mov.w r9, #0 } } while(netif != NULL); 8033050: 2d00 cmp r5, #0 8033052: d1de bne.n 8033012 8033054: e072 b.n 803313c /* 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)) { 8033056: eb06 0308 add.w r3, r6, r8 803305a: 885b ldrh r3, [r3, #2] 803305c: f5b3 4f88 cmp.w r3, #17408 ; 0x4400 8033060: d16f bne.n 8033142 8033062: e011 b.n 8033088 /* 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)) || 8033064: 4639 mov r1, r7 8033066: f7ff fe8d bl 8032d84 803306a: b928 cbnz r0, 8033078 (ip_addr_ismulticast(¤t_iphdr_src))) { 803306c: f8d8 3000 ldr.w r3, [r8] 8033070: 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)) || 8033074: 2be0 cmp r3, #224 ; 0xe0 8033076: d108 bne.n 803308a (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); 8033078: 4620 mov r0, r4 803307a: f7fc fec7 bl 802fe0c IP_STATS_INC(ip.drop); snmp_inc_ipinaddrerrors(); 803307e: f001 fc35 bl 80348ec snmp_inc_ipindiscards(); 8033082: f001 fc43 bl 803490c return ERR_OK; 8033086: e063 b.n 8033150 /* 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)) { 8033088: 463d mov r5, r7 return ERR_OK; } } /* packet not for us? */ if (netif == NULL) { 803308a: b93d cbnz r5, 803309c /* try to forward IP packet on (other) interfaces */ ip_forward(p, iphdr, inp); } else #endif /* IP_FORWARD */ { snmp_inc_ipinaddrerrors(); 803308c: f001 fc2e bl 80348ec snmp_inc_ipindiscards(); 8033090: f001 fc3c bl 803490c } pbuf_free(p); 8033094: 4620 mov r0, r4 8033096: f7fc feb9 bl 802fe0c return ERR_OK; 803309a: e059 b.n 8033150 } /* packet consists of multiple fragments? */ if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) { 803309c: 88f3 ldrh r3, [r6, #6] 803309e: f023 03c0 bic.w r3, r3, #192 ; 0xc0 80330a2: b29b uxth r3, r3 80330a4: b12b cbz r3, 80330b2 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); 80330a6: 4620 mov r0, r4 80330a8: f7fc feb0 bl 802fe0c 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(); 80330ac: f001 fc26 bl 80348fc return ERR_OK; 80330b0: e04e b.n 8033150 /* 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; 80330b2: 4b2b ldr r3, [pc, #172] ; (8033160 ) 80330b4: 601f str r7, [r3, #0] current_header = iphdr; 80330b6: 4b2b ldr r3, [pc, #172] ; (8033164 ) #if LWIP_RAW /* raw input did not eat the packet? */ if (raw_input(p, inp) == 0) 80330b8: 4620 mov r0, r4 80330ba: 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; 80330bc: 601e str r6, [r3, #0] #if LWIP_RAW /* raw input did not eat the packet? */ if (raw_input(p, inp) == 0) 80330be: f7fd f825 bl 803010c 80330c2: bb88 cbnz r0, 8033128 #endif /* LWIP_RAW */ { switch (IPH_PROTO(iphdr)) { 80330c4: 7a73 ldrb r3, [r6, #9] 80330c6: 2b06 cmp r3, #6 80330c8: d00b beq.n 80330e2 80330ca: 2b11 cmp r3, #17 80330cc: d002 beq.n 80330d4 80330ce: 2b01 cmp r3, #1 80330d0: d115 bne.n 80330fe 80330d2: e00d b.n 80330f0 #if LWIP_UDP case IP_PROTO_UDP: #if LWIP_UDPLITE case IP_PROTO_UDPLITE: #endif /* LWIP_UDPLITE */ snmp_inc_ipindelivers(); 80330d4: f001 fc22 bl 803491c udp_input(p, inp); 80330d8: 4620 mov r0, r4 80330da: 4639 mov r1, r7 80330dc: f7ff fb44 bl 8032768 break; 80330e0: e022 b.n 8033128 #endif /* LWIP_UDP */ #if LWIP_TCP case IP_PROTO_TCP: snmp_inc_ipindelivers(); 80330e2: f001 fc1b bl 803491c tcp_input(p, inp); 80330e6: 4620 mov r0, r4 80330e8: 4639 mov r1, r7 80330ea: f7fe f8e7 bl 80312bc break; 80330ee: e01b b.n 8033128 #endif /* LWIP_TCP */ #if LWIP_ICMP case IP_PROTO_ICMP: snmp_inc_ipindelivers(); 80330f0: f001 fc14 bl 803491c icmp_input(p, inp); 80330f4: 4620 mov r0, r4 80330f6: 4639 mov r1, r7 80330f8: f7ff fd20 bl 8032b3c break; 80330fc: e014 b.n 8033128 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) && 80330fe: 4d16 ldr r5, [pc, #88] ; (8033158 ) 8033100: 4639 mov r1, r7 8033102: 6828 ldr r0, [r5, #0] 8033104: f7ff fe3e bl 8032d84 8033108: b948 cbnz r0, 803311e !ip_addr_ismulticast(¤t_iphdr_dest)) { 803310a: 682b ldr r3, [r5, #0] 803310c: 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) && 8033110: 2be0 cmp r3, #224 ; 0xe0 8033112: d004 beq.n 803311e !ip_addr_ismulticast(¤t_iphdr_dest)) { p->payload = iphdr; 8033114: 6066 str r6, [r4, #4] icmp_dest_unreach(p, ICMP_DUR_PROTO); 8033116: 4620 mov r0, r4 8033118: 2102 movs r1, #2 803311a: f7ff fda5 bl 8032c68 } #endif /* LWIP_ICMP */ pbuf_free(p); 803311e: 4620 mov r0, r4 8033120: f7fc fe74 bl 802fe0c 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(); 8033124: f001 fbea bl 80348fc } } current_netif = NULL; 8033128: 4a0d ldr r2, [pc, #52] ; (8033160 ) 803312a: 2300 movs r3, #0 803312c: 6013 str r3, [r2, #0] current_header = NULL; 803312e: 4a0d ldr r2, [pc, #52] ; (8033164 ) 8033130: 6013 str r3, [r2, #0] ip_addr_set_any(¤t_iphdr_src); 8033132: 4a0a ldr r2, [pc, #40] ; (803315c ) 8033134: 6013 str r3, [r2, #0] ip_addr_set_any(¤t_iphdr_dest); 8033136: 4a08 ldr r2, [pc, #32] ; (8033158 ) 8033138: 6013 str r3, [r2, #0] return ERR_OK; 803313a: e009 b.n 8033150 * * #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) { 803313c: 7a73 ldrb r3, [r6, #9] 803313e: 2b11 cmp r3, #17 8033140: d089 beq.n 8033056 #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)) 8033142: f8df 8018 ldr.w r8, [pc, #24] ; 803315c 8033146: f8d8 0000 ldr.w r0, [r8] 803314a: 2800 cmp r0, #0 803314c: d09d beq.n 803308a 803314e: e789 b.n 8033064 current_header = NULL; ip_addr_set_any(¤t_iphdr_src); ip_addr_set_any(¤t_iphdr_dest); return ERR_OK; } 8033150: 2000 movs r0, #0 8033152: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8033156: bf00 nop 8033158: 2000f6e4 .word 0x2000f6e4 803315c: 2000f6dc .word 0x2000f6dc 8033160: 2000f6e0 .word 0x2000f6e0 8033164: 2000f6e8 .word 0x2000f6e8 8033168: 2000f6b0 .word 0x2000f6b0 0803316c : */ 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) { 803316c: e92d 47f3 stmdb sp!, {r0, r1, r4, r5, r6, r7, r8, r9, sl, lr} 8033170: 4615 mov r5, r2 8033172: 4606 mov r6, r0 8033174: 4689 mov r9, r1 8033176: 469a mov sl, r3 8033178: 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(); 803317a: f001 fbd7 bl 803492c /* Should the IP header be generated or is it already included in p? */ if (dest != IP_HDRINCL) { 803317e: b3b5 cbz r5, 80331ee } #endif /* CHECKSUM_GEN_IP_INLINE */ } #endif /* IP_OPTIONS_SEND */ /* generate IP header */ if (pbuf_header(p, IP_HLEN)) { 8033180: 4630 mov r0, r6 8033182: 2114 movs r1, #20 8033184: f7fc fe17 bl 802fdb6 8033188: 4680 mov r8, r0 803318a: b118 cbz r0, 8033194 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(); 803318c: f001 fbd6 bl 803493c return ERR_BUF; 8033190: 20fe movs r0, #254 ; 0xfe 8033192: e036 b.n 8033202 } iphdr = (struct ip_hdr *)p->payload; 8033194: 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); 8033196: 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); 803319a: f884 a008 strb.w sl, [r4, #8] IPH_PROTO_SET(iphdr, proto); 803319e: 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); 80331a0: 682b ldr r3, [r5, #0] 80331a2: 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); 80331a4: 2345 movs r3, #69 ; 0x45 80331a6: 7023 strb r3, [r4, #0] IPH_TOS_SET(iphdr, tos); 80331a8: f89d 3028 ldrb.w r3, [sp, #40] ; 0x28 80331ac: 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)); 80331ae: 8930 ldrh r0, [r6, #8] 80331b0: f7fb fcee bl 802eb90 #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_len; #endif /* CHECKSUM_GEN_IP_INLINE */ IPH_OFFSET_SET(iphdr, 0); 80331b4: f884 8006 strb.w r8, [r4, #6] 80331b8: f884 8007 strb.w r8, [r4, #7] IPH_ID_SET(iphdr, htons(ip_id)); 80331bc: f8df 8048 ldr.w r8, [pc, #72] ; 8033208 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)); 80331c0: 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)); 80331c2: f8b8 0000 ldrh.w r0, [r8] 80331c6: f7fb fce3 bl 802eb90 80331ca: 80a0 strh r0, [r4, #4] #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_id; #endif /* CHECKSUM_GEN_IP_INLINE */ ++ip_id; 80331cc: f8b8 3000 ldrh.w r3, [r8] 80331d0: 3301 adds r3, #1 80331d2: f8a8 3000 strh.w r3, [r8] if (ip_addr_isany(src)) { 80331d6: f1b9 0f00 cmp.w r9, #0 80331da: d002 beq.n 80331e2 80331dc: f8d9 3000 ldr.w r3, [r9] 80331e0: b903 cbnz r3, 80331e4 ip_addr_copy(iphdr->src, netif->ip_addr); 80331e2: 687b ldr r3, [r7, #4] } else { /* src cannot be NULL here */ ip_addr_copy(iphdr->src, *src); 80331e4: 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); 80331e6: 2300 movs r3, #0 80331e8: 72a3 strb r3, [r4, #10] 80331ea: 72e3 strb r3, [r4, #11] 80331ec: e004 b.n 80331f8 #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); 80331ee: 6873 ldr r3, [r6, #4] 80331f0: ad02 add r5, sp, #8 80331f2: 691b ldr r3, [r3, #16] 80331f4: 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); 80331f8: 697b ldr r3, [r7, #20] 80331fa: 4638 mov r0, r7 80331fc: 4631 mov r1, r6 80331fe: 462a mov r2, r5 8033200: 4798 blx r3 } 8033202: b240 sxtb r0, r0 8033204: e8bd 87fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, r9, sl, pc} 8033208: 2000c424 .word 0x2000c424 0803320c : * 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) { 803320c: b5f0 push {r4, r5, r6, r7, lr} 803320e: 4605 mov r5, r0 8033210: 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) { 8033212: 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) { 8033214: 460f mov r7, r1 8033216: 4614 mov r4, r2 8033218: 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) { 803321a: f7ff fea3 bl 8032f64 803321e: b168 cbz r0, 803323c 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); 8033220: f89d 3028 ldrb.w r3, [sp, #40] ; 0x28 8033224: 9002 str r0, [sp, #8] 8033226: 9300 str r3, [sp, #0] 8033228: f89d 302c ldrb.w r3, [sp, #44] ; 0x2c 803322c: 4628 mov r0, r5 803322e: 9301 str r3, [sp, #4] 8033230: 4639 mov r1, r7 8033232: 4622 mov r2, r4 8033234: 4633 mov r3, r6 8033236: f7ff ff99 bl 803316c 803323a: e000 b.n 803323e 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; 803323c: 20fc movs r0, #252 ; 0xfc } return ip_output_if(p, src, dest, ttl, tos, proto, netif); } 803323e: b240 sxtb r0, r0 8033240: b005 add sp, #20 8033242: bdf0 pop {r4, r5, r6, r7, pc} 08033244 : * @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) { 8033244: b510 push {r4, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8033246: 2300 movs r3, #0 while (p != NULL) 8033248: e00c b.n 8033264 { base = plen; plen += p->len; 803324a: 8944 ldrh r4, [r0, #10] 803324c: 191c adds r4, r3, r4 803324e: b2a4 uxth r4, r4 if (ofs < plen) 8033250: 42a1 cmp r1, r4 8033252: d205 bcs.n 8033260 { msg_ptr = (u8_t*)p->payload; 8033254: 6840 ldr r0, [r0, #4] msg_ptr += ofs - base; 8033256: 1acb subs r3, r1, r3 *type = *msg_ptr; 8033258: 5cc3 ldrb r3, [r0, r3] return ERR_OK; 803325a: 2000 movs r0, #0 plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; *type = *msg_ptr; 803325c: 7013 strb r3, [r2, #0] return ERR_OK; 803325e: e004 b.n 803326a } p = p->next; 8033260: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8033262: 4623 mov r3, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8033264: 2800 cmp r0, #0 8033266: d1f0 bne.n 803324a return ERR_OK; } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; 8033268: 20f2 movs r0, #242 ; 0xf2 } 803326a: b240 sxtb r0, r0 803326c: bd10 pop {r4, pc} 0803326e : * @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) { 803326e: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8033270: 2500 movs r5, #0 while (p != NULL) 8033272: e079 b.n 8033368 { base = plen; plen += p->len; 8033274: 8944 ldrh r4, [r0, #10] 8033276: 192c adds r4, r5, r4 8033278: b2a4 uxth r4, r4 if (ofs < plen) 803327a: 42a1 cmp r1, r4 803327c: d272 bcs.n 8033364 { msg_ptr = (u8_t*)p->payload; 803327e: f8d0 c004 ldr.w ip, [r0, #4] msg_ptr += ofs - base; 8033282: 1b4f subs r7, r1, r5 8033284: eb0c 0507 add.w r5, ip, r7 if (*msg_ptr < 0x80) 8033288: f81c 6007 ldrb.w r6, [ip, r7] 803328c: f016 0f80 tst.w r6, #128 ; 0x80 8033290: d105 bne.n 803329e { /* primitive definite length format */ *octets_used = 1; 8033292: 2101 movs r1, #1 8033294: 7011 strb r1, [r2, #0] *length = *msg_ptr; 8033296: f81c 2007 ldrb.w r2, [ip, r7] 803329a: 801a strh r2, [r3, #0] 803329c: e05a b.n 8033354 return ERR_OK; } else if (*msg_ptr == 0x80) 803329e: 2e80 cmp r6, #128 ; 0x80 80332a0: d12a bne.n 80332f8 { /* constructed indefinite length format, termination with two zero octets */ u8_t zeros; u8_t i; *length = 0; 80332a2: 2600 movs r6, #0 80332a4: 801e strh r6, [r3, #0] 80332a6: e022 b.n 80332ee { i = 2; while (i > 0) { i--; (*length) += 1; 80332a8: f8b3 c000 ldrh.w ip, [r3] ofs += 1; 80332ac: 3101 adds r1, #1 80332ae: b289 uxth r1, r1 { i = 2; while (i > 0) { i--; (*length) += 1; 80332b0: f10c 0c01 add.w ip, ip, #1 ofs += 1; if (ofs >= plen) 80332b4: 42a1 cmp r1, r4 { i = 2; while (i > 0) { i--; (*length) += 1; 80332b6: f8a3 c000 strh.w ip, [r3] ofs += 1; if (ofs >= plen) 80332ba: d308 bcc.n 80332ce { /* next octet in next pbuf */ p = p->next; 80332bc: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80332be: b900 cbnz r0, 80332c2 80332c0: e04e b.n 8033360 msg_ptr = (u8_t*)p->payload; plen += p->len; 80332c2: 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; 80332c6: 6845 ldr r5, [r0, #4] plen += p->len; 80332c8: 4464 add r4, ip 80332ca: b2a4 uxth r4, r4 80332cc: e000 b.n 80332d0 } else { /* next octet in same pbuf */ msg_ptr++; 80332ce: 3501 adds r5, #1 } if (*msg_ptr == 0) 80332d0: f895 c000 ldrb.w ip, [r5] 80332d4: f1bc 0f00 cmp.w ip, #0 80332d8: d104 bne.n 80332e4 { zeros++; 80332da: 3601 adds r6, #1 80332dc: b2f6 uxtb r6, r6 if (zeros == 2) 80332de: 2e02 cmp r6, #2 80332e0: d101 bne.n 80332e6 80332e2: e007 b.n 80332f4 i = 0; } } else { zeros = 0; 80332e4: 2600 movs r6, #0 *length = 0; zeros = 0; while (zeros != 2) { i = 2; while (i > 0) 80332e6: 42b9 cmp r1, r7 80332e8: d1de bne.n 80332a8 u8_t zeros; u8_t i; *length = 0; zeros = 0; while (zeros != 2) 80332ea: 2e02 cmp r6, #2 80332ec: d002 beq.n 80332f4 * @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) 80332ee: 1c8f adds r7, r1, #2 80332f0: b2bf uxth r7, r7 80332f2: e7d9 b.n 80332a8 { zeros = 0; } } } *octets_used = 1; 80332f4: 2301 movs r3, #1 80332f6: e02c b.n 8033352 return ERR_OK; } else if (*msg_ptr == 0x81) 80332f8: 2e81 cmp r6, #129 ; 0x81 80332fa: d10c bne.n 8033316 { /* constructed definite length format, one octet */ ofs += 1; 80332fc: 3101 adds r1, #1 if (ofs >= plen) 80332fe: b289 uxth r1, r1 8033300: 42a1 cmp r1, r4 8033302: d303 bcc.n 803330c { /* next octet in next pbuf */ p = p->next; 8033304: 6801 ldr r1, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033306: b359 cbz r1, 8033360 msg_ptr = (u8_t*)p->payload; 8033308: 684d ldr r5, [r1, #4] 803330a: e000 b.n 803330e } else { /* next octet in same pbuf */ msg_ptr++; 803330c: 3501 adds r5, #1 } *length = *msg_ptr; 803330e: 7829 ldrb r1, [r5, #0] 8033310: 8019 strh r1, [r3, #0] *octets_used = 2; 8033312: 2302 movs r3, #2 8033314: e01d b.n 8033352 return ERR_OK; } else if (*msg_ptr == 0x82) 8033316: 2e82 cmp r6, #130 ; 0x82 8033318: d11e bne.n 8033358 /* constructed definite length format, two octets */ i = 2; while (i > 0) { i--; ofs += 1; 803331a: 1c4e adds r6, r1, #1 if (ofs >= plen) 803331c: b2b6 uxth r6, r6 803331e: 42a6 cmp r6, r4 8033320: d201 bcs.n 8033326 plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 8033322: 3501 adds r5, #1 8033324: e005 b.n 8033332 i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 8033326: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033328: b1d0 cbz r0, 8033360 msg_ptr = (u8_t*)p->payload; plen += p->len; 803332a: 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; 803332c: 6845 ldr r5, [r0, #4] plen += p->len; 803332e: 19a4 adds r4, r4, r6 8033330: b2a4 uxth r4, r4 *length |= *msg_ptr; } else { /* most significant length octet */ *length = (*msg_ptr) << 8; 8033332: 782e ldrb r6, [r5, #0] /* constructed definite length format, two octets */ i = 2; while (i > 0) { i--; ofs += 1; 8033334: 3102 adds r1, #2 if (ofs >= plen) 8033336: b289 uxth r1, r1 *length |= *msg_ptr; } else { /* most significant length octet */ *length = (*msg_ptr) << 8; 8033338: 0236 lsls r6, r6, #8 i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 803333a: 42a1 cmp r1, r4 *length |= *msg_ptr; } else { /* most significant length octet */ *length = (*msg_ptr) << 8; 803333c: 801e strh r6, [r3, #0] i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 803333e: d201 bcs.n 8033344 plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 8033340: 3501 adds r5, #1 8033342: e002 b.n 803334a i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 8033344: 6801 ldr r1, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033346: b159 cbz r1, 8033360 msg_ptr = (u8_t*)p->payload; 8033348: 684d ldr r5, [r1, #4] msg_ptr++; } if (i == 0) { /* least significant length octet */ *length |= *msg_ptr; 803334a: 7829 ldrb r1, [r5, #0] 803334c: 430e orrs r6, r1 803334e: 801e strh r6, [r3, #0] { /* most significant length octet */ *length = (*msg_ptr) << 8; } } *octets_used = 3; 8033350: 2303 movs r3, #3 8033352: 7013 strb r3, [r2, #0] return ERR_OK; 8033354: 2000 movs r0, #0 8033356: e00a b.n 803336e } 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); 8033358: f006 067f and.w r6, r6, #127 ; 0x7f 803335c: 3601 adds r6, #1 803335e: 7016 strb r6, [r2, #0] return ERR_ARG; 8033360: 20f2 movs r0, #242 ; 0xf2 8033362: e004 b.n 803336e } } p = p->next; 8033364: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8033366: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8033368: 2800 cmp r0, #0 803336a: d183 bne.n 8033274 803336c: e7f8 b.n 8033360 p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 803336e: b240 sxtb r0, r0 8033370: bdf0 pop {r4, r5, r6, r7, pc} 08033372 : * 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) { 8033372: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8033376: 2500 movs r5, #0 while (p != NULL) 8033378: e049 b.n 803340e { base = plen; plen += p->len; 803337a: 8944 ldrh r4, [r0, #10] 803337c: 192c adds r4, r5, r4 803337e: b2a4 uxth r4, r4 if (ofs < plen) 8033380: 42a1 cmp r1, r4 8033382: d242 bcs.n 803340a { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if ((len > 0) && (len < 6)) 8033384: 1e56 subs r6, r2, #1 { base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; 8033386: f8d0 c004 ldr.w ip, [r0, #4] msg_ptr += ofs - base; if ((len > 0) && (len < 6)) 803338a: b2b6 uxth r6, r6 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 803338c: 1b4f subs r7, r1, r5 if ((len > 0) && (len < 6)) 803338e: 2e04 cmp r6, #4 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8033390: eb0c 0507 add.w r5, ip, r7 if ((len > 0) && (len < 6)) 8033394: d901 bls.n 803339a *value |= *msg_ptr; return ERR_OK; } else { return ERR_ARG; 8033396: 20f2 movs r0, #242 ; 0xf2 8033398: e03c b.n 8033414 msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if ((len > 0) && (len < 6)) { /* start from zero */ *value = 0; 803339a: f04f 0800 mov.w r8, #0 803339e: f8c3 8000 str.w r8, [r3] if (*msg_ptr & 0x80) 80333a2: f81c 7007 ldrb.w r7, [ip, r7] 80333a6: f017 0f80 tst.w r7, #128 ; 0x80 80333aa: d1f4 bne.n 8033396 return ERR_ARG; } else { /* positive */ if ((len > 1) && (*msg_ptr == 0)) 80333ac: 2a01 cmp r2, #1 80333ae: d00e beq.n 80333ce 80333b0: b96f cbnz r7, 80333ce { /* skip leading "sign byte" octet 0x00 */ len--; ofs += 1; 80333b2: 3101 adds r1, #1 80333b4: b289 uxth r1, r1 if (ofs >= plen) 80333b6: 42a1 cmp r1, r4 { /* positive */ if ((len > 1) && (*msg_ptr == 0)) { /* skip leading "sign byte" octet 0x00 */ len--; 80333b8: 4632 mov r2, r6 ofs += 1; if (ofs >= plen) 80333ba: d307 bcc.n 80333cc { /* next octet in next pbuf */ p = p->next; 80333bc: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80333be: 2800 cmp r0, #0 80333c0: d0e9 beq.n 8033396 msg_ptr = (u8_t*)p->payload; plen += p->len; 80333c2: 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; 80333c4: 6845 ldr r5, [r0, #4] plen += p->len; 80333c6: 19a4 adds r4, r4, r6 80333c8: b2a4 uxth r4, r4 80333ca: e000 b.n 80333ce } else { /* next octet in same pbuf */ msg_ptr++; 80333cc: 3501 adds r5, #1 80333ce: 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) 80333d0: 188a adds r2, r1, r2 80333d2: b2b6 uxth r6, r6 80333d4: b292 uxth r2, r2 80333d6: e010 b.n 80333fa } /* OR octets with value */ while (len > 1) { len--; *value |= *msg_ptr; 80333d8: 7829 ldrb r1, [r5, #0] 80333da: 430f orrs r7, r1 *value <<= 8; 80333dc: 023f lsls r7, r7, #8 ofs += 1; if (ofs >= plen) 80333de: 42a6 cmp r6, r4 /* OR octets with value */ while (len > 1) { len--; *value |= *msg_ptr; *value <<= 8; 80333e0: 601f str r7, [r3, #0] ofs += 1; if (ofs >= plen) 80333e2: d307 bcc.n 80333f4 { /* next octet in next pbuf */ p = p->next; 80333e4: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80333e6: 2800 cmp r0, #0 80333e8: d0d5 beq.n 8033396 msg_ptr = (u8_t*)p->payload; plen += p->len; 80333ea: 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; 80333ec: 6845 ldr r5, [r0, #4] plen += p->len; 80333ee: 1864 adds r4, r4, r1 80333f0: b2a4 uxth r4, r4 80333f2: e000 b.n 80333f6 } else { /* next octet in same pbuf */ msg_ptr++; 80333f4: 3501 adds r5, #1 80333f6: 3601 adds r6, #1 80333f8: b2b6 uxth r6, r6 msg_ptr++; } } } /* OR octets with value */ while (len > 1) 80333fa: 4296 cmp r6, r2 80333fc: 681f ldr r7, [r3, #0] 80333fe: d1eb bne.n 80333d8 { /* next octet in same pbuf */ msg_ptr++; } } *value |= *msg_ptr; 8033400: 782a ldrb r2, [r5, #0] 8033402: 4317 orrs r7, r2 8033404: 601f str r7, [r3, #0] return ERR_OK; 8033406: 2000 movs r0, #0 8033408: e004 b.n 8033414 else { return ERR_ARG; } } p = p->next; 803340a: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 803340c: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 803340e: 2800 cmp r0, #0 8033410: d1b3 bne.n 803337a 8033412: e7c0 b.n 8033396 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 8033414: b240 sxtb r0, r0 8033416: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 0803341a : * * @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) { 803341a: 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; 803341e: 2500 movs r5, #0 while (p != NULL) 8033420: e04e b.n 80334c0 { base = plen; plen += p->len; 8033422: 8944 ldrh r4, [r0, #10] 8033424: 192c adds r4, r5, r4 8033426: b2a4 uxth r4, r4 if (ofs < plen) 8033428: 42a1 cmp r1, r4 803342a: d247 bcs.n 80334bc { msg_ptr = (u8_t*)p->payload; 803342c: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; if ((len > 0) && (len < 5)) 803342e: 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; 8033432: 1b4e subs r6, r1, r5 if ((len > 0) && (len < 5)) 8033434: f1bc 0f03 cmp.w ip, #3 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8033438: eb07 0506 add.w r5, r7, r6 if ((len > 0) && (len < 5)) 803343c: d901 bls.n 8033442 } return ERR_OK; } else { return ERR_ARG; 803343e: 20f2 movs r0, #242 ; 0xf2 8033440: e041 b.n 80334c6 { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if ((len > 0) && (len < 5)) { if (*msg_ptr & 0x80) 8033442: 57be ldrsb r6, [r7, r6] 8033444: 2e00 cmp r6, #0 8033446: da0b bge.n 8033460 { /* negative, start from -1 */ *value = -1; 8033448: f04f 36ff mov.w r6, #4294967295 803344c: 601e str r6, [r3, #0] sign = 1; 803344e: 2601 movs r6, #1 8033450: 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) 8033454: 1852 adds r2, r2, r1 8033456: fa1f fc8c uxth.w ip, ip 803345a: b292 uxth r2, r2 len--; if (sign) { *lsb_ptr &= *msg_ptr; *value <<= 8; *lsb_ptr |= 255; 803345c: 21ff movs r1, #255 ; 0xff 803345e: e022 b.n 80334a6 sign = 1; } else { /* positive, start from 0 */ *value = 0; 8033460: 2600 movs r6, #0 8033462: 601e str r6, [r3, #0] 8033464: e7f4 b.n 8033450 8033466: f895 8000 ldrb.w r8, [r5] } /* OR/AND octets with value */ while (len > 1) { len--; if (sign) 803346a: b13e cbz r6, 803347c { *lsb_ptr &= *msg_ptr; 803346c: ea08 0707 and.w r7, r8, r7 8033470: 701f strb r7, [r3, #0] *value <<= 8; 8033472: 681f ldr r7, [r3, #0] 8033474: 023f lsls r7, r7, #8 8033476: 601f str r7, [r3, #0] *lsb_ptr |= 255; 8033478: 7019 strb r1, [r3, #0] 803347a: e005 b.n 8033488 } else { *lsb_ptr |= *msg_ptr; 803347c: ea48 0707 orr.w r7, r8, r7 8033480: 701f strb r7, [r3, #0] *value <<= 8; 8033482: 681f ldr r7, [r3, #0] 8033484: 023f lsls r7, r7, #8 8033486: 601f str r7, [r3, #0] } ofs += 1; if (ofs >= plen) 8033488: 45a4 cmp ip, r4 803348a: d307 bcc.n 803349c { /* next octet in next pbuf */ p = p->next; 803348c: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 803348e: 2800 cmp r0, #0 8033490: d0d5 beq.n 803343e msg_ptr = (u8_t*)p->payload; plen += p->len; 8033492: 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; 8033494: 6845 ldr r5, [r0, #4] plen += p->len; 8033496: 19e4 adds r4, r4, r7 8033498: b2a4 uxth r4, r4 803349a: e000 b.n 803349e } else { /* next octet in same pbuf */ msg_ptr++; 803349c: 3501 adds r5, #1 803349e: f10c 0c01 add.w ip, ip, #1 80334a2: fa1f fc8c uxth.w ip, ip /* positive, start from 0 */ *value = 0; sign = 0; } /* OR/AND octets with value */ while (len > 1) 80334a6: 4594 cmp ip, r2 80334a8: 781f ldrb r7, [r3, #0] 80334aa: d1dc bne.n 8033466 80334ac: 782a ldrb r2, [r5, #0] { /* next octet in same pbuf */ msg_ptr++; } } if (sign) 80334ae: b11e cbz r6, 80334b8 { *lsb_ptr &= *msg_ptr; 80334b0: 4017 ands r7, r2 80334b2: 701f strb r7, [r3, #0] } else { *lsb_ptr |= *msg_ptr; } return ERR_OK; 80334b4: 2000 movs r0, #0 80334b6: e006 b.n 80334c6 { *lsb_ptr &= *msg_ptr; } else { *lsb_ptr |= *msg_ptr; 80334b8: 4317 orrs r7, r2 80334ba: e7fa b.n 80334b2 else { return ERR_ARG; } } p = p->next; 80334bc: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 80334be: 4625 mov r5, r4 u8_t *lsb_ptr = (u8_t*)value + sizeof(s32_t) - 1; #endif u8_t sign; plen = 0; while (p != NULL) 80334c0: 2800 cmp r0, #0 80334c2: d1ae bne.n 8033422 80334c4: e7bb b.n 803343e } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 80334c6: b240 sxtb r0, r0 80334c8: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 080334cc : * @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) { 80334cc: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} u16_t plen, base; u8_t *msg_ptr; s32_t *oid_ptr; plen = 0; 80334d0: 2600 movs r6, #0 while (p != NULL) 80334d2: e08d b.n 80335f0 { base = plen; plen += p->len; 80334d4: 8944 ldrh r4, [r0, #10] 80334d6: 1934 adds r4, r6, r4 80334d8: b2a4 uxth r4, r4 if (ofs < plen) 80334da: 42a1 cmp r1, r4 80334dc: f080 8086 bcs.w 80335ec { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; oid->len = 0; 80334e0: f04f 0800 mov.w r8, #0 { base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; 80334e4: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; oid->len = 0; 80334e6: f883 8000 strb.w r8, [r3] oid_ptr = &oid->id[0]; if (len > 0) 80334ea: b90a cbnz r2, 80334f0 } else { /* accepting zero length identifiers e.g. for getnext operation. uncommon but valid */ return ERR_OK; 80334ec: 2000 movs r0, #0 80334ee: e083 b.n 80335f8 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 80334f0: 1b8e subs r6, r1, r6 80334f2: 19bd adds r5, r7, r6 oid->len = 0; oid_ptr = &oid->id[0]; if (len > 0) { /* first compressed octet */ if (*msg_ptr == 0x2B) 80334f4: f817 c006 ldrb.w ip, [r7, r6] 80334f8: f1bc 0f2b cmp.w ip, #43 ; 0x2b 80334fc: d103 bne.n 8033506 { /* (most) common case 1.3 (iso.org) */ *oid_ptr = 1; 80334fe: 2601 movs r6, #1 8033500: 605e str r6, [r3, #4] oid_ptr++; *oid_ptr = 3; 8033502: 2603 movs r6, #3 8033504: e016 b.n 8033534 oid_ptr++; } else if (*msg_ptr < 40) 8033506: f1bc 0f27 cmp.w ip, #39 ; 0x27 803350a: d803 bhi.n 8033514 { *oid_ptr = 0; 803350c: f8c3 8004 str.w r8, [r3, #4] oid_ptr++; *oid_ptr = *msg_ptr; 8033510: 5dbe ldrb r6, [r7, r6] 8033512: e00f b.n 8033534 oid_ptr++; } else if (*msg_ptr < 80) 8033514: f1bc 0f4f cmp.w ip, #79 ; 0x4f 8033518: d806 bhi.n 8033528 { *oid_ptr = 1; 803351a: f04f 0c01 mov.w ip, #1 803351e: f8c3 c004 str.w ip, [r3, #4] oid_ptr++; *oid_ptr = (*msg_ptr) - 40; 8033522: 5dbe ldrb r6, [r7, r6] 8033524: 3e28 subs r6, #40 ; 0x28 8033526: e005 b.n 8033534 oid_ptr++; } else { *oid_ptr = 2; 8033528: f04f 0c02 mov.w ip, #2 803352c: f8c3 c004 str.w ip, [r3, #4] oid_ptr++; *oid_ptr = (*msg_ptr) - 80; 8033530: 5dbe ldrb r6, [r7, r6] 8033532: 3e50 subs r6, #80 ; 0x50 { /* accepting zero length identifiers e.g. for getnext operation. uncommon but valid */ return ERR_OK; } len--; 8033534: 3a01 subs r2, #1 *oid_ptr = 2; oid_ptr++; *oid_ptr = (*msg_ptr) - 80; oid_ptr++; } oid->len = 2; 8033536: 2702 movs r7, #2 { /* accepting zero length identifiers e.g. for getnext operation. uncommon but valid */ return ERR_OK; } len--; 8033538: b292 uxth r2, r2 } else { *oid_ptr = 2; oid_ptr++; *oid_ptr = (*msg_ptr) - 80; 803353a: 609e str r6, [r3, #8] oid_ptr++; } oid->len = 2; 803353c: 701f strb r7, [r3, #0] else { *oid_ptr = 2; oid_ptr++; *oid_ptr = (*msg_ptr) - 80; oid_ptr++; 803353e: 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) 8033542: 2a00 cmp r2, #0 8033544: d04b beq.n 80335de { ofs += 1; 8033546: 3101 adds r1, #1 8033548: b289 uxth r1, r1 if (ofs >= plen) 803354a: 42a1 cmp r1, r4 803354c: d308 bcc.n 8033560 { /* next octet in next pbuf */ p = p->next; 803354e: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033550: b908 cbnz r0, 8033556 8033552: 20f2 movs r0, #242 ; 0xf2 8033554: e050 b.n 80335f8 msg_ptr = (u8_t*)p->payload; plen += p->len; 8033556: 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; 8033558: 6845 ldr r5, [r0, #4] plen += p->len; 803355a: 19e4 adds r4, r4, r7 803355c: b2a4 uxth r4, r4 803355e: e03e b.n 80335de } else { /* next octet in same pbuf */ msg_ptr++; 8033560: 3501 adds r5, #1 8033562: e03c b.n 80335de } } while ((len > 0) && (oid->len < LWIP_SNMP_OBJ_ID_LEN)) { /* sub-identifier uses multiple octets */ if (*msg_ptr & 0x80) 8033564: 782f ldrb r7, [r5, #0] 8033566: f017 0f80 tst.w r7, #128 ; 0x80 803356a: d023 beq.n 80335b4 803356c: e014 b.n 8033598 while ((*msg_ptr & 0x80) && (len > 1)) { len--; sub_id = (sub_id << 7) + (*msg_ptr & ~0x80); ofs += 1; 803356e: 3101 adds r1, #1 8033570: b289 uxth r1, r1 { s32_t sub_id = 0; while ((*msg_ptr & 0x80) && (len > 1)) { len--; 8033572: 3a01 subs r2, #1 sub_id = (sub_id << 7) + (*msg_ptr & ~0x80); 8033574: f02c 0c80 bic.w ip, ip, #128 ; 0x80 ofs += 1; if (ofs >= plen) 8033578: 42a1 cmp r1, r4 { s32_t sub_id = 0; while ((*msg_ptr & 0x80) && (len > 1)) { len--; 803357a: b292 uxth r2, r2 sub_id = (sub_id << 7) + (*msg_ptr & ~0x80); 803357c: eb0c 17c7 add.w r7, ip, r7, lsl #7 ofs += 1; if (ofs >= plen) 8033580: d308 bcc.n 8033594 { /* next octet in next pbuf */ p = p->next; 8033582: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033584: 2800 cmp r0, #0 8033586: d0e4 beq.n 8033552 msg_ptr = (u8_t*)p->payload; plen += p->len; 8033588: 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; 803358c: 6845 ldr r5, [r0, #4] plen += p->len; 803358e: 4464 add r4, ip 8033590: b2a4 uxth r4, r4 8033592: e002 b.n 803359a } else { /* next octet in same pbuf */ msg_ptr++; 8033594: 3501 adds r5, #1 8033596: e000 b.n 803359a } } while ((len > 0) && (oid->len < LWIP_SNMP_OBJ_ID_LEN)) { /* sub-identifier uses multiple octets */ if (*msg_ptr & 0x80) 8033598: 2700 movs r7, #0 { s32_t sub_id = 0; while ((*msg_ptr & 0x80) && (len > 1)) 803359a: f895 c000 ldrb.w ip, [r5] 803359e: f01c 0f80 tst.w ip, #128 ; 0x80 80335a2: d02c beq.n 80335fe 80335a4: 2a01 cmp r2, #1 80335a6: d1e2 bne.n 803356e 80335a8: e009 b.n 80335be } } if (!(*msg_ptr & 0x80) && (len > 0)) { /* last octet sub-identifier */ len--; 80335aa: 3a01 subs r2, #1 80335ac: b292 uxth r2, r2 sub_id = (sub_id << 7) + *msg_ptr; 80335ae: eb0c 17c7 add.w r7, ip, r7, lsl #7 80335b2: e001 b.n 80335b8 } } else { /* !(*msg_ptr & 0x80) sub-identifier uses single octet */ len--; 80335b4: 3a01 subs r2, #1 80335b6: b292 uxth r2, r2 *oid_ptr = *msg_ptr; 80335b8: f846 7c04 str.w r7, [r6, #-4] } if (len > 0) 80335bc: b162 cbz r2, 80335d8 { /* remaining oid bytes available ... */ ofs += 1; 80335be: 3101 adds r1, #1 80335c0: b289 uxth r1, r1 if (ofs >= plen) 80335c2: 42a1 cmp r1, r4 80335c4: d307 bcc.n 80335d6 { /* next octet in next pbuf */ p = p->next; 80335c6: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80335c8: 2800 cmp r0, #0 80335ca: d0c2 beq.n 8033552 msg_ptr = (u8_t*)p->payload; plen += p->len; 80335cc: 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; 80335ce: 6845 ldr r5, [r0, #4] plen += p->len; 80335d0: 19e4 adds r4, r4, r7 80335d2: b2a4 uxth r4, r4 80335d4: e000 b.n 80335d8 } else { /* next octet in same pbuf */ msg_ptr++; 80335d6: 3501 adds r5, #1 } } oid_ptr++; oid->len++; 80335d8: 781f ldrb r7, [r3, #0] 80335da: 3701 adds r7, #1 80335dc: 701f strb r7, [r3, #0] 80335de: 3604 adds r6, #4 { /* next octet in same pbuf */ msg_ptr++; } } while ((len > 0) && (oid->len < LWIP_SNMP_OBJ_ID_LEN)) 80335e0: 2a00 cmp r2, #0 80335e2: d083 beq.n 80334ec 80335e4: 781f ldrb r7, [r3, #0] 80335e6: 2f1f cmp r7, #31 80335e8: d9bc bls.n 8033564 80335ea: e7b2 b.n 8033552 /* len > 0, oid->len == LWIP_SNMP_OBJ_ID_LEN or malformed encoding */ return ERR_ARG; } } p = p->next; 80335ec: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 80335ee: 4626 mov r6, r4 u16_t plen, base; u8_t *msg_ptr; s32_t *oid_ptr; plen = 0; while (p != NULL) 80335f0: 2800 cmp r0, #0 80335f2: f47f af6f bne.w 80334d4 80335f6: e7ac b.n 8033552 80335f8: b240 sxtb r0, r0 80335fa: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} { /* next octet in same pbuf */ msg_ptr++; } } if (!(*msg_ptr & 0x80) && (len > 0)) 80335fe: 2a00 cmp r2, #0 8033600: d1d3 bne.n 80335aa 8033602: e7e9 b.n 80335d8 08033604 : * @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) { 8033604: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; if (len > 0) 8033606: 2a00 cmp r2, #0 8033608: d12d bne.n 8033666 803360a: e027 b.n 803365c { plen = 0; while (p != NULL) { base = plen; plen += p->len; 803360c: 8944 ldrh r4, [r0, #10] 803360e: 1934 adds r4, r6, r4 8033610: b2a4 uxth r4, r4 if (ofs < plen) 8033612: 42a1 cmp r1, r4 8033614: d224 bcs.n 8033660 { msg_ptr = (u8_t*)p->payload; 8033616: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 8033618: 1b8d subs r5, r1, r6 if (raw_len >= len) 803361a: 4293 cmp r3, r2 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 803361c: 443d add r5, r7 if (raw_len >= len) 803361e: d305 bcc.n 803362c 8033620: 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) 8033622: b29e uxth r6, r3 8033624: 18b2 adds r2, r6, r2 8033626: b292 uxth r2, r2 8033628: 1b89 subs r1, r1, r6 803362a: e011 b.n 8033650 return ERR_OK; } else { /* raw_len < len, not enough dst space */ return ERR_ARG; 803362c: 20f2 movs r0, #242 ; 0xf2 803362e: e01e b.n 803366e { while (len > 1) { /* copy len - 1 octets */ len--; *raw = *msg_ptr; 8033630: 782e ldrb r6, [r5, #0] 8033632: 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) 8033636: 18ce adds r6, r1, r3 /* copy len - 1 octets */ len--; *raw = *msg_ptr; raw++; ofs += 1; if (ofs >= plen) 8033638: b2b6 uxth r6, r6 803363a: 42a6 cmp r6, r4 803363c: d307 bcc.n 803364e { /* next octet in next pbuf */ p = p->next; 803363e: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033640: 2800 cmp r0, #0 8033642: d0f3 beq.n 803362c msg_ptr = (u8_t*)p->payload; plen += p->len; 8033644: 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; 8033646: 6845 ldr r5, [r0, #4] plen += p->len; 8033648: 19a4 adds r4, r4, r6 803364a: b2a4 uxth r4, r4 803364c: e000 b.n 8033650 } else { /* next octet in same pbuf */ msg_ptr++; 803364e: 3501 adds r5, #1 { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if (raw_len >= len) { while (len > 1) 8033650: 1ad7 subs r7, r2, r3 8033652: b2bf uxth r7, r7 8033654: 2f01 cmp r7, #1 8033656: d8eb bhi.n 8033630 /* next octet in same pbuf */ msg_ptr++; } } /* copy last octet */ *raw = *msg_ptr; 8033658: 782a ldrb r2, [r5, #0] 803365a: 701a strb r2, [r3, #0] return ERR_OK; 803365c: 2000 movs r0, #0 803365e: e006 b.n 803366e { /* raw_len < len, not enough dst space */ return ERR_ARG; } } p = p->next; 8033660: 6800 ldr r0, [r0, #0] { plen = 0; while (p != NULL) { base = plen; plen += p->len; 8033662: 4626 mov r6, r4 8033664: e000 b.n 8033668 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) 8033666: 2600 movs r6, #0 { plen = 0; while (p != NULL) 8033668: 2800 cmp r0, #0 803366a: d1cf bne.n 803360c 803366c: e7de b.n 803362c else { /* len == 0, empty string */ return ERR_OK; } } 803366e: b240 sxtb r0, r0 8033670: bdf0 pop {r4, r5, r6, r7, pc} 08033672 : * @param octets_needed points to the return value */ void snmp_asn1_enc_length_cnt(u16_t length, u8_t *octets_needed) { if (length < 0x80U) 8033672: 287f cmp r0, #127 ; 0x7f 8033674: d801 bhi.n 803367a { *octets_needed = 1; 8033676: 2301 movs r3, #1 8033678: e004 b.n 8033684 } else if (length < 0x100U) 803367a: 28ff cmp r0, #255 ; 0xff 803367c: d801 bhi.n 8033682 { *octets_needed = 2; 803367e: 2302 movs r3, #2 8033680: e000 b.n 8033684 } else { *octets_needed = 3; 8033682: 2303 movs r3, #3 8033684: 700b strb r3, [r1, #0] 8033686: 4770 bx lr 08033688 : * 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) 8033688: 287f cmp r0, #127 ; 0x7f 803368a: d801 bhi.n 8033690 { *octets_needed = 1; 803368c: 2301 movs r3, #1 803368e: e00e b.n 80336ae } else if (value < 0x8000UL) 8033690: f5b0 4f00 cmp.w r0, #32768 ; 0x8000 8033694: d201 bcs.n 803369a { *octets_needed = 2; 8033696: 2302 movs r3, #2 8033698: e009 b.n 80336ae } else if (value < 0x800000UL) 803369a: f5b0 0f00 cmp.w r0, #8388608 ; 0x800000 803369e: d201 bcs.n 80336a4 { *octets_needed = 3; 80336a0: 2303 movs r3, #3 80336a2: e004 b.n 80336ae } else if (value < 0x80000000UL) 80336a4: 2800 cmp r0, #0 80336a6: db01 blt.n 80336ac { *octets_needed = 4; 80336a8: 2304 movs r3, #4 80336aa: e000 b.n 80336ae } else { *octets_needed = 5; 80336ac: 2305 movs r3, #5 80336ae: 800b strh r3, [r1, #0] 80336b0: 4770 bx lr 080336b2 : void snmp_asn1_enc_s32t_cnt(s32_t value, u16_t *octets_needed) { if (value < 0) { value = ~value; 80336b2: 43c3 mvns r3, r0 80336b4: 4283 cmp r3, r0 80336b6: bfa8 it ge 80336b8: 4618 movge r0, r3 } if (value < 0x80L) 80336ba: 287f cmp r0, #127 ; 0x7f 80336bc: dc01 bgt.n 80336c2 { *octets_needed = 1; 80336be: 2301 movs r3, #1 80336c0: e00a b.n 80336d8 } else if (value < 0x8000L) 80336c2: f5b0 4f00 cmp.w r0, #32768 ; 0x8000 80336c6: da01 bge.n 80336cc { *octets_needed = 2; 80336c8: 2302 movs r3, #2 80336ca: e005 b.n 80336d8 } else if (value < 0x800000L) 80336cc: f5b0 0f00 cmp.w r0, #8388608 ; 0x800000 80336d0: da01 bge.n 80336d6 { *octets_needed = 3; 80336d2: 2303 movs r3, #3 80336d4: e000 b.n 80336d8 } else { *octets_needed = 4; 80336d6: 2304 movs r3, #4 80336d8: 800b strh r3, [r1, #0] 80336da: 4770 bx lr 080336dc : { s32_t sub_id; u8_t cnt; cnt = 0; if (ident_len > 1) 80336dc: 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) { 80336de: b510 push {r4, lr} s32_t sub_id; u8_t cnt; cnt = 0; if (ident_len > 1) 80336e0: d904 bls.n 80336ec { /* compressed prefix in one octet */ cnt++; ident_len -= 2; 80336e2: 3802 subs r0, #2 80336e4: b2c0 uxtb r0, r0 ident += 2; 80336e6: 3108 adds r1, #8 cnt = 0; if (ident_len > 1) { /* compressed prefix in one octet */ cnt++; 80336e8: 2301 movs r3, #1 80336ea: e000 b.n 80336ee 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; 80336ec: 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) 80336ee: 3904 subs r1, #4 80336f0: e008 b.n 8033704 ident_len -= 2; ident += 2; } while(ident_len > 0) { ident_len--; 80336f2: 3801 subs r0, #1 sub_id = *ident; 80336f4: f851 4f04 ldr.w r4, [r1, #4]! ident_len -= 2; ident += 2; } while(ident_len > 0) { ident_len--; 80336f8: b2c0 uxtb r0, r0 sub_id >>= 7; cnt++; while(sub_id > 0) { sub_id >>= 7; 80336fa: 11e4 asrs r4, r4, #7 cnt++; 80336fc: 3301 adds r3, #1 ident_len--; sub_id = *ident; sub_id >>= 7; cnt++; while(sub_id > 0) 80336fe: 2c00 cmp r4, #0 { sub_id >>= 7; cnt++; 8033700: b2db uxtb r3, r3 ident_len--; sub_id = *ident; sub_id >>= 7; cnt++; while(sub_id > 0) 8033702: dcfa bgt.n 80336fa /* compressed prefix in one octet */ cnt++; ident_len -= 2; ident += 2; } while(ident_len > 0) 8033704: 2800 cmp r0, #0 8033706: d1f4 bne.n 80336f2 sub_id >>= 7; cnt++; } ident++; } *octets_needed = cnt; 8033708: 8013 strh r3, [r2, #0] 803370a: bd10 pop {r4, pc} 0803370c : * @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) { 803370c: b510 push {r4, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 803370e: 2300 movs r3, #0 while (p != NULL) 8033710: e00b b.n 803372a { base = plen; plen += p->len; 8033712: 8944 ldrh r4, [r0, #10] 8033714: 191c adds r4, r3, r4 8033716: b2a4 uxth r4, r4 if (ofs < plen) 8033718: 42a1 cmp r1, r4 803371a: d204 bcs.n 8033726 { msg_ptr = (u8_t*)p->payload; 803371c: 6840 ldr r0, [r0, #4] msg_ptr += ofs - base; 803371e: 1acb subs r3, r1, r3 *msg_ptr = type; 8033720: 54c2 strb r2, [r0, r3] return ERR_OK; 8033722: 2000 movs r0, #0 8033724: e004 b.n 8033730 } p = p->next; 8033726: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8033728: 4623 mov r3, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 803372a: 2800 cmp r0, #0 803372c: d1f1 bne.n 8033712 return ERR_OK; } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; 803372e: 20f2 movs r0, #242 ; 0xf2 } 8033730: b240 sxtb r0, r0 8033732: bd10 pop {r4, pc} 08033734 : * @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) { 8033734: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8033736: 2400 movs r4, #0 while (p != NULL) 8033738: e03f b.n 80337ba { base = plen; plen += p->len; 803373a: 8943 ldrh r3, [r0, #10] 803373c: 18e3 adds r3, r4, r3 803373e: b29b uxth r3, r3 if (ofs < plen) 8033740: 4299 cmp r1, r3 8033742: d238 bcs.n 80337b6 { msg_ptr = (u8_t*)p->payload; 8033744: 6845 ldr r5, [r0, #4] msg_ptr += ofs - base; 8033746: 1b0c subs r4, r1, r4 if (length < 0x80) 8033748: 2a7f cmp r2, #127 ; 0x7f base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 803374a: eb05 0604 add.w r6, r5, r4 if (length < 0x80) 803374e: d801 bhi.n 8033754 { *msg_ptr = (u8_t)length; 8033750: 552a strb r2, [r5, r4] 8033752: e02e b.n 80337b2 return ERR_OK; } else if (length < 0x100) 8033754: 2aff cmp r2, #255 ; 0xff 8033756: f101 0701 add.w r7, r1, #1 803375a: d80d bhi.n 8033778 { *msg_ptr = 0x81; ofs += 1; if (ofs >= plen) 803375c: b2bf uxth r7, r7 *msg_ptr = (u8_t)length; return ERR_OK; } else if (length < 0x100) { *msg_ptr = 0x81; 803375e: 2181 movs r1, #129 ; 0x81 ofs += 1; if (ofs >= plen) 8033760: 429f cmp r7, r3 *msg_ptr = (u8_t)length; return ERR_OK; } else if (length < 0x100) { *msg_ptr = 0x81; 8033762: 5529 strb r1, [r5, r4] ofs += 1; if (ofs >= plen) 8033764: d305 bcc.n 8033772 { /* next octet in next pbuf */ p = p->next; 8033766: 6803 ldr r3, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033768: b90b cbnz r3, 803376e 803376a: 20f2 movs r0, #242 ; 0xf2 803376c: e028 b.n 80337c0 msg_ptr = (u8_t*)p->payload; 803376e: 685e ldr r6, [r3, #4] 8033770: e000 b.n 8033774 } else { /* next octet in same pbuf */ msg_ptr++; 8033772: 3601 adds r6, #1 } *msg_ptr = (u8_t)length; 8033774: 7032 strb r2, [r6, #0] 8033776: e01c b.n 80337b2 i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 8033778: b2bf uxth r7, r7 else { u8_t i; /* length >= 0x100 && length <= 0xFFFF */ *msg_ptr = 0x82; 803377a: f04f 0c82 mov.w ip, #130 ; 0x82 i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 803377e: 429f cmp r7, r3 else { u8_t i; /* length >= 0x100 && length <= 0xFFFF */ *msg_ptr = 0x82; 8033780: f805 c004 strb.w ip, [r5, r4] i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 8033784: d201 bcs.n 803378a plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 8033786: 1c74 adds r4, r6, #1 8033788: e006 b.n 8033798 i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 803378a: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 803378c: 2800 cmp r0, #0 803378e: d0ec beq.n 803376a msg_ptr = (u8_t*)p->payload; plen += p->len; 8033790: 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; 8033792: 6844 ldr r4, [r0, #4] plen += p->len; 8033794: 195b adds r3, r3, r5 8033796: b29b uxth r3, r3 *msg_ptr = 0x82; i = 2; while (i > 0) { i--; ofs += 1; 8033798: 3102 adds r1, #2 if (ofs >= plen) 803379a: b289 uxth r1, r1 *msg_ptr = (u8_t)length; } else { /* most significant length octet */ *msg_ptr = (u8_t)(length >> 8); 803379c: 0a15 lsrs r5, r2, #8 i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 803379e: 4299 cmp r1, r3 *msg_ptr = (u8_t)length; } else { /* most significant length octet */ *msg_ptr = (u8_t)(length >> 8); 80337a0: 7025 strb r5, [r4, #0] i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 80337a2: d201 bcs.n 80337a8 plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 80337a4: 3401 adds r4, #1 80337a6: e003 b.n 80337b0 i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 80337a8: 6803 ldr r3, [r0, #0] if (p == NULL) { return ERR_ARG; } 80337aa: 2b00 cmp r3, #0 80337ac: d0dd beq.n 803376a msg_ptr = (u8_t*)p->payload; 80337ae: 685c ldr r4, [r3, #4] msg_ptr++; } if (i == 0) { /* least significant length octet */ *msg_ptr = (u8_t)length; 80337b0: 7022 strb r2, [r4, #0] { /* most significant length octet */ *msg_ptr = (u8_t)(length >> 8); } } return ERR_OK; 80337b2: 2000 movs r0, #0 80337b4: e004 b.n 80337c0 } } p = p->next; 80337b6: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 80337b8: 461c mov r4, r3 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 80337ba: 2800 cmp r0, #0 80337bc: d1bd bne.n 803373a 80337be: e7d4 b.n 803376a } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 80337c0: b240 sxtb r0, r0 80337c2: bdf0 pop {r4, r5, r6, r7, pc} 080337c4 : * * @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) { 80337c4: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 80337c6: 2500 movs r5, #0 while (p != NULL) 80337c8: e037 b.n 803383a { base = plen; plen += p->len; 80337ca: 8944 ldrh r4, [r0, #10] 80337cc: 192c adds r4, r5, r4 80337ce: b2a4 uxth r4, r4 if (ofs < plen) 80337d0: 42a1 cmp r1, r4 80337d2: d230 bcs.n 8033836 { msg_ptr = (u8_t*)p->payload; 80337d4: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 80337d6: 1b4e subs r6, r1, r5 if (octets_needed == 5) 80337d8: 2a05 cmp r2, #5 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 80337da: eb07 0506 add.w r5, r7, r6 if (octets_needed == 5) 80337de: d110 bne.n 8033802 { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; *msg_ptr = 0x00; ofs += 1; 80337e0: 3101 adds r1, #1 80337e2: b289 uxth r1, r1 if (octets_needed == 5) { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; *msg_ptr = 0x00; 80337e4: 2200 movs r2, #0 ofs += 1; if (ofs >= plen) 80337e6: 42a1 cmp r1, r4 if (octets_needed == 5) { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; *msg_ptr = 0x00; 80337e8: 55ba strb r2, [r7, r6] ofs += 1; if (ofs >= plen) 80337ea: d308 bcc.n 80337fe { /* next octet in next pbuf */ p = p->next; 80337ec: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80337ee: b908 cbnz r0, 80337f4 80337f0: 20f2 movs r0, #242 ; 0xf2 80337f2: e025 b.n 8033840 msg_ptr = (u8_t*)p->payload; plen += p->len; 80337f4: 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; 80337f6: 6845 ldr r5, [r0, #4] plen += p->len; 80337f8: 18a4 adds r4, r4, r2 80337fa: b2a4 uxth r4, r4 80337fc: e000 b.n 8033800 } else { /* next octet in same pbuf */ msg_ptr++; 80337fe: 3501 adds r5, #1 msg_ptr += ofs - base; if (octets_needed == 5) { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; 8033800: 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) 8033802: 1851 adds r1, r2, r1 8033804: e012 b.n 803382c msg_ptr++; } } while (octets_needed > 1) { octets_needed--; 8033806: 3a01 subs r2, #1 8033808: b292 uxth r2, r2 *msg_ptr = (u8_t)(value >> (octets_needed << 3)); 803380a: 00d6 lsls r6, r2, #3 803380c: fa23 f606 lsr.w r6, r3, r6 8033810: 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) 8033812: 1a8e subs r6, r1, r2 while (octets_needed > 1) { octets_needed--; *msg_ptr = (u8_t)(value >> (octets_needed << 3)); ofs += 1; if (ofs >= plen) 8033814: b2b6 uxth r6, r6 8033816: 42a6 cmp r6, r4 8033818: d307 bcc.n 803382a { /* next octet in next pbuf */ p = p->next; 803381a: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 803381c: 2800 cmp r0, #0 803381e: d0e7 beq.n 80337f0 msg_ptr = (u8_t*)p->payload; plen += p->len; 8033820: 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; 8033822: 6845 ldr r5, [r0, #4] plen += p->len; 8033824: 19a4 adds r4, r4, r6 8033826: b2a4 uxth r4, r4 8033828: e000 b.n 803382c } else { /* next octet in same pbuf */ msg_ptr++; 803382a: 3501 adds r5, #1 { /* next octet in same pbuf */ msg_ptr++; } } while (octets_needed > 1) 803382c: 2a01 cmp r2, #1 803382e: d8ea bhi.n 8033806 /* next octet in same pbuf */ msg_ptr++; } } /* (only) one least significant octet */ *msg_ptr = (u8_t)value; 8033830: 702b strb r3, [r5, #0] return ERR_OK; 8033832: 2000 movs r0, #0 8033834: e004 b.n 8033840 } p = p->next; 8033836: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8033838: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 803383a: 2800 cmp r0, #0 803383c: d1c5 bne.n 80337ca 803383e: e7d7 b.n 80337f0 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 8033840: b240 sxtb r0, r0 8033842: bdf0 pop {r4, r5, r6, r7, pc} 08033844 : * * @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) { 8033844: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8033846: 2600 movs r6, #0 while (p != NULL) 8033848: e024 b.n 8033894 { base = plen; plen += p->len; 803384a: 8944 ldrh r4, [r0, #10] 803384c: 1934 adds r4, r6, r4 803384e: b2a4 uxth r4, r4 if (ofs < plen) 8033850: 42a1 cmp r1, r4 8033852: d21d bcs.n 8033890 { msg_ptr = (u8_t*)p->payload; 8033854: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 8033856: 1b8d subs r5, r1, r6 8033858: 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) 803385a: 1851 adds r1, r2, r1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (octets_needed > 1) 803385c: e013 b.n 8033886 { octets_needed--; 803385e: 3a01 subs r2, #1 8033860: b292 uxth r2, r2 *msg_ptr = (u8_t)(value >> (octets_needed << 3)); 8033862: 00d6 lsls r6, r2, #3 8033864: fa43 f606 asr.w r6, r3, r6 8033868: 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) 803386a: 1a8e subs r6, r1, r2 while (octets_needed > 1) { octets_needed--; *msg_ptr = (u8_t)(value >> (octets_needed << 3)); ofs += 1; if (ofs >= plen) 803386c: b2b6 uxth r6, r6 803386e: 42a6 cmp r6, r4 8033870: d308 bcc.n 8033884 { /* next octet in next pbuf */ p = p->next; 8033872: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033874: b908 cbnz r0, 803387a 8033876: 20f2 movs r0, #242 ; 0xf2 8033878: e00f b.n 803389a msg_ptr = (u8_t*)p->payload; plen += p->len; 803387a: 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; 803387c: 6845 ldr r5, [r0, #4] plen += p->len; 803387e: 19a4 adds r4, r4, r6 8033880: b2a4 uxth r4, r4 8033882: e000 b.n 8033886 } else { /* next octet in same pbuf */ msg_ptr++; 8033884: 3501 adds r5, #1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (octets_needed > 1) 8033886: 2a01 cmp r2, #1 8033888: d8e9 bhi.n 803385e /* next octet in same pbuf */ msg_ptr++; } } /* (only) one least significant octet */ *msg_ptr = (u8_t)value; 803388a: 702b strb r3, [r5, #0] return ERR_OK; 803388c: 2000 movs r0, #0 803388e: e004 b.n 803389a } p = p->next; 8033890: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8033892: 4626 mov r6, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8033894: 2800 cmp r0, #0 8033896: d1d8 bne.n 803384a 8033898: e7ed b.n 8033876 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 803389a: b240 sxtb r0, r0 803389c: bdf0 pop {r4, r5, r6, r7, pc} 0803389e : * @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) { 803389e: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 80338a2: 2500 movs r5, #0 while (p != NULL) 80338a4: e068 b.n 8033978 { base = plen; plen += p->len; 80338a6: 8944 ldrh r4, [r0, #10] 80338a8: 192c adds r4, r5, r4 80338aa: b2a4 uxth r4, r4 if (ofs < plen) 80338ac: 42a1 cmp r1, r4 80338ae: d261 bcs.n 8033974 { msg_ptr = (u8_t*)p->payload; 80338b0: 6846 ldr r6, [r0, #4] msg_ptr += ofs - base; 80338b2: 1b4d subs r5, r1, r5 if (ident_len > 1) 80338b4: 2a01 cmp r2, #1 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 80338b6: eb06 0805 add.w r8, r6, r5 if (ident_len > 1) 80338ba: d801 bhi.n 80338c0 } 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; 80338bc: 20f2 movs r0, #242 ; 0xf2 80338be: e05e b.n 803397e msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if (ident_len > 1) { if ((ident[0] == 1) && (ident[1] == 3)) 80338c0: f8d3 c000 ldr.w ip, [r3] 80338c4: f1bc 0f01 cmp.w ip, #1 80338c8: d105 bne.n 80338d6 80338ca: 685f ldr r7, [r3, #4] 80338cc: 2f03 cmp r7, #3 80338ce: d102 bne.n 80338d6 { /* compressed (most common) prefix .iso.org */ *msg_ptr = 0x2b; 80338d0: 272b movs r7, #43 ; 0x2b 80338d2: 5577 strb r7, [r6, r5] 80338d4: e006 b.n 80338e4 } else { /* calculate prefix */ *msg_ptr = (u8_t)((ident[0] * 40) + ident[1]); 80338d6: 685f ldr r7, [r3, #4] 80338d8: f04f 0928 mov.w r9, #40 ; 0x28 80338dc: fb09 7c0c mla ip, r9, ip, r7 80338e0: f806 c005 strb.w ip, [r6, r5] } ofs += 1; 80338e4: 3101 adds r1, #1 80338e6: b289 uxth r1, r1 if (ofs >= plen) 80338e8: 42a1 cmp r1, r4 80338ea: d307 bcc.n 80338fc { /* next octet in next pbuf */ p = p->next; 80338ec: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80338ee: 2800 cmp r0, #0 80338f0: d0e4 beq.n 80338bc msg_ptr = (u8_t*)p->payload; plen += p->len; 80338f2: 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; 80338f4: 6845 ldr r5, [r0, #4] plen += p->len; 80338f6: 19a4 adds r4, r4, r6 80338f8: b2a4 uxth r4, r4 80338fa: e001 b.n 8033900 } else { /* next octet in same pbuf */ msg_ptr++; 80338fc: f108 0501 add.w r5, r8, #1 } ident_len -= 2; 8033900: 3a02 subs r2, #2 8033902: 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) 8033904: 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) 8033906: e031 b.n 803396c { s32_t sub_id; u8_t shift, tail; ident_len--; 8033908: 3a01 subs r2, #1 sub_id = *ident; 803390a: f853 cf04 ldr.w ip, [r3, #4]! while (ident_len > 0) { s32_t sub_id; u8_t shift, tail; ident_len--; 803390e: b2d2 uxtb r2, r2 sub_id = *ident; 8033910: 261c movs r6, #28 tail = 0; 8033912: 2700 movs r7, #0 shift = 28; while(shift > 0) { u8_t code; code = (u8_t)(sub_id >> shift); 8033914: fa4c f806 asr.w r8, ip, r6 if ((code != 0) || (tail != 0)) 8033918: f018 0fff tst.w r8, #255 ; 0xff 803391c: d100 bne.n 8033920 803391e: b18f cbz r7, 8033944 { tail = 1; *msg_ptr = code | 0x80; ofs += 1; 8033920: 3101 adds r1, #1 8033922: b289 uxth r1, r1 code = (u8_t)(sub_id >> shift); if ((code != 0) || (tail != 0)) { tail = 1; *msg_ptr = code | 0x80; 8033924: f048 0880 orr.w r8, r8, #128 ; 0x80 ofs += 1; if (ofs >= plen) 8033928: 42a1 cmp r1, r4 code = (u8_t)(sub_id >> shift); if ((code != 0) || (tail != 0)) { tail = 1; *msg_ptr = code | 0x80; 803392a: f885 8000 strb.w r8, [r5] ofs += 1; if (ofs >= plen) 803392e: d307 bcc.n 8033940 { /* next octet in next pbuf */ p = p->next; 8033930: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033932: 2800 cmp r0, #0 8033934: d0c2 beq.n 80338bc msg_ptr = (u8_t*)p->payload; plen += p->len; 8033936: 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; 8033938: 6845 ldr r5, [r0, #4] plen += p->len; 803393a: 19e4 adds r4, r4, r7 803393c: b2a4 uxth r4, r4 803393e: e000 b.n 8033942 } else { /* next octet in same pbuf */ msg_ptr++; 8033940: 3501 adds r5, #1 u8_t code; code = (u8_t)(sub_id >> shift); if ((code != 0) || (tail != 0)) { tail = 1; 8033942: 2701 movs r7, #1 ident_len--; sub_id = *ident; tail = 0; shift = 28; while(shift > 0) 8033944: 3e07 subs r6, #7 8033946: d1e5 bne.n 8033914 msg_ptr++; } } shift -= 7; } *msg_ptr = (u8_t)sub_id & 0x7F; 8033948: f00c 0c7f and.w ip, ip, #127 ; 0x7f 803394c: f885 c000 strb.w ip, [r5] if (ident_len > 0) 8033950: b172 cbz r2, 8033970 { ofs += 1; 8033952: 3101 adds r1, #1 8033954: b289 uxth r1, r1 if (ofs >= plen) 8033956: 42a1 cmp r1, r4 8033958: d307 bcc.n 803396a { /* next octet in next pbuf */ p = p->next; 803395a: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 803395c: 2800 cmp r0, #0 803395e: d0ad beq.n 80338bc msg_ptr = (u8_t*)p->payload; plen += p->len; 8033960: 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; 8033962: 6845 ldr r5, [r0, #4] plen += p->len; 8033964: 19a4 adds r4, r4, r6 8033966: b2a4 uxth r4, r4 8033968: e000 b.n 803396c } else { /* next octet in same pbuf */ msg_ptr++; 803396a: 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) 803396c: 2a00 cmp r2, #0 803396e: d1cb bne.n 8033908 } } /* proceed to next sub-identifier */ ident++; } return ERR_OK; 8033970: 2000 movs r0, #0 8033972: e004 b.n 803397e } p = p->next; 8033974: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8033976: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8033978: 2800 cmp r0, #0 803397a: d194 bne.n 80338a6 803397c: e79e b.n 80338bc } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 803397e: b240 sxtb r0, r0 8033980: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 08033984 : * @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) { 8033984: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8033986: 2600 movs r6, #0 while (p != NULL) 8033988: e025 b.n 80339d6 { base = plen; plen += p->len; 803398a: 8944 ldrh r4, [r0, #10] 803398c: 1934 adds r4, r6, r4 803398e: b2a4 uxth r4, r4 if (ofs < plen) 8033990: 42a1 cmp r1, r4 8033992: d21e bcs.n 80339d2 { msg_ptr = (u8_t*)p->payload; 8033994: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 8033996: 1b8d subs r5, r1, r6 8033998: 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) 803399a: 1851 adds r1, r2, r1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (raw_len > 1) 803399c: e012 b.n 80339c4 { /* copy raw_len - 1 octets */ raw_len--; 803399e: 3a01 subs r2, #1 *msg_ptr = *raw; 80339a0: f813 6b01 ldrb.w r6, [r3], #1 msg_ptr += ofs - base; while (raw_len > 1) { /* copy raw_len - 1 octets */ raw_len--; 80339a4: b292 uxth r2, r2 *msg_ptr = *raw; 80339a6: 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) 80339a8: 1a8e subs r6, r1, r2 /* copy raw_len - 1 octets */ raw_len--; *msg_ptr = *raw; raw++; ofs += 1; if (ofs >= plen) 80339aa: b2b6 uxth r6, r6 80339ac: 42a6 cmp r6, r4 80339ae: d308 bcc.n 80339c2 { /* next octet in next pbuf */ p = p->next; 80339b0: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80339b2: b908 cbnz r0, 80339b8 80339b4: 20f2 movs r0, #242 ; 0xf2 80339b6: e012 b.n 80339de msg_ptr = (u8_t*)p->payload; plen += p->len; 80339b8: 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; 80339ba: 6845 ldr r5, [r0, #4] plen += p->len; 80339bc: 19a4 adds r4, r4, r6 80339be: b2a4 uxth r4, r4 80339c0: e000 b.n 80339c4 } else { /* next octet in same pbuf */ msg_ptr++; 80339c2: 3501 adds r5, #1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (raw_len > 1) 80339c4: 2a01 cmp r2, #1 80339c6: d8ea bhi.n 803399e { /* next octet in same pbuf */ msg_ptr++; } } if (raw_len > 0) 80339c8: b142 cbz r2, 80339dc { /* copy last or single octet */ *msg_ptr = *raw; 80339ca: 781b ldrb r3, [r3, #0] } return ERR_OK; 80339cc: 2000 movs r0, #0 } } if (raw_len > 0) { /* copy last or single octet */ *msg_ptr = *raw; 80339ce: 702b strb r3, [r5, #0] 80339d0: e005 b.n 80339de } return ERR_OK; } p = p->next; 80339d2: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 80339d4: 4626 mov r6, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 80339d6: 2800 cmp r0, #0 80339d8: d1d7 bne.n 803398a 80339da: e7eb b.n 80339b4 if (raw_len > 0) { /* copy last or single octet */ *msg_ptr = *raw; } return ERR_OK; 80339dc: 4610 mov r0, r2 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 80339de: b240 sxtb r0, r0 80339e0: bdf0 pop {r4, r5, r6, r7, pc} 080339e2 : 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; 80339e2: 2300 movs r3, #0 80339e4: 7013 strb r3, [r2, #0] 80339e6: 4770 bx lr 080339e8 : } void noleafs_get_value(struct obj_def *od, u16_t len, void *value) { 80339e8: 4770 bx lr 080339ea : LWIP_UNUSED_ARG(od); LWIP_UNUSED_ARG(len); LWIP_UNUSED_ARG(value); /* can't set */ return 0; } 80339ea: 2000 movs r0, #0 80339ec: 4770 bx lr 080339ee : void noleafs_set_value(struct obj_def *od, u16_t len, void *value) { 80339ee: 4770 bx lr 080339f0 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 80339f0: 2801 cmp r0, #1 80339f2: d145 bne.n 8033a80 { od->id_inst_len = ident_len; 80339f4: 2002 movs r0, #2 { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 80339f6: 1f0b subs r3, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; 80339f8: 7190 strb r0, [r2, #6] od->id_inst_ptr = ident; 80339fa: 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) 80339fc: f811 3c04 ldrb.w r3, [r1, #-4] 8033a00: 3b01 subs r3, #1 8033a02: 2b06 cmp r3, #6 8033a04: d83c bhi.n 8033a80 8033a06: e8df f003 tbb [pc, r3] 8033a0a: 0b04 .short 0x0b04 8033a0c: 2a221a14 .word 0x2a221a14 8033a10: 34 .byte 0x34 8033a11: 00 .byte 0x00 { case 1: /* sysDescr */ od->instance = MIB_OBJECT_SCALAR; 8033a12: 2301 movs r3, #1 8033a14: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033a16: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8033a18: 2304 movs r3, #4 8033a1a: 7093 strb r3, [r2, #2] od->v_len = *sysdescr_len_ptr; 8033a1c: 4b1a ldr r3, [pc, #104] ; (8033a88 ) 8033a1e: e025 b.n 8033a6c break; case 2: /* sysObjectID */ od->instance = MIB_OBJECT_SCALAR; 8033a20: 2301 movs r3, #1 8033a22: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033a24: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID); 8033a26: 2306 movs r3, #6 8033a28: 7093 strb r3, [r2, #2] od->v_len = sysobjid.len * sizeof(s32_t); 8033a2a: 4b18 ldr r3, [pc, #96] ; (8033a8c ) 8033a2c: 781b ldrb r3, [r3, #0] 8033a2e: 009b lsls r3, r3, #2 8033a30: e024 b.n 8033a7c break; case 3: /* sysUpTime */ od->instance = MIB_OBJECT_SCALAR; 8033a32: 2301 movs r3, #1 8033a34: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033a36: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS); 8033a38: 2343 movs r3, #67 ; 0x43 8033a3a: 7093 strb r3, [r2, #2] 8033a3c: e01d b.n 8033a7a od->v_len = sizeof(u32_t); break; case 4: /* sysContact */ od->instance = MIB_OBJECT_SCALAR; 8033a3e: 2301 movs r3, #1 8033a40: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8033a42: 2303 movs r3, #3 8033a44: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8033a46: 2304 movs r3, #4 8033a48: 7093 strb r3, [r2, #2] od->v_len = *syscontact_len_ptr; 8033a4a: 4b11 ldr r3, [pc, #68] ; (8033a90 ) 8033a4c: e00e b.n 8033a6c break; case 5: /* sysName */ od->instance = MIB_OBJECT_SCALAR; 8033a4e: 2301 movs r3, #1 8033a50: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8033a52: 2303 movs r3, #3 8033a54: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8033a56: 2304 movs r3, #4 8033a58: 7093 strb r3, [r2, #2] od->v_len = *sysname_len_ptr; 8033a5a: 4b0e ldr r3, [pc, #56] ; (8033a94 ) 8033a5c: e006 b.n 8033a6c break; case 6: /* sysLocation */ od->instance = MIB_OBJECT_SCALAR; 8033a5e: 2301 movs r3, #1 8033a60: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8033a62: 2303 movs r3, #3 8033a64: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8033a66: 2304 movs r3, #4 8033a68: 7093 strb r3, [r2, #2] od->v_len = *syslocation_len_ptr; 8033a6a: 4b0b ldr r3, [pc, #44] ; (8033a98 ) 8033a6c: 681b ldr r3, [r3, #0] 8033a6e: 781b ldrb r3, [r3, #0] 8033a70: e004 b.n 8033a7c break; case 7: /* sysServices */ od->instance = MIB_OBJECT_SCALAR; 8033a72: 2301 movs r3, #1 8033a74: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033a76: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 8033a78: 7090 strb r0, [r2, #2] od->v_len = sizeof(s32_t); 8033a7a: 2304 movs r3, #4 8033a7c: 8093 strh r3, [r2, #4] break; 8033a7e: 4770 bx lr }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("system_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033a80: 2300 movs r3, #0 8033a82: 7013 strb r3, [r2, #0] 8033a84: 4770 bx lr 8033a86: bf00 nop 8033a88: 2000093c .word 0x2000093c 8033a8c: 200007ec .word 0x200007ec 8033a90: 20000798 .word 0x20000798 8033a94: 20000794 .word 0x20000794 8033a98: 20000980 .word 0x20000980 08033a9c : 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) 8033a9c: 2801 cmp r0, #1 8033a9e: d109 bne.n 8033ab4 { od->id_inst_len = ident_len; 8033aa0: 2302 movs r3, #2 8033aa2: 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; 8033aa4: 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); 8033aa6: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 8033aa8: 2304 movs r3, #4 ident_len += 1; ident -= 1; if (ident_len == 2) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8033aaa: 6091 str r1, [r2, #8] od->instance = MIB_OBJECT_SCALAR; 8033aac: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033aae: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); od->v_len = sizeof(s32_t); 8033ab0: 8093 strh r3, [r2, #4] 8033ab2: 4770 bx lr } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("interfaces_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033ab4: 2300 movs r3, #0 8033ab6: 7013 strb r3, [r2, #0] 8033ab8: 4770 bx lr 8033aba: 0000 movs r0, r0 08033abc : */ 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) 8033abc: 6883 ldr r3, [r0, #8] 8033abe: 681b ldr r3, [r3, #0] 8033ac0: 2b01 cmp r3, #1 8033ac2: d102 bne.n 8033aca { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = iflist_root.count; 8033ac4: 4b01 ldr r3, [pc, #4] ; (8033acc ) 8033ac6: 8b9b ldrh r3, [r3, #28] 8033ac8: 6013 str r3, [r2, #0] 8033aca: 4770 bx lr 8033acc: 200007cc .word 0x200007cc 08033ad0 : { 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]; 8033ad0: 6883 ldr r3, [r0, #8] switch (id) 8033ad2: 781b ldrb r3, [r3, #0] 8033ad4: 3b01 subs r3, #1 8033ad6: 2b16 cmp r3, #22 8033ad8: d836 bhi.n 8033b48 8033ada: e8df f003 tbb [pc, r3] 8033ade: 0e0c .short 0x0e0c 8033ae0: 16141210 .word 0x16141210 8033ae4: 1e1c1a18 .word 0x1e1c1a18 8033ae8: 26242220 .word 0x26242220 8033aec: 2e2c2a28 .word 0x2e2c2a28 8033af0: 35353530 .word 0x35353530 8033af4: 32 .byte 0x32 8033af5: 00 .byte 0x00 #if IP_FORWARD /* forwarding */ *sint_ptr = 1; #else /* not-forwarding */ *sint_ptr = 2; 8033af6: 2302 movs r3, #2 8033af8: e025 b.n 8033b46 } break; case 2: /* ipDefaultTTL */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = IP_DEFAULT_TTL; 8033afa: 23ff movs r3, #255 ; 0xff 8033afc: e023 b.n 8033b46 } break; case 3: /* ipInReceives */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinreceives; 8033afe: 4b13 ldr r3, [pc, #76] ; (8033b4c ) 8033b00: e020 b.n 8033b44 } break; case 4: /* ipInHdrErrors */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinhdrerrors; 8033b02: 4b13 ldr r3, [pc, #76] ; (8033b50 ) 8033b04: e01e b.n 8033b44 } break; case 5: /* ipInAddrErrors */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinaddrerrors; 8033b06: 4b13 ldr r3, [pc, #76] ; (8033b54 ) 8033b08: e01c b.n 8033b44 } break; case 6: /* ipForwDatagrams */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipforwdatagrams; 8033b0a: 4b13 ldr r3, [pc, #76] ; (8033b58 ) 8033b0c: e01a b.n 8033b44 } break; case 7: /* ipInUnknownProtos */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinunknownprotos; 8033b0e: 4b13 ldr r3, [pc, #76] ; (8033b5c ) 8033b10: e018 b.n 8033b44 } break; case 8: /* ipInDiscards */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipindiscards; 8033b12: 4b13 ldr r3, [pc, #76] ; (8033b60 ) 8033b14: e016 b.n 8033b44 } break; case 9: /* ipInDelivers */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipindelivers; 8033b16: 4b13 ldr r3, [pc, #76] ; (8033b64 ) 8033b18: e014 b.n 8033b44 } break; case 10: /* ipOutRequests */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipoutrequests; 8033b1a: 4b13 ldr r3, [pc, #76] ; (8033b68 ) 8033b1c: e012 b.n 8033b44 } break; case 11: /* ipOutDiscards */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipoutdiscards; 8033b1e: 4b13 ldr r3, [pc, #76] ; (8033b6c ) 8033b20: e010 b.n 8033b44 } break; case 12: /* ipOutNoRoutes */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipoutnoroutes; 8033b22: 4b13 ldr r3, [pc, #76] ; (8033b70 ) 8033b24: e00e b.n 8033b44 { s32_t *sint_ptr = (s32_t*)value; #if IP_REASSEMBLY *sint_ptr = IP_REASS_MAXAGE; #else *sint_ptr = 0; 8033b26: 2300 movs r3, #0 8033b28: e00d b.n 8033b46 } break; case 14: /* ipReasmReqds */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipreasmreqds; 8033b2a: 4b12 ldr r3, [pc, #72] ; (8033b74 ) 8033b2c: e00a b.n 8033b44 } break; case 15: /* ipReasmOKs */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipreasmoks; 8033b2e: 4b12 ldr r3, [pc, #72] ; (8033b78 ) 8033b30: e008 b.n 8033b44 } break; case 16: /* ipReasmFails */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipreasmfails; 8033b32: 4b12 ldr r3, [pc, #72] ; (8033b7c ) 8033b34: e006 b.n 8033b44 } break; case 17: /* ipFragOKs */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipfragoks; 8033b36: 4b12 ldr r3, [pc, #72] ; (8033b80 ) 8033b38: e004 b.n 8033b44 } break; case 18: /* ipFragFails */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipfragfails; 8033b3a: 4b12 ldr r3, [pc, #72] ; (8033b84 ) 8033b3c: e002 b.n 8033b44 } break; case 19: /* ipFragCreates */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipfragcreates; 8033b3e: 4b12 ldr r3, [pc, #72] ; (8033b88 ) 8033b40: e000 b.n 8033b44 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; 8033b42: 4b12 ldr r3, [pc, #72] ; (8033b8c ) 8033b44: 681b ldr r3, [r3, #0] 8033b46: 6013 str r3, [r2, #0] 8033b48: 4770 bx lr 8033b4a: bf00 nop 8033b4c: 2000c4d4 .word 0x2000c4d4 8033b50: 2000c45c .word 0x2000c45c 8033b54: 2000c440 .word 0x2000c440 8033b58: 2000c55c .word 0x2000c55c 8033b5c: 2000c49c .word 0x2000c49c 8033b60: 2000c528 .word 0x2000c528 8033b64: 2000c560 .word 0x2000c560 8033b68: 2000c548 .word 0x2000c548 8033b6c: 2000c4ec .word 0x2000c4ec 8033b70: 2000c56c .word 0x2000c56c 8033b74: 2000c4bc .word 0x2000c4bc 8033b78: 2000c468 .word 0x2000c468 8033b7c: 2000c51c .word 0x2000c51c 8033b80: 2000c42c .word 0x2000c42c 8033b84: 2000c498 .word 0x2000c498 8033b88: 2000c538 .word 0x2000c538 8033b8c: 2000c524 .word 0x2000c524 08033b90 : 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]; 8033b90: 6883 ldr r3, [r0, #8] switch (id) 8033b92: 781b ldrb r3, [r3, #0] 8033b94: 2b01 cmp r3, #1 8033b96: d002 beq.n 8033b9e 8033b98: 2b02 cmp r3, #2 8033b9a: d109 bne.n 8033bb0 8033b9c: e002 b.n 8033ba4 #if IP_FORWARD /* forwarding */ if (*sint_ptr == 1) #else /* not-forwarding */ if (*sint_ptr == 2) 8033b9e: 6810 ldr r0, [r2, #0] { u8_t id, set_ok; s32_t *sint_ptr = (s32_t*)value; LWIP_UNUSED_ARG(len); set_ok = 0; 8033ba0: 2802 cmp r0, #2 8033ba2: e001 b.n 8033ba8 { set_ok = 1; } break; case 2: /* ipDefaultTTL */ if (*sint_ptr == IP_DEFAULT_TTL) 8033ba4: 6810 ldr r0, [r2, #0] { u8_t id, set_ok; s32_t *sint_ptr = (s32_t*)value; LWIP_UNUSED_ARG(len); set_ok = 0; 8033ba6: 28ff cmp r0, #255 ; 0xff 8033ba8: bf14 ite ne 8033baa: 2000 movne r0, #0 8033bac: 2001 moveq r0, #1 8033bae: 4770 bx lr 8033bb0: 2000 movs r0, #0 set_ok = 1; } break; }; return set_ok; } 8033bb2: 4770 bx lr 08033bb4 : /* return to object name, adding index depth (4) */ ident_len += 4; ident -= 4; if (ident_len == 5) 8033bb4: 2801 cmp r0, #1 8033bb6: d12c bne.n 8033c12 { od->id_inst_len = ident_len; 8033bb8: 2305 movs r3, #5 8033bba: 7193 strb r3, [r2, #6] { u8_t id; /* return to object name, adding index depth (4) */ ident_len += 4; ident -= 4; 8033bbc: f1a1 0310 sub.w r3, r1, #16 if (ident_len == 5) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8033bc0: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 8033bc2: f811 3c10 ldrb.w r3, [r1, #-16] 8033bc6: 3b01 subs r3, #1 8033bc8: 2b0c cmp r3, #12 8033bca: d822 bhi.n 8033c12 8033bcc: e8df f003 tbb [pc, r3] 8033bd0: 0d0d0d07 .word 0x0d0d0d07 8033bd4: 0d070d0d .word 0x0d070d0d 8033bd8: 0d070d11 .word 0x0d070d11 8033bdc: 18 .byte 0x18 8033bdd: 00 .byte 0x00 { case 1: /* ipRouteDest */ case 7: /* ipRouteNextHop */ case 11: /* ipRouteMask */ od->instance = MIB_OBJECT_TAB; 8033bde: 2302 movs r3, #2 8033be0: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8033be2: 2303 movs r3, #3 8033be4: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 8033be6: 2340 movs r3, #64 ; 0x40 8033be8: e007 b.n 8033bfa case 5: /* ipRouteMetric3 */ case 6: /* ipRouteMetric4 */ case 8: /* ipRouteType */ case 10: /* ipRouteAge */ case 12: /* ipRouteMetric5 */ od->instance = MIB_OBJECT_TAB; 8033bea: 2302 movs r3, #2 8033bec: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8033bee: 2103 movs r1, #3 8033bf0: e002 b.n 8033bf8 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; 8033bf2: 2302 movs r3, #2 8033bf4: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033bf6: 2101 movs r1, #1 8033bf8: 7051 strb r1, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 8033bfa: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 8033bfc: 2304 movs r3, #4 8033bfe: e006 b.n 8033c0e break; case 13: /* ipRouteInfo */ /** @note returning zeroDotZero (0.0) no routing protocol specific MIB */ od->instance = MIB_OBJECT_TAB; 8033c00: 2302 movs r3, #2 8033c02: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033c04: 2301 movs r3, #1 8033c06: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID); 8033c08: 2306 movs r3, #6 8033c0a: 7093 strb r3, [r2, #2] od->v_len = iprouteinfo.len * sizeof(s32_t); 8033c0c: 2308 movs r3, #8 8033c0e: 8093 strh r3, [r2, #4] break; 8033c10: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_rteentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033c12: 2300 movs r3, #0 8033c14: 7013 strb r3, [r2, #0] 8033c16: 4770 bx lr 08033c18 : 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) && 8033c18: 2801 cmp r0, #1 8033c1a: d110 bne.n 8033c3e (ident[0] > 0) && (ident[0] < 27)) 8033c1c: 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) && 8033c20: 2b00 cmp r3, #0 8033c22: dd0c ble.n 8033c3e (ident[0] > 0) && (ident[0] < 27)) 8033c24: 2b1a cmp r3, #26 8033c26: dc0a bgt.n 8033c3e { od->id_inst_len = ident_len; 8033c28: 2302 movs r3, #2 8033c2a: 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); 8033c2c: 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; 8033c2e: 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); 8033c30: 7093 strb r3, [r2, #2] od->v_len = sizeof(u32_t); 8033c32: 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; 8033c34: 6091 str r1, [r2, #8] od->instance = MIB_OBJECT_SCALAR; 8033c36: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033c38: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); od->v_len = sizeof(u32_t); 8033c3a: 8093 strh r3, [r2, #4] 8033c3c: 4770 bx lr } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("icmp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033c3e: 2300 movs r3, #0 8033c40: 7013 strb r3, [r2, #0] 8033c42: 4770 bx lr 08033c44 : 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]; 8033c44: 6883 ldr r3, [r0, #8] switch (id) 8033c46: 781b ldrb r3, [r3, #0] 8033c48: 3b01 subs r3, #1 8033c4a: 2b19 cmp r3, #25 8033c4c: d843 bhi.n 8033cd6 8033c4e: e8df f003 tbb [pc, r3] 8033c52: 0f0d .short 0x0f0d 8033c54: 17151311 .word 0x17151311 8033c58: 1f1d1b19 .word 0x1f1d1b19 8033c5c: 27252321 .word 0x27252321 8033c60: 2f2d2b29 .word 0x2f2d2b29 8033c64: 37353331 .word 0x37353331 8033c68: 3f3d3b39 .word 0x3f3d3b39 { case 1: /* icmpInMsgs */ *uint_ptr = icmpinmsgs; 8033c6c: 4b1a ldr r3, [pc, #104] ; (8033cd8 ) 8033c6e: e030 b.n 8033cd2 break; case 2: /* icmpInErrors */ *uint_ptr = icmpinerrors; 8033c70: 4b1a ldr r3, [pc, #104] ; (8033cdc ) 8033c72: e02e b.n 8033cd2 break; case 3: /* icmpInDestUnreachs */ *uint_ptr = icmpindestunreachs; 8033c74: 4b1a ldr r3, [pc, #104] ; (8033ce0 ) 8033c76: e02c b.n 8033cd2 break; case 4: /* icmpInTimeExcds */ *uint_ptr = icmpintimeexcds; 8033c78: 4b1a ldr r3, [pc, #104] ; (8033ce4 ) 8033c7a: e02a b.n 8033cd2 break; case 5: /* icmpInParmProbs */ *uint_ptr = icmpinparmprobs; 8033c7c: 4b1a ldr r3, [pc, #104] ; (8033ce8 ) 8033c7e: e028 b.n 8033cd2 break; case 6: /* icmpInSrcQuenchs */ *uint_ptr = icmpinsrcquenchs; 8033c80: 4b1a ldr r3, [pc, #104] ; (8033cec ) 8033c82: e026 b.n 8033cd2 break; case 7: /* icmpInRedirects */ *uint_ptr = icmpinredirects; 8033c84: 4b1a ldr r3, [pc, #104] ; (8033cf0 ) 8033c86: e024 b.n 8033cd2 break; case 8: /* icmpInEchos */ *uint_ptr = icmpinechos; 8033c88: 4b1a ldr r3, [pc, #104] ; (8033cf4 ) 8033c8a: e022 b.n 8033cd2 break; case 9: /* icmpInEchoReps */ *uint_ptr = icmpinechoreps; 8033c8c: 4b1a ldr r3, [pc, #104] ; (8033cf8 ) 8033c8e: e020 b.n 8033cd2 break; case 10: /* icmpInTimestamps */ *uint_ptr = icmpintimestamps; 8033c90: 4b1a ldr r3, [pc, #104] ; (8033cfc ) 8033c92: e01e b.n 8033cd2 break; case 11: /* icmpInTimestampReps */ *uint_ptr = icmpintimestampreps; 8033c94: 4b1a ldr r3, [pc, #104] ; (8033d00 ) 8033c96: e01c b.n 8033cd2 break; case 12: /* icmpInAddrMasks */ *uint_ptr = icmpinaddrmasks; 8033c98: 4b1a ldr r3, [pc, #104] ; (8033d04 ) 8033c9a: e01a b.n 8033cd2 break; case 13: /* icmpInAddrMaskReps */ *uint_ptr = icmpinaddrmaskreps; 8033c9c: 4b1a ldr r3, [pc, #104] ; (8033d08 ) 8033c9e: e018 b.n 8033cd2 break; case 14: /* icmpOutMsgs */ *uint_ptr = icmpoutmsgs; 8033ca0: 4b1a ldr r3, [pc, #104] ; (8033d0c ) 8033ca2: e016 b.n 8033cd2 break; case 15: /* icmpOutErrors */ *uint_ptr = icmpouterrors; 8033ca4: 4b1a ldr r3, [pc, #104] ; (8033d10 ) 8033ca6: e014 b.n 8033cd2 break; case 16: /* icmpOutDestUnreachs */ *uint_ptr = icmpoutdestunreachs; 8033ca8: 4b1a ldr r3, [pc, #104] ; (8033d14 ) 8033caa: e012 b.n 8033cd2 break; case 17: /* icmpOutTimeExcds */ *uint_ptr = icmpouttimeexcds; 8033cac: 4b1a ldr r3, [pc, #104] ; (8033d18 ) 8033cae: e010 b.n 8033cd2 break; case 18: /* icmpOutParmProbs */ *uint_ptr = icmpoutparmprobs; 8033cb0: 4b1a ldr r3, [pc, #104] ; (8033d1c ) 8033cb2: e00e b.n 8033cd2 break; case 19: /* icmpOutSrcQuenchs */ *uint_ptr = icmpoutsrcquenchs; 8033cb4: 4b1a ldr r3, [pc, #104] ; (8033d20 ) 8033cb6: e00c b.n 8033cd2 break; case 20: /* icmpOutRedirects */ *uint_ptr = icmpoutredirects; 8033cb8: 4b1a ldr r3, [pc, #104] ; (8033d24 ) 8033cba: e00a b.n 8033cd2 break; case 21: /* icmpOutEchos */ *uint_ptr = icmpoutechos; 8033cbc: 4b1a ldr r3, [pc, #104] ; (8033d28 ) 8033cbe: e008 b.n 8033cd2 break; case 22: /* icmpOutEchoReps */ *uint_ptr = icmpoutechoreps; 8033cc0: 4b1a ldr r3, [pc, #104] ; (8033d2c ) 8033cc2: e006 b.n 8033cd2 break; case 23: /* icmpOutTimestamps */ *uint_ptr = icmpouttimestamps; 8033cc4: 4b1a ldr r3, [pc, #104] ; (8033d30 ) 8033cc6: e004 b.n 8033cd2 break; case 24: /* icmpOutTimestampReps */ *uint_ptr = icmpouttimestampreps; 8033cc8: 4b1a ldr r3, [pc, #104] ; (8033d34 ) 8033cca: e002 b.n 8033cd2 break; case 25: /* icmpOutAddrMasks */ *uint_ptr = icmpoutaddrmasks; 8033ccc: 4b1a ldr r3, [pc, #104] ; (8033d38 ) 8033cce: e000 b.n 8033cd2 break; case 26: /* icmpOutAddrMaskReps */ *uint_ptr = icmpoutaddrmaskreps; 8033cd0: 4b1a ldr r3, [pc, #104] ; (8033d3c ) 8033cd2: 681b ldr r3, [r3, #0] 8033cd4: 6013 str r3, [r2, #0] 8033cd6: 4770 bx lr 8033cd8: 2000c464 .word 0x2000c464 8033cdc: 2000c460 .word 0x2000c460 8033ce0: 2000c43c .word 0x2000c43c 8033ce4: 2000c520 .word 0x2000c520 8033ce8: 2000c554 .word 0x2000c554 8033cec: 2000c44c .word 0x2000c44c 8033cf0: 2000c478 .word 0x2000c478 8033cf4: 2000c518 .word 0x2000c518 8033cf8: 2000c490 .word 0x2000c490 8033cfc: 2000c480 .word 0x2000c480 8033d00: 2000c4c0 .word 0x2000c4c0 8033d04: 2000c558 .word 0x2000c558 8033d08: 2000c4f4 .word 0x2000c4f4 8033d0c: 2000c4e4 .word 0x2000c4e4 8033d10: 2000c568 .word 0x2000c568 8033d14: 2000c4fc .word 0x2000c4fc 8033d18: 2000c4b0 .word 0x2000c4b0 8033d1c: 2000c474 .word 0x2000c474 8033d20: 2000c4c8 .word 0x2000c4c8 8033d24: 2000c484 .word 0x2000c484 8033d28: 2000c564 .word 0x2000c564 8033d2c: 2000c504 .word 0x2000c504 8033d30: 2000c4d0 .word 0x2000c4d0 8033d34: 2000c4b4 .word 0x2000c4b4 8033d38: 2000c47c .word 0x2000c47c 8033d3c: 2000c4dc .word 0x2000c4dc 08033d40 : 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]; 8033d40: 6883 ldr r3, [r0, #8] switch (id) 8033d42: 781b ldrb r3, [r3, #0] 8033d44: 3b01 subs r3, #1 8033d46: 2b0e cmp r3, #14 8033d48: d836 bhi.n 8033db8 8033d4a: e8df f003 tbb [pc, r3] 8033d4e: 0a08 .short 0x0a08 8033d50: 1412100d .word 0x1412100d 8033d54: 2a1a1816 .word 0x2a1a1816 8033d58: 30352e2c .word 0x30352e2c 8033d5c: 32 .byte 0x32 8033d5d: 00 .byte 0x00 { case 1: /* tcpRtoAlgorithm, vanj(4) */ *sint_ptr = 4; 8033d5e: 2304 movs r3, #4 8033d60: e029 b.n 8033db6 break; case 2: /* tcpRtoMin */ /* @todo not the actual value, a guess, needs to be calculated */ *sint_ptr = 1000; 8033d62: f44f 737a mov.w r3, #1000 ; 0x3e8 8033d66: e026 b.n 8033db6 break; case 3: /* tcpRtoMax */ /* @todo not the actual value, a guess, needs to be calculated */ *sint_ptr = 60000; 8033d68: f64e 2360 movw r3, #60000 ; 0xea60 8033d6c: e023 b.n 8033db6 break; case 4: /* tcpMaxConn */ *sint_ptr = MEMP_NUM_TCP_PCB; 8033d6e: 230c movs r3, #12 8033d70: e021 b.n 8033db6 break; case 5: /* tcpActiveOpens */ *uint_ptr = tcpactiveopens; 8033d72: 4b12 ldr r3, [pc, #72] ; (8033dbc ) 8033d74: e01e b.n 8033db4 break; case 6: /* tcpPassiveOpens */ *uint_ptr = tcppassiveopens; 8033d76: 4b12 ldr r3, [pc, #72] ; (8033dc0 ) 8033d78: e01c b.n 8033db4 break; case 7: /* tcpAttemptFails */ *uint_ptr = tcpattemptfails; 8033d7a: 4b12 ldr r3, [pc, #72] ; (8033dc4 ) 8033d7c: e01a b.n 8033db4 break; case 8: /* tcpEstabResets */ *uint_ptr = tcpestabresets; 8033d7e: 4b12 ldr r3, [pc, #72] ; (8033dc8 ) 8033d80: e018 b.n 8033db4 break; case 9: /* tcpCurrEstab */ { u16_t tcpcurrestab = 0; struct tcp_pcb *pcb = tcp_active_pcbs; 8033d82: 4b12 ldr r3, [pc, #72] ; (8033dcc ) case 8: /* tcpEstabResets */ *uint_ptr = tcpestabresets; break; case 9: /* tcpCurrEstab */ { u16_t tcpcurrestab = 0; 8033d84: 2100 movs r1, #0 struct tcp_pcb *pcb = tcp_active_pcbs; 8033d86: 681b ldr r3, [r3, #0] while (pcb != NULL) 8033d88: e007 b.n 8033d9a { if ((pcb->state == ESTABLISHED) || 8033d8a: 7e18 ldrb r0, [r3, #24] 8033d8c: 2804 cmp r0, #4 8033d8e: d001 beq.n 8033d94 8033d90: 2807 cmp r0, #7 8033d92: d101 bne.n 8033d98 (pcb->state == CLOSE_WAIT)) { tcpcurrestab++; 8033d94: 3101 adds r1, #1 8033d96: b289 uxth r1, r1 } pcb = pcb->next; 8033d98: 68db ldr r3, [r3, #12] break; case 9: /* tcpCurrEstab */ { u16_t tcpcurrestab = 0; struct tcp_pcb *pcb = tcp_active_pcbs; while (pcb != NULL) 8033d9a: 2b00 cmp r3, #0 8033d9c: d1f5 bne.n 8033d8a { tcpcurrestab++; } pcb = pcb->next; } *uint_ptr = tcpcurrestab; 8033d9e: 6011 str r1, [r2, #0] } break; 8033da0: 4770 bx lr case 10: /* tcpInSegs */ *uint_ptr = tcpinsegs; 8033da2: 4b0b ldr r3, [pc, #44] ; (8033dd0 ) 8033da4: e006 b.n 8033db4 break; case 11: /* tcpOutSegs */ *uint_ptr = tcpoutsegs; 8033da6: 4b0b ldr r3, [pc, #44] ; (8033dd4 ) 8033da8: e004 b.n 8033db4 break; case 12: /* tcpRetransSegs */ *uint_ptr = tcpretranssegs; 8033daa: 4b0b ldr r3, [pc, #44] ; (8033dd8 ) 8033dac: e002 b.n 8033db4 break; case 14: /* tcpInErrs */ *uint_ptr = tcpinerrs; 8033dae: 4b0b ldr r3, [pc, #44] ; (8033ddc ) 8033db0: e000 b.n 8033db4 break; case 15: /* tcpOutRsts */ *uint_ptr = tcpoutrsts; 8033db2: 4b0b ldr r3, [pc, #44] ; (8033de0 ) 8033db4: 681b ldr r3, [r3, #0] 8033db6: 6013 str r3, [r2, #0] 8033db8: 4770 bx lr 8033dba: bf00 nop 8033dbc: 2000c458 .word 0x2000c458 8033dc0: 2000c48c .word 0x2000c48c 8033dc4: 2000c4d8 .word 0x2000c4d8 8033dc8: 2000c46c .word 0x2000c46c 8033dcc: 2000f6bc .word 0x2000f6bc 8033dd0: 2000c4e8 .word 0x2000c4e8 8033dd4: 2000c534 .word 0x2000c534 8033dd8: 2000c508 .word 0x2000c508 8033ddc: 2000c494 .word 0x2000c494 8033de0: 2000c4f8 .word 0x2000c4f8 08033de4 : 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) && 8033de4: 2801 cmp r0, #1 8033de6: d110 bne.n 8033e0a (ident[0] > 0) && (ident[0] < 6)) 8033de8: 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) && 8033dec: 2b00 cmp r3, #0 8033dee: dd0c ble.n 8033e0a (ident[0] > 0) && (ident[0] < 6)) 8033df0: 2b05 cmp r3, #5 8033df2: dc0a bgt.n 8033e0a { od->id_inst_len = ident_len; 8033df4: 2302 movs r3, #2 8033df6: 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); 8033df8: 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; 8033dfa: 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); 8033dfc: 7093 strb r3, [r2, #2] od->v_len = sizeof(u32_t); 8033dfe: 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; 8033e00: 6091 str r1, [r2, #8] od->instance = MIB_OBJECT_SCALAR; 8033e02: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033e04: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); od->v_len = sizeof(u32_t); 8033e06: 8093 strh r3, [r2, #4] 8033e08: 4770 bx lr } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("udp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033e0a: 2300 movs r3, #0 8033e0c: 7013 strb r3, [r2, #0] 8033e0e: 4770 bx lr 08033e10 : 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]; 8033e10: 6883 ldr r3, [r0, #8] switch (id) 8033e12: 781b ldrb r3, [r3, #0] 8033e14: 3b01 subs r3, #1 8033e16: 2b03 cmp r3, #3 8033e18: d80c bhi.n 8033e34 8033e1a: e8df f003 tbb [pc, r3] 8033e1e: 0402 .short 0x0402 8033e20: 0806 .short 0x0806 { case 1: /* udpInDatagrams */ *uint_ptr = udpindatagrams; 8033e22: 4b05 ldr r3, [pc, #20] ; (8033e38 ) 8033e24: e004 b.n 8033e30 break; case 2: /* udpNoPorts */ *uint_ptr = udpnoports; 8033e26: 4b05 ldr r3, [pc, #20] ; (8033e3c ) 8033e28: e002 b.n 8033e30 break; case 3: /* udpInErrors */ *uint_ptr = udpinerrors; 8033e2a: 4b05 ldr r3, [pc, #20] ; (8033e40 ) 8033e2c: e000 b.n 8033e30 break; case 4: /* udpOutDatagrams */ *uint_ptr = udpoutdatagrams; 8033e2e: 4b05 ldr r3, [pc, #20] ; (8033e44 ) 8033e30: 681b ldr r3, [r3, #0] 8033e32: 6013 str r3, [r2, #0] 8033e34: 4770 bx lr 8033e36: bf00 nop 8033e38: 2000c514 .word 0x2000c514 8033e3c: 2000c4cc .word 0x2000c4cc 8033e40: 2000c53c .word 0x2000c53c 8033e44: 2000c4c4 .word 0x2000c4c4 08033e48 : 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]; 8033e48: 6883 ldr r3, [r0, #8] switch (id) 8033e4a: 781b ldrb r3, [r3, #0] 8033e4c: 3b01 subs r3, #1 8033e4e: 2b1d cmp r3, #29 8033e50: d84b bhi.n 8033eea 8033e52: e8df f003 tbb [pc, r3] 8033e56: 110f .short 0x110f 8033e58: 19171513 .word 0x19171513 8033e5c: 1f1d1b4a .word 0x1f1d1b4a 8033e60: 27252321 .word 0x27252321 8033e64: 2f2d2b29 .word 0x2f2d2b29 8033e68: 37353331 .word 0x37353331 8033e6c: 3d3b394a .word 0x3d3b394a 8033e70: 4643413f .word 0x4643413f { case 1: /* snmpInPkts */ *uint_ptr = snmpinpkts; 8033e74: 4b1d ldr r3, [pc, #116] ; (8033eec ) 8033e76: e032 b.n 8033ede break; case 2: /* snmpOutPkts */ *uint_ptr = snmpoutpkts; 8033e78: 4b1d ldr r3, [pc, #116] ; (8033ef0 ) 8033e7a: e030 b.n 8033ede break; case 3: /* snmpInBadVersions */ *uint_ptr = snmpinbadversions; 8033e7c: 4b1d ldr r3, [pc, #116] ; (8033ef4 ) 8033e7e: e02e b.n 8033ede break; case 4: /* snmpInBadCommunityNames */ *uint_ptr = snmpinbadcommunitynames; 8033e80: 4b1d ldr r3, [pc, #116] ; (8033ef8 ) 8033e82: e02c b.n 8033ede break; case 5: /* snmpInBadCommunityUses */ *uint_ptr = snmpinbadcommunityuses; 8033e84: 4b1d ldr r3, [pc, #116] ; (8033efc ) 8033e86: e02a b.n 8033ede break; case 6: /* snmpInASNParseErrs */ *uint_ptr = snmpinasnparseerrs; 8033e88: 4b1d ldr r3, [pc, #116] ; (8033f00 ) 8033e8a: e028 b.n 8033ede break; case 8: /* snmpInTooBigs */ *uint_ptr = snmpintoobigs; 8033e8c: 4b1d ldr r3, [pc, #116] ; (8033f04 ) 8033e8e: e026 b.n 8033ede break; case 9: /* snmpInNoSuchNames */ *uint_ptr = snmpinnosuchnames; 8033e90: 4b1d ldr r3, [pc, #116] ; (8033f08 ) 8033e92: e024 b.n 8033ede break; case 10: /* snmpInBadValues */ *uint_ptr = snmpinbadvalues; 8033e94: 4b1d ldr r3, [pc, #116] ; (8033f0c ) 8033e96: e022 b.n 8033ede break; case 11: /* snmpInReadOnlys */ *uint_ptr = snmpinreadonlys; 8033e98: 4b1d ldr r3, [pc, #116] ; (8033f10 ) 8033e9a: e020 b.n 8033ede break; case 12: /* snmpInGenErrs */ *uint_ptr = snmpingenerrs; 8033e9c: 4b1d ldr r3, [pc, #116] ; (8033f14 ) 8033e9e: e01e b.n 8033ede break; case 13: /* snmpInTotalReqVars */ *uint_ptr = snmpintotalreqvars; 8033ea0: 4b1d ldr r3, [pc, #116] ; (8033f18 ) 8033ea2: e01c b.n 8033ede break; case 14: /* snmpInTotalSetVars */ *uint_ptr = snmpintotalsetvars; 8033ea4: 4b1d ldr r3, [pc, #116] ; (8033f1c ) 8033ea6: e01a b.n 8033ede break; case 15: /* snmpInGetRequests */ *uint_ptr = snmpingetrequests; 8033ea8: 4b1d ldr r3, [pc, #116] ; (8033f20 ) 8033eaa: e018 b.n 8033ede break; case 16: /* snmpInGetNexts */ *uint_ptr = snmpingetnexts; 8033eac: 4b1d ldr r3, [pc, #116] ; (8033f24 ) 8033eae: e016 b.n 8033ede break; case 17: /* snmpInSetRequests */ *uint_ptr = snmpinsetrequests; 8033eb0: 4b1d ldr r3, [pc, #116] ; (8033f28 ) 8033eb2: e014 b.n 8033ede break; case 18: /* snmpInGetResponses */ *uint_ptr = snmpingetresponses; 8033eb4: 4b1d ldr r3, [pc, #116] ; (8033f2c ) 8033eb6: e012 b.n 8033ede break; case 19: /* snmpInTraps */ *uint_ptr = snmpintraps; 8033eb8: 4b1d ldr r3, [pc, #116] ; (8033f30 ) 8033eba: e010 b.n 8033ede break; case 20: /* snmpOutTooBigs */ *uint_ptr = snmpouttoobigs; 8033ebc: 4b1d ldr r3, [pc, #116] ; (8033f34 ) 8033ebe: e00e b.n 8033ede break; case 21: /* snmpOutNoSuchNames */ *uint_ptr = snmpoutnosuchnames; 8033ec0: 4b1d ldr r3, [pc, #116] ; (8033f38 ) 8033ec2: e00c b.n 8033ede break; case 22: /* snmpOutBadValues */ *uint_ptr = snmpoutbadvalues; 8033ec4: 4b1d ldr r3, [pc, #116] ; (8033f3c ) 8033ec6: e00a b.n 8033ede break; case 24: /* snmpOutGenErrs */ *uint_ptr = snmpoutgenerrs; 8033ec8: 4b1d ldr r3, [pc, #116] ; (8033f40 ) 8033eca: e008 b.n 8033ede break; case 25: /* snmpOutGetRequests */ *uint_ptr = snmpoutgetrequests; 8033ecc: 4b1d ldr r3, [pc, #116] ; (8033f44 ) 8033ece: e006 b.n 8033ede break; case 26: /* snmpOutGetNexts */ *uint_ptr = snmpoutgetnexts; 8033ed0: 4b1d ldr r3, [pc, #116] ; (8033f48 ) 8033ed2: e004 b.n 8033ede break; case 27: /* snmpOutSetRequests */ *uint_ptr = snmpoutsetrequests; 8033ed4: 4b1d ldr r3, [pc, #116] ; (8033f4c ) 8033ed6: e002 b.n 8033ede break; case 28: /* snmpOutGetResponses */ *uint_ptr = snmpoutgetresponses; 8033ed8: 4b1d ldr r3, [pc, #116] ; (8033f50 ) 8033eda: e000 b.n 8033ede break; case 29: /* snmpOutTraps */ *uint_ptr = snmpouttraps; 8033edc: 4b1d ldr r3, [pc, #116] ; (8033f54 ) 8033ede: 681b ldr r3, [r3, #0] 8033ee0: e002 b.n 8033ee8 break; case 30: /* snmpEnableAuthenTraps */ *uint_ptr = *snmpenableauthentraps_ptr; 8033ee2: 4b1d ldr r3, [pc, #116] ; (8033f58 ) 8033ee4: 681b ldr r3, [r3, #0] 8033ee6: 781b ldrb r3, [r3, #0] 8033ee8: 6013 str r3, [r2, #0] 8033eea: 4770 bx lr 8033eec: 2000c470 .word 0x2000c470 8033ef0: 2000c540 .word 0x2000c540 8033ef4: 2000c52c .word 0x2000c52c 8033ef8: 2000c444 .word 0x2000c444 8033efc: 2000c448 .word 0x2000c448 8033f00: 2000c530 .word 0x2000c530 8033f04: 2000c4f0 .word 0x2000c4f0 8033f08: 2000c570 .word 0x2000c570 8033f0c: 2000c50c .word 0x2000c50c 8033f10: 2000c4e0 .word 0x2000c4e0 8033f14: 2000c4b8 .word 0x2000c4b8 8033f18: 2000c510 .word 0x2000c510 8033f1c: 2000c450 .word 0x2000c450 8033f20: 2000c4a4 .word 0x2000c4a4 8033f24: 2000c428 .word 0x2000c428 8033f28: 2000c54c .word 0x2000c54c 8033f2c: 2000c4a0 .word 0x2000c4a0 8033f30: 2000c438 .word 0x2000c438 8033f34: 2000c488 .word 0x2000c488 8033f38: 2000c454 .word 0x2000c454 8033f3c: 2000c434 .word 0x2000c434 8033f40: 2000c574 .word 0x2000c574 8033f44: 2000c4ac .word 0x2000c4ac 8033f48: 2000c544 .word 0x2000c544 8033f4c: 2000c550 .word 0x2000c550 8033f50: 2000c430 .word 0x2000c430 8033f54: 2000c4a8 .word 0x2000c4a8 8033f58: 20000898 .word 0x20000898 08033f5c : { 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]; 8033f5c: 6883 ldr r3, [r0, #8] if (id == 30) 8033f5e: 781b ldrb r3, [r3, #0] 8033f60: 2b1e cmp r3, #30 8033f62: d103 bne.n 8033f6c { /* snmpEnableAuthenTraps */ /* @todo @fixme: which kind of pointer is 'value'? s32_t or u8_t??? */ u8_t *ptr = (u8_t*)value; *snmpenableauthentraps_ptr = *ptr; 8033f64: 4b02 ldr r3, [pc, #8] ; (8033f70 ) 8033f66: 7812 ldrb r2, [r2, #0] 8033f68: 681b ldr r3, [r3, #0] 8033f6a: 701a strb r2, [r3, #0] 8033f6c: 4770 bx lr 8033f6e: bf00 nop 8033f70: 20000898 .word 0x20000898 08033f74 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8033f74: 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) { 8033f76: b513 push {r0, r1, r4, lr} 8033f78: 4614 mov r4, r2 u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8033f7a: d149 bne.n 8034010 { od->id_inst_len = ident_len; 8033f7c: 2302 movs r3, #2 8033f7e: 7193 strb r3, [r2, #6] { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 8033f80: 1f0a subs r2, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8033f82: 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) 8033f84: f811 2c04 ldrb.w r2, [r1, #-4] 8033f88: 3a01 subs r2, #1 8033f8a: 2a15 cmp r2, #21 8033f8c: d840 bhi.n 8034010 8033f8e: e8df f002 tbb [pc, r2] 8033f92: 0e0b .short 0x0e0b 8033f94: 19140b0b .word 0x19140b0b 8033f98: 302b0b27 .word 0x302b0b27 8033f9c: 30303030 .word 0x30303030 8033fa0: 30303030 .word 0x30303030 8033fa4: 37143030 .word 0x37143030 { case 1: /* ifIndex */ case 3: /* ifType */ case 4: /* ifMtu */ case 8: /* ifOperStatus */ od->instance = MIB_OBJECT_TAB; 8033fa8: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8033faa: 2201 movs r2, #1 8033fac: e01a b.n 8033fe4 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; 8033fae: 2201 movs r2, #1 8033fb0: 7062 strb r2, [r4, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8033fb2: 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; 8033fb4: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8033fb6: 70a2 strb r2, [r4, #2] 8033fb8: e028 b.n 803400c /** @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; 8033fba: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8033fbc: 2301 movs r3, #1 8033fbe: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_GAUGE); 8033fc0: 2342 movs r3, #66 ; 0x42 8033fc2: e01a b.n 8033ffa break; case 6: /* ifPhysAddress */ { struct netif *netif; snmp_ifindextonetif(ident[1], &netif); 8033fc4: 6808 ldr r0, [r1, #0] 8033fc6: a901 add r1, sp, #4 8033fc8: f001 f824 bl 8035014 od->instance = MIB_OBJECT_TAB; 8033fcc: 2302 movs r3, #2 8033fce: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8033fd0: 2301 movs r3, #1 8033fd2: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8033fd4: 2304 movs r3, #4 8033fd6: 70a3 strb r3, [r4, #2] od->v_len = netif->hwaddr_len; 8033fd8: 9b01 ldr r3, [sp, #4] 8033fda: f893 3026 ldrb.w r3, [r3, #38] ; 0x26 8033fde: e015 b.n 803400c } break; case 7: /* ifAdminStatus */ od->instance = MIB_OBJECT_TAB; 8033fe0: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_WRITE; 8033fe2: 2203 movs r2, #3 8033fe4: 7062 strb r2, [r4, #1] 8033fe6: e008 b.n 8033ffa 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; 8033fe8: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8033fea: 2301 movs r3, #1 8033fec: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS); 8033fee: 2343 movs r3, #67 ; 0x43 8033ff0: e003 b.n 8033ffa case 16: /* ifOutOctets */ case 17: /* ifOutUcastPkts */ case 18: /* ifOutNUcastPkts */ case 19: /* ifOutDiscarts */ case 20: /* ifOutErrors */ od->instance = MIB_OBJECT_TAB; 8033ff2: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8033ff4: 2301 movs r3, #1 8033ff6: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 8033ff8: 2341 movs r3, #65 ; 0x41 8033ffa: 70a3 strb r3, [r4, #2] od->v_len = sizeof(u32_t); 8033ffc: 2304 movs r3, #4 8033ffe: e005 b.n 803400c break; case 22: /* ifSpecific */ /** @note returning zeroDotZero (0.0) no media specific MIB support */ od->instance = MIB_OBJECT_TAB; 8034000: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8034002: 2301 movs r3, #1 8034004: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID); 8034006: 2306 movs r3, #6 8034008: 70a3 strb r3, [r4, #2] od->v_len = ifspecific.len * sizeof(s32_t); 803400a: 2308 movs r3, #8 803400c: 80a3 strh r3, [r4, #4] break; 803400e: e001 b.n 8034014 }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ifentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8034010: 2300 movs r3, #0 8034012: 7023 strb r3, [r4, #0] } } 8034014: bd1c pop {r2, r3, r4, pc} 8034016: 0000 movs r0, r0 08034018 : } } static void udpentry_get_value(struct obj_def *od, u16_t len, void *value) { 8034018: b537 push {r0, r1, r2, r4, r5, lr} 803401a: 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); 803401c: 6880 ldr r0, [r0, #8] 803401e: a901 add r1, sp, #4 8034020: 3004 adds r0, #4 } } static void udpentry_get_value(struct obj_def *od, u16_t len, void *value) { 8034022: 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); 8034024: f001 f814 bl 8035050 LWIP_ASSERT("invalid port", (od->id_inst_ptr[5] >= 0) && (od->id_inst_ptr[5] <= 0xffff)); port = (u16_t)od->id_inst_ptr[5]; 8034028: 68a1 ldr r1, [r4, #8] pcb = udp_pcbs; 803402a: 4b0c ldr r3, [pc, #48] ; (803405c ) 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]; 803402c: 8a8a ldrh r2, [r1, #20] pcb = udp_pcbs; 803402e: 681b ldr r3, [r3, #0] while ((pcb != NULL) && !(ip_addr_cmp(&pcb->local_ip, &ip) && 8034030: 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) && 8034032: e000 b.n 8034036 !(ip_addr_cmp(&pcb->local_ip, &ip) && (pcb->local_port == port))) { pcb = pcb->next; 8034034: 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) && 8034036: b17b cbz r3, 8034058 8034038: 681c ldr r4, [r3, #0] 803403a: 4284 cmp r4, r0 803403c: d1fa bne.n 8034034 !(ip_addr_cmp(&pcb->local_ip, &ip) && (pcb->local_port == port))) 803403e: 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) && 8034040: 4294 cmp r4, r2 8034042: d1f7 bne.n 8034034 8034044: e003 b.n 803404e switch (id) { case 1: /* udpLocalAddress */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = pcb->local_ip; 8034046: 6028 str r0, [r5, #0] } break; 8034048: e006 b.n 8034058 case 2: /* udpLocalPort */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = pcb->local_port; 803404a: 602a str r2, [r5, #0] } break; 803404c: e004 b.n 8034058 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) 803404e: 780b ldrb r3, [r1, #0] 8034050: 2b01 cmp r3, #1 8034052: d0f8 beq.n 8034046 8034054: 2b02 cmp r3, #2 8034056: d0f8 beq.n 803404a *sint_ptr = pcb->local_port; } break; } } } 8034058: bd3e pop {r1, r2, r3, r4, r5, pc} 803405a: bf00 nop 803405c: 2000f6d8 .word 0x2000f6d8 08034060 : } } static void ip_addrentry_get_value(struct obj_def *od, u16_t len, void *value) { 8034060: b573 push {r0, r1, r4, r5, r6, lr} 8034062: 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); 8034064: 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; 8034066: 4b18 ldr r3, [pc, #96] ; (80340c8 ) LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); 8034068: a901 add r1, sp, #4 803406a: 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; 803406c: 681c ldr r4, [r3, #0] } } static void ip_addrentry_get_value(struct obj_def *od, u16_t len, void *value) { 803406e: 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); 8034070: f000 ffee bl 8035050 ifidx = 0; while ((netif != NULL) && !ip_addr_cmp(&ip, &netif->ip_addr)) 8034074: 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; 8034076: 2300 movs r3, #0 while ((netif != NULL) && !ip_addr_cmp(&ip, &netif->ip_addr)) 8034078: e002 b.n 8034080 { netif = netif->next; ifidx++; 803407a: 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; 803407c: 6824 ldr r4, [r4, #0] ifidx++; 803407e: 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)) 8034080: b304 cbz r4, 80340c4 8034082: 6862 ldr r2, [r4, #4] 8034084: 4291 cmp r1, r2 8034086: d1f8 bne.n 803407a 8034088: e00a b.n 80340a0 switch (id) { case 1: /* ipAdEntAddr */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = netif->ip_addr; 803408a: 6863 ldr r3, [r4, #4] 803408c: e006 b.n 803409c } break; case 2: /* ipAdEntIfIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = ifidx + 1; 803408e: 3301 adds r3, #1 8034090: e004 b.n 803409c } break; case 3: /* ipAdEntNetMask */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = netif->netmask; 8034092: 68a3 ldr r3, [r4, #8] 8034094: e002 b.n 803409c { 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; 8034096: 2301 movs r3, #1 8034098: e000 b.n 803409c *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; 803409a: 2300 movs r3, #0 803409c: 602b str r3, [r5, #0] #endif } break; 803409e: e011 b.n 80340c4 } 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]; 80340a0: 68b2 ldr r2, [r6, #8] switch (id) 80340a2: 7812 ldrb r2, [r2, #0] 80340a4: 3a01 subs r2, #1 80340a6: 2a04 cmp r2, #4 80340a8: d80c bhi.n 80340c4 80340aa: a101 add r1, pc, #4 ; (adr r1, 80340b0 ) 80340ac: f851 f022 ldr.w pc, [r1, r2, lsl #2] 80340b0: 0803408b .word 0x0803408b 80340b4: 0803408f .word 0x0803408f 80340b8: 08034093 .word 0x08034093 80340bc: 08034097 .word 0x08034097 80340c0: 0803409b .word 0x0803409b #endif } break; } } } 80340c4: bd7c pop {r2, r3, r4, r5, r6, pc} 80340c6: bf00 nop 80340c8: 2000f6b0 .word 0x2000f6b0 080340cc : } } static void ip_ntomentry_get_value(struct obj_def *od, u16_t len, void *value) { 80340cc: 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); 80340ce: 6883 ldr r3, [r0, #8] } } static void ip_ntomentry_get_value(struct obj_def *od, u16_t len, void *value) { 80340d0: b085 sub sp, #20 80340d2: 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); 80340d4: a903 add r1, sp, #12 80340d6: 6858 ldr r0, [r3, #4] } } static void ip_ntomentry_get_value(struct obj_def *od, u16_t len, void *value) { 80340d8: 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); 80340da: f000 ff9b bl 8035014 snmp_oidtoip(&od->id_inst_ptr[2], &ip); 80340de: 68a8 ldr r0, [r5, #8] 80340e0: a902 add r1, sp, #8 80340e2: 3008 adds r0, #8 80340e4: f000 ffb4 bl 8035050 #if LWIP_ARP /** @todo implement a netif_find_addr */ if (etharp_find_addr(netif, &ip, ðaddr_ret, &ipaddr_ret) > -1) 80340e8: 9803 ldr r0, [sp, #12] 80340ea: a902 add r1, sp, #8 80340ec: 466a mov r2, sp 80340ee: ab01 add r3, sp, #4 80340f0: f002 fff4 bl 80370dc 80340f4: 2800 cmp r0, #0 80340f6: db15 blt.n 8034124 { LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 80340f8: 68ab ldr r3, [r5, #8] switch (id) 80340fa: 781a ldrb r2, [r3, #0] 80340fc: 3a01 subs r2, #1 80340fe: 2a03 cmp r2, #3 8034100: d810 bhi.n 8034124 8034102: e8df f002 tbb [pc, r2] 8034106: 0402 .short 0x0402 8034108: 0d0a .short 0x0d0a { case 1: /* ipNetToMediaIfIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = od->id_inst_ptr[1]; 803410a: 685b ldr r3, [r3, #4] 803410c: e009 b.n 8034122 break; case 2: /* ipNetToMediaPhysAddress */ { struct eth_addr *dst = (struct eth_addr*)value; *dst = *ethaddr_ret; 803410e: 9b00 ldr r3, [sp, #0] 8034110: 681a ldr r2, [r3, #0] 8034112: 6022 str r2, [r4, #0] 8034114: 889b ldrh r3, [r3, #4] 8034116: 80a3 strh r3, [r4, #4] } break; 8034118: e004 b.n 8034124 case 3: /* ipNetToMediaNetAddress */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = *ipaddr_ret; 803411a: 9b01 ldr r3, [sp, #4] 803411c: 681b ldr r3, [r3, #0] 803411e: e000 b.n 8034122 break; case 4: /* ipNetToMediaType */ { s32_t *sint_ptr = (s32_t*)value; /* dynamic (?) */ *sint_ptr = 3; 8034120: 2303 movs r3, #3 8034122: 6023 str r3, [r4, #0] } break; } } #endif /* LWIP_ARP */ } 8034124: b005 add sp, #20 8034126: bd30 pop {r4, r5, pc} 08034128 : } } static void atentry_get_value(struct obj_def *od, u16_t len, void *value) { 8034128: 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); 803412a: 6883 ldr r3, [r0, #8] } } static void atentry_get_value(struct obj_def *od, u16_t len, void *value) { 803412c: b085 sub sp, #20 803412e: 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); 8034130: a903 add r1, sp, #12 8034132: 6858 ldr r0, [r3, #4] } } static void atentry_get_value(struct obj_def *od, u16_t len, void *value) { 8034134: 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); 8034136: f000 ff6d bl 8035014 snmp_oidtoip(&od->id_inst_ptr[2], &ip); 803413a: 68a8 ldr r0, [r5, #8] 803413c: a902 add r1, sp, #8 803413e: 3008 adds r0, #8 8034140: f000 ff86 bl 8035050 #if LWIP_ARP /** @todo implement a netif_find_addr */ if (etharp_find_addr(netif, &ip, ðaddr_ret, &ipaddr_ret) > -1) 8034144: 9803 ldr r0, [sp, #12] 8034146: a902 add r1, sp, #8 8034148: 466a mov r2, sp 803414a: ab01 add r3, sp, #4 803414c: f002 ffc6 bl 80370dc 8034150: 2800 cmp r0, #0 8034152: db12 blt.n 803417a { LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 8034154: 68aa ldr r2, [r5, #8] switch (id) 8034156: 7813 ldrb r3, [r2, #0] 8034158: 2b02 cmp r3, #2 803415a: d005 beq.n 8034168 803415c: 2b03 cmp r3, #3 803415e: d009 beq.n 8034174 8034160: 2b01 cmp r3, #1 8034162: d10a bne.n 803417a { case 1: /* atIfIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = od->id_inst_ptr[1]; 8034164: 6853 ldr r3, [r2, #4] 8034166: e007 b.n 8034178 break; case 2: /* atPhysAddress */ { struct eth_addr *dst = (struct eth_addr*)value; *dst = *ethaddr_ret; 8034168: 9b00 ldr r3, [sp, #0] 803416a: 681a ldr r2, [r3, #0] 803416c: 6022 str r2, [r4, #0] 803416e: 889b ldrh r3, [r3, #4] 8034170: 80a3 strh r3, [r4, #4] } break; 8034172: e002 b.n 803417a case 3: /* atNetAddress */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = *ipaddr_ret; 8034174: 9b01 ldr r3, [sp, #4] 8034176: 681b ldr r3, [r3, #0] 8034178: 6023 str r3, [r4, #0] } break; } } #endif /* LWIP_ARP */ } 803417a: b005 add sp, #20 803417c: bd30 pop {r4, r5, pc} 803417e: 0000 movs r0, r0 08034180 : 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]; 8034180: 6883 ldr r3, [r0, #8] switch (id) 8034182: 781b ldrb r3, [r3, #0] 8034184: 2b05 cmp r3, #5 8034186: d007 beq.n 8034198 8034188: 2b06 cmp r3, #6 803418a: d00f beq.n 80341ac 803418c: 2b04 cmp r3, #4 803418e: d111 bne.n 80341b4 { case 4: /* sysContact */ if ((syscontact_ptr != syscontact_default) && 8034190: 4b09 ldr r3, [pc, #36] ; (80341b8 ) 8034192: 681a ldr r2, [r3, #0] 8034194: 4b09 ldr r3, [pc, #36] ; (80341bc ) 8034196: e002 b.n 803419e { set_ok = 1; } break; case 5: /* sysName */ if ((sysname_ptr != sysname_default) && 8034198: 4b09 ldr r3, [pc, #36] ; (80341c0 ) 803419a: 681a ldr r2, [r3, #0] 803419c: 4b09 ldr r3, [pc, #36] ; (80341c4 ) 803419e: 429a cmp r2, r3 80341a0: d008 beq.n 80341b4 system_set_test(struct obj_def *od, u16_t len, void *value) { u8_t id, set_ok; LWIP_UNUSED_ARG(value); set_ok = 0; 80341a2: 29ff cmp r1, #255 ; 0xff 80341a4: bf8c ite hi 80341a6: 2000 movhi r0, #0 80341a8: 2001 movls r0, #1 80341aa: 4770 bx lr { set_ok = 1; } break; case 6: /* sysLocation */ if ((syslocation_ptr != syslocation_default) && 80341ac: 4b06 ldr r3, [pc, #24] ; (80341c8 ) 80341ae: 681a ldr r2, [r3, #0] 80341b0: 4b06 ldr r3, [pc, #24] ; (80341cc ) 80341b2: e7f4 b.n 803419e system_set_test(struct obj_def *od, u16_t len, void *value) { u8_t id, set_ok; LWIP_UNUSED_ARG(value); set_ok = 0; 80341b4: 2000 movs r0, #0 set_ok = 1; } break; }; return set_ok; } 80341b6: 4770 bx lr 80341b8: 20000914 .word 0x20000914 80341bc: 08045408 .word 0x08045408 80341c0: 200008a0 .word 0x200008a0 80341c4: 08045120 .word 0x08045120 80341c8: 20000a2c .word 0x20000a2c 80341cc: 08045150 .word 0x08045150 080341d0 : { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; if (ident_len == 6) 80341d0: 2801 cmp r0, #1 80341d2: d120 bne.n 8034216 { od->id_inst_len = ident_len; 80341d4: 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; 80341d6: f1a1 0314 sub.w r3, r1, #20 if (ident_len == 6) { od->id_inst_len = ident_len; 80341da: 7190 strb r0, [r2, #6] od->id_inst_ptr = ident; 80341dc: 6093 str r3, [r2, #8] switch (ident[0]) 80341de: f851 3c14 ldr.w r3, [r1, #-20] 80341e2: 2b02 cmp r3, #2 80341e4: d008 beq.n 80341f8 80341e6: 2b03 cmp r3, #3 80341e8: d00d beq.n 8034206 80341ea: 2b01 cmp r3, #1 80341ec: d113 bne.n 8034216 { case 1: /* atIfIndex */ od->instance = MIB_OBJECT_TAB; 80341ee: 2302 movs r3, #2 od->access = MIB_OBJECT_READ_WRITE; 80341f0: 2103 movs r1, #3 od->id_inst_ptr = ident; switch (ident[0]) { case 1: /* atIfIndex */ od->instance = MIB_OBJECT_TAB; 80341f2: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 80341f4: 7051 strb r1, [r2, #1] 80341f6: e00a b.n 803420e 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; 80341f8: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 80341fa: 2303 movs r3, #3 80341fc: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 80341fe: 2304 movs r3, #4 8034200: 7093 strb r3, [r2, #2] od->v_len = 6; /** @todo try to use netif::hwaddr_len */ 8034202: 8090 strh r0, [r2, #4] break; 8034204: 4770 bx lr case 3: /* atNetAddress */ od->instance = MIB_OBJECT_TAB; 8034206: 2102 movs r1, #2 od->access = MIB_OBJECT_READ_WRITE; 8034208: 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; 803420a: 7011 strb r1, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 803420c: 2340 movs r3, #64 ; 0x40 803420e: 7093 strb r3, [r2, #2] od->v_len = 4; 8034210: 2304 movs r3, #4 8034212: 8093 strh r3, [r2, #4] break; 8034214: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("atentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8034216: 2300 movs r3, #0 8034218: 7013 strb r3, [r2, #0] 803421a: 4770 bx lr 0803421c : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 803421c: 2801 cmp r0, #1 #endif /* LWIP_ARP */ } static void ip_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { 803421e: b510 push {r4, lr} u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8034220: d121 bne.n 8034266 { od->id_inst_len = ident_len; 8034222: 2402 movs r4, #2 { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 8034224: 1f0b subs r3, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; 8034226: 7194 strb r4, [r2, #6] od->id_inst_ptr = ident; 8034228: 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) 803422a: f811 3c04 ldrb.w r3, [r1, #-4] 803422e: 2b17 cmp r3, #23 8034230: d819 bhi.n 8034266 8034232: 490e ldr r1, [pc, #56] ; (803426c ) 8034234: 4099 lsls r1, r3 8034236: d40b bmi.n 8034250 8034238: f44f 2180 mov.w r1, #262144 ; 0x40000 803423c: 4099 lsls r1, r3 803423e: d40c bmi.n 803425a 8034240: f04f 41c0 mov.w r1, #1610612736 ; 0x60000000 8034244: 4099 lsls r1, r3 8034246: d50e bpl.n 8034266 { case 1: /* ipForwarding */ case 2: /* ipDefaultTTL */ od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_WRITE; 8034248: 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; 803424a: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 803424c: 7053 strb r3, [r2, #1] 803424e: e006 b.n 803425e 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); 8034250: 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; 8034252: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8034254: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 8034256: 7093 strb r3, [r2, #2] 8034258: e002 b.n 8034260 od->v_len = sizeof(u32_t); break; case 13: /* ipReasmTimeout */ od->instance = MIB_OBJECT_SCALAR; 803425a: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 803425c: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 803425e: 7094 strb r4, [r2, #2] od->v_len = sizeof(s32_t); 8034260: 2304 movs r3, #4 8034262: 8093 strh r3, [r2, #4] break; 8034264: bd10 pop {r4, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8034266: 2300 movs r3, #0 8034268: 7013 strb r3, [r2, #0] 803426a: bd10 pop {r4, pc} 803426c: 1ffbf100 .word 0x1ffbf100 08034270 : { /* return to object name, adding index depth (4) */ ident_len += 4; ident -= 4; if (ident_len == 5) 8034270: 2801 cmp r0, #1 8034272: d11c bne.n 80342ae { u8_t id; od->id_inst_len = ident_len; 8034274: 2305 movs r3, #5 8034276: 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; 8034278: 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; 803427c: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 803427e: f811 3c10 ldrb.w r3, [r1, #-16] 8034282: 2b05 cmp r3, #5 8034284: d813 bhi.n 80342ae 8034286: f04f 5130 mov.w r1, #738197504 ; 0x2c000000 803428a: 4099 lsls r1, r3 803428c: d408 bmi.n 80342a0 803428e: f04f 41a0 mov.w r1, #1342177280 ; 0x50000000 8034292: 4099 lsls r1, r3 8034294: d50b bpl.n 80342ae { case 1: /* ipAdEntAddr */ case 3: /* ipAdEntNetMask */ od->instance = MIB_OBJECT_TAB; 8034296: 2302 movs r3, #2 8034298: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 803429a: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 803429c: 2340 movs r3, #64 ; 0x40 803429e: e002 b.n 80342a6 od->v_len = 4; break; case 2: /* ipAdEntIfIndex */ case 4: /* ipAdEntBcastAddr */ case 5: /* ipAdEntReasmMaxSize */ od->instance = MIB_OBJECT_TAB; 80342a0: 2302 movs r3, #2 80342a2: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 80342a4: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 80342a6: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 80342a8: 2304 movs r3, #4 80342aa: 8093 strh r3, [r2, #4] break; 80342ac: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_addrentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 80342ae: 2300 movs r3, #0 80342b0: 7013 strb r3, [r2, #0] 80342b2: 4770 bx lr 080342b4 : { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; if (ident_len == 6) 80342b4: 2801 cmp r0, #1 80342b6: d123 bne.n 8034300 { u8_t id; od->id_inst_len = ident_len; 80342b8: 2306 movs r3, #6 80342ba: 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; 80342bc: 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; 80342c0: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 80342c2: f811 3c14 ldrb.w r3, [r1, #-20] 80342c6: 3b01 subs r3, #1 80342c8: 2b03 cmp r3, #3 80342ca: d819 bhi.n 8034300 80342cc: e8df f003 tbb [pc, r3] 80342d0: 020f0702 .word 0x020f0702 { case 1: /* ipNetToMediaIfIndex */ case 4: /* ipNetToMediaType */ od->instance = MIB_OBJECT_TAB; 80342d4: 2302 movs r3, #2 od->access = MIB_OBJECT_READ_WRITE; 80342d6: 2103 movs r1, #3 id = (u8_t)ident[0]; switch (id) { case 1: /* ipNetToMediaIfIndex */ case 4: /* ipNetToMediaType */ od->instance = MIB_OBJECT_TAB; 80342d8: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 80342da: 7051 strb r1, [r2, #1] 80342dc: e00c b.n 80342f8 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; 80342de: 2302 movs r3, #2 80342e0: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 80342e2: 2303 movs r3, #3 80342e4: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 80342e6: 2304 movs r3, #4 80342e8: 7093 strb r3, [r2, #2] od->v_len = 6; /** @todo try to use netif::hwaddr_len */ 80342ea: 2306 movs r3, #6 80342ec: e006 b.n 80342fc break; case 3: /* ipNetToMediaNetAddress */ od->instance = MIB_OBJECT_TAB; 80342ee: 2302 movs r3, #2 80342f0: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 80342f2: 2303 movs r3, #3 80342f4: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 80342f6: 2340 movs r3, #64 ; 0x40 80342f8: 7093 strb r3, [r2, #2] od->v_len = 4; 80342fa: 2304 movs r3, #4 80342fc: 8093 strh r3, [r2, #4] break; 80342fe: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_ntomentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8034300: 2300 movs r3, #0 8034302: 7013 strb r3, [r2, #0] 8034304: 4770 bx lr 8034306: 0000 movs r0, r0 08034308 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8034308: 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) { 803430a: b510 push {r4, lr} u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 803430c: d121 bne.n 8034352 { od->id_inst_len = ident_len; 803430e: 2402 movs r4, #2 { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 8034310: 1f0b subs r3, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; 8034312: 7194 strb r4, [r2, #6] od->id_inst_ptr = ident; 8034314: 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) 8034316: f811 3c04 ldrb.w r3, [r1, #-4] 803431a: 2b0f cmp r3, #15 803431c: d819 bhi.n 8034352 803431e: 490e ldr r1, [pc, #56] ; (8034358 ) 8034320: 4099 lsls r1, r3 8034322: d40b bmi.n 803433c 8034324: f44f 0180 mov.w r1, #4194304 ; 0x400000 8034328: 4099 lsls r1, r3 803432a: d40b bmi.n 8034344 803432c: f04f 41f0 mov.w r1, #2013265920 ; 0x78000000 8034330: 4099 lsls r1, r3 8034332: d50e bpl.n 8034352 { case 1: /* tcpRtoAlgorithm */ case 2: /* tcpRtoMin */ case 3: /* tcpRtoMax */ case 4: /* tcpMaxConn */ od->instance = MIB_OBJECT_SCALAR; 8034334: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8034336: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 8034338: 7094 strb r4, [r2, #2] 803433a: e007 b.n 803434c case 10: /* tcpInSegs */ case 11: /* tcpOutSegs */ case 12: /* tcpRetransSegs */ case 14: /* tcpInErrs */ case 15: /* tcpOutRsts */ od->instance = MIB_OBJECT_SCALAR; 803433c: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 803433e: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 8034340: 2341 movs r3, #65 ; 0x41 8034342: e002 b.n 803434a od->v_len = sizeof(u32_t); break; case 9: /* tcpCurrEstab */ od->instance = MIB_OBJECT_TAB; 8034344: 7014 strb r4, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8034346: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_GAUGE); 8034348: 2342 movs r3, #66 ; 0x42 803434a: 7093 strb r3, [r2, #2] od->v_len = sizeof(u32_t); 803434c: 2304 movs r3, #4 803434e: 8093 strh r3, [r2, #4] break; 8034350: bd10 pop {r4, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("tcp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8034352: 2300 movs r3, #0 8034354: 7013 strb r3, [r2, #0] 8034356: bd10 pop {r4, pc} 8034358: 07bb0000 .word 0x07bb0000 0803435c : { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; if (ident_len == 6) 803435c: 2801 cmp r0, #1 803435e: d116 bne.n 803438e { od->id_inst_len = ident_len; 8034360: 2306 movs r3, #6 8034362: 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; 8034364: f1a1 0314 sub.w r3, r1, #20 if (ident_len == 6) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8034368: 6093 str r3, [r2, #8] switch (ident[0]) 803436a: f851 3c14 ldr.w r3, [r1, #-20] 803436e: 2b01 cmp r3, #1 8034370: d002 beq.n 8034378 8034372: 2b02 cmp r3, #2 8034374: d10b bne.n 803438e 8034376: e004 b.n 8034382 { case 1: /* udpLocalAddress */ od->instance = MIB_OBJECT_TAB; 8034378: 2102 movs r1, #2 od->access = MIB_OBJECT_READ_ONLY; 803437a: 7053 strb r3, [r2, #1] od->id_inst_ptr = ident; switch (ident[0]) { case 1: /* udpLocalAddress */ od->instance = MIB_OBJECT_TAB; 803437c: 7011 strb r1, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 803437e: 2340 movs r3, #64 ; 0x40 8034380: e001 b.n 8034386 od->v_len = 4; break; case 2: /* udpLocalPort */ od->instance = MIB_OBJECT_TAB; 8034382: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8034384: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 8034386: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 8034388: 2304 movs r3, #4 803438a: 8093 strh r3, [r2, #4] break; 803438c: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("udpentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 803438e: 2300 movs r3, #0 8034390: 7013 strb r3, [r2, #0] 8034392: 4770 bx lr 08034394 : 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) 8034394: 2801 cmp r0, #1 } } static void snmp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { 8034396: b510 push {r4, lr} /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8034398: d119 bne.n 80343ce { u8_t id; od->id_inst_len = ident_len; 803439a: 2302 movs r3, #2 803439c: 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; 803439e: 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) 80343a0: 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; 80343a4: 6094 str r4, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 80343a6: 291e cmp r1, #30 80343a8: d811 bhi.n 80343ce 80343aa: 4c0a ldr r4, [pc, #40] ; (80343d4 ) 80343ac: 408c lsls r4, r1 80343ae: d403 bmi.n 80343b8 80343b0: fa13 f101 lsls.w r1, r3, r1 80343b4: d404 bmi.n 80343c0 80343b6: e00a b.n 80343ce case 25: /* snmpOutGetRequests */ case 26: /* snmpOutGetNexts */ case 27: /* snmpOutSetRequests */ case 28: /* snmpOutGetResponses */ case 29: /* snmpOutTraps */ od->instance = MIB_OBJECT_SCALAR; 80343b8: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 80343ba: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 80343bc: 2341 movs r3, #65 ; 0x41 80343be: e002 b.n 80343c6 od->v_len = sizeof(u32_t); break; case 30: /* snmpEnableAuthenTraps */ od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_WRITE; 80343c0: 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; 80343c2: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 80343c4: 7051 strb r1, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 80343c6: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 80343c8: 2304 movs r3, #4 80343ca: 8093 strh r3, [r2, #4] break; 80343cc: bd10 pop {r4, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("snmp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 80343ce: 2300 movs r3, #0 80343d0: 7013 strb r3, [r2, #0] 80343d2: bd10 pop {r4, pc} 80343d4: 7efffefc .word 0x7efffefc 080343d8 : 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]; 80343d8: 6883 ldr r3, [r0, #8] if (id == 30) 80343da: 781b ldrb r3, [r3, #0] 80343dc: 2b1e cmp r3, #30 80343de: d10f bne.n 8034400 { /* snmpEnableAuthenTraps */ s32_t *sint_ptr = (s32_t*)value; if (snmpenableauthentraps_ptr != &snmpenableauthentraps_default) 80343e0: 4b08 ldr r3, [pc, #32] ; (8034404 ) 80343e2: 6810 ldr r0, [r2, #0] 80343e4: 6819 ldr r1, [r3, #0] 80343e6: 4b08 ldr r3, [pc, #32] ; (8034408 ) 80343e8: 4299 cmp r1, r3 80343ea: d005 beq.n 80343f8 { /* we should have writable non-volatile mem here */ if ((*sint_ptr == 1) || (*sint_ptr == 2)) 80343ec: 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; 80343ee: 2801 cmp r0, #1 80343f0: bf8c ite hi 80343f2: 2000 movhi r0, #0 80343f4: 2001 movls r0, #1 80343f6: 4770 bx lr 80343f8: 1e83 subs r3, r0, #2 80343fa: 4258 negs r0, r3 80343fc: 4158 adcs r0, r3 80343fe: 4770 bx lr 8034400: 2000 movs r0, #0 set_ok = 1; } } } return set_ok; } 8034402: 4770 bx lr 8034404: 20000898 .word 0x20000898 8034408: 08045204 .word 0x08045204 0803440c : * @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) { 803440c: b510 push {r4, lr} u16_t i = n; while (i > 0) { 803440e: 2300 movs r3, #0 8034410: e002 b.n 8034418 i--; *dst++ = *src++; 8034412: 5ccc ldrb r4, [r1, r3] 8034414: 54c4 strb r4, [r0, r3] 8034416: 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) { 8034418: b29c uxth r4, r3 803441a: 42a2 cmp r2, r4 803441c: d1f9 bne.n 8034412 i--; *dst++ = *src++; } } 803441e: bd10 pop {r4, pc} 08034420 : { 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]; 8034420: 6883 ldr r3, [r0, #8] switch (id) 8034422: 781b ldrb r3, [r3, #0] 8034424: 2b05 cmp r3, #5 return set_ok; } static void system_set_value(struct obj_def *od, u16_t len, void *value) { 8034426: b510 push {r4, lr} 8034428: 460c mov r4, r1 803442a: 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) 803442c: d00a beq.n 8034444 803442e: 2b06 cmp r3, #6 8034430: d00f beq.n 8034452 8034432: 2b04 cmp r3, #4 8034434: d115 bne.n 8034462 { case 4: /* sysContact */ ocstrncpy(syscontact_ptr, (u8_t*)value, len); 8034436: 4b0b ldr r3, [pc, #44] ; (8034464 ) 8034438: 4622 mov r2, r4 803443a: 6818 ldr r0, [r3, #0] 803443c: f7ff ffe6 bl 803440c *syscontact_len_ptr = (u8_t)len; 8034440: 4b09 ldr r3, [pc, #36] ; (8034468 ) 8034442: e00c b.n 803445e break; case 5: /* sysName */ ocstrncpy(sysname_ptr, (u8_t*)value, len); 8034444: 4b09 ldr r3, [pc, #36] ; (803446c ) 8034446: 4622 mov r2, r4 8034448: 6818 ldr r0, [r3, #0] 803444a: f7ff ffdf bl 803440c *sysname_len_ptr = (u8_t)len; 803444e: 4b08 ldr r3, [pc, #32] ; (8034470 ) 8034450: e005 b.n 803445e break; case 6: /* sysLocation */ ocstrncpy(syslocation_ptr, (u8_t*)value, len); 8034452: 4b08 ldr r3, [pc, #32] ; (8034474 ) 8034454: 4622 mov r2, r4 8034456: 6818 ldr r0, [r3, #0] 8034458: f7ff ffd8 bl 803440c *syslocation_len_ptr = (u8_t)len; 803445c: 4b06 ldr r3, [pc, #24] ; (8034478 ) 803445e: 681b ldr r3, [r3, #0] 8034460: 701c strb r4, [r3, #0] 8034462: bd10 pop {r4, pc} 8034464: 20000914 .word 0x20000914 8034468: 20000798 .word 0x20000798 803446c: 200008a0 .word 0x200008a0 8034470: 20000794 .word 0x20000794 8034474: 20000a2c .word 0x20000a2c 8034478: 20000980 .word 0x20000980 0803447c : * * @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) 803447c: 3904 subs r1, #4 { u8_t i = n; while(i > 0) { 803447e: e005 b.n 803448c i--; *dst++ = *src++; 8034480: 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--; 8034484: 3a01 subs r2, #1 *dst++ = *src++; 8034486: 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--; 803448a: 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) { 803448c: 2a00 cmp r2, #0 803448e: d1f7 bne.n 8034480 i--; *dst++ = *src++; } } 8034490: 4770 bx lr 8034492: 0000 movs r0, r0 08034494 : * @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) { 8034494: b573 push {r0, r1, r4, r5, r6, lr} struct netif *netif; u8_t id; snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 8034496: 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) { 8034498: 4606 mov r6, r0 803449a: 460d mov r5, r1 struct netif *netif; u8_t id; snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 803449c: 6858 ldr r0, [r3, #4] 803449e: 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) { 80344a0: 4614 mov r4, r2 struct netif *netif; u8_t id; snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 80344a2: f000 fdb7 bl 8035014 LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 80344a6: 68b3 ldr r3, [r6, #8] switch (id) 80344a8: 781a ldrb r2, [r3, #0] 80344aa: 3a01 subs r2, #1 80344ac: 2a15 cmp r2, #21 80344ae: d85c bhi.n 803456a 80344b0: e8df f002 tbb [pc, r2] 80344b4: 15110d0b .word 0x15110d0b 80344b8: 2e221b18 .word 0x2e221b18 80344bc: 403d3a37 .word 0x403d3a37 80344c0: 46525243 .word 0x46525243 80344c4: 524f4c49 .word 0x524f4c49 80344c8: 5552 .short 0x5552 { case 1: /* ifIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = od->id_inst_ptr[1]; 80344ca: 685b ldr r3, [r3, #4] 80344cc: e045 b.n 803455a } break; case 2: /* ifDescr */ ocstrncpy((u8_t*)value, (u8_t*)netif->name, len); 80344ce: 9901 ldr r1, [sp, #4] 80344d0: 4620 mov r0, r4 80344d2: 312e adds r1, #46 ; 0x2e 80344d4: e00c b.n 80344f0 break; case 3: /* ifType */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = netif->link_type; 80344d6: 9b01 ldr r3, [sp, #4] 80344d8: f893 3031 ldrb.w r3, [r3, #49] ; 0x31 80344dc: e03d b.n 803455a } break; case 4: /* ifMtu */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = netif->mtu; 80344de: 9b01 ldr r3, [sp, #4] 80344e0: 8c9b ldrh r3, [r3, #36] ; 0x24 80344e2: e03a b.n 803455a } break; case 5: /* ifSpeed */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->link_speed; 80344e4: 9b01 ldr r3, [sp, #4] 80344e6: 6b5b ldr r3, [r3, #52] ; 0x34 80344e8: e037 b.n 803455a } break; case 6: /* ifPhysAddress */ ocstrncpy((u8_t*)value, netif->hwaddr, len); 80344ea: 9901 ldr r1, [sp, #4] 80344ec: 4620 mov r0, r4 80344ee: 3127 adds r1, #39 ; 0x27 80344f0: 462a mov r2, r5 80344f2: f7ff ff8b bl 803440c break; 80344f6: e038 b.n 803456a case 7: /* ifAdminStatus */ { s32_t *sint_ptr = (s32_t*)value; if (netif_is_up(netif)) 80344f8: 9b01 ldr r3, [sp, #4] 80344fa: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 80344fe: 07d9 lsls r1, r3, #31 8034500: d50d bpl.n 803451e { if (netif_is_link_up(netif)) 8034502: f003 0310 and.w r3, r3, #16 8034506: b2db uxtb r3, r3 8034508: b103 cbz r3, 803450c 803450a: e006 b.n 803451a { *sint_ptr = 1; /* up */ } else { *sint_ptr = 7; /* lowerLayerDown */ 803450c: 2307 movs r3, #7 803450e: e024 b.n 803455a } break; case 8: /* ifOperStatus */ { s32_t *sint_ptr = (s32_t*)value; if (netif_is_up(netif)) 8034510: 9b01 ldr r3, [sp, #4] 8034512: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 8034516: 07da lsls r2, r3, #31 8034518: d501 bpl.n 803451e { *sint_ptr = 1; 803451a: 2301 movs r3, #1 803451c: e01d b.n 803455a } else { *sint_ptr = 2; 803451e: 2302 movs r3, #2 8034520: e01b b.n 803455a } break; case 9: /* ifLastChange */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ts; 8034522: 9b01 ldr r3, [sp, #4] 8034524: 6b9b ldr r3, [r3, #56] ; 0x38 8034526: e018 b.n 803455a } break; case 10: /* ifInOctets */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifinoctets; 8034528: 9b01 ldr r3, [sp, #4] 803452a: 6bdb ldr r3, [r3, #60] ; 0x3c 803452c: e015 b.n 803455a } break; case 11: /* ifInUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifinucastpkts; 803452e: 9b01 ldr r3, [sp, #4] 8034530: 6c1b ldr r3, [r3, #64] ; 0x40 8034532: e012 b.n 803455a } break; case 12: /* ifInNUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifinnucastpkts; 8034534: 9b01 ldr r3, [sp, #4] 8034536: 6c5b ldr r3, [r3, #68] ; 0x44 8034538: e00f b.n 803455a } break; case 13: /* ifInDiscarts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifindiscards; 803453a: 9b01 ldr r3, [sp, #4] 803453c: 6c9b ldr r3, [r3, #72] ; 0x48 803453e: e00c b.n 803455a } break; case 16: /* ifOutOctets */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutoctets; 8034540: 9b01 ldr r3, [sp, #4] 8034542: 6cdb ldr r3, [r3, #76] ; 0x4c 8034544: e009 b.n 803455a } break; case 17: /* ifOutUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutucastpkts; 8034546: 9b01 ldr r3, [sp, #4] 8034548: 6d1b ldr r3, [r3, #80] ; 0x50 803454a: e006 b.n 803455a } break; case 18: /* ifOutNUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutnucastpkts; 803454c: 9b01 ldr r3, [sp, #4] 803454e: 6d5b ldr r3, [r3, #84] ; 0x54 8034550: e003 b.n 803455a } break; case 19: /* ifOutDiscarts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutdiscards; 8034552: 9b01 ldr r3, [sp, #4] 8034554: 6d9b ldr r3, [r3, #88] ; 0x58 8034556: e000 b.n 803455a 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; 8034558: 2300 movs r3, #0 803455a: 6023 str r3, [r4, #0] } break; 803455c: e005 b.n 803456a case 22: /* ifSpecific */ objectidncpy((s32_t*)value, (s32_t*)ifspecific.id, (u8_t)(len / sizeof(s32_t))); 803455e: 4620 mov r0, r4 8034560: 4902 ldr r1, [pc, #8] ; (803456c ) 8034562: f3c5 0287 ubfx r2, r5, #2, #8 8034566: f7ff ff89 bl 803447c break; }; } 803456a: bd7c pop {r2, r3, r4, r5, r6, pc} 803456c: 0804528c .word 0x0804528c 08034570 : } } static void ip_rteentry_get_value(struct obj_def *od, u16_t len, void *value) { 8034570: 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; 8034572: 6885 ldr r5, [r0, #8] } } static void ip_rteentry_get_value(struct obj_def *od, u16_t len, void *value) { 8034574: 460f mov r7, r1 ip_addr_t dest; s32_t *ident; u8_t id; ident = od->id_inst_ptr; snmp_oidtoip(&ident[1], &dest); 8034576: 1d28 adds r0, r5, #4 8034578: a901 add r1, sp, #4 } } static void ip_rteentry_get_value(struct obj_def *od, u16_t len, void *value) { 803457a: 4614 mov r4, r2 ip_addr_t dest; s32_t *ident; u8_t id; ident = od->id_inst_ptr; snmp_oidtoip(&ident[1], &dest); 803457c: f000 fd68 bl 8035050 if (ip_addr_isany(&dest)) 8034580: 9b01 ldr r3, [sp, #4] 8034582: b91b cbnz r3, 803458c { /* ip_route() uses default netif for default route */ netif = netif_default; 8034584: 4a23 ldr r2, [pc, #140] ; (8034614 ) 8034586: 6810 ldr r0, [r2, #0] !ip_addr_netcmp(&dest, &(netif->ip_addr), &(netif->netmask)) ) { netif = netif->next; } } if (netif != NULL) 8034588: b960 cbnz r0, 80345a4 803458a: e041 b.n 8034610 netif = netif_default; } else { /* not using ip_route(), need exact match! */ netif = netif_list; 803458c: 4a22 ldr r2, [pc, #136] ; (8034618 ) 803458e: 6810 ldr r0, [r2, #0] while ((netif != NULL) && 8034590: e000 b.n 8034594 !ip_addr_netcmp(&dest, &(netif->ip_addr), &(netif->netmask)) ) { netif = netif->next; 8034592: 6800 ldr r0, [r0, #0] } else { /* not using ip_route(), need exact match! */ netif = netif_list; while ((netif != NULL) && 8034594: 2800 cmp r0, #0 8034596: d03b beq.n 8034610 !ip_addr_netcmp(&dest, &(netif->ip_addr), &(netif->netmask)) ) 8034598: 6846 ldr r6, [r0, #4] 803459a: ea83 0206 eor.w r2, r3, r6 803459e: 6886 ldr r6, [r0, #8] } else { /* not using ip_route(), need exact match! */ netif = netif_list; while ((netif != NULL) && 80345a0: 4232 tst r2, r6 80345a2: d1f6 bne.n 8034592 } if (netif != NULL) { LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 80345a4: 782d ldrb r5, [r5, #0] 80345a6: 3d01 subs r5, #1 80345a8: 2d0c cmp r5, #12 80345aa: d831 bhi.n 8034610 80345ac: e8df f005 tbb [pc, r5] 80345b0: 14110d07 .word 0x14110d07 80345b4: 1c171414 .word 0x1c171414 80345b8: 14252321 .word 0x14252321 80345bc: 2a .byte 0x2a 80345bd: 00 .byte 0x00 { case 1: /* ipRouteDest */ { ip_addr_t *dst = (ip_addr_t*)value; if (ip_addr_isany(&dest)) 80345be: b903 cbnz r3, 80345c2 80345c0: e01e b.n 8034600 ip_addr_set_zero(dst); } else { /* netifs have netaddress dest */ ip_addr_get_network(dst, &netif->ip_addr, &netif->netmask); 80345c2: 6882 ldr r2, [r0, #8] 80345c4: 6843 ldr r3, [r0, #4] 80345c6: 4013 ands r3, r2 80345c8: e01a b.n 8034600 break; case 2: /* ipRouteIfIndex */ { s32_t *sint_ptr = (s32_t*)value; snmp_netiftoifindex(netif, sint_ptr); 80345ca: 4621 mov r1, r4 80345cc: f000 fd30 bl 8035030 } break; 80345d0: e01e b.n 8034610 case 3: /* ipRouteMetric1 */ { s32_t *sint_ptr = (s32_t*)value; if (ip_addr_isany(&dest)) 80345d2: b983 cbnz r3, 80345f6 { /* default rte has metric 1 */ *sint_ptr = 1; 80345d4: 2301 movs r3, #1 80345d6: e013 b.n 8034600 case 6: /* ipRouteMetric4 */ case 12: /* ipRouteMetric5 */ { s32_t *sint_ptr = (s32_t*)value; /* not used */ *sint_ptr = -1; 80345d8: f04f 33ff mov.w r3, #4294967295 80345dc: e010 b.n 8034600 break; case 7: /* ipRouteNextHop */ { ip_addr_t *dst = (ip_addr_t*)value; if (ip_addr_isany(&dest)) 80345de: b90b cbnz r3, 80345e4 { /* default rte: gateway */ *dst = netif->gw; 80345e0: 68c3 ldr r3, [r0, #12] 80345e2: e00d b.n 8034600 } else { /* other rtes: netif ip_addr */ *dst = netif->ip_addr; 80345e4: 6843 ldr r3, [r0, #4] 80345e6: e00b b.n 8034600 break; case 8: /* ipRouteType */ { s32_t *sint_ptr = (s32_t*)value; if (ip_addr_isany(&dest)) 80345e8: b90b cbnz r3, 80345ee { /* default rte is indirect */ *sint_ptr = 4; 80345ea: 2304 movs r3, #4 80345ec: e008 b.n 8034600 } else { /* other rtes are direct */ *sint_ptr = 3; 80345ee: 2303 movs r3, #3 80345f0: e006 b.n 8034600 break; case 9: /* ipRouteProto */ { s32_t *sint_ptr = (s32_t*)value; /* locally defined routes */ *sint_ptr = 2; 80345f2: 2302 movs r3, #2 80345f4: e004 b.n 8034600 case 10: /* ipRouteAge */ { s32_t *sint_ptr = (s32_t*)value; /** @todo (sysuptime - timestamp last change) / 100 @see snmp_insert_iprteidx_tree() */ *sint_ptr = 0; 80345f6: 2300 movs r3, #0 80345f8: e002 b.n 8034600 break; case 11: /* ipRouteMask */ { ip_addr_t *dst = (ip_addr_t*)value; if (ip_addr_isany(&dest)) 80345fa: b903 cbnz r3, 80345fe 80345fc: e000 b.n 8034600 ip_addr_set_zero(dst); } else { /* other rtes use netmask */ *dst = netif->netmask; 80345fe: 6883 ldr r3, [r0, #8] 8034600: 6023 str r3, [r4, #0] 8034602: e005 b.n 8034610 } } break; case 13: /* ipRouteInfo */ objectidncpy((s32_t*)value, (s32_t*)iprouteinfo.id, (u8_t)(len / sizeof(s32_t))); 8034604: 4620 mov r0, r4 8034606: 4905 ldr r1, [pc, #20] ; (803461c ) 8034608: f3c7 0287 ubfx r2, r7, #2, #8 803460c: f7ff ff36 bl 803447c break; } } } 8034610: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 8034612: bf00 nop 8034614: 2000f6b4 .word 0x2000f6b4 8034618: 2000f6b0 .word 0x2000f6b0 803461c: 080450a0 .word 0x080450a0 08034620 : * @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) 8034620: b118 cbz r0, 803462a { sysdescr_ptr = str; 8034622: 4b02 ldr r3, [pc, #8] ; (803462c ) 8034624: 6018 str r0, [r3, #0] sysdescr_len_ptr = len; 8034626: 4b02 ldr r3, [pc, #8] ; (8034630 ) 8034628: 6019 str r1, [r3, #0] 803462a: 4770 bx lr 803462c: 200008c0 .word 0x200008c0 8034630: 2000093c .word 0x2000093c 08034634 : * Initializes sysObjectID value. * * @param oid points to stuct snmp_obj_id to copy */ void snmp_set_sysobjid(struct snmp_obj_id *oid) { 8034634: 4601 mov r1, r0 8034636: b508 push {r3, lr} sysobjid = *oid; 8034638: 2284 movs r2, #132 ; 0x84 803463a: 4802 ldr r0, [pc, #8] ; (8034644 ) 803463c: f7ed f9a6 bl 802198c 8034640: bd08 pop {r3, pc} 8034642: bf00 nop 8034644: 200007ec .word 0x200007ec 08034648 : * 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++; 8034648: 4b02 ldr r3, [pc, #8] ; (8034654 ) 803464a: 681a ldr r2, [r3, #0] 803464c: 3201 adds r2, #1 803464e: 601a str r2, [r3, #0] 8034650: 4770 bx lr 8034652: bf00 nop 8034654: 2000c500 .word 0x2000c500 08034658 : { sysuptime+=value; } void snmp_get_sysuptime(u32_t *value) { 8034658: b510 push {r4, lr} 803465a: 4604 mov r4, r0 SNMP_GET_SYSUPTIME(sysuptime); 803465c: f003 fa1a bl 8037a94 8034660: 230a movs r3, #10 8034662: 4a03 ldr r2, [pc, #12] ; (8034670 ) 8034664: fbb0 f0f3 udiv r0, r0, r3 8034668: 6010 str r0, [r2, #0] *value = sysuptime; 803466a: 6020 str r0, [r4, #0] 803466c: bd10 pop {r4, pc} 803466e: bf00 nop 8034670: 2000c500 .word 0x2000c500 08034674 : * @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) { 8034674: 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]; 8034676: 6882 ldr r2, [r0, #8] switch (id) 8034678: 7812 ldrb r2, [r2, #0] 803467a: 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) { 803467c: b510 push {r4, lr} 803467e: 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) 8034680: 2a06 cmp r2, #6 8034682: d825 bhi.n 80346d0 8034684: e8df f002 tbb [pc, r2] 8034688: 140f0704 .word 0x140f0704 803468c: 1a17 .short 0x1a17 803468e: 22 .byte 0x22 803468f: 00 .byte 0x00 { case 1: /* sysDescr */ ocstrncpy((u8_t*)value, sysdescr_ptr, len); 8034690: 4618 mov r0, r3 8034692: 4b10 ldr r3, [pc, #64] ; (80346d4 ) 8034694: e014 b.n 80346c0 break; case 2: /* sysObjectID */ objectidncpy((s32_t*)value, (s32_t*)sysobjid.id, (u8_t)(len / sizeof(s32_t))); 8034696: 4910 ldr r1, [pc, #64] ; (80346d8 ) 8034698: 4618 mov r0, r3 803469a: f3c4 0287 ubfx r2, r4, #2, #8 s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; } break; }; } 803469e: 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))); 80346a2: f7ff beeb b.w 803447c break; case 3: /* sysUpTime */ { snmp_get_sysuptime((u32_t*)value); 80346a6: 4618 mov r0, r3 s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; } break; }; } 80346a8: 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); 80346ac: f7ff bfd4 b.w 8034658 } break; case 4: /* sysContact */ ocstrncpy((u8_t*)value, syscontact_ptr, len); 80346b0: 4618 mov r0, r3 80346b2: 4b0a ldr r3, [pc, #40] ; (80346dc ) 80346b4: e004 b.n 80346c0 break; case 5: /* sysName */ ocstrncpy((u8_t*)value, sysname_ptr, len); 80346b6: 4618 mov r0, r3 80346b8: 4b09 ldr r3, [pc, #36] ; (80346e0 ) 80346ba: e001 b.n 80346c0 break; case 6: /* sysLocation */ ocstrncpy((u8_t*)value, syslocation_ptr, len); 80346bc: 4618 mov r0, r3 80346be: 4b09 ldr r3, [pc, #36] ; (80346e4 ) 80346c0: 6819 ldr r1, [r3, #0] 80346c2: 4622 mov r2, r4 s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; } break; }; } 80346c4: 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); 80346c8: f7ff bea0 b.w 803440c break; case 7: /* sysServices */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; 80346cc: 2248 movs r2, #72 ; 0x48 80346ce: 601a str r2, [r3, #0] 80346d0: bd10 pop {r4, pc} 80346d2: bf00 nop 80346d4: 200008c0 .word 0x200008c0 80346d8: 200007f0 .word 0x200007f0 80346dc: 20000914 .word 0x20000914 80346e0: 200008a0 .word 0x200008a0 80346e4: 20000a2c .word 0x20000a2c 080346e8 : * @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) 80346e8: b118 cbz r0, 80346f2 { syscontact_ptr = ocstr; 80346ea: 4b02 ldr r3, [pc, #8] ; (80346f4 ) 80346ec: 6018 str r0, [r3, #0] syscontact_len_ptr = ocstrlen; 80346ee: 4b02 ldr r3, [pc, #8] ; (80346f8 ) 80346f0: 6019 str r1, [r3, #0] 80346f2: 4770 bx lr 80346f4: 20000914 .word 0x20000914 80346f8: 20000798 .word 0x20000798 080346fc : * @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) 80346fc: b118 cbz r0, 8034706 { sysname_ptr = ocstr; 80346fe: 4b02 ldr r3, [pc, #8] ; (8034708 ) 8034700: 6018 str r0, [r3, #0] sysname_len_ptr = ocstrlen; 8034702: 4b02 ldr r3, [pc, #8] ; (803470c ) 8034704: 6019 str r1, [r3, #0] 8034706: 4770 bx lr 8034708: 200008a0 .word 0x200008a0 803470c: 20000794 .word 0x20000794 08034710 : * @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) 8034710: b118 cbz r0, 803471a { syslocation_ptr = ocstr; 8034712: 4b02 ldr r3, [pc, #8] ; (803471c ) 8034714: 6018 str r0, [r3, #0] syslocation_len_ptr = ocstrlen; 8034716: 4b02 ldr r3, [pc, #8] ; (8034720 ) 8034718: 6019 str r1, [r3, #0] 803471a: 4770 bx lr 803471c: 20000a2c .word 0x20000a2c 8034720: 20000980 .word 0x20000980 08034724 : { (ni->ifoutdiscards)++; } void snmp_inc_iflist(void) { 8034724: 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); 8034726: 4806 ldr r0, [pc, #24] ; (8034740 ) (ni->ifoutdiscards)++; } void snmp_inc_iflist(void) { struct mib_list_node *if_node = NULL; 8034728: aa02 add r2, sp, #8 snmp_mib_node_insert(&iflist_root, iflist_root.count + 1, &if_node); 803472a: 8b81 ldrh r1, [r0, #28] (ni->ifoutdiscards)++; } void snmp_inc_iflist(void) { struct mib_list_node *if_node = NULL; 803472c: 2300 movs r3, #0 803472e: f842 3d04 str.w r3, [r2, #-4]! snmp_mib_node_insert(&iflist_root, iflist_root.count + 1, &if_node); 8034732: 3101 adds r1, #1 8034734: f000 fcd4 bl 80350e0 /* enable getnext traversal on filled table */ iftable.maxlength = 1; 8034738: 4b02 ldr r3, [pc, #8] ; (8034744 ) 803473a: 2201 movs r2, #1 803473c: 825a strh r2, [r3, #18] } 803473e: bd0e pop {r1, r2, r3, pc} 8034740: 200007cc .word 0x200007cc 8034744: 20000944 .word 0x20000944 08034748 : /** * 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) { 8034748: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 803474c: b086 sub sp, #24 803474e: 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]); 8034750: a901 add r1, sp, #4 8034752: f000 fc6d bl 8035030 snmp_iptooid(ip, &arpidx[1]); 8034756: 4620 mov r0, r4 8034758: a902 add r1, sp, #8 803475a: f000 fc86 bl 803506a for (tree = 0; tree < 2; tree++) { if (tree == 0) { at_rn = &arptree_root; 803475e: f8df 80a0 ldr.w r8, [pc, #160] ; 8034800 LWIP_ASSERT("ni != NULL", ni != NULL); snmp_netiftoifindex(ni, &arpidx[0]); snmp_iptooid(ip, &arpidx[1]); for (tree = 0; tree < 2; tree++) 8034762: 2500 movs r5, #0 { if (tree == 0) { at_rn = &arptree_root; 8034764: 4c1f ldr r4, [pc, #124] ; (80347e4 ) 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; 8034766: f8df 909c ldr.w r9, [pc, #156] ; 8034804 at_rn->set_value = noleafs_set_value; 803476a: f8df a09c ldr.w sl, [pc, #156] ; 8034808 for (tree = 0; tree < 2; tree++) { if (tree == 0) { at_rn = &arptree_root; 803476e: 2d00 cmp r5, #0 8034770: bf18 it ne 8034772: 4644 movne r4, r8 } else { at_rn = &ipntomtree_root; 8034774: 2600 movs r6, #0 } for (level = 0; level < 5; level++) { at_node = NULL; 8034776: 2300 movs r3, #0 8034778: 9300 str r3, [sp, #0] snmp_mib_node_insert(at_rn, arpidx[level], &at_node); 803477a: ab01 add r3, sp, #4 803477c: 4620 mov r0, r4 803477e: f853 1026 ldr.w r1, [r3, r6, lsl #2] 8034782: aa00 add r2, sp, #0 8034784: b2f7 uxtb r7, r6 8034786: f000 fcab bl 80350e0 if ((level != 4) && (at_node != NULL)) 803478a: 2f04 cmp r7, #4 803478c: d01d beq.n 80347ca 803478e: 9b00 ldr r3, [sp, #0] 8034790: b1db cbz r3, 80347ca { if (at_node->nptr == NULL) 8034792: 68dc ldr r4, [r3, #12] 8034794: b9cc cbnz r4, 80347ca { at_rn = snmp_mib_lrn_alloc(); 8034796: f000 fc81 bl 803509c at_node->nptr = (struct mib_node*)at_rn; 803479a: 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(); 803479c: 4604 mov r4, r0 at_node->nptr = (struct mib_node*)at_rn; 803479e: 60d8 str r0, [r3, #12] if (at_rn != NULL) 80347a0: b920 cbnz r0, 80347ac LWIP_ASSERT("ni != NULL", ni != NULL); snmp_netiftoifindex(ni, &arpidx[0]); snmp_iptooid(ip, &arpidx[1]); for (tree = 0; tree < 2; tree++) 80347a2: 3501 adds r5, #1 80347a4: b2ed uxtb r5, r5 80347a6: 2d02 cmp r5, #2 80347a8: d1dc bne.n 8034764 80347aa: e012 b.n 80347d2 { at_rn = snmp_mib_lrn_alloc(); at_node->nptr = (struct mib_node*)at_rn; if (at_rn != NULL) { if (level == 3) 80347ac: 2f03 cmp r7, #3 80347ae: d10c bne.n 80347ca { if (tree == 0) 80347b0: b91d cbnz r5, 80347ba { at_rn->get_object_def = atentry_get_object_def; 80347b2: 4b0d ldr r3, [pc, #52] ; (80347e8 ) 80347b4: 6003 str r3, [r0, #0] at_rn->get_value = atentry_get_value; 80347b6: 4b0d ldr r3, [pc, #52] ; (80347ec ) 80347b8: e002 b.n 80347c0 } else { at_rn->get_object_def = ip_ntomentry_get_object_def; 80347ba: 4b0d ldr r3, [pc, #52] ; (80347f0 ) 80347bc: 6003 str r3, [r0, #0] at_rn->get_value = ip_ntomentry_get_value; 80347be: 4b0d ldr r3, [pc, #52] ; (80347f4 ) 80347c0: 6063 str r3, [r4, #4] } at_rn->set_test = noleafs_set_test; 80347c2: f8c4 9008 str.w r9, [r4, #8] at_rn->set_value = noleafs_set_value; 80347c6: f8c4 a00c str.w sl, [r4, #12] 80347ca: 3601 adds r6, #1 } else { at_rn = &ipntomtree_root; } for (level = 0; level < 5; level++) 80347cc: 2e05 cmp r6, #5 80347ce: d1d2 bne.n 8034776 80347d0: e7e7 b.n 80347a2 } } } } /* enable getnext traversal on filled tables */ at.maxlength = 1; 80347d2: 4a09 ldr r2, [pc, #36] ; (80347f8 ) 80347d4: 2301 movs r3, #1 80347d6: 8253 strh r3, [r2, #18] ipntomtable.maxlength = 1; 80347d8: 4a08 ldr r2, [pc, #32] ; (80347fc ) 80347da: 8253 strh r3, [r2, #18] } 80347dc: b006 add sp, #24 80347de: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 80347e2: bf00 nop 80347e4: 20000918 .word 0x20000918 80347e8: 080341d1 .word 0x080341d1 80347ec: 08034129 .word 0x08034129 80347f0: 080342b5 .word 0x080342b5 80347f4: 080340cd .word 0x080340cd 80347f8: 2000073c .word 0x2000073c 80347fc: 20000720 .word 0x20000720 8034800: 20000a08 .word 0x20000a08 8034804: 080339eb .word 0x080339eb 8034808: 080339ef .word 0x080339ef 0803480c : /** * Removes ARP table indexes (.xIfIndex.xNetAddress) * from arp table index trees. */ void snmp_delete_arpidx_tree(struct netif *ni, ip_addr_t *ip) { 803480c: b5f0 push {r4, r5, r6, r7, lr} 803480e: b091 sub sp, #68 ; 0x44 8034810: 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]); 8034812: a90b add r1, sp, #44 ; 0x2c 8034814: f000 fc0c bl 8035030 snmp_iptooid(ip, &arpidx[1]); 8034818: 4620 mov r0, r4 803481a: a90c add r1, sp, #48 ; 0x30 803481c: f000 fc25 bl 803506a for (tree = 0; tree < 2; tree++) 8034820: 2700 movs r7, #0 { /* mark nodes for deletion */ if (tree == 0) { at_rn = &arptree_root; 8034822: 4b26 ldr r3, [pc, #152] ; (80348bc ) 8034824: 4d26 ldr r5, [pc, #152] ; (80348c0 ) } else { at_rn = &ipntomtree_root; 8034826: 2600 movs r6, #0 for (tree = 0; tree < 2; tree++) { /* mark nodes for deletion */ if (tree == 0) { at_rn = &arptree_root; 8034828: 2f00 cmp r7, #0 803482a: bf08 it eq 803482c: 461d moveq r5, r3 } else { at_rn = &ipntomtree_root; 803482e: 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); 8034830: ab0b add r3, sp, #44 ; 0x2c 8034832: 4628 mov r0, r5 8034834: 58f1 ldr r1, [r6, r3] 8034836: aa00 add r2, sp, #0 8034838: f000 fc8d bl 8035156 803483c: b2c0 uxtb r0, r0 if (fc == 0) 803483e: b198 cbz r0, 8034868 { /* arpidx[level] does not exist */ del_cnt = 0; at_rn = NULL; } else if (fc == 1) 8034840: 2801 cmp r0, #1 8034842: d10b bne.n 803485c { del_rn[del_cnt] = at_rn; 8034844: ab10 add r3, sp, #64 ; 0x40 8034846: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = at_n; 803484a: 9b00 ldr r3, [sp, #0] del_cnt = 0; at_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = at_rn; 803484c: f842 5c3c str.w r5, [r2, #-60] del_n[del_cnt] = at_n; del_cnt++; 8034850: 3401 adds r4, #1 at_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = at_rn; del_n[del_cnt] = at_n; 8034852: f842 3c28 str.w r3, [r2, #-40] del_cnt++; 8034856: b2e4 uxtb r4, r4 at_rn = (struct mib_list_rootnode*)(at_n->nptr); 8034858: 68dd ldr r5, [r3, #12] 803485a: e007 b.n 803486c } else if (fc == 2) 803485c: 2802 cmp r0, #2 803485e: d105 bne.n 803486c { /* reset delete (2 or more childs) */ del_cnt = 0; at_rn = (struct mib_list_rootnode*)(at_n->nptr); 8034860: 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; 8034862: 2400 movs r4, #0 at_rn = (struct mib_list_rootnode*)(at_n->nptr); 8034864: 68dd ldr r5, [r3, #12] 8034866: e001 b.n 803486c { fc = snmp_mib_node_find(at_rn, arpidx[level], &at_n); if (fc == 0) { /* arpidx[level] does not exist */ del_cnt = 0; 8034868: 4604 mov r4, r0 at_rn = NULL; 803486a: 4605 mov r5, r0 803486c: 3604 adds r6, #4 { at_rn = &ipntomtree_root; } level = 0; del_cnt = 0; while ((level < 5) && (at_rn != NULL)) 803486e: 2e14 cmp r6, #20 8034870: d011 beq.n 8034896 8034872: 2d00 cmp r5, #0 8034874: d1dc bne.n 8034830 8034876: e00e b.n 8034896 level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 8034878: 3c01 subs r4, #1 803487a: b2e4 uxtb r4, r4 at_rn = del_rn[del_cnt]; 803487c: aa10 add r2, sp, #64 ; 0x40 803487e: eb02 0384 add.w r3, r2, r4, lsl #2 at_n = del_n[del_cnt]; 8034882: f853 1c28 ldr.w r1, [r3, #-40] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; at_rn = del_rn[del_cnt]; 8034886: f853 0c3c ldr.w r0, [r3, #-60] at_n = del_n[del_cnt]; 803488a: 9100 str r1, [sp, #0] next = snmp_mib_node_delete(at_rn, at_n); 803488c: f000 fc7d bl 803518a if (next != NULL) 8034890: b108 cbz r0, 8034896 { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 8034892: f000 fc21 bl 80350d8 at_rn = (struct mib_list_rootnode*)(at_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 8034896: 2c00 cmp r4, #0 8034898: d1ee bne.n 8034878 u8_t fc, tree, level, del_cnt; snmp_netiftoifindex(ni, &arpidx[0]); snmp_iptooid(ip, &arpidx[1]); for (tree = 0; tree < 2; tree++) 803489a: 3701 adds r7, #1 803489c: b2ff uxtb r7, r7 803489e: 2f02 cmp r7, #2 80348a0: d1bf bne.n 8034822 snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty tables */ if(arptree_root.count == 0) at.maxlength = 0; 80348a2: 4b06 ldr r3, [pc, #24] ; (80348bc ) 80348a4: 8b9b ldrh r3, [r3, #28] 80348a6: b90b cbnz r3, 80348ac 80348a8: 4b06 ldr r3, [pc, #24] ; (80348c4 ) 80348aa: 825c strh r4, [r3, #18] if(ipntomtree_root.count == 0) ipntomtable.maxlength = 0; 80348ac: 4b04 ldr r3, [pc, #16] ; (80348c0 ) 80348ae: 8b9b ldrh r3, [r3, #28] 80348b0: b90b cbnz r3, 80348b6 80348b2: 4a05 ldr r2, [pc, #20] ; (80348c8 ) 80348b4: 8253 strh r3, [r2, #18] } 80348b6: b011 add sp, #68 ; 0x44 80348b8: bdf0 pop {r4, r5, r6, r7, pc} 80348ba: bf00 nop 80348bc: 20000918 .word 0x20000918 80348c0: 20000a08 .word 0x20000a08 80348c4: 2000073c .word 0x2000073c 80348c8: 20000720 .word 0x20000720 080348cc : void snmp_inc_ipinreceives(void) { ipinreceives++; 80348cc: 4b02 ldr r3, [pc, #8] ; (80348d8 ) 80348ce: 681a ldr r2, [r3, #0] 80348d0: 3201 adds r2, #1 80348d2: 601a str r2, [r3, #0] 80348d4: 4770 bx lr 80348d6: bf00 nop 80348d8: 2000c4d4 .word 0x2000c4d4 080348dc : } void snmp_inc_ipinhdrerrors(void) { ipinhdrerrors++; 80348dc: 4b02 ldr r3, [pc, #8] ; (80348e8 ) 80348de: 681a ldr r2, [r3, #0] 80348e0: 3201 adds r2, #1 80348e2: 601a str r2, [r3, #0] 80348e4: 4770 bx lr 80348e6: bf00 nop 80348e8: 2000c45c .word 0x2000c45c 080348ec : } void snmp_inc_ipinaddrerrors(void) { ipinaddrerrors++; 80348ec: 4b02 ldr r3, [pc, #8] ; (80348f8 ) 80348ee: 681a ldr r2, [r3, #0] 80348f0: 3201 adds r2, #1 80348f2: 601a str r2, [r3, #0] 80348f4: 4770 bx lr 80348f6: bf00 nop 80348f8: 2000c440 .word 0x2000c440 080348fc : ipforwdatagrams++; } void snmp_inc_ipinunknownprotos(void) { ipinunknownprotos++; 80348fc: 4b02 ldr r3, [pc, #8] ; (8034908 ) 80348fe: 681a ldr r2, [r3, #0] 8034900: 3201 adds r2, #1 8034902: 601a str r2, [r3, #0] 8034904: 4770 bx lr 8034906: bf00 nop 8034908: 2000c49c .word 0x2000c49c 0803490c : } void snmp_inc_ipindiscards(void) { ipindiscards++; 803490c: 4b02 ldr r3, [pc, #8] ; (8034918 ) 803490e: 681a ldr r2, [r3, #0] 8034910: 3201 adds r2, #1 8034912: 601a str r2, [r3, #0] 8034914: 4770 bx lr 8034916: bf00 nop 8034918: 2000c528 .word 0x2000c528 0803491c : } void snmp_inc_ipindelivers(void) { ipindelivers++; 803491c: 4b02 ldr r3, [pc, #8] ; (8034928 ) 803491e: 681a ldr r2, [r3, #0] 8034920: 3201 adds r2, #1 8034922: 601a str r2, [r3, #0] 8034924: 4770 bx lr 8034926: bf00 nop 8034928: 2000c560 .word 0x2000c560 0803492c : } void snmp_inc_ipoutrequests(void) { ipoutrequests++; 803492c: 4b02 ldr r3, [pc, #8] ; (8034938 ) 803492e: 681a ldr r2, [r3, #0] 8034930: 3201 adds r2, #1 8034932: 601a str r2, [r3, #0] 8034934: 4770 bx lr 8034936: bf00 nop 8034938: 2000c548 .word 0x2000c548 0803493c : } void snmp_inc_ipoutdiscards(void) { ipoutdiscards++; 803493c: 4b02 ldr r3, [pc, #8] ; (8034948 ) 803493e: 681a ldr r2, [r3, #0] 8034940: 3201 adds r2, #1 8034942: 601a str r2, [r3, #0] 8034944: 4770 bx lr 8034946: bf00 nop 8034948: 2000c4ec .word 0x2000c4ec 0803494c : } void snmp_inc_ipoutnoroutes(void) { ipoutnoroutes++; 803494c: 4b02 ldr r3, [pc, #8] ; (8034958 ) 803494e: 681a ldr r2, [r3, #0] 8034950: 3201 adds r2, #1 8034952: 601a str r2, [r3, #0] 8034954: 4770 bx lr 8034956: bf00 nop 8034958: 2000c56c .word 0x2000c56c 0803495c : /** * Inserts ipAddrTable indexes (.ipAdEntAddr) * into index tree. */ void snmp_insert_ipaddridx_tree(struct netif *ni) { 803495c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8034960: 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]); 8034962: 3004 adds r0, #4 8034964: a902 add r1, sp, #8 8034966: f000 fb80 bl 803506a level = 0; ipa_rn = &ipaddrtree_root; 803496a: 4c17 ldr r4, [pc, #92] ; (80349c8 ) 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; 803496c: 4f17 ldr r7, [pc, #92] ; (80349cc ) ipa_rn->get_value = ip_addrentry_get_value; 803496e: f8df 806c ldr.w r8, [pc, #108] ; 80349dc 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]); 8034972: 2500 movs r5, #0 level = 0; ipa_rn = &ipaddrtree_root; while (level < 4) { ipa_node = NULL; 8034974: 2300 movs r3, #0 8034976: 9301 str r3, [sp, #4] snmp_mib_node_insert(ipa_rn, ipaddridx[level], &ipa_node); 8034978: ab02 add r3, sp, #8 803497a: 4620 mov r0, r4 803497c: f853 1025 ldr.w r1, [r3, r5, lsl #2] 8034980: aa01 add r2, sp, #4 8034982: b2ee uxtb r6, r5 8034984: f000 fbac bl 80350e0 if ((level != 3) && (ipa_node != NULL)) 8034988: 2e03 cmp r6, #3 803498a: d015 beq.n 80349b8 803498c: 9b01 ldr r3, [sp, #4] 803498e: b19b cbz r3, 80349b8 { if (ipa_node->nptr == NULL) 8034990: 68dc ldr r4, [r3, #12] 8034992: b98c cbnz r4, 80349b8 { ipa_rn = snmp_mib_lrn_alloc(); 8034994: f000 fb82 bl 803509c ipa_node->nptr = (struct mib_node*)ipa_rn; 8034998: 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(); 803499a: 4604 mov r4, r0 ipa_node->nptr = (struct mib_node*)ipa_rn; 803499c: 60d8 str r0, [r3, #12] if (ipa_rn != NULL) 803499e: b918 cbnz r0, 80349a8 } } level++; } /* enable getnext traversal on filled table */ ipaddrtable.maxlength = 1; 80349a0: 4b0b ldr r3, [pc, #44] ; (80349d0 ) 80349a2: 2201 movs r2, #1 80349a4: 825a strh r2, [r3, #18] 80349a6: e00b b.n 80349c0 { ipa_rn = snmp_mib_lrn_alloc(); ipa_node->nptr = (struct mib_node*)ipa_rn; if (ipa_rn != NULL) { if (level == 2) 80349a8: 2e02 cmp r6, #2 80349aa: d105 bne.n 80349b8 { 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; 80349ac: 4b09 ldr r3, [pc, #36] ; (80349d4 ) 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; 80349ae: e880 0180 stmia.w r0, {r7, r8} ipa_rn->set_test = noleafs_set_test; 80349b2: 6083 str r3, [r0, #8] ipa_rn->set_value = noleafs_set_value; 80349b4: 4b08 ldr r3, [pc, #32] ; (80349d8 ) 80349b6: 60c3 str r3, [r0, #12] 80349b8: 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) 80349ba: 2d04 cmp r5, #4 80349bc: d1da bne.n 8034974 80349be: e7ef b.n 80349a0 } level++; } /* enable getnext traversal on filled table */ ipaddrtable.maxlength = 1; } 80349c0: b006 add sp, #24 80349c2: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80349c6: bf00 nop 80349c8: 20000874 .word 0x20000874 80349cc: 08034271 .word 0x08034271 80349d0: 200008f8 .word 0x200008f8 80349d4: 080339eb .word 0x080339eb 80349d8: 080339ef .word 0x080339ef 80349dc: 08034061 .word 0x08034061 080349e0 : /** * Removes ipAddrTable indexes (.ipAdEntAddr) * from index tree. */ void snmp_delete_ipaddridx_tree(struct netif *ni) { 80349e0: b570 push {r4, r5, r6, lr} 80349e2: 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]); 80349e4: 3004 adds r0, #4 80349e6: a90a add r1, sp, #40 ; 0x28 80349e8: f000 fb3f bl 803506a 80349ec: 2600 movs r6, #0 /* mark nodes for deletion */ level = 0; del_cnt = 0; ipa_rn = &ipaddrtree_root; 80349ee: 4d1f ldr r5, [pc, #124] ; (8034a6c ) LWIP_ASSERT("ni != NULL", ni != NULL); snmp_iptooid(&ni->ip_addr, &ipaddridx[0]); /* mark nodes for deletion */ level = 0; del_cnt = 0; 80349f0: 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); 80349f2: ab0a add r3, sp, #40 ; 0x28 80349f4: 4628 mov r0, r5 80349f6: 58f1 ldr r1, [r6, r3] 80349f8: aa01 add r2, sp, #4 80349fa: f000 fbac bl 8035156 80349fe: b2c0 uxtb r0, r0 if (fc == 0) 8034a00: b198 cbz r0, 8034a2a { /* ipaddridx[level] does not exist */ del_cnt = 0; ipa_rn = NULL; } else if (fc == 1) 8034a02: 2801 cmp r0, #1 8034a04: d10b bne.n 8034a1e { del_rn[del_cnt] = ipa_rn; 8034a06: ab0e add r3, sp, #56 ; 0x38 8034a08: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = ipa_n; 8034a0c: 9b01 ldr r3, [sp, #4] del_cnt = 0; ipa_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = ipa_rn; 8034a0e: f842 5c30 str.w r5, [r2, #-48] del_n[del_cnt] = ipa_n; del_cnt++; 8034a12: 3401 adds r4, #1 ipa_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = ipa_rn; del_n[del_cnt] = ipa_n; 8034a14: f842 3c20 str.w r3, [r2, #-32] del_cnt++; 8034a18: b2e4 uxtb r4, r4 ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); 8034a1a: 68dd ldr r5, [r3, #12] 8034a1c: e007 b.n 8034a2e } else if (fc == 2) 8034a1e: 2802 cmp r0, #2 8034a20: d105 bne.n 8034a2e { /* reset delete (2 or more childs) */ del_cnt = 0; ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); 8034a22: 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; 8034a24: 2400 movs r4, #0 ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); 8034a26: 68dd ldr r5, [r3, #12] 8034a28: e001 b.n 8034a2e { fc = snmp_mib_node_find(ipa_rn, ipaddridx[level], &ipa_n); if (fc == 0) { /* ipaddridx[level] does not exist */ del_cnt = 0; 8034a2a: 4604 mov r4, r0 ipa_rn = NULL; 8034a2c: 4605 mov r5, r0 /* mark nodes for deletion */ level = 0; del_cnt = 0; ipa_rn = &ipaddrtree_root; while ((level < 4) && (ipa_rn != NULL)) 8034a2e: 2e0c cmp r6, #12 8034a30: d012 beq.n 8034a58 8034a32: 3604 adds r6, #4 8034a34: 2d00 cmp r5, #0 8034a36: d1dc bne.n 80349f2 8034a38: e00e b.n 8034a58 level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 8034a3a: 3c01 subs r4, #1 8034a3c: b2e4 uxtb r4, r4 ipa_rn = del_rn[del_cnt]; 8034a3e: aa0e add r2, sp, #56 ; 0x38 8034a40: eb02 0384 add.w r3, r2, r4, lsl #2 ipa_n = del_n[del_cnt]; 8034a44: f853 1c20 ldr.w r1, [r3, #-32] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; ipa_rn = del_rn[del_cnt]; 8034a48: f853 0c30 ldr.w r0, [r3, #-48] ipa_n = del_n[del_cnt]; 8034a4c: 9101 str r1, [sp, #4] next = snmp_mib_node_delete(ipa_rn, ipa_n); 8034a4e: f000 fb9c bl 803518a if (next != NULL) 8034a52: b108 cbz r0, 8034a58 { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 8034a54: f000 fb40 bl 80350d8 ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 8034a58: 2c00 cmp r4, #0 8034a5a: d1ee bne.n 8034a3a 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; 8034a5c: 4b03 ldr r3, [pc, #12] ; (8034a6c ) 8034a5e: 8b9b ldrh r3, [r3, #28] 8034a60: b90b cbnz r3, 8034a66 8034a62: 4b03 ldr r3, [pc, #12] ; (8034a70 ) 8034a64: 825c strh r4, [r3, #18] } 8034a66: b00e add sp, #56 ; 0x38 8034a68: bd70 pop {r4, r5, r6, pc} 8034a6a: bf00 nop 8034a6c: 20000874 .word 0x20000874 8034a70: 200008f8 .word 0x200008f8 08034a74 : * * @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) { 8034a74: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8034a78: b086 sub sp, #24 u8_t insert = 0; ip_addr_t dst; if (dflt != 0) 8034a7a: b110 cbz r0, 8034a82 { /* the default route 0.0.0.0 */ ip_addr_set_any(&dst); 8034a7c: 2300 movs r3, #0 8034a7e: 9300 str r3, [sp, #0] 8034a80: e02b b.n 8034ada insert = 1; } else { /* route to the network address */ ip_addr_get_network(&dst, &ni->ip_addr, &ni->netmask); 8034a82: 688a ldr r2, [r1, #8] 8034a84: 684b ldr r3, [r1, #4] 8034a86: 4013 ands r3, r2 8034a88: 9300 str r3, [sp, #0] /* exclude 0.0.0.0 network (reserved for default rte) */ if (!ip_addr_isany(&dst)) { 8034a8a: bb33 cbnz r3, 8034ada 8034a8c: e021 b.n 8034ad2 snmp_iptooid(&dst, &iprteidx[0]); level = 0; iprte_rn = &iprtetree_root; while (level < 4) { iprte_node = NULL; 8034a8e: 2300 movs r3, #0 8034a90: 9301 str r3, [sp, #4] snmp_mib_node_insert(iprte_rn, iprteidx[level], &iprte_node); 8034a92: ab02 add r3, sp, #8 8034a94: 4620 mov r0, r4 8034a96: f853 1025 ldr.w r1, [r3, r5, lsl #2] 8034a9a: aa01 add r2, sp, #4 8034a9c: b2ee uxtb r6, r5 8034a9e: f000 fb1f bl 80350e0 if ((level != 3) && (iprte_node != NULL)) 8034aa2: 2e03 cmp r6, #3 8034aa4: d012 beq.n 8034acc 8034aa6: 9b01 ldr r3, [sp, #4] 8034aa8: b183 cbz r3, 8034acc { if (iprte_node->nptr == NULL) 8034aaa: 68dc ldr r4, [r3, #12] 8034aac: b974 cbnz r4, 8034acc { iprte_rn = snmp_mib_lrn_alloc(); 8034aae: f000 faf5 bl 803509c iprte_node->nptr = (struct mib_node*)iprte_rn; 8034ab2: 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(); 8034ab4: 4604 mov r4, r0 iprte_node->nptr = (struct mib_node*)iprte_rn; 8034ab6: 60d8 str r0, [r3, #12] if (iprte_rn != NULL) 8034ab8: b158 cbz r0, 8034ad2 { if (level == 2) 8034aba: 2e02 cmp r6, #2 8034abc: d106 bne.n 8034acc { 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; 8034abe: 4b0d ldr r3, [pc, #52] ; (8034af4 ) 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; 8034ac0: f8c0 8000 str.w r8, [r0] iprte_rn->get_value = ip_rteentry_get_value; iprte_rn->set_test = noleafs_set_test; 8034ac4: 6083 str r3, [r0, #8] iprte_rn->set_value = noleafs_set_value; 8034ac6: 4b0c ldr r3, [pc, #48] ; (8034af8 ) 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; 8034ac8: 6047 str r7, [r0, #4] iprte_rn->set_test = noleafs_set_test; iprte_rn->set_value = noleafs_set_value; 8034aca: 60c3 str r3, [r0, #12] 8034acc: 3501 adds r5, #1 u8_t level; snmp_iptooid(&dst, &iprteidx[0]); level = 0; iprte_rn = &iprtetree_root; while (level < 4) 8034ace: 2d04 cmp r5, #4 8034ad0: d1dd bne.n 8034a8e } level++; } } /* enable getnext traversal on filled table */ iprtetable.maxlength = 1; 8034ad2: 4b0a ldr r3, [pc, #40] ; (8034afc ) 8034ad4: 2201 movs r2, #1 8034ad6: 825a strh r2, [r3, #18] 8034ad8: e009 b.n 8034aee struct mib_list_rootnode *iprte_rn; struct mib_list_node *iprte_node; s32_t iprteidx[4]; u8_t level; snmp_iptooid(&dst, &iprteidx[0]); 8034ada: 4668 mov r0, sp 8034adc: a902 add r1, sp, #8 8034ade: f000 fac4 bl 803506a 8034ae2: 2500 movs r5, #0 level = 0; iprte_rn = &iprtetree_root; 8034ae4: 4c06 ldr r4, [pc, #24] ; (8034b00 ) 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; 8034ae6: f8df 8020 ldr.w r8, [pc, #32] ; 8034b08 iprte_rn->get_value = ip_rteentry_get_value; 8034aea: 4f06 ldr r7, [pc, #24] ; (8034b04 ) 8034aec: e7cf b.n 8034a8e level++; } } /* enable getnext traversal on filled table */ iprtetable.maxlength = 1; } 8034aee: b006 add sp, #24 8034af0: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8034af4: 080339eb .word 0x080339eb 8034af8: 080339ef .word 0x080339ef 8034afc: 20000960 .word 0x20000960 8034b00: 200007a4 .word 0x200007a4 8034b04: 08034571 .word 0x08034571 8034b08: 08033bb5 .word 0x08033bb5 08034b0c : * @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) { 8034b0c: b570 push {r4, r5, r6, lr} 8034b0e: b08e sub sp, #56 ; 0x38 u8_t del = 0; ip_addr_t dst; if (dflt != 0) 8034b10: b110 cbz r0, 8034b18 { /* the default route 0.0.0.0 */ ip_addr_set_any(&dst); 8034b12: 2300 movs r3, #0 8034b14: 9300 str r3, [sp, #0] 8034b16: e041 b.n 8034b9c del = 1; } else { /* route to the network address */ ip_addr_get_network(&dst, &ni->ip_addr, &ni->netmask); 8034b18: 688a ldr r2, [r1, #8] 8034b1a: 684b ldr r3, [r1, #4] 8034b1c: 4013 ands r3, r2 8034b1e: 9300 str r3, [sp, #0] /* exclude 0.0.0.0 network (reserved for default rte) */ if (!ip_addr_isany(&dst)) { 8034b20: 2b00 cmp r3, #0 8034b22: d13b bne.n 8034b9c 8034b24: e034 b.n 8034b90 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); 8034b26: ab0a add r3, sp, #40 ; 0x28 8034b28: 4628 mov r0, r5 8034b2a: 58f1 ldr r1, [r6, r3] 8034b2c: aa01 add r2, sp, #4 8034b2e: f000 fb12 bl 8035156 8034b32: b2c0 uxtb r0, r0 if (fc == 0) 8034b34: b198 cbz r0, 8034b5e { /* iprteidx[level] does not exist */ del_cnt = 0; iprte_rn = NULL; } else if (fc == 1) 8034b36: 2801 cmp r0, #1 8034b38: d10b bne.n 8034b52 { del_rn[del_cnt] = iprte_rn; 8034b3a: ab0e add r3, sp, #56 ; 0x38 8034b3c: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = iprte_n; 8034b40: 9b01 ldr r3, [sp, #4] del_cnt = 0; iprte_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = iprte_rn; 8034b42: f842 5c30 str.w r5, [r2, #-48] del_n[del_cnt] = iprte_n; del_cnt++; 8034b46: 3401 adds r4, #1 iprte_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = iprte_rn; del_n[del_cnt] = iprte_n; 8034b48: f842 3c20 str.w r3, [r2, #-32] del_cnt++; 8034b4c: b2e4 uxtb r4, r4 iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); 8034b4e: 68dd ldr r5, [r3, #12] 8034b50: e007 b.n 8034b62 } else if (fc == 2) 8034b52: 2802 cmp r0, #2 8034b54: d105 bne.n 8034b62 { /* reset delete (2 or more childs) */ del_cnt = 0; iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); 8034b56: 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; 8034b58: 2400 movs r4, #0 iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); 8034b5a: 68dd ldr r5, [r3, #12] 8034b5c: e001 b.n 8034b62 { fc = snmp_mib_node_find(iprte_rn, iprteidx[level], &iprte_n); if (fc == 0) { /* iprteidx[level] does not exist */ del_cnt = 0; 8034b5e: 4604 mov r4, r0 iprte_rn = NULL; 8034b60: 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)) 8034b62: 2e0c cmp r6, #12 8034b64: d012 beq.n 8034b8c 8034b66: 3604 adds r6, #4 8034b68: 2d00 cmp r5, #0 8034b6a: d1dc bne.n 8034b26 8034b6c: e00e b.n 8034b8c level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 8034b6e: 3c01 subs r4, #1 8034b70: b2e4 uxtb r4, r4 iprte_rn = del_rn[del_cnt]; 8034b72: aa0e add r2, sp, #56 ; 0x38 8034b74: eb02 0384 add.w r3, r2, r4, lsl #2 iprte_n = del_n[del_cnt]; 8034b78: f853 1c20 ldr.w r1, [r3, #-32] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; iprte_rn = del_rn[del_cnt]; 8034b7c: f853 0c30 ldr.w r0, [r3, #-48] iprte_n = del_n[del_cnt]; 8034b80: 9101 str r1, [sp, #4] next = snmp_mib_node_delete(iprte_rn, iprte_n); 8034b82: f000 fb02 bl 803518a if (next != NULL) 8034b86: b108 cbz r0, 8034b8c { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 8034b88: f000 faa6 bl 80350d8 iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 8034b8c: 2c00 cmp r4, #0 8034b8e: d1ee bne.n 8034b6e snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty table */ if (iprtetree_root.count == 0) iprtetable.maxlength = 0; 8034b90: 4b07 ldr r3, [pc, #28] ; (8034bb0 ) 8034b92: 8b9b ldrh r3, [r3, #28] 8034b94: b953 cbnz r3, 8034bac 8034b96: 4a07 ldr r2, [pc, #28] ; (8034bb4 ) 8034b98: 8253 strh r3, [r2, #18] 8034b9a: e007 b.n 8034bac 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]); 8034b9c: 4668 mov r0, sp 8034b9e: a90a add r1, sp, #40 ; 0x28 8034ba0: 2600 movs r6, #0 8034ba2: f000 fa62 bl 803506a /* mark nodes for deletion */ level = 0; del_cnt = 0; 8034ba6: 4634 mov r4, r6 iprte_rn = &iprtetree_root; 8034ba8: 4d01 ldr r5, [pc, #4] ; (8034bb0 ) 8034baa: e7bc b.n 8034b26 } } } /* disable getnext traversal on empty table */ if (iprtetree_root.count == 0) iprtetable.maxlength = 0; } 8034bac: b00e add sp, #56 ; 0x38 8034bae: bd70 pop {r4, r5, r6, pc} 8034bb0: 200007a4 .word 0x200007a4 8034bb4: 20000960 .word 0x20000960 08034bb8 : void snmp_inc_icmpinmsgs(void) { icmpinmsgs++; 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: 2000c464 .word 0x2000c464 08034bc8 : } void snmp_inc_icmpinerrors(void) { icmpinerrors++; 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: 2000c460 .word 0x2000c460 08034bd8 : icmpinaddrmaskreps++; } void snmp_inc_icmpoutmsgs(void) { icmpoutmsgs++; 8034bd8: 4b02 ldr r3, [pc, #8] ; (8034be4 ) 8034bda: 681a ldr r2, [r3, #0] 8034bdc: 3201 adds r2, #1 8034bde: 601a str r2, [r3, #0] 8034be0: 4770 bx lr 8034be2: bf00 nop 8034be4: 2000c4e4 .word 0x2000c4e4 08034be8 : icmpoutdestunreachs++; } void snmp_inc_icmpouttimeexcds(void) { icmpouttimeexcds++; 8034be8: 4b02 ldr r3, [pc, #8] ; (8034bf4 ) 8034bea: 681a ldr r2, [r3, #0] 8034bec: 3201 adds r2, #1 8034bee: 601a str r2, [r3, #0] 8034bf0: 4770 bx lr 8034bf2: bf00 nop 8034bf4: 2000c4b0 .word 0x2000c4b0 08034bf8 : icmpoutechos++; } void snmp_inc_icmpoutechoreps(void) { icmpoutechoreps++; 8034bf8: 4b02 ldr r3, [pc, #8] ; (8034c04 ) 8034bfa: 681a ldr r2, [r3, #0] 8034bfc: 3201 adds r2, #1 8034bfe: 601a str r2, [r3, #0] 8034c00: 4770 bx lr 8034c02: bf00 nop 8034c04: 2000c504 .word 0x2000c504 08034c08 : icmpoutaddrmaskreps++; } void snmp_inc_tcpactiveopens(void) { tcpactiveopens++; 8034c08: 4b02 ldr r3, [pc, #8] ; (8034c14 ) 8034c0a: 681a ldr r2, [r3, #0] 8034c0c: 3201 adds r2, #1 8034c0e: 601a str r2, [r3, #0] 8034c10: 4770 bx lr 8034c12: bf00 nop 8034c14: 2000c458 .word 0x2000c458 08034c18 : } void snmp_inc_tcppassiveopens(void) { tcppassiveopens++; 8034c18: 4b02 ldr r3, [pc, #8] ; (8034c24 ) 8034c1a: 681a ldr r2, [r3, #0] 8034c1c: 3201 adds r2, #1 8034c1e: 601a str r2, [r3, #0] 8034c20: 4770 bx lr 8034c22: bf00 nop 8034c24: 2000c48c .word 0x2000c48c 08034c28 : } void snmp_inc_tcpattemptfails(void) { tcpattemptfails++; 8034c28: 4b02 ldr r3, [pc, #8] ; (8034c34 ) 8034c2a: 681a ldr r2, [r3, #0] 8034c2c: 3201 adds r2, #1 8034c2e: 601a str r2, [r3, #0] 8034c30: 4770 bx lr 8034c32: bf00 nop 8034c34: 2000c4d8 .word 0x2000c4d8 08034c38 : } void snmp_inc_tcpestabresets(void) { tcpestabresets++; 8034c38: 4b02 ldr r3, [pc, #8] ; (8034c44 ) 8034c3a: 681a ldr r2, [r3, #0] 8034c3c: 3201 adds r2, #1 8034c3e: 601a str r2, [r3, #0] 8034c40: 4770 bx lr 8034c42: bf00 nop 8034c44: 2000c46c .word 0x2000c46c 08034c48 : } void snmp_inc_tcpinsegs(void) { tcpinsegs++; 8034c48: 4b02 ldr r3, [pc, #8] ; (8034c54 ) 8034c4a: 681a ldr r2, [r3, #0] 8034c4c: 3201 adds r2, #1 8034c4e: 601a str r2, [r3, #0] 8034c50: 4770 bx lr 8034c52: bf00 nop 8034c54: 2000c4e8 .word 0x2000c4e8 08034c58 : } void snmp_inc_tcpoutsegs(void) { tcpoutsegs++; 8034c58: 4b02 ldr r3, [pc, #8] ; (8034c64 ) 8034c5a: 681a ldr r2, [r3, #0] 8034c5c: 3201 adds r2, #1 8034c5e: 601a str r2, [r3, #0] 8034c60: 4770 bx lr 8034c62: bf00 nop 8034c64: 2000c534 .word 0x2000c534 08034c68 : } void snmp_inc_tcpretranssegs(void) { tcpretranssegs++; 8034c68: 4b02 ldr r3, [pc, #8] ; (8034c74 ) 8034c6a: 681a ldr r2, [r3, #0] 8034c6c: 3201 adds r2, #1 8034c6e: 601a str r2, [r3, #0] 8034c70: 4770 bx lr 8034c72: bf00 nop 8034c74: 2000c508 .word 0x2000c508 08034c78 : } void snmp_inc_tcpinerrs(void) { tcpinerrs++; 8034c78: 4b02 ldr r3, [pc, #8] ; (8034c84 ) 8034c7a: 681a ldr r2, [r3, #0] 8034c7c: 3201 adds r2, #1 8034c7e: 601a str r2, [r3, #0] 8034c80: 4770 bx lr 8034c82: bf00 nop 8034c84: 2000c494 .word 0x2000c494 08034c88 : } void snmp_inc_tcpoutrsts(void) { tcpoutrsts++; 8034c88: 4b02 ldr r3, [pc, #8] ; (8034c94 ) 8034c8a: 681a ldr r2, [r3, #0] 8034c8c: 3201 adds r2, #1 8034c8e: 601a str r2, [r3, #0] 8034c90: 4770 bx lr 8034c92: bf00 nop 8034c94: 2000c4f8 .word 0x2000c4f8 08034c98 : } void snmp_inc_udpindatagrams(void) { udpindatagrams++; 8034c98: 4b02 ldr r3, [pc, #8] ; (8034ca4 ) 8034c9a: 681a ldr r2, [r3, #0] 8034c9c: 3201 adds r2, #1 8034c9e: 601a str r2, [r3, #0] 8034ca0: 4770 bx lr 8034ca2: bf00 nop 8034ca4: 2000c514 .word 0x2000c514 08034ca8 : } void snmp_inc_udpnoports(void) { udpnoports++; 8034ca8: 4b02 ldr r3, [pc, #8] ; (8034cb4 ) 8034caa: 681a ldr r2, [r3, #0] 8034cac: 3201 adds r2, #1 8034cae: 601a str r2, [r3, #0] 8034cb0: 4770 bx lr 8034cb2: bf00 nop 8034cb4: 2000c4cc .word 0x2000c4cc 08034cb8 : } void snmp_inc_udpinerrors(void) { udpinerrors++; 8034cb8: 4b02 ldr r3, [pc, #8] ; (8034cc4 ) 8034cba: 681a ldr r2, [r3, #0] 8034cbc: 3201 adds r2, #1 8034cbe: 601a str r2, [r3, #0] 8034cc0: 4770 bx lr 8034cc2: bf00 nop 8034cc4: 2000c53c .word 0x2000c53c 08034cc8 : } void snmp_inc_udpoutdatagrams(void) { udpoutdatagrams++; 8034cc8: 4b02 ldr r3, [pc, #8] ; (8034cd4 ) 8034cca: 681a ldr r2, [r3, #0] 8034ccc: 3201 adds r2, #1 8034cce: 601a str r2, [r3, #0] 8034cd0: 4770 bx lr 8034cd2: bf00 nop 8034cd4: 2000c4c4 .word 0x2000c4c4 08034cd8 : /** * Inserts udpTable indexes (.udpLocalAddress.udpLocalPort) * into index tree. */ void snmp_insert_udpidx_tree(struct udp_pcb *pcb) { 8034cd8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8034cdc: 4604 mov r4, r0 8034cde: 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]); 8034ce0: a901 add r1, sp, #4 8034ce2: f000 f9c2 bl 803506a udpidx[4] = pcb->local_port; 8034ce6: 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; 8034ce8: 4f17 ldr r7, [pc, #92] ; (8034d48 ) LWIP_ASSERT("pcb != NULL", pcb != NULL); snmp_iptooid(&pcb->local_ip, &udpidx[0]); udpidx[4] = pcb->local_port; udp_rn = &udp_root; 8034cea: 4c18 ldr r4, [pc, #96] ; (8034d4c ) if (udp_rn != NULL) { if (level == 3) { udp_rn->get_object_def = udpentry_get_object_def; udp_rn->get_value = udpentry_get_value; 8034cec: f8df 806c ldr.w r8, [pc, #108] ; 8034d5c 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; 8034cf0: 9305 str r3, [sp, #20] 8034cf2: 2500 movs r5, #0 udp_rn = &udp_root; for (level = 0; level < 5; level++) { udp_node = NULL; 8034cf4: 2300 movs r3, #0 8034cf6: 9300 str r3, [sp, #0] snmp_mib_node_insert(udp_rn, udpidx[level], &udp_node); 8034cf8: ab01 add r3, sp, #4 8034cfa: 4620 mov r0, r4 8034cfc: f853 1025 ldr.w r1, [r3, r5, lsl #2] 8034d00: 466a mov r2, sp 8034d02: b2ee uxtb r6, r5 8034d04: f000 f9ec bl 80350e0 if ((level != 4) && (udp_node != NULL)) 8034d08: 2e04 cmp r6, #4 8034d0a: d015 beq.n 8034d38 8034d0c: 9b00 ldr r3, [sp, #0] 8034d0e: b19b cbz r3, 8034d38 { if (udp_node->nptr == NULL) 8034d10: 68dc ldr r4, [r3, #12] 8034d12: b98c cbnz r4, 8034d38 { udp_rn = snmp_mib_lrn_alloc(); 8034d14: f000 f9c2 bl 803509c udp_node->nptr = (struct mib_node*)udp_rn; 8034d18: 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(); 8034d1a: 4604 mov r4, r0 udp_node->nptr = (struct mib_node*)udp_rn; 8034d1c: 60d8 str r0, [r3, #12] if (udp_rn != NULL) 8034d1e: b918 cbnz r0, 8034d28 { udp_rn = (struct mib_list_rootnode*)udp_node->nptr; } } } udptable.maxlength = 1; 8034d20: 4b0b ldr r3, [pc, #44] ; (8034d50 ) 8034d22: 2201 movs r2, #1 8034d24: 825a strh r2, [r3, #18] 8034d26: e00b b.n 8034d40 { udp_rn = snmp_mib_lrn_alloc(); udp_node->nptr = (struct mib_node*)udp_rn; if (udp_rn != NULL) { if (level == 3) 8034d28: 2e03 cmp r6, #3 8034d2a: d105 bne.n 8034d38 { udp_rn->get_object_def = udpentry_get_object_def; udp_rn->get_value = udpentry_get_value; udp_rn->set_test = noleafs_set_test; 8034d2c: 4b09 ldr r3, [pc, #36] ; (8034d54 ) if (udp_rn != NULL) { if (level == 3) { udp_rn->get_object_def = udpentry_get_object_def; udp_rn->get_value = udpentry_get_value; 8034d2e: e880 0180 stmia.w r0, {r7, r8} udp_rn->set_test = noleafs_set_test; 8034d32: 6083 str r3, [r0, #8] udp_rn->set_value = noleafs_set_value; 8034d34: 4b08 ldr r3, [pc, #32] ; (8034d58 ) 8034d36: 60c3 str r3, [r0, #12] 8034d38: 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++) 8034d3a: 2d05 cmp r5, #5 8034d3c: d1da bne.n 8034cf4 8034d3e: e7ef b.n 8034d20 udp_rn = (struct mib_list_rootnode*)udp_node->nptr; } } } udptable.maxlength = 1; } 8034d40: b006 add sp, #24 8034d42: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8034d46: bf00 nop 8034d48: 0803435d .word 0x0803435d 8034d4c: 20000774 .word 0x20000774 8034d50: 20000758 .word 0x20000758 8034d54: 080339eb .word 0x080339eb 8034d58: 080339ef .word 0x080339ef 8034d5c: 08034019 .word 0x08034019 08034d60 : /** * Removes udpTable indexes (.udpLocalAddress.udpLocalPort) * from index tree. */ void snmp_delete_udpidx_tree(struct udp_pcb *pcb) { 8034d60: b570 push {r4, r5, r6, lr} 8034d62: 4604 mov r4, r0 8034d64: 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]); 8034d66: a90b add r1, sp, #44 ; 0x2c 8034d68: f000 f97f bl 803506a udpidx[4] = pcb->local_port; 8034d6c: 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; 8034d6e: 4b2a ldr r3, [pc, #168] ; (8034e18 ) 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; 8034d70: 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; 8034d72: 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; 8034d74: 2200 movs r2, #0 npcb = udp_pcbs; while ((npcb != NULL)) 8034d76: e009 b.n 8034d8c { if (ip_addr_cmp(&npcb->local_ip, &pcb->local_ip) && 8034d78: 681d ldr r5, [r3, #0] 8034d7a: 6820 ldr r0, [r4, #0] 8034d7c: 4285 cmp r5, r0 8034d7e: d104 bne.n 8034d8a (npcb->local_port == udpidx[4])) 8034d80: 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) && 8034d82: 4288 cmp r0, r1 8034d84: d101 bne.n 8034d8a (npcb->local_port == udpidx[4])) { bindings++; 8034d86: 3201 adds r2, #1 8034d88: b2d2 uxtb r2, r2 } npcb = npcb->next; 8034d8a: 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)) 8034d8c: 2b00 cmp r3, #0 8034d8e: d1f3 bne.n 8034d78 { bindings++; } npcb = npcb->next; } if (bindings == 1) 8034d90: 2a01 cmp r2, #1 8034d92: d004 beq.n 8034d9e snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty table */ if (udp_root.count == 0) udptable.maxlength = 0; 8034d94: 4b21 ldr r3, [pc, #132] ; (8034e1c ) 8034d96: 8b9b ldrh r3, [r3, #28] 8034d98: 2b00 cmp r3, #0 8034d9a: d039 beq.n 8034e10 8034d9c: e03a b.n 8034e14 { /* selectively remove */ /* mark nodes for deletion */ level = 0; del_cnt = 0; udp_rn = &udp_root; 8034d9e: 4d1f ldr r5, [pc, #124] ; (8034e1c ) { bindings++; } npcb = npcb->next; } if (bindings == 1) 8034da0: 461e mov r6, r3 8034da2: 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); 8034da4: ab0b add r3, sp, #44 ; 0x2c 8034da6: 4628 mov r0, r5 8034da8: 58f1 ldr r1, [r6, r3] 8034daa: 466a mov r2, sp 8034dac: f000 f9d3 bl 8035156 8034db0: b2c0 uxtb r0, r0 if (fc == 0) 8034db2: b198 cbz r0, 8034ddc { /* udpidx[level] does not exist */ del_cnt = 0; udp_rn = NULL; } else if (fc == 1) 8034db4: 2801 cmp r0, #1 8034db6: d10b bne.n 8034dd0 { del_rn[del_cnt] = udp_rn; 8034db8: ab10 add r3, sp, #64 ; 0x40 8034dba: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = udp_n; 8034dbe: 9b00 ldr r3, [sp, #0] del_cnt = 0; udp_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = udp_rn; 8034dc0: f842 5c3c str.w r5, [r2, #-60] del_n[del_cnt] = udp_n; del_cnt++; 8034dc4: 3401 adds r4, #1 udp_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = udp_rn; del_n[del_cnt] = udp_n; 8034dc6: f842 3c28 str.w r3, [r2, #-40] del_cnt++; 8034dca: b2e4 uxtb r4, r4 udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); 8034dcc: 68dd ldr r5, [r3, #12] 8034dce: e007 b.n 8034de0 } else if (fc == 2) 8034dd0: 2802 cmp r0, #2 8034dd2: d105 bne.n 8034de0 { /* reset delete (2 or more childs) */ del_cnt = 0; udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); 8034dd4: 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; 8034dd6: 2400 movs r4, #0 udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); 8034dd8: 68dd ldr r5, [r3, #12] 8034dda: e001 b.n 8034de0 { fc = snmp_mib_node_find(udp_rn, udpidx[level], &udp_n); if (fc == 0) { /* udpidx[level] does not exist */ del_cnt = 0; 8034ddc: 4604 mov r4, r0 udp_rn = NULL; 8034dde: 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)) 8034de0: 2e10 cmp r6, #16 8034de2: d012 beq.n 8034e0a 8034de4: 3604 adds r6, #4 8034de6: 2d00 cmp r5, #0 8034de8: d1dc bne.n 8034da4 8034dea: e00e b.n 8034e0a level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 8034dec: 3c01 subs r4, #1 8034dee: b2e4 uxtb r4, r4 udp_rn = del_rn[del_cnt]; 8034df0: aa10 add r2, sp, #64 ; 0x40 8034df2: eb02 0384 add.w r3, r2, r4, lsl #2 udp_n = del_n[del_cnt]; 8034df6: f853 1c28 ldr.w r1, [r3, #-40] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; udp_rn = del_rn[del_cnt]; 8034dfa: f853 0c3c ldr.w r0, [r3, #-60] udp_n = del_n[del_cnt]; 8034dfe: 9100 str r1, [sp, #0] next = snmp_mib_node_delete(udp_rn, udp_n); 8034e00: f000 f9c3 bl 803518a if (next != NULL) 8034e04: b108 cbz r0, 8034e0a { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 8034e06: f000 f967 bl 80350d8 udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 8034e0a: 2c00 cmp r4, #0 8034e0c: d1ee bne.n 8034dec 8034e0e: e7c1 b.n 8034d94 snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty table */ if (udp_root.count == 0) udptable.maxlength = 0; 8034e10: 4a03 ldr r2, [pc, #12] ; (8034e20 ) 8034e12: 8253 strh r3, [r2, #18] } 8034e14: b010 add sp, #64 ; 0x40 8034e16: bd70 pop {r4, r5, r6, pc} 8034e18: 2000f6d8 .word 0x2000f6d8 8034e1c: 20000774 .word 0x20000774 8034e20: 20000758 .word 0x20000758 08034e24 : void snmp_inc_snmpinpkts(void) { snmpinpkts++; 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: 2000c470 .word 0x2000c470 08034e34 : } void snmp_inc_snmpoutpkts(void) { snmpoutpkts++; 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: 2000c540 .word 0x2000c540 08034e44 : } void snmp_inc_snmpinbadversions(void) { snmpinbadversions++; 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: 2000c52c .word 0x2000c52c 08034e54 : } void snmp_inc_snmpinbadcommunitynames(void) { snmpinbadcommunitynames++; 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: 2000c444 .word 0x2000c444 08034e64 : snmpinbadcommunityuses++; } void snmp_inc_snmpinasnparseerrs(void) { snmpinasnparseerrs++; 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: 2000c530 .word 0x2000c530 08034e74 : } void snmp_inc_snmpintoobigs(void) { snmpintoobigs++; 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: 2000c4f0 .word 0x2000c4f0 08034e84 : } void snmp_inc_snmpinnosuchnames(void) { snmpinnosuchnames++; 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: 2000c570 .word 0x2000c570 08034e94 : } void snmp_inc_snmpinbadvalues(void) { snmpinbadvalues++; 8034e94: 4b02 ldr r3, [pc, #8] ; (8034ea0 ) 8034e96: 681a ldr r2, [r3, #0] 8034e98: 3201 adds r2, #1 8034e9a: 601a str r2, [r3, #0] 8034e9c: 4770 bx lr 8034e9e: bf00 nop 8034ea0: 2000c50c .word 0x2000c50c 08034ea4 : } void snmp_inc_snmpinreadonlys(void) { snmpinreadonlys++; 8034ea4: 4b02 ldr r3, [pc, #8] ; (8034eb0 ) 8034ea6: 681a ldr r2, [r3, #0] 8034ea8: 3201 adds r2, #1 8034eaa: 601a str r2, [r3, #0] 8034eac: 4770 bx lr 8034eae: bf00 nop 8034eb0: 2000c4e0 .word 0x2000c4e0 08034eb4 : } void snmp_inc_snmpingenerrs(void) { snmpingenerrs++; 8034eb4: 4b02 ldr r3, [pc, #8] ; (8034ec0 ) 8034eb6: 681a ldr r2, [r3, #0] 8034eb8: 3201 adds r2, #1 8034eba: 601a str r2, [r3, #0] 8034ebc: 4770 bx lr 8034ebe: bf00 nop 8034ec0: 2000c4b8 .word 0x2000c4b8 08034ec4 : } void snmp_add_snmpintotalreqvars(u8_t value) { snmpintotalreqvars += value; 8034ec4: 4b02 ldr r3, [pc, #8] ; (8034ed0 ) 8034ec6: 681a ldr r2, [r3, #0] 8034ec8: 1880 adds r0, r0, r2 8034eca: 6018 str r0, [r3, #0] 8034ecc: 4770 bx lr 8034ece: bf00 nop 8034ed0: 2000c510 .word 0x2000c510 08034ed4 : } void snmp_add_snmpintotalsetvars(u8_t value) { snmpintotalsetvars += value; 8034ed4: 4b02 ldr r3, [pc, #8] ; (8034ee0 ) 8034ed6: 681a ldr r2, [r3, #0] 8034ed8: 1880 adds r0, r0, r2 8034eda: 6018 str r0, [r3, #0] 8034edc: 4770 bx lr 8034ede: bf00 nop 8034ee0: 2000c450 .word 0x2000c450 08034ee4 : } void snmp_inc_snmpingetrequests(void) { snmpingetrequests++; 8034ee4: 4b02 ldr r3, [pc, #8] ; (8034ef0 ) 8034ee6: 681a ldr r2, [r3, #0] 8034ee8: 3201 adds r2, #1 8034eea: 601a str r2, [r3, #0] 8034eec: 4770 bx lr 8034eee: bf00 nop 8034ef0: 2000c4a4 .word 0x2000c4a4 08034ef4 : } void snmp_inc_snmpingetnexts(void) { snmpingetnexts++; 8034ef4: 4b02 ldr r3, [pc, #8] ; (8034f00 ) 8034ef6: 681a ldr r2, [r3, #0] 8034ef8: 3201 adds r2, #1 8034efa: 601a str r2, [r3, #0] 8034efc: 4770 bx lr 8034efe: bf00 nop 8034f00: 2000c428 .word 0x2000c428 08034f04 : } void snmp_inc_snmpinsetrequests(void) { snmpinsetrequests++; 8034f04: 4b02 ldr r3, [pc, #8] ; (8034f10 ) 8034f06: 681a ldr r2, [r3, #0] 8034f08: 3201 adds r2, #1 8034f0a: 601a str r2, [r3, #0] 8034f0c: 4770 bx lr 8034f0e: bf00 nop 8034f10: 2000c54c .word 0x2000c54c 08034f14 : } void snmp_inc_snmpingetresponses(void) { snmpingetresponses++; 8034f14: 4b02 ldr r3, [pc, #8] ; (8034f20 ) 8034f16: 681a ldr r2, [r3, #0] 8034f18: 3201 adds r2, #1 8034f1a: 601a str r2, [r3, #0] 8034f1c: 4770 bx lr 8034f1e: bf00 nop 8034f20: 2000c4a0 .word 0x2000c4a0 08034f24 : } void snmp_inc_snmpintraps(void) { snmpintraps++; 8034f24: 4b02 ldr r3, [pc, #8] ; (8034f30 ) 8034f26: 681a ldr r2, [r3, #0] 8034f28: 3201 adds r2, #1 8034f2a: 601a str r2, [r3, #0] 8034f2c: 4770 bx lr 8034f2e: bf00 nop 8034f30: 2000c438 .word 0x2000c438 08034f34 : } void snmp_inc_snmpouttoobigs(void) { snmpouttoobigs++; 8034f34: 4b02 ldr r3, [pc, #8] ; (8034f40 ) 8034f36: 681a ldr r2, [r3, #0] 8034f38: 3201 adds r2, #1 8034f3a: 601a str r2, [r3, #0] 8034f3c: 4770 bx lr 8034f3e: bf00 nop 8034f40: 2000c488 .word 0x2000c488 08034f44 : } void snmp_inc_snmpoutnosuchnames(void) { snmpoutnosuchnames++; 8034f44: 4b02 ldr r3, [pc, #8] ; (8034f50 ) 8034f46: 681a ldr r2, [r3, #0] 8034f48: 3201 adds r2, #1 8034f4a: 601a str r2, [r3, #0] 8034f4c: 4770 bx lr 8034f4e: bf00 nop 8034f50: 2000c454 .word 0x2000c454 08034f54 : } void snmp_inc_snmpoutbadvalues(void) { snmpoutbadvalues++; 8034f54: 4b02 ldr r3, [pc, #8] ; (8034f60 ) 8034f56: 681a ldr r2, [r3, #0] 8034f58: 3201 adds r2, #1 8034f5a: 601a str r2, [r3, #0] 8034f5c: 4770 bx lr 8034f5e: bf00 nop 8034f60: 2000c434 .word 0x2000c434 08034f64 : } void snmp_inc_snmpoutgenerrs(void) { snmpoutgenerrs++; 8034f64: 4b02 ldr r3, [pc, #8] ; (8034f70 ) 8034f66: 681a ldr r2, [r3, #0] 8034f68: 3201 adds r2, #1 8034f6a: 601a str r2, [r3, #0] 8034f6c: 4770 bx lr 8034f6e: bf00 nop 8034f70: 2000c574 .word 0x2000c574 08034f74 : snmpoutsetrequests++; } void snmp_inc_snmpoutgetresponses(void) { snmpoutgetresponses++; 8034f74: 4b02 ldr r3, [pc, #8] ; (8034f80 ) 8034f76: 681a ldr r2, [r3, #0] 8034f78: 3201 adds r2, #1 8034f7a: 601a str r2, [r3, #0] 8034f7c: 4770 bx lr 8034f7e: bf00 nop 8034f80: 2000c430 .word 0x2000c430 08034f84 : } void snmp_inc_snmpouttraps(void) { snmpouttraps++; 8034f84: 4b02 ldr r3, [pc, #8] ; (8034f90 ) 8034f86: 681a ldr r2, [r3, #0] 8034f88: 3201 adds r2, #1 8034f8a: 601a str r2, [r3, #0] 8034f8c: 4770 bx lr 8034f8e: bf00 nop 8034f90: 2000c4a8 .word 0x2000c4a8 08034f94 : } void snmp_get_snmpgrpid_ptr(struct snmp_obj_id **oid) { *oid = &snmpgrp_id; 8034f94: 4b01 ldr r3, [pc, #4] ; (8034f9c ) 8034f96: 6003 str r3, [r0, #0] 8034f98: 4770 bx lr 8034f9a: bf00 nop 8034f9c: 20000984 .word 0x20000984 08034fa0 : } } void snmp_get_snmpenableauthentraps(u8_t *value) { *value = *snmpenableauthentraps_ptr; 8034fa0: 4b02 ldr r3, [pc, #8] ; (8034fac ) 8034fa2: 681b ldr r3, [r3, #0] 8034fa4: 781b ldrb r3, [r3, #0] 8034fa6: 7003 strb r3, [r0, #0] 8034fa8: 4770 bx lr 8034faa: bf00 nop 8034fac: 20000898 .word 0x20000898 08034fb0 : /** * Pushes nse struct onto stack. */ static void push_node(struct nse* node) { 8034fb0: 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) 8034fb2: 4d07 ldr r5, [pc, #28] ; (8034fd0 ) 8034fb4: 782b ldrb r3, [r5, #0] 8034fb6: 2b1f cmp r3, #31 8034fb8: d808 bhi.n 8034fcc { node_stack[node_stack_cnt] = *node; 8034fba: 4a06 ldr r2, [pc, #24] ; (8034fd4 ) 8034fbc: 240c movs r4, #12 8034fbe: fb04 2403 mla r4, r4, r3, r2 8034fc2: c807 ldmia r0, {r0, r1, r2} 8034fc4: e884 0007 stmia.w r4, {r0, r1, r2} node_stack_cnt++; 8034fc8: 3301 adds r3, #1 8034fca: 702b strb r3, [r5, #0] 8034fcc: bd30 pop {r4, r5, pc} 8034fce: bf00 nop 8034fd0: 2000c578 .word 0x2000c578 8034fd4: 2000c57c .word 0x2000c57c 08034fd8 : empty_table(struct mib_node *node) { u8_t node_type; u8_t empty = 0; if (node != NULL) 8034fd8: b1d0 cbz r0, 8035010 { node_type = node->node_type; 8034fda: 7c03 ldrb r3, [r0, #16] if (node_type == MIB_NODE_LR) 8034fdc: 2b04 cmp r3, #4 8034fde: d105 bne.n 8034fec { struct mib_list_rootnode *lrn; lrn = (struct mib_list_rootnode *)node; if ((lrn->count == 0) || (lrn->head == NULL)) 8034fe0: 8b83 ldrh r3, [r0, #28] 8034fe2: b903 cbnz r3, 8034fe6 8034fe4: e009 b.n 8034ffa 8034fe6: 6943 ldr r3, [r0, #20] 8034fe8: b13b cbz r3, 8034ffa 8034fea: e010 b.n 803500e { empty = 1; } } else if ((node_type == MIB_NODE_AR) || (node_type == MIB_NODE_RA)) 8034fec: 1e9a subs r2, r3, #2 8034fee: 2a01 cmp r2, #1 8034ff0: d805 bhi.n 8034ffe { struct mib_array_node *an; an = (struct mib_array_node *)node; if ((an->maxlength == 0) || (an->nptr == NULL)) 8034ff2: 8a43 ldrh r3, [r0, #18] 8034ff4: b10b cbz r3, 8034ffa 8034ff6: 6980 ldr r0, [r0, #24] 8034ff8: e004 b.n 8035004 { empty = 1; 8034ffa: 2001 movs r0, #1 8034ffc: 4770 bx lr } } else if (node_type == MIB_NODE_EX) 8034ffe: 2b05 cmp r3, #5 8035000: d105 bne.n 803500e { struct mib_external_node *en; en = (struct mib_external_node *)node; if (en->tree_levels == 0) 8035002: 7e00 ldrb r0, [r0, #24] */ static u8_t empty_table(struct mib_node *node) { u8_t node_type; u8_t empty = 0; 8035004: f1d0 0001 rsbs r0, r0, #1 8035008: bf38 it cc 803500a: 2000 movcc r0, #0 803500c: 4770 bx lr 803500e: 2000 movs r0, #0 empty = 1; } } } return empty; } 8035010: 4770 bx lr 8035012: 0000 movs r0, r0 08035014 : * @param netif points to returned netif struct pointer */ void snmp_ifindextonetif(s32_t ifindex, struct netif **netif) { struct netif *nif = netif_list; 8035014: 4b05 ldr r3, [pc, #20] ; (803502c ) s32_t i, ifidx; ifidx = ifindex - 1; 8035016: 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; 8035018: 681b ldr r3, [r3, #0] s32_t i, ifidx; ifidx = ifindex - 1; i = 0; 803501a: 2200 movs r2, #0 while ((nif != NULL) && (i < ifidx)) 803501c: e001 b.n 8035022 { nif = nif->next; 803501e: 681b ldr r3, [r3, #0] i++; 8035020: 3201 adds r2, #1 struct netif *nif = netif_list; s32_t i, ifidx; ifidx = ifindex - 1; i = 0; while ((nif != NULL) && (i < ifidx)) 8035022: b10b cbz r3, 8035028 8035024: 4282 cmp r2, r0 8035026: dbfa blt.n 803501e { nif = nif->next; i++; } *netif = nif; 8035028: 600b str r3, [r1, #0] 803502a: 4770 bx lr 803502c: 2000f6b0 .word 0x2000f6b0 08035030 : * @param ifidx points to s32_t object sub-identifier */ void snmp_netiftoifindex(struct netif *netif, s32_t *ifidx) { struct netif *nif = netif_list; 8035030: 4b06 ldr r3, [pc, #24] ; (803504c ) u16_t i; i = 0; 8035032: 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; 8035034: 681b ldr r3, [r3, #0] u16_t i; i = 0; while ((nif != NULL) && (nif != netif)) 8035036: e001 b.n 803503c { nif = nif->next; 8035038: 681b ldr r3, [r3, #0] i++; 803503a: b292 uxth r2, r2 803503c: 3201 adds r2, #1 { struct netif *nif = netif_list; u16_t i; i = 0; while ((nif != NULL) && (nif != netif)) 803503e: b90b cbnz r3, 8035044 { nif = nif->next; i++; } *ifidx = i+1; 8035040: 600a str r2, [r1, #0] 8035042: 4770 bx lr { struct netif *nif = netif_list; u16_t i; i = 0; while ((nif != NULL) && (nif != netif)) 8035044: 4283 cmp r3, r0 8035046: d1f7 bne.n 8035038 8035048: e7fa b.n 8035040 803504a: bf00 nop 803504c: 2000f6b0 .word 0x2000f6b0 08035050 : * @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]); 8035050: 7802 ldrb r2, [r0, #0] 8035052: 68c3 ldr r3, [r0, #12] 8035054: ea42 6303 orr.w r3, r2, r3, lsl #24 8035058: 7a02 ldrb r2, [r0, #8] 803505a: ea43 4302 orr.w r3, r3, r2, lsl #16 803505e: 6842 ldr r2, [r0, #4] 8035060: 0612 lsls r2, r2, #24 8035062: ea43 4312 orr.w r3, r3, r2, lsr #16 8035066: 600b str r3, [r1, #0] 8035068: 4770 bx lr 0803506a : * @param ident points to s32_t ident[4] output */ void snmp_iptooid(ip_addr_t *ip, s32_t *ident) { ident[0] = ip4_addr1(ip); 803506a: 7803 ldrb r3, [r0, #0] 803506c: 600b str r3, [r1, #0] ident[1] = ip4_addr2(ip); 803506e: 7843 ldrb r3, [r0, #1] 8035070: 604b str r3, [r1, #4] ident[2] = ip4_addr3(ip); 8035072: 7883 ldrb r3, [r0, #2] 8035074: 608b str r3, [r1, #8] ident[3] = ip4_addr4(ip); 8035076: 78c3 ldrb r3, [r0, #3] 8035078: 60cb str r3, [r1, #12] 803507a: 4770 bx lr 0803507c : } struct mib_list_node * snmp_mib_ln_alloc(s32_t id) { 803507c: b510 push {r4, lr} 803507e: 4604 mov r4, r0 struct mib_list_node *ln; ln = (struct mib_list_node *)memp_malloc(MEMP_SNMP_NODE); 8035080: 200b movs r0, #11 8035082: f7fa fda3 bl 802fbcc if (ln != NULL) 8035086: b120 cbz r0, 8035092 { ln->prev = NULL; 8035088: 2300 movs r3, #0 803508a: 6003 str r3, [r0, #0] ln->next = NULL; 803508c: 6043 str r3, [r0, #4] ln->objid = id; 803508e: 6084 str r4, [r0, #8] ln->nptr = NULL; 8035090: 60c3 str r3, [r0, #12] } return ln; } 8035092: bd10 pop {r4, pc} 08035094 : void snmp_mib_ln_free(struct mib_list_node *ln) { 8035094: 4601 mov r1, r0 memp_free(MEMP_SNMP_NODE, ln); 8035096: 200b movs r0, #11 8035098: f7fa bdae b.w 802fbf8 0803509c : } struct mib_list_rootnode * snmp_mib_lrn_alloc(void) { 803509c: b508 push {r3, lr} struct mib_list_rootnode *lrn; lrn = (struct mib_list_rootnode*)memp_malloc(MEMP_SNMP_ROOTNODE); 803509e: 200a movs r0, #10 80350a0: f7fa fd94 bl 802fbcc if (lrn != NULL) 80350a4: b170 cbz r0, 80350c4 { lrn->get_object_def = noleafs_get_object_def; 80350a6: 4b08 ldr r3, [pc, #32] ; (80350c8 ) 80350a8: 6003 str r3, [r0, #0] lrn->get_value = noleafs_get_value; 80350aa: 4b08 ldr r3, [pc, #32] ; (80350cc ) 80350ac: 6043 str r3, [r0, #4] lrn->set_test = noleafs_set_test; 80350ae: 4b08 ldr r3, [pc, #32] ; (80350d0 ) 80350b0: 6083 str r3, [r0, #8] lrn->set_value = noleafs_set_value; 80350b2: 4b08 ldr r3, [pc, #32] ; (80350d4 ) 80350b4: 60c3 str r3, [r0, #12] lrn->node_type = MIB_NODE_LR; 80350b6: 2304 movs r3, #4 80350b8: 7403 strb r3, [r0, #16] lrn->maxlength = 0; 80350ba: 2300 movs r3, #0 80350bc: 8243 strh r3, [r0, #18] lrn->head = NULL; 80350be: 6143 str r3, [r0, #20] lrn->tail = NULL; 80350c0: 6183 str r3, [r0, #24] lrn->count = 0; 80350c2: 8383 strh r3, [r0, #28] } return lrn; } 80350c4: bd08 pop {r3, pc} 80350c6: bf00 nop 80350c8: 080339e3 .word 0x080339e3 80350cc: 080339e9 .word 0x080339e9 80350d0: 080339eb .word 0x080339eb 80350d4: 080339ef .word 0x080339ef 080350d8 : void snmp_mib_lrn_free(struct mib_list_rootnode *lrn) { 80350d8: 4601 mov r1, r0 memp_free(MEMP_SNMP_ROOTNODE, lrn); 80350da: 200a movs r0, #10 80350dc: f7fa bd8c b.w 802fbf8 080350e0 : * 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) { 80350e0: b5f8 push {r3, r4, r5, r6, r7, lr} 80350e2: 4605 mov r5, r0 80350e4: 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) 80350e6: 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) { 80350e8: 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) 80350ea: b93c cbnz r4, 80350fc { /* empty list, add first node */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("alloc empty list objid==%"S32_F"\n",objid)); nn = snmp_mib_ln_alloc(objid); 80350ec: f7ff ffc6 bl 803507c if (nn != NULL) 80350f0: b350 cbz r0, 8035148 { rn->head = nn; 80350f2: 6168 str r0, [r5, #20] rn->tail = nn; 80350f4: 61a8 str r0, [r5, #24] *insn = nn; 80350f6: 6030 str r0, [r6, #0] 80350f8: e021 b.n 803513e *insn = n; insert = 2; } else if (n->objid < objid) { if (n->next == NULL) 80350fa: 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) 80350fc: 68a3 ldr r3, [r4, #8] 80350fe: 4283 cmp r3, r0 8035100: d102 bne.n 8035108 { /* node is already there */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("node already there objid==%"S32_F"\n",objid)); *insn = n; 8035102: 6034 str r4, [r6, #0] insert = 2; 8035104: 2302 movs r3, #2 8035106: e023 b.n 8035150 } else if (n->objid < objid) 8035108: da0a bge.n 8035120 { if (n->next == NULL) 803510a: 6867 ldr r7, [r4, #4] 803510c: 2f00 cmp r7, #0 803510e: d1f4 bne.n 80350fa { /* 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); 8035110: f7ff ffb4 bl 803507c if (nn != NULL) 8035114: b1d8 cbz r0, 803514e { nn->next = NULL; nn->prev = n; 8035116: e880 0090 stmia.w r0, {r4, r7} n->next = nn; 803511a: 6060 str r0, [r4, #4] rn->tail = nn; 803511c: 61a8 str r0, [r5, #24] 803511e: e00b b.n 8035138 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); 8035120: f7ff ffac bl 803507c if (nn != NULL) 8035124: b198 cbz r0, 803514e { if (n->prev == NULL) 8035126: 6822 ldr r2, [r4, #0] { /* insert at the head */ nn->next = n; nn->prev = NULL; 8035128: 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) 803512c: b90a cbnz r2, 8035132 { /* insert at the head */ nn->next = n; nn->prev = NULL; rn->head = nn; 803512e: 6168 str r0, [r5, #20] 8035130: e001 b.n 8035136 else { /* insert in the middle */ nn->next = n; nn->prev = n->prev; n->prev->next = nn; 8035132: 6822 ldr r2, [r4, #0] 8035134: 6050 str r0, [r2, #4] n->prev = nn; 8035136: 6020 str r0, [r4, #0] } *insn = nn; 8035138: 6030 str r0, [r6, #0] insert = 1; 803513a: 2301 movs r3, #1 803513c: e008 b.n 8035150 } } } if (insert == 1) { rn->count += 1; 803513e: 8bab ldrh r3, [r5, #28] 8035140: 3301 adds r3, #1 8035142: 83ab strh r3, [r5, #28] 8035144: 2301 movs r3, #1 8035146: e000 b.n 803514a *insn = nn; insert = 1; } else { insert = -1; 8035148: 23ff movs r3, #255 ; 0xff if (insert == 1) { rn->count += 1; } LWIP_ASSERT("insert != 0",insert != 0); return insert; 803514a: b258 sxtb r0, r3 803514c: bdf8 pop {r3, r4, r5, r6, r7, pc} insert = 1; } else { /* insertion failure */ insert = -1; 803514e: 23ff movs r3, #255 ; 0xff } } } } if (insert == 1) 8035150: 2b01 cmp r3, #1 8035152: d1fa bne.n 803514a 8035154: e7f3 b.n 803513e 08035156 : { s8_t fc; struct mib_list_node *n; LWIP_ASSERT("rn != NULL",rn != NULL); n = rn->head; 8035156: 6943 ldr r3, [r0, #20] while ((n != NULL) && (n->objid != objid)) 8035158: e000 b.n 803515c { n = n->next; 803515a: 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)) 803515c: b16b cbz r3, 803517a 803515e: 6898 ldr r0, [r3, #8] 8035160: 4288 cmp r0, r1 8035162: d1fa bne.n 803515a } if (n == NULL) { fc = 0; } else if (n->nptr == NULL) 8035164: 68d9 ldr r1, [r3, #12] 8035166: b161 cbz r1, 8035182 } else { struct mib_list_rootnode *r; if (n->nptr->node_type == MIB_NODE_LR) 8035168: 7c08 ldrb r0, [r1, #16] 803516a: 2804 cmp r0, #4 803516c: d107 bne.n 803517e { r = (struct mib_list_rootnode *)n->nptr; if (r->count > 1) 803516e: 8b88 ldrh r0, [r1, #28] { /* can't delete node */ fc = 2; 8035170: 2801 cmp r0, #1 8035172: bf94 ite ls 8035174: 2001 movls r0, #1 8035176: 2002 movhi r0, #2 8035178: e004 b.n 8035184 { n = n->next; } if (n == NULL) { fc = 0; 803517a: 4618 mov r0, r3 803517c: e002 b.n 8035184 } } else { /* other node type */ fc = 3; 803517e: 2003 movs r0, #3 8035180: e000 b.n 8035184 fc = 0; } else if (n->nptr == NULL) { /* leaf, can delete node */ fc = 1; 8035182: 2001 movs r0, #1 { /* other node type */ fc = 3; } } *fn = n; 8035184: 6013 str r3, [r2, #0] return fc; } 8035186: b240 sxtb r0, r0 8035188: 4770 bx lr 0803518a : * @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) { 803518a: 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; 803518c: 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); 803518e: 68cd ldr r5, [r1, #12] rn->count -= 1; 8035190: 3b01 subs r3, #1 8035192: 8383 strh r3, [r0, #28] if (n == rn->head) 8035194: 6943 ldr r3, [r0, #20] 8035196: 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) { 8035198: 4604 mov r4, r0 /* caller must remove this sub-tree */ next = (struct mib_list_rootnode*)(n->nptr); rn->count -= 1; if (n == rn->head) 803519a: d105 bne.n 80351a8 { rn->head = n->next; 803519c: 684b ldr r3, [r1, #4] 803519e: 6143 str r3, [r0, #20] if (n->next != NULL) 80351a0: b17b cbz r3, 80351c2 { /* not last node, new list begin */ n->next->prev = NULL; 80351a2: 2200 movs r2, #0 80351a4: 601a str r2, [r3, #0] 80351a6: e00c b.n 80351c2 } } else if (n == rn->tail) 80351a8: 6983 ldr r3, [r0, #24] 80351aa: 4299 cmp r1, r3 80351ac: 680b ldr r3, [r1, #0] 80351ae: d104 bne.n 80351ba { rn->tail = n->prev; 80351b0: 6183 str r3, [r0, #24] if (n->prev != NULL) 80351b2: b133 cbz r3, 80351c2 { /* not last node, new list end */ n->prev->next = NULL; 80351b4: 2200 movs r2, #0 80351b6: 605a str r2, [r3, #4] 80351b8: e003 b.n 80351c2 } } else { /* node must be in the middle */ n->prev->next = n->next; 80351ba: 684a ldr r2, [r1, #4] 80351bc: 605a str r2, [r3, #4] n->next->prev = n->prev; 80351be: 684a ldr r2, [r1, #4] 80351c0: 6013 str r3, [r2, #0] } LWIP_DEBUGF(SNMP_MIB_DEBUG,("free list objid==%"S32_F"\n",n->objid)); snmp_mib_ln_free(n); 80351c2: 4608 mov r0, r1 80351c4: f7ff ff66 bl 8035094 if (rn->count == 0) 80351c8: 8ba3 ldrh r3, [r4, #28] 80351ca: b90b cbnz r3, 80351d0 { rn->head = NULL; 80351cc: 6163 str r3, [r4, #20] rn->tail = NULL; 80351ce: 61a3 str r3, [r4, #24] } return next; } 80351d0: 4628 mov r0, r5 80351d2: bd38 pop {r3, r4, r5, pc} 080351d4 : * @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) { 80351d4: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80351d8: 4604 mov r4, r0 80351da: b085 sub sp, #20 80351dc: 460d mov r5, r1 80351de: 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) 80351e0: f102 0804 add.w r8, r2, #4 { u8_t node_type, ext_level; ext_level = 0; 80351e4: f04f 0b00 mov.w fp, #0 LWIP_DEBUGF(SNMP_MIB_DEBUG,("node==%p *ident==%"S32_F"\n",(void*)node,*ident)); while (node != NULL) 80351e8: e068 b.n 80352bc { node_type = node->node_type; 80351ea: 7c23 ldrb r3, [r4, #16] if ((node_type == MIB_NODE_AR) || (node_type == MIB_NODE_RA)) 80351ec: 1e9a subs r2, r3, #2 80351ee: 2a01 cmp r2, #1 80351f0: d812 bhi.n 8035218 { struct mib_array_node *an; u16_t i; if (ident_len > 0) 80351f2: b90d cbnz r5, 80351f8 } else { /* search failed, short object identifier (nosuchname) */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("an search failed, short object identifier\n")); return NULL; 80351f4: 2000 movs r0, #0 80351f6: e06a b.n 80352ce 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)) 80351f8: 8a67 ldrh r7, [r4, #18] 80351fa: 2300 movs r3, #0 80351fc: b29a uxth r2, r3 80351fe: 42ba cmp r2, r7 8035200: d2f8 bcs.n 80351f4 8035202: 009a lsls r2, r3, #2 8035204: 6961 ldr r1, [r4, #20] 8035206: 5888 ldr r0, [r1, r2] 8035208: f858 1c04 ldr.w r1, [r8, #-4] 803520c: 3301 adds r3, #1 803520e: 4288 cmp r0, r1 8035210: d1f4 bne.n 80351fc } 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) 8035212: 69a3 ldr r3, [r4, #24] 8035214: 589b ldr r3, [r3, r2] 8035216: e057 b.n 80352c8 /* 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) 8035218: 2b04 cmp r3, #4 803521a: d10c bne.n 8035236 { struct mib_list_rootnode *lrn; struct mib_list_node *ln; if (ident_len > 0) 803521c: 2d00 cmp r5, #0 803521e: d0e9 beq.n 80351f4 { /* list root node (internal 'RAM', variable length) */ lrn = (struct mib_list_rootnode *)node; ln = lrn->head; 8035220: 6963 ldr r3, [r4, #20] /* iterate over list, head to tail */ while ((ln != NULL) && (ln->objid != *ident)) 8035222: e000 b.n 8035226 { ln = ln->next; 8035224: 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)) 8035226: 2b00 cmp r3, #0 8035228: d0e4 beq.n 80351f4 803522a: 6899 ldr r1, [r3, #8] 803522c: f858 2c04 ldr.w r2, [r8, #-4] 8035230: 4291 cmp r1, r2 8035232: d1f7 bne.n 8035224 8035234: e047 b.n 80352c6 /* 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) 8035236: 2b05 cmp r3, #5 8035238: d12e bne.n 8035298 { struct mib_external_node *en; u16_t i, len; if (ident_len > 0) 803523a: 2d00 cmp r5, #0 803523c: d0da beq.n 80351f4 { /* external node (addressing and access via functions) */ en = (struct mib_external_node *)node; i = 0; len = en->level_length(en->addr_inf,ext_level); 803523e: 69e3 ldr r3, [r4, #28] 8035240: 6960 ldr r0, [r4, #20] 8035242: 4659 mov r1, fp 8035244: 4798 blx r3 if (ident_len > 0) { /* external node (addressing and access via functions) */ en = (struct mib_external_node *)node; i = 0; 8035246: f04f 0900 mov.w r9, #0 len = en->level_length(en->addr_inf,ext_level); 803524a: 4684 mov ip, r0 while ((i < len) && (en->ident_cmp(en->addr_inf,ext_level,i,*ident) != 0)) 803524c: e003 b.n 8035256 { i++; 803524e: f109 0901 add.w r9, r9, #1 8035252: 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)) 8035256: 45e1 cmp r9, ip 8035258: d0cc beq.n 80351f4 803525a: 6960 ldr r0, [r4, #20] 803525c: f858 3c04 ldr.w r3, [r8, #-4] 8035260: 6a27 ldr r7, [r4, #32] 8035262: f8cd c004 str.w ip, [sp, #4] 8035266: 4659 mov r1, fp 8035268: 464a mov r2, r9 803526a: 47b8 blx r7 803526c: f8dd c004 ldr.w ip, [sp, #4] 8035270: 2800 cmp r0, #0 8035272: d1ec bne.n 803524e { i++; } if (i < len) 8035274: 45e1 cmp r9, ip 8035276: d2bd bcs.n 80351f4 { s32_t debug_id; en->get_objid(en->addr_inf,ext_level,i,&debug_id); 8035278: 4659 mov r1, fp 803527a: ab03 add r3, sp, #12 803527c: 6a67 ldr r7, [r4, #36] ; 0x24 803527e: 6960 ldr r0, [r4, #20] 8035280: 464a mov r2, r9 8035282: 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) 8035284: 7e23 ldrb r3, [r4, #24] 8035286: f10b 0b01 add.w fp, fp, #1 803528a: 459b cmp fp, r3 803528c: d100 bne.n 8035290 803528e: e00b b.n 80352a8 else { /* found it, proceed to child */ ident_len--; ident++; ext_level++; 8035290: fa5f fb8b uxtb.w fp, fp 8035294: 4623 mov r3, r4 8035296: e00c b.n 80352b2 /* 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) 8035298: 2b01 cmp r3, #1 803529a: d1ab bne.n 80351f4 { mib_scalar_node *sn; sn = (mib_scalar_node *)node; if ((ident_len == 1) && (*ident == 0)) 803529c: 2d01 cmp r5, #1 803529e: d1a9 bne.n 80351f4 80352a0: f8da 3000 ldr.w r3, [sl] 80352a4: 2b00 cmp r3, #0 80352a6: d1a5 bne.n 80351f4 { np->ident_len = ident_len; 80352a8: 7035 strb r5, [r6, #0] np->ident = ident; 80352aa: f8c6 a004 str.w sl, [r6, #4] return (struct mib_node*)sn; 80352ae: 4620 mov r0, r4 80352b0: e00d b.n 80352ce 80352b2: 3d01 subs r5, #1 80352b4: b2ed uxtb r5, r5 80352b6: f108 0804 add.w r8, r8, #4 80352ba: 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) 80352bc: 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) 80352c0: 2c00 cmp r4, #0 80352c2: d192 bne.n 80351ea 80352c4: e796 b.n 80351f4 } 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) 80352c6: 68db ldr r3, [r3, #12] 80352c8: 2b00 cmp r3, #0 80352ca: d1f2 bne.n 80352b2 80352cc: e7ec b.n 80352a8 } } /* done, found nothing */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("search failed node==%p\n",(void*)node)); return NULL; } 80352ce: b005 add sp, #20 80352d0: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 080352d4 : /** * Tree expansion. */ struct mib_node * snmp_expand_tree(struct mib_node *node, u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret) { 80352d4: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80352d8: 461d mov r5, r3 80352da: b08b sub sp, #44 ; 0x2c u8_t node_type, ext_level, climb_tree; ext_level = 0; /* reset node stack */ node_stack_cnt = 0; 80352dc: 4ba4 ldr r3, [pc, #656] ; (8035570 ) 80352de: 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); 80352e2: 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) { 80352e4: 4604 mov r4, r0 80352e6: 460e mov r6, r1 80352e8: 4690 mov r8, r2 u8_t node_type, ext_level, climb_tree; ext_level = 0; /* reset node stack */ node_stack_cnt = 0; 80352ea: 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); 80352ee: 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) 80352f0: e19c b.n 803562c { climb_tree = 0; node_type = node->node_type; 80352f2: 7c23 ldrb r3, [r4, #16] if ((node_type == MIB_NODE_AR) || (node_type == MIB_NODE_RA)) 80352f4: 1e9a subs r2, r3, #2 80352f6: 2a01 cmp r2, #1 80352f8: f200 808f bhi.w 803541a 80352fc: 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) 80352fe: b90e cbnz r6, 8035304 else { u8_t j; /* ident_len == 0, complete with leftmost '.thing' */ j = 0; while ((j < an->maxlength) && empty_table(an->nptr[j])) 8035300: 46b1 mov r9, r6 8035302: e06f b.n 80353e4 /* 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)) 8035304: f04f 0c00 mov.w ip, #0 8035308: fa1f f28c uxth.w r2, ip 803530c: 42ba cmp r2, r7 803530e: f080 8168 bcs.w 80355e2 8035312: 6963 ldr r3, [r4, #20] 8035314: f853 102c ldr.w r1, [r3, ip, lsl #2] 8035318: f8d8 3000 ldr.w r3, [r8] 803531c: 4299 cmp r1, r3 803531e: ea4f 098c mov.w r9, ip, lsl #2 8035322: f10c 0c01 add.w ip, ip, #1 8035326: dbef blt.n 8035308 } 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]; 8035328: 782b ldrb r3, [r5, #0] 803532a: eb05 0783 add.w r7, r5, r3, lsl #2 803532e: 6079 str r1, [r7, #4] (oidret->len)++; 8035330: 1c59 adds r1, r3, #1 8035332: 7029 strb r1, [r5, #0] if (an->nptr[i] == NULL) 8035334: f8d4 b018 ldr.w fp, [r4, #24] 8035338: f85b 0009 ldr.w r0, [fp, r9] 803533c: b998 cbnz r0, 8035366 { LWIP_DEBUGF(SNMP_MIB_DEBUG,("leaf node\n")); /* leaf node (e.g. in a fixed size table) */ if (an->objid[i] > *ident) 803533e: 6960 ldr r0, [r4, #20] 8035340: f850 6009 ldr.w r6, [r0, r9] 8035344: f8d8 0000 ldr.w r0, [r8] 8035348: 4286 cmp r6, r0 803534a: f300 8173 bgt.w 8035634 { return (struct mib_node*)an; } else if ((i + 1) < an->maxlength) 803534e: 8a60 ldrh r0, [r4, #18] { /* an->objid[i] == *ident */ (oidret->len)--; 8035350: 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) 8035352: 3201 adds r2, #1 8035354: 4282 cmp r2, r0 8035356: f280 8144 bge.w 80355e2 { /* an->objid[i] == *ident */ (oidret->len)--; oidret->id[oidret->len] = an->objid[i + 1]; 803535a: 6963 ldr r3, [r4, #20] 803535c: f853 302c ldr.w r3, [r3, ip, lsl #2] (oidret->len)++; 8035360: 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]; 8035362: 607b str r3, [r7, #4] 8035364: e166 b.n 8035634 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; 8035366: 3201 adds r2, #1 while ((j < an->maxlength) && (empty_table(an->nptr[j]))) 8035368: 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; 803536a: fa5f fc82 uxtb.w ip, r2 while ((j < an->maxlength) && (empty_table(an->nptr[j]))) 803536e: 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) 8035370: eb0c 0307 add.w r3, ip, r7 8035374: 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]))) 8035376: 428b cmp r3, r1 8035378: d21a bcs.n 80353b0 803537a: b21b sxth r3, r3 803537c: 009a lsls r2, r3, #2 803537e: f85b 3023 ldr.w r3, [fp, r3, lsl #2] 8035382: 9104 str r1, [sp, #16] 8035384: 4618 mov r0, r3 8035386: 9203 str r2, [sp, #12] 8035388: 9302 str r3, [sp, #8] 803538a: f8cd c004 str.w ip, [sp, #4] 803538e: f7ff fe23 bl 8034fd8 8035392: 3701 adds r7, #1 8035394: 9904 ldr r1, [sp, #16] 8035396: 9a03 ldr r2, [sp, #12] 8035398: 9b02 ldr r3, [sp, #8] 803539a: f8dd c004 ldr.w ip, [sp, #4] 803539e: 2800 cmp r0, #0 80353a0: d1e6 bne.n 8035370 { j++; } if (j < an->maxlength) { cur_node.r_ptr = an->nptr[j]; 80353a2: 9307 str r3, [sp, #28] cur_node.r_id = an->objid[j]; 80353a4: 6963 ldr r3, [r4, #20] 80353a6: 589b ldr r3, [r3, r2] cur_node.r_nl = 0; 80353a8: 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]; 80353ac: 9308 str r3, [sp, #32] 80353ae: e001 b.n 80353b4 cur_node.r_nl = 0; } else { cur_node.r_ptr = NULL; 80353b0: 2300 movs r3, #0 80353b2: 9307 str r3, [sp, #28] } push_node(&cur_node); 80353b4: a807 add r0, sp, #28 80353b6: f7ff fdfb bl 8034fb0 if (an->objid[i] == *ident) 80353ba: 6963 ldr r3, [r4, #20] 80353bc: f853 2009 ldr.w r2, [r3, r9] 80353c0: f8d8 3000 ldr.w r3, [r8] 80353c4: 429a cmp r2, r3 80353c6: d104 bne.n 80353d2 { ident_len--; 80353c8: 3e01 subs r6, #1 80353ca: b2f6 uxtb r6, r6 ident++; 80353cc: f108 0804 add.w r8, r8, #4 80353d0: e000 b.n 80353d4 } else { /* an->objid[i] < *ident */ ident_len = 0; 80353d2: 2600 movs r6, #0 } /* follow next child pointer */ node = an->nptr[i]; 80353d4: 69a3 ldr r3, [r4, #24] 80353d6: f853 3009 ldr.w r3, [r3, r9] 80353da: e140 b.n 803565e u8_t j; /* ident_len == 0, complete with leftmost '.thing' */ j = 0; while ((j < an->maxlength) && empty_table(an->nptr[j])) { j++; 80353dc: f109 0901 add.w r9, r9, #1 80353e0: 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])) 80353e4: 45b9 cmp r9, r7 80353e6: f080 80fc bcs.w 80355e2 80353ea: fa0f f289 sxth.w r2, r9 80353ee: 69a3 ldr r3, [r4, #24] 80353f0: f853 0022 ldr.w r0, [r3, r2, lsl #2] 80353f4: ea4f 0b82 mov.w fp, r2, lsl #2 80353f8: f7ff fdee bl 8034fd8 80353fc: 2800 cmp r0, #0 80353fe: d1ed bne.n 80353dc 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]; 8035400: 6962 ldr r2, [r4, #20] 8035402: 782b ldrb r3, [r5, #0] 8035404: f852 100b ldr.w r1, [r2, fp] 8035408: eb05 0283 add.w r2, r5, r3, lsl #2 (oidret->len)++; 803540c: 3301 adds r3, #1 803540e: 702b strb r3, [r5, #0] if (an->nptr[j] == NULL) 8035410: 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]; 8035412: 6051 str r1, [r2, #4] (oidret->len)++; if (an->nptr[j] == NULL) 8035414: f853 300b ldr.w r3, [r3, fp] 8035418: e11f b.n 803565a /* j == an->maxlength */ climb_tree = 1; } } } else if(node_type == MIB_NODE_LR) 803541a: 2b04 cmp r3, #4 803541c: d14c bne.n 80354b8 803541e: 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) 8035420: 2e00 cmp r6, #0 8035422: d040 beq.n 80354a6 { ln = lrn->head; /* iterate over list, head to tail */ while ((ln != NULL) && (ln->objid < *ident)) 8035424: e000 b.n 8035428 { ln = ln->next; 8035426: 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)) 8035428: 2f00 cmp r7, #0 803542a: f000 80da beq.w 80355e2 803542e: 68ba ldr r2, [r7, #8] 8035430: f8d8 3000 ldr.w r3, [r8] 8035434: 429a cmp r2, r3 8035436: dbf6 blt.n 8035426 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; 8035438: 782b ldrb r3, [r5, #0] 803543a: eb05 0183 add.w r1, r5, r3, lsl #2 803543e: 604a str r2, [r1, #4] (oidret->len)++; 8035440: 1c5a adds r2, r3, #1 8035442: 702a strb r2, [r5, #0] if (ln->nptr == NULL) 8035444: 68f8 ldr r0, [r7, #12] 8035446: b978 cbnz r0, 8035468 { /* leaf node */ if (ln->objid > *ident) 8035448: 68b8 ldr r0, [r7, #8] 803544a: f8d8 6000 ldr.w r6, [r8] 803544e: 42b0 cmp r0, r6 8035450: f300 80f0 bgt.w 8035634 { return (struct mib_node*)lrn; } else if (ln->next != NULL) 8035454: 6878 ldr r0, [r7, #4] { /* ln->objid == *ident */ (oidret->len)--; 8035456: 702b strb r3, [r5, #0] /* leaf node */ if (ln->objid > *ident) { return (struct mib_node*)lrn; } else if (ln->next != NULL) 8035458: 2800 cmp r0, #0 803545a: f000 80c2 beq.w 80355e2 { /* ln->objid == *ident */ (oidret->len)--; oidret->id[oidret->len] = ln->next->objid; 803545e: 687b ldr r3, [r7, #4] 8035460: 689b ldr r3, [r3, #8] (oidret->len)++; 8035462: 702a strb r2, [r5, #0] } else if (ln->next != NULL) { /* ln->objid == *ident */ (oidret->len)--; oidret->id[oidret->len] = ln->next->objid; 8035464: 604b str r3, [r1, #4] 8035466: e0e5 b.n 8035634 { struct mib_list_node *jn; struct nse cur_node; /* non-leaf, store right child ptr and id */ jn = ln->next; 8035468: 687c ldr r4, [r7, #4] while ((jn != NULL) && empty_table(jn->nptr)) 803546a: e000 b.n 803546e { jn = jn->next; 803546c: 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)) 803546e: 2c00 cmp r4, #0 8035470: f000 80e9 beq.w 8035646 8035474: f8d4 900c ldr.w r9, [r4, #12] 8035478: 4648 mov r0, r9 803547a: f7ff fdad bl 8034fd8 803547e: 2800 cmp r0, #0 8035480: d1f4 bne.n 803546c 8035482: e0d9 b.n 8035638 } else { cur_node.r_ptr = NULL; } push_node(&cur_node); 8035484: a807 add r0, sp, #28 8035486: f7ff fd93 bl 8034fb0 if (ln->objid == *ident) 803548a: 68ba ldr r2, [r7, #8] 803548c: f8d8 3000 ldr.w r3, [r8] 8035490: 429a cmp r2, r3 8035492: d104 bne.n 803549e { ident_len--; 8035494: 3e01 subs r6, #1 8035496: b2f6 uxtb r6, r6 ident++; 8035498: f108 0804 add.w r8, r8, #4 803549c: e000 b.n 80354a0 } else { /* ln->objid < *ident */ ident_len = 0; 803549e: 2600 movs r6, #0 } /* follow next child pointer */ node = ln->nptr; 80354a0: 68fb ldr r3, [r7, #12] 80354a2: e0dc b.n 803565e 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; 80354a4: 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)) 80354a6: 2f00 cmp r7, #0 80354a8: f000 809b beq.w 80355e2 80354ac: 68f8 ldr r0, [r7, #12] 80354ae: f7ff fd93 bl 8034fd8 80354b2: 2800 cmp r0, #0 80354b4: d1f6 bne.n 80354a4 80354b6: e0c8 b.n 803564a /* jn == NULL */ climb_tree = 1; } } } else if(node_type == MIB_NODE_EX) 80354b8: 2b05 cmp r3, #5 80354ba: f040 8086 bne.w 80355ca 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) 80354be: 2e00 cmp r6, #0 80354c0: d06e beq.n 80355a0 { u16_t i, len; i = 0; len = en->level_length(en->addr_inf,ext_level); 80354c2: 69e3 ldr r3, [r4, #28] 80354c4: 6960 ldr r0, [r4, #20] 80354c6: 4651 mov r1, sl 80354c8: 4798 blx r3 en = (struct mib_external_node *)node; if (ident_len > 0) { u16_t i, len; i = 0; 80354ca: f04f 0900 mov.w r9, #0 len = en->level_length(en->addr_inf,ext_level); 80354ce: 4683 mov fp, r0 while ((i < len) && (en->ident_cmp(en->addr_inf,ext_level,i,*ident) < 0)) 80354d0: e003 b.n 80354da { i++; 80354d2: f109 0901 add.w r9, r9, #1 80354d6: 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)) 80354da: 45d9 cmp r9, fp 80354dc: f000 8081 beq.w 80355e2 80354e0: 6a27 ldr r7, [r4, #32] 80354e2: 6960 ldr r0, [r4, #20] 80354e4: f8d8 3000 ldr.w r3, [r8] 80354e8: 4651 mov r1, sl 80354ea: 464a mov r2, r9 80354ec: 47b8 blx r7 80354ee: 2800 cmp r0, #0 80354f0: dbef blt.n 80354d2 { i++; } if (i < len) 80354f2: 45d9 cmp r9, fp 80354f4: d275 bcs.n 80355e2 { /* add identifier to oidret */ en->get_objid(en->addr_inf,ext_level,i,&ex_id); 80354f6: 4651 mov r1, sl 80354f8: 464a mov r2, r9 80354fa: ab06 add r3, sp, #24 80354fc: 6a67 ldr r7, [r4, #36] ; 0x24 80354fe: 6960 ldr r0, [r4, #20] 8035500: 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; 8035502: 782b ldrb r3, [r5, #0] 8035504: 9a06 ldr r2, [sp, #24] 8035506: eb05 0183 add.w r1, r5, r3, lsl #2 (oidret->len)++; if ((ext_level + 1) == en->tree_levels) 803550a: 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; 803550e: 604a str r2, [r1, #4] (oidret->len)++; 8035510: 1c59 adds r1, r3, #1 8035512: 7029 strb r1, [r5, #0] if ((ext_level + 1) == en->tree_levels) 8035514: 7e21 ldrb r1, [r4, #24] 8035516: 458c cmp ip, r1 8035518: d118 bne.n 803554c { LWIP_DEBUGF(SNMP_MIB_DEBUG,("leaf node\n")); /* leaf node */ if (ex_id > *ident) 803551a: f8d8 1000 ldr.w r1, [r8] 803551e: 428a cmp r2, r1 8035520: f300 8088 bgt.w 8035634 { return (struct mib_node*)en; } else if ((i + 1) < len) 8035524: f109 0201 add.w r2, r9, #1 8035528: 455a cmp r2, fp 803552a: da0d bge.n 8035548 { /* ex_id == *ident */ en->get_objid(en->addr_inf,ext_level,i + 1,&ex_id); 803552c: ab06 add r3, sp, #24 803552e: 6a66 ldr r6, [r4, #36] ; 0x24 8035530: 6960 ldr r0, [r4, #20] 8035532: 4651 mov r1, sl 8035534: b292 uxth r2, r2 8035536: 47b0 blx r6 (oidret->len)--; 8035538: 782b ldrb r3, [r5, #0] 803553a: 3b01 subs r3, #1 oidret->id[oidret->len] = ex_id; 803553c: b2db uxtb r3, r3 803553e: eb05 0583 add.w r5, r5, r3, lsl #2 8035542: 9b06 ldr r3, [sp, #24] 8035544: 606b str r3, [r5, #4] 8035546: e075 b.n 8035634 return (struct mib_node*)en; } else { /* (i + 1) == len */ (oidret->len)--; 8035548: 702b strb r3, [r5, #0] 803554a: e04a b.n 80355e2 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; 803554c: f109 0201 add.w r2, r9, #1 if (j < len) 8035550: b2d2 uxtb r2, r2 8035552: 455a cmp r2, fp 8035554: d20e bcs.n 8035574 { /* right node is the current external node */ cur_node.r_ptr = node; 8035556: 9407 str r4, [sp, #28] en->get_objid(en->addr_inf,ext_level,j,&cur_node.r_id); 8035558: 6960 ldr r0, [r4, #20] 803555a: 9b05 ldr r3, [sp, #20] 803555c: f8cd c004 str.w ip, [sp, #4] 8035560: 4651 mov r1, sl 8035562: 6a67 ldr r7, [r4, #36] ; 0x24 8035564: 47b8 blx r7 cur_node.r_nl = ext_level + 1; 8035566: f8dd c004 ldr.w ip, [sp, #4] 803556a: f88d c024 strb.w ip, [sp, #36] ; 0x24 803556e: e003 b.n 8035578 8035570: 2000c578 .word 0x2000c578 } else { cur_node.r_ptr = NULL; 8035574: 2300 movs r3, #0 8035576: 9307 str r3, [sp, #28] } push_node(&cur_node); 8035578: a807 add r0, sp, #28 803557a: f7ff fd19 bl 8034fb0 if (en->ident_cmp(en->addr_inf,ext_level,i,*ident) == 0) 803557e: 6a27 ldr r7, [r4, #32] 8035580: 6960 ldr r0, [r4, #20] 8035582: f8d8 3000 ldr.w r3, [r8] 8035586: 4651 mov r1, sl 8035588: 464a mov r2, r9 803558a: 47b8 blx r7 803558c: b920 cbnz r0, 8035598 { ident_len--; 803558e: 3e01 subs r6, #1 8035590: b2f6 uxtb r6, r6 ident++; 8035592: f108 0804 add.w r8, r8, #4 8035596: e000 b.n 803559a } else { /* external id < *ident */ ident_len = 0; 8035598: 2600 movs r6, #0 } /* proceed to child */ ext_level++; 803559a: f10a 0a01 add.w sl, sl, #1 803559e: e011 b.n 80355c4 } } else { /* ident_len == 0, complete with leftmost '.thing' */ en->get_objid(en->addr_inf,ext_level,0,&ex_id); 80355a0: 4651 mov r1, sl 80355a2: 4632 mov r2, r6 80355a4: ab06 add r3, sp, #24 80355a6: 6a67 ldr r7, [r4, #36] ; 0x24 80355a8: 6960 ldr r0, [r4, #20] 80355aa: 47b8 blx r7 LWIP_DEBUGF(SNMP_MIB_DEBUG,("left en->objid==%"S32_F"\n",ex_id)); oidret->id[oidret->len] = ex_id; 80355ac: 782b ldrb r3, [r5, #0] 80355ae: 9a06 ldr r2, [sp, #24] 80355b0: eb05 0183 add.w r1, r5, r3, lsl #2 (oidret->len)++; 80355b4: 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; 80355b6: 604a str r2, [r1, #4] (oidret->len)++; 80355b8: 702b strb r3, [r5, #0] if ((ext_level + 1) == en->tree_levels) 80355ba: 7e23 ldrb r3, [r4, #24] 80355bc: f10a 0a01 add.w sl, sl, #1 80355c0: 459a cmp sl, r3 80355c2: d037 beq.n 8035634 return (struct mib_node*)en; } else { /* no leaf, proceed to child */ ext_level++; 80355c4: fa5f fa8a uxtb.w sl, sl 80355c8: e030 b.n 803562c } } } else if(node_type == MIB_NODE_SC) 80355ca: 2b01 cmp r3, #1 80355cc: d001 beq.n 80355d2 } else { /* unknown/unhandled node_type */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("expand failed node_type %"U16_F" unkown\n",(u16_t)node_type)); return NULL; 80355ce: 2000 movs r0, #0 80355d0: e047 b.n 8035662 { mib_scalar_node *sn; /* scalar node */ sn = (mib_scalar_node *)node; if (ident_len > 0) 80355d2: b936 cbnz r6, 80355e2 climb_tree = 1; } else { /* ident_len == 0, complete object identifier */ oidret->id[oidret->len] = 0; 80355d4: 782b ldrb r3, [r5, #0] 80355d6: eb05 0283 add.w r2, r5, r3, lsl #2 (oidret->len)++; 80355da: 3301 adds r3, #1 climb_tree = 1; } else { /* ident_len == 0, complete object identifier */ oidret->id[oidret->len] = 0; 80355dc: 6056 str r6, [r2, #4] (oidret->len)++; 80355de: 702b strb r3, [r5, #0] 80355e0: e028 b.n 8035634 80355e2: 4921 ldr r1, [pc, #132] ; (8035668 ) struct nse child; /* find right child ptr */ child.r_ptr = NULL; child.r_id = 0; child.r_nl = 0; 80355e4: f04f 0a00 mov.w sl, #0 80355e8: 780b ldrb r3, [r1, #0] pop_node(struct nse* node) { if (node_stack_cnt > 0) { node_stack_cnt--; *node = node_stack[node_stack_cnt]; 80355ea: 4920 ldr r1, [pc, #128] ; (803566c ) { struct nse child; /* find right child ptr */ child.r_ptr = NULL; child.r_id = 0; 80355ec: 4652 mov r2, sl if (climb_tree) { struct nse child; /* find right child ptr */ child.r_ptr = NULL; 80355ee: 4654 mov r4, sl pop_node(struct nse* node) { if (node_stack_cnt > 0) { node_stack_cnt--; *node = node_stack[node_stack_cnt]; 80355f0: 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)) 80355f2: e00b b.n 803560c static void pop_node(struct nse* node) { if (node_stack_cnt > 0) { node_stack_cnt--; 80355f4: 3b01 subs r3, #1 80355f6: b2db uxtb r3, r3 *node = node_stack[node_stack_cnt]; 80355f8: fb06 f203 mul.w r2, r6, r3 80355fc: 1888 adds r0, r1, r2 80355fe: 588c ldr r4, [r1, r2] 8035600: f890 a008 ldrb.w sl, [r0, #8] 8035604: 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)--; 8035606: 7828 ldrb r0, [r5, #0] 8035608: 3801 subs r0, #1 803560a: 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)) 803560c: b91b cbnz r3, 8035616 803560e: 4f16 ldr r7, [pc, #88] ; (8035668 ) 8035610: 703b strb r3, [r7, #0] { pop_node(&child); /* trim returned oid */ (oidret->len)--; } if (child.r_ptr != NULL) 8035612: b924 cbnz r4, 803561e 8035614: e7db b.n 80355ce /* 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)) 8035616: 2c00 cmp r4, #0 8035618: d0ec beq.n 80355f4 803561a: 4913 ldr r1, [pc, #76] ; (8035668 ) 803561c: 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; 803561e: 782b ldrb r3, [r5, #0] 8035620: eb05 0183 add.w r1, r5, r3, lsl #2 oidret->len++; 8035624: 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; 8035626: 604a str r2, [r1, #4] oidret->len++; 8035628: 702b strb r3, [r5, #0] (oidret->len)--; } if (child.r_ptr != NULL) { /* incoming ident is useless beyond this point */ ident_len = 0; 803562a: 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) 803562c: 2c00 cmp r4, #0 803562e: f47f ae60 bne.w 80352f2 8035632: e7cc b.n 80355ce 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) 8035634: 4620 mov r0, r4 8035636: e014 b.n 8035662 jn = jn->next; } if (jn != NULL) { cur_node.r_ptr = jn->nptr; cur_node.r_id = jn->objid; 8035638: 68a3 ldr r3, [r4, #8] { jn = jn->next; } if (jn != NULL) { cur_node.r_ptr = jn->nptr; 803563a: f8cd 901c str.w r9, [sp, #28] cur_node.r_id = jn->objid; 803563e: 9308 str r3, [sp, #32] cur_node.r_nl = 0; 8035640: f88d 0024 strb.w r0, [sp, #36] ; 0x24 8035644: e71e b.n 8035484 } else { cur_node.r_ptr = NULL; 8035646: 9407 str r4, [sp, #28] 8035648: e71c b.n 8035484 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; 803564a: 782b ldrb r3, [r5, #0] 803564c: 68ba ldr r2, [r7, #8] 803564e: eb05 0183 add.w r1, r5, r3, lsl #2 (oidret->len)++; 8035652: 3301 adds r3, #1 8035654: 702b strb r3, [r5, #0] if (jn->nptr == NULL) 8035656: 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; 8035658: 604a str r2, [r1, #4] (oidret->len)++; if (jn->nptr == NULL) 803565a: 2b00 cmp r3, #0 803565c: d0ea beq.n 8035634 (oidret->len)--; } if (child.r_ptr != NULL) { /* incoming ident is useless beyond this point */ ident_len = 0; 803565e: 461c mov r4, r3 8035660: e7e4 b.n 803562c } } /* done, found nothing */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("expand failed node==%p\n",(void*)node)); return NULL; } 8035662: b00b add sp, #44 ; 0x2c 8035664: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8035668: 2000c578 .word 0x2000c578 803566c: 2000c57c .word 0x2000c57c 08035670 : * @return 1 if it matches, 0 otherwise */ u8_t snmp_iso_prefix_tst(u8_t ident_len, s32_t *ident) { if ((ident_len > 3) && 8035670: 2803 cmp r0, #3 8035672: d90d bls.n 8035690 8035674: 680b ldr r3, [r1, #0] 8035676: 2b01 cmp r3, #1 8035678: d10a bne.n 8035690 (ident[0] == 1) && (ident[1] == 3) && 803567a: 684b ldr r3, [r1, #4] 803567c: 2b03 cmp r3, #3 803567e: d107 bne.n 8035690 8035680: 688b ldr r3, [r1, #8] 8035682: 2b06 cmp r3, #6 8035684: d104 bne.n 8035690 (ident[2] == 6) && (ident[3] == 1)) 8035686: 68c8 ldr r0, [r1, #12] { return 1; 8035688: 1e43 subs r3, r0, #1 803568a: 4258 negs r0, r3 803568c: 4158 adcs r0, r3 803568e: 4770 bx lr } else { return 0; 8035690: 2000 movs r0, #0 } } 8035692: 4770 bx lr 08035694 : 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))) 8035694: 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) { 8035696: 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]; 803569a: 1d15 adds r5, r2, #4 ident_len = ((ident_len < 4)?ident_len:4); 803569c: 2804 cmp r0, #4 803569e: bf34 ite cc 80356a0: 4680 movcc r8, r0 80356a2: f04f 0804 movcs.w r8, #4 { const s32_t *prefix_ptr; s32_t *ret_ptr; u8_t i; i = 0; 80356a6: 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) 80356a8: 4f10 ldr r7, [pc, #64] ; (80356ec ) 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))) 80356aa: e003 b.n 80356b4 { *ret_ptr++ = *prefix_ptr++; ident++; i++; 80356ac: 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++; 80356ae: 50ee str r6, [r5, r3] ident++; i++; 80356b0: b2e4 uxtb r4, r4 80356b2: 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))) 80356b4: 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) 80356b6: eb05 0c03 add.w ip, r5, r3 80356ba: 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))) 80356be: d101 bne.n 80356c4 80356c0: 2300 movs r3, #0 80356c2: e00c b.n 80356de 80356c4: 59de ldr r6, [r3, r7] 80356c6: 58c8 ldr r0, [r1, r3] 80356c8: 42b0 cmp r0, r6 80356ca: ddef ble.n 80356ac return 1; } else { /* i != ident_len */ return 0; 80356cc: 2000 movs r0, #0 80356ce: 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++; 80356d2: 58f1 ldr r1, [r6, r3] i++; 80356d4: 3401 adds r4, #1 if (i == ident_len) { /* match, complete missing bits */ while (i < 4) { *ret_ptr++ = *prefix_ptr++; 80356d6: f84c 1003 str.w r1, [ip, r3] i++; 80356da: b2e4 uxtb r4, r4 80356dc: 3304 adds r3, #4 i++; } if (i == ident_len) { /* match, complete missing bits */ while (i < 4) 80356de: 2c03 cmp r4, #3 80356e0: d9f7 bls.n 80356d2 { *ret_ptr++ = *prefix_ptr++; i++; } oidret->len = i; 80356e2: 7014 strb r4, [r2, #0] return 1; 80356e4: 2001 movs r0, #1 else { /* i != ident_len */ return 0; } } 80356e6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80356ea: bf00 nop 80356ec: 0804591c .word 0x0804591c 080356f0 : * Starts SNMP Agent. * Allocates UDP pcb and binds it to IP_ADDR_ANY port 161. */ void snmp_init(void) { 80356f0: b510 push {r4, lr} struct snmp_msg_pstat *msg_ps; u8_t i; snmp1_pcb = udp_new(); 80356f2: f7fd fa15 bl 8032b20 80356f6: 4c0b ldr r4, [pc, #44] ; (8035724 ) 80356f8: 6020 str r0, [r4, #0] if (snmp1_pcb != NULL) 80356fa: b140 cbz r0, 803570e { udp_recv(snmp1_pcb, snmp_recv, (void *)SNMP_IN_PORT); 80356fc: 490a ldr r1, [pc, #40] ; (8035728 ) 80356fe: 22a1 movs r2, #161 ; 0xa1 8035700: f7fd f9ee bl 8032ae0 udp_bind(snmp1_pcb, IP_ADDR_ANY, SNMP_IN_PORT); 8035704: 6820 ldr r0, [r4, #0] 8035706: 4909 ldr r1, [pc, #36] ; (803572c ) 8035708: 22a1 movs r2, #161 ; 0xa1 803570a: f7fd f8f1 bl 80328f0 } msg_ps = &msg_input_list[0]; for (i=0; istate = SNMP_MSG_EMPTY; 803570e: 4b08 ldr r3, [pc, #32] ; (8035730 ) 8035710: 2200 movs r2, #0 8035712: f883 205a strb.w r2, [r3, #90] ; 0x5a msg_ps->error_index = 0; 8035716: 615a str r2, [r3, #20] msg_ps->error_status = SNMP_ES_NOERROR; 8035718: 611a str r2, [r3, #16] msg_ps++; } trap_msg.pcb = snmp1_pcb; 803571a: 4b02 ldr r3, [pc, #8] ; (8035724 ) 803571c: 681a ldr r2, [r3, #0] 803571e: 4b05 ldr r3, [pc, #20] ; (8035734 ) 8035720: 601a str r2, [r3, #0] 8035722: bd10 pop {r4, pc} 8035724: 2000f6ec .word 0x2000f6ec 8035728: 0803629d .word 0x0803629d 803572c: 08045008 .word 0x08045008 8035730: 2000f6f0 .word 0x2000f6f0 8035734: 2000f828 .word 0x2000f828 08035738 : return ERR_OK; } struct snmp_varbind* snmp_varbind_alloc(struct snmp_obj_id *oid, u8_t type, u8_t len) { 8035738: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 803573c: 4680 mov r8, r0 struct snmp_varbind *vb; vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 803573e: 200c movs r0, #12 return ERR_OK; } struct snmp_varbind* snmp_varbind_alloc(struct snmp_obj_id *oid, u8_t type, u8_t len) { 8035740: 4689 mov r9, r1 8035742: 4617 mov r7, r2 struct snmp_varbind *vb; vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 8035744: f7fa fa42 bl 802fbcc if (vb != NULL) 8035748: 4604 mov r4, r0 803574a: 2800 cmp r0, #0 803574c: d032 beq.n 80357b4 { u8_t i; vb->next = NULL; 803574e: 2300 movs r3, #0 8035750: 6003 str r3, [r0, #0] vb->prev = NULL; 8035752: 6043 str r3, [r0, #4] i = oid->len; 8035754: f898 5000 ldrb.w r5, [r8] vb->ident_len = i; 8035758: 7205 strb r5, [r0, #8] if (i > 0) 803575a: b1ad cbz r5, 8035788 { 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); 803575c: 200d movs r0, #13 803575e: f7fa fa35 bl 802fbcc 8035762: 4606 mov r6, r0 8035764: 60e0 str r0, [r4, #12] if (vb->ident == NULL) 8035766: b928 cbnz r0, 8035774 { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_varbind_alloc: couldn't allocate ident value space\n")); memp_free(MEMP_SNMP_VARBIND, vb); 8035768: 4621 mov r1, r4 803576a: 200c movs r0, #12 803576c: f7fa fa44 bl 802fbf8 return NULL; 8035770: 4634 mov r4, r6 8035772: e01f b.n 80357b4 } while(i > 0) { i--; 8035774: 3d01 subs r5, #1 8035776: b2ed uxtb r5, r5 vb->ident[i] = oid->id[i]; 8035778: eb08 0385 add.w r3, r8, r5, lsl #2 803577c: 685b ldr r3, [r3, #4] 803577e: 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) 8035782: 2d00 cmp r5, #0 8035784: d1f6 bne.n 8035774 8035786: e000 b.n 803578a } } else { /* i == 0, pass zero length object identifier */ vb->ident = NULL; 8035788: 60c5 str r5, [r0, #12] } vb->value_type = type; 803578a: f884 9010 strb.w r9, [r4, #16] vb->value_len = len; 803578e: 7467 strb r7, [r4, #17] if (len > 0) 8035790: b17f cbz r7, 80357b2 { 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); 8035792: 200d movs r0, #13 8035794: f7fa fa1a bl 802fbcc 8035798: 6160 str r0, [r4, #20] if (vb->value == NULL) 803579a: b958 cbnz r0, 80357b4 { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_varbind_alloc: couldn't allocate value space\n")); if (vb->ident != NULL) 803579c: 68e1 ldr r1, [r4, #12] 803579e: b111 cbz r1, 80357a6 { memp_free(MEMP_SNMP_VALUE, vb->ident); 80357a0: 200d movs r0, #13 80357a2: f7fa fa29 bl 802fbf8 } memp_free(MEMP_SNMP_VARBIND, vb); 80357a6: 4621 mov r1, r4 80357a8: 200c movs r0, #12 80357aa: f7fa fa25 bl 802fbf8 return NULL; 80357ae: 2400 movs r4, #0 80357b0: e000 b.n 80357b4 } } else { /* ASN1_NUL type, or zero length ASN1_OC_STR */ vb->value = NULL; 80357b2: 6167 str r7, [r4, #20] else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_varbind_alloc: couldn't allocate varbind space\n")); } return vb; } 80357b4: 4620 mov r0, r4 80357b6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 080357ba : void snmp_varbind_free(struct snmp_varbind *vb) { if (vb->value != NULL ) 80357ba: 6941 ldr r1, [r0, #20] return vb; } void snmp_varbind_free(struct snmp_varbind *vb) { 80357bc: b510 push {r4, lr} 80357be: 4604 mov r4, r0 if (vb->value != NULL ) 80357c0: b111 cbz r1, 80357c8 { memp_free(MEMP_SNMP_VALUE, vb->value); 80357c2: 200d movs r0, #13 80357c4: f7fa fa18 bl 802fbf8 } if (vb->ident != NULL ) 80357c8: 68e1 ldr r1, [r4, #12] 80357ca: b111 cbz r1, 80357d2 { memp_free(MEMP_SNMP_VALUE, vb->ident); 80357cc: 200d movs r0, #13 80357ce: f7fa fa13 bl 802fbf8 } memp_free(MEMP_SNMP_VARBIND, vb); 80357d2: 200c movs r0, #12 80357d4: 4621 mov r1, r4 } 80357d6: e8bd 4010 ldmia.w sp!, {r4, lr} } if (vb->ident != NULL ) { memp_free(MEMP_SNMP_VALUE, vb->ident); } memp_free(MEMP_SNMP_VARBIND, vb); 80357da: f7fa ba0d b.w 802fbf8 080357de : } void snmp_varbind_list_free(struct snmp_varbind_root *root) { 80357de: b538 push {r3, r4, r5, lr} 80357e0: 4604 mov r4, r0 struct snmp_varbind *vb, *prev; vb = root->tail; 80357e2: 6840 ldr r0, [r0, #4] while ( vb != NULL ) 80357e4: e003 b.n 80357ee { prev = vb->prev; 80357e6: 6845 ldr r5, [r0, #4] snmp_varbind_free(vb); 80357e8: f7ff ffe7 bl 80357ba vb = prev; 80357ec: 4628 mov r0, r5 snmp_varbind_list_free(struct snmp_varbind_root *root) { struct snmp_varbind *vb, *prev; vb = root->tail; while ( vb != NULL ) 80357ee: 2800 cmp r0, #0 80357f0: d1f9 bne.n 80357e6 { prev = vb->prev; snmp_varbind_free(vb); vb = prev; } root->count = 0; 80357f2: 7220 strb r0, [r4, #8] root->head = NULL; 80357f4: 6020 str r0, [r4, #0] root->tail = NULL; 80357f6: 6060 str r0, [r4, #4] 80357f8: bd38 pop {r3, r4, r5, pc} 080357fa : //snmp_coldstart_trap(); } static void snmp_error_response(struct snmp_msg_pstat *msg_ps, u8_t error) { 80357fa: b570 push {r4, r5, r6, lr} 80357fc: 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++) { 80357fe: 2200 movs r2, #0 //snmp_coldstart_trap(); } static void snmp_error_response(struct snmp_msg_pstat *msg_ps, u8_t error) { 8035800: 460e mov r6, r1 /* move names back from outvb to invb */ int v; struct snmp_varbind *vbi = msg_ps->invb.head; 8035802: f8d0 0100 ldr.w r0, [r0, #256] ; 0x100 struct snmp_varbind *vbo = msg_ps->outvb.head; 8035806: f8d4 310c ldr.w r3, [r4, #268] ; 0x10c for (v=0; vvb_idx; v++) { vbi->ident_len = vbo->ident_len; vbo->ident_len = 0; 803580a: 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++) { 803580c: e008 b.n 8035820 vbi->ident_len = vbo->ident_len; 803580e: 7a1d ldrb r5, [r3, #8] 8035810: 7205 strb r5, [r0, #8] vbo->ident_len = 0; vbi->ident = vbo->ident; 8035812: 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; 8035814: 7219 strb r1, [r3, #8] vbi->ident = vbo->ident; 8035816: 60c5 str r5, [r0, #12] vbo->ident = NULL; 8035818: 60d9 str r1, [r3, #12] vbi = vbi->next; 803581a: 6800 ldr r0, [r0, #0] vbo = vbo->next; 803581c: 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++) { 803581e: 3201 adds r2, #1 8035820: f894 50f8 ldrb.w r5, [r4, #248] ; 0xf8 8035824: 42aa cmp r2, r5 8035826: dbf2 blt.n 803580e vbo->ident = NULL; vbi = vbi->next; vbo = vbo->next; } /* free outvb */ snmp_varbind_list_free(&msg_ps->outvb); 8035828: f504 7586 add.w r5, r4, #268 ; 0x10c 803582c: 4628 mov r0, r5 803582e: f7ff ffd6 bl 80357de /* we send invb back */ msg_ps->outvb = msg_ps->invb; 8035832: f504 7380 add.w r3, r4, #256 ; 0x100 8035836: e893 0007 ldmia.w r3, {r0, r1, r2} msg_ps->invb.head = NULL; 803583a: 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; 803583c: 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; 803583e: f8c4 3100 str.w r3, [r4, #256] ; 0x100 msg_ps->invb.tail = NULL; 8035842: f8c4 3104 str.w r3, [r4, #260] ; 0x104 msg_ps->invb.count = 0; 8035846: 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; 803584a: bf18 it ne 803584c: 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; 8035850: 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; 8035852: bf18 it ne 8035854: 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; 8035856: 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; 803585a: 6163 str r3, [r4, #20] snmp_send_response(msg_ps); 803585c: 4620 mov r0, r4 803585e: f001 f879 bl 8036954 snmp_varbind_list_free(&msg_ps->outvb); 8035862: 4628 mov r0, r5 8035864: f7ff ffbb bl 80357de msg_ps->state = SNMP_MSG_EMPTY; 8035868: 2300 movs r3, #0 803586a: f884 305a strb.w r3, [r4, #90] ; 0x5a 803586e: bd70 pop {r4, r5, r6, pc} 08035870 : } static void snmp_ok_response(struct snmp_msg_pstat *msg_ps) { 8035870: b510 push {r4, lr} 8035872: 4604 mov r4, r0 err_t err_ret; err_ret = snmp_send_response(msg_ps); 8035874: f001 f86e bl 8036954 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); 8035878: f504 7080 add.w r0, r4, #256 ; 0x100 803587c: f7ff ffaf bl 80357de snmp_varbind_list_free(&msg_ps->outvb); 8035880: f504 7086 add.w r0, r4, #268 ; 0x10c 8035884: f7ff ffab bl 80357de msg_ps->state = SNMP_MSG_EMPTY; 8035888: 2300 movs r3, #0 803588a: f884 305a strb.w r3, [r4, #90] ; 0x5a 803588e: bd10 pop {r4, pc} 08035890 : } void snmp_varbind_tail_add(struct snmp_varbind_root *root, struct snmp_varbind *vb) { if (root->count == 0) 8035890: 7a03 ldrb r3, [r0, #8] 8035892: b90b cbnz r3, 8035898 { /* add first varbind to list */ root->head = vb; 8035894: 6001 str r1, [r0, #0] 8035896: e002 b.n 803589e root->tail = vb; } else { /* add nth varbind to list tail */ root->tail->next = vb; 8035898: 6843 ldr r3, [r0, #4] 803589a: 6019 str r1, [r3, #0] vb->prev = root->tail; 803589c: 604b str r3, [r1, #4] root->tail = vb; } root->count += 1; 803589e: 7a03 ldrb r3, [r0, #8] else { /* add nth varbind to list tail */ root->tail->next = vb; vb->prev = root->tail; root->tail = vb; 80358a0: 6041 str r1, [r0, #4] } root->count += 1; 80358a2: 3301 adds r3, #1 80358a4: 7203 strb r3, [r0, #8] 80358a6: 4770 bx lr 080358a8 : * * @param request_id identifies requests from 0 to (SNMP_CONCURRENT_REQUESTS-1) */ void snmp_msg_event(u8_t request_id) { 80358a8: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} struct snmp_msg_pstat *msg_ps; if (request_id < SNMP_CONCURRENT_REQUESTS) 80358ac: 4605 mov r5, r0 * * @param request_id identifies requests from 0 to (SNMP_CONCURRENT_REQUESTS-1) */ void snmp_msg_event(u8_t request_id) { 80358ae: b0a7 sub sp, #156 ; 0x9c struct snmp_msg_pstat *msg_ps; if (request_id < SNMP_CONCURRENT_REQUESTS) 80358b0: 2800 cmp r0, #0 80358b2: f040 8390 bne.w 8035fd6 { msg_ps = &msg_input_list[request_id]; if (msg_ps->rt == SNMP_ASN1_PDU_GET_NEXT_REQ) 80358b6: 4cb2 ldr r4, [pc, #712] ; (8035b80 ) 80358b8: 7aa6 ldrb r6, [r4, #10] 80358ba: 2e01 cmp r6, #1 80358bc: f040 80d4 bne.w 8035a68 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) 80358c0: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 80358c4: 2b07 cmp r3, #7 80358c6: d125 bne.n 8035914 /* 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); 80358c8: 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; 80358cc: 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); 80358d0: eb04 0282 add.w r2, r4, r2, lsl #2 80358d4: 4631 mov r1, r6 80358d6: 3274 adds r2, #116 ; 0x74 80358d8: f104 0368 add.w r3, r4, #104 ; 0x68 80358dc: f8d8 7038 ldr.w r7, [r8, #56] ; 0x38 80358e0: 47b8 blx r7 if (msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) 80358e2: f894 0068 ldrb.w r0, [r4, #104] ; 0x68 80358e6: b148 cbz r0, 80358fc { msg_ps->state = SNMP_MSG_EXTERNAL_GET_VALUE; 80358e8: 2308 movs r3, #8 80358ea: f884 305a strb.w r3, [r4, #90] ; 0x5a en->get_value_q(request_id, &msg_ps->ext_object_def); 80358ee: f8d8 302c ldr.w r3, [r8, #44] ; 0x2c 80358f2: 4628 mov r0, r5 80358f4: f104 0168 add.w r1, r4, #104 ; 0x68 80358f8: 4798 blx r3 80358fa: e0a6 b.n 8035a4a } else { en->get_object_def_pc(request_id, 1, &msg_ps->ext_oid.id[msg_ps->ext_oid.len - 1]); 80358fc: f894 2074 ldrb.w r2, [r4, #116] ; 0x74 8035900: f8d8 3048 ldr.w r3, [r8, #72] ; 0x48 8035904: eb04 0282 add.w r2, r4, r2, lsl #2 8035908: 4631 mov r1, r6 803590a: 3274 adds r2, #116 ; 0x74 803590c: 4798 blx r3 /* search failed, object id points to unknown object (nosuchname) */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 803590e: 4620 mov r0, r4 8035910: 2102 movs r1, #2 8035912: e02a b.n 803596a } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_VALUE) 8035914: 2b08 cmp r3, #8 8035916: f040 8098 bne.w 8035a4a /* 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, 803591a: f104 0074 add.w r0, r4, #116 ; 0x74 803591e: f894 106a ldrb.w r1, [r4, #106] ; 0x6a 8035922: 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; 8035926: 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, 803592a: f7ff ff05 bl 8035738 msg_ps->ext_object_def.asn_type, (u8_t)msg_ps->ext_object_def.v_len); if (vb != NULL) 803592e: 4607 mov r7, r0 8035930: b1a0 cbz r0, 803595c { en->get_value_a(request_id, &msg_ps->ext_object_def, vb->value_len, vb->value); 8035932: 697b ldr r3, [r7, #20] 8035934: f8d8 c03c ldr.w ip, [r8, #60] ; 0x3c 8035938: 7c7a ldrb r2, [r7, #17] 803593a: 4628 mov r0, r5 803593c: f104 0168 add.w r1, r4, #104 ; 0x68 8035940: 47e0 blx ip snmp_varbind_tail_add(&msg_ps->outvb, vb); 8035942: f504 7086 add.w r0, r4, #268 ; 0x10c 8035946: 4639 mov r1, r7 8035948: f7ff ffa2 bl 8035890 msg_ps->state = SNMP_MSG_SEARCH_OBJ; msg_ps->vb_idx += 1; 803594c: 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; 8035950: f884 605a strb.w r6, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8035954: 3301 adds r3, #1 8035956: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 803595a: e076 b.n 8035a4a } else { en->get_value_pc(request_id, &msg_ps->ext_object_def); 803595c: f104 0168 add.w r1, r4, #104 ; 0x68 8035960: f8d8 304c ldr.w r3, [r8, #76] ; 0x4c 8035964: 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); 8035966: 4620 mov r0, r4 8035968: 4631 mov r1, r6 803596a: f7ff ff46 bl 80357fa 803596e: e06c b.n 8035a4a (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_obj_id oid; if (msg_ps->vb_idx == 0) 8035970: b913 cbnz r3, 8035978 { msg_ps->vb_ptr = msg_ps->invb.head; 8035972: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 8035976: e002 b.n 803597e } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 8035978: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 803597c: 681b ldr r3, [r3, #0] 803597e: 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)) 8035982: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035986: aa05 add r2, sp, #20 8035988: 7a18 ldrb r0, [r3, #8] 803598a: 68d9 ldr r1, [r3, #12] 803598c: f7ff fe82 bl 8035694 8035990: 2800 cmp r0, #0 8035992: f000 82ff beq.w 8035f94 { if (msg_ps->vb_ptr->ident_len > 3) 8035996: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 803599a: 7a19 ldrb r1, [r3, #8] 803599c: 2903 cmp r1, #3 803599e: d905 bls.n 80359ac { /* can offset ident_len and ident */ mn = snmp_expand_tree((struct mib_node*)&internet, 80359a0: 68da ldr r2, [r3, #12] 80359a2: 4878 ldr r0, [pc, #480] ; (8035b84 ) 80359a4: 3904 subs r1, #4 80359a6: b2c9 uxtb r1, r1 80359a8: 3210 adds r2, #16 80359aa: e002 b.n 80359b2 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); 80359ac: 2100 movs r1, #0 80359ae: 4875 ldr r0, [pc, #468] ; (8035b84 ) 80359b0: 460a mov r2, r1 80359b2: ab05 add r3, sp, #20 80359b4: f7ff fc8e bl 80352d4 80359b8: 4605 mov r5, r0 } else { mn = NULL; } if (mn != NULL) 80359ba: 2800 cmp r0, #0 80359bc: f000 82ea beq.w 8035f94 { if (mn->node_type == MIB_NODE_EX) 80359c0: 7c03 ldrb r3, [r0, #16] 80359c2: 2b05 cmp r3, #5 80359c4: d113 bne.n 80359ee { /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; 80359c6: 2307 movs r3, #7 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; 80359c8: 65e0 str r0, [r4, #92] ; 0x5c msg_ps->ext_oid = oid; 80359ca: a905 add r1, sp, #20 80359cc: 2284 movs r2, #132 ; 0x84 80359ce: 486e ldr r0, [pc, #440] ; (8035b88 ) 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; 80359d0: 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; 80359d4: f7eb ffda bl 802198c en->get_object_def_q(en->addr_inf, request_id, 1, &oid.id[oid.len - 1]); 80359d8: f89d 3014 ldrb.w r3, [sp, #20] 80359dc: 6aae ldr r6, [r5, #40] ; 0x28 80359de: 6968 ldr r0, [r5, #20] 80359e0: ad05 add r5, sp, #20 80359e2: 2100 movs r1, #0 80359e4: 2201 movs r2, #1 80359e6: eb05 0383 add.w r3, r5, r3, lsl #2 80359ea: 47b0 blx r6 80359ec: e02e b.n 8035a4c { /* internal object */ struct obj_def object_def; struct snmp_varbind *vb; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; 80359ee: 2302 movs r3, #2 mn->get_object_def(1, &oid.id[oid.len - 1], &object_def); 80359f0: 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; 80359f4: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_object_def(1, &oid.id[oid.len - 1], &object_def); 80359f8: af05 add r7, sp, #20 80359fa: 6803 ldr r3, [r0, #0] 80359fc: eb07 0181 add.w r1, r7, r1, lsl #2 8035a00: 2001 movs r0, #1 8035a02: aa02 add r2, sp, #8 8035a04: 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); 8035a06: a805 add r0, sp, #20 8035a08: f89d 100a ldrb.w r1, [sp, #10] 8035a0c: f89d 200c ldrb.w r2, [sp, #12] 8035a10: f7ff fe92 bl 8035738 if (vb != NULL) 8035a14: 4606 mov r6, r0 8035a16: b1a8 cbz r0, 8035a44 { msg_ps->state = SNMP_MSG_INTERNAL_GET_VALUE; 8035a18: 2303 movs r3, #3 8035a1a: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_value(&object_def, object_def.v_len, vb->value); 8035a1e: 686b ldr r3, [r5, #4] 8035a20: f8bd 100c ldrh.w r1, [sp, #12] 8035a24: 6972 ldr r2, [r6, #20] 8035a26: a802 add r0, sp, #8 8035a28: 4798 blx r3 snmp_varbind_tail_add(&msg_ps->outvb, vb); 8035a2a: 4858 ldr r0, [pc, #352] ; (8035b8c ) 8035a2c: 4631 mov r1, r6 8035a2e: f7ff ff2f bl 8035890 msg_ps->state = SNMP_MSG_SEARCH_OBJ; 8035a32: 2301 movs r3, #1 8035a34: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8035a38: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035a3c: 3301 adds r3, #1 8035a3e: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8035a42: e003 b.n 8035a4c } else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_recv couldn't allocate outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); 8035a44: 484e ldr r0, [pc, #312] ; (8035b80 ) 8035a46: 2101 movs r1, #1 8035a48: e2a6 b.n 8035f98 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) && 8035a4a: 4c4d ldr r4, [pc, #308] ; (8035b80 ) 8035a4c: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 8035a50: 2b01 cmp r3, #1 8035a52: f040 82c0 bne.w 8035fd6 (msg_ps->vb_idx < msg_ps->invb.count)) 8035a56: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035a5a: 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) && 8035a5e: 4293 cmp r3, r2 8035a60: d386 bcc.n 8035970 8035a62: e2a7 b.n 8035fb4 } } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && (msg_ps->vb_idx == msg_ps->invb.count)) { snmp_ok_response(msg_ps); 8035a64: 4846 ldr r0, [pc, #280] ; (8035b80 ) 8035a66: e292 b.n 8035f8e 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) 8035a68: 2e00 cmp r6, #0 8035a6a: f040 8126 bne.w 8035cba 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) 8035a6e: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 8035a72: 2b07 cmp r3, #7 8035a74: d122 bne.n 8035abc { struct mib_external_node *en; struct snmp_name_ptr np; /* get_object_def() answer*/ en = msg_ps->ext_mib_node; 8035a76: 6de5 ldr r5, [r4, #92] ; 0x5c np = msg_ps->ext_name_ptr; 8035a78: f894 9060 ldrb.w r9, [r4, #96] ; 0x60 8035a7c: 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); 8035a80: 6baf ldr r7, [r5, #56] ; 0x38 8035a82: f104 0368 add.w r3, r4, #104 ; 0x68 8035a86: 4649 mov r1, r9 8035a88: 4642 mov r2, r8 8035a8a: 47b8 blx r7 if ((msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) && 8035a8c: f894 3068 ldrb.w r3, [r4, #104] ; 0x68 8035a90: b163 cbz r3, 8035aac (msg_ps->ext_object_def.access & MIB_ACCESS_READ)) 8035a92: 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) && 8035a96: 07da lsls r2, r3, #31 8035a98: d508 bpl.n 8035aac (msg_ps->ext_object_def.access & MIB_ACCESS_READ)) { msg_ps->state = SNMP_MSG_EXTERNAL_GET_VALUE; 8035a9a: 2308 movs r3, #8 8035a9c: f884 305a strb.w r3, [r4, #90] ; 0x5a en->get_value_q(request_id, &msg_ps->ext_object_def); 8035aa0: 6aeb ldr r3, [r5, #44] ; 0x2c 8035aa2: 4630 mov r0, r6 8035aa4: f104 0168 add.w r1, r4, #104 ; 0x68 8035aa8: 4798 blx r3 8035aaa: e0f7 b.n 8035c9c } else { en->get_object_def_pc(request_id, np.ident_len, np.ident); 8035aac: 2000 movs r0, #0 8035aae: 4649 mov r1, r9 8035ab0: 6cab ldr r3, [r5, #72] ; 0x48 8035ab2: 4642 mov r2, r8 8035ab4: 4798 blx r3 /* search failed, object id points to unknown object (nosuchname) */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 8035ab6: 4832 ldr r0, [pc, #200] ; (8035b80 ) 8035ab8: 2102 movs r1, #2 8035aba: e059 b.n 8035b70 } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_VALUE) 8035abc: 2b08 cmp r3, #8 8035abe: f040 80ed bne.w 8035c9c /* get_value() answer */ en = msg_ps->ext_mib_node; /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 8035ac2: 200c movs r0, #12 { struct mib_external_node *en; struct snmp_varbind *vb; /* get_value() answer */ en = msg_ps->ext_mib_node; 8035ac4: f8d4 805c ldr.w r8, [r4, #92] ; 0x5c /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 8035ac8: f7fa f880 bl 802fbcc if (vb != NULL) 8035acc: 4605 mov r5, r0 8035ace: 2800 cmp r0, #0 8035ad0: d047 beq.n 8035b62 { vb->next = NULL; 8035ad2: 6006 str r6, [r0, #0] vb->prev = NULL; 8035ad4: 6046 str r6, [r0, #4] /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 8035ad6: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035ada: 68da ldr r2, [r3, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 8035adc: 7a1b ldrb r3, [r3, #8] { vb->next = NULL; vb->prev = NULL; /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 8035ade: 60c2 str r2, [r0, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 8035ae0: 7203 strb r3, [r0, #8] /* ensure this memory is refereced once only */ msg_ps->vb_ptr->ident = NULL; 8035ae2: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc msg_ps->vb_ptr->ident_len = 0; 8035ae6: 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; 8035ae8: 60de str r6, [r3, #12] msg_ps->vb_ptr->ident_len = 0; vb->value_type = msg_ps->ext_object_def.asn_type; 8035aea: f894 306a ldrb.w r3, [r4, #106] ; 0x6a 8035aee: 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; 8035af0: f894 706c ldrb.w r7, [r4, #108] ; 0x6c 8035af4: 7447 strb r7, [r0, #17] if (vb->value_len > 0) 8035af6: b1ef cbz r7, 8035b34 { 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); 8035af8: 200d movs r0, #13 8035afa: f7fa f867 bl 802fbcc 8035afe: 4603 mov r3, r0 8035b00: 6168 str r0, [r5, #20] if (vb->value != NULL) 8035b02: b138 cbz r0, 8035b14 { en->get_value_a(request_id, &msg_ps->ext_object_def, vb->value_len, vb->value); 8035b04: f8d8 703c ldr.w r7, [r8, #60] ; 0x3c 8035b08: 7c6a ldrb r2, [r5, #17] 8035b0a: 4630 mov r0, r6 8035b0c: f104 0168 add.w r1, r4, #104 ; 0x68 8035b10: 47b8 blx r7 8035b12: e018 b.n 8035b46 msg_ps->state = SNMP_MSG_SEARCH_OBJ; msg_ps->vb_idx += 1; } else { en->get_value_pc(request_id, &msg_ps->ext_object_def); 8035b14: f8d8 304c ldr.w r3, [r8, #76] ; 0x4c 8035b18: f104 0168 add.w r1, r4, #104 ; 0x68 8035b1c: 4798 blx r3 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: no variable space\n")); msg_ps->vb_ptr->ident = vb->ident; 8035b1e: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035b22: 68ea ldr r2, [r5, #12] 8035b24: 60da str r2, [r3, #12] msg_ps->vb_ptr->ident_len = vb->ident_len; 8035b26: 7a2a ldrb r2, [r5, #8] memp_free(MEMP_SNMP_VARBIND, vb); 8035b28: 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; 8035b2a: 721a strb r2, [r3, #8] memp_free(MEMP_SNMP_VARBIND, vb); 8035b2c: 4629 mov r1, r5 8035b2e: f7fa f863 bl 802fbf8 8035b32: e01b b.n 8035b6c } } else { /* vb->value_len == 0, empty value (e.g. empty string) */ en->get_value_a(request_id, &msg_ps->ext_object_def, 0, NULL); 8035b34: f8d8 603c ldr.w r6, [r8, #60] ; 0x3c 8035b38: 4638 mov r0, r7 8035b3a: f104 0168 add.w r1, r4, #104 ; 0x68 8035b3e: 463a mov r2, r7 8035b40: 463b mov r3, r7 8035b42: 47b0 blx r6 vb->value = NULL; 8035b44: 616f str r7, [r5, #20] snmp_varbind_tail_add(&msg_ps->outvb, vb); 8035b46: f504 7086 add.w r0, r4, #268 ; 0x10c 8035b4a: 4629 mov r1, r5 8035b4c: f7ff fea0 bl 8035890 /* search again (if vb_idx < msg_ps->invb.count) */ msg_ps->state = SNMP_MSG_SEARCH_OBJ; 8035b50: 2301 movs r3, #1 8035b52: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8035b56: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035b5a: 3301 adds r3, #1 8035b5c: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8035b60: e09c b.n 8035c9c } } else { en->get_value_pc(request_id, &msg_ps->ext_object_def); 8035b62: f8d8 304c ldr.w r3, [r8, #76] ; 0x4c 8035b66: f104 0168 add.w r1, r4, #104 ; 0x68 8035b6a: 4798 blx r3 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: no outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); 8035b6c: 4620 mov r0, r4 8035b6e: 2101 movs r1, #1 8035b70: f7ff fe43 bl 80357fa 8035b74: e092 b.n 8035c9c (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_name_ptr np; if (msg_ps->vb_idx == 0) 8035b76: b95b cbnz r3, 8035b90 { msg_ps->vb_ptr = msg_ps->invb.head; 8035b78: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 8035b7c: e00b b.n 8035b96 8035b7e: bf00 nop 8035b80: 2000f6f0 .word 0x2000f6f0 8035b84: 08045834 .word 0x08045834 8035b88: 2000f764 .word 0x2000f764 8035b8c: 2000f7fc .word 0x2000f7fc } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 8035b90: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035b94: 681b ldr r3, [r3, #0] 8035b96: 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)) 8035b9a: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035b9e: 7a18 ldrb r0, [r3, #8] 8035ba0: 68d9 ldr r1, [r3, #12] 8035ba2: f7ff fd65 bl 8035670 8035ba6: 2800 cmp r0, #0 8035ba8: d073 beq.n 8035c92 { mn = snmp_search_tree((struct mib_node*)&internet, msg_ps->vb_ptr->ident_len - 4, 8035baa: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035bae: 48a6 ldr r0, [pc, #664] ; (8035e48 ) 8035bb0: 7a19 ldrb r1, [r3, #8] 8035bb2: 68da ldr r2, [r3, #12] 8035bb4: 3904 subs r1, #4 8035bb6: b2c9 uxtb r1, r1 8035bb8: 3210 adds r2, #16 8035bba: 466b mov r3, sp 8035bbc: f7ff fb0a bl 80351d4 msg_ps->vb_ptr->ident + 4, &np); if (mn != NULL) 8035bc0: 4606 mov r6, r0 8035bc2: 2800 cmp r0, #0 8035bc4: d065 beq.n 8035c92 { if (mn->node_type == MIB_NODE_EX) 8035bc6: 7c03 ldrb r3, [r0, #16] 8035bc8: 2b05 cmp r3, #5 8035bca: d110 bne.n 8035bee /* 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; 8035bcc: 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; 8035bce: 2307 movs r3, #7 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 8035bd0: 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; 8035bd4: 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; 8035bd8: 4b9c ldr r3, [pc, #624] ; (8035e4c ) en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 8035bda: 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; 8035bde: e883 0003 stmia.w r3, {r0, r1} en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 8035be2: 2100 movs r1, #0 8035be4: 6ab5 ldr r5, [r6, #40] ; 0x28 8035be6: 6970 ldr r0, [r6, #20] 8035be8: 9b01 ldr r3, [sp, #4] 8035bea: 47a8 blx r5 8035bec: e058 b.n 8035ca0 else { /* internal object */ struct obj_def object_def; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; 8035bee: 2302 movs r3, #2 8035bf0: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_object_def(np.ident_len, np.ident, &object_def); 8035bf4: 6803 ldr r3, [r0, #0] 8035bf6: 9901 ldr r1, [sp, #4] 8035bf8: f89d 0000 ldrb.w r0, [sp] 8035bfc: aa02 add r2, sp, #8 8035bfe: 4798 blx r3 if ((object_def.instance != MIB_OBJECT_NONE) && 8035c00: f89d 3008 ldrb.w r3, [sp, #8] 8035c04: 2b00 cmp r3, #0 8035c06: d044 beq.n 8035c92 (object_def.access & MIB_ACCESS_READ)) 8035c08: 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) && 8035c0c: 07db lsls r3, r3, #31 8035c0e: f100 81c6 bmi.w 8035f9e 8035c12: e03e b.n 8035c92 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; 8035c14: 2200 movs r2, #0 8035c16: 602a str r2, [r5, #0] vb->prev = NULL; 8035c18: 606a str r2, [r5, #4] /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 8035c1a: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035c1e: 68d9 ldr r1, [r3, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 8035c20: 7a1b ldrb r3, [r3, #8] { vb->next = NULL; vb->prev = NULL; /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 8035c22: 60e9 str r1, [r5, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 8035c24: 722b strb r3, [r5, #8] /* ensure this memory is refereced once only */ msg_ps->vb_ptr->ident = NULL; 8035c26: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc msg_ps->vb_ptr->ident_len = 0; 8035c2a: 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; 8035c2c: 60da str r2, [r3, #12] msg_ps->vb_ptr->ident_len = 0; vb->value_type = object_def.asn_type; 8035c2e: f89d 300a ldrb.w r3, [sp, #10] 8035c32: 742b strb r3, [r5, #16] LWIP_ASSERT("invalid length", object_def.v_len <= 0xff); vb->value_len = (u8_t)object_def.v_len; 8035c34: f89d 300c ldrb.w r3, [sp, #12] 8035c38: 746b strb r3, [r5, #17] if (vb->value_len > 0) 8035c3a: b1bb cbz r3, 8035c6c { 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); 8035c3c: 200d movs r0, #13 8035c3e: f7f9 ffc5 bl 802fbcc 8035c42: 4602 mov r2, r0 8035c44: 6168 str r0, [r5, #20] if (vb->value != NULL) 8035c46: b120 cbz r0, 8035c52 { mn->get_value(&object_def, vb->value_len, vb->value); 8035c48: 6877 ldr r7, [r6, #4] 8035c4a: 7c69 ldrb r1, [r5, #17] 8035c4c: a802 add r0, sp, #8 8035c4e: 47b8 blx r7 8035c50: e00d b.n 8035c6e 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; 8035c52: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035c56: 68e9 ldr r1, [r5, #12] 8035c58: 60d9 str r1, [r3, #12] msg_ps->vb_ptr->ident_len = vb->ident_len; 8035c5a: 7a29 ldrb r1, [r5, #8] vb->ident = NULL; 8035c5c: 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; 8035c5e: 7219 strb r1, [r3, #8] vb->ident = NULL; vb->ident_len = 0; 8035c60: 7228 strb r0, [r5, #8] memp_free(MEMP_SNMP_VARBIND, vb); 8035c62: 4629 mov r1, r5 8035c64: 200c movs r0, #12 8035c66: f7f9 ffc7 bl 802fbf8 8035c6a: e00d b.n 8035c88 } } else { /* vb->value_len == 0, empty value (e.g. empty string) */ vb->value = NULL; 8035c6c: 616b str r3, [r5, #20] snmp_varbind_tail_add(&msg_ps->outvb, vb); 8035c6e: 4878 ldr r0, [pc, #480] ; (8035e50 ) 8035c70: 4629 mov r1, r5 8035c72: f7ff fe0d bl 8035890 msg_ps->state = SNMP_MSG_SEARCH_OBJ; 8035c76: 2301 movs r3, #1 8035c78: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8035c7c: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035c80: 3301 adds r3, #1 8035c82: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8035c86: e003 b.n 8035c90 } } else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: couldn't allocate outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); 8035c88: 4872 ldr r0, [pc, #456] ; (8035e54 ) 8035c8a: 2101 movs r1, #1 8035c8c: f7ff fdb5 bl 80357fa } else { mn = NULL; } if (mn == NULL) 8035c90: b936 cbnz r6, 8035ca0 { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 8035c92: 4870 ldr r0, [pc, #448] ; (8035e54 ) 8035c94: 2102 movs r1, #2 8035c96: f7ff fdb0 bl 80357fa 8035c9a: e001 b.n 8035ca0 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) && 8035c9c: 4c6d ldr r4, [pc, #436] ; (8035e54 ) 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, 8035c9e: 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) && 8035ca0: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 8035ca4: 2b01 cmp r3, #1 8035ca6: f040 8196 bne.w 8035fd6 (msg_ps->vb_idx < msg_ps->invb.count)) 8035caa: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035cae: 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) && 8035cb2: 4293 cmp r3, r2 8035cb4: f4ff af5f bcc.w 8035b76 8035cb8: e17c b.n 8035fb4 } 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) 8035cba: 2e03 cmp r6, #3 8035cbc: f040 818b bne.w 8035fd6 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) 8035cc0: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 8035cc4: 2b07 cmp r3, #7 8035cc6: d11b bne.n 8035d00 { struct mib_external_node *en; struct snmp_name_ptr np; /* get_object_def() answer*/ en = msg_ps->ext_mib_node; 8035cc8: 6de6 ldr r6, [r4, #92] ; 0x5c np = msg_ps->ext_name_ptr; 8035cca: f894 9060 ldrb.w r9, [r4, #96] ; 0x60 8035cce: 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); 8035cd2: 6bb7 ldr r7, [r6, #56] ; 0x38 8035cd4: 4649 mov r1, r9 8035cd6: 4642 mov r2, r8 8035cd8: f104 0368 add.w r3, r4, #104 ; 0x68 8035cdc: 47b8 blx r7 if (msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) 8035cde: f894 0068 ldrb.w r0, [r4, #104] ; 0x68 8035ce2: b140 cbz r0, 8035cf6 { msg_ps->state = SNMP_MSG_EXTERNAL_SET_TEST; 8035ce4: 2309 movs r3, #9 8035ce6: f884 305a strb.w r3, [r4, #90] ; 0x5a en->set_test_q(request_id, &msg_ps->ext_object_def); 8035cea: 6b33 ldr r3, [r6, #48] ; 0x30 8035cec: 4628 mov r0, r5 8035cee: f104 0168 add.w r1, r4, #104 ; 0x68 8035cf2: 4798 blx r3 8035cf4: e0d5 b.n 8035ea2 } else { en->get_object_def_pc(request_id, np.ident_len, np.ident); 8035cf6: 6cb3 ldr r3, [r6, #72] ; 0x48 8035cf8: 4649 mov r1, r9 8035cfa: 4642 mov r2, r8 8035cfc: 4798 blx r3 8035cfe: e023 b.n 8035d48 /* 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) 8035d00: 2b09 cmp r3, #9 8035d02: d124 bne.n 8035d4e struct mib_external_node *en; /* set_test() answer*/ en = msg_ps->ext_mib_node; if (msg_ps->ext_object_def.access & MIB_ACCESS_WRITE) 8035d04: 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; 8035d08: 6de5 ldr r5, [r4, #92] ; 0x5c if (msg_ps->ext_object_def.access & MIB_ACCESS_WRITE) 8035d0a: f003 0302 and.w r3, r3, #2 8035d0e: b2db uxtb r3, r3 8035d10: b1b3 cbz r3, 8035d40 { if ((msg_ps->ext_object_def.asn_type == msg_ps->vb_ptr->value_type) && 8035d12: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035d16: f894 106a ldrb.w r1, [r4, #106] ; 0x6a 8035d1a: 7c1a ldrb r2, [r3, #16] 8035d1c: 4291 cmp r1, r2 8035d1e: d108 bne.n 8035d32 (en->set_test_a(request_id,&msg_ps->ext_object_def, 8035d20: 7c5a ldrb r2, [r3, #17] 8035d22: 6c2e ldr r6, [r5, #64] ; 0x40 8035d24: 695b ldr r3, [r3, #20] 8035d26: f104 0168 add.w r1, r4, #104 ; 0x68 8035d2a: 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) && 8035d2c: b108 cbz r0, 8035d32 (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; 8035d2e: 2301 movs r3, #1 8035d30: e040 b.n 8035db4 msg_ps->vb_idx += 1; } else { en->set_test_pc(request_id,&msg_ps->ext_object_def); 8035d32: 2000 movs r0, #0 8035d34: 4948 ldr r1, [pc, #288] ; (8035e58 ) 8035d36: 6d2b ldr r3, [r5, #80] ; 0x50 8035d38: 4798 blx r3 /* bad value */ snmp_error_response(msg_ps,SNMP_ES_BADVALUE); 8035d3a: 4846 ldr r0, [pc, #280] ; (8035e54 ) 8035d3c: 2103 movs r1, #3 8035d3e: e029 b.n 8035d94 } } else { en->set_test_pc(request_id,&msg_ps->ext_object_def); 8035d40: 6d2b ldr r3, [r5, #80] ; 0x50 8035d42: f104 0168 add.w r1, r4, #104 ; 0x68 8035d46: 4798 blx r3 /* object not available for set */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 8035d48: 4620 mov r0, r4 8035d4a: 2102 movs r1, #2 8035d4c: e022 b.n 8035d94 } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_OBJDEF_S) 8035d4e: 2b0a cmp r3, #10 8035d50: d123 bne.n 8035d9a { struct mib_external_node *en; struct snmp_name_ptr np; /* get_object_def() answer*/ en = msg_ps->ext_mib_node; 8035d52: 6de6 ldr r6, [r4, #92] ; 0x5c np = msg_ps->ext_name_ptr; 8035d54: f894 9060 ldrb.w r9, [r4, #96] ; 0x60 8035d58: 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); 8035d5c: 6bb7 ldr r7, [r6, #56] ; 0x38 8035d5e: 4649 mov r1, r9 8035d60: 4642 mov r2, r8 8035d62: f104 0368 add.w r3, r4, #104 ; 0x68 8035d66: 47b8 blx r7 if (msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) 8035d68: f894 0068 ldrb.w r0, [r4, #104] ; 0x68 8035d6c: b160 cbz r0, 8035d88 { msg_ps->state = SNMP_MSG_EXTERNAL_SET_VALUE; 8035d6e: 230b movs r3, #11 8035d70: 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); 8035d74: 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, 8035d78: 6b76 ldr r6, [r6, #52] ; 0x34 8035d7a: 7c5a ldrb r2, [r3, #17] 8035d7c: 695b ldr r3, [r3, #20] 8035d7e: 4628 mov r0, r5 8035d80: f104 0168 add.w r1, r4, #104 ; 0x68 8035d84: 47b0 blx r6 8035d86: e08c b.n 8035ea2 msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value); } else { en->get_object_def_pc(request_id, np.ident_len, np.ident); 8035d88: 4649 mov r1, r9 8035d8a: 6cb3 ldr r3, [r6, #72] ; 0x48 8035d8c: 4642 mov r2, r8 8035d8e: 4798 blx r3 /* set_value failed, object has disappeared for some odd reason?? */ snmp_error_response(msg_ps,SNMP_ES_GENERROR); 8035d90: 4620 mov r0, r4 8035d92: 2105 movs r1, #5 8035d94: f7ff fd31 bl 80357fa 8035d98: e083 b.n 8035ea2 } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_SET_VALUE) 8035d9a: 2b0b cmp r3, #11 8035d9c: f040 8081 bne.w 8035ea2 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); 8035da0: 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, 8035da4: 6de2 ldr r2, [r4, #92] ; 0x5c 8035da6: f104 0168 add.w r1, r4, #104 ; 0x68 8035daa: 6c55 ldr r5, [r2, #68] ; 0x44 8035dac: 7c5a ldrb r2, [r3, #17] 8035dae: 695b ldr r3, [r3, #20] 8035db0: 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; 8035db2: 2306 movs r3, #6 8035db4: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8035db8: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035dbc: 3301 adds r3, #1 8035dbe: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8035dc2: e06e b.n 8035ea2 (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_name_ptr np; if (msg_ps->vb_idx == 0) 8035dc4: b912 cbnz r2, 8035dcc { msg_ps->vb_ptr = msg_ps->invb.head; 8035dc6: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 8035dca: e002 b.n 8035dd2 } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 8035dcc: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035dd0: 681b ldr r3, [r3, #0] 8035dd2: 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)) 8035dd6: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035dda: 7a18 ldrb r0, [r3, #8] 8035ddc: 68d9 ldr r1, [r3, #12] 8035dde: f7ff fc47 bl 8035670 8035de2: 2800 cmp r0, #0 8035de4: d058 beq.n 8035e98 { mn = snmp_search_tree((struct mib_node*)&internet, msg_ps->vb_ptr->ident_len - 4, 8035de6: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035dea: 4817 ldr r0, [pc, #92] ; (8035e48 ) 8035dec: 7a19 ldrb r1, [r3, #8] 8035dee: 68da ldr r2, [r3, #12] 8035df0: 3904 subs r1, #4 8035df2: b2c9 uxtb r1, r1 8035df4: 3210 adds r2, #16 8035df6: 466b mov r3, sp 8035df8: f7ff f9ec bl 80351d4 msg_ps->vb_ptr->ident + 4, &np); if (mn != NULL) 8035dfc: 4605 mov r5, r0 8035dfe: 2800 cmp r0, #0 8035e00: d04a beq.n 8035e98 { if (mn->node_type == MIB_NODE_EX) 8035e02: 7c03 ldrb r3, [r0, #16] 8035e04: 2b05 cmp r3, #5 8035e06: d110 bne.n 8035e2a /* 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; 8035e08: 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; 8035e0a: 2307 movs r3, #7 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 8035e0c: 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; 8035e10: 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; 8035e14: 4b0d ldr r3, [pc, #52] ; (8035e4c ) en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 8035e16: 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; 8035e1a: e883 0003 stmia.w r3, {r0, r1} en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 8035e1e: 2100 movs r1, #0 8035e20: 6aaf ldr r7, [r5, #40] ; 0x28 8035e22: 6968 ldr r0, [r5, #20] 8035e24: 9b01 ldr r3, [sp, #4] 8035e26: 47b8 blx r7 8035e28: e03d b.n 8035ea6 else { /* internal object */ struct obj_def object_def; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; 8035e2a: 2702 movs r7, #2 8035e2c: f884 705a strb.w r7, [r4, #90] ; 0x5a mn->get_object_def(np.ident_len, np.ident, &object_def); 8035e30: 6803 ldr r3, [r0, #0] 8035e32: 9901 ldr r1, [sp, #4] 8035e34: f89d 0000 ldrb.w r0, [sp] 8035e38: aa02 add r2, sp, #8 8035e3a: 4798 blx r3 if (object_def.instance != MIB_OBJECT_NONE) 8035e3c: f89d 3008 ldrb.w r3, [sp, #8] 8035e40: 2b00 cmp r3, #0 8035e42: f040 80b9 bne.w 8035fb8 8035e46: e027 b.n 8035e98 8035e48: 08045834 .word 0x08045834 8035e4c: 2000f750 .word 0x2000f750 8035e50: 2000f7fc .word 0x2000f7fc 8035e54: 2000f6f0 .word 0x2000f6f0 8035e58: 2000f758 .word 0x2000f758 { 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) && 8035e5c: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035e60: f89d 100a ldrb.w r1, [sp, #10] 8035e64: 7c1a ldrb r2, [r3, #16] 8035e66: 4291 cmp r1, r2 8035e68: d10e bne.n 8035e88 (mn->set_test(&object_def,msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value) != 0)) 8035e6a: 68af ldr r7, [r5, #8] 8035e6c: 7c59 ldrb r1, [r3, #17] 8035e6e: 695a ldr r2, [r3, #20] 8035e70: a802 add r0, sp, #8 8035e72: 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) && 8035e74: b140 cbz r0, 8035e88 (mn->set_test(&object_def,msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value) != 0)) { msg_ps->state = SNMP_MSG_SEARCH_OBJ; 8035e76: 2301 movs r3, #1 8035e78: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8035e7c: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035e80: 3301 adds r3, #1 8035e82: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8035e86: e006 b.n 8035e96 } else { /* bad value */ snmp_error_response(msg_ps,SNMP_ES_BADVALUE); 8035e88: 4854 ldr r0, [pc, #336] ; (8035fdc ) 8035e8a: 2103 movs r1, #3 8035e8c: e001 b.n 8035e92 } } else { /* object not available for set */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 8035e8e: 4853 ldr r0, [pc, #332] ; (8035fdc ) 8035e90: 4639 mov r1, r7 8035e92: f7ff fcb2 bl 80357fa } else { mn = NULL; } if (mn == NULL) 8035e96: b935 cbnz r5, 8035ea6 { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 8035e98: 4850 ldr r0, [pc, #320] ; (8035fdc ) 8035e9a: 2102 movs r1, #2 8035e9c: f7ff fcad bl 80357fa 8035ea0: e001 b.n 8035ea6 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) && 8035ea2: 4c4e ldr r4, [pc, #312] ; (8035fdc ) 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, 8035ea4: 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) && 8035ea6: f894 205a ldrb.w r2, [r4, #90] ; 0x5a 8035eaa: 4b4c ldr r3, [pc, #304] ; (8035fdc ) 8035eac: 2a01 cmp r2, #1 8035eae: d151 bne.n 8035f54 (msg_ps->vb_idx < msg_ps->invb.count)) 8035eb0: f894 20f8 ldrb.w r2, [r4, #248] ; 0xf8 8035eb4: 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) && 8035eb8: 428a cmp r2, r1 8035eba: d383 bcc.n 8035dc4 8035ebc: e088 b.n 8035fd0 } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && (msg_ps->vb_idx == msg_ps->invb.count)) { msg_ps->vb_idx = 0; 8035ebe: 2200 movs r2, #0 8035ec0: f883 20f8 strb.w r2, [r3, #248] ; 0xf8 msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; 8035ec4: 2206 movs r2, #6 8035ec6: f883 205a strb.w r2, [r3, #90] ; 0x5a 8035eca: e043 b.n 8035f54 (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_name_ptr np; if (msg_ps->vb_idx == 0) 8035ecc: b913 cbnz r3, 8035ed4 { msg_ps->vb_ptr = msg_ps->invb.head; 8035ece: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 8035ed2: e002 b.n 8035eda } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 8035ed4: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035ed8: 681b ldr r3, [r3, #0] 8035eda: 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, 8035ede: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035ee2: 483f ldr r0, [pc, #252] ; (8035fe0 ) 8035ee4: 7a19 ldrb r1, [r3, #8] 8035ee6: 68da ldr r2, [r3, #12] 8035ee8: 3904 subs r1, #4 8035eea: b2c9 uxtb r1, r1 8035eec: 3210 adds r2, #16 8035eee: 466b mov r3, sp 8035ef0: f7ff f970 bl 80351d4 msg_ps->vb_ptr->ident + 4, &np); /* check if object is still available (e.g. external hot-plug thingy present?) */ if (mn != NULL) 8035ef4: 4605 mov r5, r0 8035ef6: 2800 cmp r0, #0 8035ef8: d02e beq.n 8035f58 { if (mn->node_type == MIB_NODE_EX) 8035efa: 7c03 ldrb r3, [r0, #16] 8035efc: 2b05 cmp r3, #5 8035efe: d110 bne.n 8035f22 /* 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; 8035f00: 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; 8035f02: 230a movs r3, #10 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 8035f04: 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; 8035f08: 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; 8035f0c: 4b35 ldr r3, [pc, #212] ; (8035fe4 ) en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 8035f0e: 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; 8035f12: e883 0003 stmia.w r3, {r0, r1} en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 8035f16: 2100 movs r1, #0 8035f18: 6aaf ldr r7, [r5, #40] ; 0x28 8035f1a: 6968 ldr r0, [r5, #20] 8035f1c: 9b01 ldr r3, [sp, #4] 8035f1e: 47b8 blx r7 8035f20: e01a b.n 8035f58 else { /* internal object */ struct obj_def object_def; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF_S; 8035f22: 2305 movs r3, #5 8035f24: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_object_def(np.ident_len, np.ident, &object_def); 8035f28: 6803 ldr r3, [r0, #0] 8035f2a: 9901 ldr r1, [sp, #4] 8035f2c: f89d 0000 ldrb.w r0, [sp] 8035f30: aa02 add r2, sp, #8 8035f32: 4798 blx r3 msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; 8035f34: 2306 movs r3, #6 8035f36: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->set_value(&object_def,msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value); 8035f3a: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035f3e: 68ed ldr r5, [r5, #12] 8035f40: 7c59 ldrb r1, [r3, #17] 8035f42: 695a ldr r2, [r3, #20] 8035f44: a802 add r0, sp, #8 8035f46: 47a8 blx r5 msg_ps->vb_idx += 1; 8035f48: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035f4c: 3301 adds r3, #1 8035f4e: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8035f52: e001 b.n 8035f58 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) && 8035f54: 4c21 ldr r4, [pc, #132] ; (8035fdc ) 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, 8035f56: 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) && 8035f58: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 8035f5c: 4d1f ldr r5, [pc, #124] ; (8035fdc ) 8035f5e: 2b06 cmp r3, #6 8035f60: d139 bne.n 8035fd6 (msg_ps->vb_idx < msg_ps->invb.count)) 8035f62: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035f66: 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) && 8035f6a: 4293 cmp r3, r2 8035f6c: d3ae bcc.n 8035ecc 8035f6e: e031 b.n 8035fd4 (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; 8035f70: f505 7280 add.w r2, r5, #256 ; 0x100 8035f74: ca07 ldmia r2, {r0, r1, r2} 8035f76: f505 7386 add.w r3, r5, #268 ; 0x10c 8035f7a: e883 0007 stmia.w r3, {r0, r1, r2} msg_ps->invb.head = NULL; 8035f7e: 2300 movs r3, #0 8035f80: f8c5 3100 str.w r3, [r5, #256] ; 0x100 msg_ps->invb.tail = NULL; 8035f84: f8c5 3104 str.w r3, [r5, #260] ; 0x104 msg_ps->invb.count = 0; 8035f88: f885 3108 strb.w r3, [r5, #264] ; 0x108 snmp_ok_response(msg_ps); 8035f8c: 4628 mov r0, r5 8035f8e: f7ff fc6f bl 8035870 8035f92: e020 b.n 8035fd6 } } if (mn == NULL) { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 8035f94: 4811 ldr r0, [pc, #68] ; (8035fdc ) 8035f96: 2102 movs r1, #2 8035f98: f7ff fc2f bl 80357fa 8035f9c: e556 b.n 8035a4c } if (mn != NULL) { struct snmp_varbind *vb; msg_ps->state = SNMP_MSG_INTERNAL_GET_VALUE; 8035f9e: 2303 movs r3, #3 /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 8035fa0: 200c movs r0, #12 } if (mn != NULL) { struct snmp_varbind *vb; msg_ps->state = SNMP_MSG_INTERNAL_GET_VALUE; 8035fa2: f884 305a strb.w r3, [r4, #90] ; 0x5a /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 8035fa6: f7f9 fe11 bl 802fbcc if (vb != NULL) 8035faa: 4605 mov r5, r0 8035fac: 2800 cmp r0, #0 8035fae: f47f ae31 bne.w 8035c14 8035fb2: e669 b.n 8035c88 { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); } } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 8035fb4: d10f bne.n 8035fd6 8035fb6: e555 b.n 8035a64 /* search failed, object id points to unknown object (nosuchname) */ mn = NULL; } if (mn != NULL) { msg_ps->state = SNMP_MSG_INTERNAL_SET_TEST; 8035fb8: 2304 movs r3, #4 8035fba: f884 305a strb.w r3, [r4, #90] ; 0x5a if (object_def.access & MIB_ACCESS_WRITE) 8035fbe: f89d 3009 ldrb.w r3, [sp, #9] 8035fc2: f003 0302 and.w r3, r3, #2 8035fc6: b2db uxtb r3, r3 8035fc8: 2b00 cmp r3, #0 8035fca: f47f af47 bne.w 8035e5c 8035fce: e75e b.n 8035e8e /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); } } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 8035fd0: d1c0 bne.n 8035f54 8035fd2: e774 b.n 8035ebe 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) && 8035fd4: d0cc beq.n 8035f70 else if(msg_ps->rt == SNMP_ASN1_PDU_SET_REQ) { snmp_msg_set_event(request_id, msg_ps); } } } 8035fd6: b027 add sp, #156 ; 0x9c 8035fd8: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 8035fdc: 2000f6f0 .word 0x2000f6f0 8035fe0: 08045834 .word 0x08045834 8035fe4: 2000f750 .word 0x2000f750 08035fe8 : 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) { 8035fe8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8035fec: 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); 8035fee: 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) { 8035ff2: 468a mov sl, r1 8035ff4: 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); 8035ff6: 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) { 8035ff8: 4604 mov r4, r0 8035ffa: 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); 8035ffc: 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); 8036000: f7fd f920 bl 8033244 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &vb_len); 8036004: f10a 0101 add.w r1, sl, #1 8036008: 4620 mov r0, r4 803600a: b289 uxth r1, r1 803600c: f10d 020a add.w r2, sp, #10 8036010: 4633 mov r3, r6 8036012: f7fd f92c bl 803326e if ((derr != ERR_OK) || 8036016: b910 cbnz r0, 803601e 8036018: 783b ldrb r3, [r7, #0] 803601a: 2b30 cmp r3, #48 ; 0x30 803601c: d002 beq.n 8036024 (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ))) { snmp_inc_snmpinasnparseerrs(); 803601e: f7fe ff21 bl 8034e64 8036022: e02b b.n 803607c return ERR_ARG; } ofs += (1 + len_octets); 8036024: f89d 800a ldrb.w r8, [sp, #10] /* start with empty list */ m_stat->invb.count = 0; 8036028: 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); 803602c: f108 0801 add.w r8, r8, #1 8036030: 44d0 add r8, sl 8036032: fa1f f888 uxth.w r8, r8 /* start with empty list */ m_stat->invb.count = 0; m_stat->invb.head = NULL; 8036036: f8c5 0100 str.w r0, [r5, #256] ; 0x100 m_stat->invb.tail = NULL; 803603a: f8c5 0104 str.w r0, [r5, #260] ; 0x104 while (vb_len > 0) 803603e: e118 b.n 8036272 { struct snmp_obj_id oid, oid_value; struct snmp_varbind *vb; snmp_asn1_dec_type(p, ofs, &type); 8036040: 4641 mov r1, r8 8036042: 463a mov r2, r7 8036044: 4620 mov r0, r4 8036046: f7fd f8fd bl 8033244 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 803604a: f108 0101 add.w r1, r8, #1 803604e: 4620 mov r0, r4 8036050: b289 uxth r1, r1 8036052: f10d 020a add.w r2, sp, #10 8036056: ab03 add r3, sp, #12 8036058: f7fd f909 bl 803326e if ((derr != ERR_OK) || 803605c: b940 cbnz r0, 8036070 803605e: 783b ldrb r3, [r7, #0] 8036060: 2b30 cmp r3, #48 ; 0x30 8036062: d105 bne.n 8036070 (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)) || (len == 0) || (len > vb_len)) 8036064: 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)) || 8036068: b112 cbz r2, 8036070 (len == 0) || (len > vb_len)) 803606a: 8833 ldrh r3, [r6, #0] 803606c: 429a cmp r2, r3 803606e: d907 bls.n 8036080 { snmp_inc_snmpinasnparseerrs(); 8036070: f7fe fef8 bl 8034e64 /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); 8036074: f505 7080 add.w r0, r5, #256 ; 0x100 8036078: f7ff fbb1 bl 80357de 803607c: 20f2 movs r0, #242 ; 0xf2 803607e: e109 b.n 8036294 return ERR_ARG; } ofs += (1 + len_octets); 8036080: f89d 200a ldrb.w r2, [sp, #10] 8036084: 4490 add r8, r2 8036086: fa1f f888 uxth.w r8, r8 803608a: f108 0a01 add.w sl, r8, #1 vb_len -= (1 + len_octets); 803608e: 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); 8036090: fa1f fa8a uxth.w sl, sl vb_len -= (1 + len_octets); 8036094: 189b adds r3, r3, r2 snmp_asn1_dec_type(p, ofs, &type); 8036096: 4651 mov r1, sl 8036098: 463a mov r2, r7 803609a: 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); 803609c: 8033 strh r3, [r6, #0] snmp_asn1_dec_type(p, ofs, &type); 803609e: f7fd f8d1 bl 8033244 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 80360a2: f108 0102 add.w r1, r8, #2 80360a6: 4620 mov r0, r4 80360a8: b289 uxth r1, r1 80360aa: f10d 020a add.w r2, sp, #10 80360ae: ab03 add r3, sp, #12 80360b0: f7fd f8dd bl 803326e if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID))) 80360b4: 2800 cmp r0, #0 80360b6: d1db bne.n 8036070 80360b8: 783b ldrb r3, [r7, #0] 80360ba: 2b06 cmp r3, #6 80360bc: d1d8 bne.n 8036070 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); 80360be: f89d 100a ldrb.w r1, [sp, #10] 80360c2: f8bd 200c ldrh.w r2, [sp, #12] 80360c6: 3101 adds r1, #1 80360c8: 4451 add r1, sl 80360ca: 4620 mov r0, r4 80360cc: b289 uxth r1, r1 80360ce: ab04 add r3, sp, #16 80360d0: f7fd f9fc bl 80334cc if (derr != ERR_OK) 80360d4: 2800 cmp r0, #0 80360d6: d1cb bne.n 8036070 snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets + len); 80360d8: f89d 300a ldrb.w r3, [sp, #10] 80360dc: f8bd 200c ldrh.w r2, [sp, #12] 80360e0: 1899 adds r1, r3, r2 80360e2: 448a add sl, r1 80360e4: fa1f fa8a uxth.w sl, sl vb_len -= (1 + len_octets + len); 80360e8: 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); 80360ea: f10a 0801 add.w r8, sl, #1 vb_len -= (1 + len_octets + len); 80360ee: 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); 80360f0: fa1f f888 uxth.w r8, r8 vb_len -= (1 + len_octets + len); 80360f4: 43db mvns r3, r3 80360f6: 18d3 adds r3, r2, r3 snmp_asn1_dec_type(p, ofs, &type); 80360f8: 4641 mov r1, r8 80360fa: 463a mov r2, r7 80360fc: 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); 80360fe: 8033 strh r3, [r6, #0] snmp_asn1_dec_type(p, ofs, &type); 8036100: f7fd f8a0 bl 8033244 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8036104: f10a 0102 add.w r1, sl, #2 8036108: 4620 mov r0, r4 803610a: b289 uxth r1, r1 803610c: f10d 020a add.w r2, sp, #10 8036110: ab03 add r3, sp, #12 8036112: f7fd f8ac bl 803326e if (derr != ERR_OK) 8036116: 2800 cmp r0, #0 8036118: d1aa bne.n 8036070 /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } switch (type) 803611a: 7839 ldrb r1, [r7, #0] 803611c: 2906 cmp r1, #6 803611e: d047 beq.n 80361b0 8036120: d805 bhi.n 803612e 8036122: 2904 cmp r1, #4 8036124: d036 beq.n 8036194 8036126: d839 bhi.n 803619c 8036128: 2902 cmp r1, #2 803612a: d1a1 bne.n 8036070 803612c: e009 b.n 8036142 803612e: 2943 cmp r1, #67 ; 0x43 8036130: d804 bhi.n 803613c 8036132: 2941 cmp r1, #65 ; 0x41 8036134: d219 bcs.n 803616a 8036136: 2940 cmp r1, #64 ; 0x40 8036138: d19a bne.n 8036070 803613a: e069 b.n 8036210 803613c: 2944 cmp r1, #68 ; 0x44 803613e: d197 bne.n 8036070 8036140: e028 b.n 8036194 { case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG): vb = snmp_varbind_alloc(&oid, type, sizeof(s32_t)); 8036142: a804 add r0, sp, #16 8036144: 2204 movs r2, #4 8036146: f7ff faf7 bl 8035738 if (vb != NULL) 803614a: 4683 mov fp, r0 803614c: 2800 cmp r0, #0 803614e: d08f beq.n 8036070 { s32_t *vptr = (s32_t*)vb->value; derr = snmp_asn1_dec_s32t(p, ofs + 1 + len_octets, len, vptr); 8036150: f89d 100a ldrb.w r1, [sp, #10] 8036154: f8bd 200c ldrh.w r2, [sp, #12] 8036158: f8db 3014 ldr.w r3, [fp, #20] 803615c: 3101 adds r1, #1 803615e: 4441 add r1, r8 8036160: 4620 mov r0, r4 8036162: b289 uxth r1, r1 8036164: f7fd f959 bl 803341a 8036168: e06b b.n 8036242 } 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)); 803616a: a804 add r0, sp, #16 803616c: 2204 movs r2, #4 803616e: f7ff fae3 bl 8035738 if (vb != NULL) 8036172: 4683 mov fp, r0 8036174: 2800 cmp r0, #0 8036176: f43f af7b beq.w 8036070 { u32_t *vptr = (u32_t*)vb->value; derr = snmp_asn1_dec_u32t(p, ofs + 1 + len_octets, len, vptr); 803617a: f89d 100a ldrb.w r1, [sp, #10] 803617e: f8bd 200c ldrh.w r2, [sp, #12] 8036182: f8db 3014 ldr.w r3, [fp, #20] 8036186: 3101 adds r1, #1 8036188: 4441 add r1, r8 803618a: 4620 mov r0, r4 803618c: b289 uxth r1, r1 803618e: f7fd f8f0 bl 8033372 8036192: e056 b.n 8036242 } 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); 8036194: a804 add r0, sp, #16 8036196: f89d 200c ldrb.w r2, [sp, #12] 803619a: e03f b.n 803621c { derr = ERR_ARG; } break; case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_NUL): vb = snmp_varbind_alloc(&oid, type, 0); 803619c: 2105 movs r1, #5 803619e: a804 add r0, sp, #16 80361a0: 2200 movs r2, #0 80361a2: f7ff fac9 bl 8035738 if (vb != NULL) 80361a6: 4601 mov r1, r0 80361a8: 2800 cmp r0, #0 80361aa: f43f af61 beq.w 8036070 80361ae: e02a b.n 8036206 { 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); 80361b0: f89d 100a ldrb.w r1, [sp, #10] 80361b4: f8bd 200c ldrh.w r2, [sp, #12] 80361b8: 3101 adds r1, #1 80361ba: 4441 add r1, r8 80361bc: 4620 mov r0, r4 80361be: b289 uxth r1, r1 80361c0: ab25 add r3, sp, #148 ; 0x94 80361c2: f7fd f983 bl 80334cc if (derr == ERR_OK) 80361c6: 2800 cmp r0, #0 80361c8: f47f af52 bne.w 8036070 { vb = snmp_varbind_alloc(&oid, type, oid_value.len * sizeof(s32_t)); 80361cc: f89d 2094 ldrb.w r2, [sp, #148] ; 0x94 80361d0: 7839 ldrb r1, [r7, #0] 80361d2: 0092 lsls r2, r2, #2 80361d4: a804 add r0, sp, #16 80361d6: f002 02fc and.w r2, r2, #252 ; 0xfc 80361da: f7ff faad bl 8035738 if (vb != NULL) 80361de: 4601 mov r1, r0 80361e0: 2800 cmp r0, #0 80361e2: f43f af45 beq.w 8036070 { u8_t i = oid_value.len; 80361e6: f89d 3094 ldrb.w r3, [sp, #148] ; 0x94 s32_t *vptr = (s32_t*)vb->value; 80361ea: 6940 ldr r0, [r0, #20] while(i > 0) 80361ec: e009 b.n 8036202 { i--; 80361ee: 3b01 subs r3, #1 80361f0: b2db uxtb r3, r3 vptr[i] = oid_value.id[i]; 80361f2: f50d 7e8c add.w lr, sp, #280 ; 0x118 80361f6: eb0e 0283 add.w r2, lr, r3, lsl #2 80361fa: f852 2c80 ldr.w r2, [r2, #-128] 80361fe: 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) 8036202: 2b00 cmp r3, #0 8036204: d1f3 bne.n 80361ee { i--; vptr[i] = oid_value.id[i]; } snmp_varbind_tail_add(&m_stat->invb, vb); 8036206: f505 7080 add.w r0, r5, #256 ; 0x100 803620a: f7ff fb41 bl 8035890 803620e: e022 b.n 8036256 derr = ERR_ARG; } } break; case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR): if (len == 4) 8036210: f8bd 200c ldrh.w r2, [sp, #12] 8036214: 2a04 cmp r2, #4 8036216: f47f af2b bne.w 8036070 { /* must be exactly 4 octets! */ vb = snmp_varbind_alloc(&oid, type, 4); 803621a: a804 add r0, sp, #16 803621c: f7ff fa8c bl 8035738 if (vb != NULL) 8036220: 4683 mov fp, r0 8036222: 2800 cmp r0, #0 8036224: f43f af24 beq.w 8036070 { derr = snmp_asn1_dec_raw(p, ofs + 1 + len_octets, len, vb->value_len, (u8_t*)vb->value); 8036228: f89d 100a ldrb.w r1, [sp, #10] 803622c: 7c43 ldrb r3, [r0, #17] 803622e: 6940 ldr r0, [r0, #20] 8036230: f8bd 200c ldrh.w r2, [sp, #12] 8036234: 9000 str r0, [sp, #0] 8036236: 3101 adds r1, #1 8036238: 4441 add r1, r8 803623a: 4620 mov r0, r4 803623c: b289 uxth r1, r1 803623e: f7fd f9e1 bl 8033604 8036242: 4682 mov sl, r0 snmp_varbind_tail_add(&m_stat->invb, vb); 8036244: 4659 mov r1, fp 8036246: f505 7080 add.w r0, r5, #256 ; 0x100 803624a: f7ff fb21 bl 8035890 break; default: derr = ERR_ARG; break; } if (derr != ERR_OK) 803624e: f1ba 0f00 cmp.w sl, #0 8036252: f47f af0d bne.w 8036070 snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets + len); 8036256: f8bd 200c ldrh.w r2, [sp, #12] 803625a: f89d 300a ldrb.w r3, [sp, #10] 803625e: 1c51 adds r1, r2, #1 8036260: 1859 adds r1, r3, r1 8036262: 4488 add r8, r1 vb_len -= (1 + len_octets + len); 8036264: 8831 ldrh r1, [r6, #0] 8036266: 43db mvns r3, r3 8036268: 1a8a subs r2, r1, r2 803626a: 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); 803626c: fa1f f888 uxth.w r8, r8 vb_len -= (1 + len_octets + len); 8036270: 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) 8036272: 8833 ldrh r3, [r6, #0] 8036274: 2b00 cmp r3, #0 8036276: f47f aee3 bne.w 8036040 } ofs += (1 + len_octets + len); vb_len -= (1 + len_octets + len); } if (m_stat->rt == SNMP_ASN1_PDU_SET_REQ) 803627a: 7aab ldrb r3, [r5, #10] 803627c: f895 0108 ldrb.w r0, [r5, #264] ; 0x108 8036280: 2b03 cmp r3, #3 8036282: d102 bne.n 803628a { snmp_add_snmpintotalsetvars(m_stat->invb.count); 8036284: f7fe fe26 bl 8034ed4 8036288: e001 b.n 803628e } else { snmp_add_snmpintotalreqvars(m_stat->invb.count); 803628a: f7fe fe1b bl 8034ec4 } *ofs_ret = ofs; 803628e: f8a9 8000 strh.w r8, [r9] return ERR_OK; 8036292: 2000 movs r0, #0 } 8036294: b240 sxtb r0, r0 8036296: b047 add sp, #284 ; 0x11c 8036298: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0803629c : /* 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) { 803629c: 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)) 80362a0: 4da3 ldr r5, [pc, #652] ; (8036530 ) 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; 80362a2: 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)) 80362a4: 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) { 80362a8: b087 sub sp, #28 80362aa: 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; 80362ac: 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) { 80362ae: 4688 mov r8, r1 80362b0: 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; 80362b2: 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)) 80362b6: 2e00 cmp r6, #0 80362b8: f000 81aa beq.w 8036610 msg_ps++; } if (req_idx == SNMP_CONCURRENT_REQUESTS) { /* exceeding number of concurrent requests */ pbuf_free(p); 80362bc: 4620 mov r0, r4 80362be: f7f9 fda5 bl 802fe0c 80362c2: e1d6 b.n 8036672 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)) || 80362c4: f89d 600e ldrb.w r6, [sp, #14] 80362c8: f8bd 3012 ldrh.w r3, [sp, #18] 80362cc: 1c75 adds r5, r6, #1 80362ce: 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) || 80362d0: 429f cmp r7, r3 80362d2: f040 80c4 bne.w 803645e (pdu_len != (1 + len_octets + len)) || 80362d6: f89d 300f ldrb.w r3, [sp, #15] 80362da: 2b30 cmp r3, #48 ; 0x30 80362dc: d000 beq.n 80362e0 80362de: e0be b.n 803645e (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ))) { snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets); 80362e0: b2ad uxth r5, r5 snmp_asn1_dec_type(p, ofs, &type); 80362e2: 4629 mov r1, r5 80362e4: f10d 020f add.w r2, sp, #15 80362e8: 4620 mov r0, r4 80362ea: f7fc ffab bl 8033244 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 80362ee: 4620 mov r0, r4 80362f0: 1cb1 adds r1, r6, #2 80362f2: f10d 020e add.w r2, sp, #14 80362f6: f10d 0312 add.w r3, sp, #18 80362fa: f7fc ffb8 bl 803326e if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 80362fe: 2800 cmp r0, #0 8036300: f040 80ad bne.w 803645e 8036304: f89d 300f ldrb.w r3, [sp, #15] 8036308: 2b02 cmp r3, #2 803630a: f040 80a8 bne.w 803645e { /* 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); 803630e: f89d 100e ldrb.w r1, [sp, #14] 8036312: f8bd 2012 ldrh.w r2, [sp, #18] 8036316: 3101 adds r1, #1 8036318: 4620 mov r0, r4 803631a: 1869 adds r1, r5, r1 803631c: ab05 add r3, sp, #20 803631e: f7fd f87c bl 803341a if (derr != ERR_OK) 8036322: 2800 cmp r0, #0 8036324: f040 809b bne.w 803645e { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } if (version != 0) 8036328: 9b05 ldr r3, [sp, #20] 803632a: b113 cbz r3, 8036332 { /* not version 1 */ snmp_inc_snmpinbadversions(); 803632c: f7fe fd8a bl 8034e44 8036330: e7c4 b.n 80362bc return ERR_ARG; } ofs += (1 + len_octets + len); 8036332: f89d 200e ldrb.w r2, [sp, #14] 8036336: f8bd 3012 ldrh.w r3, [sp, #18] 803633a: 18d3 adds r3, r2, r3 803633c: 18ed adds r5, r5, r3 803633e: b2ad uxth r5, r5 8036340: 1c6e adds r6, r5, #1 8036342: b2b6 uxth r6, r6 snmp_asn1_dec_type(p, ofs, &type); 8036344: 4631 mov r1, r6 8036346: f10d 020f add.w r2, sp, #15 803634a: 4620 mov r0, r4 803634c: f7fc ff7a bl 8033244 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8036350: 1ca9 adds r1, r5, #2 8036352: 4620 mov r0, r4 8036354: b289 uxth r1, r1 8036356: f10d 020e add.w r2, sp, #14 803635a: f10d 0312 add.w r3, sp, #18 803635e: f7fc ff86 bl 803326e if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR))) 8036362: 2800 cmp r0, #0 8036364: d17b bne.n 803645e 8036366: f89d 300f ldrb.w r3, [sp, #15] 803636a: 2b04 cmp r3, #4 803636c: d177 bne.n 803645e { /* 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); 803636e: f89d 100e ldrb.w r1, [sp, #14] 8036372: 4d70 ldr r5, [pc, #448] ; (8036534 ) 8036374: f8bd 2012 ldrh.w r2, [sp, #18] 8036378: 9500 str r5, [sp, #0] 803637a: 3101 adds r1, #1 803637c: 1871 adds r1, r6, r1 803637e: 4620 mov r0, r4 8036380: b289 uxth r1, r1 8036382: 2340 movs r3, #64 ; 0x40 8036384: f7fd f93e bl 8033604 if (derr != ERR_OK) 8036388: 2800 cmp r0, #0 803638a: d168 bne.n 803645e { snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } /* add zero terminator */ len = ((len < (SNMP_COMMUNITY_STR_LEN))?(len):(SNMP_COMMUNITY_STR_LEN)); 803638c: f8bd 3012 ldrh.w r3, [sp, #18] m_stat->community[len] = 0; 8036390: 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)); 8036394: 2b40 cmp r3, #64 ; 0x40 8036396: bf28 it cs 8036398: 2340 movcs r3, #64 ; 0x40 m_stat->community[len] = 0; 803639a: 18d1 adds r1, r2, r3 snmp_inc_snmpinbadcommunitynames(); snmp_authfail_trap(); return ERR_ARG; }*/ ofs += (1 + len_octets + len); 803639c: 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)); 80363a0: f8ad 3012 strh.w r3, [sp, #18] m_stat->community[len] = 0; m_stat->com_strlen = (u8_t)len; 80363a4: f885 3041 strb.w r3, [r5, #65] ; 0x41 snmp_inc_snmpinbadcommunitynames(); snmp_authfail_trap(); return ERR_ARG; }*/ ofs += (1 + len_octets + len); 80363a8: 189b adds r3, r3, r2 80363aa: 18f6 adds r6, r6, r3 80363ac: b2b6 uxth r6, r6 80363ae: f106 0801 add.w r8, r6, #1 80363b2: 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; 80363b6: 7608 strb r0, [r1, #24] snmp_authfail_trap(); return ERR_ARG; }*/ ofs += (1 + len_octets + len); snmp_asn1_dec_type(p, ofs, &type); 80363b8: f10d 020f add.w r2, sp, #15 80363bc: 4641 mov r1, r8 80363be: 4620 mov r0, r4 80363c0: f7fc ff40 bl 8033244 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 80363c4: 1cb1 adds r1, r6, #2 80363c6: 4620 mov r0, r4 80363c8: b289 uxth r1, r1 80363ca: f10d 020e add.w r2, sp, #14 80363ce: f10d 0312 add.w r3, sp, #18 80363d2: f7fc ff4c bl 803326e if (derr != ERR_OK) 80363d6: 2800 cmp r0, #0 80363d8: d141 bne.n 803645e return ERR_ARG; } /* FIX for write/read communuty */ /* GetRequest PDU */ if (type == (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_REQ)) 80363da: f89d 300f ldrb.w r3, [sp, #15] 80363de: 2ba0 cmp r3, #160 ; 0xa0 80363e0: d10f bne.n 8036402 { if (strncmp(sSettings.sSnmp.readCommunity, (const char*)m_stat->community, strlen(sSettings.sSnmp.readCommunity)) != 0 80363e2: 4855 ldr r0, [pc, #340] ; (8036538 ) 80363e4: f7eb fd64 bl 8021eb0 80363e8: 4629 mov r1, r5 80363ea: 4602 mov r2, r0 80363ec: 4852 ldr r0, [pc, #328] ; (8036538 ) 80363ee: f7eb fdc1 bl 8021f74 80363f2: b120 cbz r0, 80363fe || (strlen(sSettings.sSnmp.readCommunity) != strlen((const char*)m_stat->community)) ) { snmp_inc_snmpinbadcommunitynames(); 80363f4: f7fe fd2e bl 8034e54 snmp_authfail_trap(); 80363f8: f000 fd84 bl 8036f04 80363fc: e75e b.n 80362bc /* 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)) ) 80363fe: 484e ldr r0, [pc, #312] ; (8036538 ) 8036400: e00c b.n 803641c snmp_authfail_trap(); return ERR_ARG; } } /* SetRequest PDU */ else if (type == (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_SET_REQ)) 8036402: 2ba3 cmp r3, #163 ; 0xa3 8036404: d112 bne.n 803642c { if (strncmp(sSettings.sSnmp.writeCommunity, (const char*)m_stat->community, strlen(sSettings.sSnmp.writeCommunity)) != 0 8036406: 484d ldr r0, [pc, #308] ; (803653c ) 8036408: f7eb fd52 bl 8021eb0 803640c: 4629 mov r1, r5 803640e: 4602 mov r2, r0 8036410: 484a ldr r0, [pc, #296] ; (803653c ) 8036412: f7eb fdaf bl 8021f74 8036416: 2800 cmp r0, #0 8036418: d1ec bne.n 80363f4 || (strlen(sSettings.sSnmp.writeCommunity) != strlen((const char*)m_stat->community)) ) 803641a: 4848 ldr r0, [pc, #288] ; (803653c ) 803641c: f7eb fd48 bl 8021eb0 8036420: 4606 mov r6, r0 8036422: 4628 mov r0, r5 8036424: f7eb fd44 bl 8021eb0 8036428: 4286 cmp r6, r0 803642a: d1e3 bne.n 80363f4 snmp_authfail_trap(); return ERR_ARG; } } switch(type) 803642c: f89d 300f ldrb.w r3, [sp, #15] 8036430: 3ba0 subs r3, #160 ; 0xa0 8036432: 2b04 cmp r3, #4 8036434: d813 bhi.n 803645e 8036436: e8df f003 tbb [pc, r3] 803643a: 0603 .short 0x0603 803643c: 0c09 .short 0x0c09 803643e: 0f .byte 0x0f 803643f: 00 .byte 0x00 { case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_REQ): // GetRequest PDU snmp_inc_snmpingetrequests(); 8036440: f7fe fd50 bl 8034ee4 8036444: e100 b.n 8036648 derr = ERR_OK; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_NEXT_REQ): // GetNextRequest PDU snmp_inc_snmpingetnexts(); 8036446: f7fe fd55 bl 8034ef4 803644a: e0fd b.n 8036648 derr = ERR_OK; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_RESP): // GetResponse PDU snmp_inc_snmpingetresponses(); 803644c: f7fe fd62 bl 8034f14 8036450: e734 b.n 80362bc derr = ERR_ARG; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_SET_REQ): // SetRequest PDU snmp_inc_snmpinsetrequests(); 8036452: f7fe fd57 bl 8034f04 8036456: e0f7 b.n 8036648 derr = ERR_OK; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_TRAP): // Trap PDU snmp_inc_snmpintraps(); 8036458: f7fe fd64 bl 8034f24 803645c: e72e b.n 80362bc derr = ERR_ARG; break; default: snmp_inc_snmpinasnparseerrs(); 803645e: f7fe fd01 bl 8034e64 8036462: e72b b.n 80362bc { /* decoded PDU length does not equal actual payload length */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } snmp_asn1_dec_type(p, ofs, &type); 8036464: 4631 mov r1, r6 8036466: f10d 020f add.w r2, sp, #15 803646a: 4620 mov r0, r4 803646c: f7fc feea bl 8033244 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8036470: f108 0102 add.w r1, r8, #2 8036474: 4620 mov r0, r4 8036476: b289 uxth r1, r1 8036478: f10d 020e add.w r2, sp, #14 803647c: f10d 0312 add.w r3, sp, #18 8036480: f7fc fef5 bl 803326e if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 8036484: 2800 cmp r0, #0 8036486: d1ea bne.n 803645e 8036488: f89d 300f ldrb.w r3, [sp, #15] 803648c: 2b02 cmp r3, #2 803648e: d1e6 bne.n 803645e { /* 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); 8036490: f89d 100e ldrb.w r1, [sp, #14] 8036494: f8bd 2012 ldrh.w r2, [sp, #18] 8036498: 3101 adds r1, #1 803649a: 1871 adds r1, r6, r1 803649c: 4620 mov r0, r4 803649e: b289 uxth r1, r1 80364a0: f105 030c add.w r3, r5, #12 80364a4: f7fc ffb9 bl 803341a if (derr != ERR_OK) 80364a8: 2800 cmp r0, #0 80364aa: d1d8 bne.n 803645e { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets + len); 80364ac: f89d 200e ldrb.w r2, [sp, #14] 80364b0: f8bd 3012 ldrh.w r3, [sp, #18] 80364b4: 18d3 adds r3, r2, r3 80364b6: 18f6 adds r6, r6, r3 80364b8: b2b6 uxth r6, r6 80364ba: 1c77 adds r7, r6, #1 80364bc: b2bf uxth r7, r7 snmp_asn1_dec_type(p, ofs, &type); 80364be: 4639 mov r1, r7 80364c0: f10d 020f add.w r2, sp, #15 80364c4: 4620 mov r0, r4 80364c6: f7fc febd bl 8033244 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 80364ca: 1cb1 adds r1, r6, #2 80364cc: 4620 mov r0, r4 80364ce: b289 uxth r1, r1 80364d0: f10d 020e add.w r2, sp, #14 80364d4: f10d 0312 add.w r3, sp, #18 80364d8: f7fc fec9 bl 803326e if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 80364dc: 2800 cmp r0, #0 80364de: d1be bne.n 803645e 80364e0: f89d 300f ldrb.w r3, [sp, #15] 80364e4: 2b02 cmp r3, #2 80364e6: d1ba bne.n 803645e 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); 80364e8: f89d 100e ldrb.w r1, [sp, #14] 80364ec: f8bd 2012 ldrh.w r2, [sp, #18] 80364f0: 3101 adds r1, #1 80364f2: 1879 adds r1, r7, r1 80364f4: 4620 mov r0, r4 80364f6: b289 uxth r1, r1 80364f8: f105 0310 add.w r3, r5, #16 80364fc: f7fc ff8d bl 803341a if (derr != ERR_OK) 8036500: 2800 cmp r0, #0 8036502: d1ac bne.n 803645e { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } switch (m_stat->error_status) 8036504: 692b ldr r3, [r5, #16] 8036506: 3b01 subs r3, #1 8036508: 2b04 cmp r3, #4 803650a: d81b bhi.n 8036544 803650c: e8df f003 tbb [pc, r3] 8036510: 0c090603 .word 0x0c090603 8036514: 18 .byte 0x18 8036515: 00 .byte 0x00 { case SNMP_ES_TOOBIG: snmp_inc_snmpintoobigs(); 8036516: f7fe fcad bl 8034e74 803651a: e013 b.n 8036544 break; case SNMP_ES_NOSUCHNAME: snmp_inc_snmpinnosuchnames(); 803651c: f7fe fcb2 bl 8034e84 8036520: e010 b.n 8036544 break; case SNMP_ES_BADVALUE: snmp_inc_snmpinbadvalues(); 8036522: f7fe fcb7 bl 8034e94 8036526: e00d b.n 8036544 break; case SNMP_ES_READONLY: snmp_inc_snmpinreadonlys(); 8036528: f7fe fcbc bl 8034ea4 803652c: e00a b.n 8036544 803652e: bf00 nop 8036530: 2000f6f0 .word 0x2000f6f0 8036534: 2000f708 .word 0x2000f708 8036538: 2000d195 .word 0x2000d195 803653c: 2000d1a9 .word 0x2000d1a9 break; case SNMP_ES_GENERROR: snmp_inc_snmpingenerrs(); 8036540: f7fe fcb8 bl 8034eb4 break; } ofs += (1 + len_octets + len); 8036544: f89d 200e ldrb.w r2, [sp, #14] 8036548: f8bd 3012 ldrh.w r3, [sp, #18] 803654c: 18d3 adds r3, r2, r3 803654e: 18ff adds r7, r7, r3 8036550: b2bf uxth r7, r7 8036552: 1c7d adds r5, r7, #1 8036554: b2ad uxth r5, r5 snmp_asn1_dec_type(p, ofs, &type); 8036556: 4629 mov r1, r5 8036558: f10d 020f add.w r2, sp, #15 803655c: 4620 mov r0, r4 803655e: f7fc fe71 bl 8033244 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8036562: 1cb9 adds r1, r7, #2 8036564: 4620 mov r0, r4 8036566: b289 uxth r1, r1 8036568: f10d 020e add.w r2, sp, #14 803656c: f10d 0312 add.w r3, sp, #18 8036570: f7fc fe7d bl 803326e if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 8036574: 2800 cmp r0, #0 8036576: f47f af72 bne.w 803645e 803657a: f89d 300f ldrb.w r3, [sp, #15] 803657e: 2b02 cmp r3, #2 8036580: f47f af6d bne.w 803645e 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); 8036584: f89d 100e ldrb.w r1, [sp, #14] 8036588: f8bd 2012 ldrh.w r2, [sp, #18] 803658c: 4b3a ldr r3, [pc, #232] ; (8036678 ) 803658e: 3101 adds r1, #1 8036590: 1869 adds r1, r5, r1 8036592: 4620 mov r0, r4 8036594: b289 uxth r1, r1 8036596: f7fc ff40 bl 803341a if (derr != ERR_OK) 803659a: 2800 cmp r0, #0 803659c: f47f af5f bne.w 803645e { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets + len); 80365a0: f8bd 3012 ldrh.w r3, [sp, #18] 80365a4: f89d 200e ldrb.w r2, [sp, #14] 80365a8: 3301 adds r3, #1 80365aa: 189b adds r3, r3, r2 80365ac: 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) && 80365ae: 4b33 ldr r3, [pc, #204] ; (803667c ) /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets + len); *ofs_ret = ofs; 80365b0: 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) && 80365b4: 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) || 80365b6: b132 cbz r2, 80365c6 ((msg_ps->rt != SNMP_ASN1_PDU_GET_REQ) && (msg_ps->rt != SNMP_ASN1_PDU_GET_NEXT_REQ) && 80365b8: 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) && 80365ba: 2a01 cmp r2, #1 80365bc: d003 beq.n 80365c6 (msg_ps->rt != SNMP_ASN1_PDU_GET_NEXT_REQ) && (msg_ps->rt != SNMP_ASN1_PDU_SET_REQ)) || 80365be: 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) && 80365c0: 2a03 cmp r2, #3 80365c2: f47f ae7b bne.w 80362bc (msg_ps->rt != SNMP_ASN1_PDU_SET_REQ)) || ((msg_ps->error_status != SNMP_ES_NOERROR) || 80365c6: 691b ldr r3, [r3, #16] 80365c8: 4d2c ldr r5, [pc, #176] ; (803667c ) /* 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)) || 80365ca: 2b00 cmp r3, #0 80365cc: f47f ae76 bne.w 80362bc ((msg_ps->error_status != SNMP_ES_NOERROR) || (msg_ps->error_index != 0)) ) 80365d0: 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) || 80365d2: 2b00 cmp r3, #0 80365d4: f47f ae72 bne.w 80362bc } 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); 80365d8: aa06 add r2, sp, #24 80365da: 4620 mov r0, r4 80365dc: f832 1d08 ldrh.w r1, [r2, #-8]! 80365e0: 462b mov r3, r5 80365e2: f7ff fd01 bl 8035fe8 80365e6: 4606 mov r6, r0 /* we've decoded the incoming message, release input msg now */ pbuf_free(p); 80365e8: 4620 mov r0, r4 80365ea: f7f9 fc0f bl 802fe0c if ((err_ret != ERR_OK) || (msg_ps->invb.count == 0)) 80365ee: 2e00 cmp r6, #0 80365f0: d13f bne.n 8036672 80365f2: f895 3108 ldrb.w r3, [r5, #264] ; 0x108 80365f6: 2b00 cmp r3, #0 80365f8: d03b beq.n 8036672 } 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; 80365fa: 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; 80365fc: 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); 80365fe: 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; 8036600: 616e str r6, [r5, #20] /* find object for each variable binding */ msg_ps->state = SNMP_MSG_SEARCH_OBJ; 8036602: f885 305a strb.w r3, [r5, #90] ; 0x5a /* first variable binding from list to inspect */ msg_ps->vb_idx = 0; 8036606: 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); 803660a: f7ff f94d bl 80358a8 803660e: e030 b.n 8036672 pbuf_free(p); return; } /* accepting request */ snmp_inc_snmpinpkts(); 8036610: f7fe fc08 bl 8034e24 /* record used 'protocol control block' */ msg_ps->pcb = pcb; /* source address (network order) */ msg_ps->sip = *addr; 8036614: f8d9 3000 ldr.w r3, [r9] } /* accepting request */ snmp_inc_snmpinpkts(); /* record used 'protocol control block' */ msg_ps->pcb = pcb; 8036618: f8c5 8000 str.w r8, [r5] /* source address (network order) */ msg_ps->sip = *addr; 803661c: 606b str r3, [r5, #4] /* source port (host order (lwIP oddity)) */ msg_ps->sp = port; 803661e: 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); 8036622: 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; 8036624: 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); 8036626: f10d 020f add.w r2, sp, #15 803662a: 4620 mov r0, r4 803662c: f7fc fe0a bl 8033244 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8036630: 4620 mov r0, r4 8036632: 2101 movs r1, #1 8036634: f10d 020e add.w r2, sp, #14 8036638: f10d 0312 add.w r3, sp, #18 803663c: f7fc fe17 bl 803326e if ((derr != ERR_OK) || 8036640: 2800 cmp r0, #0 8036642: f43f ae3f beq.w 80362c4 8036646: e70a b.n 803645e if (derr != ERR_OK) { /* unsupported input PDU for this agent (no parse error) */ return ERR_ARG; } m_stat->rt = type & 0x1F; 8036648: f89d 300f ldrb.w r3, [sp, #15] 803664c: 4d0b ldr r5, [pc, #44] ; (803667c ) 803664e: f003 031f and.w r3, r3, #31 8036652: 72ab strb r3, [r5, #10] ofs += (1 + len_octets); 8036654: f89d 300e ldrb.w r3, [sp, #14] 8036658: 4498 add r8, r3 803665a: fa1f f888 uxth.w r8, r8 803665e: f108 0601 add.w r6, r8, #1 8036662: b2b6 uxth r6, r6 if (len != (pdu_len - (ofs - ofs_base))) 8036664: f8bd 3012 ldrh.w r3, [sp, #18] 8036668: 1bbf subs r7, r7, r6 803666a: 42bb cmp r3, r7 803666c: f43f aefa beq.w 8036464 8036670: e6f5 b.n 803645e 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); } 8036672: b007 add sp, #28 8036674: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 8036678: 2000f704 .word 0x2000f704 803667c: 2000f6f0 .word 0x2000f6f0 08036680 : * @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) { 8036680: 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; 8036682: 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) { 8036684: 4606 mov r6, r0 u32_t *uint_ptr; s32_t *sint_ptr; u16_t tot_len; tot_len = 0; vb = root->tail; 8036686: 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; 8036688: 462f mov r7, r5 s32_t *sint_ptr; u16_t tot_len; tot_len = 0; vb = root->tail; while ( vb != NULL ) 803668a: e051 b.n 8036730 { /* encoded value lenght depends on type */ switch (vb->value_type) 803668c: 7c23 ldrb r3, [r4, #16] 803668e: 2b06 cmp r3, #6 8036690: d020 beq.n 80366d4 8036692: d805 bhi.n 80366a0 8036694: 2b02 cmp r3, #2 8036696: d00c beq.n 80366b2 8036698: d324 bcc.n 80366e4 803669a: 2b04 cmp r3, #4 803669c: d322 bcc.n 80366e4 803669e: e016 b.n 80366ce 80366a0: 2b43 cmp r3, #67 ; 0x43 80366a2: d803 bhi.n 80366ac 80366a4: 2b41 cmp r3, #65 ; 0x41 80366a6: d20b bcs.n 80366c0 80366a8: 2b40 cmp r3, #64 ; 0x40 80366aa: e000 b.n 80366ae 80366ac: 2b44 cmp r3, #68 ; 0x44 80366ae: d119 bne.n 80366e4 80366b0: e00d b.n 80366ce { 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); 80366b2: 6963 ldr r3, [r4, #20] 80366b4: f104 0120 add.w r1, r4, #32 80366b8: 6818 ldr r0, [r3, #0] 80366ba: f7fc fffa bl 80336b2 break; 80366be: e012 b.n 80366e6 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); 80366c0: 6963 ldr r3, [r4, #20] 80366c2: f104 0120 add.w r1, r4, #32 80366c6: 6818 ldr r0, [r3, #0] 80366c8: f7fc ffde bl 8033688 break; 80366cc: e00b b.n 80366e6 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; 80366ce: 7c63 ldrb r3, [r4, #17] 80366d0: 8423 strh r3, [r4, #32] break; 80366d2: e008 b.n 80366e6 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); 80366d4: 7c60 ldrb r0, [r4, #17] 80366d6: 6961 ldr r1, [r4, #20] 80366d8: 0880 lsrs r0, r0, #2 80366da: f104 0220 add.w r2, r4, #32 80366de: f7fc fffd bl 80336dc break; 80366e2: e000 b.n 80366e6 default: /* unsupported type */ vb->vlen = 0; 80366e4: 8427 strh r7, [r4, #32] break; }; /* encoding length of value length field */ snmp_asn1_enc_length_cnt(vb->vlen, &vb->vlenlen); 80366e6: 8c20 ldrh r0, [r4, #32] 80366e8: f104 011a add.w r1, r4, #26 80366ec: f7fc ffc1 bl 8033672 snmp_asn1_enc_oid_cnt(vb->ident_len, vb->ident, &vb->olen); 80366f0: f104 021e add.w r2, r4, #30 80366f4: 7a20 ldrb r0, [r4, #8] 80366f6: 68e1 ldr r1, [r4, #12] 80366f8: f7fc fff0 bl 80336dc snmp_asn1_enc_length_cnt(vb->olen, &vb->olenlen); 80366fc: 8be0 ldrh r0, [r4, #30] 80366fe: f104 0119 add.w r1, r4, #25 8036702: f7fc ffb6 bl 8033672 vb->seqlen = 1 + vb->vlenlen + vb->vlen; 8036706: 8be3 ldrh r3, [r4, #30] 8036708: 8c20 ldrh r0, [r4, #32] 803670a: 18c0 adds r0, r0, r3 803670c: 7ea3 ldrb r3, [r4, #26] vb->seqlen += 1 + vb->olenlen + vb->olen; 803670e: 3002 adds r0, #2 8036710: 18c0 adds r0, r0, r3 8036712: 7e63 ldrb r3, [r4, #25] 8036714: 18c0 adds r0, r0, r3 8036716: b280 uxth r0, r0 8036718: 83a0 strh r0, [r4, #28] snmp_asn1_enc_length_cnt(vb->seqlen, &vb->seqlenlen); 803671a: f104 0118 add.w r1, r4, #24 803671e: f7fc ffa8 bl 8033672 /* varbind seq */ tot_len += 1 + vb->seqlenlen + vb->seqlen; 8036722: 8ba3 ldrh r3, [r4, #28] 8036724: 7e22 ldrb r2, [r4, #24] vb = vb->prev; 8036726: 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; 8036728: 3301 adds r3, #1 803672a: 189b adds r3, r3, r2 803672c: 18ed adds r5, r5, r3 803672e: b2ad uxth r5, r5 s32_t *sint_ptr; u16_t tot_len; tot_len = 0; vb = root->tail; while ( vb != NULL ) 8036730: 2c00 cmp r4, #0 8036732: d1ab bne.n 803668c vb = vb->prev; } /* varbind-list seq */ root->seqlen = tot_len; snmp_asn1_enc_length_cnt(root->seqlen, &root->seqlenlen); 8036734: 4628 mov r0, r5 vb = vb->prev; } /* varbind-list seq */ root->seqlen = tot_len; 8036736: 8175 strh r5, [r6, #10] snmp_asn1_enc_length_cnt(root->seqlen, &root->seqlenlen); 8036738: f106 0109 add.w r1, r6, #9 803673c: f7fc ff99 bl 8033672 tot_len += 1 + root->seqlenlen; 8036740: 7a73 ldrb r3, [r6, #9] 8036742: 3301 adds r3, #1 8036744: 18e8 adds r0, r5, r3 return tot_len; } 8036746: b280 uxth r0, r0 8036748: bdf8 pop {r3, r4, r5, r6, r7, pc} 803674a: 0000 movs r0, r0 0803674c : * @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) { 803674c: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8036750: 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); 8036752: 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) { 8036756: 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); 8036758: 6940 ldr r0, [r0, #20] 803675a: f504 7190 add.w r1, r4, #288 ; 0x120 803675e: f7fc ffa8 bl 80336b2 snmp_asn1_enc_length_cnt(rhl->erridxlen, &rhl->erridxlenlen); 8036762: f8b4 0120 ldrh.w r0, [r4, #288] ; 0x120 8036766: 4629 mov r1, r5 8036768: f7fc ff83 bl 8033672 tot_len += 1 + rhl->erridxlenlen + rhl->erridxlen; snmp_asn1_enc_s32t_cnt(m_stat->error_status, &rhl->errstatlen); 803676c: 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; 803676e: f894 8118 ldrb.w r8, [r4, #280] ; 0x118 8036772: f8b4 a120 ldrh.w sl, [r4, #288] ; 0x120 snmp_asn1_enc_s32t_cnt(m_stat->error_status, &rhl->errstatlen); 8036776: f504 7191 add.w r1, r4, #290 ; 0x122 803677a: f7fc ff9a bl 80336b2 snmp_asn1_enc_length_cnt(rhl->errstatlen, &rhl->errstatlenlen); 803677e: 1c69 adds r1, r5, #1 8036780: f8b4 0122 ldrh.w r0, [r4, #290] ; 0x122 8036784: f7fc ff75 bl 8033672 tot_len += 1 + rhl->errstatlenlen + rhl->errstatlen; 8036788: f8b4 9122 ldrh.w r9, [r4, #290] ; 0x122 snmp_asn1_enc_s32t_cnt(m_stat->rid, &rhl->ridlen); 803678c: 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; 803678e: f894 6119 ldrb.w r6, [r4, #281] ; 0x119 snmp_asn1_enc_s32t_cnt(m_stat->rid, &rhl->ridlen); 8036792: f504 7192 add.w r1, r4, #292 ; 0x124 8036796: f7fc ff8c bl 80336b2 snmp_asn1_enc_length_cnt(rhl->ridlen, &rhl->ridlenlen); 803679a: f8b4 0124 ldrh.w r0, [r4, #292] ; 0x124 803679e: f504 718d add.w r1, r4, #282 ; 0x11a 80367a2: f7fc ff66 bl 8033672 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; 80367a6: 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; 80367a8: f8b4 3124 ldrh.w r3, [r4, #292] ; 0x124 80367ac: f109 0903 add.w r9, r9, #3 80367b0: 4499 add r9, r3 80367b2: 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; 80367b6: f894 311a ldrb.w r3, [r4, #282] ; 0x11a 80367ba: 4446 add r6, r8 80367bc: 18f6 adds r6, r6, r3 80367be: fa17 f686 uxtah r6, r7, r6 80367c2: b2b6 uxth r6, r6 rhl->pdulen = tot_len; snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); 80367c4: 1ce9 adds r1, r5, #3 80367c6: 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; 80367c8: f8a4 6126 strh.w r6, [r4, #294] ; 0x126 snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); 80367cc: f7fc ff51 bl 8033672 tot_len += 1 + rhl->pdulenlen; rhl->comlen = m_stat->com_strlen; 80367d0: 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; 80367d4: f894 811b ldrb.w r8, [r4, #283] ; 0x11b rhl->comlen = m_stat->com_strlen; 80367d8: f8a4 0128 strh.w r0, [r4, #296] ; 0x128 snmp_asn1_enc_length_cnt(rhl->comlen, &rhl->comlenlen); 80367dc: f504 718e add.w r1, r4, #284 ; 0x11c 80367e0: f7fc ff47 bl 8033672 tot_len += 1 + rhl->comlenlen + rhl->comlen; snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); 80367e4: 4b14 ldr r3, [pc, #80] ; (8036838 ) 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; 80367e6: f894 711c ldrb.w r7, [r4, #284] ; 0x11c snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); 80367ea: 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; 80367ec: f8b4 9128 ldrh.w r9, [r4, #296] ; 0x128 snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); 80367f0: f504 7195 add.w r1, r4, #298 ; 0x12a 80367f4: f7fc ff5d bl 80336b2 snmp_asn1_enc_length_cnt(rhl->verlen, &rhl->verlenlen); 80367f8: 1d69 adds r1, r5, #5 80367fa: f8b4 012a ldrh.w r0, [r4, #298] ; 0x12a 80367fe: f7fc ff38 bl 8033672 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; 8036802: 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; 8036806: 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; 803680a: 444d add r5, r9 803680c: 3503 adds r5, #3 803680e: 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; 8036810: 197d adds r5, r7, r5 8036812: 18ed adds r5, r5, r3 8036814: fa16 f585 uxtah r5, r6, r5 8036818: b2ad uxth r5, r5 rhl->seqlen = tot_len; snmp_asn1_enc_length_cnt(rhl->seqlen, &rhl->seqlenlen); 803681a: 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; 803681c: f8a4 512c strh.w r5, [r4, #300] ; 0x12c snmp_asn1_enc_length_cnt(rhl->seqlen, &rhl->seqlenlen); 8036820: f504 718f add.w r1, r4, #286 ; 0x11e 8036824: f7fc ff25 bl 8033672 tot_len += 1 + rhl->seqlenlen; 8036828: f894 311e ldrb.w r3, [r4, #286] ; 0x11e 803682c: 3301 adds r3, #1 803682e: 18e8 adds r0, r5, r3 return tot_len; } 8036830: b280 uxth r0, r0 8036832: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 8036836: bf00 nop 8036838: 0804592c .word 0x0804592c 0803683c : /** * 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) { 803683c: b570 push {r4, r5, r6, lr} 803683e: 4616 mov r6, r2 8036840: 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; 8036842: 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) { 8036844: 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)); 8036846: 4608 mov r0, r1 ofs += 1; 8036848: 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)); 803684a: 4611 mov r1, r2 803684c: 2230 movs r2, #48 ; 0x30 803684e: f7fc ff5d bl 803370c ofs += 1; snmp_asn1_enc_length(p, ofs, root->seqlen); 8036852: 4628 mov r0, r5 8036854: 4631 mov r1, r6 8036856: 8962 ldrh r2, [r4, #10] 8036858: f7fc ff6c bl 8033734 ofs += root->seqlenlen; 803685c: 7a63 ldrb r3, [r4, #9] 803685e: e064 b.n 803692a vb = root->head; while ( vb != NULL ) { snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); 8036860: 4631 mov r1, r6 ofs += 1; 8036862: 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)); 8036864: 2230 movs r2, #48 ; 0x30 ofs += 1; 8036866: 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)); 8036868: 4628 mov r0, r5 803686a: f7fc ff4f bl 803370c ofs += 1; snmp_asn1_enc_length(p, ofs, vb->seqlen); 803686e: 4631 mov r1, r6 8036870: 8ba2 ldrh r2, [r4, #28] 8036872: 4628 mov r0, r5 8036874: f7fc ff5e bl 8033734 ofs += vb->seqlenlen; 8036878: 7e23 ldrb r3, [r4, #24] 803687a: 18f6 adds r6, r6, r3 803687c: b2b6 uxth r6, r6 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); 803687e: 4631 mov r1, r6 ofs += 1; 8036880: 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)); 8036882: 2206 movs r2, #6 ofs += 1; 8036884: 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)); 8036886: 4628 mov r0, r5 8036888: f7fc ff40 bl 803370c ofs += 1; snmp_asn1_enc_length(p, ofs, vb->olen); 803688c: 4631 mov r1, r6 803688e: 8be2 ldrh r2, [r4, #30] 8036890: 4628 mov r0, r5 8036892: f7fc ff4f bl 8033734 ofs += vb->olenlen; 8036896: 7e63 ldrb r3, [r4, #25] snmp_asn1_enc_oid(p, ofs, vb->ident_len, &vb->ident[0]); 8036898: 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; 803689a: 18f6 adds r6, r6, r3 803689c: b2b6 uxth r6, r6 snmp_asn1_enc_oid(p, ofs, vb->ident_len, &vb->ident[0]); 803689e: 4631 mov r1, r6 80368a0: 68e3 ldr r3, [r4, #12] 80368a2: 4628 mov r0, r5 80368a4: f7fc fffb bl 803389e ofs += vb->olen; 80368a8: 8be3 ldrh r3, [r4, #30] snmp_asn1_enc_type(p, ofs, vb->value_type); 80368aa: 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; 80368ac: 18f6 adds r6, r6, r3 80368ae: b2b6 uxth r6, r6 snmp_asn1_enc_type(p, ofs, vb->value_type); 80368b0: 4631 mov r1, r6 ofs += 1; 80368b2: 3601 adds r6, #1 80368b4: 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); 80368b6: 4628 mov r0, r5 80368b8: f7fc ff28 bl 803370c ofs += 1; snmp_asn1_enc_length(p, ofs, vb->vlen); 80368bc: 4631 mov r1, r6 80368be: 4628 mov r0, r5 80368c0: 8c22 ldrh r2, [r4, #32] 80368c2: f7fc ff37 bl 8033734 ofs += vb->vlenlen; 80368c6: 7ea3 ldrb r3, [r4, #26] 80368c8: 18f6 adds r6, r6, r3 switch (vb->value_type) 80368ca: 7c23 ldrb r3, [r4, #16] 80368cc: 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; 80368ce: b2b6 uxth r6, r6 switch (vb->value_type) 80368d0: d01c beq.n 803690c 80368d2: d806 bhi.n 80368e2 80368d4: 2b04 cmp r3, #4 80368d6: d019 beq.n 803690c 80368d8: 2b06 cmp r3, #6 80368da: d01e beq.n 803691a 80368dc: 2b02 cmp r3, #2 80368de: d123 bne.n 8036928 80368e0: e004 b.n 80368ec 80368e2: 2b43 cmp r3, #67 ; 0x43 80368e4: d90a bls.n 80368fc 80368e6: 2b44 cmp r3, #68 ; 0x44 80368e8: d11e bne.n 8036928 80368ea: e00f b.n 803690c { 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); 80368ec: 6963 ldr r3, [r4, #20] 80368ee: 8c22 ldrh r2, [r4, #32] 80368f0: 681b ldr r3, [r3, #0] 80368f2: 4628 mov r0, r5 80368f4: 4631 mov r1, r6 80368f6: f7fc ffa5 bl 8033844 break; 80368fa: e015 b.n 8036928 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); 80368fc: 6963 ldr r3, [r4, #20] 80368fe: 8c22 ldrh r2, [r4, #32] 8036900: 681b ldr r3, [r3, #0] 8036902: 4628 mov r0, r5 8036904: 4631 mov r1, r6 8036906: f7fc ff5d bl 80337c4 break; 803690a: e00d b.n 8036928 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); 803690c: 4628 mov r0, r5 803690e: 4631 mov r1, r6 8036910: 8c22 ldrh r2, [r4, #32] 8036912: 6963 ldr r3, [r4, #20] 8036914: f7fd f836 bl 8033984 break; 8036918: e006 b.n 8036928 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); 803691a: 7c62 ldrb r2, [r4, #17] 803691c: 6963 ldr r3, [r4, #20] 803691e: 4628 mov r0, r5 8036920: 4631 mov r1, r6 8036922: 0892 lsrs r2, r2, #2 8036924: f7fc ffbb bl 803389e break; default: /* unsupported type */ break; }; ofs += vb->vlen; 8036928: 8c23 ldrh r3, [r4, #32] vb = vb->next; 803692a: 6824 ldr r4, [r4, #0] break; default: /* unsupported type */ break; }; ofs += vb->vlen; 803692c: 18f6 adds r6, r6, r3 803692e: b2b6 uxth r6, r6 ofs += 1; snmp_asn1_enc_length(p, ofs, root->seqlen); ofs += root->seqlenlen; vb = root->head; while ( vb != NULL ) 8036930: 2c00 cmp r4, #0 8036932: d195 bne.n 8036860 }; ofs += vb->vlen; vb = vb->next; } return ofs; } 8036934: 4630 mov r0, r6 8036936: bd70 pop {r4, r5, r6, pc} 08036938 : * @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) 8036938: b908 cbnz r0, 803693e { trap_dst[dst_idx].enable = enable; 803693a: 4b01 ldr r3, [pc, #4] ; (8036940 ) 803693c: 7119 strb r1, [r3, #4] 803693e: 4770 bx lr 8036940: 2000f820 .word 0x2000f820 08036944 : * @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) 8036944: b918 cbnz r0, 803694e { ip_addr_set(&trap_dst[dst_idx].dip, dst); 8036946: b101 cbz r1, 803694a 8036948: 6809 ldr r1, [r1, #0] 803694a: 4b01 ldr r3, [pc, #4] ; (8036950 ) 803694c: 6019 str r1, [r3, #0] 803694e: 4770 bx lr 8036950: 2000f820 .word 0x2000f820 08036954 : * @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) { 8036954: b5f0 push {r4, r5, r6, r7, lr} 8036956: 4604 mov r4, r0 8036958: b085 sub sp, #20 struct snmp_varbind_root emptyvb = {NULL, NULL, 0, 0, 0}; 803695a: 220c movs r2, #12 803695c: 2100 movs r1, #0 803695e: 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); 8036960: 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}; 8036964: f7eb f8cc 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); 8036968: 4630 mov r0, r6 803696a: f7ff fe89 bl 8036680 803696e: 4601 mov r1, r0 tot_len = snmp_resp_header_sum(m_stat, tot_len); 8036970: 4620 mov r0, r4 8036972: f7ff feeb bl 803674c /* try allocating pbuf(s) for complete response */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 8036976: 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); 8036978: 4601 mov r1, r0 /* try allocating pbuf(s) for complete response */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 803697a: 2000 movs r0, #0 803697c: f7f9 fa93 bl 802fea6 if (p == NULL) 8036980: 4605 mov r5, r0 8036982: b990 cbnz r0, 80369aa { 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; 8036984: 2301 movs r3, #1 8036986: 6123 str r3, [r4, #16] m_stat->error_index = 0; 8036988: 6160 str r0, [r4, #20] /* pass 0, recalculate lengths, for empty varbind-list */ tot_len = snmp_varbind_list_sum(&emptyvb); 803698a: a801 add r0, sp, #4 803698c: f7ff fe78 bl 8036680 8036990: 4601 mov r1, r0 tot_len = snmp_resp_header_sum(m_stat, tot_len); 8036992: 4620 mov r0, r4 8036994: f7ff feda bl 803674c /* retry allocation once for header and empty varbind-list */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 8036998: 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); 803699a: 4601 mov r1, r0 /* retry allocation once for header and empty varbind-list */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 803699c: 4628 mov r0, r5 803699e: f7f9 fa82 bl 802fea6 } if (p != NULL) 80369a2: 4605 mov r5, r0 80369a4: 2800 cmp r0, #0 80369a6: f000 80dc beq.w 8036b62 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)); 80369aa: 2100 movs r1, #0 80369ac: 2230 movs r2, #48 ; 0x30 80369ae: 4628 mov r0, r5 80369b0: f7fc feac bl 803370c ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.seqlen); 80369b4: 2101 movs r1, #1 80369b6: f8b4 212c ldrh.w r2, [r4, #300] ; 0x12c 80369ba: 4628 mov r0, r5 80369bc: f7fc feba bl 8033734 ofs += m_stat->rhl.seqlenlen; 80369c0: f894 711e ldrb.w r7, [r4, #286] ; 0x11e snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 80369c4: 2202 movs r2, #2 80369c6: 1c79 adds r1, r7, #1 80369c8: 4628 mov r0, r5 ofs += 1; 80369ca: 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)); 80369cc: f7fc fe9e bl 803370c ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.verlen); 80369d0: 4639 mov r1, r7 80369d2: f8b4 212a ldrh.w r2, [r4, #298] ; 0x12a 80369d6: 4628 mov r0, r5 80369d8: f7fc feac bl 8033734 ofs += m_stat->rhl.verlenlen; 80369dc: f894 311d ldrb.w r3, [r4, #285] ; 0x11d snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.verlen, snmp_version); 80369e0: 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; 80369e4: 18ff adds r7, r7, r3 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.verlen, snmp_version); 80369e6: 4b61 ldr r3, [pc, #388] ; (8036b6c ) 80369e8: 4639 mov r1, r7 80369ea: 681b ldr r3, [r3, #0] 80369ec: 4628 mov r0, r5 80369ee: f7fc ff29 bl 8033844 ofs += m_stat->rhl.verlen; 80369f2: f8b4 312a ldrh.w r3, [r4, #298] ; 0x12a 80369f6: 18ff adds r7, r7, r3 80369f8: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); 80369fa: 4639 mov r1, r7 ofs += 1; 80369fc: 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)); 80369fe: 2204 movs r2, #4 ofs += 1; 8036a00: 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)); 8036a02: 4628 mov r0, r5 8036a04: f7fc fe82 bl 803370c ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.comlen); 8036a08: 4639 mov r1, r7 8036a0a: f8b4 2128 ldrh.w r2, [r4, #296] ; 0x128 8036a0e: 4628 mov r0, r5 8036a10: f7fc fe90 bl 8033734 ofs += m_stat->rhl.comlenlen; 8036a14: f894 311c ldrb.w r3, [r4, #284] ; 0x11c snmp_asn1_enc_raw(p, ofs, m_stat->rhl.comlen, m_stat->community); 8036a18: 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; 8036a1c: 18ff adds r7, r7, r3 8036a1e: b2bf uxth r7, r7 snmp_asn1_enc_raw(p, ofs, m_stat->rhl.comlen, m_stat->community); 8036a20: 4639 mov r1, r7 8036a22: f104 0318 add.w r3, r4, #24 8036a26: 4628 mov r0, r5 8036a28: f7fc ffac bl 8033984 ofs += m_stat->rhl.comlen; 8036a2c: f8b4 3128 ldrh.w r3, [r4, #296] ; 0x128 8036a30: 18ff adds r7, r7, r3 8036a32: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_RESP)); 8036a34: 4639 mov r1, r7 ofs += 1; 8036a36: 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)); 8036a38: 22a2 movs r2, #162 ; 0xa2 ofs += 1; 8036a3a: 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)); 8036a3c: 4628 mov r0, r5 8036a3e: f7fc fe65 bl 803370c ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.pdulen); 8036a42: 4639 mov r1, r7 8036a44: f8b4 2126 ldrh.w r2, [r4, #294] ; 0x126 8036a48: 4628 mov r0, r5 8036a4a: f7fc fe73 bl 8033734 ofs += m_stat->rhl.pdulenlen; 8036a4e: f894 311b ldrb.w r3, [r4, #283] ; 0x11b 8036a52: 18ff adds r7, r7, r3 8036a54: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8036a56: 4639 mov r1, r7 ofs += 1; 8036a58: 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)); 8036a5a: 2202 movs r2, #2 ofs += 1; 8036a5c: 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)); 8036a5e: 4628 mov r0, r5 8036a60: f7fc fe54 bl 803370c ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.ridlen); 8036a64: 4639 mov r1, r7 8036a66: f8b4 2124 ldrh.w r2, [r4, #292] ; 0x124 8036a6a: 4628 mov r0, r5 8036a6c: f7fc fe62 bl 8033734 ofs += m_stat->rhl.ridlenlen; 8036a70: f894 311a ldrb.w r3, [r4, #282] ; 0x11a snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.ridlen, m_stat->rid); 8036a74: 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; 8036a78: 18ff adds r7, r7, r3 8036a7a: b2bf uxth r7, r7 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.ridlen, m_stat->rid); 8036a7c: 4639 mov r1, r7 8036a7e: 68e3 ldr r3, [r4, #12] 8036a80: 4628 mov r0, r5 8036a82: f7fc fedf bl 8033844 ofs += m_stat->rhl.ridlen; 8036a86: f8b4 3124 ldrh.w r3, [r4, #292] ; 0x124 8036a8a: 18ff adds r7, r7, r3 8036a8c: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8036a8e: 4639 mov r1, r7 ofs += 1; 8036a90: 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)); 8036a92: 2202 movs r2, #2 ofs += 1; 8036a94: 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)); 8036a96: 4628 mov r0, r5 8036a98: f7fc fe38 bl 803370c ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.errstatlen); 8036a9c: 4639 mov r1, r7 8036a9e: f8b4 2122 ldrh.w r2, [r4, #290] ; 0x122 8036aa2: 4628 mov r0, r5 8036aa4: f7fc fe46 bl 8033734 ofs += m_stat->rhl.errstatlenlen; 8036aa8: f894 3119 ldrb.w r3, [r4, #281] ; 0x119 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.errstatlen, m_stat->error_status); 8036aac: 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; 8036ab0: 18ff adds r7, r7, r3 8036ab2: b2bf uxth r7, r7 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.errstatlen, m_stat->error_status); 8036ab4: 4639 mov r1, r7 8036ab6: 6923 ldr r3, [r4, #16] 8036ab8: 4628 mov r0, r5 8036aba: f7fc fec3 bl 8033844 ofs += m_stat->rhl.errstatlen; 8036abe: f8b4 3122 ldrh.w r3, [r4, #290] ; 0x122 8036ac2: 18ff adds r7, r7, r3 8036ac4: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8036ac6: 4639 mov r1, r7 ofs += 1; 8036ac8: 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)); 8036aca: 2202 movs r2, #2 ofs += 1; 8036acc: 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)); 8036ace: 4628 mov r0, r5 8036ad0: f7fc fe1c bl 803370c ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.erridxlen); 8036ad4: 4639 mov r1, r7 8036ad6: f8b4 2120 ldrh.w r2, [r4, #288] ; 0x120 8036ada: 4628 mov r0, r5 8036adc: f7fc fe2a bl 8033734 ofs += m_stat->rhl.erridxlenlen; 8036ae0: f894 3118 ldrb.w r3, [r4, #280] ; 0x118 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.erridxlen, m_stat->error_index); 8036ae4: 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; 8036ae8: 18ff adds r7, r7, r3 8036aea: b2bf uxth r7, r7 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.erridxlen, m_stat->error_index); 8036aec: 4639 mov r1, r7 8036aee: 6963 ldr r3, [r4, #20] 8036af0: 4628 mov r0, r5 8036af2: f7fc fea7 bl 8033844 ofs += m_stat->rhl.erridxlen; 8036af6: f8b4 3120 ldrh.w r3, [r4, #288] ; 0x120 8036afa: 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); 8036afc: 4630 mov r0, r6 8036afe: 4629 mov r1, r5 8036b00: b292 uxth r2, r2 8036b02: f7ff fe9b bl 803683c switch (m_stat->error_status) 8036b06: 6923 ldr r3, [r4, #16] 8036b08: 3b01 subs r3, #1 8036b0a: 2b04 cmp r3, #4 8036b0c: d80f bhi.n 8036b2e 8036b0e: e8df f003 tbb [pc, r3] 8036b12: 0603 .short 0x0603 8036b14: 0e09 .short 0x0e09 8036b16: 0c .byte 0x0c 8036b17: 00 .byte 0x00 { case SNMP_ES_TOOBIG: snmp_inc_snmpouttoobigs(); 8036b18: f7fe fa0c bl 8034f34 break; 8036b1c: e007 b.n 8036b2e case SNMP_ES_NOSUCHNAME: snmp_inc_snmpoutnosuchnames(); 8036b1e: f7fe fa11 bl 8034f44 break; 8036b22: e004 b.n 8036b2e case SNMP_ES_BADVALUE: snmp_inc_snmpoutbadvalues(); 8036b24: f7fe fa16 bl 8034f54 break; 8036b28: e001 b.n 8036b2e case SNMP_ES_GENERROR: snmp_inc_snmpoutgenerrs(); 8036b2a: f7fe fa1b bl 8034f64 break; } snmp_inc_snmpoutgetresponses(); 8036b2e: f7fe fa21 bl 8034f74 snmp_inc_snmpoutpkts(); 8036b32: f7fe f97f bl 8034e34 /** @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); 8036b36: 8922 ldrh r2, [r4, #8] 8036b38: 6820 ldr r0, [r4, #0] 8036b3a: 1d21 adds r1, r4, #4 8036b3c: f7fb ffa2 bl 8032a84 err = udp_send(m_stat->pcb, p); 8036b40: 4629 mov r1, r5 8036b42: 6820 ldr r0, [r4, #0] 8036b44: f7fb ff99 bl 8032a7a /** @todo release some memory, retry and return tooBig? tooMuchHassle? */ err = ERR_MEM; } else { err = ERR_OK; 8036b48: f1b0 3fff cmp.w r0, #4294967295 8036b4c: bf0c ite eq 8036b4e: f04f 36ff moveq.w r6, #4294967295 8036b52: 2600 movne r6, #0 } /** disassociate remote address and port with this pcb */ udp_disconnect(m_stat->pcb); 8036b54: 6820 ldr r0, [r4, #0] 8036b56: f7fb ffbb bl 8032ad0 pbuf_free(p); 8036b5a: 4628 mov r0, r5 8036b5c: f7f9 f956 bl 802fe0c 8036b60: e000 b.n 8036b64 } else { /* first pbuf alloc try or retry alloc failed very low on memory, couldn't return tooBig */ return ERR_MEM; 8036b62: 26ff movs r6, #255 ; 0xff } } 8036b64: b270 sxtb r0, r6 8036b66: b005 add sp, #20 8036b68: bdf0 pop {r4, r5, r6, r7, pc} 8036b6a: bf00 nop 8036b6c: 0804592c .word 0x0804592c 08036b70 : * 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) { 8036b70: 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)) 8036b74: 4b11 ldr r3, [pc, #68] ; (8036bbc ) * 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) { 8036b76: 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)) 8036b78: 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) { 8036b7a: b085 sub sp, #20 8036b7c: 4605 mov r5, r0 8036b7e: 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)) 8036b80: 2a00 cmp r2, #0 8036b82: f000 81b8 beq.w 8036ef6 8036b86: 6818 ldr r0, [r3, #0] 8036b88: 2800 cmp r0, #0 8036b8a: f000 81b4 beq.w 8036ef6 { /* network order trap destination */ ip_addr_copy(trap_msg.dip, td->dip); 8036b8e: 4c0c ldr r4, [pc, #48] ; (8036bc0 ) 8036b90: 6060 str r0, [r4, #4] /* lookup current source address for this dst */ dst_if = ip_route(&td->dip); 8036b92: 4618 mov r0, r3 8036b94: f7fc f9e6 bl 8032f64 ip_addr_copy(dst_ip, dst_if->ip_addr); 8036b98: 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; 8036b9a: 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); 8036b9c: 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); 8036ba0: 7323 strb r3, [r4, #12] trap_msg.sip_raw[1] = ip4_addr2(&dst_ip); 8036ba2: 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) 8036ba4: 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); 8036ba6: f3c3 4207 ubfx r2, r3, #16, #8 trap_msg.sip_raw[3] = ip4_addr4(&dst_ip); 8036baa: 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); 8036bae: 73a2 strb r2, [r4, #14] trap_msg.sip_raw[3] = ip4_addr4(&dst_ip); 8036bb0: 73e3 strb r3, [r4, #15] trap_msg.gen_trap = generic_trap; trap_msg.spc_trap = specific_trap; 8036bb2: 6167 str r7, [r4, #20] if (generic_trap == SNMP_GENTRAP_ENTERPRISESPC) 8036bb4: d106 bne.n 8036bc4 { /* enterprise-Specific trap */ trap_msg.enterprise = eoid; 8036bb6: 60a6 str r6, [r4, #8] 8036bb8: e008 b.n 8036bcc 8036bba: bf00 nop 8036bbc: 2000f820 .word 0x2000f820 8036bc0: 2000f828 .word 0x2000f828 } else { /* generic (MIB-II) trap */ snmp_get_snmpgrpid_ptr(&trap_msg.enterprise); 8036bc4: f104 0008 add.w r0, r4, #8 8036bc8: f7fe f9e4 bl 8034f94 } snmp_get_sysuptime(&trap_msg.ts); 8036bcc: 48bb ldr r0, [pc, #748] ; (8036ebc ) struct snmp_trap_header_lengths *thl; thl = &m_trap->thl; tot_len = vb_len; snmp_asn1_enc_u32t_cnt(m_trap->ts, &thl->tslen); 8036bce: 4cbc ldr r4, [pc, #752] ; (8036ec0 ) else { /* generic (MIB-II) trap */ snmp_get_snmpgrpid_ptr(&trap_msg.enterprise); } snmp_get_sysuptime(&trap_msg.ts); 8036bd0: f7fd fd42 bl 8034658 /* pass 0, calculate length fields */ tot_len = snmp_varbind_list_sum(&trap_msg.outvb); 8036bd4: 48bb ldr r0, [pc, #748] ; (8036ec4 ) 8036bd6: f7ff fd53 bl 8036680 struct snmp_trap_header_lengths *thl; thl = &m_trap->thl; tot_len = vb_len; snmp_asn1_enc_u32t_cnt(m_trap->ts, &thl->tslen); 8036bda: 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); 8036bde: 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); 8036be0: 69a0 ldr r0, [r4, #24] 8036be2: f7fc fd51 bl 8033688 snmp_asn1_enc_length_cnt(thl->tslen, &thl->tslenlen); 8036be6: 8e60 ldrh r0, [r4, #50] ; 0x32 8036be8: f104 0128 add.w r1, r4, #40 ; 0x28 8036bec: f7fc fd41 bl 8033672 tot_len += 1 + thl->tslen + thl->tslenlen; 8036bf0: f8b4 c032 ldrh.w ip, [r4, #50] ; 0x32 snmp_asn1_enc_s32t_cnt(m_trap->spc_trap, &thl->strplen); 8036bf4: 6960 ldr r0, [r4, #20] 8036bf6: f8cd c004 str.w ip, [sp, #4] 8036bfa: 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; 8036bfe: f894 9028 ldrb.w r9, [r4, #40] ; 0x28 snmp_asn1_enc_s32t_cnt(m_trap->spc_trap, &thl->strplen); 8036c02: f7fc fd56 bl 80336b2 snmp_asn1_enc_length_cnt(thl->strplen, &thl->strplenlen); 8036c06: 8ea0 ldrh r0, [r4, #52] ; 0x34 8036c08: f104 0129 add.w r1, r4, #41 ; 0x29 8036c0c: f7fc fd31 bl 8033672 tot_len += 1 + thl->strplen + thl->strplenlen; 8036c10: 8ea3 ldrh r3, [r4, #52] ; 0x34 snmp_asn1_enc_s32t_cnt(m_trap->gen_trap, &thl->gtrplen); 8036c12: 6920 ldr r0, [r4, #16] 8036c14: 9302 str r3, [sp, #8] 8036c16: 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; 8036c1a: 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; 8036c1e: 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); 8036c20: f7fc fd47 bl 80336b2 snmp_asn1_enc_length_cnt(thl->gtrplen, &thl->gtrplenlen); 8036c24: 8ee0 ldrh r0, [r4, #54] ; 0x36 8036c26: f104 012a add.w r1, r4, #42 ; 0x2a 8036c2a: f7fc fd22 bl 8033672 tot_len += 1 + thl->gtrplen + thl->gtrplenlen; thl->aaddrlen = 4; snmp_asn1_enc_length_cnt(thl->aaddrlen, &thl->aaddrlenlen); 8036c2e: 4628 mov r0, r5 8036c30: 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; 8036c34: f8b4 b036 ldrh.w fp, [r4, #54] ; 0x36 8036c38: f894 702a ldrb.w r7, [r4, #42] ; 0x2a thl->aaddrlen = 4; 8036c3c: 8725 strh r5, [r4, #56] ; 0x38 snmp_asn1_enc_length_cnt(thl->aaddrlen, &thl->aaddrlenlen); 8036c3e: f7fc fd18 bl 8033672 tot_len += 1 + thl->aaddrlen + thl->aaddrlenlen; 8036c42: f894 202b ldrb.w r2, [r4, #43] ; 0x2b snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); 8036c46: 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; 8036c48: 9203 str r2, [sp, #12] snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); 8036c4a: 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; 8036c4e: f8b4 a038 ldrh.w sl, [r4, #56] ; 0x38 snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); 8036c52: f104 023a add.w r2, r4, #58 ; 0x3a 8036c56: f7fc fd41 bl 80336dc snmp_asn1_enc_length_cnt(thl->eidlen, &thl->eidlenlen); 8036c5a: 8f60 ldrh r0, [r4, #58] ; 0x3a 8036c5c: f104 012c add.w r1, r4, #44 ; 0x2c 8036c60: f7fc fd07 bl 8033672 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; 8036c64: f8dd c004 ldr.w ip, [sp, #4] 8036c68: 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; 8036c6a: 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; 8036c6c: 4463 add r3, ip 8036c6e: 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; 8036c70: 449b add fp, r3 8036c72: 44da add sl, fp 8036c74: 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; 8036c78: 44d1 add r9, sl 8036c7a: 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; 8036c7c: 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; 8036c7e: 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; 8036c82: 19df adds r7, r3, r7 8036c84: f894 302c ldrb.w r3, [r4, #44] ; 0x2c 8036c88: 18ff adds r7, r7, r3 8036c8a: fa16 f687 uxtah r6, r6, r7 8036c8e: b2b6 uxth r6, r6 thl->pdulen = tot_len; snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); 8036c90: 4630 mov r0, r6 8036c92: f104 012d add.w r1, r4, #45 ; 0x2d tot_len += 1 + thl->pdulenlen; thl->comlen = sizeof(snmp_publiccommunity) - 1; 8036c96: 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; 8036c98: 87a6 strh r6, [r4, #60] ; 0x3c snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); 8036c9a: f7fc fcea bl 8033672 tot_len += 1 + thl->pdulenlen; thl->comlen = sizeof(snmp_publiccommunity) - 1; snmp_asn1_enc_length_cnt(thl->comlen, &thl->comlenlen); 8036c9e: 4638 mov r0, r7 8036ca0: 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; 8036ca4: f894 a02d ldrb.w sl, [r4, #45] ; 0x2d thl->comlen = sizeof(snmp_publiccommunity) - 1; 8036ca8: 87e7 strh r7, [r4, #62] ; 0x3e snmp_asn1_enc_length_cnt(thl->comlen, &thl->comlenlen); 8036caa: f7fc fce2 bl 8033672 tot_len += 1 + thl->comlenlen + thl->comlen; snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); 8036cae: 4b86 ldr r3, [pc, #536] ; (8036ec8 ) 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; 8036cb0: f894 902e ldrb.w r9, [r4, #46] ; 0x2e snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); 8036cb4: 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; 8036cb8: f8b4 b03e ldrh.w fp, [r4, #62] ; 0x3e snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); 8036cbc: 4640 mov r0, r8 8036cbe: f104 0140 add.w r1, r4, #64 ; 0x40 8036cc2: f7fc fcf6 bl 80336b2 snmp_asn1_enc_length_cnt(thl->verlen, &thl->verlenlen); 8036cc6: f8b4 0040 ldrh.w r0, [r4, #64] ; 0x40 8036cca: f104 012f add.w r1, r4, #47 ; 0x2f 8036cce: f7fc fcd0 bl 8033672 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; 8036cd2: f8b4 3040 ldrh.w r3, [r4, #64] ; 0x40 8036cd6: 449b add fp, r3 8036cd8: 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; 8036cdc: 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; 8036ce0: 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; 8036ce2: 44d1 add r9, sl 8036ce4: 4499 add r9, r3 8036ce6: fa16 f689 uxtah r6, r6, r9 8036cea: b2b6 uxth r6, r6 thl->seqlen = tot_len; snmp_asn1_enc_length_cnt(thl->seqlen, &thl->seqlenlen); 8036cec: 4630 mov r0, r6 8036cee: 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; 8036cf2: f8a4 6042 strh.w r6, [r4, #66] ; 0x42 snmp_asn1_enc_length_cnt(thl->seqlen, &thl->seqlenlen); 8036cf6: f7fc fcbc bl 8033672 tot_len += 1 + thl->seqlenlen; 8036cfa: f894 3030 ldrb.w r3, [r4, #48] ; 0x30 8036cfe: 3301 adds r3, #1 8036d00: 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); 8036d02: 2000 movs r0, #0 8036d04: b289 uxth r1, r1 8036d06: 2203 movs r2, #3 8036d08: f7f9 f8cd bl 802fea6 if (p != NULL) 8036d0c: 4606 mov r6, r0 8036d0e: 2800 cmp r0, #0 8036d10: f000 80f3 beq.w 8036efa 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)); 8036d14: 2100 movs r1, #0 8036d16: 2230 movs r2, #48 ; 0x30 8036d18: f7fc fcf8 bl 803370c ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.seqlen); 8036d1c: 2101 movs r1, #1 8036d1e: f8b4 2042 ldrh.w r2, [r4, #66] ; 0x42 8036d22: 4630 mov r0, r6 8036d24: f7fc fd06 bl 8033734 ofs += m_trap->thl.seqlenlen; 8036d28: f894 9030 ldrb.w r9, [r4, #48] ; 0x30 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8036d2c: 2202 movs r2, #2 8036d2e: f109 0101 add.w r1, r9, #1 8036d32: 4630 mov r0, r6 ofs += 1; 8036d34: 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)); 8036d38: f7fc fce8 bl 803370c ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.verlen); 8036d3c: 4649 mov r1, r9 8036d3e: f8b4 2040 ldrh.w r2, [r4, #64] ; 0x40 8036d42: 4630 mov r0, r6 8036d44: f7fc fcf6 bl 8033734 ofs += m_trap->thl.verlenlen; 8036d48: f894 302f ldrb.w r3, [r4, #47] ; 0x2f snmp_asn1_enc_s32t(p, ofs, m_trap->thl.verlen, snmp_version); 8036d4c: 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; 8036d50: 4499 add r9, r3 snmp_asn1_enc_s32t(p, ofs, m_trap->thl.verlen, snmp_version); 8036d52: 4649 mov r1, r9 8036d54: 4643 mov r3, r8 8036d56: 4630 mov r0, r6 8036d58: f7fc fd74 bl 8033844 ofs += m_trap->thl.verlen; 8036d5c: f8b4 3040 ldrh.w r3, [r4, #64] ; 0x40 8036d60: 4499 add r9, r3 8036d62: fa1f f989 uxth.w r9, r9 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); 8036d66: 462a mov r2, r5 ofs += 1; 8036d68: 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)); 8036d6c: 4649 mov r1, r9 ofs += 1; 8036d6e: 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)); 8036d70: 4630 mov r0, r6 8036d72: f7fc fccb bl 803370c ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.comlen); 8036d76: 4629 mov r1, r5 8036d78: 8fe2 ldrh r2, [r4, #62] ; 0x3e 8036d7a: 4630 mov r0, r6 8036d7c: f7fc fcda bl 8033734 ofs += m_trap->thl.comlenlen; 8036d80: f894 302e ldrb.w r3, [r4, #46] ; 0x2e snmp_asn1_enc_raw(p, ofs, m_trap->thl.comlen, (u8_t *)&snmp_publiccommunity[0]); 8036d84: 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; 8036d86: 18ed adds r5, r5, r3 8036d88: b2ad uxth r5, r5 snmp_asn1_enc_raw(p, ofs, m_trap->thl.comlen, (u8_t *)&snmp_publiccommunity[0]); 8036d8a: 4629 mov r1, r5 8036d8c: 4b4f ldr r3, [pc, #316] ; (8036ecc ) 8036d8e: 4630 mov r0, r6 8036d90: f7fc fdf8 bl 8033984 ofs += m_trap->thl.comlen; 8036d94: 8fe3 ldrh r3, [r4, #62] ; 0x3e 8036d96: 18ed adds r5, r5, r3 8036d98: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_TRAP)); 8036d9a: 4629 mov r1, r5 ofs += 1; 8036d9c: 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)); 8036d9e: 22a4 movs r2, #164 ; 0xa4 ofs += 1; 8036da0: 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)); 8036da2: 4630 mov r0, r6 8036da4: f7fc fcb2 bl 803370c ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.pdulen); 8036da8: 4629 mov r1, r5 8036daa: 8fa2 ldrh r2, [r4, #60] ; 0x3c 8036dac: 4630 mov r0, r6 8036dae: f7fc fcc1 bl 8033734 ofs += m_trap->thl.pdulenlen; 8036db2: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 8036db6: 18ed adds r5, r5, r3 8036db8: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); 8036dba: 4629 mov r1, r5 ofs += 1; 8036dbc: 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)); 8036dbe: 463a mov r2, r7 ofs += 1; 8036dc0: 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)); 8036dc2: 4630 mov r0, r6 8036dc4: f7fc fca2 bl 803370c ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.eidlen); 8036dc8: 4629 mov r1, r5 8036dca: 8f62 ldrh r2, [r4, #58] ; 0x3a 8036dcc: 4630 mov r0, r6 8036dce: f7fc fcb1 bl 8033734 ofs += m_trap->thl.eidlenlen; 8036dd2: f894 302c ldrb.w r3, [r4, #44] ; 0x2c 8036dd6: 18ed adds r5, r5, r3 snmp_asn1_enc_oid(p, ofs, m_trap->enterprise->len, &m_trap->enterprise->id[0]); 8036dd8: 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; 8036dda: b2ad uxth r5, r5 snmp_asn1_enc_oid(p, ofs, m_trap->enterprise->len, &m_trap->enterprise->id[0]); 8036ddc: 4629 mov r1, r5 8036dde: f813 2b04 ldrb.w r2, [r3], #4 8036de2: 4630 mov r0, r6 8036de4: f7fc fd5b bl 803389e ofs += m_trap->thl.eidlen; 8036de8: 8f63 ldrh r3, [r4, #58] ; 0x3a 8036dea: 18ed adds r5, r5, r3 8036dec: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR)); 8036dee: 4629 mov r1, r5 ofs += 1; 8036df0: 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)); 8036df2: 2240 movs r2, #64 ; 0x40 ofs += 1; 8036df4: 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)); 8036df6: 4630 mov r0, r6 8036df8: f7fc fc88 bl 803370c ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.aaddrlen); 8036dfc: 4629 mov r1, r5 8036dfe: 8f22 ldrh r2, [r4, #56] ; 0x38 8036e00: 4630 mov r0, r6 8036e02: f7fc fc97 bl 8033734 ofs += m_trap->thl.aaddrlenlen; 8036e06: f894 302b ldrb.w r3, [r4, #43] ; 0x2b snmp_asn1_enc_raw(p, ofs, m_trap->thl.aaddrlen, &m_trap->sip_raw[0]); 8036e0a: 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; 8036e0c: 18ed adds r5, r5, r3 8036e0e: b2ad uxth r5, r5 snmp_asn1_enc_raw(p, ofs, m_trap->thl.aaddrlen, &m_trap->sip_raw[0]); 8036e10: 4629 mov r1, r5 8036e12: f104 030c add.w r3, r4, #12 8036e16: 4630 mov r0, r6 8036e18: f7fc fdb4 bl 8033984 ofs += m_trap->thl.aaddrlen; 8036e1c: 8f23 ldrh r3, [r4, #56] ; 0x38 8036e1e: 18ed adds r5, r5, r3 8036e20: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8036e22: 4629 mov r1, r5 ofs += 1; 8036e24: 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)); 8036e26: 2202 movs r2, #2 ofs += 1; 8036e28: 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)); 8036e2a: 4630 mov r0, r6 8036e2c: f7fc fc6e bl 803370c ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.gtrplen); 8036e30: 4629 mov r1, r5 8036e32: 8ee2 ldrh r2, [r4, #54] ; 0x36 8036e34: 4630 mov r0, r6 8036e36: f7fc fc7d bl 8033734 ofs += m_trap->thl.gtrplenlen; 8036e3a: f894 302a ldrb.w r3, [r4, #42] ; 0x2a snmp_asn1_enc_u32t(p, ofs, m_trap->thl.gtrplen, m_trap->gen_trap); 8036e3e: 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; 8036e40: 18ed adds r5, r5, r3 8036e42: b2ad uxth r5, r5 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.gtrplen, m_trap->gen_trap); 8036e44: 4629 mov r1, r5 8036e46: 6923 ldr r3, [r4, #16] 8036e48: 4630 mov r0, r6 8036e4a: f7fc fcbb bl 80337c4 ofs += m_trap->thl.gtrplen; 8036e4e: 8ee3 ldrh r3, [r4, #54] ; 0x36 8036e50: 18ed adds r5, r5, r3 8036e52: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8036e54: 4629 mov r1, r5 ofs += 1; 8036e56: 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)); 8036e58: 2202 movs r2, #2 ofs += 1; 8036e5a: 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)); 8036e5c: 4630 mov r0, r6 8036e5e: f7fc fc55 bl 803370c ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.strplen); 8036e62: 4629 mov r1, r5 8036e64: 8ea2 ldrh r2, [r4, #52] ; 0x34 8036e66: 4630 mov r0, r6 8036e68: f7fc fc64 bl 8033734 ofs += m_trap->thl.strplenlen; 8036e6c: f894 3029 ldrb.w r3, [r4, #41] ; 0x29 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.strplen, m_trap->spc_trap); 8036e70: 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; 8036e72: 18ed adds r5, r5, r3 8036e74: b2ad uxth r5, r5 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.strplen, m_trap->spc_trap); 8036e76: 4629 mov r1, r5 8036e78: 6963 ldr r3, [r4, #20] 8036e7a: 4630 mov r0, r6 8036e7c: f7fc fca2 bl 80337c4 ofs += m_trap->thl.strplen; 8036e80: 8ea3 ldrh r3, [r4, #52] ; 0x34 8036e82: 18ed adds r5, r5, r3 8036e84: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS)); 8036e86: 4629 mov r1, r5 ofs += 1; 8036e88: 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)); 8036e8a: 2243 movs r2, #67 ; 0x43 ofs += 1; 8036e8c: 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)); 8036e8e: 4630 mov r0, r6 8036e90: f7fc fc3c bl 803370c ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.tslen); 8036e94: 4629 mov r1, r5 8036e96: 8e62 ldrh r2, [r4, #50] ; 0x32 8036e98: 4630 mov r0, r6 8036e9a: f7fc fc4b bl 8033734 ofs += m_trap->thl.tslenlen; 8036e9e: f894 3028 ldrb.w r3, [r4, #40] ; 0x28 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.tslen, m_trap->ts); 8036ea2: 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; 8036ea4: 18ed adds r5, r5, r3 8036ea6: b2ad uxth r5, r5 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.tslen, m_trap->ts); 8036ea8: 4629 mov r1, r5 8036eaa: 69a3 ldr r3, [r4, #24] 8036eac: 4630 mov r0, r6 8036eae: f7fc fc89 bl 80337c4 ofs += m_trap->thl.tslen; 8036eb2: 8e63 ldrh r3, [r4, #50] ; 0x32 8036eb4: 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); 8036eb6: 4631 mov r1, r6 8036eb8: e00a b.n 8036ed0 8036eba: bf00 nop 8036ebc: 2000f840 .word 0x2000f840 8036ec0: 2000f828 .word 0x2000f828 8036ec4: 2000f844 .word 0x2000f844 8036ec8: 0804592c .word 0x0804592c 8036ecc: 08045930 .word 0x08045930 8036ed0: b292 uxth r2, r2 8036ed2: f104 001c add.w r0, r4, #28 8036ed6: f7ff fcb1 bl 803683c snmp_inc_snmpouttraps(); 8036eda: f7fe f853 bl 8034f84 snmp_inc_snmpoutpkts(); 8036ede: f7fd ffa9 bl 8034e34 /** send to the TRAP destination */ udp_sendto(trap_msg.pcb, p, &trap_msg.dip, SNMP_TRAP_PORT); 8036ee2: 4622 mov r2, r4 8036ee4: 4631 mov r1, r6 8036ee6: f852 0b04 ldr.w r0, [r2], #4 8036eea: 23a2 movs r3, #162 ; 0xa2 8036eec: f7fb fdb1 bl 8032a52 pbuf_free(p); 8036ef0: 4630 mov r0, r6 8036ef2: f7f8 ff8b bl 802fe0c { return ERR_MEM; } } } return ERR_OK; 8036ef6: 2000 movs r0, #0 8036ef8: e000 b.n 8036efc pbuf_free(p); } else { return ERR_MEM; 8036efa: 20ff movs r0, #255 ; 0xff } } } return ERR_OK; } 8036efc: b240 sxtb r0, r0 8036efe: b005 add sp, #20 8036f00: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 08036f04 : snmp_send_trap(SNMP_GENTRAP_COLDSTART, NULL, 0); } void snmp_authfail_trap(void) { 8036f04: b507 push {r0, r1, r2, lr} u8_t enable; snmp_get_snmpenableauthentraps(&enable); 8036f06: f10d 0007 add.w r0, sp, #7 8036f0a: f7fe f849 bl 8034fa0 if (enable == 1) 8036f0e: f89d 3007 ldrb.w r3, [sp, #7] 8036f12: 2b01 cmp r3, #1 8036f14: d109 bne.n 8036f2a { trap_msg.outvb.head = NULL; 8036f16: 2100 movs r1, #0 8036f18: 4b04 ldr r3, [pc, #16] ; (8036f2c ) trap_msg.outvb.tail = NULL; trap_msg.outvb.count = 0; snmp_send_trap(SNMP_GENTRAP_AUTHFAIL, NULL, 0); 8036f1a: 2004 movs r0, #4 8036f1c: 460a mov r2, r1 { u8_t enable; snmp_get_snmpenableauthentraps(&enable); if (enable == 1) { trap_msg.outvb.head = NULL; 8036f1e: 61d9 str r1, [r3, #28] trap_msg.outvb.tail = NULL; 8036f20: 6219 str r1, [r3, #32] trap_msg.outvb.count = 0; 8036f22: f883 1024 strb.w r1, [r3, #36] ; 0x24 snmp_send_trap(SNMP_GENTRAP_AUTHFAIL, NULL, 0); 8036f26: f7ff fe23 bl 8036b70 } } 8036f2a: bd0e pop {r1, r2, r3, pc} 8036f2c: 2000f828 .word 0x2000f828 08036f30 : * @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) { 8036f30: b5f8 push {r3, r4, r5, r6, r7, lr} struct eth_hdr *ethhdr = (struct eth_hdr *)p->payload; 8036f32: 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) { 8036f34: 4606 mov r6, r0 8036f36: 460d mov r5, r1 8036f38: 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); 8036f3a: 4619 mov r1, r3 8036f3c: 2206 movs r2, #6 8036f3e: 4620 mov r0, r4 8036f40: f7ea fd24 bl 802198c ETHADDR16_COPY(ðhdr->src, src); 8036f44: 4639 mov r1, r7 8036f46: 1da0 adds r0, r4, #6 8036f48: 2206 movs r2, #6 8036f4a: f7ea fd1f bl 802198c ethhdr->type = PP_HTONS(ETHTYPE_IP); 8036f4e: 2308 movs r3, #8 8036f50: 7323 strb r3, [r4, #12] 8036f52: 2300 movs r3, #0 8036f54: 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); 8036f56: 69b3 ldr r3, [r6, #24] 8036f58: 4630 mov r0, r6 8036f5a: 4629 mov r1, r5 8036f5c: 4798 blx r3 } 8036f5e: bdf8 pop {r3, r4, r5, r6, r7, pc} 08036f60 : #endif /* ARP_QUEUEING */ /** Clean up ARP table entries */ static void etharp_free_entry(int i) { 8036f60: b570 push {r4, r5, r6, lr} /* remove from SNMP ARP index tree */ snmp_delete_arpidx_tree(arp_table[i].netif, &arp_table[i].ipaddr); 8036f62: 4d0b ldr r5, [pc, #44] ; (8036f90 ) 8036f64: 2414 movs r4, #20 8036f66: 4344 muls r4, r0 8036f68: 1929 adds r1, r5, r4 #endif /* ARP_QUEUEING */ /** Clean up ARP table entries */ static void etharp_free_entry(int i) { 8036f6a: 4606 mov r6, r0 /* remove from SNMP ARP index tree */ snmp_delete_arpidx_tree(arp_table[i].netif, &arp_table[i].ipaddr); 8036f6c: 3104 adds r1, #4 8036f6e: 6848 ldr r0, [r1, #4] 8036f70: f7fd fc4c bl 803480c /* and empty packet queue */ if (arp_table[i].q != NULL) { 8036f74: 5928 ldr r0, [r5, r4] 8036f76: b118 cbz r0, 8036f80 /* 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); 8036f78: f7f8 ff48 bl 802fe0c arp_table[i].q = NULL; 8036f7c: 2300 movs r3, #0 8036f7e: 512b str r3, [r5, r4] } /* recycle entry for re-use */ arp_table[i].state = ETHARP_STATE_EMPTY; 8036f80: 2314 movs r3, #20 8036f82: fb03 5506 mla r5, r3, r6, r5 8036f86: 2300 movs r3, #0 8036f88: 74ab strb r3, [r5, #18] 8036f8a: 3510 adds r5, #16 8036f8c: bd70 pop {r4, r5, r6, pc} 8036f8e: bf00 nop 8036f90: 2000c700 .word 0x2000c700 08036f94 : * @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) { 8036f94: 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; 8036f98: 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; 8036f9a: 240a movs r4, #10 8036f9c: 4a35 ldr r2, [pc, #212] ; (8037074 ) * @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) { 8036f9e: 9101 str r1, [sp, #4] 8036fa0: 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; 8036fa2: 46a8 mov r8, r5 8036fa4: 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) { 8036fa6: 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; 8036fa8: 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; 8036faa: 46a4 mov ip, r4 8036fac: 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)) { 8036fae: 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; 8036fb0: 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)) { 8036fb4: d104 bne.n 8036fc0 8036fb6: f1b9 0f00 cmp.w r9, #0 8036fba: d104 bne.n 8036fc6 LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_find_entry: found empty entry %"U16_F"\n", (u16_t)i)); /* remember first empty entry */ empty = i; 8036fbc: b2df uxtb r7, r3 8036fbe: e023 b.n 8037008 } else if (state != ETHARP_STATE_EMPTY) { 8036fc0: f1b9 0f00 cmp.w r9, #0 8036fc4: d020 beq.n 8037008 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)) { 8036fc6: b12e cbz r6, 8036fd4 8036fc8: 6830 ldr r0, [r6, #0] 8036fca: 6851 ldr r1, [r2, #4] 8036fcc: 4288 cmp r0, r1 8036fce: d101 bne.n 8036fd4 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; 8036fd0: 4618 mov r0, r3 8036fd2: e04b b.n 803706c } /* pending entry? */ if (state == ETHARP_STATE_PENDING) { 8036fd4: f1b9 0f01 cmp.w r9, #1 8036fd8: d10e bne.n 8036ff8 /* pending with queued packets? */ if (arp_table[i].q != NULL) { 8036fda: 6810 ldr r0, [r2, #0] if (arp_table[i].ctime >= age_queue) { 8036fdc: 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) { 8036fe0: b120 cbz r0, 8036fec if (arp_table[i].ctime >= age_queue) { 8036fe2: 45a9 cmp r9, r5 8036fe4: d310 bcc.n 8037008 old_queue = i; 8036fe6: b2dc uxtb r4, r3 8036fe8: 464d mov r5, r9 8036fea: e00d b.n 8037008 age_queue = arp_table[i].ctime; } } else /* pending without queued packets? */ { if (arp_table[i].ctime >= age_pending) { 8036fec: 45d1 cmp r9, sl 8036fee: d30b bcc.n 8037008 old_pending = i; 8036ff0: fa5f fb83 uxtb.w fp, r3 8036ff4: 46ca mov sl, r9 8036ff6: e007 b.n 8037008 age_pending = arp_table[i].ctime; } } /* stable entry? */ } else if (state >= ETHARP_STATE_STABLE) { 8036ff8: d906 bls.n 8037008 /* 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) { 8036ffa: f892 9013 ldrb.w r9, [r2, #19] 8036ffe: 45c1 cmp r9, r8 old_stable = i; 8037000: bf24 itt cs 8037002: fa5f fc83 uxtbcs.w ip, r3 8037006: 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) { 8037008: 3301 adds r3, #1 803700a: b2db uxtb r3, r3 803700c: 3214 adds r2, #20 803700e: 2b0a cmp r3, #10 8037010: d1cd bne.n 8036fae } } /* { we have no match } => try to create a new entry */ /* don't create new entry, only search? */ if (((flags & ETHARP_FLAG_FIND_ONLY) != 0) || 8037012: 9a01 ldr r2, [sp, #4] 8037014: f002 0302 and.w r3, r2, #2 8037018: b2db uxtb r3, r3 803701a: bb33 cbnz r3, 803706a 803701c: 2f0a cmp r7, #10 803701e: d102 bne.n 8037026 /* or no empty entry found and not allowed to recycle? */ ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) { 8037020: 07d3 lsls r3, r2, #31 8037022: d402 bmi.n 803702a 8037024: e021 b.n 803706a * { ETHARP_FLAG_TRY_HARD is set at this point } */ /* 1) empty entry available? */ if (empty < ARP_TABLE_SIZE) { i = empty; 8037026: b2fc uxtb r4, r7 8037028: e011 b.n 803704e 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) { 803702a: f1bc 0f0a cmp.w ip, #10 803702e: d002 beq.n 8037036 /* recycle oldest stable*/ i = old_stable; 8037030: fa5f f48c uxtb.w r4, ip 8037034: e008 b.n 8037048 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) { 8037036: f1bb 0f0a cmp.w fp, #10 803703a: d002 beq.n 8037042 /* recycle oldest pending */ i = old_pending; 803703c: fa5f f48b uxtb.w r4, fp 8037040: e002 b.n 8037048 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) { 8037042: 2c0a cmp r4, #10 8037044: d011 beq.n 803706a /* recycle oldest pending (queued packets are free in etharp_free_entry) */ i = old_queue; 8037046: 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); 8037048: 4620 mov r0, r4 803704a: f7ff ff89 bl 8036f60 803704e: 4b09 ldr r3, [pc, #36] ; (8037074 ) 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) { 8037050: b126 cbz r6, 803705c /* set IP address */ ip_addr_copy(arp_table[i].ipaddr, *ipaddr); 8037052: 2214 movs r2, #20 8037054: 6831 ldr r1, [r6, #0] 8037056: fb02 3204 mla r2, r2, r4, r3 803705a: 6051 str r1, [r2, #4] } arp_table[i].ctime = 0; 803705c: 2214 movs r2, #20 803705e: fb02 3304 mla r3, r2, r4, r3 8037062: 2200 movs r2, #0 8037064: 74da strb r2, [r3, #19] return (err_t)i; 8037066: 4620 mov r0, r4 8037068: e000 b.n 803706c /* 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; 803706a: 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; } 803706c: b240 sxtb r0, r0 803706e: e8bd 8ffe ldmia.w sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8037072: bf00 nop 8037074: 2000c700 .word 0x2000c700 08037078 : * 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) { 8037078: b570 push {r4, r5, r6, lr} 803707a: 4c0d ldr r4, [pc, #52] ; (80370b0 ) 803707c: 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; 803707e: 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 8037080: 7ca3 ldrb r3, [r4, #18] 8037082: b183 cbz r3, 80370a6 #if ETHARP_SUPPORT_STATIC_ENTRIES && (state != ETHARP_STATE_STATIC) #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ ) { arp_table[i].ctime++; 8037084: 7ce2 ldrb r2, [r4, #19] 8037086: 3201 adds r2, #1 8037088: b2d2 uxtb r2, r2 if ((arp_table[i].ctime >= ARP_MAXAGE) || 803708a: 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++; 803708c: 74e2 strb r2, [r4, #19] if ((arp_table[i].ctime >= ARP_MAXAGE) || 803708e: d803 bhi.n 8037098 8037090: 2b01 cmp r3, #1 8037092: d105 bne.n 80370a0 ((arp_table[i].state == ETHARP_STATE_PENDING) && 8037094: 2a01 cmp r2, #1 8037096: d906 bls.n 80370a6 (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); 8037098: 4628 mov r0, r5 803709a: f7ff ff61 bl 8036f60 803709e: e002 b.n 80370a6 } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING) { 80370a0: 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; 80370a2: bf08 it eq 80370a4: 74a6 strbeq r6, [r4, #18] 80370a6: 3501 adds r5, #1 80370a8: 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) { 80370aa: 2d0a cmp r5, #10 80370ac: d1e8 bne.n 8037080 /* resend an ARP query here? */ } #endif /* ARP_QUEUEING */ } } } 80370ae: bd70 pop {r4, r5, r6, pc} 80370b0: 2000c700 .word 0x2000c700 080370b4 : * Remove all ARP table entries of the specified netif. * * @param netif points to a network interface */ void etharp_cleanup_netif(struct netif *netif) { 80370b4: b570 push {r4, r5, r6, lr} 80370b6: 4d08 ldr r5, [pc, #32] ; (80370d8 ) 80370b8: 4606 mov r6, r0 80370ba: 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)) { 80370bc: 7cab ldrb r3, [r5, #18] 80370be: b12b cbz r3, 80370cc 80370c0: 68ab ldr r3, [r5, #8] 80370c2: 42b3 cmp r3, r6 80370c4: d102 bne.n 80370cc etharp_free_entry(i); 80370c6: 4620 mov r0, r4 80370c8: f7ff ff4a bl 8036f60 80370cc: 3401 adds r4, #1 80370ce: 3514 adds r5, #20 */ void etharp_cleanup_netif(struct netif *netif) { u8_t i; for (i = 0; i < ARP_TABLE_SIZE; ++i) { 80370d0: 2c0a cmp r4, #10 80370d2: d1f3 bne.n 80370bc u8_t state = arp_table[i].state; if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) { etharp_free_entry(i); } } } 80370d4: bd70 pop {r4, r5, r6, pc} 80370d6: bf00 nop 80370d8: 2000c700 .word 0x2000c700 080370dc : * @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) { 80370dc: 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); 80370de: 4608 mov r0, r1 80370e0: 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) { 80370e2: 4616 mov r6, r2 80370e4: 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); 80370e6: f7ff ff55 bl 8036f94 if((i >= 0) && (arp_table[i].state >= ETHARP_STATE_STABLE)) { 80370ea: 2800 cmp r0, #0 80370ec: db0c blt.n 8037108 80370ee: 2414 movs r4, #20 80370f0: 4d07 ldr r5, [pc, #28] ; (8037110 ) 80370f2: 4344 muls r4, r0 80370f4: 1929 adds r1, r5, r4 80370f6: 7c8b ldrb r3, [r1, #18] 80370f8: 2b01 cmp r3, #1 80370fa: d905 bls.n 8037108 *eth_ret = &arp_table[i].ethaddr; 80370fc: 460c mov r4, r1 80370fe: 340c adds r4, #12 *ip_ret = &arp_table[i].ipaddr; 8037100: 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; 8037102: 6034 str r4, [r6, #0] *ip_ret = &arp_table[i].ipaddr; 8037104: 6039 str r1, [r7, #0] return i; 8037106: e000 b.n 803710a } return -1; 8037108: 20ff movs r0, #255 ; 0xff } 803710a: b240 sxtb r0, r0 803710c: bdf8 pop {r3, r4, r5, r6, r7, pc} 803710e: bf00 nop 8037110: 2000c700 .word 0x2000c700 08037114 : * 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) { 8037114: 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); 8037118: 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) { 803711a: 4606 mov r6, r0 803711c: 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, 803711e: f100 0727 add.w r7, r0, #39 ; 0x27 8037122: 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); 8037126: 212a movs r1, #42 ; 0x2a 8037128: 2003 movs r0, #3 803712a: f7f8 febc bl 802fea6 /* could allocate a pbuf for an ARP request? */ if (p == NULL) { 803712e: 4605 mov r5, r0 8037130: 2800 cmp r0, #0 8037132: d03c beq.n 80371ae 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; 8037134: 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); 8037136: 2001 movs r0, #1 8037138: f7f7 fd2a bl 802eb90 * '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); 803713c: 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); 803713e: 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); 8037140: 2206 movs r2, #6 8037142: f104 0016 add.w r0, r4, #22 8037146: f7ea fc21 bl 802198c ETHADDR16_COPY(&hdr->dhwaddr, hwdst_addr); 803714a: 2206 movs r2, #6 803714c: f104 0020 add.w r0, r4, #32 8037150: 4919 ldr r1, [pc, #100] ; (80371b8 ) 8037152: f7ea fc1b 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); 8037156: 2206 movs r2, #6 8037158: 4620 mov r0, r4 803715a: 4918 ldr r1, [pc, #96] ; (80371bc ) 803715c: f7ea fc16 bl 802198c #endif /* LWIP_AUTOIP */ ETHADDR16_COPY(ðhdr->src, ethsrc_addr); 8037160: 1da0 adds r0, r4, #6 8037162: 4639 mov r1, r7 8037164: 2206 movs r2, #6 8037166: f7ea fc11 bl 802198c /* Copy struct ip_addr2 to aligned ip_addr, to support compilers without * structure packing. */ IPADDR2_COPY(&hdr->sipaddr, ipsrc_addr); 803716a: 4649 mov r1, r9 803716c: 2204 movs r2, #4 803716e: f104 001c add.w r0, r4, #28 8037172: f7ea fc0b bl 802198c IPADDR2_COPY(&hdr->dipaddr, ipdst_addr); 8037176: 4641 mov r1, r8 8037178: 2204 movs r2, #4 803717a: f104 0026 add.w r0, r4, #38 ; 0x26 803717e: f7ea fc05 bl 802198c hdr->hwtype = PP_HTONS(HWTYPE_ETHERNET); 8037182: 2300 movs r3, #0 8037184: 2201 movs r2, #1 8037186: 73a3 strb r3, [r4, #14] 8037188: 73e2 strb r2, [r4, #15] hdr->proto = PP_HTONS(ETHTYPE_IP); 803718a: 7463 strb r3, [r4, #17] 803718c: 2208 movs r2, #8 /* set hwlen and protolen */ hdr->hwlen = ETHARP_HWADDR_LEN; 803718e: 2306 movs r3, #6 hdr->protolen = sizeof(ip_addr_t); 8037190: 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); 8037192: 7422 strb r2, [r4, #16] /* set hwlen and protolen */ hdr->hwlen = ETHARP_HWADDR_LEN; hdr->protolen = sizeof(ip_addr_t); 8037194: 74e1 strb r1, [r4, #19] ethhdr->type = PP_HTONS(ETHTYPE_ARP); 8037196: 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; 8037198: 74a3 strb r3, [r4, #18] hdr->protolen = sizeof(ip_addr_t); ethhdr->type = PP_HTONS(ETHTYPE_ARP); 803719a: 7363 strb r3, [r4, #13] /* send ARP query */ result = netif->linkoutput(netif, p); 803719c: 69b3 ldr r3, [r6, #24] 803719e: 4630 mov r0, r6 80371a0: 4629 mov r1, r5 80371a2: 4798 blx r3 80371a4: 4604 mov r4, r0 ETHARP_STATS_INC(etharp.xmit); /* free ARP query packet */ pbuf_free(p); 80371a6: 4628 mov r0, r5 80371a8: f7f8 fe30 bl 802fe0c 80371ac: e000 b.n 80371b0 /* 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; 80371ae: 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); } 80371b0: b260 sxtb r0, r4 80371b2: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 80371b6: bf00 nop 80371b8: 0804593d .word 0x0804593d 80371bc: 08045937 .word 0x08045937 080371c0 : * - 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) { 80371c0: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 80371c4: 4607 mov r7, r0 80371c6: 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) || 80371c8: 6808 ldr r0, [r1, #0] 80371ca: 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) { 80371cc: 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) || 80371ce: f7fb fdd9 bl 8032d84 80371d2: 2800 cmp r0, #0 80371d4: d157 bne.n 8037286 ip_addr_ismulticast(ipaddr) || 80371d6: 6833 ldr r3, [r6, #0] 80371d8: 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) || 80371dc: 2ae0 cmp r2, #224 ; 0xe0 80371de: d052 beq.n 8037286 ip_addr_ismulticast(ipaddr) || ip_addr_isany(ipaddr)) { 80371e0: 2b00 cmp r3, #0 80371e2: d050 beq.n 8037286 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); 80371e4: 2101 movs r1, #1 80371e6: 4630 mov r0, r6 80371e8: f7ff fed4 bl 8036f94 /* could not find or create entry? */ if (i < 0) { 80371ec: 1e04 subs r4, r0, #0 80371ee: db4f blt.n 8037290 } return (err_t)i; } /* mark a fresh entry as pending (we just sent a request) */ if (arp_table[i].state == ETHARP_STATE_EMPTY) { 80371f0: 4931 ldr r1, [pc, #196] ; (80372b8 ) 80371f2: 2214 movs r2, #20 80371f4: fb02 1304 mla r3, r2, r4, r1 80371f8: 3310 adds r3, #16 80371fa: 7898 ldrb r0, [r3, #2] 80371fc: b908 cbnz r0, 8037202 arp_table[i].state = ETHARP_STATE_PENDING; 80371fe: 2001 movs r0, #1 8037200: 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)) { 8037202: fb02 1204 mla r2, r2, r4, r1 8037206: 7c93 ldrb r3, [r2, #18] 8037208: 2b01 cmp r3, #1 803720a: d000 beq.n 803720e 803720c: b935 cbnz r5, 803721c /* try to resolve it; send out ARP request */ result = etharp_request(netif, ipaddr); 803720e: 4638 mov r0, r7 8037210: 4631 mov r1, r6 8037212: f7ff ff7f bl 8037114 8037216: 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) { 8037218: b90d cbnz r5, 803721e 803721a: e036 b.n 803728a */ 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; 803721c: 22ff movs r2, #255 ; 0xff } /* packet given? */ LWIP_ASSERT("q != NULL", q != NULL); /* stable entry? */ if (arp_table[i].state >= ETHARP_STATE_STABLE) { 803721e: 2314 movs r3, #20 8037220: 4925 ldr r1, [pc, #148] ; (80372b8 ) 8037222: 4363 muls r3, r4 8037224: 18c8 adds r0, r1, r3 8037226: 7c80 ldrb r0, [r0, #18] 8037228: 2801 cmp r0, #1 803722a: d90b bls.n 8037244 /* we have a valid IP->Ethernet address mapping */ ETHARP_SET_HINT(netif, i); 803722c: 4a23 ldr r2, [pc, #140] ; (80372bc ) /* send the packet */ result = etharp_send_ip(netif, q, srcaddr, &(arp_table[i].ethaddr)); 803722e: 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); 8037230: 7014 strb r4, [r2, #0] /* send the packet */ result = etharp_send_ip(netif, q, srcaddr, &(arp_table[i].ethaddr)); 8037232: 4638 mov r0, r7 8037234: 4629 mov r1, r5 8037236: f107 0227 add.w r2, r7, #39 ; 0x27 803723a: 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; } 803723c: 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)); 8037240: f7ff be76 b.w 8036f30 /* pending entry? (either just created or already pending */ } else if (arp_table[i].state == ETHARP_STATE_PENDING) { 8037244: d123 bne.n 803728e 8037246: 462b mov r3, r5 8037248: e003 b.n 8037252 * 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) { 803724a: 7b1a ldrb r2, [r3, #12] 803724c: 2a01 cmp r2, #1 803724e: d128 bne.n 80372a2 copy_needed = 1; break; } p = p->next; 8037250: 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) { 8037252: 2b00 cmp r3, #0 8037254: d1f9 bne.n 803724a 8037256: e01e b.n 8037296 } 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) { 8037258: 4629 mov r1, r5 803725a: f7f8 fedb bl 8030014 803725e: b120 cbz r0, 803726a pbuf_free(p); 8037260: 4630 mov r0, r6 8037262: f7f8 fdd3 bl 802fe0c 8037266: e024 b.n 80372b2 /* referencing the old pbuf is enough */ p = q; pbuf_ref(p); } /* packet could be taken over? */ if (p != NULL) { 8037268: 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) { 803726a: 2314 movs r3, #20 803726c: 4a12 ldr r2, [pc, #72] ; (80372b8 ) 803726e: fb03 f104 mul.w r1, r3, r4 8037272: 4615 mov r5, r2 8037274: 5850 ldr r0, [r2, r1] 8037276: 461f mov r7, r3 8037278: b108 cbz r0, 803727e 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); 803727a: f7f8 fdc7 bl 802fe0c } arp_table[i].q = p; 803727e: 437c muls r4, r7 8037280: 512e str r6, [r5, r4] result = ERR_OK; 8037282: 2400 movs r4, #0 8037284: e004 b.n 8037290 /* 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; 8037286: 24f2 movs r4, #242 ; 0xf2 8037288: e002 b.n 8037290 /* 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; 803728a: 4604 mov r4, r0 803728c: e000 b.n 8037290 /* 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) { 803728e: 4614 mov r4, r2 8037290: b260 sxtb r0, r4 8037292: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} } } } else { /* referencing the old pbuf is enough */ p = q; pbuf_ref(p); 8037296: 4628 mov r0, r5 8037298: f7f8 fe95 bl 802ffc6 } /* packet could be taken over? */ if (p != NULL) { 803729c: 2d00 cmp r5, #0 803729e: d1e3 bne.n 8037268 80372a0: e007 b.n 80372b2 } p = p->next; } if(copy_needed) { /* copy the whole packet into new pbufs */ p = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM); 80372a2: 2003 movs r0, #3 80372a4: 8919 ldrh r1, [r3, #8] 80372a6: 2200 movs r2, #0 80372a8: f7f8 fdfd bl 802fea6 if(p != NULL) { 80372ac: 4606 mov r6, r0 80372ae: 2800 cmp r0, #0 80372b0: d1d2 bne.n 8037258 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; 80372b2: 24ff movs r4, #255 ; 0xff 80372b4: e7ec b.n 8037290 80372b6: bf00 nop 80372b8: 2000c700 .word 0x2000c700 80372bc: 2000c6fc .word 0x2000c6fc 080372c0 : /** 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) { 80372c0: 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) && 80372c4: 4b10 ldr r3, [pc, #64] ; (8037308 ) /** 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) { 80372c6: 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) && 80372c8: 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) { 80372ca: 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) && 80372cc: 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) { 80372d0: 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) && 80372d2: 7c8a ldrb r2, [r1, #18] 80372d4: 2a02 cmp r2, #2 80372d6: f101 0410 add.w r4, r1, #16 80372da: d108 bne.n 80372ee 80372dc: 7cca ldrb r2, [r1, #19] 80372de: 2ae3 cmp r2, #227 ; 0xe3 80372e0: d905 bls.n 80372ee (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED)) { if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) { 80372e2: 3104 adds r1, #4 80372e4: f7ff ff16 bl 8037114 80372e8: b908 cbnz r0, 80372ee arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING; 80372ea: 2303 movs r3, #3 80372ec: 70a3 strb r3, [r4, #2] } } return etharp_send_ip(netif, q, (struct eth_addr*)(netif->hwaddr), 80372ee: 4b06 ldr r3, [pc, #24] ; (8037308 ) 80372f0: 2214 movs r2, #20 80372f2: fb02 3305 mla r3, r2, r5, r3 80372f6: 4638 mov r0, r7 80372f8: 4631 mov r1, r6 80372fa: f107 0227 add.w r2, r7, #39 ; 0x27 80372fe: 330c adds r3, #12 &arp_table[arp_idx].ethaddr); } 8037300: 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), 8037304: f7ff be14 b.w 8036f30 8037308: 2000c700 .word 0x2000c700 0803730c : * - 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) { 803730c: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} 803730e: 4604 mov r4, r0 8037310: 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) { 8037312: 4608 mov r0, r1 8037314: 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) { 8037316: 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) { 8037318: f7f8 fd4d bl 802fdb6 803731c: 2800 cmp r0, #0 803731e: d163 bne.n 80373e8 /* 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)) { 8037320: 6828 ldr r0, [r5, #0] 8037322: 4621 mov r1, r4 8037324: f7fb fd2e bl 8032d84 8037328: 2800 cmp r0, #0 803732a: d155 bne.n 80373d8 /* broadcast on Ethernet also */ dest = (struct eth_addr *)ðbroadcast; /* multicast destination IP address? */ } else if (ip_addr_ismulticast(ipaddr)) { 803732c: 682b ldr r3, [r5, #0] 803732e: f003 02f0 and.w r2, r3, #240 ; 0xf0 8037332: 2ae0 cmp r2, #224 ; 0xe0 8037334: d114 bne.n 8037360 /* Hash IP multicast address to MAC address.*/ mcastaddr.addr[0] = LL_MULTICAST_ADDR_0; 8037336: 2301 movs r3, #1 8037338: f88d 3000 strb.w r3, [sp] mcastaddr.addr[1] = LL_MULTICAST_ADDR_1; mcastaddr.addr[2] = LL_MULTICAST_ADDR_2; 803733c: 235e movs r3, #94 ; 0x5e 803733e: f88d 3002 strb.w r3, [sp, #2] mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f; 8037342: 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; 8037344: f88d 0001 strb.w r0, [sp, #1] mcastaddr.addr[2] = LL_MULTICAST_ADDR_2; mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f; 8037348: f003 037f and.w r3, r3, #127 ; 0x7f 803734c: f88d 3003 strb.w r3, [sp, #3] mcastaddr.addr[4] = ip4_addr3(ipaddr); 8037350: 78ab ldrb r3, [r5, #2] 8037352: f88d 3004 strb.w r3, [sp, #4] mcastaddr.addr[5] = ip4_addr4(ipaddr); 8037356: 78eb ldrb r3, [r5, #3] 8037358: f88d 3005 strb.w r3, [sp, #5] /* destination Ethernet address is multicast */ dest = &mcastaddr; 803735c: 466b mov r3, sp 803735e: e03c b.n 80373da /* 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)) && 8037360: 6862 ldr r2, [r4, #4] 8037362: ea83 0102 eor.w r1, r3, r2 8037366: 68a2 ldr r2, [r4, #8] 8037368: 4211 tst r1, r2 803736a: d009 beq.n 8037380 !ip_addr_islinklocal(ipaddr)) { 803736c: 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)) && 803736e: f64f 62a9 movw r2, #65193 ; 0xfea9 8037372: 4293 cmp r3, r2 8037374: d004 beq.n 8037380 router for forwarding". */ if (!ip_addr_islinklocal(&iphdr->src)) #endif /* LWIP_AUTOIP */ { /* interface has default gateway? */ if (!ip_addr_isany(&netif->gw)) { 8037376: 68e3 ldr r3, [r4, #12] 8037378: f104 010c add.w r1, r4, #12 803737c: b90b cbnz r3, 8037382 803737e: e035 b.n 80373ec /* 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)) && 8037380: 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) && 8037382: 4b1c ldr r3, [pc, #112] ; (80373f4 ) 8037384: 781a ldrb r2, [r3, #0] 8037386: 4b1c ldr r3, [pc, #112] ; (80373f8 ) 8037388: 2014 movs r0, #20 803738a: fb00 3302 mla r3, r0, r2, r3 803738e: 7c98 ldrb r0, [r3, #18] 8037390: 2801 cmp r0, #1 8037392: d904 bls.n 803739e 8037394: 6808 ldr r0, [r1, #0] 8037396: 685b ldr r3, [r3, #4] 8037398: 4298 cmp r0, r3 803739a: d100 bne.n 803739e 803739c: e00d b.n 80373ba 803739e: 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) 80373a0: 4f15 ldr r7, [pc, #84] ; (80373f8 ) 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) && 80373a2: 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) 80373a4: 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) && 80373a6: 7c85 ldrb r5, [r0, #18] 80373a8: 2d01 cmp r5, #1 80373aa: d90b bls.n 80373c4 80373ac: 680d ldr r5, [r1, #0] 80373ae: 6840 ldr r0, [r0, #4] 80373b0: 4285 cmp r5, r0 80373b2: d107 bne.n 80373c4 (ip_addr_cmp(dst_addr, &arp_table[i].ipaddr))) { /* found an existing, stable entry */ ETHARP_SET_HINT(netif, i); 80373b4: 4b0f ldr r3, [pc, #60] ; (80373f4 ) 80373b6: b2d2 uxtb r2, r2 80373b8: 701a strb r2, [r3, #0] return etharp_output_to_arp_index(netif, q, i); 80373ba: 4620 mov r0, r4 80373bc: 4631 mov r1, r6 80373be: f7ff ff7f bl 80372c0 80373c2: e014 b.n 80373ee 80373c4: 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++) { 80373c6: 3201 adds r2, #1 80373c8: 2bc8 cmp r3, #200 ; 0xc8 80373ca: b2d2 uxtb r2, r2 80373cc: d1ea bne.n 80373a4 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); 80373ce: 4620 mov r0, r4 80373d0: 4632 mov r2, r6 80373d2: f7ff fef5 bl 80371c0 80373d6: e00a b.n 80373ee * 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; 80373d8: 4b08 ldr r3, [pc, #32] ; (80373fc ) } /* 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); 80373da: 4620 mov r0, r4 80373dc: 4631 mov r1, r6 80373de: f104 0227 add.w r2, r4, #39 ; 0x27 80373e2: f7ff fda5 bl 8036f30 80373e6: e002 b.n 80373ee 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; 80373e8: 20fe movs r0, #254 ; 0xfe 80373ea: e000 b.n 80373ee /* 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; 80373ec: 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); } 80373ee: b240 sxtb r0, r0 80373f0: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 80373f2: bf00 nop 80373f4: 2000c6fc .word 0x2000c6fc 80373f8: 2000c700 .word 0x2000c700 80373fc: 08045937 .word 0x08045937 08037400 : * @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) { 8037400: 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) { 8037404: 8943 ldrh r3, [r0, #10] 8037406: 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) { 8037408: b087 sub sp, #28 803740a: 4604 mov r4, r0 803740c: 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) { 803740e: f240 80ed bls.w 80375ec 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; 8037412: 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) { 8037414: 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; 8037416: 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) { 8037418: 07da lsls r2, r3, #31 803741a: d513 bpl.n 8037444 /* this might be a multicast or broadcast packet */ if (ethhdr->dest.addr[0] == LL_MULTICAST_ADDR_0) { 803741c: 2b01 cmp r3, #1 803741e: d108 bne.n 8037432 if ((ethhdr->dest.addr[1] == LL_MULTICAST_ADDR_1) && 8037420: 7843 ldrb r3, [r0, #1] 8037422: b97b cbnz r3, 8037444 8037424: 7883 ldrb r3, [r0, #2] 8037426: 2b5e cmp r3, #94 ; 0x5e 8037428: d10c bne.n 8037444 (ethhdr->dest.addr[2] == LL_MULTICAST_ADDR_2)) { /* mark the pbuf as link-layer multicast */ p->flags |= PBUF_FLAG_LLMCAST; 803742a: 7b63 ldrb r3, [r4, #13] 803742c: f043 0310 orr.w r3, r3, #16 8037430: e007 b.n 8037442 } } else if (eth_addr_cmp(ðhdr->dest, ðbroadcast)) { 8037432: 4972 ldr r1, [pc, #456] ; (80375fc ) 8037434: 2206 movs r2, #6 8037436: f7ea fa77 bl 8021928 803743a: b918 cbnz r0, 8037444 /* mark the pbuf as link-layer broadcast */ p->flags |= PBUF_FLAG_LLBCAST; 803743c: 7b63 ldrb r3, [r4, #13] 803743e: f043 0308 orr.w r3, r3, #8 8037442: 7363 strb r3, [r4, #13] } } switch (type) { 8037444: 2e08 cmp r6, #8 8037446: d004 beq.n 8037452 8037448: f5b6 6fc1 cmp.w r6, #1544 ; 0x608 803744c: f040 80ce bne.w 80375ec 8037450: e014 b.n 803747c #if LWIP_ARP /* IP packet? */ case PP_HTONS(ETHTYPE_IP): if (!(netif->flags & NETIF_FLAG_ETHARP)) { 8037452: f895 302d ldrb.w r3, [r5, #45] ; 0x2d 8037456: f003 0320 and.w r3, r3, #32 803745a: b2db uxtb r3, r3 803745c: 2b00 cmp r3, #0 803745e: f000 80c5 beq.w 80375ec #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)) { 8037462: 4620 mov r0, r4 8037464: f06f 010d mvn.w r1, #13 8037468: f7f8 fca5 bl 802fdb6 803746c: 2800 cmp r0, #0 803746e: f040 80bd bne.w 80375ec LWIP_ASSERT("Can't move over header in packet", 0); goto free_and_return; } else { /* pass to IP layer */ ip_input(p, netif); 8037472: 4620 mov r0, r4 8037474: 4629 mov r1, r5 8037476: f7fb fd99 bl 8032fac } break; 803747a: e0ba b.n 80375f2 case PP_HTONS(ETHTYPE_ARP): if (!(netif->flags & NETIF_FLAG_ETHARP)) { 803747c: f895 302d ldrb.w r3, [r5, #45] ; 0x2d 8037480: f003 0320 and.w r3, r3, #32 8037484: b2db uxtb r3, r3 8037486: 2b00 cmp r3, #0 8037488: f000 80b0 beq.w 80375ec 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) { 803748c: 8963 ldrh r3, [r4, #10] 803748e: 2b29 cmp r3, #41 ; 0x29 8037490: d800 bhi.n 8037494 8037492: e0ab b.n 80375ec ETHARP_STATS_INC(etharp.drop); pbuf_free(p); return; } ethhdr = (struct eth_hdr *)p->payload; 8037494: 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)) || 8037496: 89f3 ldrh r3, [r6, #14] 8037498: f5b3 7f80 cmp.w r3, #256 ; 0x100 803749c: f040 80a6 bne.w 80375ec 80374a0: 7cb3 ldrb r3, [r6, #18] 80374a2: 2b06 cmp r3, #6 80374a4: f040 80a2 bne.w 80375ec (hdr->hwlen != ETHARP_HWADDR_LEN) || 80374a8: 7cf7 ldrb r7, [r6, #19] 80374aa: 2f04 cmp r7, #4 80374ac: f040 809e bne.w 80375ec (hdr->protolen != sizeof(ip_addr_t)) || 80374b0: 8a33 ldrh r3, [r6, #16] 80374b2: 2b08 cmp r3, #8 80374b4: f040 809a bne.w 80375ec 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); 80374b8: f106 0a1c add.w sl, r6, #28 80374bc: 4651 mov r1, sl 80374be: 463a mov r2, r7 80374c0: a804 add r0, sp, #16 80374c2: f7ea fa63 bl 802198c IPADDR2_COPY(&dipaddr, &hdr->dipaddr); 80374c6: f106 0226 add.w r2, r6, #38 ; 0x26 80374ca: 9203 str r2, [sp, #12] 80374cc: 4611 mov r1, r2 80374ce: a805 add r0, sp, #20 80374d0: 463a mov r2, r7 80374d2: f7ea fa5b bl 802198c /* this interface is not configured? */ if (ip_addr_isany(&netif->ip_addr)) { 80374d6: 686b ldr r3, [r5, #4] 80374d8: b12b cbz r3, 80374e6 for_us = 0; } else { /* ARP packet directed to us? */ for_us = (u8_t)ip_addr_cmp(&dipaddr, &(netif->ip_addr)); 80374da: 9a05 ldr r2, [sp, #20] 80374dc: 1ad1 subs r1, r2, r3 80374de: 424a negs r2, r1 80374e0: 414a adcs r2, r1 80374e2: 9201 str r2, [sp, #4] 80374e4: e000 b.n 80374e8 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; 80374e6: 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), 80374e8: 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) || 80374ea: 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), 80374ec: f106 0716 add.w r7, r6, #22 80374f0: 2b00 cmp r3, #0 80374f2: bf0c ite eq 80374f4: f04f 0802 moveq.w r8, #2 80374f8: 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); 80374fc: 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) || 8037500: 2800 cmp r0, #0 8037502: d03d beq.n 8037580 ip_addr_isbroadcast(ipaddr, netif) || 8037504: 4629 mov r1, r5 8037506: f7fb fc3d bl 8032d84 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) || 803750a: 9002 str r0, [sp, #8] 803750c: 2800 cmp r0, #0 803750e: d137 bne.n 8037580 ip_addr_isbroadcast(ipaddr, netif) || ip_addr_ismulticast(ipaddr)) { 8037510: 9a04 ldr r2, [sp, #16] 8037512: 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) || 8037516: 2ae0 cmp r2, #224 ; 0xe0 8037518: d032 beq.n 8037580 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); 803751a: a804 add r0, sp, #16 803751c: 4641 mov r1, r8 803751e: f7ff fd39 bl 8036f94 /* bail out if no entry could be found */ if (i < 0) { 8037522: 2800 cmp r0, #0 8037524: db2c blt.n 8037580 arp_table[i].state = ETHARP_STATE_STATIC; } else #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ { /* mark it stable */ arp_table[i].state = ETHARP_STATE_STABLE; 8037526: 4b36 ldr r3, [pc, #216] ; (8037600 ) 8037528: f04f 0814 mov.w r8, #20 803752c: fb08 f800 mul.w r8, r8, r0 8037530: eb03 0108 add.w r1, r3, r8 8037534: 2202 movs r2, #2 8037536: 748a strb r2, [r1, #18] } /* record network interface */ arp_table[i].netif = netif; 8037538: 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; 803753a: 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); 803753e: 4628 mov r0, r5 8037540: 3104 adds r1, #4 8037542: 9300 str r3, [sp, #0] 8037544: f7fd f900 bl 8034748 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); 8037548: 9b00 ldr r3, [sp, #0] 803754a: eb03 0008 add.w r0, r3, r8 803754e: 2206 movs r2, #6 8037550: 300c adds r0, #12 8037552: 4639 mov r1, r7 8037554: f7ea fa1a bl 802198c /* reset time stamp */ arp_table[i].ctime = 0; 8037558: 9a02 ldr r2, [sp, #8] 803755a: 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) { 803755e: 9b00 ldr r3, [sp, #0] 8037560: f853 b008 ldr.w fp, [r3, r8] 8037564: f1bb 0f00 cmp.w fp, #0 8037568: d00a beq.n 8037580 struct pbuf *p = arp_table[i].q; arp_table[i].q = NULL; 803756a: 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); 803756e: 4628 mov r0, r5 8037570: 4659 mov r1, fp 8037572: 464a mov r2, r9 8037574: 463b mov r3, r7 8037576: f7ff fcdb bl 8036f30 /* free the queued IP packet */ pbuf_free(p); 803757a: 4658 mov r0, fp 803757c: f7f8 fc46 bl 802fe0c -> 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) { 8037580: 8ab3 ldrh r3, [r6, #20] 8037582: f5b3 7f80 cmp.w r3, #256 ; 0x100 8037586: d003 beq.n 8037590 8037588: f5b3 7f00 cmp.w r3, #512 ; 0x200 803758c: d12e bne.n 80375ec 803758e: e029 b.n 80375e4 * 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) { 8037590: 9b01 ldr r3, [sp, #4] 8037592: b35b cbz r3, 80375ec 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); 8037594: 2002 movs r0, #2 8037596: f7f7 fafb bl 802eb90 803759a: 82b0 strh r0, [r6, #20] IPADDR2_COPY(&hdr->dipaddr, &hdr->sipaddr); 803759c: 4651 mov r1, sl 803759e: 2204 movs r2, #4 80375a0: 9803 ldr r0, [sp, #12] 80375a2: f7ea f9f3 bl 802198c IPADDR2_COPY(&hdr->sipaddr, &netif->ip_addr); 80375a6: 1d29 adds r1, r5, #4 80375a8: 2204 movs r2, #4 80375aa: 4650 mov r0, sl 80375ac: f7ea f9ee 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); 80375b0: 4639 mov r1, r7 80375b2: 2206 movs r2, #6 80375b4: f106 0020 add.w r0, r6, #32 80375b8: f7ea f9e8 bl 802198c #if LWIP_AUTOIP ETHADDR16_COPY(ðhdr->dest, ethdst_hwaddr); #else /* LWIP_AUTOIP */ ETHADDR16_COPY(ðhdr->dest, &hdr->shwaddr); 80375bc: 4639 mov r1, r7 80375be: 2206 movs r2, #6 80375c0: 4630 mov r0, r6 80375c2: f7ea f9e3 bl 802198c #endif /* LWIP_AUTOIP */ ETHADDR16_COPY(&hdr->shwaddr, ethaddr); 80375c6: 4649 mov r1, r9 80375c8: 2206 movs r2, #6 80375ca: 4638 mov r0, r7 80375cc: f7ea f9de bl 802198c ETHADDR16_COPY(ðhdr->src, ethaddr); 80375d0: 4649 mov r1, r9 80375d2: 1db0 adds r0, r6, #6 80375d4: 2206 movs r2, #6 80375d6: f7ea f9d9 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); 80375da: 69ab ldr r3, [r5, #24] 80375dc: 4628 mov r0, r5 80375de: 4621 mov r1, r4 80375e0: 4798 blx r3 80375e2: e003 b.n 80375ec #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); 80375e4: 4628 mov r0, r5 80375e6: a904 add r1, sp, #16 80375e8: f7f7 ffa8 bl 802f53c /* 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); 80375ec: 4620 mov r0, r4 80375ee: f7f8 fc0d bl 802fe0c return ERR_OK; } 80375f2: 2000 movs r0, #0 80375f4: b007 add sp, #28 80375f6: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80375fa: bf00 nop 80375fc: 08045937 .word 0x08045937 8037600: 2000c700 .word 0x2000c700 08037604 : return ERR_OK; } static void arp_timer(void *arg) { 8037604: b508 push {r3, lr} etharp_tmr(); 8037606: f7ff fd37 bl 8037078 sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 803760a: 4904 ldr r1, [pc, #16] ; (803761c ) 803760c: f241 3088 movw r0, #5000 ; 0x1388 8037610: 2200 movs r2, #0 } 8037612: e8bd 4008 ldmia.w sp!, {r3, lr} static void arp_timer(void *arg) { etharp_tmr(); sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 8037616: f7fa bfa1 b.w 803255c 803761a: bf00 nop 803761c: 08037605 .word 0x08037605 08037620 : } } */ void ethernetif_input(void * pvParameters) { 8037620: 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) 8037624: f8df 80c4 ldr.w r8, [pc, #196] ; 80376ec } } */ void ethernetif_input(void * pvParameters) { 8037628: b085 sub sp, #20 struct pbuf *p; for( ;; ) { if(xSemaphoreTake(s_xSemaphore, emacBLOCK_TIME_WAITING_FOR_INPUT)==pdTRUE) 803762a: 2100 movs r1, #0 803762c: 2264 movs r2, #100 ; 0x64 803762e: f8d8 0000 ldr.w r0, [r8] 8037632: 460b mov r3, r1 8037634: f7f3 f8d7 bl 802a7e6 8037638: 2801 cmp r0, #1 803763a: d1f6 bne.n 803762a } } /* Release descriptors to DMA */ /* Check if received frame with multiple DMA buffer segments */ if (DMA_RX_FRAME_infos->Seg_Count > 1) 803763c: f8df a0b0 ldr.w sl, [pc, #176] ; 80376f0 /* 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) 8037640: f8df 90b0 ldr.w r9, [pc, #176] ; 80376f4 __IO ETH_DMADESCTypeDef *DMARxNextDesc; p = NULL; /* Get received frame */ frame = ETH_Get_Received_Frame_interrupt(); 8037644: a801 add r0, sp, #4 8037646: f001 fc9f bl 8038f88 803764a: 9e03 ldr r6, [sp, #12] /* check that frame has no error */ if ((frame.descriptor->Status & ETH_DMARxDesc_ES) == (uint32_t)RESET) 803764c: 6837 ldr r7, [r6, #0] 803764e: f417 4700 ands.w r7, r7, #32768 ; 0x8000 8037652: d001 beq.n 8037658 uint32_t l=0,i =0; FrameTypeDef frame; u8 *buffer; __IO ETH_DMADESCTypeDef *DMARxNextDesc; p = NULL; 8037654: 2400 movs r4, #0 8037656: e016 b.n 8037686 /* 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); 8037658: 2003 movs r0, #3 803765a: 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; 803765e: 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); 8037662: 4602 mov r2, r0 8037664: f7f8 fc1f bl 802fea6 /* Copy received frame from ethernet driver buffer to stack buffer */ if (p != NULL) 8037668: 4604 mov r4, r0 803766a: 2800 cmp r0, #0 803766c: d0f2 beq.n 8037654 803766e: 4605 mov r5, r0 { for (q = p; q != NULL; q = q->next) { memcpy((u8_t*)q->payload, (u8_t*)&buffer[l], q->len); 8037670: 6868 ldr r0, [r5, #4] 8037672: 896a ldrh r2, [r5, #10] 8037674: eb0b 0107 add.w r1, fp, r7 8037678: f7ea f988 bl 802198c l = l + q->len; 803767c: 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) 803767e: 682d ldr r5, [r5, #0] { memcpy((u8_t*)q->payload, (u8_t*)&buffer[l], q->len); l = l + q->len; 8037680: 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) 8037682: 2d00 cmp r5, #0 8037684: d1f4 bne.n 8037670 } } /* Release descriptors to DMA */ /* Check if received frame with multiple DMA buffer segments */ if (DMA_RX_FRAME_infos->Seg_Count > 1) 8037686: f8da 3000 ldr.w r3, [sl] 803768a: 689a ldr r2, [r3, #8] 803768c: 2a01 cmp r2, #1 { DMARxNextDesc = DMA_RX_FRAME_infos->FS_Rx_Desc; 803768e: bf88 it hi 8037690: 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; 8037692: f04f 4000 mov.w r0, #2147483648 ; 0x80000000 uint32_t l=0,i =0; FrameTypeDef frame; u8 *buffer; __IO ETH_DMADESCTypeDef *DMARxNextDesc; p = NULL; 8037696: 2200 movs r2, #0 8037698: e002 b.n 80376a0 } /* Set Own bit in Rx descriptors: gives the buffers back to DMA */ for (i=0; iSeg_Count; i++) { DMARxNextDesc->Status = ETH_DMARxDesc_OWN; 803769a: 6030 str r0, [r6, #0] DMARxNextDesc = (ETH_DMADESCTypeDef *)(DMARxNextDesc->Buffer2NextDescAddr); 803769c: 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++) 803769e: 3201 adds r2, #1 80376a0: 6899 ldr r1, [r3, #8] 80376a2: 428a cmp r2, r1 80376a4: d3f9 bcc.n 803769a DMARxNextDesc->Status = ETH_DMARxDesc_OWN; DMARxNextDesc = (ETH_DMADESCTypeDef *)(DMARxNextDesc->Buffer2NextDescAddr); } /* Clear Segment_Count */ DMA_RX_FRAME_infos->Seg_Count =0; 80376a6: 2200 movs r2, #0 80376a8: 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) 80376aa: f8d9 3000 ldr.w r3, [r9] 80376ae: 061b lsls r3, r3, #24 80376b0: d504 bpl.n 80376bc { /* Clear RBUS ETHERNET DMA flag */ ETH->DMASR = ETH_DMASR_RBUS; 80376b2: 2380 movs r3, #128 ; 0x80 80376b4: f8c9 3000 str.w r3, [r9] /* Resume DMA reception */ ETH->DMARPDR = 0; 80376b8: 4b0a ldr r3, [pc, #40] ; (80376e4 ) 80376ba: 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) 80376bc: 2c00 cmp r4, #0 80376be: d0b4 beq.n 803762a { if (ERR_OK != s_pxNetIf->input( p, s_pxNetIf)) 80376c0: 4b09 ldr r3, [pc, #36] ; (80376e8 ) 80376c2: 6819 ldr r1, [r3, #0] 80376c4: 4620 mov r0, r4 80376c6: 690b ldr r3, [r1, #16] 80376c8: 4798 blx r3 80376ca: 4601 mov r1, r0 80376cc: b118 cbz r0, 80376d6 { pbuf_free(p); 80376ce: 4620 mov r0, r4 80376d0: f7f8 fb9c bl 802fe0c 80376d4: e7a9 b.n 803762a p=NULL; } else { xSemaphoreTake(s_xSemaphore, 0); 80376d6: f8d8 0000 ldr.w r0, [r8] 80376da: 460a mov r2, r1 80376dc: 460b mov r3, r1 80376de: f7f3 f882 bl 802a7e6 goto GET_NEXT_FRAGMENT; 80376e2: e7af b.n 8037644 80376e4: 40029008 .word 0x40029008 80376e8: 2000c7c8 .word 0x2000c7c8 80376ec: 2000c7cc .word 0x2000c7cc 80376f0: 20011ae0 .word 0x20011ae0 80376f4: 40029014 .word 0x40029014 080376f8 : * 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) { 80376f8: b570 push {r4, r5, r6, lr} static SemaphoreHandle_t xTxSemaphore = NULL; struct pbuf *q; uint32_t l = 0; u8 *buffer ; if (xTxSemaphore == NULL) 80376fa: 4e19 ldr r6, [pc, #100] ; (8037760 ) 80376fc: 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) { 80376fe: 460c mov r4, r1 static SemaphoreHandle_t xTxSemaphore = NULL; struct pbuf *q; uint32_t l = 0; u8 *buffer ; if (xTxSemaphore == NULL) 8037700: b95d cbnz r5, 803771a { vSemaphoreCreateBinary (xTxSemaphore); 8037702: 2001 movs r0, #1 8037704: 4629 mov r1, r5 8037706: 2203 movs r2, #3 8037708: f7f2 fef0 bl 802a4ec 803770c: 6030 str r0, [r6, #0] 803770e: b120 cbz r0, 803771a 8037710: 4629 mov r1, r5 8037712: 462a mov r2, r5 8037714: 462b mov r3, r5 8037716: f7f2 ff26 bl 802a566 } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) 803771a: 4b11 ldr r3, [pc, #68] ; (8037760 ) 803771c: 2100 movs r1, #0 803771e: 6818 ldr r0, [r3, #0] 8037720: 22fa movs r2, #250 ; 0xfa 8037722: 460b mov r3, r1 8037724: f7f3 f85f bl 802a7e6 8037728: b1c0 cbz r0, 803775c { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); 803772a: 4b0e ldr r3, [pc, #56] ; (8037764 ) 803772c: 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; 803772e: 2500 movs r5, #0 vSemaphoreCreateBinary (xTxSemaphore); } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); 8037730: 689e ldr r6, [r3, #8] 8037732: e007 b.n 8037744 for(q = p; q != NULL; q = q->next) { memcpy((u8_t*)&buffer[l], q->payload, q->len); 8037734: 1970 adds r0, r6, r5 8037736: 6861 ldr r1, [r4, #4] 8037738: 8962 ldrh r2, [r4, #10] 803773a: f7ea f927 bl 802198c l = l + q->len; 803773e: 8963 ldrh r3, [r4, #10] } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); for(q = p; q != NULL; q = q->next) 8037740: 6824 ldr r4, [r4, #0] { memcpy((u8_t*)&buffer[l], q->payload, q->len); l = l + q->len; 8037742: 18ed adds r5, r5, r3 } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); for(q = p; q != NULL; q = q->next) 8037744: 2c00 cmp r4, #0 8037746: d1f5 bne.n 8037734 { memcpy((u8_t*)&buffer[l], q->payload, q->len); l = l + q->len; } ETH_Prepare_Transmit_Descriptors(l); 8037748: b2a8 uxth r0, r5 803774a: f001 fc6d bl 8039028 xSemaphoreGive(xTxSemaphore); 803774e: 4b04 ldr r3, [pc, #16] ; (8037760 ) 8037750: 4621 mov r1, r4 8037752: 6818 ldr r0, [r3, #0] 8037754: 4622 mov r2, r4 8037756: 4623 mov r3, r4 8037758: f7f2 ff05 bl 802a566 } return ERR_OK; } 803775c: 2000 movs r0, #0 803775e: bd70 pop {r4, r5, r6, pc} 8037760: 2000c7d0 .word 0x2000c7d0 8037764: 2000fc74 .word 0x2000fc74 08037768 : #if LWIP_NETIF_HOSTNAME /* Initialize interface hostname */ netif->hostname = "lwip"; #endif /* LWIP_NETIF_HOSTNAME */ netif->name[0] = IFNAME0; 8037768: 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) { 803776a: b530 push {r4, r5, lr} #if LWIP_NETIF_HOSTNAME /* Initialize interface hostname */ netif->hostname = "lwip"; #endif /* LWIP_NETIF_HOSTNAME */ netif->name[0] = IFNAME0; 803776c: f880 302e strb.w r3, [r0, #46] ; 0x2e netif->name[1] = IFNAME1; 8037770: 2374 movs r3, #116 ; 0x74 8037772: f880 302f strb.w r3, [r0, #47] ; 0x2f netif->output = etharp_output; 8037776: 4b37 ldr r3, [pc, #220] ; (8037854 ) 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) 8037778: 4d37 ldr r5, [pc, #220] ; (8037858 ) #endif /* LWIP_NETIF_HOSTNAME */ netif->name[0] = IFNAME0; netif->name[1] = IFNAME1; netif->output = etharp_output; 803777a: 6143 str r3, [r0, #20] netif->linkoutput = low_level_output; 803777c: 4b37 ldr r3, [pc, #220] ; (803785c ) * @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) { 803777e: b087 sub sp, #28 netif->name[0] = IFNAME0; netif->name[1] = IFNAME1; netif->output = etharp_output; netif->linkoutput = low_level_output; 8037780: 6183 str r3, [r0, #24] { uint8_t mac[6]; uint32_t i; /* set netif MAC hardware address length */ netif->hwaddr_len = ETHARP_HWADDR_LEN; 8037782: 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) { 8037784: 4604 mov r4, r0 { uint8_t mac[6]; uint32_t i; /* set netif MAC hardware address length */ netif->hwaddr_len = ETHARP_HWADDR_LEN; 8037786: f880 3026 strb.w r3, [r0, #38] ; 0x26 /* set netif MAC hardware address */ SETTINGS_GetMac(mac); 803778a: a804 add r0, sp, #16 803778c: f7f1 f926 bl 80289dc netif->hwaddr[0] = mac[0]; 8037790: 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) 8037794: 6829 ldr r1, [r5, #0] /* set netif MAC hardware address */ SETTINGS_GetMac(mac); netif->hwaddr[0] = mac[0]; 8037796: f884 3027 strb.w r3, [r4, #39] ; 0x27 netif->hwaddr[1] = mac[1]; 803779a: f89d 3011 ldrb.w r3, [sp, #17] 803779e: f884 3028 strb.w r3, [r4, #40] ; 0x28 netif->hwaddr[2] = mac[2]; 80377a2: f89d 3012 ldrb.w r3, [sp, #18] 80377a6: f884 3029 strb.w r3, [r4, #41] ; 0x29 netif->hwaddr[3] = mac[3]; 80377aa: f89d 3013 ldrb.w r3, [sp, #19] 80377ae: f884 302a strb.w r3, [r4, #42] ; 0x2a netif->hwaddr[4] = mac[4]; 80377b2: f89d 3014 ldrb.w r3, [sp, #20] 80377b6: f884 302b strb.w r3, [r4, #43] ; 0x2b netif->hwaddr[5] = mac[5]; 80377ba: f89d 3015 ldrb.w r3, [sp, #21] 80377be: f884 302c strb.w r3, [r4, #44] ; 0x2c /* set netif maximum transfer unit */ netif->mtu = 1500; 80377c2: f240 53dc movw r3, #1500 ; 0x5dc 80377c6: 84a3 strh r3, [r4, #36] ; 0x24 /* Accept broadcast address and ARP traffic */ netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP; 80377c8: 2322 movs r3, #34 ; 0x22 80377ca: f884 302d strb.w r3, [r4, #45] ; 0x2d s_pxNetIf =netif; 80377ce: 4b24 ldr r3, [pc, #144] ; (8037860 ) 80377d0: 601c str r4, [r3, #0] /* create binary semaphore used for informing ethernetif of frame reception */ if (s_xSemaphore == NULL) 80377d2: b919 cbnz r1, 80377dc { s_xSemaphore= xSemaphoreCreateCounting(20,0); 80377d4: 2014 movs r0, #20 80377d6: f7f2 feb0 bl 802a53a 80377da: 6028 str r0, [r5, #0] } /* initialize MAC address in ethernet MAC */ ETH_MACAddressConfig(ETH_MAC_Address0, netif->hwaddr); 80377dc: f104 0127 add.w r1, r4, #39 ; 0x27 80377e0: 2000 movs r0, #0 80377e2: f001 fbb9 bl 8038f58 /* Initialize Tx Descriptors list: Chain Mode */ ETH_DMATxDescChainInit(DMATxDscrTab, &Tx_Buff[0][0], ETH_TXBUFNB); 80377e6: 481f ldr r0, [pc, #124] ; (8037864 ) 80377e8: 491f ldr r1, [pc, #124] ; (8037868 ) /* 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); 80377ec: 2205 movs r2, #5 80377ee: f001 fca1 bl 8039134 /* Initialize Rx Descriptors list: Chain Mode */ ETH_DMARxDescChainInit(DMARxDscrTab, &Rx_Buff[0][0], ETH_RXBUFNB); 80377f2: 481e ldr r0, [pc, #120] ; (803786c ) 80377f4: 491e ldr r1, [pc, #120] ; (8037870 ) 80377f6: 2205 movs r2, #5 80377f8: f001 fc70 bl 80390dc /* 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, 8037824: 2400 movs r4, #0 8037826: 2304 movs r3, #4 8037828: 2296 movs r2, #150 ; 0x96 803782a: e88d 0018 stmia.w sp, {r3, r4} 803782e: 4911 ldr r1, [pc, #68] ; (8037874 ) 8037830: 9402 str r4, [sp, #8] 8037832: 4623 mov r3, r4 8037834: 9403 str r4, [sp, #12] 8037836: 4810 ldr r0, [pc, #64] ; (8037878 ) 8037838: f7f3 f92e bl 802aa98 netifINTERFACE_TASK_PRIORITY,NULL); /* Enable MAC and DMA transmission and reception */ ETH_Start(); 803783c: f001 fcf6 bl 803922c /* initialize the hardware */ low_level_init(netif); etharp_init(); sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 8037840: f241 3088 movw r0, #5000 ; 0x1388 8037844: 490d ldr r1, [pc, #52] ; (803787c ) 8037846: 4622 mov r2, r4 8037848: f7fa fe88 bl 803255c return ERR_OK; } 803784c: 4620 mov r0, r4 803784e: b007 add sp, #28 8037850: bd30 pop {r4, r5, pc} 8037852: bf00 nop 8037854: 0803730d .word 0x0803730d 8037858: 2000c7cc .word 0x2000c7cc 803785c: 080376f9 .word 0x080376f9 8037860: 2000c7c8 .word 0x2000c7c8 8037864: 2000fc78 .word 0x2000fc78 8037868: 20011b84 .word 0x20011b84 803786c: 20011ae4 .word 0x20011ae4 8037870: 2000fd18 .word 0x2000fd18 8037874: 08045943 .word 0x08045943 8037878: 08037621 .word 0x08037621 803787c: 08037605 .word 0x08037605 08037880 : * 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 ) { 8037880: b510 push {r4, lr} err_t xReturn = ERR_MEM; *pxMailBox = xQueueCreate( iSize, sizeof( void * ) ); 8037882: 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 ) { 8037884: 4604 mov r4, r0 err_t xReturn = ERR_MEM; *pxMailBox = xQueueCreate( iSize, sizeof( void * ) ); 8037886: 4608 mov r0, r1 8037888: 2104 movs r1, #4 803788a: f7f2 fe2f bl 802a4ec 803788e: 6020 str r0, [r4, #0] xReturn = ERR_OK; SYS_STATS_INC_USED( mbox ); } return xReturn; } 8037890: 2800 cmp r0, #0 8037892: bf14 ite ne 8037894: 2000 movne r0, #0 8037896: f06f 0000 mvneq.w r0, #0 803789a: bd10 pop {r4, pc} 0803789c : * sys_mbox_t mbox -- Handle of mailbox * Outputs: * sys_mbox_t -- Handle to new mailbox *---------------------------------------------------------------------------*/ void sys_mbox_free( sys_mbox_t *pxMailBox ) { 803789c: b510 push {r4, lr} 803789e: 4604 mov r4, r0 unsigned long ulMessagesWaiting; ulMessagesWaiting = uxQueueMessagesWaiting( *pxMailBox ); 80378a0: 6800 ldr r0, [r0, #0] 80378a2: f7f3 f87c bl 802a99e configASSERT( ( ulMessagesWaiting == 0 ) ); 80378a6: b110 cbz r0, 80378ae 80378a8: f7f3 ff9e bl 802b7e8 80378ac: e7fe b.n 80378ac SYS_STATS_DEC( mbox.used ); } #endif /* SYS_STATS */ vQueueDelete( *pxMailBox ); 80378ae: 6820 ldr r0, [r4, #0] } 80378b0: e8bd 4010 ldmia.w sp!, {r4, lr} SYS_STATS_DEC( mbox.used ); } #endif /* SYS_STATS */ vQueueDelete( *pxMailBox ); 80378b4: f7f3 b88f b.w 802a9d6 080378b8 : * 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 ) { 80378b8: b537 push {r0, r1, r2, r4, r5, lr} 80378ba: ac02 add r4, sp, #8 80378bc: 4605 mov r5, r0 80378be: f844 1d04 str.w r1, [r4, #-4]! while( xQueueSendToBack( *pxMailBox, &pxMessageToPost, portMAX_DELAY ) != pdTRUE ); 80378c2: 2300 movs r3, #0 80378c4: 6828 ldr r0, [r5, #0] 80378c6: 4621 mov r1, r4 80378c8: f04f 32ff mov.w r2, #4294967295 80378cc: f7f2 fe4b bl 802a566 80378d0: 2801 cmp r0, #1 80378d2: d1f6 bne.n 80378c2 } 80378d4: bd3e pop {r1, r2, r3, r4, r5, pc} 80378d6: 0000 movs r0, r0 080378d8 : * Outputs: * err_t -- ERR_OK if message posted, else ERR_MEM * if not. *---------------------------------------------------------------------------*/ err_t sys_mbox_trypost( sys_mbox_t *pxMailBox, void *pxMessageToPost ) { 80378d8: b51f push {r0, r1, r2, r3, r4, lr} err_t xReturn; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if( xInsideISR != pdFALSE ) 80378da: 4a0b ldr r2, [pc, #44] ; (8037908 ) * Outputs: * err_t -- ERR_OK if message posted, else ERR_MEM * if not. *---------------------------------------------------------------------------*/ err_t sys_mbox_trypost( sys_mbox_t *pxMailBox, void *pxMessageToPost ) { 80378dc: 9101 str r1, [sp, #4] err_t xReturn; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if( xInsideISR != pdFALSE ) 80378de: 6812 ldr r2, [r2, #0] { xReturn = xQueueSendFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken ); 80378e0: 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; 80378e2: 2300 movs r3, #0 80378e4: 9303 str r3, [sp, #12] if( xInsideISR != pdFALSE ) { xReturn = xQueueSendFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken ); 80378e6: 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 ) 80378e8: b11a cbz r2, 80378f2 { xReturn = xQueueSendFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken ); 80378ea: aa03 add r2, sp, #12 80378ec: f7f2 feff bl 802a6ee 80378f0: e002 b.n 80378f8 } else { xReturn = xQueueSend( *pxMailBox, &pxMessageToPost, ( TickType_t ) 0 ); 80378f2: 4613 mov r3, r2 80378f4: f7f2 fe37 bl 802a566 80378f8: b2c0 uxtb r0, r0 xReturn = ERR_MEM; SYS_STATS_INC( mbox.err ); } return xReturn; } 80378fa: 3801 subs r0, #1 80378fc: bf18 it ne 80378fe: f06f 0000 mvnne.w r0, #0 8037902: b005 add sp, #20 8037904: bd00 pop {pc} 8037906: bf00 nop 8037908: 2000c7d4 .word 0x2000c7d4 0803790c : * 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 ) { 803790c: e92d 41f3 stmdb sp!, {r0, r1, r4, r5, r6, r7, r8, lr} 8037910: 4607 mov r7, r0 8037912: 460c mov r4, r1 8037914: 4690 mov r8, r2 void *pvDummy; TickType_t xStartTime, xEndTime, xElapsed; unsigned long ulReturn; xStartTime = xTaskGetTickCount(); 8037916: f7f3 fa27 bl 802ad68 803791a: 4605 mov r5, r0 if( NULL == ppvBuffer ) 803791c: b904 cbnz r4, 8037920 { ppvBuffer = &pvDummy; 803791e: ac01 add r4, sp, #4 } if( ulTimeOut != 0UL ) 8037920: f1b8 0f00 cmp.w r8, #0 8037924: d015 beq.n 8037952 { configASSERT( xInsideISR == ( portBASE_TYPE ) 0 ); 8037926: 4b13 ldr r3, [pc, #76] ; (8037974 ) 8037928: 681e ldr r6, [r3, #0] 803792a: b116 cbz r6, 8037932 803792c: f7f3 ff5c bl 802b7e8 8037930: e7fe b.n 8037930 if( pdTRUE == xQueueReceive( *pxMailBox, &( *ppvBuffer ), ulTimeOut/ portTICK_PERIOD_MS ) ) 8037932: 6838 ldr r0, [r7, #0] 8037934: 4621 mov r1, r4 8037936: 4642 mov r2, r8 8037938: 4633 mov r3, r6 803793a: f7f2 ff54 bl 802a7e6 803793e: 2801 cmp r0, #1 8037940: d103 bne.n 803794a { xEndTime = xTaskGetTickCount(); 8037942: f7f3 fa11 bl 802ad68 xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS; 8037946: 1b40 subs r0, r0, r5 8037948: e011 b.n 803796e ulReturn = xElapsed; } else { /* Timed out. */ *ppvBuffer = NULL; 803794a: 6026 str r6, [r4, #0] ulReturn = SYS_ARCH_TIMEOUT; 803794c: f04f 30ff mov.w r0, #4294967295 8037950: e00d b.n 803796e } } else { while( pdTRUE != xQueueReceive( *pxMailBox, &( *ppvBuffer ), portMAX_DELAY ) ); 8037952: 2300 movs r3, #0 8037954: 6838 ldr r0, [r7, #0] 8037956: 4621 mov r1, r4 8037958: f04f 32ff mov.w r2, #4294967295 803795c: f7f2 ff43 bl 802a7e6 8037960: 2801 cmp r0, #1 8037962: d1f6 bne.n 8037952 xEndTime = xTaskGetTickCount(); 8037964: f7f3 fa00 bl 802ad68 xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS; if( xElapsed == 0UL ) 8037968: 1b40 subs r0, r0, r5 803796a: bf08 it eq 803796c: 2001 moveq r0, #1 ulReturn = xElapsed; } return ulReturn; } 803796e: e8bd 81fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, pc} 8037972: bf00 nop 8037974: 2000c7d4 .word 0x2000c7d4 08037978 : * 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 ) { 8037978: b507 push {r0, r1, r2, lr} void *pvDummy; unsigned long ulReturn; long lResult; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; 803797a: 2300 movs r3, #0 803797c: 9301 str r3, [sp, #4] if( ppvBuffer== NULL ) 803797e: b901 cbnz r1, 8037982 { ppvBuffer = &pvDummy; 8037980: 4669 mov r1, sp } if( xInsideISR != pdFALSE ) 8037982: 4b08 ldr r3, [pc, #32] ; (80379a4 ) { lResult = xQueueReceiveFromISR( *pxMailBox, &( *ppvBuffer ), &xHigherPriorityTaskWoken ); 8037984: 6800 ldr r0, [r0, #0] if( ppvBuffer== NULL ) { ppvBuffer = &pvDummy; } if( xInsideISR != pdFALSE ) 8037986: 681a ldr r2, [r3, #0] 8037988: b11a cbz r2, 8037992 { lResult = xQueueReceiveFromISR( *pxMailBox, &( *ppvBuffer ), &xHigherPriorityTaskWoken ); 803798a: aa01 add r2, sp, #4 803798c: f7f2 ffce bl 802a92c 8037990: e002 b.n 8037998 } else { lResult = xQueueReceive( *pxMailBox, &( *ppvBuffer ), 0UL ); 8037992: 4613 mov r3, r2 8037994: f7f2 ff27 bl 802a7e6 { ulReturn = SYS_MBOX_EMPTY; } return ulReturn; } 8037998: 2801 cmp r0, #1 803799a: bf14 ite ne 803799c: f04f 30ff movne.w r0, #4294967295 80379a0: 2000 moveq r0, #0 80379a2: bd0e pop {r1, r2, r3, pc} 80379a4: 2000c7d4 .word 0x2000c7d4 080379a8 : * 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 ) { 80379a8: b538 push {r3, r4, r5, lr} err_t xReturn = ERR_MEM; vSemaphoreCreateBinary( ( *pxSemaphore ) ); 80379aa: 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 ) { 80379ac: 4605 mov r5, r0 80379ae: 460c mov r4, r1 err_t xReturn = ERR_MEM; vSemaphoreCreateBinary( ( *pxSemaphore ) ); 80379b0: 2001 movs r0, #1 80379b2: 2100 movs r1, #0 80379b4: f7f2 fd9a bl 802a4ec 80379b8: 6028 str r0, [r5, #0] 80379ba: b120 cbz r0, 80379c6 80379bc: 2100 movs r1, #0 80379be: 460a mov r2, r1 80379c0: 460b mov r3, r1 80379c2: f7f2 fdd0 bl 802a566 if( *pxSemaphore != NULL ) 80379c6: 6828 ldr r0, [r5, #0] 80379c8: b130 cbz r0, 80379d8 { if( ucCount == 0U ) 80379ca: b93c cbnz r4, 80379dc { xSemaphoreTake( *pxSemaphore, 1UL ); 80379cc: 4621 mov r1, r4 80379ce: 2201 movs r2, #1 80379d0: 4623 mov r3, r4 80379d2: f7f2 ff08 bl 802a7e6 80379d6: e001 b.n 80379dc * 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; 80379d8: 20ff movs r0, #255 ; 0xff 80379da: e000 b.n 80379de if( ucCount == 0U ) { xSemaphoreTake( *pxSemaphore, 1UL ); } xReturn = ERR_OK; 80379dc: 2000 movs r0, #0 { SYS_STATS_INC( sem.err ); } return xReturn; } 80379de: b240 sxtb r0, r0 80379e0: bd38 pop {r3, r4, r5, pc} 080379e2 : * 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 ) { 80379e2: b570 push {r4, r5, r6, lr} 80379e4: 4605 mov r5, r0 80379e6: 460e mov r6, r1 TickType_t xStartTime, xEndTime, xElapsed; unsigned long ulReturn; xStartTime = xTaskGetTickCount(); 80379e8: f7f3 f9be bl 802ad68 80379ec: 4604 mov r4, r0 if( ulTimeout != 0UL ) 80379ee: b15e cbz r6, 8037a08 { if( xSemaphoreTake( *pxSemaphore, ulTimeout / portTICK_PERIOD_MS ) == pdTRUE ) 80379f0: 2100 movs r1, #0 80379f2: 6828 ldr r0, [r5, #0] 80379f4: 4632 mov r2, r6 80379f6: 460b mov r3, r1 80379f8: f7f2 fef5 bl 802a7e6 80379fc: 2801 cmp r0, #1 80379fe: d112 bne.n 8037a26 { xEndTime = xTaskGetTickCount(); 8037a00: f7f3 f9b2 bl 802ad68 xElapsed = (xEndTime - xStartTime) * portTICK_PERIOD_MS; 8037a04: 1b00 subs r0, r0, r4 8037a06: bd70 pop {r4, r5, r6, pc} ulReturn = SYS_ARCH_TIMEOUT; } } else { while( xSemaphoreTake( *pxSemaphore, portMAX_DELAY ) != pdTRUE ); 8037a08: 2100 movs r1, #0 8037a0a: 6828 ldr r0, [r5, #0] 8037a0c: f04f 32ff mov.w r2, #4294967295 8037a10: 460b mov r3, r1 8037a12: f7f2 fee8 bl 802a7e6 8037a16: 2801 cmp r0, #1 8037a18: d1f6 bne.n 8037a08 xEndTime = xTaskGetTickCount(); 8037a1a: f7f3 f9a5 bl 802ad68 xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS; if( xElapsed == 0UL ) 8037a1e: 1b00 subs r0, r0, r4 8037a20: bf08 it eq 8037a22: 2001 moveq r0, #1 8037a24: bd70 pop {r4, r5, r6, pc} xElapsed = (xEndTime - xStartTime) * portTICK_PERIOD_MS; ulReturn = xElapsed; } else { ulReturn = SYS_ARCH_TIMEOUT; 8037a26: f04f 30ff mov.w r0, #4294967295 ulReturn = xElapsed; } return ulReturn; } 8037a2a: bd70 pop {r4, r5, r6, pc} 08037a2c : /** 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 ) { 8037a2c: b510 push {r4, lr} 8037a2e: 4604 mov r4, r0 err_t xReturn = ERR_MEM; *pxMutex = xSemaphoreCreateMutex(); 8037a30: 2001 movs r0, #1 8037a32: f7f2 fe32 bl 802a69a 8037a36: 6020 str r0, [r4, #0] { SYS_STATS_INC( mutex.err ); } return xReturn; } 8037a38: 2800 cmp r0, #0 8037a3a: bf14 ite ne 8037a3c: 2000 movne r0, #0 8037a3e: f06f 0000 mvneq.w r0, #0 8037a42: bd10 pop {r4, pc} 08037a44 : /** Lock a mutex * @param mutex the mutex to lock */ void sys_mutex_lock( sys_mutex_t *pxMutex ) { 8037a44: b510 push {r4, lr} 8037a46: 4604 mov r4, r0 while( xSemaphoreTake( *pxMutex, portMAX_DELAY ) != pdPASS ); 8037a48: 2100 movs r1, #0 8037a4a: 6820 ldr r0, [r4, #0] 8037a4c: f04f 32ff mov.w r2, #4294967295 8037a50: 460b mov r3, r1 8037a52: f7f2 fec8 bl 802a7e6 8037a56: 2801 cmp r0, #1 8037a58: d1f6 bne.n 8037a48 } 8037a5a: bd10 pop {r4, pc} 08037a5c : /** Unlock a mutex * @param mutex the mutex to unlock */ void sys_mutex_unlock(sys_mutex_t *pxMutex ) { xSemaphoreGive( *pxMutex ); 8037a5c: 2100 movs r1, #0 8037a5e: 6800 ldr r0, [r0, #0] 8037a60: 460a mov r2, r1 8037a62: 460b mov r3, r1 8037a64: f7f2 bd7f b.w 802a566 08037a68 : * Signals (releases) a semaphore * Inputs: * sys_sem_t sem -- Semaphore to signal *---------------------------------------------------------------------------*/ void sys_sem_signal( sys_sem_t *pxSemaphore ) { 8037a68: b507 push {r0, r1, r2, lr} portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; 8037a6a: 2300 movs r3, #0 8037a6c: 9301 str r3, [sp, #4] if( xInsideISR != pdFALSE ) 8037a6e: 4b06 ldr r3, [pc, #24] ; (8037a88 ) { xSemaphoreGiveFromISR( *pxSemaphore, &xHigherPriorityTaskWoken ); 8037a70: 6800 ldr r0, [r0, #0] *---------------------------------------------------------------------------*/ void sys_sem_signal( sys_sem_t *pxSemaphore ) { portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if( xInsideISR != pdFALSE ) 8037a72: 6819 ldr r1, [r3, #0] 8037a74: b119 cbz r1, 8037a7e { xSemaphoreGiveFromISR( *pxSemaphore, &xHigherPriorityTaskWoken ); 8037a76: a901 add r1, sp, #4 8037a78: f7f2 fe83 bl 802a782 8037a7c: e003 b.n 8037a86 } else { xSemaphoreGive( *pxSemaphore ); 8037a7e: 460a mov r2, r1 8037a80: 460b mov r3, r1 8037a82: f7f2 fd70 bl 802a566 } } 8037a86: bd0e pop {r1, r2, r3, pc} 8037a88: 2000c7d4 .word 0x2000c7d4 08037a8c : * sys_sem_t sem -- Semaphore to free *---------------------------------------------------------------------------*/ void sys_sem_free( sys_sem_t *pxSemaphore ) { SYS_STATS_DEC(sem.used); vQueueDelete( *pxSemaphore ); 8037a8c: 6800 ldr r0, [r0, #0] 8037a8e: f7f2 bfa2 b.w 802a9d6 08037a92 : *---------------------------------------------------------------------------* * Description: * Initialize sys arch *---------------------------------------------------------------------------*/ void sys_init(void) { 8037a92: 4770 bx lr 08037a94 : } u32_t sys_now(void) { return xTaskGetTickCount(); 8037a94: f7f3 b968 b.w 802ad68 08037a98 : * 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 ) { 8037a98: b570 push {r4, r5, r6, lr} 8037a9a: b086 sub sp, #24 8037a9c: 4606 mov r6, r0 TaskHandle_t xCreatedTask; portBASE_TYPE xResult; sys_thread_t xReturn; xResult = xTaskCreate( pxThread, pcName, iStackSize, pvArg, iPriority, &xCreatedTask ); 8037a9e: 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 ) { 8037aa0: 4615 mov r5, r2 TaskHandle_t xCreatedTask; portBASE_TYPE xResult; sys_thread_t xReturn; xResult = xTaskCreate( pxThread, pcName, iStackSize, pvArg, iPriority, &xCreatedTask ); 8037aa2: 9400 str r4, [sp, #0] 8037aa4: aa05 add r2, sp, #20 8037aa6: 2400 movs r4, #0 8037aa8: 9201 str r2, [sp, #4] 8037aaa: 9402 str r4, [sp, #8] 8037aac: b29a uxth r2, r3 8037aae: 9403 str r4, [sp, #12] 8037ab0: 4608 mov r0, r1 8037ab2: 462b mov r3, r5 8037ab4: 4631 mov r1, r6 8037ab6: f7f2 ffef bl 802aa98 if( xResult == pdPASS ) 8037aba: 2801 cmp r0, #1 { xReturn = xCreatedTask; 8037abc: bf0c ite eq 8037abe: 9805 ldreq r0, [sp, #20] } else { xReturn = NULL; 8037ac0: 4620 movne r0, r4 } return xReturn; } 8037ac2: b006 add sp, #24 8037ac4: bd70 pop {r4, r5, r6, pc} 8037ac6: 0000 movs r0, r0 08037ac8 : * operating system. * Outputs: * sys_prot_t -- Previous protection level (not used here) *---------------------------------------------------------------------------*/ sys_prot_t sys_arch_protect( void ) { 8037ac8: b508 push {r3, lr} if( xInsideISR == pdFALSE ) 8037aca: 4b03 ldr r3, [pc, #12] ; (8037ad8 ) 8037acc: 681b ldr r3, [r3, #0] 8037ace: b90b cbnz r3, 8037ad4 { taskENTER_CRITICAL(); 8037ad0: f7f3 fe92 bl 802b7f8 } return ( sys_prot_t ) 1; } 8037ad4: 2001 movs r0, #1 8037ad6: bd08 pop {r3, pc} 8037ad8: 2000c7d4 .word 0x2000c7d4 08037adc : * sys_prot_t -- Previous protection level (not used here) *---------------------------------------------------------------------------*/ void sys_arch_unprotect( sys_prot_t xValue ) { (void) xValue; if( xInsideISR == pdFALSE ) 8037adc: 4b02 ldr r3, [pc, #8] ; (8037ae8 ) 8037ade: 681b ldr r3, [r3, #0] 8037ae0: b90b cbnz r3, 8037ae6 { taskEXIT_CRITICAL(); 8037ae2: f7f3 beb5 b.w 802b850 8037ae6: 4770 bx lr 8037ae8: 2000c7d4 .word 0x2000c7d4 08037aec : * Если флаг не устанавливается в положенное время, то сбрасывается * флаг sSettings.sFlags.netsettingsChanged, сохраняется вся структура * настроек в памяти и контроллер перезагружается. */ void vTaskWebReinit(void * pvParameters) { 8037aec: b538 push {r3, r4, r5, lr} static uint16_t timeCounter = 0; for (;;) { /* Контроль времени работы задачи */ if (timeCounter++ > TIME_COUNTER_10_MIN) 8037aee: 4c1b ldr r4, [pc, #108] ; (8037b5c ) if (fConfirmWebParams) { fConfirmWebParams = false; /* Сохраняем временные сетевые настройки в постоянные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 8037af0: 4d1b ldr r5, [pc, #108] ; (8037b60 ) static uint16_t timeCounter = 0; for (;;) { /* Контроль времени работы задачи */ if (timeCounter++ > TIME_COUNTER_10_MIN) 8037af2: 8823 ldrh r3, [r4, #0] 8037af4: 1c5a adds r2, r3, #1 8037af6: f5b3 7f16 cmp.w r3, #600 ; 0x258 8037afa: 8022 strh r2, [r4, #0] 8037afc: d90a bls.n 8037b14 { SetWebReinitFlag(false); 8037afe: 2000 movs r0, #0 8037b00: f7f0 fb16 bl 8028130 HTTP_SaveSettings(); 8037b04: f7f6 f95a bl 802ddbc vTaskDelay(1010); 8037b08: f240 30f2 movw r0, #1010 ; 0x3f2 8037b0c: f7f3 fa5e bl 802afcc Reboot(); 8037b10: f7f1 faf8 bl 8029104 } if (fConfirmWebParams) 8037b14: 4b13 ldr r3, [pc, #76] ; (8037b64 ) 8037b16: 781a ldrb r2, [r3, #0] 8037b18: b1d2 cbz r2, 8037b50 { fConfirmWebParams = false; 8037b1a: 2200 movs r2, #0 /* Сохраняем временные сетевые настройки в постоянные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 8037b1c: 4812 ldr r0, [pc, #72] ; (8037b68 ) Reboot(); } if (fConfirmWebParams) { fConfirmWebParams = false; 8037b1e: 701a strb r2, [r3, #0] /* Сохраняем временные сетевые настройки в постоянные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 8037b20: f895 3063 ldrb.w r3, [r5, #99] ; 0x63 strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 8037b24: f100 0131 add.w r1, r0, #49 ; 0x31 if (fConfirmWebParams) { fConfirmWebParams = false; /* Сохраняем временные сетевые настройки в постоянные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 8037b28: f885 3032 strb.w r3, [r5, #50] ; 0x32 strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 8037b2c: f7ea f962 bl 8021df4 strcpy(sSettings.sWebParams.gate, sSettings.sWebTempParams.gate); 8037b30: 480e ldr r0, [pc, #56] ; (8037b6c ) 8037b32: f100 0131 add.w r1, r0, #49 ; 0x31 8037b36: f7ea f95d bl 8021df4 strcpy(sSettings.sWebParams.mask, sSettings.sWebTempParams.mask); 8037b3a: 480d ldr r0, [pc, #52] ; (8037b70 ) 8037b3c: f100 0131 add.w r1, r0, #49 ; 0x31 8037b40: f7ea f958 bl 8021df4 HTTP_SaveSettings(); 8037b44: f7f6 f93a bl 802ddbc vTaskDelete(xHandleWebReinit); 8037b48: 4b0a ldr r3, [pc, #40] ; (8037b74 ) 8037b4a: 6818 ldr r0, [r3, #0] 8037b4c: f7f3 f87c bl 802ac48 } vTaskDelay(1000); 8037b50: f44f 707a mov.w r0, #1000 ; 0x3e8 8037b54: f7f3 fa3a bl 802afcc } 8037b58: e7cb b.n 8037af2 8037b5a: bf00 nop 8037b5c: 2000c7e4 .word 0x2000c7e4 8037b60: 2000cfc4 .word 0x2000cfc4 8037b64: 20000b18 .word 0x20000b18 8037b68: 2000cfc6 .word 0x2000cfc6 8037b6c: 2000cfd6 .word 0x2000cfd6 8037b70: 2000cfe6 .word 0x2000cfe6 8037b74: 2000c7dc .word 0x2000c7dc 08037b78 : * @brief LwIP_DHCP_Process_Handle * @param None * @retval None */ void LwIP_DHCP_task(void * pvParameters) { 8037b78: b530 push {r4, r5, lr} DHCP_state = DHCP_TIMEOUT; /* Stop DHCP */ dhcp_stop(&xnetif); if (sSettings.sFlags.netsettingsChanged == true) 8037b7a: 4d48 ldr r5, [pc, #288] ; (8037c9c ) * @brief LwIP_DHCP_Process_Handle * @param None * @retval None */ void LwIP_DHCP_task(void * pvParameters) { 8037b7c: b085 sub sp, #20 struct ip_addr ipaddr; struct ip_addr netmask; struct ip_addr gw; uint8_t DHCP_state; DHCP_state = DHCP_START; 8037b7e: 2400 movs r4, #0 for (;;) { switch (DHCP_state) 8037b80: b11c cbz r4, 8037b8a 8037b82: 2c01 cmp r4, #1 8037b84: f040 8085 bne.w 8037c92 8037b88: e004 b.n 8037b94 { case DHCP_START: { dhcp_start(&xnetif); 8037b8a: 4845 ldr r0, [pc, #276] ; (8037ca0 ) 8037b8c: f7f7 fe42 bl 802f814 DHCP_state = DHCP_WAIT_ADDRESS; 8037b90: 2401 movs r4, #1 //PRINT_USART("\n\rLooking for DHCP server please wait...\n\r"); } break; 8037b92: e07e b.n 8037c92 case DHCP_WAIT_ADDRESS: { /* Read the new IP address */ ipaddr = xnetif.ip_addr; 8037b94: 4842 ldr r0, [pc, #264] ; (8037ca0 ) netmask = xnetif.netmask; 8037b96: 6882 ldr r2, [r0, #8] break; case DHCP_WAIT_ADDRESS: { /* Read the new IP address */ ipaddr = xnetif.ip_addr; 8037b98: 6843 ldr r3, [r0, #4] netmask = xnetif.netmask; 8037b9a: 9202 str r2, [sp, #8] gw = xnetif.gw; 8037b9c: 68c2 ldr r2, [r0, #12] break; case DHCP_WAIT_ADDRESS: { /* Read the new IP address */ ipaddr = xnetif.ip_addr; 8037b9e: 9301 str r3, [sp, #4] netmask = xnetif.netmask; gw = xnetif.gw; 8037ba0: 9203 str r2, [sp, #12] if (ipaddr.addr != 0) 8037ba2: 2b00 cmp r3, #0 8037ba4: d045 beq.n 8037c32 { DHCP_state = DHCP_ADDRESS_ASSIGNED; dhcp_stop(&xnetif); 8037ba6: f7f7 fe1d bl 802f7e4 /* Сохранение полученных сетевый параметров */ /* Если настройки изменили, то сохраняем во временные настройки */ if (sSettings.sFlags.netsettingsChanged == true) 8037baa: f895 3120 ldrb.w r3, [r5, #288] ; 0x120 { sprintf(sSettings.sWebTempParams.ip, "%s", ipaddr_ntoa(&ipaddr)); 8037bae: a801 add r0, sp, #4 DHCP_state = DHCP_ADDRESS_ASSIGNED; dhcp_stop(&xnetif); /* Сохранение полученных сетевый параметров */ /* Если настройки изменили, то сохраняем во временные настройки */ if (sSettings.sFlags.netsettingsChanged == true) 8037bb0: b103 cbz r3, 8037bb4 8037bb2: e01b b.n 8037bec 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)); 8037bb4: f7fb f9d0 bl 8032f58 8037bb8: 493a ldr r1, [pc, #232] ; (8037ca4 ) 8037bba: 4602 mov r2, r0 8037bbc: 483a ldr r0, [pc, #232] ; (8037ca8 ) 8037bbe: f7ef fe29 bl 8027814 sprintf(sSettings.sWebParams.mask, "%s", ipaddr_ntoa(&netmask)); 8037bc2: a802 add r0, sp, #8 8037bc4: f7fb f9c8 bl 8032f58 8037bc8: 4936 ldr r1, [pc, #216] ; (8037ca4 ) 8037bca: 4602 mov r2, r0 8037bcc: 4837 ldr r0, [pc, #220] ; (8037cac ) 8037bce: f7ef fe21 bl 8027814 sprintf(sSettings.sWebParams.gate, "%s", ipaddr_ntoa(&gw)); 8037bd2: a803 add r0, sp, #12 8037bd4: f7fb f9c0 bl 8032f58 8037bd8: 4932 ldr r1, [pc, #200] ; (8037ca4 ) 8037bda: 4602 mov r2, r0 8037bdc: 4834 ldr r0, [pc, #208] ; (8037cb0 ) 8037bde: f7ef fe19 bl 8027814 /* Обновляем временные настройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; 8037be2: f895 3032 ldrb.w r3, [r5, #50] ; 0x32 sprintf(sSettings.sWebTempParams.ip, "%s", ipaddr_ntoa(&ipaddr)); 8037be6: 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; 8037be8: f885 3063 strb.w r3, [r5, #99] ; 0x63 sprintf(sSettings.sWebTempParams.ip, "%s", ipaddr_ntoa(&ipaddr)); 8037bec: f7fb f9b4 bl 8032f58 8037bf0: 492c ldr r1, [pc, #176] ; (8037ca4 ) 8037bf2: 4602 mov r2, r0 8037bf4: 482f ldr r0, [pc, #188] ; (8037cb4 ) 8037bf6: f7ef fe0d bl 8027814 sprintf(sSettings.sWebTempParams.mask, "%s", ipaddr_ntoa(&netmask)); 8037bfa: a802 add r0, sp, #8 8037bfc: f7fb f9ac bl 8032f58 8037c00: 4928 ldr r1, [pc, #160] ; (8037ca4 ) 8037c02: 4602 mov r2, r0 8037c04: 482c ldr r0, [pc, #176] ; (8037cb8 ) 8037c06: f7ef fe05 bl 8027814 sprintf(sSettings.sWebTempParams.gate, "%s", ipaddr_ntoa(&gw)); 8037c0a: a803 add r0, sp, #12 8037c0c: f7fb f9a4 bl 8032f58 8037c10: 4924 ldr r1, [pc, #144] ; (8037ca4 ) 8037c12: 4602 mov r2, r0 8037c14: 4829 ldr r0, [pc, #164] ; (8037cbc ) 8037c16: f7ef fdfd bl 8027814 PRINT_USART("Gateway: "); PRINT_USART(ipaddr_ntoa(&gw)); PRINT_USART("\n\r"); vTaskDelay(50); 8037c1a: 2032 movs r0, #50 ; 0x32 8037c1c: f7f3 f9d6 bl 802afcc /* Установлен динамический IP, можно отправить трап о перезагрузке устройства */ SNMP_SendUserTrap(DEVICE_REBOOTED); 8037c20: 2004 movs r0, #4 8037c22: f000 fa8b bl 803813c vTaskDelete(xHandleDHCP); 8037c26: 4b26 ldr r3, [pc, #152] ; (8037cc0 ) 8037c28: 6818 ldr r0, [r3, #0] 8037c2a: f7f3 f80d bl 802ac48 netmask = xnetif.netmask; gw = xnetif.gw; if (ipaddr.addr != 0) { DHCP_state = DHCP_ADDRESS_ASSIGNED; 8037c2e: 2402 movs r4, #2 8037c30: e02f b.n 8037c92 vTaskDelete(xHandleDHCP); } else { /* DHCP timeout */ if (xnetif.dhcp->tries > MAX_DHCP_TRIES) 8037c32: 6a03 ldr r3, [r0, #32] 8037c34: 7b5b ldrb r3, [r3, #13] 8037c36: 2b03 cmp r3, #3 8037c38: d92b bls.n 8037c92 { DHCP_state = DHCP_TIMEOUT; /* Stop DHCP */ dhcp_stop(&xnetif); 8037c3a: f7f7 fdd3 bl 802f7e4 if (sSettings.sFlags.netsettingsChanged == true) 8037c3e: f895 3120 ldrb.w r3, [r5, #288] ; 0x120 8037c42: b14b cbz r3, 8037c58 { ipaddr.addr = ipaddr_addr(sSettings.sWebTempParams.ip); 8037c44: 481b ldr r0, [pc, #108] ; (8037cb4 ) 8037c46: f7fb f934 bl 8032eb2 8037c4a: 9001 str r0, [sp, #4] netmask.addr = ipaddr_addr(sSettings.sWebTempParams.mask); 8037c4c: 481a ldr r0, [pc, #104] ; (8037cb8 ) 8037c4e: f7fb f930 bl 8032eb2 8037c52: 9002 str r0, [sp, #8] gw.addr = ipaddr_addr(sSettings.sWebTempParams.gate); 8037c54: 4819 ldr r0, [pc, #100] ; (8037cbc ) 8037c56: e008 b.n 8037c6a } else { ipaddr.addr = ipaddr_addr(sSettings.sWebParams.ip); 8037c58: 4813 ldr r0, [pc, #76] ; (8037ca8 ) 8037c5a: f7fb f92a bl 8032eb2 8037c5e: 9001 str r0, [sp, #4] netmask.addr = ipaddr_addr(sSettings.sWebParams.mask); 8037c60: 4812 ldr r0, [pc, #72] ; (8037cac ) 8037c62: f7fb f926 bl 8032eb2 8037c66: 9002 str r0, [sp, #8] gw.addr = ipaddr_addr(sSettings.sWebParams.gate); 8037c68: 4811 ldr r0, [pc, #68] ; (8037cb0 ) 8037c6a: f7fb f922 bl 8032eb2 } /* Static address used */ netif_set_addr(&xnetif, &ipaddr , &netmask, &gw); 8037c6e: a901 add r1, sp, #4 8037c70: aa02 add r2, sp, #8 8037c72: 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); 8037c74: 9003 str r0, [sp, #12] } /* Static address used */ netif_set_addr(&xnetif, &ipaddr , &netmask, &gw); 8037c76: 480a ldr r0, [pc, #40] ; (8037ca0 ) 8037c78: f7f8 f824 bl 802fcc4 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); 8037c7c: 2032 movs r0, #50 ; 0x32 8037c7e: f7f3 f9a5 bl 802afcc /* Установлен статический IP, можно отправить трап о перезагрузке устройства */ SNMP_SendUserTrap(DEVICE_REBOOTED); 8037c82: 2004 movs r0, #4 8037c84: f000 fa5a bl 803813c vTaskDelete(xHandleDHCP); 8037c88: 4b0d ldr r3, [pc, #52] ; (8037cc0 ) 8037c8a: 6818 ldr r0, [r3, #0] 8037c8c: f7f2 ffdc bl 802ac48 else { /* DHCP timeout */ if (xnetif.dhcp->tries > MAX_DHCP_TRIES) { DHCP_state = DHCP_TIMEOUT; 8037c90: 2403 movs r4, #3 break; default: break; } vTaskDelay(250); 8037c92: 20fa movs r0, #250 ; 0xfa 8037c94: f7f3 f99a bl 802afcc } 8037c98: e772 b.n 8037b80 8037c9a: bf00 nop 8037c9c: 2000cfc4 .word 0x2000cfc4 8037ca0: 2000f86c .word 0x2000f86c 8037ca4: 080399bb .word 0x080399bb 8037ca8: 2000cfc6 .word 0x2000cfc6 8037cac: 2000cfe6 .word 0x2000cfe6 8037cb0: 2000cfd6 .word 0x2000cfd6 8037cb4: 2000cff7 .word 0x2000cff7 8037cb8: 2000d017 .word 0x2000d017 8037cbc: 2000d007 .word 0x2000d007 8037cc0: 2000c7e0 .word 0x2000c7e0 08037cc4 : TaskHandle_t xHandleWebReinit = NULL; bool dhcp = false; void LwIP_Init(void) { 8037cc4: b530 push {r4, r5, lr} struct ip_addr ipaddr; struct ip_addr netmask; struct ip_addr gw; char str[20]; tcpip_init( NULL, NULL ); 8037cc6: 2000 movs r0, #0 /* Если настройки изменили, то используем временные параметры */ if (sSettings.sFlags.netsettingsChanged == true) 8037cc8: 4c50 ldr r4, [pc, #320] ; (8037e0c ) TaskHandle_t xHandleWebReinit = NULL; bool dhcp = false; void LwIP_Init(void) { 8037cca: b08d sub sp, #52 ; 0x34 struct ip_addr ipaddr; struct ip_addr netmask; struct ip_addr gw; char str[20]; tcpip_init( NULL, NULL ); 8037ccc: 4601 mov r1, r0 8037cce: f7f6 ff3d bl 802eb4c /* Если настройки изменили, то используем временные параметры */ if (sSettings.sFlags.netsettingsChanged == true) 8037cd2: f894 3120 ldrb.w r3, [r4, #288] ; 0x120 8037cd6: 2b00 cmp r3, #0 8037cd8: d032 beq.n 8037d40 { if (sSettings.sWebTempParams.dhcpEnable) 8037cda: f894 5063 ldrb.w r5, [r4, #99] ; 0x63 8037cde: b12d cbz r5, 8037cec { ipaddr.addr = 0; 8037ce0: 2300 movs r3, #0 8037ce2: 9304 str r3, [sp, #16] netmask.addr = 0; 8037ce4: 9305 str r3, [sp, #20] gw.addr = 0; 8037ce6: 9306 str r3, [sp, #24] netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 8037ce8: 9300 str r3, [sp, #0] 8037cea: e015 b.n 8037d18 netif_set_default(&xnetif); netif_set_up(&xnetif); } else { ipaddr.addr = ipaddr_addr(sSettings.sWebTempParams.ip); 8037cec: f104 0033 add.w r0, r4, #51 ; 0x33 8037cf0: f7fb f8df bl 8032eb2 8037cf4: 9004 str r0, [sp, #16] netmask.addr = ipaddr_addr(sSettings.sWebTempParams.mask); 8037cf6: f104 0053 add.w r0, r4, #83 ; 0x53 8037cfa: f7fb f8da bl 8032eb2 8037cfe: 9005 str r0, [sp, #20] gw.addr = ipaddr_addr(sSettings.sWebTempParams.gate); 8037d00: f104 0043 add.w r0, r4, #67 ; 0x43 8037d04: f7fb f8d5 bl 8032eb2 sprintf(str, " %s\n\r", sSettings.sWebTempParams.ip); 8037d08: 4941 ldr r1, [pc, #260] ; (8037e10 ) } else { ipaddr.addr = ipaddr_addr(sSettings.sWebTempParams.ip); netmask.addr = ipaddr_addr(sSettings.sWebTempParams.mask); gw.addr = ipaddr_addr(sSettings.sWebTempParams.gate); 8037d0a: 9006 str r0, [sp, #24] sprintf(str, " %s\n\r", sSettings.sWebTempParams.ip); 8037d0c: f104 0233 add.w r2, r4, #51 ; 0x33 8037d10: a807 add r0, sp, #28 8037d12: f7ef fd7f bl 8027814 PRINT_USART("\n\rStatic IP address \n\r"); PRINT_USART(str); netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 8037d16: 9500 str r5, [sp, #0] 8037d18: 4b3e ldr r3, [pc, #248] ; (8037e14 ) 8037d1a: 483f ldr r0, [pc, #252] ; (8037e18 ) 8037d1c: 9301 str r3, [sp, #4] 8037d1e: 4b3f ldr r3, [pc, #252] ; (8037e1c ) 8037d20: a904 add r1, sp, #16 8037d22: aa05 add r2, sp, #20 8037d24: 9302 str r3, [sp, #8] 8037d26: ab06 add r3, sp, #24 8037d28: f7f7 ffda bl 802fce0 netif_set_default(&xnetif); 8037d2c: 483a ldr r0, [pc, #232] ; (8037e18 ) 8037d2e: f7f7 ffff bl 802fd30 netif_set_up(&xnetif); 8037d32: 4839 ldr r0, [pc, #228] ; (8037e18 ) 8037d34: f7f8 f80c bl 802fd50 } if (sSettings.sWebTempParams.dhcpEnable) { 8037d38: 4b34 ldr r3, [pc, #208] ; (8037e0c ) 8037d3a: f893 3063 ldrb.w r3, [r3, #99] ; 0x63 8037d3e: e043 b.n 8037dc8 } } /* Настройки не менялись, используем обычне настройки из флеш памяти */ else { if (sSettings.sWebParams.dhcpEnable) 8037d40: f894 5032 ldrb.w r5, [r4, #50] ; 0x32 8037d44: b125 cbz r5, 8037d50 { ipaddr.addr = 0; 8037d46: 9304 str r3, [sp, #16] netmask.addr = 0; 8037d48: 9305 str r3, [sp, #20] gw.addr = 0; 8037d4a: 9306 str r3, [sp, #24] netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 8037d4c: 9300 str r3, [sp, #0] 8037d4e: e028 b.n 8037da2 netif_set_default(&xnetif); netif_set_up(&xnetif); } else { ipaddr.addr = ipaddr_addr(sSettings.sWebParams.ip); 8037d50: 1ca0 adds r0, r4, #2 8037d52: f7fb f8ae bl 8032eb2 8037d56: 9004 str r0, [sp, #16] netmask.addr = ipaddr_addr(sSettings.sWebParams.mask); 8037d58: f104 0022 add.w r0, r4, #34 ; 0x22 8037d5c: f7fb f8a9 bl 8032eb2 8037d60: 9005 str r0, [sp, #20] gw.addr = ipaddr_addr(sSettings.sWebParams.gate); 8037d62: f104 0012 add.w r0, r4, #18 8037d66: f7fb f8a4 bl 8032eb2 /* Обновляем временные настройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; 8037d6a: 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); 8037d6e: 9006 str r0, [sp, #24] /* Обновляем временные настройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; strcpy(sSettings.sWebTempParams.ip, sSettings.sWebParams.ip); 8037d70: 1ca1 adds r1, r4, #2 8037d72: 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; 8037d76: f884 3063 strb.w r3, [r4, #99] ; 0x63 strcpy(sSettings.sWebTempParams.ip, sSettings.sWebParams.ip); 8037d7a: f7ea f83b bl 8021df4 strcpy(sSettings.sWebTempParams.mask, sSettings.sWebParams.mask); 8037d7e: f104 0122 add.w r1, r4, #34 ; 0x22 8037d82: f104 0053 add.w r0, r4, #83 ; 0x53 8037d86: f7ea f835 bl 8021df4 strcpy(sSettings.sWebTempParams.gate, sSettings.sWebParams.gate); 8037d8a: f104 0112 add.w r1, r4, #18 8037d8e: f104 0043 add.w r0, r4, #67 ; 0x43 8037d92: f7ea f82f bl 8021df4 sprintf(str, " %s\n\r", sSettings.sWebParams.ip); 8037d96: a807 add r0, sp, #28 8037d98: 491d ldr r1, [pc, #116] ; (8037e10 ) 8037d9a: 1ca2 adds r2, r4, #2 8037d9c: f7ef fd3a bl 8027814 PRINT_USART("\n\rStatic IP address \n\r"); PRINT_USART(str); netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 8037da0: 9500 str r5, [sp, #0] 8037da2: 4b1c ldr r3, [pc, #112] ; (8037e14 ) 8037da4: 481c ldr r0, [pc, #112] ; (8037e18 ) 8037da6: 9301 str r3, [sp, #4] 8037da8: 4b1c ldr r3, [pc, #112] ; (8037e1c ) 8037daa: a904 add r1, sp, #16 8037dac: aa05 add r2, sp, #20 8037dae: 9302 str r3, [sp, #8] 8037db0: ab06 add r3, sp, #24 8037db2: f7f7 ff95 bl 802fce0 netif_set_default(&xnetif); 8037db6: 4818 ldr r0, [pc, #96] ; (8037e18 ) 8037db8: f7f7 ffba bl 802fd30 netif_set_up(&xnetif); 8037dbc: 4816 ldr r0, [pc, #88] ; (8037e18 ) 8037dbe: f7f7 ffc7 bl 802fd50 } if (sSettings.sWebParams.dhcpEnable) { 8037dc2: 4b12 ldr r3, [pc, #72] ; (8037e0c ) 8037dc4: f893 3032 ldrb.w r3, [r3, #50] ; 0x32 8037dc8: b17b cbz r3, 8037dea xTaskCreate(LwIP_DHCP_task, "DHCPClient", configMINIMAL_STACK_SIZE * 2, NULL, 8037dca: 2302 movs r3, #2 8037dcc: 9300 str r3, [sp, #0] 8037dce: 4b14 ldr r3, [pc, #80] ; (8037e20 ) 8037dd0: 4814 ldr r0, [pc, #80] ; (8037e24 ) 8037dd2: 9301 str r3, [sp, #4] 8037dd4: 2300 movs r3, #0 8037dd6: 9302 str r3, [sp, #8] 8037dd8: 9303 str r3, [sp, #12] 8037dda: f44f 7280 mov.w r2, #256 ; 0x100 8037dde: 4912 ldr r1, [pc, #72] ; (8037e28 ) 8037de0: f7f2 fe5a bl 802aa98 tskIDLE_PRIORITY + 2, &xHandleDHCP); dhcp = true; 8037de4: 4b11 ldr r3, [pc, #68] ; (8037e2c ) 8037de6: 2201 movs r2, #1 8037de8: 701a strb r2, [r3, #0] } } /* Если настройки изменились, запускаем задачу по отсчету времени реакции пользователя*/ if (sSettings.sFlags.netsettingsChanged == true) 8037dea: 4b08 ldr r3, [pc, #32] ; (8037e0c ) 8037dec: f893 3120 ldrb.w r3, [r3, #288] ; 0x120 8037df0: b153 cbz r3, 8037e08 xTaskCreate(vTaskWebReinit, "webReinit", configMINIMAL_STACK_SIZE, NULL, 8037df2: 4a0f ldr r2, [pc, #60] ; (8037e30 ) 8037df4: 480f ldr r0, [pc, #60] ; (8037e34 ) 8037df6: 9201 str r2, [sp, #4] 8037df8: 2300 movs r3, #0 8037dfa: 9300 str r3, [sp, #0] 8037dfc: 9302 str r3, [sp, #8] 8037dfe: 9303 str r3, [sp, #12] 8037e00: 490d ldr r1, [pc, #52] ; (8037e38 ) 8037e02: 2280 movs r2, #128 ; 0x80 8037e04: f7f2 fe48 bl 802aa98 tskIDLE_PRIORITY, &xHandleWebReinit); } 8037e08: b00d add sp, #52 ; 0x34 8037e0a: bd30 pop {r4, r5, pc} 8037e0c: 2000cfc4 .word 0x2000cfc4 8037e10: 0804594a .word 0x0804594a 8037e14: 08037769 .word 0x08037769 8037e18: 2000f86c .word 0x2000f86c 8037e1c: 0802ead9 .word 0x0802ead9 8037e20: 2000c7e0 .word 0x2000c7e0 8037e24: 08037b79 .word 0x08037b79 8037e28: 08045950 .word 0x08045950 8037e2c: 2000c7d8 .word 0x2000c7d8 8037e30: 2000c7dc .word 0x2000c7dc 8037e34: 08037aed .word 0x08037aed 8037e38: 0804595b .word 0x0804595b 08037e3c : vTaskDelay(1000); } } void SaveWEBparam(void) { 8037e3c: b510 push {r4, lr} sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 8037e3e: 4c0c ldr r4, [pc, #48] ; (8037e70 ) 8037e40: f894 3063 ldrb.w r3, [r4, #99] ; 0x63 strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 8037e44: f104 0133 add.w r1, r4, #51 ; 0x33 8037e48: 1ca0 adds r0, r4, #2 } } void SaveWEBparam(void) { sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 8037e4a: f884 3032 strb.w r3, [r4, #50] ; 0x32 strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 8037e4e: f7e9 ffd1 bl 8021df4 strcpy(sSettings.sWebParams.gate, sSettings.sWebTempParams.gate); 8037e52: f104 0143 add.w r1, r4, #67 ; 0x43 8037e56: f104 0012 add.w r0, r4, #18 8037e5a: f7e9 ffcb bl 8021df4 strcpy(sSettings.sWebParams.mask, sSettings.sWebTempParams.mask); 8037e5e: f104 0022 add.w r0, r4, #34 ; 0x22 8037e62: f104 0153 add.w r1, r4, #83 ; 0x53 } 8037e66: 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); 8037e6a: f7e9 bfc3 b.w 8021df4 8037e6e: bf00 nop 8037e70: 2000cfc4 .word 0x2000cfc4 08037e74 : /** * @brief Возвращает true если сетевые параметры изменились */ bool GetStateWebReinit(void) { 8037e74: b510 push {r4, lr} /* Статус dhcp изменился? */ if (sSettings.sWebParams.dhcpEnable != sSettings.sWebTempParams.dhcpEnable) 8037e76: 4c12 ldr r4, [pc, #72] ; (8037ec0 ) 8037e78: f894 2032 ldrb.w r2, [r4, #50] ; 0x32 8037e7c: f894 3063 ldrb.w r3, [r4, #99] ; 0x63 8037e80: 429a cmp r2, r3 8037e82: d004 beq.n 8037e8e { /* Включили dhcp */ if (sSettings.sWebTempParams.dhcpEnable == 1) { /* Устанавилваем флаг */ SetWebReinitFlag(true); 8037e84: 2001 movs r0, #1 8037e86: f7f0 f953 bl 8028130 return true; 8037e8a: 2001 movs r0, #1 8037e8c: bd10 pop {r4, pc} return true; } } /* Изменился IP? */ if (strstr(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip) == 0) 8037e8e: 1ca0 adds r0, r4, #2 8037e90: f104 0133 add.w r1, r4, #51 ; 0x33 8037e94: f7ea fa8c bl 80223b0 8037e98: 2800 cmp r0, #0 8037e9a: d0f3 beq.n 8037e84 SetWebReinitFlag(true); return true; } /* Изменился шлюз? */ if (strstr(sSettings.sWebParams.gate, sSettings.sWebTempParams.gate) == 0) 8037e9c: f104 0012 add.w r0, r4, #18 8037ea0: f104 0143 add.w r1, r4, #67 ; 0x43 8037ea4: f7ea fa84 bl 80223b0 8037ea8: 2800 cmp r0, #0 8037eaa: d0eb beq.n 8037e84 SetWebReinitFlag(true); return true; } /* Изменилась маска? */ if (strstr(sSettings.sWebParams.mask, sSettings.sWebTempParams.mask) == 0) 8037eac: f104 0022 add.w r0, r4, #34 ; 0x22 8037eb0: f104 0153 add.w r1, r4, #83 ; 0x53 8037eb4: f7ea fa7c bl 80223b0 8037eb8: 2800 cmp r0, #0 8037eba: d0e3 beq.n 8037e84 /* Устанавилваем флаг */ SetWebReinitFlag(true); return true; } return false; 8037ebc: 2000 movs r0, #0 } 8037ebe: bd10 pop {r4, pc} 8037ec0: 2000cfc4 .word 0x2000cfc4 08037ec4 : \param len - длина переменной в байтах \param value - указатель на значение переменной \return нет ------------------------------------------------------------------------------*/ static void signals_set_value (struct obj_def *od, u16_t len, void *value) { 8037ec4: b530 push {r4, r5, lr} 8037ec6: 4605 mov r5, r0 8037ec8: b087 sub sp, #28 8037eca: 4614 mov r4, r2 u8_t id; uint32_t val; char *val_string; char str[20]; memset(str, 0, 20); 8037ecc: a801 add r0, sp, #4 8037ece: 2100 movs r1, #0 8037ed0: 2214 movs r2, #20 8037ed2: f7e9 fe15 bl 8021b00 id = od->id_inst_ptr[0]; 8037ed6: 68ab ldr r3, [r5, #8] switch (id) 8037ed8: 781b ldrb r3, [r3, #0] 8037eda: 3b02 subs r3, #2 8037edc: 2b04 cmp r3, #4 8037ede: d83f bhi.n 8037f60 8037ee0: e8df f003 tbb [pc, r3] 8037ee4: 103e0903 .word 0x103e0903 8037ee8: 26 .byte 0x26 8037ee9: 00 .byte 0x00 { case 2: /* RestoreSignal */ val = *((s32_t*)value); if (val == 1) { 8037eea: 6823 ldr r3, [r4, #0] 8037eec: 2b01 cmp r3, #1 8037eee: d137 bne.n 8037f60 HTTP_ResetSettings(); 8037ef0: f7f5 ff50 bl 802dd94 8037ef4: e034 b.n 8037f60 } break; case 3: /* RebootSignal */ val = *((s32_t*)value); if (val == 1) 8037ef6: 6823 ldr r3, [r4, #0] 8037ef8: 2b01 cmp r3, #1 8037efa: d131 bne.n 8037f60 HTTP_StartResetTask(false); 8037efc: 2000 movs r0, #0 8037efe: f7f5 ff93 bl 802de28 8037f02: e02d b.n 8037f60 break; case 5: /* DO1 */ if(sSettings.sInOuts.ro_type_source[0] == SNMP_SET){ 8037f04: 4b17 ldr r3, [pc, #92] ; (8037f64 ) 8037f06: f893 3374 ldrb.w r3, [r3, #884] ; 0x374 8037f0a: 2b03 cmp r3, #3 8037f0c: d128 bne.n 8037f60 val_string = (char*)value; SetROStr(val_string, 0); 8037f0e: 2100 movs r1, #0 8037f10: 4620 mov r0, r4 8037f12: f7f0 fb03 bl 802851c if(val_string[0] == 0x31) 8037f16: 7823 ldrb r3, [r4, #0] 8037f18: 2b31 cmp r3, #49 ; 0x31 strcat(str, "Замкнуто"); 8037f1a: bf0c ite eq 8037f1c: 4912 ldreq r1, [pc, #72] ; (8037f68 ) else strcat(str, "Разомкнуто"); 8037f1e: 4913 ldrne r1, [pc, #76] ; (8037f6c ) 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, "Замкнуто"); 8037f20: a801 add r0, sp, #4 else strcat(str, "Разомкнуто"); 8037f22: f7e9 fe53 bl 8021bcc SNMP_SendUserTrap(DO0_TOGGLED); 8037f26: 2007 movs r0, #7 8037f28: f000 f908 bl 803813c log_event_data(LOG_DO0_STATE, str); 8037f2c: 2009 movs r0, #9 8037f2e: e014 b.n 8037f5a } break; case 6: /* DO2 */ if(sSettings.sInOuts.ro_type_source[1] == SNMP_SET){ 8037f30: 4b0c ldr r3, [pc, #48] ; (8037f64 ) 8037f32: f893 3375 ldrb.w r3, [r3, #885] ; 0x375 8037f36: 2b03 cmp r3, #3 8037f38: d112 bne.n 8037f60 val_string = (char*)value; SetROStr(val_string, 1); 8037f3a: 2101 movs r1, #1 8037f3c: 4620 mov r0, r4 8037f3e: f7f0 faed bl 802851c if(val_string[0] == 0x31) 8037f42: 7823 ldrb r3, [r4, #0] 8037f44: 2b31 cmp r3, #49 ; 0x31 strcat(str, "Замкнуто"); 8037f46: bf0c ite eq 8037f48: 4907 ldreq r1, [pc, #28] ; (8037f68 ) else strcat(str, "Разомкнуто"); 8037f4a: 4908 ldrne r1, [pc, #32] ; (8037f6c ) 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, "Замкнуто"); 8037f4c: a801 add r0, sp, #4 else strcat(str, "Разомкнуто"); 8037f4e: f7e9 fe3d bl 8021bcc SNMP_SendUserTrap(DO1_TOGGLED); 8037f52: 2008 movs r0, #8 8037f54: f000 f8f2 bl 803813c log_event_data(LOG_DO1_STATE, str); 8037f58: 200a movs r0, #10 8037f5a: a901 add r1, sp, #4 8037f5c: f7f1 fd7e bl 8029a5c break; default : break; }; } 8037f60: b007 add sp, #28 8037f62: bd30 pop {r4, r5, pc} 8037f64: 2000cfc4 .word 0x2000cfc4 8037f68: 08039b37 .word 0x08039b37 8037f6c: 08039b48 .word 0x08039b48 08037f70 : \param len - длина переменной в байтах \param value - указатель на значение переменной \return нет ------------------------------------------------------------------------------*/ static void signals_get_value (struct obj_def *od, u16_t len, void *value) { 8037f70: 4613 mov r3, r2 u8_t id; id = od->id_inst_ptr[0]; 8037f72: 6882 ldr r2, [r0, #8] switch (id) 8037f74: 7812 ldrb r2, [r2, #0] 8037f76: 3a01 subs r2, #1 \param len - длина переменной в байтах \param value - указатель на значение переменной \return нет ------------------------------------------------------------------------------*/ static void signals_get_value (struct obj_def *od, u16_t len, void *value) { 8037f78: b510 push {r4, lr} 8037f7a: 460c mov r4, r1 u8_t id; id = od->id_inst_ptr[0]; switch (id) 8037f7c: 2a11 cmp r2, #17 8037f7e: d814 bhi.n 8037faa 8037f80: e8df f002 tbb [pc, r2] 8037f84: 0c09090c .word 0x0c09090c 8037f88: 09090c0c .word 0x09090c0c 8037f8c: 0c0c0c0c .word 0x0c0c0c0c 8037f90: 0c0c0c0c .word 0x0c0c0c0c 8037f94: 0c0c .short 0x0c0c break; case 7: /* BatTest */ *((s32_t*)value) = 0; break; case 8: /* Shutdown UPS */ *((s32_t*)value) = 0; 8037f96: 2200 movs r2, #0 8037f98: 601a str r2, [r3, #0] break; 8037f9a: 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); 8037f9c: 4903 ldr r1, [pc, #12] ; (8037fac ) 8037f9e: 4618 mov r0, r3 8037fa0: 4622 mov r2, r4 break; default : break; }; } 8037fa2: 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); 8037fa6: f7fc ba31 b.w 803440c 8037faa: bd10 pop {r4, pc} 8037fac: 2000f9b8 .word 0x2000f9b8 08037fb0 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8037fb0: 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) { 8037fb2: b538 push {r3, r4, r5, lr} 8037fb4: 4614 mov r4, r2 u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8037fb6: f040 8081 bne.w 80380bc { od->id_inst_len = ident_len; 8037fba: 2302 movs r3, #2 8037fbc: 7193 strb r3, [r2, #6] { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 8037fbe: 1f0a subs r2, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8037fc0: 60a2 str r2, [r4, #8] id = ident[0]; switch (id) 8037fc2: f811 2c04 ldrb.w r2, [r1, #-4] 8037fc6: 3a01 subs r2, #1 8037fc8: 2a11 cmp r2, #17 8037fca: d877 bhi.n 80380bc 8037fcc: e8df f002 tbb [pc, r2] 8037fd0: 0f242409 .word 0x0f242409 8037fd4: 2a241a15 .word 0x2a241a15 8037fd8: 453f3932 .word 0x453f3932 8037fdc: 5d57514b .word 0x5d57514b 8037fe0: 6963 .short 0x6963 { case 1: /* FWVersion */ GetVersionStr(paramStr, ¶mLength); 8037fe2: 4d38 ldr r5, [pc, #224] ; (80380c4 ) 8037fe4: 4838 ldr r0, [pc, #224] ; (80380c8 ) 8037fe6: 4629 mov r1, r5 8037fe8: f7ef fe6e bl 8027cc8 8037fec: e05e b.n 80380ac 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); 8037fee: 4d35 ldr r5, [pc, #212] ; (80380c4 ) 8037ff0: 4835 ldr r0, [pc, #212] ; (80380c8 ) 8037ff2: 4629 mov r1, r5 8037ff4: f7ef fed4 bl 8027da0 8037ff8: e058 b.n 80380ac 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); 8037ffa: 4d32 ldr r5, [pc, #200] ; (80380c4 ) 8037ffc: 4832 ldr r0, [pc, #200] ; (80380c8 ) 8037ffe: 4629 mov r1, r5 8038000: 2200 movs r2, #0 8038002: e003 b.n 803800c 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); 8038004: 4d2f ldr r5, [pc, #188] ; (80380c4 ) 8038006: 4830 ldr r0, [pc, #192] ; (80380c8 ) 8038008: 4629 mov r1, r5 803800a: 2201 movs r2, #1 803800c: f7ef fdda bl 8027bc4 od->instance = MIB_OBJECT_SCALAR; 8038010: 2301 movs r3, #1 8038012: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_WRITE; 8038014: 2303 movs r3, #3 8038016: e04b b.n 80380b0 od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 7: /* BatTest*/ od->instance = MIB_OBJECT_SCALAR; 8038018: 2201 movs r2, #1 od->access = MIB_OBJECT_WRITE_ONLY; 803801a: 7063 strb r3, [r4, #1] od->asn_type = SNMP_ASN1_INTEG; 803801c: 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; 803801e: 7022 strb r2, [r4, #0] od->access = MIB_OBJECT_WRITE_ONLY; od->asn_type = SNMP_ASN1_INTEG; od->v_len = sizeof(s32_t); 8038020: 2304 movs r3, #4 8038022: e049 b.n 80380b8 break; case 8: /* Shutdown UPS*/ od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_WRITE_ONLY; 8038024: 7063 strb r3, [r4, #1] od->asn_type = SNMP_ASN1_OC_STR; 8038026: 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; 8038028: 2201 movs r2, #1 od->access = MIB_OBJECT_WRITE_ONLY; od->asn_type = SNMP_ASN1_OC_STR; 803802a: 70a3 strb r3, [r4, #2] od->v_len = paramLength; 803802c: 4b25 ldr r3, [pc, #148] ; (80380c4 ) od->asn_type = SNMP_ASN1_INTEG; od->v_len = sizeof(s32_t); break; case 8: /* Shutdown UPS*/ od->instance = MIB_OBJECT_SCALAR; 803802e: 7022 strb r2, [r4, #0] od->access = MIB_OBJECT_WRITE_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; 8038030: 781b ldrb r3, [r3, #0] 8038032: e041 b.n 80380b8 break; case 9: /* DIO*/ GetDINStatusStr(paramStr, ¶mLength, 0); 8038034: 4d23 ldr r5, [pc, #140] ; (80380c4 ) 8038036: 4824 ldr r0, [pc, #144] ; (80380c8 ) 8038038: 4629 mov r1, r5 803803a: 2200 movs r2, #0 803803c: f7ef fd88 bl 8027b50 8038040: e034 b.n 80380ac od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 10: /* IntTemp */ GetInternalTempStr(paramStr, ¶mLength); 8038042: 4d20 ldr r5, [pc, #128] ; (80380c4 ) 8038044: 4820 ldr r0, [pc, #128] ; (80380c8 ) 8038046: 4629 mov r1, r5 8038048: f7ef fc7e bl 8027948 803804c: e02e b.n 80380ac od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 11: /* InFreq */ GetInputFreqStr(paramStr, ¶mLength); 803804e: 4d1d ldr r5, [pc, #116] ; (80380c4 ) 8038050: 481d ldr r0, [pc, #116] ; (80380c8 ) 8038052: 4629 mov r1, r5 8038054: f7ef fbea bl 802782c 8038058: e028 b.n 80380ac od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 12: /* InVoltVAC */ GetInputVoltageStr(paramStr, ¶mLength); 803805a: 4d1a ldr r5, [pc, #104] ; (80380c4 ) 803805c: 481a ldr r0, [pc, #104] ; (80380c8 ) 803805e: 4629 mov r1, r5 8038060: f7ef fc10 bl 8027884 8038064: e022 b.n 80380ac od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 13: /* OutVoltVAC */ GetOutputVoltageStr(paramStr, ¶mLength); 8038066: 4d17 ldr r5, [pc, #92] ; (80380c4 ) 8038068: 4817 ldr r0, [pc, #92] ; (80380c8 ) 803806a: 4629 mov r1, r5 803806c: f7ef fc20 bl 80278b0 8038070: e01c b.n 80380ac od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 14: /* Power */ GetPowerStr(paramStr, ¶mLength); 8038072: 4d14 ldr r5, [pc, #80] ; (80380c4 ) 8038074: 4814 ldr r0, [pc, #80] ; (80380c8 ) 8038076: 4629 mov r1, r5 8038078: f7ef fc30 bl 80278dc 803807c: e016 b.n 80380ac od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 15: /* BatCap */ GetBatCapacityStr(paramStr, ¶mLength); 803807e: 4d11 ldr r5, [pc, #68] ; (80380c4 ) 8038080: 4811 ldr r0, [pc, #68] ; (80380c8 ) 8038082: 4629 mov r1, r5 8038084: f7ef fc3c bl 8027900 8038088: e010 b.n 80380ac od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 16: /* BatTime */ GetRuntimeStr(paramStr, ¶mLength); 803808a: 4d0e ldr r5, [pc, #56] ; (80380c4 ) 803808c: 480e ldr r0, [pc, #56] ; (80380c8 ) 803808e: 4629 mov r1, r5 8038090: f7ef fc48 bl 8027924 8038094: e00a b.n 80380ac od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 17: /* ConnectMonitor */ GetConnectMonitorStr(paramStr, ¶mLength); 8038096: 4d0b ldr r5, [pc, #44] ; (80380c4 ) 8038098: 480b ldr r0, [pc, #44] ; (80380c8 ) 803809a: 4629 mov r1, r5 803809c: f7ef fc7c bl 8027998 80380a0: e004 b.n 80380ac od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 18: /* Alarms */ GetAlarmStr(paramStr, ¶mLength); 80380a2: 4d08 ldr r5, [pc, #32] ; (80380c4 ) 80380a4: 4808 ldr r0, [pc, #32] ; (80380c8 ) 80380a6: 4629 mov r1, r5 80380a8: f7ef fc8e bl 80279c8 od->instance = MIB_OBJECT_SCALAR; 80380ac: 2301 movs r3, #1 80380ae: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 80380b0: 7063 strb r3, [r4, #1] od->asn_type = SNMP_ASN1_OC_STR; 80380b2: 2304 movs r3, #4 80380b4: 70a3 strb r3, [r4, #2] od->v_len = paramLength; 80380b6: 782b ldrb r3, [r5, #0] 80380b8: 80a3 strh r3, [r4, #4] break; 80380ba: bd38 pop {r3, r4, r5, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("planar_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 80380bc: 2300 movs r3, #0 80380be: 7023 strb r3, [r4, #0] 80380c0: bd38 pop {r3, r4, r5, pc} 80380c2: bf00 nop 80380c4: 2000c7e6 .word 0x2000c7e6 80380c8: 2000f9b8 .word 0x2000f9b8 080380cc : \param value - указатель на значение переменной \return 0 - некорректное значение 1 - корректное значение ------------------------------------------------------------------------------*/ static u8_t signals_set_test (struct obj_def *od, u16_t len, void *value) { 80380cc: 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]; 80380ce: 6883 ldr r3, [r0, #8] switch (id) 80380d0: 781b ldrb r3, [r3, #0] 80380d2: 3b02 subs r3, #2 80380d4: 2b04 cmp r3, #4 80380d6: d81f bhi.n 8038118 80380d8: e8df f003 tbb [pc, r3] 80380dc: 051e0303 .word 0x051e0303 80380e0: 14 .byte 0x14 80380e1: 00 .byte 0x00 { u8_t id, set_ok; char *val_string; LWIP_UNUSED_ARG(value); set_ok = 0; 80380e2: 2904 cmp r1, #4 80380e4: e00a b.n 80380fc { set_ok = 1; } break; case 5: /* DO1 */ if ( len >= 1 ) 80380e6: b901 cbnz r1, 80380ea 80380e8: e016 b.n 8038118 { val_string = (char*)value; if(atoi(val_string) <= 1){ 80380ea: 4610 mov r0, r2 80380ec: f7e9 fbe8 bl 80218c0 80380f0: 2801 cmp r0, #1 80380f2: dc11 bgt.n 8038118 if(sSettings.sInOuts.ro_type_source[0] == SNMP_SET) 80380f4: 4b09 ldr r3, [pc, #36] ; (803811c ) 80380f6: f893 0374 ldrb.w r0, [r3, #884] ; 0x374 { u8_t id, set_ok; char *val_string; LWIP_UNUSED_ARG(value); set_ok = 0; 80380fa: 2803 cmp r0, #3 80380fc: bf14 ite ne 80380fe: 2000 movne r0, #0 8038100: 2001 moveq r0, #1 8038102: bd08 pop {r3, pc} set_ok = 1; } } break; case 6: /* DO2 */ if ( len >= 1 ) 8038104: b141 cbz r1, 8038118 { val_string = (char*)value; if(atoi(val_string) <= 1){ 8038106: 4610 mov r0, r2 8038108: f7e9 fbda bl 80218c0 803810c: 2801 cmp r0, #1 803810e: dc03 bgt.n 8038118 if(sSettings.sInOuts.ro_type_source[1] == SNMP_SET) 8038110: 4b02 ldr r3, [pc, #8] ; (803811c ) 8038112: f893 0375 ldrb.w r0, [r3, #885] ; 0x375 8038116: e7f0 b.n 80380fa { u8_t id, set_ok; char *val_string; LWIP_UNUSED_ARG(value); set_ok = 0; 8038118: 2000 movs r0, #0 break; }; return set_ok; } 803811a: bd08 pop {r3, pc} 803811c: 2000cfc4 .word 0x2000cfc4 08038120 : /** * @brief Системный тик SNMP. Таск должен вызываться с частотой 100Гц. * @retval */ void SNMP_SysUpTimeTask(void *arg) { 8038120: b513 push {r0, r1, r4, lr} TickType_t xLastWakeTime; const TickType_t xFrequency = 10; xLastWakeTime = xTaskGetTickCount(); 8038122: f7f2 fe21 bl 802ad68 8038126: ac02 add r4, sp, #8 8038128: f844 0d04 str.w r0, [r4, #-4]! while(1) { vTaskDelayUntil( &xLastWakeTime, xFrequency ); 803812c: 4620 mov r0, r4 803812e: 210a movs r1, #10 8038130: f7f2 ff7e bl 802b030 snmp_inc_sysuptime(); 8038134: f7fc fa88 bl 8034648 8038138: e7f8 b.n 803812c 803813a: 0000 movs r0, r0 0803813c : * FIFO буфера. * Если в настройках трапа отправка отключена, то трап игнорируется. * @retval */ void SNMP_SendUserTrap(uint8_t trapName) { 803813c: b51f push {r0, r1, r2, r3, r4, lr} uint16_t availableSpace; uint8_t dummyTrap; if (traps[trapName].trapEnable) 803813e: 4b0d ldr r3, [pc, #52] ; (8038174 ) * FIFO буфера. * Если в настройках трапа отправка отключена, то трап игнорируется. * @retval */ void SNMP_SendUserTrap(uint8_t trapName) { 8038140: f88d 0007 strb.w r0, [sp, #7] uint16_t availableSpace; uint8_t dummyTrap; if (traps[trapName].trapEnable) 8038144: eb03 00c0 add.w r0, r3, r0, lsl #3 8038148: 78c3 ldrb r3, [r0, #3] 803814a: b193 cbz r3, 8038172 { availableSpace = uxQueueSpacesAvailable(SNMP_TrapQueue); 803814c: 4c0a ldr r4, [pc, #40] ; (8038178 ) 803814e: 6820 ldr r0, [r4, #0] 8038150: f7f2 fc32 bl 802a9b8 if (availableSpace == 0) 8038154: b282 uxth r2, r0 8038156: b92a cbnz r2, 8038164 xQueueReceive(SNMP_TrapQueue, &dummyTrap, 0); 8038158: 6820 ldr r0, [r4, #0] 803815a: f10d 010f add.w r1, sp, #15 803815e: 4613 mov r3, r2 8038160: f7f2 fb41 bl 802a7e6 xQueueSend(SNMP_TrapQueue, &trapName, 0); 8038164: 2200 movs r2, #0 8038166: 6820 ldr r0, [r4, #0] 8038168: f10d 0107 add.w r1, sp, #7 803816c: 4613 mov r3, r2 803816e: f7f2 f9fa bl 802a566 } } 8038172: bd1f pop {r0, r1, r2, r3, r4, pc} 8038174: 2000fabc .word 0x2000fabc 8038178: 2000fab8 .word 0x2000fab8 0803817c : * @brief Установить SNMP Descriptor * @retval */ // TODO void SNMP_SetObjDescr(void) { 803817c: b538 push {r3, r4, r5, lr} static uint8_t len; strcpy(sSettings.sSnmp.sysDescr, sSettings.sSnmp.sysName); 803817e: 4c19 ldr r4, [pc, #100] ; (80381e4 ) strcat(sSettings.sSnmp.sysDescr, " "); 8038180: 4d19 ldr r5, [pc, #100] ; (80381e8 ) // TODO void SNMP_SetObjDescr(void) { static uint8_t len; strcpy(sSettings.sSnmp.sysDescr, sSettings.sSnmp.sysName); 8038182: f104 01fa add.w r1, r4, #250 ; 0xfa 8038186: 4620 mov r0, r4 8038188: f7e9 fe34 bl 8021df4 strcat(sSettings.sSnmp.sysDescr, " "); 803818c: 4629 mov r1, r5 803818e: 4620 mov r0, r4 8038190: f7e9 fd1c bl 8021bcc strcat(sSettings.sSnmp.sysDescr, VERSION); 8038194: 4620 mov r0, r4 8038196: 4915 ldr r1, [pc, #84] ; (80381ec ) 8038198: f7e9 fd18 bl 8021bcc strcat(sSettings.sSnmp.sysDescr, " "); 803819c: 4629 mov r1, r5 803819e: 4620 mov r0, r4 80381a0: f7e9 fd14 bl 8021bcc strcat(sSettings.sSnmp.sysDescr, sSettings.sSnmp.sysContact); 80381a4: f104 01c8 add.w r1, r4, #200 ; 0xc8 80381a8: 4620 mov r0, r4 80381aa: f7e9 fd0f bl 8021bcc strcat(sSettings.sSnmp.sysDescr, " "); 80381ae: 4629 mov r1, r5 80381b0: 4620 mov r0, r4 80381b2: f7e9 fd0b bl 8021bcc strcat(sSettings.sSnmp.sysDescr, sSettings.sInfo.serialNumber); 80381b6: f1a4 0193 sub.w r1, r4, #147 ; 0x93 80381ba: 4620 mov r0, r4 80381bc: f7e9 fd06 bl 8021bcc strcat(sSettings.sSnmp.sysDescr, " "); 80381c0: 4629 mov r1, r5 80381c2: 4620 mov r0, r4 80381c4: f7e9 fd02 bl 8021bcc strcat(sSettings.sSnmp.sysDescr, UPS.model); 80381c8: 4909 ldr r1, [pc, #36] ; (80381f0 ) 80381ca: 4620 mov r0, r4 80381cc: f7e9 fcfe bl 8021bcc len = strlen(sSettings.sSnmp.sysDescr); 80381d0: 4620 mov r0, r4 80381d2: f7e9 fe6d bl 8021eb0 80381d6: 4907 ldr r1, [pc, #28] ; (80381f4 ) 80381d8: 7008 strb r0, [r1, #0] snmp_set_sysdesr((u8_t*)sSettings.sSnmp.sysDescr, &len); 80381da: 4620 mov r0, r4 } 80381dc: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} strcat(sSettings.sSnmp.sysDescr, sSettings.sInfo.serialNumber); strcat(sSettings.sSnmp.sysDescr, " "); strcat(sSettings.sSnmp.sysDescr, UPS.model); len = strlen(sSettings.sSnmp.sysDescr); snmp_set_sysdesr((u8_t*)sSettings.sSnmp.sysDescr, &len); 80381e0: f7fc ba1e b.w 8034620 80381e4: 2000d0f5 .word 0x2000d0f5 80381e8: 08039ade .word 0x08039ade 80381ec: 080399d9 .word 0x080399d9 80381f0: 2000cbbd .word 0x2000cbbd 80381f4: 2000c7f0 .word 0x2000c7f0 080381f8 : /** * @brief Установить SNMP Community для чтения */ void SNMP_SetReadCommunity(char *comm) { 80381f8: 4601 mov r1, r0 strcpy(sSettings.sSnmp.readCommunity, comm); 80381fa: 4801 ldr r0, [pc, #4] ; (8038200 ) 80381fc: f7e9 bdfa b.w 8021df4 8038200: 2000d195 .word 0x2000d195 08038204 : /** * @brief Установить SNMP Community для записи */ void SNMP_SetWriteCommunity(char *comm) { 8038204: 4601 mov r1, r0 strcpy(sSettings.sSnmp.writeCommunity, comm); 8038206: 4801 ldr r0, [pc, #4] ; (803820c ) 8038208: f7e9 bdf4 b.w 8021df4 803820c: 2000d1a9 .word 0x2000d1a9 08038210 : /** * @brief Установить SNMP SysContact * @retval */ void SNMP_SetSysContact(char *con) { 8038210: b510 push {r4, lr} 8038212: 4604 mov r4, r0 static uint8_t len; len = strlen(con); 8038214: f7e9 fe4c bl 8021eb0 8038218: 4903 ldr r1, [pc, #12] ; (8038228 ) 803821a: 7008 strb r0, [r1, #0] snmp_set_syscontact((u8_t*)con, &len); 803821c: 4620 mov r0, r4 } 803821e: 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); 8038222: f7fc ba61 b.w 80346e8 8038226: bf00 nop 8038228: 2000c7e7 .word 0x2000c7e7 0803822c : /** * @brief Установить SNMP SysName * @retval */ void SNMP_SetSysName(char *name) { 803822c: b510 push {r4, lr} 803822e: 4604 mov r4, r0 static uint8_t len; len = strlen(name); 8038230: f7e9 fe3e bl 8021eb0 8038234: 4903 ldr r1, [pc, #12] ; (8038244 ) 8038236: 7008 strb r0, [r1, #0] snmp_set_sysname((u8_t*)name, &len); 8038238: 4620 mov r0, r4 } 803823a: 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); 803823e: f7fc ba5d b.w 80346fc 8038242: bf00 nop 8038244: 2000c7e9 .word 0x2000c7e9 08038248 : /** * @brief Установить SNMP SysLocation * @retval */ void SNMP_SetSysLocation(char *loc) { 8038248: b510 push {r4, lr} 803824a: 4604 mov r4, r0 static uint8_t len; len = strlen(loc); 803824c: f7e9 fe30 bl 8021eb0 8038250: 4903 ldr r1, [pc, #12] ; (8038260 ) 8038252: 7008 strb r0, [r1, #0] snmp_set_syslocation((u8_t*)loc, &len); 8038254: 4620 mov r0, r4 } 8038256: 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); 803825a: f7fc ba59 b.w 8034710 803825e: bf00 nop 8038260: 2000c7e8 .word 0x2000c7e8 08038264 : /** * @brief Установить SNMP SysManagerIP * @retval */ void SNMP_SetManagerIP(char *ip) { 8038264: b510 push {r4, lr} static ip_addr_t trap_addr; ipaddr_aton(ip, &trap_addr); 8038266: 4c05 ldr r4, [pc, #20] ; (803827c ) 8038268: 4621 mov r1, r4 803826a: f7fa fda4 bl 8032db6 snmp_trap_dst_ip_set(0, &trap_addr); 803826e: 2000 movs r0, #0 8038270: 4621 mov r1, r4 } 8038272: 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); 8038276: f7fe bb65 b.w 8036944 803827a: bf00 nop 803827c: 2000c7ec .word 0x2000c7ec 08038280 : /** * @brief Тестовый таск для проверки отправки трапов * @retval */ void snmp_trap_tread(void *arg) { 8038280: b537 push {r0, r1, r2, r4, r5, lr} uint8_t trapName; while(1) { if (xQueueReceive(SNMP_TrapQueue, &trapName, 0) == pdTRUE) 8038282: 4d1c ldr r5, [pc, #112] ; (80382f4 ) { SNMP_SetManagerIP(sSettings.sSnmp.managerIP); SNMP_SendVarbindTrap(&traps[trapName]); 8038284: 4c1c ldr r4, [pc, #112] ; (80382f8 ) { uint8_t trapName; while(1) { if (xQueueReceive(SNMP_TrapQueue, &trapName, 0) == pdTRUE) 8038286: 2200 movs r2, #0 8038288: 6828 ldr r0, [r5, #0] 803828a: f10d 0107 add.w r1, sp, #7 803828e: 4613 mov r3, r2 8038290: f7f2 faa9 bl 802a7e6 8038294: 2801 cmp r0, #1 8038296: d1f6 bne.n 8038286 { SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 8038298: 4818 ldr r0, [pc, #96] ; (80382fc ) 803829a: f7ff ffe3 bl 8038264 SNMP_SendVarbindTrap(&traps[trapName]); 803829e: f89d 0007 ldrb.w r0, [sp, #7] 80382a2: eb04 00c0 add.w r0, r4, r0, lsl #3 80382a6: f000 fa43 bl 8038730 SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); 80382aa: 4815 ldr r0, [pc, #84] ; (8038300 ) 80382ac: f7ff ffda bl 8038264 SNMP_SendVarbindTrap(&traps[trapName]); 80382b0: f89d 0007 ldrb.w r0, [sp, #7] 80382b4: eb04 00c0 add.w r0, r4, r0, lsl #3 80382b8: f000 fa3a bl 8038730 SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); 80382bc: 4811 ldr r0, [pc, #68] ; (8038304 ) 80382be: f7ff ffd1 bl 8038264 SNMP_SendVarbindTrap(&traps[trapName]); 80382c2: f89d 0007 ldrb.w r0, [sp, #7] 80382c6: eb04 00c0 add.w r0, r4, r0, lsl #3 80382ca: f000 fa31 bl 8038730 SNMP_SetManagerIP(sSettings.sSnmp.managerIP4); 80382ce: 480e ldr r0, [pc, #56] ; (8038308 ) 80382d0: f7ff ffc8 bl 8038264 SNMP_SendVarbindTrap(&traps[trapName]); 80382d4: f89d 0007 ldrb.w r0, [sp, #7] 80382d8: eb04 00c0 add.w r0, r4, r0, lsl #3 80382dc: f000 fa28 bl 8038730 SNMP_SetManagerIP(sSettings.sSnmp.managerIP5); 80382e0: 480a ldr r0, [pc, #40] ; (803830c ) 80382e2: f7ff ffbf bl 8038264 SNMP_SendVarbindTrap(&traps[trapName]); 80382e6: f89d 0007 ldrb.w r0, [sp, #7] 80382ea: eb04 00c0 add.w r0, r4, r0, lsl #3 80382ee: f000 fa1f bl 8038730 80382f2: e7c8 b.n 8038286 80382f4: 2000fab8 .word 0x2000fab8 80382f8: 2000fabc .word 0x2000fabc 80382fc: 2000d271 .word 0x2000d271 8038300: 2000d285 .word 0x2000d285 8038304: 2000d299 .word 0x2000d299 8038308: 2000d2ad .word 0x2000d2ad 803830c: 2000d2c1 .word 0x2000d2c1 08038310 : */ 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); 8038310: 4801 ldr r0, [pc, #4] ; (8038318 ) 8038312: f7fc b98f b.w 8034634 8038316: bf00 nop 8038318: 20000a30 .word 0x20000a30 0803831c : /** * @brief Вкл/выкл трапы * @retval */ void SNMP_SetTrapOnOff(uint8_t state) { 803831c: 4601 mov r1, r0 snmp_trap_dst_enable(0, (u8_t)state); 803831e: 2000 movs r0, #0 8038320: f7fe bb0a b.w 8036938 08038324 : /** * @brief Инициализация SNMP агента * @retval */ void SNMP_AgentInit(void) { 8038324: b510 push {r4, lr} SNMP_SetObjDescr(); SNMP_SetReadCommunity(sSettings.sSnmp.readCommunity); 8038326: 4c16 ldr r4, [pc, #88] ; (8038380 ) * @brief Инициализация SNMP агента * @retval */ void SNMP_AgentInit(void) { SNMP_SetObjDescr(); 8038328: f7ff ff28 bl 803817c SNMP_SetReadCommunity(sSettings.sSnmp.readCommunity); 803832c: 4620 mov r0, r4 803832e: f7ff ff63 bl 80381f8 SNMP_SetWriteCommunity(sSettings.sSnmp.writeCommunity); 8038332: f104 0014 add.w r0, r4, #20 8038336: f7ff ff65 bl 8038204 SNMP_SetSysContact(sSettings.sSnmp.sysContact); 803833a: f104 0028 add.w r0, r4, #40 ; 0x28 803833e: f7ff ff67 bl 8038210 SNMP_SetSysName(sSettings.sSnmp.sysName); 8038342: f104 005a add.w r0, r4, #90 ; 0x5a 8038346: f7ff ff71 bl 803822c SNMP_SetSysLocation(sSettings.sSnmp.sysLocation); 803834a: f104 006e add.w r0, r4, #110 ; 0x6e 803834e: f7ff ff7b bl 8038248 SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 8038352: f104 00dc add.w r0, r4, #220 ; 0xdc 8038356: f7ff ff85 bl 8038264 SNMP_SetObjID(); 803835a: f7ff ffd9 bl 8038310 SNMP_SetTrapOnOff(1); 803835e: 2001 movs r0, #1 8038360: f7ff ffdc bl 803831c SNMP_InitTrapsBase(); 8038364: f000 f928 bl 80385b8 snmp_init(); 8038368: f7fd f9c2 bl 80356f0 udp_init(); 803836c: f7fa f9fa bl 8032764 SNMP_TrapQueue = xQueueCreate(SNMP_TRAP_QUEUE_SIZE, sizeof(uint8_t)); 8038370: 2064 movs r0, #100 ; 0x64 8038372: 2101 movs r1, #1 8038374: 2200 movs r2, #0 8038376: f7f2 f8b9 bl 802a4ec 803837a: 4b02 ldr r3, [pc, #8] ; (8038384 ) 803837c: 6018 str r0, [r3, #0] 803837e: bd10 pop {r4, pc} 8038380: 2000d195 .word 0x2000d195 8038384: 2000fab8 .word 0x2000fab8 08038388 : * @retval */ void SNMP_Init(void) { //SETTINGS_SetSnmpDef(); SNMP_AgentInit(); 8038388: f7ff bfcc b.w 8038324 803838c: 0000 movs r0, r0 803838e: 0000 movs r0, r0 08038390 : SNTP_Enable(sSettings.sSNTP.sntpEnable); } static void recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, struct ip_addr *addr, u16_t port) { 8038390: b570 push {r4, r5, r6, lr} 8038392: 4616 mov r6, r2 time_t t; int utcSec = 0; TM_RTC_t data; if (p->len == sizeof(struct sntp_packet)) 8038394: 8952 ldrh r2, [r2, #10] 8038396: 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) { 8038398: b094 sub sp, #80 ; 0x50 time_t t; int utcSec = 0; TM_RTC_t data; if (p->len == sizeof(struct sntp_packet)) 803839a: d149 bne.n 8038430 { int i; struct sntp_packet aligned; //myassert(p->len == p->tot_len); /* don't accept chained pbuf */ memcpy(&aligned, p->payload, sizeof(aligned)); 803839c: a808 add r0, sp, #32 803839e: 6871 ldr r1, [r6, #4] 80383a0: f7e9 faf4 bl 802198c i = (aligned.status >> 3) & 7; 80383a4: f89d 3020 ldrb.w r3, [sp, #32] if ((i < 1) || (i > 4)) /* SNTP version 1..4 */ 80383a8: f3c3 02c2 ubfx r2, r3, #3, #3 80383ac: 3a01 subs r2, #1 80383ae: 2a03 cmp r2, #3 80383b0: d83e bhi.n 8038430 goto out; i = aligned.status & 7; if ((i != 4) && (i != 5)) /* mode 4 or 5: server or broadcast */ 80383b2: f003 0307 and.w r3, r3, #7 80383b6: 3b04 subs r3, #4 80383b8: 2b01 cmp r3, #1 80383ba: d839 bhi.n 8038430 goto out; if (aligned.xmt == 0) 80383bc: e9dd 4512 ldrd r4, r5, [sp, #72] ; 0x48 80383c0: ea54 0305 orrs.w r3, r4, r5 80383c4: d034 beq.n 8038430 goto out; utcSec = (int)(3600.0*sSettings.sSNTP.timeZone); 80383c6: 4b20 ldr r3, [pc, #128] ; (8038448 ) 80383c8: f8d3 0370 ldr.w r0, [r3, #880] ; 0x370 80383cc: f7e8 f8a4 bl 8020518 <__aeabi_f2d> 80383d0: a31b add r3, pc, #108 ; (adr r3, 8038440 ) 80383d2: e9d3 2300 ldrd r2, r3, [r3] 80383d6: f7e8 f8f3 bl 80205c0 <__aeabi_dmul> 80383da: f7e8 fb8b bl 8020af4 <__aeabi_d2iz> 80383de: 4605 mov r5, r0 t = (ntohl(aligned.xmt) - 2208988800 + utcSec ); 80383e0: 4620 mov r0, r4 80383e2: f7f6 fbe1 bl 802eba8 80383e6: 4b19 ldr r3, [pc, #100] ; (803844c ) 80383e8: 18eb adds r3, r5, r3 TM_RTC_SetDataTimeUnix((uint32_t)t); 80383ea: 1818 adds r0, r3, r0 80383ec: f7ee f968 bl 80266c0 /* Сохраним время последней синхронизации */ TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 80383f0: a804 add r0, sp, #16 80383f2: 2100 movs r1, #0 80383f4: f7ee f848 bl 8026488 memset(sSettings.sSNTP.data, 0, sizeof(sSettings.sSNTP.data)); 80383f8: 2100 movs r1, #0 80383fa: 221e movs r2, #30 80383fc: 4814 ldr r0, [pc, #80] ; (8038450 ) 80383fe: f7e9 fb7f bl 8021b00 sprintf(sSettings.sSNTP.data, "%02d.%02d.%02d %02d:%02d:%02d", 8038402: f89d 1019 ldrb.w r1, [sp, #25] 8038406: f89d 2017 ldrb.w r2, [sp, #23] 803840a: 9100 str r1, [sp, #0] 803840c: f89d 1015 ldrb.w r1, [sp, #21] 8038410: f89d 3018 ldrb.w r3, [sp, #24] 8038414: 9101 str r1, [sp, #4] 8038416: f89d 1014 ldrb.w r1, [sp, #20] 803841a: 480d ldr r0, [pc, #52] ; (8038450 ) 803841c: 9102 str r1, [sp, #8] 803841e: f89d 1010 ldrb.w r1, [sp, #16] 8038422: 9103 str r1, [sp, #12] 8038424: 490b ldr r1, [pc, #44] ; (8038454 ) 8038426: f7ef f9f5 bl 8027814 data.date, data.month, data.year, data.hours, data.minutes, data.seconds); timeout = VALID_TIMEOUT; 803842a: 4a0b ldr r2, [pc, #44] ; (8038458 ) 803842c: 4b0b ldr r3, [pc, #44] ; (803845c ) 803842e: 601a str r2, [r3, #0] } out: pbuf_free(p); 8038430: 4630 mov r0, r6 8038432: f7f7 fceb bl 802fe0c } 8038436: b014 add sp, #80 ; 0x50 8038438: bd70 pop {r4, r5, r6, pc} 803843a: bf00 nop 803843c: f3af 8000 nop.w 8038440: 00000000 .word 0x00000000 8038444: 40ac2000 .word 0x40ac2000 8038448: 2000cfc4 .word 0x2000cfc4 803844c: 7c558180 .word 0x7c558180 8038450: 2000d315 .word 0x2000d315 8038454: 08045ae4 .word 0x08045ae4 8038458: 01b77400 .word 0x01b77400 803845c: 2000c7fc .word 0x2000c7fc 08038460 : void SNTP_Enable(bool enable) { 8038460: b538 push {r3, r4, r5, lr} if (enable) 8038462: 4605 mov r5, r0 8038464: 4c0f ldr r4, [pc, #60] ; (80384a4 ) 8038466: b1b8 cbz r0, 8038498 { if (upcb == 0) 8038468: 6825 ldr r5, [r4, #0] 803846a: b9d5 cbnz r5, 80384a2 { err_t ret; upcb = udp_new(); 803846c: f7fa fb58 bl 8032b20 8038470: 6020 str r0, [r4, #0] if (upcb != 0) 8038472: b1b0 cbz r0, 80384a2 { ret = udp_bind(upcb, IP_ADDR_ANY, port); 8038474: 227b movs r2, #123 ; 0x7b 8038476: 490c ldr r1, [pc, #48] ; (80384a8 ) 8038478: f7fa fa3a bl 80328f0 if (ret != ERR_OK) 803847c: 4602 mov r2, r0 { udp_remove(upcb); 803847e: 6820 ldr r0, [r4, #0] upcb = udp_new(); if (upcb != 0) { ret = udp_bind(upcb, IP_ADDR_ANY, port); if (ret != ERR_OK) 8038480: b11a cbz r2, 803848a { udp_remove(upcb); 8038482: f7fa fb31 bl 8032ae8 upcb = 0; 8038486: 6025 str r5, [r4, #0] 8038488: e002 b.n 8038490 } else { udp_recv(upcb, recv, 0); 803848a: 4908 ldr r1, [pc, #32] ; (80384ac ) 803848c: f7fa fb28 bl 8032ae0 } timeout = 0; 8038490: 4b07 ldr r3, [pc, #28] ; (80384b0 ) 8038492: 2200 movs r2, #0 8038494: 601a str r2, [r3, #0] 8038496: bd38 pop {r3, r4, r5, pc} } } } else if (upcb != 0) 8038498: 6820 ldr r0, [r4, #0] 803849a: b110 cbz r0, 80384a2 { udp_remove(upcb); 803849c: f7fa fb24 bl 8032ae8 upcb = 0; 80384a0: 6025 str r5, [r4, #0] 80384a2: bd38 pop {r3, r4, r5, pc} 80384a4: 2000c7f8 .word 0x2000c7f8 80384a8: 08045008 .word 0x08045008 80384ac: 08038391 .word 0x08038391 80384b0: 2000c7fc .word 0x2000c7fc 080384b4 : { return upcb != 0; } void SNTP_SetServerAddr(char *addr) { 80384b4: b508 push {r3, lr} server.addr = ipaddr_addr(addr); 80384b6: f7fa fcfc bl 8032eb2 80384ba: 4b01 ldr r3, [pc, #4] ; (80384c0 ) 80384bc: 6018 str r0, [r3, #0] 80384be: bd08 pop {r3, pc} 80384c0: 2000c7f4 .word 0x2000c7f4 080384c4 : /** * @brief Инициализация SNTP. * @retval */ void SNTP_Init(void) { 80384c4: b508 push {r3, lr} SNTP_SetServerAddr(sSettings.sSNTP.ip); 80384c6: 4805 ldr r0, [pc, #20] ; (80384dc ) 80384c8: f7ff fff4 bl 80384b4 SNTP_Enable(sSettings.sSNTP.sntpEnable); 80384cc: 4b04 ldr r3, [pc, #16] ; (80384e0 ) 80384ce: f893 0340 ldrb.w r0, [r3, #832] ; 0x340 } 80384d2: e8bd 4008 ldmia.w sp!, {r3, lr} void SNTP_Init(void) { SNTP_SetServerAddr(sSettings.sSNTP.ip); SNTP_Enable(sSettings.sSNTP.sntpEnable); 80384d6: f7ff bfc3 b.w 8038460 80384da: bf00 nop 80384dc: 2000d305 .word 0x2000d305 80384e0: 2000cfc4 .word 0x2000cfc4 080384e4 : pbuf_free(psend); } } void SNTP_Poll(void) { 80384e4: b530 push {r4, r5, lr} if (upcb) 80384e6: 4d15 ldr r5, [pc, #84] ; (803853c ) 80384e8: 682b ldr r3, [r5, #0] pbuf_free(psend); } } void SNTP_Poll(void) { 80384ea: b08d sub sp, #52 ; 0x34 if (upcb) 80384ec: b31b cbz r3, 8038536 static void send_request(void) { struct sntp_packet packet; struct pbuf* psend; memset(&packet, 0, sizeof(packet)); 80384ee: 2100 movs r1, #0 80384f0: 2230 movs r2, #48 ; 0x30 80384f2: 4668 mov r0, sp 80384f4: f7e9 fb04 bl 8021b00 packet.status = (3 << 3) /* SNTP vesion 3 */ | (3 << 0); /* Mode: client */ 80384f8: 231b movs r3, #27 psend = pbuf_alloc(PBUF_RAW, sizeof(packet), PBUF_REF); 80384fa: 2003 movs r0, #3 80384fc: 2130 movs r1, #48 ; 0x30 80384fe: 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 */ 8038500: f88d 3000 strb.w r3, [sp] psend = pbuf_alloc(PBUF_RAW, sizeof(packet), PBUF_REF); 8038504: f7f7 fccf bl 802fea6 if (psend != 0) 8038508: 4604 mov r4, r0 803850a: b1a0 cbz r0, 8038536 { psend->payload = &packet; 803850c: ab00 add r3, sp, #0 803850e: 6043 str r3, [r0, #4] timeout = (udp_sendto(upcb, psend, &server, port) == ERR_OK) ? SENT_TIMEOUT : SENDFAIL_TIMEOUT; 8038510: 4621 mov r1, r4 8038512: 4a0b ldr r2, [pc, #44] ; (8038540 ) 8038514: 6828 ldr r0, [r5, #0] 8038516: 237b movs r3, #123 ; 0x7b 8038518: f7fa fa9b bl 8032a52 803851c: f64e 2360 movw r3, #60000 ; 0xea60 8038520: f241 3288 movw r2, #5000 ; 0x1388 8038524: 4907 ldr r1, [pc, #28] ; (8038544 ) 8038526: 2800 cmp r0, #0 8038528: bf14 ite ne 803852a: 4610 movne r0, r2 803852c: 4618 moveq r0, r3 803852e: 6008 str r0, [r1, #0] pbuf_free(psend); 8038530: 4620 mov r0, r4 8038532: f7f7 fc6b bl 802fe0c void SNTP_Poll(void) { if (upcb) send_request(); } 8038536: b00d add sp, #52 ; 0x34 8038538: bd30 pop {r4, r5, pc} 803853a: bf00 nop 803853c: 2000c7f8 .word 0x2000c7f8 8038540: 2000c7f4 .word 0x2000c7f4 8038544: 2000c7fc .word 0x2000c7fc 08038548 : * @brief Периодическая синхронизация времени. * Выполняется раз в сутки с 0 часов. * @retval */ void vTaskPeriodicSynchro(void *arg) { 8038548: b530 push {r4, r5, lr} static uint8_t fSinhro = 0; for (;;) { vTaskDelay(10000); if (sSettings.sSNTP.sntpEnable) 803854a: 4d0f ldr r5, [pc, #60] ; (8038588 ) fSinhro = 1; //printf("Periodic time sinhro\n\r"); } if (data.hours > 1) fSinhro = 0; 803854c: 4c0f ldr r4, [pc, #60] ; (803858c ) * @brief Периодическая синхронизация времени. * Выполняется раз в сутки с 0 часов. * @retval */ void vTaskPeriodicSynchro(void *arg) { 803854e: b085 sub sp, #20 static uint8_t fSinhro = 0; for (;;) { vTaskDelay(10000); 8038550: f242 7010 movw r0, #10000 ; 0x2710 8038554: f7f2 fd3a bl 802afcc if (sSettings.sSNTP.sntpEnable) 8038558: f895 3340 ldrb.w r3, [r5, #832] ; 0x340 803855c: 2b00 cmp r3, #0 803855e: d0f7 beq.n 8038550 { TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8038560: 4668 mov r0, sp 8038562: 2100 movs r1, #0 8038564: f7ed ff90 bl 8026488 /* Если пришло время синхронизации */ if ((data.hours == 0) && (fSinhro == 0)) 8038568: f89d 3005 ldrb.w r3, [sp, #5] 803856c: b92b cbnz r3, 803857a 803856e: 7823 ldrb r3, [r4, #0] 8038570: b91b cbnz r3, 803857a { SNTP_Poll(); 8038572: f7ff ffb7 bl 80384e4 fSinhro = 1; 8038576: 2301 movs r3, #1 8038578: 7023 strb r3, [r4, #0] //printf("Periodic time sinhro\n\r"); } if (data.hours > 1) 803857a: f89d 3005 ldrb.w r3, [sp, #5] 803857e: 2b01 cmp r3, #1 8038580: d9e6 bls.n 8038550 fSinhro = 0; 8038582: 2300 movs r3, #0 8038584: 7023 strb r3, [r4, #0] 8038586: e7e3 b.n 8038550 8038588: 2000cfc4 .word 0x2000cfc4 803858c: 2000c7f1 .word 0x2000c7f1 08038590 : /** * @brief Синхронизация времени единоразово при включении контроллера * @retval */ void vTaskOnceSynchro(void *arg) { 8038590: b538 push {r3, r4, r5, lr} for (;;) { if (sSettings.sSNTP.sntpEnable) 8038592: 4d07 ldr r5, [pc, #28] ; (80385b0 ) 8038594: 4c07 ldr r4, [pc, #28] ; (80385b4 ) 8038596: f895 3340 ldrb.w r3, [r5, #832] ; 0x340 803859a: b12b cbz r3, 80385a8 { vTaskDelay(7000); 803859c: f641 3058 movw r0, #7000 ; 0x1b58 80385a0: f7f2 fd14 bl 802afcc SNTP_Poll(); 80385a4: f7ff ff9e bl 80384e4 //printf("Once time sinhro\n\r"); vTaskDelete(xHandleSntpOnceSinhro); } else vTaskDelete(xHandleSntpOnceSinhro); 80385a8: 6820 ldr r0, [r4, #0] 80385aa: f7f2 fb4d bl 802ac48 80385ae: e7f2 b.n 8038596 80385b0: 2000cfc4 .word 0x2000cfc4 80385b4: 20000b0c .word 0x20000b0c 080385b8 : * @retval */ void SNMP_InitTrapsBase(void) { /* 1. FWVersionUpdate */ // + traps[FW_VERSION_UPDATE].trapId = FW_VERSION_UPDATE; 80385b8: 4b53 ldr r3, [pc, #332] ; (8038708 ) traps[FW_VERSION_UPDATE].varbindId = 1; traps[FW_VERSION_UPDATE].trapEnable = true; traps[FW_VERSION_UPDATE].handle = GetVersionStr; /* FWVersion */ 80385ba: 4954 ldr r1, [pc, #336] ; (803870c ) /* 2. FWVersionUpdated */ // + traps[FW_VERSION_UPDATED].trapId = FW_VERSION_UPDATED; 80385bc: 2002 movs r0, #2 /** * @brief Инициализация базы трапов * @retval */ void SNMP_InitTrapsBase(void) { 80385be: 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; 80385c0: 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; 80385c2: 2003 movs r0, #3 80385c4: 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; 80385c6: 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; 80385c8: 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; 80385ca: 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; 80385ce: 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 */ 80385d0: 4d4f ldr r5, [pc, #316] ; (8038710 ) 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; 80385d2: 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; 80385d6: 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; 80385da: 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; 80385de: 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 */ 80385e2: 4c4c ldr r4, [pc, #304] ; (8038714 ) /* 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 */ 80385e4: 484c ldr r0, [pc, #304] ; (8038718 ) { /* 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 */ 80385e6: 60d9 str r1, [r3, #12] * @retval */ void SNMP_InitTrapsBase(void) { /* 1. FWVersionUpdate */ // + traps[FW_VERSION_UPDATE].trapId = FW_VERSION_UPDATE; 80385e8: 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 */ 80385ea: 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 */ 80385ec: 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 */ 80385ee: 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 */ 80385f0: 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; 80385f2: 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 */ 80385f4: 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 */ 80385f6: 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; 80385f8: 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; 80385fa: 2408 movs r4, #8 traps[DO1_TOGGLED].varbindId = 6; traps[DO1_TOGGLED].trapEnable = true; traps[DO1_TOGGLED].handle = GetDOUT1StatusStr; /* State DO1 */ 80385fc: 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 */ 80385fe: 4847 ldr r0, [pc, #284] ; (803871c ) 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; 8038600: 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; 8038604: 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; 8038608: 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; 803860c: f883 4041 strb.w r4, [r3, #65] ; 0x41 * @retval */ void SNMP_InitTrapsBase(void) { /* 1. FWVersionUpdate */ // + traps[FW_VERSION_UPDATE].trapId = FW_VERSION_UPDATE; 8038610: 725a strb r2, [r3, #9] traps[FW_VERSION_UPDATE].varbindId = 1; 8038612: 729a strb r2, [r3, #10] traps[FW_VERSION_UPDATE].trapEnable = true; 8038614: 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; 8038616: 749a strb r2, [r3, #18] traps[FW_VERSION_UPDATED].trapEnable = true; 8038618: 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; 803861a: 769a strb r2, [r3, #26] traps[DEVICE_RESTORED].trapEnable = true; 803861c: 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; 803861e: f883 2022 strb.w r2, [r3, #34] ; 0x22 traps[DEVICE_REBOOTED].trapEnable = true; 8038622: 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; 8038626: 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; 803862a: 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; 803862e: 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; 8038632: 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; 8038636: f883 1049 strb.w r1, [r3, #73] ; 0x49 traps[BATTERY_TEMPERATURE_NORM].varbindId = 10; 803863a: 210a movs r1, #10 803863c: f883 104a strb.w r1, [r3, #74] ; 0x4a traps[BATTERY_TEMPERATURE_NORM].trapEnable = true; traps[BATTERY_TEMPERATURE_NORM].handle = GetInternalTempStr; /* BatteryTemperature */ 8038640: 64d8 str r0, [r3, #76] ; 0x4c /* 10. BatteryTemperatureAlarm */ // + traps[BATTERY_TEMPERATURE_ALARM].trapId = BATTERY_TEMPERATURE_ALARM; 8038642: f883 1051 strb.w r1, [r3, #81] ; 0x51 traps[BATTERY_TEMPERATURE_ALARM].varbindId = 10; 8038646: f883 1052 strb.w r1, [r3, #82] ; 0x52 traps[BATTERY_TEMPERATURE_ALARM].trapEnable = true; traps[BATTERY_TEMPERATURE_ALARM].handle = GetInternalTempStr; /* BatteryTemperature */ 803864a: 6558 str r0, [r3, #84] ; 0x54 /* 11. LineAlarm */ // + traps[LINE_ALARM].trapId = LINE_ALARM; 803864c: 210b movs r1, #11 traps[LINE_ALARM].varbindId = 12; traps[LINE_ALARM].trapEnable = true; traps[LINE_ALARM].handle = GetInputVoltageStr; /* LineAlarm */ 803864e: 4834 ldr r0, [pc, #208] ; (8038720 ) 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; 8038650: f883 1059 strb.w r1, [r3, #89] ; 0x59 traps[LINE_ALARM].varbindId = 12; 8038654: 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; 8038656: 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 */ 8038658: 4d32 ldr r5, [pc, #200] ; (8038724 ) 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; 803865a: f883 105a strb.w r1, [r3, #90] ; 0x5a traps[LINE_ALARM].trapEnable = true; traps[LINE_ALARM].handle = GetInputVoltageStr; /* LineAlarm */ 803865e: 65d8 str r0, [r3, #92] ; 0x5c /* 12. LineNorm */ // + traps[LINE_NORM].trapId = LINE_NORM; 8038660: f883 1061 strb.w r1, [r3, #97] ; 0x61 traps[LINE_NORM].varbindId = 12; 8038664: f883 1062 strb.w r1, [r3, #98] ; 0x62 traps[LINE_NORM].trapEnable = true; traps[LINE_NORM].handle = GetInputVoltageStr; /* LineNorm */ 8038668: 6658 str r0, [r3, #100] ; 0x64 /* 13. LowBatAlarm */ // + traps[LOW_BAT_ALARM].trapId = LOW_BAT_ALARM; 803866a: 210d movs r1, #13 traps[LOW_BAT_ALARM].varbindId = 15; traps[LOW_BAT_ALARM].trapEnable = true; traps[LOW_BAT_ALARM].handle = GetBatCapacityStr; /* LowBatAlarm */ 803866c: 482e ldr r0, [pc, #184] ; (8038728 ) 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; 803866e: 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; 8038672: 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; 8038676: 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; 8038678: 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; 803867c: 2610 movs r6, #16 traps[POWER_NORM].varbindId = 14; 803867e: 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; 8038682: 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 */ 8038684: 67dd str r5, [r3, #124] ; 0x7c /* 16. PowerNorm */ // + traps[POWER_NORM].trapId = POWER_NORM; 8038686: f883 6081 strb.w r6, [r3, #129] ; 0x81 traps[POWER_NORM].varbindId = 14; traps[POWER_NORM].trapEnable = true; traps[POWER_NORM].handle = GetPowerStr; /* PowerNorm */ 803868a: f8c3 5084 str.w r5, [r3, #132] ; 0x84 /* 17. ConnectMonitorAlarm */ // traps[CONNECT_MONITOR_ALARM].trapId = CONNECT_MONITOR_ALARM; 803868e: f883 4089 strb.w r4, [r3, #137] ; 0x89 traps[CONNECT_MONITOR_ALARM].varbindId = 17; 8038692: f883 408a strb.w r4, [r3, #138] ; 0x8a traps[CONNECT_MONITOR_ALARM].trapEnable = true; traps[CONNECT_MONITOR_ALARM].handle = GetConnectMonitorStr;//GetConnectMonitorStr; /* ConnectMonitor */ 8038696: 4d25 ldr r5, [pc, #148] ; (803872c ) 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; 8038698: 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; 803869c: 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; 80386a0: 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; 80386a4: 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; 80386a8: f883 106a strb.w r1, [r3, #106] ; 0x6a traps[LOW_BAT_ALARM].trapEnable = true; 80386ac: f883 206b strb.w r2, [r3, #107] ; 0x6b traps[LOW_BAT_ALARM].handle = GetBatCapacityStr; /* LowBatAlarm */ 80386b0: 66d8 str r0, [r3, #108] ; 0x6c /* 14. LowBatNorm */ // + traps[LOW_BAT_NORM].trapId = LOW_BAT_NORM; traps[LOW_BAT_NORM].varbindId = 15; 80386b2: f883 1072 strb.w r1, [r3, #114] ; 0x72 traps[LOW_BAT_NORM].trapEnable = true; 80386b6: f883 2073 strb.w r2, [r3, #115] ; 0x73 traps[LOW_BAT_NORM].handle = GetBatCapacityStr; /* LowBatNorm */ 80386ba: 6758 str r0, [r3, #116] ; 0x74 /* 15. PowerAlarm */ // + traps[POWER_ALARM].trapId = POWER_ALARM; 80386bc: f883 1079 strb.w r1, [r3, #121] ; 0x79 traps[POWER_ALARM].varbindId = 14; traps[POWER_ALARM].trapEnable = true; 80386c0: 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; 80386c4: 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; 80386c8: 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; 80386cc: 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; 80386d0: 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; 80386d2: 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; 80386d4: 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; 80386d8: 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 */ 80386da: f8c3 508c str.w r5, [r3, #140] ; 0x8c /* 18. ConnectMonitorNorm */ // traps[CONNECT_MONITOR_NORM].trapId = CONNECT_MONITOR_NORM; 80386de: f883 6091 strb.w r6, [r3, #145] ; 0x91 traps[CONNECT_MONITOR_NORM].varbindId = 17; traps[CONNECT_MONITOR_NORM].trapEnable = true; 80386e2: f883 2093 strb.w r2, [r3, #147] ; 0x93 traps[CONNECT_MONITOR_NORM].handle = GetConnectMonitorStr;//GetConnectMonitorStr; /* ConnectMonitor */ 80386e6: f8c3 5094 str.w r5, [r3, #148] ; 0x94 /* 19. BatteryConnectAlarm */ // + traps[BATTERY_CONNECT_ALARM].trapId = BATTERY_CONNECT_ALARM; traps[BATTERY_CONNECT_ALARM].varbindId = 15; 80386ea: f883 109a strb.w r1, [r3, #154] ; 0x9a traps[BATTERY_CONNECT_ALARM].trapEnable = true; 80386ee: f883 209b strb.w r2, [r3, #155] ; 0x9b traps[BATTERY_CONNECT_ALARM].handle = GetBatCapacityStr; /* LowBatAlarm */ 80386f2: f8c3 009c str.w r0, [r3, #156] ; 0x9c /* 20. BatteryConnectNorm */ // + traps[BATTERY_CONNECT_NORM].trapId = BATTERY_CONNECT_NORM; 80386f6: f883 40a1 strb.w r4, [r3, #161] ; 0xa1 traps[BATTERY_CONNECT_NORM].varbindId = 15; 80386fa: f883 10a2 strb.w r1, [r3, #162] ; 0xa2 traps[BATTERY_CONNECT_NORM].trapEnable = true; 80386fe: f883 20a3 strb.w r2, [r3, #163] ; 0xa3 traps[BATTERY_CONNECT_NORM].handle = GetBatCapacityStr; /* LowBatNorm */ 8038702: f8c3 00a4 str.w r0, [r3, #164] ; 0xa4 8038706: bd70 pop {r4, r5, r6, pc} 8038708: 2000fabc .word 0x2000fabc 803870c: 08027cc9 .word 0x08027cc9 8038710: 08027b79 .word 0x08027b79 8038714: 08027bed .word 0x08027bed 8038718: 08027c11 .word 0x08027c11 803871c: 08027949 .word 0x08027949 8038720: 08027885 .word 0x08027885 8038724: 080278dd .word 0x080278dd 8038728: 08027901 .word 0x08027901 803872c: 08027999 .word 0x08027999 08038730 : /** * @brief Отправка трапа с переменной, зарегистрированного в базе. * @retval */ bool SNMP_SendVarbindTrap(TRAP_t *trap) { 8038730: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} char msg[255]; uint8_t len = 0; 8038734: 2500 movs r5, #0 /** * @brief Отправка трапа с переменной, зарегистрированного в базе. * @retval */ bool SNMP_SendVarbindTrap(TRAP_t *trap) { 8038736: f5ad 7d07 sub.w sp, sp, #540 ; 0x21c 803873a: 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}}; 803873c: 4629 mov r1, r5 803873e: 2284 movs r2, #132 ; 0x84 8038740: a804 add r0, sp, #16 * @retval */ bool SNMP_SendVarbindTrap(TRAP_t *trap) { char msg[255]; uint8_t len = 0; 8038742: 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}}; 8038746: f7e9 f9db bl 8021b00 803874a: 2202 movs r2, #2 803874c: 2401 movs r4, #1 803874e: 2603 movs r6, #3 8038750: 230b movs r3, #11 8038752: f04f 0804 mov.w r8, #4 8038756: 2706 movs r7, #6 8038758: f24a 3b18 movw fp, #41752 ; 0xa318 803875c: f240 3a8f movw sl, #911 ; 0x38f 8038760: 920e str r2, [sp, #56] ; 0x38 struct snmp_obj_id varObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 1, 1}}; 8038762: 4629 mov r1, r5 8038764: 2284 movs r2, #132 ; 0x84 8038766: 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}}; 8038768: f88d 3010 strb.w r3, [sp, #16] 803876c: 9606 str r6, [sp, #24] 803876e: 960d str r6, [sp, #52] ; 0x34 struct snmp_obj_id varObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 1, 1}}; 8038770: 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}}; 8038772: 9405 str r4, [sp, #20] 8038774: 9707 str r7, [sp, #28] 8038776: 9408 str r4, [sp, #32] 8038778: f8cd 8024 str.w r8, [sp, #36] ; 0x24 803877c: 940a str r4, [sp, #40] ; 0x28 803877e: f8cd b02c str.w fp, [sp, #44] ; 0x2c 8038782: 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}}; 8038786: f7e9 f9bb bl 8021b00 803878a: 9b01 ldr r3, [sp, #4] 803878c: 9627 str r6, [sp, #156] ; 0x9c 803878e: f88d 3094 strb.w r3, [sp, #148] ; 0x94 trapObjId.id[trapObjId.len - 1] = trap->trapId; 8038792: 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}}; 8038796: 962e str r6, [sp, #184] ; 0xb8 trapObjId.id[trapObjId.len - 1] = trap->trapId; 8038798: 930f str r3, [sp, #60] ; 0x3c varObjId.id[varObjId.len - 1] = trap->varbindId; 803879a: 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}}; 803879e: 9426 str r4, [sp, #152] ; 0x98 trapObjId.id[trapObjId.len - 1] = trap->trapId; varObjId.id[varObjId.len - 1] = trap->varbindId; 80387a0: 9330 str r3, [sp, #192] ; 0xc0 trap->handle(msg, &len); 80387a2: a846 add r0, sp, #280 ; 0x118 80387a4: 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}}; 80387a8: 9728 str r7, [sp, #160] ; 0xa0 trapObjId.id[trapObjId.len - 1] = trap->trapId; varObjId.id[varObjId.len - 1] = trap->varbindId; trap->handle(msg, &len); 80387aa: 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}}; 80387ae: 9429 str r4, [sp, #164] ; 0xa4 80387b0: f8cd 80a8 str.w r8, [sp, #168] ; 0xa8 80387b4: 942b str r4, [sp, #172] ; 0xac 80387b6: f8cd b0b0 str.w fp, [sp, #176] ; 0xb0 80387ba: f8cd a0b4 str.w sl, [sp, #180] ; 0xb4 80387be: 942f str r4, [sp, #188] ; 0xbc trapObjId.id[trapObjId.len - 1] = trap->trapId; varObjId.id[varObjId.len - 1] = trap->varbindId; trap->handle(msg, &len); 80387c0: 4798 blx r3 vb = snmp_varbind_alloc(&varObjId, SNMP_ASN1_OC_STR, len); 80387c2: a825 add r0, sp, #148 ; 0x94 80387c4: 4641 mov r1, r8 80387c6: f89d 200f ldrb.w r2, [sp, #15] 80387ca: f7fc ffb5 bl 8035738 if(vb != NULL ) { 80387ce: 4606 mov r6, r0 80387d0: b198 cbz r0, 80387fa memcpy(vb->value, msg, len); 80387d2: f89d 200f ldrb.w r2, [sp, #15] 80387d6: 6940 ldr r0, [r0, #20] 80387d8: a946 add r1, sp, #280 ; 0x118 80387da: f7e9 f8d7 bl 802198c snmp_varbind_tail_add(&trap_msg.outvb, vb); 80387de: 4809 ldr r0, [pc, #36] ; (8038804 ) 80387e0: 4631 mov r1, r6 80387e2: f7fd f855 bl 8035890 snmp_send_trap(SNMP_GENTRAP_ENTERPRISESPC, &trapObjId, 0); 80387e6: a904 add r1, sp, #16 80387e8: 462a mov r2, r5 80387ea: 4638 mov r0, r7 80387ec: f7fe f9c0 bl 8036b70 snmp_varbind_list_free(&trap_msg.outvb); 80387f0: 4804 ldr r0, [pc, #16] ; (8038804 ) 80387f2: f7fc fff4 bl 80357de return true; 80387f6: 4620 mov r0, r4 80387f8: e7ff b.n 80387fa } else { return false; } } 80387fa: f50d 7d07 add.w sp, sp, #540 ; 0x21c 80387fe: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8038802: bf00 nop 8038804: 2000f844 .word 0x2000f844 08038808 : char dataBuf1[DATA_BUF_LEN1]; static uint8_t udp_type_message = 0; //0 - идентификационное сообщение; 1 - сообщение с настройками сети void udp_message(char *buf) { 8038808: b570 push {r4, r5, r6, lr} uint8_t len2 = 0; 803880a: 2600 movs r6, #0 char dataBuf1[DATA_BUF_LEN1]; static uint8_t udp_type_message = 0; //0 - идентификационное сообщение; 1 - сообщение с настройками сети void udp_message(char *buf) { 803880c: b09a sub sp, #104 ; 0x68 803880e: 4604 mov r4, r0 uint8_t len2 = 0; char str[97]; memset(str, 0, 97); 8038810: 2261 movs r2, #97 ; 0x61 8038812: 4631 mov r1, r6 8038814: a801 add r0, sp, #4 GetModelStr(str, &len2); strncat(buf, str, len2); strcat(buf, ";"); 8038816: 4d2b ldr r5, [pc, #172] ; (80388c4 ) static uint8_t udp_type_message = 0; //0 - идентификационное сообщение; 1 - сообщение с настройками сети void udp_message(char *buf) { uint8_t len2 = 0; 8038818: f88d 6003 strb.w r6, [sp, #3] char str[97]; memset(str, 0, 97); 803881c: f7e9 f970 bl 8021b00 GetModelStr(str, &len2); 8038820: a801 add r0, sp, #4 8038822: f10d 0103 add.w r1, sp, #3 8038826: f7ef fa2b bl 8027c80 strncat(buf, str, len2); 803882a: f89d 2003 ldrb.w r2, [sp, #3] 803882e: a901 add r1, sp, #4 8038830: 4620 mov r0, r4 8038832: f7e9 fb6d bl 8021f10 strcat(buf, ";"); 8038836: 4629 mov r1, r5 8038838: 4620 mov r0, r4 803883a: f7e9 f9c7 bl 8021bcc GetSerialNumberStr(str, &len2); 803883e: a801 add r0, sp, #4 8038840: f10d 0103 add.w r1, sp, #3 8038844: f7ef fa64 bl 8027d10 strncat(buf, str, len2); 8038848: f89d 2003 ldrb.w r2, [sp, #3] 803884c: a901 add r1, sp, #4 803884e: 4620 mov r0, r4 8038850: f7e9 fb5e bl 8021f10 strcat(buf, ";"); 8038854: 4629 mov r1, r5 8038856: 4620 mov r0, r4 8038858: f7e9 f9b8 bl 8021bcc GetMacStr(str, &len2); 803885c: a801 add r0, sp, #4 803885e: f10d 0103 add.w r1, sp, #3 8038862: f7ef fa43 bl 8027cec strncat(buf, str, len2); 8038866: f89d 2003 ldrb.w r2, [sp, #3] 803886a: a901 add r1, sp, #4 803886c: 4620 mov r0, r4 803886e: f7e9 fb4f bl 8021f10 strcat(buf, ";"); 8038872: 4629 mov r1, r5 8038874: 4620 mov r0, r4 8038876: f7e9 f9a9 bl 8021bcc GetVersionStr(str, &len2); 803887a: a801 add r0, sp, #4 803887c: f10d 0103 add.w r1, sp, #3 8038880: f7ef fa22 bl 8027cc8 strncat(buf, str, len2); 8038884: f89d 2003 ldrb.w r2, [sp, #3] 8038888: a901 add r1, sp, #4 803888a: 4620 mov r0, r4 803888c: f7e9 fb40 bl 8021f10 strcat(buf, ";;;"); 8038890: 4620 mov r0, r4 8038892: 490d ldr r1, [pc, #52] ; (80388c8 ) 8038894: f7e9 f99a bl 8021bcc memset(str, 0, 97); 8038898: 2261 movs r2, #97 ; 0x61 803889a: 4631 mov r1, r6 803889c: a801 add r0, sp, #4 803889e: f7e9 f92f bl 8021b00 GetSTM32IDStr(str, &len2); 80388a2: a801 add r0, sp, #4 80388a4: f10d 0103 add.w r1, sp, #3 80388a8: f7ee f93c bl 8026b24 strncat(buf, str, len2); 80388ac: a901 add r1, sp, #4 80388ae: 4620 mov r0, r4 80388b0: f89d 2003 ldrb.w r2, [sp, #3] 80388b4: f7e9 fb2c bl 8021f10 strcat(buf, ";;;T2OK;;"); 80388b8: 4620 mov r0, r4 80388ba: 4904 ldr r1, [pc, #16] ; (80388cc ) 80388bc: f7e9 f986 bl 8021bcc } 80388c0: b01a add sp, #104 ; 0x68 80388c2: bd70 pop {r4, r5, r6, pc} 80388c4: 08045b19 .word 0x08045b19 80388c8: 08045b17 .word 0x08045b17 80388cc: 08045b1b .word 0x08045b1b 080388d0 : void udp_message_netSettings(char *buf) { 80388d0: b510 push {r4, lr} 80388d2: b09a sub sp, #104 ; 0x68 80388d4: 4604 mov r4, r0 char str[100]; uint8_t len; /* S/N */ GetSerialNumberStr(str, &len); 80388d6: f10d 0103 add.w r1, sp, #3 80388da: a801 add r0, sp, #4 80388dc: f7ef fa18 bl 8027d10 strcat(buf, "{\"serno\":\""); 80388e0: 4620 mov r0, r4 80388e2: 4926 ldr r1, [pc, #152] ; (803897c ) 80388e4: f7e9 f972 bl 8021bcc strncat(buf, str, len); 80388e8: f89d 2003 ldrb.w r2, [sp, #3] 80388ec: a901 add r1, sp, #4 80388ee: 4620 mov r0, r4 80388f0: f7e9 fb0e bl 8021f10 /* WEB */ GetDhcpStateUDP(str, &len); 80388f4: a801 add r0, sp, #4 80388f6: f10d 0103 add.w r1, sp, #3 80388fa: f7ef fb01 bl 8027f00 strcat(buf, "\",\"dhcp\":\""); 80388fe: 4620 mov r0, r4 8038900: 491f ldr r1, [pc, #124] ; (8038980 ) 8038902: f7e9 f963 bl 8021bcc strncat(buf, str, len); 8038906: f89d 2003 ldrb.w r2, [sp, #3] 803890a: a901 add r1, sp, #4 803890c: 4620 mov r0, r4 803890e: f7e9 faff bl 8021f10 GetIpStr(str, &len); 8038912: a801 add r0, sp, #4 8038914: f10d 0103 add.w r1, sp, #3 8038918: f7ef fa9c bl 8027e54 strcat(buf, "\",\"ipaddress\":\""); 803891c: 4620 mov r0, r4 803891e: 4919 ldr r1, [pc, #100] ; (8038984 ) 8038920: f7e9 f954 bl 8021bcc strncat(buf, str, len); 8038924: f89d 2003 ldrb.w r2, [sp, #3] 8038928: a901 add r1, sp, #4 803892a: 4620 mov r0, r4 803892c: f7e9 faf0 bl 8021f10 GetGatewayStr(str, &len); 8038930: a801 add r0, sp, #4 8038932: f10d 0103 add.w r1, sp, #3 8038936: f7ef faa3 bl 8027e80 strcat(buf, "\",\"gateway\":\""); 803893a: 4620 mov r0, r4 803893c: 4912 ldr r1, [pc, #72] ; (8038988 ) 803893e: f7e9 f945 bl 8021bcc strncat(buf, str, len); 8038942: f89d 2003 ldrb.w r2, [sp, #3] 8038946: a901 add r1, sp, #4 8038948: 4620 mov r0, r4 803894a: f7e9 fae1 bl 8021f10 GetMaskStr(str, &len); 803894e: a801 add r0, sp, #4 8038950: f10d 0103 add.w r1, sp, #3 8038954: f7ef faaa bl 8027eac strcat(buf, "\",\"mask\":\""); 8038958: 4620 mov r0, r4 803895a: 490c ldr r1, [pc, #48] ; (803898c ) 803895c: f7e9 f936 bl 8021bcc strncat(buf, str, len); 8038960: a901 add r1, sp, #4 8038962: f89d 2003 ldrb.w r2, [sp, #3] 8038966: 4620 mov r0, r4 8038968: f7e9 fad2 bl 8021f10 strncat(buf, "\"}", 2); 803896c: 4620 mov r0, r4 803896e: 4908 ldr r1, [pc, #32] ; (8038990 ) 8038970: 2202 movs r2, #2 8038972: f7e9 facd bl 8021f10 } 8038976: b01a add sp, #104 ; 0x68 8038978: bd10 pop {r4, pc} 803897a: bf00 nop 803897c: 08045b25 .word 0x08045b25 8038980: 08045b30 .word 0x08045b30 8038984: 08045b3b .word 0x08045b3b 8038988: 08045b4b .word 0x08045b4b 803898c: 08044de6 .word 0x08044de6 8038990: 08044d4f .word 0x08044d4f 08038994 : uint8_t GetUDPParamValue(char *inStr, char *paramName, char *paramValue, uint8_t *paramLen) { 8038994: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8038998: 4690 mov r8, r2 803899a: 461f mov r7, r3 char *beginValue = 0; char *endValue = 0; int len = 0; char *strPtr = 0; strPtr = strstr(inStr, paramName); 803899c: f7e9 fd08 bl 80223b0 if (strPtr != 0) 80389a0: 4605 mov r5, r0 80389a2: b310 cbz r0, 80389ea { beginValue = strpbrk(strPtr,":"); 80389a4: 4912 ldr r1, [pc, #72] ; (80389f0 ) 80389a6: f7e9 fb6d bl 8022084 endValue = strpbrk(strPtr,","); 80389aa: 4912 ldr r1, [pc, #72] ; (80389f4 ) strPtr = strstr(inStr, paramName); if (strPtr != 0) { beginValue = strpbrk(strPtr,":"); 80389ac: 4606 mov r6, r0 endValue = strpbrk(strPtr,","); 80389ae: 4628 mov r0, r5 80389b0: f7e9 fb68 bl 8022084 if (endValue == 0) 80389b4: 4604 mov r4, r0 80389b6: b950 cbnz r0, 80389ce { endValue = strpbrk(strPtr,"}"); 80389b8: 4628 mov r0, r5 80389ba: 490f ldr r1, [pc, #60] ; (80389f8 ) 80389bc: f7e9 fb62 bl 8022084 if (endValue == 0) 80389c0: 4604 mov r4, r0 80389c2: b920 cbnz r0, 80389ce endValue = strpbrk(strPtr," "); 80389c4: 4628 mov r0, r5 80389c6: 490d ldr r1, [pc, #52] ; (80389fc ) 80389c8: f7e9 fb5c bl 8022084 80389cc: 4604 mov r4, r0 } len = endValue - beginValue - 3; 80389ce: 1ba5 subs r5, r4, r6 80389d0: 3d03 subs r5, #3 strncpy(paramValue, beginValue + 2, len); 80389d2: 4640 mov r0, r8 80389d4: 1cb1 adds r1, r6, #2 80389d6: 462a mov r2, r5 80389d8: f7e9 fb22 bl 8022020 *endValue = '0'; 80389dc: 2330 movs r3, #48 ; 0x30 80389de: 7023 strb r3, [r4, #0] *beginValue = '0'; *paramLen = len; return 1; 80389e0: 2001 movs r0, #1 endValue = strpbrk(strPtr," "); } len = endValue - beginValue - 3; strncpy(paramValue, beginValue + 2, len); *endValue = '0'; *beginValue = '0'; 80389e2: 7033 strb r3, [r6, #0] *paramLen = len; 80389e4: 703d strb r5, [r7, #0] return 1; 80389e6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} } else { *paramLen = 0; 80389ea: 7038 strb r0, [r7, #0] return 0; } } 80389ec: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80389f0: 08044e49 .word 0x08044e49 80389f4: 08039b85 .word 0x08039b85 80389f8: 08044d50 .word 0x08044d50 80389fc: 08039ade .word 0x08039ade 08038a00 : void udp_recieve_parser(char *buf, u16_t rcvlen) { 8038a00: b530 push {r4, r5, lr} uint8_t valueLen = 0; 8038a02: 2500 movs r5, #0 return 0; } } void udp_recieve_parser(char *buf, u16_t rcvlen) { 8038a04: b0b5 sub sp, #212 ; 0xd4 8038a06: 4604 mov r4, r0 uint8_t len2 = 0; const uint8_t len = 100; char value[100]; char str[100]; memset(str, 0, 100); 8038a08: 4629 mov r1, r5 8038a0a: 2264 movs r2, #100 ; 0x64 8038a0c: a81b add r0, sp, #108 ; 0x6c } } void udp_recieve_parser(char *buf, u16_t rcvlen) { uint8_t valueLen = 0; 8038a0e: f88d 5006 strb.w r5, [sp, #6] uint8_t len2 = 0; 8038a12: f88d 5007 strb.w r5, [sp, #7] const uint8_t len = 100; char value[100]; char str[100]; memset(str, 0, 100); 8038a16: f7e9 f873 bl 8021b00 // ClearParamString(buf); memset(value, 0, len); 8038a1a: 4629 mov r1, r5 8038a1c: 2264 movs r2, #100 ; 0x64 8038a1e: a802 add r0, sp, #8 8038a20: f7e9 f86e bl 8021b00 memset(str, 0, len); 8038a24: 4629 mov r1, r5 8038a26: 2264 movs r2, #100 ; 0x64 8038a28: a81b add r0, sp, #108 ; 0x6c 8038a2a: f7e9 f869 bl 8021b00 DBG buf[rcvlen]='\0'; DBG printf("Rcvd (%d bytes): \t%s\r\n", rcvlen, buf); GetUDPParamValue(buf, "\"serno\"", value, &valueLen); 8038a2e: f10d 0306 add.w r3, sp, #6 8038a32: 4620 mov r0, r4 8038a34: 493f ldr r1, [pc, #252] ; (8038b34 ) 8038a36: aa02 add r2, sp, #8 8038a38: f7ff ffac bl 8038994 if(valueLen != 0) 8038a3c: f89d 3006 ldrb.w r3, [sp, #6] 8038a40: 2b00 cmp r3, #0 8038a42: d074 beq.n 8038b2e GetSerialNumberStr(str, &len2); 8038a44: a81b add r0, sp, #108 ; 0x6c 8038a46: f10d 0107 add.w r1, sp, #7 8038a4a: f7ef f961 bl 8027d10 else return; if(strncmp(value, str, len2) == 0) 8038a4e: a802 add r0, sp, #8 8038a50: a91b add r1, sp, #108 ; 0x6c 8038a52: f89d 2007 ldrb.w r2, [sp, #7] 8038a56: f7e9 fa8d bl 8021f74 8038a5a: 4605 mov r5, r0 8038a5c: 2800 cmp r0, #0 8038a5e: d166 bne.n 8038b2e { memset(str, 0, len); 8038a60: 4629 mov r1, r5 8038a62: 2264 movs r2, #100 ; 0x64 8038a64: a81b add r0, sp, #108 ; 0x6c 8038a66: f7e9 f84b bl 8021b00 GetUDPParamValue(buf, "\"dhcp\"", str, &valueLen); 8038a6a: f10d 0306 add.w r3, sp, #6 8038a6e: 4932 ldr r1, [pc, #200] ; (8038b38 ) 8038a70: aa1b add r2, sp, #108 ; 0x6c 8038a72: 4620 mov r0, r4 8038a74: f7ff ff8e bl 8038994 // memset(str, 0, len); memset(value, 0, len); 8038a78: 4629 mov r1, r5 8038a7a: 2264 movs r2, #100 ; 0x64 8038a7c: a802 add r0, sp, #8 8038a7e: f7e9 f83f bl 8021b00 GetUDPParamValue(buf, "\"ipaddress\"", value, &valueLen); 8038a82: f10d 0306 add.w r3, sp, #6 8038a86: 4620 mov r0, r4 8038a88: 492c ldr r1, [pc, #176] ; (8038b3c ) 8038a8a: aa02 add r2, sp, #8 8038a8c: f7ff ff82 bl 8038994 if(valueLen != 0) 8038a90: f89d 3006 ldrb.w r3, [sp, #6] 8038a94: b163 cbz r3, 8038ab0 { SetUDPDhcpStateStr(str); 8038a96: a81b add r0, sp, #108 ; 0x6c 8038a98: f7ef fb7a bl 8028190 SetIPStr(value); 8038a9c: a802 add r0, sp, #8 8038a9e: f7ef fb53 bl 8028148 else{ udp_type_message = 1; return; } if (strncmp(str, "True", 4) != 0) // Если dhcp off устанавливаем параметры 8038aa2: a81b add r0, sp, #108 ; 0x6c 8038aa4: 4926 ldr r1, [pc, #152] ; (8038b40 ) 8038aa6: 2204 movs r2, #4 8038aa8: f7e9 fa64 bl 8021f74 8038aac: b920 cbnz r0, 8038ab8 8038aae: e02d b.n 8038b0c { SetUDPDhcpStateStr(str); SetIPStr(value); } else{ udp_type_message = 1; 8038ab0: 4b24 ldr r3, [pc, #144] ; (8038b44 ) 8038ab2: 2201 movs r2, #1 8038ab4: 701a strb r2, [r3, #0] 8038ab6: e03a b.n 8038b2e return; } if (strncmp(str, "True", 4) != 0) // Если dhcp off устанавливаем параметры { memset(value, 0, len); 8038ab8: 4629 mov r1, r5 8038aba: 2264 movs r2, #100 ; 0x64 8038abc: a802 add r0, sp, #8 8038abe: f7e9 f81f bl 8021b00 GetUDPParamValue(buf, "\"gateway\"", value, &valueLen); 8038ac2: f10d 0306 add.w r3, sp, #6 8038ac6: 4620 mov r0, r4 8038ac8: 491f ldr r1, [pc, #124] ; (8038b48 ) 8038aca: aa02 add r2, sp, #8 8038acc: f7ff ff62 bl 8038994 if(valueLen != 0) 8038ad0: f89d 3006 ldrb.w r3, [sp, #6] 8038ad4: b113 cbz r3, 8038adc SetGatewayStr(value); 8038ad6: a802 add r0, sp, #8 8038ad8: f7ef fb3c bl 8028154 memset(value, 0, len); 8038adc: 2100 movs r1, #0 8038ade: 2264 movs r2, #100 ; 0x64 8038ae0: a802 add r0, sp, #8 8038ae2: f7e9 f80d bl 8021b00 GetUDPParamValue(buf, "\"mask\"", value, &valueLen); 8038ae6: f10d 0306 add.w r3, sp, #6 8038aea: 4620 mov r0, r4 8038aec: 4917 ldr r1, [pc, #92] ; (8038b4c ) 8038aee: aa02 add r2, sp, #8 8038af0: f7ff ff50 bl 8038994 if(valueLen != 0) 8038af4: f89d 3006 ldrb.w r3, [sp, #6] 8038af8: b113 cbz r3, 8038b00 SetMaskStr(value); 8038afa: a802 add r0, sp, #8 8038afc: f7ef fb30 bl 8028160 memset(value, 0, len); 8038b00: a802 add r0, sp, #8 8038b02: 2100 movs r1, #0 8038b04: 2264 movs r2, #100 ; 0x64 8038b06: f7e8 fffb bl 8021b00 8038b0a: e002 b.n 8038b12 } else SetUDPDhcpStateStr(str); 8038b0c: a81b add r0, sp, #108 ; 0x6c 8038b0e: f7ef fb3f bl 8028190 // Если параметры WEB изменились выставляем флаг, сохраняем настройки и перезагружаемся if (GetStateWebReinit() == true) 8038b12: f7ff f9af bl 8037e74 8038b16: b150 cbz r0, 8038b2e { // _message_add_to_log("Изменение сетевых настр", "Инфо", "ND"); SetWebReinitFlag(false); 8038b18: 2000 movs r0, #0 8038b1a: f7ef fb09 bl 8028130 SetConfirmWebParamsFlag(); 8038b1e: f7ef fb0d bl 802813c SaveWEBparam(); 8038b22: f7ff f98b bl 8037e3c HTTP_SaveSettings(); 8038b26: f7f5 f949 bl 802ddbc Reboot(); 8038b2a: f7f0 faeb bl 8029104 } } } 8038b2e: b035 add sp, #212 ; 0xd4 8038b30: bd30 pop {r4, r5, pc} 8038b32: bf00 nop 8038b34: 08045b59 .word 0x08045b59 8038b38: 08045b61 .word 0x08045b61 8038b3c: 08045b68 .word 0x08045b68 8038b40: 08040e43 .word 0x08040e43 8038b44: 2000c800 .word 0x2000c800 8038b48: 08045b74 .word 0x08045b74 8038b4c: 08045b7e .word 0x08045b7e 08038b50 : bool http_server_serve(struct netconn *conn) { 8038b50: 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); 8038b52: f44f 737a mov.w r3, #1000 ; 0x3e8 8038b56: 6183 str r3, [r0, #24] res = netconn_recv(conn, &inbuf); 8038b58: a902 add r1, sp, #8 8038b5a: f7f5 fa6d bl 802e038 // DBG printf("recv failed %d\n", res); if (res == ERR_OK) 8038b5e: b978 cbnz r0, 8038b80 { netbuf_data(inbuf, (void**)&buf, &buflen); 8038b60: f10d 0206 add.w r2, sp, #6 8038b64: a903 add r1, sp, #12 8038b66: 9802 ldr r0, [sp, #8] 8038b68: f7f5 ff61 bl 802ea2e udp_recieve_parser(buf, buflen); 8038b6c: 9803 ldr r0, [sp, #12] 8038b6e: f8bd 1006 ldrh.w r1, [sp, #6] 8038b72: f7ff ff45 bl 8038a00 flag = true; netbuf_delete(inbuf); 8038b76: 9802 ldr r0, [sp, #8] 8038b78: f7f5 ff33 bl 802e9e2 if (res == ERR_OK) { netbuf_data(inbuf, (void**)&buf, &buflen); udp_recieve_parser(buf, buflen); flag = true; 8038b7c: 2001 movs r0, #1 8038b7e: e000 b.n 8038b82 { struct netbuf *inbuf; err_t res; char* buf; u16_t buflen; bool flag = false; 8038b80: 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; } 8038b82: b005 add sp, #20 8038b84: bd00 pop {pc} 8038b86: 0000 movs r0, r0 08038b88 : void udp_netsettings_task(void *arg) { 8038b88: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} err_t err; TickType_t timestamp = 0; uint32_t len; vTaskDelay(5000); 8038b8c: f241 3088 movw r0, #5000 ; 0x1388 8038b90: f7f2 fa1c bl 802afcc udp_conn = netconn_new( NETCONN_UDP ); 8038b94: 2100 movs r1, #0 8038b96: 2020 movs r0, #32 8038b98: 460a mov r2, r1 8038b9a: f7f5 f9bf bl 802df1c if (udp_conn != NULL) 8038b9e: 4604 mov r4, r0 8038ba0: 2800 cmp r0, #0 8038ba2: d04a beq.n 8038c3a { err = netconn_bind(udp_conn, IP_ADDR_ANY, UDP_PORT); 8038ba4: 4927 ldr r1, [pc, #156] ; (8038c44 ) 8038ba6: f64b 7299 movw r2, #49049 ; 0xbf99 8038baa: f7f5 f9ed bl 802df88 if (err == ERR_OK) 8038bae: 2800 cmp r0, #0 8038bb0: d140 bne.n 8038c34 for( ;; ) { netconn_connect(udp_conn, IP_ADDR_BROADCAST, UDP_PORT); memset(dataBuf1, 0, DATA_BUF_LEN1); switch(udp_type_message) 8038bb2: 4f25 ldr r7, [pc, #148] ; (8038c48 ) if (udp_conn != NULL) { err = netconn_bind(udp_conn, IP_ADDR_ANY, UDP_PORT); if (err == ERR_OK) 8038bb4: 4606 mov r6, r0 { for( ;; ) { netconn_connect(udp_conn, IP_ADDR_BROADCAST, UDP_PORT); 8038bb6: 4925 ldr r1, [pc, #148] ; (8038c4c ) 8038bb8: f64b 7299 movw r2, #49049 ; 0xbf99 8038bbc: 4620 mov r0, r4 8038bbe: f7f5 fa01 bl 802dfc4 memset(dataBuf1, 0, DATA_BUF_LEN1); 8038bc2: 4823 ldr r0, [pc, #140] ; (8038c50 ) 8038bc4: 2100 movs r1, #0 8038bc6: 22ff movs r2, #255 ; 0xff 8038bc8: f7e8 ff9a bl 8021b00 switch(udp_type_message) 8038bcc: 783b ldrb r3, [r7, #0] 8038bce: b113 cbz r3, 8038bd6 8038bd0: 2b01 cmp r3, #1 8038bd2: d112 bne.n 8038bfa 8038bd4: e00c b.n 8038bf0 { case 0: if (timestamp + SEND_TIMEOUT < xTaskGetTickCount()) { 8038bd6: f7f2 f8c7 bl 802ad68 8038bda: f506 63fa add.w r3, r6, #2000 ; 0x7d0 8038bde: 4283 cmp r3, r0 8038be0: d20b bcs.n 8038bfa udp_message(dataBuf1); 8038be2: 481b ldr r0, [pc, #108] ; (8038c50 ) 8038be4: f7ff fe10 bl 8038808 timestamp = xTaskGetTickCount(); 8038be8: f7f2 f8be bl 802ad68 8038bec: 4606 mov r6, r0 8038bee: e004 b.n 8038bfa } break; case 1: udp_message_netSettings(dataBuf1); 8038bf0: 4817 ldr r0, [pc, #92] ; (8038c50 ) 8038bf2: f7ff fe6d bl 80388d0 udp_type_message = 0; 8038bf6: 2300 movs r3, #0 8038bf8: 703b strb r3, [r7, #0] break; default: break; } len = strlen(dataBuf1); 8038bfa: 4815 ldr r0, [pc, #84] ; (8038c50 ) 8038bfc: f7e9 f958 bl 8021eb0 if (len > 0) { 8038c00: 4605 mov r5, r0 8038c02: b180 cbz r0, 8038c26 buf_snd = netbuf_new(); 8038c04: f7f5 fee2 bl 802e9cc data_snd = netbuf_alloc(buf_snd,len); 8038c08: b2a9 uxth r1, r5 } len = strlen(dataBuf1); if (len > 0) { buf_snd = netbuf_new(); 8038c0a: 4680 mov r8, r0 data_snd = netbuf_alloc(buf_snd,len); 8038c0c: f7f5 fefa bl 802ea04 memcpy(data_snd, dataBuf1, len); 8038c10: 490f ldr r1, [pc, #60] ; (8038c50 ) 8038c12: 462a mov r2, r5 8038c14: f7e8 feba bl 802198c netconn_send(udp_conn, buf_snd); 8038c18: 4620 mov r0, r4 8038c1a: 4641 mov r1, r8 8038c1c: f7f5 fa46 bl 802e0ac netbuf_delete(buf_snd); 8038c20: 4640 mov r0, r8 8038c22: f7f5 fede bl 802e9e2 DBG printf("\r\nSent (%u bytes): \t%s\r\n", (unsigned int)len, dataBuf1); } netconn_disconnect(udp_conn); 8038c26: 4620 mov r0, r4 8038c28: f7f5 f9ea bl 802e000 /* TODO remove if tested */ //if(http_server_serve(udp_conn)) //vTaskDelay(1000); http_server_serve(udp_conn); 8038c2c: 4620 mov r0, r4 8038c2e: f7ff ff8f bl 8038b50 } 8038c32: e7c0 b.n 8038bb6 } else { netconn_delete(udp_conn); 8038c34: 4620 mov r0, r4 8038c36: f7f5 f995 bl 802df64 else DBG printf("udp_netsettings_task: can't create new UDP netconn\r\n"); for( ;; ) { vTaskDelay(10000); 8038c3a: f242 7010 movw r0, #10000 ; 0x2710 8038c3e: f7f2 f9c5 bl 802afcc 8038c42: e7fa b.n 8038c3a 8038c44: 08045008 .word 0x08045008 8038c48: 2000c800 .word 0x2000c800 8038c4c: 08045004 .word 0x08045004 8038c50: 2000fb64 .word 0x2000fb64 08038c54 : } } void UDP_netsetting_init() { 8038c54: b51f push {r0, r1, r2, r3, r4, lr} xTaskCreate(udp_netsettings_task, ( char * ) "udp_netsettings_task", 4*configMINIMAL_STACK_SIZE , NULL, tskIDLE_PRIORITY, NULL); 8038c56: 2300 movs r3, #0 8038c58: 9300 str r3, [sp, #0] 8038c5a: 9301 str r3, [sp, #4] 8038c5c: 9302 str r3, [sp, #8] 8038c5e: 9303 str r3, [sp, #12] 8038c60: 4903 ldr r1, [pc, #12] ; (8038c70 ) 8038c62: 4804 ldr r0, [pc, #16] ; (8038c74 ) 8038c64: f44f 7200 mov.w r2, #512 ; 0x200 8038c68: f7f1 ff16 bl 802aa98 } 8038c6c: b005 add sp, #20 8038c6e: bd00 pop {pc} 8038c70: 08045b85 .word 0x08045b85 8038c74: 08038b89 .word 0x08038b89 08038c78 : * @brief ETH_BSP_Config * @param None * @retval None */ void ETH_BSP_Config(void) { 8038c78: 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 8038c7a: 2007 movs r0, #7 * @brief ETH_BSP_Config * @param None * @retval None */ void ETH_BSP_Config(void) { 8038c7c: b0b4 sub sp, #208 ; 0xd0 { volatile uint32_t i; GPIO_InitTypeDef GPIO_InitStructure; /* Enable GPIOs clocks */ RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB 8038c7e: 2101 movs r1, #1 8038c80: f7ec fd64 bl 802574c | RCC_AHB1Periph_GPIOC, ENABLE); /* Enable SYSCFG clock */ RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE); 8038c84: 2101 movs r1, #1 8038c86: f44f 4080 mov.w r0, #16384 ; 0x4000 8038c8a: f7ec fd83 bl 8025794 /* MII/RMII Media interface selection --------------------------------------*/ SYSCFG_ETH_MediaInterfaceConfig(SYSCFG_ETH_MediaInterface_RMII); 8038c8e: 2001 movs r0, #1 8038c90: f7ec ff74 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; 8038c94: 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; 8038c96: 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; 8038c98: 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; 8038c9a: 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); 8038c9c: 4864 ldr r0, [pc, #400] ; (8038e30 ) */ /* 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; 8038c9e: 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; 8038ca2: 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); 8038ca4: 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; 8038ca6: f88d 3011 strb.w r3, [sp, #17] GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; 8038caa: f88d 4012 strb.w r4, [sp, #18] GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ; 8038cae: f88d 4013 strb.w r4, [sp, #19] GPIO_Init(GPIOA, &GPIO_InitStructure); 8038cb2: f7ec fc6b bl 802558c GPIO_PinAFConfig(GPIOA, GPIO_PinSource1, GPIO_AF_ETH); 8038cb6: 2101 movs r1, #1 8038cb8: 220b movs r2, #11 8038cba: 485d ldr r0, [pc, #372] ; (8038e30 ) 8038cbc: f7ec fcaf bl 802561e GPIO_PinAFConfig(GPIOA, GPIO_PinSource2, GPIO_AF_ETH); 8038cc0: 220b movs r2, #11 8038cc2: 485b ldr r0, [pc, #364] ; (8038e30 ) 8038cc4: 4629 mov r1, r5 8038cc6: f7ec fcaa bl 802561e GPIO_PinAFConfig(GPIOA, GPIO_PinSource7, GPIO_AF_ETH); 8038cca: 220b movs r2, #11 8038ccc: 2107 movs r1, #7 8038cce: 4858 ldr r0, [pc, #352] ; (8038e30 ) 8038cd0: f7ec fca5 bl 802561e /* Configure PB10,PB11,PB12 and PB13 */ GPIO_InitStructure.GPIO_Pin = /* GPIO_Pin_10 | */ GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_13; 8038cd4: f44f 5360 mov.w r3, #14336 ; 0x3800 GPIO_Init(GPIOB, &GPIO_InitStructure); 8038cd8: 4856 ldr r0, [pc, #344] ; (8038e34 ) 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; 8038cda: 9303 str r3, [sp, #12] GPIO_Init(GPIOB, &GPIO_InitStructure); 8038cdc: a903 add r1, sp, #12 8038cde: f7ec fc55 bl 802558c //GPIO_PinAFConfig(GPIOB, GPIO_PinSource10, GPIO_AF_ETH); GPIO_PinAFConfig(GPIOB, GPIO_PinSource11, GPIO_AF_ETH); 8038ce2: 210b movs r1, #11 8038ce4: 460a mov r2, r1 8038ce6: 4853 ldr r0, [pc, #332] ; (8038e34 ) 8038ce8: f7ec fc99 bl 802561e GPIO_PinAFConfig(GPIOB, GPIO_PinSource12, GPIO_AF_ETH); 8038cec: 210c movs r1, #12 8038cee: 220b movs r2, #11 8038cf0: 4850 ldr r0, [pc, #320] ; (8038e34 ) 8038cf2: f7ec fc94 bl 802561e GPIO_PinAFConfig(GPIOB, GPIO_PinSource13, GPIO_AF_ETH); 8038cf6: 220b movs r2, #11 8038cf8: 210d movs r1, #13 8038cfa: 484e ldr r0, [pc, #312] ; (8038e34 ) 8038cfc: f7ec fc8f bl 802561e /* Configure PC1, PC4 and PC5 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_4 | GPIO_Pin_5; 8038d00: 2332 movs r3, #50 ; 0x32 GPIO_Init(GPIOC, &GPIO_InitStructure); 8038d02: 484d ldr r0, [pc, #308] ; (8038e38 ) 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; 8038d04: 9303 str r3, [sp, #12] GPIO_Init(GPIOC, &GPIO_InitStructure); 8038d06: a903 add r1, sp, #12 8038d08: f7ec fc40 bl 802558c GPIO_PinAFConfig(GPIOC, GPIO_PinSource1, GPIO_AF_ETH); 8038d0c: 484a ldr r0, [pc, #296] ; (8038e38 ) 8038d0e: 2101 movs r1, #1 8038d10: 220b movs r2, #11 8038d12: f7ec fc84 bl 802561e GPIO_PinAFConfig(GPIOC, GPIO_PinSource4, GPIO_AF_ETH); 8038d16: 4848 ldr r0, [pc, #288] ; (8038e38 ) 8038d18: 2104 movs r1, #4 8038d1a: 220b movs r2, #11 8038d1c: f7ec fc7f bl 802561e GPIO_PinAFConfig(GPIOC, GPIO_PinSource5, GPIO_AF_ETH); 8038d20: 220b movs r2, #11 8038d22: 4845 ldr r0, [pc, #276] ; (8038e38 ) 8038d24: 2105 movs r1, #5 8038d26: f7ec fc7a bl 802561e /* Configure the PHY RST pin */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13; 8038d2a: f44f 5600 mov.w r6, #8192 ; 0x2000 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; 8038d2e: 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); 8038d30: 4842 ldr r0, [pc, #264] ; (8038e3c ) 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; 8038d32: 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); 8038d36: 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; 8038d38: 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; 8038d3c: 9603 str r6, [sp, #12] GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; 8038d3e: f88d 4012 strb.w r4, [sp, #18] GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; 8038d42: f88d 5011 strb.w r5, [sp, #17] GPIO_Init(GPIOE, &GPIO_InitStructure); 8038d46: f7ec fc21 bl 802558c GPIO_ResetBits(GPIOE, GPIO_Pin_13); 8038d4a: 483c ldr r0, [pc, #240] ; (8038e3c ) 8038d4c: 4631 mov r1, r6 8038d4e: f7ec fc64 bl 802561a for (i = 0; i < 20000; i++); 8038d52: 9401 str r4, [sp, #4] 8038d54: f644 631f movw r3, #19999 ; 0x4e1f 8038d58: e002 b.n 8038d60 8038d5a: 9a01 ldr r2, [sp, #4] 8038d5c: 3201 adds r2, #1 8038d5e: 9201 str r2, [sp, #4] 8038d60: 9a01 ldr r2, [sp, #4] 8038d62: 429a cmp r2, r3 8038d64: d9f9 bls.n 8038d5a GPIO_SetBits(GPIOE, GPIO_Pin_13); 8038d66: 4835 ldr r0, [pc, #212] ; (8038e3c ) 8038d68: f44f 5100 mov.w r1, #8192 ; 0x2000 8038d6c: f7ec fc53 bl 8025616 for (i = 0; i < 20000; i++); 8038d70: 2300 movs r3, #0 8038d72: 9301 str r3, [sp, #4] 8038d74: f644 631f movw r3, #19999 ; 0x4e1f 8038d78: e002 b.n 8038d80 8038d7a: 9a01 ldr r2, [sp, #4] 8038d7c: 3201 adds r2, #1 8038d7e: 9201 str r2, [sp, #4] 8038d80: 9a01 ldr r2, [sp, #4] 8038d82: 429a cmp r2, r3 8038d84: d9f9 bls.n 8038d7a static void ETH_MACDMA_Config(void) { ETH_InitTypeDef ETH_InitStructure; /* Enable ETHERNET clock */ RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_ETH_MAC | RCC_AHB1Periph_ETH_MAC_Tx | 8038d86: f04f 6060 mov.w r0, #234881024 ; 0xe000000 8038d8a: 2101 movs r1, #1 8038d8c: f7ec fcde bl 802574c RCC_AHB1Periph_ETH_MAC_Rx, ENABLE); /* Reset ETHERNET on AHB Bus */ ETH_DeInit(); 8038d90: f000 f868 bl 8038e64 /* Software reset */ ETH_SoftwareReset(); 8038d94: f000 f9fe bl 8039194 /* Wait for software reset */ while (ETH_GetSoftwareResetStatus() == SET); 8038d98: f000 fa04 bl 80391a4 8038d9c: 2801 cmp r0, #1 8038d9e: d0fb beq.n 8038d98 /* ETHERNET Configuration --------------------------------------------------*/ /* Call ETH_StructInit if you don't like to configure all ETH_InitStructure parameter */ ETH_StructInit(Ð_InitStructure); 8038da0: a805 add r0, sp, #20 8038da2: f000 f86c bl 8038e7e //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; 8038da6: f44f 7300 mov.w r3, #512 ; 0x200 8038daa: 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; 8038dac: f04f 7300 mov.w r3, #33554432 ; 0x2000000 8038db0: 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; 8038db2: 932e str r3, [sp, #184] ; 0xb8 ETH_InitStructure.ETH_FixedBurst = ETH_FixedBurst_Enable; 8038db4: f44f 3380 mov.w r3, #65536 ; 0x10000 8038db8: 932f str r3, [sp, #188] ; 0xbc ETH_InitStructure.ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; 8038dba: 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; 8038dbe: 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; 8038dc0: 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; 8038dc4: 9330 str r3, [sp, #192] ; 0xc0 ETH_InitStructure.ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; 8038dc6: 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; 8038dca: 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; 8038dcc: 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; 8038dce: 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; 8038dd0: 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; 8038dd2: f44f 4380 mov.w r3, #16384 ; 0x4000 /* Configure Ethernet */ EthInitStatus = ETH_Init(Ð_InitStructure, LAN8720_PHY_ADDRESS); 8038dd6: 4629 mov r1, r5 8038dd8: 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; 8038dda: 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; 8038ddc: 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; 8038dde: 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; 8038de0: 940c str r4, [sp, #48] ; 0x30 ETH_InitStructure.ETH_RetryTransmission = ETH_RetryTransmission_Disable; ETH_InitStructure.ETH_AutomaticPadCRCStrip = ETH_AutomaticPadCRCStrip_Disable; 8038de2: 9410 str r4, [sp, #64] ; 0x40 ETH_InitStructure.ETH_ReceiveAll = ETH_ReceiveAll_Disable; 8038de4: 9413 str r4, [sp, #76] ; 0x4c ETH_InitStructure.ETH_BroadcastFramesReception = ETH_BroadcastFramesReception_Enable; 8038de6: 9416 str r4, [sp, #88] ; 0x58 ETH_InitStructure.ETH_PromiscuousMode = ETH_PromiscuousMode_Disable; 8038de8: 9418 str r4, [sp, #96] ; 0x60 ETH_InitStructure.ETH_MulticastFramesFilter = ETH_MulticastFramesFilter_Perfect; 8038dea: 9419 str r4, [sp, #100] ; 0x64 ETH_InitStructure.ETH_UnicastFramesFilter = ETH_UnicastFramesFilter_Perfect; 8038dec: 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; 8038dee: 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; 8038df0: 942a str r4, [sp, #168] ; 0xa8 ETH_InitStructure.ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; 8038df2: 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); 8038df4: f000 fa80 bl 80392f8 8038df8: 4e11 ldr r6, [pc, #68] ; (8038e40 ) /* Enable the Ethernet Rx Interrupt */ ETH_DMAITConfig(ETH_DMA_IT_NIS | ETH_DMA_IT_R, ENABLE); 8038dfa: 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); 8038dfc: 6030 str r0, [r6, #0] /* Enable the Ethernet Rx Interrupt */ ETH_DMAITConfig(ETH_DMA_IT_NIS | ETH_DMA_IT_R, ENABLE); 8038dfe: 4811 ldr r0, [pc, #68] ; (8038e44 ) 8038e00: f000 f9e2 bl 80391c8 void ETH_NVIC_Config(void) { NVIC_InitTypeDef NVIC_InitStructure; /* 2 bit for pre-emption priority, 2 bits for subpriority */ NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); 8038e04: f44f 7040 mov.w r0, #768 ; 0x300 8038e08: f7ec fa40 bl 802528c /* Enable the Ethernet global Interrupt */ NVIC_InitStructure.NVIC_IRQChannel = ETH_IRQn; 8038e0c: 233d movs r3, #61 ; 0x3d 8038e0e: 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); 8038e12: 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; 8038e14: 2305 movs r3, #5 8038e16: f88d 3009 strb.w r3, [sp, #9] NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; 8038e1a: f88d 400a strb.w r4, [sp, #10] NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; 8038e1e: f88d 500b strb.w r5, [sp, #11] NVIC_Init(&NVIC_InitStructure); 8038e22: f7ec fa3d bl 80252a0 ETH_MACDMA_Config(); /* Config NVIC for Ethernet */ ETH_NVIC_Config(); if (EthInitStatus == 0) { 8038e26: 6833 ldr r3, [r6, #0] 8038e28: b903 cbnz r3, 8038e2c 8038e2a: e7fe b.n 8038e2a // LCD_DisplayStringLine(Line5, (uint8_t*)" Ethernet Init "); // LCD_DisplayStringLine(Line6, (uint8_t*)" failed "); // STM_EVAL_LEDOn(LED5); while(1); } } 8038e2c: b034 add sp, #208 ; 0xd0 8038e2e: bd70 pop {r4, r5, r6, pc} 8038e30: 40020000 .word 0x40020000 8038e34: 40020400 .word 0x40020400 8038e38: 40020800 .word 0x40020800 8038e3c: 40021000 .word 0x40021000 8038e40: 2000c804 .word 0x2000c804 8038e44: 00010040 .word 0x00010040 08038e48 : * @brief Inserts a delay time. * @param nCount: specifies the delay time length. * @retval None */ static void ETH_Delay(__IO uint32_t nCount) { 8038e48: b084 sub sp, #16 __IO uint32_t index = 0; 8038e4a: 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) { 8038e4c: 9001 str r0, [sp, #4] __IO uint32_t index = 0; 8038e4e: 9303 str r3, [sp, #12] for(index = nCount; index != 0; index--) 8038e50: 9b01 ldr r3, [sp, #4] 8038e52: e001 b.n 8038e58 8038e54: 9b03 ldr r3, [sp, #12] 8038e56: 3b01 subs r3, #1 8038e58: 9303 str r3, [sp, #12] 8038e5a: 9b03 ldr r3, [sp, #12] 8038e5c: 2b00 cmp r3, #0 8038e5e: d1f9 bne.n 8038e54 { } } 8038e60: b004 add sp, #16 8038e62: 4770 bx lr 08038e64 : * @brief Deinitializes the ETHERNET peripheral registers to their default reset values. * @param None * @retval None */ void ETH_DeInit(void) { 8038e64: b508 push {r3, lr} RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_ETH_MAC, ENABLE); 8038e66: 2101 movs r1, #1 8038e68: f04f 7000 mov.w r0, #33554432 ; 0x2000000 8038e6c: f7ec fc9e bl 80257ac RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_ETH_MAC, DISABLE); 8038e70: f04f 7000 mov.w r0, #33554432 ; 0x2000000 8038e74: 2100 movs r1, #0 } 8038e76: 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); 8038e7a: f7ec bc97 b.w 80257ac 08038e7e : /* 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; 8038e7e: f44f 4280 mov.w r2, #16384 ; 0x4000 8038e82: 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; 8038e84: f44f 6200 mov.w r2, #2048 ; 0x800 8038e88: 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; 8038e8a: 2240 movs r2, #64 ; 0x40 8038e8c: 6402 str r2, [r0, #64] ; 0x40 /* Disable reception of Broadcast frames */ ETH_InitStruct->ETH_BroadcastFramesReception = ETH_BroadcastFramesReception_Disable; 8038e8e: 2220 movs r2, #32 8038e90: 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; 8038e92: 2280 movs r2, #128 ; 0x80 { /* ETH_InitStruct members default value */ /*------------------------ MAC Configuration ---------------------------*/ /* PHY Auto-negotiation enabled */ ETH_InitStruct->ETH_AutoNegotiation = ETH_AutoNegotiation_Enable; 8038e94: 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; 8038e96: 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; 8038e98: 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; 8038e9c: 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; 8038e9e: 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; 8038ea2: 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; 8038ea4: 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; 8038ea8: 6043 str r3, [r0, #4] /* MAC Jabber enabled in Half-duplex mode */ ETH_InitStruct->ETH_Jabber = ETH_Jabber_Enable; 8038eaa: 6083 str r3, [r0, #8] /* Ethernet interframe gap set to 96 bits */ ETH_InitStruct->ETH_InterFrameGap = ETH_InterFrameGap_96Bit; 8038eac: 60c3 str r3, [r0, #12] /* Carrier Sense Enabled in Half-Duplex mode */ ETH_InitStruct->ETH_CarrierSense = ETH_CarrierSense_Enable; 8038eae: 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; 8038eb0: 6183 str r3, [r0, #24] /* MAC MII loopback disabled */ ETH_InitStruct->ETH_LoopbackMode = ETH_LoopbackMode_Disable; 8038eb2: 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; 8038eb4: 6243 str r3, [r0, #36] ; 0x24 /* Retry Transmission enabled for half-duplex mode */ ETH_InitStruct->ETH_RetryTransmission = ETH_RetryTransmission_Enable; 8038eb6: 6283 str r3, [r0, #40] ; 0x28 /* Automatic PAD/CRC strip disabled*/ ETH_InitStruct->ETH_AutomaticPadCRCStrip = ETH_AutomaticPadCRCStrip_Disable; 8038eb8: 62c3 str r3, [r0, #44] ; 0x2c /* half-duplex mode retransmission Backoff time_limit = 10 slot times*/ ETH_InitStruct->ETH_BackOffLimit = ETH_BackOffLimit_10; 8038eba: 6303 str r3, [r0, #48] ; 0x30 /* half-duplex mode Deferral check disabled */ ETH_InitStruct->ETH_DeferralCheck = ETH_DeferralCheck_Disable; 8038ebc: 6343 str r3, [r0, #52] ; 0x34 /* Receive all frames disabled */ ETH_InitStruct->ETH_ReceiveAll = ETH_ReceiveAll_Disable; 8038ebe: 6383 str r3, [r0, #56] ; 0x38 /* Source address filtering (on the optional MAC addresses) disabled */ ETH_InitStruct->ETH_SourceAddrFilter = ETH_SourceAddrFilter_Disable; 8038ec0: 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; 8038ec2: 6483 str r3, [r0, #72] ; 0x48 /* Promiscuous address filtering mode disabled */ ETH_InitStruct->ETH_PromiscuousMode = ETH_PromiscuousMode_Disable; 8038ec4: 64c3 str r3, [r0, #76] ; 0x4c /* Perfect address filtering for multicast addresses */ ETH_InitStruct->ETH_MulticastFramesFilter = ETH_MulticastFramesFilter_Perfect; 8038ec6: 6503 str r3, [r0, #80] ; 0x50 /* Perfect address filtering for unicast addresses */ ETH_InitStruct->ETH_UnicastFramesFilter = ETH_UnicastFramesFilter_Perfect; 8038ec8: 6543 str r3, [r0, #84] ; 0x54 /* Initialize hash table high and low regs */ ETH_InitStruct->ETH_HashTableHigh = 0x0; 8038eca: 6583 str r3, [r0, #88] ; 0x58 ETH_InitStruct->ETH_HashTableLow = 0x0; 8038ecc: 65c3 str r3, [r0, #92] ; 0x5c /* Flow control config (flow control disabled)*/ ETH_InitStruct->ETH_PauseTime = 0x0; 8038ece: 6603 str r3, [r0, #96] ; 0x60 ETH_InitStruct->ETH_ZeroQuantaPause = ETH_ZeroQuantaPause_Disable; ETH_InitStruct->ETH_PauseLowThreshold = ETH_PauseLowThreshold_Minus4; 8038ed0: 6683 str r3, [r0, #104] ; 0x68 ETH_InitStruct->ETH_UnicastPauseFrameDetect = ETH_UnicastPauseFrameDetect_Disable; 8038ed2: 66c3 str r3, [r0, #108] ; 0x6c ETH_InitStruct->ETH_ReceiveFlowControl = ETH_ReceiveFlowControl_Disable; 8038ed4: 6703 str r3, [r0, #112] ; 0x70 ETH_InitStruct->ETH_TransmitFlowControl = ETH_TransmitFlowControl_Disable; 8038ed6: 6743 str r3, [r0, #116] ; 0x74 /* VLANtag config (VLAN field not checked) */ ETH_InitStruct->ETH_VLANTagComparison = ETH_VLANTagComparison_16Bit; 8038ed8: 6783 str r3, [r0, #120] ; 0x78 ETH_InitStruct->ETH_VLANTagIdentifier = 0x0; 8038eda: 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; 8038edc: 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; 8038ee0: 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; 8038ee4: f44f 3280 mov.w r2, #65536 ; 0x10000 8038ee8: 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; 8038eec: 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; 8038ef0: 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; 8038ef4: f8c0 20ac str.w r2, [r0, #172] ; 0xac ETH_InitStruct->ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; 8038ef8: 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; 8038efc: f8c0 3088 str.w r3, [r0, #136] ; 0x88 /* Store and forward mode enabled for transmit */ ETH_InitStruct->ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable; 8038f00: 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; 8038f04: f8c0 3090 str.w r3, [r0, #144] ; 0x90 /* Disable forwarding frames with errors (short frames, CRC,...)*/ ETH_InitStruct->ETH_ForwardErrorFrames = ETH_ForwardErrorFrames_Disable; 8038f08: f8c0 3094 str.w r3, [r0, #148] ; 0x94 /* Disable undersized good frames */ ETH_InitStruct->ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; 8038f0c: 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; 8038f10: 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; 8038f14: 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; 8038f18: f8c0 20b0 str.w r2, [r0, #176] ; 0xb0 /* DMA Ring mode skip length = 0 */ ETH_InitStruct->ETH_DescriptorSkipLength = 0x0; 8038f1c: 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; 8038f20: f8c0 30b8 str.w r3, [r0, #184] ; 0xb8 8038f24: 4770 bx lr 8038f26: 0000 movs r0, r0 08038f28 : * @param NewState: new state of the MAC transmission. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_MACTransmissionCmd(FunctionalState NewState) { 8038f28: 4b04 ldr r3, [pc, #16] ; (8038f3c ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the MAC transmission */ ETH->MACCR |= ETH_MACCR_TE; 8038f2a: 681a ldr r2, [r3, #0] void ETH_MACTransmissionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8038f2c: b110 cbz r0, 8038f34 { /* Enable the MAC transmission */ ETH->MACCR |= ETH_MACCR_TE; 8038f2e: f042 0208 orr.w r2, r2, #8 8038f32: e001 b.n 8038f38 } else { /* Disable the MAC transmission */ ETH->MACCR &= ~ETH_MACCR_TE; 8038f34: f022 0208 bic.w r2, r2, #8 8038f38: 601a str r2, [r3, #0] 8038f3a: 4770 bx lr 8038f3c: 40028000 .word 0x40028000 08038f40 : * @param NewState: new state of the MAC reception. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_MACReceptionCmd(FunctionalState NewState) { 8038f40: 4b04 ldr r3, [pc, #16] ; (8038f54 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the MAC reception */ ETH->MACCR |= ETH_MACCR_RE; 8038f42: 681a ldr r2, [r3, #0] void ETH_MACReceptionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8038f44: b110 cbz r0, 8038f4c { /* Enable the MAC reception */ ETH->MACCR |= ETH_MACCR_RE; 8038f46: f042 0204 orr.w r2, r2, #4 8038f4a: e001 b.n 8038f50 } else { /* Disable the MAC reception */ ETH->MACCR &= ~ETH_MACCR_RE; 8038f4c: f022 0204 bic.w r2, r2, #4 8038f50: 601a str r2, [r3, #0] 8038f52: 4770 bx lr 8038f54: 40028000 .word 0x40028000 08038f58 : 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]; 8038f58: 790b ldrb r3, [r1, #4] 8038f5a: 794a ldrb r2, [r1, #5] 8038f5c: 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; 8038f60: 4b07 ldr r3, [pc, #28] ; (8038f80 ) 8038f62: 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]; 8038f64: 788a ldrb r2, [r1, #2] 8038f66: 78cb ldrb r3, [r1, #3] 8038f68: 0412 lsls r2, r2, #16 8038f6a: ea42 6203 orr.w r2, r2, r3, lsl #24 8038f6e: 780b ldrb r3, [r1, #0] 8038f70: 431a orrs r2, r3 8038f72: 784b ldrb r3, [r1, #1] 8038f74: 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; 8038f78: 4b02 ldr r3, [pc, #8] ; (8038f84 ) 8038f7a: 50c2 str r2, [r0, r3] 8038f7c: 4770 bx lr 8038f7e: bf00 nop 8038f80: 40028040 .word 0x40028040 8038f84: 40028044 .word 0x40028044 08038f88 : * the receive frame (should be used with interrupt mode only) * @param None * @retval Structure of type FrameTypeDef */ FrameTypeDef ETH_Get_Received_Frame_interrupt(void) { 8038f88: b537 push {r0, r1, r2, r4, r5, lr} FrameTypeDef frame={0,0,0}; __IO uint32_t descriptor_scan_counter = 0; 8038f8a: 2300 movs r3, #0 8038f8c: 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; 8038f8e: 4b24 ldr r3, [pc, #144] ; (8039020 ) 8038f90: 681a ldr r2, [r3, #0] 8038f92: 4b24 ldr r3, [pc, #144] ; (8039024 ) DMA_RX_FRAME_infos->Seg_Count = 1; 8038f94: 2401 movs r4, #1 8038f96: 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)&& 8038f98: e033 b.n 8039002 (descriptor_scan_counterStatus & ETH_DMARxDesc_FS) != (uint32_t)RESET)&& 8038fa0: 6819 ldr r1, [r3, #0] 8038fa2: 0589 lsls r1, r1, #22 8038fa4: d505 bpl.n 8038fb2 ((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)) 8038fa6: 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)&& 8038fa8: 05c9 lsls r1, r1, #23 8038faa: d402 bmi.n 8038fb2 ((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)) { DMA_RX_FRAME_infos->FS_Rx_Desc = DMARxDescToGet; 8038fac: 6013 str r3, [r2, #0] DMA_RX_FRAME_infos->Seg_Count = 1; 8038fae: 6094 str r4, [r2, #8] 8038fb0: e009 b.n 8038fc6 DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); } /* check if intermediate segment */ else if (((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)&& 8038fb2: 6819 ldr r1, [r3, #0] 8038fb4: 05c9 lsls r1, r1, #23 8038fb6: d408 bmi.n 8038fca ((DMARxDescToGet->Status & ETH_DMARxDesc_FS) == (uint32_t)RESET)) 8038fb8: 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)&& 8038fba: 0589 lsls r1, r1, #22 8038fbc: d500 bpl.n 8038fc0 8038fbe: e004 b.n 8038fca ((DMARxDescToGet->Status & ETH_DMARxDesc_FS) == (uint32_t)RESET)) { (DMA_RX_FRAME_infos->Seg_Count) ++; 8038fc0: 6891 ldr r1, [r2, #8] 8038fc2: 3101 adds r1, #1 8038fc4: 6091 str r1, [r2, #8] DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); 8038fc6: 68db ldr r3, [r3, #12] 8038fc8: e01b b.n 8039002 8038fca: 4a16 ldr r2, [pc, #88] ; (8039024 ) 8038fcc: 6013 str r3, [r2, #0] /* should be last segment */ else { /* last segment */ DMA_RX_FRAME_infos->LS_Rx_Desc = DMARxDescToGet; 8038fce: 4a14 ldr r2, [pc, #80] ; (8039020 ) 8038fd0: 6812 ldr r2, [r2, #0] 8038fd2: 6053 str r3, [r2, #4] (DMA_RX_FRAME_infos->Seg_Count)++; 8038fd4: 6891 ldr r1, [r2, #8] 8038fd6: 3101 adds r1, #1 8038fd8: 6091 str r1, [r2, #8] /* first segment is last segment */ if ((DMA_RX_FRAME_infos->Seg_Count)==1) 8038fda: 6891 ldr r1, [r2, #8] 8038fdc: 2901 cmp r1, #1 DMA_RX_FRAME_infos->FS_Rx_Desc = DMARxDescToGet; 8038fde: bf08 it eq 8038fe0: 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; 8038fe2: 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) 8038fe4: 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; 8038fe6: f3c1 410d ubfx r1, r1, #16, #14 8038fea: 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) 8038fec: 2c01 cmp r4, #1 { frame.buffer =(DMA_RX_FRAME_infos->FS_Rx_Desc)->Buffer1Addr; 8038fee: bf8a itet hi 8038ff0: 6812 ldrhi r2, [r2, #0] } else { frame.buffer = DMARxDescToGet->Buffer1Addr; 8038ff2: 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; 8038ff4: 6892 ldrhi r2, [r2, #8] } frame.descriptor = DMARxDescToGet; /* Update the ETHERNET DMA global Rx descriptor with next Rx descriptor */ DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); 8038ff6: 4c0b ldr r4, [pc, #44] ; (8039024 ) 8038ff8: 68dd ldr r5, [r3, #12] /* Return Frame */ return (frame); 8038ffa: 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); 8038ffe: 6025 str r5, [r4, #0] 8039000: e007 b.n 8039012 { 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)&& 8039002: 6819 ldr r1, [r3, #0] 8039004: 2900 cmp r1, #0 8039006: da06 bge.n 8039016 8039008: 4a06 ldr r2, [pc, #24] ; (8039024 ) 803900a: 6013 str r3, [r2, #0] /* Return Frame */ return (frame); } } return (frame); 803900c: 2300 movs r3, #0 803900e: 6003 str r3, [r0, #0] 8039010: 6043 str r3, [r0, #4] 8039012: 6083 str r3, [r0, #8] 8039014: e003 b.n 803901e 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)&& 8039018: 2904 cmp r1, #4 803901a: d9be bls.n 8038f9a 803901c: e7f4 b.n 8039008 /* Return Frame */ return (frame); } } return (frame); } 803901e: bd3e pop {r1, r2, r3, r4, r5, pc} 8039020: 20011ae0 .word 0x20011ae0 8039024: 2000fc70 .word 0x2000fc70 08039028 : { 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) 8039028: 4b29 ldr r3, [pc, #164] ; (80390d0 ) 803902a: 681b ldr r3, [r3, #0] 803902c: 681a ldr r2, [r3, #0] 803902e: 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) { 8039030: 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) 8039032: db48 blt.n 80390c6 return ETH_ERROR; } DMATxNextDesc = DMATxDescToSet; if (FrameLength > ETH_TX_BUF_SIZE) 8039034: f240 52f4 movw r2, #1524 ; 0x5f4 8039038: 4290 cmp r0, r2 803903a: d917 bls.n 803906c { buf_count = FrameLength/ETH_TX_BUF_SIZE; 803903c: fbb0 f4f2 udiv r4, r0, r2 if (FrameLength%ETH_TX_BUF_SIZE) buf_count++; 8039040: fb02 0214 mls r2, r2, r4, r0 8039044: b292 uxth r2, r2 DMATxNextDesc = DMATxDescToSet; if (FrameLength > ETH_TX_BUF_SIZE) { buf_count = FrameLength/ETH_TX_BUF_SIZE; 8039046: b2a1 uxth r1, r4 if (FrameLength%ETH_TX_BUF_SIZE) buf_count++; 8039048: b10a cbz r2, 803904e 803904a: 3101 adds r1, #1 803904c: e001 b.n 8039052 } else buf_count =1; if (buf_count ==1) 803904e: 2901 cmp r1, #1 8039050: d00c beq.n 803906c if (i== (buf_count-1)) { /* Setting the last segment bit */ DMATxNextDesc->Status |= ETH_DMATxDesc_LS; size = FrameLength - (buf_count-1)*ETH_TX_BUF_SIZE; 8039052: 4d20 ldr r5, [pc, #128] ; (80390d4 ) 8039054: f200 50f4 addw r0, r0, #1524 ; 0x5f4 8039058: fb05 0501 mla r5, r5, r1, r0 DMATxNextDesc->ControlBufferSize = (size & ETH_DMATxDesc_TBS1); 803905c: 04ed lsls r5, r5, #19 803905e: 0ced lsrs r5, r5, #19 8039060: 461a mov r2, r3 8039062: 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); 8039064: f240 56f4 movw r6, #1524 ; 0x5f4 if (i== (buf_count-1)) 8039068: 1e4f subs r7, r1, #1 803906a: e00c b.n 8039086 else buf_count =1; if (buf_count ==1) { /*set LAST and FIRST segment */ DMATxDescToSet->Status |=ETH_DMATxDesc_FS|ETH_DMATxDesc_LS; 803906c: 681a ldr r2, [r3, #0] /* Set frame size */ DMATxDescToSet->ControlBufferSize = (FrameLength& ETH_DMATxDesc_TBS1); 803906e: 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; 8039070: f042 5240 orr.w r2, r2, #805306368 ; 0x30000000 /* Set frame size */ DMATxDescToSet->ControlBufferSize = (FrameLength& ETH_DMATxDesc_TBS1); 8039074: 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; 8039076: 601a str r2, [r3, #0] /* Set frame size */ DMATxDescToSet->ControlBufferSize = (FrameLength& ETH_DMATxDesc_TBS1); 8039078: 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; 803907a: 681a ldr r2, [r3, #0] 803907c: f042 4200 orr.w r2, r2, #2147483648 ; 0x80000000 8039080: 601a str r2, [r3, #0] DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); 8039082: 68da ldr r2, [r3, #12] 8039084: e014 b.n 80390b0 } else { for (i=0; i< buf_count; i++) { if (i==0) 8039086: b918 cbnz r0, 8039090 { /* Setting the first segment bit */ DMATxDescToSet->Status |= ETH_DMATxDesc_FS; 8039088: 681c ldr r4, [r3, #0] 803908a: f044 5480 orr.w r4, r4, #268435456 ; 0x10000000 803908e: 601c str r4, [r3, #0] } /* Program size */ DMATxNextDesc->ControlBufferSize = (ETH_TX_BUF_SIZE & ETH_DMATxDesc_TBS1); if (i== (buf_count-1)) 8039090: 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); 8039092: 6056 str r6, [r2, #4] if (i== (buf_count-1)) 8039094: d104 bne.n 80390a0 { /* Setting the last segment bit */ DMATxNextDesc->Status |= ETH_DMATxDesc_LS; 8039096: 6814 ldr r4, [r2, #0] 8039098: f044 5400 orr.w r4, r4, #536870912 ; 0x20000000 803909c: 6014 str r4, [r2, #0] size = FrameLength - (buf_count-1)*ETH_TX_BUF_SIZE; DMATxNextDesc->ControlBufferSize = (size & ETH_DMATxDesc_TBS1); 803909e: 6055 str r5, [r2, #4] } /*give back descriptor to DMA */ DMATxNextDesc->Status |= ETH_DMATxDesc_OWN; 80390a0: 6814 ldr r4, [r2, #0] DMATxDescToSet->Status |= ETH_DMATxDesc_OWN; DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); } else { for (i=0; i< buf_count; i++) 80390a2: 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; 80390a4: f044 4400 orr.w r4, r4, #2147483648 ; 0x80000000 80390a8: 6014 str r4, [r2, #0] DMATxDescToSet->Status |= ETH_DMATxDesc_OWN; DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); } else { for (i=0; i< buf_count; i++) 80390aa: 4288 cmp r0, r1 } /*give back descriptor to DMA */ DMATxNextDesc->Status |= ETH_DMATxDesc_OWN; DMATxNextDesc = (ETH_DMADESCTypeDef *)(DMATxNextDesc->Buffer2NextDescAddr); 80390ac: 68d2 ldr r2, [r2, #12] DMATxDescToSet->Status |= ETH_DMATxDesc_OWN; DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); } else { for (i=0; i< buf_count; i++) 80390ae: d3ea bcc.n 8039086 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 ; 80390b0: 4b07 ldr r3, [pc, #28] ; (80390d0 ) 80390b2: 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) 80390b4: 4b08 ldr r3, [pc, #32] ; (80390d8 ) 80390b6: 695a ldr r2, [r3, #20] 80390b8: 0750 lsls r0, r2, #29 80390ba: d506 bpl.n 80390ca { /* Clear TBUS ETHERNET DMA flag */ ETH->DMASR = ETH_DMASR_TBUS; 80390bc: 2204 movs r2, #4 80390be: 615a str r2, [r3, #20] /* Resume DMA transmission*/ ETH->DMATPDR = 0; 80390c0: 2200 movs r2, #0 80390c2: 605a str r2, [r3, #4] 80390c4: e001 b.n 80390ca /* 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; 80390c6: 2000 movs r0, #0 80390c8: bdf0 pop {r4, r5, r6, r7, pc} /* Resume DMA transmission*/ ETH->DMATPDR = 0; } /* Return SUCCESS */ return ETH_SUCCESS; 80390ca: 2001 movs r0, #1 } 80390cc: bdf0 pop {r4, r5, r6, r7, pc} 80390ce: bf00 nop 80390d0: 2000fc74 .word 0x2000fc74 80390d4: fffffa0c .word 0xfffffa0c 80390d8: 40029000 .word 0x40029000 080390dc : { uint32_t i = 0; ETH_DMADESCTypeDef *DMARxDesc; /* Set the DMARxDescToGet pointer with the first one of the DMARxDescTab list */ DMARxDescToGet = DMARxDescTab; 80390dc: 4b11 ldr r3, [pc, #68] ; (8039124 ) * @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) { 80390de: 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; 80390e0: 6018 str r0, [r3, #0] /* Fill each DMARxDesc descriptor with the right values */ for(i=0; i < RxBuffCount; i++) 80390e2: 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) 80390e4: 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; 80390e8: 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; 80390ec: 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)) 80390f0: 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++) 80390f2: e00f b.n 8039114 /* 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); 80390f4: 42bc cmp r4, r7 80390f6: bf2c ite cs 80390f8: 4684 movcs ip, r0 80390fa: 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]); 80390fc: 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; 8039100: 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; 8039104: 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); 8039108: 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++) 803910c: 3401 adds r4, #1 803910e: 3320 adds r3, #32 8039110: f201 51f4 addw r1, r1, #1524 ; 0x5f4 8039114: 4294 cmp r4, r2 8039116: d1ed bne.n 80390f4 DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab); } } /* Set Receive Descriptor List Address Register */ ETH->DMARDLAR = (uint32_t) DMARxDescTab; 8039118: 4b03 ldr r3, [pc, #12] ; (8039128 ) DMA_RX_FRAME_infos = &RX_Frame_Descriptor; 803911a: 4a04 ldr r2, [pc, #16] ; (803912c ) DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab); } } /* Set Receive Descriptor List Address Register */ ETH->DMARDLAR = (uint32_t) DMARxDescTab; 803911c: 60d8 str r0, [r3, #12] DMA_RX_FRAME_infos = &RX_Frame_Descriptor; 803911e: 4b04 ldr r3, [pc, #16] ; (8039130 ) 8039120: 601a str r2, [r3, #0] 8039122: bdf0 pop {r4, r5, r6, r7, pc} 8039124: 2000fc70 .word 0x2000fc70 8039128: 40029000 .word 0x40029000 803912c: 2000fc64 .word 0x2000fc64 8039130: 20011ae0 .word 0x20011ae0 08039134 : { uint32_t i = 0; ETH_DMADESCTypeDef *DMATxDesc; /* Set the DMATxDescToSet pointer with the first one of the DMATxDescTab list */ DMATxDescToSet = DMATxDescTab; 8039134: 4b0e ldr r3, [pc, #56] ; (8039170 ) * @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) { 8039136: 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; 8039138: 6018 str r0, [r3, #0] /* Fill each DMATxDesc descriptor with the right values */ for(i=0; i < TxBuffCount; i++) 803913a: 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) 803913c: 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; 8039140: 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)) 8039144: 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++) 8039146: e00d b.n 8039164 /* 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); 8039148: 42b4 cmp r4, r6 803914a: bf2c ite cs 803914c: 4607 movcs r7, r0 803914e: 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]); 8039150: 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; 8039154: 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); 8039158: 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++) 803915c: 3401 adds r4, #1 803915e: 3320 adds r3, #32 8039160: f201 51f4 addw r1, r1, #1524 ; 0x5f4 8039164: 4294 cmp r4, r2 8039166: d1ef bne.n 8039148 DMATxDesc->Buffer2NextDescAddr = (uint32_t) DMATxDescTab; } } /* Set Transmit Desciptor List Address Register */ ETH->DMATDLAR = (uint32_t) DMATxDescTab; 8039168: 4b02 ldr r3, [pc, #8] ; (8039174 ) 803916a: 6118 str r0, [r3, #16] 803916c: bdf0 pop {r4, r5, r6, r7, pc} 803916e: bf00 nop 8039170: 2000fc74 .word 0x2000fc74 8039174: 40029000 .word 0x40029000 08039178 : { /* 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; 8039178: 6803 ldr r3, [r0, #0] 803917a: 4319 orrs r1, r3 803917c: 6001 str r1, [r0, #0] 803917e: 4770 bx lr 08039180 : * @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) { 8039180: 6843 ldr r3, [r0, #4] /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8039182: b111 cbz r1, 803918a { /* Enable the DMA Rx Desc receive interrupt */ DMARxDesc->ControlBufferSize &=(~(uint32_t)ETH_DMARxDesc_DIC); 8039184: f023 4300 bic.w r3, r3, #2147483648 ; 0x80000000 8039188: e001 b.n 803918e } else { /* Disable the DMA Rx Desc receive interrupt */ DMARxDesc->ControlBufferSize |= ETH_DMARxDesc_DIC; 803918a: f043 4300 orr.w r3, r3, #2147483648 ; 0x80000000 803918e: 6043 str r3, [r0, #4] 8039190: 4770 bx lr 8039192: 0000 movs r0, r0 08039194 : */ 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; 8039194: 4b02 ldr r3, [pc, #8] ; (80391a0 ) 8039196: 681a ldr r2, [r3, #0] 8039198: f042 0201 orr.w r2, r2, #1 803919c: 601a str r2, [r3, #0] 803919e: 4770 bx lr 80391a0: 40029000 .word 0x40029000 080391a4 : * @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) 80391a4: 4b02 ldr r3, [pc, #8] ; (80391b0 ) 80391a6: 6818 ldr r0, [r3, #0] else { bitstatus = RESET; } return bitstatus; } 80391a8: f000 0001 and.w r0, r0, #1 80391ac: 4770 bx lr 80391ae: bf00 nop 80391b0: 40029000 .word 0x40029000 080391b4 : 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) 80391b4: 4b03 ldr r3, [pc, #12] ; (80391c4 ) 80391b6: 695b ldr r3, [r3, #20] 80391b8: 4218 tst r0, r3 else { bitstatus = RESET; } return bitstatus; } 80391ba: bf0c ite eq 80391bc: 2000 moveq r0, #0 80391be: 2001 movne r0, #1 80391c0: 4770 bx lr 80391c2: bf00 nop 80391c4: 40029000 .word 0x40029000 080391c8 : * @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) { 80391c8: 4b04 ldr r3, [pc, #16] ; (80391dc ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the selected ETHERNET DMA interrupts */ ETH->DMAIER |= ETH_DMA_IT; 80391ca: 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) 80391cc: b109 cbz r1, 80391d2 { /* Enable the selected ETHERNET DMA interrupts */ ETH->DMAIER |= ETH_DMA_IT; 80391ce: 4310 orrs r0, r2 80391d0: e001 b.n 80391d6 } else { /* Disable the selected ETHERNET DMA interrupts */ ETH->DMAIER &=(~(uint32_t)ETH_DMA_IT); 80391d2: ea22 0000 bic.w r0, r2, r0 80391d6: 61d8 str r0, [r3, #28] 80391d8: 4770 bx lr 80391da: bf00 nop 80391dc: 40029000 .word 0x40029000 080391e0 : { /* 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; 80391e0: 4b01 ldr r3, [pc, #4] ; (80391e8 ) 80391e2: 6158 str r0, [r3, #20] 80391e4: 4770 bx lr 80391e6: bf00 nop 80391e8: 40029000 .word 0x40029000 080391ec : * @retval None */ void ETH_FlushTransmitFIFO(void) { /* Set the Flush Transmit FIFO bit */ ETH->DMAOMR |= ETH_DMAOMR_FTF; 80391ec: 4b02 ldr r3, [pc, #8] ; (80391f8 ) 80391ee: 699a ldr r2, [r3, #24] 80391f0: f442 1280 orr.w r2, r2, #1048576 ; 0x100000 80391f4: 619a str r2, [r3, #24] 80391f6: 4770 bx lr 80391f8: 40029000 .word 0x40029000 080391fc : * @param NewState: new state of the DMA transmission. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_DMATransmissionCmd(FunctionalState NewState) { 80391fc: 4b04 ldr r3, [pc, #16] ; (8039210 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the DMA transmission */ ETH->DMAOMR |= ETH_DMAOMR_ST; 80391fe: 699a ldr r2, [r3, #24] void ETH_DMATransmissionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8039200: b110 cbz r0, 8039208 { /* Enable the DMA transmission */ ETH->DMAOMR |= ETH_DMAOMR_ST; 8039202: f442 5200 orr.w r2, r2, #8192 ; 0x2000 8039206: e001 b.n 803920c } else { /* Disable the DMA transmission */ ETH->DMAOMR &= ~ETH_DMAOMR_ST; 8039208: f422 5200 bic.w r2, r2, #8192 ; 0x2000 803920c: 619a str r2, [r3, #24] 803920e: 4770 bx lr 8039210: 40029000 .word 0x40029000 08039214 : * @param NewState: new state of the DMA reception. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_DMAReceptionCmd(FunctionalState NewState) { 8039214: 4b04 ldr r3, [pc, #16] ; (8039228 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the DMA reception */ ETH->DMAOMR |= ETH_DMAOMR_SR; 8039216: 699a ldr r2, [r3, #24] void ETH_DMAReceptionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8039218: b110 cbz r0, 8039220 { /* Enable the DMA reception */ ETH->DMAOMR |= ETH_DMAOMR_SR; 803921a: f042 0202 orr.w r2, r2, #2 803921e: e001 b.n 8039224 } else { /* Disable the DMA reception */ ETH->DMAOMR &= ~ETH_DMAOMR_SR; 8039220: f022 0202 bic.w r2, r2, #2 8039224: 619a str r2, [r3, #24] 8039226: 4770 bx lr 8039228: 40029000 .word 0x40029000 0803922c : * @brief Enables ENET MAC and DMA reception/transmission * @param None * @retval None */ void ETH_Start(void) { 803922c: b508 push {r3, lr} /* Enable transmit state machine of the MAC for transmission on the MII */ ETH_MACTransmissionCmd(ENABLE); 803922e: 2001 movs r0, #1 8039230: f7ff fe7a bl 8038f28 /* Flush Transmit FIFO */ ETH_FlushTransmitFIFO(); 8039234: f7ff ffda bl 80391ec /* Enable receive state machine of the MAC for reception from the MII */ ETH_MACReceptionCmd(ENABLE); 8039238: 2001 movs r0, #1 803923a: f7ff fe81 bl 8038f40 /* Start DMA transmission */ ETH_DMATransmissionCmd(ENABLE); 803923e: 2001 movs r0, #1 8039240: f7ff ffdc bl 80391fc /* Start DMA reception */ ETH_DMAReceptionCmd(ENABLE); 8039244: 2001 movs r0, #1 } 8039246: e8bd 4008 ldmia.w sp!, {r3, lr} ETH_MACReceptionCmd(ENABLE); /* Start DMA transmission */ ETH_DMATransmissionCmd(ENABLE); /* Start DMA reception */ ETH_DMAReceptionCmd(ENABLE); 803924a: f7ff bfe3 b.w 8039214 803924e: 0000 movs r0, r0 08039250 : * @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) { 8039250: b082 sub sp, #8 uint32_t tmpreg = 0; __IO uint32_t timeout = 0; 8039252: 2300 movs r3, #0 8039254: 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; 8039256: 4b11 ldr r3, [pc, #68] ; (803929c ) 8039258: 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 */ 803925a: 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; 803925c: 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 */ 8039260: 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 */ 8039262: ea42 4210 orr.w r2, r2, r0, lsr #16 tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */ 8039266: f401 61f8 and.w r1, r1, #1984 ; 0x7c0 tmpreg &= ~ETH_MACMIIAR_MW; /* Set the read mode */ 803926a: 430a orrs r2, r1 tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ 803926c: f042 0201 orr.w r2, r2, #1 /* Write the result value into the MII Address register */ ETH->MACMIIAR = tmpreg; 8039270: 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)); 8039272: 4a0b ldr r2, [pc, #44] ; (80392a0 ) /* Write the result value into the MII Address register */ ETH->MACMIIAR = tmpreg; /* Check for the Busy flag */ do { timeout++; 8039274: 9901 ldr r1, [sp, #4] 8039276: 3101 adds r1, #1 8039278: 9101 str r1, [sp, #4] tmpreg = ETH->MACMIIAR; 803927a: 6919 ldr r1, [r3, #16] } while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_READ_TO)); 803927c: 07c9 lsls r1, r1, #31 803927e: d502 bpl.n 8039286 8039280: 9901 ldr r1, [sp, #4] 8039282: 4291 cmp r1, r2 8039284: d9f6 bls.n 8039274 /* Return ERROR in case of timeout */ if(timeout == PHY_READ_TO) 8039286: 4b07 ldr r3, [pc, #28] ; (80392a4 ) 8039288: 9a01 ldr r2, [sp, #4] 803928a: 429a cmp r2, r3 { return (uint16_t)ETH_ERROR; } /* Return data register value */ return (uint16_t)(ETH->MACMIIDR); 803928c: bf1d ittte ne 803928e: 4b03 ldrne r3, [pc, #12] ; (803929c ) 8039290: 6958 ldrne r0, [r3, #20] 8039292: 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; 8039294: 2000 moveq r0, #0 } /* Return data register value */ return (uint16_t)(ETH->MACMIIDR); } 8039296: b002 add sp, #8 8039298: 4770 bx lr 803929a: bf00 nop 803929c: 40028000 .word 0x40028000 80392a0: 0004fffe .word 0x0004fffe 80392a4: 0004ffff .word 0x0004ffff 080392a8 : * @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) { 80392a8: b513 push {r0, r1, r4, lr} uint32_t tmpreg = 0; __IO uint32_t timeout = 0; 80392aa: 2300 movs r3, #0 80392ac: 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; 80392ae: 4b0f ldr r3, [pc, #60] ; (80392ec ) 80392b0: 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; 80392b2: 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; 80392b4: 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 */ 80392b8: f044 0403 orr.w r4, r4, #3 80392bc: 06c0 lsls r0, r0, #27 tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */ 80392be: 0189 lsls r1, r1, #6 80392c0: ea44 4410 orr.w r4, r4, r0, lsr #16 80392c4: 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 */ 80392c8: 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)); 80392ca: 4a09 ldr r2, [pc, #36] ; (80392f0 ) 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; 80392cc: 611c str r4, [r3, #16] /* Check for the Busy flag */ do { timeout++; 80392ce: 9901 ldr r1, [sp, #4] 80392d0: 3101 adds r1, #1 80392d2: 9101 str r1, [sp, #4] tmpreg = ETH->MACMIIAR; 80392d4: 6919 ldr r1, [r3, #16] } while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_WRITE_TO)); 80392d6: 07c8 lsls r0, r1, #31 80392d8: d502 bpl.n 80392e0 80392da: 9901 ldr r1, [sp, #4] 80392dc: 4291 cmp r1, r2 80392de: d9f6 bls.n 80392ce /* Return ERROR in case of timeout */ if(timeout == PHY_WRITE_TO) 80392e0: 9801 ldr r0, [sp, #4] return ETH_ERROR; } /* Return SUCCESS */ return ETH_SUCCESS; } 80392e2: 4b04 ldr r3, [pc, #16] ; (80392f4 ) 80392e4: 1ac0 subs r0, r0, r3 80392e6: bf18 it ne 80392e8: 2001 movne r0, #1 80392ea: bd1c pop {r2, r3, r4, pc} 80392ec: 40028000 .word 0x40028000 80392f0: 0004fffe .word 0x0004fffe 80392f4: 0004ffff .word 0x0004ffff 080392f8 : * @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) { 80392f8: b5f0 push {r4, r5, r6, r7, lr} 80392fa: b087 sub sp, #28 uint32_t RegValue = 0, tmpreg = 0; __IO uint32_t i = 0; 80392fc: 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; 80392fe: 4f90 ldr r7, [pc, #576] ; (8039540 ) * 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; 8039300: 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) { 8039302: 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; 8039304: 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); 8039306: 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) { 8039308: 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; 803930a: 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); 803930c: f7ec f9ba bl 8025684 hclk = rcc_clocks.HCLK_Frequency; 8039310: 9b03 ldr r3, [sp, #12] /* Set CR bits depending on hclk value */ if((hclk >= 20000000)&&(hclk < 35000000)) 8039312: 4a8c ldr r2, [pc, #560] ; (8039544 ) 8039314: 498c ldr r1, [pc, #560] ; (8039548 ) 8039316: 189a adds r2, r3, r2 8039318: 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; 803931a: 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)) 803931e: d802 bhi.n 8039326 { /* CSR Clock Range between 20-35 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div16; 8039320: f045 0508 orr.w r5, r5, #8 8039324: e015 b.n 8039352 } else if((hclk >= 35000000)&&(hclk < 60000000)) 8039326: 4a89 ldr r2, [pc, #548] ; (803954c ) 8039328: 4989 ldr r1, [pc, #548] ; (8039550 ) 803932a: 189a adds r2, r3, r2 803932c: 428a cmp r2, r1 803932e: d802 bhi.n 8039336 { /* CSR Clock Range between 35-60 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div26; 8039330: f045 050c orr.w r5, r5, #12 8039334: e00d b.n 8039352 } else if((hclk >= 60000000)&&(hclk < 100000000)) 8039336: 4a87 ldr r2, [pc, #540] ; (8039554 ) 8039338: 4987 ldr r1, [pc, #540] ; (8039558 ) 803933a: 189a adds r2, r3, r2 803933c: 428a cmp r2, r1 803933e: d908 bls.n 8039352 { /* CSR Clock Range between 60-100 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div42; } else if((hclk >= 100000000)&&(hclk < 150000000)) 8039340: 4a86 ldr r2, [pc, #536] ; (803955c ) 8039342: 189a adds r2, r3, r2 8039344: 4b86 ldr r3, [pc, #536] ; (8039560 ) 8039346: 429a cmp r2, r3 { /* CSR Clock Range between 100-150 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div62; 8039348: bf94 ite ls 803934a: 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; 803934e: f045 0510 orrhi.w r5, r5, #16 } /* Write to ETHERNET MAC MIIAR: Configure the ETHERNET CSR Clock Range */ ETH->MACMIIAR = (uint32_t)tmpreg; 8039352: 613d str r5, [r7, #16] /*-------------------- PHY initialization and configuration ----------------*/ /* Put the PHY in reset mode */ if(!(ETH_WritePHYRegister(PHYAddress, PHY_BCR, PHY_Reset))) 8039354: 4630 mov r0, r6 8039356: 2100 movs r1, #0 8039358: f44f 4200 mov.w r2, #32768 ; 0x8000 803935c: f7ff ffa4 bl 80392a8 8039360: b908 cbnz r0, 8039366 { /* Return ERROR in case of write timeout */ return ETH_ERROR; 8039362: 2000 movs r0, #0 8039364: e0e9 b.n 803953a } /* Delay to assure PHY reset */ _eth_delay_(PHY_RESET_DELAY); 8039366: 487f ldr r0, [pc, #508] ; (8039564 ) 8039368: f7ff fd6e bl 8038e48 if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) 803936c: 6821 ldr r1, [r4, #0] 803936e: 2900 cmp r1, #0 8039370: d050 beq.n 8039414 { /* We wait for linked status... */ do { timeout++; } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 8039372: 4d7d ldr r5, [pc, #500] ; (8039568 ) if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) { /* We wait for linked status... */ do { timeout++; 8039374: 9b01 ldr r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 8039376: 4630 mov r0, r6 if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) { /* We wait for linked status... */ do { timeout++; 8039378: 3301 adds r3, #1 } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 803937a: 2101 movs r1, #1 if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) { /* We wait for linked status... */ do { timeout++; 803937c: 9301 str r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 803937e: f7ff ff67 bl 8039250 8039382: f000 0004 and.w r0, r0, #4 8039386: b280 uxth r0, r0 8039388: b910 cbnz r0, 8039390 803938a: 9b01 ldr r3, [sp, #4] 803938c: 42ab cmp r3, r5 803938e: d9f1 bls.n 8039374 /* Return ERROR in case of timeout */ if(timeout == PHY_READ_TO) 8039390: 9a01 ldr r2, [sp, #4] 8039392: 4b76 ldr r3, [pc, #472] ; (803956c ) 8039394: 429a cmp r2, r3 8039396: d0e4 beq.n 8039362 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 8039398: 2100 movs r1, #0 /* Enable Auto-Negotiation */ if(!(ETH_WritePHYRegister(PHYAddress, PHY_BCR, PHY_AutoNegotiation))) 803939a: 4630 mov r0, r6 803939c: f44f 5280 mov.w r2, #4096 ; 0x1000 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 80393a0: 9101 str r1, [sp, #4] /* Enable Auto-Negotiation */ if(!(ETH_WritePHYRegister(PHYAddress, PHY_BCR, PHY_AutoNegotiation))) 80393a2: f7ff ff81 bl 80392a8 80393a6: 2800 cmp r0, #0 80393a8: d0db beq.n 8039362 /* 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)); 80393aa: 4d6f ldr r5, [pc, #444] ; (8039568 ) } /* Wait until the auto-negotiation will be completed */ do { timeout++; 80393ac: 9b01 ldr r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_AutoNego_Complete) && (timeout < (uint32_t)PHY_READ_TO)); 80393ae: 4630 mov r0, r6 } /* Wait until the auto-negotiation will be completed */ do { timeout++; 80393b0: 3301 adds r3, #1 } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_AutoNego_Complete) && (timeout < (uint32_t)PHY_READ_TO)); 80393b2: 2101 movs r1, #1 } /* Wait until the auto-negotiation will be completed */ do { timeout++; 80393b4: 9301 str r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_AutoNego_Complete) && (timeout < (uint32_t)PHY_READ_TO)); 80393b6: f7ff ff4b bl 8039250 80393ba: f000 0020 and.w r0, r0, #32 80393be: b280 uxth r0, r0 80393c0: b910 cbnz r0, 80393c8 80393c2: 9b01 ldr r3, [sp, #4] 80393c4: 42ab cmp r3, r5 80393c6: d9f1 bls.n 80393ac /* Return ERROR in case of timeout */ if(timeout == PHY_READ_TO) 80393c8: 9a01 ldr r2, [sp, #4] 80393ca: 4b68 ldr r3, [pc, #416] ; (803956c ) 80393cc: 429a cmp r2, r3 80393ce: d0c8 beq.n 8039362 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 80393d0: 2500 movs r5, #0 /* Read the result of the auto-negotiation */ RegValue = ETH_ReadPHYRegister(PHYAddress, PHY_SR); 80393d2: 211f movs r1, #31 80393d4: 4630 mov r0, r6 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 80393d6: 9501 str r5, [sp, #4] /* Read the result of the auto-negotiation */ RegValue = ETH_ReadPHYRegister(PHYAddress, PHY_SR); 80393d8: f7ff ff3a bl 8039250 switch (RegValue & PHY_DUPLEX_SPEED_STATUS_MASK) 80393dc: f000 001c and.w r0, r0, #28 80393e0: 2808 cmp r0, #8 80393e2: d00b beq.n 80393fc 80393e4: d802 bhi.n 80393ec 80393e6: 2804 cmp r0, #4 80393e8: d123 bne.n 8039432 80393ea: e010 b.n 803940e 80393ec: 280e cmp r0, #14 80393ee: d00a beq.n 8039406 80393f0: 2812 cmp r0, #18 80393f2: d11e bne.n 8039432 { case PHY_100BTX_FULL: ETH_InitStruct->ETH_Mode = ETH_Mode_FullDuplex; 80393f4: f44f 6300 mov.w r3, #2048 ; 0x800 80393f8: 6223 str r3, [r4, #32] 80393fa: e000 b.n 80393fe ETH_InitStruct->ETH_Speed = ETH_Speed_100M; break; case PHY_100BTX_HALF: ETH_InitStruct->ETH_Mode = ETH_Mode_HalfDuplex; 80393fc: 6225 str r5, [r4, #32] ETH_InitStruct->ETH_Speed = ETH_Speed_100M; 80393fe: f44f 4380 mov.w r3, #16384 ; 0x4000 8039402: 6163 str r3, [r4, #20] break; 8039404: e015 b.n 8039432 case PHY_10M_FULL: ETH_InitStruct->ETH_Mode = ETH_Mode_FullDuplex; 8039406: f44f 6300 mov.w r3, #2048 ; 0x800 803940a: 6223 str r3, [r4, #32] 803940c: e000 b.n 8039410 ETH_InitStruct->ETH_Speed = ETH_Speed_10M; break; case PHY_10M_HALF: ETH_InitStruct->ETH_Mode = ETH_Mode_HalfDuplex; 803940e: 6225 str r5, [r4, #32] ETH_InitStruct->ETH_Speed = ETH_Speed_10M; 8039410: 6165 str r5, [r4, #20] break; 8039412: e00e b.n 8039432 break; } } else { if(!ETH_WritePHYRegister(PHYAddress, PHY_BCR, ((uint16_t)(ETH_InitStruct->ETH_Mode >> 3) | 8039414: 6a22 ldr r2, [r4, #32] (uint16_t)(ETH_InitStruct->ETH_Speed >> 1)))) 8039416: 6963 ldr r3, [r4, #20] break; } } else { if(!ETH_WritePHYRegister(PHYAddress, PHY_BCR, ((uint16_t)(ETH_InitStruct->ETH_Mode >> 3) | 8039418: 08d2 lsrs r2, r2, #3 803941a: ea42 0253 orr.w r2, r2, r3, lsr #1 803941e: 4630 mov r0, r6 8039420: b292 uxth r2, r2 8039422: f7ff ff41 bl 80392a8 8039426: 2800 cmp r0, #0 8039428: d09b beq.n 8039362 { /* Return ERROR in case of write timeout */ return ETH_ERROR; } /* Delay to assure PHY configuration */ _eth_delay_(PHY_CONFIG_DELAY); 803942a: f06f 407f mvn.w r0, #4278190080 ; 0xff000000 803942e: f7ff fd0b bl 8038e48 } /*------------------------ ETHERNET MACCR Configuration --------------------*/ /* Get the ETHERNET MACCR value */ tmpreg = ETH->MACCR; 8039432: 4b43 ldr r3, [pc, #268] ; (8039540 ) /* Clear WD, PCE, PS, TE and RE bits */ tmpreg &= MACCR_CLEAR_MASK; 8039434: 4a4e ldr r2, [pc, #312] ; (8039570 ) _eth_delay_(PHY_CONFIG_DELAY); } /*------------------------ ETHERNET MACCR Configuration --------------------*/ /* Get the ETHERNET MACCR value */ tmpreg = ETH->MACCR; 8039436: 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 | 8039438: 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; 803943a: 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 | 803943c: 6861 ldr r1, [r4, #4] 803943e: 4308 orrs r0, r1 ETH_InitStruct->ETH_Jabber | 8039440: 68e1 ldr r1, [r4, #12] 8039442: 4308 orrs r0, r1 ETH_InitStruct->ETH_InterFrameGap | 8039444: 6921 ldr r1, [r4, #16] 8039446: 4308 orrs r0, r1 ETH_InitStruct->ETH_CarrierSense | 8039448: 6961 ldr r1, [r4, #20] 803944a: 4308 orrs r0, r1 ETH_InitStruct->ETH_Speed | 803944c: 69a1 ldr r1, [r4, #24] 803944e: 4308 orrs r0, r1 ETH_InitStruct->ETH_ReceiveOwn | 8039450: 69e1 ldr r1, [r4, #28] 8039452: 4308 orrs r0, r1 ETH_InitStruct->ETH_LoopbackMode | 8039454: 6a21 ldr r1, [r4, #32] 8039456: 4308 orrs r0, r1 ETH_InitStruct->ETH_Mode | 8039458: 6a61 ldr r1, [r4, #36] ; 0x24 803945a: 4308 orrs r0, r1 ETH_InitStruct->ETH_ChecksumOffload | 803945c: 6aa1 ldr r1, [r4, #40] ; 0x28 803945e: 4308 orrs r0, r1 ETH_InitStruct->ETH_RetryTransmission | 8039460: 6ae1 ldr r1, [r4, #44] ; 0x2c 8039462: 4308 orrs r0, r1 ETH_InitStruct->ETH_AutomaticPadCRCStrip | 8039464: 6b21 ldr r1, [r4, #48] ; 0x30 8039466: 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 | 8039468: 6b61 ldr r1, [r4, #52] ; 0x34 803946a: 4301 orrs r1, r0 803946c: 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; 803946e: 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 | 8039470: 6ba2 ldr r2, [r4, #56] ; 0x38 8039472: 6be1 ldr r1, [r4, #60] ; 0x3c 8039474: 4311 orrs r1, r2 ETH_InitStruct->ETH_SourceAddrFilter | 8039476: 6c22 ldr r2, [r4, #64] ; 0x40 8039478: 4311 orrs r1, r2 ETH_InitStruct->ETH_PassControlFrames | 803947a: 6c62 ldr r2, [r4, #68] ; 0x44 803947c: 4311 orrs r1, r2 ETH_InitStruct->ETH_BroadcastFramesReception | 803947e: 6ca2 ldr r2, [r4, #72] ; 0x48 8039480: 4311 orrs r1, r2 ETH_InitStruct->ETH_DestinationAddrFilter | 8039482: 6ce2 ldr r2, [r4, #76] ; 0x4c 8039484: 4311 orrs r1, r2 ETH_InitStruct->ETH_PromiscuousMode | 8039486: 6d22 ldr r2, [r4, #80] ; 0x50 8039488: 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 | 803948a: 6d62 ldr r2, [r4, #84] ; 0x54 803948c: 430a orrs r2, r1 803948e: 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; 8039490: 6da2 ldr r2, [r4, #88] ; 0x58 8039492: 609a str r2, [r3, #8] /* Write to ETHERNET MACHTLR */ ETH->MACHTLR = (uint32_t)ETH_InitStruct->ETH_HashTableLow; 8039494: 6de2 ldr r2, [r4, #92] ; 0x5c 8039496: 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) | 8039498: 6e62 ldr r2, [r4, #100] ; 0x64 803949a: 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; 803949c: 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) | 803949e: 4311 orrs r1, r2 ETH_InitStruct->ETH_ZeroQuantaPause | 80394a0: 6ee2 ldr r2, [r4, #108] ; 0x6c 80394a2: 4311 orrs r1, r2 ETH_InitStruct->ETH_PauseLowThreshold | 80394a4: 6f22 ldr r2, [r4, #112] ; 0x70 80394a6: 4311 orrs r1, r2 ETH_InitStruct->ETH_UnicastPauseFrameDetect | 80394a8: 6f62 ldr r2, [r4, #116] ; 0x74 80394aa: 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; 80394ac: f64f 7241 movw r2, #65345 ; 0xff41 80394b0: 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) | 80394b2: 430a orrs r2, r1 80394b4: 6e21 ldr r1, [r4, #96] ; 0x60 80394b6: 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; 80394ba: 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 | 80394bc: 6fe1 ldr r1, [r4, #124] ; 0x7c 80394be: 6fa2 ldr r2, [r4, #120] ; 0x78 80394c0: 430a orrs r2, r1 80394c2: 61da str r2, [r3, #28] ETH_InitStruct->ETH_VLANTagIdentifier); /*-------------------------------- DMA Config ------------------------------*/ /*----------------------- ETHERNET DMAOMR Configuration --------------------*/ /* Get the ETHERNET DMAOMR value */ tmpreg = ETH->DMAOMR; 80394c4: f503 5380 add.w r3, r3, #4096 ; 0x1000 /* Clear xx bits */ tmpreg &= DMAOMR_CLEAR_MASK; 80394c8: 4a2a ldr r2, [pc, #168] ; (8039574 ) ETH_InitStruct->ETH_VLANTagIdentifier); /*-------------------------------- DMA Config ------------------------------*/ /*----------------------- ETHERNET DMAOMR Configuration --------------------*/ /* Get the ETHERNET DMAOMR value */ tmpreg = ETH->DMAOMR; 80394ca: 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 | 80394cc: 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; 80394d0: 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 | 80394d2: f8d4 1080 ldr.w r1, [r4, #128] ; 0x80 80394d6: 4308 orrs r0, r1 ETH_InitStruct->ETH_ReceiveStoreForward | 80394d8: f8d4 1088 ldr.w r1, [r4, #136] ; 0x88 80394dc: 4308 orrs r0, r1 ETH_InitStruct->ETH_FlushReceivedFrame | 80394de: f8d4 108c ldr.w r1, [r4, #140] ; 0x8c 80394e2: 4308 orrs r0, r1 ETH_InitStruct->ETH_TransmitStoreForward | 80394e4: f8d4 1090 ldr.w r1, [r4, #144] ; 0x90 80394e8: 4308 orrs r0, r1 ETH_InitStruct->ETH_TransmitThresholdControl | 80394ea: f8d4 1094 ldr.w r1, [r4, #148] ; 0x94 80394ee: 4308 orrs r0, r1 ETH_InitStruct->ETH_ForwardErrorFrames | 80394f0: f8d4 1098 ldr.w r1, [r4, #152] ; 0x98 80394f4: 4308 orrs r0, r1 ETH_InitStruct->ETH_ForwardUndersizedGoodFrames | 80394f6: f8d4 109c ldr.w r1, [r4, #156] ; 0x9c 80394fa: 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 | 80394fc: f8d4 10a0 ldr.w r1, [r4, #160] ; 0xa0 8039500: 4301 orrs r1, r0 8039502: 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; 8039504: 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 | 8039506: f8d4 20a8 ldr.w r2, [r4, #168] ; 0xa8 803950a: f8d4 10a4 ldr.w r1, [r4, #164] ; 0xa4 803950e: 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 */ 8039510: 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 | 8039514: 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 */ 8039518: 4311 orrs r1, r2 ETH_InitStruct->ETH_TxDMABurstLength | 803951a: f8d4 20b0 ldr.w r2, [r4, #176] ; 0xb0 803951e: 4311 orrs r1, r2 (ETH_InitStruct->ETH_DescriptorSkipLength << 2) | 8039520: f8d4 20b8 ldr.w r2, [r4, #184] ; 0xb8 8039524: 430a orrs r2, r1 8039526: 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 | 803952a: ea42 0281 orr.w r2, r2, r1, lsl #2 803952e: 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; 8039530: 681a ldr r2, [r3, #0] 8039532: f042 0280 orr.w r2, r2, #128 ; 0x80 8039536: 601a str r2, [r3, #0] #endif /* USE_ENHANCED_DMA_DESCRIPTORS */ /* Return Ethernet configuration success */ return ETH_SUCCESS; 8039538: 2001 movs r0, #1 } 803953a: b007 add sp, #28 803953c: bdf0 pop {r4, r5, r6, r7, pc} 803953e: bf00 nop 8039540: 40028000 .word 0x40028000 8039544: feced300 .word 0xfeced300 8039548: 00e4e1bf .word 0x00e4e1bf 803954c: fde9f140 .word 0xfde9f140 8039550: 017d783f .word 0x017d783f 8039554: fc6c7900 .word 0xfc6c7900 8039558: 026259ff .word 0x026259ff 803955c: fa0a1f00 .word 0xfa0a1f00 8039560: 02faf07f .word 0x02faf07f 8039564: 000fffff .word 0x000fffff 8039568: 0004fffe .word 0x0004fffe 803956c: 0004ffff .word 0x0004ffff 8039570: ff20810f .word 0xff20810f 8039574: f8de3f23 .word 0xf8de3f23 08039578 <_sbrk>: extern char _ebss; // Defined by the linker extern char __bss_end__; static char *heap_end; char *prev_heap_end; if (heap_end == 0) { 8039578: 4b0a ldr r3, [pc, #40] ; (80395a4 <_sbrk+0x2c>) 803957a: 681a ldr r2, [r3, #0] 803957c: b90a cbnz r2, 8039582 <_sbrk+0xa> //heap_end = &_ebss; heap_end = &__bss_end__; 803957e: 4a0a ldr r2, [pc, #40] ; (80395a8 <_sbrk+0x30>) 8039580: 601a str r2, [r3, #0] } prev_heap_end = heap_end; 8039582: 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) ); 8039584: f3ef 8208 mrs r2, MSP char * stack = (char*) __get_MSP(); if (heap_end + incr > stack) 8039588: 1818 adds r0, r3, r0 803958a: 4290 cmp r0, r2 803958c: d905 bls.n 803959a <_sbrk+0x22> { _write (STDERR_FILENO, "Heap and stack collision\n", 25); errno = ENOMEM; 803958e: 4b07 ldr r3, [pc, #28] ; (80395ac <_sbrk+0x34>) 8039590: 220c movs r2, #12 8039592: 601a str r2, [r3, #0] return (caddr_t) -1; 8039594: f04f 33ff mov.w r3, #4294967295 8039598: e001 b.n 803959e <_sbrk+0x26> //abort (); } heap_end += incr; 803959a: 4a02 ldr r2, [pc, #8] ; (80395a4 <_sbrk+0x2c>) 803959c: 6010 str r0, [r2, #0] return (caddr_t) prev_heap_end; } 803959e: 4618 mov r0, r3 80395a0: 4770 bx lr 80395a2: bf00 nop 80395a4: 2000c808 .word 0x2000c808 80395a8: 20013a4c .word 0x20013a4c 80395ac: 20013948 .word 0x20013948 080395b0 : .weak Reset_Handler .type Reset_Handler, %function Reset_Handler: /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 80395b0: 2100 movs r1, #0 b LoopCopyDataInit 80395b2: f000 b804 b.w 80395be 080395b6 : CopyDataInit: ldr r3, =_sidata 80395b6: 4b0d ldr r3, [pc, #52] ; (80395ec ) ldr r3, [r3, r1] 80395b8: 585b ldr r3, [r3, r1] str r3, [r0, r1] 80395ba: 5043 str r3, [r0, r1] adds r1, r1, #4 80395bc: 3104 adds r1, #4 080395be : LoopCopyDataInit: ldr r0, =_sdata 80395be: 480c ldr r0, [pc, #48] ; (80395f0 ) ldr r3, =_edata 80395c0: 4b0c ldr r3, [pc, #48] ; (80395f4 ) adds r2, r0, r1 80395c2: 1842 adds r2, r0, r1 cmp r2, r3 80395c4: 429a cmp r2, r3 bcc CopyDataInit 80395c6: f4ff aff6 bcc.w 80395b6 ldr r2, =_sbss 80395ca: 4a0b ldr r2, [pc, #44] ; (80395f8 ) b LoopFillZerobss 80395cc: f000 b803 b.w 80395d6 080395d0 : /* Zero fill the bss segment. */ FillZerobss: movs r3, #0 80395d0: 2300 movs r3, #0 str r3, [r2], #4 80395d2: f842 3b04 str.w r3, [r2], #4 080395d6 : LoopFillZerobss: ldr r3, = _ebss 80395d6: 4b09 ldr r3, [pc, #36] ; (80395fc ) cmp r2, r3 80395d8: 429a cmp r2, r3 bcc FillZerobss 80395da: f4ff aff9 bcc.w 80395d0 /* Call the clock system intitialization function.*/ bl SystemInit 80395de: f7ec fbd1 bl 8025d84 /* Call static constructors */ bl __libc_init_array 80395e2: f7e8 f975 bl 80218d0 <__libc_init_array> /* Call the application's entry point.*/ bl main 80395e6: f7ed fcaf bl 8026f48
bx lr 80395ea: 4770 bx lr /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 b LoopCopyDataInit CopyDataInit: ldr r3, =_sidata 80395ec: 08045c04 .word 0x08045c04 ldr r3, [r3, r1] str r3, [r0, r1] adds r1, r1, #4 LoopCopyDataInit: ldr r0, =_sdata 80395f0: 20000000 .word 0x20000000 ldr r3, =_edata 80395f4: 20000ab4 .word 0x20000ab4 adds r2, r0, r1 cmp r2, r3 bcc CopyDataInit ldr r2, =_sbss 80395f8: 20000ab4 .word 0x20000ab4 FillZerobss: movs r3, #0 str r3, [r2], #4 LoopFillZerobss: ldr r3, = _ebss 80395fc: 20013a4c .word 0x20013a4c 08039600 : * @retval None */ .section .text.Default_Handler,"ax",%progbits Default_Handler: Infinite_Loop: b Infinite_Loop 8039600: f7ff bffe b.w 8039600 08039604 <_ctype_>: 8039604: 2000 2020 2020 2020 2020 2828 2828 2028 . ((((( 8039614: 2020 2020 2020 2020 2020 2020 2020 2020 8039624: 8820 1010 1010 1010 1010 1010 1010 1010 ............... 8039634: 0410 0404 0404 0404 0404 1004 1010 1010 ................ 8039644: 1010 4141 4141 4141 0101 0101 0101 0101 ..AAAAAA........ 8039654: 0101 0101 0101 0101 0101 0101 1010 1010 ................ 8039664: 1010 4242 4242 4242 0202 0202 0202 0202 ..BBBBBB........ 8039674: 0202 0202 0202 0202 0202 0202 1010 1010 ................ 8039684: 0020 0000 0000 0000 0000 0000 0000 0000 ............... 8039694: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80396a4: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80396b4: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80396c4: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80396d4: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80396e4: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80396f4: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8039704: 0000 0000 .... 08039708 : 8039708: 89bc 97d8 d2b2 3c9c a733 d5a8 f623 3949 .......<3...#.I9 8039718: a73d 44f4 0ffd 32a5 979d cf8c ba08 255b =..D...2......[% 8039728: 6f43 64ac 0628 0e18 Co.d(... 08039730 : 8039730: 0005 0000 0019 0000 007d 0000 0000 0000 ........}....... 08039740 <__mprec_tens>: 8039740: 0000 0000 0000 3ff0 0000 0000 0000 4024 .......?......$@ 8039750: 0000 0000 0000 4059 0000 0000 4000 408f ......Y@.....@.@ 8039760: 0000 0000 8800 40c3 0000 0000 6a00 40f8 .......@.....j.@ 8039770: 0000 0000 8480 412e 0000 0000 12d0 4163 .......A......cA 8039780: 0000 0000 d784 4197 0000 0000 cd65 41cd .......A....e..A 8039790: 0000 2000 a05f 4202 0000 e800 4876 4237 ... _..B....vH7B 80397a0: 0000 a200 1a94 426d 0000 e540 309c 42a2 ......mB..@..0.B 80397b0: 0000 1e90 bcc4 42d6 0000 2634 6bf5 430c .......B..4&.k.C 80397c0: 8000 37e0 c379 4341 a000 85d8 3457 4376 ...7y.AC....W4vC 80397d0: c800 674e c16d 43ab 3d00 6091 58e4 43e1 ..Ngm..C.=.`.X.C 80397e0: 8c40 78b5 af1d 4415 ef50 d6e2 1ae4 444b @..x...DP.....KD 80397f0: d592 064d f0cf 4480 4af6 c7e1 2d02 44b5 ..M....D.J...-.D 8039800: 9db4 79d9 7843 44ea ...yCx.D 08039808 <__mprec_tinytens>: 8039808: 89bc 97d8 d2b2 3c9c a733 d5a8 f623 3949 .......<3...#.I9 8039818: a73d 44f4 0ffd 32a5 979d cf8c ba08 255b =..D...2......[% 8039828: 6f43 64ac 0628 0ac8 Co.d(... 08039830 <__mprec_bigtens>: 8039830: 8000 37e0 c379 4341 6e17 b505 b8b5 4693 ...7y.AC.n.....F 8039840: f9f5 e93f 4f03 4d38 1d32 f930 7748 5a82 ..?..O8M2.0.Hw.Z 8039850: bf3c 7f73 4fdd 7515 3025 5832 4c00 4445 <.s..O.u%02X.LED 8039860: 425f 696c 6b6e 4200 7475 6f74 736e 5500 _Blink.Buttons.U 8039870: 5350 4d5f 6e6f 7469 726f 7300 6d6e 5370 PS_Monitor.snmpS 8039880: 7379 7055 6954 656d 7300 6d6e 5470 6172 ysUpTime.snmpTra 8039890: 5470 7365 0074 6e73 7074 6e4f 6563 6953 pTest.sntpOnceSi 80398a0: 686e 6f72 7300 746e 5070 7265 6f69 6964 nhro.sntpPeriodi 80398b0: 5363 6e69 7268 006f 6e49 7469 6154 6b73 cSinhro.InitTask 80398c0: 4800 7261 4664 7561 746c 0a3a 000d 0d0a .HardFault:..... 80398d0: 6552 6967 7473 7265 3a73 0d0a 5300 2050 Registers:...SP 80398e0: 2020 2020 2020 2020 3020 2578 3830 786c 0x%08lx 80398f0: 0d0a 5200 2030 2020 2020 2020 2020 3020 ...R0 0 8039900: 2578 3830 786c 0d0a 5200 2031 2020 2020 x%08lx...R1 8039910: 2020 2020 3020 2578 3830 786c 0d0a 5200 0x%08lx...R 8039920: 2032 2020 2020 2020 2020 3020 2578 3830 2 0x%08 8039930: 786c 0d0a 5200 2033 2020 2020 2020 2020 lx...R3 8039940: 3020 2578 3830 786c 0d0a 5200 3231 2020 0x%08lx...R12 8039950: 2020 2020 2020 3020 2578 3830 786c 0d0a 0x%08lx.. 8039960: 4c00 2052 2020 2020 2020 2020 3020 2578 .LR 0x% 8039970: 3830 786c 0d0a 5000 2043 2020 2020 2020 08lx...PC 8039980: 2020 3020 2578 3830 786c 0d0a 5000 5253 0x%08lx...PSR 8039990: 2020 2020 2020 2020 3020 2578 3830 786c 0x%08lx 80399a0: 0d0a 2500 2e30 6631 2500 0064 3025 6934 ...%0.1f.%d.%04i 80399b0: 252d 3230 2d69 3025 6932 2500 0073 6425 -%02i-%02i.%s.%d 80399c0: d020 d0b4 2ebd 2520 2064 87d1 202e 6425 ..... %d ... %d 80399d0: d020 d0bc d0b8 2ebd 3100 302e 4600 6c61 ........1.0.Fal 80399e0: 6573 7400 7572 0065 6166 736c 0065 6e6f se.true.false.on 80399f0: 2d00 3130 252d 3230 3a69 3025 6932 2500 .-01-%02i:%02i.% 8039a00: 3230 2d69 3025 6932 252d 3230 2d69 3130 02i-%02i-%02i-01 8039a10: 002d 3931 2e32 3631 2e38 2e31 0032 3931 -.192.168.1.2.19 8039a20: 2e32 3631 2e38 2e31 0031 3532 2e35 3532 2.168.1.1.255.25 8039a30: 2e35 3532 2e35 0030 7570 6c62 6369 4b00 5.255.0.public.K 8039a40: 2d4e 3330 302d 3030 3330 3000 302e 302e N-03-00003.0.0.0 8039a50: 302e 3000 2e39 3031 322e 3130 0035 4345 .0.09.10.2015.EC 8039a60: 342d 2d43 4434 302d 2d30 3030 302d 0041 -4C-4D-00-00-0A. 8039a70: 6461 696d 006e 3231 3433 0035 7375 7265 admin.12345.user 8039a80: 3100 3332 0034 3838 312e 3734 322e 3435 .1234.88.147.254 8039a90: 322e 3533 6e00 6e6f 0065 3231 2e37 2e30 .235.none.127.0. 8039aa0: 2e30 0031 a3d0 81d1 bfd0 b5d0 88d1 bdd0 0.1............. 8039ab0: bed0 5400 4f32 004b 90d0 b4d0 bcd0 b8d0 ...T2OK......... 8039ac0: bdd0 b8d0 81d1 82d1 80d1 b0d0 82d1 bed0 ................ 8039ad0: 80d1 2500 2e73 6425 7325 6425 000d 0020 ...%s.%d%s%d.. . 8039ae0: 5452 504d 4920 0049 4341 004b 434e 004b RTMP II.ACK.NCK. 8039af0: 6572 7571 7365 5f74 6174 6b73 5100 0d31 request_task.Q1. 8039b00: 5400 0d4c 5400 5100 000d 0053 0052 0d43 .TL..T.Q..S.R.C. 8039b10: 4300 0d54 4900 000d 0d46 5100 0d32 d000 .CT..I..F..Q2... 8039b20: d090 d0b2 d1b0 d080 d1b8 008f 9dd0 bed0 ................ 8039b30: 80d1 bcd0 b0d0 d000 d097 d0b0 d0bc d0ba ................ 8039b40: d1bd d183 d082 00be a0d0 b0d0 b7d0 bed0 ................ 8039b50: bcd0 bad0 bdd0 83d1 82d1 bed0 6c00 676f .............log 8039b60: 745f 7361 006b 3025 6932 252e 3230 2e69 _task.%02i.%02i. 8039b70: 3025 6932 2520 3230 3a69 3025 6932 253a %02i %02i:%02i:% 8039b80: 3230 0069 2c22 d000 d09f d1b5 d080 d0b5 02i.",.......... 8039b90: d0b7 d0b0 d1b3 d180 d083 d0b7 d0ba 20b0 ............... 8039ba0: bad0 bed0 bdd0 82d1 80d1 bed0 bbd0 bbd0 ................ 8039bb0: b5d0 80d1 b0d0 d000 d0a1 d1b1 d080 d1be ................ 8039bc0: 2081 bdd0 b0d0 81d1 82d1 80d1 bed0 b5d0 . .............. 8039bd0: bad0 d000 d09e d0b1 d0bd d0be d0b2 d0bb ................ 8039be0: d0b5 d0bd d0b8 20b5 9fd0 9ed0 d000 d0a1 ....... ........ 8039bf0: d0bc d0b5 d0bd 20b0 bfd0 b0d0 80d1 bed0 ....... ........ 8039c00: bbd0 8fd1 d000 d0a1 d1be d185 d080 d0b0 ................ 8039c10: d0bd d0b5 d0bd d0b8 20b5 bdd0 b0d0 81d1 ......... ...... 8039c20: 82d1 80d1 bed0 b5d0 bad0 d000 d090 d1b2 ................ 8039c30: d082 d1be d080 d0b8 d0b7 d1b0 d086 d1b8 ................ 8039c40: 008f a2d0 b5d0 81d1 82d1 d020 d098 d091 .......... ..... 8039c50: 009f 92d0 8bd1 bad0 bbd0 8ed1 87d1 b5d0 ................ 8039c60: bdd0 b8d0 b5d0 d020 d098 d091 009f 90d0 ...... ......... 8039c70: b2d0 b0d0 80d1 b8d0 8fd1 d020 d0b4 d1b8 .......... ..... 8039c80: d081 d1ba 2e80 d020 d1b2 d085 d0be d0b4 ...... ......... 8039c90: 20b0 0031 a1d0 bed0 81d1 82d1 bed0 8fd1 . 1............. 8039ca0: bdd0 b8d0 b5d0 d020 d1b2 d18b d085 d0be ...... ......... 8039cb0: d0b4 20b0 0031 a1d0 bed0 81d1 82d1 bed0 ... 1........... 8039cc0: 8fd1 bdd0 b8d0 b5d0 d020 d1b2 d18b d085 ........ ....... 8039cd0: d0be d0b4 20b0 0032 90d0 b2d0 b0d0 80d1 ..... 2......... 8039ce0: b8d0 8fd1 d120 d082 d0b5 d0bc d0bf d1b5 .... ........... 8039cf0: d080 d1b0 d182 d183 d180 008b 90d0 b2d0 ................ 8039d00: b0d0 80d1 b8d0 8fd1 d020 d1b2 2e85 d020 ........ ..... . 8039d10: d0bd d0b0 d1bf d180 d08f d0b6 d0b5 d0bd ................ 8039d20: d1b8 008f 9dd0 b8d0 b7d0 bad0 b8d0 b9d0 ................ 8039d30: d020 d0b7 d1b0 d180 d08f 20b4 90d0 9ad0 .......... .... 8039d40: 91d0 d000 d090 d0b2 d1b0 d080 d1b8 208f ............... 8039d50: bdd0 b0d0 b3d0 80d1 83d1 b7d0 bad0 b8d0 ................ 8039d60: d000 d090 d0b2 d1b0 d080 d1b8 208f 81d1 ............. .. 8039d70: b2d0 8fd1 b7d0 b8d0 d120 2081 98d0 91d0 ........ .. .... 8039d80: 9fd0 d000 d090 d0b2 d1b0 d080 d1b8 208f ............... 8039d90: bed0 82d1 bad0 bbd0 8ed1 87d1 b5d0 bdd0 ................ 8039da0: b8d0 8fd1 d020 d090 d09a 0091 6972 676e .... .......ring 8039db0: 7366 615f 7070 6e65 3a64 6320 726f 7572 fs_append: corru 8039dc0: 7470 6465 6620 6c69 7365 7379 6574 0d6d pted filesystem. 8039dd0: 000a 4449 454c 0900 6325 2509 0975 7525 ..IDLE..%c.%u.%u 8039de0: 2509 0d75 000a 6d54 2072 7653 0063 .%u...Tmr Svc. 08039dee : 8039dee: 722f 746f 6b65 702e 676e 0000 5448 5054 /rotek.png..HTTP 8039dfe: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 8039e0e: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 8039e1e: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 8039e2e: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 8039e3e: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 8039e4e: 6e65 2d74 654c 676e 6874 203a 3935 3935 ent-Length: 5959 8039e5e: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 8039e6e: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 8039e7e: 3a65 6920 616d 6567 702f 676e 0a0d 6143 e: image/png..Ca 8039e8e: 6863 2d65 6f43 746e 6f72 3a6c 7020 6972 che-Control: pri 8039e9e: 6176 6574 202c 616d 2d78 6761 3d65 3638 vate, max-age=86 8039eae: 3034 0d30 0d0a 890a 4e50 0d47 1a0a 000a 400.....PNG..... 8039ebe: 0000 490d 4448 0052 0100 0057 0000 08ae ...IHDR...W..... 8039ece: 0006 0000 db82 7d4e 0000 0e17 4449 5441 ......N}....IDAT 8039ede: da78 9ded ac7d 672c c059 a1cf 7a80 3285 x...}.,gY....z.2 8039eee: 4b45 1014 4db6 a62d ae0a b68a 52d8 45c7 EK...M-......R.E 8039efe: 4131 1b2d 1045 0b7a 7a53 bc69 6060 634d 1A-.E.z.Szi.``Mc 8039f0e: d894 c326 6c55 d2ac c6c5 285e 2c91 951f ..&.Ul....^(.,.. 8039f1e: 4a92 885d 4ad5 dd02 6a3f 9352 1ba2 36ac .J]..J..?jR....6 8039f2e: a246 011b 6d69 e76b 72d2 71fb 7729 df7d F...imk..r.q)w}. 8039f3e: 7793 9c75 cece 9fbc b333 7e7b fc7f 6f72 .wu.....3.{~..ro 8039f4e: 39ce fb3b bf39 e67d 9e79 79f7 9677 e5cb .9;.9.}.y..yw... 8039f5e: 000e f800 1785 0001 b900 0002 5720 0000 ............ W.. 8039f6e: 0ae4 0000 15c8 0000 02b9 2000 0057 4000 ........... W..@ 8039f7e: 00ae c800 0015 b900 0002 7200 0005 ae40 ...........r..@. 8039f8e: 0000 15c8 0000 2b90 0000 0572 4000 00ae .......+..r..@.. 8039f9e: 8000 015c 9000 002b 7200 0005 e400 000a ..\...+..r...... 8039fae: 5c80 0001 2b90 0000 5720 0000 0ae4 8000 .\...+.. W...... 8039fbe: 015c 0000 02b9 2000 0057 e400 000a c800 \...... W....... 8039fce: 0015 b900 0002 5720 0000 eae4 c19f 5f6b ...... W......k_ 8039fde: 96b7 8fdd bede 440d 3882 9a47 ff23 def3 .......D.8G.#... 8039fee: 3c96 d6df ed38 377d 7e56 009e c824 3375 .<..8.}7V~..$.u3 8039ffe: dae5 8c17 1304 5cc1 b4b0 de40 aa6e 138e .......\..@.n... 803a00e: 4d23 0ae4 75c8 ca3f 4655 89a5 6192 2966 #M...u?.UF...af) 803a01e: 3ad3 7532 44fc 1fdd 4522 80ae b75c ae56 .:2u.D.."E..\.V. 803a02e: 8ab1 974e 202d 3b45 a644 15c8 eb90 c936 ..N.- E;D.....6. 803a03e: 4655 8b8f a496 645a 3441 5c8b b901 ba6e UF....ZdA4.\..n. 803a04e: bb5c d524 b4b2 08c1 22b9 4057 9bae d724 \.$......"W@..$. 803a05e: a1d8 5530 2cc5 2450 231b e457 c801 cbb5 ..0U.,P$.#W..... 803a06e: 9572 da97 0763 cdd1 edd5 1557 48ff 5db3 r...c.....W..H.] 803a07e: 512b 9bb7 e63b 2364 0ae4 5c80 26bb bed7 +Q..;.d#...\.&.. 803a08e: 0a45 5320 ae05 47a1 45b1 78ea 8b13 844e E. S...G.E.x..N. 803a09e: 3f6c bd16 2b90 d720 caee 6475 7971 54df l?...+ ...udqy.T 803a0ae: 2951 48b1 8c27 2b91 7200 5b6d 13ae a943 Q).H'..+.rm[..C. 803a0be: 95b6 ecdf 3c59 08d6 02b9 d720 e5a6 191a ....Y<.... ..... 803a0ce: 38e4 1d67 1a2a 0cf5 d922 7ef9 2c10 0572 .8g.*..."..~.,r. 803a0de: dae4 b91d 8aea b5d5 a9dd 9857 1023 9c7b ..........W.#.{. 803a0ee: 302b ccd4 cec9 7db7 017e 0572 dae4 b90d +0.....}~.r..... 803a0fe: 8aea 6675 a521 caa1 ce77 722c 63b8 c28b ..uf!...w.,r.c.. 803a10e: a458 04ba 75f6 8b04 015c b6b9 572f b15d X....u..\.../W]. 803a11e: 86a6 9d42 faee ea5f 189a bd16 adf6 9160 ..B..._.......`. 803a12e: 202b 4d57 06b9 ec14 53d4 532b d2a4 a105 + WM.....S+S.... 803a13e: 6f57 4a65 3af4 ec52 a46b e609 15c8 2b90 WoeJ.:R.k......+ 803a14e: f572 58cd 6443 8efd 892e 34cd 69a3 c11d r..XCd.....4.i.. 803a15e: 904e 202b e457 8bea 07a1 f6b1 2d03 f55f N.+ W........-_. 803a16e: d4bd 4755 09b0 0572 8ae4 7d5c 59e4 4733 ..UG..r...\}.Y3G 803a17e: 8eb1 bb76 b435 7525 6c14 4db6 041d 15c8 ..v.5.%u.l.M.... 803a18e: ab90 5c81 0a3d 2eb6 1acf 88d7 6279 9059 ...\=.......ybY. 803a19e: 6b4a 0be6 e6ac 8c0a 872c d76e 122d 13a8 Jk......,.n.-... 803a1ae: 0cec 02b9 4572 a1ae 01d2 4f23 0c8b 4bf2 ....rE....#O...K 803a1be: 5d62 af1f e749 5d41 4007 f0e2 91fc 202b b]..I.A].@....+ 803a1ce: e457 56ba 8b8e e89a 87d2 2758 2e01 4db1 W..V......X'...M 803a1de: ba96 09d6 5c76 1e93 9088 202b 7dd7 5726 ....v\....+ .}&W 803a1ee: c147 35a6 a185 51c8 f3ac 9606 eac4 752e G..5...Q.......u 803a1fe: 13ad 7cec bb9b 9007 202b e6d7 5ae4 c457 ...|....+ ...ZW. 803a20e: 1d8a b472 8ba6 9a0c da9a af35 bfc9 dd56 ..r.......5...V. 803a21e: 87b6 015c eeb9 b933 0a5a b536 074c 01a4 ..\...3.Z.6.L... 803a22e: a5e6 9e46 0ae6 f6b8 8eb0 35b7 457a 80ae ..F........5zE.. 803a23e: 9b5c 6b91 d45d abda dad8 c7c5 8322 2155 \..k].......".U! 803a24e: 6749 b5d8 f6e9 3ad9 1d82 7e7a 905d 202b Ig.....:..z~].+ 803a25e: 6dd7 ab95 60a1 8b13 f9cb e2ba 8e97 2358 .m...`........X# 803a26e: fc75 376c 52ec 9d57 d61e 22c8 f732 ea91 u.l7.RW...."2... 803a27e: 0d58 f1ad 58c5 ae3d 2ab4 afda 6b91 8824 X....X=..*...k$. 803a28e: a905 2c60 8198 9277 6bc2 323e bdbc 07ae ..`,..w..k>2.... 803a29e: de5c 1ebf 7572 ec17 22c2 ab3a 074b 1ac4 \...ru...":.K... 803a2ae: 542d 52b6 19b5 5873 d827 4589 baf4 20f0 -T.R..sX'..E... 803a2be: a6d7 a956 f38d 65ef 5c89 7523 cf82 4b05 ..V....e.\#u...K 803a2ce: ce08 f0a8 cffa 6e0c 2bab 89d7 63e5 04cb .......n.+...c.. 803a2de: 227d 7757 f6b9 842d 73d3 85ec 049d 4892 }"Ww..-..s.....H 803a2ee: 22dd c481 48b2 5a95 14a4 5f5c 50fb d7c8 ."...H.Z..\_.P.. 803a2fe: ca3e b5c9 70e7 8212 713d 5ce1 0ccd 3b6e >....p..=q.\..n; 803a30e: 280e c5d6 ac4a d5c8 b05d 4555 be9b 36c5 .(..J...].UE...6 803a31e: 332f 8b8f 6c0c 9377 2c8d 1b3b be6c 5c4c /3...lw..,;.l.L\ 803a32e: 5b0a ddc3 e696 082d c6b9 24ea 7445 90ed .[....-....$Et.. 803a33e: 473f 8e7b 6f51 0af1 f6c4 63ea 6eae ce4f ?G{.Qo.....c.nO. 803a34e: 93d5 1760 6d86 914a fae5 26fb aac4 5823 ..`..mJ....&..#X 803a35e: 22db b4d5 39e2 e887 0e2b 77ca e07c cb33 ."...9..+..w|.3. 803a36e: 5f0b 3177 6b92 4587 fce1 1d8c 5ea3 621f ._w1.k.E.....^.b 803a37e: 169d 8ac5 dd5c dae4 b8b3 1fb4 1659 7478 ....\.......Y.xt 803a38e: a897 3aae 7a01 8f25 6875 0ab8 a6cb 7607 ...:.z%.uh.....v 803a39e: 916c b052 185d dd31 716d cd98 bf99 07fd l.R.].1.mq...... 803a3ae: ae88 8a1d d339 f0d4 91f6 b167 e84e 7016 ....9.....g.N..p 803a3be: ab6c 9430 cf4c d230 aaad 8fb8 fd76 892e l.0.L.0.....v... 803a3ce: 348d cd66 6dd6 bd97 8c30 a344 5d00 8b03 .4f..m..0.D..].. 803a3de: e536 8cfa bd3f d10d 43b5 90ea 5d1f 9c94 6...?....C...].. 803a3ee: 7ddb 9cc3 6ead 018a 3ab9 7608 5862 ef05 .}...n...:.vbX.. 803a3fe: 885b a7ac 06d1 5b65 8a14 3a35 fa0e 8b1e [.....e[..5:.... 803a40e: 3354 d3cf 5ab2 c51f a3f8 de87 ec85 679a T3...Z.........g 803a41e: 3858 e72f 510e 8baf 1358 5cfa ca3d 20b5 X8/..Q..X..\=.. 803a42e: 45d8 915d f0a6 a9f7 a445 f13b c8b4 f7c0 .E].....E.;..... 803a43e: c098 a2c8 5548 fcf5 be6d 9018 feeb 5fa4 ....HU..m......_ 803a44e: 2738 a36d d8de ac52 c959 4063 beae 7ae4 8'm...R.Y.c@...z 803a45e: fae0 4ee9 d4dd 57fd e9bc 45ad cf21 f2ea ...N...W...E!... 803a46e: 059b d719 6cb5 1af9 52e2 d827 61be 73ce .....l...R'..a.s 803a47e: 2161 d344 892f a2c4 accd 508a cd72 9537 a!D./......Pr.7. 803a48e: 102f f7a3 814e 65be 99b4 68f8 42b5 feae /...N..e...h.B.. 803a49e: dae5 7213 891d 9c76 a4a5 144c eff2 72f2 ...r..v...L....r 803a4ae: 2715 4ee1 ce5d dcf1 2e4b 8937 7d74 720f .'.N]...K.7.t}.r 803a4be: 5919 a244 8255 0c8b dda3 7038 80a7 61af .YD.U.....8p...a 803a4ce: 3a35 cd72 8454 5654 8938 241d 6b1b 5a92 5:r.T.TV8..$.k.Z 803a4de: 0de4 0363 ab4c b1e8 f267 e7af 22d0 b5ea ..c.L...g....".. 803a4ee: eb15 cd7c 8a7b 2b5c 845e 87fc 5532 881f ..|.{.\+^...2U.. 803a4fe: b455 9b61 598f b90a ab66 88e3 7093 ab26 U.a..Y..f....p&. 803a50e: dfcb d577 f7fb 2c84 795b 62f2 8f91 2563 ..w....,[y.b..c% 803a51e: 9cd7 8d60 5f8a f43f dff6 79da afe5 dc1c ..`.._?....y.... 803a52e: c9f9 5e37 23ba 6bee 95e7 bfaf ef64 1e98 ..7^.#.k....d... 803a53e: 440a 4599 c4b7 593a 9e66 2cbe 8666 6b51 .D.E..:Yf..,f.Qk 803a54e: e388 7f2e cde2 56bf 0276 6af6 ba4e 52c8 .......Vv..jN..R 803a55e: b1b0 49e6 3a9d 8244 1a3b dd8f f8a5 9be4 ...I.:D.;....... 803a56e: e2d4 78f1 b56b ae42 27ff 9ed7 d6fa bb1a ...xk.B..'...... 803a57e: d38a f217 14e4 9412 258f 2215 564c 1c97 .........%."LV.. 803a58e: e235 8b4a 7d42 a5f9 bebf ae56 1fa2 e773 5.J.B}....V...s. 803a59e: 5ffc f64d e67e a970 f7dd cb24 2799 9ab9 ._M.~.p...$..'.. 803a5ae: fd2c 849d ab92 6443 fb13 4cae 98e7 563a ,.....Cd...L..:V 803a5be: 7dcf ee3e b038 675c 9c0d 13a7 b706 cbd4 .}>.8.\g........ 803a5ce: dd35 bc94 9092 5ce4 ba46 5fa7 e1fd 96bd 5......\F.._.... 803a5de: b29f 97e2 a894 5ca9 166b 4444 7d16 a6bb .......\k.DD.}.. 803a5ee: 9cb2 8c5a 3465 9c79 e2ae 6ed6 92ef 8def ..Z.e4y....n.... 803a5fe: 914d b2c3 6dca 0512 0c2e b223 9190 1462 M....m....#...b. 803a60e: ae58 f3a1 c9d8 a980 db58 d725 08b2 ecf7 X.......X.%..... 803a61e: 8e2b 9dec 52d0 e72e 3c1d 2d64 9ad7 7608 +....R..... ..\.. 803a69e: d542 5738 4ac0 bf2d f351 9fb7 28f8 5982 B.8W.J-.Q....(.Y 803a6ae: 10a6 4216 e3ae 6895 e575 26ba 9045 806e ...B...hu..&E.n. 803a6be: 275c 9116 3aeb 3646 68cb 850b 91ac c9e5 \'...:F6.h...... 803a6ce: 0717 ab90 2569 34dc d195 eb76 7155 6b86 ....i%.4..v.Uq.k 803a6de: c8c8 4235 0dae 62b7 d019 2753 fc90 a7c0 ..5B...b..S'.... 803a6ee: 70aa 0f35 5a2d d119 810a b6f6 ae58 36b3 .p5.-Z......X..6 803a6fe: 0e17 d214 4b01 ee8d 2680 3ae5 841e 14eb .....K...&.:.... 803a70e: b7e8 d620 c799 bae7 341c e9dc 5c80 621b .. ......4...\.b 803a71e: b425 07dc 1135 dbd2 5ceb 3108 4961 5cca %...5....\.1aI.\ 803a72e: 2076 c954 44b5 33b0 82c3 1b53 ed72 5892 v T..D.3..S.r..X 803a73e: 0ee7 099f 28d3 e473 b2f9 167d 8d38 fa11 .....(s...}.8... 803a74e: 3cf2 8a74 39c2 457a edae 75c8 290f f93d ...6 803a7ce: 5791 145d ba15 7fc1 82da e35c f38a edaf .W].......\..... 803a7de: 1a82 0d72 d724 62b4 b91d a8f7 1577 cad9 ..r.$..b....w... 803a7ee: aa7c bc8f caad c6ff b905 2d8e cb06 ee84 |..........-.... 803a7fe: 6d8b 407d 5cb6 b74d 6a26 6d75 3792 c2f9 .m}@.\M.&jum.7.. 803a80e: 0c5c 6fda 6ff0 3663 d442 a742 8b00 5a08 \..o.oc6B.B....Z 803a81e: 6b96 586c 8824 7894 b927 84ee 50c8 7bae .klX$..x'....P.{ 803a82e: 009d d2ea f7be 8b8a 1b2f 4929 16ba 620c ......../.)I...b 803a83e: 8dcb 6304 de8b 9b52 c37d 1f5a 2d90 d823 ...c..R.}.Z..-#. 803a84e: 8235 95b5 30eb 09c0 ba1e bfc1 1ded da07 5....0.......... 803a85e: 514c 90f4 736b ed72 445b d904 0f9a f690 LQ..ksr.[D...... 803a86e: 59e5 ae4e 423b 7bae d3b9 6895 225d 1fda .YN.;B.{...h]".. 803a87e: cb7f 4ce1 15e6 c50d 3a67 b042 a1e7 7fd1 ...L....g:B..... 803a88e: 56de ab31 dbd0 2aea d357 fc66 e7a1 6663 .V1....*W.f...cf 803a89e: 3b81 4c1b c187 d194 b00f e081 32dc 9f02 .;.L.........2.. 803a8ae: d720 0b66 a65a b879 a7a9 fa0f 391e eeb9 .f.Z.y......9.. 803a8be: 3ffd 8b97 6d4a e12f 7e64 30b1 a654 09aa .?..Jm/.d~.0T... 803a8ce: 6e7f 9c58 1c4a fd1b 1f5b 2d90 dcbe 2c7c .nX.J...[..-..|, 803a8de: 348f 17cd 0166 b872 e9a6 d0ab b3fd cca6 .4..f.r......... 803a8ee: c52d 391a c54c 21ea e6d7 3ae4 5c33 9daf -..9L..!...:3\.. 803a8fe: 4458 2326 bc75 d551 9b9b eb93 bbff bcf4 XD&#u.Q......... 803a90e: f5e0 b66f 422a b9c8 6a06 c1a6 3578 a620 ..o.*B...j..x5 . 803a91e: 55d0 b7d0 cb58 363f 3b4c 2eb8 1d7b 1c56 .U..X.?6L;..{.V. 803a92e: 3527 fe1c c7b2 0ecb a6ff 6a8f 34f2 d450 '5.........j.4P. 803a93e: b214 1e0a 7fb2 67d6 a360 1afb 1236 22bd .......g`...6.." 803a94e: 7b57 86c6 4691 1964 2c49 690a b184 646e W{...Fd.I,.i..nd 803a95e: e420 8f9a 8d66 0e3a 9464 2226 54d9 faae ...f.:.d.&".T.. 803a96e: 912a c4eb 8262 c2d6 6871 e98b ec80 c6be *...b...qh...... 803a97e: 5792 4dd7 b309 11c0 6ea0 64c4 343b a77a .W.M.....n.d;4z. 803a98e: 5103 cfb1 9c94 14ae 26d3 57a2 6ae4 d0cf .Q.......&.W.j.. 803a99e: ef22 b53a e378 15fa ff09 d14a b92a 4f16 ".:.x.....J.*..O 803a9ae: a36e 6d6f a139 2e4b cdad b5c9 772a f0ba n.om9.K.....*w.. 803a9be: 53b8 136e b203 8ea7 3572 6969 d9b2 69af .Sn.....r5ii...i 803a9ce: 0832 2053 cd33 6715 0683 ebaa 9e81 7f6b 2.S 3..g......k. 803a9de: a04d 8593 5e8e ab91 913d 65c5 6257 8df9 M....^..=..eWb.. 803a9ee: 175f acf1 630a df5a a2ac 3580 8934 d446 _....cZ....54.F. 803a9fe: b20a e554 2746 b79e ef14 b6ed 2037 48db ..T.F'......7 .H 803aa0e: 15d8 badb 45d4 a382 91c0 9752 6406 7977 .....E....R..dwy 803aa1e: 185b cb1f 6367 dae4 0acc 99ad 1145 6162 [...gc......E.ba 803aa2e: 1559 189e 965c 3525 cd72 8157 0667 ec51 Y...\.%5r.W.g.Q. 803aa3e: a2a2 a0ab 7b6a 85f0 be63 d435 ec80 d778 ....j{..c.5...x. 803aa4e: 9edf 9359 89c2 b7d7 52b9 6cb0 eff2 80d2 ..Y......R.l.... 803aa5e: 2eec f731 5858 4e34 207b 3757 1646 ad79 ..1.XX4N{ W7F.y. 803aa6e: 61c4 b33d 8449 a992 e76f 855e ad5c 2b24 .a=.I...o.^.\.$+ 803aa7e: abb7 2831 c564 5b16 bb8a 0a76 21a4 1ae4 ..1(d..[..v..!.. 803aa8e: 0662 8584 5c14 e7ab 07a1 7764 ba89 3ae7 b....\....dw...: 803aa9e: 1909 22bd 70d7 81a9 6599 3af4 c8d5 6539 ...".p...e.:..9e 803aaae: 1f16 58b2 4a33 8ad1 64b4 9714 25db 2aa1 ...X3J...d...%.* 803aabe: 9d6a faec f5d9 c435 6c80 e5a3 0db4 2109 j.....5..l.....! 803aace: 68b3 09fb ecb9 9375 9ae5 fc0e c716 a28c .h....u......... 803aade: e457 ceea e2d4 ae1b 292e d63f fa90 32c4 W........)?....2 803aaee: d222 14a9 3a27 9702 9c91 01da b477 1ada "...':......w... 803aafe: a07c 3dbf dcf8 df70 df2c b203 728d f2ae |..=..p.,....r.. 803ab0e: a48b b121 03f6 b65f 0e9b 4ec8 5836 f1ae ..!..._....N6X.. 803ab1e: 6fc0 8427 b1d1 6b91 a5d8 33b0 3c87 8e99 .o'....k...3.<.. 803ab2e: 7b04 b24a 91a6 42ec 1073 5688 22d4 6ea7 .{J....Bs..V.".n 803ab3e: 96c9 12ad 4eb9 862c b8c1 ceae 42ca d16c .....N,......Bl. 803ab4e: bf2d 3a44 d628 1a26 7bfc 2c1b 5ed7 9cc0 -.D:(.&..{.,.^.. 803ab5e: 0cf2 36b9 7233 6170 0df1 d3a7 620e 0972 ...63rpa.....br. 803ab6e: 1c37 dfac 36d9 edcb 30c0 5c34 de57 f9d3 7....6...04\W... 803ab7e: 9776 5b2d e3ab f46a 6691 6286 e935 3573 v.-[..j..f.b5.s5 803ab8e: 0d99 ed3b 5c88 0e17 9aab 7642 b40a bdb9 ..;..\....Bv.... 803ab9e: c84b 014e 435f 6269 1ae4 ae5e 6589 5675 K.N._Cib..^..euV 803abae: 5be7 3273 bf08 a68b bcae bab3 b1d9 1252 .[s2..........R. 803abbe: be2f daf2 d6ba d4a9 ae42 edba e358 00dd /.......B...X... 803abce: 1abb 9404 d4eb fdf1 a26d dfc1 47a6 6db7 ........m....G.m 803abde: 0d66 3ea4 c866 99b5 d961 cb0b 3408 ccd1 f..>f...a....4.. 803abee: f695 203b 48d8 3fa3 1330 9d72 44d6 91ad ..; .H.?0.r..D.. 803abfe: 5ca5 8d23 3368 2109 35d7 5b83 a35c a1d5 .\#.h3.!.5.[\... 803ac0e: f787 a9a4 ff06 4b7e 0763 1a9b 9d74 8ef9 ......~Kc...t... 803ac1e: 915e 336b d7b9 5cba 6e97 7343 301a cd8a ^.k3...\.nCs.0.. 803ac2e: 58e7 35a7 aaf9 aeda ef82 723d 75d4 5645 .X.5......=r.uEV 803ac3e: 0b5d 64d5 1e4d de36 b40d 971f e8a7 316d ]..dM.6.......m1 803ac4e: b0f0 736d 9d43 6502 919f 8a91 bad8 da2e ..msC..e........ 803ac5e: a0d1 ae99 0588 6d72 b226 399b 9114 ab74 ......rm&..9..t. 803ac6e: 99ff c967 1546 07b3 eeaa 36a7 3d8a 8afb ..g.F......6.=.. 803ac7e: ae23 021d 229d 9727 c5b9 3809 b1f6 057b #...."'....8..{. 803ac8e: 0e6c d5c8 f6ff 992f 0f43 c8eb 5f22 5897 l...../.C..."_.X 803ac9e: 768a d9a8 5069 f977 995a 958b 0c63 a32d .v..iPw.Z...c.-. 803acae: 2eca b5ca e5f8 ab12 2cf7 435d 91dc 397c .........,]C..|9 803acbe: d720 d8ad 30a0 cc75 0d7b 2f2d e73f 9db9 ....0u.{.-/?... 803acce: 860e c325 d387 375c cd81 4fe5 26bf 9dfa ..%...\7...O.&.. 803acde: 08d5 3c76 df28 7671 e553 800a 5b5c fdd8 ..v<(.qvS...\[.. 803acee: 4eb5 8960 0446 ef3c ee48 a4ca b698 8bf6 .N`.F.<.H....... 803acfe: bce5 8783 ad8a c85a 9015 722b cab5 6663 ......Z...+r..cf 803ad0e: f703 0245 a0e9 16dd 9b18 4802 f15c f798 ..E........H\... 803ad1e: 8b04 015c 22b9 90d7 03dd f2ba 39ea 980c ..\..".......9.. 803ad2e: d970 b2f1 f9a7 8cd8 6f22 d8b9 a1c0 0b15 p......."o...... 803ad3e: 02b9 4572 daae ac3d bdba 3d87 3395 150d ..rE..=....=.3.. 803ad4e: 66c9 5206 77cd ac37 e45b 3550 c0ff dfa8 .f.R.w7.[.P5.... 803ad5e: b912 7202 ae45 fdb6 7373 49c3 8948 14ea ...rE...ss.IH... 803ad6e: 21f0 d35a 838e e2b2 5555 365e 16dd 22c1 .!Z.....UU^6..." 803ad7e: 400c ddae ab92 0f6e 666b f8d1 5abc 3339 .@....n.kf...Z93 803ad8e: f752 d551 bddc 2f9a c930 09b5 5cf9 9b02 R.Q..../0....\.. 803ad9e: cc59 ddb0 c128 0c22 ae40 93dd e9ab 024e Y...(.".@.....N. 803adae: 8ebd 507d 037a 69fd 89f7 fae1 64f4 0453 ..}Pz..i.....dS. 803adbe: 308b b900 5376 a6ae 2203 1dc6 4068 0c8f .0..vS..."..h@.. 803adce: 163b 1ac6 7651 3ae6 1463 02b9 4572 d6ae ;...Qv.:c...rE.. 803adde: a883 3507 b55b 1034 9aa9 81b6 0625 9ec7 ...5[.4.....%... 803adee: 98fb 8a65 015c 22b9 b2d7 ce08 9174 d4c0 ..e.\.."....t... 803adfe: c0f3 aa8f b125 67a1 4691 cf25 617f a913 ....%..g.F%..a.. 803ae0e: 5723 ae40 d5c8 7c66 badf 7668 da25 87be #W@...f|..hv%... 803ae1e: 3508 d819 66ed 3ae0 b48b b04c f3b6 9146 .5...f.:..L...F. 803ae2e: 202b e457 bf6a 6029 174d b8c0 ae62 ac40 + W.j.)`M...b.@. 803ae3e: 9e7e 2f9f d2e0 e5c6 166b 9969 c760 c72e ~../....k.i.`... 803ae4e: ae44 5c80 6b91 96d7 b6ba ee31 9d70 8760 D..\.k....1.p.`. 803ae5e: 5e21 e463 c80a 7f75 d5ca 3aa6 c5df b125 !^c...u....:..%. 803ae6e: 043e 859b 94e8 ae40 5c80 aff7 8b5c 5d92 >.....@..\..\..] 803ae7e: 2474 6d52 5ba2 df21 35a6 7221 e405 5c8a t$Rm.[!..5!r...\ 803ae8e: 3343 6834 f7e0 69b9 d25e 73c2 bbed 5ce6 C34h...i^..s...\ 803ae9e: 2b91 5720 6ae4 cd13 5aae 7ca5 b447 750b .+ W.j...Z.|G..u 803aeae: 64dc c5b0 f393 2b91 5720 aae4 db2b 0ed5 .d.....+ W..+... 803aebe: 7503 0573 12f2 a99d 74c8 59d5 dbd0 1f2f .us......t.Y../. 803aece: e476 c80a 0015 9000 002b 7200 0005 ae40 v.......+..r..@. 803aede: 0000 5c80 0001 2b90 0000 0572 0000 0ae4 ...\...+..r..... 803aeee: 8000 015c 9000 002b 2000 0057 e400 000a ..\...+.. W..... 803aefe: 5c80 0001 b900 0002 5720 0000 0ae4 0000 .\...... W...... 803af0e: 15c8 0000 02b9 2000 0057 4000 00ae c800 ....... W..@.... 803af1e: 0015 b900 0002 7200 0005 ae40 0000 15c8 .......r..@..... 803af2e: 0000 2b90 0000 0572 4000 00ae fb00 ae5c ...+..r..@....\. 803af3e: f63f 6685 ca79 1883 db0e 3781 001f 6b90 ?..fy......7...k 803af4e: b940 75b6 9aff 3f92 cb76 ad45 89c3 d002 @..u...?v.E..... 803af5e: b96d 761e eb90 0433 0917 283e 82f8 41e0 m..v..3...>(...A 803af6e: 49c1 23c1 7f82 dc13 7822 e087 0d79 f5cb .I.#...."x..y... 803af7e: 824d 3af3 d72c 0b97 412e 00ae 2bdb 8bd7 M..:,....A...+.. 803af8e: 9905 5c85 2e9f 4cb8 9ff0 a582 2706 d704 ...\...L.....'.. 803af9e: be0b 01bb 1eb9 7c10 7045 60a7 83b7 dd72 .......|Ep.`..r. 803afae: dc15 f821 e09a c859 6015 e4fb 103a 213c ..!...Y..`..:...\?.F.:r.[ 803b29e: 0a70 0572 2308 a4d7 9044 ac7f d621 9577 p.r..#..D...!.w. 803b2ae: eedc 6a4b 9665 c8e9 7cc1 7ae4 8543 de8c ..Kje....|.zC... 803b2be: 905d 3dd7 bfaa 4ab5 7160 e661 8980 0f5c ]..=...J`qa...\. 803b2ce: f455 eab4 75c8 eea9 943f 2f5c b5c8 d95e U....u..?.\/..^. 803b2de: 55c8 1872 02b9 9184 6cab fffa 495c d4fb .Ur......l..\I.. 803b2ee: 2a6b 7924 e091 92c9 0245 5967 73ce e7cd k*$y....E.gY.s.. 803b2fe: 6f5c 235b b7a2 a417 eff5 456a 9d56 df20 \o[#......jEV. . 803b30e: 996a 3d73 7055 079f ceb9 8a4b 3e6c 2ae4 j.s=Up....K.l>.* 803b31e: 0317 55dc 4d21 b95d 2fde 9088 402b 8298 ...U!M]../..+@.. 803b32e: 19d6 8782 b20b 4fbc 3df0 c31a 9658 572a .......O.=..X.*W 803b33e: ae7b b0c3 7cec c0b7 3531 35bf a12f 8583 {....|..15.5/... 803b34e: a725 0472 59e1 c59a 8fa8 6ee5 9377 5c81 %.r..Y.....nw..\ 803b35e: a9af bc99 2ba5 65d7 12e5 7b5e 26b9 c215 .....+.e..^{.&.. 803b36e: 9134 e4ab e45a 100a 5bae 6de0 9725 b7f9 4...Z....[.m%... 803b37e: c8a9 f576 cf37 7c13 f0a5 4f37 48aa 65d6 ..v.7..|..7O.H.e 803b38e: 8227 3eaa d7d7 9e0a fdcc 01ee 4795 6dd5 '..>.........G.m 803b39e: fffc 45ba eb9f 0bf7 f71e d728 52ff b091 ...E......(..R.. 803b3ae: b92f 5b3e af70 b947 109e 04bc 02b9 9184 /.>[p.G......... 803b3be: 94ab 5fe8 0897 a476 7f7e 64a0 cb18 1653 ..._..v.~..d..S. 803b3ce: 3809 f36c b652 eb42 8555 5909 6252 1ae7 .8l.R.B.U..YRb.. 803b3de: fe34 5717 3d68 5357 53ae 998d 26b1 9572 4..Wh=WS.S...&r. 803b3ee: a1fc b947 5d5e 4b23 b953 6e4a ae45 e100 ..G.^]#KS.JnE... 803b3fe: 1116 5f3c 50f0 9e41 0b8f 447e 5370 5889 ..<_.PA...~DpS.X 803b40e: f3af 87b8 a0d6 3664 f1c0 d4c2 9fa9 1036 ......d6......6. 803b41e: 4beb ab0a 74b3 0b67 4abc 2073 a9b7 1f5c .K...tg..Js ..\. 803b42e: 1157 abb1 cf5c f350 7d59 55cb 6af2 0ae4 W...\.P.Y}.U.j.. 803b43e: 6e10 d685 4b1b fa24 4988 ab2f 06c3 7f85 .n...K$..I/..... 803b44e: 46b5 324c fd7a 0379 cab1 b4bd a5fe dfd0 .FL2z.y......... 803b45e: 02fa b90d c2ca ddd3 729a e995 9b89 2715 .........r.....' 803b46e: 6f34 69f3 720f 94fd 28a6 a84f ae19 0792 4o.i.r...(O..... 803b47e: 6f34 8f73 e9e0 15c8 dc20 d7f2 28b2 cf35 4os..... ....(5. 803b48e: aabc d597 ae41 2e2f 73cc ed5d f040 0306 ....A./..s].@... 803b49e: feb1 daa0 70b4 9a59 ad6b eb96 cb61 656d .....pY.k...a.me 803b4ae: f84c 0719 c6b9 929a e174 c89d 2015 5c9c L.......t.... .\ 803b4be: 134f 797c 588d 4165 85eb b701 2ed6 89db O.|y.XeA........ 803b4ce: e640 cf40 28d6 fd5e c39e 044e c872 fdcb @.@..(^...N.r... 803b4de: 9206 57bc e4f5 50de 78f2 b8ab 6d5b 68bc ...W...P.x..[m.h 803b4ee: d72a d453 563c 495d 213e 41b8 af71 edc1 *.S.!.Aq... 803b4fe: 141e 177c 0572 3708 65b8 3250 f03e d511 ..|.r..7.eP2>... 803b50e: b58a 5013 abae b43d 978e b044 0bb7 54ae ...P..=...D....T 803b51e: 3fbf ed5f 25a5 cda3 af8f 7bc9 6f5e 87b0 .?_..%.....{^o.. 803b52e: b5d6 1186 69a8 35ce 61cf b90b 321e 408c .....i.5.a...2.@ 803b53e: 726d 2bae 43ae 00ae a761 bd62 b6cf cae5 mr.+.C..a.b..... 803b54e: ae51 be92 eec3 8faf ee18 fafe 0603 d379 Q.............y. 803b55e: dcfc 33d6 0f15 de1b 01f6 2915 caeb 54f5 ...3.......)...T 803b56e: ecd5 226f 87c8 6705 ee2a bc32 1cad 7dae ..o"...g*.2....} 803b57e: 720e 0805 5727 6339 1fe0 5c95 f0af 9e31 .r..'W9c...\..1. 803b58e: 40d0 3bae f2ea f2f9 90c2 2aea a84e f568 .@.;.......*N.h. 803b59e: ed74 fd35 dd4f a65e c629 7206 a3fd 7206 t.5.O.^.)..r...r 803b5ae: 45ad 8b3e 015c cec2 7d73 bad9 81f1 c80d .E>.\...s}...... 803b5be: 3f35 fb14 9522 94df 5a83 541e fa82 5a86 5?.."....Z.T...Z 803b5ce: fb06 8217 a877 012e 21b3 76d5 bfbb c3fa ....w....!.v.... 803b5de: b0df 60ec a270 9800 3ff3 637f aecb 24e6 ...`p....?.c...$ 803b5ee: 24ed 0000 0000 4549 444e 42ae 8260 .$....IEND.B`. 0803b5fc : 803b5fc: 722f 6c6f 2e65 736a 0000 0000 5448 5054 /role.js....HTTP 803b60c: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 803b61c: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 803b62c: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 803b63c: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 803b64c: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 803b65c: 6e65 2d74 654c 676e 6874 203a 3332 3934 ent-Length: 2349 803b66c: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 803b67c: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 803b68c: 3a65 6120 7070 696c 6163 6974 6e6f 782f e: application/x 803b69c: 6a2d 7661 7361 7263 7069 0d74 430a 6e6f -javascript..Con 803b6ac: 6574 746e 452d 636e 646f 6e69 3a67 6720 tent-Encoding: g 803b6bc: 697a 0d70 430a 6361 6568 432d 6e6f 7274 zip..Cache-Contr 803b6cc: 6c6f 203a 7270 7669 7461 2c65 6d20 7861 ol: private, max 803b6dc: 612d 6567 383d 3436 3030 0a0d 0a0d 8b1f -age=86400...... 803b6ec: 0008 0000 0000 0a04 58b5 8eef c6db 7f11 .........X...... 803b6fc: de15 b8c6 2d23 2d1e a939 8b0b 13c7 677c ....#-.-9.....|g 803b70c: 7637 b3e0 9c83 a68a 1838 72c6 2577 47d1 7v......8..rw%.G 803b71c: 5971 a972 7ab3 a027 d035 2d4f b410 8a9f qYr..z'.5.O-.... 803b72c: 687e 37d0 8b48 0818 26d0 a0cf a37b 76fe ~h.7H....&..{..v 803b73c: 8a49 ce94 8db2 8502 44ed 9ddc 9d99 3f9d I........D.....? 803b74c: 99bf 51d9 3091 c915 62c4 a099 9c4a e116 ...Q.0...b..J... 803b75c: 3a33 c68b af54 ced9 8ce5 1666 b80d c564 3:..T.....f...d. 803b76c: 2454 2bca 1e89 42c5 d97f 4784 e233 d4f8 T$.+...B...G3... 803b77c: 3163 f3cd 7467 022a 1792 4261 c467 8cd7 c1..gt*...aBg... 803b78c: 56e1 22c6 5f06 e6d8 9303 7f85 cd21 35f6 .V."._......!..5 803b79c: 4bbf 9a3d 22a6 c7e1 2893 76e6 18e8 2c81 .K=.."...(.v..., 803b7ac: db38 4aa6 111c 7dc7 e6df 9f0b 759d 785f 8..J...}.....u_x 803b7bc: 9251 ec88 f0f1 69e4 77b0 ad40 2649 0146 Q......i.w@.I&F. 803b7cc: 4499 92b9 dcd9 a89b 4c69 970e 58ff b4fe .D......iL...X.. 803b7dc: e7fc 1ff5 dfaf 7f2c feb8 5ac6 0dfe 3f9f ......,....Z...? 803b7ec: bf5e feb9 fe1d 6fff 79fc 5f8b 1ddf a1dc ^......o.y._.... 803b7fc: 7b87 3b2e bdeb 625b e691 6f2f bd4a 3dfe .{.;..[b../oJ..= 803b80c: fe64 fd74 f2cd e5c7 cb0f d6b7 aff2 3fcb d.t............? 803b81c: bf2f 252d 3b91 e46b 7041 2511 5e5c b178 /.-%.;k.Ap.%\^x. 803b82c: c664 5e15 d54a 8124 0785 16e6 832d b853 d..^J.$.....-.S. 803b83c: 266f 9f48 b9dc e871 2976 bbbb d1b6 a6fd o&H...q.v)...... 803b84c: c71c d70d af2c bb8f d6b9 dac3 bb2d f672 ....,.......-.r. 803b85c: 3888 2c6b 59d4 ea8c baa8 5365 32e7 aa13 .8k,.Y....eS.2.. 803b86c: 12c8 e56b b19d 5550 1d08 9fcd 5070 f434 ..k...PU....pP4. 803b87c: 170c 8f3e 4892 3e69 0b16 3d9a 9449 66c8 ..>..Hi>...=I..f 803b88c: b634 3455 b215 8e50 0acb 6bb8 ac7a 4129 4.U4..P....kz.)A 803b89c: 56e5 41eb d42e b68a e245 c4f6 ada7 6203 .V.A....E......b 803b8ac: 7e39 285e 7644 54a5 292c faff e9e4 c943 9~^(Dv.T,)....C. 803b8bc: 826c 1c3d b1e0 3471 9d20 1813 cbdc bc28 l.=...q4 .....(. 803b8cc: b530 971d fe7c 4868 fadc 605a 22e7 4a16 0...|.hH..Z`.".J 803b8dc: 4b1c 1e79 9b09 3264 3a16 d6fe 2316 a58e .Ky...d2.:...#.. 803b8ec: 3f4d 1196 0777 4547 1949 0b70 ddc7 35e9 M?..w.GEI.p....5 803b8fc: 6816 4429 d0dd 2e65 b32f f850 0ea2 e80a .h)D..e./.P..... 803b90c: 58fb f4a9 f12b 429b 6ae4 8890 6b0b a97d .X..+..B.j...k}. 803b91c: 97af 93aa 981f f8f8 79fa 4af8 a430 49ec .........y.J0..I 803b92c: 32c4 cb99 f291 cb34 f870 7425 9e14 aa44 .2....4.p.%t..D. 803b93c: a1d9 dd4b ae9d 84fe 2b29 8fe1 e505 b322 ..K.....)+....". 803b94c: b1c9 1b84 b512 9c3f 82a7 04b8 19b9 6547 ......?.......Ge 803b95c: de64 9579 04cb acd9 7e13 43e4 0254 e120 d.y......~.CT. . 803b96c: 5cf3 4d01 84d8 6326 b411 f6cc 1059 cf08 .\.M..&c....Y... 803b97c: 9c10 026a e1c4 0b08 b89a ddc8 ddbb 106e ..j...........n. 803b98c: 068c 7a76 9fc1 c7e4 cb32 b1a0 cf21 9953 ..vz....2...!.S. 803b99c: 62e4 5e28 972b c2d4 1048 2828 4723 db16 .b(^+...H.((#G.. 803b9ac: 65dd 003a b9e3 1c2d cfa7 0b40 2077 c675 .e:...-...@.w u. 803b9bc: 7936 6594 2332 b38e b730 b84a 5bcd 40b1 6y.e2#..0.J..[.@ 803b9cc: 3f39 9995 b509 cc91 0dec 6ac8 34a2 9a3f 9?.........j.4?. 803b9dc: d71f 8708 07a0 0d0b bf8d d059 d9f5 e841 ..........Y...A. 803b9ec: 22c5 ab19 cf89 1d3a 3c27 2f63 083c 347e ."....:.'.W.>.?....4 803bb5c: 4016 a465 ad3c e5bd e8a1 32a4 9db5 2e01 .@e.<......2.... 803bb6c: 2031 fc7d 9777 bcf8 b244 ad12 8745 84bc 1 }.w...D...E... 803bb7c: ecbd d8da 634e 8361 2073 2f7e e956 a340 ....Nca.s ~/V.@. 803bb8c: f0ae 5981 1d7c d0b3 ad11 1661 d81d d022 ...Y|.....a...". 803bb9c: 4126 ce99 6172 f26b b306 3e50 604b ae42 &A..rak...P>K`B. 803bbac: 8802 8ac0 06be ab8e cc91 1362 cec1 499f ..........b....I 803bbbc: 8d15 a8e6 442c 8565 55c0 a09b 8927 0850 ....,De..U..'.P. 803bbcc: 0513 e77f 4b2f 454c 1969 c818 597b a06f ..../KLEi...{Yo. 803bbdc: 41b3 3b8e 8dfd 1455 2854 0284 5bd6 c917 .A.;..U.T(...[.. 803bbec: 2cc5 6262 945f 38f8 3f28 9a5f 5acf dad2 .,bb_..8(?_..Z.. 803bbfc: 255a 51a7 ea1a 497d 3a33 51d5 5ce0 6056 Z%.Q..}I3:.Q.\V` 803bc0c: 5f84 461a 6eac 4abf ea94 da2e c96f 3534 ._.F.n.J....o.45 803bc1c: 6318 def5 39b1 cbcd bbbd f737 94c4 f146 .c...9....7...F. 803bc2c: 39a2 0b98 4d16 3c69 4794 4251 b9b3 c006 .9...Mi<.GQB.... 803bc3c: 30f2 1e9b 221e 90c5 551e dc6e d96d 3438 .0..."...Un.m.84 803bc4c: 43c4 b0f9 6ee4 2cb8 32e3 0e74 48b8 819b .C...n.,.2t..H.. 803bc5c: fa85 bd04 4b8a 50e9 8160 666e e33c c12c .....K.P`.nf<.,. 803bc6c: bd07 d77e 30af 1d82 841c 7e8d cb34 dce8 ..~..0.....~4... 803bc7c: 9ef0 5cd0 2877 3b86 6a0c 8481 5d85 a1d2 ...\w(.;.j...].. 803bc8c: 2a2e 6b2d f62f 62f4 a9cf 6e85 bc2a ed79 .*-k/..b...n*.y. 803bc9c: 8af0 9a21 3156 c264 2aa7 47c9 75f2 b6a9 ..!.V1d..*.G.u.. 803bcac: d941 6008 9ae4 325f a5d5 0f23 41c2 bfd8 A..`.._2..#..A.. 803bcbc: b85c 2a64 9cf2 058e 1289 bdab 757f b765 \.d*.........ue. 803bccc: bd3f 2c8a 1b20 f467 c7ad 8e22 f5a5 992b ?.., .g..."...+. 803bcdc: 7cc5 2507 848b 2663 d463 0fdb ac08 02c8 .|.%..c&c....... 803bcec: 49f2 7bb7 feff 7bbd 559a b8a1 147f 8af3 .I.{...{.U...... 803bcfc: ec10 11a3 4f7a e497 7913 a1f1 3533 a04d ....zO...y..35M. 803bd0c: 1bbb 6452 87f1 4188 ec12 9cf4 2b45 cb05 ..Rd...A....E+.. 803bd1c: ef0e aaea a4b5 bbfb 2bab eed2 b6e5 dc77 .........+....w. 803bd2c: ea30 5b87 c741 a07d c783 334b a4a9 6eee 0..[A.}...K3...n 803bd3c: 8a90 bc5c 3e7e f702 9d96 8ea0 d280 61e3 ..\.~>.........a 803bd4c: 5e10 755d 9557 6aaf ea22 e4fe f430 4b9d .^]uW..j"...0..K 803bd5c: 38d4 deed 10b3 ae65 73a9 dfa1 84e9 7955 .8....e..s....Uy 803bd6c: efdb ca2d ae7e ad6a 1ddb 7377 739e 1f59 ..-.~.j...ws.sY. 803bd7c: d16d 9d26 5eec 90f7 480e 0317 7109 b43a m.&..^...H...q:. 803bd8c: d009 4310 dd5c 5374 d43b ac58 a02b 38ed ...C\.tS;.X.+..8 803bd9c: e21d f421 a5cb f413 1399 e9db caf4 4355 ..!...........UC 803bdac: 8bf6 8e22 8d7f 0049 c4cb 515a 963e 9645 .."...I...ZQ>.E. 803bdbc: ee1b 6afe 24ed d04a 6d42 9eae b40a 5c84 ...j.$J.Bm.....\ 803bdcc: 2eaf 1e4c 19d7 ab56 a75f 7728 5045 0ad7 ..L...V._.(wEP.. 803bddc: a29f 5d35 4b95 dae8 581e cdd0 f661 e508 ..5].K...X..a... 803bdec: d46b 5ca0 d1cd ca6b b294 cd48 a003 0a2c k..\..k...H...,. 803bdfc: 2d76 a804 d06f 2cbe a8eb b7e6 ac1b 3a71 v-..o..,......q: 803be0c: c4f7 b767 5d79 7e92 132b 7cf1 0234 4398 ..g.y].~+..|4..C 803be1c: e04d d882 68e7 5bc4 f692 6b59 ddbc cfae M....h.[..Yk.... 803be2c: 6a47 4cdd a6c1 2d34 b616 57e3 29e1 3d13 Gj.L..4-...W.).= 803be3c: b481 8cdd 5980 f20b ed9d be51 0bbb 63cf .....Y....Q....c 803be4c: 95bf b425 1350 e034 0406 2f5b 9b09 d057 ..%.P.4...[/..W. 803be5c: 3f43 e50a 17d6 3303 b3df dbad cd14 f31b C?.....3........ 803be6c: e1ca 15ea d19d 659c aa51 33fa 7119 ebbb .......eQ..3.q.. 803be7c: c4f8 ad65 9fc9 ff2c f182 0ffe e798 b7bf ..e...,......... 803be8c: d26c 2969 e85b 1b11 4b71 cd1c 1321 b6d3 l.i)[...qK..!... 803be9c: 99a3 33d6 0623 4063 3569 1224 b57c e786 ...3#.c@i5$.|... 803beac: 7272 8bd4 bf28 57ab b80b f36c 6319 70b1 rr..(..W..l..c.p 803bebc: 5037 2d74 23d9 61b5 9df8 255b 4716 d9dc 7Pt-.#.a..[%.G.. 803becc: 5ddd 6543 680d ac37 e5ba 067d 1b7a 88de .]Ce.h7...}.z... 803bedc: a143 da96 e989 f639 2475 a363 e50c b290 C.....9.u$c..... 803beec: 71f3 0b26 bd3c 2c68 192f caab 55e1 bdc8 .q&.<.h,/....U.. 803befc: 3622 bd88 b24e 67c2 b8d3 776d 5a68 dbb6 "6..N..g..mwhZ.. 803bf0c: a7a1 aa19 72f1 525d 7755 d86e ad70 7998 .....r]RUwn.p..y 803bf1c: eac0 3eba f2af c375 980c 94ab 9919 fb58 ...>..u.......X. 803bf2c: a1f2 2c4a dbfc 7ae7 cd46 a3f6 2664 2532 ..J,...zF...d&2% 803bf3c: 76b8 5b7c b225 56fc 0a07 6e5e 65fe 7e9e .v|[%..V..^n.e.~ 803bf4c: c7be d0ab eb9b 693f 6432 6b6b a9c6 05a2 ......?i2dkk.... 803bf5c: 71d3 846b 23df 359d 41af 0edb 73d9 f0f7 .qk..#.5.A...s.. 803bf6c: b09c 5ae7 ca45 8101 6a29 83b0 5fe0 158f ...ZE...)j..._.. 803bf7c: 2ce6 a42a ba06 ba98 31ed 309a 1f11 db99 .,*......1.0.... 803bf8c: 7794 70c6 e5b0 6e69 6775 aefe 5f3b 2cd0 .w.p..inug..;_., 803bf9c: 3741 bad9 6eb4 3568 4d92 8669 8997 62a7 A7...nh5.Mi....b 803bfac: 02a4 b3f2 7114 37c1 f1ac 5877 3fe2 b7cb .....q.7..wX.?.. 803bfbc: c378 4efa fe6f 360f af28 cbf1 b68f 4604 x..No..6(......F 803bfcc: d5f6 432d e7c9 e4c8 ae1c 123a ef98 ca04 ..-C......:..... 803bfdc: fade d326 860f 24cf b917 b979 e11a e2fd ..&....$..y..... 803bfec: 6249 6937 bce4 0537 9b4d 91bb 2d83 0ade Ib7i..7.M....-.. 803bffc: 9ac5 7f15 f0fd 4c4c 4ce5 6f94 7896 5ad6 ......LL.L.o.x.Z 803c00c: fff8 8b05 d809 5f38 0015 2f00 ......8_... 0803c017 : 803c017: 6c2f 676f 6e69 682e 6d74 006c 5448 5054 /login.html.HTTP 803c027: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 803c037: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 803c047: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 803c057: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 803c067: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 803c077: 6e65 2d74 654c 676e 6874 203a 3835 0d37 ent-Length: 587. 803c087: 430a 6e6f 656e 7463 6f69 3a6e 4320 6f6c .Connection: Clo 803c097: 6573 0a0d 6f43 746e 6e65 2d74 7974 6570 se..Content-type 803c0a7: 203a 6574 7478 682f 6d74 0d6c 430a 6e6f : text/html..Con 803c0b7: 6574 746e 452d 636e 646f 6e69 3a67 6720 tent-Encoding: g 803c0c7: 697a 0d70 0d0a 1f0a 088b 0000 0000 0400 zip............. 803c0d7: 7d0a cd54 d46e 1030 157e 2463 754e 7bb7 .}T.n.0.~.c$Nu.{ 803c0e7: a841 91c4 e950 1381 401c a382 cc93 5c6e A...P....@....n\ 803c0f7: db1c 93d8 eeec e2ad 09c0 c409 2415 015e .............$^. 803c107: 03d1 8845 433e 8df6 2718 6ddb a423 e21e ..E.>C...'.m#... 803c117: d8f5 e333 67ef d9b4 a7bd 4fcf be5e 7179 ..3..g.....O^.yq 803c127: 6aca 4c6c a59e 1995 9765 7392 408a 7955 .jlL....e..s.@Uy 803c137: 00d6 562a 2ad6 4044 5bc9 885c 7447 9c37 ..*V.*D@.[\.Gt7. 803c147: 88d6 c05e 56bb 9277 16bf 9eaf 1388 78d7 ..^..Vw........x 803c157: ba85 c030 e959 822c 92a5 a767 aa12 5c25 ..0.Y.,...g...%\ 803c167: 5917 80d5 9de4 9586 0177 e56f 74ad b585 .Y......w.o..t.. 803c177: a0ac 25d3 2188 d038 a356 4656 52c4 9019 ...%.!8.V.VF.R.. 803c187: 83f3 ad46 d375 fb36 8db8 8610 d140 f293 ..F.u.6.....@... 803c197: 9e88 8d40 f206 5bfe d57f edff b72f fbef ..@....[..../... 803c1a7: edab 7f79 fb49 6c8b de36 4665 b7db 0eac ..y.I..l6.eF.... 803c1b7: 90b0 51bc 1eda 3196 1672 48c0 711e 2063 ...Q...1r..H.qc 803c1c7: 00d6 9d48 1962 47b4 1b86 704f d611 3b38 ..H.b..G..Op..8; 803c1d7: 9d53 4f1a 8b39 94a1 383c 8703 9167 6792 S..O9...<8..g..g 803c1e7: 39e3 466d 0ad1 6d57 acf2 1dd2 8d2b 518a .9mF..Wm....+..Q 803c1f7: ab72 42ba 3605 88fe 160a 35aa 1d78 f42e r..B.6.....5x... 803c207: 2a1a ce81 a753 6aff ea44 6108 cabc b533 .*..S..jD..a..3. 803c217: 7e83 949f 5b1b b71b 0974 a282 aa8f eba7 .~...[..t....... 803c227: 76ad a0ab a7bc 4c46 9257 dcef baa1 9e7a .v....FLW.....z. 803c237: 9ff7 9ffb a97b f57e b63f 481f 4fba 65c4 ....{.~.?..H.O.e 803c247: c13e 95e3 c305 f586 c19a f014 9578 d3b8 >...........x... 803c257: c2f9 8685 12a9 b3b5 1392 a4c6 52f4 4673 .............RsF 803c267: 5393 423b 5de0 ee4c 39ef 2b68 0952 1a55 .S;B.]L..9h+R.U. 803c277: d055 143b eaec de78 257f 2f3f 8f92 0fc7 U.;...x..%?/.... 803c287: 116c e3fd 366c e524 b699 bdbe d26d 63be l...l6$.....m..c 803c297: 25ea 4b12 8932 d093 e869 1406 ff23 96dd .%.K2...i...#... 803c2a7: ca06 5d80 dcd2 f9f1 7243 0d35 1a40 408b ...]....Cr5.@..@ 803c2b7: 4570 cbd0 8f1a fcd9 afc8 a8a7 593c a04a pE..........hB...S. 803c2f7: 2a25 17fd f802 cc9b 24bd b30a ca24 3e74 %*.......$..$.t> 803c307: 1376 ce33 6ceb 17f8 07f8 a233 8ac5 0415 v.3..l....3..... 803c317: 0000 .. 0803c319 : 803c319: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 803c329: 0000 5000 ... 0803c32c : 803c32c: 4c50 0804 9dee 0803 9dfa 0803 1802 0000 PL.............. 803c33c: 0001 0000 .... 0803c340 : 803c340: 4c3c 0804 c368 0803 c374 0803 04e3 0000 : 803c354: 4680 0804 1204 0804 1210 0804 2a56 0000 .F..........V*.. 803c364: 0001 0000 .... 0803c368 : 803c368: 692f 646e 7865 682e 6d74 006c 5448 5054 /index.html.HTTP 803c378: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 803c388: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 803c398: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 803c3a8: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 803c3b8: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 803c3c8: 6e65 2d74 654c 676e 6874 203a 3031 3937 ent-Length: 1079 803c3d8: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 803c3e8: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 803c3f8: 3a65 7420 7865 2f74 7468 6c6d 0a0d 6f43 e: text/html..Co 803c408: 746e 6e65 2d74 6e45 6f63 6964 676e 203a ntent-Encoding: 803c418: 7a67 7069 0a0d 0a0d 8b1f 0008 0000 0000 gzip............ 803c428: 0a04 56bd 6f5d 44e3 fd14 832b 6979 baa5 ...V]o.D..+.yi.. 803c438: fba1 2084 54b6 8bba 4fb4 10ac f620 9a29 ... .T...O.. .). 803c448: 93d8 1678 ed7f 9278 6fb4 60fd 5161 8291 ..x...x..o.`aQ.. 803c458: a010 e17d 17f3 8174 9a40 dda6 30bf 47fe ..}...t.@....0.G 803c468: 3b9c bb8e 3521 5961 7d89 93b0 e7b1 7bde .;..!5aY.}.....{ 803c478: b9ee 5ee7 fb4f dbb5 edef 707d deff 161d ...^O.....}p.... 803c488: 24e9 dbf6 6774 4f31 9efb 60e3 7825 b7e8 .$..tg1O...`%x.. 803c498: a113 0b39 ae22 a10a 673d 7ba0 9bee 6778 ..9."...=g.{..xg 803c4a8: 469f e75a 78ae 9038 cf43 d8f9 70fd ddd7 .FZ..x8.C....p.. 803c4b8: 92cb 6b9c 8dd9 c385 2c82 22d5 c985 3bdd ...k.....,."...; 803c4c8: 089e a2fb 4a36 2279 673c c528 cf28 5e94 ....6Jy"...Vc...nN.. 803c7b8: fc2b 9a94 7ece 5783 0387 a0e5 2265 b13a +....~.W....e":. 803c7c8: d9e8 b581 273a 07fe 4045 3f09 e923 d047 ....:'..E@.?#.G. 803c7d8: ea2c c20e 0c41 d78d c599 8f58 f0d7 5655 ,...A.....X...UV 803c7e8: 1bfe ccb4 0011 3580 2140 9e45 8913 7e76 .......5@!E...v~ 803c7f8: f435 284f d677 fd55 7027 817f 76cb e564 5.O(w.U.'p...vd. 803c808: 3169 d8a8 834e 9537 acbd 5bb7 de8d 356e i1..N.7....[..n5 803c818: 6b61 e3aa cba2 d3ab 0bd2 b81c 79ec efed ak...........y.. 803c828: ae07 56b5 c87e 7f35 c717 bba7 c6e9 56e6 ...V~.5........V 803c838: 15ce 8a4f 05f7 7c86 6d11 be6c ae8d 67b1 ..O....|.ml....g 803c848: b43c 3d8f fefc 4905 2b6e 0ce6 000b 2f00 <..=...In+..... 0803c857 : 803c857: 662f 7661 6369 6e6f 692e 6f63 0000 0000 /favicon.ico.... 803c867: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 803c877: 530a 7265 6576 3a72 6c20 4977 2f50 2e31 .Server: lwIP/1. 803c887: 2e33 2031 6828 7474 3a70 2f2f 6173 6176 3.1 (http://sava 803c897: 6e6e 6861 6e2e 6e6f 6e67 2e75 726f 2f67 nnah.nongnu.org/ 803c8a7: 7270 6a6f 6365 7374 6c2f 6977 2970 0a0d projects/lwip).. 803c8b7: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 803c8c7: 3131 3035 0a0d 6f43 6e6e 6365 6974 6e6f 1150..Connection 803c8d7: 203a 6c43 736f 0d65 430a 6e6f 6574 746e : Close..Content 803c8e7: 742d 7079 3a65 6920 616d 6567 782f 692d -type: image/x-i 803c8f7: 6f63 0d6e 430a 6361 6568 432d 6e6f 7274 con..Cache-Contr 803c907: 6c6f 203a 7270 7669 7461 2c65 6d20 7861 ol: private, max 803c917: 612d 6567 383d 3436 3030 0a0d 0a0d 0000 -age=86400...... 803c927: 0001 0001 1010 0000 0000 0020 0468 0000 .......... .h... 803c937: 0016 0000 0028 0000 0010 0000 0020 0000 ....(....... ... 803c947: 0001 0020 0000 0000 0440 0000 0000 0000 .. .....@....... 803c957: 0000 0000 0000 0000 0000 0000 ffff 01ff ................ 803c967: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803c977: ffff 01ff ffff 01ff d2d2 ffd2 d2d2 ffd2 ................ 803c987: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803c997: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803c9a7: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803c9b7: 8d8d ff8d 8484 ff84 8989 ff89 8989 ff89 ................ 803c9c7: 8484 ff84 8d8d ff8d ffff 01ff ffff 01ff ................ 803c9d7: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803c9e7: ffff 01ff ffff 01ff a4a4 ffa4 8484 ff84 ................ 803c9f7: aeae ffae ffff 01ff ffff 01ff ffff 01ff ................ 803ca07: ffff 01ff aeae ffae 8484 ff84 a4a4 ffa4 ................ 803ca17: ffff 01ff ffff 01ff 8181 ff81 ffff 01ff ................ 803ca27: ffff 01ff a0a0 ffa0 9a9a ff9a ffff 01ff ................ 803ca37: c7c7 ffc7 8f8f ff8f 8585 ff85 8585 ff85 ................ 803ca47: 8f8f ff8f caca ffca ffff 01ff d5d5 ffd5 ................ 803ca57: ffff 01ff 7777 ff77 ffff 01ff ffff 01ff ....www......... 803ca67: d5d5 ffd5 8484 ff84 ffff 01ff a8a8 ffa8 ................ 803ca77: 8c8c ff8c bbbb ffbb ffff 01ff ffff 01ff ................ 803ca87: baba ffba afaf ffaf ffff 01ff ffff 01ff ................ 803ca97: 6465 ff5b ffff 01ff ffff 01ff ffff 01ff ed[............. 803caa7: 9898 ff98 b0b0 ffb0 d5d5 ffd5 8484 ff84 ................ 803cab7: dada ffda 9595 ff95 8484 ff84 9d9d ff9d ................ 803cac7: d7d7 ffd7 ffff 01ff 9898 ff97 7a7b ff73 ............{zs. 803cad7: cedb ff79 c0d2 ff55 ffff 01ff ffff 01ff ..y...U......... 803cae7: 9393 ff93 ffff 01ff a4a4 ffa4 bebe ffbe ................ 803caf7: bdbd ffbd d1d1 ffd1 ffff 01ff ffff 01ff ................ 803cb07: b4b5 ffae 5f5f ff5d 979d ff6b c0d2 ff55 ....__]...k...U. 803cb17: ffff 01ff b5c9 ff35 ffff 01ff ffff 01ff ......5......... 803cb27: f0f0 fff0 ffff 01ff f1f1 fff1 ffff 01ff ................ 803cb37: d5d5 ffd5 cfd0 ffce 8585 ff85 6060 ff60 ............```. 803cb47: 9194 ff85 b5ca ff37 ffff 01ff b9cc ff41 ......7.......A. 803cb57: ffff 01ff b4c9 ff33 ffff 01ff 6262 ff62 ......3.....bbb. 803cb67: 5d5e ff5c 5c5c ff5c 5d5e ff5c 6161 ff60 ^]\.\\\.^]\.aa`. 803cb77: 6567 ff5b 8486 ff7b ffff 01ff ffff 01ff ge[...{......... 803cb87: ffff 01ff b5ca ff37 ffff 01ff b9cc ff41 ......7.......A. 803cb97: ffff 01ff b4c9 ff33 ffff 01ff ffff 01ff ......3......... 803cba7: b5c9 ff35 ffff 01ff c0d2 ff55 ffff 01ff ..5.......U..... 803cbb7: c4d4 ff5e c3d4 ff5c ffff 01ff ffff 01ff ..^...\......... 803cbc7: c3d4 ff5c c4d4 ff5e cedb ff79 c0d2 ff55 ..\...^...y...U. 803cbd7: ffff 01ff b5c9 ff35 ffff 01ff ffff 01ff ......5......... 803cbe7: c0d1 ff54 cfdc ff7d ffff 01ff b4c9 ff33 ..T...}.......3. 803cbf7: ffff 01ff bed0 ff50 b4c9 ff33 b4c9 ff33 ......P...3...3. 803cc07: c0d2 ff55 ffff 01ff b4c9 ff33 ffff 01ff ..U.......3..... 803cc17: cedb ff79 c0d2 ff55 ffff 01ff ffff 01ff ..y...U......... 803cc27: ffff 01ff b4c9 ff33 ffff 01ff cad9 ff6f ......3.......o. 803cc37: b9cc ff41 d6e1 ff8f ffff 01ff ffff 01ff ..A............. 803cc47: d5e0 ff8c b9cc ff40 cedb ff79 ffff 01ff ......@...y..... 803cc57: b4c9 ff33 ffff 01ff ffff 01ff ffff 01ff ..3............. 803cc67: ffff 01ff c5d5 ff62 c1d2 ff58 ffff 01ff ......b...X..... 803cc77: ffff 01ff bbce ff46 b5c9 ff35 b5c9 ff35 ......F...5...5. 803cc87: bbce ff46 ffff 01ff ffff 01ff c0d2 ff55 ..F...........U. 803cc97: c5d5 ff62 ffff 01ff ffff 01ff ffff 01ff ..b............. 803cca7: ffff 01ff ffff 01ff c8d7 ff69 b4c9 ff33 ..........i...3. 803ccb7: cedb ff79 ffff 01ff ffff 01ff ffff 01ff ..y............. 803ccc7: ffff 01ff cedb ff79 b4c9 ff33 c8d7 ff69 ......y...3...i. 803ccd7: ffff 01ff ffff 01ff ffff 01ff ffff 0dff ................ 803cce7: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803ccf7: b9cd ff42 b4c9 ff33 b7cb ff3b b7cb ff3b ..B...3...;...;. 803cd07: b4c9 ff33 b9cd ff42 ffff 01ff ffff 01ff ..3...B......... 803cd17: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803cd27: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803cd37: ffff 01ff ffff 01ff e4eb ffb5 e4eb ffb5 ................ 803cd47: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803cd57: ffff 01ff ffff 01ff ffff 01ff 0000 ffff ................ 803cd67: 0000 ffff 0000 ffff 0000 ffff 0000 ffff ................ 803cd77: 0000 ffff 0000 ffff 0000 ffff 0000 ffff ................ 803cd87: 0000 ffff 0000 ffff 0000 ffff 0000 ffff ................ 803cd97: 0000 ffff 0000 ffff 0000 ffff ............ 0803cda3 : 803cda3: 732f 7465 6974 676e 2e73 7468 6c6d 0000 /settings.html.. 803cdb3: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 803cdc3: 530a 7265 6576 3a72 6c20 4977 2f50 2e31 .Server: lwIP/1. 803cdd3: 2e33 2031 6828 7474 3a70 2f2f 6173 6176 3.1 (http://sava 803cde3: 6e6e 6861 6e2e 6e6f 6e67 2e75 726f 2f67 nnah.nongnu.org/ 803cdf3: 7270 6a6f 6365 7374 6c2f 6977 2970 0a0d projects/lwip).. 803ce03: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 803ce13: 3434 3738 0a0d 6f43 6e6e 6365 6974 6e6f 4487..Connection 803ce23: 203a 6c43 736f 0d65 430a 6e6f 6574 746e : Close..Content 803ce33: 742d 7079 3a65 7420 7865 2f74 7468 6c6d -type: text/html 803ce43: 0a0d 6f43 746e 6e65 2d74 6e45 6f63 6964 ..Content-Encodi 803ce53: 676e 203a 7a67 7069 0a0d 0a0d 8b1f 0008 ng: gzip........ 803ce63: 0000 0000 0a04 5bdd 736b d51b fe19 cb2b .......[ks....+. 803ce73: 3286 d8f2 2d92 205f 2c71 da75 6524 5332 .2...-_ q,u.$e2S 803ce83: 8788 0538 793e d2d6 5ada ed22 d58a 4eca ..8.>y...Z"....N 803ce93: c99a 2e4c d2d0 8521 8424 50c2 0848 7ebd ..L...!.$..PH..~ 803cea3: 35a1 e6e4 f95c ab0b d47f 79e7 d9cf a49b .5..\......y.... 803ceb3: e595 7ce0 87e9 bb38 3dab 7de7 7bce df7f ...|..8..=.}.{.. 803cec3: 7673 a5e9 27a3 ac8e bbbc cc7c 0468 66ad sv...'....|.h..f 803ced3: 8975 8d7f e5a6 546e 134c b677 af55 b52e u.....nTL.w.U... 803cee3: c0ec 6a32 cb0d d8ef c541 06ec c5eb f883 ..2j....A....... 803cef3: 9e4d 8236 5da0 dfb4 3aef 159b 9df3 a9e2 M.6..]...:...... 803cf03: 155f 788f b6ad 3815 4d6b 34db 9e6a d81b _..x...8kM.4j... 803cf13: 862e 3f1c b156 1beb 3476 b5c8 765a dcc5 ...?V...v4..Zv.. 803cf23: ec74 b6ad 07e7 f7a9 9cb6 d07a d4a8 4ded t.........z....M 803cf33: 66a7 e517 ca66 9d71 b1c0 c59a cd4e da6a .f..f.q.....N.j. 803cf43: f295 cb54 e33a bab4 f8ad dbbe 7db1 b1b9 ..T.:........}.. 803cf53: b240 0332 8112 3413 6aed 4df8 ddb8 d8bb @.2....4.j.M.... 803cf63: d4bb 10bb 0b3e 861f c28f a59d f569 52cb ....>.......i..R 803cf73: 71d3 1b4f df0d af5e 2d98 71cb b54b c74e .qO...^..-.qK.N. 803cf83: 7c34 59bb 3b31 d9c1 dda6 d869 8076 3a79 4|.Y1;....i.v.y: 803cf93: df35 0769 7046 0db6 81b0 267d 7e98 dacf 5.i.Fp....}&.~.. 803cfa3: d4b4 d353 f8e8 8ab5 7be9 bb4d 5ef4 2f07 ..S......{M..^./ 803cfb3: ab4f b8e7 2c50 f35b 67ea 4bab 6775 70d3 O...P,[..g.Kug.p 803cfc3: 15ea e6b3 dd75 b8a0 5be5 bc6d 799a f758 ....u....[m..yX. 803cfd3: 5cb6 6b3c c357 80af a9f3 fbc6 7c38 de1c .\.. 803d063: 1aee 8fe1 bca4 7143 e5e0 bd27 06cb 8516 ......Cq..'..... 803d073: 16d7 4205 6ec7 b5da 50c0 d14a 36f4 771c ...B.n...PJ..6.w 803d083: d795 5aa6 0648 29d1 1b08 d2ea c004 498a ...ZH..).......I 803d093: 456c 18aa 00a4 5e30 289b 4d8d d9ab bc85 lE....0^.(.M.... 803d0a3: 6acc bd78 71f7 83f8 66f0 7487 f009 a819 .jx..q...f.t.... 803d0b3: 015e 9f07 3f85 2c02 00c1 d2c5 1ab4 3fda ^....?.,.......? 803d0c3: 3505 accb 6ff2 1bde bd56 40e5 f27a f25f .5...o..V..@z._. 803d0d3: b4ce 505a 6975 57cd 1cff ddb7 640d 5e35 ..ZPui.W.....d5^ 803d0e3: deb3 aade 5a9b daa7 9f11 ae87 68c8 ad37 .....Z.......h7. 803d0f3: dd9a 10c0 afdb e198 4a77 bd72 853f e13b ........wJr.?.;. 803d103: 34c3 afb3 0cc4 de11 3341 df9d 0183 33b3 .4......A3.....3 803d113: 9710 a675 bb69 301b b329 aafc 39a9 0c4c ..u.i..0)....9L. 803d123: 0c20 0d8e 73e2 9161 89cf 1bef 1532 ff1c ....sa.....2... 803d133: d859 7f48 3634 6edf 16db 865c cab2 713d Y.H.46.n..\...=q 803d143: 96f0 bc20 3e14 9683 2342 577a a5a8 07fb .. ..>..B#zW.... 803d153: 2dfa ac85 ad9f e80a 375a 3c08 ab57 d374 .-......Z7.. 803d1b3: eccc a3ed 8985 97a9 59ca 3f82 5f81 30db .........Y.?._.0 803d1c3: e118 d419 9a66 1786 8e79 7fc4 c268 b5ae ....f...y...h... 803d1d3: 66b9 d0f9 fe35 ac57 ebdb b756 e349 db96 .f..5.W...V.I... 803d1e3: e775 5d8c 062f e45e 3306 8a63 9cf4 3934 u..]/.^..3c...49 803d1f3: c87a 92ea 5da5 e3b4 edd6 2533 a586 7178 z....]....3%..xq 803d203: 7450 408f 2cac 688a 01c4 e7c5 ed96 8b76 Pt.@.,.h......v. 803d213: 1c0e 7e84 dbb5 988c 3403 2211 aa5c 79b7 ...~.....4."\..y 803d223: 4551 1868 b84a de1a e712 4db6 d3ee f747 QEh.J......M..G. 803d233: 563e f9d4 7a7e 020c e064 1bb8 2c9d 3a5e >V..~z..d....,^: 803d243: 4dd0 bf44 3161 6b89 9fe8 71c5 3dd7 4335 .MD.a1.k...q.=5C 803d253: fc35 4112 03e1 d9d1 8027 07f0 0148 6b0e 5..A....'...H..k 803d263: a0d8 d386 3c09 6cff ee34 bd2f 90cb 1c1b .....<.l4./..... 803d273: f873 7938 ba7f 088b 203f c632 36a5 ab1d s.8y....? 2..6.. 803d283: 550a b312 8bc1 7946 6028 5e3c 2b02 2ef9 .U....Fy(`<^.+.. 803d293: d2d4 23a9 7bd8 716e 3bcd 3643 7e73 1989 ...#.{nq.;C6s~.. 803d2a3: 99fc d017 28a5 c47c a9bc 386d 2849 3e59 .....(|...m8I(Y> 803d2b3: 7271 2305 a0a3 5818 786b a30f 6ab4 7ba8 qr.#...Xkx...j.{ 803d2c3: 82f5 4dd0 439e f462 6962 1ff6 b8e8 76ad ...M.Cb.bi.....v 803d2d3: 0462 ef8a d62b 599a f93d 1be6 09cb 321f b...+..Y=......2 803d2e3: 1c63 ebd7 9a22 b785 b1c1 e10f 115d 1e29 c...".......].). 803d2f3: 2fc1 1620 7983 208f 1ced 1f59 ed70 8b60 ./ ..y. ..Y.p.`. 803d303: a8e3 f012 f4ce 127e 1865 7706 94d5 8803 ......~.e..w.... 803d313: 4c2b f473 1704 c0c4 e62e f440 7aad c1d7 +Ls.......@..z.. 803d323: c362 a0ab 3da2 1318 5181 70fa 0dc0 0ac0 b....=...Q.p.... 803d333: 4186 0d66 d24f d36a 06a7 5594 7196 3ae0 .Af.O.j....U.q.: 803d343: 05f2 445b 89b7 c07c ea65 1146 ee69 c7f3 ..[D..|.e.F.i... 803d353: d8a6 942b 623d 9c6e 6449 625e 6422 1074 ..+.=bn.Id^b"dt. 803d363: 19e0 379c af7c 67db 35fb 69af 3930 2d59 ...7|..g.5.i09Y- 803d373: 7aaf abeb 14b3 b5a8 3766 280d d30f d733 .z......f7.(..3. 803d383: 2782 be3c eb1c c0c3 c2eb 727e f98f 1952 .'<.......~r..R. 803d393: c4b6 19d1 03b0 3243 937e 5d89 3b3c 3635 ......C2~..]<;56 803d3a3: 294e c544 0853 8254 3c92 2c88 1869 d9de N)D.S.T..<.,i... 803d3b3: ca78 ea01 c019 2fb3 300e f420 2621 9573 x....../.0 .!&s. 803d3c3: 0ff1 3c83 2637 b9e4 0717 1019 20fa 8dcf ...<7&....... .. 803d3d3: 3c84 263f f9e4 0717 1019 20fa 8fcf bc84 .2&...o.G.be.. 803d453: 20b1 c1bc 11aa 1841 0c21 ef71 8aa9 bab0 . ....A.!.q..... 803d463: 64ac 6e5c a3cc 67de 1fe5 214d 5837 a053 .d\n...g..M!7XS. 803d473: f0ca 2500 d058 8b88 156b d1d0 6808 c7a8 ...%X...k....h.. 803d483: 1037 1f19 594a f48a bc36 7ea7 e698 bc20 7...JY..6..~.. . 803d493: ad22 408f f215 4f32 8abd 12f8 1fa0 7fc2 "..@..2O........ 803d4a3: aa99 eeb5 6320 1861 0b95 ff1d c132 bfa4 .... ca.....2... 803d4b3: 2cb8 3233 cf23 6c78 c320 16bb 4ade c7ca .,32#.xl ....J.. 803d4c3: 1d6c 9f0b d4cd 58c5 8e41 bc96 9713 0298 l......XA....... 803d4d3: 0347 4856 85a7 9103 4fa3 3689 6e66 681c G.VH.....O.6fn.h 803d4e3: 3147 5bfe 0670 083d 4e74 a662 ac7f f9aa G1.[p.=.tNb..... 803d4f3: 607d 97fb f2c2 e867 3c5c db05 3d1f db37 }`....g.\<...=7. 803d503: 4f7d 5db3 c62e fb65 d057 7626 7604 73a4 }O.]..e.W.&v.v.s 803d513: ed02 1e42 8e85 4b05 661c 926e 0f60 08ef ..B....K.fn.`... 803d523: 1840 e148 41d9 de79 1019 44cf 279c ad8f @.H..Ay....D.'.. 803d533: 948c d6a6 a437 4307 cdf5 10f7 a9dd 726f ....7..C......or 803d543: fff1 f0b4 6d69 5970 1e35 cde6 fb24 994e ....impY5...$.N. 803d553: 733d 5dd2 d99c 89ae 7efa b4b9 d9b4 bcb1 =s.].....~...... 803d563: 7546 6684 4ea8 2374 a6e7 6922 9335 4a8d Fu.f.Nt#.."i5..J 803d573: ce31 4a5a e887 a37a d6d6 459e 50ae 4bbc 1.ZJ..z....E.P.K 803d583: 0ea5 834f 93fb 1581 85d8 b409 5002 b29f ..O..........P.. 803d593: 75b7 2a19 5aad c71b 8b97 e8d0 e2bb 2f38 .u.*.Z........8/ 803d5a3: 728a 6eb3 f940 b6ca a257 68f9 ea8a 4334 .r.n@...W..h..4C 803d5b3: 38b1 0e15 b69d af55 28a3 dad4 c315 dc8f .8....U..(...... 803d5c3: 9647 4802 cdc7 ed56 b750 b9e3 ecd3 b888 G..H..V.P....... 803d5d3: 4d10 5993 2efe 78c9 4904 43c5 177d bab9 .M.Y...x.I.C}... 803d5e3: f414 ad8d 61b1 047f 7dae 52c2 df6a 12c1 .....a...}.Rj... 803d5f3: 0284 ab8a 2021 565b 74e7 cc3e 6bf0 4a48 ....! [V.t>..kHJ 803d603: 937c 5bea c5de 430d 2260 fdb0 aa62 a1c2 |..[...C`"..b... 803d613: ca90 8475 6d35 ea74 249a 58a5 a5d4 a46b ..u.5mt..$.X..k. 803d623: e31b 12a5 d0ac 2aa2 3317 c90d f63b 2b56 .......*.3..;.V+ 803d633: 36b2 1518 aec2 b3c2 d7b3 7e8d db33 d4bc .6.........~3... 803d643: 007f e1d0 07ec 0431 fbfa e47b f329 d508 ......1...{.)... 803d653: d3a3 c59d 61a8 b5a7 6a3f e9a7 967e c469 .....a..?j..~.i. 803d663: b45d 2b35 b158 413b dce1 d77a 2dad f2be ].5+X.;A..z..-.. 803d673: d77e 0e0b 11a3 56d3 e757 9c61 dae8 f1b1 ~......VW.a..... 803d683: adbd 8dba 370c 6e06 a9ef 4b87 8ad3 ba12 .....7.n...K.... 803d693: fb79 bf47 74ee 5bb8 61b3 40a7 017c 3f00 y.G..t.[.a.@|..? 803d6a3: 4ad1 47c3 f229 c46c 333f 85c0 f0ed ba01 .J.G).l.?3...... 803d6b3: 9f5a 16e2 f096 2002 4e05 a34b e299 e2e5 Z...... .NK..... 803d6c3: 05cb 2d85 ef00 9356 271f d24a 14ea 0db6 ...-..V..'J..... 803d6d3: 1c47 4ba3 2217 ec23 6e28 a47f 5d57 2380 G..K."#.(n..W].# 803d6e3: 09dc 4e9f abec ebd1 6d26 db39 4778 9ddf ...N....&m9.xG.. 803d6f3: 1326 33af 0576 4989 f50d bbb0 f769 ed90 &..3v..I....i... 803d703: e7a2 6350 5342 6511 3555 c3de 1be1 313a ..PcBS.eU5....:1 803d713: f7d7 a6a8 1f9c 79db df45 f35e 763c 6ea3 .......yE.^..4...&..o.|.s8 803d863: 3ded d7d3 2791 6d95 489c c6bd b4ca 36ff .=...'.m.H.....6 803d873: 6f90 ad32 46e3 1196 18ee 41d8 0d92 2421 .o2..F.....A..!$ 803d883: 08be 838f 50e1 eded 2dec a715 5274 dc56 .....P...-..tRV. 803d893: 6a0d 0c23 5fe2 d952 08f0 0e06 88e6 477b .j#.._R.......{G 803d8a3: 8e72 2f9d c1ed 9ed2 dfb5 a298 9bae b636 r../..........6. 803d8b3: 874c 174d 425b 769b 8bc1 aefe b15b 5b3c L.M.[B.v....[.<[ 803d8c3: 11c2 c2a1 6feb 18ac 5eb8 999c 3099 efc2 .....o...^...0.. 803d8d3: 0ba5 0dc5 5624 8fc8 0ca6 1328 415a d9e0 ....$V....(.ZA.. 803d8e3: fc7d 4dd5 a4b0 935b cfed cb15 d4e5 658c }..M..[........e 803d8f3: a335 fc24 32e0 68d6 90a0 41db 7e1d f7b9 5.$..2.h...A.~.. 803d903: f0e7 a621 8dbe 9f29 07e0 3c64 7bc3 c54c ..!...)...d<.{L. 803d913: 4cf2 c26a 3519 67e1 4518 0f48 b029 719c .Lj..5.g.EH.)..q 803d923: 9287 8761 a8d4 52ab 48f6 9911 ea3b 3260 ..a....R.H..;.`2 803d933: a0ea f51a da1d 3c03 03b6 4056 5045 b0b5 .......<..V@EP.. 803d943: c064 f21d ad28 e839 1596 90b0 877f 4557 d...(.9.......WE 803d953: be9f 4be2 07f8 431d 9d42 ee83 84b5 6bce ...K...CB......k 803d963: 9ad1 1ca4 d9fb bf33 cc9a aafc f99a 549f ......3........T 803d973: ee6d 03d2 cf14 30fb 1c1f 3d0b f3e4 d435 m......0...=..5. 803d983: 9b80 58c0 ee71 165a 8a12 8a0b 75e2 2504 ...Xq.Z......u.% 803d993: 78d6 a5aa 3e39 6bb5 7640 a307 1d50 f682 .x..9>.k@v..P... 803d9a3: 415f 0d17 5c9a f3ba dd09 4579 2af7 3e46 _A...\....yE.*F> 803d9b3: 1916 9ba5 033a d3f4 1212 56f5 d43b bbc8 ....:......V;... 803d9c3: 177b ee85 5176 14c2 308c 7c47 2573 3f04 {...vQ...0G|s%.? 803d9d3: 3665 8b73 b473 6f9a 577a 7e90 807c e429 e6s.s..ozW.~|.). 803d9e3: 9934 b74e 8eef 2198 bc36 0539 9afe e808 4.N....!6.9..... 803d9f3: 1601 98fd 574d b900 6626 7102 2ef5 b116 ....MW..&f.q.... 803da03: fdd5 8e90 104a 80de 5229 605b e492 4915 ....J...)R[`...I 803da13: 12e6 594a 36b8 dbf0 079c 5163 51f1 3017 ..JY.6....cQ.Q.0 803da23: 0e75 20db dc8a d369 ae66 cf99 6483 45c8 u.. ..i.f....d.E 803da33: 1e68 6652 0e88 1680 1b5d 99e5 37b9 2fc2 h.Rf....]....7./ 803da43: 8200 84de 08ea d04a deb5 18c7 2b9c d8ef ......J......+.. 803da53: 800f 52db 8b0b c18d d8d2 fead 8c5c 19f1 ...R........\... 803da63: dd0f 0489 5e71 2b01 5fc4 e3b9 3b51 8ccc ....q^.+._..Q;.. 803da73: 485a 813d e802 d17b 0016 a5ce ac9a 5273 ZH=...{.......sR 803da83: 337b 09c8 e692 3c84 772e 0405 7b58 38e2 {3.....<.w..X{.8 803da93: 4822 01de 3b91 c2bc 7453 a4ac 08e1 8777 "H...;..St....w. 803daa3: 753b 6660 bc27 c79f 44d1 934e 4e5a 915f ;u`f'....DN.ZN_. 803dab3: e18d 428f 8e80 f297 3fe2 769c d4e4 fe78 ...B.....?.v..x. 803dac3: e81f 6681 d5c0 07de 4c78 cd43 ca5d 6c5c ...f....xLC.].\l 803dad3: 932f e55a a6be 304c c944 be87 29f8 784f /.Z...L0D....)Ox 803dae3: fb50 fde9 0599 c4e3 fe25 01de 6bb1 36b2 P.......%....k.6 803daf3: 3578 fd21 ef7d 3142 96fc 1a8a 2ae6 6279 x5!.}.B1.....*yb 803db03: 2025 5628 53c2 e07b 660f a904 4e3c 7624 % (V.S{..f.....AM@ 803db43: 3b42 a0e4 0e29 0d0a ff37 e1c4 6a4d f787 B;..)...7...Mj.. 803db53: f939 39ae 1146 5c25 dec3 100e c830 bb11 9..9F.%\....0... 803db63: 1de2 9008 ac03 051f 76e5 23ef 178c 9d27 .........v.#..'. 803db73: 324f b946 50a0 57d2 c13e d894 c293 c424 O2F..P.W>.....$. 803db83: df4c 858e d3c3 ff2b 2919 f2a0 e26a c8a0 L.....+..)..j... 803db93: 5a43 2e5d 1637 af4a 08a5 2fcd d6c0 9688 CZ].7.J..../.... 803dba3: ecc7 1ca8 dc08 0879 b893 a933 0ee3 2de2 ......y...3....- 803dbb3: 3187 02d1 0a42 0d0f f0c8 a09e fe45 f1af .1..B.......E... 803dbc3: bae7 2498 4e44 10ea 0d49 8da4 fc31 2f32 ...$DN..I...1.2/ 803dbd3: 87f9 23dc 926b 99e9 509d a80a f286 206d ...#k....P....m 803dbe3: ef89 3a93 43be 31d5 420c 24c3 58d2 9510 ...:.C.1.B.$.X.. 803dbf3: adba 0d2c b253 7849 bf01 067d b0a2 f90e ..,.S.Ix..}..... 803dc03: 277b 098f d249 a931 8e93 6aff c091 30cc {'..I.1....j...0 803dc13: 77c9 8e44 9fa9 9ae1 2655 b13a bab8 1d09 .wD.....U&:..... 803dc23: ec11 14f2 7924 1734 921a 9acb 7143 01f8 ....$y4.....Cq.. 803dc33: d119 abd9 76f0 ec14 2636 8987 2262 1bf0 .....v..6&..b".. 803dc43: 7053 371f d0d7 a952 64d5 a759 d756 1265 Sp.7..R..dY.V.e. 803dc53: 0706 a3e4 882a f20b 486c 9f17 fecb da84 ....*...lH...... 803dc63: 10e4 24ef eb21 2c33 ca09 c79e 549f 3876 ...$!.3,.....Tv8 803dc73: d659 94fe 7a6a ff07 5b00 7084 3c1b ca52 Y...jz...[.p.es 803dde3: 3e16 f7bf 0321 2c08 e939 c0b1 ee31 88d5 .>..!..,9...1... 803ddf3: d976 4e80 34a3 6c0d 49b3 96e3 7ec7 55d4 v..N.4.l.I...~.U 803de03: 97ac 46e9 fa4e 6dba 27c8 1546 3e53 5a6e ...FN..m.'F.S>nZ 803de13: cf2c fccc 6302 d9c6 6bf9 4efb f2cb 8ecf ,....c...k.N.... 803de23: c838 beaf f800 8e0d 76b0 29d4 ec7e 80b6 8........v.)~... 803de33: ac27 9929 cbaa 80b9 75b8 e63f 4e3e 87ff '.)......u?.>N.. 803de43: f408 6ab3 073f 55ae c73a 903f 6ced e8df ...j?..U:.?..l.. 803de53: 434d 55f5 3b11 5533 5bdd 569a 9307 f8c6 MC.U.;3U.[.V.... 803de63: 4a9c c6be 7eca 354e 5472 e8f5 6fbb beae .J...~N5rT...o.. 803de73: ec7d a5d7 9c15 2f1a 5101 5db7 e738 17d4 }....../.Q.]8... 803de83: b44d e4c9 f914 be14 39de 79e2 1da7 b3bb M........9.y.... 803de93: d2f8 f9cc c389 fc9b 2134 1472 e3bf 42a7 ........4!r....B 803dea3: f187 1ca2 7fd9 d8fd d80a 72f6 d641 f7a7 ...........rA... 803deb3: 2693 b04a f959 825a bbbb c23c 985c 8738 .&J.Y.Z...<.\.8. 803dec3: 0a2f 1dd6 55bf 5530 04fa b2e6 c477 1ff2 /....U0U....w... 803ded3: 35cd 97c9 f7a4 a0c0 350e 57e5 f85c 89fc .5.......5.W\... 803dee3: bb09 3d84 7684 b124 e712 2075 0446 2d97 ...=.v$...u F..- 803def3: 5faa 139a bcaf 6852 567a 9dfd 7e37 d47b ._....RhzV..7~{. 803df03: 15ab f5cc 55ad a405 23c4 53f3 2026 139a .....U...#.S& .. 803df13: e253 963c a9f9 c4c6 e279 ef4d 0ddf cc05 S.<.....y.M..... 803df23: 9277 d00f 6026 f8d7 adca 9d04 bb85 5b3d w...&`........=[ 803df33: d731 5e9a b4ed cc99 1cb4 967d f394 22a6 1..^......}...." 803df43: f03a 4b11 e92e 2fc1 f4b8 2f2e d2be 5522 :..K.../.../.."U 803df53: 51fd f654 fea1 6912 43d8 09fd f650 51a7 .QT....i.C..P..Q 803df63: 740b 9c3d 1a0c 7d67 a2f2 2f2c f1d1 cba1 .t=...g}..,/.... 803df73: b48a c0c1 9be9 5b73 42f8 dbc5 812a f28b ......s[.B..*... 803df83: 4429 7d49 0859 97e7 14fe 7ce4 52b9 b0d9 )DI}Y......|.R.. 803df93: 2383 1faf e02f 1bc3 26fc 8522 71c0 02b9 .#../....&"..q.. 803dfa3: 882f 104f f60a d954 539e 4d32 99ed 050e /.O...T..S2M.... 803dfb3: 3d40 47c6 6a5e 50a7 3aa6 109c a9b0 e347 @=.G^j.P.:....G. 803dfc3: 9d0b 21aa 219f c8e6 4a7b cb78 0a37 cd2f ...!.!..{Jx.7./. 803dfd3: e740 a70e 763f 37e4 ffa3 1103 a13e 43e5 @...?v.7....>..C 803dfe3: 003a 2f00 :.. 0803dfe6 : 803dfe6: 6d2f 6961 2e6e 7363 0073 0000 5448 5054 /main.css...HTTP 803dff6: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 803e006: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 803e016: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 803e026: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 803e036: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 803e046: 6e65 2d74 654c 676e 6874 203a 3031 3435 ent-Length: 1054 803e056: 0d35 430a 6e6f 656e 7463 6f69 3a6e 4320 5..Connection: C 803e066: 6f6c 6573 0a0d 6f43 746e 6e65 2d74 7974 lose..Content-ty 803e076: 6570 203a 6574 7478 632f 7373 0a0d 6f43 pe: text/css..Co 803e086: 746e 6e65 2d74 6e45 6f63 6964 676e 203a ntent-Encoding: 803e096: 7a67 7069 0a0d 6143 6863 2d65 6f43 746e gzip..Cache-Cont 803e0a6: 6f72 3a6c 7020 6972 6176 6574 202c 616d rol: private, ma 803e0b6: 2d78 6761 3d65 3638 3034 0d30 0d0a 1f0a x-age=86400..... 803e0c6: 088b 0000 0000 0400 d50a 6b7d 238f 7239 ..........}k.#9r 803e0d6: 5fe0 a791 e7d0 6dae a349 bd57 d854 79c2 ._.....mI.W.T..y 803e0e6: f6c6 80f9 c05b bd80 da9f 418d 994a ca55 ....[......AJ.U. 803e0f6: 496d 4829 eeaa d1aa 3fe9 0718 3818 70e0 mI)H.....?...8.p 803e106: ec7e f01f e95f e49f 9278 2641 a533 ef6a ~..._...x.A&3.j. 803e116: bb87 9dad 2519 119f 88c1 3060 2418 fc7f .....%....`0.$.. 803e126: 9fcd d675 76d5 2d95 5fcb fe8b b77c 7ceb ..u..v.-._..|..| 803e136: f719 fd07 e751 767f f77e ffdf f3be ca3f ....Q..v~.....?. 803e146: b179 15de f5f0 ee54 65fb a3f5 db2b cdf9 y.....T..e..+... 803e156: fd8f f565 7554 edb3 9cbe 8b2f b66e f32b ..e.Tu..../.n.+. 803e166: 9ba2 fb17 5cac baee e58f 3cd3 ecdb 6acb .....\.....<...j 803e176: 3f8d b79f f745 aab1 c5f6 bbb6 b228 ff1c .?..E.......(... 803e186: b4f3 9ead dd37 5655 bbae 62ab dcfd 675d ....7.UV...b..]g 803e196: ba5f 62bb 354e cf76 55ab 7db6 e43d 6ee5 _..bN5v..U.}=..n 803e1a6: ccb3 a75e 65b3 ff35 ec7c 36ef 7ae5 bd56 ..^..e5.|..6.zV. 803e1b6: 2efc 7edb e6ee eb8f 63c3 deb5 76f7 d7fb ...~.....c...v.. 803e1c6: 3165 f72d c080 d8fc 5687 d966 bbb6 9e7b e1-......Vf...{. 803e1d6: 3fc1 c39b daa6 d895 74e2 2c5b 7db3 a5f9 .?.......t[,.}.. 803e1e6: 12a0 cb0f 21f2 f6eb d937 58ba 10f6 729e .....!..7..X...r 803e1f6: d4fd efed d9b3 78b2 e3d8 c3f7 0b7e fa3f .......x....~.?. 803e206: c59b 5961 01ec dee8 936e a1cd b4d0 183f ..aY....n.....?. 803e216: ab15 3f63 3003 14bf fedd bf6c 3fee f356 ..c?.0....l..?V. 803e226: 1de7 9cfd 9f9a ea8b 200b e089 6750 e59a ......... ..Pg.. 803e236: 29be b0ff 5e2f bdf6 98bc 5b57 0e00 5ca0 .)../^....W[...\ 803e246: 6b57 b086 bcfb 7844 f8a0 b0ee 772c 258a Wk....Dx....,w.% 803e256: 23e7 7e19 5eaa 44ba f80f 29d1 9bd7 7de7 .#.~.^.D...)...} 803e266: fe97 71fd baff 7e29 2bbb edb2 f17c d0e9 ...q..)~.+..|... 803e276: 5afb 3ecc fb97 b65e 40d9 b64a 179e c5d2 .Z.>..^..@J..... 803e286: cb2c 189f c3fe 45d7 2fb9 4108 fccc cdba ,......E./.A.... 803e296: 4736 89c0 aa86 634f cd34 711e fadc 3832 6G....Oc4..q..28 803e2a6: 1807 6ceb 9d3b fb55 b1c5 3d5c 9775 53c5 ...l;.U...\=u..S 803e2b6: ceb1 b30f 0b6a 3ac3 1c1d bbf9 cfbb fbbb ....j..:........ 803e2c6: 61c5 e593 5c48 5e48 57ec 1e4b c7b0 556c .a..H\H^.WK...lU 803e2d6: 5f2e 7fa7 2db1 65b3 6ff7 e58a 0297 27f8 ._...-.e.o.....' 803e2e6: eeeb f5b2 b7ae b62b e3e5 82bd e44d 01d9 ......+.....M... 803e2f6: f65f fcb2 cf0f fdbb 3874 bc18 efbb 76ad _.......t8.....v 803e306: 64bd 71ce e556 07af 9c60 72a7 1d3d cfdc .d.qV...`..r=... 803e316: f9b2 4467 9d60 e6f7 b2d5 4eda fe2f f6ea ..gD`......N/... 803e326: 7eaf ebfa bde1 8d7c e3c7 1c7b c7a5 f565 .~....|...{...e. 803e336: f7b5 dd3a b7cd 72d5 bf79 ca28 05a7 74f7 ..:....ry.(....t 803e346: 9ecc b2f3 ceea f5b3 6c97 ddd7 ab6c 6da7 .........l..l..m 803e356: dbb1 bf75 9b00 8e57 cb35 b2f5 175c e23d ..u...W.5...\.=. 803e366: 7bd0 0d68 5971 80f6 9f19 d3d6 b659 302b .{h.qY......Y.+0 803e376: 1b97 ea02 dfee 9c7f cf03 4742 4fbb ae97 ..........BG.O.. 803e386: 1c09 ed55 7077 b8fc f328 58bc ea7f 8bee ..U.wp..(..X.... 803e396: 3015 beff ca08 b31d 0d43 3daf 2c8c e830 .0......C..=.,0. 803e3a6: 58b6 8fef 54d9 3378 329b 558b 7bcf 0104 .X...Tx3.2.U.{.. 803e3b6: 2046 cd9b 1fb6 e5f7 597e 927c ead1 20c1 F ......~Y|.... 803e3c6: abee 74d5 79b8 e4e9 b3f0 8fc8 6eb3 d9b5 ...t.y.......n.. 803e3d6: 68b3 00ee f5ce 8f13 57d9 caa6 00cd 7206 .h.......W.....r 803e3e6: 24a8 5fee 14df ceab 9ee0 10c5 6986 c28a .$._.........i.. 803e3f6: f401 7cff 1210 060f 1876 17a6 8f8f e383 ...|....v....... 803e406: 540e 708d 0e02 f4ed f076 a8ee eae2 ba5b .T.p....v.....[. 803e416: 7ab9 4f77 9584 18f1 d234 c516 5f7c a66d .zwO....4...|_m. 803e426: febd f415 2d0e 7201 5584 3faf 94a2 4f2f .....-.r.U.?../O 803e436: f944 16e9 fa98 a0f2 3e23 3265 591f 2939 D.......#>e2.Y9) 803e446: 434a 6840 d832 1cbc db17 eb83 d959 5411 JC@h2.......Y..T 803e456: 0f4f 4640 c67e 0451 0372 5f01 1f80 5fab O.@F~.Q.r.._..._ 803e466: 47f1 2f2a 7c9d 80dc 443a 8616 cb31 443c .G*/.|..:D..1. 803e4a6: 909d c520 e5a7 017a b772 c117 2f90 c969 .. ...z.r..../i. 803e4b6: f783 dca5 a095 b521 6007 686d 5592 7118 ......!..`mh.U.q 803e4c6: 23e0 22cc 5ea2 cd54 e935 1458 d254 39b1 .#.".^T.5.X.T..9 803e4d6: d8e8 e6b4 f6ed 1551 8a6d 076d 8e18 ddc4 ......Q.m.m..... 803e4e6: f277 e98c 1073 852e 9505 6b0b d641 4c7f w...s......kA..L 803e4f6: 4f84 054c 024e 2dd1 41f6 b00a aaca 27dc .OL.N..-.A.....' 803e506: 2495 bfd7 3f9f 776f 37a0 5536 a309 95bd .$...?ow.76U.... 803e516: 3ece a4c2 3384 fe45 6ba9 75ba 0789 94a9 .>...3E..k.u.... 803e526: 8f17 f3d9 7f72 5a34 be79 e628 819f 0223 ....r.4Zy.(...#. 803e536: b628 fb30 1e54 c308 ac30 9351 662c d2b2 (.0.T...0.Q.,f.. 803e546: bc15 35de affd 579f 62b3 69fb 553a 2e86 ...5...W.b.i:U.. 803e556: 6bd7 db9a 75ca b2cf 130d 56ac 341a 5849 .k...u.....V.4IX 803e566: 255a f884 f4d6 cf13 063e ffc4 dc9c 89b8 Z%......>....... 803e576: ccc1 c867 8f1a b165 2dcc 05a5 8f02 2729 ..g...e..-....)' 803e586: 40f4 cf95 ca61 23af 54db cfc1 2dcd e973 .@..a..#.T...-s. 803e596: dd7e 8d23 53d9 fff5 8680 a701 e4e9 12e9 ~.#..S.......... 803e5a6: 8592 0566 0f08 c7cf 7dbd 2d55 84c1 15b1 ..f......}U-.... 803e5b6: 4935 d18b fc0c be58 1968 edf7 800a 8354 5I....X.h.....T. 803e5c6: 0561 f5c3 7cb8 732e 2e57 ae4a af15 9c15 a....|.sW.J..... 803e5d6: 916a 0c1c 6aa5 fe5b 2d8a 3b2c 6bb9 96b2 j....j[..-,;.k.. 803e5e6: 15ae 1b50 2ad8 5360 4240 5060 15b4 66d1 ..P..*`S@B`P...f 803e5f6: 5556 d30e db29 0a23 905d 05a6 e541 3e68 VU..).#.]...A.h> 803e606: 34fe 40c9 344c 9600 66d9 9857 4122 5472 .4.@L4...fW."ArT 803e616: 6d9c a8d4 24b0 4586 32c3 dbae f64d c604 .m...$.E.2..M... 803e626: 1890 fc4e f5a1 ead8 0d44 f3e8 0ed1 14a5 ..N.....D....... 803e636: b42d bead 2e6a e4fe 6764 9008 0aa5 9ada -...j...dg...... 803e646: a0e6 0fe9 1f9d f798 7cc1 9526 e2ac e46d .........|&...m. 803e656: 28ce 788c 32ba c959 6a0a ca0d 0914 b9fc .(.x.2Y..j...... 803e666: 5e99 364d 7f2f ae56 d536 9f76 f7ad a4f7 .^M6/.V.6.v..... 803e676: d99e d9e4 f5a2 ff74 ccb5 0bf7 d6b6 12c4 ......t......... 803e686: 7c78 3c7c 7aea ec00 5342 5963 ee3c 8fb5 x||<.z..BScY<... 803e696: 3e87 4522 ab9c 63a6 5a8f b684 5260 cbce .>"E...c.Z..`R.. 803e6a6: 0f2f e6b4 7038 a307 d5c9 45e6 a72d fc5b /...8p.....E-.[. 803e6b6: f32d 951a 92e6 5ade 3e9a 976f b7ef d860 -......Z.>o...`. 803e6c6: ee7e d66f 974f 1e9d e854 86f4 eff8 d575 ~.o.O...T.....u. 803e6d6: 16db 2260 9007 fccb da8f 29cd df1e ce1a ..`".......).... 803e6e6: 05f6 01d8 f320 0162 7378 66d3 bd55 9d74 .... .b.xs.fU.t. 803e6f6: ea64 8fb1 13d6 8f58 ecab 5d0f 1bf7 4856 d.....X....]..VH 803e706: 1bfc 76ac 55f9 767d c0cc a796 fc50 d3da ...v.U}v....P... 803e716: 0863 2463 30f4 d434 1c14 11c5 0014 37e3 c.c$.04........7 803e726: 4fdb 0c79 6fa8 d968 1683 6c93 e9d0 8cdd .Oy..oh....l.... 803e736: 7a03 b2f9 904c 0de1 dab4 bdb9 d181 f032 .z..L.........2. 803e746: 34b7 bbd9 0ac2 d3df f66c b687 c766 d5df .4......l...f... 803e756: 502c adb8 21d1 f7d0 b04d 2a82 3d02 5873 ,P...!..M..*.=sX 803e766: 0cc1 17eb 4816 ce1b b580 591f a609 5d4f .....H.....Y..O] 803e776: 80ab dcc0 3c93 b22e 341c a0c0 4683 f23a .....<...4...F:. 803e786: f6ea 9669 1fbd f174 3faf 8cba ea5b cb68 ..i...t..?..[.h. 803e796: 5833 e414 876a c78f d937 a6ec acbd a259 3X..j...7.....Y. 803e7a6: 6aa2 c814 f6c2 4d64 32a1 0d9d a387 7b9b .j....dM.2.....{ 803e7b6: 02c3 619c 23d7 4e0a 1cdc 002a ee85 a6e6 ...a.#.N..*..... 803e7c6: 3419 13a0 a02d 1561 ab0c a52c b161 5b12 .4..-.a...,.a..[ 803e7d6: 82f5 b331 3036 008a 17a9 773f ab7b 3114 ..1.60....?w{..1 803e7e6: 3d63 b07e 2f9c 01a3 91ff 5664 6a63 3b25 c=~../....dVcj%; 803e7f6: 31c2 0d34 1955 b14e 48bc a24d ba1a 04d7 .14.U.N..HM..... 803e806: 6b5d 22a1 aa43 0538 c287 cb07 ee55 a60c ]k."C.8.....U... 803e816: 5a01 0cbc d5ee c1f7 4c0b 02aa 783d 4297 .Z.......L..=x.B 803e826: b7dd aae1 bb88 a184 c87d a7b4 04e9 8265 ........}.....e. 803e836: a375 89e6 432b 6287 9a32 5e3c 804d 70f1 u...+C.b2.<^M..p 803e846: af31 80b0 e922 aaec 9965 2e77 c306 386c 1..."...e.w...l8 803e856: 142b df27 6760 0b7c 2d68 d24b cfb9 0f7b +.'.`g|.h-K...{. 803e866: 365b 9a83 3860 a3de 21c2 b07a 1f3e 2b01 [6..`8...!z.>..+ 803e876: b23b ccc6 c0c1 5b49 bf00 165f 6ff6 e861 ;.....I[.._..oa. 803e886: 719d c11b cb49 6cd8 28b7 fbf2 7b5f 3ae5 .q..I..l.(.._{.: 803e896: 5e2f c7a0 91d1 4b66 1458 4a12 c8ea 7581 /^....fKX..J...u 803e8a6: 2729 cb38 5760 12c0 961a eddb 2cfc 9873 )'8.`W.......,s. 803e8b6: 9492 1986 5750 9498 9864 5224 dc42 30cd ....PW..d.$RB..0 803e8c6: 6998 c7f1 3b1f ecab 67a5 c252 1ff1 9b11 .i...;...gR..... 803e8d6: b550 bd87 2e5f b5b9 4b92 cbf2 3427 7892 P..._....K..'4.x 803e8e6: e551 b94a 5f24 b9ca 60b7 912a 5de6 f792 Q.J.$_...`*..].. 803e8f6: 20d7 81fc f5c4 a327 abdb e19b 1c64 c3af . ....'.....d... 803e906: e057 58ad d102 9a98 ca34 5d9e 3cf2 263f W..X....4..]..A.h. 803e9b6: 25e5 39ea 1338 5cf5 8e9e 3927 ace5 8400 .%.98..\..'9.... 803e9c6: 18d8 f53f ad39 5e89 7d12 6c03 e3a0 4e0a ..?.9..^.}.l...N 803e9d6: 72be 4663 ba75 2fde d57a 0f63 c8dd abef .rcFu../z.c..... 803e9e6: bf3c b14c ddc5 fc23 0b69 66e4 c474 0b14 <.L...#.i..ft... 803e9f6: 66a1 5c13 5e3c 1fe1 e32b 480e c7d4 32f9 .f.\<^..+..H...2 803ea06: eddb f37e f85b fbd9 e7e4 dd8b c41e ee7b ..~.[.........{. 803ea16: 3266 1a46 3cca d6af ab62 0f92 199c 9f77 f2F..<..b.....w. 803ea26: ad07 2574 1175 9ea4 bb6a a700 db2f ec02 ..t%u...j.../... 803ea36: a75d 1c46 a03e 702d c01b 57ac 3f60 fc04 ].F.>.-p...W`?.. 803ea46: aa20 ffdd e7e2 c69f 5b3f a727 dfb3 1f6e .......?['...n. 803ea56: efe1 bd3e 207f f87d 6f41 8374 6c8d 68d7 ..>.. }.Aot..l.h 803ea66: d429 a7a7 ec0b ba08 2a02 93a1 205b 39a2 )........*..[ .9 803ea76: dc53 13b6 db70 90b2 32c3 b767 d6a9 d83b S...p....2g...;. 803ea86: b0bd 6946 307f e77c e17d 57e0 4f40 7fe4 ..Fi.0|.}..W@O.. 803ea96: 155d 9979 c075 5e2f eb14 580e 9d93 7ef7 ].y.u./^...X...~ 803eaa6: baca 06b9 ff13 50f2 b56f 4671 85c3 ef96 .......Po.qF.... 803eab6: 55e3 affc cde4 9f57 ecac a0e5 1f83 0021 .U....W.......!. 803eac6: 2d0f 5af8 ec7b 0798 4dcb 8866 c906 98f0 .-.Z{....Mf..... 803ead6: 883d 0b42 d467 0904 a0a4 6c1d 1499 9d0d =.B.g......l.... 803eae6: 85ea 689c bad7 d87c f93b 5277 56d9 ada8 ...h..|.;.wR.V.. 803eaf6: c725 6d1c b92d 8b42 3ee4 f10e 1d59 a717 %..m-.B..>..Y... 803eb06: 6513 706e 46f3 514b 244b 593b 1235 75cc .enp.FKQK$;Y5..u 803eb16: 6a62 de2e d35a f393 6bbb b9be 474f fcd3 bj..Z....k..OG.. 803eb26: 7dad 9aba 9f41 013a 9db3 175f 6144 14b0 .}..A.:..._.Da.. 803eb36: f2bd 2829 b149 de5b e848 55b7 7434 cefe ..)(I.[.H..U4t.. 803eb46: 8b8a 8237 68ea 56f5 5d1c db45 d2a3 1798 ..7..h.V.]E..... 803eb56: cd17 5ea2 b227 db01 865b c8e7 5041 59b1 ...^'...[...AP.Y 803eb66: 4d90 428f a0e4 b362 9f70 a8a8 0276 e314 .M.B..b.p...v... 803eb76: e305 b611 c0b2 0e0d 1cbb d9a4 0f59 740f ............Y..t 803eb86: e261 9816 31b8 164a 0a11 f93d 0f22 9ea1 a....1J...=."... 803eb96: 95c4 6a47 2192 047f f1ed 3ae2 2d8b b313 ..Gj.!.....:.-.. 803eba6: f7d2 322e 09dc 736b 0c5a 2eaf 8401 85d3 ...2..ksZ....... 803ebb6: bc04 6d1e ca59 124e ffb8 3770 379c 1928 ...mY.N...p7.7(. 803ebc6: 07fc c7d9 e987 5c8f b6bc 8448 629a 2e4c .......\..H..bL. 803ebd6: 9800 745a 4715 d30b 4d0e 4c50 251b 1a6a ..Zt.G...MPL.%j. 803ebe6: 60d3 55a2 9128 a12d 87c9 be7e 36ad b1e0 .`.U(.-...~..6.. 803ebf6: 7759 2fdc 2458 3d3e 8041 0084 f16a e461 Yw./X$>=A...j.a. 803ec06: fa1e 29b4 141a 3490 a71f d540 cfe2 3d44 ...)...4..@...D= 803ec16: 824a 3345 a943 799b 6fb6 0aa5 18ad d722 J.E3C..y.o....". 803ec26: a289 bc83 6c5a 0453 6ef2 a14e 9883 421f ....ZlS..nN....B 803ec36: d4b9 900a ccd8 4b8e 0cc7 0f63 0fc2 6e56 .......K..c...Vn 803ec46: d978 9e3b cb1a 1d5a 7995 38b1 2980 b595 x.;...Z..y.8.).. 803ec56: b87b f6a9 73bc 6e1c b6bb bd3a a4d6 3ccd {....s.n..:....< 803ec66: 2403 bc5b 2db5 9505 ee29 d529 39c3 a141 .$[..-..).)..9A. 803ec76: c705 88aa 7a26 d815 6b67 64f2 0264 bc5c ....&z..gk.dd.\. 803ec86: aeae ef77 cef3 c4c1 6e97 496b 50f1 a39d ..w......nkI.P.. 803ec96: f2f0 0d77 28e4 423b 21d6 63c4 022e a1f4 ..w..(;B.!.c.... 803eca6: 9c45 a0eb 7599 c2bd b486 3db3 a639 11a8 E....u.....=9... 803ecb6: d415 d781 da26 332f 8abe 03a2 17ca 1b3c ....&./3......<. 803ecc6: d108 82c0 aca6 1bb2 82c7 354c db97 b860 ..........L5..`. 803ecd6: e4a9 fd2a 1efd 444c 2f4c d440 4752 5eb7 ..*...LDL/@.RG.^ 803ece6: b898 7162 53a4 73eb 969f 6d53 dba0 6809 ..bq.S.s..Sm...h 803ecf6: abd0 9377 1b8c a0d4 2011 2ce8 c0f8 b8f6 ..w...... .,.... 803ed06: 8e43 dbc7 98e4 5d2e 8221 075b cb05 3986 C......]!.[....9 803ed16: 8aa6 642d a098 4cb6 2d10 0d44 4db3 e56a ..-d...L.-D..Mj. 803ed26: 3c17 f667 83b3 a25e d637 5370 8932 23b9 ... T.. 803ee56: bbf8 0bec b8b4 1b5f 8138 0336 6ac5 e054 ......_.8.6..jT. 803ee66: 91df 00a2 a37a ff2e 6c77 dbf6 7cdc bb23 ....z...wl...|#. 803ee76: b448 824b 0331 91bd 04c4 6e4c 49de b1fd H.K.1.....Ln.I.. 803ee86: 8ca4 c021 5b90 349a 84b7 1973 cc0f d268 ..!..[.4..s...h. 803ee96: 409f 0e05 740f ecbb 0a48 c433 c615 ef03 .@...t..H.3..... 803eea6: 515f 15b4 2539 1582 5193 7f0e 22f7 aa43 _Q..9%...Q..."C. 803eeb6: c515 48db 4018 b34c 08a3 caaf 564e 5e3f ...H.@L.....NV?^ 803eec6: b860 af74 ac04 e803 fc04 642b dd31 1d27 `.t.......+d1.'. 803eed6: 07e0 373b 3ba9 3123 dd53 a3cb da70 79ea ..;7.;#1S...p..y 803eee6: e8be c0e1 1041 2af2 975b 679b 970c d6ae ....A..*[..g.... 803eef6: 6db0 94d7 0613 b9c7 dfe5 8433 42f0 2f18 .m........3..B./ 803ef06: a206 3f10 7070 2244 d775 25ab 09c6 cd10 ...?ppD"u..%.... 803ef16: de4a 8365 57b1 d354 c98b 0264 94de 7819 J.e..WT...d....x 803ef26: 330d f8d8 d542 dbc2 665f 555e 9816 e3bc .3..B..._f^U.... 803ef36: 613d 520e 1761 d52e d72d d58f bac9 0aea =a.Ra...-....... 803ef46: d6ad d7cb 66ce d10b 0780 d7d9 6896 87db .....f.......h.. 803ef56: 25e7 cc6d 9382 7e12 c306 0c72 272a a99d .%m....~..r.*'.. 803ef66: e99d 35cd b86c 37a9 82d5 e8d3 8e17 44f6 ...5l..7.......D 803ef76: 2a31 efd7 0e92 10fb 9b98 13e2 ac1b bc7c 1*............|. 803ef86: 2f98 f5b2 f153 e0b7 ff86 bc0a 85d7 886f ./..S.........o. 803ef96: fc4f 26fd 4d87 4c50 5eec 316c 1f1c 0abc O..&.MPL.^l1.... 803efa6: dddb d5cf 021a bb65 cf17 881b c917 0eff ......e......... 803efb6: e282 ad61 a3bb dbb8 e0e1 179d dd0c 3dd2 ..a............= 803efc6: 974d 177b ef9a 88b6 becd 5bae 6264 30cc M.{........[db.0 803efd6: 4206 e390 8401 f754 6504 da23 01ab 60da .B....T..e#....` 803efe6: fa36 0af5 c522 2efd c830 6c29 e32a 3fee 6..."...0.)l*..? 803eff6: 2def d1bb 965a c1d6 be2e bf7d 201d 4542 .-..Z.....}.. BE 803f006: dcaa e781 3ada 6fb5 822d f32f 6d37 402f .....:.o-./.7m/@ 803f016: 3f5c 1040 2302 a39a 74ee 28b8 e28a aa98 \?@..#...t.(.... 803f026: 3961 d13c 3609 b10f 8e02 830f 9761 39be a9<..6......a..9 803f036: c15a 0cf2 4b04 7aab bd45 6dc6 e898 8c01 Z....K.zE..m.... 803f046: 368d 1ae9 6039 b225 c1b8 d53f 41e6 0130 .6..9`%...?..A0. 803f056: 032b a1a5 0b6f a4c7 8e95 fef1 d9cd 37d4 +...o..........7 803f066: 19b8 a4cc 9d67 65d1 8632 7368 6d05 a1d0 ....g..e2.hs.m.. 803f076: f240 c623 d270 8eb1 8e5e b262 8885 dc02 @.#.p...^.b..... 803f086: 2e73 7b72 23fa d3ce 7be8 000a b415 f2c2 s.r{.#...{...... 803f096: f01c 9413 1d43 6e94 c83d ea09 1680 d302 ....C..n=....... 803f0a6: 35e2 5b68 82d2 bb72 f9e7 0e1c a42d 8f9b .5h[..r.....-... 803f0b6: 8333 5f9a edb3 b71a 925f c768 b699 85a6 3.._...._.h..... 803f0c6: a5c9 9b57 ed62 637d 11e2 2a63 d485 f6ed ..W.b.}c..c*.... 803f0d6: 8a5b f132 8ada 1404 2b6b c428 2b6a 9312 [.2.....k+(.j+.. 803f0e6: ada7 4c6c 5c10 686c c2ac 8943 73e7 aa38 ..lL.\lh..C..s8. 803f0f6: 371a 3f12 2745 8c77 d431 5183 927d 3a43 .7.?E'w.1..Q}.C: 803f106: b317 2fe5 e58f 6612 e016 9544 db11 adae .../...f..D..... 803f116: d627 862a ca59 1dbe 564d 7cc1 4103 7968 '.*.Y...MV.|.Ahy 803f126: 05f1 740e 36f1 4eb0 7e3b 2f6b 85cc 19d8 ...t.6.N;~k/.... 803f136: fc88 e4b9 886c 85fd 4f7d 09b2 a03a d67d ....l...}O..:.}. 803f146: 0ef9 0a5c 6485 c06a cae9 b0f7 5f29 a620 ..\..dj.....)_ . 803f156: 8e95 4d35 3087 81b3 0136 b749 f406 4c1d ..5M.0..6.I....L 803f166: 2779 3964 fd08 78c1 3046 9e97 50f1 4694 y'd9...xF0...P.F 803f176: 8f9e 4661 93b0 e70f cc52 4d5a e1bf b7a6 ..aF....R.ZM.... 803f186: b508 9a1f 32ee 159b 34f6 ff4a 740e 1845 .....2...4J..tE. 803f196: c57a 7b67 ac94 1ec1 cf28 6cda aa7f 2ab5 z.g{....(..l...* 803f1a6: 9dff e988 4d11 b81d 513a 38be 9578 0433 .....M..:Q.8x.3. 803f1b6: eee8 3f43 9cbc f1ab b85b 4041 a8ce 993f ..C?....[.A@..?. 803f1c6: a400 7df5 5869 d451 744f 04e9 8c6a f9cb ...}iXQ.Ot..j... 803f1d6: ae7c 1a7a 420f 2cc9 8e42 e333 52b8 6b50 |.z..B.,B.3..RPk 803f1e6: 1c2c e3c6 c7f5 0b00 4cf6 bf71 e1f2 43b1 ,........Lq....C 803f1f6: 20e4 ac57 0052 ce1d f909 5ff9 e68f 9025 . W.R......_..%. 803f206: 0d49 4284 757d 6575 59cc 495d 6b7a 9c81 I..B}uue.Y]Izk.. 803f216: b080 90b8 0a18 57c4 6490 21a3 4395 9b8e .......W.d.!.C.. 803f226: 0d44 c199 5553 559c 080f 1caa dd98 128d D...SU.U........ 803f236: 6662 1df6 de8e ea44 e8db c1cd ec0d 4084 bf....D........@ 803f246: 37b5 3f14 e45e 8068 b2fd 5d80 0a90 480e .7.?^.h....]...H 803f256: 233a 11ca 1651 0331 0913 528c 5762 2401 :#..Q.1....RbW.$ 803f266: ec05 30b4 1527 cd58 51c8 5803 eb6f 67ec ...0'.X..Q.Xo..g 803f276: b853 5452 b492 e49b 63f8 9d8b d965 c881 S.RT.....c..e... 803f286: 1f3d 8c5e 0cea 35d9 b301 69da a423 6886 =.^....5...i#..h 803f296: 6bb2 3088 beb8 aa39 1412 1a69 d2e8 5106 .k.0..9...i....Q 803f2a6: c872 0b3b c712 046f 0942 1761 5314 0da9 r.;...o.B.a..S.. 803f2b6: 0d0f e1ca 0c01 593b 0e31 be61 c09b 0750 ......;Y1.a...P. 803f2c6: c793 ca29 67f7 933e b4d9 617e 5182 226d ..)..g>...~a.Qm" 803f2d6: bd78 4a53 f7ae c9c5 1771 ca9c 432d bc48 x.SJ....q...-CH. 803f2e6: f6b4 70b7 f59a 08a0 088f a761 3060 f96c ...p......a.`0l. 803f2f6: 2acd d866 4ebf 986a 87ff 8c17 3d75 7767 .*f..Nj.....u=gw 803f306: 5528 ddfc 90e6 531b 28a2 9f8f 0275 cd83 (U.....S.(..u... 803f316: 7fba 6c6f 4bed bca6 ca77 03c6 567b ba13 ..ol.K..w...{V.. 803f326: e841 05b6 3043 015a 8820 8de2 cbc5 0c00 A...C0Z. ....... 803f336: bf3f 477c 074b 11a1 e6fa 4d48 06ea f394 ?.|GK.....HM.... 803f346: 8aed 2c77 34cc 65e2 e949 c509 3494 35bb ..w,.4.eI....4.5 803f356: 4a42 1293 0120 3124 af74 0ed7 470a 3d04 BJ.. .$1t....G.= 803f366: da51 a7d0 3e0d 894b 76e4 1092 c822 7433 Q....>K..v..".3t 803f376: bde8 88ec 0114 6ea4 eba4 7230 878a 0988 .......n..0r.... 803f386: d714 a33e 151e 9b39 8845 cdc3 5c28 e0d6 ..>...9.E...(\.. 803f396: 6b68 420f 3f84 8833 3b2f 9825 884e 0b44 hk.B.?3./;%.N.D. 803f3a6: 4dd1 f870 0f4b 4bc9 9e8a 0036 988a d14c .Mp.K..K..6...L. 803f3b6: f580 5314 7f9c f41e 335c 5b9f ecee e517 ...S....\3.[.... 803f3c6: 5efa 74d3 a61e 815e 618f 4315 0ab3 58bb .^.t..^..a.C...X 803f3d6: ea71 9290 e910 08f8 f3f3 47b4 9111 2c11 q..........G..., 803f3e6: e61e d8f0 f903 b198 b9ac 4005 7700 0d50 ...........@.wP. 803f3f6: 3f9c 312c e3b9 1a09 2200 05b0 a386 2a30 .?,1....."....0* 803f406: ed42 a686 4cb2 3d5d 4a75 f063 bf51 c13e B....L]=uJc.Q.>. 803f416: 0b8d 091c 93e2 4268 a987 4e97 f6b2 2f8a ......hB...N.../ 803f426: cc60 60ef e164 b9e0 f1f8 1180 1c20 8e1b `..`d....... ... 803f436: 43c2 3cf4 3aac f360 9a7f 372d ec8b b8bd .C.<.:`...-7.... 803f446: 7f3a 0d7b 2a00 0d61 d452 fc46 eead fed1 :.{..*a.R.F..... 803f456: 15f5 848b 852c 320f 1bb9 538b d052 233c ....,..2...SR.<# 803f466: cd5d 35d7 2400 fe9d d778 e029 2f90 40ac ]..5.$..x.)../.@ 803f476: 307b 415e 9643 baf6 3234 a35c c149 2a8c {0^AC...42\.I..* 803f486: 1830 7256 64c5 3e96 f2b9 e00c 3e77 b52a 0.Vr.d.>....w>*. 803f496: 8b3d fc6b 3993 1348 1cb3 42ff 75e0 58a0 =.k..9H....B.u.X 803f4a6: d474 a04d 49a9 5cdc e7a6 854a afbe 2979 t.M..I.\..J...y) 803f4b6: 7d6c 5b66 6345 08a5 9e34 0273 7d20 0a72 l}f[Ec..4.s. }r. 803f4c6: 934a ef5b 67cd e0a6 b934 55ad d219 fe06 J.[..g..4..U.... 803f4d6: 8a56 f134 e6bf ec2b 9a27 8611 513a b14a V.4...+.'...:QJ. 803f4e6: 5539 d18c 553a f08a 2f4b 23ec 02c6 0989 9U..:U..K/.#.... 803f4f6: 2ab8 22de b743 8d69 5545 f577 fdc4 0ca1 .*."C.i.EUw..... 803f506: cb4d 44a6 3c69 1636 3bf5 f9ce 192c 65ce M..Di<6..;..,..e 803f516: 5e2d 2b28 298d 94c7 99a6 d6d1 93a4 28d2 -^(+.).........( 803f526: db05 1f81 3081 b066 2444 b1d7 e34a e7e8 .....0f.D$..J... 803f536: dbab d85b b035 abc0 30f8 4ba3 4edb 946e ..[.5....0.K.Nn. 803f546: 9257 1255 ba48 ca8a c917 568a c509 f23d W.U.H......V..=. 803f556: 136c e340 a3a5 3921 a505 94af d300 a667 l.@...!9......g. 803f566: 34e0 f5b9 31f1 ed99 28d2 3588 a34a 2e22 .4...1...(.5J.". 803f576: 68f3 6893 b168 0176 5292 cd8a c689 fe84 .h.hh.v..R...... 803f586: 4aa7 4935 9ca3 0c3a 2b79 1821 4c91 b56a .J5I..:.y+!..Lj. 803f596: a09a dba1 f2ce 7389 2aba 738b 75db 4e81 .......s.*.s.u.N 803f5a6: 6f2c 8a74 3125 6b3d 154e b9d2 534e e4cc ,ot.%1=kN...NS.. 803f5b6: eb33 e10c 94f2 49f8 1254 ef2c 9e2b f22b 3......IT.,.+.+. 803f5c6: 86ae 2612 b8ad 95ce d77d 2b5c 0eca 66ad ...&....}.\+...f 803f5d6: 20fb a126 e0d5 a5c6 249b d38c 8118 7b6c . &......$....l{ 803f5e6: 54d0 b53f e8c2 491a 7ac8 29bd 9187 83d1 .T?....I.z.).... 803f5f6: 5289 432d faed 684b d72b d792 6914 7cd4 .R-C..Kh+....i.| 803f606: 2b7e a66e 0b58 be44 2b54 a676 79d8 9d8d ~+n.X.D.T+v..y.. 803f616: e3a5 ca1c 94a7 2b9d 18a8 509f be41 433c .......+...PA.. 803fe06: 8f04 2945 ca82 8188 c34f 8e30 e2c2 394e ..E)....O.0...N9 803fe16: 9b9a d01f 0f86 5297 21ee d383 bda6 92d7 .......R.!...... 803fe26: 863e 8eb3 05c9 fc1a 9f8c 2d3f 1df7 36c6 >.........?-...6 803fe36: 51b4 ab5b 12a2 7fc6 63e2 21c3 fe85 b7bf .Q[......c.!.... 803fe46: edff c370 6da3 a0f8 7822 e6b1 a2c5 825a ..p..m.."x....Z. 803fe56: 50ab cde7 3bbb ce58 c5c8 704b 37a2 84a8 .P...;X...Kp.7.. 803fe66: 5287 09d9 ae93 1518 4f37 c1e0 0cd5 9d0d .R......7O...... 803fe76: ead5 1f40 0bc5 7798 b1b9 c595 3336 51de ..@....w....63.Q 803fe86: 10e5 6330 882d 811f e58d c0dd 1d30 80de ..0c-.......0... 803fe96: 71cc 4c9e db1f 4db2 bbd4 1bc5 9a62 6268 .q.L...M....b.hb 803fea6: 4c3a 45b9 8683 87eb 8ec0 4aa8 7df1 00ca :L.E.......J.}.. 803feb6: 83d8 3fa8 115a 3e80 dc49 af11 8f9c b1c6 ...?Z..>I....... 803fec6: e5cc 32f6 c188 21e5 43d4 dd78 bed0 155c ...2...!.Cx...\. 803fed6: 783d 37e3 7e5b ba0a 86eb e145 cbcd a2fd =x.7[~....E..... 803fee6: 04b5 d636 005a 0a7b 200b f838 ab3f c625 ..6.Z.{.. 8.?.%. 803fef6: d778 f784 cada cdba 44af 199c aaa8 6d89 x........D.....m 803ff06: 330e a183 d45e 4709 2a0d 3bb4 92dc 5830 .3..^..G.*.;..0X 803ff16: f204 bd87 831d 3ba6 d85f 72e8 535d 2dc2 .......;_..r]S.- 803ff26: fa22 d653 5690 6be3 9416 35e2 69a7 1281 ".S..V.k...5.i.. 803ff36: 2334 9751 3df3 6eb6 6d45 03f0 fd02 9dc3 4#Q..=.nEm...... 803ff46: c822 d5de e410 0e0f 813a 03e0 7203 8d30 ".......:....r0. 803ff56: 0be0 9e6c 0222 1489 2f97 450f e68d 74c1 ..l."..../.E...t 803ff66: e0d0 5284 4832 1e6b 64a8 0267 76a2 206d ...R2Hk..dg..vm 803ff76: cf75 1133 34aa 3bdd a4fc dbb8 f4a4 e2e3 u.3..4.;........ 803ff86: 8292 aec1 2797 c782 5385 ab32 48e8 6d7b .....'...S2..H{m 803ff96: 1445 54c1 e619 f608 3451 b7e6 5034 a5e7 E..T....Q4..4P.. 803ffa6: 2b44 90a6 9d82 f878 61d4 35dd 99e5 8d01 D+....x..a.5.... 803ffb6: 32fe ae79 64ad 974d 2beb baeb 1cde 3d70 .2y..dM..+....p= 803ffc6: 4a06 ee86 2b8f 56e7 50fa d5fe a2ec 1aad .J...+.V.P...... 803ffd6: 0cf4 998a d7a1 6174 7092 0888 00f8 e76e ......ta.p....n. 803ffe6: fbe0 e075 68ad 4338 f7cb c1e9 6355 dc15 ..u..h8C....Uc.. 803fff6: f6a2 364a c254 616a 82af ff75 c15c 1d73 ..J6T.ja..u.\.s. 8040006: 4c60 af3e 39f7 64ba 364f 50ca dac0 d695 `L>..9.dO6.P.... 8040016: b4aa 8e44 7e0d ab68 5787 1d5e 6154 11b1 ..D..~h..W^.Ta.. 8040026: afa7 c3a3 a25b ec70 1d97 ecbc 1182 1523 ....[.p.......#. 8040036: ead7 c981 adeb 993c acf8 0265 9e76 405e ......<...e.v.^@ 8040046: 1501 0687 8689 9d7e 634c 13d7 4ae8 394d ......~.Lc...JM9 8040056: 687c e74f 7a51 4f74 efd6 b16d d624 6a7e |hO.QztO..m.$.~j 8040066: 8d74 0018 ee47 1235 ef7e 4524 10e7 8f6e t...G.5.~.$E..n. 8040076: dc3c 789e 6d77 d62d 780b 13a6 7a5e 7fdc <..xwm-..x..^z.. 8040086: 96a9 21fb 9cdc bfe7 c146 38d7 9af8 a21c ...!....F..8.... 8040096: 9550 7861 f9e4 704f 5f45 c07a e13d 9661 P.ax..OpE_z.=.a. 80400a6: 6797 e4b8 3bf2 0a1c 32b8 7853 b95b 198a .g...;...2Sx[... 80400b6: 4c77 4a17 06a6 d709 327a 6d46 d051 1d6f wL.J....z2FmQ.o. 80400c6: ff23 bb42 518c 677c 7461 a121 332c 340c #.B..Q|gat!.,3.4 80400d6: f1ec 8f00 5f22 651c 5004 194c ee7c e53b ...."_.e.PL.|.;. 80400e6: c242 8865 4fb9 e74a 272d 36eb 2f93 529b B.e..OJ.-'.6./.R 80400f6: 5439 10be 8b67 2c35 6168 8aab 2904 764d 9T..g.5,ha...)Mv 8040106: 2682 4318 7781 222a a587 0448 bdef ff59 .&.C.w*"..H...Y. 8040116: bd0c a4ad bcb9 35be c5d9 fe15 d805 883c .......5......<. 8040126: 088b 13df 4830 64fa f2b9 2140 69e3 da0f ....0H.d..@!.i.. 8040136: dc54 6f70 8bdc 3a83 ff28 887a 017f 9a20 T.po...:(.z... . 8040146: 3705 6b12 68ba 3518 1314 9ecb add4 0307 .7.k.h.5........ 8040156: 7fbc 3dc0 ceb5 4c0f b6e8 5343 f3f9 6e9b ...=...L..CS...n 8040166: 4ea0 3fa7 1b07 df78 244a 7329 2590 8c20 .N.?..x.J$)s.% . 8040176: e2aa 4f4c 59ff 2ef2 734b 09ab 6edc aba6 ..LO.Y..Ks...n.. 8040186: 8a46 8021 c2f5 82b2 602d 19b8 bb7a 7612 F.!.....-`..z..v 8040196: f153 9153 95a3 f336 0df0 0786 0af8 f8d6 S.S...6......... 80401a6: 4b73 6efb 0143 26eb 49c1 38c3 1a0e 8f6f sK.nC..&.I.8..o. 80401b6: d7d3 f50a b8da 3083 484e 701b dae6 8225 .......0NH.p..%. 80401c6: 9fed 26a3 008c b386 d927 7f82 7c02 ca70 ...&....'....|p. 80401d6: f8f2 5344 15b4 29b7 f5dd 43a6 2ee0 4a05 ..DS...)...C...J 80401e6: 0083 48a3 c58f f01b 4c75 19b0 ec78 6bf6 ...H....uL..x..k 80401f6: 6eef a300 6fa6 de3a 86f1 3c00 50d7 553d .n...o:....<.P=U 8040206: ca4d 5bc3 f2b7 19ee 04aa c59a 1e75 0fa5 M..[........u... 8040216: a9d3 3997 19be 2135 3444 c7b5 4292 4689 ...9..5!D4...B.F 8040226: e81c f8db 6849 866f a454 f17b ef15 f3d9 ....Iho.T.{..... 8040236: a137 80aa fde0 8ab6 6e39 f8d4 ac3a 4504 7.......9n..:..E 8040246: bb03 6787 7cc8 64b2 fb57 8d89 b0e8 0dbe ...g.|.dW....... 8040256: 887c 1355 8ec8 a7b9 41e6 06ae 2276 e324 |.U......A..v"$. 8040266: 16a7 dc84 16fe f802 4a3d ddcf fd4d 1a3d ........=J..M.=. 8040276: c8ef ef3c 4ce9 97ef 09da 7fa1 e777 086e ..<..L......w.n. 8040286: bf7e fb72 7749 30b7 c12b 89b5 69ff 78f2 ~.r.Iw.0+....i.x 8040296: 40fe 9bff 4ff1 26b1 130d 5963 cbe0 d1ad .@...O.&..cY.... 80402a6: d169 2f9b f9cb 2ee7 fb6e e875 ebc6 8913 i../....n.u..... 80402b6: 7d32 5b44 e296 1b71 fedc 3adc c9bd 9834 2}D[..q....:..4. 80402c6: 53d3 e4ae bafe 2a80 5d70 b973 2321 edda .S.....*p]s.!#.. 80402d6: b8c6 a985 cb4a 7070 2b8d 9535 d1c1 9a0d ....J.pp.+5..... 80402e6: ca91 c4ad b184 18fc 6891 19b6 111d 43bd .........h.....C 80402f6: e810 99b1 cb4a 5408 1930 f2d6 e762 ba27 ....J..T0...b.'. 8040306: 1d0c 7d3e 7a10 1055 ff28 03b4 73e5 3a69 ..>}.zU.(....si: 8040316: 7cd7 fcb3 6a14 99f4 5a5a 1b00 c960 7cd2 .|...j..ZZ..`..| 8040326: a2ac 54b9 6c3d 5f9f 7220 8d22 663e 72f3 ...T=l._ r".>f.r 8040336: 8438 780d a5e6 4f74 9d40 1ee5 f06f 274f 8..x..tO@...o.O' 8040346: b577 bc61 583d f0cc f34f 6d71 4fc7 08f3 w.a.=X..O.qm.O.. 8040356: d080 6d0c 3a31 ee10 0404 0247 4ab0 60b6 ...m1:....G..J.` 8040366: c350 6803 00cc 2df2 943b 6e75 9350 9d97 P..h...-;.unP... 8040376: ac32 dd3c 81c5 22ee 6633 bac6 4edf 211e 2.<...."3f...N.! 8040386: 6324 78f6 5bb1 5f54 b6e1 1cc5 eef6 05f9 $c.x.[T_........ 8040396: 6d02 7adc 621f 5548 8929 06de 29b3 112e .m.z.bHU)....).. 80403a6: aeef a0fe 51e4 6f55 c8aa 0708 3b58 f45a .....QUo....X;Z. 80403b6: 4871 b21b 7388 f21a 4f80 1c82 b1f0 46ca qH...s...O.....F 80403c6: e76f 0707 722c 94a6 9402 99e8 deb1 8d10 o...,r.......... 80403d6: e240 91a3 245b b2b0 2ce5 21d1 5350 03f9 @...[$...,.!PS.. 80403e6: b6dd 54b5 6cbb abe4 48af 7115 b22f 0ea9 ...T.l...H.q/... 80403f6: 8bd3 b132 4407 e728 ecd9 cc5e cf08 f5db ..2..D(...^..... 8040406: ccde e225 fd32 bbd4 d4b0 8ba2 f1cd 7106 ..%.2..........q 8040416: 1469 9671 006e 9012 4c50 6d50 c689 025b i.q.n...PLPm..[. 8040426: 6a57 d24f b01b d6c5 01db b109 c925 9865 WjO.........%.e. 8040436: 009a ade0 a25a ba65 2675 8e9c c7aa 3086 ....Z.e.u&.....0 8040446: 9445 7243 7e9a 4870 9855 7704 2e19 ebd1 E.Cr.~pHU..w.... 8040456: a066 8c83 7b08 aa3f 2c01 2a82 6442 2dc8 f....{?..,.*Bd.- 8040466: 4003 346b 48be 24e0 b418 a481 838c 2df5 .@k4.H.$.......- 8040476: 88b2 8d21 0c8c fb62 46a8 12e8 eb45 9ac8 ..!...b..F..E... 8040486: 46e4 0d54 821c 4328 f4c1 d115 5832 f732 .FT...(C....2X2. 8040496: f4b4 b16f dbe4 0379 96a7 1053 fc0f 4316 ..o...y...S....C 80404a6: a990 fa26 7c18 4658 81c5 a00e 6417 6df9 ..&..|XF.....d.m 80404b6: 0d11 91fe 9878 ceb7 d2d8 d088 4797 ca7a ....x........Gz. 80404c6: 9baf 8c50 b16d 3bb3 22ef 304c 08dd c40c ..P.m..;."L0.... 80404d6: 6ec7 9dba a85e 8153 c079 224f 96da 7698 .n..^.S.y.O"...v 80404e6: 501c 87bb 01c6 bd61 b072 df87 cc41 253b .P....a.r...A.;% 80404f6: 05c4 04f8 cb46 e3f5 4b58 1469 a7c2 9fe2 ....F...XKi..... 8040506: 49bc 1781 1cc5 4a0b d990 dd38 b400 fbe6 .I.....J..8..... 8040516: a865 336b faf5 48fd 2ed3 4d4c c1b4 8864 e.k3...H..LM..d. 8040526: 49a0 f275 9cb8 0c88 adce 235a cf98 ac69 .Iu.......Z#..i. 8040536: 2422 41d4 4ef1 0f58 4f92 c1ab b264 1ea2 "$.A.NX..O..d... 8040546: 4e7c 2a0d d593 895c 4ae1 a938 a429 8917 |N.*..\..J8.)... 8040556: 78db c310 588e 035b 6fc2 456d f614 32d6 .x...X[..omE...2 8040566: 448c 916b 40a6 f9a1 ff10 5e74 4112 ebd2 .Dk..@....t^.A.. 8040576: 9e0b 3fb6 37fd 7fb3 43e8 491a 9fe6 c5b6 ...?.7...C.I.... 8040586: 702b 9652 f13f d0bb 0cde e671 fa33 a258 +pR.?.....q.3.X. 8040596: 5900 538c 8eb6 9beb 20c1 6cdc d2b7 f35c .Y.S..... .l..\. 80405a6: a74b 258f 8604 eb34 7a23 8acc 9b60 ab16 K..%..4.#z..`... 80405b6: fecd a0f5 1836 622e ff89 2621 4085 b677 ....6..b..!&.@w. 80405c6: f7a0 d26f 0d74 0e6a 00c2 88b1 209c 2fd1 ..o.t.j...... ./ 80405d6: a526 39d1 6504 76ec 970b 4231 dea7 536e &..9.e.v..1B..nS 80405e6: a6c0 8501 ea06 788b c0a8 c979 fa4c 035b .......x..y.L.[. 80405f6: cc85 f19d 8863 bc1b d03c 7093 ff7d 7432 ....c...<..p}.2t 8040606: 128f 11f0 c6b8 7a1c 7d98 28be f997 b87b .......z.}.(..{. 8040616: df4f 53db 8974 3f27 5eab f06b ebf4 c650 O..St.'?.^k...P. 8040626: 35fc 133e 28b3 1242 9cfb 7e86 f6e0 d855 .5>..(B....~..U. 8040636: 0ec3 0587 5576 1719 2c19 ae44 b69e dde0 ....vU...,D..... 8040646: 5d57 d1a2 1bcb 91e7 3a60 c02b 564f 3e80 W]......`:+.OV.> 8040656: bb66 cff5 fdbf b7e3 05ff fcff b7eb fdff f............... 8040666: dfed bcff d011 d0dc 7471 6f59 5fe4 81a8 ........qtYo._.. 8040676: a67f ff7f dbf1 7d3f e3fb 4d79 138d fd4d ......?}..yM..M. 8040686: 542b 3fff fedf bce9 2606 0689 edfe 3fdb +T.?.....&.....? 8040696: fb7f 6fb7 847f ff7f b7fb 0bff 9d68 d4d9 ...o........h... 80406a6: f2f0 2e2c 9d1a 6c57 5e7c c9b1 aea5 78df ..,...Wl|^.....x 80406b6: 0031 399b 8d67 50c1 3ef1 6613 b119 4ab3 1..9g..P.>.f...J 80406c6: 41bb ab39 1fb4 a701 9c45 017f b7ad 3229 .A9.....E.....)2 80406d6: 6aa7 7143 a3c1 8bbc c0f2 6d2b bf81 3aad .jCq......+m...: 80406e6: 419c 4af4 1133 811a 3ada a241 6c05 0b63 .A.J3....:A..lc. 80406f6: 3af0 eeaf 39df 1775 5b99 b000 1a31 9a8c .:...9u..[..1... 8040706: b5d3 7a8b 8ccd b3c4 041b 087d d441 e8d1 ...z......}.A... 8040716: 0212 7822 85b7 d41d 9d4d f053 6f1e aa45 .."x....M.S..oE. 8040726: 4758 61f1 2d6a 0d91 1a15 3074 b979 a818 XG.aj-....t0y... 8040736: 7f66 110c 31f9 955b d7cb 2ee9 ef5b bde0 f....1[.....[... 8040746: 6db1 5189 e563 f8b2 bd3d 9550 4d20 eb1c .m.Qc...=.P. M.. 8040756: 4a6c efb3 b05c 55f3 f0dd 9ae3 2064 06cb lJ..\..U....d .. 8040766: 048d 0480 6f45 22e0 c070 925b 3aba 7079 ....Eo."p.[..:yp 8040776: bc69 b428 1405 28cd 821c 5dde 57ec eb4b i.(....(...].WK. 8040786: 97c7 f4c8 6b60 80bc d1d0 1f60 3d5d ead3 ....`k....`.]=.. 8040796: caa4 9b36 db22 eb66 3179 fae5 2191 ac7f ..6.".f.y1...!.. 80407a6: 1836 e7d2 a6ed 2ac0 b9c0 ab96 1c49 d916 6......*....I... 80407b6: 1023 b00b b62e 470c 5d3d 1f25 c248 057c #......G=]%.H.|. 80407c6: fc11 63b4 041f ae3f 5761 5b23 0672 1ed1 ...c..?.aW#[r... 80407d6: e29e 155a 26dc 136f 76b8 d4d0 6f20 f19d ..Z..&o..v.. o.. 80407e6: 253d 44ce 6dc5 65d9 428d eb02 dd2b d497 =%.D.m.e.B..+... 80407f6: e7d8 e388 98d4 6f60 3991 48c2 0828 6c64 ......`o.9.H(.dl 8040806: 8d0f 2bd0 dbab c4e1 a1d4 8dbc 0f60 3b43 ...+........`.C; 8040816: 8716 e07b 7560 a402 4faf 0729 b491 3a0d ..{.`u...O)....: 8040826: 1ac8 6274 cd4b 582f caac ca6e bc18 9662 ..tbK./X..n...b. 8040836: e9c1 8350 5607 b57b f2e8 a005 a491 c11f ..P..V{......... 8040846: 9848 bba3 df02 8373 cb83 f960 52d6 45e8 H.....s...`..R.E 8040856: b56e 746c 86e5 cb98 9ae8 c84e 8b34 d45b n.lt......N.4.[. 8040866: 1871 6ed1 cab1 ef5d 7795 dc36 8bf7 201c q..n..]..w6.... 8040876: 7270 7ec4 b8cb 8635 9e86 dd71 5fed fc97 pr.~..5...q.._.. 8040886: 1238 46af ca39 9501 6bb3 3fa3 43c6 705f 8..F9....k.?.C_p 8040896: 78ef faa0 f4a6 5a92 877f d9ef b3c1 4a89 .x.....Z.......J 80408a6: 2f76 c7cb 9d3e e4a9 79a5 3e57 0b22 87e3 v/..>....yW>"... 80408b6: ee1f 5795 44c8 3a91 5f87 6aab 8535 4478 ...W.D.:._.j5.xD 80408c6: af50 e6a1 5316 e090 4663 0e99 e1df 305b P....S..cF....[0 80408d6: e0ef 0aff ef31 c08f 2ee0 ba26 a4b6 c313 ....1.....&..... 80408e6: 6ae8 65ff 4bf4 f8f5 be8b 496c 26e7 5c20 .j.e.K....lI.& \ 80408f6: d218 3687 727d 4efb cd0d b87a f3bd 4f85 ...6}r.N..z....O 8040906: 4764 a101 c034 06c0 6f89 4f10 25ff 957b dG..4....o.O.%{. 8040916: 6352 56ec d59f e034 9810 7e9a dd7d 421f Rc.V..4....~}..B 8040926: b368 5769 c673 fea3 fae8 b02d d07a c0e0 h.iWs.....-.z... 8040936: 0799 3f4d e0ea 1100 dcb9 2104 289d b8a2 ..M?.......!.(.. 8040946: 854f 4988 97aa 8b2e 3e97 74d8 e933 9003 O..I.....>.t3... 8040956: 3ba6 98cd f5dc 9a47 0341 19a0 71a3 4dff .;....G.A....q.M 8040966: e043 9ad1 b458 83f4 d2d0 3a8f e0c8 c33e C...X......:..>. 8040976: fe55 d903 f4dc e5e0 5e02 ec89 aaef a52d U........^....-. 8040986: b86b 9353 c6db be1f 7317 b680 4856 c093 k.S......s..VH.. 8040996: d133 03b0 0185 60b7 28c8 b3ab 331e 189e 3......`.(...3.. 80409a6: 6b33 af8b 83ae 4e2f 96b3 77bd 0156 1487 3k..../N...wV... 80409b6: f689 c3d0 c834 f633 624a e689 af8d 37fa ....4.3.Jb.....7 80409c6: a9f3 3fa8 6298 c221 a00f aafc 8ea7 21fa ...?.b!........! 80409d6: 0fc8 d6ba f489 0e96 0d3d 38d8 733e 57e0 ........=..8>s.W 80409e6: f736 26a1 5527 1ff4 d92c ab43 a31b 0000 6..&'U..,.C..... 80409f6: 5825 4c00 676f 756f 5474 726d 3f00 6600 %X.LogoutTmr.?.f 8040a06: 6e75 0063 7322 6f74 2270 d000 d0a2 d1b5 unc."stop"...... 8040a16: d181 2082 bed0 81d1 82d1 b0d0 bdd0 bed0 ... ............ 8040a26: b2d0 bbd0 b5d0 bdd0 0021 90d0 b4d0 bcd0 ........!....... 8040a36: b8d0 bdd0 b8d0 81d1 82d1 80d1 b0d0 82d1 ................ 8040a46: bed0 80d1 2820 9ed0 81d1 82d1 b0d0 bdd0 .... (.......... 8040a56: bed0 b2d0 bbd0 b5d0 bdd0 0029 a2d0 b5d0 ..........)..... 8040a66: 81d1 82d1 d020 d0bd 20b5 83d1 b4d0 b0d0 .... .... ...... 8040a76: bbd0 bed0 81d1 8cd1 d020 d1be d181 d082 ........ ....... 8040a86: d0b0 d0bd d0be d0b2 d1b8 d182 218c 2200 .............!." 8040a96: 6964 6373 6168 6772 2265 d000 d0a2 d1b5 discharge"...... 8040aa6: d181 2082 b7d0 b0d0 bfd0 83d1 89d1 b5d0 ... ............ 8040ab6: bdd0 0021 90d0 b4d0 bcd0 b8d0 bdd0 b8d0 ..!............. 8040ac6: 81d1 82d1 80d1 b0d0 82d1 bed0 80d1 2820 .............. ( 8040ad6: 97d0 b0d0 bfd0 83d1 89d1 b5d0 bdd0 0029 ..............). 8040ae6: a2d0 b5d0 81d1 82d1 d020 d0bd 20b5 83d1 ........ .... .. 8040af6: b4d0 b0d0 bbd0 bed0 81d1 8cd1 d020 d0b7 ............ ... 8040b06: d0b0 d1bf d183 d181 d082 d1b8 d182 218c ...............! 8040b16: 2200 6974 656d 0022 6322 6e61 6563 226c ."time"."cancel" 8040b26: d000 d192 d08b d0ba d1bb d18e d087 d0b5 ................ 8040b36: d0bd d0b8 20b5 98d0 91d0 9fd0 d020 d1be ..... ...... ... 8040b46: d082 d0bc d0b5 d0bd d0b5 d0bd 21be d000 .............!.. 8040b56: d192 d08b d0ba d1bb d18e d087 d0b5 d0bd ................ 8040b66: d0b8 20b5 98d0 91d0 9fd0 d020 d0bd 20b5 ... ...... .... 8040b76: 83d1 b4d0 b0d0 bbd0 bed0 81d1 8cd1 d020 .............. . 8040b86: d1be d082 d0bc d0b5 d0bd d1b8 d182 218c ...............! 8040b96: 2200 666f 2266 6100 7466 7265 7400 006f ."off".after.to. 8040ba6: 9fd0 b5d0 80d1 b5d0 b7d0 b0d0 b3d0 80d1 ................ 8040bb6: 83d1 b7d0 bad0 b0d0 d020 d098 d091 219f ........ ......! 8040bc6: d000 d19e d082 d0bc d0b5 d0bd 20b0 bfd0 ............. .. 8040bd6: b5d0 80d1 b5d0 b7d0 b0d0 b3d0 80d1 83d1 ................ 8040be6: b7d0 bad0 b8d0 d020 d098 d091 219f 4800 ...... ......!.H 8040bf6: 5454 2f50 2e31 2030 3032 2030 4b4f 0a0d TTP/1.0 200 OK.. 8040c06: 6f43 746e 6e65 2d74 7954 6570 743a 7865 Content-Type:tex 8040c16: 2f74 7468 6c6d 0a0d 6553 2d74 6f43 6b6f t/html..Set-Cook 8040c26: 6569 203a 6e75 6d61 3d65 0d00 530a 7465 ie: uname=...Set 8040c36: 432d 6f6f 696b 3a65 6920 3d64 0d00 530a -Cookie: id=...S 8040c46: 7465 432d 6f6f 696b 3a65 7220 6c6f 3d65 et-Cookie: role= 8040c56: 0030 0a0d 6553 2d74 6f43 6b6f 6569 203a 0...Set-Cookie: 8040c66: 7561 6874 303d 3c00 4421 434f 5954 4550 auth=0. 8040cc6: 2f3c 6568 6461 3c3e 682f 6d74 3e6c 0a0d .. 8040cd6: 0a0d 2600 6c00 676f 6e69 003d 6170 7373 ...&.login=.pass 8040ce6: 6f77 6472 003d 0a0d 6553 2d74 6f43 6b6f word=...Set-Cook 8040cf6: 6569 203a 6f72 656c 003d 9fd0 bed0 bbd0 ie: role=....... 8040d06: 8cd1 b7d0 bed0 b2d0 b0d0 82d1 b5d0 bbd0 ................ 8040d16: 8cd1 6f00 6e77 7265 003d 7973 4c73 636f ...owner=.sysLoc 8040d26: 7461 6f69 3d6e 6300 6d6f 656d 746e 003d ation=.comment=. 8040d36: 6572 6461 635f 6d6f 756d 696e 7974 003d read_community=. 8040d46: 7277 7469 5f65 6f63 6d6d 6e75 7469 3d79 write_community= 8040d56: 6d00 6e61 6761 7265 5049 003d 616d 616e .managerIP=.mana 8040d66: 6567 4972 3250 003d 616d 616e 6567 4972 gerIP2=.managerI 8040d76: 3350 003d 616d 616e 6567 4972 3450 003d P3=.managerIP4=. 8040d86: 616d 616e 6567 4972 3550 003d 6864 7063 managerIP5=.dhcp 8040d96: 003d 7069 6461 7264 003d 7767 003d 616d =.ipaddr=.gw=.ma 8040da6: 6b73 003d 7561 6874 003d 7372 655f 616e sk=.auth=.rs_ena 8040db6: 6c62 6465 003d 7372 735f 7265 6576 3d72 bled=.rs_server= 8040dc6: 7200 5f73 6f70 7472 003d 7372 705f 6477 .rs_port=.rs_pwd 8040dd6: 003d 7372 6b5f 7965 003d 6964 3d31 7200 =.rs_key=.di1=.r 8040de6: 316f 003d 6f72 3d32 6e00 7074 003d 746e o1=.ro2=.ntp=.nt 8040df6: 7370 7265 6976 3d70 7400 6d69 3d65 7500 pservip=.time=.u 8040e06: 6374 003d 5448 5054 7000 6f72 6164 6574 tc=.HTTP.prodate 8040e16: 003d 5448 5054 312f 302e 3220 3030 4f20 =.HTTP/1.0 200 O 8040e26: 0d4b 430a 6e6f 6574 746e 542d 7079 3a65 K..Content-Type: 8040e36: 6574 7478 682f 6d74 0d6c 0d0a 540a 7572 text/html....Tru 8040e46: 0065 6170 6567 003d 6c61 006c 5448 5054 e.page=.all.HTTP 8040e56: 312f 312e 3220 3030 4f20 0d4b 430a 6e6f /1.1 200 OK..Con 8040e66: 6574 746e 4c2d 6e65 7467 3a68 6c25 0d75 tent-Length:%lu. 8040e76: 0d0a 000a 7375 7265 616e 656d 003d 6c6f ....username=.ol 8040e86: 7064 7361 3d73 6e00 7765 6170 7373 003d dpass=.newpass=. 8040e96: 9fd0 b0d0 80d1 bed0 bbd0 8cd1 d120 d183 ............ ... 8040ea6: d081 d0bf d1b5 d088 d0bd 20be b8d0 b7d0 ........... .... 8040eb6: bcd0 b5d0 bdd0 91d1 bdd0 d000 d092 d0b2 ................ 8040ec6: d0b5 d0b4 d0b5 d1bd 208b bdd0 b5d0 bad0 ......... ...... 8040ed6: bed0 80d1 80d1 b5d0 bad0 82d1 bdd0 8bd1 ................ 8040ee6: b5d0 d020 d0b4 d0b0 d0bd d1bd d08b 21b5 .. ............! 8040ef6: d000 d092 d0b2 d0b5 d1b4 d091 20bd bdd0 ............. .. 8040f06: b5d0 b2d0 b5d0 80d1 bdd0 8bd1 b9d0 d020 .............. . 8040f16: d0bf d1b0 d080 d0be d1bb 218c 4700 5445 ...........!.GET 8040f26: 2f20 616d 6e69 632e 7373 4700 5445 2f20 /main.css.GET / 8040f36: 6f72 6574 2e6b 6e70 0067 4547 2054 662f rotek.png.GET /f 8040f46: 7661 6369 6e6f 692e 6f63 4700 5445 2f20 avicon.ico.GET / 8040f56: 6f72 656c 6a2e 0073 4f50 5453 2f20 6f6c role.js.POST /lo 8040f66: 6967 2e6e 6763 0069 6c2f 676f 6e69 682e gin.cgi./login.h 8040f76: 6d74 006c 6f54 206f 6f6c 676e 5020 534f tml.Too long POS 8040f86: 2054 6572 7571 7365 2174 0a0d 4700 5445 T request!...GET 8040f96: 2f20 616d 6e69 6a2e 0073 4547 2054 732f /main.js.GET /s 8040fa6: 7465 6974 676e 2e73 7468 6c6d 2f00 6e69 ettings.html./in 8040fb6: 6564 2e78 7468 6c6d 4700 5445 2f20 6e69 dex.html.GET /in 8040fc6: 6f66 682e 6d74 006c 4547 2054 682f 7369 fo.html.GET /his 8040fd6: 6f74 7972 682e 6d74 006c 4547 2054 752f tory.html.GET /u 8040fe6: 7370 685f 7369 6f74 7972 682e 6d74 006c ps_history.html. 8040ff6: 4547 2054 672f 7465 734a 6e6f 632e 6967 GET /getJson.cgi 8041006: 4700 5445 2f20 6573 7474 6e69 7367 632e .GET /settings.c 8041016: 6967 5000 534f 2054 732f 7465 6974 676e gi.POST /setting 8041026: 2e73 6763 0069 5448 5054 312f 312e 3220 s.cgi.HTTP/1.1 2 8041036: 3030 4f20 0d4b 000a 213c 4f44 5443 5059 00 OK........GET /info 80410b6: 632e 6967 5000 534f 2054 692f 666e 2e6f .cgi.POST /info. 80410c6: 6763 0069 213c 4f44 5443 5059 2045 7468 cgi.< 80410e6: 6568 6461 3c3e 656d 6174 6820 7474 2d70 head>.....G 8041136: 5445 2f20 6968 7473 726f 2e79 6763 0069 ET /history.cgi. 8041146: 4547 2054 752f 7370 685f 7369 6f74 7972 GET /ups_history 8041156: 632e 6967 5000 534f 2054 622f 7461 745f .cgi.POST /bat_t 8041166: 7365 2e74 6763 0069 4f50 5453 2f20 7075 est.cgi.POST /up 8041176: 5f73 6f70 6577 2e72 6763 0069 4547 2054 s_power.cgi.GET 8041186: 722f 7365 7465 632e 6967 4700 5445 2f20 /reset.cgi.GET / 8041196: 6572 6f62 746f 632e 6967 4700 5445 2f20 reboot.cgi.GET / 80411a6: 6f63 666e 7269 2e6d 6763 0069 4547 2054 confirm.cgi.GET 80411b6: 662f 5f77 7075 6164 6574 632e 6967 5000 /fw_update.cgi.P 80411c6: 534f 2054 632f 6168 676e 7065 6477 632e OST /changepwd.c 80411d6: 6967 4700 5445 2f20 6573 5074 6f72 6164 gi.GET /setProda 80411e6: 6574 632e 6967 0000 0000 te.cgi.... 080411f0 : 80411f0: 4c00 0804 4694 0804 46a8 0804 0541 0000 .L...F...F..A... 8041200: 0001 0000 .... 08041204 : 8041204: 6d2f 6961 2e6e 736a 0000 0000 5448 5054 /main.js....HTTP 8041214: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 8041224: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 8041234: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 8041244: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 8041254: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 8041264: 6e65 2d74 654c 676e 6874 203a 3031 3136 ent-Length: 1061 8041274: 0d31 430a 6e6f 656e 7463 6f69 3a6e 4320 1..Connection: C 8041284: 6f6c 6573 0a0d 6f43 746e 6e65 2d74 7974 lose..Content-ty 8041294: 6570 203a 7061 6c70 6369 7461 6f69 2f6e pe: application/ 80412a4: 2d78 616a 6176 6373 6972 7470 0a0d 6f43 x-javascript..Co 80412b4: 746e 6e65 2d74 6e45 6f63 6964 676e 203a ntent-Encoding: 80412c4: 7a67 7069 0a0d 6143 6863 2d65 6f43 746e gzip..Cache-Cont 80412d4: 6f72 3a6c 7020 6972 6176 6574 202c 616d rol: private, ma 80412e4: 2d78 6761 3d65 3638 3034 0d30 0d0a 1f0a x-age=86400..... 80412f4: 088b 0000 0000 0400 ed0a 097d 1b73 9647 ..........}.s.G. 8041304: 5fe6 d629 2978 2cc0 b880 0178 212a 4a28 ._).x).,..x.*!(J 8041314: 35b6 6ba1 da24 599e cd8a 0ba8 8940 0a00 .5.k$..Y....@... 8041324: 1542 c948 2324 eedc 99e9 688e 78c7 77a3 B.H.$#.....h.x.w 8041334: 7763 6363 f67b 05f8 8f6e ad35 d5f1 f311 cwcc{...n.5..... 8041344: c00b 347f 7bdf 5999 0595 1480 bb65 3d3d ...4.{.Y....e.== 8041354: 1331 9121 9995 af2f 2f97 be5f 932b c99d 1.!.../../_.+... 8041364: 4bd0 68c2 bc68 7055 278a 20e3 8c99 8687 .K.hh.Up.'. .... 8041374: 791f 4193 4c30 ddca b920 0fdd f3e8 8be6 .y.A0L.. ....... 8041384: 3e3b ce20 0a3a e3be c1f8 619d b54c 729c ;> .:......aL..r 8041394: bc9c 07e8 68e5 78e4 f261 aec2 2958 5b94 .....h.xa...X).[ 80413a4: 9e28 391c c363 47b3 38ce de0e 47e9 524e (..9c..G.8...GNR 80413b4: 8198 b62f 4ec2 e0a1 d8ad 4ae5 78bd baa3 ../..N.....J.x.. 80413c4: 2f64 e655 f4db d45a 6f8c 871f 3f43 2e3a d/U...Z..o..C?:. 80413d4: 838f 9367 4e20 19de 833b 60a0 94ca 6c59 ..g. N..;..`..Yl 80413e4: 05f9 78b7 5676 c6d0 3be9 f389 8f0e 4315 ...xvV...;.....C 80413f4: 44e9 02e3 e3b5 7bd8 678e 9ef9 0e15 3a0f .D.....{.g.....: 8041404: 6da8 9345 7c44 8e8c 96c7 24eb 9e07 4233 .mE.D|.....$..3B 8041414: 30e1 1f18 c124 4460 4959 0838 41fa b127 .0..$.`DYI8..A'. 8041424: 87e2 71d1 b630 9be2 0bc8 2fc6 2df6 aed7 ...q0....../.-.. 8041434: dcb4 4eeb 1fb9 bb0c af49 aee5 14ac ec53 ...N....I.....S. 8041444: b9ec dafb de60 bddb d777 071b 124e de10 ....`...w...N... 8041454: 2468 9dae 5b22 dc14 b892 d4c7 84ba 42f8 h$.."[.........B 8041464: f2d1 6166 9ae4 4c14 3c3f a4c2 5669 995e ..fa...L?<..iV^. 8041474: 4b47 d81d cb4e 772b 71c2 ec9c c2f4 dfbe GK..N.+w.q...... 8041484: ba2a 6765 0a34 3e86 0127 9599 5b15 c572 *.eg4..>'....[r. 8041494: d9dd 2d85 9638 bf3b 150a ad4b 1f9d a3c6 ...-8.;...K..... 80414a4: f3be 76c2 4f4f b74d 791f 6687 e8b6 5c9e ...vOOM..y.f...\ 80414b4: f774 8bb5 d2ee afa2 b85d eee8 1755 9bdd t.......]...U... 80414c4: 7459 6460 81f0 0fd3 f8b1 6da0 1c39 c8cc Yt`d.......m9... 80414d4: a2c2 815b b1d5 56ba 0acf a7ad a1d6 b7d5 ..[....V........ 80414e4: 2d06 7ec7 888b f1c8 bc0f 3068 0c98 c441 .-.~......h0..A. 80414f4: 1166 8acb e3dc 9871 b904 8f6c 07b2 d0ce f.....q...l..... 8041504: 06e9 3be3 010f e7e7 6a32 09c8 3972 e475 ...;....2j..r9u. 8041514: 7274 0d39 74e4 3973 c86b 51e9 384e 7c72 tr9..ts9k..QN8r| 8041524: 8c7f 4854 eea9 be31 0a9e f8c8 df10 f487 ..TH..1......... 8041534: 8e3d e20f 7c60 1014 5f58 8c66 71a2 e482 =...`|..X_f..q.. 8041544: 2640 030f 80cc 37b1 76c4 ab52 ba8c cf7e @&.....7.vR...~. 8041554: 991b b2c5 0bd7 c3bc 3fc0 2d3d 3448 7705 .........?=-H4.w 8041564: 521e 41c7 171c 967a dc69 5879 7e9a fd3e .R.A..z.i.yX.~>. 8041574: fcf2 e9e3 f3cb 1b9f bfe7 ff38 f9f9 4827 ..........8...'H 8041584: 377c 27fd 9afa 317e dcfd a22c 1a32 16af |7.'..~1..,.2... 8041594: f9ad c226 26f9 357e fafd effc bfa6 4d7f ..&..&~5.......M 80415a4: a7c5 3996 dcfd fe98 e9ef e7e7 9f3f 457e ...9........?.~E 80415b4: 7f9f a740 225f 12f1 bedd 3aca 5a2d 1102 ..@._".....:-Z.. 80415c4: d0c1 fb71 9f81 694d 7979 94c1 e70e f3c6 ..q...Miyy...... 80415d4: fb68 9dd6 1ff7 dc1b c7f0 cf98 cc4b d16e h...........K.n. 80415e4: ee9c 064f 306e f42e c0d1 fff4 bf4c ff3b ..O.n0......L.;. 80415f4: fcf8 e313 75aa fbb7 9ea3 0433 1d27 5e87 .....u....3.'..^ 8041604: 4061 fc2d 9a2f 818c 11c9 5f32 7f4d c407 a@-./.....2_M... 8041614: 827e 3a49 079e bfc4 ddae 8845 a8f6 ffd5 ~.I:......E..... 8041624: a3c7 39e7 8f18 dfef 687b 3354 a53c 938b ...9....{hT3<... 8041634: 8c1b 9963 408f c6ee 464e 73ee 99ab e0ab ..c..@..NF.s.... 8041644: e65a b487 2e13 91ad 9091 70bf d858 731a Z..........pX..s 8041654: 64bd 8275 7585 79b0 a92e 59d3 0758 ebdb .du..u.y...YX... 8041664: 3a92 85dd b075 d301 c33a 198c 93ce f336 .:..u...:.....6. 8041674: 7145 cda4 ee70 2b94 43f7 3dec 58c9 be75 Eq..p..+.C.=.Xu. 8041684: 4e6c 3b7f 397d 03fd 1a51 ee28 3615 a7c4 lN.;}9..Q.(..6.. 8041694: 6fd3 dfa7 b419 a62b e25f b7ff 8ae6 62bb .o....+._......b 80416a4: 992e ead6 0acf b5b5 4abd 6d69 b4ff 5f86 .........Jim..._ 80416b4: 7d8d d8fc 3fda abdd f754 fcdb 3fc9 c5da .}...?..T....?.. 80416c4: e527 1d7f b7b8 cb56 8e09 9c5f 47e4 7f4e '.....V..._..GN. 80416d4: 1412 4bdb 6695 1b01 2912 73c9 6e4b 1cf4 ...K.f...).sKn.. 80416e4: 329b f077 2d14 8b70 dc79 2dca 13f6 b621 .2w..-p.y..-..!. 80416f4: ded4 e27b f797 0a57 66ed 6a50 f13f 8a57 ..{...W..fPj?.W. 8041704: 1fed 3675 6db9 c573 e139 5908 19fd a92d ..u6.ms.9..Y..-. 8041714: fa53 bb68 9ff4 57f7 5ade 4c5d e03f d340 S.h....W.Z]L?.@. 8041724: a7af 0d2f 13a6 fa63 920d 48ff 919c 18f8 ../...c....H.... 8041734: 0b38 81f3 647f f2f6 01a9 02ce 9060 57d8 8....d......`..W 8041744: 6244 535f 682e 5bee 7e40 df85 0d2f 3ee2 Db_S.h.[@~../..> 8041754: fcf8 fce2 c6d7 95f4 fe71 d337 e757 0d7f ........q.7.W... 8041764: f6f6 d36b 7ff2 c584 278d 20ee de4c 39c1 ..k......'. L..9 8041774: e31c f5f8 21a2 8e84 c141 fe9c dd06 5fa1 .....!..A......_ 8041784: 70c1 625f 4838 2dfe d50d ff38 d825 862b .p_b8H.-..8.%.+. 8041794: ff88 1c18 92ed 9857 4020 eb28 53fc 1f03 ......W. @(..S.. 80417a4: 1438 31d4 9344 9b68 7045 907b 30dd 9519 8..1D.h.Ep{..0.. 80417b4: 21c2 b5ce 4934 63e7 0748 345d 0922 de20 .!..4I.cH.]4". . 80417c4: efab 520b f3a5 0531 d497 cd6b 0b8a 006d ...R..1...k...m. 80417d4: 1e51 68f8 4c59 50a4 2e6c 6f22 f721 592a Q..hYL.Pl."o!.*Y 80417e4: 0a48 1a42 f389 fb31 c3f0 405b aa01 d17b H.B...1...[@..{. 80417f4: 9864 8e94 0ec7 6c0d 5561 d43a 0a18 ee32 d......laU:...2. 8041804: 42f0 14a0 9742 b973 1dab 379c 40dd 2874 .B..B.s....7.@t( 8041814: 5ce4 506a 3a64 7c71 8d1c f7fd 1a81 ccb4 .\jPd:q|........ 8041824: 56fb 3888 df51 1d1f 09d3 f22a be58 0619 .V.8Q.....*.X... 8041834: 7ac7 8b1e 2238 1c6f 208c a6bf c1d0 e53c .z..8"o.. ....<. 8041844: 6c56 76db 30a5 7a7c 294a 972f 65f2 edaa Vl.v.0|zJ)/..e.. 8041854: 83f4 0271 609a 3eaa 8cff 1856 4f2b 90cc ..q..`.>..V.+O.. 8041864: fd0e 29af 0449 64b2 9b16 92de fb6d c2ed ...)I..d....m... 8041874: 0d6c 26c8 fa80 888e fa78 c90d 9f0a 6c83 l..&....x......l 8041884: 8b78 9250 e39a f18d 9505 8710 ff3d f3bb x.P.........=... 8041894: d04f a11c 3f39 db6b 2934 3f33 5ced 7e66 O...9?k.4)3?.\f~ 80418a4: 28de 362a 134d 7373 69d2 b980 3c1b df92 .(*6M.ss.i...<.. 80418b4: 8731 56ff 2ec8 03b4 4f7f e443 f80d 7692 1..V.....OC....v 80418c4: 81a4 7ca1 f34d cec5 d224 31e7 03ff 52ed ...|M...$..1...R 80418d4: f19a d877 d898 800a fa21 bec7 79f8 1b7e ..w.....!....y~. 80418e4: 93a4 ff3c 3094 8813 eacd f682 a7e5 7d97 ..<..0.........} 80418f4: c5fa 3436 ff2e ef2f 85dd a15a 0128 5b0b ..64../...Z.(..[ 8041904: baf6 7b61 4a02 4218 b27f 15cd c567 265c ..a{.J.B....g.\& 8041914: 8084 9046 19c2 4cb4 1098 8829 0f18 3c1f ..F....L..)....< 8041924: cdde 7be4 b310 8758 17a4 d0c6 e2c4 3611 ...{..X........6 8041934: b058 3c1b 8a4f 5496 a0cf b010 8de4 ea52 X....b 8041984: 469b f42f 60fd 0828 1926 aca5 2ae6 e830 .F/..`(.&....*0. 8041994: 3b78 c649 3ba1 0a81 f508 162d abd2 7d95 x;I..;....-....} 80419a4: 7132 1ca6 652a 8268 5dbf 0e36 7109 1e85 2q..*eh..]6..q.. 80419b4: 0bb8 284c 5f89 f290 083f 9d2e 0ea2 0978 ..L(._..?.....x. 80419c4: a026 cd6a 63b4 9583 8df5 e478 0f0c 07aa &.j..c....x..... 80419d4: e751 c6a0 2318 bd38 9b19 6d39 2709 3244 Q....#8...9m.'D2 80419e4: fa8e 320c a43f 4dc5 dc11 9a6b bd92 838d ...2?..M..k..... 80419f4: 7441 2c14 3cc2 42e3 7436 1409 97c8 83d8 At.,.<.B6t...... 8041a04: ed5a c23c 8f16 052e cd7e 7510 4bb8 c046 Z.<.....~..u.KF. 8041a14: 69ec 9cee 259b 058b 4cd8 0969 f19b 2c42 .i...%...Li...B, 8041a24: 86bc 1624 f0cf ca22 3058 7988 98ea 48d9 ..$...".X0.y...H 8041a34: 64b3 5331 4f3c 0b12 7400 cf44 cb14 afe6 .d1S.L6.}#. 8041ba4: b45c f242 2be1 ed69 3d13 19fb 2e86 381a \.B..+i..=.....8 8041bb4: d5cc 37af cccb da68 0c4f b5d2 7f07 ca0a ...7..h.O....... 8041bc4: cc36 4b4f f7ce a3b2 0d08 0ef5 0708 f2e4 6.OK............ 8041bd4: 68a3 afda 9620 d50b a85b 9fdf 4d09 967b .h.. ...[....M{. 8041be4: 4936 264d 237b 13e5 671b ff95 6a7b f0ca 6IM&{#...g..{j.. 8041bf4: fd34 e3f9 f707 edc9 7960 2562 56fd eeea 4.......`yb%.V.. 8041c04: 0281 5ef3 8c92 091e 4faf ca1b 9189 6acf ...^.....O.....j 8041c14: 9652 1e3c 21b7 1ed3 7f05 c0f9 0a7d be91 R.<..!......}... 8041c24: de60 bd0b 1471 9d47 4ca4 7655 1f77 b8e2 `...q.G..LUvw... 8041c34: 61f4 0817 0586 ddf3 d0db 1c6b 1b0b b29c .a........k..... 8041c44: e486 7802 d311 2871 6674 3b5b c5b2 0c3e ...x..q(tf[;..>. 8041c54: 0d5a a228 b060 6400 83ae d953 0641 9a55 Z.(.`..d..S.A.U. 8041c64: 56c4 02ad c275 1769 9b02 5326 9f66 8157 .V..u.i...&Sf.W. 8041c74: 75c0 c91d 042d 6845 10b4 8a13 e867 8636 .u..-.Eh....g.6. 8041c84: 4667 e457 2327 5612 7046 a82f 6fdd 1dab gFW.'#.VFp/..o.. 8041c94: 068e 1e93 6ca9 b8e5 7a1f a141 956a 8ad6 .....l...zA.j... 8041ca4: f8ad 4c38 1ebc 1d49 139e 2607 5318 0e12 ..8L..I....&.S.. 8041cb4: b1bb c4d9 2ed7 6444 b6f8 2a0a 1313 0966 ......Dd...*..f. 8041cc4: e5a0 0a62 2d87 00ae 2e2d c689 cc2f d626 ..b..-..-.../.&. 8041cd4: 21e0 4b75 c432 3c64 f706 51a0 0e28 1702 .!uK2.d<...Q(... 8041ce4: 428b 0187 9dc8 ef77 82a4 980e 9093 e068 .B....w.......h. 8041cf4: 4144 a44f 425d 7635 1b80 7ecf 8263 be84 DAO.]B5v...~c... 8041d04: 0a4b 77f4 9df8 7e19 a284 05f8 c5a9 97c8 K..w...~........ 8041d14: ac06 0645 a2a1 3185 51b8 03f4 0107 4636 ..E....1.Q....6F 8041d24: 811e ac97 fe9f cc03 bf62 97c0 ce18 6702 ........b......g 8041d34: 77c8 1fd8 58e8 dcac 9b0f a93d c2ff a1a4 .w...X....=..... 8041d44: 4f66 f12a e777 02bf fc43 fa62 f9d5 162f fO*.w...C.b.../. 8041d54: 633a 7fb8 5daf 9570 347f 3bbf f87e 7186 :c...]p..4.;~..q 8041d64: 37e7 2b8c 9729 4f76 28f3 7d0a 92a3 c811 .7.+).vO.(.}.... 8041d74: df76 b981 334f 167f e59c f5ea 6eeb c6f1 v...O3.......n.. 8041d84: 370d b6e5 3819 e688 080e de05 f264 923a .7...8......d.:. 8041d94: 5a2b 5b13 934d 9c3d b982 319b e7b4 1761 +Z.[M.=....1..a. 8041da4: 95e4 8140 3a8f db86 8b86 e9b5 b182 5a57 ..@..:........WZ 8041db4: 75fe 6965 f96a c270 79f2 5c10 3ce8 2b25 .ueij.p..y.\.<%+ 8041dc4: a07d c3f5 d823 f6f3 fdfc 72fd 0de8 ec2d }...#......r..-. 8041dd4: 7632 936b 0e47 de5d ef85 36d7 95ab 73d1 2vk.G.]....6...s 8041de4: 4513 9849 03f4 af5b 39c2 f238 7631 eadd .EI...[..98.1v.. 8041df4: e81d 06fb c10c c419 028f 9cf8 1ee3 b7b6 ................ 8041e04: 7ae2 7d26 d1c4 ed90 e632 3dca f36c d8f2 .z&}....2..=l... 8041e14: a781 007b aff7 75da 76e9 57b3 f29c c0e4 ..{....u.v.W.... 8041e24: 1421 37c3 c48c 2640 7b7c 1f6f 47ce e8fc !..7..@&|{o..G.. 8041e34: 62d8 5c05 8d6b 8d5c d12a 29c0 bea3 c837 .b.\k.\.*..)..7. 8041e44: a8e3 7512 3872 04aa 93a4 69a7 9d62 8e9c ...ur8.....ib... 8041e54: a4aa 6c56 3981 ef6c 2780 6a64 ce45 bfb3 ..Vl.9l..'djE... 8041e64: 53bd 815c ea4b ac37 33c8 40a0 4c22 d101 .S\.K.7..3.@"L.. 8041e74: 6d38 a367 ded8 bbbe e8fd c1de dba3 9ab7 8mg............. 8041e84: ebe2 47dd 6fb7 27df e989 25d6 dfad 5bd2 ...G.o.'...%...[ 8041e94: c067 6d37 3a5d 2ffc 809e e004 fc59 4857 g.7m]:./....Y.WH 8041ea4: 343f aca4 9bd2 a776 0ae2 ee2e 414f 3ae4 ?4....v.....OA.: 8041eb4: 9954 f6a8 3da6 8022 e2e1 50ce fd48 27fc T....="....PH..' 8041ec4: 959e 9c80 df6f 2ab3 2c97 68cf f910 2674 ....o..*.,.h..t& 8041ed4: eb64 69df 379b 905f d0b1 9a6c a337 4e28 d..i.7_...l.7.(N 8041ee4: 688c dc6c 509c 4048 edb7 4797 9013 19ba .hl..PH@...G.... 8041ef4: 873c 6c79 0e10 2cd9 b308 caa5 c21f eecc <.yl...,........ 8041f04: c2c0 f566 5052 c70f d41d e6c2 d270 5bef ..f.RP......p..[ 8041f14: 9a61 f71d ac26 ab5e 4112 9e93 0755 3f4d a...&.^..A..U.M? 8041f24: 136d 6c30 a2a1 b4b3 0cd1 ada6 66ca c207 m.0l.........f.. 8041f34: 3cbd 8b4d d029 4103 771d a823 62b1 8704 ..I\ 8042084: 6f26 364a 9646 4c66 7309 c100 c1de 240a &oJ6F.fL.s.....$ 8042094: 9570 c0ec 0dde 1b01 a47e 1096 5c6c f708 p.......~...l\.. 80420a4: 80dd d78e b205 edb7 c510 4010 843f 355b ...........@?.[5 80420b4: 0547 62a2 ca9c be48 0e11 a90d 5d42 fc2c G..b..H.....B],. 80420c4: 3824 2025 ec25 145d 90c3 21c0 7d68 c2ef $8% %.]....!h}.. 80420d4: 56fd af67 2902 028a 38e8 8d24 aaa4 2232 .Vg..)...8$...2" 80420e4: 42c6 6428 b32d f7b8 c1de edc3 db47 20f7 .B(d-.......G.. 80420f4: 30a8 6f9c bd9b 5e03 03ec 0573 5a11 0939 .0.o...^..s..Z9. 8042104: 408a d630 2abd 641a e0c0 9808 4063 7991 .@0..*.d....c@.y 8042114: 2f49 3fb7 7db8 177f d132 834c 6e55 a6b0 I/.?.}..2.L.Un.. 8042124: 241a 8b85 16d9 de75 a3d9 4bfc bcda bdb5 .$....u....K.... 8042134: 7b7b cef7 dbbd cdf3 d0d6 d62c 6669 67b9 {{........,.if.g 8042144: c1a4 6e2b 772b b6f1 6fca af15 381f b563 ..+n+w...o...8c. 8042154: 7059 c2ba 4703 6d3f a68d c1f5 5cc0 116c Yp...G?m.....\l. 8042164: 9f51 0465 66ca 84df 50bc aa20 91d4 8c3d Q.e..f...P ...=. 8042174: 0186 6373 689c a644 8239 76bb 57bd 31bd ..sc.hD.9..v.W.1 8042184: effd 52d8 431f c153 134e d64e 9ddf 1aff ...R.CS.N.N..... 8042194: 9ba6 d357 ba7f 8abe ebf2 4d08 d834 6623 ..W........M4.#f 80421a4: 6e83 4187 e0df 259f e83f 9338 627e 03ce .n.A...%?.8.~b.. 80421b4: 7a94 aa50 b449 31bf 7bfd 7756 077e fd8e .zP.I..1.{Vw~... 80421c4: f5f9 3455 e374 c8fa b660 9b65 77b4 b04a ..U4t...`.e..wJ. 80421d4: 758f 4d87 c3c3 82c8 0b71 fe15 861b adf1 .u.M....q....... 80421e4: d2d8 f606 27fd f9d8 f4e0 916c 02fa f05f .....'....l..._. 80421f4: 96fa afaf 6e8e c688 e9ae 7a5b 3d06 caa9 .....n....[z.=.. 8042204: e7cd 4c31 17f7 c329 2bad 8032 cc34 11d3 ..1L..)..+2.4... 8042214: 1bfb 0561 811c d1ea 952e 2b26 aef6 f467 ..a.......&+..g. 8042224: c9ef c200 81de 7422 70e4 6100 388f a288 ......"t.p.a.8.. 8042234: 0f54 aed1 9d1a 7bba e2de a61d 38ab 40f3 T......{.....8.@ 8042244: 8372 2e74 296d f8a3 b90b 9890 7c5e 7df6 r.t.m)......^|.} 8042254: 5229 b2e3 2c43 43f1 bab0 afab 7385 5f5d )R..C,.C.....s]_ 8042264: 9d2e 6a4d 96ac 4382 159c 6abb 5c65 eb5c ..Mj...C...je\\. 8042274: 3474 8e0e acde 0453 f32a 53d1 a8ba f449 t4....S.*..S..I. 8042284: fef3 c7c3 a8dc 607e 464c 81f1 baa4 38ff ......~`LF.....8 8042294: 4434 3970 6e3c e83f f9b8 07fe f7d5 39af 4Dp9 8042304: aa1a 810f d92f e505 a55e b10b ef52 9588 ..../...^...R... 8042314: f562 b67f 0697 b2f7 7aa6 ba81 96a2 f284 b........z...... 8042324: d2ae cdc7 9d6d 6616 5fdb f6e3 55d7 74fb ....m..f._...U.t 8042334: 40fb 81ce aef2 fed2 edee 0f7b 0279 d2ac .@........{.y... 8042344: b6cd cebf 6fed f6a8 e185 f65a b940 0f69 .....o....Z.@.i. 8042354: 44b3 78fc 7b77 fdf7 f3c7 cf42 3706 a9b8 .D.xw{....B..7.. 8042364: d41a 28e4 bbca b9b0 12c5 26d4 fb1a 9353 ...(.......&..S. 8042374: 34a0 cd86 fc12 487f 2451 e592 a8a4 2805 .4.....HQ$.....( 8042384: faba 9de9 524a 2b5a 9c17 6f8c 4d20 8ca5 ....JRZ+...o M.. 8042394: 1335 32a7 9a0e 5409 bf19 1e43 c9df 1de8 5..2...T..C..... 80423a4: dc64 7909 2b7c 77a3 7290 6413 d5f1 de8c d..y|+.w.r.d.... 80423b4: dc81 c8fa 1be0 3d1a b736 2760 8321 69af .......=6.`'!..i 80423c4: 0ef4 cdd2 2c85 a8be 1801 b70a 9822 f09c .....,......"... 80423d4: 31a6 59bd 6d11 ecf6 c5d0 d7b9 d356 bef8 .1.Y.m......V... 80423e4: e12e 525d 8e6f 7793 3db5 fafc 8a7a f737 ..]Ro..w.=..z.7. 80423f4: 56ae 9e6b 86dd ab57 e798 4fa1 56af cf29 .Vk...W....O.V). 8042404: 0f18 4ab5 48b3 bc57 7fae 8c09 6060 863f ...J.HW.....``?. 8042414: ac40 7dd1 c19e f268 0929 4ac5 949a 0141 @..}..h.)..J..A. 8042424: 76e2 65d5 ca3a cb1b aac5 7207 2a4d 83b7 .v.e:......rM*.. 8042434: a241 2ab1 72b8 33d7 b1d2 9faa 786b 7492 A..*.r.3....kx.t 8042444: 0f36 c0fc 4183 7c99 4a1b 7235 ee29 c3d6 6....A.|.J5r)... 8042454: 422d d2e1 ef49 91d5 c74b ac43 2c26 e34f -B..I...K.C.&,O. 8042464: d41d 4ed9 300a 7ab5 aa37 8db5 7e36 6a56 ...N.0.z7...6~Vj 8042474: 480d f8f8 86b5 e380 67b6 2b57 f5d5 b566 .H.......gW+..f. 8042484: a15a 7b24 ab22 7a95 910d 2b52 63f6 2176 Z.${"..z..R+.cv! 8042494: 3b95 68e3 23b0 2adb a578 c6cd dc26 28b2 .;.h.#.*x...&..( 80424a4: 3d16 eb70 55ca 5da5 1b8f 21c4 b2d4 ac71 .=p..U.]...!..q. 80424b4: 2bdd 4e53 a1b7 1473 1d76 52f8 14cb bb5a .+SN..s.v..R..Z. 80424c4: 85dd 8a7a 6b08 3407 a084 07d2 b81d 1fa2 ..z..k.4........ 80424d4: b9df a46d 4377 c04a ae11 2dcf 55a8 381e ..m.wCJ....-.U.8 80424e4: d1e4 dd5d 871d 3408 ca4d 8f6f 9e8f 2a60 ..]....4M.o...`* 80424f4: ca4f 7cab 62d3 9aa9 0e2d deee 77b9 c429 O..|.b..-....w). 8042504: 3a56 c3ce 5ef8 86e4 707d 0789 0b8f 7950 V:...^..}p....Py 8042514: cb32 ee18 4952 17cb 4359 b917 4511 f4b4 2...RI..YC...E.. 8042524: 2ff9 d7a1 3a93 becd 8a7f c669 d527 7b25 ./...:....i.'.%{ 8042534: 27da aeb0 01fd df19 72c1 86c6 182b 106b .'.......r..+.k. 8042544: ef52 c451 ee0d c21a 4c67 1cf6 eb4d e282 R.Q.....gL..M... 8042554: 4e6a 9eff ba3d c39f 49b3 cef1 ead0 19e1 jN..=....I...... 8042564: 0bb0 191d 6e07 ef91 16fe 5b14 44f0 753b .....n.....[.D;u 8042574: 975f eaa1 7c52 dbb5 9b76 ba5d 4a88 0510 _...R|..v.]..J.. 8042584: 7e48 9ee0 be9c d307 7c04 5968 7bc6 64d1 H~.......|hY.{.d 8042594: cb8c b206 1c34 c422 9296 4154 245c d9ec ....4."...TA\$.. 80425a4: 81f3 6003 a6e6 5774 fb2b a614 1e56 a345 ...`..tW+...V.E. 80425b4: b142 b08d b6e8 a4d9 68e0 d5b3 3dd3 21a0 B........h...=.! 80425c4: 855a afa1 8e90 069c 7648 0298 99ac dd70 Z.......Hv....p. 80425d4: 7f29 5c3f 3694 0add c970 0298 c124 b32e ).?\.6..p...$... 80425e4: 0828 1735 dbfe c32b 78df 4c9b 775c 98e1 (.5...+..x.L\w.. 80425f4: 600f 2b41 1498 9d44 c00b a3ce 961c 6131 .`A+..D.......1a 8042604: 3dd5 fd0e 87a4 939d ce2f 88af 881d 4be2 .=....../......K 8042614: a122 68ce d112 7a90 15b5 c01b 8e79 ba6b "..h...z....y.k. 8042624: e01c 7360 b7e0 dc38 4304 4570 9a96 5d37 ..`s..8..CpE..7] 8042634: cde8 93ed 3222 dda4 232b 41f7 d8fc 0a39 ...."2..+#.A..9. 8042644: 8c1e 201f e314 7026 7c54 442d 6e01 f85e ... ..&pT|-D.n^. 8042654: fb6c 7071 6122 8c39 d703 3992 184f df52 l.qp"a9....9O.R. 8042664: 747f 2cb7 d2ae 088a a410 2971 6418 81ea .t.,......q).d.. 8042674: 2f16 68b2 2cc2 eadb 3994 129e 43d7 3605 ./.h.,...9...C.6 8042684: f36d 8c28 6c43 5c26 6d07 98aa 4eef 4299 m.(.Cl&\.m...N.B 8042694: 193c 7e33 3ca6 91ba 22ff 626f ba84 6083 <.3~.<..."ob...` 80426a4: d0ed 843b 3b41 94ed 04c1 c5de dc5d 9c0e ..;.A;......]... 80426b4: 67c3 eb8c 38d1 02ea 717d 6f86 c470 974b .g...8..}q.op.K. 80426c4: 0f91 e263 60fe 5890 c0a8 755f 49ca 3894 ..c..`.X.._u.I.8 80426d4: b7fd 95ab c80a 9d9e fa7c 9cc6 92a1 d7d7 ........|....... 80426e4: 91a7 46cd b0a7 f1fd d241 5503 8062 d658 ...F....A..Ub.X. 80426f4: 5cfa bcf8 8922 da74 3562 ebd2 2c71 014a .\..".t.b5..q,J. 8042704: 6edf 5c99 c2f8 67a4 6e5a db16 1b3e ec3f .n.\...gZn..>.?. 8042714: d6b2 e2a8 0198 61c9 766e 381a 888d 49b0 .......anv.8...I 8042724: 6c80 07b1 ce06 1bb8 770e 91a3 d672 6993 .l.......w..r..i 8042734: 828a ee59 cce3 2f00 6b06 6e4e 3806 026c ..Y..../.kNn.8l. 8042744: 1390 2f39 279e 438f 0fb7 a3cb 2320 9303 ..9/.'.C.... #.. 8042754: a9c2 baae 8a2b 88e9 315b fe2a 95ba 536b ....+...[1*...kS 8042764: 515f 89ba b6ac 818c ceed 12ce dd44 fb60 _Q..........D.`. 8042774: 72a4 caae 2126 db57 02d5 e89f bb5a 2c5c .r..&!W.....Z.\, 8042784: 0aa7 bf17 70ba ea4c 8511 e91f 9277 a853 .....pL.....w.S. 8042794: 017c ce81 5fdd 614e 4a67 3808 84ed 44fc |...._NagJ.8...D 80427a4: c902 cf5a 1cb5 2e08 ce66 d483 2073 458d ..Z.....f...s .E 80427b4: 8d20 081c 5dae b7ce 46b2 c220 2721 2106 ....]...F .!'.! 80427c4: 715c 2b94 6e9c 2e69 2292 1b37 6030 14e1 \q.+.ni.."7.0`.. 80427d4: dca3 5a34 cd58 6444 1150 0807 ecab 31ee ..4ZX.DdP......1 80427e4: c965 6078 4995 ca49 47ce e344 a730 2a0c e.x`.II..GD.0..* 80427f4: 43d0 5568 34a5 024f f0c8 ad5e 7298 6154 .ChU.4O...^..rTa 8042804: e776 cd0a 7852 b1ed 8b2f 1c44 56ac 190d v...Rx../.D..V.. 8042814: 68b2 983e eb94 6cca ca02 c047 69a2 20ca .h>....l..G..i. 8042824: 5742 1797 e496 b81d e2f4 ba8a 8723 8273 BW..........#.s. 8042834: 84fb 70d4 6805 93b0 8037 4f86 a185 f8ff ...p.h..7..O.... 8042844: e1cc 2e02 cc00 18a4 d100 39a9 f6c3 eea4 ...........9.... 8042854: 90fe 21ec 016e ebb1 02e3 b568 692a e131 ...!n.....h.*i1. 8042864: 4d3c e5a0 998b 0ccd cea0 d479 a9c5 a1b4 {,n& 80428c4: 63e4 2da5 e22d a2db c86e 45d9 b997 1bd0 .c.--...n..E.... 80428d4: 522a 9e24 109c be0a e78f e73a cb62 cab9 *R$.......:.b... 80428e4: 6132 8dfa ccdd cfba 8609 8a03 9123 2807 2a..........#..( 80428f4: 530b 1c92 36e9 f361 cce4 f3d2 6a10 0836 .S...6a......j6. 8042904: 9796 794d 63a1 0549 2dbe 9980 bacb b5b1 ..My.cI..-...... 8042914: 9455 4d77 d8d4 df35 769a 8efb fa44 5f29 U.wM..5..v..D.)_ 8042924: fc41 d202 4bff fd19 f78b 5816 87c8 c646 A....K.....X..F. 8042934: 1961 3418 599f 122d 1038 7862 970b 110a a..4.Y-.8.bx.... 8042944: 3dfd 3d77 c790 84a1 5dc1 b01c 8ef2 5ce4 .=w=.....].....\ 8042954: 08be 39b1 38b3 565a f644 0c51 4e40 244b ...9.8ZVD.Q.@NK$ 8042964: 91d5 5c1e d079 5ce9 b182 d1cb 74e3 28e0 ...\y..\.....t.( 8042974: 5e5c e1ce f387 a080 881f 5c22 84f9 8346 \^........"\..F. 8042984: 2db7 6010 a320 81a5 c835 9710 288f 6689 .-.` ...5....(.f 8042994: 9386 3f44 58ca d510 3f30 121a b18c 6486 ..D?.X..0?.....d 80429a4: 1867 2a11 fa7f a445 f110 0377 663c 4993 g..*..E...w.w.x...|'"..pt.) 80429f4: 5de4 84ef a8f3 7730 0345 921c 54d3 c2a0 .]....0wE....T.. 8042a04: 35b8 174e 88bf caef 5f7b 3104 6973 9503 .5N.....{_.1si.. 8042a14: 0e65 d215 a5f2 9cc3 3ce9 a657 1780 8a61 e........... 8042ab4: ca2f 29ba 1ac2 5339 cb7e e086 da5f c649 /..)..9S~..._.I. 8042ac4: 1dfd 6171 4aca cf83 f36c 3acf b59d 5aca ..qa.J..l..:...Z 8042ad4: a105 1c5a fbaa b757 deef f07d 6521 1c57 ..Z...W...}.!eW. 8042ae4: 81bf 10f0 cd91 bb71 adc8 3dd7 02af 8a60 ......q....=..`. 8042af4: b13f 7864 2c0f ef11 701d 0184 e47c 1def ?.dx.,...p..|... 8042b04: 30a8 bb02 4966 36ab a400 f809 4003 db28 .0..fI.6.....@(. 8042b14: ca33 e7e5 5d8e 0057 c376 a362 bdaf 9166 3....]W.v.b...f. 8042b24: d71d b75e 9184 ded6 c8b0 6b12 5a6f f4ca ..^........koZ.. 8042b34: 9f65 0f6c 31fd d202 4a9b 0311 91db 60a7 e.l..1...J.....` 8042b44: 7d66 4d48 ca74 26d8 ad2b 0886 b98f 77d9 f}HMt..&+......w 8042b54: c3bc 889b 7b54 66f1 646d b8f5 d819 dee0 ....T{.fmd...... 8042b64: 7eac b0f8 c887 d39b 6f10 e131 e447 2b73 .~.......o1.G.s+ 8042b74: 8fb0 9d8c 6b37 ab87 f718 61c2 2dc8 c87c ....7k.....a.-|. 8042b84: a68f 6fc5 c6d6 db9d 92c2 2dc8 c338 9845 ...o.......-8.E. 8042b94: 1850 4b2f 15dc 8a10 e69b b865 65c8 5db3 P./K......e..e.] 8042ba4: 0352 a1e3 20e6 68e4 2771 cce6 ec42 ff54 R.... .hq'..B.T. 8042bb4: 5e05 12bb 347a efdb 4e38 1430 6577 466f .^..z4..8N0.weoF 8042bc4: a1cf 10f0 494c 98c1 09d6 c244 f118 8823 ....LI....D...#. 8042bd4: fcbc e40d 7a1a 8145 99cc 8ab8 a566 2f2f .....zE.....f.// 8042be4: cfe8 c88b 9b53 98a2 91e8 97a9 86f4 f9c3 ....S........... 8042bf4: c92f 99ec 37bd 72f2 95fa a078 f660 0675 /....7.r..x.`.u. 8042c04: 1504 9402 0c62 44bf f15d 09ac 6e5e a180 ....b..D]...^n.. 8042c14: d3f4 31b2 9ffd 08dc 0304 2544 10d1 a3c4 ...1......D%.... 8042c24: 5f2b 7052 7512 ee27 fcb9 e48a 7a06 e585 +_Rp.u'......z.. 8042c34: 7a0b e5b3 92a5 0023 ad5d 1bd0 f42f 0b68 .z....#.].../.h. 8042c44: 942a 2361 72e9 7d18 b693 d8a6 646d 5569 *.a#.r.}....mdiU 8042c54: f579 dd7a 26b4 7ee3 c713 3f08 22b7 d74e y.z..&.~...?."N. 8042c64: 17b8 371d 5b25 0985 4942 b8c4 0f6c fd79 ...7%[..BI..l.y. 8042c74: 0d7a 3eb6 9811 c079 9981 518b 0f9c bcdd z..>..y....Q.... 8042c84: c10c d598 e717 4d9f 8f7f 4bc8 ce3c d901 .......M...K<... 8042c94: 984d 318f ba01 481e 40eb 614f 62e0 6121 M..1...H.@Oa.b!a 8042ca4: 2f06 651d 0a53 3ec0 6bea a5a6 a94f e9d3 ./.eS..>.k..O... 8042cb4: 1898 ade0 babf f07f ede1 b69b 7dfc 7a7a .............}zz 8042cc4: d672 df92 b665 da94 3827 9baf c1a9 d669 r...e...'8....i. 8042cd4: da80 194e 5b01 61c9 3c44 6df1 7e3c 54b6 ..N..[.aD<.m<~.T 8042ce4: 5e85 0b3c 890c af16 15c4 b2cf 22dd eb4d .^<.........."M. 8042cf4: 4d00 c712 71eb e08f 43e6 95d8 5771 cced .M...q...C..qW.. 8042d04: f612 ac9f 917b 99ce 2f70 c11d f802 064b ....{...p/....K. 8042d14: 07e1 070b eb71 bdc1 d130 9cc6 3cb2 9587 ....q...0....<.. 8042d24: 490a 0100 95d9 e931 4604 20b2 8bc1 ea57 .I....1..F. ..W. 8042d34: a213 3c46 a4f6 ae8d 0808 faf2 f600 8896 ..F<............ 8042d44: 63d7 7cc8 7e96 2ab4 031d 6f96 407a e852 .c.|.~.*...oz@R. 8042d54: c09d 3c2e d415 ee16 8d97 8e1e 3cf1 bc24 ...<.........<$. 8042d64: f023 709b 3363 7a79 906b 9c7a 17a1 6ff4 #..pc3yzk.z....o 8042d74: 5c4e 25c4 fae2 352d 4672 5b71 3cbb dcec N\.%..-5rFq[.<.. 8042d84: 712c eefb 80f8 5d71 1466 4740 3a90 9a8b ,q....q]f.@G.:.. 8042d94: 729a 90e2 a5bb 843c 48f4 22da 0a04 c917 .r....<..H.".... 8042da4: 594c b1c7 7e0a a8a3 ec4a fb12 5c04 eb45 LY...~..J....\E. 8042db4: ee8d 8a26 0407 1985 af03 b608 9894 5e9f ..&............^ 8042dc4: 2248 5367 b797 7911 ac2c 192e 77fd 3c71 H"gS...y,....wq< 8042dd4: d817 c16b c55f 5a95 6de3 edef 0af5 a3fd ..k._..Z.m...... 8042de4: f90b 32f0 6177 7dbc def7 f0ae 914d 211b ...2wa.}....M..! 8042df4: 66a5 a38f 6daf 21b8 72e0 8608 2ee4 ff7b .f...m.!.r....{. 8042e04: 1dd1 dd3c 7786 b057 3042 af6e 7a14 b36d ..<..wW.B0n..zm. 8042e14: 0465 47cf b421 402e f0f5 0d36 7d72 a5ca e..G!..@..6.r}.. 8042e24: 833b f2c8 5645 5940 57b8 84e4 6a43 644d ;...EV@Y.W..CjMd 8042e34: 06e2 0b47 4ac6 1e04 8807 378e d241 b5c0 ..G..J.....7A... 8042e44: 6f36 37cd 7b97 928c 2607 26dd adab f127 6o.7.{...&.&..'. 8042e54: 176a c6c3 2c3d 1d0a 1be1 5058 5c83 529b j...=,....XP.\.R 8042e64: 7896 4814 c279 2e78 a545 0a9a 6017 4e7e .x.Hy.x.E....`~N 8042e74: 86f2 72a3 adfe 6154 10ff 6bef d316 d5b7 ...r..Ta...k.... 8042e84: eae8 6e06 0650 6d7d e2a8 28fa 4248 20ac ...nP.}m...(HB. 8042e94: 65f9 1140 9258 e8c5 b82c 8a1a 815c 2f0d .e@.X...,...\../ 8042ea4: 2287 338f ec35 f6ee 9626 a951 fe96 19dc .".35...&.Q..... 8042eb4: 3696 462a d2a5 7fa4 0355 078b 65cc f424 .6*F....U....e$. 8042ec4: 127e 41f6 8ae9 28a2 3609 e135 3d47 0373 ~..A...(.65.G=s. 8042ed4: 0696 f166 a78c 0b08 cb75 273d 707e a43c ..f.....u.='~p<. 8042ee4: 034d f573 f80b 968e 9797 841c 6278 f426 M.s.........xb&. 8042ef4: 26cb 358f e9d6 ad2d 74a5 a7c7 c553 e5e4 .&.5..-..t..S... 8042f04: 568e b7cf cc66 bcb4 b8eb b79a 4b01 5eac .V..f........K.^ 8042f14: 7576 5140 ac27 432a 1246 8c68 55b1 84b2 vu@Q'.*CF.h..U.. 8042f24: 4f30 6cb8 4743 a328 a01f 4b54 9e9d a6aa 0O.lCG(...TK.... 8042f34: 7720 5b29 f0c6 a1c0 b96b 11d8 8e00 d4b2 w)[....k....... 8042f44: c005 5c90 0112 5f48 4033 15a4 f7f5 2bc8 ...\..H_3@.....+ 8042f54: cfb0 277e 1870 2a82 4e50 2cf1 45e5 b200 ..~'p..*PN.,.E.. 8042f64: 3fd1 b2b1 8e08 f211 9c35 d8c8 be7a 83d9 .?......5...z... 8042f74: bc22 ab14 4287 9e93 a8ec a653 2b4c ff06 "....B....S.L+.. 8042f84: 5aad e640 2031 957f 9816 bd01 0cab 2842 .Z@.1 ........B( 8042f94: 031c 8972 be0b dc45 3263 56ca 2e48 5c34 ..r...E.c2.VH.4\ 8042fa4: 7b51 64fb f021 9569 8e6f 63a3 8ea8 278f Q{.d!.i.o..c...' 8042fb4: b223 630d a7e3 f07e ed0e 1b24 8f1c e2df #..c..~...$..... 8042fc4: f78d 083a 2439 7817 8bd9 3263 b2d1 ff01 ..:.9$.x..c2.... 8042fd4: 5d31 7c51 0bdc e640 005c 1747 6d00 de0f 1]Q|..@.\.G..m.. 8042fe4: 1c15 d26c 66e9 3bcd 9510 ddb3 2741 9ec1 ..l..f.;....A'.. 8042ff4: dfb3 d072 b934 fd33 2502 dae9 dc03 b33f ..r.4.3..%....?. 8043004: d3c3 22e7 7cf1 b101 2f2d 282f 6f88 d8be ...".|..-//(.o.. 8043014: ba75 8cf4 ec12 1359 c578 e13b 6f10 a677 u.....Y.x.;..ow. 8043024: ad26 1194 fbe8 f675 3e7c 4d3d d65b 63ce &.....u.|>=M[..c 8043034: 18e5 1687 1fa6 ea83 c41e 93ec d6af 8ad0 ................ 8043044: 6d70 e89b dbc8 46b7 e4f8 c5d3 b18d acd3 pm.....F........ 8043054: 3867 910c e384 8930 73de 7b70 294d c5ee g8....0..sp{M).. 8043064: 40d6 f114 f701 e20e fe07 8262 62cb 6792 .@........b..b.g 8043074: 66a3 eda4 cc12 4fa1 905d 2562 0568 536d .f.....O].b%h.mS 8043084: d0f0 3da0 f668 7ddb c1a6 d6f4 98c6 c1d6 ...=h..}........ 8043094: ed1e f78d 635b 04ac a3a8 614b e010 f0dc ....[c....Ka.... 80430a4: cd10 078e c8d7 2286 878f 6487 a440 5bd4 ......."...d@..[ 80430b4: 7e5e db66 741d f38c 5907 b588 e0f4 26a8 ^~f..t...Y.....& 80430c4: 3987 9b62 a7b0 2fc7 7a4e f7a8 0156 2eae .9b..../Nz..V... 80430d4: d008 3108 b188 9f43 4b82 b53d 8201 0efa ...1..C..K=..... 80430e4: b3b5 eb03 5c6c 7bc0 bc9c 0365 35d0 acbd ....l\.{..e..5.. 80430f4: 15a7 85e1 5158 10f4 fd91 eafc 2c1e e239 ....XQ.......,9. 8043104: b8c6 487d 092d 43e2 ac0b eb84 2e3e bc0b ..}H-..C....>... 8043114: 5245 ca4e b025 b848 0f06 7531 1c87 81a6 ERN.%.H...1u.... 8043124: f05f 2770 05df 1601 90ba 8aaf 2167 4466 _.p'........g!fD 8043134: 70b6 43b8 74c5 22c2 7471 1531 b77c 870b .p.C.t."qt1.|... 8043144: cbcb b887 040a ec40 3029 1da4 1831 7434 ......@.)0..1.4t 8043154: f248 4807 d168 f49c 9992 6129 d525 c284 H..Hh.....)a%... 8043164: 7362 ed09 453f 5a8f da4b 9e68 eae2 86b7 bs..?E.ZK.h..... 8043174: bd29 8255 8aca b605 a6b4 1451 3311 ee64 ).U.......Q..3d. 8043184: 4e25 625d d922 932e 0417 e858 0460 6cb8 %N]b".....X.`..l 8043194: 5c5a 8a0a 0f49 c37c 0da0 9b7b 53ee cc15 Z\..I.|...{..S.. 80431a4: 91fb 8b01 3d00 61f9 f470 fc08 4699 c682 .....=.ap....F.. 80431b4: c482 d5c0 0eec 271e 11f2 40d8 876c 6862 .......'...@l.bh 80431c4: 93b2 7b01 7192 bb43 5612 c77c 8a85 4b8c ...{.qC..V|....K 80431d4: e68c 6f04 8171 f4b0 fbe7 7616 6b2a 3018 ...oq......v*k.0 80431e4: 062b 1ba2 c23a 20e0 bd96 a753 558a 1440 +...:.. ..S..U@. 80431f4: 8f80 d729 e4b7 d007 48e2 d0ec 2088 8243 ..)......H... C. 8043204: 2f47 4b36 cb81 08ee 080a 33b0 f6c4 5705 G/6K.......3...W 8043214: e9ec 0fa7 8668 f1c0 82b0 084e b81d e5b2 ....h.....N..... 8043224: e682 4208 866c fadc 68b5 cc9b 34ac 9110 ...Bl....h...4.. 8043234: 78a3 7bb9 3a42 6727 41d6 829b 3101 5af6 .x.{B:'g.A...1.Z 8043244: 8062 f9c9 fb7c c0c5 8ab6 10bc a067 570f b...|.......g..W 8043254: d24d 0c23 0d95 bcb6 a7d0 5b41 70d8 7014 M.#.......A[.p.p 8043264: eb48 4ea5 74b3 88f4 e8de 98e5 3d0c a120 H..N.t.......= . 8043274: ba94 ad0e 4518 a46e ad87 06c2 a509 14ae .....En......... 8043284: c190 bca7 f119 e49e c84d 96ea b286 ff0c ........M....... 8043294: e4a4 d09c e8d1 120b 2b14 5680 9ee4 e22c .........+.V..,. 80432a4: 93d0 702e 1c66 fc78 bf37 f41d 94c2 88ab ...pf.x.7....... 80432b4: 70cd ee26 09fe 98fe 0975 3857 acdb d849 .p&.....u.W8..I. 80432c4: ebc6 a091 f818 8e9d 760f cf41 8682 d203 .........vA..... 80432d4: 70e0 5f41 28dc 90b3 0ea9 3a34 7d35 5675 .pA_.(....4:5}uV 80432e4: fcb2 a949 f979 09b3 9147 4ba2 410e fc83 ..I.y...G..K.A.. 80432f4: 1409 8789 1635 9d8a 2d6a d884 6299 1b5d ....5...j-...b]. 8043304: 9835 4096 4614 7ccd d17b 41d0 88ca 59aa 5..@.F.|{..A...Y 8043314: f434 0f2e bbbd eadf 138a f680 bf9e a5d7 4............... 8043324: 6a28 4011 b106 8699 427d a499 340f 0349 (j.@....}B...4I. 8043334: 1dc5 f2bf 28d3 6bc4 8426 7e06 e3d7 002c .....(.k&..~..,. 8043344: 0f4b af68 fc58 23b6 c9c1 06e0 99ac 87a8 K.h.X..#........ 8043354: e237 8531 ad0c 35d8 157c 9e9a 3b13 e9c3 7.1....5|....;.. 8043364: 3aff 48c9 7493 0b1c 4b47 d038 c110 2191 .:.H.t..GK8....! 8043374: cc32 952e cabe a404 0e70 0ce5 82a9 d5d2 2.......p....... 8043384: 7f56 24f6 395e ffc5 56b7 8abb 105d e155 V..$^9...V..].U. 8043394: 798d 73bc 5ae2 94ac 6b88 e1dd 8147 3968 .y.s.Z...k..G.h9 80433a4: 4feb 49b1 f57b 8c49 f436 b826 b717 3698 .O.I{.I.6.&....6 80433b4: 0f45 1366 51a7 5cc7 08d6 391d 7abc 2b1e E.f..Q.\...9.z.+ 80433c4: 8f6f ee82 e7ed 82a3 e4f9 0b89 adec 6ff0 o..............o 80433d4: cccb ecbd 9f2c e640 6e5b 3ec4 1953 9d44 ....,.@.[n.>S.D. 80433e4: 5937 bce3 b487 9413 58d2 3d23 45e8 4462 7Y.......X#=.EbD 80433f4: c2cb 6cad 148a 68c6 1db5 d334 06a6 dd8e ...l...h..4..... 8043404: 8339 bd21 19fd 880c 46d3 076a 19fa b590 9.!......Fj..... 8043414: cd2f 7c1e 2062 32a0 6fb5 7b80 58e4 7a78 /..|b .2.o.{.Xxz 8043424: a87c bdb5 9ca8 7354 dd28 8bf8 6f01 4f67 |.....Ts(....ogO 8043434: c87a 2b37 24e8 a1cb 641c a84a 9467 0243 z.7+.$...dJ.g.C. 8043444: 699a 1d53 2e1b 6d05 7057 54db 1aee 04f9 .iS....mWp.T.... 8043454: a52a 78b3 0822 f20b 01b9 cfca 238e 7356 *..x"........#Vs 8043464: 8917 3972 141c 304f 0466 4a21 8a0b 0592 ..r9..O0f.!J.... 8043474: c45b 70a0 d330 4a89 a14f 6338 f20f fa93 [..p0..JO.8c.... 8043484: b74a 052c c279 799d 41e2 119b ea40 1eed J.,.y..y.A..@... 8043494: 3238 f704 d65a 57b8 c980 7b78 7ec1 102b 82..Z..W..x{.~+. 80434a4: 002c 1c12 0a52 86d2 decd 11c7 97ca 7d9e ,...R..........} 80434b4: 885c 1855 6fa7 9ec9 934c 95a7 af0a 5cda \.U..o..L......\ 80434c4: 6ef0 6eab ca0b 84cd 54e2 fc29 0a0d d40e .n.n.....T)..... 80434d4: 1528 fab0 d467 4da1 f073 8ada 5637 ba40 (...g..Ms...7V@. 80434e4: f4cd 1711 7b9f 0f7b d727 3b95 95c2 c967 .....{{.'..;..g. 80434f4: 7978 0043 306b 8812 14cf 6437 b18d 1466 xyC.k0....7d..f. 8043504: ad1c 6c83 baab 36f4 b562 cd7d 0634 1f81 ...l...6b.}.4... 8043514: 883a 60e1 91cf ac69 78de bc32 bcd6 f266 :..`..i..x2...f. 8043524: 56ef 32aa 9b70 6b85 864f 11d7 75f1 e068 .V.2p..kO....uh. 8043534: 5a7d 2154 2a1d 1d26 6f0a 02bb b607 0d79 }ZT!.*&..o....y. 8043544: e22f 6592 1b2f a3c1 3f49 74b8 3300 dffd /..e/...I?.t.3.. 8043554: d6b8 6f34 8b98 e5fa 8cde f42c 156d 1cea ..4o......,.m... 8043564: f43a 11e8 ebde 5cab 637a 059e 44e3 f254 :......\zc...DT. 8043574: e1b2 8292 a69e afe8 a46d 5709 01c5 0c2b ........m..W..+. 8043584: 9e9f edba ec02 31c1 bdcc 63e5 3c67 0524 .......1...cg<$. 8043594: 5e87 d1ec 8883 09a9 e159 db69 e685 581a .^......Y.i....X 80435a4: f524 cf56 a9d4 1c7f 87b8 2261 df9f 1eda $.V.......a".... 80435b4: 9086 6130 e3c7 bebf 52c2 fc80 2c03 2533 ..0a.....R...,3% 80435c4: 5b1d 862c e374 1bd9 9beb c0f4 ec19 5d82 .[,.t..........] 80435d4: a97b e3e0 62c1 7c32 3f41 c60f bd38 7c11 {....b2|A?..8..| 80435e4: 05e6 a5ed 736a 42a9 b941 9c38 56c8 9f06 ....js.BA.8..V.. 80435f4: 1199 86c6 901b 0b3c 8413 210f 70ca bc0c ......<....!.p.. 8043604: 1635 c1e3 709d 3242 9e27 e2aa 06bf ef93 5....pB2'....... 8043614: f0de 9851 0044 2776 965d 20b7 c297 60fb ..Q.D.v'].. ...` 8043624: 23ac b103 10ca a172 2cf5 432f ea5f 8229 .#....r..,/C_.). 8043634: 2204 e8b2 fa3d 377b b927 acfb dffa d1bf ."..=.{7'....... 8043644: 82fe d90b c0f9 8f7a 6471 367a ddbf 7033 ......z.qdz6..3p 8043654: 179e ad9e d754 a741 e9aa 3e6c 43fa 4ea0 ....T.A...l>.C.N 8043664: 99e1 844d 95e6 4070 aba7 c9d8 63d6 3c7b ..M...p@.....c{< 8043674: 5e76 1664 fc0c 96ed 423e a019 d8f1 1ece v^d.....>B...... 8043684: 00e2 de79 4ae6 7fb4 ea7a 0dec 6965 01d6 ..y..J..z...ei.. 8043694: 44e8 abae a078 9e89 d84b 5773 fb46 67e0 .D..x...K.sWF..g 80436a4: c9f2 22a6 a752 81a7 a985 83b7 21e6 941e ..."R........!.. 80436b4: c6ce cdd1 1693 621f ce4a 5bf2 75de 9265 .......bJ..[.ue. 80436c4: 796b 5b82 6da1 d3a8 24fb c8e0 294f c88f ky.[.m...$..O).. 80436d4: f841 504c fe6c 3990 d3b3 381b 76a3 0861 A.LPl..9...8.va. 80436e4: dc97 9b28 5604 4041 99ef 6c3b c617 20a1 ..(..VA@..;l... 80436f4: 243e 9a41 f9fb 980a 7cb5 c5ed c9c1 911d >$A......|...... 8043704: 832d dfee 6100 aec2 f02c 6785 f0d8 0dd0 -....a..,..g.... 8043714: 09ac 753c d9bf a3c7 d934 e9d4 2675 c639 ..d.k+z....! 8043914: dc38 ba8f ae37 6621 4f11 f1c7 40b3 f12f 8...7.!f.O...@/. 8043924: 3bd7 9ee0 e726 7d30 eb88 af39 3fce 0883 .;..&.0}..9..?.. 8043934: 7b97 eaa6 23a7 4d91 432c b1ad 0479 129c .{...#.M,C..y... 8043944: d746 30b1 0346 6cc8 01ac bded 6d52 fd6d F..0F..l....Rmm. 8043954: a959 0eb6 692a a1ac 5688 5f13 2547 a706 Y...*i...V._G%.. 8043964: 4e02 5c27 23d8 8260 0345 4fc8 a5b8 068f .N'\.#`.E..O.... 8043974: 1075 6554 bd6d aa5f 1a6d 0810 7440 4dd4 u.Tem._.m...@t.M 8043984: 82ad 12b5 e11d b663 ac2b 7520 4046 8ee8 ......c.+. uF@.. 8043994: 96aa 5544 72ee 7383 4693 c183 447a a2c9 ..DU.r.s.F..zD.. 80439a4: 645b c770 4000 73db 834b 9c77 ae16 7fcb [dp..@.sK.w..... 80439b4: 8381 5f9a e5a0 1085 d52a b64f b502 2dad ..._....*.O....- 80439c4: b363 ef5a 1a97 9ab5 ff81 cfc0 c096 4d2a c.Z...........*M 80439d4: a045 081d 6ad8 7fd0 942a 80ff c63b 1f7d E....j..*...;.}. 80439e4: 1cdb ae08 e33d 4c12 309b 0bc7 afd0 3636 ....=..L.0....66 80439f4: ebb0 4037 6bb2 fb20 45b5 1510 1670 8bae ..7@.k ..E..p... 8043a04: e8ce ad1f 5c88 6ab7 6aa3 d66c db79 bbff .....\.j.jl.y... 8043a14: ccdd eb1c 90b4 7e66 9b8b 1f6d a053 b609 ......f~..m.S... 8043a24: 7aae eea8 a327 f599 86f5 b9b1 4eb5 7d4c .z..'........NL} 8043a34: bd6d 8eb4 b50d 89b5 4375 0d6e 8feb 06ff m.......uCn..... 8043a44: 41be 9b2f 7ac6 7e95 8401 0972 ff82 b7d3 .A/..z.~..r..... 8043a54: a128 dde5 19ac b49b ead1 b00d dafc be3a (.............:. 8043a64: 1b6a 6795 b00d 9ace 05b1 0ace 9026 d66c j..g........&.l. 8043a74: a5b1 2ad6 90cf a8d5 17a1 b6a4 03f0 49f4 ...*...........I 8043a84: 773c 9f13 4acf 6ee8 ed03 55af 5391 acdd : 8043c66: 692f 666e 2e6f 7468 6c6d 0000 5448 5054 /info.html..HTTP 8043c76: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 8043c86: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 8043c96: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 8043ca6: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 8043cb6: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 8043cc6: 6e65 2d74 654c 676e 6874 203a 3031 3839 ent-Length: 1098 8043cd6: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 8043ce6: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 8043cf6: 3a65 7420 7865 2f74 7468 6c6d 0a0d 6f43 e: text/html..Co 8043d06: 746e 6e65 2d74 6e45 6f63 6964 676e 203a ntent-Encoding: 8043d16: 7a67 7069 0a0d 0a0d 8b1f 0008 0000 0000 gzip............ 8043d26: 0a04 569d 6edd 36db 7e14 5615 69bb 2881 ...V.n.6.~.V.i.( 8043d36: 766e 6035 8096 2b22 0286 1aeb 1da0 5eb0 nv5`.."+.......^ 8043d46: b40d db44 256c 9352 c728 4bbe adb2 68bb ..D.l%R.(..K...h 8043d56: 0e81 30c1 4114 aed7 827b 6b74 b4b6 d389 ...0.A..{.tk.... 8043d66: a057 68de 21df 272d 9c5e e7ec 3642 c88f W..h.!-'^...B6.. 8043d76: f7f3 ef9d aa1c e57b 3b93 f7eb 6fee 64dc ......{..;...o.d 8043d86: 9343 7167 7e97 c659 20d5 020a 8248 71a7 C.gq.~Y.. ..H..q 8043d96: 1737 b386 c864 4acb 2898 4da8 fc3f 7b08 7...d..J.(.M?..{ 8043da6: edee 98d0 1422 d75f 1472 5f05 5f86 08dc ...."._.r.._._.. 8043db6: 75d7 705e 7b23 0899 a258 1195 2a0a 6eb7 .u^p#{..X....*.n 8043dc6: 2246 881d 4956 5cf1 c144 8a48 42cd e697 F"..VI.\D.H..B.. 8043dd6: b9cc 994d 619a 8a94 4c91 e844 1584 a4a9 ..M..a...LD..... 8043de6: 3c91 ab0b 6784 5a22 c95b 58f9 75e6 973e .<...g"Z[..X.u>. 8043df6: 4aeb 4e94 70e0 5d19 0b87 4d23 6226 ccfb .J.N.p.]..#M&b.. 8043e06: 9b4e ed6f b349 8f65 7eed c8f3 361e bb4f N.o.I.e..~...6O. 8043e16: bf1d cdd7 7aa4 86c8 e8a5 4147 a5ce 4d5a .....z....GA..ZM 8043e26: 2aaa a560 a2c8 32a0 4c93 4354 0c21 552c .*`....2.LTC!.,U 8043e36: 2949 c30b a4cc b840 8c46 e74d 1f01 ff71 I)....@.F.M...q. 8043e46: 6036 9955 4144 33a9 fab1 c2a0 8ee1 8f7f 6`U.DA.3........ 8043e56: 0785 a7ad 49d3 4ddc 88e5 1925 aaaf 5028 .....I.M..%...(P 8043e66: d47c 25e3 7ff3 2a61 bcfa 4cce f62b 58e5 |..%..a*...L+..X 8043e76: a1a4 05d1 9d2c 09d3 a2c9 fd28 dc56 b3e5 ....,.....(.V... 8043e86: a5d0 c54a 9578 060a bd08 4c8f 340f c2c5 ..J.x......L.4.. 8043e96: c0f1 fb4c 6adb 107c 9930 6722 eaa1 a250 ..L..j|.0."g..P. 8043ea6: b33a 75a3 ead6 b823 2236 fd2c 5a69 80c4 :..u..#.6",.iZ.. 8043eb6: a96c d8e3 04be 5bba 1f76 1f28 3b34 56cd l......[v.(.4;.V 8043ec6: d8f3 a77b 67f3 4075 231d a0d5 f1f2 f6c6 ..{..gu@.#...... 8043ed6: a867 936d 3d82 6fb1 3bed b87b 4d5c beaa g.m..=.o.;{.\M.. 8043ee6: 4c5e 2791 8e46 a540 05e5 c4a6 eeff 287a ^L.'F.@.......z( 8043ef6: a32b 49cb f9eb e6a7 781b 229d a3e4 9f53 +..I.....x."..S. 8043f06: 1a9d f7dc 9d90 7f81 e4b3 0145 1de0 336a ..........E...j3 8043f16: 0336 e18b 05da b1de 05d1 8498 88f1 3267 6.............g2 8043f26: 2345 1568 f4f6 8098 0f26 5d7d 6ee6 eefb E#h.....&.}].n.. 8043f36: b7e7 2837 80b7 3e51 455a cb81 1934 80c8 ..7(..Q>ZE..4... 8043f46: b1a1 1a86 3626 dcee 07bd 4345 6ecc e40b ....&6....EC.n.. 8043f56: 5985 735c 9912 e85e e18c 27b0 299f 8969 .Y\s..^....'.)i. 8043f66: cc06 82aa f8c3 c087 0f6b 4f48 8867 d91f ........k.HOg... 8043f76: 9423 0b6b 310d 6444 1a74 d72b c6eb d6f3 #.k..1Ddt.+..... 8043f86: 4819 af5b 2b4a 3481 474a bb42 f80b ec0e .H[.J+.4JGB..... 8043f96: f371 b994 bfc2 9346 50ed 0dd9 8546 aa59 q.....F..P..F.Y. 8043fa6: 52e3 0bae 7323 019a a0ee ea73 c4bd 39f6 .R..#s....s....9 8043fb6: 7b42 9b03 cd47 b993 4719 9d54 6c8a c6a9 B{..G....GT..l.. 8043fc6: a08f 8ecf 67dd bdf6 d063 fda1 fed3 4646 .....g..c.....FF 8043fd6: 5388 ed58 982f 4a29 528d 772c 4bbd 3438 .SX./.)J.R,w.K84 8043fe6: 34db 181e fcb8 4162 bfb1 1239 8565 2cf2 .4....bA..9.e.., 8043ff6: e18b 8df6 0675 bd12 3421 ed9a bd05 279c ....u...!4.....' 8044006: 4d3c 61a9 e7cf 8afa da1c 9043 da7e b63c ... 8044056: 0060 6b07 69d7 9e90 fd8f 6539 800a ec4f `..k.i....9e..O. 8044066: 3c7b 7847 40fe 5318 7364 cff0 5461 ea93 {..o.K.b....s 8044156: daf5 67c7 09bf e3e8 2fea 307b 75b5 096c ...g...../{0.ul. 8044166: 0000 .. 08044168 : 8044168: 682f 7369 6f74 7972 682e 6d74 006c 0000 /history.html... 8044178: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 8044188: 530a 7265 6576 3a72 6c20 4977 2f50 2e31 .Server: lwIP/1. 8044198: 2e33 2031 6828 7474 3a70 2f2f 6173 6176 3.1 (http://sava 80441a8: 6e6e 6861 6e2e 6e6f 6e67 2e75 726f 2f67 nnah.nongnu.org/ 80441b8: 7270 6a6f 6365 7374 6c2f 6977 2970 0a0d projects/lwip).. 80441c8: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 80441d8: 3031 3339 0a0d 6f43 6e6e 6365 6974 6e6f 1093..Connection 80441e8: 203a 6c43 736f 0d65 430a 6e6f 6574 746e : Close..Content 80441f8: 742d 7079 3a65 7420 7865 2f74 7468 6c6d -type: text/html 8044208: 0a0d 6f43 746e 6e65 2d74 6e45 6f63 6964 ..Content-Encodi 8044218: 676e 203a 7a67 7069 0a0d 0a0d 8b1f 0008 ng: gzip........ 8044228: 0000 0000 0a04 568d 8f5f 44db ff10 5b2a .......V_..D..*[ 8044238: 9d53 2962 2e4e 05e2 d891 0a15 a87d a084 S.b)N.......}... 8044248: 2952 a782 dad3 d89e 5bdb baef 6bbb 02e7 R).......[...k.. 8044258: 4487 e05b 48a5 7895 bc40 c420 3837 4e90 .D[..H.x@. .78.N 8044268: d2ba 7deb e706 311b b5eb 8f83 c746 4a29 ...}...1....F.)J 8044278: dff6 cecc 6fcc 337e c59b 8f9d 5b3f fe7e .....o~3....?[~. 8044288: c3d5 24fb 0537 168f 97f6 2a70 d0b2 70f3 ...$7.....p*...p 8044298: 3405 168d 1805 924a 2a9c 260d 2af4 0ab3 .4....J..*.&.*.. 80442a8: c03e 76b3 3737 0ca6 69e0 eac5 fbd0 7832 >..v77...i....2x 80442b8: 51fc 94b0 4945 8b0d 7839 9124 80c2 9540 .Q..EI..9x$...@. 80442c8: f707 4843 e833 0495 202d 6af4 eb06 2a52 ..CH3...- .j..R* 80442d8: 9033 b35b e4d4 0a61 4b35 6820 6317 9826 3.[...a.5K h.c&. 80442e8: 9461 3a07 1ca1 d9c2 a0b8 ac27 8aa8 badd a..:......'..... 80442f8: a0d2 05da 9345 21e1 309a 70cc 9a88 b65f ....E..!.0.p.._. 8044308: b62f 35df 9b6f e6b3 d90d 6b3e 9aae b73f /..5o.....>k..?. 8044318: b72f 9bcf e68b 6935 c6fe dbe5 73ed bf3c /.....5i.....s<. 8044328: de6a e7e0 671c 8b67 d3a9 705c 8e26 ae49 j....gg...\p&.I. 8044338: 1560 057a 6265 6892 11ed 3c05 b4f4 70d9 `.z.eb.h...<...p 8044348: 39d0 4180 3a3b ac51 c434 4a6c c60c 89c0 .9.A;:Q.4.lJ.... 8044358: 3e99 35a1 bb75 d11e 092a 253d 4c39 689e .>.5u...*.=%9L.h 8044368: 9e14 7dba 389c 6348 6e99 45a2 6aca 7092 ...}.8Hc.n.E.j.p 8044378: 75aa 09e8 c75a 1154 0437 ac29 c568 bf4d .u..Z.T.7.).h.M. 8044388: b15c 4813 2303 bc4b 1de9 c09d 08de 1dca \..H.#K......... 8044398: 0b45 b9da 44ce 270a 9b13 044e d9d8 32e0 E....D.'..N....2 80443a8: d693 8a17 bc5f ffa6 35ed f3de 4b08 6631 ...._....5...K1f 80443b8: 5510 30c0 9d77 c568 7d7b ae74 08f7 4ea7 .U.0w.h.{}t....N 80443c8: 4eda 8422 af6c a8e1 bdf9 b339 36d8 8897 .N".l.....9..6.. 80443d8: e231 7dbd ace9 f95b 0ea1 cb12 9130 e769 1..}..[.....0.i. 80443e8: d46f 86fc cf6a 04ba c6bd 5d74 57ec 6263 o...j.....t].Wcb 80443f8: 7b25 5f95 a331 37df 6857 12ed 7f95 2e6c %{._1..7Wh....l. 8044408: afb6 2bf6 4ce5 a91b d736 a1a1 6189 1235 ...+.L..6....a5. 8044418: 4874 7f9b a7d5 5615 8386 006c a5bf f237 tH.....V..l...7. 8044428: a103 716f 55d3 608c 10ac 2e8d 89d7 6a02 ..oq.U.`.......j 8044438: 51e0 7f15 6b4a 6196 4851 f231 03e7 b42a .Q..Jk.aQH1...*. 8044448: 1839 b85c b456 fb2c baeb c1e2 f2eb 35d9 9.\.V.,........5 8044458: 6eb7 66cb 1b54 c592 02d8 1409 52e8 dd0a .n.fT........R.. 8044468: bac6 b768 df5a d9db 278e bf6e a6f3 22e7 ..h.Z....'n...." 8044478: 623a 771c b28d 9ed3 6514 a88e 31fd afa8 :b.w.....e...1.. 8044488: 2c73 7ca4 849f 28cd e826 1615 45e5 5fb3 s,.|...(&....E._ 8044498: 67ea df4c 7379 5369 ef67 5a98 3853 bb6b .gL.ysiSg..ZS8k. 80444a8: b190 d335 db7a f065 a528 a286 d35b c4f6 ..5.z.e.(...[... 80444b8: 368e 1c44 b877 3a5a 1c5b 0eb1 116d a85a .6D.w.Z:[...m.Z. 80444c8: 16ed a9a6 c7cb e42e 88d8 5320 b2b2 1615 .......... S.... 80444d8: c657 d148 87c7 c427 769e e925 2911 ce12 W.H...'..v%..).. 80444e8: e392 cbd0 3cc0 19a4 668c 2a3e 92e9 420a .....<...f>*...B 80444f8: a315 ce41 14d2 b604 5504 a121 0f4e 7d38 ..A......U!.N.8} 8044508: 495a 769b 4094 dce7 11ed b5b9 5299 dd41 ZI.v.@.......RA. 8044518: b9da 0cc9 515a 1dea c323 97fc 6334 25a2 ....ZQ..#...4c.% 8044528: 7a21 44cb 0d59 975b 7063 2952 fd85 251a !z.DY.[.cpR)...% 8044538: 79b1 f66b f635 99b5 1d17 5888 f397 1ba9 .yk.5......X.... 8044548: 9c5c 4416 c52b c159 15b0 ee1e 6b82 bf91 \..D+.Y......k.. 8044558: 7e2d 7b02 ffe6 a607 05f6 7b76 faf4 9524 -~.{......v{..$. 8044568: f5f6 207a e8cc e8ee f300 e661 ff3b d2dd ..z ......a.;... 8044578: d89f be16 2f74 7f96 d423 4daa e9e8 e82e ....t/..#..M.... 8044588: a32e ef1d 47f6 2a5f 5056 09b5 a898 1941 .....G_*VP....A. 8044598: 1d48 29e0 3497 ea3d 3ce8 5660 65cc 09fc H..).4=..<`V.e.. 80445a8: 751e f6ae 2b1d d8c9 eb3d 4876 7739 8f5e .u...+..=.vH9w^. 80445b8: b0dd d013 b775 706f c26b 5dd2 361c 3163 ....u.opk..].6c1 80445c8: b23f ba31 dd72 d0fe 65f6 452c b36c 913f ?.1.r....e,El.?. 80445d8: 2fe6 7cb2 45f4 521f 285f b1a8 9c62 6123 ./.|.E.R_(..b.#a 80445e8: f7ba 7ae2 fda8 fb66 dd96 39e2 5f6c ebd3 ...z..f....9l_.. 80445f8: e1cf 5a8d 9f51 99bc be3f f23b f486 27f4 ...ZQ...?.;....' 8044608: 1c52 06c3 036b cf1f 2555 7db0 7763 ff05 R...k...U%.}cw.. 8044618: 381b 1d3d b841 d7c6 ae4f 5027 9d23 79fd .8=.A...O.'P#..y 8044628: 1f6d 10d6 a826 94b0 4a29 64c0 b39d 9f24 m...&...)J.d..$. 8044638: 302b 1295 ecde 2f7d c50c 51bd 6e6f 95c0 +0....}/...Qon.. 8044648: 18ff 29ad c0af c7f7 6677 87fe 64b5 3929 ...)....wf...d)9 8044658: 76fc d0d8 bfdb ff50 1100 94f1 524b 0009 .v....P.....KR.. 8044668: 4800 . 08044669 : 8044669: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 8044679: 0d0a 000a 0000 2800 ....... 08044680 : 8044680: 4c28 0804 dfe6 0803 dff2 0803 2a04 0000 (L...........*.. 8044690: 0001 0000 .... 08044694 : 8044694: 752f 7370 685f 7369 6f74 7972 682e 6d74 /ups_history.htm 80446a4: 006c 0000 5448 5054 312f 312e 3220 3030 l...HTTP/1.1 200 80446b4: 4f20 0d4b 530a 7265 6576 3a72 6c20 4977 OK..Server: lwI 80446c4: 2f50 2e31 2e33 2031 6828 7474 3a70 2f2f P/1.3.1 (http:// 80446d4: 6173 6176 6e6e 6861 6e2e 6e6f 6e67 2e75 savannah.nongnu. 80446e4: 726f 2f67 7270 6a6f 6365 7374 6c2f 6977 org/projects/lwi 80446f4: 2970 0a0d 6f43 746e 6e65 2d74 654c 676e p)..Content-Leng 8044704: 6874 203a 3131 3337 0a0d 6f43 6e6e 6365 th: 1173..Connec 8044714: 6974 6e6f 203a 6c43 736f 0d65 430a 6e6f tion: Close..Con 8044724: 6574 746e 742d 7079 3a65 7420 7865 2f74 tent-type: text/ 8044734: 7468 6c6d 0a0d 6f43 746e 6e65 2d74 6e45 html..Content-En 8044744: 6f63 6964 676e 203a 7a67 7069 0a0d 0a0d coding: gzip.... 8044754: 8b1f 0008 0000 0000 0a04 568d 6edd 44dc ...........V.n.D 8044764: 7e14 d715 d154 8a5a 59bd 41b8 ed64 850a .~..T.Z..Y.Ad... 8044774: 545e 1042 1429 55c1 b634 aecf 99a7 bb1d ^TB.)..U4....... 8044784: b1e3 5b37 9482 14a4 8a2e 9a54 540b a121 ..7[......T..T!. 8044794: 3caa 0441 28aa 6d3f 615f 46fc 999c 17b1 ...h 80447e4: ba1d f95f 3f77 77f6 59f2 2441 198d 4eb8 .._.w?.w.YA$...N 80447f4: 7392 1c09 ee59 0edc 9d21 c742 c9c4 420c .s..Y...!.B....B 8044804: a6b7 2f30 2172 747b 9a73 2cca a14c 09a6 ..0/r!{ts..,L... 8044814: 66f8 49b3 9539 3094 4cbf 8308 b470 2339 .f.I9..0.L..p.9# 8044824: 7487 cd56 fb96 04aa 3661 5504 5b86 42a8 .tV.....a6.U.[.B 8044834: c952 5220 373f 9b0f f563 9d5a 7fab e69c R. R?7..c.Z..... 8044844: bd44 4e69 539a 7ffc 4782 9aaf 8e27 a67a D.iN.S...G..'.z. 8044854: aa9e e3e7 a5a1 331e 0fca 4c9c 24c0 6774 .......3...L.$tg 8044864: f284 2920 d74b c011 b742 0b94 6506 2006 .. )K...B....e. 8044874: 7651 0899 485a 2e47 740a c240 1ca1 23de Qv..ZHG..t@....# 8044884: b135 aea7 8a53 7424 ce45 b820 2257 d0f1 5...S.$tE. .W".. 8044894: e39e 86c2 ce31 45d3 4e34 ed69 8c24 6594 ....1..E4Ni.$..e 80448a4: 72e8 c752 3844 e3f6 30a7 1521 dd93 4276 .rR.D8...0!...vB 80448b4: 210f 65f5 a05e 4ba4 be3c 0896 5ec2 6345 .!.e^..K<....^Ec 80448c4: 9ad2 794e 870a 4e81 0621 ead5 f960 d734 ..Ny...N!...`.4. 80448d4: 10b6 a1fc ee98 e3bf cf78 6875 3e8a af03 ........x.uh.>.. 80448e4: 8a7c 6af9 2b49 f1d6 71a3 459d b4b8 7ad4 |..jI+...q.E...z 80448f4: 6111 56c8 8e2a 73d4 8e75 3f91 ff57 97aa .a.V*..su..?W... 8044904: 69cd dc73 b63c 35da 9f7d c107 2924 969f .is.<..5}...$).. 8044914: ded6 fd48 6c8a 2398 7d64 fea3 7f52 57ab ..H..l.#d}..R..W 8044924: d9ab 9f28 1de4 33cb baf5 0ef9 7a93 ba8c ..(....3.....z.. 8044934: 9bce 75ef 5762 5533 b945 d19f e652 7162 ...ubW3UE...R.bq 8044944: 3c31 9124 46b4 f660 f2e1 88bf 8561 6115 1<$..F`.....a..a 8044954: d6c3 814b 3586 0462 6fc3 5762 3156 6406 ..K..5b..obWV1.d 8044964: 1182 f369 089d 1220 aaf6 33f8 d352 1629 ..i... ....3R.). 8044974: ce43 de07 0f76 260e 3d0f 7381 8a41 13a2 C...v..&.=.sA... 8044984: 16d7 8a0d 46cb cc17 0eba 48c5 07da d489 .....F.....H.... 8044994: e0c5 280b 9c8b c697 b1bf 3239 9af6 12d5 ...(......92.... 80449a4: f61f b5bc c3a0 2a20 1697 52b3 65e8 8607 ...... *...R.e.. 80449b4: 7b22 431f d675 0a3c 531c 6f59 e39b 4b00 "{.Cu.<..SYo...K 80449c4: bb28 834c 54c9 d6fa 39d0 77ea 5964 784d (.L..T...9.wdYMx 80449d4: 3cd6 535e 1fdc a508 ea87 444f f9c6 a255 .<^S......OD..U. 80449e4: aed0 07e6 230b c544 55e9 ef84 f718 fa93 .....#D..U...... 80449f4: 3d45 2d5d 37f2 12f5 f5a1 8116 808c 6c46 E=]-.7........Fl 8044a04: 96ea 8572 17f6 9f5a 3921 2d59 0ceb 5179 ..r...Z.!9Y-..yQ 8044a14: 869a 8ea8 50d8 1687 a657 4ac3 1bdd 764c .....P..W..J..Lv 8044a24: 945a a7ee 1244 c34c dcd0 afe8 294e 977e Z...D.L.....N)~. 8044a34: d1d8 ab65 82b1 46fd 1b37 270d 847d 6c50 ..e....F7..'}.Pl 8044a44: b731 714c b92c 153f a579 493b 495c f399 1.Lq,.?.y.;I\I.. 8044a54: 9f2e e378 dbe8 f5b6 4eb8 13ce 9346 d083 ..x......N..F... 8044a64: 829d bbbc b7bb a64b 1830 c879 1657 3b84 ......K.0.y.W..; 8044a74: 5044 67e2 4d34 6381 13f7 d615 d1cd 2306 DP.g4M.c.......# 8044a84: abf7 a35c 291b 3ed0 20ab d672 54d6 a808 ..\..).>. r..T.. 8044a94: 553b 69d7 4542 5c42 d3d2 7d47 a641 9b94 ;U.iBEB\..G}A... 8044aa4: 4372 2983 aa2f a37e b5b6 549a e042 4244 rC.)/.~....TB.DB 8044ab4: 1c4a 254f 807d 7c5d 46e4 3c1b 8b2e a1ed J.O%}.]|.F.<.... 8044ac4: 58fd 7557 3528 a315 8a33 7f8d e96b 899f .XWu(5..3...k... 8044ad4: baff e451 2138 f2d6 ac4d 6df2 18fd b2f6 ..Q.8!..M..m.... 8044ae4: e855 7d29 cb87 cdc1 06c1 4626 2f6e b0bd U.)}......&Fn/.. 8044af4: 2f5b 63d0 c76b 664e daef 0b80 d993 a5a3 [/.ck.Nf........ 8044b04: 6deb 5b6a ae0c 418e e821 888c 4f85 0d79 .mj[...A!....Oy. 8044b14: 4242 c36a b29e a49c 035d a1ee 662c fc79 BBj.....]...,fy. 8044b24: 5e29 a6b5 bbf6 3274 b7a5 e9b4 6121 5acc )^....t2....!a.Z 8044b34: 69be 173f ca88 bdba 5893 0137 974d e8fe .i?......X7.M... 8044b44: c5fc 5f6c 8afb eb1d 7605 4783 74ba f0cd ..l_.....v.G.t.. 8044b54: 6d3f c47e e48e ecec d97d d6b9 0f15 4c72 ?m~.....}.....rL 8044b64: 6328 9f08 5676 745e 3bb9 7334 8d7c 80a7 (c..vV^t.;4s|... 8044b74: 4979 7c5c 5c0a 15cb f2f5 f238 6f36 dc0e yI\|.\....8.6o.. 8044b84: 5e3e 20bd 07e7 c0b0 c17a c3b7 e2a4 b938 >^. ....z.....8. 8044b94: b070 f780 1c0d 0d1d 9c20 f0e3 e7cf d401 p....... ....... 8044ba4: 6f88 bb6f efd6 108a 6402 c9d8 a453 6080 .oo......d..S..` 8044bb4: d19e db24 2016 c12b d1dd 6e07 f218 835b ..$.. +....n..[. 8044bc4: c69e 721e d1de 135b 8156 6de7 18de 1f79 ...r..[.V..m..y. 8044bd4: 39d5 9d4d 6fad e3fb 3ccc ff1c 2503 ce74 .9M..o...<...%t. 8044be4: 4891 000a 0000 0000 .H...... 08044bec : 8044bec: 0000 0000 c857 0803 c867 0803 053c 0000 ....W...g...<... 8044bfc: 0001 0000 .... 08044c00 : 8044c00: c32c 0803 cda3 0803 cdb3 0803 1233 0000 ,...........3... 8044c10: 0001 0000 .... 08044c14 : 8044c14: c340 0803 3c66 0804 3c72 0804 04f6 0000 @...f<..r<...... 8044c24: 0001 0000 .... 08044c28 : 8044c28: 4c14 0804 c017 0803 c023 0803 02f6 0000 .L......#....... 8044c38: 0001 0000 .... 08044c3c : 8044c3c: 4bec 0804 4168 0804 4178 0804 04f1 0000 .K..hA..xA...... 8044c4c: 0001 0000 .... 08044c50 : 8044c50: c354 0803 b5fc 0803 b608 0803 0a0f 0000 T............... 8044c60: 0001 0000 5448 5054 312f 302e 3220 3030 ....HTTP/1.0 200 8044c70: 4f20 0d4b 430a 6e6f 6574 746e 542d 7079 OK..Content-Typ 8044c80: 3a65 6574 7478 682f 6d74 0d6c 0d0a 000a e:text/html..... 8044c90: 227b 4341 3a22 0022 2c22 4422 2243 223a {"AC":".","DC":" 8044ca0: 2200 222c 6e69 665f 6572 2271 223a 2200 .","in_freq":"." 8044cb0: 222c 756f 5f74 7266 7165 3a22 0022 2c22 ,"out_freq":".", 8044cc0: 7022 7277 3a22 0022 2c22 6222 7461 635f "pwr":".","bat_c 8044cd0: 7061 3a22 0022 2c22 6922 6e6e 7265 745f ap":".","inner_t 8044ce0: 6d65 2270 223a 2200 222c 6162 5f74 6974 emp":".","bat_ti 8044cf0: 656d 6c5f 6665 2274 223a 2200 222c 6964 me_left":".","di 8044d00: 2231 223a 2200 222c 6f72 2231 223a 2200 1":".","ro1":"." 8044d10: 222c 6f72 2232 223a 2200 222c 5f6d 6c61 ,"ro2":".","m_al 8044d20: 7261 226d 223a 2200 222c 5f75 6c61 7261 arm":".","u_alar 8044d30: 226d 223a 2200 222c 656e 7374 7465 6974 m":".","netsetti 8044d40: 676e 5f73 6863 6e61 6567 2264 223a 2200 ngs_changed":"." 8044d50: 007d 227b 6572 6461 635f 6d6f 756d 696e }.{"read_communi 8044d60: 7974 3a22 0022 2c22 7722 6972 6574 635f ty":".","write_c 8044d70: 6d6f 756d 696e 7974 3a22 0022 2c22 6d22 ommunity":".","m 8044d80: 6e61 6761 7265 5049 3a22 0022 2c22 6d22 anagerIP":".","m 8044d90: 6e61 6761 7265 5049 2232 223a 2200 222c anagerIP2":"."," 8044da0: 616d 616e 6567 4972 3350 3a22 0022 2c22 managerIP3":".", 8044db0: 6d22 6e61 6761 7265 5049 2234 223a 2200 "managerIP4":"." 8044dc0: 222c 616d 616e 6567 4972 3550 3a22 0022 ,"managerIP5":". 8044dd0: 2c22 6922 6170 6464 2272 223a 2200 222c ","ipaddr":"."," 8044de0: 7767 3a22 0022 2c22 6d22 7361 226b 223a gw":".","mask":" 8044df0: 2200 222c 6864 7063 3a22 2c00 6122 7475 .","dhcp":.,"aut 8044e00: 2268 003a 222c 7372 735f 7265 6576 2272 h":.,"rs_server" 8044e10: 223a 2200 222c 7372 705f 726f 2274 223a :".","rs_port":" 8044e20: 2200 222c 7372 705f 6477 3a22 0022 2c22 .","rs_pwd":".", 8044e30: 7222 5f73 656b 2279 223a 2200 222c 7372 "rs_key":".","rs 8044e40: 655f 616e 6c62 6465 3a22 2c00 6422 7461 _enabled":.,"dat 8044e50: 2265 223a 2200 222c 6974 656d 3a22 0022 e":".","time":". 8044e60: 2c22 6e22 7074 3a22 0022 2c22 6e22 7074 ","ntp":".","ntp 8044e70: 6573 7672 7069 3a22 0022 2c22 7522 6374 servip":".","utc 8044e80: 3a22 0022 2c22 7522 6d74 3a22 0022 2c22 ":".","utm":".", 8044e90: 6c22 7361 7374 6e79 7463 6d69 2265 223a "lastsynctime":" 8044ea0: 7b00 7522 7470 6d69 2265 223a 2200 222c .{"uptime":"."," 8044eb0: 6f6d 6564 226c 223a 2200 222c 7270 646f model":".","prod 8044ec0: 7461 2265 223a 2200 222c 7766 6576 7372 ate":".","fwvers 8044ed0: 6f69 226e 223a 2200 222c 616d 6163 6464 ion":".","macadd 8044ee0: 2272 223a 2200 222c 6573 6e72 226f 223a r":".","serno":" 8044ef0: 2200 222c 776f 656e 2272 223a 2200 222c .","owner":"."," 8044f00: 7973 4c73 636f 7461 6f69 226e 223a 2200 sysLocation":"." 8044f10: 222c 6f63 6d6d 6e65 2274 223a 2200 222c ,"comment":"."," 8044f20: 7075 5f73 6f6d 6564 226c 223a 2200 222c ups_model":"."," 8044f30: 7075 5f73 7766 6576 7372 6f69 226e 223a ups_fwversion":" 8044f40: 4800 5454 2f50 2e31 2031 3032 2030 4b4f .HTTP/1.1 200 OK 8044f50: 0a0d 6f43 746e 6e65 2d74 7954 6570 743a ..Content-Type:t 8044f60: 7865 2f74 7468 6c6d 0a0d 0a0d 7b00 7022 ext/html.....{"p 8044f70: 6761 2265 203a 005b 6925 5d00 222c 6170 age": [.%i.],"pa 8044f80: 6567 2273 223a 5200 6265 6f6f 5474 7361 ges":".RebootTas 8044f90: 006b 6374 6970 5f70 6874 6572 6461 0000 k.tcpip_thread.. 08044fa0 : 8044fa0: 0004 0006 000c 0005 0019 0010 0006 0008 ................ 8044fb0: 0014 000a 001e 0032 0005 0009 0032 0019 ......2.....2... 08044fc0 : 8044fc0: 001c 0020 0094 001c 0010 0010 002c 0014 .. .........,... 8044fd0: 0014 0010 0020 0010 0024 0080 0010 0614 .... ...$....... 08044fe0 : 8044fe0: f6c4 2000 f6cc 2000 f6bc 2000 f6d0 2000 ... ... ... ... 08044ff0 : 8044ff0: 0201 0403 0605 0707 0707 0707 0307 ............. 08044ffd : 8044ffd: 0603 180c 6030 ff78 ....0`x 08045004 : 8045004: ffff ffff .... 08045008 : 8045008: 0000 0000 .... 0804500c : 804500c: 0000 0000 .... 08045010 : 8045010: 4395 0803 3e49 0803 43d9 0803 3f5d 0803 .C..I>...C..]?.. 8045020: 0001 0000 .... 08045024 : 8045024: 0774 2000 0774 2000 t.. t.. 0804502c : 804502c: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 804503c: 0002 0001 515c 0804 5284 0804 ....\Q...R.. 08045048 : 8045048: 5854 0804 541c 0804 073c 2000 58f8 0804 TX...T..<.. .X.. 8045058: 521c 0804 53ec 0804 5648 0804 51b8 0804 .R...S..HV...Q.. 08045068 : 8045068: 07a4 2000 07a4 2000 07a4 2000 07a4 2000 ... ... ... ... 8045078: 07a4 2000 07a4 2000 07a4 2000 07a4 2000 ... ... ... ... 8045088: 07a4 2000 07a4 2000 07a4 2000 07a4 2000 ... ... ... ... 8045098: 07a4 2000 ... 0804509c : 804509c: 0002 0000 0000 0000 0000 0000 0000 0000 ................ 80450ac: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80450bc: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80450cc: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80450dc: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80450ec: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80450fc: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 804510c: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 804511c: 0000 0000 .... 08045120 : 8045120: 5146 4e44 752d 6b6e 0000 0000 FQDN-unk.... 0804512c : 804512c: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 0804513c : 804513c: 3a9d 0803 3abd 0803 39eb 0803 39ef 0803 .:...:...9...9.. 804514c: 0001 0000 .... 08045150 : 8045150: 0000 0000 .... 08045154 : 8045154: 0001 0000 0002 0000 ........ 0804515c : 804515c: 0001 0000 .... 08045160 : 8045160: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 8045170: 0002 0001 5850 0804 5644 0804 ....PX..DV.. 0804517c : 804517c: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 804518c: 0005 0000 0006 0000 0007 0000 000b 0000 ................ 0804519c : 804519c: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 80451ac: 0002 0008 517c 0804 5048 0804 ....|Q..HP.. 080451b8 : 80451b8: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 80451c8: 0002 001c 573c 0804 55d4 0804 ....: 80451d4: 4309 0803 3d41 0803 39eb 0803 39ef 0803 .C..A=...9...9.. 80451e4: 0001 0000 .... 080451e8 : 80451e8: 5328 0804 5328 0804 5328 0804 5328 0804 (S..(S..(S..(S.. 80451f8: 5328 0804 5328 0804 5328 0804 (S..(S..(S.. 08045204 : 8045204: 0002 0000 .... 08045208 : 8045208: 5270 0804 5270 0804 5270 0804 5270 0804 pR..pR..pR..pR.. 8045218: 0758 2000 X.. 0804521c : 804521c: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 804522c: 0002 001a 54e8 0804 5378 0804 .....T..xS.. 08045238 : 8045238: 421d 0803 3ad1 0803 3b91 0803 39ef 0803 .B...:...;...9.. 8045248: 0001 0000 .... 0804524c : 804524c: 0001 0000 0002 0000 ........ 08045254 : 8045254: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 8045264: 0002 0004 512c 0804 540c 0804 ....,Q...T.. 08045270 : 8045270: 3de5 0803 3e11 0803 39eb 0803 39ef 0803 .=...>...9...9.. 8045280: 0001 0000 .... 08045284 : 8045284: 530c 0804 .S.. 08045288 : 8045288: 0002 0000 0000 0000 0000 0000 0000 0000 ................ 8045298: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80452a8: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80452b8: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80452c8: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80452d8: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80452e8: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80452f8: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8045308: 0000 0000 .... 0804530c : 804530c: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 804531c: 0002 0003 546c 0804 5564 0804 ....lT..dU.. 08045328 : 8045328: 39f1 0803 4675 0803 4181 0803 4421 0803 .9..uF...A..!D.. 8045338: 0001 0000 .... 0804533c : 804533c: 51d4 0804 51d4 0804 51d4 0804 51d4 0804 .Q...Q...Q...Q.. 804534c: 51d4 0804 51d4 0804 51d4 0804 51d4 0804 .Q...Q...Q...Q.. 804535c: 51d4 0804 51d4 0804 51d4 0804 51d4 0804 .Q...Q...Q...Q.. 804536c: 08a4 2000 51d4 0804 51d4 0804 ... .Q...Q.. 08045378 : 8045378: 5820 0804 5820 0804 5820 0804 5820 0804 X.. X.. X.. X.. 8045388: 5820 0804 5820 0804 5820 0804 5820 0804 X.. X.. X.. X.. 8045398: 5820 0804 5820 0804 5820 0804 5820 0804 X.. X.. X.. X.. 80453a8: 5820 0804 5820 0804 5820 0804 5820 0804 X.. X.. X.. X.. 80453b8: 5820 0804 5820 0804 5820 0804 5820 0804 X.. X.. X.. X.. 80453c8: 5820 0804 5820 0804 5820 0804 5820 0804 X.. X.. X.. X.. 80453d8: 5820 0804 5820 0804 X.. X.. 080453e0 : 80453e0: 0004 0000 .... 080453e4 : 80453e4: 513c 0804 0944 2000 : 80453ec: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 80453fc: 0002 000f 5598 0804 533c 0804 .....U..: 8045408: 0000 0000 .... 0804540c : 804540c: 0a08 2000 0a08 2000 0a08 2000 0a08 2000 ... ... ... ... 0804541c : 804541c: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 804542c: 0002 0002 5154 0804 53e4 0804 ....TQ...S.. 08045438 : 8045438: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8045448: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 8045458: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 8045468: 000d 0000 .... 0804546c : 804546c: 0001 0000 0002 0000 0003 0000 ............ 08045478 : 8045478: 08cc 2000 08cc 2000 08cc 2000 08cc 2000 ... ... ... ... 8045488: 08cc 2000 ... 0804548c : 804548c: 5238 0804 5238 0804 5238 0804 5238 0804 8R..8R..8R..8R.. 804549c: 5238 0804 5238 0804 5238 0804 5238 0804 8R..8R..8R..8R.. 80454ac: 5238 0804 5238 0804 5238 0804 5238 0804 8R..8R..8R..8R.. 80454bc: 5238 0804 5238 0804 5238 0804 5238 0804 8R..8R..8R..8R.. 80454cc: 5238 0804 5238 0804 5238 0804 08f8 2000 8R..8R..8R..... 80454dc: 0960 2000 0720 2000 5238 0804 `.. .. 8R.. 080454e8 : 80454e8: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 80454f8: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 8045508: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 8045518: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 8045528: 0011 0000 0012 0000 0013 0000 0014 0000 ................ 8045538: 0015 0000 0016 0000 0017 0000 0018 0000 ................ 8045548: 0019 0000 001a 0000 ........ 08045550 : 8045550: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8045560: 0005 0000 .... 08045564 : 8045564: 0918 2000 0918 2000 0918 2000 ... ... ... 08045570 : 8045570: 0874 2000 0874 2000 0874 2000 0874 2000 t.. t.. t.. t.. 8045580: 0874 2000 t.. 08045584 : 8045584: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8045594: 0005 0000 .... 08045598 : 8045598: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 80455a8: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 80455b8: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 80455c8: 000d 0000 000e 0000 000f 0000 ............ 080455d4 : 80455d4: 5010 0804 5010 0804 5010 0804 5010 0804 .P...P...P...P.. 80455e4: 5010 0804 5010 0804 5010 0804 5010 0804 .P...P...P...P.. 80455f4: 5010 0804 5010 0804 5010 0804 5010 0804 .P...P...P...P.. 8045604: 5010 0804 5010 0804 5010 0804 5010 0804 .P...P...P...P.. 8045614: 5010 0804 5010 0804 5010 0804 5010 0804 .P...P...P...P.. 8045624: 5010 0804 5010 0804 5010 0804 5010 0804 .P...P...P...P.. 8045634: 5010 0804 5010 0804 5010 0804 5010 0804 .P...P...P...P.. 08045644 : 8045644: 519c 0804 .Q.. 08045648 : 8045648: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 8045658: 0002 0005 5550 0804 5208 0804 ....PU...R.. 08045664 : 8045664: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 8045674: 0002 000d 5438 0804 5068 0804 ....8T..hP.. 08045680 : 8045680: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 8045690: 0002 0016 57c8 0804 58a0 0804 .....W...X.. 0804569c : 804569c: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 80456ac: 0002 0002 524c 0804 5024 0804 ....LR..$P.. 080456b8 : 80456b8: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 80456c8: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 80456d8: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 80456e8: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 80456f8: 0011 0000 0012 0000 0013 0000 0014 0000 ................ 8045708: 0015 0000 0016 0000 0017 0000 ............ 08045714 : 8045714: 776c 5049 0800 lwIP. 08045719 : 8045719: 0008 e300 ... 0804571c : 804571c: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 804572c: 0002 0005 588c 0804 5478 0804 .....X..xT.. 08045738 : 8045738: 0000 0000 .... 0804573c : 804573c: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 804574c: 0005 0000 0006 0000 0008 0000 0009 0000 ................ 804575c: 000a 0000 000b 0000 000c 0000 000d 0000 ................ 804576c: 000e 0000 000f 0000 0010 0000 0011 0000 ................ 804577c: 0012 0000 0013 0000 0014 0000 0015 0000 ................ 804578c: 0016 0000 0018 0000 0019 0000 001a 0000 ................ 804579c: 001b 0000 001c 0000 001d 0000 001e 0000 ................ 080457ac : 80457ac: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 80457bc: 0005 0000 0006 0000 0007 0000 ............ 080457c8 : 80457c8: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 80457d8: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 80457e8: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 80457f8: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 8045808: 0011 0000 0012 0000 0013 0000 0014 0000 ................ 8045818: 0015 0000 0016 0000 ........ 08045820 : 8045820: 3c19 0803 3c45 0803 39eb 0803 39ef 0803 .<..E<...9...9.. 8045830: 0001 0000 .... 08045834 : 8045834: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 8045844: 0002 0002 08ec 2000 5914 0804 ....... .Y.. 08045850 : 8045850: 0001 0000 .... 08045854 : 8045854: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 8045864: 0002 0007 57ac 0804 51e8 0804 .....W...Q.. 08045870 : 8045870: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 8045880: 0002 0005 5584 0804 5570 0804 .....U..pU.. 0804588c : 804588c: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 804589c: 0005 0000 .... 080458a0 : 80458a0: 07cc 2000 07cc 2000 07cc 2000 07cc 2000 ... ... ... ... 80458b0: 07cc 2000 07cc 2000 07cc 2000 07cc 2000 ... ... ... ... 80458c0: 07cc 2000 07cc 2000 07cc 2000 07cc 2000 ... ... ... ... 80458d0: 07cc 2000 07cc 2000 07cc 2000 07cc 2000 ... ... ... ... 80458e0: 07cc 2000 07cc 2000 07cc 2000 07cc 2000 ... ... ... ... 80458f0: 07cc 2000 07cc 2000 ... ... 080458f8 : 80458f8: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 8045908: 0002 0017 56b8 0804 548c 0804 .....V...T.. 08045914 : 8045914: 5160 0804 5a2c 0804 `Q..,Z.. 0804591c : 804591c: 0001 0000 0003 0000 0006 0000 0001 0000 ................ 0804592c : 804592c: 0000 0000 .... 08045930 : 8045930: 7570 6c62 6369 ff00 public. 08045937 : 8045937: ffff ffff ffff ...... 0804593d : 804593d: 0000 0000 0000 7445 5f68 6669 2000 7325 ......Eth_if. %s 804594d: 0d0a 4400 4348 4350 696c 6e65 0074 6577 ...DHCPClient.we 804595d: 5262 6965 696e 0074 6552 6e69 7469 6557 bReinit.ReinitWe 804596d: 0062 1800 b.. 08045970 : 8045970: a318 0000 .... 08045974 : 8045974: 0001 0000 .... 08045978 : 8045978: 59c8 0804 .Y.. 0804597c : 804597c: 5a48 0804 HZ.. 08045980 : 8045980: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8045990: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 80459a0: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 80459b0: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 80459c0: 0011 0000 0012 0000 ........ 080459c8 : 80459c8: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 80459d8: 0002 0001 5974 0804 5ac0 0804 ....tY...Z.. 080459e4 : 80459e4: 5aac 0804 5aac 0804 5aac 0804 5aac 0804 .Z...Z...Z...Z.. 80459f4: 5aac 0804 5aac 0804 5aac 0804 5aac 0804 .Z...Z...Z...Z.. 8045a04: 5aac 0804 5aac 0804 5aac 0804 5aac 0804 .Z...Z...Z...Z.. 8045a14: 5aac 0804 5aac 0804 5aac 0804 5aac 0804 .Z...Z...Z...Z.. 8045a24: 5aac 0804 5aac 0804 .Z...Z.. 08045a2c : 8045a2c: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 8045a3c: 0002 0001 5a64 0804 5a6c 0804 ....dZ..lZ.. 08045a48 : 8045a48: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 8045a58: 0002 0001 5a68 0804 5978 0804 ....hZ..xY.. 08045a64 : 8045a64: 0001 0000 .... 08045a68 : 8045a68: 0003 0000 .... 08045a6c : 8045a6c: 5a70 0804 pZ.. 08045a70 : 8045a70: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 8045a80: 0002 0001 5970 0804 5a8c 0804 ....pY...Z.. 08045a8c : 8045a8c: 5ac8 0804 .Z.. 08045a90 : 8045a90: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 8045aa0: 0002 0012 5980 0804 59e4 0804 .....Y...Y.. 08045aac : 8045aac: 7fb1 0803 7f71 0803 80cd 0803 7ec5 0803 ....q........~.. 8045abc: 0001 0000 .... 08045ac0 : 8045ac0: 5a90 0804 .Z.. 08045ac4 : 8045ac4: 038f 0000 .... 08045ac8 : 8045ac8: 39e3 0803 39e9 0803 39eb 0803 39ef 0803 .9...9...9...9.. 8045ad8: 0002 0001 5ac4 0804 597c 0804 3025 6432 .....Z..|Y..%02d 8045ae8: 252e 3230 2e64 3025 6432 2520 3230 3a64 .%02d.%02d %02d: 8045af8: 3025 6432 253a 3230 0064 6425 252e 2e64 %02d:%02d.%d.%d. 8045b08: 6425 2520 3a64 6425 253a 2064 0d0a 3b00 %d %d:%d:%d ...; 8045b18: 3b3b 3b00 3b3b 3254 4b4f 3b3b 7b00 7322 ;;.;;;T2OK;;.{"s 8045b28: 7265 6f6e 3a22 0022 2c22 6422 6368 2270 erno":".","dhcp" 8045b38: 223a 2200 222c 7069 6461 7264 7365 2273 :".","ipaddress" 8045b48: 223a 2200 222c 6167 6574 6177 2279 223a :".","gateway":" 8045b58: 2200 6573 6e72 226f 2200 6864 7063 0022 ."serno"."dhcp". 8045b68: 6922 6170 6464 6572 7373 0022 6722 7461 "ipaddress"."gat 8045b78: 7765 7961 0022 6d22 7361 226b 7500 7064 eway"."mask".udp 8045b88: 6e5f 7465 6573 7474 6e69 7367 745f 7361 _netsettings_tas 8045b98: 006b 0000 666e 0000 6e69 7469 0079 0000 k...nf..inity... 8045ba8: 6e61 0000 4241 4443 4645 0000 6261 6463 an..ABCDEF..abcd 8045bb8: 6665 0000 3130 3332 3534 3736 3938 0000 ef..0123456789.. 8045bc8: 0043 0000 4f50 4953 0058 0000 0000 0000 C...POSIX....... 8045bd8: 002e 0000 .... 08045bdc <_init>: 8045bdc: b5f8 push {r3, r4, r5, r6, r7, lr} 8045bde: bf00 nop 8045be0: bcf8 pop {r3, r4, r5, r6, r7} 8045be2: bc08 pop {r3} 8045be4: 469e mov lr, r3 8045be6: 4770 bx lr 08045be8 <_fini>: 8045be8: b5f8 push {r3, r4, r5, r6, r7, lr} 8045bea: bf00 nop 8045bec: bcf8 pop {r3, r4, r5, r6, r7} 8045bee: bc08 pop {r3} 8045bf0: 469e mov lr, r3 8045bf2: 4770 bx lr