../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 000249c4 08020188 08020188 00008188 2**3 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .ARM 00000008 08044b4c 08044b4c 0002cb4c 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .init_array 00000004 08044b54 08044b54 0002cb54 2**2 CONTENTS, ALLOC, LOAD, DATA 4 .fini_array 00000004 08044b58 08044b58 0002cb58 2**2 CONTENTS, ALLOC, LOAD, DATA 5 .data 00000ab4 20000000 08044b5c 00030000 2**2 CONTENTS, ALLOC, LOAD, DATA 6 .fill 0007a9ec 08045610 08045610 00035610 2**0 CONTENTS, ALLOC, LOAD, DATA 7 .crc 00000004 080bfffc 080bfffc 000afffc 2**2 CONTENTS, ALLOC, LOAD, DATA 8 .bss 00012e88 20000ab4 08045610 000b0ab4 2**2 ALLOC 9 ._user_heap_stack 00000200 2001393c 08058498 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 0004f4b1 00000000 00000000 000b002f 2**0 CONTENTS, READONLY, DEBUGGING 13 .debug_abbrev 0000c86d 00000000 00000000 000ff4e0 2**0 CONTENTS, READONLY, DEBUGGING 14 .debug_loc 00025b9a 00000000 00000000 0010bd4d 2**0 CONTENTS, READONLY, DEBUGGING 15 .debug_aranges 000030b0 00000000 00000000 001318e8 2**3 CONTENTS, READONLY, DEBUGGING 16 .debug_ranges 000039f8 00000000 00000000 00134998 2**3 CONTENTS, READONLY, DEBUGGING 17 .debug_macro 00020d37 00000000 00000000 00138390 2**0 CONTENTS, READONLY, DEBUGGING 18 .debug_line 000260fe 00000000 00000000 001590c7 2**0 CONTENTS, READONLY, DEBUGGING 19 .debug_str 00081dbc 00000000 00000000 0017f1c5 2**0 CONTENTS, READONLY, DEBUGGING 20 .comment 00000030 00000000 00000000 00200f81 2**0 CONTENTS, READONLY 21 .debug_frame 00008344 00000000 00000000 00200fb4 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: f644 3034 movw r0, #19252 ; 0x4b34 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: f644 3034 movw r0, #19252 ; 0x4b34 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 <__aeabi_fmul>: 8020e40: f04f 0cff mov.w ip, #255 ; 0xff 8020e44: ea1c 52d0 ands.w r2, ip, r0, lsr #23 8020e48: bf1e ittt ne 8020e4a: ea1c 53d1 andsne.w r3, ip, r1, lsr #23 8020e4e: ea92 0f0c teqne r2, ip 8020e52: ea93 0f0c teqne r3, ip 8020e56: d06f beq.n 8020f38 <__aeabi_fmul+0xf8> 8020e58: 441a add r2, r3 8020e5a: ea80 0c01 eor.w ip, r0, r1 8020e5e: 0240 lsls r0, r0, #9 8020e60: bf18 it ne 8020e62: ea5f 2141 movsne.w r1, r1, lsl #9 8020e66: d01e beq.n 8020ea6 <__aeabi_fmul+0x66> 8020e68: f04f 6300 mov.w r3, #134217728 ; 0x8000000 8020e6c: ea43 1050 orr.w r0, r3, r0, lsr #5 8020e70: ea43 1151 orr.w r1, r3, r1, lsr #5 8020e74: fba0 3101 umull r3, r1, r0, r1 8020e78: f00c 4000 and.w r0, ip, #2147483648 ; 0x80000000 8020e7c: f5b1 0f00 cmp.w r1, #8388608 ; 0x800000 8020e80: bf3e ittt cc 8020e82: 0049 lslcc r1, r1, #1 8020e84: ea41 71d3 orrcc.w r1, r1, r3, lsr #31 8020e88: 005b lslcc r3, r3, #1 8020e8a: ea40 0001 orr.w r0, r0, r1 8020e8e: f162 027f sbc.w r2, r2, #127 ; 0x7f 8020e92: 2afd cmp r2, #253 ; 0xfd 8020e94: d81d bhi.n 8020ed2 <__aeabi_fmul+0x92> 8020e96: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000 8020e9a: eb40 50c2 adc.w r0, r0, r2, lsl #23 8020e9e: bf08 it eq 8020ea0: f020 0001 biceq.w r0, r0, #1 8020ea4: 4770 bx lr 8020ea6: f090 0f00 teq r0, #0 8020eaa: f00c 4c00 and.w ip, ip, #2147483648 ; 0x80000000 8020eae: bf08 it eq 8020eb0: 0249 lsleq r1, r1, #9 8020eb2: ea4c 2050 orr.w r0, ip, r0, lsr #9 8020eb6: ea40 2051 orr.w r0, r0, r1, lsr #9 8020eba: 3a7f subs r2, #127 ; 0x7f 8020ebc: bfc2 ittt gt 8020ebe: f1d2 03ff rsbsgt r3, r2, #255 ; 0xff 8020ec2: ea40 50c2 orrgt.w r0, r0, r2, lsl #23 8020ec6: 4770 bxgt lr 8020ec8: f440 0000 orr.w r0, r0, #8388608 ; 0x800000 8020ecc: f04f 0300 mov.w r3, #0 8020ed0: 3a01 subs r2, #1 8020ed2: dc5d bgt.n 8020f90 <__aeabi_fmul+0x150> 8020ed4: f112 0f19 cmn.w r2, #25 8020ed8: bfdc itt le 8020eda: f000 4000 andle.w r0, r0, #2147483648 ; 0x80000000 8020ede: 4770 bxle lr 8020ee0: f1c2 0200 rsb r2, r2, #0 8020ee4: 0041 lsls r1, r0, #1 8020ee6: fa21 f102 lsr.w r1, r1, r2 8020eea: f1c2 0220 rsb r2, r2, #32 8020eee: fa00 fc02 lsl.w ip, r0, r2 8020ef2: ea5f 0031 movs.w r0, r1, rrx 8020ef6: f140 0000 adc.w r0, r0, #0 8020efa: ea53 034c orrs.w r3, r3, ip, lsl #1 8020efe: bf08 it eq 8020f00: ea20 70dc biceq.w r0, r0, ip, lsr #31 8020f04: 4770 bx lr 8020f06: f092 0f00 teq r2, #0 8020f0a: f000 4c00 and.w ip, r0, #2147483648 ; 0x80000000 8020f0e: bf02 ittt eq 8020f10: 0040 lsleq r0, r0, #1 8020f12: f410 0f00 tsteq.w r0, #8388608 ; 0x800000 8020f16: 3a01 subeq r2, #1 8020f18: d0f9 beq.n 8020f0e <__aeabi_fmul+0xce> 8020f1a: ea40 000c orr.w r0, r0, ip 8020f1e: f093 0f00 teq r3, #0 8020f22: f001 4c00 and.w ip, r1, #2147483648 ; 0x80000000 8020f26: bf02 ittt eq 8020f28: 0049 lsleq r1, r1, #1 8020f2a: f411 0f00 tsteq.w r1, #8388608 ; 0x800000 8020f2e: 3b01 subeq r3, #1 8020f30: d0f9 beq.n 8020f26 <__aeabi_fmul+0xe6> 8020f32: ea41 010c orr.w r1, r1, ip 8020f36: e78f b.n 8020e58 <__aeabi_fmul+0x18> 8020f38: ea0c 53d1 and.w r3, ip, r1, lsr #23 8020f3c: ea92 0f0c teq r2, ip 8020f40: bf18 it ne 8020f42: ea93 0f0c teqne r3, ip 8020f46: d00a beq.n 8020f5e <__aeabi_fmul+0x11e> 8020f48: f030 4c00 bics.w ip, r0, #2147483648 ; 0x80000000 8020f4c: bf18 it ne 8020f4e: f031 4c00 bicsne.w ip, r1, #2147483648 ; 0x80000000 8020f52: d1d8 bne.n 8020f06 <__aeabi_fmul+0xc6> 8020f54: ea80 0001 eor.w r0, r0, r1 8020f58: f000 4000 and.w r0, r0, #2147483648 ; 0x80000000 8020f5c: 4770 bx lr 8020f5e: f090 0f00 teq r0, #0 8020f62: bf17 itett ne 8020f64: f090 4f00 teqne r0, #2147483648 ; 0x80000000 8020f68: 4608 moveq r0, r1 8020f6a: f091 0f00 teqne r1, #0 8020f6e: f091 4f00 teqne r1, #2147483648 ; 0x80000000 8020f72: d014 beq.n 8020f9e <__aeabi_fmul+0x15e> 8020f74: ea92 0f0c teq r2, ip 8020f78: d101 bne.n 8020f7e <__aeabi_fmul+0x13e> 8020f7a: 0242 lsls r2, r0, #9 8020f7c: d10f bne.n 8020f9e <__aeabi_fmul+0x15e> 8020f7e: ea93 0f0c teq r3, ip 8020f82: d103 bne.n 8020f8c <__aeabi_fmul+0x14c> 8020f84: 024b lsls r3, r1, #9 8020f86: bf18 it ne 8020f88: 4608 movne r0, r1 8020f8a: d108 bne.n 8020f9e <__aeabi_fmul+0x15e> 8020f8c: ea80 0001 eor.w r0, r0, r1 8020f90: f000 4000 and.w r0, r0, #2147483648 ; 0x80000000 8020f94: f040 40fe orr.w r0, r0, #2130706432 ; 0x7f000000 8020f98: f440 0000 orr.w r0, r0, #8388608 ; 0x800000 8020f9c: 4770 bx lr 8020f9e: f040 40fe orr.w r0, r0, #2130706432 ; 0x7f000000 8020fa2: f440 0040 orr.w r0, r0, #12582912 ; 0xc00000 8020fa6: 4770 bx lr 08020fa8 <__aeabi_fdiv>: 8020fa8: f04f 0cff mov.w ip, #255 ; 0xff 8020fac: ea1c 52d0 ands.w r2, ip, r0, lsr #23 8020fb0: bf1e ittt ne 8020fb2: ea1c 53d1 andsne.w r3, ip, r1, lsr #23 8020fb6: ea92 0f0c teqne r2, ip 8020fba: ea93 0f0c teqne r3, ip 8020fbe: d069 beq.n 8021094 <__aeabi_fdiv+0xec> 8020fc0: eba2 0203 sub.w r2, r2, r3 8020fc4: ea80 0c01 eor.w ip, r0, r1 8020fc8: 0249 lsls r1, r1, #9 8020fca: ea4f 2040 mov.w r0, r0, lsl #9 8020fce: d037 beq.n 8021040 <__aeabi_fdiv+0x98> 8020fd0: f04f 5380 mov.w r3, #268435456 ; 0x10000000 8020fd4: ea43 1111 orr.w r1, r3, r1, lsr #4 8020fd8: ea43 1310 orr.w r3, r3, r0, lsr #4 8020fdc: f00c 4000 and.w r0, ip, #2147483648 ; 0x80000000 8020fe0: 428b cmp r3, r1 8020fe2: bf38 it cc 8020fe4: 005b lslcc r3, r3, #1 8020fe6: f142 027d adc.w r2, r2, #125 ; 0x7d 8020fea: f44f 0c00 mov.w ip, #8388608 ; 0x800000 8020fee: 428b cmp r3, r1 8020ff0: bf24 itt cs 8020ff2: 1a5b subcs r3, r3, r1 8020ff4: ea40 000c orrcs.w r0, r0, ip 8020ff8: ebb3 0f51 cmp.w r3, r1, lsr #1 8020ffc: bf24 itt cs 8020ffe: eba3 0351 subcs.w r3, r3, r1, lsr #1 8021002: ea40 005c orrcs.w r0, r0, ip, lsr #1 8021006: ebb3 0f91 cmp.w r3, r1, lsr #2 802100a: bf24 itt cs 802100c: eba3 0391 subcs.w r3, r3, r1, lsr #2 8021010: ea40 009c orrcs.w r0, r0, ip, lsr #2 8021014: ebb3 0fd1 cmp.w r3, r1, lsr #3 8021018: bf24 itt cs 802101a: eba3 03d1 subcs.w r3, r3, r1, lsr #3 802101e: ea40 00dc orrcs.w r0, r0, ip, lsr #3 8021022: 011b lsls r3, r3, #4 8021024: bf18 it ne 8021026: ea5f 1c1c movsne.w ip, ip, lsr #4 802102a: d1e0 bne.n 8020fee <__aeabi_fdiv+0x46> 802102c: 2afd cmp r2, #253 ; 0xfd 802102e: f63f af50 bhi.w 8020ed2 <__aeabi_fmul+0x92> 8021032: 428b cmp r3, r1 8021034: eb40 50c2 adc.w r0, r0, r2, lsl #23 8021038: bf08 it eq 802103a: f020 0001 biceq.w r0, r0, #1 802103e: 4770 bx lr 8021040: f00c 4c00 and.w ip, ip, #2147483648 ; 0x80000000 8021044: ea4c 2050 orr.w r0, ip, r0, lsr #9 8021048: 327f adds r2, #127 ; 0x7f 802104a: bfc2 ittt gt 802104c: f1d2 03ff rsbsgt r3, r2, #255 ; 0xff 8021050: ea40 50c2 orrgt.w r0, r0, r2, lsl #23 8021054: 4770 bxgt lr 8021056: f440 0000 orr.w r0, r0, #8388608 ; 0x800000 802105a: f04f 0300 mov.w r3, #0 802105e: 3a01 subs r2, #1 8021060: e737 b.n 8020ed2 <__aeabi_fmul+0x92> 8021062: f092 0f00 teq r2, #0 8021066: f000 4c00 and.w ip, r0, #2147483648 ; 0x80000000 802106a: bf02 ittt eq 802106c: 0040 lsleq r0, r0, #1 802106e: f410 0f00 tsteq.w r0, #8388608 ; 0x800000 8021072: 3a01 subeq r2, #1 8021074: d0f9 beq.n 802106a <__aeabi_fdiv+0xc2> 8021076: ea40 000c orr.w r0, r0, ip 802107a: f093 0f00 teq r3, #0 802107e: f001 4c00 and.w ip, r1, #2147483648 ; 0x80000000 8021082: bf02 ittt eq 8021084: 0049 lsleq r1, r1, #1 8021086: f411 0f00 tsteq.w r1, #8388608 ; 0x800000 802108a: 3b01 subeq r3, #1 802108c: d0f9 beq.n 8021082 <__aeabi_fdiv+0xda> 802108e: ea41 010c orr.w r1, r1, ip 8021092: e795 b.n 8020fc0 <__aeabi_fdiv+0x18> 8021094: ea0c 53d1 and.w r3, ip, r1, lsr #23 8021098: ea92 0f0c teq r2, ip 802109c: d108 bne.n 80210b0 <__aeabi_fdiv+0x108> 802109e: 0242 lsls r2, r0, #9 80210a0: f47f af7d bne.w 8020f9e <__aeabi_fmul+0x15e> 80210a4: ea93 0f0c teq r3, ip 80210a8: f47f af70 bne.w 8020f8c <__aeabi_fmul+0x14c> 80210ac: 4608 mov r0, r1 80210ae: e776 b.n 8020f9e <__aeabi_fmul+0x15e> 80210b0: ea93 0f0c teq r3, ip 80210b4: d104 bne.n 80210c0 <__aeabi_fdiv+0x118> 80210b6: 024b lsls r3, r1, #9 80210b8: f43f af4c beq.w 8020f54 <__aeabi_fmul+0x114> 80210bc: 4608 mov r0, r1 80210be: e76e b.n 8020f9e <__aeabi_fmul+0x15e> 80210c0: f030 4c00 bics.w ip, r0, #2147483648 ; 0x80000000 80210c4: bf18 it ne 80210c6: f031 4c00 bicsne.w ip, r1, #2147483648 ; 0x80000000 80210ca: d1ca bne.n 8021062 <__aeabi_fdiv+0xba> 80210cc: f030 4200 bics.w r2, r0, #2147483648 ; 0x80000000 80210d0: f47f af5c bne.w 8020f8c <__aeabi_fmul+0x14c> 80210d4: f031 4300 bics.w r3, r1, #2147483648 ; 0x80000000 80210d8: f47f af3c bne.w 8020f54 <__aeabi_fmul+0x114> 80210dc: e75f b.n 8020f9e <__aeabi_fmul+0x15e> 80210de: bf00 nop 080210e0 <__gesf2>: 80210e0: f04f 3cff mov.w ip, #4294967295 80210e4: e006 b.n 80210f4 <__cmpsf2+0x4> 80210e6: bf00 nop 080210e8 <__lesf2>: 80210e8: f04f 0c01 mov.w ip, #1 80210ec: e002 b.n 80210f4 <__cmpsf2+0x4> 80210ee: bf00 nop 080210f0 <__cmpsf2>: 80210f0: f04f 0c01 mov.w ip, #1 80210f4: f84d cd04 str.w ip, [sp, #-4]! 80210f8: ea4f 0240 mov.w r2, r0, lsl #1 80210fc: ea4f 0341 mov.w r3, r1, lsl #1 8021100: ea7f 6c22 mvns.w ip, r2, asr #24 8021104: bf18 it ne 8021106: ea7f 6c23 mvnsne.w ip, r3, asr #24 802110a: d011 beq.n 8021130 <__cmpsf2+0x40> 802110c: b001 add sp, #4 802110e: ea52 0c53 orrs.w ip, r2, r3, lsr #1 8021112: bf18 it ne 8021114: ea90 0f01 teqne r0, r1 8021118: bf58 it pl 802111a: ebb2 0003 subspl.w r0, r2, r3 802111e: bf88 it hi 8021120: 17c8 asrhi r0, r1, #31 8021122: bf38 it cc 8021124: ea6f 70e1 mvncc.w r0, r1, asr #31 8021128: bf18 it ne 802112a: f040 0001 orrne.w r0, r0, #1 802112e: 4770 bx lr 8021130: ea7f 6c22 mvns.w ip, r2, asr #24 8021134: d102 bne.n 802113c <__cmpsf2+0x4c> 8021136: ea5f 2c40 movs.w ip, r0, lsl #9 802113a: d105 bne.n 8021148 <__cmpsf2+0x58> 802113c: ea7f 6c23 mvns.w ip, r3, asr #24 8021140: d1e4 bne.n 802110c <__cmpsf2+0x1c> 8021142: ea5f 2c41 movs.w ip, r1, lsl #9 8021146: d0e1 beq.n 802110c <__cmpsf2+0x1c> 8021148: f85d 0b04 ldr.w r0, [sp], #4 802114c: 4770 bx lr 802114e: bf00 nop 08021150 <__aeabi_cfrcmple>: 8021150: 4684 mov ip, r0 8021152: 4608 mov r0, r1 8021154: 4661 mov r1, ip 8021156: e7ff b.n 8021158 <__aeabi_cfcmpeq> 08021158 <__aeabi_cfcmpeq>: 8021158: b50f push {r0, r1, r2, r3, lr} 802115a: f7ff ffc9 bl 80210f0 <__cmpsf2> 802115e: 2800 cmp r0, #0 8021160: bf48 it mi 8021162: f110 0f00 cmnmi.w r0, #0 8021166: bd0f pop {r0, r1, r2, r3, pc} 08021168 <__aeabi_fcmpeq>: 8021168: f84d ed08 str.w lr, [sp, #-8]! 802116c: f7ff fff4 bl 8021158 <__aeabi_cfcmpeq> 8021170: bf0c ite eq 8021172: 2001 moveq r0, #1 8021174: 2000 movne r0, #0 8021176: f85d fb08 ldr.w pc, [sp], #8 802117a: bf00 nop 0802117c <__aeabi_fcmplt>: 802117c: f84d ed08 str.w lr, [sp, #-8]! 8021180: f7ff ffea bl 8021158 <__aeabi_cfcmpeq> 8021184: bf34 ite cc 8021186: 2001 movcc r0, #1 8021188: 2000 movcs r0, #0 802118a: f85d fb08 ldr.w pc, [sp], #8 802118e: bf00 nop 08021190 <__aeabi_fcmple>: 8021190: f84d ed08 str.w lr, [sp, #-8]! 8021194: f7ff ffe0 bl 8021158 <__aeabi_cfcmpeq> 8021198: bf94 ite ls 802119a: 2001 movls r0, #1 802119c: 2000 movhi r0, #0 802119e: f85d fb08 ldr.w pc, [sp], #8 80211a2: bf00 nop 080211a4 <__aeabi_fcmpge>: 80211a4: f84d ed08 str.w lr, [sp, #-8]! 80211a8: f7ff ffd2 bl 8021150 <__aeabi_cfrcmple> 80211ac: bf94 ite ls 80211ae: 2001 movls r0, #1 80211b0: 2000 movhi r0, #0 80211b2: f85d fb08 ldr.w pc, [sp], #8 80211b6: bf00 nop 080211b8 <__aeabi_fcmpgt>: 80211b8: f84d ed08 str.w lr, [sp, #-8]! 80211bc: f7ff ffc8 bl 8021150 <__aeabi_cfrcmple> 80211c0: bf34 ite cc 80211c2: 2001 movcc r0, #1 80211c4: 2000 movcs r0, #0 80211c6: f85d fb08 ldr.w pc, [sp], #8 80211ca: bf00 nop 080211cc <__aeabi_uldivmod>: 80211cc: b94b cbnz r3, 80211e2 <__aeabi_uldivmod+0x16> 80211ce: b942 cbnz r2, 80211e2 <__aeabi_uldivmod+0x16> 80211d0: 2900 cmp r1, #0 80211d2: bf08 it eq 80211d4: 2800 cmpeq r0, #0 80211d6: d002 beq.n 80211de <__aeabi_uldivmod+0x12> 80211d8: f04f 31ff mov.w r1, #4294967295 80211dc: 4608 mov r0, r1 80211de: f000 b83b b.w 8021258 <__aeabi_idiv0> 80211e2: b082 sub sp, #8 80211e4: 46ec mov ip, sp 80211e6: e92d 5000 stmdb sp!, {ip, lr} 80211ea: f000 f81d bl 8021228 <__gnu_uldivmod_helper> 80211ee: f8dd e004 ldr.w lr, [sp, #4] 80211f2: b002 add sp, #8 80211f4: bc0c pop {r2, r3} 80211f6: 4770 bx lr 080211f8 <__gnu_ldivmod_helper>: 80211f8: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 80211fc: 4690 mov r8, r2 80211fe: 4699 mov r9, r3 8021200: 4606 mov r6, r0 8021202: 460f mov r7, r1 8021204: f000 f82a bl 802125c <__divdi3> 8021208: 9b08 ldr r3, [sp, #32] 802120a: fba8 4500 umull r4, r5, r8, r0 802120e: fb08 f801 mul.w r8, r8, r1 8021212: fb00 8209 mla r2, r0, r9, r8 8021216: 1955 adds r5, r2, r5 8021218: 1b34 subs r4, r6, r4 802121a: eb67 0505 sbc.w r5, r7, r5 802121e: e9c3 4500 strd r4, r5, [r3] 8021222: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8021226: bf00 nop 08021228 <__gnu_uldivmod_helper>: 8021228: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802122c: 4690 mov r8, r2 802122e: 4606 mov r6, r0 8021230: 460f mov r7, r1 8021232: 461d mov r5, r3 8021234: f000 f9c8 bl 80215c8 <__udivdi3> 8021238: fb00 f305 mul.w r3, r0, r5 802123c: fba0 4508 umull r4, r5, r0, r8 8021240: fb08 3801 mla r8, r8, r1, r3 8021244: 9b06 ldr r3, [sp, #24] 8021246: 4445 add r5, r8 8021248: 1b34 subs r4, r6, r4 802124a: eb67 0505 sbc.w r5, r7, r5 802124e: e9c3 4500 strd r4, r5, [r3] 8021252: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8021256: bf00 nop 08021258 <__aeabi_idiv0>: 8021258: 4770 bx lr 802125a: bf00 nop 0802125c <__divdi3>: 802125c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8021260: 2500 movs r5, #0 8021262: 2900 cmp r1, #0 8021264: b085 sub sp, #20 8021266: 461c mov r4, r3 8021268: f2c0 8149 blt.w 80214fe <__divdi3+0x2a2> 802126c: 2c00 cmp r4, #0 802126e: f2c0 8141 blt.w 80214f4 <__divdi3+0x298> 8021272: 468c mov ip, r1 8021274: 460f mov r7, r1 8021276: 4682 mov sl, r0 8021278: 4691 mov r9, r2 802127a: 4614 mov r4, r2 802127c: 4606 mov r6, r0 802127e: 4619 mov r1, r3 8021280: 2b00 cmp r3, #0 8021282: d14b bne.n 802131c <__divdi3+0xc0> 8021284: 4562 cmp r2, ip 8021286: d959 bls.n 802133c <__divdi3+0xe0> 8021288: fab2 f382 clz r3, r2 802128c: b143 cbz r3, 80212a0 <__divdi3+0x44> 802128e: f1c3 0220 rsb r2, r3, #32 8021292: fa0c f703 lsl.w r7, ip, r3 8021296: fa20 f202 lsr.w r2, r0, r2 802129a: 409c lsls r4, r3 802129c: 4317 orrs r7, r2 802129e: 409e lsls r6, r3 80212a0: ea4f 4814 mov.w r8, r4, lsr #16 80212a4: 4638 mov r0, r7 80212a6: 4641 mov r1, r8 80212a8: fa1f f984 uxth.w r9, r4 80212ac: f000 fb18 bl 80218e0 <__aeabi_uidiv> 80212b0: 4641 mov r1, r8 80212b2: 4682 mov sl, r0 80212b4: 4638 mov r0, r7 80212b6: f000 fc41 bl 8021b3c <__aeabi_uidivmod> 80212ba: 0c33 lsrs r3, r6, #16 80212bc: fb09 f00a mul.w r0, r9, sl 80212c0: ea43 4101 orr.w r1, r3, r1, lsl #16 80212c4: 4288 cmp r0, r1 80212c6: d90a bls.n 80212de <__divdi3+0x82> 80212c8: 1909 adds r1, r1, r4 80212ca: f10a 32ff add.w r2, sl, #4294967295 80212ce: d205 bcs.n 80212dc <__divdi3+0x80> 80212d0: 4288 cmp r0, r1 80212d2: bf84 itt hi 80212d4: f1aa 0a02 subhi.w sl, sl, #2 80212d8: 1909 addhi r1, r1, r4 80212da: d800 bhi.n 80212de <__divdi3+0x82> 80212dc: 4692 mov sl, r2 80212de: ebc0 0b01 rsb fp, r0, r1 80212e2: 4641 mov r1, r8 80212e4: 4658 mov r0, fp 80212e6: b2b6 uxth r6, r6 80212e8: f000 fafa bl 80218e0 <__aeabi_uidiv> 80212ec: 4641 mov r1, r8 80212ee: 4607 mov r7, r0 80212f0: 4658 mov r0, fp 80212f2: f000 fc23 bl 8021b3c <__aeabi_uidivmod> 80212f6: fb09 f907 mul.w r9, r9, r7 80212fa: ea46 4101 orr.w r1, r6, r1, lsl #16 80212fe: 4589 cmp r9, r1 8021300: d907 bls.n 8021312 <__divdi3+0xb6> 8021302: 1e7b subs r3, r7, #1 8021304: 190c adds r4, r1, r4 8021306: f080 8157 bcs.w 80215b8 <__divdi3+0x35c> 802130a: 3f02 subs r7, #2 802130c: 45a1 cmp r9, r4 802130e: f240 8153 bls.w 80215b8 <__divdi3+0x35c> 8021312: ea47 400a orr.w r0, r7, sl, lsl #16 8021316: f04f 0800 mov.w r8, #0 802131a: e004 b.n 8021326 <__divdi3+0xca> 802131c: 4563 cmp r3, ip 802131e: d958 bls.n 80213d2 <__divdi3+0x176> 8021320: f04f 0800 mov.w r8, #0 8021324: 4640 mov r0, r8 8021326: 4602 mov r2, r0 8021328: 4643 mov r3, r8 802132a: b115 cbz r5, 8021332 <__divdi3+0xd6> 802132c: 4252 negs r2, r2 802132e: eb63 0343 sbc.w r3, r3, r3, lsl #1 8021332: 4610 mov r0, r2 8021334: 4619 mov r1, r3 8021336: b005 add sp, #20 8021338: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802133c: b922 cbnz r2, 8021348 <__divdi3+0xec> 802133e: 2001 movs r0, #1 8021340: 4611 mov r1, r2 8021342: f000 facd bl 80218e0 <__aeabi_uidiv> 8021346: 4604 mov r4, r0 8021348: fab4 f384 clz r3, r4 802134c: 2b00 cmp r3, #0 802134e: f040 80dc bne.w 802150a <__divdi3+0x2ae> 8021352: 1b3f subs r7, r7, r4 8021354: ea4f 4914 mov.w r9, r4, lsr #16 8021358: fa1f fa84 uxth.w sl, r4 802135c: f04f 0801 mov.w r8, #1 8021360: 4649 mov r1, r9 8021362: 4638 mov r0, r7 8021364: f000 fabc bl 80218e0 <__aeabi_uidiv> 8021368: 4649 mov r1, r9 802136a: 4683 mov fp, r0 802136c: 4638 mov r0, r7 802136e: f000 fbe5 bl 8021b3c <__aeabi_uidivmod> 8021372: 0c33 lsrs r3, r6, #16 8021374: fb0a f00b mul.w r0, sl, fp 8021378: ea43 4101 orr.w r1, r3, r1, lsl #16 802137c: 4288 cmp r0, r1 802137e: d90b bls.n 8021398 <__divdi3+0x13c> 8021380: 1909 adds r1, r1, r4 8021382: f10b 33ff add.w r3, fp, #4294967295 8021386: f080 8115 bcs.w 80215b4 <__divdi3+0x358> 802138a: 4288 cmp r0, r1 802138c: bf84 itt hi 802138e: f1ab 0b02 subhi.w fp, fp, #2 8021392: 1909 addhi r1, r1, r4 8021394: f240 810e bls.w 80215b4 <__divdi3+0x358> 8021398: 1a0b subs r3, r1, r0 802139a: 4649 mov r1, r9 802139c: 4618 mov r0, r3 802139e: 9301 str r3, [sp, #4] 80213a0: f000 fa9e bl 80218e0 <__aeabi_uidiv> 80213a4: 9b01 ldr r3, [sp, #4] 80213a6: 4649 mov r1, r9 80213a8: b2b6 uxth r6, r6 80213aa: 4607 mov r7, r0 80213ac: 4618 mov r0, r3 80213ae: f000 fbc5 bl 8021b3c <__aeabi_uidivmod> 80213b2: fb0a fa07 mul.w sl, sl, r7 80213b6: ea46 4101 orr.w r1, r6, r1, lsl #16 80213ba: 458a cmp sl, r1 80213bc: d906 bls.n 80213cc <__divdi3+0x170> 80213be: 1e7b subs r3, r7, #1 80213c0: 190c adds r4, r1, r4 80213c2: d202 bcs.n 80213ca <__divdi3+0x16e> 80213c4: 3f02 subs r7, #2 80213c6: 45a2 cmp sl, r4 80213c8: d800 bhi.n 80213cc <__divdi3+0x170> 80213ca: 461f mov r7, r3 80213cc: ea47 400b orr.w r0, r7, fp, lsl #16 80213d0: e7a9 b.n 8021326 <__divdi3+0xca> 80213d2: fab3 f483 clz r4, r3 80213d6: 2c00 cmp r4, #0 80213d8: f000 80e4 beq.w 80215a4 <__divdi3+0x348> 80213dc: f1c4 0320 rsb r3, r4, #32 80213e0: fa01 f104 lsl.w r1, r1, r4 80213e4: fa22 fa03 lsr.w sl, r2, r3 80213e8: fa2c fb03 lsr.w fp, ip, r3 80213ec: ea4a 0a01 orr.w sl, sl, r1 80213f0: fa20 f803 lsr.w r8, r0, r3 80213f4: fa0c fc04 lsl.w ip, ip, r4 80213f8: 4658 mov r0, fp 80213fa: ea4f 471a mov.w r7, sl, lsr #16 80213fe: ea48 080c orr.w r8, r8, ip 8021402: 4639 mov r1, r7 8021404: fa02 f904 lsl.w r9, r2, r4 8021408: f8cd 900c str.w r9, [sp, #12] 802140c: f000 fa68 bl 80218e0 <__aeabi_uidiv> 8021410: 4639 mov r1, r7 8021412: 4681 mov r9, r0 8021414: 4658 mov r0, fp 8021416: f000 fb91 bl 8021b3c <__aeabi_uidivmod> 802141a: fa1f fc8a uxth.w ip, sl 802141e: ea4f 4318 mov.w r3, r8, lsr #16 8021422: fb0c f009 mul.w r0, ip, r9 8021426: ea43 4301 orr.w r3, r3, r1, lsl #16 802142a: 4298 cmp r0, r3 802142c: d90c bls.n 8021448 <__divdi3+0x1ec> 802142e: eb13 030a adds.w r3, r3, sl 8021432: f109 31ff add.w r1, r9, #4294967295 8021436: f080 80c3 bcs.w 80215c0 <__divdi3+0x364> 802143a: 4298 cmp r0, r3 802143c: bf84 itt hi 802143e: f1a9 0902 subhi.w r9, r9, #2 8021442: 4453 addhi r3, sl 8021444: f240 80bc bls.w 80215c0 <__divdi3+0x364> 8021448: 1a1b subs r3, r3, r0 802144a: 4639 mov r1, r7 802144c: 4618 mov r0, r3 802144e: f8cd c008 str.w ip, [sp, #8] 8021452: 9301 str r3, [sp, #4] 8021454: f000 fa44 bl 80218e0 <__aeabi_uidiv> 8021458: 9b01 ldr r3, [sp, #4] 802145a: 4639 mov r1, r7 802145c: fa1f f888 uxth.w r8, r8 8021460: 4683 mov fp, r0 8021462: 4618 mov r0, r3 8021464: f000 fb6a bl 8021b3c <__aeabi_uidivmod> 8021468: f8dd c008 ldr.w ip, [sp, #8] 802146c: fb0c f30b mul.w r3, ip, fp 8021470: ea48 4101 orr.w r1, r8, r1, lsl #16 8021474: 428b cmp r3, r1 8021476: d90c bls.n 8021492 <__divdi3+0x236> 8021478: eb11 010a adds.w r1, r1, sl 802147c: f10b 30ff add.w r0, fp, #4294967295 8021480: f080 809c bcs.w 80215bc <__divdi3+0x360> 8021484: 428b cmp r3, r1 8021486: bf84 itt hi 8021488: f1ab 0b02 subhi.w fp, fp, #2 802148c: 4451 addhi r1, sl 802148e: f240 8095 bls.w 80215bc <__divdi3+0x360> 8021492: 9f03 ldr r7, [sp, #12] 8021494: ea4b 4009 orr.w r0, fp, r9, lsl #16 8021498: 1ac9 subs r1, r1, r3 802149a: fa1f fc80 uxth.w ip, r0 802149e: b2ba uxth r2, r7 80214a0: ea4f 4917 mov.w r9, r7, lsr #16 80214a4: 0c07 lsrs r7, r0, #16 80214a6: fb02 f80c mul.w r8, r2, ip 80214aa: fb02 f207 mul.w r2, r2, r7 80214ae: fb09 230c mla r3, r9, ip, r2 80214b2: fb09 f907 mul.w r9, r9, r7 80214b6: eb03 4318 add.w r3, r3, r8, lsr #16 80214ba: 429a cmp r2, r3 80214bc: bf88 it hi 80214be: f509 3980 addhi.w r9, r9, #65536 ; 0x10000 80214c2: eb09 4913 add.w r9, r9, r3, lsr #16 80214c6: 4549 cmp r1, r9 80214c8: d310 bcc.n 80214ec <__divdi3+0x290> 80214ca: fa1f f888 uxth.w r8, r8 80214ce: bf14 ite ne 80214d0: 2200 movne r2, #0 80214d2: 2201 moveq r2, #1 80214d4: fa06 f404 lsl.w r4, r6, r4 80214d8: eb08 4303 add.w r3, r8, r3, lsl #16 80214dc: 429c cmp r4, r3 80214de: bf2c ite cs 80214e0: 2300 movcs r3, #0 80214e2: f002 0301 andcc.w r3, r2, #1 80214e6: 2b00 cmp r3, #0 80214e8: f43f af15 beq.w 8021316 <__divdi3+0xba> 80214ec: 3801 subs r0, #1 80214ee: f04f 0800 mov.w r8, #0 80214f2: e718 b.n 8021326 <__divdi3+0xca> 80214f4: 4252 negs r2, r2 80214f6: eb63 0343 sbc.w r3, r3, r3, lsl #1 80214fa: 43ed mvns r5, r5 80214fc: e6b9 b.n 8021272 <__divdi3+0x16> 80214fe: 4240 negs r0, r0 8021500: eb61 0141 sbc.w r1, r1, r1, lsl #1 8021504: f04f 35ff mov.w r5, #4294967295 8021508: e6b0 b.n 802126c <__divdi3+0x10> 802150a: 409c lsls r4, r3 802150c: f1c3 0b20 rsb fp, r3, #32 8021510: fa27 f80b lsr.w r8, r7, fp 8021514: fa07 f703 lsl.w r7, r7, r3 8021518: ea4f 4914 mov.w r9, r4, lsr #16 802151c: 4640 mov r0, r8 802151e: 4649 mov r1, r9 8021520: fa26 fb0b lsr.w fp, r6, fp 8021524: 409e lsls r6, r3 8021526: f000 f9db bl 80218e0 <__aeabi_uidiv> 802152a: 4649 mov r1, r9 802152c: fa1f fa84 uxth.w sl, r4 8021530: ea4b 0b07 orr.w fp, fp, r7 8021534: 4603 mov r3, r0 8021536: 4640 mov r0, r8 8021538: 9301 str r3, [sp, #4] 802153a: f000 faff bl 8021b3c <__aeabi_uidivmod> 802153e: 9b01 ldr r3, [sp, #4] 8021540: ea4f 421b mov.w r2, fp, lsr #16 8021544: fb0a f003 mul.w r0, sl, r3 8021548: ea42 4101 orr.w r1, r2, r1, lsl #16 802154c: 4288 cmp r0, r1 802154e: d906 bls.n 802155e <__divdi3+0x302> 8021550: 1e5a subs r2, r3, #1 8021552: 1909 adds r1, r1, r4 8021554: d236 bcs.n 80215c4 <__divdi3+0x368> 8021556: 4288 cmp r0, r1 8021558: d934 bls.n 80215c4 <__divdi3+0x368> 802155a: 3b02 subs r3, #2 802155c: 1909 adds r1, r1, r4 802155e: 1a0f subs r7, r1, r0 8021560: 4649 mov r1, r9 8021562: 4638 mov r0, r7 8021564: 9301 str r3, [sp, #4] 8021566: f000 f9bb bl 80218e0 <__aeabi_uidiv> 802156a: 4649 mov r1, r9 802156c: fa1f fb8b uxth.w fp, fp 8021570: 4680 mov r8, r0 8021572: 4638 mov r0, r7 8021574: f000 fae2 bl 8021b3c <__aeabi_uidivmod> 8021578: 9b01 ldr r3, [sp, #4] 802157a: fb0a f708 mul.w r7, sl, r8 802157e: ea4b 4101 orr.w r1, fp, r1, lsl #16 8021582: 428f cmp r7, r1 8021584: d90a bls.n 802159c <__divdi3+0x340> 8021586: 1909 adds r1, r1, r4 8021588: f108 32ff add.w r2, r8, #4294967295 802158c: d205 bcs.n 802159a <__divdi3+0x33e> 802158e: 428f cmp r7, r1 8021590: bf84 itt hi 8021592: f1a8 0802 subhi.w r8, r8, #2 8021596: 1909 addhi r1, r1, r4 8021598: d800 bhi.n 802159c <__divdi3+0x340> 802159a: 4690 mov r8, r2 802159c: 1bcf subs r7, r1, r7 802159e: ea48 4803 orr.w r8, r8, r3, lsl #16 80215a2: e6dd b.n 8021360 <__divdi3+0x104> 80215a4: 2001 movs r0, #1 80215a6: 4563 cmp r3, ip 80215a8: bf28 it cs 80215aa: 4552 cmpcs r2, sl 80215ac: 46a0 mov r8, r4 80215ae: f67f aeba bls.w 8021326 <__divdi3+0xca> 80215b2: e6b5 b.n 8021320 <__divdi3+0xc4> 80215b4: 469b mov fp, r3 80215b6: e6ef b.n 8021398 <__divdi3+0x13c> 80215b8: 461f mov r7, r3 80215ba: e6aa b.n 8021312 <__divdi3+0xb6> 80215bc: 4683 mov fp, r0 80215be: e768 b.n 8021492 <__divdi3+0x236> 80215c0: 4689 mov r9, r1 80215c2: e741 b.n 8021448 <__divdi3+0x1ec> 80215c4: 4613 mov r3, r2 80215c6: e7ca b.n 802155e <__divdi3+0x302> 080215c8 <__udivdi3>: 80215c8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80215cc: 4606 mov r6, r0 80215ce: b083 sub sp, #12 80215d0: 460d mov r5, r1 80215d2: 4614 mov r4, r2 80215d4: 4607 mov r7, r0 80215d6: 4688 mov r8, r1 80215d8: 2b00 cmp r3, #0 80215da: d14a bne.n 8021672 <__udivdi3+0xaa> 80215dc: 428a cmp r2, r1 80215de: d955 bls.n 802168c <__udivdi3+0xc4> 80215e0: fab2 f382 clz r3, r2 80215e4: b14b cbz r3, 80215fa <__udivdi3+0x32> 80215e6: f1c3 0220 rsb r2, r3, #32 80215ea: fa01 f803 lsl.w r8, r1, r3 80215ee: fa20 f202 lsr.w r2, r0, r2 80215f2: 409c lsls r4, r3 80215f4: ea42 0808 orr.w r8, r2, r8 80215f8: 409f lsls r7, r3 80215fa: 0c25 lsrs r5, r4, #16 80215fc: 4640 mov r0, r8 80215fe: 4629 mov r1, r5 8021600: fa1f fa84 uxth.w sl, r4 8021604: f000 f96c bl 80218e0 <__aeabi_uidiv> 8021608: 4629 mov r1, r5 802160a: 4681 mov r9, r0 802160c: 4640 mov r0, r8 802160e: f000 fa95 bl 8021b3c <__aeabi_uidivmod> 8021612: 0c3b lsrs r3, r7, #16 8021614: fb0a f009 mul.w r0, sl, r9 8021618: ea43 4101 orr.w r1, r3, r1, lsl #16 802161c: 4288 cmp r0, r1 802161e: d90a bls.n 8021636 <__udivdi3+0x6e> 8021620: 1909 adds r1, r1, r4 8021622: f109 32ff add.w r2, r9, #4294967295 8021626: d205 bcs.n 8021634 <__udivdi3+0x6c> 8021628: 4288 cmp r0, r1 802162a: bf84 itt hi 802162c: f1a9 0902 subhi.w r9, r9, #2 8021630: 1909 addhi r1, r1, r4 8021632: d800 bhi.n 8021636 <__udivdi3+0x6e> 8021634: 4691 mov r9, r2 8021636: ebc0 0801 rsb r8, r0, r1 802163a: 4629 mov r1, r5 802163c: 4640 mov r0, r8 802163e: b2bf uxth r7, r7 8021640: f000 f94e bl 80218e0 <__aeabi_uidiv> 8021644: 4629 mov r1, r5 8021646: 4606 mov r6, r0 8021648: 4640 mov r0, r8 802164a: f000 fa77 bl 8021b3c <__aeabi_uidivmod> 802164e: fb0a fa06 mul.w sl, sl, r6 8021652: ea47 4101 orr.w r1, r7, r1, lsl #16 8021656: 458a cmp sl, r1 8021658: d907 bls.n 802166a <__udivdi3+0xa2> 802165a: 1e73 subs r3, r6, #1 802165c: 190c adds r4, r1, r4 802165e: f080 8122 bcs.w 80218a6 <__udivdi3+0x2de> 8021662: 3e02 subs r6, #2 8021664: 45a2 cmp sl, r4 8021666: f240 811e bls.w 80218a6 <__udivdi3+0x2de> 802166a: ea46 4009 orr.w r0, r6, r9, lsl #16 802166e: 2600 movs r6, #0 8021670: e058 b.n 8021724 <__udivdi3+0x15c> 8021672: 428b cmp r3, r1 8021674: d854 bhi.n 8021720 <__udivdi3+0x158> 8021676: fab3 f483 clz r4, r3 802167a: 2c00 cmp r4, #0 802167c: d156 bne.n 802172c <__udivdi3+0x164> 802167e: 428b cmp r3, r1 8021680: bf28 it cs 8021682: 4282 cmpcs r2, r0 8021684: d84c bhi.n 8021720 <__udivdi3+0x158> 8021686: 4626 mov r6, r4 8021688: 2001 movs r0, #1 802168a: e04b b.n 8021724 <__udivdi3+0x15c> 802168c: b922 cbnz r2, 8021698 <__udivdi3+0xd0> 802168e: 2001 movs r0, #1 8021690: 4611 mov r1, r2 8021692: f000 f925 bl 80218e0 <__aeabi_uidiv> 8021696: 4604 mov r4, r0 8021698: fab4 f384 clz r3, r4 802169c: 2b00 cmp r3, #0 802169e: f040 80b9 bne.w 8021814 <__udivdi3+0x24c> 80216a2: 1b2d subs r5, r5, r4 80216a4: ea4f 4814 mov.w r8, r4, lsr #16 80216a8: fa1f fa84 uxth.w sl, r4 80216ac: 2601 movs r6, #1 80216ae: 4641 mov r1, r8 80216b0: 4628 mov r0, r5 80216b2: f000 f915 bl 80218e0 <__aeabi_uidiv> 80216b6: 4641 mov r1, r8 80216b8: 4681 mov r9, r0 80216ba: 4628 mov r0, r5 80216bc: f000 fa3e bl 8021b3c <__aeabi_uidivmod> 80216c0: 0c3b lsrs r3, r7, #16 80216c2: fb0a f009 mul.w r0, sl, r9 80216c6: ea43 4101 orr.w r1, r3, r1, lsl #16 80216ca: 4288 cmp r0, r1 80216cc: d90b bls.n 80216e6 <__udivdi3+0x11e> 80216ce: 1909 adds r1, r1, r4 80216d0: f109 33ff add.w r3, r9, #4294967295 80216d4: f080 80e9 bcs.w 80218aa <__udivdi3+0x2e2> 80216d8: 4288 cmp r0, r1 80216da: bf84 itt hi 80216dc: f1a9 0902 subhi.w r9, r9, #2 80216e0: 1909 addhi r1, r1, r4 80216e2: f240 80e2 bls.w 80218aa <__udivdi3+0x2e2> 80216e6: ebc0 0b01 rsb fp, r0, r1 80216ea: 4641 mov r1, r8 80216ec: 4658 mov r0, fp 80216ee: b2bf uxth r7, r7 80216f0: f000 f8f6 bl 80218e0 <__aeabi_uidiv> 80216f4: 4641 mov r1, r8 80216f6: 4605 mov r5, r0 80216f8: 4658 mov r0, fp 80216fa: f000 fa1f bl 8021b3c <__aeabi_uidivmod> 80216fe: fb0a fa05 mul.w sl, sl, r5 8021702: ea47 4101 orr.w r1, r7, r1, lsl #16 8021706: 458a cmp sl, r1 8021708: d907 bls.n 802171a <__udivdi3+0x152> 802170a: 1e6b subs r3, r5, #1 802170c: 190c adds r4, r1, r4 802170e: f080 80ce bcs.w 80218ae <__udivdi3+0x2e6> 8021712: 3d02 subs r5, #2 8021714: 45a2 cmp sl, r4 8021716: f240 80ca bls.w 80218ae <__udivdi3+0x2e6> 802171a: ea45 4009 orr.w r0, r5, r9, lsl #16 802171e: e001 b.n 8021724 <__udivdi3+0x15c> 8021720: 2600 movs r6, #0 8021722: 4630 mov r0, r6 8021724: 4631 mov r1, r6 8021726: b003 add sp, #12 8021728: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802172c: f1c4 0120 rsb r1, r4, #32 8021730: fa03 f304 lsl.w r3, r3, r4 8021734: fa22 f801 lsr.w r8, r2, r1 8021738: fa25 f701 lsr.w r7, r5, r1 802173c: ea48 0803 orr.w r8, r8, r3 8021740: fa20 f101 lsr.w r1, r0, r1 8021744: fa05 f504 lsl.w r5, r5, r4 8021748: 4638 mov r0, r7 802174a: ea4f 4918 mov.w r9, r8, lsr #16 802174e: 430d orrs r5, r1 8021750: 4649 mov r1, r9 8021752: fa02 f204 lsl.w r2, r2, r4 8021756: 9201 str r2, [sp, #4] 8021758: f000 f8c2 bl 80218e0 <__aeabi_uidiv> 802175c: 4649 mov r1, r9 802175e: 4682 mov sl, r0 8021760: 4638 mov r0, r7 8021762: f000 f9eb bl 8021b3c <__aeabi_uidivmod> 8021766: fa1f f288 uxth.w r2, r8 802176a: 0c2f lsrs r7, r5, #16 802176c: fb02 f00a mul.w r0, r2, sl 8021770: ea47 4701 orr.w r7, r7, r1, lsl #16 8021774: 42b8 cmp r0, r7 8021776: d906 bls.n 8021786 <__udivdi3+0x1be> 8021778: eb17 0708 adds.w r7, r7, r8 802177c: f10a 31ff add.w r1, sl, #4294967295 8021780: f0c0 809f bcc.w 80218c2 <__udivdi3+0x2fa> 8021784: 468a mov sl, r1 8021786: 1a3f subs r7, r7, r0 8021788: 4649 mov r1, r9 802178a: 4638 mov r0, r7 802178c: 9200 str r2, [sp, #0] 802178e: f000 f8a7 bl 80218e0 <__aeabi_uidiv> 8021792: 4649 mov r1, r9 8021794: b2ad uxth r5, r5 8021796: 4683 mov fp, r0 8021798: 4638 mov r0, r7 802179a: f000 f9cf bl 8021b3c <__aeabi_uidivmod> 802179e: 9a00 ldr r2, [sp, #0] 80217a0: fb02 f70b mul.w r7, r2, fp 80217a4: ea45 4101 orr.w r1, r5, r1, lsl #16 80217a8: 428f cmp r7, r1 80217aa: d905 bls.n 80217b8 <__udivdi3+0x1f0> 80217ac: eb11 0108 adds.w r1, r1, r8 80217b0: f10b 32ff add.w r2, fp, #4294967295 80217b4: d37d bcc.n 80218b2 <__udivdi3+0x2ea> 80217b6: 4693 mov fp, r2 80217b8: 9b01 ldr r3, [sp, #4] 80217ba: ea4b 400a orr.w r0, fp, sl, lsl #16 80217be: 1bc9 subs r1, r1, r7 80217c0: ea4f 4c10 mov.w ip, r0, lsr #16 80217c4: b29d uxth r5, r3 80217c6: ea4f 4a13 mov.w sl, r3, lsr #16 80217ca: b283 uxth r3, r0 80217cc: fb05 f203 mul.w r2, r5, r3 80217d0: fb05 f50c mul.w r5, r5, ip 80217d4: fb0a 5303 mla r3, sl, r3, r5 80217d8: fb0a fa0c mul.w sl, sl, ip 80217dc: eb03 4312 add.w r3, r3, r2, lsr #16 80217e0: 429d cmp r5, r3 80217e2: bf88 it hi 80217e4: f50a 3a80 addhi.w sl, sl, #65536 ; 0x10000 80217e8: eb0a 4a13 add.w sl, sl, r3, lsr #16 80217ec: 4551 cmp r1, sl 80217ee: d30e bcc.n 802180e <__udivdi3+0x246> 80217f0: b292 uxth r2, r2 80217f2: bf14 ite ne 80217f4: 2100 movne r1, #0 80217f6: 2101 moveq r1, #1 80217f8: fa06 f604 lsl.w r6, r6, r4 80217fc: eb02 4303 add.w r3, r2, r3, lsl #16 8021800: 429e cmp r6, r3 8021802: bf2c ite cs 8021804: 2600 movcs r6, #0 8021806: f001 0601 andcc.w r6, r1, #1 802180a: 2e00 cmp r6, #0 802180c: d08a beq.n 8021724 <__udivdi3+0x15c> 802180e: 3801 subs r0, #1 8021810: 2600 movs r6, #0 8021812: e787 b.n 8021724 <__udivdi3+0x15c> 8021814: 409c lsls r4, r3 8021816: f1c3 0220 rsb r2, r3, #32 802181a: fa25 fa02 lsr.w sl, r5, r2 802181e: fa26 f902 lsr.w r9, r6, r2 8021822: ea4f 4814 mov.w r8, r4, lsr #16 8021826: 4650 mov r0, sl 8021828: 4641 mov r1, r8 802182a: fa05 f503 lsl.w r5, r5, r3 802182e: fa06 f703 lsl.w r7, r6, r3 8021832: f000 f855 bl 80218e0 <__aeabi_uidiv> 8021836: 4641 mov r1, r8 8021838: ea49 0905 orr.w r9, r9, r5 802183c: 4683 mov fp, r0 802183e: 4650 mov r0, sl 8021840: f000 f97c bl 8021b3c <__aeabi_uidivmod> 8021844: fa1f fa84 uxth.w sl, r4 8021848: ea4f 4319 mov.w r3, r9, lsr #16 802184c: fb0a f00b mul.w r0, sl, fp 8021850: ea43 4101 orr.w r1, r3, r1, lsl #16 8021854: 4288 cmp r0, r1 8021856: d909 bls.n 802186c <__udivdi3+0x2a4> 8021858: 1909 adds r1, r1, r4 802185a: f10b 33ff add.w r3, fp, #4294967295 802185e: d238 bcs.n 80218d2 <__udivdi3+0x30a> 8021860: 4288 cmp r0, r1 8021862: bf84 itt hi 8021864: f1ab 0b02 subhi.w fp, fp, #2 8021868: 1909 addhi r1, r1, r4 802186a: d932 bls.n 80218d2 <__udivdi3+0x30a> 802186c: 1a0d subs r5, r1, r0 802186e: 4641 mov r1, r8 8021870: 4628 mov r0, r5 8021872: fa1f f989 uxth.w r9, r9 8021876: f000 f833 bl 80218e0 <__aeabi_uidiv> 802187a: 4641 mov r1, r8 802187c: 4606 mov r6, r0 802187e: 4628 mov r0, r5 8021880: f000 f95c bl 8021b3c <__aeabi_uidivmod> 8021884: fb0a f506 mul.w r5, sl, r6 8021888: ea49 4101 orr.w r1, r9, r1, lsl #16 802188c: 428d cmp r5, r1 802188e: d906 bls.n 802189e <__udivdi3+0x2d6> 8021890: 1e73 subs r3, r6, #1 8021892: 1909 adds r1, r1, r4 8021894: d21f bcs.n 80218d6 <__udivdi3+0x30e> 8021896: 428d cmp r5, r1 8021898: d91d bls.n 80218d6 <__udivdi3+0x30e> 802189a: 3e02 subs r6, #2 802189c: 1909 adds r1, r1, r4 802189e: 1b4d subs r5, r1, r5 80218a0: ea46 460b orr.w r6, r6, fp, lsl #16 80218a4: e703 b.n 80216ae <__udivdi3+0xe6> 80218a6: 461e mov r6, r3 80218a8: e6df b.n 802166a <__udivdi3+0xa2> 80218aa: 4699 mov r9, r3 80218ac: e71b b.n 80216e6 <__udivdi3+0x11e> 80218ae: 461d mov r5, r3 80218b0: e733 b.n 802171a <__udivdi3+0x152> 80218b2: 428f cmp r7, r1 80218b4: bf84 itt hi 80218b6: f1ab 0b02 subhi.w fp, fp, #2 80218ba: 4441 addhi r1, r8 80218bc: f63f af7c bhi.w 80217b8 <__udivdi3+0x1f0> 80218c0: e779 b.n 80217b6 <__udivdi3+0x1ee> 80218c2: 42b8 cmp r0, r7 80218c4: bf84 itt hi 80218c6: f1aa 0a02 subhi.w sl, sl, #2 80218ca: 4447 addhi r7, r8 80218cc: f63f af5b bhi.w 8021786 <__udivdi3+0x1be> 80218d0: e758 b.n 8021784 <__udivdi3+0x1bc> 80218d2: 469b mov fp, r3 80218d4: e7ca b.n 802186c <__udivdi3+0x2a4> 80218d6: 461e mov r6, r3 80218d8: e7e1 b.n 802189e <__udivdi3+0x2d6> 80218da: bf00 nop 80218dc: 0000 movs r0, r0 80218de: 0000 movs r0, r0 080218e0 <__aeabi_uidiv>: 80218e0: 1e4a subs r2, r1, #1 80218e2: bf08 it eq 80218e4: 4770 bxeq lr 80218e6: f0c0 8124 bcc.w 8021b32 <__aeabi_uidiv+0x252> 80218ea: 4288 cmp r0, r1 80218ec: f240 8116 bls.w 8021b1c <__aeabi_uidiv+0x23c> 80218f0: 4211 tst r1, r2 80218f2: f000 8117 beq.w 8021b24 <__aeabi_uidiv+0x244> 80218f6: fab0 f380 clz r3, r0 80218fa: fab1 f281 clz r2, r1 80218fe: eba2 0303 sub.w r3, r2, r3 8021902: f1c3 031f rsb r3, r3, #31 8021906: a204 add r2, pc, #16 ; (adr r2, 8021918 <__aeabi_uidiv+0x38>) 8021908: eb02 1303 add.w r3, r2, r3, lsl #4 802190c: f04f 0200 mov.w r2, #0 8021910: 469f mov pc, r3 8021912: bf00 nop 8021914: f3af 8000 nop.w 8021918: ebb0 7fc1 cmp.w r0, r1, lsl #31 802191c: bf00 nop 802191e: eb42 0202 adc.w r2, r2, r2 8021922: bf28 it cs 8021924: eba0 70c1 subcs.w r0, r0, r1, lsl #31 8021928: ebb0 7f81 cmp.w r0, r1, lsl #30 802192c: bf00 nop 802192e: eb42 0202 adc.w r2, r2, r2 8021932: bf28 it cs 8021934: eba0 7081 subcs.w r0, r0, r1, lsl #30 8021938: ebb0 7f41 cmp.w r0, r1, lsl #29 802193c: bf00 nop 802193e: eb42 0202 adc.w r2, r2, r2 8021942: bf28 it cs 8021944: eba0 7041 subcs.w r0, r0, r1, lsl #29 8021948: ebb0 7f01 cmp.w r0, r1, lsl #28 802194c: bf00 nop 802194e: eb42 0202 adc.w r2, r2, r2 8021952: bf28 it cs 8021954: eba0 7001 subcs.w r0, r0, r1, lsl #28 8021958: ebb0 6fc1 cmp.w r0, r1, lsl #27 802195c: bf00 nop 802195e: eb42 0202 adc.w r2, r2, r2 8021962: bf28 it cs 8021964: eba0 60c1 subcs.w r0, r0, r1, lsl #27 8021968: ebb0 6f81 cmp.w r0, r1, lsl #26 802196c: bf00 nop 802196e: eb42 0202 adc.w r2, r2, r2 8021972: bf28 it cs 8021974: eba0 6081 subcs.w r0, r0, r1, lsl #26 8021978: ebb0 6f41 cmp.w r0, r1, lsl #25 802197c: bf00 nop 802197e: eb42 0202 adc.w r2, r2, r2 8021982: bf28 it cs 8021984: eba0 6041 subcs.w r0, r0, r1, lsl #25 8021988: ebb0 6f01 cmp.w r0, r1, lsl #24 802198c: bf00 nop 802198e: eb42 0202 adc.w r2, r2, r2 8021992: bf28 it cs 8021994: eba0 6001 subcs.w r0, r0, r1, lsl #24 8021998: ebb0 5fc1 cmp.w r0, r1, lsl #23 802199c: bf00 nop 802199e: eb42 0202 adc.w r2, r2, r2 80219a2: bf28 it cs 80219a4: eba0 50c1 subcs.w r0, r0, r1, lsl #23 80219a8: ebb0 5f81 cmp.w r0, r1, lsl #22 80219ac: bf00 nop 80219ae: eb42 0202 adc.w r2, r2, r2 80219b2: bf28 it cs 80219b4: eba0 5081 subcs.w r0, r0, r1, lsl #22 80219b8: ebb0 5f41 cmp.w r0, r1, lsl #21 80219bc: bf00 nop 80219be: eb42 0202 adc.w r2, r2, r2 80219c2: bf28 it cs 80219c4: eba0 5041 subcs.w r0, r0, r1, lsl #21 80219c8: ebb0 5f01 cmp.w r0, r1, lsl #20 80219cc: bf00 nop 80219ce: eb42 0202 adc.w r2, r2, r2 80219d2: bf28 it cs 80219d4: eba0 5001 subcs.w r0, r0, r1, lsl #20 80219d8: ebb0 4fc1 cmp.w r0, r1, lsl #19 80219dc: bf00 nop 80219de: eb42 0202 adc.w r2, r2, r2 80219e2: bf28 it cs 80219e4: eba0 40c1 subcs.w r0, r0, r1, lsl #19 80219e8: ebb0 4f81 cmp.w r0, r1, lsl #18 80219ec: bf00 nop 80219ee: eb42 0202 adc.w r2, r2, r2 80219f2: bf28 it cs 80219f4: eba0 4081 subcs.w r0, r0, r1, lsl #18 80219f8: ebb0 4f41 cmp.w r0, r1, lsl #17 80219fc: bf00 nop 80219fe: eb42 0202 adc.w r2, r2, r2 8021a02: bf28 it cs 8021a04: eba0 4041 subcs.w r0, r0, r1, lsl #17 8021a08: ebb0 4f01 cmp.w r0, r1, lsl #16 8021a0c: bf00 nop 8021a0e: eb42 0202 adc.w r2, r2, r2 8021a12: bf28 it cs 8021a14: eba0 4001 subcs.w r0, r0, r1, lsl #16 8021a18: ebb0 3fc1 cmp.w r0, r1, lsl #15 8021a1c: bf00 nop 8021a1e: eb42 0202 adc.w r2, r2, r2 8021a22: bf28 it cs 8021a24: eba0 30c1 subcs.w r0, r0, r1, lsl #15 8021a28: ebb0 3f81 cmp.w r0, r1, lsl #14 8021a2c: bf00 nop 8021a2e: eb42 0202 adc.w r2, r2, r2 8021a32: bf28 it cs 8021a34: eba0 3081 subcs.w r0, r0, r1, lsl #14 8021a38: ebb0 3f41 cmp.w r0, r1, lsl #13 8021a3c: bf00 nop 8021a3e: eb42 0202 adc.w r2, r2, r2 8021a42: bf28 it cs 8021a44: eba0 3041 subcs.w r0, r0, r1, lsl #13 8021a48: ebb0 3f01 cmp.w r0, r1, lsl #12 8021a4c: bf00 nop 8021a4e: eb42 0202 adc.w r2, r2, r2 8021a52: bf28 it cs 8021a54: eba0 3001 subcs.w r0, r0, r1, lsl #12 8021a58: ebb0 2fc1 cmp.w r0, r1, lsl #11 8021a5c: bf00 nop 8021a5e: eb42 0202 adc.w r2, r2, r2 8021a62: bf28 it cs 8021a64: eba0 20c1 subcs.w r0, r0, r1, lsl #11 8021a68: ebb0 2f81 cmp.w r0, r1, lsl #10 8021a6c: bf00 nop 8021a6e: eb42 0202 adc.w r2, r2, r2 8021a72: bf28 it cs 8021a74: eba0 2081 subcs.w r0, r0, r1, lsl #10 8021a78: ebb0 2f41 cmp.w r0, r1, lsl #9 8021a7c: bf00 nop 8021a7e: eb42 0202 adc.w r2, r2, r2 8021a82: bf28 it cs 8021a84: eba0 2041 subcs.w r0, r0, r1, lsl #9 8021a88: ebb0 2f01 cmp.w r0, r1, lsl #8 8021a8c: bf00 nop 8021a8e: eb42 0202 adc.w r2, r2, r2 8021a92: bf28 it cs 8021a94: eba0 2001 subcs.w r0, r0, r1, lsl #8 8021a98: ebb0 1fc1 cmp.w r0, r1, lsl #7 8021a9c: bf00 nop 8021a9e: eb42 0202 adc.w r2, r2, r2 8021aa2: bf28 it cs 8021aa4: eba0 10c1 subcs.w r0, r0, r1, lsl #7 8021aa8: ebb0 1f81 cmp.w r0, r1, lsl #6 8021aac: bf00 nop 8021aae: eb42 0202 adc.w r2, r2, r2 8021ab2: bf28 it cs 8021ab4: eba0 1081 subcs.w r0, r0, r1, lsl #6 8021ab8: ebb0 1f41 cmp.w r0, r1, lsl #5 8021abc: bf00 nop 8021abe: eb42 0202 adc.w r2, r2, r2 8021ac2: bf28 it cs 8021ac4: eba0 1041 subcs.w r0, r0, r1, lsl #5 8021ac8: ebb0 1f01 cmp.w r0, r1, lsl #4 8021acc: bf00 nop 8021ace: eb42 0202 adc.w r2, r2, r2 8021ad2: bf28 it cs 8021ad4: eba0 1001 subcs.w r0, r0, r1, lsl #4 8021ad8: ebb0 0fc1 cmp.w r0, r1, lsl #3 8021adc: bf00 nop 8021ade: eb42 0202 adc.w r2, r2, r2 8021ae2: bf28 it cs 8021ae4: eba0 00c1 subcs.w r0, r0, r1, lsl #3 8021ae8: ebb0 0f81 cmp.w r0, r1, lsl #2 8021aec: bf00 nop 8021aee: eb42 0202 adc.w r2, r2, r2 8021af2: bf28 it cs 8021af4: eba0 0081 subcs.w r0, r0, r1, lsl #2 8021af8: ebb0 0f41 cmp.w r0, r1, lsl #1 8021afc: bf00 nop 8021afe: eb42 0202 adc.w r2, r2, r2 8021b02: bf28 it cs 8021b04: eba0 0041 subcs.w r0, r0, r1, lsl #1 8021b08: ebb0 0f01 cmp.w r0, r1 8021b0c: bf00 nop 8021b0e: eb42 0202 adc.w r2, r2, r2 8021b12: bf28 it cs 8021b14: eba0 0001 subcs.w r0, r0, r1 8021b18: 4610 mov r0, r2 8021b1a: 4770 bx lr 8021b1c: bf0c ite eq 8021b1e: 2001 moveq r0, #1 8021b20: 2000 movne r0, #0 8021b22: 4770 bx lr 8021b24: fab1 f281 clz r2, r1 8021b28: f1c2 021f rsb r2, r2, #31 8021b2c: fa20 f002 lsr.w r0, r0, r2 8021b30: 4770 bx lr 8021b32: b108 cbz r0, 8021b38 <__aeabi_uidiv+0x258> 8021b34: f04f 30ff mov.w r0, #4294967295 8021b38: f7ff bb8e b.w 8021258 <__aeabi_idiv0> 08021b3c <__aeabi_uidivmod>: 8021b3c: 2900 cmp r1, #0 8021b3e: d0f8 beq.n 8021b32 <__aeabi_uidiv+0x252> 8021b40: e92d 4003 stmdb sp!, {r0, r1, lr} 8021b44: f7ff fecc bl 80218e0 <__aeabi_uidiv> 8021b48: e8bd 4006 ldmia.w sp!, {r1, r2, lr} 8021b4c: fb02 f300 mul.w r3, r2, r0 8021b50: eba1 0103 sub.w r1, r1, r3 8021b54: 4770 bx lr 8021b56: bf00 nop 08021b58 : 8021b58: 2100 movs r1, #0 8021b5a: f001 bde7 b.w 802372c 8021b5e: bf00 nop 08021b60 : 8021b60: 2100 movs r1, #0 8021b62: 220a movs r2, #10 8021b64: f001 bee2 b.w 802392c 08021b68 <_atoi_r>: 8021b68: 2200 movs r2, #0 8021b6a: 230a movs r3, #10 8021b6c: f001 be3c b.w 80237e8 <_strtol_r> 08021b70 <__libc_init_array>: 8021b70: b570 push {r4, r5, r6, lr} 8021b72: f644 3654 movw r6, #19284 ; 0x4b54 8021b76: f644 3554 movw r5, #19284 ; 0x4b54 8021b7a: f6c0 0604 movt r6, #2052 ; 0x804 8021b7e: f6c0 0504 movt r5, #2052 ; 0x804 8021b82: 1b76 subs r6, r6, r5 8021b84: 10b6 asrs r6, r6, #2 8021b86: d007 beq.n 8021b98 <__libc_init_array+0x28> 8021b88: 3d04 subs r5, #4 8021b8a: 2400 movs r4, #0 8021b8c: f855 3f04 ldr.w r3, [r5, #4]! 8021b90: 3401 adds r4, #1 8021b92: 4798 blx r3 8021b94: 42a6 cmp r6, r4 8021b96: d1f9 bne.n 8021b8c <__libc_init_array+0x1c> 8021b98: f644 3658 movw r6, #19288 ; 0x4b58 8021b9c: f644 3554 movw r5, #19284 ; 0x4b54 8021ba0: f6c0 0604 movt r6, #2052 ; 0x804 8021ba4: f6c0 0504 movt r5, #2052 ; 0x804 8021ba8: 1b76 subs r6, r6, r5 8021baa: f022 ffc3 bl 8044b34 <_init> 8021bae: 10b6 asrs r6, r6, #2 8021bb0: d008 beq.n 8021bc4 <__libc_init_array+0x54> 8021bb2: 3d04 subs r5, #4 8021bb4: 2400 movs r4, #0 8021bb6: f855 3f04 ldr.w r3, [r5, #4]! 8021bba: 3401 adds r4, #1 8021bbc: 4798 blx r3 8021bbe: 42a6 cmp r6, r4 8021bc0: d1f9 bne.n 8021bb6 <__libc_init_array+0x46> 8021bc2: bd70 pop {r4, r5, r6, pc} 8021bc4: bd70 pop {r4, r5, r6, pc} 8021bc6: bf00 nop 08021bc8 : 8021bc8: 2a03 cmp r2, #3 8021bca: b470 push {r4, r5, r6} 8021bcc: d922 bls.n 8021c14 8021bce: ea41 0300 orr.w r3, r1, r0 8021bd2: 079b lsls r3, r3, #30 8021bd4: d013 beq.n 8021bfe 8021bd6: 7805 ldrb r5, [r0, #0] 8021bd8: 3a01 subs r2, #1 8021bda: 780c ldrb r4, [r1, #0] 8021bdc: 2300 movs r3, #0 8021bde: 42a5 cmp r5, r4 8021be0: d006 beq.n 8021bf0 8021be2: e01b b.n 8021c1c 8021be4: f810 5f01 ldrb.w r5, [r0, #1]! 8021be8: f811 4f01 ldrb.w r4, [r1, #1]! 8021bec: 42a5 cmp r5, r4 8021bee: d115 bne.n 8021c1c 8021bf0: 4293 cmp r3, r2 8021bf2: f103 0301 add.w r3, r3, #1 8021bf6: d1f5 bne.n 8021be4 8021bf8: 2000 movs r0, #0 8021bfa: bc70 pop {r4, r5, r6} 8021bfc: 4770 bx lr 8021bfe: 460c mov r4, r1 8021c00: 4603 mov r3, r0 8021c02: 3104 adds r1, #4 8021c04: 3004 adds r0, #4 8021c06: 681e ldr r6, [r3, #0] 8021c08: 6825 ldr r5, [r4, #0] 8021c0a: 42ae cmp r6, r5 8021c0c: d108 bne.n 8021c20 8021c0e: 3a04 subs r2, #4 8021c10: 2a03 cmp r2, #3 8021c12: d8f4 bhi.n 8021bfe 8021c14: 2a00 cmp r2, #0 8021c16: d1de bne.n 8021bd6 8021c18: 4610 mov r0, r2 8021c1a: e7ee b.n 8021bfa 8021c1c: 1b28 subs r0, r5, r4 8021c1e: e7ec b.n 8021bfa 8021c20: 4621 mov r1, r4 8021c22: 4618 mov r0, r3 8021c24: 2a00 cmp r2, #0 8021c26: d1d6 bne.n 8021bd6 8021c28: e7f6 b.n 8021c18 8021c2a: bf00 nop 08021c2c : 8021c2c: 2a03 cmp r2, #3 8021c2e: e92d 0ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp} 8021c32: d809 bhi.n 8021c48 8021c34: b12a cbz r2, 8021c42 8021c36: 2300 movs r3, #0 8021c38: 5ccc ldrb r4, [r1, r3] 8021c3a: 54c4 strb r4, [r0, r3] 8021c3c: 3301 adds r3, #1 8021c3e: 4293 cmp r3, r2 8021c40: d1fa bne.n 8021c38 8021c42: e8bd 0ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp} 8021c46: 4770 bx lr 8021c48: 0783 lsls r3, r0, #30 8021c4a: 4402 add r2, r0 8021c4c: d00e beq.n 8021c6c 8021c4e: 1c44 adds r4, r0, #1 8021c50: 1c4d adds r5, r1, #1 8021c52: f815 7c01 ldrb.w r7, [r5, #-1] 8021c56: f004 0603 and.w r6, r4, #3 8021c5a: 4623 mov r3, r4 8021c5c: 3401 adds r4, #1 8021c5e: 4629 mov r1, r5 8021c60: 3501 adds r5, #1 8021c62: f804 7c02 strb.w r7, [r4, #-2] 8021c66: 2e00 cmp r6, #0 8021c68: d1f3 bne.n 8021c52 8021c6a: e000 b.n 8021c6e 8021c6c: 4603 mov r3, r0 8021c6e: f011 0403 ands.w r4, r1, #3 8021c72: d06d beq.n 8021d50 8021c74: 1ad7 subs r7, r2, r3 8021c76: 1b0d subs r5, r1, r4 8021c78: 2f03 cmp r7, #3 8021c7a: 682e ldr r6, [r5, #0] 8021c7c: dd19 ble.n 8021cb2 8021c7e: f1c4 0c04 rsb ip, r4, #4 8021c82: ea4f 08c4 mov.w r8, r4, lsl #3 8021c86: 1d1c adds r4, r3, #4 8021c88: ea4f 0ccc mov.w ip, ip, lsl #3 8021c8c: f855 7f04 ldr.w r7, [r5, #4]! 8021c90: ebc4 0902 rsb r9, r4, r2 8021c94: 4623 mov r3, r4 8021c96: 3104 adds r1, #4 8021c98: 3404 adds r4, #4 8021c9a: f1b9 0f03 cmp.w r9, #3 8021c9e: fa26 fa08 lsr.w sl, r6, r8 8021ca2: fa07 fb0c lsl.w fp, r7, ip 8021ca6: 463e mov r6, r7 8021ca8: ea4b 070a orr.w r7, fp, sl 8021cac: f844 7c08 str.w r7, [r4, #-8] 8021cb0: dcec bgt.n 8021c8c 8021cb2: 429a cmp r2, r3 8021cb4: d9c5 bls.n 8021c42 8021cb6: 3301 adds r3, #1 8021cb8: 3101 adds r1, #1 8021cba: 3201 adds r2, #1 8021cbc: f811 4c01 ldrb.w r4, [r1, #-1] 8021cc0: 3301 adds r3, #1 8021cc2: 3101 adds r1, #1 8021cc4: 4293 cmp r3, r2 8021cc6: f803 4c02 strb.w r4, [r3, #-2] 8021cca: d1f7 bne.n 8021cbc 8021ccc: e7b9 b.n 8021c42 8021cce: 680c ldr r4, [r1, #0] 8021cd0: 3340 adds r3, #64 ; 0x40 8021cd2: 3140 adds r1, #64 ; 0x40 8021cd4: f843 4c40 str.w r4, [r3, #-64] 8021cd8: f851 4c3c ldr.w r4, [r1, #-60] 8021cdc: f843 4c3c str.w r4, [r3, #-60] 8021ce0: f851 4c38 ldr.w r4, [r1, #-56] 8021ce4: f843 4c38 str.w r4, [r3, #-56] 8021ce8: f851 4c34 ldr.w r4, [r1, #-52] 8021cec: f843 4c34 str.w r4, [r3, #-52] 8021cf0: f851 4c30 ldr.w r4, [r1, #-48] 8021cf4: f843 4c30 str.w r4, [r3, #-48] 8021cf8: f851 4c2c ldr.w r4, [r1, #-44] 8021cfc: f843 4c2c str.w r4, [r3, #-44] 8021d00: f851 4c28 ldr.w r4, [r1, #-40] 8021d04: f843 4c28 str.w r4, [r3, #-40] 8021d08: f851 4c24 ldr.w r4, [r1, #-36] 8021d0c: f843 4c24 str.w r4, [r3, #-36] 8021d10: f851 4c20 ldr.w r4, [r1, #-32] 8021d14: f843 4c20 str.w r4, [r3, #-32] 8021d18: f851 4c1c ldr.w r4, [r1, #-28] 8021d1c: f843 4c1c str.w r4, [r3, #-28] 8021d20: f851 4c18 ldr.w r4, [r1, #-24] 8021d24: f843 4c18 str.w r4, [r3, #-24] 8021d28: f851 4c14 ldr.w r4, [r1, #-20] 8021d2c: f843 4c14 str.w r4, [r3, #-20] 8021d30: f851 4c10 ldr.w r4, [r1, #-16] 8021d34: f843 4c10 str.w r4, [r3, #-16] 8021d38: f851 4c0c ldr.w r4, [r1, #-12] 8021d3c: f843 4c0c str.w r4, [r3, #-12] 8021d40: f851 4c08 ldr.w r4, [r1, #-8] 8021d44: f843 4c08 str.w r4, [r3, #-8] 8021d48: f851 4c04 ldr.w r4, [r1, #-4] 8021d4c: f843 4c04 str.w r4, [r3, #-4] 8021d50: 1ad4 subs r4, r2, r3 8021d52: 2c3f cmp r4, #63 ; 0x3f 8021d54: dcbb bgt.n 8021cce 8021d56: e011 b.n 8021d7c 8021d58: 680c ldr r4, [r1, #0] 8021d5a: 3310 adds r3, #16 8021d5c: 3110 adds r1, #16 8021d5e: f843 4c10 str.w r4, [r3, #-16] 8021d62: f851 4c0c ldr.w r4, [r1, #-12] 8021d66: f843 4c0c str.w r4, [r3, #-12] 8021d6a: f851 4c08 ldr.w r4, [r1, #-8] 8021d6e: f843 4c08 str.w r4, [r3, #-8] 8021d72: f851 4c04 ldr.w r4, [r1, #-4] 8021d76: f843 4c04 str.w r4, [r3, #-4] 8021d7a: 1ad4 subs r4, r2, r3 8021d7c: 2c0f cmp r4, #15 8021d7e: dceb bgt.n 8021d58 8021d80: 2c03 cmp r4, #3 8021d82: dd96 ble.n 8021cb2 8021d84: 1d1c adds r4, r3, #4 8021d86: 1d0d adds r5, r1, #4 8021d88: f855 7c04 ldr.w r7, [r5, #-4] 8021d8c: 1b16 subs r6, r2, r4 8021d8e: 4623 mov r3, r4 8021d90: 4629 mov r1, r5 8021d92: 3404 adds r4, #4 8021d94: 3504 adds r5, #4 8021d96: 2e03 cmp r6, #3 8021d98: f844 7c08 str.w r7, [r4, #-8] 8021d9c: dcf4 bgt.n 8021d88 8021d9e: e788 b.n 8021cb2 08021da0 : 8021da0: 2a03 cmp r2, #3 8021da2: b2c9 uxtb r1, r1 8021da4: b470 push {r4, r5, r6} 8021da6: d808 bhi.n 8021dba 8021da8: b12a cbz r2, 8021db6 8021daa: 4603 mov r3, r0 8021dac: 1812 adds r2, r2, r0 8021dae: f803 1b01 strb.w r1, [r3], #1 8021db2: 4293 cmp r3, r2 8021db4: d1fb bne.n 8021dae 8021db6: bc70 pop {r4, r5, r6} 8021db8: 4770 bx lr 8021dba: 0783 lsls r3, r0, #30 8021dbc: 4402 add r2, r0 8021dbe: d009 beq.n 8021dd4 8021dc0: 1c44 adds r4, r0, #1 8021dc2: f004 0503 and.w r5, r4, #3 8021dc6: 4623 mov r3, r4 8021dc8: f804 1c01 strb.w r1, [r4, #-1] 8021dcc: 3401 adds r4, #1 8021dce: 2d00 cmp r5, #0 8021dd0: d1f7 bne.n 8021dc2 8021dd2: e000 b.n 8021dd6 8021dd4: 4603 mov r3, r0 8021dd6: 1ad5 subs r5, r2, r3 8021dd8: eb01 2401 add.w r4, r1, r1, lsl #8 8021ddc: 2d3f cmp r5, #63 ; 0x3f 8021dde: eb04 4404 add.w r4, r4, r4, lsl #16 8021de2: dd2c ble.n 8021e3e 8021de4: 601c str r4, [r3, #0] 8021de6: 3340 adds r3, #64 ; 0x40 8021de8: 1ad5 subs r5, r2, r3 8021dea: f843 4c3c str.w r4, [r3, #-60] 8021dee: 2d3f cmp r5, #63 ; 0x3f 8021df0: f843 4c38 str.w r4, [r3, #-56] 8021df4: f843 4c34 str.w r4, [r3, #-52] 8021df8: f843 4c30 str.w r4, [r3, #-48] 8021dfc: f843 4c2c str.w r4, [r3, #-44] 8021e00: f843 4c28 str.w r4, [r3, #-40] 8021e04: f843 4c24 str.w r4, [r3, #-36] 8021e08: f843 4c20 str.w r4, [r3, #-32] 8021e0c: f843 4c1c str.w r4, [r3, #-28] 8021e10: f843 4c18 str.w r4, [r3, #-24] 8021e14: f843 4c14 str.w r4, [r3, #-20] 8021e18: f843 4c10 str.w r4, [r3, #-16] 8021e1c: f843 4c0c str.w r4, [r3, #-12] 8021e20: f843 4c08 str.w r4, [r3, #-8] 8021e24: f843 4c04 str.w r4, [r3, #-4] 8021e28: dcdc bgt.n 8021de4 8021e2a: e008 b.n 8021e3e 8021e2c: 601c str r4, [r3, #0] 8021e2e: 3310 adds r3, #16 8021e30: 1ad5 subs r5, r2, r3 8021e32: f843 4c0c str.w r4, [r3, #-12] 8021e36: f843 4c08 str.w r4, [r3, #-8] 8021e3a: f843 4c04 str.w r4, [r3, #-4] 8021e3e: 2d0f cmp r5, #15 8021e40: dcf4 bgt.n 8021e2c 8021e42: 2d03 cmp r5, #3 8021e44: dd08 ble.n 8021e58 8021e46: 1d1d adds r5, r3, #4 8021e48: 1b56 subs r6, r2, r5 8021e4a: f845 4c04 str.w r4, [r5, #-4] 8021e4e: 2e03 cmp r6, #3 8021e50: 462b mov r3, r5 8021e52: f105 0504 add.w r5, r5, #4 8021e56: dcf7 bgt.n 8021e48 8021e58: 429a cmp r2, r3 8021e5a: d9ac bls.n 8021db6 8021e5c: 3301 adds r3, #1 8021e5e: 3201 adds r2, #1 8021e60: f803 1c01 strb.w r1, [r3, #-1] 8021e64: 3301 adds r3, #1 8021e66: 4293 cmp r3, r2 8021e68: d1fa bne.n 8021e60 8021e6a: e7a4 b.n 8021db6 08021e6c : 8021e6c: 0783 lsls r3, r0, #30 8021e6e: b570 push {r4, r5, r6, lr} 8021e70: 4606 mov r6, r0 8021e72: d114 bne.n 8021e9e 8021e74: 6803 ldr r3, [r0, #0] 8021e76: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 8021e7a: ea22 0303 bic.w r3, r2, r3 8021e7e: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 8021e82: d10c bne.n 8021e9e 8021e84: 1d03 adds r3, r0, #4 8021e86: 461a mov r2, r3 8021e88: f853 4b04 ldr.w r4, [r3], #4 8021e8c: f1a4 3501 sub.w r5, r4, #16843009 ; 0x1010101 8021e90: ea25 0404 bic.w r4, r5, r4 8021e94: f014 3f80 tst.w r4, #2155905152 ; 0x80808080 8021e98: d0f5 beq.n 8021e86 8021e9a: 4610 mov r0, r2 8021e9c: e000 b.n 8021ea0 8021e9e: 4630 mov r0, r6 8021ea0: 7803 ldrb r3, [r0, #0] 8021ea2: b12b cbz r3, 8021eb0 8021ea4: 1c43 adds r3, r0, #1 8021ea6: 4618 mov r0, r3 8021ea8: 3301 adds r3, #1 8021eaa: 7804 ldrb r4, [r0, #0] 8021eac: 2c00 cmp r4, #0 8021eae: d1fa bne.n 8021ea6 8021eb0: f000 f8f0 bl 8022094 8021eb4: 4630 mov r0, r6 8021eb6: bd70 pop {r4, r5, r6, pc} 08021eb8 : 8021eb8: ea80 0201 eor.w r2, r0, r1 8021ebc: f012 0f03 tst.w r2, #3 8021ec0: f040 803a bne.w 8021f38 8021ec4: f010 0203 ands.w r2, r0, #3 8021ec8: f020 0003 bic.w r0, r0, #3 8021ecc: f021 0103 bic.w r1, r1, #3 8021ed0: f850 cb04 ldr.w ip, [r0], #4 8021ed4: bf08 it eq 8021ed6: f851 3b04 ldreq.w r3, [r1], #4 8021eda: d00d beq.n 8021ef8 8021edc: f082 0203 eor.w r2, r2, #3 8021ee0: ea4f 02c2 mov.w r2, r2, lsl #3 8021ee4: f06f 437f mvn.w r3, #4278190080 ; 0xff000000 8021ee8: fa23 f202 lsr.w r2, r3, r2 8021eec: f851 3b04 ldr.w r3, [r1], #4 8021ef0: ea4c 0c02 orr.w ip, ip, r2 8021ef4: ea43 0302 orr.w r3, r3, r2 8021ef8: f1ac 3201 sub.w r2, ip, #16843009 ; 0x1010101 8021efc: 459c cmp ip, r3 8021efe: bf01 itttt eq 8021f00: ea22 020c biceq.w r2, r2, ip 8021f04: f012 3f80 tsteq.w r2, #2155905152 ; 0x80808080 8021f08: f850 cb04 ldreq.w ip, [r0], #4 8021f0c: f851 3b04 ldreq.w r3, [r1], #4 8021f10: d0f2 beq.n 8021ef8 8021f12: ea4f 600c mov.w r0, ip, lsl #24 8021f16: ea4f 2c1c mov.w ip, ip, lsr #8 8021f1a: 2801 cmp r0, #1 8021f1c: bf28 it cs 8021f1e: ebb0 6f03 cmpcs.w r0, r3, lsl #24 8021f22: bf08 it eq 8021f24: 0a1b lsreq r3, r3, #8 8021f26: d0f4 beq.n 8021f12 8021f28: f003 03ff and.w r3, r3, #255 ; 0xff 8021f2c: ea4f 6010 mov.w r0, r0, lsr #24 8021f30: eba0 0003 sub.w r0, r0, r3 8021f34: 4770 bx lr 8021f36: bf00 nop 08021f38 : 8021f38: f010 0f03 tst.w r0, #3 8021f3c: d00a beq.n 8021f54 8021f3e: f810 2b01 ldrb.w r2, [r0], #1 8021f42: f811 3b01 ldrb.w r3, [r1], #1 8021f46: 2a01 cmp r2, #1 8021f48: bf28 it cs 8021f4a: 429a cmpcs r2, r3 8021f4c: d0f4 beq.n 8021f38 8021f4e: eba2 0003 sub.w r0, r2, r3 8021f52: 4770 bx lr 8021f54: f84d 5d04 str.w r5, [sp, #-4]! 8021f58: f84d 4d04 str.w r4, [sp, #-4]! 8021f5c: f04f 0201 mov.w r2, #1 8021f60: ea42 2202 orr.w r2, r2, r2, lsl #8 8021f64: ea42 4202 orr.w r2, r2, r2, lsl #16 8021f68: f001 0c03 and.w ip, r1, #3 8021f6c: f021 0103 bic.w r1, r1, #3 8021f70: f850 4b04 ldr.w r4, [r0], #4 8021f74: f851 5b04 ldr.w r5, [r1], #4 8021f78: f1bc 0f02 cmp.w ip, #2 8021f7c: d026 beq.n 8021fcc 8021f7e: d84b bhi.n 8022018 8021f80: f024 4c7f bic.w ip, r4, #4278190080 ; 0xff000000 8021f84: ebbc 2f15 cmp.w ip, r5, lsr #8 8021f88: eba4 0302 sub.w r3, r4, r2 8021f8c: ea23 0304 bic.w r3, r3, r4 8021f90: d10d bne.n 8021fae 8021f92: ea13 13c2 ands.w r3, r3, r2, lsl #7 8021f96: bf08 it eq 8021f98: f851 5b04 ldreq.w r5, [r1], #4 8021f9c: d10a bne.n 8021fb4 8021f9e: ea8c 0c04 eor.w ip, ip, r4 8021fa2: ebbc 6f05 cmp.w ip, r5, lsl #24 8021fa6: d10c bne.n 8021fc2 8021fa8: f850 4b04 ldr.w r4, [r0], #4 8021fac: e7e8 b.n 8021f80 8021fae: ea4f 2515 mov.w r5, r5, lsr #8 8021fb2: e05c b.n 802206e 8021fb4: f033 437f bics.w r3, r3, #4278190080 ; 0xff000000 8021fb8: d152 bne.n 8022060 8021fba: 780d ldrb r5, [r1, #0] 8021fbc: ea4f 6c14 mov.w ip, r4, lsr #24 8021fc0: e055 b.n 802206e 8021fc2: ea4f 6c14 mov.w ip, r4, lsr #24 8021fc6: f005 05ff and.w r5, r5, #255 ; 0xff 8021fca: e050 b.n 802206e 8021fcc: ea4f 4c04 mov.w ip, r4, lsl #16 8021fd0: eba4 0302 sub.w r3, r4, r2 8021fd4: ea4f 4c1c mov.w ip, ip, lsr #16 8021fd8: ea23 0304 bic.w r3, r3, r4 8021fdc: ebbc 4f15 cmp.w ip, r5, lsr #16 8021fe0: d117 bne.n 8022012 8021fe2: ea13 13c2 ands.w r3, r3, r2, lsl #7 8021fe6: bf08 it eq 8021fe8: f851 5b04 ldreq.w r5, [r1], #4 8021fec: d107 bne.n 8021ffe 8021fee: ea8c 0c04 eor.w ip, ip, r4 8021ff2: ebbc 4f05 cmp.w ip, r5, lsl #16 8021ff6: d108 bne.n 802200a 8021ff8: f850 4b04 ldr.w r4, [r0], #4 8021ffc: e7e6 b.n 8021fcc 8021ffe: 041b lsls r3, r3, #16 8022000: d12e bne.n 8022060 8022002: 880d ldrh r5, [r1, #0] 8022004: ea4f 4c14 mov.w ip, r4, lsr #16 8022008: e031 b.n 802206e 802200a: ea4f 4505 mov.w r5, r5, lsl #16 802200e: ea4f 4c14 mov.w ip, r4, lsr #16 8022012: ea4f 4515 mov.w r5, r5, lsr #16 8022016: e02a b.n 802206e 8022018: f004 0cff and.w ip, r4, #255 ; 0xff 802201c: ebbc 6f15 cmp.w ip, r5, lsr #24 8022020: eba4 0302 sub.w r3, r4, r2 8022024: ea23 0304 bic.w r3, r3, r4 8022028: d10d bne.n 8022046 802202a: ea13 13c2 ands.w r3, r3, r2, lsl #7 802202e: bf08 it eq 8022030: f851 5b04 ldreq.w r5, [r1], #4 8022034: d10a bne.n 802204c 8022036: ea8c 0c04 eor.w ip, ip, r4 802203a: ebbc 2f05 cmp.w ip, r5, lsl #8 802203e: d10a bne.n 8022056 8022040: f850 4b04 ldr.w r4, [r0], #4 8022044: e7e8 b.n 8022018 8022046: ea4f 6515 mov.w r5, r5, lsr #24 802204a: e010 b.n 802206e 802204c: f014 0fff tst.w r4, #255 ; 0xff 8022050: d006 beq.n 8022060 8022052: f851 5b04 ldr.w r5, [r1], #4 8022056: ea4f 2c14 mov.w ip, r4, lsr #8 802205a: f025 457f bic.w r5, r5, #4278190080 ; 0xff000000 802205e: e006 b.n 802206e 8022060: f04f 0000 mov.w r0, #0 8022064: f85d 4b04 ldr.w r4, [sp], #4 8022068: f85d 5b04 ldr.w r5, [sp], #4 802206c: 4770 bx lr 802206e: f00c 02ff and.w r2, ip, #255 ; 0xff 8022072: f005 00ff and.w r0, r5, #255 ; 0xff 8022076: 2801 cmp r0, #1 8022078: bf28 it cs 802207a: 4290 cmpcs r0, r2 802207c: bf04 itt eq 802207e: ea4f 2c1c moveq.w ip, ip, lsr #8 8022082: 0a2d lsreq r5, r5, #8 8022084: d0f3 beq.n 802206e 8022086: eba2 0000 sub.w r0, r2, r0 802208a: f85d 4b04 ldr.w r4, [sp], #4 802208e: f85d 5b04 ldr.w r5, [sp], #4 8022092: 4770 bx lr 08022094 : 8022094: ea80 0201 eor.w r2, r0, r1 8022098: 4684 mov ip, r0 802209a: f012 0f03 tst.w r2, #3 802209e: d14f bne.n 8022140 80220a0: f011 0f03 tst.w r1, #3 80220a4: d132 bne.n 802210c 80220a6: f84d 4d04 str.w r4, [sp, #-4]! 80220aa: f011 0f04 tst.w r1, #4 80220ae: f851 3b04 ldr.w r3, [r1], #4 80220b2: d00b beq.n 80220cc 80220b4: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 80220b8: 439a bics r2, r3 80220ba: f012 3f80 tst.w r2, #2155905152 ; 0x80808080 80220be: bf04 itt eq 80220c0: f84c 3b04 streq.w r3, [ip], #4 80220c4: f851 3b04 ldreq.w r3, [r1], #4 80220c8: d116 bne.n 80220f8 80220ca: bf00 nop 80220cc: f851 4b04 ldr.w r4, [r1], #4 80220d0: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 80220d4: 439a bics r2, r3 80220d6: f012 3f80 tst.w r2, #2155905152 ; 0x80808080 80220da: f1a4 3201 sub.w r2, r4, #16843009 ; 0x1010101 80220de: d10b bne.n 80220f8 80220e0: f84c 3b04 str.w r3, [ip], #4 80220e4: 43a2 bics r2, r4 80220e6: f012 3f80 tst.w r2, #2155905152 ; 0x80808080 80220ea: bf04 itt eq 80220ec: f851 3b04 ldreq.w r3, [r1], #4 80220f0: f84c 4b04 streq.w r4, [ip], #4 80220f4: d0ea beq.n 80220cc 80220f6: 4623 mov r3, r4 80220f8: f80c 3b01 strb.w r3, [ip], #1 80220fc: f013 0fff tst.w r3, #255 ; 0xff 8022100: ea4f 2333 mov.w r3, r3, ror #8 8022104: d1f8 bne.n 80220f8 8022106: f85d 4b04 ldr.w r4, [sp], #4 802210a: 4770 bx lr 802210c: f011 0f01 tst.w r1, #1 8022110: d006 beq.n 8022120 8022112: f811 2b01 ldrb.w r2, [r1], #1 8022116: f80c 2b01 strb.w r2, [ip], #1 802211a: 2a00 cmp r2, #0 802211c: bf08 it eq 802211e: 4770 bxeq lr 8022120: f011 0f02 tst.w r1, #2 8022124: d0bf beq.n 80220a6 8022126: f831 2b02 ldrh.w r2, [r1], #2 802212a: f012 0fff tst.w r2, #255 ; 0xff 802212e: bf16 itet ne 8022130: f82c 2b02 strhne.w r2, [ip], #2 8022134: f88c 2000 strbeq.w r2, [ip] 8022138: f412 4f7f tstne.w r2, #65280 ; 0xff00 802213c: d1b3 bne.n 80220a6 802213e: 4770 bx lr 8022140: f811 2b01 ldrb.w r2, [r1], #1 8022144: f80c 2b01 strb.w r2, [ip], #1 8022148: 2a00 cmp r2, #0 802214a: d1f9 bne.n 8022140 802214c: 4770 bx lr 802214e: bf00 nop 08022150 : 8022150: f020 0103 bic.w r1, r0, #3 8022154: f010 0003 ands.w r0, r0, #3 8022158: f1c0 0000 rsb r0, r0, #0 802215c: f851 3b04 ldr.w r3, [r1], #4 8022160: f100 0c04 add.w ip, r0, #4 8022164: ea4f 0ccc mov.w ip, ip, lsl #3 8022168: f06f 0200 mvn.w r2, #0 802216c: bf1c itt ne 802216e: fa22 f20c lsrne.w r2, r2, ip 8022172: 4313 orrne r3, r2 8022174: f04f 0c01 mov.w ip, #1 8022178: ea4c 2c0c orr.w ip, ip, ip, lsl #8 802217c: ea4c 4c0c orr.w ip, ip, ip, lsl #16 8022180: eba3 020c sub.w r2, r3, ip 8022184: ea22 0203 bic.w r2, r2, r3 8022188: ea12 12cc ands.w r2, r2, ip, lsl #7 802218c: bf04 itt eq 802218e: f851 3b04 ldreq.w r3, [r1], #4 8022192: 3004 addeq r0, #4 8022194: d0f4 beq.n 8022180 8022196: f013 0fff tst.w r3, #255 ; 0xff 802219a: bf1f itttt ne 802219c: 3001 addne r0, #1 802219e: f413 4f7f tstne.w r3, #65280 ; 0xff00 80221a2: 3001 addne r0, #1 80221a4: f413 0f7f tstne.w r3, #16711680 ; 0xff0000 80221a8: bf18 it ne 80221aa: 3001 addne r0, #1 80221ac: 4770 bx lr 80221ae: bf00 nop 080221b0 : 80221b0: 0783 lsls r3, r0, #30 80221b2: b470 push {r4, r5, r6} 80221b4: d113 bne.n 80221de 80221b6: 6803 ldr r3, [r0, #0] 80221b8: f1a3 3401 sub.w r4, r3, #16843009 ; 0x1010101 80221bc: ea24 0303 bic.w r3, r4, r3 80221c0: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 80221c4: d10b bne.n 80221de 80221c6: 1d03 adds r3, r0, #4 80221c8: 461d mov r5, r3 80221ca: f853 4b04 ldr.w r4, [r3], #4 80221ce: f1a4 3601 sub.w r6, r4, #16843009 ; 0x1010101 80221d2: ea26 0404 bic.w r4, r6, r4 80221d6: f014 3f80 tst.w r4, #2155905152 ; 0x80808080 80221da: d0f5 beq.n 80221c8 80221dc: e000 b.n 80221e0 80221de: 4605 mov r5, r0 80221e0: 782b ldrb r3, [r5, #0] 80221e2: b12b cbz r3, 80221f0 80221e4: 1c6b adds r3, r5, #1 80221e6: 461d mov r5, r3 80221e8: 3301 adds r3, #1 80221ea: 782c ldrb r4, [r5, #0] 80221ec: 2c00 cmp r4, #0 80221ee: d1fa bne.n 80221e6 80221f0: 3901 subs r1, #1 80221f2: 3d01 subs r5, #1 80221f4: 1e53 subs r3, r2, #1 80221f6: b15a cbz r2, 8022210 80221f8: f811 4f01 ldrb.w r4, [r1, #1]! 80221fc: 461a mov r2, r3 80221fe: f805 4f01 strb.w r4, [r5, #1]! 8022202: b12c cbz r4, 8022210 8022204: 2b00 cmp r3, #0 8022206: d1f5 bne.n 80221f4 8022208: 706b strb r3, [r5, #1] 802220a: 1e53 subs r3, r2, #1 802220c: 2a00 cmp r2, #0 802220e: d1f3 bne.n 80221f8 8022210: bc70 pop {r4, r5, r6} 8022212: 4770 bx lr 08022214 : 8022214: b470 push {r4, r5, r6} 8022216: 2a00 cmp r2, #0 8022218: d045 beq.n 80222a6 802221a: ea41 0300 orr.w r3, r1, r0 802221e: f013 0303 ands.w r3, r3, #3 8022222: d129 bne.n 8022278 8022224: 2a03 cmp r2, #3 8022226: d927 bls.n 8022278 8022228: 6805 ldr r5, [r0, #0] 802222a: 680c ldr r4, [r1, #0] 802222c: 42a5 cmp r5, r4 802222e: d123 bne.n 8022278 8022230: 1f14 subs r4, r2, #4 8022232: d03a beq.n 80222aa 8022234: f1a5 3201 sub.w r2, r5, #16843009 ; 0x1010101 8022238: ea22 0505 bic.w r5, r2, r5 802223c: f015 3f80 tst.w r5, #2155905152 ; 0x80808080 8022240: d00d beq.n 802225e 8022242: e03a b.n 80222ba 8022244: 685b ldr r3, [r3, #4] 8022246: 686a ldr r2, [r5, #4] 8022248: f1a3 3501 sub.w r5, r3, #16843009 ; 0x1010101 802224c: 4293 cmp r3, r2 802224e: ea25 0503 bic.w r5, r5, r3 8022252: d12e bne.n 80222b2 8022254: 3c04 subs r4, #4 8022256: d028 beq.n 80222aa 8022258: f015 3f80 tst.w r5, #2155905152 ; 0x80808080 802225c: d127 bne.n 80222ae 802225e: 460d mov r5, r1 8022260: 4603 mov r3, r0 8022262: 3104 adds r1, #4 8022264: 3004 adds r0, #4 8022266: 2c03 cmp r4, #3 8022268: d8ec bhi.n 8022244 802226a: 1e66 subs r6, r4, #1 802226c: b92c cbnz r4, 802227a 802226e: 791c ldrb r4, [r3, #4] 8022270: 792a ldrb r2, [r5, #4] 8022272: 1aa0 subs r0, r4, r2 8022274: bc70 pop {r4, r5, r6} 8022276: 4770 bx lr 8022278: 1e56 subs r6, r2, #1 802227a: 7804 ldrb r4, [r0, #0] 802227c: 780a ldrb r2, [r1, #0] 802227e: 4294 cmp r4, r2 8022280: d1f7 bne.n 8022272 8022282: b1c6 cbz r6, 80222b6 8022284: b18c cbz r4, 80222aa 8022286: 3601 adds r6, #1 8022288: 1c8b adds r3, r1, #2 802228a: 1989 adds r1, r1, r6 802228c: e004 b.n 8022298 802228e: 428b cmp r3, r1 8022290: f103 0301 add.w r3, r3, #1 8022294: d00b beq.n 80222ae 8022296: b144 cbz r4, 80222aa 8022298: f813 2c01 ldrb.w r2, [r3, #-1] 802229c: f810 4f01 ldrb.w r4, [r0, #1]! 80222a0: 4294 cmp r4, r2 80222a2: d0f4 beq.n 802228e 80222a4: e7e5 b.n 8022272 80222a6: 4610 mov r0, r2 80222a8: e7e4 b.n 8022274 80222aa: 4620 mov r0, r4 80222ac: e7e2 b.n 8022274 80222ae: 2000 movs r0, #0 80222b0: e7e0 b.n 8022274 80222b2: 1e66 subs r6, r4, #1 80222b4: e7e1 b.n 802227a 80222b6: 4630 mov r0, r6 80222b8: e7dc b.n 8022274 80222ba: 4618 mov r0, r3 80222bc: e7da b.n 8022274 80222be: bf00 nop 080222c0 : 80222c0: ea41 0300 orr.w r3, r1, r0 80222c4: f013 0f03 tst.w r3, #3 80222c8: 4603 mov r3, r0 80222ca: b470 push {r4, r5, r6} 80222cc: d025 beq.n 802231a 80222ce: b1aa cbz r2, 80222fc 80222d0: 780c ldrb r4, [r1, #0] 80222d2: 3a01 subs r2, #1 80222d4: f803 4b01 strb.w r4, [r3], #1 80222d8: b14c cbz r4, 80222ee 80222da: 461c mov r4, r3 80222dc: b172 cbz r2, 80222fc 80222de: f811 5f01 ldrb.w r5, [r1, #1]! 80222e2: 3a01 subs r2, #1 80222e4: f804 5b01 strb.w r5, [r4], #1 80222e8: 4623 mov r3, r4 80222ea: 2d00 cmp r5, #0 80222ec: d1f6 bne.n 80222dc 80222ee: b12a cbz r2, 80222fc 80222f0: 189a adds r2, r3, r2 80222f2: 2100 movs r1, #0 80222f4: f803 1b01 strb.w r1, [r3], #1 80222f8: 4293 cmp r3, r2 80222fa: d1fb bne.n 80222f4 80222fc: bc70 pop {r4, r5, r6} 80222fe: 4770 bx lr 8022300: 460e mov r6, r1 8022302: f851 4b04 ldr.w r4, [r1], #4 8022306: f1a4 3501 sub.w r5, r4, #16843009 ; 0x1010101 802230a: ea25 0504 bic.w r5, r5, r4 802230e: f015 3f80 tst.w r5, #2155905152 ; 0x80808080 8022312: d105 bne.n 8022320 8022314: 3a04 subs r2, #4 8022316: f843 4b04 str.w r4, [r3], #4 802231a: 2a03 cmp r2, #3 802231c: d8f0 bhi.n 8022300 802231e: e7d6 b.n 80222ce 8022320: 4631 mov r1, r6 8022322: e7d4 b.n 80222ce 08022324 : 8022324: b4f0 push {r4, r5, r6, r7} 8022326: 7804 ldrb r4, [r0, #0] 8022328: 2c00 cmp r4, #0 802232a: d021 beq.n 8022370 802232c: 780f ldrb r7, [r1, #0] 802232e: 4606 mov r6, r0 8022330: 4630 mov r0, r6 8022332: b1af cbz r7, 8022360 8022334: 42a7 cmp r7, r4 8022336: d019 beq.n 802236c 8022338: 1c4b adds r3, r1, #1 802233a: e001 b.n 8022340 802233c: 4294 cmp r4, r2 802233e: d009 beq.n 8022354 8022340: 461d mov r5, r3 8022342: f813 2b01 ldrb.w r2, [r3], #1 8022346: 2a00 cmp r2, #0 8022348: d1f8 bne.n 802233c 802234a: 7844 ldrb r4, [r0, #1] 802234c: 3601 adds r6, #1 802234e: 2c00 cmp r4, #0 8022350: d1ee bne.n 8022330 8022352: 782a ldrb r2, [r5, #0] 8022354: 2a00 cmp r2, #0 8022356: bf14 ite ne 8022358: 4630 movne r0, r6 802235a: 2000 moveq r0, #0 802235c: bcf0 pop {r4, r5, r6, r7} 802235e: 4770 bx lr 8022360: 7844 ldrb r4, [r0, #1] 8022362: 460d mov r5, r1 8022364: 3601 adds r6, #1 8022366: 2c00 cmp r4, #0 8022368: d1e2 bne.n 8022330 802236a: e7f2 b.n 8022352 802236c: 463a mov r2, r7 802236e: e7f1 b.n 8022354 8022370: 4620 mov r0, r4 8022372: e7f3 b.n 802235c 08022374 : 8022374: e92d 07f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl} 8022378: 2701 movs r7, #1 802237a: 463c mov r4, r7 802237c: 2500 movs r5, #0 802237e: f04f 36ff mov.w r6, #4294967295 8022382: 1963 adds r3, r4, r5 8022384: eb00 0c06 add.w ip, r0, r6 8022388: 428b cmp r3, r1 802238a: d20d bcs.n 80223a8 802238c: f81c c004 ldrb.w ip, [ip, r4] 8022390: f810 8003 ldrb.w r8, [r0, r3] 8022394: 45e0 cmp r8, ip 8022396: d22e bcs.n 80223f6 8022398: 2401 movs r4, #1 802239a: 461d mov r5, r3 802239c: 1b9f subs r7, r3, r6 802239e: 1963 adds r3, r4, r5 80223a0: 428b cmp r3, r1 80223a2: eb00 0c06 add.w ip, r0, r6 80223a6: d3f1 bcc.n 802238c 80223a8: f04f 0a01 mov.w sl, #1 80223ac: 2500 movs r5, #0 80223ae: 4654 mov r4, sl 80223b0: f04f 3cff mov.w ip, #4294967295 80223b4: 6017 str r7, [r2, #0] 80223b6: 1963 adds r3, r4, r5 80223b8: eb00 080c add.w r8, r0, ip 80223bc: 4299 cmp r1, r3 80223be: d90e bls.n 80223de 80223c0: f818 8004 ldrb.w r8, [r8, r4] 80223c4: f810 9003 ldrb.w r9, [r0, r3] 80223c8: 45c1 cmp r9, r8 80223ca: d91a bls.n 8022402 80223cc: 2401 movs r4, #1 80223ce: 461d mov r5, r3 80223d0: ebcc 0a03 rsb sl, ip, r3 80223d4: 1963 adds r3, r4, r5 80223d6: 4299 cmp r1, r3 80223d8: eb00 080c add.w r8, r0, ip 80223dc: d8f0 bhi.n 80223c0 80223de: f10c 0001 add.w r0, ip, #1 80223e2: 3601 adds r6, #1 80223e4: 42b0 cmp r0, r6 80223e6: bf3c itt cc 80223e8: 46ba movcc sl, r7 80223ea: 4630 movcc r0, r6 80223ec: f8c2 a000 str.w sl, [r2] 80223f0: e8bd 07f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl} 80223f4: 4770 bx lr 80223f6: d00b beq.n 8022410 80223f8: 2701 movs r7, #1 80223fa: 462e mov r6, r5 80223fc: 463c mov r4, r7 80223fe: 19ed adds r5, r5, r7 8022400: e7bf b.n 8022382 8022402: d009 beq.n 8022418 8022404: f04f 0a01 mov.w sl, #1 8022408: 46ac mov ip, r5 802240a: 4654 mov r4, sl 802240c: 4455 add r5, sl 802240e: e7d2 b.n 80223b6 8022410: 42bc cmp r4, r7 8022412: d005 beq.n 8022420 8022414: 3401 adds r4, #1 8022416: e7b4 b.n 8022382 8022418: 4554 cmp r4, sl 802241a: d005 beq.n 8022428 802241c: 3401 adds r4, #1 802241e: e7ca b.n 80223b6 8022420: 4627 mov r7, r4 8022422: 461d mov r5, r3 8022424: 2401 movs r4, #1 8022426: e7ac b.n 8022382 8022428: 46a2 mov sl, r4 802242a: 461d mov r5, r3 802242c: 2401 movs r4, #1 802242e: e7c2 b.n 80223b6 08022430 : 8022430: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8022434: f2ad 4d24 subw sp, sp, #1060 ; 0x424 8022438: 4616 mov r6, r2 802243a: 4680 mov r8, r0 802243c: 460c mov r4, r1 802243e: 4610 mov r0, r2 8022440: 4619 mov r1, r3 8022442: aa07 add r2, sp, #28 8022444: 461d mov r5, r3 8022446: f7ff ff95 bl 8022374 802244a: ab07 add r3, sp, #28 802244c: f20d 421c addw r2, sp, #1052 ; 0x41c 8022450: 9003 str r0, [sp, #12] 8022452: f843 5f04 str.w r5, [r3, #4]! 8022456: 4293 cmp r3, r2 8022458: d1fb bne.n 8022452 802245a: 1e6f subs r7, r5, #1 802245c: 2300 movs r3, #0 802245e: a808 add r0, sp, #32 8022460: b135 cbz r5, 8022470 8022462: 5cf2 ldrb r2, [r6, r3] 8022464: 1af9 subs r1, r7, r3 8022466: 3301 adds r3, #1 8022468: 42ab cmp r3, r5 802246a: f840 1022 str.w r1, [r0, r2, lsl #2] 802246e: d1f8 bne.n 8022462 8022470: 9907 ldr r1, [sp, #28] 8022472: 4630 mov r0, r6 8022474: 9a03 ldr r2, [sp, #12] 8022476: 1871 adds r1, r6, r1 8022478: f7ff fba6 bl 8021bc8 802247c: 2800 cmp r0, #0 802247e: d17f bne.n 8022580 8022480: f8dd c00c ldr.w ip, [sp, #12] 8022484: 4622 mov r2, r4 8022486: 4682 mov sl, r0 8022488: 1e6f subs r7, r5, #1 802248a: f10c 3cff add.w ip, ip, #4294967295 802248e: f8cd c008 str.w ip, [sp, #8] 8022492: 44b4 add ip, r6 8022494: f8cd c014 str.w ip, [sp, #20] 8022498: f8dd c00c ldr.w ip, [sp, #12] 802249c: 4604 mov r4, r0 802249e: 9501 str r5, [sp, #4] 80224a0: f1cc 0c01 rsb ip, ip, #1 80224a4: f8cd c010 str.w ip, [sp, #16] 80224a8: e009 b.n 80224be 80224aa: b134 cbz r4, 80224ba 80224ac: 9a07 ldr r2, [sp, #28] 80224ae: 4293 cmp r3, r2 80224b0: bf3e ittt cc 80224b2: 4604 movcc r4, r0 80224b4: 9901 ldrcc r1, [sp, #4] 80224b6: ebc2 0301 rsbcc r3, r2, r1 80224ba: 449a add sl, r3 80224bc: 462a mov r2, r5 80224be: 9b01 ldr r3, [sp, #4] 80224c0: eb08 0002 add.w r0, r8, r2 80224c4: 2100 movs r1, #0 80224c6: eb0a 0503 add.w r5, sl, r3 80224ca: 1aaa subs r2, r5, r2 80224cc: f002 fa90 bl 80249f0 80224d0: 2800 cmp r0, #0 80224d2: d14f bne.n 8022574 80224d4: 2d00 cmp r5, #0 80224d6: d04d beq.n 8022574 80224d8: eb08 0305 add.w r3, r8, r5 80224dc: a908 add r1, sp, #32 80224de: f813 3c01 ldrb.w r3, [r3, #-1] 80224e2: f851 3023 ldr.w r3, [r1, r3, lsl #2] 80224e6: 2b00 cmp r3, #0 80224e8: d1df bne.n 80224aa 80224ea: 9a03 ldr r2, [sp, #12] 80224ec: 4294 cmp r4, r2 80224ee: bf28 it cs 80224f0: 4622 movcs r2, r4 80224f2: 42ba cmp r2, r7 80224f4: d211 bcs.n 802251a 80224f6: eb08 030a add.w r3, r8, sl 80224fa: f816 c002 ldrb.w ip, [r6, r2] 80224fe: 18b1 adds r1, r6, r2 8022500: 5c98 ldrb r0, [r3, r2] 8022502: 4584 cmp ip, r0 8022504: d006 beq.n 8022514 8022506: e02f b.n 8022568 8022508: f811 0f01 ldrb.w r0, [r1, #1]! 802250c: f813 c002 ldrb.w ip, [r3, r2] 8022510: 4584 cmp ip, r0 8022512: d129 bne.n 8022568 8022514: 3201 adds r2, #1 8022516: 42ba cmp r2, r7 8022518: d3f6 bcc.n 8022508 802251a: 9b03 ldr r3, [sp, #12] 802251c: 9802 ldr r0, [sp, #8] 802251e: 429c cmp r4, r3 8022520: bf28 it cs 8022522: 4618 movcs r0, r3 8022524: d218 bcs.n 8022558 8022526: f8dd c008 ldr.w ip, [sp, #8] 802252a: eb08 030a add.w r3, r8, sl 802252e: f816 100c ldrb.w r1, [r6, ip] 8022532: f813 200c ldrb.w r2, [r3, ip] 8022536: 4291 cmp r1, r2 8022538: f040 8085 bne.w 8022646 802253c: 9a05 ldr r2, [sp, #20] 802253e: eb06 0b04 add.w fp, r6, r4 8022542: e006 b.n 8022552 8022544: f813 c001 ldrb.w ip, [r3, r1] 8022548: f812 9d01 ldrb.w r9, [r2, #-1]! 802254c: 45e1 cmp r9, ip 802254e: d103 bne.n 8022558 8022550: 4608 mov r0, r1 8022552: 1e41 subs r1, r0, #1 8022554: 455a cmp r2, fp 8022556: d1f5 bne.n 8022544 8022558: 3401 adds r4, #1 802255a: 4284 cmp r4, r0 802255c: d875 bhi.n 802264a 802255e: 9c07 ldr r4, [sp, #28] 8022560: 9b01 ldr r3, [sp, #4] 8022562: 44a2 add sl, r4 8022564: 1b1c subs r4, r3, r4 8022566: e7a9 b.n 80224bc 8022568: f8dd c010 ldr.w ip, [sp, #16] 802256c: 2400 movs r4, #0 802256e: 44e2 add sl, ip 8022570: 4492 add sl, r2 8022572: e7a3 b.n 80224bc 8022574: 2000 movs r0, #0 8022576: b009 add sp, #36 ; 0x24 8022578: f50d 6d80 add.w sp, sp, #1024 ; 0x400 802257c: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8022580: f8dd c00c ldr.w ip, [sp, #12] 8022584: f04f 0a00 mov.w sl, #0 8022588: f8dd b00c ldr.w fp, [sp, #12] 802258c: f10d 0920 add.w r9, sp, #32 8022590: ebcc 0305 rsb r3, ip, r5 8022594: 1e6f subs r7, r5, #1 8022596: 4563 cmp r3, ip 8022598: bf38 it cc 802259a: 4663 movcc r3, ip 802259c: 4622 mov r2, r4 802259e: 3301 adds r3, #1 80225a0: 9307 str r3, [sp, #28] 80225a2: f10c 33ff add.w r3, ip, #4294967295 80225a6: 9301 str r3, [sp, #4] 80225a8: 9b03 ldr r3, [sp, #12] 80225aa: 44b4 add ip, r6 80225ac: f8cd c008 str.w ip, [sp, #8] 80225b0: f1c3 0301 rsb r3, r3, #1 80225b4: 9304 str r3, [sp, #16] 80225b6: eb0a 0405 add.w r4, sl, r5 80225ba: eb08 0002 add.w r0, r8, r2 80225be: 2100 movs r1, #0 80225c0: 1aa2 subs r2, r4, r2 80225c2: f002 fa15 bl 80249f0 80225c6: 2800 cmp r0, #0 80225c8: d1d4 bne.n 8022574 80225ca: 2c00 cmp r4, #0 80225cc: d0d2 beq.n 8022574 80225ce: eb08 0304 add.w r3, r8, r4 80225d2: f813 3c01 ldrb.w r3, [r3, #-1] 80225d6: f859 3023 ldr.w r3, [r9, r3, lsl #2] 80225da: bb63 cbnz r3, 8022636 80225dc: 45bb cmp fp, r7 80225de: eb08 000a add.w r0, r8, sl 80225e2: d215 bcs.n 8022610 80225e4: f8dd c008 ldr.w ip, [sp, #8] 80225e8: f810 300b ldrb.w r3, [r0, fp] 80225ec: f89c 2000 ldrb.w r2, [ip] 80225f0: 429a cmp r2, r3 80225f2: bf18 it ne 80225f4: 465b movne r3, fp 80225f6: d121 bne.n 802263c 80225f8: 9a02 ldr r2, [sp, #8] 80225fa: 465b mov r3, fp 80225fc: e005 b.n 802260a 80225fe: f812 1f01 ldrb.w r1, [r2, #1]! 8022602: f810 c003 ldrb.w ip, [r0, r3] 8022606: 458c cmp ip, r1 8022608: d118 bne.n 802263c 802260a: 3301 adds r3, #1 802260c: 42bb cmp r3, r7 802260e: d3f6 bcc.n 80225fe 8022610: 9b01 ldr r3, [sp, #4] 8022612: 1c5a adds r2, r3, #1 8022614: d0af beq.n 8022576 8022616: f8dd c004 ldr.w ip, [sp, #4] 802261a: f816 100c ldrb.w r1, [r6, ip] 802261e: f810 200c ldrb.w r2, [r0, ip] 8022622: 4291 cmp r1, r2 8022624: d106 bne.n 8022634 8022626: f113 33ff adds.w r3, r3, #4294967295 802262a: d3a4 bcc.n 8022576 802262c: 5cf1 ldrb r1, [r6, r3] 802262e: 5cc2 ldrb r2, [r0, r3] 8022630: 4291 cmp r1, r2 8022632: d0f8 beq.n 8022626 8022634: 9b07 ldr r3, [sp, #28] 8022636: 449a add sl, r3 8022638: 4622 mov r2, r4 802263a: e7bc b.n 80225b6 802263c: f8dd c010 ldr.w ip, [sp, #16] 8022640: 44e2 add sl, ip 8022642: 449a add sl, r3 8022644: e7f8 b.n 8022638 8022646: 9803 ldr r0, [sp, #12] 8022648: e786 b.n 8022558 802264a: eb08 000a add.w r0, r8, sl 802264e: e792 b.n 8022576 08022650 : 8022650: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8022654: 4680 mov r8, r0 8022656: 7803 ldrb r3, [r0, #0] 8022658: b087 sub sp, #28 802265a: 460e mov r6, r1 802265c: 2b00 cmp r3, #0 802265e: f000 80f7 beq.w 8022850 8022662: 780a ldrb r2, [r1, #0] 8022664: b19a cbz r2, 802268e 8022666: 4684 mov ip, r0 8022668: 3101 adds r1, #1 802266a: 2701 movs r7, #1 802266c: e002 b.n 8022674 802266e: f811 2b01 ldrb.w r2, [r1], #1 8022672: b15a cbz r2, 802268c 8022674: 4293 cmp r3, r2 8022676: bf14 ite ne 8022678: 2700 movne r7, #0 802267a: f007 0701 andeq.w r7, r7, #1 802267e: f81c 3f01 ldrb.w r3, [ip, #1]! 8022682: 460d mov r5, r1 8022684: 2b00 cmp r3, #0 8022686: d1f2 bne.n 802266e 8022688: 782b ldrb r3, [r5, #0] 802268a: bb03 cbnz r3, 80226ce 802268c: b11f cbz r7, 8022696 802268e: 4640 mov r0, r8 8022690: b007 add sp, #28 8022692: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8022696: f108 0001 add.w r0, r8, #1 802269a: 7831 ldrb r1, [r6, #0] 802269c: f002 fe92 bl 80253c4 80226a0: 1bad subs r5, r5, r6 80226a2: 2d01 cmp r5, #1 80226a4: bf18 it ne 80226a6: 2800 cmpne r0, #0 80226a8: 4607 mov r7, r0 80226aa: bf08 it eq 80226ac: 4680 moveq r8, r0 80226ae: d0ee beq.n 802268e 80226b0: 44a8 add r8, r5 80226b2: 4540 cmp r0, r8 80226b4: bf94 ite ls 80226b6: ebc0 0408 rsbls r4, r0, r8 80226ba: 2401 movhi r4, #1 80226bc: 2d1f cmp r5, #31 80226be: d909 bls.n 80226d4 80226c0: 4621 mov r1, r4 80226c2: 4632 mov r2, r6 80226c4: 462b mov r3, r5 80226c6: f7ff feb3 bl 8022430 80226ca: 4680 mov r8, r0 80226cc: e7df b.n 802268e 80226ce: f04f 0800 mov.w r8, #0 80226d2: e7dc b.n 802268e 80226d4: 4629 mov r1, r5 80226d6: aa05 add r2, sp, #20 80226d8: 4630 mov r0, r6 80226da: f7ff fe4b bl 8022374 80226de: 9905 ldr r1, [sp, #20] 80226e0: 1871 adds r1, r6, r1 80226e2: 9001 str r0, [sp, #4] 80226e4: 4630 mov r0, r6 80226e6: 9a01 ldr r2, [sp, #4] 80226e8: f7ff fa6e bl 8021bc8 80226ec: 2800 cmp r0, #0 80226ee: d152 bne.n 8022796 80226f0: 9b01 ldr r3, [sp, #4] 80226f2: 4683 mov fp, r0 80226f4: 4680 mov r8, r0 80226f6: 3b01 subs r3, #1 80226f8: 9300 str r3, [sp, #0] 80226fa: 18f3 adds r3, r6, r3 80226fc: 9303 str r3, [sp, #12] 80226fe: 9b01 ldr r3, [sp, #4] 8022700: f1c3 0301 rsb r3, r3, #1 8022704: 9302 str r3, [sp, #8] 8022706: 4622 mov r2, r4 8022708: eb08 0405 add.w r4, r8, r5 802270c: 18b8 adds r0, r7, r2 802270e: 2100 movs r1, #0 8022710: 1aa2 subs r2, r4, r2 8022712: f002 f96d bl 80249f0 8022716: 2800 cmp r0, #0 8022718: d1d9 bne.n 80226ce 802271a: 2c00 cmp r4, #0 802271c: d0d7 beq.n 80226ce 802271e: 9b01 ldr r3, [sp, #4] 8022720: 459b cmp fp, r3 8022722: bf28 it cs 8022724: 465b movcs r3, fp 8022726: 429d cmp r5, r3 8022728: d913 bls.n 8022752 802272a: 18f9 adds r1, r7, r3 802272c: 5cf0 ldrb r0, [r6, r3] 802272e: 18f2 adds r2, r6, r3 8022730: f811 1008 ldrb.w r1, [r1, r8] 8022734: 4288 cmp r0, r1 8022736: f040 8085 bne.w 8022844 802273a: eb07 0c08 add.w ip, r7, r8 802273e: e005 b.n 802274c 8022740: f812 1f01 ldrb.w r1, [r2, #1]! 8022744: f81c 0003 ldrb.w r0, [ip, r3] 8022748: 4288 cmp r0, r1 802274a: d17b bne.n 8022844 802274c: 3301 adds r3, #1 802274e: 429d cmp r5, r3 8022750: d8f6 bhi.n 8022740 8022752: e89d 000a ldmia.w sp, {r1, r3} 8022756: 455b cmp r3, fp 8022758: d97d bls.n 8022856 802275a: eb07 0908 add.w r9, r7, r8 802275e: 5c72 ldrb r2, [r6, r1] 8022760: f819 3001 ldrb.w r3, [r9, r1] 8022764: 429a cmp r2, r3 8022766: d176 bne.n 8022856 8022768: 9b03 ldr r3, [sp, #12] 802276a: eb06 0a0b add.w sl, r6, fp 802276e: e006 b.n 802277e 8022770: f819 0002 ldrb.w r0, [r9, r2] 8022774: f813 cd01 ldrb.w ip, [r3, #-1]! 8022778: 4584 cmp ip, r0 802277a: d103 bne.n 8022784 802277c: 4611 mov r1, r2 802277e: 1e4a subs r2, r1, #1 8022780: 4553 cmp r3, sl 8022782: d1f5 bne.n 8022770 8022784: f10b 0b01 add.w fp, fp, #1 8022788: 458b cmp fp, r1 802278a: d866 bhi.n 802285a 802278c: 9b05 ldr r3, [sp, #20] 802278e: 4498 add r8, r3 8022790: ebc3 0b05 rsb fp, r3, r5 8022794: e7b7 b.n 8022706 8022796: 9801 ldr r0, [sp, #4] 8022798: f04f 0b00 mov.w fp, #0 802279c: 4622 mov r2, r4 802279e: 1a2b subs r3, r5, r0 80227a0: eb06 0900 add.w r9, r6, r0 80227a4: f100 38ff add.w r8, r0, #4294967295 80227a8: 4682 mov sl, r0 80227aa: 4283 cmp r3, r0 80227ac: bf38 it cc 80227ae: 4603 movcc r3, r0 80227b0: 1839 adds r1, r7, r0 80227b2: 3301 adds r3, #1 80227b4: 9100 str r1, [sp, #0] 80227b6: 9305 str r3, [sp, #20] 80227b8: f1c0 0301 rsb r3, r0, #1 80227bc: 9302 str r3, [sp, #8] 80227be: eb0b 0405 add.w r4, fp, r5 80227c2: 18b8 adds r0, r7, r2 80227c4: 2100 movs r1, #0 80227c6: 1aa2 subs r2, r4, r2 80227c8: f002 f912 bl 80249f0 80227cc: 2800 cmp r0, #0 80227ce: f47f af7e bne.w 80226ce 80227d2: 2c00 cmp r4, #0 80227d4: f43f af7b beq.w 80226ce 80227d8: 4555 cmp r5, sl 80227da: bf98 it ls 80227dc: eb07 000b addls.w r0, r7, fp 80227e0: d914 bls.n 802280c 80227e2: 9800 ldr r0, [sp, #0] 80227e4: f899 2000 ldrb.w r2, [r9] 80227e8: f810 300b ldrb.w r3, [r0, fp] 80227ec: 429a cmp r2, r3 80227ee: d124 bne.n 802283a 80227f0: 464a mov r2, r9 80227f2: 4653 mov r3, sl 80227f4: eb07 000b add.w r0, r7, fp 80227f8: e005 b.n 8022806 80227fa: f812 1f01 ldrb.w r1, [r2, #1]! 80227fe: f810 c003 ldrb.w ip, [r0, r3] 8022802: 458c cmp ip, r1 8022804: d11a bne.n 802283c 8022806: 3301 adds r3, #1 8022808: 429d cmp r5, r3 802280a: d8f6 bhi.n 80227fa 802280c: f1b8 3fff cmp.w r8, #4294967295 8022810: 4643 mov r3, r8 8022812: f43f af5a beq.w 80226ca 8022816: f816 1008 ldrb.w r1, [r6, r8] 802281a: f810 2008 ldrb.w r2, [r0, r8] 802281e: 4291 cmp r1, r2 8022820: d107 bne.n 8022832 8022822: f113 33ff adds.w r3, r3, #4294967295 8022826: f4ff af50 bcc.w 80226ca 802282a: 5cf1 ldrb r1, [r6, r3] 802282c: 5cc2 ldrb r2, [r0, r3] 802282e: 4291 cmp r1, r2 8022830: d0f7 beq.n 8022822 8022832: 9b05 ldr r3, [sp, #20] 8022834: 449b add fp, r3 8022836: 4622 mov r2, r4 8022838: e7c1 b.n 80227be 802283a: 4653 mov r3, sl 802283c: 9a02 ldr r2, [sp, #8] 802283e: 4493 add fp, r2 8022840: 449b add fp, r3 8022842: e7f8 b.n 8022836 8022844: 9902 ldr r1, [sp, #8] 8022846: f04f 0b00 mov.w fp, #0 802284a: 4488 add r8, r1 802284c: 4498 add r8, r3 802284e: e75a b.n 8022706 8022850: 460d mov r5, r1 8022852: 2701 movs r7, #1 8022854: e718 b.n 8022688 8022856: 9901 ldr r1, [sp, #4] 8022858: e794 b.n 8022784 802285a: 44b8 add r8, r7 802285c: e717 b.n 802268e 802285e: bf00 nop 08022860 <_strtod_r>: 8022860: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8022864: b09d sub sp, #116 ; 0x74 8022866: 468c mov ip, r1 8022868: 4683 mov fp, r0 802286a: 9210 str r2, [sp, #64] ; 0x40 802286c: 4662 mov r2, ip 802286e: 2000 movs r0, #0 8022870: 2100 movs r1, #0 8022872: f8cd c05c str.w ip, [sp, #92] ; 0x5c 8022876: e9cd 0106 strd r0, r1, [sp, #24] 802287a: 4611 mov r1, r2 802287c: f812 3b01 ldrb.w r3, [r2], #1 8022880: 2b2d cmp r3, #45 ; 0x2d 8022882: f200 8147 bhi.w 8022b14 <_strtod_r+0x2b4> 8022886: e8df f013 tbh [pc, r3, lsl #1] 802288a: 0131 .short 0x0131 802288c: 01450145 .word 0x01450145 8022890: 01450145 .word 0x01450145 8022894: 01450145 .word 0x01450145 8022898: 01450145 .word 0x01450145 802289c: 01640164 .word 0x01640164 80228a0: 01640164 .word 0x01640164 80228a4: 01450164 .word 0x01450164 80228a8: 01450145 .word 0x01450145 80228ac: 01450145 .word 0x01450145 80228b0: 01450145 .word 0x01450145 80228b4: 01450145 .word 0x01450145 80228b8: 01450145 .word 0x01450145 80228bc: 01450145 .word 0x01450145 80228c0: 01450145 .word 0x01450145 80228c4: 01450145 .word 0x01450145 80228c8: 01640145 .word 0x01640145 80228cc: 01450145 .word 0x01450145 80228d0: 01450145 .word 0x01450145 80228d4: 01450145 .word 0x01450145 80228d8: 01450145 .word 0x01450145 80228dc: 01450145 .word 0x01450145 80228e0: 0145012e .word 0x0145012e 80228e4: 002e .short 0x002e 80228e6: 2501 movs r5, #1 80228e8: 9512 str r5, [sp, #72] ; 0x48 80228ea: 1c4e adds r6, r1, #1 80228ec: 9617 str r6, [sp, #92] ; 0x5c 80228ee: 784b ldrb r3, [r1, #1] 80228f0: 4699 mov r9, r3 80228f2: 469a mov sl, r3 80228f4: 2b00 cmp r3, #0 80228f6: f000 80fc beq.w 8022af2 <_strtod_r+0x292> 80228fa: 2b30 cmp r3, #48 ; 0x30 80228fc: bf18 it ne 80228fe: f04f 0900 movne.w r9, #0 8022902: f000 8110 beq.w 8022b26 <_strtod_r+0x2c6> 8022906: 2b2f cmp r3, #47 ; 0x2f 8022908: 461d mov r5, r3 802290a: f04f 0a00 mov.w sl, #0 802290e: f340 84f9 ble.w 8023304 <_strtod_r+0xaa4> 8022912: 2b39 cmp r3, #57 ; 0x39 8022914: f300 84f6 bgt.w 8023304 <_strtod_r+0xaa4> 8022918: 1c72 adds r2, r6, #1 802291a: 4657 mov r7, sl 802291c: 4654 mov r4, sl 802291e: e001 b.n 8022924 <_strtod_r+0xc4> 8022920: 2b39 cmp r3, #57 ; 0x39 8022922: dc18 bgt.n 8022956 <_strtod_r+0xf6> 8022924: eb07 0187 add.w r1, r7, r7, lsl #2 8022928: 2c08 cmp r4, #8 802292a: eb03 0141 add.w r1, r3, r1, lsl #1 802292e: bfd8 it le 8022930: f1a1 0730 suble.w r7, r1, #48 ; 0x30 8022934: dd07 ble.n 8022946 <_strtod_r+0xe6> 8022936: eb0a 018a add.w r1, sl, sl, lsl #2 802293a: 2c0f cmp r4, #15 802293c: eb03 0341 add.w r3, r3, r1, lsl #1 8022940: bfd8 it le 8022942: f1a3 0a30 suble.w sl, r3, #48 ; 0x30 8022946: 9217 str r2, [sp, #92] ; 0x5c 8022948: 4690 mov r8, r2 802294a: f812 3b01 ldrb.w r3, [r2], #1 802294e: 3401 adds r4, #1 8022950: 2b2f cmp r3, #47 ; 0x2f 8022952: 461d mov r5, r3 8022954: dce4 bgt.n 8022920 <_strtod_r+0xc0> 8022956: 4658 mov r0, fp 8022958: f8cd c010 str.w ip, [sp, #16] 802295c: f001 fd5a bl 8024414 <_localeconv_r> 8022960: 6801 ldr r1, [r0, #0] 8022962: 4658 mov r0, fp 8022964: 9105 str r1, [sp, #20] 8022966: f001 fd55 bl 8024414 <_localeconv_r> 802296a: 6800 ldr r0, [r0, #0] 802296c: f7ff fbf0 bl 8022150 8022970: 9905 ldr r1, [sp, #20] 8022972: 4602 mov r2, r0 8022974: 4640 mov r0, r8 8022976: f7ff fc4d bl 8022214 802297a: f8dd c010 ldr.w ip, [sp, #16] 802297e: 4680 mov r8, r0 8022980: 2800 cmp r0, #0 8022982: f000 8142 beq.w 8022c0a <_strtod_r+0x3aa> 8022986: 2000 movs r0, #0 8022988: 46a0 mov r8, r4 802298a: 4601 mov r1, r0 802298c: 9009 str r0, [sp, #36] ; 0x24 802298e: f025 0320 bic.w r3, r5, #32 8022992: 2b45 cmp r3, #69 ; 0x45 8022994: f040 80df bne.w 8022b56 <_strtod_r+0x2f6> 8022998: ea48 0300 orr.w r3, r8, r0 802299c: ea53 0309 orrs.w r3, r3, r9 80229a0: f000 811d beq.w 8022bde <_strtod_r+0x37e> 80229a4: f8dd c05c ldr.w ip, [sp, #92] ; 0x5c 80229a8: f10c 0301 add.w r3, ip, #1 80229ac: 9317 str r3, [sp, #92] ; 0x5c 80229ae: f89c 5001 ldrb.w r5, [ip, #1] 80229b2: 2d2b cmp r5, #43 ; 0x2b 80229b4: f000 84ab beq.w 802330e <_strtod_r+0xaae> 80229b8: 2d2d cmp r5, #45 ; 0x2d 80229ba: f000 833d beq.w 8023038 <_strtod_r+0x7d8> 80229be: 2200 movs r2, #0 80229c0: 920a str r2, [sp, #40] ; 0x28 80229c2: f1a5 0330 sub.w r3, r5, #48 ; 0x30 80229c6: 2b09 cmp r3, #9 80229c8: f200 842c bhi.w 8023224 <_strtod_r+0x9c4> 80229cc: 2d30 cmp r5, #48 ; 0x30 80229ce: d106 bne.n 80229de <_strtod_r+0x17e> 80229d0: 9b17 ldr r3, [sp, #92] ; 0x5c 80229d2: 3301 adds r3, #1 80229d4: 9317 str r3, [sp, #92] ; 0x5c 80229d6: f813 5b01 ldrb.w r5, [r3], #1 80229da: 2d30 cmp r5, #48 ; 0x30 80229dc: d0fa beq.n 80229d4 <_strtod_r+0x174> 80229de: f1a5 0331 sub.w r3, r5, #49 ; 0x31 80229e2: 2b08 cmp r3, #8 80229e4: f200 80b7 bhi.w 8022b56 <_strtod_r+0x2f6> 80229e8: 9a17 ldr r2, [sp, #92] ; 0x5c 80229ea: 3d30 subs r5, #48 ; 0x30 80229ec: 950d str r5, [sp, #52] ; 0x34 80229ee: 1c53 adds r3, r2, #1 80229f0: 9317 str r3, [sp, #92] ; 0x5c 80229f2: 7855 ldrb r5, [r2, #1] 80229f4: 920b str r2, [sp, #44] ; 0x2c 80229f6: 2d2f cmp r5, #47 ; 0x2f 80229f8: dd16 ble.n 8022a28 <_strtod_r+0x1c8> 80229fa: 2d39 cmp r5, #57 ; 0x39 80229fc: dc14 bgt.n 8022a28 <_strtod_r+0x1c8> 80229fe: 1c93 adds r3, r2, #2 8022a00: 910c str r1, [sp, #48] ; 0x30 8022a02: 9a0d ldr r2, [sp, #52] ; 0x34 8022a04: e001 b.n 8022a0a <_strtod_r+0x1aa> 8022a06: 2d39 cmp r5, #57 ; 0x39 8022a08: dc0b bgt.n 8022a22 <_strtod_r+0x1c2> 8022a0a: 9317 str r3, [sp, #92] ; 0x5c 8022a0c: 4619 mov r1, r3 8022a0e: eb02 0282 add.w r2, r2, r2, lsl #2 8022a12: 3301 adds r3, #1 8022a14: eb05 0242 add.w r2, r5, r2, lsl #1 8022a18: f813 5c01 ldrb.w r5, [r3, #-1] 8022a1c: 3a30 subs r2, #48 ; 0x30 8022a1e: 2d2f cmp r5, #47 ; 0x2f 8022a20: dcf1 bgt.n 8022a06 <_strtod_r+0x1a6> 8022a22: 460b mov r3, r1 8022a24: 990c ldr r1, [sp, #48] ; 0x30 8022a26: 920d str r2, [sp, #52] ; 0x34 8022a28: 9a0b ldr r2, [sp, #44] ; 0x2c 8022a2a: 1a9b subs r3, r3, r2 8022a2c: 2b08 cmp r3, #8 8022a2e: bfc8 it gt 8022a30: f644 621f movwgt r2, #19999 ; 0x4e1f 8022a34: dc05 bgt.n 8022a42 <_strtod_r+0x1e2> 8022a36: 9a0d ldr r2, [sp, #52] ; 0x34 8022a38: f644 631f movw r3, #19999 ; 0x4e1f 8022a3c: 429a cmp r2, r3 8022a3e: bfa8 it ge 8022a40: 461a movge r2, r3 8022a42: 9b0a ldr r3, [sp, #40] ; 0x28 8022a44: b103 cbz r3, 8022a48 <_strtod_r+0x1e8> 8022a46: 4252 negs r2, r2 8022a48: f1b8 0f00 cmp.w r8, #0 8022a4c: f000 8088 beq.w 8022b60 <_strtod_r+0x300> 8022a50: 9d09 ldr r5, [sp, #36] ; 0x24 8022a52: 4638 mov r0, r7 8022a54: 2c00 cmp r4, #0 8022a56: bf08 it eq 8022a58: 4644 moveq r4, r8 8022a5a: 940a str r4, [sp, #40] ; 0x28 8022a5c: 1b52 subs r2, r2, r5 8022a5e: 9209 str r2, [sp, #36] ; 0x24 8022a60: f7fd fd38 bl 80204d4 <__aeabi_ui2d> 8022a64: f1b8 0f10 cmp.w r8, #16 8022a68: bfb4 ite lt 8022a6a: 46c1 movlt r9, r8 8022a6c: f04f 0910 movge.w r9, #16 8022a70: f1b9 0f09 cmp.w r9, #9 8022a74: 4602 mov r2, r0 8022a76: 460b mov r3, r1 8022a78: e9cd 2306 strd r2, r3, [sp, #24] 8022a7c: dd16 ble.n 8022aac <_strtod_r+0x24c> 8022a7e: f248 63e0 movw r3, #34528 ; 0x86e0 8022a82: f6c0 0303 movt r3, #2051 ; 0x803 8022a86: eb03 03c9 add.w r3, r3, r9, lsl #3 8022a8a: e953 2312 ldrd r2, r3, [r3, #-72] ; 0x48 8022a8e: f7fd fd97 bl 80205c0 <__aeabi_dmul> 8022a92: 4604 mov r4, r0 8022a94: 4650 mov r0, sl 8022a96: 460d mov r5, r1 8022a98: f7fd fd1c bl 80204d4 <__aeabi_ui2d> 8022a9c: 4602 mov r2, r0 8022a9e: 460b mov r3, r1 8022aa0: 4620 mov r0, r4 8022aa2: 4629 mov r1, r5 8022aa4: f7fd fbda bl 802025c <__adddf3> 8022aa8: e9cd 0106 strd r0, r1, [sp, #24] 8022aac: f1b8 0f0f cmp.w r8, #15 8022ab0: f300 80f2 bgt.w 8022c98 <_strtod_r+0x438> 8022ab4: 9c09 ldr r4, [sp, #36] ; 0x24 8022ab6: 2c00 cmp r4, #0 8022ab8: f000 80a2 beq.w 8022c00 <_strtod_r+0x3a0> 8022abc: f340 8591 ble.w 80235e2 <_strtod_r+0xd82> 8022ac0: 9d09 ldr r5, [sp, #36] ; 0x24 8022ac2: 2d16 cmp r5, #22 8022ac4: f300 8545 bgt.w 8023552 <_strtod_r+0xcf2> 8022ac8: f248 61e0 movw r1, #34528 ; 0x86e0 8022acc: e9dd 2306 ldrd r2, r3, [sp, #24] 8022ad0: f6c0 0103 movt r1, #2051 ; 0x803 8022ad4: eb01 01c5 add.w r1, r1, r5, lsl #3 8022ad8: e9d1 0100 ldrd r0, r1, [r1] 8022adc: f7fd fd70 bl 80205c0 <__aeabi_dmul> 8022ae0: 4681 mov r9, r0 8022ae2: 468a mov sl, r1 8022ae4: e009 b.n 8022afa <_strtod_r+0x29a> 8022ae6: 2400 movs r4, #0 8022ae8: 9412 str r4, [sp, #72] ; 0x48 8022aea: e6fe b.n 80228ea <_strtod_r+0x8a> 8022aec: f04f 0900 mov.w r9, #0 8022af0: 46ca mov sl, r9 8022af2: 2400 movs r4, #0 8022af4: f8cd c05c str.w ip, [sp, #92] ; 0x5c 8022af8: 9412 str r4, [sp, #72] ; 0x48 8022afa: 9c10 ldr r4, [sp, #64] ; 0x40 8022afc: b10c cbz r4, 8022b02 <_strtod_r+0x2a2> 8022afe: 9b17 ldr r3, [sp, #92] ; 0x5c 8022b00: 6023 str r3, [r4, #0] 8022b02: 9d12 ldr r5, [sp, #72] ; 0x48 8022b04: b10d cbz r5, 8022b0a <_strtod_r+0x2aa> 8022b06: f10a 4a00 add.w sl, sl, #2147483648 ; 0x80000000 8022b0a: 4648 mov r0, r9 8022b0c: 4651 mov r1, sl 8022b0e: b01d add sp, #116 ; 0x74 8022b10: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8022b14: 2500 movs r5, #0 8022b16: 2b30 cmp r3, #48 ; 0x30 8022b18: 460e mov r6, r1 8022b1a: 9512 str r5, [sp, #72] ; 0x48 8022b1c: bf18 it ne 8022b1e: f04f 0900 movne.w r9, #0 8022b22: f47f aef0 bne.w 8022906 <_strtod_r+0xa6> 8022b26: 7873 ldrb r3, [r6, #1] 8022b28: 2b58 cmp r3, #88 ; 0x58 8022b2a: f000 8383 beq.w 8023234 <_strtod_r+0x9d4> 8022b2e: 1c72 adds r2, r6, #1 8022b30: 2b78 cmp r3, #120 ; 0x78 8022b32: f000 837f beq.w 8023234 <_strtod_r+0x9d4> 8022b36: 4616 mov r6, r2 8022b38: 9217 str r2, [sp, #92] ; 0x5c 8022b3a: f812 3b01 ldrb.w r3, [r2], #1 8022b3e: 2b30 cmp r3, #48 ; 0x30 8022b40: d0f9 beq.n 8022b36 <_strtod_r+0x2d6> 8022b42: f04f 0901 mov.w r9, #1 8022b46: 2b00 cmp r3, #0 8022b48: f47f aedd bne.w 8022906 <_strtod_r+0xa6> 8022b4c: 4699 mov r9, r3 8022b4e: 469a mov sl, r3 8022b50: e7d3 b.n 8022afa <_strtod_r+0x29a> 8022b52: 9217 str r2, [sp, #92] ; 0x5c 8022b54: e691 b.n 802287a <_strtod_r+0x1a> 8022b56: 2200 movs r2, #0 8022b58: f1b8 0f00 cmp.w r8, #0 8022b5c: f47f af78 bne.w 8022a50 <_strtod_r+0x1f0> 8022b60: ea50 0009 orrs.w r0, r0, r9 8022b64: d14c bne.n 8022c00 <_strtod_r+0x3a0> 8022b66: 2900 cmp r1, #0 8022b68: d139 bne.n 8022bde <_strtod_r+0x37e> 8022b6a: 3d49 subs r5, #73 ; 0x49 8022b6c: 2d25 cmp r5, #37 ; 0x25 8022b6e: d836 bhi.n 8022bde <_strtod_r+0x37e> 8022b70: e8df f015 tbh [pc, r5, lsl #1] 8022b74: 0035026a .word 0x0035026a 8022b78: 00350035 .word 0x00350035 8022b7c: 00260035 .word 0x00260035 8022b80: 00350035 .word 0x00350035 8022b84: 00350035 .word 0x00350035 8022b88: 00350035 .word 0x00350035 8022b8c: 00350035 .word 0x00350035 8022b90: 00350035 .word 0x00350035 8022b94: 00350035 .word 0x00350035 8022b98: 00350035 .word 0x00350035 8022b9c: 00350035 .word 0x00350035 8022ba0: 00350035 .word 0x00350035 8022ba4: 00350035 .word 0x00350035 8022ba8: 00350035 .word 0x00350035 8022bac: 00350035 .word 0x00350035 8022bb0: 00350035 .word 0x00350035 8022bb4: 0035026a .word 0x0035026a 8022bb8: 00350035 .word 0x00350035 8022bbc: 00260035 .word 0x00260035 8022bc0: 4853 ldr r0, [pc, #332] ; (8022d10 <_strtod_r+0x4b0>) 8022bc2: 9a17 ldr r2, [sp, #92] ; 0x5c 8022bc4: f810 1f01 ldrb.w r1, [r0, #1]! 8022bc8: 4613 mov r3, r2 8022bca: b169 cbz r1, 8022be8 <_strtod_r+0x388> 8022bcc: 785b ldrb r3, [r3, #1] 8022bce: 3201 adds r2, #1 8022bd0: 2b40 cmp r3, #64 ; 0x40 8022bd2: dd02 ble.n 8022bda <_strtod_r+0x37a> 8022bd4: 2b5a cmp r3, #90 ; 0x5a 8022bd6: bfd8 it le 8022bd8: 3320 addle r3, #32 8022bda: 428b cmp r3, r1 8022bdc: d0f2 beq.n 8022bc4 <_strtod_r+0x364> 8022bde: f8dd 9018 ldr.w r9, [sp, #24] 8022be2: f8dd a01c ldr.w sl, [sp, #28] 8022be6: e784 b.n 8022af2 <_strtod_r+0x292> 8022be8: 1c53 adds r3, r2, #1 8022bea: 9317 str r3, [sp, #92] ; 0x5c 8022bec: 7853 ldrb r3, [r2, #1] 8022bee: 2b28 cmp r3, #40 ; 0x28 8022bf0: f000 8575 beq.w 80236de <_strtod_r+0xe7e> 8022bf4: 2300 movs r3, #0 8022bf6: 9306 str r3, [sp, #24] 8022bf8: 461c mov r4, r3 8022bfa: f6cf 74f8 movt r4, #65528 ; 0xfff8 8022bfe: 9407 str r4, [sp, #28] 8022c00: f8dd 9018 ldr.w r9, [sp, #24] 8022c04: f8dd a01c ldr.w sl, [sp, #28] 8022c08: e777 b.n 8022afa <_strtod_r+0x29a> 8022c0a: 4658 mov r0, fp 8022c0c: 9d17 ldr r5, [sp, #92] ; 0x5c 8022c0e: f001 fc01 bl 8024414 <_localeconv_r> 8022c12: 6800 ldr r0, [r0, #0] 8022c14: f7ff fa9c bl 8022150 8022c18: f8dd c010 ldr.w ip, [sp, #16] 8022c1c: 182b adds r3, r5, r0 8022c1e: 9317 str r3, [sp, #92] ; 0x5c 8022c20: 5c2d ldrb r5, [r5, r0] 8022c22: 2c00 cmp r4, #0 8022c24: f040 819b bne.w 8022f5e <_strtod_r+0x6fe> 8022c28: 2d30 cmp r5, #48 ; 0x30 8022c2a: 4620 mov r0, r4 8022c2c: d105 bne.n 8022c3a <_strtod_r+0x3da> 8022c2e: 3301 adds r3, #1 8022c30: 9317 str r3, [sp, #92] ; 0x5c 8022c32: 3001 adds r0, #1 8022c34: 781d ldrb r5, [r3, #0] 8022c36: 2d30 cmp r5, #48 ; 0x30 8022c38: d0f9 beq.n 8022c2e <_strtod_r+0x3ce> 8022c3a: f1a5 0331 sub.w r3, r5, #49 ; 0x31 8022c3e: 2b08 cmp r3, #8 8022c40: f200 819a bhi.w 8022f78 <_strtod_r+0x718> 8022c44: 9e17 ldr r6, [sp, #92] ; 0x5c 8022c46: f04f 0800 mov.w r8, #0 8022c4a: 9009 str r0, [sp, #36] ; 0x24 8022c4c: f1a5 0130 sub.w r1, r5, #48 ; 0x30 8022c50: 2001 movs r0, #1 8022c52: 960a str r6, [sp, #40] ; 0x28 8022c54: 2900 cmp r1, #0 8022c56: f000 836c beq.w 8023332 <_strtod_r+0xad2> 8022c5a: 9a09 ldr r2, [sp, #36] ; 0x24 8022c5c: 2801 cmp r0, #1 8022c5e: 4402 add r2, r0 8022c60: 9209 str r2, [sp, #36] ; 0x24 8022c62: f000 8532 beq.w 80236ca <_strtod_r+0xe6a> 8022c66: eb08 0200 add.w r2, r8, r0 8022c6a: 4643 mov r3, r8 8022c6c: 3a01 subs r2, #1 8022c6e: f8cd 802c str.w r8, [sp, #44] ; 0x2c 8022c72: 4690 mov r8, r2 8022c74: e003 b.n 8022c7e <_strtod_r+0x41e> 8022c76: 006f lsls r7, r5, #1 8022c78: 4543 cmp r3, r8 8022c7a: f000 834b beq.w 8023314 <_strtod_r+0xab4> 8022c7e: 3301 adds r3, #1 8022c80: eb07 0587 add.w r5, r7, r7, lsl #2 8022c84: 1e5a subs r2, r3, #1 8022c86: 2a08 cmp r2, #8 8022c88: ddf5 ble.n 8022c76 <_strtod_r+0x416> 8022c8a: eb0a 028a add.w r2, sl, sl, lsl #2 8022c8e: 2b10 cmp r3, #16 8022c90: bfd8 it le 8022c92: ea4f 0a42 movle.w sl, r2, lsl #1 8022c96: e7ef b.n 8022c78 <_strtod_r+0x418> 8022c98: 9d09 ldr r5, [sp, #36] ; 0x24 8022c9a: ebc9 0908 rsb r9, r9, r8 8022c9e: eb05 0409 add.w r4, r5, r9 8022ca2: 2c00 cmp r4, #0 8022ca4: f340 83de ble.w 8023464 <_strtod_r+0xc04> 8022ca8: f014 000f ands.w r0, r4, #15 8022cac: d00d beq.n 8022cca <_strtod_r+0x46a> 8022cae: f248 61e0 movw r1, #34528 ; 0x86e0 8022cb2: e9dd 2306 ldrd r2, r3, [sp, #24] 8022cb6: f6c0 0103 movt r1, #2051 ; 0x803 8022cba: eb01 01c0 add.w r1, r1, r0, lsl #3 8022cbe: e9d1 0100 ldrd r0, r1, [r1] 8022cc2: f7fd fc7d bl 80205c0 <__aeabi_dmul> 8022cc6: e9cd 0106 strd r0, r1, [sp, #24] 8022cca: f034 040f bics.w r4, r4, #15 8022cce: f040 815f bne.w 8022f90 <_strtod_r+0x730> 8022cd2: f8dd 9018 ldr.w r9, [sp, #24] 8022cd6: f8dd a01c ldr.w sl, [sp, #28] 8022cda: 940b str r4, [sp, #44] ; 0x2c 8022cdc: 9700 str r7, [sp, #0] 8022cde: 4658 mov r0, fp 8022ce0: 4631 mov r1, r6 8022ce2: 9a0a ldr r2, [sp, #40] ; 0x28 8022ce4: 4643 mov r3, r8 8022ce6: f001 ff67 bl 8024bb8 <__s2b> 8022cea: 9d09 ldr r5, [sp, #36] ; 0x24 8022cec: 2d00 cmp r5, #0 8022cee: 9011 str r0, [sp, #68] ; 0x44 8022cf0: f2c0 8472 blt.w 80235d8 <_strtod_r+0xd78> 8022cf4: 2400 movs r4, #0 8022cf6: 940d str r4, [sp, #52] ; 0x34 8022cf8: 9d09 ldr r5, [sp, #36] ; 0x24 8022cfa: 9c11 ldr r4, [sp, #68] ; 0x44 8022cfc: ea25 75e5 bic.w r5, r5, r5, asr #31 8022d00: f8cd 9024 str.w r9, [sp, #36] ; 0x24 8022d04: 340c adds r4, #12 8022d06: 950e str r5, [sp, #56] ; 0x38 8022d08: 9413 str r4, [sp, #76] ; 0x4c 8022d0a: f8cd a028 str.w sl, [sp, #40] ; 0x28 8022d0e: e073 b.n 8022df8 <_strtod_r+0x598> 8022d10: 08044aff .word 0x08044aff 8022d14: 9b0f ldr r3, [sp, #60] ; 0x3c 8022d16: 2b00 cmp r3, #0 8022d18: f000 81a8 beq.w 802306c <_strtod_r+0x80c> 8022d1c: f04f 0900 mov.w r9, #0 8022d20: 2500 movs r5, #0 8022d22: f8dd c01c ldr.w ip, [sp, #28] 8022d26: 2400 movs r4, #0 8022d28: f6c3 75f0 movt r5, #16368 ; 0x3ff0 8022d2c: f6c3 79f0 movt r9, #16368 ; 0x3ff0 8022d30: f8cd 8030 str.w r8, [sp, #48] ; 0x30 8022d34: f04f 0800 mov.w r8, #0 8022d38: 4643 mov r3, r8 8022d3a: f6c7 78f0 movt r8, #32752 ; 0x7ff0 8022d3e: f6c7 73e0 movt r3, #32736 ; 0x7fe0 8022d42: ea0c 0808 and.w r8, ip, r8 8022d46: 4598 cmp r8, r3 8022d48: f000 81c5 beq.w 80230d6 <_strtod_r+0x876> 8022d4c: 9a0b ldr r2, [sp, #44] ; 0x2c 8022d4e: f1b8 6fd4 cmp.w r8, #111149056 ; 0x6a00000 8022d52: bf8c ite hi 8022d54: 2300 movhi r3, #0 8022d56: 2301 movls r3, #1 8022d58: 2a00 cmp r2, #0 8022d5a: bf08 it eq 8022d5c: 2300 moveq r3, #0 8022d5e: b1eb cbz r3, 8022d9c <_strtod_r+0x53c> 8022d60: 980c ldr r0, [sp, #48] ; 0x30 8022d62: 4649 mov r1, r9 8022d64: a388 add r3, pc, #544 ; (adr r3, 8022f88 <_strtod_r+0x728>) 8022d66: e9d3 2300 ldrd r2, r3, [r3] 8022d6a: f7fd fea5 bl 8020ab8 <__aeabi_dcmple> 8022d6e: b188 cbz r0, 8022d94 <_strtod_r+0x534> 8022d70: 980c ldr r0, [sp, #48] ; 0x30 8022d72: 4649 mov r1, r9 8022d74: f7fd fee6 bl 8020b44 <__aeabi_d2uiz> 8022d78: 2800 cmp r0, #0 8022d7a: f000 8246 beq.w 802320a <_strtod_r+0x9aa> 8022d7e: f7fd fba9 bl 80204d4 <__aeabi_ui2d> 8022d82: 4689 mov r9, r1 8022d84: 900c str r0, [sp, #48] ; 0x30 8022d86: 9c0f ldr r4, [sp, #60] ; 0x3c 8022d88: f109 4300 add.w r3, r9, #2147483648 ; 0x80000000 8022d8c: b104 cbz r4, 8022d90 <_strtod_r+0x530> 8022d8e: 464b mov r3, r9 8022d90: 9c0c ldr r4, [sp, #48] ; 0x30 8022d92: 461d mov r5, r3 8022d94: f105 63d6 add.w r3, r5, #112197632 ; 0x6b00000 8022d98: ebc8 0503 rsb r5, r8, r3 8022d9c: 9809 ldr r0, [sp, #36] ; 0x24 8022d9e: 990a ldr r1, [sp, #40] ; 0x28 8022da0: f002 f98a bl 80250b8 <__ulp> 8022da4: 4602 mov r2, r0 8022da6: 460b mov r3, r1 8022da8: 4620 mov r0, r4 8022daa: 4629 mov r1, r5 8022dac: f7fd fc08 bl 80205c0 <__aeabi_dmul> 8022db0: 4602 mov r2, r0 8022db2: 460b mov r3, r1 8022db4: 9809 ldr r0, [sp, #36] ; 0x24 8022db6: 990a ldr r1, [sp, #40] ; 0x28 8022db8: f7fd fa50 bl 802025c <__adddf3> 8022dbc: e9cd 0106 strd r0, r1, [sp, #24] 8022dc0: 9c07 ldr r4, [sp, #28] 8022dc2: 9009 str r0, [sp, #36] ; 0x24 8022dc4: 910a str r1, [sp, #40] ; 0x28 8022dc6: 9d0b ldr r5, [sp, #44] ; 0x2c 8022dc8: b935 cbnz r5, 8022dd8 <_strtod_r+0x578> 8022dca: 2300 movs r3, #0 8022dcc: f6c7 73f0 movt r3, #32752 ; 0x7ff0 8022dd0: 4023 ands r3, r4 8022dd2: 4598 cmp r8, r3 8022dd4: f000 81bc beq.w 8023150 <_strtod_r+0x8f0> 8022dd8: 4658 mov r0, fp 8022dda: 9918 ldr r1, [sp, #96] ; 0x60 8022ddc: f001 fe8c bl 8024af8 <_Bfree> 8022de0: 4658 mov r0, fp 8022de2: 4651 mov r1, sl 8022de4: f001 fe88 bl 8024af8 <_Bfree> 8022de8: 4658 mov r0, fp 8022dea: 4639 mov r1, r7 8022dec: f001 fe84 bl 8024af8 <_Bfree> 8022df0: 4658 mov r0, fp 8022df2: 4631 mov r1, r6 8022df4: f001 fe80 bl 8024af8 <_Bfree> 8022df8: 9c11 ldr r4, [sp, #68] ; 0x44 8022dfa: 4658 mov r0, fp 8022dfc: ad16 add r5, sp, #88 ; 0x58 8022dfe: 6861 ldr r1, [r4, #4] 8022e00: f001 fe44 bl 8024a8c <_Balloc> 8022e04: 6923 ldr r3, [r4, #16] 8022e06: 9913 ldr r1, [sp, #76] ; 0x4c 8022e08: 1c9a adds r2, r3, #2 8022e0a: 0092 lsls r2, r2, #2 8022e0c: 4682 mov sl, r0 8022e0e: 300c adds r0, #12 8022e10: f7fe ff0c bl 8021c2c 8022e14: 9a09 ldr r2, [sp, #36] ; 0x24 8022e16: 9b0a ldr r3, [sp, #40] ; 0x28 8022e18: a819 add r0, sp, #100 ; 0x64 8022e1a: 9500 str r5, [sp, #0] 8022e1c: 9001 str r0, [sp, #4] 8022e1e: 4658 mov r0, fp 8022e20: f002 f9c4 bl 80251ac <__d2b> 8022e24: 2101 movs r1, #1 8022e26: 9018 str r0, [sp, #96] ; 0x60 8022e28: 4658 mov r0, fp 8022e2a: f001 ff5d bl 8024ce8 <__i2b> 8022e2e: 9a16 ldr r2, [sp, #88] ; 0x58 8022e30: 9b19 ldr r3, [sp, #100] ; 0x64 8022e32: f46f 717f mvn.w r1, #1020 ; 0x3fc 8022e36: 2a00 cmp r2, #0 8022e38: bfaa itet ge 8022e3a: 9d0d ldrge r5, [sp, #52] ; 0x34 8022e3c: 9c0e ldrlt r4, [sp, #56] ; 0x38 8022e3e: 18ac addge r4, r5, r2 8022e40: 9d0b ldr r5, [sp, #44] ; 0x2c 8022e42: 4607 mov r7, r0 8022e44: bfb8 it lt 8022e46: ebc2 0004 rsblt r0, r2, r4 8022e4a: ebc5 0202 rsb r2, r5, r2 8022e4e: bfb8 it lt 8022e50: 9c0d ldrlt r4, [sp, #52] ; 0x34 8022e52: eb02 0503 add.w r5, r2, r3 8022e56: bfa8 it ge 8022e58: 980e ldrge r0, [sp, #56] ; 0x38 8022e5a: 428d cmp r5, r1 8022e5c: 990d ldr r1, [sp, #52] ; 0x34 8022e5e: bfb4 ite lt 8022e60: f202 4333 addwlt r3, r2, #1075 ; 0x433 8022e64: f1c3 0336 rsbge r3, r3, #54 ; 0x36 8022e68: 18e6 adds r6, r4, r3 8022e6a: 18c3 adds r3, r0, r3 8022e6c: 980b ldr r0, [sp, #44] ; 0x2c 8022e6e: 181d adds r5, r3, r0 8022e70: 42a6 cmp r6, r4 8022e72: bfb4 ite lt 8022e74: 4633 movlt r3, r6 8022e76: 4623 movge r3, r4 8022e78: 42ab cmp r3, r5 8022e7a: bfa8 it ge 8022e7c: 462b movge r3, r5 8022e7e: 2b00 cmp r3, #0 8022e80: bfc2 ittt gt 8022e82: ebc3 0606 rsbgt r6, r3, r6 8022e86: ebc3 0505 rsbgt r5, r3, r5 8022e8a: ebc3 0404 rsbgt r4, r3, r4 8022e8e: b189 cbz r1, 8022eb4 <_strtod_r+0x654> 8022e90: 460a mov r2, r1 8022e92: 4658 mov r0, fp 8022e94: 4639 mov r1, r7 8022e96: f001 ffcf bl 8024e38 <__pow5mult> 8022e9a: 9a18 ldr r2, [sp, #96] ; 0x60 8022e9c: 4607 mov r7, r0 8022e9e: 4658 mov r0, fp 8022ea0: 4639 mov r1, r7 8022ea2: f001 ff2b bl 8024cfc <__multiply> 8022ea6: 9918 ldr r1, [sp, #96] ; 0x60 8022ea8: 4680 mov r8, r0 8022eaa: 4658 mov r0, fp 8022eac: f001 fe24 bl 8024af8 <_Bfree> 8022eb0: f8cd 8060 str.w r8, [sp, #96] ; 0x60 8022eb4: 2e00 cmp r6, #0 8022eb6: dd05 ble.n 8022ec4 <_strtod_r+0x664> 8022eb8: 4658 mov r0, fp 8022eba: 9918 ldr r1, [sp, #96] ; 0x60 8022ebc: 4632 mov r2, r6 8022ebe: f002 f80d bl 8024edc <__lshift> 8022ec2: 9018 str r0, [sp, #96] ; 0x60 8022ec4: 9a0e ldr r2, [sp, #56] ; 0x38 8022ec6: b122 cbz r2, 8022ed2 <_strtod_r+0x672> 8022ec8: 4651 mov r1, sl 8022eca: 4658 mov r0, fp 8022ecc: f001 ffb4 bl 8024e38 <__pow5mult> 8022ed0: 4682 mov sl, r0 8022ed2: 2d00 cmp r5, #0 8022ed4: dd05 ble.n 8022ee2 <_strtod_r+0x682> 8022ed6: 4651 mov r1, sl 8022ed8: 4658 mov r0, fp 8022eda: 462a mov r2, r5 8022edc: f001 fffe bl 8024edc <__lshift> 8022ee0: 4682 mov sl, r0 8022ee2: 2c00 cmp r4, #0 8022ee4: dd05 ble.n 8022ef2 <_strtod_r+0x692> 8022ee6: 4639 mov r1, r7 8022ee8: 4658 mov r0, fp 8022eea: 4622 mov r2, r4 8022eec: f001 fff6 bl 8024edc <__lshift> 8022ef0: 4607 mov r7, r0 8022ef2: 9918 ldr r1, [sp, #96] ; 0x60 8022ef4: 4652 mov r2, sl 8022ef6: 4658 mov r0, fp 8022ef8: f04f 0800 mov.w r8, #0 8022efc: f002 f866 bl 8024fcc <__mdiff> 8022f00: 4639 mov r1, r7 8022f02: 68c4 ldr r4, [r0, #12] 8022f04: 4606 mov r6, r0 8022f06: f8c0 800c str.w r8, [r0, #12] 8022f0a: 940f str r4, [sp, #60] ; 0x3c 8022f0c: f002 f840 bl 8024f90 <__mcmp> 8022f10: 4540 cmp r0, r8 8022f12: f2c0 8213 blt.w 802333c <_strtod_r+0xadc> 8022f16: f000 8261 beq.w 80233dc <_strtod_r+0xb7c> 8022f1a: 4630 mov r0, r6 8022f1c: 4639 mov r1, r7 8022f1e: f002 f9a3 bl 8025268 <__ratio> 8022f22: 2200 movs r2, #0 8022f24: f04f 4380 mov.w r3, #1073741824 ; 0x40000000 8022f28: 4604 mov r4, r0 8022f2a: 460d mov r5, r1 8022f2c: f7fd fdc4 bl 8020ab8 <__aeabi_dcmple> 8022f30: 2800 cmp r0, #0 8022f32: f47f aeef bne.w 8022d14 <_strtod_r+0x4b4> 8022f36: 2300 movs r3, #0 8022f38: 4620 mov r0, r4 8022f3a: f6c3 73e0 movt r3, #16352 ; 0x3fe0 8022f3e: 4629 mov r1, r5 8022f40: 2200 movs r2, #0 8022f42: f7fd fb3d bl 80205c0 <__aeabi_dmul> 8022f46: 9c0f ldr r4, [sp, #60] ; 0x3c 8022f48: 900c str r0, [sp, #48] ; 0x30 8022f4a: 4689 mov r9, r1 8022f4c: f101 4300 add.w r3, r1, #2147483648 ; 0x80000000 8022f50: b104 cbz r4, 8022f54 <_strtod_r+0x6f4> 8022f52: 460b mov r3, r1 8022f54: 9c0c ldr r4, [sp, #48] ; 0x30 8022f56: 461d mov r5, r3 8022f58: f8dd c01c ldr.w ip, [sp, #28] 8022f5c: e6ea b.n 8022d34 <_strtod_r+0x4d4> 8022f5e: 4640 mov r0, r8 8022f60: 46a0 mov r8, r4 8022f62: 9009 str r0, [sp, #36] ; 0x24 8022f64: f1a5 0130 sub.w r1, r5, #48 ; 0x30 8022f68: 2909 cmp r1, #9 8022f6a: d803 bhi.n 8022f74 <_strtod_r+0x714> 8022f6c: 9a17 ldr r2, [sp, #92] ; 0x5c 8022f6e: 3001 adds r0, #1 8022f70: 920a str r2, [sp, #40] ; 0x28 8022f72: e66f b.n 8022c54 <_strtod_r+0x3f4> 8022f74: 2101 movs r1, #1 8022f76: e50a b.n 802298e <_strtod_r+0x12e> 8022f78: f04f 0800 mov.w r8, #0 8022f7c: 2101 movs r1, #1 8022f7e: f8cd 8024 str.w r8, [sp, #36] ; 0x24 8022f82: e504 b.n 802298e <_strtod_r+0x12e> 8022f84: f3af 8000 nop.w 8022f88: ffc00000 .word 0xffc00000 8022f8c: 41dfffff .word 0x41dfffff 8022f90: f5b4 7f9a cmp.w r4, #308 ; 0x134 8022f94: f300 8258 bgt.w 8023448 <_strtod_r+0xbe8> 8022f98: 1124 asrs r4, r4, #4 8022f9a: f248 7ad0 movw sl, #34768 ; 0x87d0 8022f9e: 2c01 cmp r4, #1 8022fa0: f340 8398 ble.w 80236d4 <_strtod_r+0xe74> 8022fa4: f6c0 0a03 movt sl, #2051 ; 0x803 8022fa8: e9dd 2306 ldrd r2, r3, [sp, #24] 8022fac: f04f 0900 mov.w r9, #0 8022fb0: 4655 mov r5, sl 8022fb2: f014 0f01 tst.w r4, #1 8022fb6: 4610 mov r0, r2 8022fb8: 4619 mov r1, r3 8022fba: ea4f 0464 mov.w r4, r4, asr #1 8022fbe: f109 0901 add.w r9, r9, #1 8022fc2: d005 beq.n 8022fd0 <_strtod_r+0x770> 8022fc4: e9d5 2300 ldrd r2, r3, [r5] 8022fc8: f7fd fafa bl 80205c0 <__aeabi_dmul> 8022fcc: 4602 mov r2, r0 8022fce: 460b mov r3, r1 8022fd0: 3508 adds r5, #8 8022fd2: 2c01 cmp r4, #1 8022fd4: dced bgt.n 8022fb2 <_strtod_r+0x752> 8022fd6: 4610 mov r0, r2 8022fd8: 4619 mov r1, r3 8022fda: e9cd 0106 strd r0, r1, [sp, #24] 8022fde: 9907 ldr r1, [sp, #28] 8022fe0: eb0a 09c9 add.w r9, sl, r9, lsl #3 8022fe4: f1a1 7154 sub.w r1, r1, #55574528 ; 0x3500000 8022fe8: 9107 str r1, [sp, #28] 8022fea: e9dd 2306 ldrd r2, r3, [sp, #24] 8022fee: e9d9 0100 ldrd r0, r1, [r9] 8022ff2: f7fd fae5 bl 80205c0 <__aeabi_dmul> 8022ff6: 2300 movs r3, #0 8022ff8: 2200 movs r2, #0 8022ffa: f6c7 73f0 movt r3, #32752 ; 0x7ff0 8022ffe: f6c7 42a0 movt r2, #31904 ; 0x7ca0 8023002: e9cd 0106 strd r0, r1, [sp, #24] 8023006: 9907 ldr r1, [sp, #28] 8023008: 400b ands r3, r1 802300a: 4293 cmp r3, r2 802300c: f200 821c bhi.w 8023448 <_strtod_r+0xbe8> 8023010: 2200 movs r2, #0 8023012: f6c7 4290 movt r2, #31888 ; 0x7c90 8023016: 4293 cmp r3, r2 8023018: f240 8305 bls.w 8023626 <_strtod_r+0xdc6> 802301c: f64f 72ff movw r2, #65535 ; 0xffff 8023020: f04f 30ff mov.w r0, #4294967295 8023024: 4615 mov r5, r2 8023026: 2400 movs r4, #0 8023028: f6c7 75ef movt r5, #32751 ; 0x7fef 802302c: 940b str r4, [sp, #44] ; 0x2c 802302e: 9507 str r5, [sp, #28] 8023030: 4681 mov r9, r0 8023032: 9006 str r0, [sp, #24] 8023034: 46aa mov sl, r5 8023036: e651 b.n 8022cdc <_strtod_r+0x47c> 8023038: 2301 movs r3, #1 802303a: 930a str r3, [sp, #40] ; 0x28 802303c: f10c 0302 add.w r3, ip, #2 8023040: 9317 str r3, [sp, #92] ; 0x5c 8023042: f89c 5002 ldrb.w r5, [ip, #2] 8023046: e4bc b.n 80229c2 <_strtod_r+0x162> 8023048: 48ab ldr r0, [pc, #684] ; (80232f8 <_strtod_r+0xa98>) 802304a: 9a17 ldr r2, [sp, #92] ; 0x5c 802304c: f810 1f01 ldrb.w r1, [r0, #1]! 8023050: 4613 mov r3, r2 8023052: 2900 cmp r1, #0 8023054: f000 8311 beq.w 802367a <_strtod_r+0xe1a> 8023058: 785b ldrb r3, [r3, #1] 802305a: 3201 adds r2, #1 802305c: 2b40 cmp r3, #64 ; 0x40 802305e: dd02 ble.n 8023066 <_strtod_r+0x806> 8023060: 2b5a cmp r3, #90 ; 0x5a 8023062: bfd8 it le 8023064: 3320 addle r3, #32 8023066: 428b cmp r3, r1 8023068: d0f0 beq.n 802304c <_strtod_r+0x7ec> 802306a: e5b8 b.n 8022bde <_strtod_r+0x37e> 802306c: 9b06 ldr r3, [sp, #24] 802306e: f8dd c01c ldr.w ip, [sp, #28] 8023072: 2b00 cmp r3, #0 8023074: f040 80a6 bne.w 80231c4 <_strtod_r+0x964> 8023078: f3cc 0313 ubfx r3, ip, #0, #20 802307c: bb03 cbnz r3, 80230c0 <_strtod_r+0x860> 802307e: 2300 movs r3, #0 8023080: 4620 mov r0, r4 8023082: 4629 mov r1, r5 8023084: 2200 movs r2, #0 8023086: f6c3 73f0 movt r3, #16368 ; 0x3ff0 802308a: f8cd c010 str.w ip, [sp, #16] 802308e: f7fd fd09 bl 8020aa4 <__aeabi_dcmplt> 8023092: f8dd c010 ldr.w ip, [sp, #16] 8023096: 2800 cmp r0, #0 8023098: f040 8246 bne.w 8023528 <_strtod_r+0xcc8> 802309c: 2300 movs r3, #0 802309e: 2200 movs r2, #0 80230a0: f6c3 73e0 movt r3, #16352 ; 0x3fe0 80230a4: 4620 mov r0, r4 80230a6: 4629 mov r1, r5 80230a8: f7fd fa8a bl 80205c0 <__aeabi_dmul> 80230ac: f8dd c010 ldr.w ip, [sp, #16] 80230b0: 4689 mov r9, r1 80230b2: 4602 mov r2, r0 80230b4: f101 4300 add.w r3, r1, #2147483648 ; 0x80000000 80230b8: 900c str r0, [sp, #48] ; 0x30 80230ba: 4614 mov r4, r2 80230bc: 461d mov r5, r3 80230be: e639 b.n 8022d34 <_strtod_r+0x4d4> 80230c0: f04f 0900 mov.w r9, #0 80230c4: 2500 movs r5, #0 80230c6: f8cd 9030 str.w r9, [sp, #48] ; 0x30 80230ca: 2400 movs r4, #0 80230cc: f6cb 75f0 movt r5, #49136 ; 0xbff0 80230d0: f6c3 79f0 movt r9, #16368 ; 0x3ff0 80230d4: e62e b.n 8022d34 <_strtod_r+0x4d4> 80230d6: f1ac 7c54 sub.w ip, ip, #55574528 ; 0x3500000 80230da: 9a09 ldr r2, [sp, #36] ; 0x24 80230dc: f8cd c01c str.w ip, [sp, #28] 80230e0: 9b0a ldr r3, [sp, #40] ; 0x28 80230e2: e9dd 0106 ldrd r0, r1, [sp, #24] 80230e6: e9cd 4502 strd r4, r5, [sp, #8] 80230ea: 4614 mov r4, r2 80230ec: 461d mov r5, r3 80230ee: e9cd 4514 strd r4, r5, [sp, #80] ; 0x50 80230f2: f001 ffe1 bl 80250b8 <__ulp> 80230f6: 4602 mov r2, r0 80230f8: 460b mov r3, r1 80230fa: e9dd 0102 ldrd r0, r1, [sp, #8] 80230fe: f7fd fa5f bl 80205c0 <__aeabi_dmul> 8023102: 4602 mov r2, r0 8023104: 460b mov r3, r1 8023106: e9dd 0106 ldrd r0, r1, [sp, #24] 802310a: f7fd f8a7 bl 802025c <__adddf3> 802310e: 2300 movs r3, #0 8023110: f6c7 73f0 movt r3, #32752 ; 0x7ff0 8023114: f64f 72ff movw r2, #65535 ; 0xffff 8023118: f6c7 429f movt r2, #31903 ; 0x7c9f 802311c: e9cd 0106 strd r0, r1, [sp, #24] 8023120: 9c07 ldr r4, [sp, #28] 8023122: 4023 ands r3, r4 8023124: 4293 cmp r3, r2 8023126: d976 bls.n 8023216 <_strtod_r+0x9b6> 8023128: f64f 73ff movw r3, #65535 ; 0xffff 802312c: 9d15 ldr r5, [sp, #84] ; 0x54 802312e: f6c7 73ef movt r3, #32751 ; 0x7fef 8023132: 429d cmp r5, r3 8023134: f000 8177 beq.w 8023426 <_strtod_r+0xbc6> 8023138: f64f 71ff movw r1, #65535 ; 0xffff 802313c: f04f 33ff mov.w r3, #4294967295 8023140: 460a mov r2, r1 8023142: 9306 str r3, [sp, #24] 8023144: f6c7 72ef movt r2, #32751 ; 0x7fef 8023148: 9309 str r3, [sp, #36] ; 0x24 802314a: 9207 str r2, [sp, #28] 802314c: 920a str r2, [sp, #40] ; 0x28 802314e: e643 b.n 8022dd8 <_strtod_r+0x578> 8023150: 4649 mov r1, r9 8023152: 980c ldr r0, [sp, #48] ; 0x30 8023154: f7fd fcce bl 8020af4 <__aeabi_d2iz> 8023158: f7fd f9cc bl 80204f4 <__aeabi_i2d> 802315c: 4602 mov r2, r0 802315e: 460b mov r3, r1 8023160: 980c ldr r0, [sp, #48] ; 0x30 8023162: 4649 mov r1, r9 8023164: f7fd f878 bl 8020258 <__aeabi_dsub> 8023168: 9d0f ldr r5, [sp, #60] ; 0x3c 802316a: 4680 mov r8, r0 802316c: 4689 mov r9, r1 802316e: 2d00 cmp r5, #0 8023170: d137 bne.n 80231e2 <_strtod_r+0x982> 8023172: 9a06 ldr r2, [sp, #24] 8023174: 2a00 cmp r2, #0 8023176: d134 bne.n 80231e2 <_strtod_r+0x982> 8023178: f3c4 0413 ubfx r4, r4, #0, #20 802317c: 2c00 cmp r4, #0 802317e: d130 bne.n 80231e2 <_strtod_r+0x982> 8023180: a357 add r3, pc, #348 ; (adr r3, 80232e0 <_strtod_r+0xa80>) 8023182: e9d3 2300 ldrd r2, r3, [r3] 8023186: f7fd fc8d bl 8020aa4 <__aeabi_dcmplt> 802318a: 2800 cmp r0, #0 802318c: f43f ae24 beq.w 8022dd8 <_strtod_r+0x578> 8023190: 4654 mov r4, sl 8023192: f8dd 9024 ldr.w r9, [sp, #36] ; 0x24 8023196: f8dd a028 ldr.w sl, [sp, #40] ; 0x28 802319a: 4658 mov r0, fp 802319c: 9918 ldr r1, [sp, #96] ; 0x60 802319e: f001 fcab bl 8024af8 <_Bfree> 80231a2: 4658 mov r0, fp 80231a4: 4621 mov r1, r4 80231a6: f001 fca7 bl 8024af8 <_Bfree> 80231aa: 4658 mov r0, fp 80231ac: 4639 mov r1, r7 80231ae: f001 fca3 bl 8024af8 <_Bfree> 80231b2: 4658 mov r0, fp 80231b4: 9911 ldr r1, [sp, #68] ; 0x44 80231b6: f001 fc9f bl 8024af8 <_Bfree> 80231ba: 4658 mov r0, fp 80231bc: 4631 mov r1, r6 80231be: f001 fc9b bl 8024af8 <_Bfree> 80231c2: e49a b.n 8022afa <_strtod_r+0x29a> 80231c4: 2b01 cmp r3, #1 80231c6: f47f af7b bne.w 80230c0 <_strtod_r+0x860> 80231ca: 4661 mov r1, ip 80231cc: 2900 cmp r1, #0 80231ce: f47f af77 bne.w 80230c0 <_strtod_r+0x860> 80231d2: 4654 mov r4, sl 80231d4: f04f 0900 mov.w r9, #0 80231d8: 46ca mov sl, r9 80231da: 2322 movs r3, #34 ; 0x22 80231dc: f8cb 3000 str.w r3, [fp] 80231e0: e7db b.n 802319a <_strtod_r+0x93a> 80231e2: 4640 mov r0, r8 80231e4: 4649 mov r1, r9 80231e6: a340 add r3, pc, #256 ; (adr r3, 80232e8 <_strtod_r+0xa88>) 80231e8: e9d3 2300 ldrd r2, r3, [r3] 80231ec: f7fd fc5a bl 8020aa4 <__aeabi_dcmplt> 80231f0: 2800 cmp r0, #0 80231f2: d1cd bne.n 8023190 <_strtod_r+0x930> 80231f4: 4640 mov r0, r8 80231f6: 4649 mov r1, r9 80231f8: a33d add r3, pc, #244 ; (adr r3, 80232f0 <_strtod_r+0xa90>) 80231fa: e9d3 2300 ldrd r2, r3, [r3] 80231fe: f7fd fc6f bl 8020ae0 <__aeabi_dcmpgt> 8023202: 2800 cmp r0, #0 8023204: f43f ade8 beq.w 8022dd8 <_strtod_r+0x578> 8023208: e7c2 b.n 8023190 <_strtod_r+0x930> 802320a: f04f 0900 mov.w r9, #0 802320e: 900c str r0, [sp, #48] ; 0x30 8023210: f6c3 79f0 movt r9, #16368 ; 0x3ff0 8023214: e5b7 b.n 8022d86 <_strtod_r+0x526> 8023216: 9906 ldr r1, [sp, #24] 8023218: f104 7454 add.w r4, r4, #55574528 ; 0x3500000 802321c: 9407 str r4, [sp, #28] 802321e: 940a str r4, [sp, #40] ; 0x28 8023220: 9109 str r1, [sp, #36] ; 0x24 8023222: e5d0 b.n 8022dc6 <_strtod_r+0x566> 8023224: f8cd c05c str.w ip, [sp, #92] ; 0x5c 8023228: 2200 movs r2, #0 802322a: f1b8 0f00 cmp.w r8, #0 802322e: f47f ac0f bne.w 8022a50 <_strtod_r+0x1f0> 8023232: e495 b.n 8022b60 <_strtod_r+0x300> 8023234: 9d12 ldr r5, [sp, #72] ; 0x48 8023236: f240 0404 movw r4, #4 802323a: f2c2 0400 movt r4, #8192 ; 0x2000 802323e: ab18 add r3, sp, #96 ; 0x60 8023240: 4658 mov r0, fp 8023242: e88d 0028 stmia.w sp, {r3, r5} 8023246: a917 add r1, sp, #92 ; 0x5c 8023248: 4622 mov r2, r4 802324a: ab19 add r3, sp, #100 ; 0x64 802324c: f000 fd1c bl 8023c88 <__gethex> 8023250: f010 0707 ands.w r7, r0, #7 8023254: 4605 mov r5, r0 8023256: bf04 itt eq 8023258: 46b9 moveq r9, r7 802325a: 46ca moveq sl, r9 802325c: f43f ac4d beq.w 8022afa <_strtod_r+0x29a> 8023260: 2f06 cmp r7, #6 8023262: f000 816f beq.w 8023544 <_strtod_r+0xce4> 8023266: 9a18 ldr r2, [sp, #96] ; 0x60 8023268: b13a cbz r2, 802327a <_strtod_r+0xa1a> 802326a: 6821 ldr r1, [r4, #0] 802326c: a81a add r0, sp, #104 ; 0x68 802326e: f002 f845 bl 80252fc <__copybits> 8023272: 4658 mov r0, fp 8023274: 9918 ldr r1, [sp, #96] ; 0x60 8023276: f001 fc3f bl 8024af8 <_Bfree> 802327a: 9b19 ldr r3, [sp, #100] ; 0x64 802327c: 2f06 cmp r7, #6 802327e: d80b bhi.n 8023298 <_strtod_r+0xa38> 8023280: e8df f007 tbb [pc, r7] 8023284: 141b203c .word 0x141b203c 8023288: 2004 .short 0x2004 802328a: 3c .byte 0x3c 802328b: 00 .byte 0x00 802328c: f06f 4400 mvn.w r4, #2147483648 ; 0x80000000 8023290: f04f 30ff mov.w r0, #4294967295 8023294: 9407 str r4, [sp, #28] 8023296: 9006 str r0, [sp, #24] 8023298: 072b lsls r3, r5, #28 802329a: f57f acb1 bpl.w 8022c00 <_strtod_r+0x3a0> 802329e: 9907 ldr r1, [sp, #28] 80232a0: f8dd 9018 ldr.w r9, [sp, #24] 80232a4: f041 4300 orr.w r3, r1, #2147483648 ; 0x80000000 80232a8: 469a mov sl, r3 80232aa: e426 b.n 8022afa <_strtod_r+0x29a> 80232ac: 2100 movs r1, #0 80232ae: 9106 str r1, [sp, #24] 80232b0: 460a mov r2, r1 80232b2: f6c7 72f0 movt r2, #32752 ; 0x7ff0 80232b6: 9207 str r2, [sp, #28] 80232b8: e7ee b.n 8023298 <_strtod_r+0xa38> 80232ba: 9b1a ldr r3, [sp, #104] ; 0x68 80232bc: 9c1b ldr r4, [sp, #108] ; 0x6c 80232be: 9306 str r3, [sp, #24] 80232c0: 9407 str r4, [sp, #28] 80232c2: e7e9 b.n 8023298 <_strtod_r+0xa38> 80232c4: 981a ldr r0, [sp, #104] ; 0x68 80232c6: f203 4333 addw r3, r3, #1075 ; 0x433 80232ca: 9a1b ldr r2, [sp, #108] ; 0x6c 80232cc: f422 1280 bic.w r2, r2, #1048576 ; 0x100000 80232d0: 9006 str r0, [sp, #24] 80232d2: ea42 5203 orr.w r2, r2, r3, lsl #20 80232d6: 9207 str r2, [sp, #28] 80232d8: e7de b.n 8023298 <_strtod_r+0xa38> 80232da: bf00 nop 80232dc: f3af 8000 nop.w 80232e0: 94a03595 .word 0x94a03595 80232e4: 3fcfffff .word 0x3fcfffff 80232e8: 94a03595 .word 0x94a03595 80232ec: 3fdfffff .word 0x3fdfffff 80232f0: 35afe535 .word 0x35afe535 80232f4: 3fe00000 .word 0x3fe00000 80232f8: 08044af3 .word 0x08044af3 80232fc: 2100 movs r1, #0 80232fe: 9107 str r1, [sp, #28] 8023300: 9106 str r1, [sp, #24] 8023302: e7c9 b.n 8023298 <_strtod_r+0xa38> 8023304: 46b0 mov r8, r6 8023306: 4657 mov r7, sl 8023308: 4654 mov r4, sl 802330a: f7ff bb24 b.w 8022956 <_strtod_r+0xf6> 802330e: 2300 movs r3, #0 8023310: 930a str r3, [sp, #40] ; 0x28 8023312: e693 b.n 802303c <_strtod_r+0x7dc> 8023314: f8dd 802c ldr.w r8, [sp, #44] ; 0x2c 8023318: eb08 0300 add.w r3, r8, r0 802331c: 3b01 subs r3, #1 802331e: 2b08 cmp r3, #8 8023320: f103 0801 add.w r8, r3, #1 8023324: f300 8172 bgt.w 802360c <_strtod_r+0xdac> 8023328: eb07 0787 add.w r7, r7, r7, lsl #2 802332c: 2000 movs r0, #0 802332e: eb01 0747 add.w r7, r1, r7, lsl #1 8023332: 9d0a ldr r5, [sp, #40] ; 0x28 8023334: 1c6b adds r3, r5, #1 8023336: 9317 str r3, [sp, #92] ; 0x5c 8023338: 786d ldrb r5, [r5, #1] 802333a: e613 b.n 8022f64 <_strtod_r+0x704> 802333c: 9d0f ldr r5, [sp, #60] ; 0x3c 802333e: 4654 mov r4, sl 8023340: bb7d cbnz r5, 80233a2 <_strtod_r+0xb42> 8023342: 9806 ldr r0, [sp, #24] 8023344: bb68 cbnz r0, 80233a2 <_strtod_r+0xb42> 8023346: 9a07 ldr r2, [sp, #28] 8023348: f3c2 0313 ubfx r3, r2, #0, #20 802334c: bb4b cbnz r3, 80233a2 <_strtod_r+0xb42> 802334e: 4643 mov r3, r8 8023350: f6c7 73f0 movt r3, #32752 ; 0x7ff0 8023354: 4013 ands r3, r2 8023356: f1b3 6fd6 cmp.w r3, #112197632 ; 0x6b00000 802335a: d922 bls.n 80233a2 <_strtod_r+0xb42> 802335c: 6973 ldr r3, [r6, #20] 802335e: b913 cbnz r3, 8023366 <_strtod_r+0xb06> 8023360: 6933 ldr r3, [r6, #16] 8023362: 2b01 cmp r3, #1 8023364: dd1d ble.n 80233a2 <_strtod_r+0xb42> 8023366: 4631 mov r1, r6 8023368: 2201 movs r2, #1 802336a: 4658 mov r0, fp 802336c: f001 fdb6 bl 8024edc <__lshift> 8023370: 4639 mov r1, r7 8023372: 4606 mov r6, r0 8023374: f001 fe0c bl 8024f90 <__mcmp> 8023378: 2800 cmp r0, #0 802337a: dd12 ble.n 80233a2 <_strtod_r+0xb42> 802337c: 9d0b ldr r5, [sp, #44] ; 0x2c 802337e: 2d00 cmp r5, #0 8023380: f040 8195 bne.w 80236ae <_strtod_r+0xe4e> 8023384: 9807 ldr r0, [sp, #28] 8023386: f020 4300 bic.w r3, r0, #2147483648 ; 0x80000000 802338a: 0d1b lsrs r3, r3, #20 802338c: 051b lsls r3, r3, #20 802338e: f5a3 1380 sub.w r3, r3, #1048576 ; 0x100000 8023392: f04f 32ff mov.w r2, #4294967295 8023396: 9206 str r2, [sp, #24] 8023398: ea6f 5313 mvn.w r3, r3, lsr #20 802339c: ea6f 5303 mvn.w r3, r3, lsl #20 80233a0: 9307 str r3, [sp, #28] 80233a2: 9d0b ldr r5, [sp, #44] ; 0x2c 80233a4: 2d00 cmp r5, #0 80233a6: f000 80c8 beq.w 802353a <_strtod_r+0xcda> 80233aa: 2200 movs r2, #0 80233ac: 2300 movs r3, #0 80233ae: f6c3 1250 movt r2, #14672 ; 0x3950 80233b2: 9314 str r3, [sp, #80] ; 0x50 80233b4: 9215 str r2, [sp, #84] ; 0x54 80233b6: e9dd 0106 ldrd r0, r1, [sp, #24] 80233ba: e9dd 2314 ldrd r2, r3, [sp, #80] ; 0x50 80233be: f7fd f8ff bl 80205c0 <__aeabi_dmul> 80233c2: e9cd 0106 strd r0, r1, [sp, #24] 80233c6: 468a mov sl, r1 80233c8: 9907 ldr r1, [sp, #28] 80233ca: 4681 mov r9, r0 80233cc: 2900 cmp r1, #0 80233ce: f47f aee4 bne.w 802319a <_strtod_r+0x93a> 80233d2: 9a06 ldr r2, [sp, #24] 80233d4: 2a00 cmp r2, #0 80233d6: f47f aee0 bne.w 802319a <_strtod_r+0x93a> 80233da: e6fe b.n 80231da <_strtod_r+0x97a> 80233dc: 9d0f ldr r5, [sp, #60] ; 0x3c 80233de: 4654 mov r4, sl 80233e0: f8dd 9024 ldr.w r9, [sp, #36] ; 0x24 80233e4: f8dd a028 ldr.w sl, [sp, #40] ; 0x28 80233e8: 2d00 cmp r5, #0 80233ea: f000 80d3 beq.w 8023594 <_strtod_r+0xd34> 80233ee: 9b07 ldr r3, [sp, #28] 80233f0: f64f 72ff movw r2, #65535 ; 0xffff 80233f4: f2c0 020f movt r2, #15 80233f8: f023 417f bic.w r1, r3, #4278190080 ; 0xff000000 80233fc: f421 0170 bic.w r1, r1, #15728640 ; 0xf00000 8023400: 4291 cmp r1, r2 8023402: 9906 ldr r1, [sp, #24] 8023404: f000 8119 beq.w 802363a <_strtod_r+0xdda> 8023408: 07cb lsls r3, r1, #31 802340a: d5ca bpl.n 80233a2 <_strtod_r+0xb42> 802340c: 4648 mov r0, r9 802340e: 4651 mov r1, sl 8023410: f001 fe52 bl 80250b8 <__ulp> 8023414: 4602 mov r2, r0 8023416: 460b mov r3, r1 8023418: 4648 mov r0, r9 802341a: 4651 mov r1, sl 802341c: f7fc ff1e bl 802025c <__adddf3> 8023420: e9cd 0106 strd r0, r1, [sp, #24] 8023424: e7bd b.n 80233a2 <_strtod_r+0xb42> 8023426: 9814 ldr r0, [sp, #80] ; 0x50 8023428: 3001 adds r0, #1 802342a: f47f ae85 bne.w 8023138 <_strtod_r+0x8d8> 802342e: 2000 movs r0, #0 8023430: 4654 mov r4, sl 8023432: 4601 mov r1, r0 8023434: 2322 movs r3, #34 ; 0x22 8023436: f6c7 71f0 movt r1, #32752 ; 0x7ff0 802343a: f8cb 3000 str.w r3, [fp] 802343e: 9107 str r1, [sp, #28] 8023440: 4681 mov r9, r0 8023442: 9006 str r0, [sp, #24] 8023444: 468a mov sl, r1 8023446: e6a8 b.n 802319a <_strtod_r+0x93a> 8023448: 2300 movs r3, #0 802344a: 2500 movs r5, #0 802344c: 461c mov r4, r3 802344e: 9506 str r5, [sp, #24] 8023450: f6c7 74f0 movt r4, #32752 ; 0x7ff0 8023454: 2322 movs r3, #34 ; 0x22 8023456: 9407 str r4, [sp, #28] 8023458: 46a9 mov r9, r5 802345a: f8cb 3000 str.w r3, [fp] 802345e: 46a2 mov sl, r4 8023460: f7ff bb4b b.w 8022afa <_strtod_r+0x29a> 8023464: f43f ac35 beq.w 8022cd2 <_strtod_r+0x472> 8023468: 4264 negs r4, r4 802346a: f014 020f ands.w r2, r4, #15 802346e: d00d beq.n 802348c <_strtod_r+0xc2c> 8023470: f248 63e0 movw r3, #34528 ; 0x86e0 8023474: e9dd 0106 ldrd r0, r1, [sp, #24] 8023478: f6c0 0303 movt r3, #2051 ; 0x803 802347c: eb03 03c2 add.w r3, r3, r2, lsl #3 8023480: e9d3 2300 ldrd r2, r3, [r3] 8023484: f7fd f9c6 bl 8020814 <__aeabi_ddiv> 8023488: e9cd 0106 strd r0, r1, [sp, #24] 802348c: 1124 asrs r4, r4, #4 802348e: f43f ac20 beq.w 8022cd2 <_strtod_r+0x472> 8023492: 2c1f cmp r4, #31 8023494: dc40 bgt.n 8023518 <_strtod_r+0xcb8> 8023496: f014 0f10 tst.w r4, #16 802349a: bf14 ite ne 802349c: 256a movne r5, #106 ; 0x6a 802349e: 2500 moveq r5, #0 80234a0: 2c00 cmp r4, #0 80234a2: 950b str r5, [sp, #44] ; 0x2c 80234a4: dd17 ble.n 80234d6 <_strtod_r+0xc76> 80234a6: f248 65a8 movw r5, #34472 ; 0x86a8 80234aa: e9dd 2306 ldrd r2, r3, [sp, #24] 80234ae: f6c0 0503 movt r5, #2051 ; 0x803 80234b2: f014 0f01 tst.w r4, #1 80234b6: 4610 mov r0, r2 80234b8: 4619 mov r1, r3 80234ba: d005 beq.n 80234c8 <_strtod_r+0xc68> 80234bc: e9d5 2300 ldrd r2, r3, [r5] 80234c0: f7fd f87e bl 80205c0 <__aeabi_dmul> 80234c4: 4602 mov r2, r0 80234c6: 460b mov r3, r1 80234c8: 3508 adds r5, #8 80234ca: 1064 asrs r4, r4, #1 80234cc: d1f1 bne.n 80234b2 <_strtod_r+0xc52> 80234ce: 4610 mov r0, r2 80234d0: 4619 mov r1, r3 80234d2: e9cd 0106 strd r0, r1, [sp, #24] 80234d6: 9c0b ldr r4, [sp, #44] ; 0x2c 80234d8: b18c cbz r4, 80234fe <_strtod_r+0xc9e> 80234da: 9a07 ldr r2, [sp, #28] 80234dc: f3c2 530a ubfx r3, r2, #20, #11 80234e0: f1c3 036b rsb r3, r3, #107 ; 0x6b 80234e4: 2b00 cmp r3, #0 80234e6: dd0a ble.n 80234fe <_strtod_r+0xc9e> 80234e8: 2b1f cmp r3, #31 80234ea: f340 810a ble.w 8023702 <_strtod_r+0xea2> 80234ee: 2100 movs r1, #0 80234f0: 2b34 cmp r3, #52 ; 0x34 80234f2: 9106 str r1, [sp, #24] 80234f4: f340 810d ble.w 8023712 <_strtod_r+0xeb2> 80234f8: f04f 725c mov.w r2, #57671680 ; 0x3700000 80234fc: 9207 str r2, [sp, #28] 80234fe: 9d06 ldr r5, [sp, #24] 8023500: 2200 movs r2, #0 8023502: 9c07 ldr r4, [sp, #28] 8023504: 2300 movs r3, #0 8023506: 4628 mov r0, r5 8023508: 46a9 mov r9, r5 802350a: 4621 mov r1, r4 802350c: 46a2 mov sl, r4 802350e: f7fd fabf bl 8020a90 <__aeabi_dcmpeq> 8023512: 2800 cmp r0, #0 8023514: f43f abe2 beq.w 8022cdc <_strtod_r+0x47c> 8023518: f04f 0900 mov.w r9, #0 802351c: 2322 movs r3, #34 ; 0x22 802351e: 46ca mov sl, r9 8023520: f8cb 3000 str.w r3, [fp] 8023524: f7ff bae9 b.w 8022afa <_strtod_r+0x29a> 8023528: 9a0f ldr r2, [sp, #60] ; 0x3c 802352a: 2300 movs r3, #0 802352c: 4699 mov r9, r3 802352e: f6cb 73e0 movt r3, #49120 ; 0xbfe0 8023532: f6c3 79e0 movt r9, #16352 ; 0x3fe0 8023536: 920c str r2, [sp, #48] ; 0x30 8023538: e5bf b.n 80230ba <_strtod_r+0x85a> 802353a: f8dd 9018 ldr.w r9, [sp, #24] 802353e: f8dd a01c ldr.w sl, [sp, #28] 8023542: e62a b.n 802319a <_strtod_r+0x93a> 8023544: f04f 0900 mov.w r9, #0 8023548: 3601 adds r6, #1 802354a: 46ca mov sl, r9 802354c: 9617 str r6, [sp, #92] ; 0x5c 802354e: f7ff bad4 b.w 8022afa <_strtod_r+0x29a> 8023552: 9c09 ldr r4, [sp, #36] ; 0x24 8023554: f1c8 0325 rsb r3, r8, #37 ; 0x25 8023558: 429c cmp r4, r3 802355a: f73f ab9d bgt.w 8022c98 <_strtod_r+0x438> 802355e: f1c8 080f rsb r8, r8, #15 8023562: f248 64e0 movw r4, #34528 ; 0x86e0 8023566: f6c0 0403 movt r4, #2051 ; 0x803 802356a: e9dd 2306 ldrd r2, r3, [sp, #24] 802356e: eb04 01c8 add.w r1, r4, r8, lsl #3 8023572: e9d1 0100 ldrd r0, r1, [r1] 8023576: f7fd f823 bl 80205c0 <__aeabi_dmul> 802357a: 9d09 ldr r5, [sp, #36] ; 0x24 802357c: ebc8 0805 rsb r8, r8, r5 8023580: eb04 04c8 add.w r4, r4, r8, lsl #3 8023584: e9d4 2300 ldrd r2, r3, [r4] 8023588: f7fd f81a bl 80205c0 <__aeabi_dmul> 802358c: 4681 mov r9, r0 802358e: 468a mov sl, r1 8023590: f7ff bab3 b.w 8022afa <_strtod_r+0x29a> 8023594: 9907 ldr r1, [sp, #28] 8023596: f3c1 0313 ubfx r3, r1, #0, #20 802359a: 2b00 cmp r3, #0 802359c: d141 bne.n 8023622 <_strtod_r+0xdc2> 802359e: 9b06 ldr r3, [sp, #24] 80235a0: 2b00 cmp r3, #0 80235a2: f43f aeeb beq.w 802337c <_strtod_r+0xb1c> 80235a6: 07da lsls r2, r3, #31 80235a8: f57f aefb bpl.w 80233a2 <_strtod_r+0xb42> 80235ac: 4648 mov r0, r9 80235ae: 4651 mov r1, sl 80235b0: f001 fd82 bl 80250b8 <__ulp> 80235b4: 4602 mov r2, r0 80235b6: 460b mov r3, r1 80235b8: 4648 mov r0, r9 80235ba: 4651 mov r1, sl 80235bc: f7fc fe4c bl 8020258 <__aeabi_dsub> 80235c0: 4602 mov r2, r0 80235c2: 460b mov r3, r1 80235c4: e9cd 2306 strd r2, r3, [sp, #24] 80235c8: 2200 movs r2, #0 80235ca: 2300 movs r3, #0 80235cc: f7fd fa60 bl 8020a90 <__aeabi_dcmpeq> 80235d0: 2800 cmp r0, #0 80235d2: f47f adff bne.w 80231d4 <_strtod_r+0x974> 80235d6: e6e4 b.n 80233a2 <_strtod_r+0xb42> 80235d8: 9d09 ldr r5, [sp, #36] ; 0x24 80235da: 426d negs r5, r5 80235dc: 950d str r5, [sp, #52] ; 0x34 80235de: f7ff bb8b b.w 8022cf8 <_strtod_r+0x498> 80235e2: 9c09 ldr r4, [sp, #36] ; 0x24 80235e4: f114 0f16 cmn.w r4, #22 80235e8: f6ff ab56 blt.w 8022c98 <_strtod_r+0x438> 80235ec: f248 63e0 movw r3, #34528 ; 0x86e0 80235f0: e9dd 0106 ldrd r0, r1, [sp, #24] 80235f4: f6c0 0303 movt r3, #2051 ; 0x803 80235f8: eba3 03c4 sub.w r3, r3, r4, lsl #3 80235fc: e9d3 2300 ldrd r2, r3, [r3] 8023600: f7fd f908 bl 8020814 <__aeabi_ddiv> 8023604: 4681 mov r9, r0 8023606: 468a mov sl, r1 8023608: f7ff ba77 b.w 8022afa <_strtod_r+0x29a> 802360c: 2000 movs r0, #0 802360e: f1b8 0f10 cmp.w r8, #16 8023612: f73f ae8e bgt.w 8023332 <_strtod_r+0xad2> 8023616: eb0a 0a8a add.w sl, sl, sl, lsl #2 802361a: 2000 movs r0, #0 802361c: eb01 0a4a add.w sl, r1, sl, lsl #1 8023620: e687 b.n 8023332 <_strtod_r+0xad2> 8023622: 9b06 ldr r3, [sp, #24] 8023624: e7bf b.n 80235a6 <_strtod_r+0xd46> 8023626: f101 7154 add.w r1, r1, #55574528 ; 0x3500000 802362a: 2400 movs r4, #0 802362c: 9107 str r1, [sp, #28] 802362e: 468a mov sl, r1 8023630: 940b str r4, [sp, #44] ; 0x2c 8023632: f8dd 9018 ldr.w r9, [sp, #24] 8023636: f7ff bb51 b.w 8022cdc <_strtod_r+0x47c> 802363a: 9d0b ldr r5, [sp, #44] ; 0x2c 802363c: b1d5 cbz r5, 8023674 <_strtod_r+0xe14> 802363e: 2200 movs r2, #0 8023640: f6c7 72f0 movt r2, #32752 ; 0x7ff0 8023644: 401a ands r2, r3 8023646: f1b2 6fd4 cmp.w r2, #111149056 ; 0x6a00000 802364a: d813 bhi.n 8023674 <_strtod_r+0xe14> 802364c: 0d12 lsrs r2, r2, #20 802364e: f04f 30ff mov.w r0, #4294967295 8023652: f1c2 026b rsb r2, r2, #107 ; 0x6b 8023656: fa00 f202 lsl.w r2, r0, r2 802365a: 4291 cmp r1, r2 802365c: f47f aed4 bne.w 8023408 <_strtod_r+0xba8> 8023660: 2200 movs r2, #0 8023662: 2000 movs r0, #0 8023664: f6c7 72f0 movt r2, #32752 ; 0x7ff0 8023668: 9006 str r0, [sp, #24] 802366a: 401a ands r2, r3 802366c: f502 1280 add.w r2, r2, #1048576 ; 0x100000 8023670: 9207 str r2, [sp, #28] 8023672: e696 b.n 80233a2 <_strtod_r+0xb42> 8023674: f04f 32ff mov.w r2, #4294967295 8023678: e7ef b.n 802365a <_strtod_r+0xdfa> 802367a: 4c2a ldr r4, [pc, #168] ; (8023724 <_strtod_r+0xec4>) 802367c: 4611 mov r1, r2 802367e: 9217 str r2, [sp, #92] ; 0x5c 8023680: f814 0f01 ldrb.w r0, [r4, #1]! 8023684: 460b mov r3, r1 8023686: b310 cbz r0, 80236ce <_strtod_r+0xe6e> 8023688: 785b ldrb r3, [r3, #1] 802368a: 3101 adds r1, #1 802368c: 2b40 cmp r3, #64 ; 0x40 802368e: dd02 ble.n 8023696 <_strtod_r+0xe36> 8023690: 2b5a cmp r3, #90 ; 0x5a 8023692: bfd8 it le 8023694: 3320 addle r3, #32 8023696: 4283 cmp r3, r0 8023698: d0f2 beq.n 8023680 <_strtod_r+0xe20> 802369a: 3201 adds r2, #1 802369c: 9217 str r2, [sp, #92] ; 0x5c 802369e: 2500 movs r5, #0 80236a0: 9506 str r5, [sp, #24] 80236a2: 4628 mov r0, r5 80236a4: f6c7 70f0 movt r0, #32752 ; 0x7ff0 80236a8: 9007 str r0, [sp, #28] 80236aa: f7ff baa9 b.w 8022c00 <_strtod_r+0x3a0> 80236ae: 9907 ldr r1, [sp, #28] 80236b0: f021 4300 bic.w r3, r1, #2147483648 ; 0x80000000 80236b4: 0d1b lsrs r3, r3, #20 80236b6: 051b lsls r3, r3, #20 80236b8: f1b3 6fd6 cmp.w r3, #112197632 ; 0x6b00000 80236bc: f63f ae67 bhi.w 802338e <_strtod_r+0xb2e> 80236c0: f1b3 7f5c cmp.w r3, #57671680 ; 0x3700000 80236c4: f63f ae71 bhi.w 80233aa <_strtod_r+0xb4a> 80236c8: e584 b.n 80231d4 <_strtod_r+0x974> 80236ca: 4643 mov r3, r8 80236cc: e627 b.n 802331e <_strtod_r+0xabe> 80236ce: 3101 adds r1, #1 80236d0: 9117 str r1, [sp, #92] ; 0x5c 80236d2: e7e4 b.n 802369e <_strtod_r+0xe3e> 80236d4: f04f 0900 mov.w r9, #0 80236d8: f6c0 0a03 movt sl, #2051 ; 0x803 80236dc: e47f b.n 8022fde <_strtod_r+0x77e> 80236de: a817 add r0, sp, #92 ; 0x5c 80236e0: 4911 ldr r1, [pc, #68] ; (8023728 <_strtod_r+0xec8>) 80236e2: aa1a add r2, sp, #104 ; 0x68 80236e4: f000 fd7e bl 80241e4 <__hexnan> 80236e8: 2805 cmp r0, #5 80236ea: f47f aa83 bne.w 8022bf4 <_strtod_r+0x394> 80236ee: 9b1b ldr r3, [sp, #108] ; 0x6c 80236f0: 9a1a ldr r2, [sp, #104] ; 0x68 80236f2: f043 43ff orr.w r3, r3, #2139095040 ; 0x7f800000 80236f6: f443 03e0 orr.w r3, r3, #7340032 ; 0x700000 80236fa: 9307 str r3, [sp, #28] 80236fc: 9206 str r2, [sp, #24] 80236fe: f7ff ba7f b.w 8022c00 <_strtod_r+0x3a0> 8023702: f04f 32ff mov.w r2, #4294967295 8023706: 9c06 ldr r4, [sp, #24] 8023708: fa02 f303 lsl.w r3, r2, r3 802370c: 401c ands r4, r3 802370e: 9406 str r4, [sp, #24] 8023710: e6f5 b.n 80234fe <_strtod_r+0xc9e> 8023712: f04f 31ff mov.w r1, #4294967295 8023716: 3b20 subs r3, #32 8023718: fa01 f303 lsl.w r3, r1, r3 802371c: 4013 ands r3, r2 802371e: 9307 str r3, [sp, #28] 8023720: e6ed b.n 80234fe <_strtod_r+0xc9e> 8023722: bf00 nop 8023724: 08044af7 .word 0x08044af7 8023728: 20000018 .word 0x20000018 0802372c : 802372c: f240 032c movw r3, #44 ; 0x2c 8023730: 460a mov r2, r1 8023732: f2c2 0300 movt r3, #8192 ; 0x2000 8023736: 4601 mov r1, r0 8023738: 6818 ldr r0, [r3, #0] 802373a: f7ff b891 b.w 8022860 <_strtod_r> 802373e: bf00 nop 08023740 : 8023740: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 8023744: f240 062c movw r6, #44 ; 0x2c 8023748: f2c2 0600 movt r6, #8192 ; 0x2000 802374c: 460a mov r2, r1 802374e: 4601 mov r1, r0 8023750: f04f 0801 mov.w r8, #1 8023754: 6830 ldr r0, [r6, #0] 8023756: f7ff f883 bl 8022860 <_strtod_r> 802375a: 460d mov r5, r1 802375c: 4604 mov r4, r0 802375e: f7fd fa11 bl 8020b84 <__aeabi_d2f> 8023762: 2100 movs r1, #0 8023764: 4607 mov r7, r0 8023766: f7fd fcff bl 8021168 <__aeabi_fcmpeq> 802376a: b908 cbnz r0, 8023770 802376c: f04f 0800 mov.w r8, #0 8023770: 4620 mov r0, r4 8023772: 4629 mov r1, r5 8023774: 2200 movs r2, #0 8023776: 2300 movs r3, #0 8023778: f04f 0901 mov.w r9, #1 802377c: f7fd f988 bl 8020a90 <__aeabi_dcmpeq> 8023780: b108 cbz r0, 8023786 8023782: f04f 0900 mov.w r9, #0 8023786: ea08 0809 and.w r8, r8, r9 802378a: f018 0fff tst.w r8, #255 ; 0xff 802378e: d116 bne.n 80237be 8023790: f64f 71ff movw r1, #65535 ; 0xffff 8023794: 4638 mov r0, r7 8023796: f6c7 717f movt r1, #32639 ; 0x7f7f 802379a: f7fd fd0d bl 80211b8 <__aeabi_fcmpgt> 802379e: b9a0 cbnz r0, 80237ca 80237a0: 4638 mov r0, r7 80237a2: f46f 0100 mvn.w r1, #8388608 ; 0x800000 80237a6: f7fd fce9 bl 802117c <__aeabi_fcmplt> 80237aa: b158 cbz r0, 80237c4 80237ac: 4620 mov r0, r4 80237ae: 4629 mov r1, r5 80237b0: f04f 32ff mov.w r2, #4294967295 80237b4: f46f 1380 mvn.w r3, #1048576 ; 0x100000 80237b8: f7fd f974 bl 8020aa4 <__aeabi_dcmplt> 80237bc: b910 cbnz r0, 80237c4 80237be: 6833 ldr r3, [r6, #0] 80237c0: 2222 movs r2, #34 ; 0x22 80237c2: 601a str r2, [r3, #0] 80237c4: 4638 mov r0, r7 80237c6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 80237ca: f64f 73ff movw r3, #65535 ; 0xffff 80237ce: 4620 mov r0, r4 80237d0: 4629 mov r1, r5 80237d2: f04f 32ff mov.w r2, #4294967295 80237d6: f6c7 73ef movt r3, #32751 ; 0x7fef 80237da: f7fd f981 bl 8020ae0 <__aeabi_dcmpgt> 80237de: 2800 cmp r0, #0 80237e0: d0ed beq.n 80237be 80237e2: e7dd b.n 80237a0 80237e4: f3af 8000 nop.w 080237e8 <_strtol_r>: 80237e8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80237ec: f240 0400 movw r4, #0 80237f0: f2c2 0400 movt r4, #8192 ; 0x2000 80237f4: b085 sub sp, #20 80237f6: 4699 mov r9, r3 80237f8: 460b mov r3, r1 80237fa: f8d4 8000 ldr.w r8, [r4] 80237fe: 9102 str r1, [sp, #8] 8023800: 9003 str r0, [sp, #12] 8023802: 461c mov r4, r3 8023804: f814 5b01 ldrb.w r5, [r4], #1 8023808: eb08 0105 add.w r1, r8, r5 802380c: 4623 mov r3, r4 802380e: 7849 ldrb r1, [r1, #1] 8023810: f001 0108 and.w r1, r1, #8 8023814: b2c9 uxtb r1, r1 8023816: 2900 cmp r1, #0 8023818: d1f3 bne.n 8023802 <_strtol_r+0x1a> 802381a: 2d2d cmp r5, #45 ; 0x2d 802381c: d07b beq.n 8023916 <_strtol_r+0x12e> 802381e: 2d2b cmp r5, #43 ; 0x2b 8023820: bf05 ittet eq 8023822: 4624 moveq r4, r4 8023824: 460b moveq r3, r1 8023826: 460b movne r3, r1 8023828: f814 5b01 ldrbeq.w r5, [r4], #1 802382c: f039 0110 bics.w r1, r9, #16 8023830: d112 bne.n 8023858 <_strtol_r+0x70> 8023832: f1d9 0001 rsbs r0, r9, #1 8023836: bf38 it cc 8023838: 2000 movcc r0, #0 802383a: 2d30 cmp r5, #48 ; 0x30 802383c: d004 beq.n 8023848 <_strtol_r+0x60> 802383e: b158 cbz r0, 8023858 <_strtol_r+0x70> 8023840: f04f 090a mov.w r9, #10 8023844: 46cb mov fp, r9 8023846: e008 b.n 802385a <_strtol_r+0x72> 8023848: 7821 ldrb r1, [r4, #0] 802384a: f001 01df and.w r1, r1, #223 ; 0xdf 802384e: 2958 cmp r1, #88 ; 0x58 8023850: d065 beq.n 802391e <_strtol_r+0x136> 8023852: b108 cbz r0, 8023858 <_strtol_r+0x70> 8023854: f04f 0908 mov.w r9, #8 8023858: 46cb mov fp, r9 802385a: 2b00 cmp r3, #0 802385c: 4659 mov r1, fp 802385e: bf0c ite eq 8023860: f06f 4600 mvneq.w r6, #2147483648 ; 0x80000000 8023864: f04f 4600 movne.w r6, #2147483648 ; 0x80000000 8023868: e88d 000c stmia.w sp, {r2, r3} 802386c: 4630 mov r0, r6 802386e: 2700 movs r7, #0 8023870: f7fe f964 bl 8021b3c <__aeabi_uidivmod> 8023874: 4630 mov r0, r6 8023876: 468a mov sl, r1 8023878: 4659 mov r1, fp 802387a: f7fe f831 bl 80218e0 <__aeabi_uidiv> 802387e: 46bc mov ip, r7 8023880: e89d 000c ldmia.w sp, {r2, r3} 8023884: e016 b.n 80238b4 <_strtol_r+0xcc> 8023886: 3d30 subs r5, #48 ; 0x30 8023888: 45a9 cmp r9, r5 802388a: dd25 ble.n 80238d8 <_strtol_r+0xf0> 802388c: 4584 cmp ip, r0 802388e: bf94 ite ls 8023890: 2100 movls r1, #0 8023892: 2101 movhi r1, #1 8023894: ea51 77d7 orrs.w r7, r1, r7, lsr #31 8023898: d129 bne.n 80238ee <_strtol_r+0x106> 802389a: 4555 cmp r5, sl 802389c: bfd4 ite le 802389e: 2100 movle r1, #0 80238a0: 2101 movgt r1, #1 80238a2: 4584 cmp ip, r0 80238a4: bf18 it ne 80238a6: 2100 movne r1, #0 80238a8: bb09 cbnz r1, 80238ee <_strtol_r+0x106> 80238aa: fb0b 5c0c mla ip, fp, ip, r5 80238ae: 2701 movs r7, #1 80238b0: f814 5b01 ldrb.w r5, [r4], #1 80238b4: eb08 0105 add.w r1, r8, r5 80238b8: 7849 ldrb r1, [r1, #1] 80238ba: f001 0604 and.w r6, r1, #4 80238be: b2f6 uxtb r6, r6 80238c0: 2e00 cmp r6, #0 80238c2: d1e0 bne.n 8023886 <_strtol_r+0x9e> 80238c4: f011 0103 ands.w r1, r1, #3 80238c8: d006 beq.n 80238d8 <_strtol_r+0xf0> 80238ca: 2901 cmp r1, #1 80238cc: bf14 ite ne 80238ce: 2157 movne r1, #87 ; 0x57 80238d0: 2137 moveq r1, #55 ; 0x37 80238d2: 1a6d subs r5, r5, r1 80238d4: 45a9 cmp r9, r5 80238d6: dcd9 bgt.n 802388c <_strtol_r+0xa4> 80238d8: 1c79 adds r1, r7, #1 80238da: d00b beq.n 80238f4 <_strtol_r+0x10c> 80238dc: b9c3 cbnz r3, 8023910 <_strtol_r+0x128> 80238de: 4660 mov r0, ip 80238e0: b112 cbz r2, 80238e8 <_strtol_r+0x100> 80238e2: b997 cbnz r7, 802390a <_strtol_r+0x122> 80238e4: 9b02 ldr r3, [sp, #8] 80238e6: 6013 str r3, [r2, #0] 80238e8: b005 add sp, #20 80238ea: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80238ee: f04f 37ff mov.w r7, #4294967295 80238f2: e7dd b.n 80238b0 <_strtol_r+0xc8> 80238f4: 9903 ldr r1, [sp, #12] 80238f6: 2b00 cmp r3, #0 80238f8: bf0c ite eq 80238fa: f06f 4000 mvneq.w r0, #2147483648 ; 0x80000000 80238fe: f04f 4000 movne.w r0, #2147483648 ; 0x80000000 8023902: 2322 movs r3, #34 ; 0x22 8023904: 600b str r3, [r1, #0] 8023906: 2a00 cmp r2, #0 8023908: d0ee beq.n 80238e8 <_strtol_r+0x100> 802390a: 3c01 subs r4, #1 802390c: 9402 str r4, [sp, #8] 802390e: e7e9 b.n 80238e4 <_strtol_r+0xfc> 8023910: f1cc 0c00 rsb ip, ip, #0 8023914: e7e3 b.n 80238de <_strtol_r+0xf6> 8023916: f814 5b01 ldrb.w r5, [r4], #1 802391a: 2301 movs r3, #1 802391c: e786 b.n 802382c <_strtol_r+0x44> 802391e: f04f 0910 mov.w r9, #16 8023922: 7865 ldrb r5, [r4, #1] 8023924: 46cb mov fp, r9 8023926: 3402 adds r4, #2 8023928: e797 b.n 802385a <_strtol_r+0x72> 802392a: bf00 nop 0802392c : 802392c: b430 push {r4, r5} 802392e: f240 042c movw r4, #44 ; 0x2c 8023932: f2c2 0400 movt r4, #8192 ; 0x2000 8023936: 460d mov r5, r1 8023938: 4613 mov r3, r2 802393a: 4601 mov r1, r0 802393c: 462a mov r2, r5 802393e: 6820 ldr r0, [r4, #0] 8023940: bc30 pop {r4, r5} 8023942: f7ff bf51 b.w 80237e8 <_strtol_r> 8023946: bf00 nop 08023948 <_malloc_trim_r>: 8023948: b5f8 push {r3, r4, r5, r6, r7, lr} 802394a: f240 149c movw r4, #412 ; 0x19c 802394e: f2c2 0400 movt r4, #8192 ; 0x2000 8023952: 460f mov r7, r1 8023954: 4605 mov r5, r0 8023956: f001 f895 bl 8024a84 <__malloc_lock> 802395a: 68a3 ldr r3, [r4, #8] 802395c: 685e ldr r6, [r3, #4] 802395e: f026 0603 bic.w r6, r6, #3 8023962: f606 73ef addw r3, r6, #4079 ; 0xfef 8023966: 1bdf subs r7, r3, r7 8023968: 0b3f lsrs r7, r7, #12 802396a: 3f01 subs r7, #1 802396c: 033f lsls r7, r7, #12 802396e: f5b7 5f80 cmp.w r7, #4096 ; 0x1000 8023972: db07 blt.n 8023984 <_malloc_trim_r+0x3c> 8023974: 2100 movs r1, #0 8023976: 4628 mov r0, r5 8023978: f001 fd10 bl 802539c <_sbrk_r> 802397c: 68a3 ldr r3, [r4, #8] 802397e: 199b adds r3, r3, r6 8023980: 4298 cmp r0, r3 8023982: d004 beq.n 802398e <_malloc_trim_r+0x46> 8023984: 4628 mov r0, r5 8023986: f001 f87f bl 8024a88 <__malloc_unlock> 802398a: 2000 movs r0, #0 802398c: bdf8 pop {r3, r4, r5, r6, r7, pc} 802398e: 4279 negs r1, r7 8023990: 4628 mov r0, r5 8023992: f001 fd03 bl 802539c <_sbrk_r> 8023996: 3001 adds r0, #1 8023998: d010 beq.n 80239bc <_malloc_trim_r+0x74> 802399a: f640 23d4 movw r3, #2772 ; 0xad4 802399e: 68a1 ldr r1, [r4, #8] 80239a0: f2c2 0300 movt r3, #8192 ; 0x2000 80239a4: 1bf6 subs r6, r6, r7 80239a6: 4628 mov r0, r5 80239a8: f046 0601 orr.w r6, r6, #1 80239ac: 681a ldr r2, [r3, #0] 80239ae: 604e str r6, [r1, #4] 80239b0: 1bd7 subs r7, r2, r7 80239b2: 601f str r7, [r3, #0] 80239b4: f001 f868 bl 8024a88 <__malloc_unlock> 80239b8: 2001 movs r0, #1 80239ba: bdf8 pop {r3, r4, r5, r6, r7, pc} 80239bc: 2100 movs r1, #0 80239be: 4628 mov r0, r5 80239c0: f001 fcec bl 802539c <_sbrk_r> 80239c4: 68a3 ldr r3, [r4, #8] 80239c6: 1ac2 subs r2, r0, r3 80239c8: 2a0f cmp r2, #15 80239ca: dddb ble.n 8023984 <_malloc_trim_r+0x3c> 80239cc: f240 54a4 movw r4, #1444 ; 0x5a4 80239d0: f640 21d4 movw r1, #2772 ; 0xad4 80239d4: f2c2 0400 movt r4, #8192 ; 0x2000 80239d8: f2c2 0100 movt r1, #8192 ; 0x2000 80239dc: f042 0201 orr.w r2, r2, #1 80239e0: 605a str r2, [r3, #4] 80239e2: 6823 ldr r3, [r4, #0] 80239e4: 1ac0 subs r0, r0, r3 80239e6: 6008 str r0, [r1, #0] 80239e8: e7cc b.n 8023984 <_malloc_trim_r+0x3c> 80239ea: bf00 nop 080239ec <_free_r>: 80239ec: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 80239f0: 460e mov r6, r1 80239f2: 4680 mov r8, r0 80239f4: 2900 cmp r1, #0 80239f6: d05c beq.n 8023ab2 <_free_r+0xc6> 80239f8: f001 f844 bl 8024a84 <__malloc_lock> 80239fc: f240 159c movw r5, #412 ; 0x19c 8023a00: f856 1c04 ldr.w r1, [r6, #-4] 8023a04: f2c2 0500 movt r5, #8192 ; 0x2000 8023a08: f1a6 0408 sub.w r4, r6, #8 8023a0c: f021 0301 bic.w r3, r1, #1 8023a10: 68af ldr r7, [r5, #8] 8023a12: 18e2 adds r2, r4, r3 8023a14: 4297 cmp r7, r2 8023a16: 6850 ldr r0, [r2, #4] 8023a18: f020 0003 bic.w r0, r0, #3 8023a1c: d067 beq.n 8023aee <_free_r+0x102> 8023a1e: f011 0101 ands.w r1, r1, #1 8023a22: 6050 str r0, [r2, #4] 8023a24: d035 beq.n 8023a92 <_free_r+0xa6> 8023a26: 2100 movs r1, #0 8023a28: 1816 adds r6, r2, r0 8023a2a: 6876 ldr r6, [r6, #4] 8023a2c: f016 0f01 tst.w r6, #1 8023a30: d106 bne.n 8023a40 <_free_r+0x54> 8023a32: 181b adds r3, r3, r0 8023a34: 6890 ldr r0, [r2, #8] 8023a36: 2900 cmp r1, #0 8023a38: d04d beq.n 8023ad6 <_free_r+0xea> 8023a3a: 68d2 ldr r2, [r2, #12] 8023a3c: 60c2 str r2, [r0, #12] 8023a3e: 6090 str r0, [r2, #8] 8023a40: f043 0201 orr.w r2, r3, #1 8023a44: 50e3 str r3, [r4, r3] 8023a46: 6062 str r2, [r4, #4] 8023a48: b9f1 cbnz r1, 8023a88 <_free_r+0x9c> 8023a4a: f5b3 7f00 cmp.w r3, #512 ; 0x200 8023a4e: d332 bcc.n 8023ab6 <_free_r+0xca> 8023a50: 0a5a lsrs r2, r3, #9 8023a52: 2a04 cmp r2, #4 8023a54: d86c bhi.n 8023b30 <_free_r+0x144> 8023a56: 0998 lsrs r0, r3, #6 8023a58: 3038 adds r0, #56 ; 0x38 8023a5a: 0041 lsls r1, r0, #1 8023a5c: eb05 0581 add.w r5, r5, r1, lsl #2 8023a60: f240 119c movw r1, #412 ; 0x19c 8023a64: f2c2 0100 movt r1, #8192 ; 0x2000 8023a68: 68aa ldr r2, [r5, #8] 8023a6a: 42aa cmp r2, r5 8023a6c: d06b beq.n 8023b46 <_free_r+0x15a> 8023a6e: 6851 ldr r1, [r2, #4] 8023a70: f021 0103 bic.w r1, r1, #3 8023a74: 428b cmp r3, r1 8023a76: d202 bcs.n 8023a7e <_free_r+0x92> 8023a78: 6892 ldr r2, [r2, #8] 8023a7a: 4295 cmp r5, r2 8023a7c: d1f7 bne.n 8023a6e <_free_r+0x82> 8023a7e: 68d3 ldr r3, [r2, #12] 8023a80: 60e3 str r3, [r4, #12] 8023a82: 60a2 str r2, [r4, #8] 8023a84: 60d4 str r4, [r2, #12] 8023a86: 609c str r4, [r3, #8] 8023a88: 4640 mov r0, r8 8023a8a: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} 8023a8e: f000 bffb b.w 8024a88 <__malloc_unlock> 8023a92: f856 6c08 ldr.w r6, [r6, #-8] 8023a96: f105 0c08 add.w ip, r5, #8 8023a9a: 1ba4 subs r4, r4, r6 8023a9c: 199b adds r3, r3, r6 8023a9e: 68a6 ldr r6, [r4, #8] 8023aa0: 4566 cmp r6, ip 8023aa2: d043 beq.n 8023b2c <_free_r+0x140> 8023aa4: f8d4 c00c ldr.w ip, [r4, #12] 8023aa8: f8c6 c00c str.w ip, [r6, #12] 8023aac: f8cc 6008 str.w r6, [ip, #8] 8023ab0: e7ba b.n 8023a28 <_free_r+0x3c> 8023ab2: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8023ab6: 08db lsrs r3, r3, #3 8023ab8: 2101 movs r1, #1 8023aba: 6868 ldr r0, [r5, #4] 8023abc: eb05 02c3 add.w r2, r5, r3, lsl #3 8023ac0: 109b asrs r3, r3, #2 8023ac2: fa01 f303 lsl.w r3, r1, r3 8023ac6: 60e2 str r2, [r4, #12] 8023ac8: 6891 ldr r1, [r2, #8] 8023aca: 4318 orrs r0, r3 8023acc: 6068 str r0, [r5, #4] 8023ace: 60a1 str r1, [r4, #8] 8023ad0: 60cc str r4, [r1, #12] 8023ad2: 6094 str r4, [r2, #8] 8023ad4: e7d8 b.n 8023a88 <_free_r+0x9c> 8023ad6: 4e29 ldr r6, [pc, #164] ; (8023b7c <_free_r+0x190>) 8023ad8: 42b0 cmp r0, r6 8023ada: d1ae bne.n 8023a3a <_free_r+0x4e> 8023adc: 616c str r4, [r5, #20] 8023ade: f043 0201 orr.w r2, r3, #1 8023ae2: 612c str r4, [r5, #16] 8023ae4: 60e0 str r0, [r4, #12] 8023ae6: 60a0 str r0, [r4, #8] 8023ae8: 6062 str r2, [r4, #4] 8023aea: 50e3 str r3, [r4, r3] 8023aec: e7cc b.n 8023a88 <_free_r+0x9c> 8023aee: 18c0 adds r0, r0, r3 8023af0: 07cb lsls r3, r1, #31 8023af2: d407 bmi.n 8023b04 <_free_r+0x118> 8023af4: f856 3c08 ldr.w r3, [r6, #-8] 8023af8: 1ae4 subs r4, r4, r3 8023afa: 18c0 adds r0, r0, r3 8023afc: 68a2 ldr r2, [r4, #8] 8023afe: 68e3 ldr r3, [r4, #12] 8023b00: 60d3 str r3, [r2, #12] 8023b02: 609a str r2, [r3, #8] 8023b04: f240 52a8 movw r2, #1448 ; 0x5a8 8023b08: f040 0301 orr.w r3, r0, #1 8023b0c: f2c2 0200 movt r2, #8192 ; 0x2000 8023b10: 6063 str r3, [r4, #4] 8023b12: 60ac str r4, [r5, #8] 8023b14: 6813 ldr r3, [r2, #0] 8023b16: 4298 cmp r0, r3 8023b18: d3b6 bcc.n 8023a88 <_free_r+0x9c> 8023b1a: f640 23d0 movw r3, #2768 ; 0xad0 8023b1e: 4640 mov r0, r8 8023b20: f2c2 0300 movt r3, #8192 ; 0x2000 8023b24: 6819 ldr r1, [r3, #0] 8023b26: f7ff ff0f bl 8023948 <_malloc_trim_r> 8023b2a: e7ad b.n 8023a88 <_free_r+0x9c> 8023b2c: 2101 movs r1, #1 8023b2e: e77b b.n 8023a28 <_free_r+0x3c> 8023b30: f102 005b add.w r0, r2, #91 ; 0x5b 8023b34: 0041 lsls r1, r0, #1 8023b36: 2a14 cmp r2, #20 8023b38: d990 bls.n 8023a5c <_free_r+0x70> 8023b3a: 2a54 cmp r2, #84 ; 0x54 8023b3c: d80c bhi.n 8023b58 <_free_r+0x16c> 8023b3e: 0b18 lsrs r0, r3, #12 8023b40: 306e adds r0, #110 ; 0x6e 8023b42: 0041 lsls r1, r0, #1 8023b44: e78a b.n 8023a5c <_free_r+0x70> 8023b46: 2601 movs r6, #1 8023b48: 684d ldr r5, [r1, #4] 8023b4a: 1080 asrs r0, r0, #2 8023b4c: 4613 mov r3, r2 8023b4e: fa06 f000 lsl.w r0, r6, r0 8023b52: 4305 orrs r5, r0 8023b54: 604d str r5, [r1, #4] 8023b56: e793 b.n 8023a80 <_free_r+0x94> 8023b58: f5b2 7faa cmp.w r2, #340 ; 0x154 8023b5c: d803 bhi.n 8023b66 <_free_r+0x17a> 8023b5e: 0bd8 lsrs r0, r3, #15 8023b60: 3077 adds r0, #119 ; 0x77 8023b62: 0041 lsls r1, r0, #1 8023b64: e77a b.n 8023a5c <_free_r+0x70> 8023b66: f240 5154 movw r1, #1364 ; 0x554 8023b6a: 428a cmp r2, r1 8023b6c: d803 bhi.n 8023b76 <_free_r+0x18a> 8023b6e: 0c98 lsrs r0, r3, #18 8023b70: 307c adds r0, #124 ; 0x7c 8023b72: 0041 lsls r1, r0, #1 8023b74: e772 b.n 8023a5c <_free_r+0x70> 8023b76: 21fc movs r1, #252 ; 0xfc 8023b78: 207e movs r0, #126 ; 0x7e 8023b7a: e76f b.n 8023a5c <_free_r+0x70> 8023b7c: 200001a4 .word 0x200001a4 08023b80 : 8023b80: 6902 ldr r2, [r0, #16] 8023b82: 114b asrs r3, r1, #5 8023b84: e92d 01f0 stmdb sp!, {r4, r5, r6, r7, r8} 8023b88: 4293 cmp r3, r2 8023b8a: f100 0714 add.w r7, r0, #20 8023b8e: da2d bge.n 8023bec 8023b90: 3304 adds r3, #4 8023b92: eb00 0282 add.w r2, r0, r2, lsl #2 8023b96: 3214 adds r2, #20 8023b98: f011 011f ands.w r1, r1, #31 8023b9c: eb00 0383 add.w r3, r0, r3, lsl #2 8023ba0: f103 0c04 add.w ip, r3, #4 8023ba4: d029 beq.n 8023bfa 8023ba6: 685c ldr r4, [r3, #4] 8023ba8: f10c 0304 add.w r3, ip, #4 8023bac: 429a cmp r2, r3 8023bae: f1c1 0820 rsb r8, r1, #32 8023bb2: fa24 f401 lsr.w r4, r4, r1 8023bb6: d938 bls.n 8023c2a 8023bb8: 463d mov r5, r7 8023bba: 681e ldr r6, [r3, #0] 8023bbc: fa06 f608 lsl.w r6, r6, r8 8023bc0: 4334 orrs r4, r6 8023bc2: f845 4b04 str.w r4, [r5], #4 8023bc6: f853 4b04 ldr.w r4, [r3], #4 8023bca: 429a cmp r2, r3 8023bcc: fa24 f401 lsr.w r4, r4, r1 8023bd0: d8f3 bhi.n 8023bba 8023bd2: ebcc 0302 rsb r3, ip, r2 8023bd6: 3b05 subs r3, #5 8023bd8: f023 0303 bic.w r3, r3, #3 8023bdc: 18c3 adds r3, r0, r3 8023bde: 3318 adds r3, #24 8023be0: 601c str r4, [r3, #0] 8023be2: b1e4 cbz r4, 8023c1e 8023be4: 3304 adds r3, #4 8023be6: 1bdf subs r7, r3, r7 8023be8: 10bf asrs r7, r7, #2 8023bea: e01a b.n 8023c22 8023bec: 2300 movs r3, #0 8023bee: 6103 str r3, [r0, #16] 8023bf0: 2300 movs r3, #0 8023bf2: 6143 str r3, [r0, #20] 8023bf4: e8bd 01f0 ldmia.w sp!, {r4, r5, r6, r7, r8} 8023bf8: 4770 bx lr 8023bfa: 4562 cmp r2, ip 8023bfc: bf84 itt hi 8023bfe: 4663 movhi r3, ip 8023c00: 4639 movhi r1, r7 8023c02: d9f3 bls.n 8023bec 8023c04: f853 4b04 ldr.w r4, [r3], #4 8023c08: 429a cmp r2, r3 8023c0a: f841 4b04 str.w r4, [r1], #4 8023c0e: d8f9 bhi.n 8023c04 8023c10: ea6f 030c mvn.w r3, ip 8023c14: 189b adds r3, r3, r2 8023c16: f023 0303 bic.w r3, r3, #3 8023c1a: 18c3 adds r3, r0, r3 8023c1c: 3318 adds r3, #24 8023c1e: 1bdf subs r7, r3, r7 8023c20: 10bf asrs r7, r7, #2 8023c22: 6107 str r7, [r0, #16] 8023c24: 2f00 cmp r7, #0 8023c26: d1e5 bne.n 8023bf4 8023c28: e7e2 b.n 8023bf0 8023c2a: 463b mov r3, r7 8023c2c: e7d8 b.n 8023be0 8023c2e: bf00 nop 08023c30 <__hexdig_init>: 8023c30: f644 3014 movw r0, #19220 ; 0x4b14 8023c34: f643 033c movw r3, #14396 ; 0x383c 8023c38: f6c0 0004 movt r0, #2052 ; 0x804 8023c3c: 2110 movs r1, #16 8023c3e: 2230 movs r2, #48 ; 0x30 8023c40: f2c2 0301 movt r3, #8193 ; 0x2001 8023c44: 5499 strb r1, [r3, r2] 8023c46: 3101 adds r1, #1 8023c48: f810 2f01 ldrb.w r2, [r0, #1]! 8023c4c: b2c9 uxtb r1, r1 8023c4e: 2a00 cmp r2, #0 8023c50: d1f8 bne.n 8023c44 <__hexdig_init+0x14> 8023c52: f644 300c movw r0, #19212 ; 0x4b0c 8023c56: 211a movs r1, #26 8023c58: f6c0 0004 movt r0, #2052 ; 0x804 8023c5c: 2261 movs r2, #97 ; 0x61 8023c5e: 5499 strb r1, [r3, r2] 8023c60: 3101 adds r1, #1 8023c62: f810 2f01 ldrb.w r2, [r0, #1]! 8023c66: b2c9 uxtb r1, r1 8023c68: 2a00 cmp r2, #0 8023c6a: d1f8 bne.n 8023c5e <__hexdig_init+0x2e> 8023c6c: f644 3004 movw r0, #19204 ; 0x4b04 8023c70: 211a movs r1, #26 8023c72: f6c0 0004 movt r0, #2052 ; 0x804 8023c76: 2241 movs r2, #65 ; 0x41 8023c78: 5499 strb r1, [r3, r2] 8023c7a: 3101 adds r1, #1 8023c7c: f810 2f01 ldrb.w r2, [r0, #1]! 8023c80: b2c9 uxtb r1, r1 8023c82: 2a00 cmp r2, #0 8023c84: d1f8 bne.n 8023c78 <__hexdig_init+0x48> 8023c86: 4770 bx lr 08023c88 <__gethex>: 8023c88: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8023c8c: b08b sub sp, #44 ; 0x2c 8023c8e: 4688 mov r8, r1 8023c90: f643 063c movw r6, #14396 ; 0x383c 8023c94: 9206 str r2, [sp, #24] 8023c96: f2c2 0601 movt r6, #8193 ; 0x2001 8023c9a: 9309 str r3, [sp, #36] ; 0x24 8023c9c: 9007 str r0, [sp, #28] 8023c9e: f000 fbb9 bl 8024414 <_localeconv_r> 8023ca2: 6800 ldr r0, [r0, #0] 8023ca4: 9002 str r0, [sp, #8] 8023ca6: f7fe fa53 bl 8022150 8023caa: 9b02 ldr r3, [sp, #8] 8023cac: 181a adds r2, r3, r0 8023cae: f896 3030 ldrb.w r3, [r6, #48] ; 0x30 8023cb2: 9003 str r0, [sp, #12] 8023cb4: f812 ac01 ldrb.w sl, [r2, #-1] 8023cb8: 2b00 cmp r3, #0 8023cba: f000 810e beq.w 8023eda <__gethex+0x252> 8023cbe: f8d8 3000 ldr.w r3, [r8] 8023cc2: 1c9d adds r5, r3, #2 8023cc4: 789a ldrb r2, [r3, #2] 8023cc6: 2a30 cmp r2, #48 ; 0x30 8023cc8: f040 8200 bne.w 80240cc <__gethex+0x444> 8023ccc: 3303 adds r3, #3 8023cce: 2700 movs r7, #0 8023cd0: 461d mov r5, r3 8023cd2: f813 2b01 ldrb.w r2, [r3], #1 8023cd6: 3701 adds r7, #1 8023cd8: 2a30 cmp r2, #48 ; 0x30 8023cda: d0f9 beq.n 8023cd0 <__gethex+0x48> 8023cdc: f816 b002 ldrb.w fp, [r6, r2] 8023ce0: f643 093c movw r9, #14396 ; 0x383c 8023ce4: f2c2 0901 movt r9, #8193 ; 0x2001 8023ce8: f1bb 0f00 cmp.w fp, #0 8023cec: f000 80f8 beq.w 8023ee0 <__gethex+0x258> 8023cf0: 782b ldrb r3, [r5, #0] 8023cf2: f04f 0b00 mov.w fp, #0 8023cf6: f819 4003 ldrb.w r4, [r9, r3] 8023cfa: 2c00 cmp r4, #0 8023cfc: f000 8200 beq.w 8024100 <__gethex+0x478> 8023d00: 1c6a adds r2, r5, #1 8023d02: 4614 mov r4, r2 8023d04: 3201 adds r2, #1 8023d06: 7823 ldrb r3, [r4, #0] 8023d08: 5cf3 ldrb r3, [r6, r3] 8023d0a: 2b00 cmp r3, #0 8023d0c: d1f9 bne.n 8023d02 <__gethex+0x7a> 8023d0e: 4699 mov r9, r3 8023d10: 4620 mov r0, r4 8023d12: 9902 ldr r1, [sp, #8] 8023d14: 9a03 ldr r2, [sp, #12] 8023d16: f7fe fa7d bl 8022214 8023d1a: b1e8 cbz r0, 8023d58 <__gethex+0xd0> 8023d1c: 7823 ldrb r3, [r4, #0] 8023d1e: f1bb 0f00 cmp.w fp, #0 8023d22: f000 81c1 beq.w 80240a8 <__gethex+0x420> 8023d26: ebc4 0b0b rsb fp, r4, fp 8023d2a: ea4f 028b mov.w r2, fp, lsl #2 8023d2e: 9205 str r2, [sp, #20] 8023d30: 2b50 cmp r3, #80 ; 0x50 8023d32: f000 809b beq.w 8023e6c <__gethex+0x1e4> 8023d36: 2b70 cmp r3, #112 ; 0x70 8023d38: f000 8098 beq.w 8023e6c <__gethex+0x1e4> 8023d3c: 4622 mov r2, r4 8023d3e: f8c8 2000 str.w r2, [r8] 8023d42: f1b9 0f00 cmp.w r9, #0 8023d46: d00d beq.n 8023d64 <__gethex+0xdc> 8023d48: 2f00 cmp r7, #0 8023d4a: bf0c ite eq 8023d4c: 2706 moveq r7, #6 8023d4e: 2700 movne r7, #0 8023d50: 4638 mov r0, r7 8023d52: b00b add sp, #44 ; 0x2c 8023d54: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8023d58: f1bb 0f00 cmp.w fp, #0 8023d5c: f000 81be beq.w 80240dc <__gethex+0x454> 8023d60: 7823 ldrb r3, [r4, #0] 8023d62: e7e0 b.n 8023d26 <__gethex+0x9e> 8023d64: 1b63 subs r3, r4, r5 8023d66: 4649 mov r1, r9 8023d68: 3b01 subs r3, #1 8023d6a: 2b07 cmp r3, #7 8023d6c: dd03 ble.n 8023d76 <__gethex+0xee> 8023d6e: 105b asrs r3, r3, #1 8023d70: 3101 adds r1, #1 8023d72: 2b07 cmp r3, #7 8023d74: dcfb bgt.n 8023d6e <__gethex+0xe6> 8023d76: 9807 ldr r0, [sp, #28] 8023d78: f000 fe88 bl 8024a8c <_Balloc> 8023d7c: 42a5 cmp r5, r4 8023d7e: f100 0314 add.w r3, r0, #20 8023d82: 9004 str r0, [sp, #16] 8023d84: 9308 str r3, [sp, #32] 8023d86: f080 81db bcs.w 8024140 <__gethex+0x4b8> 8023d8a: 469b mov fp, r3 8023d8c: 9b03 ldr r3, [sp, #12] 8023d8e: f04f 0800 mov.w r8, #0 8023d92: 4647 mov r7, r8 8023d94: f1c3 0c01 rsb ip, r3, #1 8023d98: e00f b.n 8023dba <__gethex+0x132> 8023d9a: 2f20 cmp r7, #32 8023d9c: d05f beq.n 8023e5e <__gethex+0x1d6> 8023d9e: 463a mov r2, r7 8023da0: 3704 adds r7, #4 8023da2: f814 3c01 ldrb.w r3, [r4, #-1] 8023da6: 464c mov r4, r9 8023da8: 42a5 cmp r5, r4 8023daa: 5cf3 ldrb r3, [r6, r3] 8023dac: f003 030f and.w r3, r3, #15 8023db0: fa03 f302 lsl.w r3, r3, r2 8023db4: ea48 0803 orr.w r8, r8, r3 8023db8: d219 bcs.n 8023dee <__gethex+0x166> 8023dba: f814 3c01 ldrb.w r3, [r4, #-1] 8023dbe: f104 39ff add.w r9, r4, #4294967295 8023dc2: 4553 cmp r3, sl 8023dc4: d1e9 bne.n 8023d9a <__gethex+0x112> 8023dc6: eb09 030c add.w r3, r9, ip 8023dca: 429d cmp r5, r3 8023dcc: d8e5 bhi.n 8023d9a <__gethex+0x112> 8023dce: 4618 mov r0, r3 8023dd0: 9902 ldr r1, [sp, #8] 8023dd2: 9a03 ldr r2, [sp, #12] 8023dd4: 9301 str r3, [sp, #4] 8023dd6: f8cd c000 str.w ip, [sp] 8023dda: f7fe fa1b bl 8022214 8023dde: 9b01 ldr r3, [sp, #4] 8023de0: f8dd c000 ldr.w ip, [sp] 8023de4: 2800 cmp r0, #0 8023de6: d1d8 bne.n 8023d9a <__gethex+0x112> 8023de8: 461c mov r4, r3 8023dea: 42a5 cmp r5, r4 8023dec: d3e5 bcc.n 8023dba <__gethex+0x132> 8023dee: 9b08 ldr r3, [sp, #32] 8023df0: 4640 mov r0, r8 8023df2: f84b 8b04 str.w r8, [fp], #4 8023df6: 9904 ldr r1, [sp, #16] 8023df8: ebc3 0b0b rsb fp, r3, fp 8023dfc: ea4f 03ab mov.w r3, fp, asr #2 8023e00: 610b str r3, [r1, #16] 8023e02: 015d lsls r5, r3, #5 8023e04: f000 ff24 bl 8024c50 <__hi0bits> 8023e08: 9a06 ldr r2, [sp, #24] 8023e0a: 6814 ldr r4, [r2, #0] 8023e0c: 1a28 subs r0, r5, r0 8023e0e: 42a0 cmp r0, r4 8023e10: f300 8125 bgt.w 802405e <__gethex+0x3d6> 8023e14: f2c0 814b blt.w 80240ae <__gethex+0x426> 8023e18: 2500 movs r5, #0 8023e1a: 9806 ldr r0, [sp, #24] 8023e1c: 9905 ldr r1, [sp, #20] 8023e1e: 6883 ldr r3, [r0, #8] 8023e20: 4299 cmp r1, r3 8023e22: f300 80f6 bgt.w 8024012 <__gethex+0x38a> 8023e26: 9806 ldr r0, [sp, #24] 8023e28: 9905 ldr r1, [sp, #20] 8023e2a: 6843 ldr r3, [r0, #4] 8023e2c: 4299 cmp r1, r3 8023e2e: f280 8100 bge.w 8024032 <__gethex+0x3aa> 8023e32: 1a5e subs r6, r3, r1 8023e34: 42b4 cmp r4, r6 8023e36: dc76 bgt.n 8023f26 <__gethex+0x29e> 8023e38: 68c2 ldr r2, [r0, #12] 8023e3a: 2a02 cmp r2, #2 8023e3c: f000 816f beq.w 802411e <__gethex+0x496> 8023e40: 2a03 cmp r2, #3 8023e42: f000 8198 beq.w 8024176 <__gethex+0x4ee> 8023e46: 2a01 cmp r2, #1 8023e48: f000 8186 beq.w 8024158 <__gethex+0x4d0> 8023e4c: 9807 ldr r0, [sp, #28] 8023e4e: 2750 movs r7, #80 ; 0x50 8023e50: 9904 ldr r1, [sp, #16] 8023e52: f000 fe51 bl 8024af8 <_Bfree> 8023e56: 9814 ldr r0, [sp, #80] ; 0x50 8023e58: 2300 movs r3, #0 8023e5a: 6003 str r3, [r0, #0] 8023e5c: e778 b.n 8023d50 <__gethex+0xc8> 8023e5e: f84b 8b04 str.w r8, [fp], #4 8023e62: f04f 0800 mov.w r8, #0 8023e66: 2704 movs r7, #4 8023e68: 4642 mov r2, r8 8023e6a: e79a b.n 8023da2 <__gethex+0x11a> 8023e6c: 7863 ldrb r3, [r4, #1] 8023e6e: 2b2b cmp r3, #43 ; 0x2b 8023e70: f000 80f2 beq.w 8024058 <__gethex+0x3d0> 8023e74: 2b2d cmp r3, #45 ; 0x2d 8023e76: f000 80ea beq.w 802404e <__gethex+0x3c6> 8023e7a: 1c60 adds r0, r4, #1 8023e7c: f04f 0b00 mov.w fp, #0 8023e80: 5cf1 ldrb r1, [r6, r3] 8023e82: f643 033c movw r3, #14396 ; 0x383c 8023e86: f2c2 0301 movt r3, #8193 ; 0x2001 8023e8a: 2900 cmp r1, #0 8023e8c: f43f af56 beq.w 8023d3c <__gethex+0xb4> 8023e90: 2919 cmp r1, #25 8023e92: f73f af53 bgt.w 8023d3c <__gethex+0xb4> 8023e96: f890 c001 ldrb.w ip, [r0, #1] 8023e9a: 3910 subs r1, #16 8023e9c: 1c42 adds r2, r0, #1 8023e9e: f813 300c ldrb.w r3, [r3, ip] 8023ea2: b193 cbz r3, 8023eca <__gethex+0x242> 8023ea4: 2b19 cmp r3, #25 8023ea6: dc10 bgt.n 8023eca <__gethex+0x242> 8023ea8: 3002 adds r0, #2 8023eaa: e001 b.n 8023eb0 <__gethex+0x228> 8023eac: 2b19 cmp r3, #25 8023eae: dc0c bgt.n 8023eca <__gethex+0x242> 8023eb0: 4602 mov r2, r0 8023eb2: eb01 0181 add.w r1, r1, r1, lsl #2 8023eb6: 3001 adds r0, #1 8023eb8: f892 c000 ldrb.w ip, [r2] 8023ebc: eb03 0141 add.w r1, r3, r1, lsl #1 8023ec0: 3910 subs r1, #16 8023ec2: f816 300c ldrb.w r3, [r6, ip] 8023ec6: 2b00 cmp r3, #0 8023ec8: d1f0 bne.n 8023eac <__gethex+0x224> 8023eca: f1bb 0f00 cmp.w fp, #0 8023ece: d000 beq.n 8023ed2 <__gethex+0x24a> 8023ed0: 4249 negs r1, r1 8023ed2: 9b05 ldr r3, [sp, #20] 8023ed4: 185b adds r3, r3, r1 8023ed6: 9305 str r3, [sp, #20] 8023ed8: e731 b.n 8023d3e <__gethex+0xb6> 8023eda: f7ff fea9 bl 8023c30 <__hexdig_init> 8023ede: e6ee b.n 8023cbe <__gethex+0x36> 8023ee0: 4628 mov r0, r5 8023ee2: 9902 ldr r1, [sp, #8] 8023ee4: 9a03 ldr r2, [sp, #12] 8023ee6: f7fe f995 bl 8022214 8023eea: 2800 cmp r0, #0 8023eec: f040 809a bne.w 8024024 <__gethex+0x39c> 8023ef0: 9803 ldr r0, [sp, #12] 8023ef2: 182c adds r4, r5, r0 8023ef4: 5c2b ldrb r3, [r5, r0] 8023ef6: f819 2003 ldrb.w r2, [r9, r3] 8023efa: 2a00 cmp r2, #0 8023efc: f000 80e8 beq.w 80240d0 <__gethex+0x448> 8023f00: 2b30 cmp r3, #48 ; 0x30 8023f02: f040 8108 bne.w 8024116 <__gethex+0x48e> 8023f06: 1c63 adds r3, r4, #1 8023f08: 461d mov r5, r3 8023f0a: f813 2b01 ldrb.w r2, [r3], #1 8023f0e: 2a30 cmp r2, #48 ; 0x30 8023f10: d0fa beq.n 8023f08 <__gethex+0x280> 8023f12: 5cb3 ldrb r3, [r6, r2] 8023f14: 2b00 cmp r3, #0 8023f16: f040 80ff bne.w 8024118 <__gethex+0x490> 8023f1a: f04f 0901 mov.w r9, #1 8023f1e: 46a3 mov fp, r4 8023f20: 464f mov r7, r9 8023f22: 462c mov r4, r5 8023f24: e6f4 b.n 8023d10 <__gethex+0x88> 8023f26: 1e77 subs r7, r6, #1 8023f28: 2d00 cmp r5, #0 8023f2a: f040 80e7 bne.w 80240fc <__gethex+0x474> 8023f2e: 2f00 cmp r7, #0 8023f30: dd04 ble.n 8023f3c <__gethex+0x2b4> 8023f32: 9804 ldr r0, [sp, #16] 8023f34: 4639 mov r1, r7 8023f36: f001 fa05 bl 8025344 <__any_on> 8023f3a: 4605 mov r5, r0 8023f3c: 9908 ldr r1, [sp, #32] 8023f3e: 117b asrs r3, r7, #5 8023f40: 2201 movs r2, #1 8023f42: f007 071f and.w r7, r7, #31 8023f46: 9804 ldr r0, [sp, #16] 8023f48: 1ba4 subs r4, r4, r6 8023f4a: f851 3023 ldr.w r3, [r1, r3, lsl #2] 8023f4e: fa02 f207 lsl.w r2, r2, r7 8023f52: 4631 mov r1, r6 8023f54: 421a tst r2, r3 8023f56: bf18 it ne 8023f58: f045 0502 orrne.w r5, r5, #2 8023f5c: f7ff fe10 bl 8023b80 8023f60: 9b06 ldr r3, [sp, #24] 8023f62: 2702 movs r7, #2 8023f64: 685b ldr r3, [r3, #4] 8023f66: 9305 str r3, [sp, #20] 8023f68: 2d00 cmp r5, #0 8023f6a: d069 beq.n 8024040 <__gethex+0x3b8> 8023f6c: 9806 ldr r0, [sp, #24] 8023f6e: 68c3 ldr r3, [r0, #12] 8023f70: 2b02 cmp r3, #2 8023f72: f000 80ea beq.w 802414a <__gethex+0x4c2> 8023f76: 2b03 cmp r3, #3 8023f78: d05d beq.n 8024036 <__gethex+0x3ae> 8023f7a: 2b01 cmp r3, #1 8023f7c: d15e bne.n 802403c <__gethex+0x3b4> 8023f7e: 07aa lsls r2, r5, #30 8023f80: d55c bpl.n 802403c <__gethex+0x3b4> 8023f82: 9908 ldr r1, [sp, #32] 8023f84: 680b ldr r3, [r1, #0] 8023f86: 432b orrs r3, r5 8023f88: 07db lsls r3, r3, #31 8023f8a: d557 bpl.n 802403c <__gethex+0x3b4> 8023f8c: 9b04 ldr r3, [sp, #16] 8023f8e: 2600 movs r6, #0 8023f90: 9904 ldr r1, [sp, #16] 8023f92: 691d ldr r5, [r3, #16] 8023f94: 9b08 ldr r3, [sp, #32] 8023f96: eb01 0085 add.w r0, r1, r5, lsl #2 8023f9a: 3014 adds r0, #20 8023f9c: 4619 mov r1, r3 8023f9e: f853 2b04 ldr.w r2, [r3], #4 8023fa2: f1b2 3fff cmp.w r2, #4294967295 8023fa6: f040 80eb bne.w 8024180 <__gethex+0x4f8> 8023faa: 4298 cmp r0, r3 8023fac: f843 6c04 str.w r6, [r3, #-4] 8023fb0: d8f4 bhi.n 8023f9c <__gethex+0x314> 8023fb2: 9a04 ldr r2, [sp, #16] 8023fb4: 6893 ldr r3, [r2, #8] 8023fb6: 429d cmp r5, r3 8023fb8: bfb8 it lt 8023fba: 462b movlt r3, r5 8023fbc: f280 80f9 bge.w 80241b2 <__gethex+0x52a> 8023fc0: 9904 ldr r1, [sp, #16] 8023fc2: eb01 0283 add.w r2, r1, r3, lsl #2 8023fc6: 3301 adds r3, #1 8023fc8: 610b str r3, [r1, #16] 8023fca: 2301 movs r3, #1 8023fcc: 6153 str r3, [r2, #20] 8023fce: 2f02 cmp r7, #2 8023fd0: f000 80d9 beq.w 8024186 <__gethex+0x4fe> 8023fd4: 9904 ldr r1, [sp, #16] 8023fd6: 690b ldr r3, [r1, #16] 8023fd8: 429d cmp r5, r3 8023fda: db0e blt.n 8023ffa <__gethex+0x372> 8023fdc: f014 041f ands.w r4, r4, #31 8023fe0: f000 80ac beq.w 802413c <__gethex+0x4b4> 8023fe4: 9b04 ldr r3, [sp, #16] 8023fe6: eb03 0585 add.w r5, r3, r5, lsl #2 8023fea: 6928 ldr r0, [r5, #16] 8023fec: f000 fe30 bl 8024c50 <__hi0bits> 8023ff0: f1c4 0320 rsb r3, r4, #32 8023ff4: 4298 cmp r0, r3 8023ff6: f280 80a1 bge.w 802413c <__gethex+0x4b4> 8023ffa: 9804 ldr r0, [sp, #16] 8023ffc: 2101 movs r1, #1 8023ffe: f7ff fdbf bl 8023b80 8024002: 9a06 ldr r2, [sp, #24] 8024004: 9805 ldr r0, [sp, #20] 8024006: 6893 ldr r3, [r2, #8] 8024008: 3001 adds r0, #1 802400a: 9005 str r0, [sp, #20] 802400c: 4298 cmp r0, r3 802400e: f340 8095 ble.w 802413c <__gethex+0x4b4> 8024012: 9807 ldr r0, [sp, #28] 8024014: 27a3 movs r7, #163 ; 0xa3 8024016: 9904 ldr r1, [sp, #16] 8024018: f000 fd6e bl 8024af8 <_Bfree> 802401c: 9a14 ldr r2, [sp, #80] ; 0x50 802401e: 2300 movs r3, #0 8024020: 6013 str r3, [r2, #0] 8024022: e695 b.n 8023d50 <__gethex+0xc8> 8024024: 782b ldrb r3, [r5, #0] 8024026: 462c mov r4, r5 8024028: f8cd b014 str.w fp, [sp, #20] 802402c: f04f 0901 mov.w r9, #1 8024030: e67e b.n 8023d30 <__gethex+0xa8> 8024032: 2701 movs r7, #1 8024034: e798 b.n 8023f68 <__gethex+0x2e0> 8024036: 9b15 ldr r3, [sp, #84] ; 0x54 8024038: 2b00 cmp r3, #0 802403a: d1a7 bne.n 8023f8c <__gethex+0x304> 802403c: f047 0710 orr.w r7, r7, #16 8024040: 9b04 ldr r3, [sp, #16] 8024042: 9814 ldr r0, [sp, #80] ; 0x50 8024044: 6003 str r3, [r0, #0] 8024046: 9b05 ldr r3, [sp, #20] 8024048: 9809 ldr r0, [sp, #36] ; 0x24 802404a: 6003 str r3, [r0, #0] 802404c: e680 b.n 8023d50 <__gethex+0xc8> 802404e: f04f 0b01 mov.w fp, #1 8024052: 78a3 ldrb r3, [r4, #2] 8024054: 1ca0 adds r0, r4, #2 8024056: e713 b.n 8023e80 <__gethex+0x1f8> 8024058: f04f 0b00 mov.w fp, #0 802405c: e7f9 b.n 8024052 <__gethex+0x3ca> 802405e: 1b06 subs r6, r0, r4 8024060: 9804 ldr r0, [sp, #16] 8024062: 4631 mov r1, r6 8024064: f001 f96e bl 8025344 <__any_on> 8024068: 4605 mov r5, r0 802406a: b1a8 cbz r0, 8024098 <__gethex+0x410> 802406c: 1e73 subs r3, r6, #1 802406e: 9804 ldr r0, [sp, #16] 8024070: 2501 movs r5, #1 8024072: f003 011f and.w r1, r3, #31 8024076: 115a asrs r2, r3, #5 8024078: fa05 f101 lsl.w r1, r5, r1 802407c: eb00 0282 add.w r2, r0, r2, lsl #2 8024080: 6952 ldr r2, [r2, #20] 8024082: 4211 tst r1, r2 8024084: d008 beq.n 8024098 <__gethex+0x410> 8024086: 42ab cmp r3, r5 8024088: dd05 ble.n 8024096 <__gethex+0x40e> 802408a: 9804 ldr r0, [sp, #16] 802408c: 1eb1 subs r1, r6, #2 802408e: f001 f959 bl 8025344 <__any_on> 8024092: 2503 movs r5, #3 8024094: b900 cbnz r0, 8024098 <__gethex+0x410> 8024096: 2502 movs r5, #2 8024098: 9804 ldr r0, [sp, #16] 802409a: 4631 mov r1, r6 802409c: f7ff fd70 bl 8023b80 80240a0: 9b05 ldr r3, [sp, #20] 80240a2: 199b adds r3, r3, r6 80240a4: 9305 str r3, [sp, #20] 80240a6: e6b8 b.n 8023e1a <__gethex+0x192> 80240a8: f8cd b014 str.w fp, [sp, #20] 80240ac: e640 b.n 8023d30 <__gethex+0xa8> 80240ae: 1a25 subs r5, r4, r0 80240b0: 9904 ldr r1, [sp, #16] 80240b2: 462a mov r2, r5 80240b4: 9807 ldr r0, [sp, #28] 80240b6: f000 ff11 bl 8024edc <__lshift> 80240ba: 9b05 ldr r3, [sp, #20] 80240bc: 1b5b subs r3, r3, r5 80240be: 2500 movs r5, #0 80240c0: 9305 str r3, [sp, #20] 80240c2: 9004 str r0, [sp, #16] 80240c4: f100 0314 add.w r3, r0, #20 80240c8: 9308 str r3, [sp, #32] 80240ca: e6a6 b.n 8023e1a <__gethex+0x192> 80240cc: 2700 movs r7, #0 80240ce: e605 b.n 8023cdc <__gethex+0x54> 80240d0: 9205 str r2, [sp, #20] 80240d2: f04f 0901 mov.w r9, #1 80240d6: e62b b.n 8023d30 <__gethex+0xa8> 80240d8: 462c mov r4, r5 80240da: 4681 mov r9, r0 80240dc: 9903 ldr r1, [sp, #12] 80240de: eb04 0b01 add.w fp, r4, r1 80240e2: 5c63 ldrb r3, [r4, r1] 80240e4: 5cf2 ldrb r2, [r6, r3] 80240e6: 2a00 cmp r2, #0 80240e8: d07a beq.n 80241e0 <__gethex+0x558> 80240ea: f10b 0201 add.w r2, fp, #1 80240ee: 4614 mov r4, r2 80240f0: f812 3b01 ldrb.w r3, [r2], #1 80240f4: 5cf1 ldrb r1, [r6, r3] 80240f6: 2900 cmp r1, #0 80240f8: d1f9 bne.n 80240ee <__gethex+0x466> 80240fa: e614 b.n 8023d26 <__gethex+0x9e> 80240fc: 2501 movs r5, #1 80240fe: e71d b.n 8023f3c <__gethex+0x2b4> 8024100: 4628 mov r0, r5 8024102: 9902 ldr r1, [sp, #8] 8024104: 9a03 ldr r2, [sp, #12] 8024106: f7fe f885 bl 8022214 802410a: 2800 cmp r0, #0 802410c: d0e4 beq.n 80240d8 <__gethex+0x450> 802410e: 46a1 mov r9, r4 8024110: 462c mov r4, r5 8024112: 46cb mov fp, r9 8024114: e602 b.n 8023d1c <__gethex+0x94> 8024116: 4625 mov r5, r4 8024118: 46a3 mov fp, r4 802411a: 2701 movs r7, #1 802411c: e5f0 b.n 8023d00 <__gethex+0x78> 802411e: 9815 ldr r0, [sp, #84] ; 0x54 8024120: 2800 cmp r0, #0 8024122: f47f ae93 bne.w 8023e4c <__gethex+0x1c4> 8024126: 9a09 ldr r2, [sp, #36] ; 0x24 8024128: 2762 movs r7, #98 ; 0x62 802412a: 9804 ldr r0, [sp, #16] 802412c: 9908 ldr r1, [sp, #32] 802412e: 6013 str r3, [r2, #0] 8024130: 2301 movs r3, #1 8024132: 9a14 ldr r2, [sp, #80] ; 0x50 8024134: 6103 str r3, [r0, #16] 8024136: 600b str r3, [r1, #0] 8024138: 6010 str r0, [r2, #0] 802413a: e609 b.n 8023d50 <__gethex+0xc8> 802413c: 2721 movs r7, #33 ; 0x21 802413e: e77f b.n 8024040 <__gethex+0x3b8> 8024140: f8dd b020 ldr.w fp, [sp, #32] 8024144: f04f 0800 mov.w r8, #0 8024148: e651 b.n 8023dee <__gethex+0x166> 802414a: 9a15 ldr r2, [sp, #84] ; 0x54 802414c: f1c2 0301 rsb r3, r2, #1 8024150: 2b00 cmp r3, #0 8024152: f43f af73 beq.w 802403c <__gethex+0x3b4> 8024156: e719 b.n 8023f8c <__gethex+0x304> 8024158: 42a6 cmp r6, r4 802415a: f47f ae77 bne.w 8023e4c <__gethex+0x1c4> 802415e: 2c01 cmp r4, #1 8024160: dde1 ble.n 8024126 <__gethex+0x49e> 8024162: 9804 ldr r0, [sp, #16] 8024164: 1e61 subs r1, r4, #1 8024166: f001 f8ed bl 8025344 <__any_on> 802416a: 2800 cmp r0, #0 802416c: f43f ae6e beq.w 8023e4c <__gethex+0x1c4> 8024170: 9a06 ldr r2, [sp, #24] 8024172: 6853 ldr r3, [r2, #4] 8024174: e7d7 b.n 8024126 <__gethex+0x49e> 8024176: 9915 ldr r1, [sp, #84] ; 0x54 8024178: 2900 cmp r1, #0 802417a: f43f ae67 beq.w 8023e4c <__gethex+0x1c4> 802417e: e7d2 b.n 8024126 <__gethex+0x49e> 8024180: 3201 adds r2, #1 8024182: 600a str r2, [r1, #0] 8024184: e723 b.n 8023fce <__gethex+0x346> 8024186: 9a06 ldr r2, [sp, #24] 8024188: 2722 movs r7, #34 ; 0x22 802418a: 6813 ldr r3, [r2, #0] 802418c: 3b01 subs r3, #1 802418e: 42a3 cmp r3, r4 8024190: f47f af56 bne.w 8024040 <__gethex+0x3b8> 8024194: 1163 asrs r3, r4, #5 8024196: 9804 ldr r0, [sp, #16] 8024198: 2201 movs r2, #1 802419a: f004 041f and.w r4, r4, #31 802419e: eb00 0383 add.w r3, r0, r3, lsl #2 80241a2: fa02 f204 lsl.w r2, r2, r4 80241a6: 695b ldr r3, [r3, #20] 80241a8: 421a tst r2, r3 80241aa: bf14 ite ne 80241ac: 2721 movne r7, #33 ; 0x21 80241ae: 2722 moveq r7, #34 ; 0x22 80241b0: e746 b.n 8024040 <__gethex+0x3b8> 80241b2: 6851 ldr r1, [r2, #4] 80241b4: 9807 ldr r0, [sp, #28] 80241b6: 3101 adds r1, #1 80241b8: f000 fc68 bl 8024a8c <_Balloc> 80241bc: 4606 mov r6, r0 80241be: 9804 ldr r0, [sp, #16] 80241c0: f100 010c add.w r1, r0, #12 80241c4: 6903 ldr r3, [r0, #16] 80241c6: f106 000c add.w r0, r6, #12 80241ca: 1c9a adds r2, r3, #2 80241cc: 0092 lsls r2, r2, #2 80241ce: f7fd fd2d bl 8021c2c 80241d2: 9904 ldr r1, [sp, #16] 80241d4: 9807 ldr r0, [sp, #28] 80241d6: 9604 str r6, [sp, #16] 80241d8: f000 fc8e bl 8024af8 <_Bfree> 80241dc: 6933 ldr r3, [r6, #16] 80241de: e6ef b.n 8023fc0 <__gethex+0x338> 80241e0: 465c mov r4, fp 80241e2: e5a0 b.n 8023d26 <__gethex+0x9e> 080241e4 <__hexnan>: 80241e4: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80241e8: f643 083c movw r8, #14396 ; 0x383c 80241ec: f2c2 0801 movt r8, #8193 ; 0x2001 80241f0: b085 sub sp, #20 80241f2: 460c mov r4, r1 80241f4: 4692 mov sl, r2 80241f6: f898 3030 ldrb.w r3, [r8, #48] ; 0x30 80241fa: 9002 str r0, [sp, #8] 80241fc: 2b00 cmp r3, #0 80241fe: f000 80ad beq.w 802435c <__hexnan+0x178> 8024202: 6823 ldr r3, [r4, #0] 8024204: 115a asrs r2, r3, #5 8024206: f013 031f ands.w r3, r3, #31 802420a: 9303 str r3, [sp, #12] 802420c: eb0a 0282 add.w r2, sl, r2, lsl #2 8024210: 9200 str r2, [sp, #0] 8024212: d001 beq.n 8024218 <__hexnan+0x34> 8024214: 3204 adds r2, #4 8024216: 9200 str r2, [sp, #0] 8024218: 9a00 ldr r2, [sp, #0] 802421a: 2300 movs r3, #0 802421c: 4699 mov r9, r3 802421e: 9900 ldr r1, [sp, #0] 8024220: 46cb mov fp, r9 8024222: 464e mov r6, r9 8024224: f842 3c04 str.w r3, [r2, #-4] 8024228: 3904 subs r1, #4 802422a: 9b02 ldr r3, [sp, #8] 802422c: 9101 str r1, [sp, #4] 802422e: f8dd c004 ldr.w ip, [sp, #4] 8024232: 6819 ldr r1, [r3, #0] 8024234: 4664 mov r4, ip 8024236: 784b ldrb r3, [r1, #1] 8024238: 2b00 cmp r3, #0 802423a: d033 beq.n 80242a4 <__hexnan+0xc0> 802423c: f818 2003 ldrb.w r2, [r8, r3] 8024240: 2a00 cmp r2, #0 8024242: d16f bne.n 8024324 <__hexnan+0x140> 8024244: 2b20 cmp r3, #32 8024246: f200 8083 bhi.w 8024350 <__hexnan+0x16c> 802424a: 455e cmp r6, fp 802424c: dd26 ble.n 802429c <__hexnan+0xb8> 802424e: f1b9 0f07 cmp.w r9, #7 8024252: bfcc ite gt 8024254: 2300 movgt r3, #0 8024256: 2301 movle r3, #1 8024258: 4564 cmp r4, ip 802425a: bf28 it cs 802425c: 2300 movcs r3, #0 802425e: b193 cbz r3, 8024286 <__hexnan+0xa2> 8024260: f1c9 0908 rsb r9, r9, #8 8024264: 6822 ldr r2, [r4, #0] 8024266: 4623 mov r3, r4 8024268: ea4f 0989 mov.w r9, r9, lsl #2 802426c: f1c9 0720 rsb r7, r9, #32 8024270: 6858 ldr r0, [r3, #4] 8024272: fa00 f507 lsl.w r5, r0, r7 8024276: 4315 orrs r5, r2 8024278: fa20 f209 lsr.w r2, r0, r9 802427c: 601d str r5, [r3, #0] 802427e: f843 2f04 str.w r2, [r3, #4]! 8024282: 459c cmp ip, r3 8024284: d8f4 bhi.n 8024270 <__hexnan+0x8c> 8024286: 4554 cmp r4, sl 8024288: bf98 it ls 802428a: f04f 0908 movls.w r9, #8 802428e: d905 bls.n 802429c <__hexnan+0xb8> 8024290: 2200 movs r2, #0 8024292: 3c04 subs r4, #4 8024294: 6022 str r2, [r4, #0] 8024296: 46b3 mov fp, r6 8024298: 46a4 mov ip, r4 802429a: 4691 mov r9, r2 802429c: 3101 adds r1, #1 802429e: 784b ldrb r3, [r1, #1] 80242a0: 2b00 cmp r3, #0 80242a2: d1cb bne.n 802423c <__hexnan+0x58> 80242a4: 2e00 cmp r6, #0 80242a6: d055 beq.n 8024354 <__hexnan+0x170> 80242a8: f1b9 0f07 cmp.w r9, #7 80242ac: bfcc ite gt 80242ae: 2300 movgt r3, #0 80242b0: 2301 movle r3, #1 80242b2: 4564 cmp r4, ip 80242b4: bf28 it cs 80242b6: 2300 movcs r3, #0 80242b8: b193 cbz r3, 80242e0 <__hexnan+0xfc> 80242ba: f1c9 0908 rsb r9, r9, #8 80242be: 6822 ldr r2, [r4, #0] 80242c0: 4623 mov r3, r4 80242c2: ea4f 0989 mov.w r9, r9, lsl #2 80242c6: f1c9 0520 rsb r5, r9, #32 80242ca: 6859 ldr r1, [r3, #4] 80242cc: fa01 f005 lsl.w r0, r1, r5 80242d0: 4310 orrs r0, r2 80242d2: fa21 f209 lsr.w r2, r1, r9 80242d6: 6018 str r0, [r3, #0] 80242d8: f843 2f04 str.w r2, [r3, #4]! 80242dc: 4563 cmp r3, ip 80242de: d3f4 bcc.n 80242ca <__hexnan+0xe6> 80242e0: 45a2 cmp sl, r4 80242e2: d23e bcs.n 8024362 <__hexnan+0x17e> 80242e4: 9801 ldr r0, [sp, #4] 80242e6: 4652 mov r2, sl 80242e8: f854 1b04 ldr.w r1, [r4], #4 80242ec: 4613 mov r3, r2 80242ee: 42a0 cmp r0, r4 80242f0: f843 1b04 str.w r1, [r3], #4 80242f4: 461a mov r2, r3 80242f6: d2f7 bcs.n 80242e8 <__hexnan+0x104> 80242f8: 9901 ldr r1, [sp, #4] 80242fa: 2200 movs r2, #0 80242fc: f843 2b04 str.w r2, [r3], #4 8024300: 4299 cmp r1, r3 8024302: d2fb bcs.n 80242fc <__hexnan+0x118> 8024304: 9900 ldr r1, [sp, #0] 8024306: f851 3c04 ldr.w r3, [r1, #-4] 802430a: b94b cbnz r3, 8024320 <__hexnan+0x13c> 802430c: 9b01 ldr r3, [sp, #4] 802430e: 459a cmp sl, r3 8024310: d102 bne.n 8024318 <__hexnan+0x134> 8024312: e038 b.n 8024386 <__hexnan+0x1a2> 8024314: 459a cmp sl, r3 8024316: d037 beq.n 8024388 <__hexnan+0x1a4> 8024318: f853 2d04 ldr.w r2, [r3, #-4]! 802431c: 2a00 cmp r2, #0 802431e: d0f9 beq.n 8024314 <__hexnan+0x130> 8024320: 2005 movs r0, #5 8024322: e018 b.n 8024356 <__hexnan+0x172> 8024324: f109 0901 add.w r9, r9, #1 8024328: 3601 adds r6, #1 802432a: f1b9 0f08 cmp.w r9, #8 802432e: dc07 bgt.n 8024340 <__hexnan+0x15c> 8024330: 6823 ldr r3, [r4, #0] 8024332: 011b lsls r3, r3, #4 8024334: f002 020f and.w r2, r2, #15 8024338: 3101 adds r1, #1 802433a: 431a orrs r2, r3 802433c: 6022 str r2, [r4, #0] 802433e: e7ae b.n 802429e <__hexnan+0xba> 8024340: 4554 cmp r4, sl 8024342: d9ab bls.n 802429c <__hexnan+0xb8> 8024344: 2300 movs r3, #0 8024346: 3c04 subs r4, #4 8024348: 6023 str r3, [r4, #0] 802434a: f04f 0901 mov.w r9, #1 802434e: e7f1 b.n 8024334 <__hexnan+0x150> 8024350: 2b29 cmp r3, #41 ; 0x29 8024352: d01d beq.n 8024390 <__hexnan+0x1ac> 8024354: 2004 movs r0, #4 8024356: b005 add sp, #20 8024358: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802435c: f7ff fc68 bl 8023c30 <__hexdig_init> 8024360: e74f b.n 8024202 <__hexnan+0x1e> 8024362: 9a03 ldr r2, [sp, #12] 8024364: 2a00 cmp r2, #0 8024366: d0cd beq.n 8024304 <__hexnan+0x120> 8024368: 9a00 ldr r2, [sp, #0] 802436a: 9903 ldr r1, [sp, #12] 802436c: f852 3c04 ldr.w r3, [r2, #-4] 8024370: f1c1 0220 rsb r2, r1, #32 8024374: f04f 31ff mov.w r1, #4294967295 8024378: fa21 f202 lsr.w r2, r1, r2 802437c: 4013 ands r3, r2 802437e: 9a00 ldr r2, [sp, #0] 8024380: f842 3c04 str.w r3, [r2, #-4] 8024384: e7c1 b.n 802430a <__hexnan+0x126> 8024386: 4653 mov r3, sl 8024388: 2201 movs r2, #1 802438a: 2005 movs r0, #5 802438c: 601a str r2, [r3, #0] 802438e: e7e2 b.n 8024356 <__hexnan+0x172> 8024390: 9b02 ldr r3, [sp, #8] 8024392: 3102 adds r1, #2 8024394: 6019 str r1, [r3, #0] 8024396: 2e00 cmp r6, #0 8024398: d186 bne.n 80242a8 <__hexnan+0xc4> 802439a: e7db b.n 8024354 <__hexnan+0x170> 0802439c <_setlocale_r>: 802439c: b510 push {r4, lr} 802439e: 4614 mov r4, r2 80243a0: b13a cbz r2, 80243b2 <_setlocale_r+0x16> 80243a2: f644 3124 movw r1, #19236 ; 0x4b24 80243a6: 4610 mov r0, r2 80243a8: f6c0 0104 movt r1, #2052 ; 0x804 80243ac: f7fd fd84 bl 8021eb8 80243b0: b920 cbnz r0, 80243bc <_setlocale_r+0x20> 80243b2: f644 3020 movw r0, #19232 ; 0x4b20 80243b6: f6c0 0004 movt r0, #2052 ; 0x804 80243ba: bd10 pop {r4, pc} 80243bc: f644 3120 movw r1, #19232 ; 0x4b20 80243c0: 4620 mov r0, r4 80243c2: f6c0 0104 movt r1, #2052 ; 0x804 80243c6: f7fd fd77 bl 8021eb8 80243ca: 2800 cmp r0, #0 80243cc: d0f1 beq.n 80243b2 <_setlocale_r+0x16> 80243ce: f644 312c movw r1, #19244 ; 0x4b2c 80243d2: 4620 mov r0, r4 80243d4: f6c0 0104 movt r1, #2052 ; 0x804 80243d8: f7fd fd6e bl 8021eb8 80243dc: f644 3320 movw r3, #19232 ; 0x4b20 80243e0: f6c0 0304 movt r3, #2052 ; 0x804 80243e4: 2800 cmp r0, #0 80243e6: bf0c ite eq 80243e8: 4618 moveq r0, r3 80243ea: 2000 movne r0, #0 80243ec: bd10 pop {r4, pc} 80243ee: bf00 nop 080243f0 <__locale_charset>: 80243f0: f240 1020 movw r0, #288 ; 0x120 80243f4: f2c2 0000 movt r0, #8192 ; 0x2000 80243f8: 4770 bx lr 80243fa: bf00 nop 080243fc <__locale_mb_cur_max>: 80243fc: f240 1320 movw r3, #288 ; 0x120 8024400: f2c2 0300 movt r3, #8192 ; 0x2000 8024404: 6a18 ldr r0, [r3, #32] 8024406: 4770 bx lr 08024408 <__locale_msgcharset>: 8024408: 4800 ldr r0, [pc, #0] ; (802440c <__locale_msgcharset+0x4>) 802440a: 4770 bx lr 802440c: 20000144 .word 0x20000144 08024410 <__locale_cjk_lang>: 8024410: 2000 movs r0, #0 8024412: 4770 bx lr 08024414 <_localeconv_r>: 8024414: 4800 ldr r0, [pc, #0] ; (8024418 <_localeconv_r+0x4>) 8024416: 4770 bx lr 8024418: 20000164 .word 0x20000164 0802441c : 802441c: f240 032c movw r3, #44 ; 0x2c 8024420: 460a mov r2, r1 8024422: f2c2 0300 movt r3, #8192 ; 0x2000 8024426: 4601 mov r1, r0 8024428: 6818 ldr r0, [r3, #0] 802442a: f7ff bfb7 b.w 802439c <_setlocale_r> 802442e: bf00 nop 08024430 : 8024430: 4800 ldr r0, [pc, #0] ; (8024434 ) 8024432: 4770 bx lr 8024434: 20000164 .word 0x20000164 08024438 : 8024438: f240 032c movw r3, #44 ; 0x2c 802443c: 4601 mov r1, r0 802443e: f2c2 0300 movt r3, #8192 ; 0x2000 8024442: 6818 ldr r0, [r3, #0] 8024444: f000 b808 b.w 8024458 <_malloc_r> 08024448 : 8024448: f240 032c movw r3, #44 ; 0x2c 802444c: 4601 mov r1, r0 802444e: f2c2 0300 movt r3, #8192 ; 0x2000 8024452: 6818 ldr r0, [r3, #0] 8024454: f7ff baca b.w 80239ec <_free_r> 08024458 <_malloc_r>: 8024458: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802445c: f101 040b add.w r4, r1, #11 8024460: 2c16 cmp r4, #22 8024462: b083 sub sp, #12 8024464: 4607 mov r7, r0 8024466: d930 bls.n 80244ca <_malloc_r+0x72> 8024468: f024 0407 bic.w r4, r4, #7 802446c: 0fe3 lsrs r3, r4, #31 802446e: 428c cmp r4, r1 8024470: bf2c ite cs 8024472: 4619 movcs r1, r3 8024474: f043 0101 orrcc.w r1, r3, #1 8024478: 2900 cmp r1, #0 802447a: d12f bne.n 80244dc <_malloc_r+0x84> 802447c: 4638 mov r0, r7 802447e: f000 fb01 bl 8024a84 <__malloc_lock> 8024482: f5b4 7ffc cmp.w r4, #504 ; 0x1f8 8024486: d22e bcs.n 80244e6 <_malloc_r+0x8e> 8024488: ea4f 0cd4 mov.w ip, r4, lsr #3 802448c: f240 169c movw r6, #412 ; 0x19c 8024490: f2c2 0600 movt r6, #8192 ; 0x2000 8024494: eb06 02cc add.w r2, r6, ip, lsl #3 8024498: 68d3 ldr r3, [r2, #12] 802449a: 4293 cmp r3, r2 802449c: f000 8211 beq.w 80248c2 <_malloc_r+0x46a> 80244a0: 6859 ldr r1, [r3, #4] 80244a2: f103 0808 add.w r8, r3, #8 80244a6: 68da ldr r2, [r3, #12] 80244a8: 4638 mov r0, r7 80244aa: f021 0403 bic.w r4, r1, #3 80244ae: 6899 ldr r1, [r3, #8] 80244b0: 191b adds r3, r3, r4 80244b2: 685c ldr r4, [r3, #4] 80244b4: 60ca str r2, [r1, #12] 80244b6: f044 0401 orr.w r4, r4, #1 80244ba: 6091 str r1, [r2, #8] 80244bc: 605c str r4, [r3, #4] 80244be: f000 fae3 bl 8024a88 <__malloc_unlock> 80244c2: 4640 mov r0, r8 80244c4: b003 add sp, #12 80244c6: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80244ca: 2300 movs r3, #0 80244cc: 2410 movs r4, #16 80244ce: 428c cmp r4, r1 80244d0: bf2c ite cs 80244d2: 4619 movcs r1, r3 80244d4: f043 0101 orrcc.w r1, r3, #1 80244d8: 2900 cmp r1, #0 80244da: d0cf beq.n 802447c <_malloc_r+0x24> 80244dc: 230c movs r3, #12 80244de: f04f 0800 mov.w r8, #0 80244e2: 603b str r3, [r7, #0] 80244e4: e7ed b.n 80244c2 <_malloc_r+0x6a> 80244e6: ea5f 2c54 movs.w ip, r4, lsr #9 80244ea: bf04 itt eq 80244ec: ea4f 0cd4 moveq.w ip, r4, lsr #3 80244f0: ea4f 054c moveq.w r5, ip, lsl #1 80244f4: f040 808f bne.w 8024616 <_malloc_r+0x1be> 80244f8: f240 169c movw r6, #412 ; 0x19c 80244fc: f2c2 0600 movt r6, #8192 ; 0x2000 8024500: eb06 0585 add.w r5, r6, r5, lsl #2 8024504: 68eb ldr r3, [r5, #12] 8024506: 429d cmp r5, r3 8024508: d106 bne.n 8024518 <_malloc_r+0xc0> 802450a: e00d b.n 8024528 <_malloc_r+0xd0> 802450c: 2a00 cmp r2, #0 802450e: f280 8155 bge.w 80247bc <_malloc_r+0x364> 8024512: 68db ldr r3, [r3, #12] 8024514: 429d cmp r5, r3 8024516: d007 beq.n 8024528 <_malloc_r+0xd0> 8024518: 6859 ldr r1, [r3, #4] 802451a: f021 0103 bic.w r1, r1, #3 802451e: 1b0a subs r2, r1, r4 8024520: 2a0f cmp r2, #15 8024522: ddf3 ble.n 802450c <_malloc_r+0xb4> 8024524: f10c 3cff add.w ip, ip, #4294967295 8024528: f10c 0c01 add.w ip, ip, #1 802452c: f240 129c movw r2, #412 ; 0x19c 8024530: 6933 ldr r3, [r6, #16] 8024532: f2c2 0200 movt r2, #8192 ; 0x2000 8024536: f102 0e08 add.w lr, r2, #8 802453a: 4573 cmp r3, lr 802453c: bf08 it eq 802453e: f8d2 9004 ldreq.w r9, [r2, #4] 8024542: d022 beq.n 802458a <_malloc_r+0x132> 8024544: 6858 ldr r0, [r3, #4] 8024546: f020 0003 bic.w r0, r0, #3 802454a: 1b01 subs r1, r0, r4 802454c: 290f cmp r1, #15 802454e: f300 8184 bgt.w 802485a <_malloc_r+0x402> 8024552: 2900 cmp r1, #0 8024554: f8c2 e014 str.w lr, [r2, #20] 8024558: f8c2 e010 str.w lr, [r2, #16] 802455c: da66 bge.n 802462c <_malloc_r+0x1d4> 802455e: f5b0 7f00 cmp.w r0, #512 ; 0x200 8024562: f080 814e bcs.w 8024802 <_malloc_r+0x3aa> 8024566: 08c1 lsrs r1, r0, #3 8024568: f04f 0801 mov.w r8, #1 802456c: eb02 00c1 add.w r0, r2, r1, lsl #3 8024570: 1089 asrs r1, r1, #2 8024572: fa08 f801 lsl.w r8, r8, r1 8024576: 6851 ldr r1, [r2, #4] 8024578: 6885 ldr r5, [r0, #8] 802457a: 60d8 str r0, [r3, #12] 802457c: ea48 0901 orr.w r9, r8, r1 8024580: f8c2 9004 str.w r9, [r2, #4] 8024584: 609d str r5, [r3, #8] 8024586: 60eb str r3, [r5, #12] 8024588: 6083 str r3, [r0, #8] 802458a: 2201 movs r2, #1 802458c: ea4f 03ac mov.w r3, ip, asr #2 8024590: fa02 f303 lsl.w r3, r2, r3 8024594: 454b cmp r3, r9 8024596: d854 bhi.n 8024642 <_malloc_r+0x1ea> 8024598: ea19 0f03 tst.w r9, r3 802459c: d10d bne.n 80245ba <_malloc_r+0x162> 802459e: 4093 lsls r3, r2 80245a0: f02c 0c03 bic.w ip, ip, #3 80245a4: ea19 0f03 tst.w r9, r3 80245a8: f10c 0c04 add.w ip, ip, #4 80245ac: d105 bne.n 80245ba <_malloc_r+0x162> 80245ae: 005b lsls r3, r3, #1 80245b0: f10c 0c04 add.w ip, ip, #4 80245b4: ea19 0f03 tst.w r9, r3 80245b8: d0f9 beq.n 80245ae <_malloc_r+0x156> 80245ba: eb06 09cc add.w r9, r6, ip, lsl #3 80245be: 46e0 mov r8, ip 80245c0: 4648 mov r0, r9 80245c2: 68c2 ldr r2, [r0, #12] 80245c4: 4290 cmp r0, r2 80245c6: d107 bne.n 80245d8 <_malloc_r+0x180> 80245c8: e15b b.n 8024882 <_malloc_r+0x42a> 80245ca: 2900 cmp r1, #0 80245cc: f280 8183 bge.w 80248d6 <_malloc_r+0x47e> 80245d0: 68d2 ldr r2, [r2, #12] 80245d2: 4290 cmp r0, r2 80245d4: f000 8155 beq.w 8024882 <_malloc_r+0x42a> 80245d8: 6855 ldr r5, [r2, #4] 80245da: f025 0503 bic.w r5, r5, #3 80245de: 1b29 subs r1, r5, r4 80245e0: 290f cmp r1, #15 80245e2: ddf2 ble.n 80245ca <_malloc_r+0x172> 80245e4: 4690 mov r8, r2 80245e6: 1913 adds r3, r2, r4 80245e8: 68d5 ldr r5, [r2, #12] 80245ea: f044 0001 orr.w r0, r4, #1 80245ee: f858 4f08 ldr.w r4, [r8, #8]! 80245f2: f041 0c01 orr.w ip, r1, #1 80245f6: 6050 str r0, [r2, #4] 80245f8: 4638 mov r0, r7 80245fa: f8c3 c004 str.w ip, [r3, #4] 80245fe: 60e5 str r5, [r4, #12] 8024600: 60ac str r4, [r5, #8] 8024602: 6173 str r3, [r6, #20] 8024604: 6133 str r3, [r6, #16] 8024606: f8c3 e00c str.w lr, [r3, #12] 802460a: f8c3 e008 str.w lr, [r3, #8] 802460e: 5059 str r1, [r3, r1] 8024610: f000 fa3a bl 8024a88 <__malloc_unlock> 8024614: e755 b.n 80244c2 <_malloc_r+0x6a> 8024616: f1bc 0f04 cmp.w ip, #4 802461a: f200 80de bhi.w 80247da <_malloc_r+0x382> 802461e: ea4f 1c94 mov.w ip, r4, lsr #6 8024622: f10c 0c38 add.w ip, ip, #56 ; 0x38 8024626: ea4f 054c mov.w r5, ip, lsl #1 802462a: e765 b.n 80244f8 <_malloc_r+0xa0> 802462c: 181a adds r2, r3, r0 802462e: f103 0808 add.w r8, r3, #8 8024632: 4638 mov r0, r7 8024634: 6853 ldr r3, [r2, #4] 8024636: f043 0301 orr.w r3, r3, #1 802463a: 6053 str r3, [r2, #4] 802463c: f000 fa24 bl 8024a88 <__malloc_unlock> 8024640: e73f b.n 80244c2 <_malloc_r+0x6a> 8024642: 68b5 ldr r5, [r6, #8] 8024644: 686b ldr r3, [r5, #4] 8024646: f023 0a03 bic.w sl, r3, #3 802464a: 4554 cmp r4, sl 802464c: d804 bhi.n 8024658 <_malloc_r+0x200> 802464e: ebc4 030a rsb r3, r4, sl 8024652: 2b0f cmp r3, #15 8024654: f300 80a4 bgt.w 80247a0 <_malloc_r+0x348> 8024658: f640 29d0 movw r9, #2768 ; 0xad0 802465c: f8d6 1408 ldr.w r1, [r6, #1032] ; 0x408 8024660: f2c2 0900 movt r9, #8192 ; 0x2000 8024664: eb05 020a add.w r2, r5, sl 8024668: 3101 adds r1, #1 802466a: f8d9 3000 ldr.w r3, [r9] 802466e: 4423 add r3, r4 8024670: bf08 it eq 8024672: f103 0b10 addeq.w fp, r3, #16 8024676: d006 beq.n 8024686 <_malloc_r+0x22e> 8024678: f503 5380 add.w r3, r3, #4096 ; 0x1000 802467c: 330f adds r3, #15 802467e: f423 637f bic.w r3, r3, #4080 ; 0xff0 8024682: f023 0b0f bic.w fp, r3, #15 8024686: 4638 mov r0, r7 8024688: 4659 mov r1, fp 802468a: 9201 str r2, [sp, #4] 802468c: f000 fe86 bl 802539c <_sbrk_r> 8024690: 9a01 ldr r2, [sp, #4] 8024692: 1c41 adds r1, r0, #1 8024694: 4680 mov r8, r0 8024696: f000 8168 beq.w 802496a <_malloc_r+0x512> 802469a: 4282 cmp r2, r0 802469c: f200 8131 bhi.w 8024902 <_malloc_r+0x4aa> 80246a0: f8d9 3004 ldr.w r3, [r9, #4] 80246a4: 4542 cmp r2, r8 80246a6: 445b add r3, fp 80246a8: f8c9 3004 str.w r3, [r9, #4] 80246ac: f000 8166 beq.w 802497c <_malloc_r+0x524> 80246b0: f8d6 1408 ldr.w r1, [r6, #1032] ; 0x408 80246b4: f240 109c movw r0, #412 ; 0x19c 80246b8: f2c2 0000 movt r0, #8192 ; 0x2000 80246bc: 3101 adds r1, #1 80246be: bf17 itett ne 80246c0: ebc2 0208 rsbne r2, r2, r8 80246c4: f8c0 8408 streq.w r8, [r0, #1032] ; 0x408 80246c8: 189b addne r3, r3, r2 80246ca: f8c9 3004 strne.w r3, [r9, #4] 80246ce: f018 0307 ands.w r3, r8, #7 80246d2: 4638 mov r0, r7 80246d4: bf1f itttt ne 80246d6: f1c3 0208 rsbne r2, r3, #8 80246da: f5c3 5380 rsbne r3, r3, #4096 ; 0x1000 80246de: 4490 addne r8, r2 80246e0: f103 0208 addne.w r2, r3, #8 80246e4: eb08 030b add.w r3, r8, fp 80246e8: bf08 it eq 80246ea: f44f 5280 moveq.w r2, #4096 ; 0x1000 80246ee: 051b lsls r3, r3, #20 80246f0: 0d1b lsrs r3, r3, #20 80246f2: ebc3 0b02 rsb fp, r3, r2 80246f6: 4659 mov r1, fp 80246f8: f000 fe50 bl 802539c <_sbrk_r> 80246fc: 1c43 adds r3, r0, #1 80246fe: f000 8149 beq.w 8024994 <_malloc_r+0x53c> 8024702: ebc8 0100 rsb r1, r8, r0 8024706: 4459 add r1, fp 8024708: f041 0101 orr.w r1, r1, #1 802470c: f8d9 3004 ldr.w r3, [r9, #4] 8024710: 42b5 cmp r5, r6 8024712: f640 22d0 movw r2, #2768 ; 0xad0 8024716: f8c6 8008 str.w r8, [r6, #8] 802471a: 445b add r3, fp 802471c: f2c2 0200 movt r2, #8192 ; 0x2000 8024720: f8c8 1004 str.w r1, [r8, #4] 8024724: f8c9 3004 str.w r3, [r9, #4] 8024728: d018 beq.n 802475c <_malloc_r+0x304> 802472a: f1ba 0f0f cmp.w sl, #15 802472e: f240 810b bls.w 8024948 <_malloc_r+0x4f0> 8024732: f1aa 000c sub.w r0, sl, #12 8024736: 6869 ldr r1, [r5, #4] 8024738: f020 0007 bic.w r0, r0, #7 802473c: f04f 0c05 mov.w ip, #5 8024740: eb05 0e00 add.w lr, r5, r0 8024744: 280f cmp r0, #15 8024746: f001 0101 and.w r1, r1, #1 802474a: ea40 0101 orr.w r1, r0, r1 802474e: 6069 str r1, [r5, #4] 8024750: f8ce c004 str.w ip, [lr, #4] 8024754: f8ce c008 str.w ip, [lr, #8] 8024758: f200 8120 bhi.w 802499c <_malloc_r+0x544> 802475c: f640 22d0 movw r2, #2768 ; 0xad0 8024760: f8d9 102c ldr.w r1, [r9, #44] ; 0x2c 8024764: f2c2 0200 movt r2, #8192 ; 0x2000 8024768: 68b5 ldr r5, [r6, #8] 802476a: 428b cmp r3, r1 802476c: f8d9 1030 ldr.w r1, [r9, #48] ; 0x30 8024770: bf88 it hi 8024772: 62d3 strhi r3, [r2, #44] ; 0x2c 8024774: f640 22d0 movw r2, #2768 ; 0xad0 8024778: f2c2 0200 movt r2, #8192 ; 0x2000 802477c: 428b cmp r3, r1 802477e: bf88 it hi 8024780: 6313 strhi r3, [r2, #48] ; 0x30 8024782: 686a ldr r2, [r5, #4] 8024784: f022 0203 bic.w r2, r2, #3 8024788: 4294 cmp r4, r2 802478a: ebc4 0302 rsb r3, r4, r2 802478e: d801 bhi.n 8024794 <_malloc_r+0x33c> 8024790: 2b0f cmp r3, #15 8024792: dc05 bgt.n 80247a0 <_malloc_r+0x348> 8024794: 4638 mov r0, r7 8024796: f04f 0800 mov.w r8, #0 802479a: f000 f975 bl 8024a88 <__malloc_unlock> 802479e: e690 b.n 80244c2 <_malloc_r+0x6a> 80247a0: 192a adds r2, r5, r4 80247a2: f043 0301 orr.w r3, r3, #1 80247a6: f044 0401 orr.w r4, r4, #1 80247aa: 4638 mov r0, r7 80247ac: 606c str r4, [r5, #4] 80247ae: f105 0808 add.w r8, r5, #8 80247b2: 6053 str r3, [r2, #4] 80247b4: 60b2 str r2, [r6, #8] 80247b6: f000 f967 bl 8024a88 <__malloc_unlock> 80247ba: e682 b.n 80244c2 <_malloc_r+0x6a> 80247bc: 1859 adds r1, r3, r1 80247be: 68da ldr r2, [r3, #12] 80247c0: 689c ldr r4, [r3, #8] 80247c2: 4638 mov r0, r7 80247c4: 684d ldr r5, [r1, #4] 80247c6: f103 0808 add.w r8, r3, #8 80247ca: f045 0501 orr.w r5, r5, #1 80247ce: 60e2 str r2, [r4, #12] 80247d0: 6094 str r4, [r2, #8] 80247d2: 604d str r5, [r1, #4] 80247d4: f000 f958 bl 8024a88 <__malloc_unlock> 80247d8: e673 b.n 80244c2 <_malloc_r+0x6a> 80247da: f1bc 0f14 cmp.w ip, #20 80247de: bf9c itt ls 80247e0: f10c 0c5b addls.w ip, ip, #91 ; 0x5b 80247e4: ea4f 054c movls.w r5, ip, lsl #1 80247e8: f67f ae86 bls.w 80244f8 <_malloc_r+0xa0> 80247ec: f1bc 0f54 cmp.w ip, #84 ; 0x54 80247f0: f200 8093 bhi.w 802491a <_malloc_r+0x4c2> 80247f4: ea4f 3c14 mov.w ip, r4, lsr #12 80247f8: f10c 0c6e add.w ip, ip, #110 ; 0x6e 80247fc: ea4f 054c mov.w r5, ip, lsl #1 8024800: e67a b.n 80244f8 <_malloc_r+0xa0> 8024802: 0a42 lsrs r2, r0, #9 8024804: 2a04 cmp r2, #4 8024806: d975 bls.n 80248f4 <_malloc_r+0x49c> 8024808: 2a14 cmp r2, #20 802480a: bf9c itt ls 802480c: f102 095b addls.w r9, r2, #91 ; 0x5b 8024810: ea4f 0549 movls.w r5, r9, lsl #1 8024814: d908 bls.n 8024828 <_malloc_r+0x3d0> 8024816: 2a54 cmp r2, #84 ; 0x54 8024818: f200 80c9 bhi.w 80249ae <_malloc_r+0x556> 802481c: ea4f 3910 mov.w r9, r0, lsr #12 8024820: f109 096e add.w r9, r9, #110 ; 0x6e 8024824: ea4f 0549 mov.w r5, r9, lsl #1 8024828: eb06 0585 add.w r5, r6, r5, lsl #2 802482c: f240 189c movw r8, #412 ; 0x19c 8024830: f2c2 0800 movt r8, #8192 ; 0x2000 8024834: 68aa ldr r2, [r5, #8] 8024836: 42aa cmp r2, r5 8024838: d079 beq.n 802492e <_malloc_r+0x4d6> 802483a: 6851 ldr r1, [r2, #4] 802483c: f021 0103 bic.w r1, r1, #3 8024840: 4288 cmp r0, r1 8024842: d202 bcs.n 802484a <_malloc_r+0x3f2> 8024844: 6892 ldr r2, [r2, #8] 8024846: 4295 cmp r5, r2 8024848: d1f7 bne.n 802483a <_malloc_r+0x3e2> 802484a: 68d0 ldr r0, [r2, #12] 802484c: f8d6 9004 ldr.w r9, [r6, #4] 8024850: 60d8 str r0, [r3, #12] 8024852: 609a str r2, [r3, #8] 8024854: 60d3 str r3, [r2, #12] 8024856: 6083 str r3, [r0, #8] 8024858: e697 b.n 802458a <_malloc_r+0x132> 802485a: 191d adds r5, r3, r4 802485c: f041 0601 orr.w r6, r1, #1 8024860: 6155 str r5, [r2, #20] 8024862: f044 0401 orr.w r4, r4, #1 8024866: 6115 str r5, [r2, #16] 8024868: 4638 mov r0, r7 802486a: 605c str r4, [r3, #4] 802486c: f103 0808 add.w r8, r3, #8 8024870: f8c5 e00c str.w lr, [r5, #12] 8024874: f8c5 e008 str.w lr, [r5, #8] 8024878: 606e str r6, [r5, #4] 802487a: 5069 str r1, [r5, r1] 802487c: f000 f904 bl 8024a88 <__malloc_unlock> 8024880: e61f b.n 80244c2 <_malloc_r+0x6a> 8024882: f108 0801 add.w r8, r8, #1 8024886: 3008 adds r0, #8 8024888: f018 0f03 tst.w r8, #3 802488c: f47f ae99 bne.w 80245c2 <_malloc_r+0x16a> 8024890: 464a mov r2, r9 8024892: f01c 0f03 tst.w ip, #3 8024896: f1a2 0108 sub.w r1, r2, #8 802489a: f10c 3cff add.w ip, ip, #4294967295 802489e: f000 809e beq.w 80249de <_malloc_r+0x586> 80248a2: 6812 ldr r2, [r2, #0] 80248a4: 428a cmp r2, r1 80248a6: d0f4 beq.n 8024892 <_malloc_r+0x43a> 80248a8: 6872 ldr r2, [r6, #4] 80248aa: 005b lsls r3, r3, #1 80248ac: 4293 cmp r3, r2 80248ae: f63f aec8 bhi.w 8024642 <_malloc_r+0x1ea> 80248b2: 2b00 cmp r3, #0 80248b4: f43f aec5 beq.w 8024642 <_malloc_r+0x1ea> 80248b8: 421a tst r2, r3 80248ba: f000 8095 beq.w 80249e8 <_malloc_r+0x590> 80248be: 46c4 mov ip, r8 80248c0: e67b b.n 80245ba <_malloc_r+0x162> 80248c2: f103 0208 add.w r2, r3, #8 80248c6: 695b ldr r3, [r3, #20] 80248c8: 429a cmp r2, r3 80248ca: bf08 it eq 80248cc: f10c 0c02 addeq.w ip, ip, #2 80248d0: f43f ae2c beq.w 802452c <_malloc_r+0xd4> 80248d4: e5e4 b.n 80244a0 <_malloc_r+0x48> 80248d6: 4690 mov r8, r2 80248d8: 1955 adds r5, r2, r5 80248da: 68d3 ldr r3, [r2, #12] 80248dc: 4638 mov r0, r7 80248de: f858 2f08 ldr.w r2, [r8, #8]! 80248e2: 6869 ldr r1, [r5, #4] 80248e4: 60d3 str r3, [r2, #12] 80248e6: f041 0101 orr.w r1, r1, #1 80248ea: 609a str r2, [r3, #8] 80248ec: 6069 str r1, [r5, #4] 80248ee: f000 f8cb bl 8024a88 <__malloc_unlock> 80248f2: e5e6 b.n 80244c2 <_malloc_r+0x6a> 80248f4: ea4f 1990 mov.w r9, r0, lsr #6 80248f8: f109 0938 add.w r9, r9, #56 ; 0x38 80248fc: ea4f 0549 mov.w r5, r9, lsl #1 8024900: e792 b.n 8024828 <_malloc_r+0x3d0> 8024902: 42b5 cmp r5, r6 8024904: f240 139c movw r3, #412 ; 0x19c 8024908: f2c2 0300 movt r3, #8192 ; 0x2000 802490c: f43f aec8 beq.w 80246a0 <_malloc_r+0x248> 8024910: 689d ldr r5, [r3, #8] 8024912: 686a ldr r2, [r5, #4] 8024914: f022 0203 bic.w r2, r2, #3 8024918: e736 b.n 8024788 <_malloc_r+0x330> 802491a: f5bc 7faa cmp.w ip, #340 ; 0x154 802491e: d819 bhi.n 8024954 <_malloc_r+0x4fc> 8024920: ea4f 3cd4 mov.w ip, r4, lsr #15 8024924: f10c 0c77 add.w ip, ip, #119 ; 0x77 8024928: ea4f 054c mov.w r5, ip, lsl #1 802492c: e5e4 b.n 80244f8 <_malloc_r+0xa0> 802492e: 2501 movs r5, #1 8024930: f8d8 1004 ldr.w r1, [r8, #4] 8024934: ea4f 09a9 mov.w r9, r9, asr #2 8024938: 4610 mov r0, r2 802493a: fa05 f509 lsl.w r5, r5, r9 802493e: ea45 0901 orr.w r9, r5, r1 8024942: f8c8 9004 str.w r9, [r8, #4] 8024946: e783 b.n 8024850 <_malloc_r+0x3f8> 8024948: 2301 movs r3, #1 802494a: 4645 mov r5, r8 802494c: f8c8 3004 str.w r3, [r8, #4] 8024950: 2200 movs r2, #0 8024952: e719 b.n 8024788 <_malloc_r+0x330> 8024954: f240 5354 movw r3, #1364 ; 0x554 8024958: 459c cmp ip, r3 802495a: d80b bhi.n 8024974 <_malloc_r+0x51c> 802495c: ea4f 4c94 mov.w ip, r4, lsr #18 8024960: f10c 0c7c add.w ip, ip, #124 ; 0x7c 8024964: ea4f 054c mov.w r5, ip, lsl #1 8024968: e5c6 b.n 80244f8 <_malloc_r+0xa0> 802496a: 68b5 ldr r5, [r6, #8] 802496c: 686a ldr r2, [r5, #4] 802496e: f022 0203 bic.w r2, r2, #3 8024972: e709 b.n 8024788 <_malloc_r+0x330> 8024974: 25fc movs r5, #252 ; 0xfc 8024976: f04f 0c7e mov.w ip, #126 ; 0x7e 802497a: e5bd b.n 80244f8 <_malloc_r+0xa0> 802497c: 0511 lsls r1, r2, #20 802497e: 0d09 lsrs r1, r1, #20 8024980: 2900 cmp r1, #0 8024982: f47f ae95 bne.w 80246b0 <_malloc_r+0x258> 8024986: 68b2 ldr r2, [r6, #8] 8024988: eb0b 010a add.w r1, fp, sl 802498c: f041 0101 orr.w r1, r1, #1 8024990: 6051 str r1, [r2, #4] 8024992: e6e3 b.n 802475c <_malloc_r+0x304> 8024994: 2101 movs r1, #1 8024996: f04f 0b00 mov.w fp, #0 802499a: e6b7 b.n 802470c <_malloc_r+0x2b4> 802499c: 4638 mov r0, r7 802499e: f105 0108 add.w r1, r5, #8 80249a2: 9201 str r2, [sp, #4] 80249a4: f7ff f822 bl 80239ec <_free_r> 80249a8: 9a01 ldr r2, [sp, #4] 80249aa: 6853 ldr r3, [r2, #4] 80249ac: e6d6 b.n 802475c <_malloc_r+0x304> 80249ae: f5b2 7faa cmp.w r2, #340 ; 0x154 80249b2: d806 bhi.n 80249c2 <_malloc_r+0x56a> 80249b4: ea4f 39d0 mov.w r9, r0, lsr #15 80249b8: f109 0977 add.w r9, r9, #119 ; 0x77 80249bc: ea4f 0549 mov.w r5, r9, lsl #1 80249c0: e732 b.n 8024828 <_malloc_r+0x3d0> 80249c2: f240 5154 movw r1, #1364 ; 0x554 80249c6: 25fc movs r5, #252 ; 0xfc 80249c8: 428a cmp r2, r1 80249ca: f04f 097e mov.w r9, #126 ; 0x7e 80249ce: bf9e ittt ls 80249d0: ea4f 4990 movls.w r9, r0, lsr #18 80249d4: f109 097c addls.w r9, r9, #124 ; 0x7c 80249d8: ea4f 0549 movls.w r5, r9, lsl #1 80249dc: e724 b.n 8024828 <_malloc_r+0x3d0> 80249de: 6872 ldr r2, [r6, #4] 80249e0: ea22 0203 bic.w r2, r2, r3 80249e4: 6072 str r2, [r6, #4] 80249e6: e760 b.n 80248aa <_malloc_r+0x452> 80249e8: 005b lsls r3, r3, #1 80249ea: f108 0804 add.w r8, r8, #4 80249ee: e763 b.n 80248b8 <_malloc_r+0x460> 080249f0 : 80249f0: 0783 lsls r3, r0, #30 80249f2: b2c9 uxtb r1, r1 80249f4: b470 push {r4, r5, r6} 80249f6: d040 beq.n 8024a7a 80249f8: 1e54 subs r4, r2, #1 80249fa: 2a00 cmp r2, #0 80249fc: d03f beq.n 8024a7e 80249fe: 7803 ldrb r3, [r0, #0] 8024a00: 428b cmp r3, r1 8024a02: d021 beq.n 8024a48 8024a04: 1c43 adds r3, r0, #1 8024a06: e004 b.n 8024a12 8024a08: b304 cbz r4, 8024a4c 8024a0a: 7802 ldrb r2, [r0, #0] 8024a0c: 3c01 subs r4, #1 8024a0e: 428a cmp r2, r1 8024a10: d01a beq.n 8024a48 8024a12: f013 0f03 tst.w r3, #3 8024a16: 4618 mov r0, r3 8024a18: f103 0301 add.w r3, r3, #1 8024a1c: d1f4 bne.n 8024a08 8024a1e: 2c03 cmp r4, #3 8024a20: d816 bhi.n 8024a50 8024a22: 1e65 subs r5, r4, #1 8024a24: b194 cbz r4, 8024a4c 8024a26: 7803 ldrb r3, [r0, #0] 8024a28: 428b cmp r3, r1 8024a2a: d00d beq.n 8024a48 8024a2c: 1c42 adds r2, r0, #1 8024a2e: 2300 movs r3, #0 8024a30: e002 b.n 8024a38 8024a32: 7804 ldrb r4, [r0, #0] 8024a34: 428c cmp r4, r1 8024a36: d007 beq.n 8024a48 8024a38: 429d cmp r5, r3 8024a3a: 4610 mov r0, r2 8024a3c: f103 0301 add.w r3, r3, #1 8024a40: f102 0201 add.w r2, r2, #1 8024a44: d1f5 bne.n 8024a32 8024a46: 2000 movs r0, #0 8024a48: bc70 pop {r4, r5, r6} 8024a4a: 4770 bx lr 8024a4c: 4620 mov r0, r4 8024a4e: e7fb b.n 8024a48 8024a50: ea41 2601 orr.w r6, r1, r1, lsl #8 8024a54: ea46 4606 orr.w r6, r6, r6, lsl #16 8024a58: 4602 mov r2, r0 8024a5a: 3004 adds r0, #4 8024a5c: 6813 ldr r3, [r2, #0] 8024a5e: 4073 eors r3, r6 8024a60: f1a3 3501 sub.w r5, r3, #16843009 ; 0x1010101 8024a64: ea25 0303 bic.w r3, r5, r3 8024a68: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 8024a6c: d103 bne.n 8024a76 8024a6e: 3c04 subs r4, #4 8024a70: 2c03 cmp r4, #3 8024a72: d8f1 bhi.n 8024a58 8024a74: e7d5 b.n 8024a22 8024a76: 4610 mov r0, r2 8024a78: e7d3 b.n 8024a22 8024a7a: 4614 mov r4, r2 8024a7c: e7cf b.n 8024a1e 8024a7e: 4610 mov r0, r2 8024a80: e7e2 b.n 8024a48 8024a82: bf00 nop 08024a84 <__malloc_lock>: 8024a84: 4770 bx lr 8024a86: bf00 nop 08024a88 <__malloc_unlock>: 8024a88: 4770 bx lr 8024a8a: bf00 nop 08024a8c <_Balloc>: 8024a8c: b570 push {r4, r5, r6, lr} 8024a8e: 4606 mov r6, r0 8024a90: 6a44 ldr r4, [r0, #36] ; 0x24 8024a92: 460d mov r5, r1 8024a94: b15c cbz r4, 8024aae <_Balloc+0x22> 8024a96: 68e2 ldr r2, [r4, #12] 8024a98: b19a cbz r2, 8024ac2 <_Balloc+0x36> 8024a9a: f852 0025 ldr.w r0, [r2, r5, lsl #2] 8024a9e: b1e0 cbz r0, 8024ada <_Balloc+0x4e> 8024aa0: 6801 ldr r1, [r0, #0] 8024aa2: f842 1025 str.w r1, [r2, r5, lsl #2] 8024aa6: 2200 movs r2, #0 8024aa8: 6102 str r2, [r0, #16] 8024aaa: 60c2 str r2, [r0, #12] 8024aac: bd70 pop {r4, r5, r6, pc} 8024aae: 2010 movs r0, #16 8024ab0: f7ff fcc2 bl 8024438 8024ab4: 2300 movs r3, #0 8024ab6: 4604 mov r4, r0 8024ab8: 6270 str r0, [r6, #36] ; 0x24 8024aba: 6043 str r3, [r0, #4] 8024abc: 6083 str r3, [r0, #8] 8024abe: 6003 str r3, [r0, #0] 8024ac0: 60c3 str r3, [r0, #12] 8024ac2: 2221 movs r2, #33 ; 0x21 8024ac4: 4630 mov r0, r6 8024ac6: 2104 movs r1, #4 8024ac8: f000 fcfc bl 80254c4 <_calloc_r> 8024acc: 6a73 ldr r3, [r6, #36] ; 0x24 8024ace: 60e0 str r0, [r4, #12] 8024ad0: 68da ldr r2, [r3, #12] 8024ad2: 2a00 cmp r2, #0 8024ad4: d1e1 bne.n 8024a9a <_Balloc+0xe> 8024ad6: 2000 movs r0, #0 8024ad8: bd70 pop {r4, r5, r6, pc} 8024ada: 2301 movs r3, #1 8024adc: 4630 mov r0, r6 8024ade: 4619 mov r1, r3 8024ae0: fa03 f405 lsl.w r4, r3, r5 8024ae4: 1d62 adds r2, r4, #5 8024ae6: 0092 lsls r2, r2, #2 8024ae8: f000 fcec bl 80254c4 <_calloc_r> 8024aec: 2800 cmp r0, #0 8024aee: d0f2 beq.n 8024ad6 <_Balloc+0x4a> 8024af0: 6045 str r5, [r0, #4] 8024af2: 6084 str r4, [r0, #8] 8024af4: e7d7 b.n 8024aa6 <_Balloc+0x1a> 8024af6: bf00 nop 08024af8 <_Bfree>: 8024af8: b530 push {r4, r5, lr} 8024afa: 4604 mov r4, r0 8024afc: 6a45 ldr r5, [r0, #36] ; 0x24 8024afe: b083 sub sp, #12 8024b00: b155 cbz r5, 8024b18 <_Bfree+0x20> 8024b02: b139 cbz r1, 8024b14 <_Bfree+0x1c> 8024b04: 6a63 ldr r3, [r4, #36] ; 0x24 8024b06: 684a ldr r2, [r1, #4] 8024b08: 68db ldr r3, [r3, #12] 8024b0a: f853 0022 ldr.w r0, [r3, r2, lsl #2] 8024b0e: 6008 str r0, [r1, #0] 8024b10: f843 1022 str.w r1, [r3, r2, lsl #2] 8024b14: b003 add sp, #12 8024b16: bd30 pop {r4, r5, pc} 8024b18: 2010 movs r0, #16 8024b1a: 9101 str r1, [sp, #4] 8024b1c: f7ff fc8c bl 8024438 8024b20: 9901 ldr r1, [sp, #4] 8024b22: 6260 str r0, [r4, #36] ; 0x24 8024b24: 6045 str r5, [r0, #4] 8024b26: 6085 str r5, [r0, #8] 8024b28: 6005 str r5, [r0, #0] 8024b2a: 60c5 str r5, [r0, #12] 8024b2c: e7e9 b.n 8024b02 <_Bfree+0xa> 8024b2e: bf00 nop 08024b30 <__multadd>: 8024b30: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8024b34: 4688 mov r8, r1 8024b36: f8d1 a010 ldr.w sl, [r1, #16] 8024b3a: b082 sub sp, #8 8024b3c: 4681 mov r9, r0 8024b3e: f101 0514 add.w r5, r1, #20 8024b42: 2400 movs r4, #0 8024b44: 682f ldr r7, [r5, #0] 8024b46: 3401 adds r4, #1 8024b48: b2be uxth r6, r7 8024b4a: 0c3f lsrs r7, r7, #16 8024b4c: fb02 3606 mla r6, r2, r6, r3 8024b50: fb02 f307 mul.w r3, r2, r7 8024b54: eb03 4316 add.w r3, r3, r6, lsr #16 8024b58: b2b6 uxth r6, r6 8024b5a: eb06 4603 add.w r6, r6, r3, lsl #16 8024b5e: 0c1b lsrs r3, r3, #16 8024b60: 45a2 cmp sl, r4 8024b62: f845 6b04 str.w r6, [r5], #4 8024b66: dced bgt.n 8024b44 <__multadd+0x14> 8024b68: b153 cbz r3, 8024b80 <__multadd+0x50> 8024b6a: f8d8 2008 ldr.w r2, [r8, #8] 8024b6e: 4592 cmp sl, r2 8024b70: da0a bge.n 8024b88 <__multadd+0x58> 8024b72: eb08 028a add.w r2, r8, sl, lsl #2 8024b76: f10a 0101 add.w r1, sl, #1 8024b7a: f8c8 1010 str.w r1, [r8, #16] 8024b7e: 6153 str r3, [r2, #20] 8024b80: 4640 mov r0, r8 8024b82: b002 add sp, #8 8024b84: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 8024b88: f8d8 1004 ldr.w r1, [r8, #4] 8024b8c: 4648 mov r0, r9 8024b8e: 9301 str r3, [sp, #4] 8024b90: 3101 adds r1, #1 8024b92: f7ff ff7b bl 8024a8c <_Balloc> 8024b96: f8d8 2010 ldr.w r2, [r8, #16] 8024b9a: f108 010c add.w r1, r8, #12 8024b9e: 3202 adds r2, #2 8024ba0: 0092 lsls r2, r2, #2 8024ba2: 4604 mov r4, r0 8024ba4: 300c adds r0, #12 8024ba6: f7fd f841 bl 8021c2c 8024baa: 4641 mov r1, r8 8024bac: 4648 mov r0, r9 8024bae: 46a0 mov r8, r4 8024bb0: f7ff ffa2 bl 8024af8 <_Bfree> 8024bb4: 9b01 ldr r3, [sp, #4] 8024bb6: e7dc b.n 8024b72 <__multadd+0x42> 08024bb8 <__s2b>: 8024bb8: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 8024bbc: f648 6539 movw r5, #36409 ; 0x8e39 8024bc0: 461f mov r7, r3 8024bc2: f6c3 05e3 movt r5, #14563 ; 0x38e3 8024bc6: 3308 adds r3, #8 8024bc8: 4606 mov r6, r0 8024bca: 460c mov r4, r1 8024bcc: 4690 mov r8, r2 8024bce: fb85 1003 smull r1, r0, r5, r3 8024bd2: 17db asrs r3, r3, #31 8024bd4: ebc3 0060 rsb r0, r3, r0, asr #1 8024bd8: 2801 cmp r0, #1 8024bda: dd37 ble.n 8024c4c <__s2b+0x94> 8024bdc: 2501 movs r5, #1 8024bde: 2100 movs r1, #0 8024be0: 006d lsls r5, r5, #1 8024be2: 3101 adds r1, #1 8024be4: 42a8 cmp r0, r5 8024be6: dcfb bgt.n 8024be0 <__s2b+0x28> 8024be8: 4630 mov r0, r6 8024bea: f7ff ff4f bl 8024a8c <_Balloc> 8024bee: 9b08 ldr r3, [sp, #32] 8024bf0: 6143 str r3, [r0, #20] 8024bf2: 2301 movs r3, #1 8024bf4: f1b8 0f09 cmp.w r8, #9 8024bf8: 4601 mov r1, r0 8024bfa: 6103 str r3, [r0, #16] 8024bfc: dd22 ble.n 8024c44 <__s2b+0x8c> 8024bfe: f104 0909 add.w r9, r4, #9 8024c02: 4444 add r4, r8 8024c04: 464d mov r5, r9 8024c06: f815 3b01 ldrb.w r3, [r5], #1 8024c0a: 220a movs r2, #10 8024c0c: 4630 mov r0, r6 8024c0e: 3b30 subs r3, #48 ; 0x30 8024c10: f7ff ff8e bl 8024b30 <__multadd> 8024c14: 42a5 cmp r5, r4 8024c16: 4601 mov r1, r0 8024c18: d1f5 bne.n 8024c06 <__s2b+0x4e> 8024c1a: eb09 0408 add.w r4, r9, r8 8024c1e: 3c08 subs r4, #8 8024c20: 4547 cmp r7, r8 8024c22: dd0c ble.n 8024c3e <__s2b+0x86> 8024c24: ebc8 0707 rsb r7, r8, r7 8024c28: 19e7 adds r7, r4, r7 8024c2a: f814 3b01 ldrb.w r3, [r4], #1 8024c2e: 220a movs r2, #10 8024c30: 4630 mov r0, r6 8024c32: 3b30 subs r3, #48 ; 0x30 8024c34: f7ff ff7c bl 8024b30 <__multadd> 8024c38: 42bc cmp r4, r7 8024c3a: 4601 mov r1, r0 8024c3c: d1f5 bne.n 8024c2a <__s2b+0x72> 8024c3e: 4608 mov r0, r1 8024c40: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8024c44: 340a adds r4, #10 8024c46: f04f 0809 mov.w r8, #9 8024c4a: e7e9 b.n 8024c20 <__s2b+0x68> 8024c4c: 2100 movs r1, #0 8024c4e: e7cb b.n 8024be8 <__s2b+0x30> 08024c50 <__hi0bits>: 8024c50: 4603 mov r3, r0 8024c52: 2000 movs r0, #0 8024c54: 0c1a lsrs r2, r3, #16 8024c56: d101 bne.n 8024c5c <__hi0bits+0xc> 8024c58: 041b lsls r3, r3, #16 8024c5a: 2010 movs r0, #16 8024c5c: f013 4f7f tst.w r3, #4278190080 ; 0xff000000 8024c60: d101 bne.n 8024c66 <__hi0bits+0x16> 8024c62: 3008 adds r0, #8 8024c64: 021b lsls r3, r3, #8 8024c66: f013 4f70 tst.w r3, #4026531840 ; 0xf0000000 8024c6a: d101 bne.n 8024c70 <__hi0bits+0x20> 8024c6c: 3004 adds r0, #4 8024c6e: 011b lsls r3, r3, #4 8024c70: f013 4f40 tst.w r3, #3221225472 ; 0xc0000000 8024c74: d101 bne.n 8024c7a <__hi0bits+0x2a> 8024c76: 3002 adds r0, #2 8024c78: 009b lsls r3, r3, #2 8024c7a: 2b00 cmp r3, #0 8024c7c: db02 blt.n 8024c84 <__hi0bits+0x34> 8024c7e: 005b lsls r3, r3, #1 8024c80: d401 bmi.n 8024c86 <__hi0bits+0x36> 8024c82: 2020 movs r0, #32 8024c84: 4770 bx lr 8024c86: 3001 adds r0, #1 8024c88: 4770 bx lr 8024c8a: bf00 nop 08024c8c <__lo0bits>: 8024c8c: 6803 ldr r3, [r0, #0] 8024c8e: 4602 mov r2, r0 8024c90: f013 0007 ands.w r0, r3, #7 8024c94: d007 beq.n 8024ca6 <__lo0bits+0x1a> 8024c96: 07d9 lsls r1, r3, #31 8024c98: d41f bmi.n 8024cda <__lo0bits+0x4e> 8024c9a: 0798 lsls r0, r3, #30 8024c9c: d41f bmi.n 8024cde <__lo0bits+0x52> 8024c9e: 089b lsrs r3, r3, #2 8024ca0: 2002 movs r0, #2 8024ca2: 6013 str r3, [r2, #0] 8024ca4: 4770 bx lr 8024ca6: b299 uxth r1, r3 8024ca8: b909 cbnz r1, 8024cae <__lo0bits+0x22> 8024caa: 0c1b lsrs r3, r3, #16 8024cac: 2010 movs r0, #16 8024cae: f013 0fff tst.w r3, #255 ; 0xff 8024cb2: d101 bne.n 8024cb8 <__lo0bits+0x2c> 8024cb4: 3008 adds r0, #8 8024cb6: 0a1b lsrs r3, r3, #8 8024cb8: 0719 lsls r1, r3, #28 8024cba: d101 bne.n 8024cc0 <__lo0bits+0x34> 8024cbc: 3004 adds r0, #4 8024cbe: 091b lsrs r3, r3, #4 8024cc0: 0799 lsls r1, r3, #30 8024cc2: d101 bne.n 8024cc8 <__lo0bits+0x3c> 8024cc4: 3002 adds r0, #2 8024cc6: 089b lsrs r3, r3, #2 8024cc8: 07d9 lsls r1, r3, #31 8024cca: d404 bmi.n 8024cd6 <__lo0bits+0x4a> 8024ccc: 085b lsrs r3, r3, #1 8024cce: d101 bne.n 8024cd4 <__lo0bits+0x48> 8024cd0: 2020 movs r0, #32 8024cd2: 4770 bx lr 8024cd4: 3001 adds r0, #1 8024cd6: 6013 str r3, [r2, #0] 8024cd8: 4770 bx lr 8024cda: 2000 movs r0, #0 8024cdc: 4770 bx lr 8024cde: 085b lsrs r3, r3, #1 8024ce0: 2001 movs r0, #1 8024ce2: 6013 str r3, [r2, #0] 8024ce4: 4770 bx lr 8024ce6: bf00 nop 08024ce8 <__i2b>: 8024ce8: b510 push {r4, lr} 8024cea: 460c mov r4, r1 8024cec: 2101 movs r1, #1 8024cee: f7ff fecd bl 8024a8c <_Balloc> 8024cf2: 2201 movs r2, #1 8024cf4: 6144 str r4, [r0, #20] 8024cf6: 6102 str r2, [r0, #16] 8024cf8: bd10 pop {r4, pc} 8024cfa: bf00 nop 08024cfc <__multiply>: 8024cfc: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8024d00: 460c mov r4, r1 8024d02: 690e ldr r6, [r1, #16] 8024d04: b085 sub sp, #20 8024d06: 6915 ldr r5, [r2, #16] 8024d08: 4617 mov r7, r2 8024d0a: 42ae cmp r6, r5 8024d0c: da04 bge.n 8024d18 <__multiply+0x1c> 8024d0e: 4632 mov r2, r6 8024d10: 463c mov r4, r7 8024d12: 462e mov r6, r5 8024d14: 460f mov r7, r1 8024d16: 4615 mov r5, r2 8024d18: 68a3 ldr r3, [r4, #8] 8024d1a: eb06 0805 add.w r8, r6, r5 8024d1e: 6861 ldr r1, [r4, #4] 8024d20: 4598 cmp r8, r3 8024d22: bfc8 it gt 8024d24: 3101 addgt r1, #1 8024d26: f7ff feb1 bl 8024a8c <_Balloc> 8024d2a: eb00 0988 add.w r9, r0, r8, lsl #2 8024d2e: f100 0314 add.w r3, r0, #20 8024d32: f109 0914 add.w r9, r9, #20 8024d36: 9001 str r0, [sp, #4] 8024d38: 2000 movs r0, #0 8024d3a: 454b cmp r3, r9 8024d3c: d203 bcs.n 8024d46 <__multiply+0x4a> 8024d3e: f843 0b04 str.w r0, [r3], #4 8024d42: 4599 cmp r9, r3 8024d44: d8fb bhi.n 8024d3e <__multiply+0x42> 8024d46: eb07 0585 add.w r5, r7, r5, lsl #2 8024d4a: eb04 0686 add.w r6, r4, r6, lsl #2 8024d4e: 3714 adds r7, #20 8024d50: 3514 adds r5, #20 8024d52: 3414 adds r4, #20 8024d54: 3614 adds r6, #20 8024d56: 42af cmp r7, r5 8024d58: d257 bcs.n 8024e0a <__multiply+0x10e> 8024d5a: 9a01 ldr r2, [sp, #4] 8024d5c: f8cd 9008 str.w r9, [sp, #8] 8024d60: 46a9 mov r9, r5 8024d62: f8cd 800c str.w r8, [sp, #12] 8024d66: f102 0c18 add.w ip, r2, #24 8024d6a: 46a0 mov r8, r4 8024d6c: f857 4b04 ldr.w r4, [r7], #4 8024d70: b2a0 uxth r0, r4 8024d72: b1f0 cbz r0, 8024db2 <__multiply+0xb6> 8024d74: 4642 mov r2, r8 8024d76: f1ac 0304 sub.w r3, ip, #4 8024d7a: 2400 movs r4, #0 8024d7c: f852 1b04 ldr.w r1, [r2], #4 8024d80: 681d ldr r5, [r3, #0] 8024d82: fa1f fa81 uxth.w sl, r1 8024d86: 0c09 lsrs r1, r1, #16 8024d88: fa1f fb85 uxth.w fp, r5 8024d8c: 0c2d lsrs r5, r5, #16 8024d8e: fb00 ba0a mla sl, r0, sl, fp 8024d92: fb00 5101 mla r1, r0, r1, r5 8024d96: 4454 add r4, sl 8024d98: eb01 4114 add.w r1, r1, r4, lsr #16 8024d9c: b2a4 uxth r4, r4 8024d9e: ea44 4501 orr.w r5, r4, r1, lsl #16 8024da2: 0c0c lsrs r4, r1, #16 8024da4: 4296 cmp r6, r2 8024da6: f843 5b04 str.w r5, [r3], #4 8024daa: d8e7 bhi.n 8024d7c <__multiply+0x80> 8024dac: 601c str r4, [r3, #0] 8024dae: f857 4c04 ldr.w r4, [r7, #-4] 8024db2: 0c24 lsrs r4, r4, #16 8024db4: d021 beq.n 8024dfa <__multiply+0xfe> 8024db6: f85c 1c04 ldr.w r1, [ip, #-4] 8024dba: 4642 mov r2, r8 8024dbc: 4663 mov r3, ip 8024dbe: 2500 movs r5, #0 8024dc0: 4608 mov r0, r1 8024dc2: f8b2 a000 ldrh.w sl, [r2] 8024dc6: 0c00 lsrs r0, r0, #16 8024dc8: b289 uxth r1, r1 8024dca: 469b mov fp, r3 8024dcc: fb04 000a mla r0, r4, sl, r0 8024dd0: 1945 adds r5, r0, r5 8024dd2: ea41 4105 orr.w r1, r1, r5, lsl #16 8024dd6: f843 1c04 str.w r1, [r3, #-4] 8024dda: f853 0b04 ldr.w r0, [r3], #4 8024dde: f852 1b04 ldr.w r1, [r2], #4 8024de2: fa1f fa80 uxth.w sl, r0 8024de6: 0c09 lsrs r1, r1, #16 8024de8: fb04 a101 mla r1, r4, r1, sl 8024dec: eb01 4115 add.w r1, r1, r5, lsr #16 8024df0: 0c0d lsrs r5, r1, #16 8024df2: 4296 cmp r6, r2 8024df4: d8e5 bhi.n 8024dc2 <__multiply+0xc6> 8024df6: f8cb 1000 str.w r1, [fp] 8024dfa: 45b9 cmp r9, r7 8024dfc: f10c 0c04 add.w ip, ip, #4 8024e00: d8b4 bhi.n 8024d6c <__multiply+0x70> 8024e02: f8dd 9008 ldr.w r9, [sp, #8] 8024e06: f8dd 800c ldr.w r8, [sp, #12] 8024e0a: f1b8 0f00 cmp.w r8, #0 8024e0e: dd0b ble.n 8024e28 <__multiply+0x12c> 8024e10: f859 3c04 ldr.w r3, [r9, #-4] 8024e14: f1a9 0904 sub.w r9, r9, #4 8024e18: b11b cbz r3, 8024e22 <__multiply+0x126> 8024e1a: e005 b.n 8024e28 <__multiply+0x12c> 8024e1c: f859 3d04 ldr.w r3, [r9, #-4]! 8024e20: b913 cbnz r3, 8024e28 <__multiply+0x12c> 8024e22: f1b8 0801 subs.w r8, r8, #1 8024e26: d1f9 bne.n 8024e1c <__multiply+0x120> 8024e28: 9b01 ldr r3, [sp, #4] 8024e2a: 4618 mov r0, r3 8024e2c: f8c3 8010 str.w r8, [r3, #16] 8024e30: b005 add sp, #20 8024e32: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8024e36: bf00 nop 08024e38 <__pow5mult>: 8024e38: f012 0303 ands.w r3, r2, #3 8024e3c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8024e40: 4614 mov r4, r2 8024e42: 4680 mov r8, r0 8024e44: 460f mov r7, r1 8024e46: d128 bne.n 8024e9a <__pow5mult+0x62> 8024e48: 10a4 asrs r4, r4, #2 8024e4a: d01a beq.n 8024e82 <__pow5mult+0x4a> 8024e4c: f8d8 5024 ldr.w r5, [r8, #36] ; 0x24 8024e50: 2d00 cmp r5, #0 8024e52: d02e beq.n 8024eb2 <__pow5mult+0x7a> 8024e54: 68ae ldr r6, [r5, #8] 8024e56: b92e cbnz r6, 8024e64 <__pow5mult+0x2c> 8024e58: e036 b.n 8024ec8 <__pow5mult+0x90> 8024e5a: 1064 asrs r4, r4, #1 8024e5c: d011 beq.n 8024e82 <__pow5mult+0x4a> 8024e5e: 6835 ldr r5, [r6, #0] 8024e60: b195 cbz r5, 8024e88 <__pow5mult+0x50> 8024e62: 462e mov r6, r5 8024e64: 07e0 lsls r0, r4, #31 8024e66: d5f8 bpl.n 8024e5a <__pow5mult+0x22> 8024e68: 4639 mov r1, r7 8024e6a: 4632 mov r2, r6 8024e6c: 4640 mov r0, r8 8024e6e: f7ff ff45 bl 8024cfc <__multiply> 8024e72: 4639 mov r1, r7 8024e74: 4605 mov r5, r0 8024e76: 4640 mov r0, r8 8024e78: f7ff fe3e bl 8024af8 <_Bfree> 8024e7c: 1064 asrs r4, r4, #1 8024e7e: 462f mov r7, r5 8024e80: d1ed bne.n 8024e5e <__pow5mult+0x26> 8024e82: 4638 mov r0, r7 8024e84: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8024e88: 4631 mov r1, r6 8024e8a: 4632 mov r2, r6 8024e8c: 4640 mov r0, r8 8024e8e: f7ff ff35 bl 8024cfc <__multiply> 8024e92: 6030 str r0, [r6, #0] 8024e94: 4606 mov r6, r0 8024e96: 6005 str r5, [r0, #0] 8024e98: e7e4 b.n 8024e64 <__pow5mult+0x2c> 8024e9a: f248 62d0 movw r2, #34512 ; 0x86d0 8024e9e: 1e5d subs r5, r3, #1 8024ea0: f6c0 0203 movt r2, #2051 ; 0x803 8024ea4: 2300 movs r3, #0 8024ea6: f852 2025 ldr.w r2, [r2, r5, lsl #2] 8024eaa: f7ff fe41 bl 8024b30 <__multadd> 8024eae: 4607 mov r7, r0 8024eb0: e7ca b.n 8024e48 <__pow5mult+0x10> 8024eb2: 2010 movs r0, #16 8024eb4: f7ff fac0 bl 8024438 8024eb8: 2300 movs r3, #0 8024eba: 4605 mov r5, r0 8024ebc: f8c8 0024 str.w r0, [r8, #36] ; 0x24 8024ec0: 6043 str r3, [r0, #4] 8024ec2: 6083 str r3, [r0, #8] 8024ec4: 6003 str r3, [r0, #0] 8024ec6: 60c3 str r3, [r0, #12] 8024ec8: 4640 mov r0, r8 8024eca: f240 2171 movw r1, #625 ; 0x271 8024ece: f7ff ff0b bl 8024ce8 <__i2b> 8024ed2: 2300 movs r3, #0 8024ed4: 60a8 str r0, [r5, #8] 8024ed6: 4606 mov r6, r0 8024ed8: 6003 str r3, [r0, #0] 8024eda: e7c3 b.n 8024e64 <__pow5mult+0x2c> 08024edc <__lshift>: 8024edc: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8024ee0: 4693 mov fp, r2 8024ee2: 690a ldr r2, [r1, #16] 8024ee4: 460f mov r7, r1 8024ee6: ea4f 156b mov.w r5, fp, asr #5 8024eea: 688b ldr r3, [r1, #8] 8024eec: eb05 0a02 add.w sl, r5, r2 8024ef0: 4681 mov r9, r0 8024ef2: f10a 0601 add.w r6, sl, #1 8024ef6: 6849 ldr r1, [r1, #4] 8024ef8: 429e cmp r6, r3 8024efa: dd03 ble.n 8024f04 <__lshift+0x28> 8024efc: 005b lsls r3, r3, #1 8024efe: 3101 adds r1, #1 8024f00: 429e cmp r6, r3 8024f02: dcfb bgt.n 8024efc <__lshift+0x20> 8024f04: 4648 mov r0, r9 8024f06: f7ff fdc1 bl 8024a8c <_Balloc> 8024f0a: 2d00 cmp r5, #0 8024f0c: 4680 mov r8, r0 8024f0e: f100 0414 add.w r4, r0, #20 8024f12: dd0a ble.n 8024f2a <__lshift+0x4e> 8024f14: 2300 movs r3, #0 8024f16: 461a mov r2, r3 8024f18: 3301 adds r3, #1 8024f1a: f844 2b04 str.w r2, [r4], #4 8024f1e: 42ab cmp r3, r5 8024f20: d1fa bne.n 8024f18 <__lshift+0x3c> 8024f22: eb08 0383 add.w r3, r8, r3, lsl #2 8024f26: f103 0414 add.w r4, r3, #20 8024f2a: 6938 ldr r0, [r7, #16] 8024f2c: f107 0514 add.w r5, r7, #20 8024f30: eb07 0080 add.w r0, r7, r0, lsl #2 8024f34: 3014 adds r0, #20 8024f36: f01b 0b1f ands.w fp, fp, #31 8024f3a: d01c beq.n 8024f76 <__lshift+0x9a> 8024f3c: f1cb 0320 rsb r3, fp, #32 8024f40: 2200 movs r2, #0 8024f42: 6829 ldr r1, [r5, #0] 8024f44: fa01 f10b lsl.w r1, r1, fp 8024f48: 430a orrs r2, r1 8024f4a: f844 2b04 str.w r2, [r4], #4 8024f4e: f855 2b04 ldr.w r2, [r5], #4 8024f52: 42a8 cmp r0, r5 8024f54: fa22 f203 lsr.w r2, r2, r3 8024f58: d8f3 bhi.n 8024f42 <__lshift+0x66> 8024f5a: 6022 str r2, [r4, #0] 8024f5c: b10a cbz r2, 8024f62 <__lshift+0x86> 8024f5e: f10a 0602 add.w r6, sl, #2 8024f62: 4648 mov r0, r9 8024f64: 3e01 subs r6, #1 8024f66: 4639 mov r1, r7 8024f68: f8c8 6010 str.w r6, [r8, #16] 8024f6c: f7ff fdc4 bl 8024af8 <_Bfree> 8024f70: 4640 mov r0, r8 8024f72: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8024f76: f855 3b04 ldr.w r3, [r5], #4 8024f7a: 42a8 cmp r0, r5 8024f7c: f844 3b04 str.w r3, [r4], #4 8024f80: d9ef bls.n 8024f62 <__lshift+0x86> 8024f82: f855 3b04 ldr.w r3, [r5], #4 8024f86: 42a8 cmp r0, r5 8024f88: f844 3b04 str.w r3, [r4], #4 8024f8c: d8f3 bhi.n 8024f76 <__lshift+0x9a> 8024f8e: e7e8 b.n 8024f62 <__lshift+0x86> 08024f90 <__mcmp>: 8024f90: 4603 mov r3, r0 8024f92: 690a ldr r2, [r1, #16] 8024f94: 6900 ldr r0, [r0, #16] 8024f96: b430 push {r4, r5} 8024f98: 1a80 subs r0, r0, r2 8024f9a: d10f bne.n 8024fbc <__mcmp+0x2c> 8024f9c: 3204 adds r2, #4 8024f9e: f103 0514 add.w r5, r3, #20 8024fa2: 0092 lsls r2, r2, #2 8024fa4: 189b adds r3, r3, r2 8024fa6: 1889 adds r1, r1, r2 8024fa8: 3304 adds r3, #4 8024faa: 3104 adds r1, #4 8024fac: f853 2d04 ldr.w r2, [r3, #-4]! 8024fb0: f851 4d04 ldr.w r4, [r1, #-4]! 8024fb4: 42a2 cmp r2, r4 8024fb6: d103 bne.n 8024fc0 <__mcmp+0x30> 8024fb8: 429d cmp r5, r3 8024fba: d3f7 bcc.n 8024fac <__mcmp+0x1c> 8024fbc: bc30 pop {r4, r5} 8024fbe: 4770 bx lr 8024fc0: 4294 cmp r4, r2 8024fc2: bf94 ite ls 8024fc4: 2001 movls r0, #1 8024fc6: f04f 30ff movhi.w r0, #4294967295 8024fca: e7f7 b.n 8024fbc <__mcmp+0x2c> 08024fcc <__mdiff>: 8024fcc: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8024fd0: 468b mov fp, r1 8024fd2: 4604 mov r4, r0 8024fd4: 4611 mov r1, r2 8024fd6: 4658 mov r0, fp 8024fd8: 4691 mov r9, r2 8024fda: f7ff ffd9 bl 8024f90 <__mcmp> 8024fde: 1e05 subs r5, r0, #0 8024fe0: d061 beq.n 80250a6 <__mdiff+0xda> 8024fe2: bfbc itt lt 8024fe4: 465b movlt r3, fp 8024fe6: 46cb movlt fp, r9 8024fe8: 4620 mov r0, r4 8024fea: bfb8 it lt 8024fec: 4699 movlt r9, r3 8024fee: f8db 1004 ldr.w r1, [fp, #4] 8024ff2: bfac ite ge 8024ff4: f04f 0800 movge.w r8, #0 8024ff8: f04f 0801 movlt.w r8, #1 8024ffc: f7ff fd46 bl 8024a8c <_Balloc> 8025000: f8db 7010 ldr.w r7, [fp, #16] 8025004: f109 0514 add.w r5, r9, #20 8025008: f8d9 3010 ldr.w r3, [r9, #16] 802500c: f10b 0614 add.w r6, fp, #20 8025010: 2400 movs r4, #0 8025012: eb0b 0c87 add.w ip, fp, r7, lsl #2 8025016: eb09 0983 add.w r9, r9, r3, lsl #2 802501a: f10c 0c14 add.w ip, ip, #20 802501e: f109 0914 add.w r9, r9, #20 8025022: f100 0a14 add.w sl, r0, #20 8025026: f8c0 800c str.w r8, [r0, #12] 802502a: f856 8b04 ldr.w r8, [r6], #4 802502e: 4653 mov r3, sl 8025030: f855 ab04 ldr.w sl, [r5], #4 8025034: 4632 mov r2, r6 8025036: fa1f f188 uxth.w r1, r8 802503a: 1909 adds r1, r1, r4 802503c: fa1f fb8a uxth.w fp, sl 8025040: ebcb 0101 rsb r1, fp, r1 8025044: ea4f 441a mov.w r4, sl, lsr #16 8025048: ebc4 4418 rsb r4, r4, r8, lsr #16 802504c: eb04 4421 add.w r4, r4, r1, asr #16 8025050: b289 uxth r1, r1 8025052: ea41 4104 orr.w r1, r1, r4, lsl #16 8025056: 1424 asrs r4, r4, #16 8025058: 45a9 cmp r9, r5 802505a: f843 1b04 str.w r1, [r3], #4 802505e: 469a mov sl, r3 8025060: d8e3 bhi.n 802502a <__mdiff+0x5e> 8025062: 45b4 cmp ip, r6 8025064: 4698 mov r8, r3 8025066: d914 bls.n 8025092 <__mdiff+0xc6> 8025068: f852 5b04 ldr.w r5, [r2], #4 802506c: b2a9 uxth r1, r5 802506e: 0c2d lsrs r5, r5, #16 8025070: 190c adds r4, r1, r4 8025072: eb05 4524 add.w r5, r5, r4, asr #16 8025076: b2a4 uxth r4, r4 8025078: ea44 4105 orr.w r1, r4, r5, lsl #16 802507c: 142c asrs r4, r5, #16 802507e: 4594 cmp ip, r2 8025080: f843 1b04 str.w r1, [r3], #4 8025084: d8f0 bhi.n 8025068 <__mdiff+0x9c> 8025086: 43f3 mvns r3, r6 8025088: 4463 add r3, ip 802508a: f023 0303 bic.w r3, r3, #3 802508e: 3304 adds r3, #4 8025090: 4443 add r3, r8 8025092: 3b04 subs r3, #4 8025094: b921 cbnz r1, 80250a0 <__mdiff+0xd4> 8025096: f853 2d04 ldr.w r2, [r3, #-4]! 802509a: 3f01 subs r7, #1 802509c: 2a00 cmp r2, #0 802509e: d0fa beq.n 8025096 <__mdiff+0xca> 80250a0: 6107 str r7, [r0, #16] 80250a2: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 80250a6: 4620 mov r0, r4 80250a8: 4629 mov r1, r5 80250aa: f7ff fcef bl 8024a8c <_Balloc> 80250ae: 2301 movs r3, #1 80250b0: 6145 str r5, [r0, #20] 80250b2: 6103 str r3, [r0, #16] 80250b4: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 080250b8 <__ulp>: 80250b8: 2300 movs r3, #0 80250ba: f6c7 73f0 movt r3, #32752 ; 0x7ff0 80250be: 400b ands r3, r1 80250c0: f1a3 7350 sub.w r3, r3, #54525952 ; 0x3400000 80250c4: 2b00 cmp r3, #0 80250c6: dd02 ble.n 80250ce <__ulp+0x16> 80250c8: 4619 mov r1, r3 80250ca: 2000 movs r0, #0 80250cc: 4770 bx lr 80250ce: 425b negs r3, r3 80250d0: 2100 movs r1, #0 80250d2: 151b asrs r3, r3, #20 80250d4: 2b13 cmp r3, #19 80250d6: dd0b ble.n 80250f0 <__ulp+0x38> 80250d8: 2b32 cmp r3, #50 ; 0x32 80250da: dd02 ble.n 80250e2 <__ulp+0x2a> 80250dc: 2301 movs r3, #1 80250de: 4618 mov r0, r3 80250e0: 4770 bx lr 80250e2: 2201 movs r2, #1 80250e4: f1c3 0333 rsb r3, r3, #51 ; 0x33 80250e8: fa02 f303 lsl.w r3, r2, r3 80250ec: 4618 mov r0, r3 80250ee: 4770 bx lr 80250f0: f44f 2200 mov.w r2, #524288 ; 0x80000 80250f4: 2000 movs r0, #0 80250f6: fa42 f103 asr.w r1, r2, r3 80250fa: 4770 bx lr 080250fc <__b2d>: 80250fc: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 8025100: f100 0814 add.w r8, r0, #20 8025104: 6906 ldr r6, [r0, #16] 8025106: 4689 mov r9, r1 8025108: 3604 adds r6, #4 802510a: eb00 0686 add.w r6, r0, r6, lsl #2 802510e: 4634 mov r4, r6 8025110: 4637 mov r7, r6 8025112: f854 5b04 ldr.w r5, [r4], #4 8025116: 4628 mov r0, r5 8025118: f7ff fd9a bl 8024c50 <__hi0bits> 802511c: 280a cmp r0, #10 802511e: f1c0 0320 rsb r3, r0, #32 8025122: f8c9 3000 str.w r3, [r9] 8025126: dc18 bgt.n 802515a <__b2d+0x5e> 8025128: 45b0 cmp r8, r6 802512a: f1c0 010b rsb r1, r0, #11 802512e: fa25 f701 lsr.w r7, r5, r1 8025132: bf38 it cc 8025134: f854 4c08 ldrcc.w r4, [r4, #-8] 8025138: f047 577f orr.w r7, r7, #1069547520 ; 0x3fc00000 802513c: f447 1340 orr.w r3, r7, #3145728 ; 0x300000 8025140: bf34 ite cc 8025142: fa24 f101 lsrcc.w r1, r4, r1 8025146: 2100 movcs r1, #0 8025148: 3015 adds r0, #21 802514a: fa05 f500 lsl.w r5, r5, r0 802514e: ea41 0205 orr.w r2, r1, r5 8025152: 4610 mov r0, r2 8025154: 4619 mov r1, r3 8025156: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 802515a: 2100 movs r1, #0 802515c: 45b0 cmp r8, r6 802515e: d202 bcs.n 8025166 <__b2d+0x6a> 8025160: f854 1c08 ldr.w r1, [r4, #-8] 8025164: 1f37 subs r7, r6, #4 8025166: f1b0 040b subs.w r4, r0, #11 802516a: d018 beq.n 802519e <__b2d+0xa2> 802516c: fa05 f504 lsl.w r5, r5, r4 8025170: f1c0 002b rsb r0, r0, #43 ; 0x2b 8025174: 4547 cmp r7, r8 8025176: f045 557f orr.w r5, r5, #1069547520 ; 0x3fc00000 802517a: fa21 f600 lsr.w r6, r1, r0 802517e: f445 1540 orr.w r5, r5, #3145728 ; 0x300000 8025182: ea45 0306 orr.w r3, r5, r6 8025186: bf88 it hi 8025188: f857 5c04 ldrhi.w r5, [r7, #-4] 802518c: fa01 f104 lsl.w r1, r1, r4 8025190: bf8c ite hi 8025192: fa25 f000 lsrhi.w r0, r5, r0 8025196: 2000 movls r0, #0 8025198: ea40 0201 orr.w r2, r0, r1 802519c: e7d9 b.n 8025152 <__b2d+0x56> 802519e: f045 557f orr.w r5, r5, #1069547520 ; 0x3fc00000 80251a2: 460a mov r2, r1 80251a4: f445 1340 orr.w r3, r5, #3145728 ; 0x300000 80251a8: e7d3 b.n 8025152 <__b2d+0x56> 80251aa: bf00 nop 080251ac <__d2b>: 80251ac: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 80251b0: b083 sub sp, #12 80251b2: 2101 movs r1, #1 80251b4: 461d mov r5, r3 80251b6: 4614 mov r4, r2 80251b8: 9f0a ldr r7, [sp, #40] ; 0x28 80251ba: f7ff fc67 bl 8024a8c <_Balloc> 80251be: f3c5 560a ubfx r6, r5, #20, #11 80251c2: f025 437f bic.w r3, r5, #4278190080 ; 0xff000000 80251c6: 46a9 mov r9, r5 80251c8: f423 0370 bic.w r3, r3, #15728640 ; 0xf00000 80251cc: 4680 mov r8, r0 80251ce: b10e cbz r6, 80251d4 <__d2b+0x28> 80251d0: f443 1380 orr.w r3, r3, #1048576 ; 0x100000 80251d4: 9301 str r3, [sp, #4] 80251d6: 2c00 cmp r4, #0 80251d8: d024 beq.n 8025224 <__d2b+0x78> 80251da: a802 add r0, sp, #8 80251dc: f840 4d08 str.w r4, [r0, #-8]! 80251e0: 4668 mov r0, sp 80251e2: f7ff fd53 bl 8024c8c <__lo0bits> 80251e6: 9b01 ldr r3, [sp, #4] 80251e8: 2800 cmp r0, #0 80251ea: d131 bne.n 8025250 <__d2b+0xa4> 80251ec: 9a00 ldr r2, [sp, #0] 80251ee: f8c8 2014 str.w r2, [r8, #20] 80251f2: 2b00 cmp r3, #0 80251f4: bf0c ite eq 80251f6: 2401 moveq r4, #1 80251f8: 2402 movne r4, #2 80251fa: f8c8 3018 str.w r3, [r8, #24] 80251fe: f8c8 4010 str.w r4, [r8, #16] 8025202: b9e6 cbnz r6, 802523e <__d2b+0x92> 8025204: eb08 0384 add.w r3, r8, r4, lsl #2 8025208: f2a0 4032 subw r0, r0, #1074 ; 0x432 802520c: 6038 str r0, [r7, #0] 802520e: 6918 ldr r0, [r3, #16] 8025210: f7ff fd1e bl 8024c50 <__hi0bits> 8025214: 9b0b ldr r3, [sp, #44] ; 0x2c 8025216: ebc0 1044 rsb r0, r0, r4, lsl #5 802521a: 6018 str r0, [r3, #0] 802521c: 4640 mov r0, r8 802521e: b003 add sp, #12 8025220: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 8025224: a801 add r0, sp, #4 8025226: f7ff fd31 bl 8024c8c <__lo0bits> 802522a: 2301 movs r3, #1 802522c: 461c mov r4, r3 802522e: f8c8 3010 str.w r3, [r8, #16] 8025232: 9b01 ldr r3, [sp, #4] 8025234: f8c8 3014 str.w r3, [r8, #20] 8025238: 3020 adds r0, #32 802523a: 2e00 cmp r6, #0 802523c: d0e2 beq.n 8025204 <__d2b+0x58> 802523e: 9a0b ldr r2, [sp, #44] ; 0x2c 8025240: f2a6 4933 subw r9, r6, #1075 ; 0x433 8025244: f1c0 0335 rsb r3, r0, #53 ; 0x35 8025248: 4448 add r0, r9 802524a: 6038 str r0, [r7, #0] 802524c: 6013 str r3, [r2, #0] 802524e: e7e5 b.n 802521c <__d2b+0x70> 8025250: f1c0 0120 rsb r1, r0, #32 8025254: 9a00 ldr r2, [sp, #0] 8025256: fa03 f101 lsl.w r1, r3, r1 802525a: fa23 f300 lsr.w r3, r3, r0 802525e: 430a orrs r2, r1 8025260: 9301 str r3, [sp, #4] 8025262: f8c8 2014 str.w r2, [r8, #20] 8025266: e7c4 b.n 80251f2 <__d2b+0x46> 08025268 <__ratio>: 8025268: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 802526c: b083 sub sp, #12 802526e: 4688 mov r8, r1 8025270: 4669 mov r1, sp 8025272: 4606 mov r6, r0 8025274: f7ff ff42 bl 80250fc <__b2d> 8025278: 460d mov r5, r1 802527a: 4604 mov r4, r0 802527c: a901 add r1, sp, #4 802527e: 4640 mov r0, r8 8025280: f7ff ff3c bl 80250fc <__b2d> 8025284: 462f mov r7, r5 8025286: 460b mov r3, r1 8025288: 4602 mov r2, r0 802528a: f8d8 1010 ldr.w r1, [r8, #16] 802528e: 4699 mov r9, r3 8025290: 6930 ldr r0, [r6, #16] 8025292: 4626 mov r6, r4 8025294: 4690 mov r8, r2 8025296: ebc1 0e00 rsb lr, r1, r0 802529a: e89d 0003 ldmia.w sp, {r0, r1} 802529e: 1a40 subs r0, r0, r1 80252a0: eb00 114e add.w r1, r0, lr, lsl #5 80252a4: 2900 cmp r1, #0 80252a6: bfc9 itett gt 80252a8: eb05 5701 addgt.w r7, r5, r1, lsl #20 80252ac: eba3 5901 suble.w r9, r3, r1, lsl #20 80252b0: 4624 movgt r4, r4 80252b2: 463d movgt r5, r7 80252b4: bfdc itt le 80252b6: 4612 movle r2, r2 80252b8: 464b movle r3, r9 80252ba: 4620 mov r0, r4 80252bc: 4629 mov r1, r5 80252be: f7fb faa9 bl 8020814 <__aeabi_ddiv> 80252c2: b003 add sp, #12 80252c4: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 080252c8 <_mprec_log10>: 80252c8: 2817 cmp r0, #23 80252ca: b510 push {r4, lr} 80252cc: 4604 mov r4, r0 80252ce: dd0c ble.n 80252ea <_mprec_log10+0x22> 80252d0: 2100 movs r1, #0 80252d2: 2000 movs r0, #0 80252d4: f6c3 71f0 movt r1, #16368 ; 0x3ff0 80252d8: 2300 movs r3, #0 80252da: 2200 movs r2, #0 80252dc: f2c4 0324 movt r3, #16420 ; 0x4024 80252e0: f7fb f96e bl 80205c0 <__aeabi_dmul> 80252e4: 3c01 subs r4, #1 80252e6: d1f7 bne.n 80252d8 <_mprec_log10+0x10> 80252e8: bd10 pop {r4, pc} 80252ea: f248 63d0 movw r3, #34512 ; 0x86d0 80252ee: f6c0 0303 movt r3, #2051 ; 0x803 80252f2: eb03 03c0 add.w r3, r3, r0, lsl #3 80252f6: e9d3 0104 ldrd r0, r1, [r3, #16] 80252fa: bd10 pop {r4, pc} 080252fc <__copybits>: 80252fc: b470 push {r4, r5, r6} 80252fe: 3901 subs r1, #1 8025300: 6915 ldr r5, [r2, #16] 8025302: f102 0314 add.w r3, r2, #20 8025306: 114e asrs r6, r1, #5 8025308: 3601 adds r6, #1 802530a: eb02 0585 add.w r5, r2, r5, lsl #2 802530e: 3514 adds r5, #20 8025310: eb00 0686 add.w r6, r0, r6, lsl #2 8025314: 42ab cmp r3, r5 8025316: d20c bcs.n 8025332 <__copybits+0x36> 8025318: 4601 mov r1, r0 802531a: f853 4b04 ldr.w r4, [r3], #4 802531e: 429d cmp r5, r3 8025320: f841 4b04 str.w r4, [r1], #4 8025324: d8f9 bhi.n 802531a <__copybits+0x1e> 8025326: 1aab subs r3, r5, r2 8025328: 3b15 subs r3, #21 802532a: f023 0303 bic.w r3, r3, #3 802532e: 3304 adds r3, #4 8025330: 18c0 adds r0, r0, r3 8025332: 4286 cmp r6, r0 8025334: d904 bls.n 8025340 <__copybits+0x44> 8025336: 2300 movs r3, #0 8025338: f840 3b04 str.w r3, [r0], #4 802533c: 4286 cmp r6, r0 802533e: d8fb bhi.n 8025338 <__copybits+0x3c> 8025340: bc70 pop {r4, r5, r6} 8025342: 4770 bx lr 08025344 <__any_on>: 8025344: b430 push {r4, r5} 8025346: 114b asrs r3, r1, #5 8025348: 6904 ldr r4, [r0, #16] 802534a: f100 0214 add.w r2, r0, #20 802534e: 429c cmp r4, r3 8025350: bfb8 it lt 8025352: 4623 movlt r3, r4 8025354: db00 blt.n 8025358 <__any_on+0x14> 8025356: dc11 bgt.n 802537c <__any_on+0x38> 8025358: 3304 adds r3, #4 802535a: eb00 0083 add.w r0, r0, r3, lsl #2 802535e: 1d03 adds r3, r0, #4 8025360: 429a cmp r2, r3 8025362: d218 bcs.n 8025396 <__any_on+0x52> 8025364: f853 3c04 ldr.w r3, [r3, #-4] 8025368: b92b cbnz r3, 8025376 <__any_on+0x32> 802536a: 4282 cmp r2, r0 802536c: d213 bcs.n 8025396 <__any_on+0x52> 802536e: f850 3d04 ldr.w r3, [r0, #-4]! 8025372: 2b00 cmp r3, #0 8025374: d0f9 beq.n 802536a <__any_on+0x26> 8025376: 2001 movs r0, #1 8025378: bc30 pop {r4, r5} 802537a: 4770 bx lr 802537c: f011 011f ands.w r1, r1, #31 8025380: d0ea beq.n 8025358 <__any_on+0x14> 8025382: eb00 0483 add.w r4, r0, r3, lsl #2 8025386: 6964 ldr r4, [r4, #20] 8025388: fa24 f501 lsr.w r5, r4, r1 802538c: fa05 f101 lsl.w r1, r5, r1 8025390: 42a1 cmp r1, r4 8025392: d1f0 bne.n 8025376 <__any_on+0x32> 8025394: e7e0 b.n 8025358 <__any_on+0x14> 8025396: 2000 movs r0, #0 8025398: e7ee b.n 8025378 <__any_on+0x34> 802539a: bf00 nop 0802539c <_sbrk_r>: 802539c: b538 push {r3, r4, r5, lr} 802539e: f643 0438 movw r4, #14392 ; 0x3838 80253a2: f2c2 0401 movt r4, #8193 ; 0x2001 80253a6: 4605 mov r5, r0 80253a8: 4608 mov r0, r1 80253aa: 2300 movs r3, #0 80253ac: 6023 str r3, [r4, #0] 80253ae: f013 f8b3 bl 8038518 <_sbrk> 80253b2: 1c43 adds r3, r0, #1 80253b4: d000 beq.n 80253b8 <_sbrk_r+0x1c> 80253b6: bd38 pop {r3, r4, r5, pc} 80253b8: 6823 ldr r3, [r4, #0] 80253ba: 2b00 cmp r3, #0 80253bc: d0fb beq.n 80253b6 <_sbrk_r+0x1a> 80253be: 602b str r3, [r5, #0] 80253c0: bd38 pop {r3, r4, r5, pc} 80253c2: bf00 nop 080253c4 : 80253c4: b2c9 uxtb r1, r1 80253c6: b4f0 push {r4, r5, r6, r7} 80253c8: 2900 cmp r1, #0 80253ca: d04b beq.n 8025464 80253cc: 0783 lsls r3, r0, #30 80253ce: d00f beq.n 80253f0 80253d0: 7803 ldrb r3, [r0, #0] 80253d2: 2b00 cmp r3, #0 80253d4: d073 beq.n 80254be 80253d6: 4299 cmp r1, r3 80253d8: d042 beq.n 8025460 80253da: 1c43 adds r3, r0, #1 80253dc: e005 b.n 80253ea 80253de: f813 2b01 ldrb.w r2, [r3], #1 80253e2: 2a00 cmp r2, #0 80253e4: d03b beq.n 802545e 80253e6: 4291 cmp r1, r2 80253e8: d03a beq.n 8025460 80253ea: 079a lsls r2, r3, #30 80253ec: 4618 mov r0, r3 80253ee: d1f6 bne.n 80253de 80253f0: 6803 ldr r3, [r0, #0] 80253f2: ea41 2701 orr.w r7, r1, r1, lsl #8 80253f6: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 80253fa: ea47 4707 orr.w r7, r7, r7, lsl #16 80253fe: ea22 0203 bic.w r2, r2, r3 8025402: f012 3f80 tst.w r2, #2155905152 ; 0x80808080 8025406: d11c bne.n 8025442 8025408: 407b eors r3, r7 802540a: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 802540e: ea22 0303 bic.w r3, r2, r3 8025412: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 8025416: d114 bne.n 8025442 8025418: 1d02 adds r2, r0, #4 802541a: e002 b.n 8025422 802541c: f014 3f80 tst.w r4, #2155905152 ; 0x80808080 8025420: d10f bne.n 8025442 8025422: 4610 mov r0, r2 8025424: f852 3b04 ldr.w r3, [r2], #4 8025428: f1a3 3601 sub.w r6, r3, #16843009 ; 0x1010101 802542c: ea87 0403 eor.w r4, r7, r3 8025430: ea26 0303 bic.w r3, r6, r3 8025434: f1a4 3501 sub.w r5, r4, #16843009 ; 0x1010101 8025438: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 802543c: ea25 0404 bic.w r4, r5, r4 8025440: d0ec beq.n 802541c 8025442: 7803 ldrb r3, [r0, #0] 8025444: 2b00 cmp r3, #0 8025446: d03a beq.n 80254be 8025448: 4299 cmp r1, r3 802544a: d009 beq.n 8025460 802544c: 1c43 adds r3, r0, #1 802544e: e001 b.n 8025454 8025450: 4291 cmp r1, r2 8025452: d005 beq.n 8025460 8025454: 4618 mov r0, r3 8025456: f813 2b01 ldrb.w r2, [r3], #1 802545a: 2a00 cmp r2, #0 802545c: d1f8 bne.n 8025450 802545e: 4610 mov r0, r2 8025460: bcf0 pop {r4, r5, r6, r7} 8025462: 4770 bx lr 8025464: 0781 lsls r1, r0, #30 8025466: d00d beq.n 8025484 8025468: 7803 ldrb r3, [r0, #0] 802546a: 2b00 cmp r3, #0 802546c: d0f8 beq.n 8025460 802546e: 1c43 adds r3, r0, #1 8025470: e002 b.n 8025478 8025472: 7802 ldrb r2, [r0, #0] 8025474: 2a00 cmp r2, #0 8025476: d0f3 beq.n 8025460 8025478: f013 0f03 tst.w r3, #3 802547c: 4618 mov r0, r3 802547e: f103 0301 add.w r3, r3, #1 8025482: d1f6 bne.n 8025472 8025484: 6803 ldr r3, [r0, #0] 8025486: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 802548a: ea22 0303 bic.w r3, r2, r3 802548e: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 8025492: d10a bne.n 80254aa 8025494: 1d02 adds r2, r0, #4 8025496: 4610 mov r0, r2 8025498: f852 1b04 ldr.w r1, [r2], #4 802549c: f1a1 3401 sub.w r4, r1, #16843009 ; 0x1010101 80254a0: ea24 0101 bic.w r1, r4, r1 80254a4: f011 3f80 tst.w r1, #2155905152 ; 0x80808080 80254a8: d0f5 beq.n 8025496 80254aa: 7803 ldrb r3, [r0, #0] 80254ac: 2b00 cmp r3, #0 80254ae: d0d7 beq.n 8025460 80254b0: 1c43 adds r3, r0, #1 80254b2: 4618 mov r0, r3 80254b4: 3301 adds r3, #1 80254b6: 7802 ldrb r2, [r0, #0] 80254b8: 2a00 cmp r2, #0 80254ba: d1fa bne.n 80254b2 80254bc: e7d0 b.n 8025460 80254be: 4618 mov r0, r3 80254c0: e7ce b.n 8025460 80254c2: bf00 nop 080254c4 <_calloc_r>: 80254c4: b510 push {r4, lr} 80254c6: fb01 f102 mul.w r1, r1, r2 80254ca: f7fe ffc5 bl 8024458 <_malloc_r> 80254ce: 4604 mov r4, r0 80254d0: b170 cbz r0, 80254f0 <_calloc_r+0x2c> 80254d2: f850 2c04 ldr.w r2, [r0, #-4] 80254d6: f022 0203 bic.w r2, r2, #3 80254da: 3a04 subs r2, #4 80254dc: 2a24 cmp r2, #36 ; 0x24 80254de: d81c bhi.n 802551a <_calloc_r+0x56> 80254e0: 2a13 cmp r2, #19 80254e2: bf98 it ls 80254e4: 4603 movls r3, r0 80254e6: d805 bhi.n 80254f4 <_calloc_r+0x30> 80254e8: 2200 movs r2, #0 80254ea: 601a str r2, [r3, #0] 80254ec: 605a str r2, [r3, #4] 80254ee: 609a str r2, [r3, #8] 80254f0: 4620 mov r0, r4 80254f2: bd10 pop {r4, pc} 80254f4: 2100 movs r1, #0 80254f6: 2a1b cmp r2, #27 80254f8: 6001 str r1, [r0, #0] 80254fa: bf98 it ls 80254fc: f100 0308 addls.w r3, r0, #8 8025500: 6041 str r1, [r0, #4] 8025502: d9f1 bls.n 80254e8 <_calloc_r+0x24> 8025504: 2a24 cmp r2, #36 ; 0x24 8025506: 6081 str r1, [r0, #8] 8025508: 60c1 str r1, [r0, #12] 802550a: bf11 iteee ne 802550c: f100 0310 addne.w r3, r0, #16 8025510: 6101 streq r1, [r0, #16] 8025512: f100 0318 addeq.w r3, r0, #24 8025516: 6141 streq r1, [r0, #20] 8025518: e7e6 b.n 80254e8 <_calloc_r+0x24> 802551a: 2100 movs r1, #0 802551c: f7fc fc40 bl 8021da0 8025520: 4620 mov r0, r4 8025522: bd10 pop {r4, pc} 08025524 : 8025524: f021 4100 bic.w r1, r1, #2147483648 ; 0x80000000 8025528: 4770 bx lr 802552a: bf00 nop 0802552c : { /* 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; 802552c: f040 60bf orr.w r0, r0, #100139008 ; 0x5f80000 8025530: 4b02 ldr r3, [pc, #8] ; (802553c ) 8025532: f440 3000 orr.w r0, r0, #131072 ; 0x20000 8025536: 60d8 str r0, [r3, #12] 8025538: 4770 bx lr 802553a: bf00 nop 802553c: e000ed00 .word 0xe000ed00 08025540 : /* 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) 8025540: 78c3 ldrb r3, [r0, #3] 8025542: b30b cbz r3, 8025588 { /* Compute the Corresponding IRQ Priority --------------------------------*/ tmppriority = (0x700 - ((SCB->AIRCR) & (uint32_t)0x700))>> 0x08; 8025544: 4b16 ldr r3, [pc, #88] ; (80255a0 ) tmppre = (0x4 - tmppriority); tmpsub = tmpsub >> tmppriority; tmppriority = NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; 8025546: 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; 8025548: 68db ldr r3, [r3, #12] 802554a: 43db mvns r3, r3 802554c: f3c3 2302 ubfx r3, r3, #8, #3 tmppre = (0x4 - tmppriority); 8025550: f1c3 0204 rsb r2, r3, #4 tmpsub = tmpsub >> tmppriority; tmppriority = NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; 8025554: b2d2 uxtb r2, r2 8025556: 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; 802555a: 210f movs r1, #15 802555c: fa41 f303 asr.w r3, r1, r3 tmppriority = NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; tmppriority |= (uint8_t)(NVIC_InitStruct->NVIC_IRQChannelSubPriority & tmpsub); 8025560: 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; 8025562: b2d2 uxtb r2, r2 tmppriority |= (uint8_t)(NVIC_InitStruct->NVIC_IRQChannelSubPriority & tmpsub); 8025564: 400b ands r3, r1 8025566: 431a orrs r2, r3 tmppriority = tmppriority << 0x04; NVIC->IP[NVIC_InitStruct->NVIC_IRQChannel] = tmppriority; 8025568: 7803 ldrb r3, [r0, #0] 802556a: f103 4360 add.w r3, r3, #3758096384 ; 0xe0000000 802556e: 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; 8025572: 0112 lsls r2, r2, #4 NVIC->IP[NVIC_InitStruct->NVIC_IRQChannel] = tmppriority; 8025574: f883 2300 strb.w r2, [r3, #768] ; 0x300 /* Enable the Selected IRQ Channels --------------------------------------*/ NVIC->ISER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = 8025578: 7803 ldrb r3, [r0, #0] (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 802557a: 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] = 802557c: 0959 lsrs r1, r3, #5 (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 802557e: f003 031f and.w r3, r3, #31 8025582: fa02 f303 lsl.w r3, r2, r3 8025586: e007 b.n 8025598 } else { /* Disable the Selected IRQ Channels -------------------------------------*/ NVIC->ICER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = 8025588: 7803 ldrb r3, [r0, #0] (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 802558a: 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] = 802558c: 0959 lsrs r1, r3, #5 (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 802558e: f003 031f and.w r3, r3, #31 8025592: 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] = 8025596: 3120 adds r1, #32 8025598: 4a02 ldr r2, [pc, #8] ; (80255a4 ) 802559a: f842 3021 str.w r3, [r2, r1, lsl #2] 802559e: 4770 bx lr 80255a0: e000ed00 .word 0xe000ed00 80255a4: e000e100 .word 0xe000e100 080255a8 : { /* Check the parameters */ assert_param(IS_NVIC_VECTTAB(NVIC_VectTab)); assert_param(IS_NVIC_OFFSET(Offset)); SCB->VTOR = NVIC_VectTab | (Offset & (uint32_t)0x1FFFFF80); 80255a8: f021 4160 bic.w r1, r1, #3758096384 ; 0xe0000000 80255ac: f021 017f bic.w r1, r1, #127 ; 0x7f 80255b0: 4b01 ldr r3, [pc, #4] ; (80255b8 ) 80255b2: 4308 orrs r0, r1 80255b4: 6098 str r0, [r3, #8] 80255b6: 4770 bx lr 80255b8: e000ed00 .word 0xe000ed00 080255bc : * @retval None */ void CRC_ResetDR(void) { /* Reset CRC generator */ CRC->CR = CRC_CR_RESET; 80255bc: 4b01 ldr r3, [pc, #4] ; (80255c4 ) 80255be: 2201 movs r2, #1 80255c0: 609a str r2, [r3, #8] 80255c2: 4770 bx lr 80255c4: 40023000 .word 0x40023000 080255c8 : * @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) { 80255c8: b510 push {r4, lr} uint32_t index = 0; for(index = 0; index < BufferLength; index++) 80255ca: 2300 movs r3, #0 80255cc: 4c05 ldr r4, [pc, #20] ; (80255e4 ) 80255ce: e003 b.n 80255d8 { CRC->DR = pBuffer[index]; 80255d0: 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++) 80255d4: 3301 adds r3, #1 { CRC->DR = pBuffer[index]; 80255d6: 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++) 80255d8: 428b cmp r3, r1 80255da: d1f9 bne.n 80255d0 { CRC->DR = pBuffer[index]; } return (CRC->DR); 80255dc: 4b01 ldr r3, [pc, #4] ; (80255e4 ) 80255de: 6818 ldr r0, [r3, #0] } 80255e0: bd10 pop {r4, pc} 80255e2: bf00 nop 80255e4: 40023000 .word 0x40023000 080255e8 : * @param None * @retval None */ void FLASH_Unlock(void) { if((FLASH->CR & FLASH_CR_LOCK) != RESET) 80255e8: 4b04 ldr r3, [pc, #16] ; (80255fc ) 80255ea: 691a ldr r2, [r3, #16] 80255ec: 2a00 cmp r2, #0 80255ee: da04 bge.n 80255fa { /* Authorize the FLASH Registers access */ FLASH->KEYR = FLASH_KEY1; 80255f0: 4a03 ldr r2, [pc, #12] ; (8025600 ) 80255f2: 605a str r2, [r3, #4] FLASH->KEYR = FLASH_KEY2; 80255f4: f102 3288 add.w r2, r2, #2290649224 ; 0x88888888 80255f8: 605a str r2, [r3, #4] 80255fa: 4770 bx lr 80255fc: 40023c00 .word 0x40023c00 8025600: 45670123 .word 0x45670123 08025604 : * @retval None */ void FLASH_Lock(void) { /* Set the LOCK Bit to lock the FLASH Registers access */ FLASH->CR |= FLASH_CR_LOCK; 8025604: 4b02 ldr r3, [pc, #8] ; (8025610 ) 8025606: 691a ldr r2, [r3, #16] 8025608: f042 4200 orr.w r2, r2, #2147483648 ; 0x80000000 802560c: 611a str r2, [r3, #16] 802560e: 4770 bx lr 8025610: 40023c00 .word 0x40023c00 08025614 : { /* Check the parameters */ assert_param(IS_FLASH_CLEAR_FLAG(FLASH_FLAG)); /* Clear the flags */ FLASH->SR = FLASH_FLAG; 8025614: 4b01 ldr r3, [pc, #4] ; (802561c ) 8025616: 60d8 str r0, [r3, #12] 8025618: 4770 bx lr 802561a: bf00 nop 802561c: 40023c00 .word 0x40023c00 08025620 : */ FLASH_Status FLASH_GetStatus(void) { FLASH_Status flashstatus = FLASH_COMPLETE; if((FLASH->SR & FLASH_FLAG_BSY) == FLASH_FLAG_BSY) 8025620: 4b0b ldr r3, [pc, #44] ; (8025650 ) 8025622: 68da ldr r2, [r3, #12] 8025624: 03d0 lsls r0, r2, #15 8025626: d40d bmi.n 8025644 { flashstatus = FLASH_BUSY; } else { if((FLASH->SR & FLASH_FLAG_WRPERR) != (uint32_t)0x00) 8025628: 68da ldr r2, [r3, #12] 802562a: 06d1 lsls r1, r2, #27 802562c: d40c bmi.n 8025648 { flashstatus = FLASH_ERROR_WRP; } else { if((FLASH->SR & (uint32_t)0xEF) != (uint32_t)0x00) 802562e: 68da ldr r2, [r3, #12] 8025630: f012 0fef tst.w r2, #239 ; 0xef 8025634: d10a bne.n 802564c { flashstatus = FLASH_ERROR_PROGRAM; } else { if((FLASH->SR & FLASH_FLAG_OPERR) != (uint32_t)0x00) 8025636: 68db ldr r3, [r3, #12] 8025638: f013 0f02 tst.w r3, #2 { flashstatus = FLASH_ERROR_OPERATION; 802563c: bf0c ite eq 802563e: 2008 moveq r0, #8 8025640: 2007 movne r0, #7 8025642: 4770 bx lr { FLASH_Status flashstatus = FLASH_COMPLETE; if((FLASH->SR & FLASH_FLAG_BSY) == FLASH_FLAG_BSY) { flashstatus = FLASH_BUSY; 8025644: 2001 movs r0, #1 8025646: 4770 bx lr } else { if((FLASH->SR & FLASH_FLAG_WRPERR) != (uint32_t)0x00) { flashstatus = FLASH_ERROR_WRP; 8025648: 2005 movs r0, #5 802564a: 4770 bx lr } else { if((FLASH->SR & (uint32_t)0xEF) != (uint32_t)0x00) { flashstatus = FLASH_ERROR_PROGRAM; 802564c: 2006 movs r0, #6 } } } /* Return the FLASH Status */ return flashstatus; } 802564e: 4770 bx lr 8025650: 40023c00 .word 0x40023c00 08025654 : * @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) { 8025654: b507 push {r0, r1, r2, lr} __IO FLASH_Status status = FLASH_COMPLETE; 8025656: 2308 movs r3, #8 8025658: 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(); 802565c: f7ff ffe0 bl 8025620 8025660: 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) 8025664: f89d 3007 ldrb.w r3, [sp, #7] 8025668: 2b01 cmp r3, #1 802566a: d0f7 beq.n 802565c { status = FLASH_GetStatus(); } /* Return the operation status */ return status; 802566c: f89d 0007 ldrb.w r0, [sp, #7] } 8025670: bd0e pop {r1, r2, r3, pc} 8025672: 0000 movs r0, r0 08025674 : * @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) { 8025674: b570 push {r4, r5, r6, lr} 8025676: 4605 mov r5, r0 8025678: 460e mov r6, r1 /* Check the parameters */ assert_param(IS_FLASH_ADDRESS(Address)); /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 802567a: f7ff ffeb bl 8025654 if(status == FLASH_COMPLETE) 802567e: 2808 cmp r0, #8 8025680: d111 bne.n 80256a6 { /* if the previous operation is completed, proceed to program the new data */ FLASH->CR &= CR_PSIZE_MASK; 8025682: 4c09 ldr r4, [pc, #36] ; (80256a8 ) 8025684: 6923 ldr r3, [r4, #16] 8025686: f423 7340 bic.w r3, r3, #768 ; 0x300 802568a: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_PSIZE_BYTE; 802568c: 6923 ldr r3, [r4, #16] 802568e: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_CR_PG; 8025690: 6923 ldr r3, [r4, #16] 8025692: f043 0301 orr.w r3, r3, #1 8025696: 6123 str r3, [r4, #16] *(__IO uint8_t*)Address = Data; 8025698: 702e strb r6, [r5, #0] /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 802569a: f7ff ffdb bl 8025654 /* if the program operation is completed, disable the PG Bit */ FLASH->CR &= (~FLASH_CR_PG); 802569e: 6923 ldr r3, [r4, #16] 80256a0: f023 0301 bic.w r3, r3, #1 80256a4: 6123 str r3, [r4, #16] } /* Return the Program Status */ return status; } 80256a6: bd70 pop {r4, r5, r6, pc} 80256a8: 40023c00 .word 0x40023c00 080256ac : * @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) { 80256ac: b570 push {r4, r5, r6, lr} 80256ae: 4605 mov r5, r0 80256b0: 460e mov r6, r1 /* Check the parameters */ assert_param(IS_FLASH_ADDRESS(Address)); /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 80256b2: f7ff ffcf bl 8025654 if(status == FLASH_COMPLETE) 80256b6: 2808 cmp r0, #8 80256b8: d113 bne.n 80256e2 { /* if the previous operation is completed, proceed to program the new data */ FLASH->CR &= CR_PSIZE_MASK; 80256ba: 4c0a ldr r4, [pc, #40] ; (80256e4 ) 80256bc: 6923 ldr r3, [r4, #16] 80256be: f423 7340 bic.w r3, r3, #768 ; 0x300 80256c2: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_PSIZE_WORD; 80256c4: 6923 ldr r3, [r4, #16] 80256c6: f443 7300 orr.w r3, r3, #512 ; 0x200 80256ca: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_CR_PG; 80256cc: 6923 ldr r3, [r4, #16] 80256ce: f043 0301 orr.w r3, r3, #1 80256d2: 6123 str r3, [r4, #16] *(__IO uint32_t*)Address = Data; 80256d4: 602e str r6, [r5, #0] /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 80256d6: f7ff ffbd bl 8025654 /* if the program operation is completed, disable the PG Bit */ FLASH->CR &= (~FLASH_CR_PG); 80256da: 6923 ldr r3, [r4, #16] 80256dc: f023 0301 bic.w r3, r3, #1 80256e0: 6123 str r3, [r4, #16] } /* Return the Program Status */ return status; } 80256e2: bd70 pop {r4, r5, r6, pc} 80256e4: 40023c00 .word 0x40023c00 080256e8 : * * @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) { 80256e8: b570 push {r4, r5, r6, lr} 80256ea: 4606 mov r6, r0 /* Check the parameters */ assert_param(IS_FLASH_SECTOR(FLASH_Sector)); assert_param(IS_VOLTAGERANGE(VoltageRange)); if(VoltageRange == VoltageRange_1) 80256ec: b141 cbz r1, 8025700 { tmp_psize = FLASH_PSIZE_BYTE; } else if(VoltageRange == VoltageRange_2) 80256ee: 2901 cmp r1, #1 80256f0: d008 beq.n 8025704 { tmp_psize = FLASH_PSIZE_HALF_WORD; } else if(VoltageRange == VoltageRange_3) { tmp_psize = FLASH_PSIZE_WORD; 80256f2: 2902 cmp r1, #2 80256f4: bf14 ite ne 80256f6: f44f 7540 movne.w r5, #768 ; 0x300 80256fa: f44f 7500 moveq.w r5, #512 ; 0x200 80256fe: e003 b.n 8025708 assert_param(IS_FLASH_SECTOR(FLASH_Sector)); assert_param(IS_VOLTAGERANGE(VoltageRange)); if(VoltageRange == VoltageRange_1) { tmp_psize = FLASH_PSIZE_BYTE; 8025700: 460d mov r5, r1 8025702: e001 b.n 8025708 } else if(VoltageRange == VoltageRange_2) { tmp_psize = FLASH_PSIZE_HALF_WORD; 8025704: f44f 7580 mov.w r5, #256 ; 0x100 else { tmp_psize = FLASH_PSIZE_DOUBLE_WORD; } /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 8025708: f7ff ffa4 bl 8025654 if(status == FLASH_COMPLETE) 802570c: 2808 cmp r0, #8 802570e: d11e bne.n 802574e { /* if the previous operation is completed, proceed to erase the sector */ FLASH->CR &= CR_PSIZE_MASK; 8025710: 4c0f ldr r4, [pc, #60] ; (8025750 ) 8025712: 6923 ldr r3, [r4, #16] 8025714: f423 7340 bic.w r3, r3, #768 ; 0x300 8025718: 6123 str r3, [r4, #16] FLASH->CR |= tmp_psize; 802571a: 6921 ldr r1, [r4, #16] 802571c: 430d orrs r5, r1 802571e: 6125 str r5, [r4, #16] FLASH->CR &= SECTOR_MASK; 8025720: 6923 ldr r3, [r4, #16] 8025722: f023 03f8 bic.w r3, r3, #248 ; 0xf8 8025726: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_CR_SER | FLASH_Sector; 8025728: 6923 ldr r3, [r4, #16] 802572a: f043 0302 orr.w r3, r3, #2 802572e: 431e orrs r6, r3 8025730: 6126 str r6, [r4, #16] FLASH->CR |= FLASH_CR_STRT; 8025732: 6923 ldr r3, [r4, #16] 8025734: f443 3380 orr.w r3, r3, #65536 ; 0x10000 8025738: 6123 str r3, [r4, #16] /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 802573a: f7ff ff8b bl 8025654 /* if the erase operation is completed, disable the SER Bit */ FLASH->CR &= (~FLASH_CR_SER); 802573e: 6923 ldr r3, [r4, #16] 8025740: f023 0302 bic.w r3, r3, #2 8025744: 6123 str r3, [r4, #16] FLASH->CR &= SECTOR_MASK; 8025746: 6923 ldr r3, [r4, #16] 8025748: f023 03f8 bic.w r3, r3, #248 ; 0xf8 802574c: 6123 str r3, [r4, #16] } /* Return the Erase Status */ return status; } 802574e: bd70 pop {r4, r5, r6, pc} 8025750: 40023c00 .word 0x40023c00 08025754 : * @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) { 8025754: b508 push {r3, lr} /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); if (GPIOx == GPIOA) 8025756: 4b2c ldr r3, [pc, #176] ; (8025808 ) 8025758: 4298 cmp r0, r3 802575a: d105 bne.n 8025768 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOA, ENABLE); 802575c: 2001 movs r0, #1 802575e: 4601 mov r1, r0 8025760: f000 f974 bl 8025a4c RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOA, DISABLE); 8025764: 2001 movs r0, #1 8025766: e048 b.n 80257fa } else if (GPIOx == GPIOB) 8025768: 4b28 ldr r3, [pc, #160] ; (802580c ) 802576a: 4298 cmp r0, r3 802576c: d105 bne.n 802577a { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOB, ENABLE); 802576e: 2002 movs r0, #2 8025770: 2101 movs r1, #1 8025772: f000 f96b bl 8025a4c RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOB, DISABLE); 8025776: 2002 movs r0, #2 8025778: e03f b.n 80257fa } else if (GPIOx == GPIOC) 802577a: 4b25 ldr r3, [pc, #148] ; (8025810 ) 802577c: 4298 cmp r0, r3 802577e: d105 bne.n 802578c { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOC, ENABLE); 8025780: 2004 movs r0, #4 8025782: 2101 movs r1, #1 8025784: f000 f962 bl 8025a4c RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOC, DISABLE); 8025788: 2004 movs r0, #4 802578a: e036 b.n 80257fa } else if (GPIOx == GPIOD) 802578c: 4b21 ldr r3, [pc, #132] ; (8025814 ) 802578e: 4298 cmp r0, r3 8025790: d105 bne.n 802579e { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOD, ENABLE); 8025792: 2008 movs r0, #8 8025794: 2101 movs r1, #1 8025796: f000 f959 bl 8025a4c RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOD, DISABLE); 802579a: 2008 movs r0, #8 802579c: e02d b.n 80257fa } else if (GPIOx == GPIOE) 802579e: 4b1e ldr r3, [pc, #120] ; (8025818 ) 80257a0: 4298 cmp r0, r3 80257a2: d105 bne.n 80257b0 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOE, ENABLE); 80257a4: 2010 movs r0, #16 80257a6: 2101 movs r1, #1 80257a8: f000 f950 bl 8025a4c RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOE, DISABLE); 80257ac: 2010 movs r0, #16 80257ae: e024 b.n 80257fa } else if (GPIOx == GPIOF) 80257b0: 4b1a ldr r3, [pc, #104] ; (802581c ) 80257b2: 4298 cmp r0, r3 80257b4: d105 bne.n 80257c2 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOF, ENABLE); 80257b6: 2020 movs r0, #32 80257b8: 2101 movs r1, #1 80257ba: f000 f947 bl 8025a4c RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOF, DISABLE); 80257be: 2020 movs r0, #32 80257c0: e01b b.n 80257fa } else if (GPIOx == GPIOG) 80257c2: 4b17 ldr r3, [pc, #92] ; (8025820 ) 80257c4: 4298 cmp r0, r3 80257c6: d105 bne.n 80257d4 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOG, ENABLE); 80257c8: 2040 movs r0, #64 ; 0x40 80257ca: 2101 movs r1, #1 80257cc: f000 f93e bl 8025a4c RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOG, DISABLE); 80257d0: 2040 movs r0, #64 ; 0x40 80257d2: e012 b.n 80257fa } else if (GPIOx == GPIOH) 80257d4: 4b13 ldr r3, [pc, #76] ; (8025824 ) 80257d6: 4298 cmp r0, r3 80257d8: d105 bne.n 80257e6 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOH, ENABLE); 80257da: 2080 movs r0, #128 ; 0x80 80257dc: 2101 movs r1, #1 80257de: f000 f935 bl 8025a4c RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOH, DISABLE); 80257e2: 2080 movs r0, #128 ; 0x80 80257e4: e009 b.n 80257fa } else { if (GPIOx == GPIOI) 80257e6: 4b10 ldr r3, [pc, #64] ; (8025828 ) 80257e8: 4298 cmp r0, r3 80257ea: d10b bne.n 8025804 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, ENABLE); 80257ec: f44f 7080 mov.w r0, #256 ; 0x100 80257f0: 2101 movs r1, #1 80257f2: f000 f92b bl 8025a4c RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, DISABLE); 80257f6: f44f 7080 mov.w r0, #256 ; 0x100 80257fa: 2100 movs r1, #0 } } } 80257fc: e8bd 4008 ldmia.w sp!, {r3, lr} else { if (GPIOx == GPIOI) { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, ENABLE); RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, DISABLE); 8025800: f000 b924 b.w 8025a4c 8025804: bd08 pop {r3, pc} 8025806: bf00 nop 8025808: 40020000 .word 0x40020000 802580c: 40020400 .word 0x40020400 8025810: 40020800 .word 0x40020800 8025814: 40020c00 .word 0x40020c00 8025818: 40021000 .word 0x40021000 802581c: 40021400 .word 0x40021400 8025820: 40021800 .word 0x40021800 8025824: 40021c00 .word 0x40021c00 8025828: 40022000 .word 0x40022000 0802582c : * @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) { 802582c: 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; 8025830: 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++) 8025832: 2300 movs r3, #0 { pos = ((uint32_t)0x01) << pinpos; 8025834: 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)); 8025838: f04f 0803 mov.w r8, #3 /* -------------------------Configure the port pins---------------- */ /*-- GPIO Mode Configuration --*/ for (pinpos = 0x00; pinpos < 0x10; pinpos++) { pos = ((uint32_t)0x01) << pinpos; 802583c: fa0c f203 lsl.w r2, ip, r3 /* Get the port pins position */ currentpin = (GPIO_InitStruct->GPIO_Pin) & pos; 8025840: ea02 0507 and.w r5, r2, r7 if (currentpin == pos) 8025844: 4295 cmp r5, r2 8025846: d131 bne.n 80258ac * @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) 8025848: 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)); 802584a: 6806 ldr r6, [r0, #0] 802584c: fa08 f402 lsl.w r4, r8, r2 8025850: 43e4 mvns r4, r4 8025852: 4026 ands r6, r4 8025854: 6006 str r6, [r0, #0] GPIOx->MODER |= (((uint32_t)GPIO_InitStruct->GPIO_Mode) << (pinpos * 2)); 8025856: 790e ldrb r6, [r1, #4] 8025858: f8d0 9000 ldr.w r9, [r0] 802585c: fa06 fa02 lsl.w sl, r6, r2 if ((GPIO_InitStruct->GPIO_Mode == GPIO_Mode_OUT) || (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_AF)) 8025860: 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)); 8025862: ea4a 0909 orr.w r9, sl, r9 if ((GPIO_InitStruct->GPIO_Mode == GPIO_Mode_OUT) || (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_AF)) 8025866: 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)); 8025868: f8c0 9000 str.w r9, [r0] if ((GPIO_InitStruct->GPIO_Mode == GPIO_Mode_OUT) || (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_AF)) 802586c: d815 bhi.n 802589a { /* Check Speed mode parameters */ assert_param(IS_GPIO_SPEED(GPIO_InitStruct->GPIO_Speed)); /* Speed mode configuration */ GPIOx->OSPEEDR &= ~(GPIO_OSPEEDER_OSPEEDR0 << (pinpos * 2)); 802586e: 6886 ldr r6, [r0, #8] GPIOx->OSPEEDR |= ((uint32_t)(GPIO_InitStruct->GPIO_Speed) << (pinpos * 2)); 8025870: 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)); 8025874: 4026 ands r6, r4 8025876: 6086 str r6, [r0, #8] GPIOx->OSPEEDR |= ((uint32_t)(GPIO_InitStruct->GPIO_Speed) << (pinpos * 2)); 8025878: 6886 ldr r6, [r0, #8] 802587a: fa09 f902 lsl.w r9, r9, r2 802587e: ea49 0606 orr.w r6, r9, r6 8025882: 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)) ; 8025884: 6846 ldr r6, [r0, #4] 8025886: ea26 0505 bic.w r5, r6, r5 802588a: 6045 str r5, [r0, #4] GPIOx->OTYPER |= (uint16_t)(((uint16_t)GPIO_InitStruct->GPIO_OType) << ((uint16_t)pinpos)); 802588c: 798d ldrb r5, [r1, #6] 802588e: 6846 ldr r6, [r0, #4] 8025890: 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; } 8025894: 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)); 8025896: 4335 orrs r5, r6 8025898: 6045 str r5, [r0, #4] } /* Pull-up Pull down resistor configuration*/ GPIOx->PUPDR &= ~(GPIO_PUPDR_PUPDR0 << ((uint16_t)pinpos * 2)); 802589a: 68c5 ldr r5, [r0, #12] 802589c: 402c ands r4, r5 802589e: 60c4 str r4, [r0, #12] GPIOx->PUPDR |= (((uint32_t)GPIO_InitStruct->GPIO_PuPd) << (pinpos * 2)); 80258a0: 79cd ldrb r5, [r1, #7] 80258a2: 68c4 ldr r4, [r0, #12] 80258a4: fa05 f202 lsl.w r2, r5, r2 80258a8: 4322 orrs r2, r4 80258aa: 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++) 80258ac: 3301 adds r3, #1 80258ae: 2b10 cmp r3, #16 80258b0: d1c4 bne.n 802583c /* 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)); } } } 80258b2: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 080258b6 : { /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); assert_param(IS_GPIO_PIN(GPIO_Pin)); GPIOx->BSRRL = GPIO_Pin; 80258b6: 8301 strh r1, [r0, #24] 80258b8: 4770 bx lr 080258ba : { /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); assert_param(IS_GPIO_PIN(GPIO_Pin)); GPIOx->BSRRH = GPIO_Pin; 80258ba: 8341 strh r1, [r0, #26] 80258bc: 4770 bx lr 080258be : /* 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)) ; 80258be: 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)) ; 80258c2: 08c9 lsrs r1, r1, #3 80258c4: 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) { 80258c6: 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)) ; 80258c8: 009b lsls r3, r3, #2 GPIOx->AFR[GPIO_PinSource >> 0x03] &= ~((uint32_t)0xF << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; 80258ca: f850 5021 ldr.w r5, [r0, r1, lsl #2] 80258ce: 240f movs r4, #15 80258d0: fa04 f403 lsl.w r4, r4, r3 80258d4: ea25 0404 bic.w r4, r5, r4 80258d8: f840 4021 str.w r4, [r0, r1, lsl #2] temp_2 = GPIOx->AFR[GPIO_PinSource >> 0x03] | temp; 80258dc: 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)) ; 80258e0: 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; 80258e4: 4314 orrs r4, r2 GPIOx->AFR[GPIO_PinSource >> 0x03] = temp_2; 80258e6: f840 4021 str.w r4, [r0, r1, lsl #2] 80258ea: bd30 pop {r4, r5, pc} 080258ec : void PWR_BackupAccessCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); *(__IO uint32_t *) CR_DBP_BB = (uint32_t)NewState; 80258ec: 4b01 ldr r3, [pc, #4] ; (80258f4 ) 80258ee: 6018 str r0, [r3, #0] 80258f0: 4770 bx lr 80258f2: bf00 nop 80258f4: 420e0020 .word 0x420e0020 080258f8 : /* 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; 80258f8: 4b06 ldr r3, [pc, #24] ; (8025914 ) 80258fa: 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) 80258fc: 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; 80258fe: 701a strb r2, [r3, #0] /* Reset LSEBYP bit */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_OFF; 8025900: 701a strb r2, [r3, #0] /* Configure LSE (RCC_LSE_OFF is already covered by the code section above) */ switch (RCC_LSE) 8025902: d002 beq.n 802590a 8025904: 2804 cmp r0, #4 8025906: d104 bne.n 8025912 8025908: e001 b.n 802590e { case RCC_LSE_ON: /* Set LSEON bit */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_ON; 802590a: 7018 strb r0, [r3, #0] break; 802590c: 4770 bx lr case RCC_LSE_Bypass: /* Set LSEBYP and LSEON bits */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_Bypass | RCC_LSE_ON; 802590e: 2205 movs r2, #5 8025910: 701a strb r2, [r3, #0] 8025912: 4770 bx lr 8025914: 40023870 .word 0x40023870 08025918 : void RCC_LSICmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); *(__IO uint32_t *) CSR_LSION_BB = (uint32_t)NewState; 8025918: 4b01 ldr r3, [pc, #4] ; (8025920 ) 802591a: 6018 str r0, [r3, #0] 802591c: 4770 bx lr 802591e: bf00 nop 8025920: 42470e80 .word 0x42470e80 08025924 : 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; 8025924: 4b1e ldr r3, [pc, #120] ; (80259a0 ) 8025926: 689a ldr r2, [r3, #8] 8025928: f002 020c and.w r2, r2, #12 switch (tmp) 802592c: 2a04 cmp r2, #4 * configuration based on this function will be incorrect. * * @retval None */ void RCC_GetClocksFreq(RCC_ClocksTypeDef* RCC_Clocks) { 802592e: 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) 8025930: d003 beq.n 802593a 8025932: 2a08 cmp r2, #8 8025934: d003 beq.n 802593e 8025936: 4b1b ldr r3, [pc, #108] ; (80259a4 ) 8025938: e018 b.n 802596c { 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; 802593a: 4b1b ldr r3, [pc, #108] ; (80259a8 ) 802593c: e016 b.n 802596c 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; 802593e: 6859 ldr r1, [r3, #4] pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; 8025940: 685a ldr r2, [r3, #4] if (pllsource != 0) 8025942: f411 0f80 tst.w r1, #4194304 ; 0x400000 { /* HSE used as PLL clock source */ pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); 8025946: 6859 ldr r1, [r3, #4] 8025948: bf14 ite ne 802594a: 4b17 ldrne r3, [pc, #92] ; (80259a8 ) } else { /* HSI used as PLL clock source */ pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); 802594c: 4b15 ldreq r3, [pc, #84] ; (80259a4 ) /* 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; 802594e: 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); 8025952: fbb3 f3f2 udiv r3, r3, r2 } pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; 8025956: 4a12 ldr r2, [pc, #72] ; (80259a0 ) 8025958: 6852 ldr r2, [r2, #4] 802595a: 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); 802595e: 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; 8025962: 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); 8025964: 434b muls r3, r1 } pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; 8025966: 0052 lsls r2, r2, #1 RCC_Clocks->SYSCLK_Frequency = pllvco/pllp; 8025968: fbb3 f3f2 udiv r3, r3, r2 break; } /* Compute HCLK, PCLK1 and PCLK2 clocks frequencies ------------------------*/ /* Get HCLK prescaler */ tmp = RCC->CFGR & RCC_CFGR_HPRE; 802596c: 490c ldr r1, [pc, #48] ; (80259a0 ) /* 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; 802596e: 6003 str r3, [r0, #0] break; } /* Compute HCLK, PCLK1 and PCLK2 clocks frequencies ------------------------*/ /* Get HCLK prescaler */ tmp = RCC->CFGR & RCC_CFGR_HPRE; 8025970: 688b ldr r3, [r1, #8] tmp = tmp >> 4; presc = APBAHBPrescTable[tmp]; 8025972: 4a0e ldr r2, [pc, #56] ; (80259ac ) } /* Compute HCLK, PCLK1 and PCLK2 clocks frequencies ------------------------*/ /* Get HCLK prescaler */ tmp = RCC->CFGR & RCC_CFGR_HPRE; tmp = tmp >> 4; 8025974: f3c3 1303 ubfx r3, r3, #4, #4 presc = APBAHBPrescTable[tmp]; 8025978: 5cd4 ldrb r4, [r2, r3] /* HCLK clock frequency */ RCC_Clocks->HCLK_Frequency = RCC_Clocks->SYSCLK_Frequency >> presc; 802597a: 6803 ldr r3, [r0, #0] 802597c: fa23 f304 lsr.w r3, r3, r4 8025980: 6043 str r3, [r0, #4] /* Get PCLK1 prescaler */ tmp = RCC->CFGR & RCC_CFGR_PPRE1; 8025982: 688c ldr r4, [r1, #8] tmp = tmp >> 10; 8025984: f3c4 2482 ubfx r4, r4, #10, #3 presc = APBAHBPrescTable[tmp]; 8025988: 5d14 ldrb r4, [r2, r4] /* PCLK1 clock frequency */ RCC_Clocks->PCLK1_Frequency = RCC_Clocks->HCLK_Frequency >> presc; 802598a: fa23 f404 lsr.w r4, r3, r4 802598e: 6084 str r4, [r0, #8] /* Get PCLK2 prescaler */ tmp = RCC->CFGR & RCC_CFGR_PPRE2; 8025990: 6889 ldr r1, [r1, #8] tmp = tmp >> 13; 8025992: f3c1 3142 ubfx r1, r1, #13, #3 presc = APBAHBPrescTable[tmp]; 8025996: 5c52 ldrb r2, [r2, r1] /* PCLK2 clock frequency */ RCC_Clocks->PCLK2_Frequency = RCC_Clocks->HCLK_Frequency >> presc; 8025998: fa23 f302 lsr.w r3, r3, r2 802599c: 60c3 str r3, [r0, #12] 802599e: bd10 pop {r4, pc} 80259a0: 40023800 .word 0x40023800 80259a4: 00f42400 .word 0x00f42400 80259a8: 017d7840 .word 0x017d7840 80259ac: 200005ac .word 0x200005ac 080259b0 : uint32_t tmpreg = 0; /* Check the parameters */ assert_param(IS_RCC_RTCCLK_SOURCE(RCC_RTCCLKSource)); if ((RCC_RTCCLKSource & 0x00000300) == 0x00000300) 80259b0: f400 7340 and.w r3, r0, #768 ; 0x300 80259b4: f5b3 7f40 cmp.w r3, #768 ; 0x300 80259b8: 4b08 ldr r3, [pc, #32] ; (80259dc ) 80259ba: d108 bne.n 80259ce { /* If HSE is selected as RTC clock source, configure HSE division factor for RTC clock */ tmpreg = RCC->CFGR; 80259bc: 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); 80259be: 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; 80259c2: f421 11f8 bic.w r1, r1, #2031616 ; 0x1f0000 /* Configure HSE division factor for RTC clock */ tmpreg |= (RCC_RTCCLKSource & 0xFFFFCFF); 80259c6: f422 7240 bic.w r2, r2, #768 ; 0x300 80259ca: 430a orrs r2, r1 /* Store the new value */ RCC->CFGR = tmpreg; 80259cc: 609a str r2, [r3, #8] } /* Select the RTC clock source */ RCC->BDCR |= (RCC_RTCCLKSource & 0x00000FFF); 80259ce: 6f1a ldr r2, [r3, #112] ; 0x70 80259d0: 0500 lsls r0, r0, #20 80259d2: ea42 5010 orr.w r0, r2, r0, lsr #20 80259d6: 6718 str r0, [r3, #112] ; 0x70 80259d8: 4770 bx lr 80259da: bf00 nop 80259dc: 40023800 .word 0x40023800 080259e0 : void RCC_RTCCLKCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); *(__IO uint32_t *) BDCR_RTCEN_BB = (uint32_t)NewState; 80259e0: 4b01 ldr r3, [pc, #4] ; (80259e8 ) 80259e2: 6018 str r0, [r3, #0] 80259e4: 4770 bx lr 80259e6: bf00 nop 80259e8: 42470e3c .word 0x42470e3c 080259ec : * @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) { 80259ec: 4b04 ldr r3, [pc, #16] ; (8025a00 ) assert_param(IS_RCC_AHB1_CLOCK_PERIPH(RCC_AHB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->AHB1ENR |= RCC_AHB1Periph; 80259ee: 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) 80259f0: b109 cbz r1, 80259f6 { RCC->AHB1ENR |= RCC_AHB1Periph; 80259f2: 4310 orrs r0, r2 80259f4: e001 b.n 80259fa } else { RCC->AHB1ENR &= ~RCC_AHB1Periph; 80259f6: ea22 0000 bic.w r0, r2, r0 80259fa: 6318 str r0, [r3, #48] ; 0x30 80259fc: 4770 bx lr 80259fe: bf00 nop 8025a00: 40023800 .word 0x40023800 08025a04 : * @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) { 8025a04: 4b04 ldr r3, [pc, #16] ; (8025a18 ) assert_param(IS_RCC_AHB2_PERIPH(RCC_AHB2Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->AHB2ENR |= RCC_AHB2Periph; 8025a06: 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) 8025a08: b109 cbz r1, 8025a0e { RCC->AHB2ENR |= RCC_AHB2Periph; 8025a0a: 4310 orrs r0, r2 8025a0c: e001 b.n 8025a12 } else { RCC->AHB2ENR &= ~RCC_AHB2Periph; 8025a0e: ea22 0000 bic.w r0, r2, r0 8025a12: 6358 str r0, [r3, #52] ; 0x34 8025a14: 4770 bx lr 8025a16: bf00 nop 8025a18: 40023800 .word 0x40023800 08025a1c : * @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) { 8025a1c: 4b04 ldr r3, [pc, #16] ; (8025a30 ) assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->APB1ENR |= RCC_APB1Periph; 8025a1e: 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) 8025a20: b109 cbz r1, 8025a26 { RCC->APB1ENR |= RCC_APB1Periph; 8025a22: 4310 orrs r0, r2 8025a24: e001 b.n 8025a2a } else { RCC->APB1ENR &= ~RCC_APB1Periph; 8025a26: ea22 0000 bic.w r0, r2, r0 8025a2a: 6418 str r0, [r3, #64] ; 0x40 8025a2c: 4770 bx lr 8025a2e: bf00 nop 8025a30: 40023800 .word 0x40023800 08025a34 : * @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) { 8025a34: 4b04 ldr r3, [pc, #16] ; (8025a48 ) assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->APB2ENR |= RCC_APB2Periph; 8025a36: 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) 8025a38: b109 cbz r1, 8025a3e { RCC->APB2ENR |= RCC_APB2Periph; 8025a3a: 4310 orrs r0, r2 8025a3c: e001 b.n 8025a42 } else { RCC->APB2ENR &= ~RCC_APB2Periph; 8025a3e: ea22 0000 bic.w r0, r2, r0 8025a42: 6458 str r0, [r3, #68] ; 0x44 8025a44: 4770 bx lr 8025a46: bf00 nop 8025a48: 40023800 .word 0x40023800 08025a4c : * @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) { 8025a4c: 4b04 ldr r3, [pc, #16] ; (8025a60 ) assert_param(IS_RCC_AHB1_RESET_PERIPH(RCC_AHB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->AHB1RSTR |= RCC_AHB1Periph; 8025a4e: 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) 8025a50: b109 cbz r1, 8025a56 { RCC->AHB1RSTR |= RCC_AHB1Periph; 8025a52: 4310 orrs r0, r2 8025a54: e001 b.n 8025a5a } else { RCC->AHB1RSTR &= ~RCC_AHB1Periph; 8025a56: ea22 0000 bic.w r0, r2, r0 8025a5a: 6118 str r0, [r3, #16] 8025a5c: 4770 bx lr 8025a5e: bf00 nop 8025a60: 40023800 .word 0x40023800 08025a64 : * @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) { 8025a64: 4b04 ldr r3, [pc, #16] ; (8025a78 ) /* Check the parameters */ assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->APB1RSTR |= RCC_APB1Periph; 8025a66: 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) 8025a68: b109 cbz r1, 8025a6e { RCC->APB1RSTR |= RCC_APB1Periph; 8025a6a: 4310 orrs r0, r2 8025a6c: e001 b.n 8025a72 } else { RCC->APB1RSTR &= ~RCC_APB1Periph; 8025a6e: ea22 0000 bic.w r0, r2, r0 8025a72: 6218 str r0, [r3, #32] 8025a74: 4770 bx lr 8025a76: bf00 nop 8025a78: 40023800 .word 0x40023800 08025a7c : * @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) { 8025a7c: 4b04 ldr r3, [pc, #16] ; (8025a90 ) /* 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; 8025a7e: 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) 8025a80: b109 cbz r1, 8025a86 { RCC->APB2RSTR |= RCC_APB2Periph; 8025a82: 4310 orrs r0, r2 8025a84: e001 b.n 8025a8a } else { RCC->APB2RSTR &= ~RCC_APB2Periph; 8025a86: ea22 0000 bic.w r0, r2, r0 8025a8a: 6258 str r0, [r3, #36] ; 0x24 8025a8c: 4770 bx lr 8025a8e: bf00 nop 8025a90: 40023800 .word 0x40023800 08025a94 : /* Check the parameters */ assert_param(IS_RCC_FLAG(RCC_FLAG)); /* Get the RCC register index */ tmp = RCC_FLAG >> 5; 8025a94: 0943 lsrs r3, r0, #5 if (tmp == 1) /* The flag to check is in CR register */ 8025a96: 2b01 cmp r3, #1 8025a98: 4a07 ldr r2, [pc, #28] ; (8025ab8 ) 8025a9a: d101 bne.n 8025aa0 { statusreg = RCC->CR; 8025a9c: 6813 ldr r3, [r2, #0] 8025a9e: e003 b.n 8025aa8 } else if (tmp == 2) /* The flag to check is in BDCR register */ 8025aa0: 2b02 cmp r3, #2 { statusreg = RCC->BDCR; 8025aa2: bf0c ite eq 8025aa4: 6f13 ldreq r3, [r2, #112] ; 0x70 } else /* The flag to check is in CSR register */ { statusreg = RCC->CSR; 8025aa6: 6f53 ldrne r3, [r2, #116] ; 0x74 } /* Get the flag position */ tmp = RCC_FLAG & FLAG_MASK; if ((statusreg & ((uint32_t)1 << tmp)) != (uint32_t)RESET) 8025aa8: f000 001f and.w r0, r0, #31 8025aac: fa23 f000 lsr.w r0, r3, r0 { bitstatus = RESET; } /* Return the flag status */ return bitstatus; } 8025ab0: f000 0001 and.w r0, r0, #1 8025ab4: 4770 bx lr 8025ab6: bf00 nop 8025ab8: 40023800 .word 0x40023800 08025abc : * @param NewState: new state of the RNG peripheral. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RNG_Cmd(FunctionalState NewState) { 8025abc: 4b04 ldr r3, [pc, #16] ; (8025ad0 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the RNG */ RNG->CR |= RNG_CR_RNGEN; 8025abe: 681a ldr r2, [r3, #0] void RNG_Cmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8025ac0: b110 cbz r0, 8025ac8 { /* Enable the RNG */ RNG->CR |= RNG_CR_RNGEN; 8025ac2: f042 0204 orr.w r2, r2, #4 8025ac6: e001 b.n 8025acc } else { /* Disable the RNG */ RNG->CR &= ~RNG_CR_RNGEN; 8025ac8: f022 0204 bic.w r2, r2, #4 8025acc: 601a str r2, [r3, #0] 8025ace: 4770 bx lr 8025ad0: 50060800 .word 0x50060800 08025ad4 : * @retval 32-bit random number. */ uint32_t RNG_GetRandomNumber(void) { /* Return the 32 bit random number from the DR register */ return RNG->DR; 8025ad4: 4b01 ldr r3, [pc, #4] ; (8025adc ) 8025ad6: 6898 ldr r0, [r3, #8] } 8025ad8: 4770 bx lr 8025ada: bf00 nop 8025adc: 50060800 .word 0x50060800 08025ae0 : * @param Value: Byte to be converted. * @retval Converted byte */ static uint8_t RTC_ByteToBcd2(uint8_t Value) { uint8_t bcdhigh = 0; 8025ae0: 2300 movs r3, #0 while (Value >= 10) 8025ae2: e003 b.n 8025aec { bcdhigh++; 8025ae4: 3301 adds r3, #1 Value -= 10; 8025ae6: 380a subs r0, #10 { uint8_t bcdhigh = 0; while (Value >= 10) { bcdhigh++; 8025ae8: b2db uxtb r3, r3 Value -= 10; 8025aea: b2c0 uxtb r0, r0 */ static uint8_t RTC_ByteToBcd2(uint8_t Value) { uint8_t bcdhigh = 0; while (Value >= 10) 8025aec: 2809 cmp r0, #9 8025aee: d8f9 bhi.n 8025ae4 { bcdhigh++; Value -= 10; } return ((uint8_t)(bcdhigh << 4) | Value); 8025af0: ea40 1003 orr.w r0, r0, r3, lsl #4 } 8025af4: b2c0 uxtb r0, r0 8025af6: 4770 bx lr 08025af8 : * @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; 8025af8: 0902 lsrs r2, r0, #4 return (tmp + (Value & (uint8_t)0x0F)); 8025afa: f000 030f and.w r3, r0, #15 8025afe: 200a movs r0, #10 8025b00: fb00 3002 mla r0, r0, r2, r3 } 8025b04: b2c0 uxtb r0, r0 8025b06: 4770 bx lr 08025b08 : * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC is in Init mode * - ERROR: RTC is not in Init mode */ ErrorStatus RTC_EnterInitMode(void) { 8025b08: b082 sub sp, #8 __IO uint32_t initcounter = 0x00; 8025b0a: 2300 movs r3, #0 8025b0c: 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) 8025b0e: 4b0d ldr r3, [pc, #52] ; (8025b44 ) 8025b10: 68da ldr r2, [r3, #12] 8025b12: 0650 lsls r0, r2, #25 8025b14: d413 bmi.n 8025b3e { /* Set the Initialization mode */ RTC->ISR = (uint32_t)RTC_INIT_MASK; 8025b16: f04f 32ff mov.w r2, #4294967295 8025b1a: 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; 8025b1c: 68da ldr r2, [r3, #12] initcounter++; 8025b1e: 9901 ldr r1, [sp, #4] 8025b20: 3101 adds r1, #1 8025b22: 9101 str r1, [sp, #4] } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); 8025b24: 9901 ldr r1, [sp, #4] 8025b26: 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; 8025b2a: f002 0240 and.w r2, r2, #64 ; 0x40 initcounter++; } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); 8025b2e: d001 beq.n 8025b34 8025b30: 2a00 cmp r2, #0 8025b32: d0f3 beq.n 8025b1c if ((RTC->ISR & RTC_ISR_INITF) != RESET) 8025b34: 4b03 ldr r3, [pc, #12] ; (8025b44 ) 8025b36: 68d8 ldr r0, [r3, #12] { status = SUCCESS; 8025b38: f3c0 1080 ubfx r0, r0, #6, #1 8025b3c: e000 b.n 8025b40 status = ERROR; } } else { status = SUCCESS; 8025b3e: 2001 movs r0, #1 } return (status); } 8025b40: b002 add sp, #8 8025b42: 4770 bx lr 8025b44: 40002800 .word 0x40002800 08025b48 : * @retval None */ void RTC_ExitInitMode(void) { /* Exit Initialization mode */ RTC->ISR &= (uint32_t)~RTC_ISR_INIT; 8025b48: 4b02 ldr r3, [pc, #8] ; (8025b54 ) 8025b4a: 68da ldr r2, [r3, #12] 8025b4c: f022 0280 bic.w r2, r2, #128 ; 0x80 8025b50: 60da str r2, [r3, #12] 8025b52: 4770 bx lr 8025b54: 40002800 .word 0x40002800 08025b58 : * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC registers are initialized * - ERROR: RTC registers are not initialized */ ErrorStatus RTC_Init(RTC_InitTypeDef* RTC_InitStruct) { 8025b58: 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; 8025b5a: 4c0f ldr r4, [pc, #60] ; (8025b98 ) 8025b5c: 23ca movs r3, #202 ; 0xca 8025b5e: 6263 str r3, [r4, #36] ; 0x24 RTC->WPR = 0x53; 8025b60: 2353 movs r3, #83 ; 0x53 8025b62: 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) { 8025b64: 4605 mov r5, r0 /* Disable the write protection for RTC registers */ RTC->WPR = 0xCA; RTC->WPR = 0x53; /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) 8025b66: f7ff ffcf bl 8025b08 8025b6a: b188 cbz r0, 8025b90 status = ERROR; } else { /* Clear RTC CR FMT Bit */ RTC->CR &= ((uint32_t)~(RTC_CR_FMT)); 8025b6c: 68a3 ldr r3, [r4, #8] 8025b6e: f023 0340 bic.w r3, r3, #64 ; 0x40 8025b72: 60a3 str r3, [r4, #8] /* Set RTC_CR register */ RTC->CR |= ((uint32_t)(RTC_InitStruct->RTC_HourFormat)); 8025b74: 68a2 ldr r2, [r4, #8] 8025b76: 682b ldr r3, [r5, #0] 8025b78: 4313 orrs r3, r2 8025b7a: 60a3 str r3, [r4, #8] /* Configure the RTC PRER */ RTC->PRER = (uint32_t)(RTC_InitStruct->RTC_SynchPrediv); 8025b7c: 68ab ldr r3, [r5, #8] 8025b7e: 6123 str r3, [r4, #16] RTC->PRER |= (uint32_t)(RTC_InitStruct->RTC_AsynchPrediv << 16); 8025b80: 6923 ldr r3, [r4, #16] 8025b82: 686a ldr r2, [r5, #4] 8025b84: ea43 4302 orr.w r3, r3, r2, lsl #16 8025b88: 6123 str r3, [r4, #16] /* Exit Initialization mode */ RTC_ExitInitMode(); 8025b8a: f7ff ffdd bl 8025b48 status = SUCCESS; 8025b8e: 2001 movs r0, #1 } /* Enable the write protection for RTC registers */ RTC->WPR = 0xFF; 8025b90: 4b01 ldr r3, [pc, #4] ; (8025b98 ) 8025b92: 22ff movs r2, #255 ; 0xff 8025b94: 625a str r2, [r3, #36] ; 0x24 return status; } 8025b96: bd38 pop {r3, r4, r5, pc} 8025b98: 40002800 .word 0x40002800 08025b9c : * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC registers are synchronised * - ERROR: RTC registers are not synchronised */ ErrorStatus RTC_WaitForSynchro(void) { 8025b9c: b082 sub sp, #8 __IO uint32_t synchrocounter = 0; 8025b9e: 2300 movs r3, #0 8025ba0: 9301 str r3, [sp, #4] ErrorStatus status = ERROR; uint32_t synchrostatus = 0x00; /* Disable the write protection for RTC registers */ RTC->WPR = 0xCA; 8025ba2: 4b0e ldr r3, [pc, #56] ; (8025bdc ) 8025ba4: 22ca movs r2, #202 ; 0xca 8025ba6: 625a str r2, [r3, #36] ; 0x24 RTC->WPR = 0x53; 8025ba8: 2253 movs r2, #83 ; 0x53 8025baa: 625a str r2, [r3, #36] ; 0x24 /* Clear RSF flag */ RTC->ISR &= (uint32_t)RTC_RSF_MASK; 8025bac: 68da ldr r2, [r3, #12] 8025bae: f022 02a0 bic.w r2, r2, #160 ; 0xa0 8025bb2: 60da str r2, [r3, #12] /* Wait the registers to be synchronised */ do { synchrostatus = RTC->ISR & RTC_ISR_RSF; 8025bb4: 68d9 ldr r1, [r3, #12] synchrocounter++; 8025bb6: 9a01 ldr r2, [sp, #4] 8025bb8: 3201 adds r2, #1 8025bba: 9201 str r2, [sp, #4] } while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00)); 8025bbc: 9a01 ldr r2, [sp, #4] 8025bbe: 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; 8025bc2: f001 0120 and.w r1, r1, #32 8025bc6: 4a05 ldr r2, [pc, #20] ; (8025bdc ) synchrocounter++; } while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00)); 8025bc8: d001 beq.n 8025bce 8025bca: 2900 cmp r1, #0 8025bcc: d0f2 beq.n 8025bb4 if ((RTC->ISR & RTC_ISR_RSF) != RESET) 8025bce: 68d0 ldr r0, [r2, #12] { status = ERROR; } /* Enable the write protection for RTC registers */ RTC->WPR = 0xFF; 8025bd0: 23ff movs r3, #255 ; 0xff 8025bd2: 6253 str r3, [r2, #36] ; 0x24 return (status); } 8025bd4: f3c0 1040 ubfx r0, r0, #5, #1 8025bd8: b002 add sp, #8 8025bda: 4770 bx lr 8025bdc: 40002800 .word 0x40002800 08025be0 : * @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) { 8025be0: b5f8 push {r3, r4, r5, r6, r7, lr} 8025be2: 4b24 ldr r3, [pc, #144] ; (8025c74 ) 8025be4: 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) 8025be6: 689b ldr r3, [r3, #8] ErrorStatus status = ERROR; /* Check the parameters */ assert_param(IS_RTC_FORMAT(RTC_Format)); if (RTC_Format == RTC_Format_BIN) 8025be8: b920 cbnz r0, 8025bf4 { if ((RTC->CR & RTC_CR_FMT) != (uint32_t)RESET) 8025bea: f013 0340 ands.w r3, r3, #64 ; 0x40 8025bee: d12e bne.n 8025c4e assert_param(IS_RTC_HOUR12(RTC_TimeStruct->RTC_Hours)); assert_param(IS_RTC_H12(RTC_TimeStruct->RTC_H12)); } else { RTC_TimeStruct->RTC_H12 = 0x00; 8025bf0: 70cb strb r3, [r1, #3] 8025bf2: e02c b.n 8025c4e 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) 8025bf4: f013 0340 ands.w r3, r3, #64 ; 0x40 8025bf8: d11e bne.n 8025c38 assert_param(IS_RTC_HOUR12(tmpreg)); assert_param(IS_RTC_H12(RTC_TimeStruct->RTC_H12)); } else { RTC_TimeStruct->RTC_H12 = 0x00; 8025bfa: 70cb strb r3, [r1, #3] 8025bfc: e01c b.n 8025c38 ((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; 8025bfe: 4c1d ldr r4, [pc, #116] ; (8025c74 ) 8025c00: 23ca movs r3, #202 ; 0xca 8025c02: 6263 str r3, [r4, #36] ; 0x24 RTC->WPR = 0x53; 8025c04: 2353 movs r3, #83 ; 0x53 8025c06: 6263 str r3, [r4, #36] ; 0x24 /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) 8025c08: f7ff ff7e bl 8025b08 8025c0c: b180 cbz r0, 8025c30 status = ERROR; } else { /* Set the RTC_TR register */ RTC->TR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK); 8025c0e: f005 357f and.w r5, r5, #2139062143 ; 0x7f7f7f7f 8025c12: f025 45fe bic.w r5, r5, #2130706432 ; 0x7f000000 8025c16: 6025 str r5, [r4, #0] /* Exit Initialization mode */ RTC_ExitInitMode(); 8025c18: f7ff ff96 bl 8025b48 /* If RTC_CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */ if ((RTC->CR & RTC_CR_BYPSHAD) == RESET) 8025c1c: 68a3 ldr r3, [r4, #8] 8025c1e: 0699 lsls r1, r3, #26 8025c20: d405 bmi.n 8025c2e { if (RTC_WaitForSynchro() == ERROR) 8025c22: f7ff ffbb bl 8025b9c RTC->WPR = 0x53; /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) { status = ERROR; 8025c26: 3000 adds r0, #0 8025c28: bf18 it ne 8025c2a: 2001 movne r0, #1 8025c2c: e000 b.n 8025c30 status = SUCCESS; } } else { status = SUCCESS; 8025c2e: 2001 movs r0, #1 } } /* Enable the write protection for RTC registers */ RTC->WPR = 0xFF; 8025c30: 4b10 ldr r3, [pc, #64] ; (8025c74 ) 8025c32: 22ff movs r2, #255 ; 0xff 8025c34: 625a str r2, [r3, #36] ; 0x24 8025c36: 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) | \ 8025c38: 7865 ldrb r5, [r4, #1] } /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = (((uint32_t)(RTC_TimeStruct->RTC_Hours) << 16) | \ 8025c3a: 7823 ldrb r3, [r4, #0] ((uint32_t)(RTC_TimeStruct->RTC_Minutes) << 8) | \ 8025c3c: 022d lsls r5, r5, #8 } /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = (((uint32_t)(RTC_TimeStruct->RTC_Hours) << 16) | \ 8025c3e: ea45 4503 orr.w r5, r5, r3, lsl #16 ((uint32_t)(RTC_TimeStruct->RTC_Minutes) << 8) | \ ((uint32_t)RTC_TimeStruct->RTC_Seconds) | \ 8025c42: 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) | \ 8025c44: 431d orrs r5, r3 ((uint32_t)RTC_TimeStruct->RTC_Seconds) | \ ((uint32_t)(RTC_TimeStruct->RTC_H12) << 16)); 8025c46: 78e3 ldrb r3, [r4, #3] } /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = (((uint32_t)(RTC_TimeStruct->RTC_Hours) << 16) | \ 8025c48: ea45 4503 orr.w r5, r5, r3, lsl #16 8025c4c: e7d7 b.n 8025bfe ((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) | \ 8025c4e: 7820 ldrb r0, [r4, #0] 8025c50: f7ff ff46 bl 8025ae0 8025c54: 4607 mov r7, r0 ((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Minutes) << 8) | \ 8025c56: 7860 ldrb r0, [r4, #1] 8025c58: f7ff ff42 bl 8025ae0 8025c5c: 4606 mov r6, r0 ((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Seconds)) | \ 8025c5e: 78a0 ldrb r0, [r4, #2] 8025c60: f7ff ff3e bl 8025ae0 (((uint32_t)RTC_TimeStruct->RTC_H12) << 16)); 8025c64: 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) | \ 8025c66: ea40 4005 orr.w r0, r0, r5, lsl #16 ((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Minutes) << 8) | \ 8025c6a: 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) | \ 8025c6e: ea45 2506 orr.w r5, r5, r6, lsl #8 8025c72: e7c4 b.n 8025bfe 8025c74: 40002800 .word 0x40002800 08025c78 : /* Check the parameters */ assert_param(IS_RTC_FORMAT(RTC_Format)); /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->TR & RTC_TR_RESERVED_MASK); 8025c78: 4b0f ldr r3, [pc, #60] ; (8025cb8 ) 8025c7a: 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) { 8025c7c: 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); 8025c7e: f3c3 4205 ubfx r2, r3, #16, #6 RTC_TimeStruct->RTC_Minutes = (uint8_t)((tmpreg & (RTC_TR_MNT | RTC_TR_MNU)) >>8); 8025c82: f3c3 2606 ubfx r6, r3, #8, #7 RTC_TimeStruct->RTC_Seconds = (uint8_t)(tmpreg & (RTC_TR_ST | RTC_TR_SU)); 8025c86: f003 057f and.w r5, r3, #127 ; 0x7f RTC_TimeStruct->RTC_H12 = (uint8_t)((tmpreg & (RTC_TR_PM)) >> 16); 8025c8a: f403 0380 and.w r3, r3, #4194304 ; 0x400000 8025c8e: 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) { 8025c90: 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); 8025c92: 700a strb r2, [r1, #0] RTC_TimeStruct->RTC_Minutes = (uint8_t)((tmpreg & (RTC_TR_MNT | RTC_TR_MNU)) >>8); 8025c94: 704e strb r6, [r1, #1] RTC_TimeStruct->RTC_Seconds = (uint8_t)(tmpreg & (RTC_TR_ST | RTC_TR_SU)); 8025c96: 708d strb r5, [r1, #2] RTC_TimeStruct->RTC_H12 = (uint8_t)((tmpreg & (RTC_TR_PM)) >> 16); 8025c98: 70cb strb r3, [r1, #3] /* Check the input parameters format */ if (RTC_Format == RTC_Format_BIN) 8025c9a: b958 cbnz r0, 8025cb4 { /* Convert the structure parameters to Binary format */ RTC_TimeStruct->RTC_Hours = (uint8_t)RTC_Bcd2ToByte(RTC_TimeStruct->RTC_Hours); 8025c9c: 4610 mov r0, r2 8025c9e: f7ff ff2b bl 8025af8 8025ca2: 7020 strb r0, [r4, #0] RTC_TimeStruct->RTC_Minutes = (uint8_t)RTC_Bcd2ToByte(RTC_TimeStruct->RTC_Minutes); 8025ca4: 4630 mov r0, r6 8025ca6: f7ff ff27 bl 8025af8 8025caa: 7060 strb r0, [r4, #1] RTC_TimeStruct->RTC_Seconds = (uint8_t)RTC_Bcd2ToByte(RTC_TimeStruct->RTC_Seconds); 8025cac: 4628 mov r0, r5 8025cae: f7ff ff23 bl 8025af8 8025cb2: 70a0 strb r0, [r4, #2] 8025cb4: bd70 pop {r4, r5, r6, pc} 8025cb6: bf00 nop 8025cb8: 40002800 .word 0x40002800 08025cbc : * @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) { 8025cbc: b5f8 push {r3, r4, r5, r6, r7, lr} 8025cbe: 460c mov r4, r1 8025cc0: 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)) 8025cc2: 2800 cmp r0, #0 8025cc4: d138 bne.n 8025d38 8025cc6: f003 0210 and.w r2, r3, #16 8025cca: b2d2 uxtb r2, r2 8025ccc: b30a cbz r2, 8025d12 { RTC_DateStruct->RTC_Month = (RTC_DateStruct->RTC_Month & (uint32_t)~(0x10)) + 0x0A; 8025cce: f023 0310 bic.w r3, r3, #16 8025cd2: 330a adds r3, #10 8025cd4: 704b strb r3, [r1, #1] 8025cd6: e01c b.n 8025d12 ((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; 8025cd8: 4c1c ldr r4, [pc, #112] ; (8025d4c ) 8025cda: 23ca movs r3, #202 ; 0xca 8025cdc: 6263 str r3, [r4, #36] ; 0x24 RTC->WPR = 0x53; 8025cde: 2353 movs r3, #83 ; 0x53 8025ce0: 6263 str r3, [r4, #36] ; 0x24 /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) 8025ce2: f7ff ff11 bl 8025b08 8025ce6: b180 cbz r0, 8025d0a status = ERROR; } else { /* Set the RTC_DR register */ RTC->DR = (uint32_t)(tmpreg & RTC_DR_RESERVED_MASK); 8025ce8: f025 457f bic.w r5, r5, #4278190080 ; 0xff000000 8025cec: f025 05c0 bic.w r5, r5, #192 ; 0xc0 8025cf0: 6065 str r5, [r4, #4] /* Exit Initialization mode */ RTC_ExitInitMode(); 8025cf2: f7ff ff29 bl 8025b48 /* If RTC_CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */ if ((RTC->CR & RTC_CR_BYPSHAD) == RESET) 8025cf6: 68a3 ldr r3, [r4, #8] 8025cf8: 0698 lsls r0, r3, #26 8025cfa: d405 bmi.n 8025d08 { if (RTC_WaitForSynchro() == ERROR) 8025cfc: f7ff ff4e bl 8025b9c RTC->WPR = 0x53; /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) { status = ERROR; 8025d00: 3000 adds r0, #0 8025d02: bf18 it ne 8025d04: 2001 movne r0, #1 8025d06: e000 b.n 8025d0a status = SUCCESS; } } else { status = SUCCESS; 8025d08: 2001 movs r0, #1 } } /* Enable the write protection for RTC registers */ RTC->WPR = 0xFF; 8025d0a: 4b10 ldr r3, [pc, #64] ; (8025d4c ) 8025d0c: 22ff movs r2, #255 ; 0xff 8025d0e: 625a str r2, [r3, #36] ; 0x24 8025d10: 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) | \ 8025d12: 78e0 ldrb r0, [r4, #3] 8025d14: f7ff fee4 bl 8025ae0 8025d18: 4607 mov r7, r0 ((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Month) << 8) | \ 8025d1a: 7860 ldrb r0, [r4, #1] 8025d1c: f7ff fee0 bl 8025ae0 8025d20: 4606 mov r6, r0 ((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Date)) | \ 8025d22: 78a0 ldrb r0, [r4, #2] 8025d24: f7ff fedc bl 8025ae0 ((uint32_t)RTC_DateStruct->RTC_WeekDay << 13)); 8025d28: 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) | \ 8025d2a: ea40 3045 orr.w r0, r0, r5, lsl #13 ((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Month) << 8) | \ 8025d2e: 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) | \ 8025d32: ea45 2506 orr.w r5, r5, r6, lsl #8 8025d36: e7cf b.n 8025cd8 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) | \ 8025d38: 78cd ldrb r5, [r1, #3] (((uint32_t)RTC_DateStruct->RTC_Month) << 8) | \ ((uint32_t)RTC_DateStruct->RTC_Date) | \ 8025d3a: 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) | \ 8025d3c: 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) | \ 8025d3e: 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)); 8025d42: 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) | \ 8025d44: 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) | \ 8025d46: ea45 3543 orr.w r5, r5, r3, lsl #13 8025d4a: e7c5 b.n 8025cd8 8025d4c: 40002800 .word 0x40002800 08025d50 : /* Check the parameters */ assert_param(IS_RTC_FORMAT(RTC_Format)); /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->DR & RTC_DR_RESERVED_MASK); 8025d50: 4b0e ldr r3, [pc, #56] ; (8025d8c ) 8025d52: 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) { 8025d54: 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); 8025d56: f3c3 4207 ubfx r2, r3, #16, #8 RTC_DateStruct->RTC_Month = (uint8_t)((tmpreg & (RTC_DR_MT | RTC_DR_MU)) >> 8); 8025d5a: f3c3 2604 ubfx r6, r3, #8, #5 RTC_DateStruct->RTC_Date = (uint8_t)(tmpreg & (RTC_DR_DT | RTC_DR_DU)); 8025d5e: f003 053f and.w r5, r3, #63 ; 0x3f RTC_DateStruct->RTC_WeekDay = (uint8_t)((tmpreg & (RTC_DR_WDU)) >> 13); 8025d62: 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) { 8025d66: 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); 8025d68: 70ca strb r2, [r1, #3] RTC_DateStruct->RTC_Month = (uint8_t)((tmpreg & (RTC_DR_MT | RTC_DR_MU)) >> 8); 8025d6a: 704e strb r6, [r1, #1] RTC_DateStruct->RTC_Date = (uint8_t)(tmpreg & (RTC_DR_DT | RTC_DR_DU)); 8025d6c: 708d strb r5, [r1, #2] RTC_DateStruct->RTC_WeekDay = (uint8_t)((tmpreg & (RTC_DR_WDU)) >> 13); 8025d6e: 700b strb r3, [r1, #0] /* Check the input parameters format */ if (RTC_Format == RTC_Format_BIN) 8025d70: b958 cbnz r0, 8025d8a { /* Convert the structure parameters to Binary format */ RTC_DateStruct->RTC_Year = (uint8_t)RTC_Bcd2ToByte(RTC_DateStruct->RTC_Year); 8025d72: 4610 mov r0, r2 8025d74: f7ff fec0 bl 8025af8 8025d78: 70e0 strb r0, [r4, #3] RTC_DateStruct->RTC_Month = (uint8_t)RTC_Bcd2ToByte(RTC_DateStruct->RTC_Month); 8025d7a: 4630 mov r0, r6 8025d7c: f7ff febc bl 8025af8 8025d80: 7060 strb r0, [r4, #1] RTC_DateStruct->RTC_Date = (uint8_t)RTC_Bcd2ToByte(RTC_DateStruct->RTC_Date); 8025d82: 4628 mov r0, r5 8025d84: f7ff feb8 bl 8025af8 8025d88: 70a0 strb r0, [r4, #2] 8025d8a: bd70 pop {r4, r5, r6, pc} 8025d8c: 40002800 .word 0x40002800 08025d90 : * 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) { 8025d90: b082 sub sp, #8 __IO uint32_t tmp = 0; 8025d92: 2300 movs r3, #0 8025d94: 9301 str r3, [sp, #4] /* Check the parameters */ assert_param(IS_RTC_BKP(RTC_BKP_DR)); tmp = RTC_BASE + 0x50; 8025d96: 4b05 ldr r3, [pc, #20] ; (8025dac ) 8025d98: 9301 str r3, [sp, #4] tmp += (RTC_BKP_DR * 4); 8025d9a: 9b01 ldr r3, [sp, #4] 8025d9c: eb03 0080 add.w r0, r3, r0, lsl #2 8025da0: 9001 str r0, [sp, #4] /* Write the specified register */ *(__IO uint32_t *)tmp = (uint32_t)Data; 8025da2: 9b01 ldr r3, [sp, #4] 8025da4: 6019 str r1, [r3, #0] } 8025da6: b002 add sp, #8 8025da8: 4770 bx lr 8025daa: bf00 nop 8025dac: 40002850 .word 0x40002850 08025db0 : * 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) { 8025db0: b082 sub sp, #8 __IO uint32_t tmp = 0; 8025db2: 2300 movs r3, #0 8025db4: 9301 str r3, [sp, #4] /* Check the parameters */ assert_param(IS_RTC_BKP(RTC_BKP_DR)); tmp = RTC_BASE + 0x50; 8025db6: 4b05 ldr r3, [pc, #20] ; (8025dcc ) 8025db8: 9301 str r3, [sp, #4] tmp += (RTC_BKP_DR * 4); 8025dba: 9b01 ldr r3, [sp, #4] 8025dbc: eb03 0080 add.w r0, r3, r0, lsl #2 8025dc0: 9001 str r0, [sp, #4] /* Read the specified register */ return (*(__IO uint32_t *)tmp); 8025dc2: 9b01 ldr r3, [sp, #4] 8025dc4: 6818 ldr r0, [r3, #0] } 8025dc6: b002 add sp, #8 8025dc8: 4770 bx lr 8025dca: bf00 nop 8025dcc: 40002850 .word 0x40002850 08025dd0 : /* 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)); 8025dd0: 4b0a ldr r3, [pc, #40] ; (8025dfc ) 8025dd2: 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) { 8025dd4: 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))); 8025dd6: 689c ldr r4, [r3, #8] /* Get the Interrupt pending bit */ tmpreg = (uint32_t)((RTC->ISR & (uint32_t)(RTC_IT >> 4))); 8025dd8: 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)); 8025dda: f002 0204 and.w r2, r2, #4 /* Get the Interrupt enable Status */ enablestatus = (uint32_t)((RTC->CR & RTC_IT) | (tmpreg & (RTC_IT >> 15))); 8025dde: ea02 32d0 and.w r2, r2, r0, lsr #15 8025de2: 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)) 8025de6: 4313 orrs r3, r2 8025de8: d006 beq.n 8025df8 /* 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))); 8025dea: b28b uxth r3, r1 /* Get the status of the Interrupt */ if ((enablestatus != (uint32_t)RESET) && ((tmpreg & 0x0000FFFF) != (uint32_t)RESET)) 8025dec: ea13 1310 ands.w r3, r3, r0, lsr #4 { bitstatus = SET; 8025df0: bf0c ite eq 8025df2: 2000 moveq r0, #0 8025df4: 2001 movne r0, #1 8025df6: bd10 pop {r4, pc} } else { bitstatus = RESET; 8025df8: 4618 mov r0, r3 } return bitstatus; } 8025dfa: bd10 pop {r4, pc} 8025dfc: 40002800 .word 0x40002800 08025e00 : /* 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))); 8025e00: 4b05 ldr r3, [pc, #20] ; (8025e18 ) 8025e02: 68da ldr r2, [r3, #12] 8025e04: f3c0 100f ubfx r0, r0, #4, #16 8025e08: f040 0080 orr.w r0, r0, #128 ; 0x80 8025e0c: f002 0280 and.w r2, r2, #128 ; 0x80 8025e10: ea62 0200 orn r2, r2, r0 8025e14: 60da str r2, [r3, #12] 8025e16: 4770 bx lr 8025e18: 40002800 .word 0x40002800 08025e1c : */ 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; 8025e1c: 4b01 ldr r3, [pc, #4] ; (8025e24 ) 8025e1e: 6018 str r0, [r3, #0] 8025e20: 4770 bx lr 8025e22: bf00 nop 8025e24: 422700dc .word 0x422700dc 08025e28 : assert_param(IS_TIM_COUNTER_MODE(TIM_TimeBaseInitStruct->TIM_CounterMode)); assert_param(IS_TIM_CKD_DIV(TIM_TimeBaseInitStruct->TIM_ClockDivision)); tmpcr1 = TIMx->CR1; if((TIMx == TIM1) || (TIMx == TIM8)|| 8025e28: 4a1c ldr r2, [pc, #112] ; (8025e9c ) /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); assert_param(IS_TIM_COUNTER_MODE(TIM_TimeBaseInitStruct->TIM_CounterMode)); assert_param(IS_TIM_CKD_DIV(TIM_TimeBaseInitStruct->TIM_ClockDivision)); tmpcr1 = TIMx->CR1; 8025e2a: 8803 ldrh r3, [r0, #0] if((TIMx == TIM1) || (TIMx == TIM8)|| 8025e2c: 4290 cmp r0, r2 /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); assert_param(IS_TIM_COUNTER_MODE(TIM_TimeBaseInitStruct->TIM_CounterMode)); assert_param(IS_TIM_CKD_DIV(TIM_TimeBaseInitStruct->TIM_ClockDivision)); tmpcr1 = TIMx->CR1; 8025e2e: b29b uxth r3, r3 if((TIMx == TIM1) || (TIMx == TIM8)|| 8025e30: d012 beq.n 8025e58 8025e32: f502 6280 add.w r2, r2, #1024 ; 0x400 8025e36: 4290 cmp r0, r2 8025e38: d00e beq.n 8025e58 8025e3a: f1b0 4f80 cmp.w r0, #1073741824 ; 0x40000000 8025e3e: d00b beq.n 8025e58 (TIMx == TIM2) || (TIMx == TIM3)|| 8025e40: f5a2 3280 sub.w r2, r2, #65536 ; 0x10000 8025e44: 4290 cmp r0, r2 8025e46: d007 beq.n 8025e58 8025e48: f502 6280 add.w r2, r2, #1024 ; 0x400 8025e4c: 4290 cmp r0, r2 8025e4e: d003 beq.n 8025e58 (TIMx == TIM4) || (TIMx == TIM5)) 8025e50: f502 6280 add.w r2, r2, #1024 ; 0x400 8025e54: 4290 cmp r0, r2 8025e56: d103 bne.n 8025e60 { /* Select the Counter Mode */ tmpcr1 &= (uint16_t)(~(TIM_CR1_DIR | TIM_CR1_CMS)); tmpcr1 |= (uint32_t)TIM_TimeBaseInitStruct->TIM_CounterMode; 8025e58: 884a ldrh r2, [r1, #2] if((TIMx == TIM1) || (TIMx == TIM8)|| (TIMx == TIM2) || (TIMx == TIM3)|| (TIMx == TIM4) || (TIMx == TIM5)) { /* Select the Counter Mode */ tmpcr1 &= (uint16_t)(~(TIM_CR1_DIR | TIM_CR1_CMS)); 8025e5a: f023 0370 bic.w r3, r3, #112 ; 0x70 tmpcr1 |= (uint32_t)TIM_TimeBaseInitStruct->TIM_CounterMode; 8025e5e: 4313 orrs r3, r2 } if((TIMx != TIM6) && (TIMx != TIM7)) 8025e60: 4a0f ldr r2, [pc, #60] ; (8025ea0 ) 8025e62: 4290 cmp r0, r2 8025e64: d008 beq.n 8025e78 8025e66: f502 6280 add.w r2, r2, #1024 ; 0x400 8025e6a: 4290 cmp r0, r2 8025e6c: d004 beq.n 8025e78 { /* Set the clock division */ tmpcr1 &= (uint16_t)(~TIM_CR1_CKD); 8025e6e: f423 7340 bic.w r3, r3, #768 ; 0x300 tmpcr1 |= (uint32_t)TIM_TimeBaseInitStruct->TIM_ClockDivision; 8025e72: 890a ldrh r2, [r1, #8] } if((TIMx != TIM6) && (TIMx != TIM7)) { /* Set the clock division */ tmpcr1 &= (uint16_t)(~TIM_CR1_CKD); 8025e74: b29b uxth r3, r3 tmpcr1 |= (uint32_t)TIM_TimeBaseInitStruct->TIM_ClockDivision; 8025e76: 4313 orrs r3, r2 } TIMx->CR1 = tmpcr1; 8025e78: 8003 strh r3, [r0, #0] /* Set the Autoreload value */ TIMx->ARR = TIM_TimeBaseInitStruct->TIM_Period ; 8025e7a: 684b ldr r3, [r1, #4] 8025e7c: 62c3 str r3, [r0, #44] ; 0x2c /* Set the Prescaler value */ TIMx->PSC = TIM_TimeBaseInitStruct->TIM_Prescaler; 8025e7e: 880b ldrh r3, [r1, #0] 8025e80: 8503 strh r3, [r0, #40] ; 0x28 if ((TIMx == TIM1) || (TIMx == TIM8)) 8025e82: 4b06 ldr r3, [pc, #24] ; (8025e9c ) 8025e84: 4298 cmp r0, r3 8025e86: d003 beq.n 8025e90 8025e88: f503 6380 add.w r3, r3, #1024 ; 0x400 8025e8c: 4298 cmp r0, r3 8025e8e: d101 bne.n 8025e94 { /* Set the Repetition Counter value */ TIMx->RCR = TIM_TimeBaseInitStruct->TIM_RepetitionCounter; 8025e90: 7a8b ldrb r3, [r1, #10] 8025e92: 8603 strh r3, [r0, #48] ; 0x30 } /* Generate an update event to reload the Prescaler and the repetition counter(only for TIM1 and TIM8) value immediatly */ TIMx->EGR = TIM_PSCReloadMode_Immediate; 8025e94: 2301 movs r3, #1 8025e96: 8283 strh r3, [r0, #20] 8025e98: 4770 bx lr 8025e9a: bf00 nop 8025e9c: 40010000 .word 0x40010000 8025ea0: 40001000 .word 0x40001000 08025ea4 : assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the TIM Counter */ TIMx->CR1 |= TIM_CR1_CEN; 8025ea4: 8803 ldrh r3, [r0, #0] { /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8025ea6: b119 cbz r1, 8025eb0 { /* Enable the TIM Counter */ TIMx->CR1 |= TIM_CR1_CEN; 8025ea8: b29b uxth r3, r3 8025eaa: f043 0301 orr.w r3, r3, #1 8025eae: e003 b.n 8025eb8 } else { /* Disable the TIM Counter */ TIMx->CR1 &= (uint16_t)~TIM_CR1_CEN; 8025eb0: f023 0301 bic.w r3, r3, #1 8025eb4: 041b lsls r3, r3, #16 8025eb6: 0c1b lsrs r3, r3, #16 8025eb8: 8003 strh r3, [r0, #0] 8025eba: 4770 bx lr 08025ebc : assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the Interrupt sources */ TIMx->DIER |= TIM_IT; 8025ebc: 8983 ldrh r3, [r0, #12] 8025ebe: b29b uxth r3, r3 /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); assert_param(IS_TIM_IT(TIM_IT)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8025ec0: b10a cbz r2, 8025ec6 { /* Enable the Interrupt sources */ TIMx->DIER |= TIM_IT; 8025ec2: 4319 orrs r1, r3 8025ec4: e001 b.n 8025eca } else { /* Disable the Interrupt sources */ TIMx->DIER &= (uint16_t)~TIM_IT; 8025ec6: ea23 0101 bic.w r1, r3, r1 8025eca: 8181 strh r1, [r0, #12] 8025ecc: 4770 bx lr 08025ece : { /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); /* Clear the IT pending Bit */ TIMx->SR = (uint16_t)~TIM_IT; 8025ece: 43c9 mvns r1, r1 8025ed0: 8201 strh r1, [r0, #16] 8025ed2: 4770 bx lr 08025ed4 : * @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) { 8025ed4: b508 push {r3, lr} /* Check the parameters */ assert_param(IS_USART_ALL_PERIPH(USARTx)); if (USARTx == USART1) 8025ed6: 4b23 ldr r3, [pc, #140] ; (8025f64 ) 8025ed8: 4298 cmp r0, r3 8025eda: d105 bne.n 8025ee8 { RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART1, ENABLE); 8025edc: 2010 movs r0, #16 8025ede: 2101 movs r1, #1 8025ee0: f7ff fdcc bl 8025a7c RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART1, DISABLE); 8025ee4: 2010 movs r0, #16 8025ee6: e037 b.n 8025f58 } else if (USARTx == USART2) 8025ee8: 4b1f ldr r3, [pc, #124] ; (8025f68 ) 8025eea: 4298 cmp r0, r3 8025eec: d107 bne.n 8025efe { RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART2, ENABLE); 8025eee: f44f 3000 mov.w r0, #131072 ; 0x20000 8025ef2: 2101 movs r1, #1 8025ef4: f7ff fdb6 bl 8025a64 RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART2, DISABLE); 8025ef8: f44f 3000 mov.w r0, #131072 ; 0x20000 8025efc: e009 b.n 8025f12 } else if (USARTx == USART3) 8025efe: 4b1b ldr r3, [pc, #108] ; (8025f6c ) 8025f00: 4298 cmp r0, r3 8025f02: d10b bne.n 8025f1c { RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART3, ENABLE); 8025f04: f44f 2080 mov.w r0, #262144 ; 0x40000 8025f08: 2101 movs r1, #1 8025f0a: f7ff fdab bl 8025a64 RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART3, DISABLE); 8025f0e: f44f 2080 mov.w r0, #262144 ; 0x40000 8025f12: 2100 movs r1, #0 { RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, DISABLE); } } } 8025f14: 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); 8025f18: f7ff bda4 b.w 8025a64 } else if (USARTx == UART4) 8025f1c: 4b14 ldr r3, [pc, #80] ; (8025f70 ) 8025f1e: 4298 cmp r0, r3 8025f20: d107 bne.n 8025f32 { RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART4, ENABLE); 8025f22: f44f 2000 mov.w r0, #524288 ; 0x80000 8025f26: 2101 movs r1, #1 8025f28: f7ff fd9c bl 8025a64 RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART4, DISABLE); 8025f2c: f44f 2000 mov.w r0, #524288 ; 0x80000 8025f30: e7ef b.n 8025f12 } else if (USARTx == UART5) 8025f32: 4b10 ldr r3, [pc, #64] ; (8025f74 ) 8025f34: 4298 cmp r0, r3 8025f36: d107 bne.n 8025f48 { RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART5, ENABLE); 8025f38: f44f 1080 mov.w r0, #1048576 ; 0x100000 8025f3c: 2101 movs r1, #1 8025f3e: f7ff fd91 bl 8025a64 RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART5, DISABLE); 8025f42: f44f 1080 mov.w r0, #1048576 ; 0x100000 8025f46: e7e4 b.n 8025f12 } else { if (USARTx == USART6) 8025f48: 4b0b ldr r3, [pc, #44] ; (8025f78 ) 8025f4a: 4298 cmp r0, r3 8025f4c: d109 bne.n 8025f62 { RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, ENABLE); 8025f4e: 2020 movs r0, #32 8025f50: 2101 movs r1, #1 8025f52: f7ff fd93 bl 8025a7c RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, DISABLE); 8025f56: 2020 movs r0, #32 8025f58: 2100 movs r1, #0 } } } 8025f5a: e8bd 4008 ldmia.w sp!, {r3, lr} else { if (USARTx == USART6) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, DISABLE); 8025f5e: f7ff bd8d b.w 8025a7c 8025f62: bd08 pop {r3, pc} 8025f64: 40011000 .word 0x40011000 8025f68: 40004400 .word 0x40004400 8025f6c: 40004800 .word 0x40004800 8025f70: 40004c00 .word 0x40004c00 8025f74: 40005000 .word 0x40005000 8025f78: 40011400 .word 0x40011400 08025f7c : { assert_param(IS_USART_1236_PERIPH(USARTx)); } /*---------------------------- USART CR2 Configuration -----------------------*/ tmpreg = USARTx->CR2; 8025f7c: 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; 8025f7e: 88ca ldrh r2, [r1, #6] { assert_param(IS_USART_1236_PERIPH(USARTx)); } /*---------------------------- USART CR2 Configuration -----------------------*/ tmpreg = USARTx->CR2; 8025f80: b29b uxth r3, r3 /* Clear STOP[13:12] bits */ tmpreg &= (uint32_t)~((uint32_t)USART_CR2_STOP); 8025f82: 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) { 8025f86: 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; 8025f88: 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) { 8025f8a: 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; 8025f8c: 8203 strh r3, [r0, #16] /*---------------------------- USART CR1 Configuration -----------------------*/ tmpreg = USARTx->CR1; 8025f8e: 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 | 8025f90: 8909 ldrh r1, [r1, #8] 8025f92: 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); 8025f94: 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 | 8025f98: 430a orrs r2, r1 8025f9a: 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); 8025f9c: f023 030c bic.w r3, r3, #12 8025fa0: 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 | 8025fa2: 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); 8025fa4: 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 | 8025fa6: b292 uxth r2, r2 USART_InitStruct->USART_Mode; /* Write to USART CR1 */ USARTx->CR1 = (uint16_t)tmpreg; 8025fa8: 4313 orrs r3, r2 8025faa: 8183 strh r3, [r0, #12] /*---------------------------- USART CR3 Configuration -----------------------*/ tmpreg = USARTx->CR3; 8025fac: 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; 8025fae: 89aa ldrh r2, [r5, #12] /* Write to USART CR1 */ USARTx->CR1 = (uint16_t)tmpreg; /*---------------------------- USART CR3 Configuration -----------------------*/ tmpreg = USARTx->CR3; 8025fb0: b29b uxth r3, r3 /* Clear CTSE and RTSE bits */ tmpreg &= (uint32_t)~((uint32_t)CR3_CLEAR_MASK); 8025fb2: 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; 8025fb6: 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) { 8025fb8: 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; 8025fba: 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) { 8025fbc: 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); 8025fbe: 4668 mov r0, sp 8025fc0: f7ff fcb0 bl 8025924 if ((USARTx == USART1) || (USARTx == USART6)) 8025fc4: 4b19 ldr r3, [pc, #100] ; (802602c ) 8025fc6: 429c cmp r4, r3 8025fc8: d003 beq.n 8025fd2 8025fca: f503 6380 add.w r3, r3, #1024 ; 0x400 8025fce: 429c cmp r4, r3 8025fd0: d101 bne.n 8025fd6 { apbclock = RCC_ClocksStatus.PCLK2_Frequency; 8025fd2: 9b03 ldr r3, [sp, #12] 8025fd4: e000 b.n 8025fd8 } else { apbclock = RCC_ClocksStatus.PCLK1_Frequency; 8025fd6: 9b02 ldr r3, [sp, #8] } /* Determine the integer part */ if ((USARTx->CR1 & USART_CR1_OVER8) != 0) 8025fd8: 89a2 ldrh r2, [r4, #12] 8025fda: b212 sxth r2, r2 8025fdc: 2a00 cmp r2, #0 8025fde: f04f 0119 mov.w r1, #25 8025fe2: 682a ldr r2, [r5, #0] { /* Integer part computing in case Oversampling mode is 8 Samples */ integerdivider = ((25 * apbclock) / (2 * (USART_InitStruct->USART_BaudRate))); 8025fe4: fb01 f103 mul.w r1, r1, r3 { apbclock = RCC_ClocksStatus.PCLK1_Frequency; } /* Determine the integer part */ if ((USARTx->CR1 & USART_CR1_OVER8) != 0) 8025fe8: da01 bge.n 8025fee { /* Integer part computing in case Oversampling mode is 8 Samples */ integerdivider = ((25 * apbclock) / (2 * (USART_InitStruct->USART_BaudRate))); 8025fea: 0052 lsls r2, r2, #1 8025fec: e000 b.n 8025ff0 } 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))); 8025fee: 0092 lsls r2, r2, #2 } tmpreg = (integerdivider / 100) << 4; 8025ff0: 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))); 8025ff2: fbb1 f1f2 udiv r1, r1, r2 } tmpreg = (integerdivider / 100) << 4; 8025ff6: fbb1 f2f3 udiv r2, r1, r3 8025ffa: 0112 lsls r2, r2, #4 /* Determine the fractional part */ fractionaldivider = integerdivider - (100 * (tmpreg >> 4)); 8025ffc: 0910 lsrs r0, r2, #4 8025ffe: fb03 1110 mls r1, r3, r0, r1 /* Implement the fractional part in the register */ if ((USARTx->CR1 & USART_CR1_OVER8) != 0) 8026002: 89a0 ldrh r0, [r4, #12] 8026004: b200 sxth r0, r0 8026006: 2800 cmp r0, #0 8026008: da06 bge.n 8026018 { tmpreg |= ((((fractionaldivider * 8) + 50) / 100)) & ((uint8_t)0x07); 802600a: 00c9 lsls r1, r1, #3 802600c: 3132 adds r1, #50 ; 0x32 802600e: fbb1 f3f3 udiv r3, r1, r3 8026012: f003 0307 and.w r3, r3, #7 8026016: e005 b.n 8026024 } else /* if ((USARTx->CR1 & USART_CR1_OVER8) == 0) */ { tmpreg |= ((((fractionaldivider * 16) + 50) / 100)) & ((uint8_t)0x0F); 8026018: 0109 lsls r1, r1, #4 802601a: 3132 adds r1, #50 ; 0x32 802601c: fbb1 f3f3 udiv r3, r1, r3 8026020: f003 030f and.w r3, r3, #15 8026024: 431a orrs r2, r3 } /* Write to USART BRR register */ USARTx->BRR = (uint16_t)tmpreg; 8026026: 8122 strh r2, [r4, #8] } 8026028: b005 add sp, #20 802602a: bd30 pop {r4, r5, pc} 802602c: 40011000 .word 0x40011000 08026030 : 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; 8026030: 8983 ldrh r3, [r0, #12] { /* Check the parameters */ assert_param(IS_USART_ALL_PERIPH(USARTx)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8026032: b119 cbz r1, 802603c { /* Enable the selected USART by setting the UE bit in the CR1 register */ USARTx->CR1 |= USART_CR1_UE; 8026034: b29b uxth r3, r3 8026036: f443 5300 orr.w r3, r3, #8192 ; 0x2000 802603a: e003 b.n 8026044 } else { /* Disable the selected USART by clearing the UE bit in the CR1 register */ USARTx->CR1 &= (uint16_t)~((uint16_t)USART_CR1_UE); 802603c: f423 5300 bic.w r3, r3, #8192 ; 0x2000 8026040: 041b lsls r3, r3, #16 8026042: 0c1b lsrs r3, r3, #16 8026044: 8183 strh r3, [r0, #12] 8026046: 4770 bx lr 08026048 : } usartxbase = (uint32_t)USARTx; /* Get the USART register index */ usartreg = (((uint8_t)USART_IT) >> 0x05); 8026048: 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) { 802604c: 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); 802604e: 2401 movs r4, #1 8026050: f001 011f and.w r1, r1, #31 if (usartreg == 0x01) /* The IT is in CR1 register */ 8026054: 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); 8026056: fa04 f101 lsl.w r1, r4, r1 if (usartreg == 0x01) /* The IT is in CR1 register */ 802605a: d101 bne.n 8026060 { usartxbase += 0x0C; 802605c: 300c adds r0, #12 802605e: e004 b.n 802606a } else if (usartreg == 0x02) /* The IT is in CR2 register */ 8026060: 2b02 cmp r3, #2 8026062: d101 bne.n 8026068 { usartxbase += 0x10; 8026064: 3010 adds r0, #16 8026066: e000 b.n 802606a } else /* The IT is in CR3 register */ { usartxbase += 0x14; 8026068: 3014 adds r0, #20 } if (NewState != DISABLE) { *(__IO uint32_t*)usartxbase |= itmask; 802606a: 6803 ldr r3, [r0, #0] } else /* The IT is in CR3 register */ { usartxbase += 0x14; } if (NewState != DISABLE) 802606c: b10a cbz r2, 8026072 { *(__IO uint32_t*)usartxbase |= itmask; 802606e: 4319 orrs r1, r3 8026070: e001 b.n 8026076 } else { *(__IO uint32_t*)usartxbase &= ~itmask; 8026072: ea23 0101 bic.w r1, r3, r1 8026076: 6001 str r1, [r0, #0] 8026078: bd10 pop {r4, pc} 0802607a : * @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) { 802607a: b510 push {r4, lr} { assert_param(IS_USART_1236_PERIPH(USARTx)); } /* Get the USART register index */ usartreg = (((uint8_t)USART_IT) >> 0x05); 802607c: f3c1 1442 ubfx r4, r1, #5, #3 /* Get the interrupt position */ itmask = USART_IT & IT_MASK; itmask = (uint32_t)0x01 << itmask; 8026080: 2201 movs r2, #1 8026082: f001 031f and.w r3, r1, #31 if (usartreg == 0x01) /* The IT is in CR1 register */ 8026086: 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; 8026088: fa02 f203 lsl.w r2, r2, r3 if (usartreg == 0x01) /* The IT is in CR1 register */ 802608c: d101 bne.n 8026092 { itmask &= USARTx->CR1; 802608e: 8983 ldrh r3, [r0, #12] 8026090: e003 b.n 802609a } else if (usartreg == 0x02) /* The IT is in CR2 register */ 8026092: 2c02 cmp r4, #2 { itmask &= USARTx->CR2; 8026094: bf0c ite eq 8026096: 8a03 ldrheq r3, [r0, #16] } else /* The IT is in CR3 register */ { itmask &= USARTx->CR3; 8026098: 8a83 ldrhne r3, [r0, #20] 802609a: b29b uxth r3, r3 802609c: 4013 ands r3, r2 } bitpos = USART_IT >> 0x08; bitpos = (uint32_t)0x01 << bitpos; bitpos &= USARTx->SR; 802609e: 8802 ldrh r2, [r0, #0] 80260a0: b292 uxth r2, r2 if ((itmask != (uint16_t)RESET)&&(bitpos != (uint16_t)RESET)) 80260a2: b143 cbz r3, 80260b6 { itmask &= USARTx->CR3; } bitpos = USART_IT >> 0x08; bitpos = (uint32_t)0x01 << bitpos; 80260a4: 2301 movs r3, #1 80260a6: 0a09 lsrs r1, r1, #8 80260a8: fa03 f101 lsl.w r1, r3, r1 bitpos &= USARTx->SR; if ((itmask != (uint16_t)RESET)&&(bitpos != (uint16_t)RESET)) 80260ac: 4211 tst r1, r2 { bitstatus = SET; 80260ae: bf0c ite eq 80260b0: 2000 moveq r0, #0 80260b2: 2001 movne r0, #1 80260b4: bd10 pop {r4, pc} } else { bitstatus = RESET; 80260b6: 4618 mov r0, r3 } return bitstatus; } 80260b8: bd10 pop {r4, pc} 080260ba : { assert_param(IS_USART_1236_PERIPH(USARTx)); } bitpos = USART_IT >> 0x08; itmask = ((uint16_t)0x01 << (uint16_t)bitpos); 80260ba: 0a09 lsrs r1, r1, #8 80260bc: 2301 movs r3, #1 80260be: fa03 f301 lsl.w r3, r3, r1 USARTx->SR = (uint16_t)~itmask; 80260c2: 43db mvns r3, r3 80260c4: 8003 strh r3, [r0, #0] 80260c6: 4770 bx lr 080260c8 : 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; 80260c8: 4b35 ldr r3, [pc, #212] ; (80261a0 ) 80260ca: 681a ldr r2, [r3, #0] 80260cc: f042 0201 orr.w r2, r2, #1 80260d0: 601a str r2, [r3, #0] /* Reset CFGR register */ RCC->CFGR = 0x00000000; 80260d2: 2200 movs r2, #0 80260d4: 609a str r2, [r3, #8] /* Reset HSEON, CSSON and PLLON bits */ RCC->CR &= (uint32_t)0xFEF6FFFF; 80260d6: 6819 ldr r1, [r3, #0] 80260d8: f021 7184 bic.w r1, r1, #17301504 ; 0x1080000 80260dc: f421 3180 bic.w r1, r1, #65536 ; 0x10000 80260e0: 6019 str r1, [r3, #0] /* Reset PLLCFGR register */ RCC->PLLCFGR = 0x24003010; 80260e2: 4930 ldr r1, [pc, #192] ; (80261a4 ) 80260e4: 6059 str r1, [r3, #4] /* Reset HSEBYP bit */ RCC->CR &= (uint32_t)0xFFFBFFFF; 80260e6: 6819 ldr r1, [r3, #0] * SystemFrequency variable. * @param None * @retval None */ void SystemInit(void) { 80260e8: b082 sub sp, #8 /* Reset PLLCFGR register */ RCC->PLLCFGR = 0x24003010; /* Reset HSEBYP bit */ RCC->CR &= (uint32_t)0xFFFBFFFF; 80260ea: f421 2180 bic.w r1, r1, #262144 ; 0x40000 80260ee: 6019 str r1, [r3, #0] /* Disable all interrupts */ RCC->CIR = 0x00000000; 80260f0: 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; 80260f2: 9200 str r2, [sp, #0] 80260f4: 9201 str r2, [sp, #4] /* Enable HSE */ RCC->CR |= ((uint32_t)RCC_CR_HSEON); 80260f6: 681a ldr r2, [r3, #0] 80260f8: f442 3280 orr.w r2, r2, #65536 ; 0x10000 80260fc: 601a str r2, [r3, #0] /* Wait till HSE is ready and if Time out is reached exit */ do { HSEStatus = RCC->CR & RCC_CR_HSERDY; 80260fe: 681a ldr r2, [r3, #0] 8026100: f402 3200 and.w r2, r2, #131072 ; 0x20000 8026104: 9201 str r2, [sp, #4] StartUpCounter++; 8026106: 9a00 ldr r2, [sp, #0] 8026108: 3201 adds r2, #1 802610a: 9200 str r2, [sp, #0] } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT)); 802610c: 9a01 ldr r2, [sp, #4] 802610e: b91a cbnz r2, 8026118 8026110: 9a00 ldr r2, [sp, #0] 8026112: f5b2 6fa0 cmp.w r2, #1280 ; 0x500 8026116: d1f2 bne.n 80260fe if ((RCC->CR & RCC_CR_HSERDY) != RESET) 8026118: 4b21 ldr r3, [pc, #132] ; (80261a0 ) 802611a: 681b ldr r3, [r3, #0] 802611c: f413 3300 ands.w r3, r3, #131072 ; 0x20000 { HSEStatus = (uint32_t)0x01; 8026120: bf18 it ne 8026122: 2301 movne r3, #1 } else { HSEStatus = (uint32_t)0x00; 8026124: 9301 str r3, [sp, #4] } if (HSEStatus == (uint32_t)0x01) 8026126: 9b01 ldr r3, [sp, #4] 8026128: 2b01 cmp r3, #1 802612a: d133 bne.n 8026194 { /* Select regulator voltage output Scale 1 mode, System frequency up to 168 MHz */ RCC->APB1ENR |= RCC_APB1ENR_PWREN; 802612c: 4b1c ldr r3, [pc, #112] ; (80261a0 ) 802612e: 6c1a ldr r2, [r3, #64] ; 0x40 8026130: f042 5280 orr.w r2, r2, #268435456 ; 0x10000000 8026134: 641a str r2, [r3, #64] ; 0x40 PWR->CR |= PWR_CR_VOS; 8026136: 4a1c ldr r2, [pc, #112] ; (80261a8 ) 8026138: 6811 ldr r1, [r2, #0] 802613a: f441 4180 orr.w r1, r1, #16384 ; 0x4000 802613e: 6011 str r1, [r2, #0] /* HCLK = SYSCLK / 1*/ RCC->CFGR |= RCC_CFGR_HPRE_DIV1; 8026140: 689a ldr r2, [r3, #8] 8026142: 609a str r2, [r3, #8] /* PCLK2 = HCLK / 2*/ RCC->CFGR |= RCC_CFGR_PPRE2_DIV2; 8026144: 689a ldr r2, [r3, #8] 8026146: f442 4200 orr.w r2, r2, #32768 ; 0x8000 802614a: 609a str r2, [r3, #8] /* PCLK1 = HCLK / 4*/ RCC->CFGR |= RCC_CFGR_PPRE1_DIV4; 802614c: 689a ldr r2, [r3, #8] 802614e: f442 52a0 orr.w r2, r2, #5120 ; 0x1400 8026152: 609a str r2, [r3, #8] /* Configure the main PLL */ RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | 8026154: 4a15 ldr r2, [pc, #84] ; (80261ac ) 8026156: 605a str r2, [r3, #4] (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24); /* Enable the main PLL */ RCC->CR |= RCC_CR_PLLON; 8026158: 681a ldr r2, [r3, #0] 802615a: f042 7280 orr.w r2, r2, #16777216 ; 0x1000000 802615e: 601a str r2, [r3, #0] /* Wait till the main PLL is ready */ while((RCC->CR & RCC_CR_PLLRDY) == 0) 8026160: 6819 ldr r1, [r3, #0] 8026162: 4a0f ldr r2, [pc, #60] ; (80261a0 ) 8026164: 0189 lsls r1, r1, #6 8026166: d5fb bpl.n 8026160 { } /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ FLASH->ACR = FLASH_ACR_ICEN |FLASH_ACR_DCEN |FLASH_ACR_LATENCY_5WS; 8026168: 4b11 ldr r3, [pc, #68] ; (80261b0 ) 802616a: f240 6105 movw r1, #1541 ; 0x605 802616e: 6019 str r1, [r3, #0] /* Select the main PLL as system clock source */ RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW)); 8026170: 6893 ldr r3, [r2, #8] 8026172: f023 0303 bic.w r3, r3, #3 8026176: 6093 str r3, [r2, #8] RCC->CFGR |= RCC_CFGR_SW_PLL; 8026178: 6893 ldr r3, [r2, #8] 802617a: f043 0302 orr.w r3, r3, #2 802617e: 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); 8026180: 6891 ldr r1, [r2, #8] 8026182: 4b07 ldr r3, [pc, #28] ; (80261a0 ) 8026184: f001 010c and.w r1, r1, #12 8026188: 2908 cmp r1, #8 802618a: d1f9 bne.n 8026180 { } /* Добавил переход на внутренний генератор в Ñлучае отказа HSE */ RCC->CR|=RCC_CR_CSSON; 802618c: 681a ldr r2, [r3, #0] 802618e: f442 2200 orr.w r2, r2, #524288 ; 0x80000 8026192: 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 */ 8026194: 4b07 ldr r3, [pc, #28] ; (80261b4 ) 8026196: f04f 6200 mov.w r2, #134217728 ; 0x8000000 802619a: 609a str r2, [r3, #8] #endif } 802619c: b002 add sp, #8 802619e: 4770 bx lr 80261a0: 40023800 .word 0x40023800 80261a4: 24003010 .word 0x24003010 80261a8: 40007000 .word 0x40007000 80261ac: 07405419 .word 0x07405419 80261b0: 40023c00 .word 0x40023c00 80261b4: e000ed00 .word 0xe000ed00 080261b8 : 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; 80261b8: 004b lsls r3, r1, #1 port->MODER &= ~(GPIO_MODER_MASK << shift); 80261ba: 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) { 80261bc: b570 push {r4, r5, r6, lr} uint8_t shift; shift = pin * 2; port->MODER &= ~(GPIO_MODER_MASK << shift); 80261be: 2403 movs r4, #3 80261c0: 6805 ldr r5, [r0, #0] 80261c2: fa04 f403 lsl.w r4, r4, r3 80261c6: 43e4 mvns r4, r4 80261c8: 4025 ands r5, r4 80261ca: 6005 str r5, [r0, #0] port->MODER |= (uint32_t)((conf >> GPIO_MODE_CFG_SHIFT) & GPIO_MODER_MASK) << shift; 80261cc: 6806 ldr r6, [r0, #0] 80261ce: f002 0503 and.w r5, r2, #3 80261d2: fa05 f503 lsl.w r5, r5, r3 80261d6: 4335 orrs r5, r6 80261d8: 6005 str r5, [r0, #0] port->OTYPER &= ~(GPIO_TYPER_MASK << pin); 80261da: 6846 ldr r6, [r0, #4] 80261dc: 2501 movs r5, #1 80261de: fa05 f501 lsl.w r5, r5, r1 80261e2: ea26 0505 bic.w r5, r6, r5 80261e6: 6045 str r5, [r0, #4] port->OTYPER |= (uint32_t)((conf >> GPIO_TYPE_CFG_SHIFT) & GPIO_TYPER_MASK) << pin; 80261e8: 6845 ldr r5, [r0, #4] 80261ea: f3c2 0680 ubfx r6, r2, #2, #1 80261ee: fa06 f101 lsl.w r1, r6, r1 80261f2: 4329 orrs r1, r5 80261f4: 6041 str r1, [r0, #4] port->OSPEEDR &= ~(GPIO_SPEEDR_MASK << shift); 80261f6: 6881 ldr r1, [r0, #8] 80261f8: 4021 ands r1, r4 80261fa: 6081 str r1, [r0, #8] port->OSPEEDR |= (uint32_t)((conf >> GPIO_SPEED_CFG_SHIFT) & GPIO_SPEEDR_MASK) << shift; 80261fc: 6885 ldr r5, [r0, #8] 80261fe: f3c2 1101 ubfx r1, r2, #4, #2 8026202: fa01 f103 lsl.w r1, r1, r3 8026206: 4329 orrs r1, r5 8026208: 6081 str r1, [r0, #8] port->PUPDR &= ~(GPIO_PUPDR_MASK << shift); 802620a: 68c1 ldr r1, [r0, #12] 802620c: 400c ands r4, r1 802620e: 60c4 str r4, [r0, #12] port->PUPDR |= (uint32_t)((conf >> GPIO_PUPD_CFG_SHIFT) & GPIO_PUPDR_MASK) << shift; 8026210: 68c1 ldr r1, [r0, #12] 8026212: f3c2 1281 ubfx r2, r2, #6, #2 8026216: fa02 f303 lsl.w r3, r2, r3 802621a: 430b orrs r3, r1 802621c: 60c3 str r3, [r0, #12] 802621e: bd70 pop {r4, r5, r6, pc} 08026220 : } void gpio_connect_af(gpio_t id, uint8_t af_n) { 8026220: b510 push {r4, lr} gpio_pindef_t *pin = &gpio_pins[id]; 8026222: 4b13 ldr r3, [pc, #76] ; (8026270 ) 8026224: 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); 8026228: 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) { 802622c: 7912 ldrb r2, [r2, #4] 802622e: 2a07 cmp r2, #7 8026230: d80e bhi.n 8026250 shift = pin->pin * 4; 8026232: 0092 lsls r2, r2, #2 pin->port->AFR[0] &= ~((uint32_t)GPIO_AFR_MASK << shift); 8026234: 6a1c ldr r4, [r3, #32] 8026236: b2d2 uxtb r2, r2 8026238: 200f movs r0, #15 802623a: fa00 f002 lsl.w r0, r0, r2 802623e: ea24 0000 bic.w r0, r4, r0 8026242: 6218 str r0, [r3, #32] pin->port->AFR[0] |= af_n << shift; 8026244: 6a18 ldr r0, [r3, #32] 8026246: fa01 f202 lsl.w r2, r1, r2 802624a: 4302 orrs r2, r0 802624c: 621a str r2, [r3, #32] 802624e: bd10 pop {r4, pc} } else { shift = (pin->pin - 8) * 4; 8026250: 3a08 subs r2, #8 8026252: 0092 lsls r2, r2, #2 pin->port->AFR[1] &= ~((uint32_t)GPIO_AFR_MASK << shift); 8026254: 6a5c ldr r4, [r3, #36] ; 0x24 8026256: b2d2 uxtb r2, r2 8026258: 200f movs r0, #15 802625a: fa00 f002 lsl.w r0, r0, r2 802625e: ea24 0000 bic.w r0, r4, r0 8026262: 6258 str r0, [r3, #36] ; 0x24 pin->port->AFR[1] |= af_n << shift; 8026264: 6a58 ldr r0, [r3, #36] ; 0x24 8026266: fa01 f202 lsl.w r2, r1, r2 802626a: 4302 orrs r2, r0 802626c: 625a str r2, [r3, #36] ; 0x24 802626e: bd10 pop {r4, pc} 8026270: 200005c0 .word 0x200005c0 08026274 : } } } void gpio_set(gpio_t pin, bool value) { if (gpio_pins[pin].flags & GPIO_INV) 8026274: 4b0e ldr r3, [pc, #56] ; (80262b0 ) 8026276: eb03 02c0 add.w r2, r3, r0, lsl #3 802627a: 88d2 ldrh r2, [r2, #6] 802627c: f002 0210 and.w r2, r2, #16 8026280: b292 uxth r2, r2 8026282: b10a cbz r2, 8026288 value = !value; 8026284: f081 0101 eor.w r1, r1, #1 8026288: 00c2 lsls r2, r0, #3 if (value) 802628a: b141 cbz r1, 802629e gpio_pins[pin].port->BSRRL = 1 << gpio_pins[pin].pin; 802628c: f853 1030 ldr.w r1, [r3, r0, lsl #3] 8026290: 189b adds r3, r3, r2 8026292: 2201 movs r2, #1 8026294: 791b ldrb r3, [r3, #4] 8026296: fa02 f303 lsl.w r3, r2, r3 802629a: 830b strh r3, [r1, #24] 802629c: 4770 bx lr else gpio_pins[pin].port->BSRRH = 1 << gpio_pins[pin].pin; 802629e: f853 1030 ldr.w r1, [r3, r0, lsl #3] 80262a2: 189b adds r3, r3, r2 80262a4: 2201 movs r2, #1 80262a6: 791b ldrb r3, [r3, #4] 80262a8: fa02 f303 lsl.w r3, r2, r3 80262ac: 834b strh r3, [r1, #26] 80262ae: 4770 bx lr 80262b0: 200005c0 .word 0x200005c0 080262b4 : } /* * TODO add analog flag and setup ADC pins in a proper way */ static void gpio_set_config(gpio_t id) { 80262b4: b570 push {r4, r5, r6, lr} gpio_pindef_t *pin = &gpio_pins[id]; 80262b6: 4e1e ldr r6, [pc, #120] ; (8026330 ) 80262b8: 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) { 80262bc: 4604 mov r4, r0 gpio_pindef_t *pin = &gpio_pins[id]; if (pin->flags & GPIO_AF) { 80262be: 88e9 ldrh r1, [r5, #6] 80262c0: f401 7300 and.w r3, r1, #512 ; 0x200 80262c4: b29b uxth r3, r3 80262c6: b13b cbz r3, 80262d8 uint8_t af_n = (uint8_t)(pin->flags >> _GPIO_AF_SHIFT); gpio_connect_af(id, af_n); 80262c8: 0a89 lsrs r1, r1, #10 80262ca: f7ff ffa9 bl 8026220 gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_AF_CFG | 80262ce: f856 0034 ldr.w r0, [r6, r4, lsl #3] 80262d2: 7929 ldrb r1, [r5, #4] 80262d4: 2232 movs r2, #50 ; 0x32 80262d6: e005 b.n 80262e4 GPIO_SPEED_HIGH_CFG); } else if (pin->flags & GPIO_IN) 80262d8: 07cb lsls r3, r1, #31 80262da: d507 bpl.n 80262ec gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_IN_CFG | 80262dc: f856 0030 ldr.w r0, [r6, r0, lsl #3] 80262e0: 7929 ldrb r1, [r5, #4] 80262e2: 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); } } 80262e4: 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 | 80262e8: f7ff bf66 b.w 80261b8 GPIO_SPEED_HIGH_CFG); else if (pin->flags & GPIO_IN_PU) { 80262ec: f001 0302 and.w r3, r1, #2 80262f0: b29b uxth r3, r3 80262f2: b123 cbz r3, 80262fe gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_IN_CFG | GPIO_PU_CFG | 80262f4: f856 0030 ldr.w r0, [r6, r0, lsl #3] 80262f8: 7929 ldrb r1, [r5, #4] 80262fa: 2270 movs r2, #112 ; 0x70 80262fc: e00d b.n 802631a GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); } else if (pin->flags & GPIO_OUT) { 80262fe: f001 0304 and.w r3, r1, #4 8026302: b29b uxth r3, r3 8026304: b19b cbz r3, 802632e gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_OUT_CFG | 8026306: f001 0120 and.w r1, r1, #32 802630a: b28a uxth r2, r1 802630c: f856 0030 ldr.w r0, [r6, r0, lsl #3] 8026310: 7929 ldrb r1, [r5, #4] 8026312: 2a00 cmp r2, #0 8026314: bf0c ite eq 8026316: 2231 moveq r2, #49 ; 0x31 8026318: 2235 movne r2, #53 ; 0x35 802631a: f7ff ff4d bl 80261b8 ((pin->flags & GPIO_OD) ? GPIO_TYPE_OD_CFG : GPIO_TYPE_PP_CFG) | GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); 802631e: 88e9 ldrh r1, [r5, #6] 8026320: 4620 mov r0, r4 8026322: f3c1 01c0 ubfx r1, r1, #3, #1 } } 8026326: 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); 802632a: f7ff bfa3 b.w 8026274 802632e: bd70 pop {r4, r5, r6, pc} 8026330: 200005c0 .word 0x200005c0 08026334 : } } void gpio_init(void) { 8026334: b538 push {r3, r4, r5, lr} uint32_t i; GPIO_DeInit(GPIOA); 8026336: 4812 ldr r0, [pc, #72] ; (8026380 ) GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); } } void gpio_init(void) { 8026338: 4d12 ldr r5, [pc, #72] ; (8026384 ) uint32_t i; GPIO_DeInit(GPIOA); 802633a: f7ff fa0b bl 8025754 GPIO_DeInit(GPIOB); 802633e: 4812 ldr r0, [pc, #72] ; (8026388 ) 8026340: f7ff fa08 bl 8025754 GPIO_DeInit(GPIOC); 8026344: 4811 ldr r0, [pc, #68] ; (802638c ) 8026346: f7ff fa05 bl 8025754 GPIO_DeInit(GPIOD); 802634a: 4811 ldr r0, [pc, #68] ; (8026390 ) 802634c: f7ff fa02 bl 8025754 GPIO_DeInit(GPIOE); 8026350: 4810 ldr r0, [pc, #64] ; (8026394 ) 8026352: f7ff f9ff bl 8025754 // configure clocks RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN | RCC_AHB1ENR_GPIOBEN | 8026356: 4b10 ldr r3, [pc, #64] ; (8026398 ) 8026358: 6b1a ldr r2, [r3, #48] ; 0x30 802635a: f042 021f orr.w r2, r2, #31 802635e: 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++) { 8026360: 2400 movs r4, #0 GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); } } void gpio_init(void) { 8026362: 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) 8026366: 88db ldrh r3, [r3, #6] 8026368: f003 0380 and.w r3, r3, #128 ; 0x80 802636c: b29b uxth r3, r3 802636e: b913 cbnz r3, 8026376 continue; else { gpio_set_config(i); 8026370: b2e0 uxtb r0, r4 8026372: f7ff ff9f bl 80262b4 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++) { 8026376: 3401 adds r4, #1 8026378: 2c11 cmp r4, #17 802637a: d1f2 bne.n 8026362 continue; else { gpio_set_config(i); } } } 802637c: bd38 pop {r3, r4, r5, pc} 802637e: bf00 nop 8026380: 40020000 .word 0x40020000 8026384: 200005c0 .word 0x200005c0 8026388: 40020400 .word 0x40020400 802638c: 40020800 .word 0x40020800 8026390: 40020c00 .word 0x40020c00 8026394: 40021000 .word 0x40021000 8026398: 40023800 .word 0x40023800 0802639c : 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; 802639c: 4a06 ldr r2, [pc, #24] ; (80263b8 ) 802639e: f852 3030 ldr.w r3, [r2, r0, lsl #3] 80263a2: eb02 02c0 add.w r2, r2, r0, lsl #3 80263a6: 6959 ldr r1, [r3, #20] 80263a8: 7912 ldrb r2, [r2, #4] 80263aa: 2001 movs r0, #1 80263ac: fa00 f202 lsl.w r2, r0, r2 80263b0: 404a eors r2, r1 80263b2: 615a str r2, [r3, #20] 80263b4: 4770 bx lr 80263b6: bf00 nop 80263b8: 200005c0 .word 0x200005c0 080263bc : } bool gpio_get(gpio_t pin) { bool value; if (gpio_pins[pin].flags & GPIO_NOINIT) { 80263bc: 490e ldr r1, [pc, #56] ; (80263f8 ) 80263be: 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) { 80263c2: b510 push {r4, lr} bool value; if (gpio_pins[pin].flags & GPIO_NOINIT) { 80263c4: 88d3 ldrh r3, [r2, #6] 80263c6: f003 0480 and.w r4, r3, #128 ; 0x80 80263ca: b2a4 uxth r4, r4 80263cc: b994 cbnz r4, 80263f4 return false; } else { value = (gpio_pins[pin].port->IDR & (1 << gpio_pins[pin].pin)) >> gpio_pins[pin].pin; 80263ce: f851 1030 ldr.w r1, [r1, r0, lsl #3] 80263d2: 7912 ldrb r2, [r2, #4] 80263d4: 6908 ldr r0, [r1, #16] 80263d6: 2101 movs r1, #1 80263d8: fa01 f102 lsl.w r1, r1, r2 80263dc: 4001 ands r1, r0 return (gpio_pins[pin].flags & GPIO_INV) ? !value : value; 80263de: 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; 80263e2: 40d1 lsrs r1, r2 return (gpio_pins[pin].flags & GPIO_INV) ? !value : value; 80263e4: 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; 80263e6: bf0c ite eq 80263e8: 2000 moveq r0, #0 80263ea: 2001 movne r0, #1 return (gpio_pins[pin].flags & GPIO_INV) ? !value : value; 80263ec: b11b cbz r3, 80263f6 80263ee: f080 0001 eor.w r0, r0, #1 80263f2: bd10 pop {r4, pc} } bool gpio_get(gpio_t pin) { bool value; if (gpio_pins[pin].flags & GPIO_NOINIT) { return false; 80263f4: 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; } } 80263f6: bd10 pop {r4, pc} 80263f8: 200005c0 .word 0x200005c0 080263fc : #include "rng.h" #include "stm32f4xx.h" void RNG_Init(void) { 80263fc: b508 push {r3, lr} RCC_AHB2PeriphClockCmd(RCC_AHB2Periph_RNG,ENABLE); 80263fe: 2040 movs r0, #64 ; 0x40 8026400: 2101 movs r1, #1 8026402: f7ff faff bl 8025a04 RNG_Cmd(ENABLE); 8026406: 2001 movs r0, #1 } 8026408: e8bd 4008 ldmia.w sp!, {r3, lr} void RNG_Init(void) { RCC_AHB2PeriphClockCmd(RCC_AHB2Periph_RNG,ENABLE); RNG_Cmd(ENABLE); 802640c: f7ff bb56 b.w 8025abc 08026410 : } uint32_t GetRandomNumber(void) { return RNG_GetRandomNumber();; 8026410: f7ff bb60 b.w 8025ad4 08026414 : /* УÑтанавливаем новое Ð²Ñ€ÐµÐ¼Ñ */ 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) { 8026414: 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) { 8026418: 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) { 802641a: 4603 mov r3, r0 802641c: 460e mov r6, r1 802641e: 79c0 ldrb r0, [r0, #7] TM_RTC_t tmp; /* Check date and time validation */ if (format == TM_RTC_Format_BCD) { 8026420: d137 bne.n 8026492 tmp.date = TM_RTC_BCD2BIN(data->date); tmp.month = TM_RTC_BCD2BIN(data->month); 8026422: 7a1c ldrb r4, [r3, #8] tmp.year = TM_RTC_BCD2BIN(data->year); 8026424: 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); 8026426: 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); 802642a: 220a movs r2, #10 802642c: 0901 lsrs r1, r0, #4 802642e: f000 000f and.w r0, r0, #15 8026432: fb02 0001 mla r0, r2, r1, r0 tmp.month = TM_RTC_BCD2BIN(data->month); 8026436: 0921 lsrs r1, r4, #4 8026438: f004 040f and.w r4, r4, #15 802643c: fb02 4101 mla r1, r2, r1, r4 tmp.year = TM_RTC_BCD2BIN(data->year); 8026440: 092c lsrs r4, r5, #4 8026442: f005 050f and.w r5, r5, #15 8026446: fb02 5404 mla r4, r2, r4, r5 tmp.hours = TM_RTC_BCD2BIN(data->hours); 802644a: 795d ldrb r5, [r3, #5] 802644c: ea4f 1c15 mov.w ip, r5, lsr #4 8026450: f005 050f and.w r5, r5, #15 8026454: fb02 5c0c mla ip, r2, ip, r5 tmp.minutes = TM_RTC_BCD2BIN(data->minutes); 8026458: 791d ldrb r5, [r3, #4] 802645a: 092f lsrs r7, r5, #4 802645c: f005 050f and.w r5, r5, #15 8026460: fb02 5707 mla r7, r2, r7, r5 tmp.seconds = TM_RTC_BCD2BIN(data->seconds); 8026464: ea4f 1518 mov.w r5, r8, lsr #4 8026468: f008 080f and.w r8, r8, #15 802646c: fb02 8505 mla r5, r2, r5, r8 tmp.day = TM_RTC_BCD2BIN(data->day); 8026470: f893 8006 ldrb.w r8, [r3, #6] 8026474: ea4f 1918 mov.w r9, r8, lsr #4 8026478: f008 080f and.w r8, r8, #15 802647c: 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); 8026480: b2c0 uxtb r0, r0 tmp.month = TM_RTC_BCD2BIN(data->month); 8026482: b2c9 uxtb r1, r1 tmp.year = TM_RTC_BCD2BIN(data->year); 8026484: b2e4 uxtb r4, r4 tmp.hours = TM_RTC_BCD2BIN(data->hours); 8026486: fa5f fc8c uxtb.w ip, ip tmp.minutes = TM_RTC_BCD2BIN(data->minutes); 802648a: b2ff uxtb r7, r7 tmp.seconds = TM_RTC_BCD2BIN(data->seconds); 802648c: b2ed uxtb r5, r5 tmp.day = TM_RTC_BCD2BIN(data->day); 802648e: b2d2 uxtb r2, r2 8026490: e006 b.n 80264a0 } else { tmp.date = data->date; tmp.month = data->month; 8026492: 7a19 ldrb r1, [r3, #8] tmp.year = data->year; 8026494: 7a5c ldrb r4, [r3, #9] tmp.hours = data->hours; 8026496: f893 c005 ldrb.w ip, [r3, #5] tmp.minutes = data->minutes; 802649a: 791f ldrb r7, [r3, #4] tmp.seconds = data->seconds; 802649c: 781d ldrb r5, [r3, #0] tmp.day = data->day; 802649e: 799a ldrb r2, [r3, #6] } /* Check year and month */ if ( 80264a0: 2c63 cmp r4, #99 ; 0x63 80264a2: d86c bhi.n 802657e tmp.year > 99 || 80264a4: 2900 cmp r1, #0 80264a6: d06a beq.n 802657e tmp.month == 0 || 80264a8: 290c cmp r1, #12 80264aa: d868 bhi.n 802657e tmp.month > 12 || 80264ac: 2800 cmp r0, #0 80264ae: d066 beq.n 802657e tmp.date == 0 || tmp.date > TM_RTC_Months[TM_RTC_LEAP_YEAR(2000 + tmp.year) ? 1 : 0][tmp.month - 1] || 80264b0: f014 0f03 tst.w r4, #3 80264b4: d10a bne.n 80264cc 80264b6: f504 69fa add.w r9, r4, #2000 ; 0x7d0 80264ba: f04f 0864 mov.w r8, #100 ; 0x64 80264be: fb99 faf8 sdiv sl, r9, r8 80264c2: fb08 981a mls r8, r8, sl, r9 80264c6: f1b8 0f00 cmp.w r8, #0 80264ca: d10c bne.n 80264e6 80264cc: f504 64fa add.w r4, r4, #2000 ; 0x7d0 80264d0: f44f 78c8 mov.w r8, #400 ; 0x190 80264d4: fb94 f9f8 sdiv r9, r4, r8 80264d8: fb08 4419 mls r4, r8, r9, r4 80264dc: f1d4 0401 rsbs r4, r4, #1 80264e0: bf38 it cc 80264e2: 2400 movcc r4, #0 80264e4: e000 b.n 80264e8 80264e6: 2401 movs r4, #1 80264e8: f8df 80a8 ldr.w r8, [pc, #168] ; 8026594 80264ec: f04f 090c mov.w r9, #12 80264f0: fb09 8404 mla r4, r9, r4, r8 80264f4: 1861 adds r1, r4, r1 /* Check year and month */ if ( tmp.year > 99 || tmp.month == 0 || tmp.month > 12 || tmp.date == 0 || 80264f6: f811 1c01 ldrb.w r1, [r1, #-1] 80264fa: 4281 cmp r1, r0 80264fc: d33f bcc.n 802657e tmp.date > TM_RTC_Months[TM_RTC_LEAP_YEAR(2000 + tmp.year) ? 1 : 0][tmp.month - 1] || 80264fe: f1bc 0f17 cmp.w ip, #23 8026502: d83c bhi.n 802657e tmp.hours > 23 || 8026504: 2f3b cmp r7, #59 ; 0x3b 8026506: d83a bhi.n 802657e tmp.minutes > 59 || 8026508: 2d3b cmp r5, #59 ; 0x3b 802650a: d838 bhi.n 802657e tmp.seconds > 59 || 802650c: 2a00 cmp r2, #0 802650e: d036 beq.n 802657e tmp.day == 0 || 8026510: 2a07 cmp r2, #7 8026512: d834 bhi.n 802657e /* Invalid date */ return TM_RTC_Result_Error; } /* Fill time */ RTC_TimeStruct.RTC_Hours = data->hours; 8026514: 795a ldrb r2, [r3, #5] 8026516: 4d1b ldr r5, [pc, #108] ; (8026584 ) RTC_TimeStruct.RTC_Minutes = data->minutes; RTC_TimeStruct.RTC_Seconds = data->seconds; /* Fill date */ RTC_DateStruct.RTC_Date = data->date; 8026518: 4c1b ldr r4, [pc, #108] ; (8026588 ) /* Invalid date */ return TM_RTC_Result_Error; } /* Fill time */ RTC_TimeStruct.RTC_Hours = data->hours; 802651a: 702a strb r2, [r5, #0] RTC_TimeStruct.RTC_Minutes = data->minutes; 802651c: 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; 802651e: 481b ldr r0, [pc, #108] ; (802658c ) return TM_RTC_Result_Error; } /* Fill time */ RTC_TimeStruct.RTC_Hours = data->hours; RTC_TimeStruct.RTC_Minutes = data->minutes; 8026520: 706a strb r2, [r5, #1] RTC_TimeStruct.RTC_Seconds = data->seconds; 8026522: 781a ldrb r2, [r3, #0] 8026524: 70aa strb r2, [r5, #2] /* Fill date */ RTC_DateStruct.RTC_Date = data->date; 8026526: 79da ldrb r2, [r3, #7] 8026528: 70a2 strb r2, [r4, #2] RTC_DateStruct.RTC_Month = data->month; 802652a: 7a1a ldrb r2, [r3, #8] 802652c: 7062 strb r2, [r4, #1] RTC_DateStruct.RTC_Year = data->year; 802652e: 7a5a ldrb r2, [r3, #9] RTC_DateStruct.RTC_WeekDay = data->day; 8026530: 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; 8026532: 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; 8026534: 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; 8026536: 2700 movs r7, #0 RTC_InitStruct.RTC_AsynchPrediv = RTC_ASYNC_PREDIV; 8026538: 6042 str r2, [r0, #4] RTC_InitStruct.RTC_SynchPrediv = RTC_SYNC_PREDIV; 802653a: 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; 802653e: 7023 strb r3, [r4, #0] /* Set the RTC time base to 1s and hours format to 24h */ RTC_InitStruct.RTC_HourFormat = RTC_HourFormat_24; 8026540: 6007 str r7, [r0, #0] RTC_InitStruct.RTC_AsynchPrediv = RTC_ASYNC_PREDIV; RTC_InitStruct.RTC_SynchPrediv = RTC_SYNC_PREDIV; 8026542: 6082 str r2, [r0, #8] RTC_Init(&RTC_InitStruct); 8026544: f7ff fb08 bl 8025b58 /* Set time */ if (format == TM_RTC_Format_BCD) { 8026548: 2e01 cmp r6, #1 802654a: d105 bne.n 8026558 RTC_SetTime(RTC_Format_BCD, &RTC_TimeStruct); 802654c: 4630 mov r0, r6 802654e: 4629 mov r1, r5 8026550: f7ff fb46 bl 8025be0 RTC_SetTime(RTC_Format_BIN, &RTC_TimeStruct); } /* Set date */ if (format == TM_RTC_Format_BCD) { RTC_SetDate(RTC_Format_BCD, &RTC_DateStruct); 8026554: 4630 mov r0, r6 8026556: e004 b.n 8026562 /* Set time */ if (format == TM_RTC_Format_BCD) { RTC_SetTime(RTC_Format_BCD, &RTC_TimeStruct); } else { RTC_SetTime(RTC_Format_BIN, &RTC_TimeStruct); 8026558: 4638 mov r0, r7 802655a: 4629 mov r1, r5 802655c: f7ff fb40 bl 8025be0 /* Set date */ if (format == TM_RTC_Format_BCD) { RTC_SetDate(RTC_Format_BCD, &RTC_DateStruct); } else { RTC_SetDate(RTC_Format_BIN, &RTC_DateStruct); 8026560: 4638 mov r0, r7 8026562: 4621 mov r1, r4 8026564: f7ff fbaa bl 8025cbc } if (TM_RTC_Status != RTC_STATUS_ZERO) { 8026568: 4b09 ldr r3, [pc, #36] ; (8026590 ) 802656a: 6818 ldr r0, [r3, #0] 802656c: b140 cbz r0, 8026580 /* Write backup registers */ RTC_WriteBackupRegister(RTC_STATUS_REG, RTC_STATUS_TIME_OK); 802656e: 2013 movs r0, #19 8026570: f244 3121 movw r1, #17185 ; 0x4321 8026574: f7ff fc0c bl 8025d90 } /* Return OK */ return TM_RTC_Result_Ok; 8026578: 2000 movs r0, #0 802657a: 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; 802657e: 2001 movs r0, #1 RTC_WriteBackupRegister(RTC_STATUS_REG, RTC_STATUS_TIME_OK); } /* Return OK */ return TM_RTC_Result_Ok; } 8026580: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 8026584: 2000c810 .word 0x2000c810 8026588: 2000c820 .word 0x2000c820 802658c: 2000c814 .word 0x2000c814 8026590: 20000b04 .word 0x20000b04 8026594: 20000648 .word 0x20000648 08026598 : TM_RTC_Result_t TM_RTC_SetDateTimeString(char* str) { 8026598: b530 push {r4, r5, lr} TM_RTC_t tmp; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802659a: 2200 movs r2, #0 /* Return OK */ return TM_RTC_Result_Ok; } TM_RTC_Result_t TM_RTC_SetDateTimeString(char* str) { 802659c: b085 sub sp, #20 TM_RTC_t tmp; uint8_t i = 0; 802659e: 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)); 80265a0: 250a movs r5, #10 TM_RTC_t tmp; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80265a2: e006 b.n 80265b2 tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80265a4: fb05 1202 mla r2, r5, r2, r1 80265a8: 3a30 subs r2, #48 ; 0x30 i++; 80265aa: 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)); 80265ac: f002 02ff and.w r2, r2, #255 ; 0xff i++; 80265b0: b2db uxtb r3, r3 TM_RTC_t tmp; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80265b2: 5cc1 ldrb r1, [r0, r3] 80265b4: f1a1 0430 sub.w r4, r1, #48 ; 0x30 80265b8: 2c09 cmp r4, #9 80265ba: d9f3 bls.n 80265a4 tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 80265bc: 3301 adds r3, #1 80265be: f88d 2007 strb.w r2, [sp, #7] 80265c2: b2db uxtb r3, r3 /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80265c4: 2200 movs r2, #0 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80265c6: 250a movs r5, #10 } i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80265c8: e006 b.n 80265d8 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80265ca: fb05 1202 mla r2, r5, r2, r1 80265ce: 3a30 subs r2, #48 ; 0x30 i++; 80265d0: 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)); 80265d2: f002 02ff and.w r2, r2, #255 ; 0xff i++; 80265d6: b2db uxtb r3, r3 } i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80265d8: 5cc1 ldrb r1, [r0, r3] 80265da: f1a1 0430 sub.w r4, r1, #48 ; 0x30 80265de: 2c09 cmp r4, #9 80265e0: d9f3 bls.n 80265ca tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 80265e2: 3301 adds r3, #1 80265e4: f88d 2008 strb.w r2, [sp, #8] 80265e8: b2db uxtb r3, r3 /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80265ea: 2200 movs r2, #0 tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80265ec: 250a movs r5, #10 } i++; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80265ee: e006 b.n 80265fe tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80265f0: fb05 1202 mla r2, r5, r2, r1 80265f4: 3a30 subs r2, #48 ; 0x30 i++; 80265f6: 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)); 80265f8: f002 02ff and.w r2, r2, #255 ; 0xff i++; 80265fc: b2db uxtb r3, r3 } i++; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80265fe: 5cc1 ldrb r1, [r0, r3] 8026600: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026604: 2c09 cmp r4, #9 8026606: d9f3 bls.n 80265f0 tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 8026608: 3301 adds r3, #1 802660a: f88d 2009 strb.w r2, [sp, #9] 802660e: b2db uxtb r3, r3 /* Get day in a week */ tmp.day = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026610: 2200 movs r2, #0 tmp.day = tmp.day * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026612: 250a movs r5, #10 } i++; /* Get day in a week */ tmp.day = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026614: e006 b.n 8026624 tmp.day = tmp.day * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026616: fb05 1202 mla r2, r5, r2, r1 802661a: 3a30 subs r2, #48 ; 0x30 i++; 802661c: 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)); 802661e: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026622: b2db uxtb r3, r3 } i++; /* Get day in a week */ tmp.day = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026624: 5cc1 ldrb r1, [r0, r3] 8026626: f1a1 0430 sub.w r4, r1, #48 ; 0x30 802662a: 2c09 cmp r4, #9 802662c: d9f3 bls.n 8026616 tmp.day = tmp.day * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 802662e: 3301 adds r3, #1 8026630: f88d 2006 strb.w r2, [sp, #6] 8026634: b2db uxtb r3, r3 /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026636: 2200 movs r2, #0 tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026638: 250a movs r5, #10 } i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802663a: e006 b.n 802664a tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802663c: fb05 1202 mla r2, r5, r2, r1 8026640: 3a30 subs r2, #48 ; 0x30 i++; 8026642: 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)); 8026644: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026648: b2db uxtb r3, r3 } i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802664a: 5cc1 ldrb r1, [r0, r3] 802664c: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026650: 2c09 cmp r4, #9 8026652: d9f3 bls.n 802663c tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 8026654: 3301 adds r3, #1 8026656: f88d 2005 strb.w r2, [sp, #5] 802665a: b2db uxtb r3, r3 /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802665c: 2200 movs r2, #0 tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802665e: 250a movs r5, #10 } i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026660: e006 b.n 8026670 tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026662: fb05 1202 mla r2, r5, r2, r1 8026666: 3a30 subs r2, #48 ; 0x30 i++; 8026668: 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)); 802666a: f002 02ff and.w r2, r2, #255 ; 0xff i++; 802666e: b2db uxtb r3, r3 } i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026670: 5cc1 ldrb r1, [r0, r3] 8026672: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026676: 2c09 cmp r4, #9 8026678: d9f3 bls.n 8026662 tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 802667a: 3301 adds r3, #1 802667c: f88d 2004 strb.w r2, [sp, #4] 8026680: b2db uxtb r3, r3 /* Get seconds */ tmp.seconds = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026682: 2200 movs r2, #0 tmp.seconds = tmp.seconds * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026684: 250a movs r5, #10 } i++; /* Get seconds */ tmp.seconds = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026686: e006 b.n 8026696 tmp.seconds = tmp.seconds * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026688: fb05 1202 mla r2, r5, r2, r1 802668c: 3a30 subs r2, #48 ; 0x30 i++; 802668e: 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)); 8026690: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026694: b2db uxtb r3, r3 } i++; /* Get seconds */ tmp.seconds = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026696: 5cc1 ldrb r1, [r0, r3] 8026698: f1a1 0430 sub.w r4, r1, #48 ; 0x30 802669c: 2c09 cmp r4, #9 802669e: d9f3 bls.n 8026688 80266a0: a804 add r0, sp, #16 i++; } i++; /* Return status from set date time function */ return TM_RTC_SetDateTime(&tmp, TM_RTC_Format_BIN); 80266a2: 2100 movs r1, #0 80266a4: f800 2d10 strb.w r2, [r0, #-16]! 80266a8: 4668 mov r0, sp 80266aa: f7ff feb3 bl 8026414 } 80266ae: b005 add sp, #20 80266b0: bd30 pop {r4, r5, pc} 080266b2 : 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) { 80266b2: b508 push {r3, lr} if (source == TM_RTC_ClockSource_Internal) { 80266b4: b950 cbnz r0, 80266cc /* Enable the LSI OSC */ RCC_LSICmd(ENABLE); 80266b6: 2001 movs r0, #1 80266b8: f7ff f92e bl 8025918 /* Wait till LSI is ready */ while (RCC_GetFlagStatus(RCC_FLAG_LSIRDY) == RESET); 80266bc: 2061 movs r0, #97 ; 0x61 80266be: f7ff f9e9 bl 8025a94 80266c2: 2800 cmp r0, #0 80266c4: d0fa beq.n 80266bc /* Select the RTC Clock Source */ RCC_RTCCLKConfig(RCC_RTCCLKSource_LSI); 80266c6: f44f 7000 mov.w r0, #512 ; 0x200 80266ca: e00a b.n 80266e2 } else if (source == TM_RTC_ClockSource_External) { 80266cc: 2801 cmp r0, #1 80266ce: d10a bne.n 80266e6 /* Enable the LSE OSC */ RCC_LSEConfig(RCC_LSE_ON); 80266d0: f7ff f912 bl 80258f8 /* Wait till LSE is ready */ while (RCC_GetFlagStatus(RCC_FLAG_LSERDY) == RESET); 80266d4: 2041 movs r0, #65 ; 0x41 80266d6: f7ff f9dd bl 8025a94 80266da: 2800 cmp r0, #0 80266dc: d0fa beq.n 80266d4 /* Select the RTC Clock Source */ RCC_RTCCLKConfig(RCC_RTCCLKSource_LSE); 80266de: f44f 7080 mov.w r0, #256 ; 0x100 80266e2: f7ff f965 bl 80259b0 } /* Enable the RTC Clock */ RCC_RTCCLKCmd(ENABLE); 80266e6: 2001 movs r0, #1 80266e8: f7ff f97a bl 80259e0 /* Wait for register synchronization */ RTC_WaitForSynchro(); 80266ec: f7ff fa56 bl 8025b9c /* Write status */ RTC_WriteBackupRegister(RTC_STATUS_REG, RTC_STATUS_INIT_OK); 80266f0: 2013 movs r0, #19 80266f2: f241 2134 movw r1, #4660 ; 0x1234 } 80266f6: e8bd 4008 ldmia.w sp!, {r3, lr} /* Wait for register synchronization */ RTC_WaitForSynchro(); /* Write status */ RTC_WriteBackupRegister(RTC_STATUS_REG, RTC_STATUS_INIT_OK); 80266fa: f7ff bb49 b.w 8025d90 80266fe: 0000 movs r0, r0 08026700 : /* Enable wakeup command */ RTC_WakeUpCmd(ENABLE); } } uint32_t TM_RTC_GetUnixTimeStamp(TM_RTC_t* data) { 8026700: 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); 8026704: 7a42 ldrb r2, [r0, #9] 8026706: f240 73b2 movw r3, #1970 ; 0x7b2 802670a: f502 62fa add.w r2, r2, #2000 ; 0x7d0 802670e: 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); 8026710: f44f 75c8 mov.w r5, #400 ; 0x190 8026714: 2664 movs r6, #100 ; 0x64 8026716: 079c lsls r4, r3, #30 8026718: d108 bne.n 802672c 802671a: fbb3 f4f6 udiv r4, r3, r6 802671e: fb06 3414 mls r4, r6, r4, r3 8026722: b2a4 uxth r4, r4 8026724: b114 cbz r4, 802672c 8026726: f44f 74b7 mov.w r4, #366 ; 0x16e 802672a: e008 b.n 802673e 802672c: fbb3 f4f5 udiv r4, r3, r5 8026730: fb05 3414 mls r4, r5, r4, r3 8026734: b2a4 uxth r4, r4 8026736: 2c00 cmp r4, #0 8026738: d0f5 beq.n 8026726 802673a: 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++) { 802673e: 3301 adds r3, #1 8026740: b29b uxth r3, r3 8026742: 4293 cmp r3, r2 days += TM_RTC_DAYS_IN_YEAR(i); 8026744: 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++) { 8026746: d3e6 bcc.n 8026716 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]; 8026748: 2364 movs r3, #100 ; 0x64 802674a: fbb2 f7f3 udiv r7, r2, r3 802674e: fb03 2317 mls r3, r3, r7, r2 8026752: b29f uxth r7, r3 8026754: f44f 73c8 mov.w r3, #400 ; 0x190 8026758: fbb2 f4f3 udiv r4, r2, r3 802675c: fb03 2414 mls r4, r3, r4, r2 8026760: b2a4 uxth r4, r4 8026762: f1d4 0401 rsbs r4, r4, #1 8026766: bf38 it cc 8026768: 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++) { 802676a: 7a06 ldrb r6, [r0, #8] days += TM_RTC_Months[TM_RTC_LEAP_YEAR(year)][i - 1]; 802676c: f8df c058 ldr.w ip, [pc, #88] ; 80267c8 8026770: 2300 movs r3, #0 8026772: f002 0203 and.w r2, r2, #3 8026776: f04f 080c mov.w r8, #12 802677a: e00c b.n 8026796 802677c: b922 cbnz r2, 8026788 802677e: 2f00 cmp r7, #0 8026780: bf0c ite eq 8026782: 4625 moveq r5, r4 8026784: 2501 movne r5, #1 8026786: e000 b.n 802678a 8026788: 4625 mov r5, r4 802678a: fb08 3505 mla r5, r8, r5, r3 802678e: 3301 adds r3, #1 8026790: f81c 5005 ldrb.w r5, [ip, r5] 8026794: 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++) { 8026796: 1c5d adds r5, r3, #1 8026798: b2ad uxth r5, r5 802679a: 42b5 cmp r5, r6 802679c: d3ee bcc.n 802677c days += TM_RTC_Months[TM_RTC_LEAP_YEAR(year)][i - 1]; } /* Day starts with 1 */ days += data->date - 1; 802679e: 79c3 ldrb r3, [r0, #7] seconds = days * TM_RTC_SECONDS_PER_DAY; seconds += data->hours * TM_RTC_SECONDS_PER_HOUR; 80267a0: 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; 80267a2: 3b01 subs r3, #1 80267a4: 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; 80267a6: 7903 ldrb r3, [r0, #4] 80267a8: 009a lsls r2, r3, #2 80267aa: 019b lsls r3, r3, #6 80267ac: 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; 80267ae: f44f 6361 mov.w r3, #3600 ; 0xe10 80267b2: fb03 2304 mla r3, r3, r4, r2 seconds += data->minutes * TM_RTC_SECONDS_PER_MINUTE; seconds += data->seconds; 80267b6: 7802 ldrb r2, [r0, #0] /* seconds = days * 86400; */ return seconds; } 80267b8: 4802 ldr r0, [pc, #8] ; (80267c4 ) } /* 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; 80267ba: 189b adds r3, r3, r2 seconds += data->seconds; /* seconds = days * 86400; */ return seconds; } 80267bc: fb00 3001 mla r0, r0, r1, r3 80267c0: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80267c4: 00015180 .word 0x00015180 80267c8: 20000648 .word 0x20000648 080267cc : /* 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) { 80267cc: b538 push {r3, r4, r5, lr} 80267ce: 4604 mov r4, r0 uint32_t unix; /* Get time */ if (format == TM_RTC_Format_BIN) { 80267d0: 460d mov r5, r1 80267d2: b909 cbnz r1, 80267d8 RTC_GetTime(RTC_Format_BIN, &RTC_TimeStruct); 80267d4: 4608 mov r0, r1 80267d6: e000 b.n 80267da } else { RTC_GetTime(RTC_Format_BCD, &RTC_TimeStruct); 80267d8: 2001 movs r0, #1 80267da: 4911 ldr r1, [pc, #68] ; (8026820 ) 80267dc: f7ff fa4c bl 8025c78 } /* Format hours */ data->hours = RTC_TimeStruct.RTC_Hours; 80267e0: 4b0f ldr r3, [pc, #60] ; (8026820 ) 80267e2: 781a ldrb r2, [r3, #0] 80267e4: 7162 strb r2, [r4, #5] data->minutes = RTC_TimeStruct.RTC_Minutes; 80267e6: 785a ldrb r2, [r3, #1] data->seconds = RTC_TimeStruct.RTC_Seconds; 80267e8: 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; 80267ea: 7122 strb r2, [r4, #4] data->seconds = RTC_TimeStruct.RTC_Seconds; 80267ec: 7023 strb r3, [r4, #0] /* Get subseconds */ data->subseconds = RTC->SSR; 80267ee: 4b0d ldr r3, [pc, #52] ; (8026824 ) 80267f0: 6a9b ldr r3, [r3, #40] ; 0x28 80267f2: 8063 strh r3, [r4, #2] /* Get date */ if (format == TM_RTC_Format_BIN) { 80267f4: b90d cbnz r5, 80267fa RTC_GetDate(RTC_Format_BIN, &RTC_DateStruct); 80267f6: 4628 mov r0, r5 80267f8: e000 b.n 80267fc } else { RTC_GetDate(RTC_Format_BCD, &RTC_DateStruct); 80267fa: 2001 movs r0, #1 80267fc: 490a ldr r1, [pc, #40] ; (8026828 ) 80267fe: f7ff faa7 bl 8025d50 } /* Format date */ data->year = RTC_DateStruct.RTC_Year; 8026802: 4b09 ldr r3, [pc, #36] ; (8026828 ) 8026804: 78da ldrb r2, [r3, #3] 8026806: 7262 strb r2, [r4, #9] data->month = RTC_DateStruct.RTC_Month; 8026808: 785a ldrb r2, [r3, #1] 802680a: 7222 strb r2, [r4, #8] data->date = RTC_DateStruct.RTC_Date; 802680c: 789a ldrb r2, [r3, #2] data->day = RTC_DateStruct.RTC_WeekDay; 802680e: 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; 8026810: 71e2 strb r2, [r4, #7] data->day = RTC_DateStruct.RTC_WeekDay; 8026812: 71a3 strb r3, [r4, #6] /* Calculate unix offset */ unix = TM_RTC_GetUnixTimeStamp(data); 8026814: 4620 mov r0, r4 8026816: f7ff ff73 bl 8026700 data->unix = unix; 802681a: 60e0 str r0, [r4, #12] 802681c: bd38 pop {r3, r4, r5, pc} 802681e: bf00 nop 8026820: 2000c810 .word 0x2000c810 8026824: 40002800 .word 0x40002800 8026828: 2000c820 .word 0x2000c820 0802682c : } } uint32_t TM_RTC_Init(TM_RTC_ClockSource_t source) { 802682c: 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); 802682e: 2101 movs r1, #1 } } uint32_t TM_RTC_Init(TM_RTC_ClockSource_t source) { 8026830: b085 sub sp, #20 8026832: 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); 8026834: f04f 5080 mov.w r0, #268435456 ; 0x10000000 8026838: f7ff f8f0 bl 8025a1c /* Allow access to BKP Domain */ PWR_BackupAccessCmd(ENABLE); 802683c: 2001 movs r0, #1 802683e: f7ff f855 bl 80258ec /* Get RTC status */ status = RTC_ReadBackupRegister(RTC_STATUS_REG); 8026842: 2013 movs r0, #19 8026844: f7ff fab4 bl 8025db0 if (status == RTC_STATUS_TIME_OK) 8026848: f244 3321 movw r3, #17185 ; 0x4321 802684c: 4298 cmp r0, r3 802684e: 4e25 ldr r6, [pc, #148] ; (80268e4 ) 8026850: d113 bne.n 802687a { TM_RTC_Status = RTC_STATUS_TIME_OK; 8026852: 6030 str r0, [r6, #0] /* Start internal clock if we choose internal clock */ if (source == TM_RTC_ClockSource_Internal) 8026854: b915 cbnz r5, 802685c TM_RTC_Config(TM_RTC_ClockSource_Internal); 8026856: 4628 mov r0, r5 8026858: f7ff ff2b bl 80266b2 /* Wait for RTC APB registers synchronisation (needed after start-up from Reset) */ RTC_WaitForSynchro(); 802685c: f7ff f99e bl 8025b9c /* Clear interrupt flags */ RTC_ClearITPendingBit(RTC_IT_WUT); 8026860: f44f 4080 mov.w r0, #16384 ; 0x4000 8026864: f7ff facc bl 8025e00 EXTI->PR = 0x00400000; 8026868: 4b1f ldr r3, [pc, #124] ; (80268e8 ) 802686a: f44f 0280 mov.w r2, #4194304 ; 0x400000 802686e: 615a str r2, [r3, #20] /* Get date and time */ TM_RTC_GetDateTime(&datatime, TM_RTC_Format_BIN); 8026870: 4668 mov r0, sp 8026872: 2100 movs r1, #0 8026874: f7ff ffaa bl 80267cc 8026878: e02f b.n 80268da } else if (status == RTC_STATUS_INIT_OK) 802687a: f241 2734 movw r7, #4660 ; 0x1234 802687e: 42b8 cmp r0, r7 8026880: d10f bne.n 80268a2 { TM_RTC_Status = RTC_STATUS_INIT_OK; 8026882: 6030 str r0, [r6, #0] /* Start internal clock if we choose internal clock */ if (source == TM_RTC_ClockSource_Internal) 8026884: b915 cbnz r5, 802688c TM_RTC_Config(TM_RTC_ClockSource_Internal); 8026886: 4628 mov r0, r5 8026888: f7ff ff13 bl 80266b2 /* Wait for RTC APB registers synchronisation (needed after start-up from Reset) */ RTC_WaitForSynchro(); 802688c: f7ff f986 bl 8025b9c /* Clear interrupt flags */ RTC_ClearITPendingBit(RTC_IT_WUT); 8026890: f44f 4080 mov.w r0, #16384 ; 0x4000 8026894: f7ff fab4 bl 8025e00 EXTI->PR = 0x00400000; 8026898: 4b13 ldr r3, [pc, #76] ; (80268e8 ) 802689a: f44f 0280 mov.w r2, #4194304 ; 0x400000 802689e: 615a str r2, [r3, #20] 80268a0: e01b b.n 80268da /* Get date and time */ //TM_RTC_GetDateTime(&datatime, TM_RTC_Format_BIN); } else { TM_RTC_Status = RTC_STATUS_ZERO; 80268a2: 2400 movs r4, #0 /* Return status = 0 -> RTC Never initialized before */ stat = RTC_STATUS_ZERO; /* Config RTC */ TM_RTC_Config(source); 80268a4: 4628 mov r0, r5 /* Get date and time */ //TM_RTC_GetDateTime(&datatime, TM_RTC_Format_BIN); } else { TM_RTC_Status = RTC_STATUS_ZERO; 80268a6: 6034 str r4, [r6, #0] /* Return status = 0 -> RTC Never initialized before */ stat = RTC_STATUS_ZERO; /* Config RTC */ TM_RTC_Config(source); 80268a8: f7ff ff03 bl 80266b2 datatime.day = 1; datatime.month = 1; datatime.year = 0; datatime.hours = 0; datatime.minutes = 0; datatime.seconds = 0; 80268ac: a804 add r0, sp, #16 stat = RTC_STATUS_ZERO; /* Config RTC */ TM_RTC_Config(source); /* Set date and time */ datatime.date = 1; 80268ae: 2301 movs r3, #1 datatime.day = 1; datatime.month = 1; datatime.year = 0; datatime.hours = 0; datatime.minutes = 0; datatime.seconds = 0; 80268b0: f800 4d10 strb.w r4, [r0, #-16]! /* Set date and time */ TM_RTC_SetDateTime(&datatime, TM_RTC_Format_BIN); 80268b4: 4621 mov r1, r4 80268b6: 4668 mov r0, sp stat = RTC_STATUS_ZERO; /* Config RTC */ TM_RTC_Config(source); /* Set date and time */ datatime.date = 1; 80268b8: f88d 3007 strb.w r3, [sp, #7] datatime.day = 1; 80268bc: f88d 3006 strb.w r3, [sp, #6] datatime.month = 1; 80268c0: f88d 3008 strb.w r3, [sp, #8] datatime.year = 0; 80268c4: f88d 4009 strb.w r4, [sp, #9] datatime.hours = 0; 80268c8: f88d 4005 strb.w r4, [sp, #5] datatime.minutes = 0; 80268cc: f88d 4004 strb.w r4, [sp, #4] datatime.seconds = 0; /* Set date and time */ TM_RTC_SetDateTime(&datatime, TM_RTC_Format_BIN); 80268d0: f7ff fda0 bl 8026414 /* Initialized OK */ TM_RTC_Status = RTC_STATUS_INIT_OK; 80268d4: 6037 str r7, [r6, #0] } /* If first time initialized */ if (stat == RTC_STATUS_ZERO) return 0; 80268d6: 4620 mov r0, r4 80268d8: e001 b.n 80268de return TM_RTC_Status; 80268da: 4b02 ldr r3, [pc, #8] ; (80268e4 ) 80268dc: 6818 ldr r0, [r3, #0] } 80268de: b005 add sp, #20 80268e0: bdf0 pop {r4, r5, r6, r7, pc} 80268e2: bf00 nop 80268e4: 20000b04 .word 0x20000b04 80268e8: 40013c00 .word 0x40013c00 080268ec : uint16_t year; /* Store unix time to unix in struct */ data->unix = unix; /* Get seconds from unix */ data->seconds = unix % 60; 80268ec: 233c movs r3, #60 ; 0x3c /* seconds = days * 86400; */ return seconds; } void TM_RTC_GetDateTimeFromUnix(TM_RTC_t* data, uint32_t unix) { 80268ee: 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; 80268f0: fbb1 f4f3 udiv r4, r1, r3 /* Go to minutes */ unix /= 60; /* Get minutes */ data->minutes = unix % 60; 80268f4: 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; 80268f8: 60c1 str r1, [r0, #12] /* Get seconds from unix */ data->seconds = unix % 60; 80268fa: fb03 1114 mls r1, r3, r4, r1 80268fe: 7001 strb r1, [r0, #0] /* Go to minutes */ unix /= 60; /* Get minutes */ data->minutes = unix % 60; 8026900: fb03 4312 mls r3, r3, r2, r4 /* Go to hours */ unix /= 60; /* Get hours */ data->hours = unix % 24; 8026904: 2118 movs r1, #24 /* Get seconds from unix */ data->seconds = unix % 60; /* Go to minutes */ unix /= 60; /* Get minutes */ data->minutes = unix % 60; 8026906: 7103 strb r3, [r0, #4] /* Go to hours */ unix /= 60; /* Get hours */ data->hours = unix % 24; 8026908: fbb2 f3f1 udiv r3, r2, r1 802690c: fb01 2213 mls r2, r1, r3, r2 8026910: 7142 strb r2, [r0, #5] /* Go to days */ unix /= 24; /* Get week day */ /* Monday is day one */ data->day = (unix + 3) % 7 + 1; 8026912: 1cd9 adds r1, r3, #3 8026914: 2207 movs r2, #7 8026916: fbb1 f4f2 udiv r4, r1, r2 802691a: fb02 1214 mls r2, r2, r4, r1 802691e: 3201 adds r2, #1 8026920: 7182 strb r2, [r0, #6] /* Get year */ year = 1970; while (1) { if (TM_RTC_LEAP_YEAR(year)) { if (unix >= 366) { 8026922: f240 156d movw r5, #365 ; 0x16d /* Get week day */ /* Monday is day one */ data->day = (unix + 3) % 7 + 1; /* Get year */ year = 1970; 8026926: f240 72b2 movw r2, #1970 ; 0x7b2 while (1) { if (TM_RTC_LEAP_YEAR(year)) { 802692a: f44f 71c8 mov.w r1, #400 ; 0x190 802692e: 2464 movs r4, #100 ; 0x64 8026930: f012 0603 ands.w r6, r2, #3 8026934: d105 bne.n 8026942 8026936: fbb2 f7f4 udiv r7, r2, r4 802693a: fb04 2717 mls r7, r4, r7, r2 802693e: b2bf uxth r7, r7 8026940: b92f cbnz r7, 802694e 8026942: fbb2 f7f1 udiv r7, r2, r1 8026946: fb01 2717 mls r7, r1, r7, r2 802694a: b2bf uxth r7, r7 802694c: b927 cbnz r7, 8026958 if (unix >= 366) { 802694e: 42ab cmp r3, r5 8026950: d90b bls.n 802696a unix -= 366; 8026952: f5a3 73b7 sub.w r3, r3, #366 ; 0x16e /* Get year */ year = 1970; while (1) { if (TM_RTC_LEAP_YEAR(year)) { if (unix >= 366) { 8026956: e005 b.n 8026964 unix -= 366; } else { break; } } else if (unix >= 365) { 8026958: f5b3 7fb6 cmp.w r3, #364 ; 0x16c 802695c: d905 bls.n 802696a unix -= 365; 802695e: f46f 76b6 mvn.w r6, #364 ; 0x16c 8026962: 199b adds r3, r3, r6 } else { break; } year++; 8026964: 3201 adds r2, #1 8026966: b292 uxth r2, r2 } 8026968: e7e2 b.n 8026930 /* Get year in xx format */ data->year = (uint8_t) (year - 2000); 802696a: f102 0130 add.w r1, r2, #48 ; 0x30 802696e: 7241 strb r1, [r0, #9] /* Get month */ for (data->month = 0; data->month < 12; data->month++) { 8026970: 2100 movs r1, #0 8026972: 7201 strb r1, [r0, #8] if (TM_RTC_LEAP_YEAR(year) && unix >= (uint32_t)TM_RTC_Months[1][data->month]) { 8026974: 2164 movs r1, #100 ; 0x64 8026976: fbb2 f7f1 udiv r7, r2, r1 802697a: fb01 2117 mls r1, r1, r7, r2 802697e: b28f uxth r7, r1 8026980: f44f 71c8 mov.w r1, #400 ; 0x190 8026984: fbb2 f4f1 udiv r4, r2, r1 8026988: fb01 2214 mls r2, r1, r4, r2 802698c: b292 uxth r2, r2 unix -= TM_RTC_Months[1][data->month]; } else if (unix >= (uint32_t)TM_RTC_Months[0][data->month]) { 802698e: 4c0c ldr r4, [pc, #48] ; (80269c0 ) year++; } /* Get year in xx format */ data->year = (uint8_t) (year - 2000); /* Get month */ for (data->month = 0; data->month < 12; data->month++) { 8026990: e012 b.n 80269b8 if (TM_RTC_LEAP_YEAR(year) && unix >= (uint32_t)TM_RTC_Months[1][data->month]) { 8026992: b906 cbnz r6, 8026996 8026994: b907 cbnz r7, 8026998 8026996: b922 cbnz r2, 80269a2 8026998: 1865 adds r5, r4, r1 802699a: 7b2d ldrb r5, [r5, #12] 802699c: 42ab cmp r3, r5 802699e: d300 bcc.n 80269a2 80269a0: e007 b.n 80269b2 unix -= TM_RTC_Months[1][data->month]; } else if (unix >= (uint32_t)TM_RTC_Months[0][data->month]) { 80269a2: 5c65 ldrb r5, [r4, r1] 80269a4: 42ab cmp r3, r5 80269a6: d204 bcs.n 80269b2 break; } } /* Get month */ /* Month starts with 1 */ data->month++; 80269a8: 3101 adds r1, #1 /* Get date */ /* Date starts with 1 */ data->date = unix + 1; 80269aa: 3301 adds r3, #1 break; } } /* Get month */ /* Month starts with 1 */ data->month++; 80269ac: 7201 strb r1, [r0, #8] /* Get date */ /* Date starts with 1 */ data->date = unix + 1; 80269ae: 71c3 strb r3, [r0, #7] 80269b0: 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++) { 80269b2: 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]; 80269b4: 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++) { 80269b6: 7201 strb r1, [r0, #8] 80269b8: 7a01 ldrb r1, [r0, #8] 80269ba: 290b cmp r1, #11 80269bc: d9e9 bls.n 8026992 80269be: e7f3 b.n 80269a8 80269c0: 20000648 .word 0x20000648 80269c4: 00000000 .word 0x00000000 080269c8 : * @brief Кореектировака времени. * @param ЧаÑовой поÑÑ * @retval */ void TM_RTC_Correction(float utc) { 80269c8: b510 push {r4, lr} 80269ca: b088 sub sp, #32 80269cc: 4604 mov r4, r0 TM_RTC_t newData; int utcSec; uint32_t unixTime; /* Получаем текущее Ð²Ñ€ÐµÐ¼Ñ */ TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 80269ce: 2100 movs r1, #0 80269d0: 4668 mov r0, sp 80269d2: f7ff fefb bl 80267cc /* РаÑÑчитываем поправку */ utcSec = (int)(3600.0*utc); 80269d6: 4620 mov r0, r4 80269d8: f7f9 fd9e bl 8020518 <__aeabi_f2d> 80269dc: a308 add r3, pc, #32 ; (adr r3, 8026a00 ) 80269de: e9d3 2300 ldrd r2, r3, [r3] 80269e2: f7f9 fded bl 80205c0 <__aeabi_dmul> 80269e6: f7fa f885 bl 8020af4 <__aeabi_d2iz> unixTime = data.unix + utcSec; 80269ea: 9903 ldr r1, [sp, #12] 80269ec: 1841 adds r1, r0, r1 /* УÑтанавливаем новое Ð²Ñ€ÐµÐ¼Ñ */ TM_RTC_GetDateTimeFromUnix(&newData, unixTime); 80269ee: a804 add r0, sp, #16 80269f0: f7ff ff7c bl 80268ec TM_RTC_SetDateTime(&newData, TM_RTC_Format_BIN); 80269f4: a804 add r0, sp, #16 80269f6: 2100 movs r1, #0 80269f8: f7ff fd0c bl 8026414 } 80269fc: b008 add sp, #32 80269fe: bd10 pop {r4, pc} 8026a00: 00000000 .word 0x00000000 8026a04: 40ac2000 .word 0x40ac2000 08026a08 : return TM_RTC_Status; } void TM_RTC_SetDataTimeUnix(uint32_t unixTime) { 8026a08: b51f push {r0, r1, r2, r3, r4, lr} 8026a0a: 4601 mov r1, r0 TM_RTC_t data; TM_RTC_GetDateTimeFromUnix(&data, unixTime); 8026a0c: 4668 mov r0, sp 8026a0e: f7ff ff6d bl 80268ec TM_RTC_SetDateTime(&data, TM_RTC_Format_BIN); 8026a12: 4668 mov r0, sp 8026a14: 2100 movs r1, #0 8026a16: f7ff fcfd bl 8026414 } 8026a1a: b005 add sp, #20 8026a1c: bd00 pop {pc} 08026a1e : /* Read data from backup register */ return *(uint32_t *)((&RTC->BKP0R) + 4 * location); } /* Callbacks */ __weak void TM_RTC_RequestHandler(void) { 8026a1e: 4770 bx lr 08026a20 : /* If user needs this function, then they should be defined separatelly in your project */ } __weak void TM_RTC_AlarmAHandler(void) { 8026a20: 4770 bx lr 08026a22 : /* If user needs this function, then they should be defined separatelly in your project */ } __weak void TM_RTC_AlarmBHandler(void) { 8026a22: 4770 bx lr 08026a24 : /* If user needs this function, then they should be defined separatelly in your project */ } /* Private RTC IRQ handlers */ void RTC_WKUP_IRQHandler(void) { 8026a24: b508 push {r3, lr} /* Check for RTC interrupt */ if (RTC_GetITStatus(RTC_IT_WUT) != RESET) { 8026a26: f44f 4080 mov.w r0, #16384 ; 0x4000 8026a2a: f7ff f9d1 bl 8025dd0 8026a2e: b128 cbz r0, 8026a3c /* Clear interrupt flags */ RTC_ClearITPendingBit(RTC_IT_WUT); 8026a30: f44f 4080 mov.w r0, #16384 ; 0x4000 8026a34: f7ff f9e4 bl 8025e00 /* Call user function */ TM_RTC_RequestHandler(); 8026a38: f7ff fff1 bl 8026a1e } /* Clear EXTI line 22 bit */ EXTI->PR = 0x00400000; 8026a3c: 4b02 ldr r3, [pc, #8] ; (8026a48 ) 8026a3e: f44f 0280 mov.w r2, #4194304 ; 0x400000 8026a42: 615a str r2, [r3, #20] 8026a44: bd08 pop {r3, pc} 8026a46: bf00 nop 8026a48: 40013c00 .word 0x40013c00 08026a4c : } void RTC_Alarm_IRQHandler(void) { 8026a4c: b508 push {r3, lr} /* RTC Alarm A check */ if (RTC_GetITStatus(RTC_IT_ALRA) != RESET) { 8026a4e: f44f 5080 mov.w r0, #4096 ; 0x1000 8026a52: f7ff f9bd bl 8025dd0 8026a56: b128 cbz r0, 8026a64 /* Clear RTC Alarm A interrupt flag */ RTC_ClearITPendingBit(RTC_IT_ALRA); 8026a58: f44f 5080 mov.w r0, #4096 ; 0x1000 8026a5c: f7ff f9d0 bl 8025e00 /* Call user function for Alarm A */ TM_RTC_AlarmAHandler(); 8026a60: f7ff ffde bl 8026a20 } /* RTC Alarm B check */ if (RTC_GetITStatus(RTC_IT_ALRB) != RESET) { 8026a64: f44f 5000 mov.w r0, #8192 ; 0x2000 8026a68: f7ff f9b2 bl 8025dd0 8026a6c: b128 cbz r0, 8026a7a /* Clear RTC Alarm A interrupt flag */ RTC_ClearITPendingBit(RTC_IT_ALRB); 8026a6e: f44f 5000 mov.w r0, #8192 ; 0x2000 8026a72: f7ff f9c5 bl 8025e00 /* Call user function for Alarm B */ TM_RTC_AlarmBHandler(); 8026a76: f7ff ffd4 bl 8026a22 } /* Clear EXTI line 17 bit */ EXTI->PR = 0x00020000; 8026a7a: 4b02 ldr r3, [pc, #8] ; (8026a84 ) 8026a7c: f44f 3200 mov.w r2, #131072 ; 0x20000 8026a80: 615a str r2, [r3, #20] 8026a82: bd08 pop {r3, pc} 8026a84: 40013c00 .word 0x40013c00 08026a88 : /** * @brief УÑтановливает Ð²Ñ€ÐµÐ¼Ñ ÑÑ€Ð°Ð±Ð°Ñ‚Ñ‹Ð²Ð°Ð½Ð¸Ñ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ð°ÐºÑ‚Ð¸ÐºÐ¸ Ñульфатации */ void RTC_SetProfTime(char *str) { 8026a88: b530 push {r4, r5, lr} uint32_t unixTime; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026a8a: 2200 movs r2, #0 /** * @brief УÑтановливает Ð²Ñ€ÐµÐ¼Ñ ÑÑ€Ð°Ð±Ð°Ñ‚Ñ‹Ð²Ð°Ð½Ð¸Ñ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ð°ÐºÑ‚Ð¸ÐºÐ¸ Ñульфатации */ void RTC_SetProfTime(char *str) { 8026a8c: b085 sub sp, #20 TM_RTC_t tmp; uint32_t unixTime; uint8_t i = 0; 8026a8e: 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)); 8026a90: 250a movs r5, #10 uint32_t unixTime; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026a92: e006 b.n 8026aa2 tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026a94: fb05 1202 mla r2, r5, r2, r1 8026a98: 3a30 subs r2, #48 ; 0x30 i++; 8026a9a: 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)); 8026a9c: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026aa0: b2db uxtb r3, r3 uint32_t unixTime; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026aa2: 5cc1 ldrb r1, [r0, r3] 8026aa4: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026aa8: 2c09 cmp r4, #9 8026aaa: d9f3 bls.n 8026a94 tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 8026aac: 3301 adds r3, #1 8026aae: f88d 2007 strb.w r2, [sp, #7] 8026ab2: b2db uxtb r3, r3 /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026ab4: 2200 movs r2, #0 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026ab6: 250a movs r5, #10 } i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026ab8: e006 b.n 8026ac8 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026aba: fb05 1202 mla r2, r5, r2, r1 8026abe: 3a30 subs r2, #48 ; 0x30 i++; 8026ac0: 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)); 8026ac2: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026ac6: b2db uxtb r3, r3 } i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026ac8: 5cc1 ldrb r1, [r0, r3] 8026aca: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026ace: 2c09 cmp r4, #9 8026ad0: d9f3 bls.n 8026aba tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } //i++; i+=3; 8026ad2: 3303 adds r3, #3 8026ad4: f88d 2008 strb.w r2, [sp, #8] 8026ad8: b2db uxtb r3, r3 /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026ada: 2200 movs r2, #0 tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026adc: 250a movs r5, #10 //i++; i+=3; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026ade: e006 b.n 8026aee tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026ae0: fb05 1202 mla r2, r5, r2, r1 8026ae4: 3a30 subs r2, #48 ; 0x30 i++; 8026ae6: 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)); 8026ae8: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026aec: b2db uxtb r3, r3 //i++; i+=3; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026aee: 5cc1 ldrb r1, [r0, r3] 8026af0: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026af4: 2c09 cmp r4, #9 8026af6: d9f3 bls.n 8026ae0 tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; i++; 8026af8: 3302 adds r3, #2 8026afa: f88d 2009 strb.w r2, [sp, #9] 8026afe: b2db uxtb r3, r3 /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026b00: 2200 movs r2, #0 tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026b02: 250a movs r5, #10 i++; i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026b04: e006 b.n 8026b14 tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026b06: fb05 1202 mla r2, r5, r2, r1 8026b0a: 3a30 subs r2, #48 ; 0x30 i++; 8026b0c: 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)); 8026b0e: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026b12: b2db uxtb r3, r3 i++; i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026b14: 5cc1 ldrb r1, [r0, r3] 8026b16: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026b1a: 2c09 cmp r4, #9 8026b1c: d9f3 bls.n 8026b06 tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 8026b1e: 3301 adds r3, #1 8026b20: f88d 2005 strb.w r2, [sp, #5] 8026b24: b2db uxtb r3, r3 /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026b26: 2200 movs r2, #0 tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026b28: 250a movs r5, #10 } i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026b2a: e006 b.n 8026b3a tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026b2c: fb05 1202 mla r2, r5, r2, r1 8026b30: 3a30 subs r2, #48 ; 0x30 i++; 8026b32: 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)); 8026b34: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026b38: b2db uxtb r3, r3 } i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026b3a: 5cc1 ldrb r1, [r0, r3] 8026b3c: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026b40: 2c09 cmp r4, #9 8026b42: d9f3 bls.n 8026b2c i++; } i++; /* Get seconds */ tmp.seconds = 0; 8026b44: 2300 movs r3, #0 8026b46: f88d 3000 strb.w r3, [sp] /* УÑтанавливаем +1 Ð´Ð»Ñ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ð°ÐºÑ‚Ð¸ÐºÐ¸ */ tmp.year += 1; 8026b4a: f89d 3009 ldrb.w r3, [sp, #9] 8026b4e: f88d 2004 strb.w r2, [sp, #4] 8026b52: 3301 adds r3, #1 unixTime = TM_RTC_GetUnixTimeStamp(&tmp); 8026b54: 4668 mov r0, sp /* Get seconds */ tmp.seconds = 0; /* УÑтанавливаем +1 Ð´Ð»Ñ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ð°ÐºÑ‚Ð¸ÐºÐ¸ */ tmp.year += 1; 8026b56: f88d 3009 strb.w r3, [sp, #9] unixTime = TM_RTC_GetUnixTimeStamp(&tmp); 8026b5a: f7ff fdd1 bl 8026700 if (location > 18) { return; } /* Write data to backup register */ *(uint32_t *)((&RTC->BKP0R) + 4 * location) = value; 8026b5e: 4b02 ldr r3, [pc, #8] ; (8026b68 ) 8026b60: 6018 str r0, [r3, #0] /* УÑтанавливаем +1 Ð´Ð»Ñ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ð°ÐºÑ‚Ð¸ÐºÐ¸ */ tmp.year += 1; unixTime = TM_RTC_GetUnixTimeStamp(&tmp); TM_RTC_WriteBackupRegister(RTC_BKP_DR0, unixTime); 8026b62: b005 add sp, #20 8026b64: bd30 pop {r4, r5, pc} 8026b66: bf00 nop 8026b68: 40002850 .word 0x40002850 08026b6c : //static TN_MUTEX spi_mutex; static uint8_t spi_tx_rx(uint8_t byte) { while (!(SPI2->SR & SPI_SR_TXE)) {} 8026b6c: 4907 ldr r1, [pc, #28] ; (8026b8c ) 8026b6e: 890a ldrh r2, [r1, #8] 8026b70: 4b06 ldr r3, [pc, #24] ; (8026b8c ) 8026b72: f002 0202 and.w r2, r2, #2 8026b76: b292 uxth r2, r2 8026b78: 2a00 cmp r2, #0 8026b7a: d0f8 beq.n 8026b6e SPI2->DR = byte; 8026b7c: 8198 strh r0, [r3, #12] while (!(SPI2->SR & SPI_SR_RXNE)) {} 8026b7e: 891a ldrh r2, [r3, #8] 8026b80: 07d2 lsls r2, r2, #31 8026b82: d5fc bpl.n 8026b7e return SPI2->DR; 8026b84: 4b01 ldr r3, [pc, #4] ; (8026b8c ) 8026b86: 8998 ldrh r0, [r3, #12] } 8026b88: b2c0 uxtb r0, r0 8026b8a: 4770 bx lr 8026b8c: 40003800 .word 0x40003800 08026b90 : status = spi_tx_rx(0); } while (status & SR_WIP); SPI_FLASH_CS_H(); } static inline void send_addr(int addr) { 8026b90: b510 push {r4, lr} 8026b92: 4604 mov r4, r0 spi_tx_rx((addr >> 16) & 0xFF); 8026b94: f3c0 4007 ubfx r0, r0, #16, #8 8026b98: f7ff ffe8 bl 8026b6c spi_tx_rx((addr >> 8) & 0xFF); 8026b9c: f3c4 2007 ubfx r0, r4, #8, #8 8026ba0: f7ff ffe4 bl 8026b6c spi_tx_rx(addr & 0xFF); 8026ba4: b2e0 uxtb r0, r4 } 8026ba6: 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); 8026baa: f7ff bfdf b.w 8026b6c 08026bae : } static int spi_flash_read_sfdp(int addr, void *buf, size_t len) { 8026bae: b570 push {r4, r5, r6, lr} 8026bb0: 4605 mov r5, r0 8026bb2: 460c mov r4, r1 uint8_t* foo = (uint8_t *)buf; SPI_FLASH_CS_L(); 8026bb4: 2005 movs r0, #5 8026bb6: 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) { 8026bb8: 4616 mov r6, r2 uint8_t* foo = (uint8_t *)buf; SPI_FLASH_CS_L(); 8026bba: f7ff fb5b bl 8026274 spi_tx_rx(CMD_RDSFDP); 8026bbe: 205a movs r0, #90 ; 0x5a 8026bc0: f7ff ffd4 bl 8026b6c send_addr(addr); 8026bc4: 4628 mov r0, r5 8026bc6: f7ff ffe3 bl 8026b90 spi_tx_rx(0); 8026bca: 2000 movs r0, #0 8026bcc: f7ff ffce bl 8026b6c 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) { 8026bd0: 19a6 adds r6, r4, r6 uint8_t* foo = (uint8_t *)buf; SPI_FLASH_CS_L(); spi_tx_rx(CMD_RDSFDP); send_addr(addr); spi_tx_rx(0); while (len--) 8026bd2: e004 b.n 8026bde //*((uint8_t *)buf++) = spi_tx_rx(0); *(foo++) = spi_tx_rx(0); 8026bd4: 2000 movs r0, #0 8026bd6: f7ff ffc9 bl 8026b6c 8026bda: f804 0b01 strb.w r0, [r4], #1 uint8_t* foo = (uint8_t *)buf; SPI_FLASH_CS_L(); spi_tx_rx(CMD_RDSFDP); send_addr(addr); spi_tx_rx(0); while (len--) 8026bde: 42b4 cmp r4, r6 8026be0: d1f8 bne.n 8026bd4 //*((uint8_t *)buf++) = spi_tx_rx(0); *(foo++) = spi_tx_rx(0); SPI_FLASH_CS_H(); 8026be2: 2005 movs r0, #5 8026be4: 2101 movs r1, #1 8026be6: f7ff fb45 bl 8026274 return 0; } 8026bea: 2000 movs r0, #0 8026bec: bd70 pop {r4, r5, r6, pc} 08026bee : spi_flash_desc_t spi_flash_desc; static inline void wait_write_enable(void) { uint8_t status; // spi_cs_down(); SPI_FLASH_CS_L(); 8026bee: 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) { 8026bf0: b508 push {r3, lr} uint8_t status; // spi_cs_down(); SPI_FLASH_CS_L(); 8026bf2: 2100 movs r1, #0 8026bf4: f7ff fb3e bl 8026274 spi_tx_rx(CMD_RDSR); 8026bf8: 2005 movs r0, #5 8026bfa: f7ff ffb7 bl 8026b6c do { status = spi_tx_rx(0); 8026bfe: 2000 movs r0, #0 8026c00: f7ff ffb4 bl 8026b6c } while (!(status & SR_WEL)); 8026c04: f000 0002 and.w r0, r0, #2 8026c08: b2c0 uxtb r0, r0 8026c0a: 2800 cmp r0, #0 8026c0c: d0f7 beq.n 8026bfe // spi_cs_up(); SPI_FLASH_CS_H(); 8026c0e: 2005 movs r0, #5 8026c10: 2101 movs r1, #1 } 8026c12: 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(); 8026c16: f7ff bb2d b.w 8026274 08026c1a : } static inline void wait_write_end(void) { uint8_t status; SPI_FLASH_CS_L(); 8026c1a: 2005 movs r0, #5 } while (!(status & SR_WEL)); // spi_cs_up(); SPI_FLASH_CS_H(); } static inline void wait_write_end(void) { 8026c1c: b508 push {r3, lr} uint8_t status; SPI_FLASH_CS_L(); 8026c1e: 2100 movs r1, #0 8026c20: f7ff fb28 bl 8026274 spi_tx_rx(CMD_RDSR); 8026c24: 2005 movs r0, #5 8026c26: f7ff ffa1 bl 8026b6c do { status = spi_tx_rx(0); 8026c2a: 2000 movs r0, #0 8026c2c: f7ff ff9e bl 8026b6c } while (status & SR_WIP); 8026c30: 07c1 lsls r1, r0, #31 8026c32: d4fa bmi.n 8026c2a SPI_FLASH_CS_H(); 8026c34: 2005 movs r0, #5 8026c36: 2101 movs r1, #1 } 8026c38: 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(); 8026c3c: f7ff bb1a b.w 8026274 08026c40 : *(foo++) = spi_tx_rx(0); SPI_FLASH_CS_H(); return 0; } ssize_t spi_flash_read(int addr, void *buf, size_t len, uint32_t timeout) { 8026c40: b570 push {r4, r5, r6, lr} 8026c42: 4605 mov r5, r0 8026c44: 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(); 8026c46: 2005 movs r0, #5 8026c48: 2100 movs r1, #0 *(foo++) = spi_tx_rx(0); SPI_FLASH_CS_H(); return 0; } ssize_t spi_flash_read(int addr, void *buf, size_t len, uint32_t timeout) { 8026c4a: 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(); 8026c4c: f7ff fb12 bl 8026274 spi_tx_rx(CMD_READ); 8026c50: 2003 movs r0, #3 8026c52: f7ff ff8b bl 8026b6c send_addr(addr); 8026c56: 4628 mov r0, r5 8026c58: f7ff ff9a bl 8026b90 *(foo++) = spi_tx_rx(0); SPI_FLASH_CS_H(); return 0; } ssize_t spi_flash_read(int addr, void *buf, size_t len, uint32_t timeout) { 8026c5c: 19a6 adds r6, r4, r6 // return ret; SPI_FLASH_CS_L(); spi_tx_rx(CMD_READ); send_addr(addr); while (len--) 8026c5e: e004 b.n 8026c6a //*((uint8_t *)buf++) = spi_tx_rx(0); *(foo++) = spi_tx_rx(0); 8026c60: 2000 movs r0, #0 8026c62: f7ff ff83 bl 8026b6c 8026c66: f804 0b01 strb.w r0, [r4], #1 // return ret; SPI_FLASH_CS_L(); spi_tx_rx(CMD_READ); send_addr(addr); while (len--) 8026c6a: 42b4 cmp r4, r6 8026c6c: d1f8 bne.n 8026c60 //*((uint8_t *)buf++) = spi_tx_rx(0); *(foo++) = spi_tx_rx(0); SPI_FLASH_CS_H(); 8026c6e: 2005 movs r0, #5 8026c70: 2101 movs r1, #1 8026c72: f7ff faff bl 8026274 // tn_mutex_unlock(&spi_mutex); return len; } 8026c76: f04f 30ff mov.w r0, #4294967295 8026c7a: bd70 pop {r4, r5, r6, pc} 08026c7c : // 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) 8026c7c: 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) { 8026c7e: b570 push {r4, r5, r6, lr} 8026c80: 4614 mov r4, r2 // ret = tn_mutex_lock(&spi_mutex, timeout); // if (ret != TERR_NO_ERR) // return ret; // don't allow page wrapping ssize_t ret = 0; if ((addr & 0xFF) + len > 0xFF) 8026c82: 18d2 adds r2, r2, r3 8026c84: 2aff cmp r2, #255 ; 0xff len = 0x100 - (addr & 0xFF); 8026c86: bf88 it hi 8026c88: f5c3 7480 rsbhi r4, r3, #256 ; 0x100 return len; } #define TIMEOUT 10000 uint16_t spi_flash_pp(int addr, const void *buf, size_t len, uint32_t timeout) { 8026c8c: 4606 mov r6, r0 8026c8e: 460d mov r5, r1 ssize_t ret = 0; if ((addr & 0xFF) + len > 0xFF) len = 0x100 - (addr & 0xFF); ret = len; SPI_FLASH_CS_L(); 8026c90: 2005 movs r0, #5 8026c92: 2100 movs r1, #0 8026c94: f7ff faee bl 8026274 spi_tx_rx(CMD_WREN); 8026c98: 2006 movs r0, #6 8026c9a: f7ff ff67 bl 8026b6c SPI_FLASH_CS_H(); 8026c9e: 2005 movs r0, #5 8026ca0: 2101 movs r1, #1 8026ca2: f7ff fae7 bl 8026274 wait_write_enable(); 8026ca6: f7ff ffa2 bl 8026bee SPI_FLASH_CS_L(); 8026caa: 2100 movs r1, #0 8026cac: 2005 movs r0, #5 8026cae: f7ff fae1 bl 8026274 spi_tx_rx(CMD_PP); 8026cb2: 2002 movs r0, #2 8026cb4: f7ff ff5a bl 8026b6c send_addr(addr); 8026cb8: 4630 mov r0, r6 8026cba: f7ff ff69 bl 8026b90 return len; } #define TIMEOUT 10000 uint16_t spi_flash_pp(int addr, const void *buf, size_t len, uint32_t timeout) { 8026cbe: 192e adds r6, r5, r4 wait_write_enable(); SPI_FLASH_CS_L(); spi_tx_rx(CMD_PP); send_addr(addr); while (len--) 8026cc0: e003 b.n 8026cca //spi_tx_rx(*((uint8_t *)buf++)); spi_tx_rx(*(foo++)); 8026cc2: f815 0b01 ldrb.w r0, [r5], #1 8026cc6: f7ff ff51 bl 8026b6c wait_write_enable(); SPI_FLASH_CS_L(); spi_tx_rx(CMD_PP); send_addr(addr); while (len--) 8026cca: 42b5 cmp r5, r6 8026ccc: d1f9 bne.n 8026cc2 //spi_tx_rx(*((uint8_t *)buf++)); spi_tx_rx(*(foo++)); SPI_FLASH_CS_H(); 8026cce: 2005 movs r0, #5 8026cd0: 2101 movs r1, #1 8026cd2: f7ff facf bl 8026274 wait_write_end(); 8026cd6: f7ff ffa0 bl 8026c1a // tn_mutex_unlock(&spi_mutex); return ret; } 8026cda: b2a0 uxth r0, r4 8026cdc: bd70 pop {r4, r5, r6, pc} 08026cde : ssize_t spi_flash_write(int addr, const void *buf, size_t len, uint32_t timeout) { 8026cde: b5f8 push {r3, r4, r5, r6, r7, lr} 8026ce0: 4607 mov r7, r0 8026ce2: 460e mov r6, r1 8026ce4: 4615 mov r5, r2 uint8_t* foo = (uint8_t *)buf; int ret = 0, offset = 0; 8026ce6: 2400 movs r4, #0 do { //ret = spi_flash_pp(addr + offset, buf + offset, len - offset, 0); ret = spi_flash_pp(addr + offset, foo + offset, len - offset, 0); 8026ce8: 1938 adds r0, r7, r4 8026cea: 1931 adds r1, r6, r4 8026cec: 1b2a subs r2, r5, r4 8026cee: 2300 movs r3, #0 8026cf0: f7ff ffc4 bl 8026c7c offset += ret; 8026cf4: 1824 adds r4, r4, r0 } while (len - offset); 8026cf6: 42a5 cmp r5, r4 8026cf8: d1f6 bne.n 8026ce8 return 0; } 8026cfa: 2000 movs r0, #0 8026cfc: bdf8 pop {r3, r4, r5, r6, r7, pc} 08026cfe : wait_write_end(); return 0; } int spi_flash_erase_sector(int addr, uint32_t timeout) { 8026cfe: 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(); 8026d00: 2100 movs r1, #0 wait_write_end(); return 0; } int spi_flash_erase_sector(int addr, uint32_t timeout) { 8026d02: 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(); 8026d04: 2005 movs r0, #5 8026d06: f7ff fab5 bl 8026274 spi_tx_rx(CMD_WREN); 8026d0a: 2006 movs r0, #6 8026d0c: f7ff ff2e bl 8026b6c SPI_FLASH_CS_H(); 8026d10: 2005 movs r0, #5 8026d12: 2101 movs r1, #1 8026d14: f7ff faae bl 8026274 wait_write_enable(); 8026d18: f7ff ff69 bl 8026bee SPI_FLASH_CS_L(); 8026d1c: 2100 movs r1, #0 8026d1e: 2005 movs r0, #5 8026d20: f7ff faa8 bl 8026274 spi_tx_rx(CMD_SE); 8026d24: 2020 movs r0, #32 8026d26: f7ff ff21 bl 8026b6c send_addr(addr); 8026d2a: 4620 mov r0, r4 8026d2c: f7ff ff30 bl 8026b90 SPI_FLASH_CS_H(); 8026d30: 2005 movs r0, #5 8026d32: 2101 movs r1, #1 8026d34: f7ff fa9e bl 8026274 wait_write_end(); 8026d38: f7ff ff6f bl 8026c1a // tn_mutex_unlock(&spi_mutex); return 0; } 8026d3c: 2000 movs r0, #0 8026d3e: bd10 pop {r4, pc} 08026d40 : bool spi_flash_init(void) { 8026d40: b530 push {r4, r5, lr} uint32_t i, ptable, bitsize = 0; uint8_t tmp[4]; spi_flash_desc.present = false; 8026d42: 4b48 ldr r3, [pc, #288] ; (8026e64 ) // tn_mutex_unlock(&spi_mutex); return 0; } bool spi_flash_init(void) { uint32_t i, ptable, bitsize = 0; 8026d44: 2400 movs r4, #0 // tn_mutex_unlock(&spi_mutex); return 0; } bool spi_flash_init(void) { 8026d46: b085 sub sp, #20 uint32_t i, ptable, bitsize = 0; uint8_t tmp[4]; spi_flash_desc.present = false; 8026d48: 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; 8026d4a: 4b47 ldr r3, [pc, #284] ; (8026e68 ) // tn_mutex_unlock(&spi_mutex); return 0; } bool spi_flash_init(void) { uint32_t i, ptable, bitsize = 0; 8026d4c: 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; 8026d4e: 6c1a ldr r2, [r3, #64] ; 0x40 8026d50: f442 4280 orr.w r2, r2, #16384 ; 0x4000 8026d54: 641a str r2, [r3, #64] ; 0x40 RCC->APB1RSTR |= RCC_APB1RSTR_SPI2RST; 8026d56: 6a1a ldr r2, [r3, #32] 8026d58: f442 4200 orr.w r2, r2, #32768 ; 0x8000 8026d5c: 621a str r2, [r3, #32] RCC->APB1RSTR &= ~RCC_APB1RSTR_SPI2RST; 8026d5e: 6a1a ldr r2, [r3, #32] 8026d60: f422 4200 bic.w r2, r2, #32768 ; 0x8000 8026d64: 621a str r2, [r3, #32] SPI2->CR1 &= ~SPI_CR1_SPE; 8026d66: 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); 8026d6a: 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; 8026d6c: 881a ldrh r2, [r3, #0] 8026d6e: f022 0240 bic.w r2, r2, #64 ; 0x40 8026d72: 0412 lsls r2, r2, #16 8026d74: 0c12 lsrs r2, r2, #16 8026d76: 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; 8026d78: f44f 7241 mov.w r2, #772 ; 0x304 8026d7c: 801a strh r2, [r3, #0] SPI2->CR2 = 0;//SPI_CR2_SSOE; 8026d7e: 809c strh r4, [r3, #4] SPI2->CR1 |= SPI_CR1_SPE; 8026d80: 881a ldrh r2, [r3, #0] 8026d82: b292 uxth r2, r2 8026d84: f042 0240 orr.w r2, r2, #64 ; 0x40 8026d88: 801a strh r2, [r3, #0] spi_flash_desc.present = false; spi_init_(); // check SFDP magic spi_flash_read_sfdp(0, tmp, 4); 8026d8a: 4620 mov r0, r4 8026d8c: 2204 movs r2, #4 8026d8e: 4629 mov r1, r5 8026d90: f7ff ff0d bl 8026bae if (!(tmp[0] == 0x53 && tmp[1] == 0x46 && 8026d94: f89d 300c ldrb.w r3, [sp, #12] 8026d98: 2b53 cmp r3, #83 ; 0x53 8026d9a: d001 beq.n 8026da0 tmp[2] == 0x44 && tmp[3] == 0x50)) return 0; 8026d9c: 2000 movs r0, #0 8026d9e: e05e b.n 8026e5e spi_init_(); // check SFDP magic spi_flash_read_sfdp(0, tmp, 4); if (!(tmp[0] == 0x53 && tmp[1] == 0x46 && 8026da0: f89d 300d ldrb.w r3, [sp, #13] 8026da4: 2b46 cmp r3, #70 ; 0x46 8026da6: d1f9 bne.n 8026d9c 8026da8: f89d 300e ldrb.w r3, [sp, #14] 8026dac: 2b44 cmp r3, #68 ; 0x44 8026dae: d1f5 bne.n 8026d9c 8026db0: f89d 300f ldrb.w r3, [sp, #15] 8026db4: 2b50 cmp r3, #80 ; 0x50 8026db6: d1f1 bne.n 8026d9c tmp[2] == 0x44 && tmp[3] == 0x50)) return 0; // get parameter headers count spi_flash_read_sfdp(0x06, tmp, 1); 8026db8: 2006 movs r0, #6 8026dba: 4629 mov r1, r5 8026dbc: 2201 movs r2, #1 8026dbe: f7ff fef6 bl 8026bae // find first jedec pheader (with ID == 0) for (ptable = 0x08, i = 0; i <= tmp[0]; i++, ptable += 8) { 8026dc2: 2308 movs r3, #8 8026dc4: e01a b.n 8026dfc spi_flash_read_sfdp(ptable, tmp, 1); 8026dc6: 9801 ldr r0, [sp, #4] 8026dc8: 4629 mov r1, r5 8026dca: 2201 movs r2, #1 8026dcc: f7ff feef bl 8026bae if (tmp[0] == 0) 8026dd0: f89d 300c ldrb.w r3, [sp, #12] 8026dd4: b97b cbnz r3, 8026df6 break; } // read ptable pointer from pheader spi_flash_read_sfdp(ptable + 4, &ptable, 3); 8026dd6: a904 add r1, sp, #16 8026dd8: 2203 movs r2, #3 8026dda: f851 0d0c ldr.w r0, [r1, #-12]! 8026dde: 3004 adds r0, #4 8026de0: f7ff fee5 bl 8026bae // get flash density (size in bits) if (spi_flash_read_sfdp(ptable + 4, &bitsize, 4) < 0 || !bitsize) 8026de4: 9801 ldr r0, [sp, #4] 8026de6: 2204 movs r2, #4 8026de8: 3004 adds r0, #4 8026dea: a902 add r1, sp, #8 8026dec: f7ff fedf bl 8026bae 8026df0: 2800 cmp r0, #0 8026df2: da09 bge.n 8026e08 8026df4: e7d2 b.n 8026d9c // 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) { 8026df6: 9b01 ldr r3, [sp, #4] 8026df8: 3401 adds r4, #1 8026dfa: 3308 adds r3, #8 8026dfc: 9301 str r3, [sp, #4] 8026dfe: f89d 300c ldrb.w r3, [sp, #12] 8026e02: 429c cmp r4, r3 8026e04: d9df bls.n 8026dc6 8026e06: e7e6 b.n 8026dd6 // 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) 8026e08: 9b02 ldr r3, [sp, #8] 8026e0a: 2b00 cmp r3, #0 8026e0c: d0c6 beq.n 8026d9c 8026e0e: 2400 movs r4, #0 return 0; // find smallest available sector for (i = 0; i < 4; i++) { tmp[0] = 0; 8026e10: 4625 mov r5, r4 if (spi_flash_read_sfdp(ptable + 0x1C + i*2, &tmp, 2) >= 0 && 8026e12: 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; 8026e14: f88d 500c strb.w r5, [sp, #12] if (spi_flash_read_sfdp(ptable + 0x1C + i*2, &tmp, 2) >= 0 && 8026e18: 301c adds r0, #28 8026e1a: 2202 movs r2, #2 8026e1c: 1900 adds r0, r0, r4 8026e1e: a903 add r1, sp, #12 8026e20: f7ff fec5 bl 8026bae 8026e24: 2800 cmp r0, #0 8026e26: db11 blt.n 8026e4c tmp[0]) { 8026e28: 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 && 8026e2c: b172 cbz r2, 8026e4c tmp[0]) { spi_flash_desc.sector_size = 1 << tmp[0]; 8026e2e: 4b0d ldr r3, [pc, #52] ; (8026e64 ) 8026e30: 2101 movs r1, #1 8026e32: fa01 f102 lsl.w r1, r1, r2 8026e36: 6059 str r1, [r3, #4] spi_flash_desc.sector_erase_op = tmp[1]; 8026e38: f89d 100d ldrb.w r1, [sp, #13] 8026e3c: 7219 strb r1, [r3, #8] spi_flash_desc.sector_count = (bitsize + 1) >> (3 + tmp[0]); 8026e3e: 9902 ldr r1, [sp, #8] 8026e40: 3203 adds r2, #3 8026e42: 3101 adds r1, #1 8026e44: fa21 f202 lsr.w r2, r1, r2 8026e48: 815a strh r2, [r3, #10] break; 8026e4a: e002 b.n 8026e52 8026e4c: 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++) { 8026e4e: 2c08 cmp r4, #8 8026e50: d1df bne.n 8026e12 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) 8026e52: 4b04 ldr r3, [pc, #16] ; (8026e64 ) 8026e54: 685a ldr r2, [r3, #4] 8026e56: 2a00 cmp r2, #0 8026e58: d0a0 beq.n 8026d9c return 0; spi_flash_desc.present = true; 8026e5a: 2001 movs r0, #1 8026e5c: 7018 strb r0, [r3, #0] return 1; } 8026e5e: b005 add sp, #20 8026e60: bd30 pop {r4, r5, pc} 8026e62: bf00 nop 8026e64: 2000c840 .word 0x2000c840 8026e68: 40023800 .word 0x40023800 08026e6c : \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 */ 8026e6c: f000 0007 and.w r0, r0, #7 uint32_t PreemptPriorityBits; uint32_t SubPriorityBits; PreemptPriorityBits = ((7 - PriorityGroupTmp) > __NVIC_PRIO_BITS) ? __NVIC_PRIO_BITS : 7 - PriorityGroupTmp; 8026e70: f1c0 0307 rsb r3, r0, #7 SubPriorityBits = ((PriorityGroupTmp + __NVIC_PRIO_BITS) < 7) ? 0 : PriorityGroupTmp - 7 + __NVIC_PRIO_BITS; 8026e74: 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; 8026e76: 2b04 cmp r3, #4 8026e78: bf28 it cs 8026e7a: 2304 movcs r3, #4 SubPriorityBits = ((PriorityGroupTmp + __NVIC_PRIO_BITS) < 7) ? 0 : PriorityGroupTmp - 7 + __NVIC_PRIO_BITS; 8026e7c: 2a06 cmp r2, #6 8026e7e: d901 bls.n 8026e84 8026e80: 3803 subs r0, #3 8026e82: e000 b.n 8026e86 8026e84: 2000 movs r0, #0 return ( ((PreemptPriority & ((1 << (PreemptPriorityBits)) - 1)) << SubPriorityBits) | 8026e86: 2201 movs r2, #1 8026e88: fa02 f303 lsl.w r3, r2, r3 8026e8c: 3b01 subs r3, #1 8026e8e: f003 0305 and.w r3, r3, #5 ((SubPriority & ((1 << (SubPriorityBits )) - 1))) ); } 8026e92: fa03 f000 lsl.w r0, r3, r0 8026e96: 4770 bx lr 08026e98 : 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) { 8026e98: 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; 8026e9a: 4d34 ldr r5, [pc, #208] ; (8026f6c ) 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) { 8026e9c: 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; 8026ea0: 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) 8026ea2: 2a09 cmp r2, #9 8026ea4: bf0c ite eq 8026ea6: f44f 5280 moveq.w r2, #4096 ; 0x1000 8026eaa: 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; 8026eac: 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; 8026eae: 80ee strh r6, [r5, #6] USART_InitStructure.USART_Parity = parity; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; 8026eb0: 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) { 8026eb2: 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; 8026eb4: 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; 8026eb6: 6029 str r1, [r5, #0] USART_InitStructure.USART_WordLength = wordlen_tmp; 8026eb8: 80aa strh r2, [r5, #4] USART_InitStructure.USART_StopBits = stop; USART_InitStructure.USART_Parity = parity; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; 8026eba: 81ae strh r6, [r5, #12] USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx; USART_DeInit(uart); 8026ebc: f7ff f80a bl 8025ed4 if (uart == USART1) { 8026ec0: 4b2b ldr r3, [pc, #172] ; (8026f70 ) 8026ec2: 429c cmp r4, r3 8026ec4: d111 bne.n 8026eea RCC->APB2ENR |= RCC_APB2Periph_USART1; 8026ec6: f503 3394 add.w r3, r3, #75776 ; 0x12800 8026eca: 6c5a ldr r2, [r3, #68] ; 0x44 8026ecc: f042 0210 orr.w r2, r2, #16 8026ed0: 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 */ 8026ed2: 4b28 ldr r3, [pc, #160] ; (8026f74 ) 8026ed4: 68d8 ldr r0, [r3, #12] NVIC_SetPriority(USART1_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 0x05, 0)); 8026ed6: f3c0 2002 ubfx r0, r0, #8, #3 8026eda: f7ff ffc7 bl 8026e6c __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 */ 8026ede: 4b26 ldr r3, [pc, #152] ; (8026f78 ) 8026ee0: 0100 lsls r0, r0, #4 8026ee2: 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 */ 8026ee6: 2220 movs r2, #32 8026ee8: e028 b.n 8026f3c USART_Cmd(USART1, ENABLE); USART_ITConfig(USART1, USART_IT_RXNE, ENABLE); USART_ITConfig(USART1, USART_IT_TXE, DISABLE); } if (uart == USART2) { 8026eea: 4b24 ldr r3, [pc, #144] ; (8026f7c ) 8026eec: 429c cmp r4, r3 8026eee: d111 bne.n 8026f14 RCC->APB1ENR |= RCC_APB1Periph_USART2; 8026ef0: f503 33fa add.w r3, r3, #128000 ; 0x1f400 8026ef4: 6c1a ldr r2, [r3, #64] ; 0x40 8026ef6: f442 3200 orr.w r2, r2, #131072 ; 0x20000 8026efa: 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 */ 8026efc: 4b1d ldr r3, [pc, #116] ; (8026f74 ) 8026efe: 68d8 ldr r0, [r3, #12] NVIC_SetPriority(USART2_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 0x05, 0)); 8026f00: f3c0 2002 ubfx r0, r0, #8, #3 8026f04: f7ff ffb2 bl 8026e6c __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 */ 8026f08: 4b1b ldr r3, [pc, #108] ; (8026f78 ) 8026f0a: 0100 lsls r0, r0, #4 8026f0c: 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 */ 8026f10: 2240 movs r2, #64 ; 0x40 8026f12: e013 b.n 8026f3c USART_Cmd(USART2, ENABLE); USART_ITConfig(USART2, USART_IT_RXNE, ENABLE); USART_ITConfig(USART2, USART_IT_TXE, DISABLE); } if (uart == USART3) { 8026f14: 4b1a ldr r3, [pc, #104] ; (8026f80 ) 8026f16: 429c cmp r4, r3 8026f18: d127 bne.n 8026f6a RCC->APB1ENR |= RCC_APB1Periph_USART3; 8026f1a: f503 33f8 add.w r3, r3, #126976 ; 0x1f000 8026f1e: 6c1a ldr r2, [r3, #64] ; 0x40 8026f20: f442 2280 orr.w r2, r2, #262144 ; 0x40000 8026f24: 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 */ 8026f26: 4b13 ldr r3, [pc, #76] ; (8026f74 ) 8026f28: 68d8 ldr r0, [r3, #12] NVIC_SetPriority(USART3_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 0x05, 0)); 8026f2a: f3c0 2002 ubfx r0, r0, #8, #3 8026f2e: f7ff ff9d bl 8026e6c __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 */ 8026f32: 4b11 ldr r3, [pc, #68] ; (8026f78 ) 8026f34: 0100 lsls r0, r0, #4 8026f36: 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 */ 8026f3a: 2280 movs r2, #128 ; 0x80 8026f3c: 605a str r2, [r3, #4] NVIC_EnableIRQ(USART3_IRQn); USART_Init(USART3, &USART_InitStructure); 8026f3e: 4620 mov r0, r4 8026f40: 4629 mov r1, r5 8026f42: f7ff f81b bl 8025f7c USART_Cmd(USART3, ENABLE); 8026f46: 4620 mov r0, r4 8026f48: 2101 movs r1, #1 8026f4a: f7ff f871 bl 8026030 USART_ITConfig(USART3, USART_IT_RXNE, ENABLE); 8026f4e: 4620 mov r0, r4 8026f50: 2201 movs r2, #1 8026f52: f240 5125 movw r1, #1317 ; 0x525 8026f56: f7ff f877 bl 8026048 USART_ITConfig(USART3, USART_IT_TXE, DISABLE); 8026f5a: 4620 mov r0, r4 8026f5c: f240 7127 movw r1, #1831 ; 0x727 8026f60: 4632 mov r2, r6 } } 8026f62: 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); 8026f66: f7ff b86f b.w 8026048 8026f6a: bd70 pop {r4, r5, r6, pc} 8026f6c: 2000cb8c .word 0x2000cb8c 8026f70: 40011000 .word 0x40011000 8026f74: e000ed00 .word 0xe000ed00 8026f78: e000e100 .word 0xe000e100 8026f7c: 40004400 .word 0x40004400 8026f80: 40004800 .word 0x40004800 08026f84 : } } void InitUSART(void) { 8026f84: b507 push {r0, r1, r2, lr} xSem_rx_buf = xSemaphoreCreateCounting( UPS_RBUF_SIZE, 0 ); 8026f86: 2100 movs r1, #0 8026f88: 2064 movs r0, #100 ; 0x64 8026f8a: f003 fcf2 bl 802a972 8026f8e: 4b0a ldr r3, [pc, #40] ; (8026fb8 ) rbuf32_init(&ups_tx_rbuf, ups_tx_fifo, UPS_RBUF_SIZE); 8026f90: 490a ldr r1, [pc, #40] ; (8026fbc ) USART_ITConfig(USART3, USART_IT_TXE, DISABLE); } } void InitUSART(void) { xSem_rx_buf = xSemaphoreCreateCounting( UPS_RBUF_SIZE, 0 ); 8026f92: 6018 str r0, [r3, #0] rbuf32_init(&ups_tx_rbuf, ups_tx_fifo, UPS_RBUF_SIZE); 8026f94: 2264 movs r2, #100 ; 0x64 8026f96: 480a ldr r0, [pc, #40] ; (8026fc0 ) 8026f98: f002 fa9e bl 80294d8 rbuf32_init(&ups_rx_rbuf, ups_rx_fifo, UPS_RBUF_SIZE); 8026f9c: 2264 movs r2, #100 ; 0x64 8026f9e: 4809 ldr r0, [pc, #36] ; (8026fc4 ) 8026fa0: 4909 ldr r1, [pc, #36] ; (8026fc8 ) 8026fa2: f002 fa99 bl 80294d8 uart_hw_init(UPS_USART, UPS_USART_BAUD, UPS_USART_WORD_LEN, UPS_USART_PARITY, UPS_USART_STOP_BIT); 8026fa6: 2300 movs r3, #0 8026fa8: 9300 str r3, [sp, #0] 8026faa: 4808 ldr r0, [pc, #32] ; (8026fcc ) 8026fac: f44f 6116 mov.w r1, #2400 ; 0x960 8026fb0: 2208 movs r2, #8 8026fb2: f7ff ff71 bl 8026e98 } 8026fb6: bd0e pop {r1, r2, r3, pc} 8026fb8: 2000cb9c .word 0x2000cb9c 8026fbc: 2000c85c .word 0x2000c85c 8026fc0: 2000cb7c .word 0x2000cb7c 8026fc4: 2000c84c .word 0x2000c84c 8026fc8: 2000c9ec .word 0x2000c9ec 8026fcc: 40004400 .word 0x40004400 08026fd0 : } int ups_send_block(void *data, uint8_t len) { int i = 0; uint32_t s_temp = 0; UPS_USART->CR1 &= ~USART_CR1_TXEIE; 8026fd0: 4a0f ldr r2, [pc, #60] ; (8027010 ) 8026fd2: 8993 ldrh r3, [r2, #12] 8026fd4: f023 0380 bic.w r3, r3, #128 ; 0x80 8026fd8: 041b lsls r3, r3, #16 8026fda: 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) { 8026fdc: b570 push {r4, r5, r6, lr} 8026fde: 4606 mov r6, r0 8026fe0: 460d mov r5, r1 int i = 0; uint32_t s_temp = 0; UPS_USART->CR1 &= ~USART_CR1_TXEIE; 8026fe2: 8193 strh r3, [r2, #12] } UPS_USART->CR1 |= USART_CR1_TXEIE; } int ups_send_block(void *data, uint8_t len) { int i = 0; 8026fe4: 2400 movs r4, #0 uint32_t s_temp = 0; UPS_USART->CR1 &= ~USART_CR1_TXEIE; //DBG printf("STOP \r\n"); while (i < len) { 8026fe6: e008 b.n 8026ffa if (!rbuf_isfull(&ups_tx_rbuf)) { 8026fe8: 480a ldr r0, [pc, #40] ; (8027014 ) 8026fea: f002 fa7b bl 80294e4 8026fee: b930 cbnz r0, 8026ffe s_temp = ((uint8_t *)data)[i++]; 8026ff0: 5d31 ldrb r1, [r6, r4] rbuf32_put(&ups_tx_rbuf, s_temp); 8026ff2: 4808 ldr r0, [pc, #32] ; (8027014 ) 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++]; 8026ff4: 3401 adds r4, #1 rbuf32_put(&ups_tx_rbuf, s_temp); 8026ff6: f002 fa96 bl 8029526 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) { 8026ffa: 42ac cmp r4, r5 8026ffc: dbf4 blt.n 8026fe8 rbuf32_put(&ups_tx_rbuf, s_temp); } else break; } UPS_USART->CR1 |= USART_CR1_TXEIE; 8026ffe: 4b04 ldr r3, [pc, #16] ; (8027010 ) 8027000: 899a ldrh r2, [r3, #12] 8027002: b292 uxth r2, r2 8027004: f042 0280 orr.w r2, r2, #128 ; 0x80 8027008: 819a strh r2, [r3, #12] return i; } 802700a: 4620 mov r0, r4 802700c: bd70 pop {r4, r5, r6, pc} 802700e: bf00 nop 8027010: 40004400 .word 0x40004400 8027014: 2000cb7c .word 0x2000cb7c 08027018 : int ups_getchar(unsigned int timeout) { int res; res = xSemaphoreTake( xSem_rx_buf, (TickType_t)timeout ); 8027018: 4b09 ldr r3, [pc, #36] ; (8027040 ) } UPS_USART->CR1 |= USART_CR1_TXEIE; return i; } int ups_getchar(unsigned int timeout) { 802701a: b507 push {r0, r1, r2, lr} int res; res = xSemaphoreTake( xSem_rx_buf, (TickType_t)timeout ); 802701c: 2100 movs r1, #0 } UPS_USART->CR1 |= USART_CR1_TXEIE; return i; } int ups_getchar(unsigned int timeout) { 802701e: 4602 mov r2, r0 int res; res = xSemaphoreTake( xSem_rx_buf, (TickType_t)timeout ); 8027020: 6818 ldr r0, [r3, #0] 8027022: 460b mov r3, r1 8027024: f003 fdfb bl 802ac1e 8027028: 9001 str r0, [sp, #4] if (res == pdFALSE) { 802702a: b128 cbz r0, 8027038 return -1; } rbuf32_get(&ups_rx_rbuf, &res); 802702c: 4805 ldr r0, [pc, #20] ; (8027044 ) 802702e: a901 add r1, sp, #4 8027030: f002 fa64 bl 80294fc // DBG printf("STOP \r\n"); // DBG printf("wr: %d 0x%x\r\n", rs485_rx_rbuf.read_index,res); return res; 8027034: 9801 ldr r0, [sp, #4] 8027036: e001 b.n 802703c int ups_getchar(unsigned int timeout) { int res; res = xSemaphoreTake( xSem_rx_buf, (TickType_t)timeout ); if (res == pdFALSE) { return -1; 8027038: 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; } 802703c: bd0e pop {r1, r2, r3, pc} 802703e: bf00 nop 8027040: 2000cb9c .word 0x2000cb9c 8027044: 2000c84c .word 0x2000c84c 08027048 : //inline void rs232_irq_handler(void) void rs232_irq_handler(void) { 8027048: b513 push {r0, r1, r4, lr} uint32_t c = 0; 802704a: 2300 movs r3, #0 802704c: 9301 str r3, [sp, #4] static BaseType_t xHigherPriorityTaskWoken = pdFALSE; if ((UPS_USART->SR & USART_SR_ORE)) { 802704e: 4b26 ldr r3, [pc, #152] ; (80270e8 ) 8027050: 881a ldrh r2, [r3, #0] 8027052: f002 0208 and.w r2, r2, #8 8027056: b292 uxth r2, r2 8027058: b112 cbz r2, 8027060 c = (uint32_t)UPS_USART->DR; 802705a: 889b ldrh r3, [r3, #4] 802705c: b29b uxth r3, r3 802705e: 9301 str r3, [sp, #4] //DBG printf("overrunRS485\r\n"); } if (USART_GetITStatus(UPS_USART, USART_IT_TXE) != RESET) { 8027060: 4c21 ldr r4, [pc, #132] ; (80270e8 ) 8027062: f240 7127 movw r1, #1831 ; 0x727 8027066: 4620 mov r0, r4 8027068: f7ff f807 bl 802607a 802706c: b1c0 cbz r0, 80270a0 if(rbuf32_get(&ups_tx_rbuf, &c)) { 802706e: 481f ldr r0, [pc, #124] ; (80270ec ) 8027070: a901 add r1, sp, #4 8027072: f002 fa43 bl 80294fc 8027076: b118 cbz r0, 8027080 UPS_USART->DR = (uint16_t)c; 8027078: f8bd 3004 ldrh.w r3, [sp, #4] 802707c: 80a3 strh r3, [r4, #4] 802707e: e00a b.n 8027096 //DBG printf("wr: %d 0x%x\r\n", rs485_tx_rbuf.read_index,c); } else { UPS_USART->CR1 &= ~USART_CR1_TXEIE; 8027080: 89a3 ldrh r3, [r4, #12] 8027082: f023 0380 bic.w r3, r3, #128 ; 0x80 8027086: 041b lsls r3, r3, #16 8027088: 0c1b lsrs r3, r3, #16 802708a: 81a3 strh r3, [r4, #12] UPS_USART->CR1 |= USART_CR1_RXNEIE; 802708c: 89a3 ldrh r3, [r4, #12] 802708e: b29b uxth r3, r3 8027090: f043 0320 orr.w r3, r3, #32 8027094: 81a3 strh r3, [r4, #12] } USART_ClearITPendingBit(UPS_USART, USART_IT_TXE); 8027096: 4814 ldr r0, [pc, #80] ; (80270e8 ) 8027098: f240 7127 movw r1, #1831 ; 0x727 802709c: f7ff f80d bl 80260ba } if(USART_GetITStatus(UPS_USART, USART_IT_RXNE) != RESET) 80270a0: 4c11 ldr r4, [pc, #68] ; (80270e8 ) 80270a2: f240 5125 movw r1, #1317 ; 0x525 80270a6: 4620 mov r0, r4 80270a8: f7fe ffe7 bl 802607a 80270ac: b1d8 cbz r0, 80270e6 { c = (uint32_t)UPS_USART->DR; 80270ae: 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)) 80270b0: 480f ldr r0, [pc, #60] ; (80270f0 ) } USART_ClearITPendingBit(UPS_USART, USART_IT_TXE); } if(USART_GetITStatus(UPS_USART, USART_IT_RXNE) != RESET) { c = (uint32_t)UPS_USART->DR; 80270b2: b29b uxth r3, r3 80270b4: 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)) 80270b6: f002 fa15 bl 80294e4 80270ba: b918 cbnz r0, 80270c4 rbuf32_put(&ups_rx_rbuf, c); 80270bc: 480c ldr r0, [pc, #48] ; (80270f0 ) 80270be: 9901 ldr r1, [sp, #4] 80270c0: f002 fa31 bl 8029526 USART_ClearITPendingBit(UPS_USART, USART_IT_RXNE); 80270c4: 4808 ldr r0, [pc, #32] ; (80270e8 ) xSemaphoreGiveFromISR(xSem_rx_buf, &xHigherPriorityTaskWoken); 80270c6: 4c0b ldr r4, [pc, #44] ; (80270f4 ) { 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); 80270c8: f240 5125 movw r1, #1317 ; 0x525 80270cc: f7fe fff5 bl 80260ba xSemaphoreGiveFromISR(xSem_rx_buf, &xHigherPriorityTaskWoken); 80270d0: 4b09 ldr r3, [pc, #36] ; (80270f8 ) 80270d2: 4621 mov r1, r4 80270d4: 6818 ldr r0, [r3, #0] 80270d6: f003 fd70 bl 802abba portYIELD_FROM_ISR(xHigherPriorityTaskWoken); 80270da: 6823 ldr r3, [r4, #0] 80270dc: b11b cbz r3, 80270e6 80270de: 4b07 ldr r3, [pc, #28] ; (80270fc ) 80270e0: f04f 5280 mov.w r2, #268435456 ; 0x10000000 80270e4: 601a str r2, [r3, #0] } } 80270e6: bd1c pop {r2, r3, r4, pc} 80270e8: 40004400 .word 0x40004400 80270ec: 2000cb7c .word 0x2000cb7c 80270f0: 2000c84c .word 0x2000c84c 80270f4: 20000b08 .word 0x20000b08 80270f8: 2000cb9c .word 0x2000cb9c 80270fc: e000ed04 .word 0xe000ed04 08027100 : void USART1_IRQHandler(void) { 8027100: 4770 bx lr 08027102 : } void USART2_IRQHandler(void) { rs232_irq_handler(); 8027102: f7ff bfa1 b.w 8027048 08027106 : } void USART3_IRQHandler(void) { 8027106: 4770 bx lr 08027108 : /** * @brief Задача инициализации. ЗапуÑкает оÑновные задачи девайÑа и умирает. * @retval */ void InitTask(void *params) { 8027108: b51f push {r0, r1, r2, r3, r4, lr} // ----------------------------------------------------------------------------- // xTaskCreate(vTaskWdt, "WDT", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL); // ----------------------------------------------------------------------------- InitUSART(); 802710a: f7ff ff3b bl 8026f84 ups_megatec_init(); 802710e: f002 f9a9 bl 8029464 // ----------------------------------------------------------------------------- // RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE); //SETTINGS_SetDefaultDebug(); //SETTINGS_Save(); SETTINGS_Load(); 8027112: f001 fd57 bl 8028bc4 if(set_mode_jumper()){ 8027116: f001 fec1 bl 8028e9c 802711a: b138 cbz r0, 802712c SETTINGS_SetServiceDef(); 802711c: f001 fc12 bl 8028944 SETTINGS_Save(); 8027120: f001 fcfc bl 8028b1c log_event_data(LOG_PSW_CHANGE, "Ð¡Ð±Ñ€Ð¾Ñ Ðº заводÑкому"); 8027124: 2003 movs r0, #3 8027126: 4937 ldr r1, [pc, #220] ; (8027204 ) 8027128: f002 fea6 bl 8029e78 // ----------------------------------------------------------------------------- #ifdef LED_ENABLE LED_Init(); /* ПроÑÑ‚Ð°Ñ Ð¼Ð¸Ð³Ð°Ð»ÐºÐ° Ð´Ð»Ñ Ð¿Ð¾Ð´Ñ‚Ð²ÐµÑ€Ð¶Ð´ÐµÐ½Ð¸Ñ Ð¶Ð¸Ð²ÑƒÑ‡ÐµÑти контроллера */ xTaskCreate(vTaskLedBlink, "LED_Blink", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL);//&xTaskToKill 802712c: 2400 movs r4, #0 #endif // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- #ifdef LED_ENABLE LED_Init(); 802712e: f001 fe11 bl 8028d54 /* ПроÑÑ‚Ð°Ñ Ð¼Ð¸Ð³Ð°Ð»ÐºÐ° Ð´Ð»Ñ Ð¿Ð¾Ð´Ñ‚Ð²ÐµÑ€Ð¶Ð´ÐµÐ½Ð¸Ñ Ð¶Ð¸Ð²ÑƒÑ‡ÐµÑти контроллера */ xTaskCreate(vTaskLedBlink, "LED_Blink", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL);//&xTaskToKill 8027132: 2280 movs r2, #128 ; 0x80 8027134: 4623 mov r3, r4 8027136: 4934 ldr r1, [pc, #208] ; (8027208 ) 8027138: 9400 str r4, [sp, #0] 802713a: 9401 str r4, [sp, #4] 802713c: 9402 str r4, [sp, #8] 802713e: 9403 str r4, [sp, #12] 8027140: 4832 ldr r0, [pc, #200] ; (802720c ) 8027142: f003 fe75 bl 802ae30 #endif // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- #ifdef BUTTON_ENABLE BUTTON_Init(); 8027146: f001 fe61 bl 8028e0c xTaskCreate(vTaskButtons, "Buttons", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL); 802714a: 2280 movs r2, #128 ; 0x80 802714c: 4623 mov r3, r4 802714e: 4930 ldr r1, [pc, #192] ; (8027210 ) 8027150: 9400 str r4, [sp, #0] 8027152: 9401 str r4, [sp, #4] 8027154: 9402 str r4, [sp, #8] 8027156: 9403 str r4, [sp, #12] 8027158: 482e ldr r0, [pc, #184] ; (8027214 ) 802715a: f003 fe69 bl 802ae30 //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); // Так было 802715e: 2001 movs r0, #1 8027160: f7ff fb64 bl 802682c /* UDP for net settings */ //UDP_netsetting_init(); // ----------------------------------------------------------------------------- #ifdef UPS_ENABLE xTaskCreate(UPS_Monitor, "UPS_Monitor", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL); 8027164: 2280 movs r2, #128 ; 0x80 8027166: 4623 mov r3, r4 8027168: 492b ldr r1, [pc, #172] ; (8027218 ) 802716a: 9400 str r4, [sp, #0] 802716c: 9401 str r4, [sp, #4] 802716e: 9402 str r4, [sp, #8] 8027170: 9403 str r4, [sp, #12] 8027172: 482a ldr r0, [pc, #168] ; (802721c ) 8027174: f003 fe5c bl 802ae30 #endif // ----------------------------------------------------------------------------- /* Random number generator */ RNG_Init(); 8027178: f7ff f940 bl 80263fc // ----------------------------------------------------------------------------- #ifdef NET_ENABLE ETH_BSP_Config(); 802717c: f010 fd4c bl 8037c18 LwIP_Init(); 8027180: f00f ff5c bl 803703c #ifdef WEB_SERVER_ENABLE HTTP_Init(); 8027184: f004 ffca bl 802c11c #endif #ifdef SNMP_ENABLE SNMP_Init(); 8027188: f010 fb08 bl 803779c xTaskCreate(SNMP_SysUpTimeTask, "snmpSysUpTime", configMINIMAL_STACK_SIZE, 802718c: 2280 movs r2, #128 ; 0x80 802718e: 4623 mov r3, r4 8027190: 9400 str r4, [sp, #0] 8027192: 9401 str r4, [sp, #4] 8027194: 9402 str r4, [sp, #8] 8027196: 9403 str r4, [sp, #12] 8027198: 4921 ldr r1, [pc, #132] ; (8027220 ) 802719a: 4822 ldr r0, [pc, #136] ; (8027224 ) 802719c: f003 fe48 bl 802ae30 NULL, tskIDLE_PRIORITY, NULL); xTaskCreate(snmp_trap_tread, "snmpTrapTest", 3*configMINIMAL_STACK_SIZE, 80271a0: 4623 mov r3, r4 80271a2: 4921 ldr r1, [pc, #132] ; (8027228 ) 80271a4: 9400 str r4, [sp, #0] 80271a6: f44f 72c0 mov.w r2, #384 ; 0x180 80271aa: 9401 str r4, [sp, #4] 80271ac: 9402 str r4, [sp, #8] 80271ae: 9403 str r4, [sp, #12] 80271b0: 481e ldr r0, [pc, #120] ; (802722c ) 80271b2: f003 fe3d bl 802ae30 #endif #endif // ----------------------------------------------------------------------------- /* SNTP */ SNTP_Init(); 80271b6: f010 fb8d bl 80378d4 xTaskCreate(vTaskOnceSynchro, "sntpOnceSinhro", 2*configMINIMAL_STACK_SIZE, 80271ba: 4b1d ldr r3, [pc, #116] ; (8027230 ) 80271bc: 9400 str r4, [sp, #0] 80271be: 9301 str r3, [sp, #4] 80271c0: 9402 str r4, [sp, #8] 80271c2: 4623 mov r3, r4 80271c4: 9403 str r4, [sp, #12] 80271c6: 491b ldr r1, [pc, #108] ; (8027234 ) 80271c8: 481b ldr r0, [pc, #108] ; (8027238 ) 80271ca: f44f 7280 mov.w r2, #256 ; 0x100 80271ce: f003 fe2f bl 802ae30 NULL, tskIDLE_PRIORITY, &xHandleSntpOnceSinhro); xTaskCreate(vTaskPeriodicSynchro, "sntpPeriodicSinhro", 2*configMINIMAL_STACK_SIZE, 80271d2: 491a ldr r1, [pc, #104] ; (802723c ) 80271d4: 9400 str r4, [sp, #0] 80271d6: f44f 7280 mov.w r2, #256 ; 0x100 80271da: 4623 mov r3, r4 80271dc: 9401 str r4, [sp, #4] 80271de: 9402 str r4, [sp, #8] 80271e0: 9403 str r4, [sp, #12] 80271e2: 4817 ldr r0, [pc, #92] ; (8027240 ) 80271e4: f003 fe24 bl 802ae30 //TEST_IO(); /* Контроль уÑпешной загрузки. Ð¡Ð±Ñ€Ð¾Ñ Ñ„Ð»Ð°Ð³Ð° bootry */ /* Ð¡Ð±Ñ€Ð¾Ñ Ñ„Ð»Ð°Ð³Ð° и Ñохранение нового Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð²Ð¾ флеш памÑти проиÑходт поÑле некоторой задержки Ð´Ð»Ñ Ð·Ð°Ð¿ÑƒÑка вÑех задач */ vTaskDelay(4000); 80271e8: f44f 607a mov.w r0, #4000 ; 0xfa0 80271ec: f004 f8ba bl 802b364 SETTINGS_ResetBootTry(); 80271f0: f001 fd1c bl 8028c2c /* if (!dhcp) SNMP_SendUserTrap(DEVICE_REBOOTED); printf("Hello world\r\n");*/ vTaskDelete(NULL); 80271f4: 4620 mov r0, r4 80271f6: f003 fef3 bl 802afe0 taskYIELD(); } 80271fa: b004 add sp, #16 80271fc: e8bd 4010 ldmia.w sp!, {r4, lr} SNMP_SendUserTrap(DEVICE_REBOOTED); printf("Hello world\r\n");*/ vTaskDelete(NULL); taskYIELD(); 8027200: f004 bc90 b.w 802bb24 8027204: 080387f8 .word 0x080387f8 8027208: 0803881b .word 0x0803881b 802720c: 08028d79 .word 0x08028d79 8027210: 08038825 .word 0x08038825 8027214: 08028e89 .word 0x08028e89 8027218: 0803882d .word 0x0803882d 802721c: 08029c2d .word 0x08029c2d 8027220: 08038839 .word 0x08038839 8027224: 08037535 .word 0x08037535 8027228: 08038847 .word 0x08038847 802722c: 08037695 .word 0x08037695 8027230: 20000b0c .word 0x20000b0c 8027234: 08038854 .word 0x08038854 8027238: 080379a1 .word 0x080379a1 802723c: 08038863 .word 0x08038863 8027240: 08037959 .word 0x08037959 08027244
: void vApplicationTickHook(void) { } int main() { 8027244: b51f push {r0, r1, r2, r3, r4, lr} TIM_Cmd(TIM13, DISABLE); 8027246: 4c22 ldr r4, [pc, #136] ; (80272d0 ) 8027248: 2100 movs r1, #0 802724a: 4620 mov r0, r4 802724c: f7fe fe2a bl 8025ea4 TIM_ClearITPendingBit(TIM13, TIM_IT_Update); 8027250: 4620 mov r0, r4 8027252: 2101 movs r1, #1 8027254: f7fe fe3b bl 8025ece 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"); 8027258: b672 cpsid i __disable_irq(); NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x20000); 802725a: f04f 6000 mov.w r0, #134217728 ; 0x8000000 802725e: f44f 3100 mov.w r1, #131072 ; 0x20000 8027262: f7fe f9a1 bl 80255a8 __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 */ 8027266: 4a1b ldr r2, [pc, #108] ; (80272d4 ) 8027268: 68d1 ldr r1, [r2, #12] reg_value &= ~(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk); /* clear bits to change */ 802726a: f64f 03ff movw r3, #63743 ; 0xf8ff 802726e: 400b ands r3, r1 reg_value = (reg_value | 8027270: f043 63bf orr.w r3, r3, #100139008 ; 0x5f80000 8027274: 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; 8027278: 60d3 str r3, [r2, #12] NVIC_SetPriorityGrouping(0); NVIC_PriorityGroupConfig( NVIC_PriorityGroup_4 ); 802727a: f44f 7040 mov.w r0, #768 ; 0x300 802727e: f7fe f955 bl 802552c 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"); 8027282: b662 cpsie i __enable_irq(); RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE); 8027284: 2101 movs r1, #1 8027286: f44f 5080 mov.w r0, #4096 ; 0x1000 802728a: f7fe fbaf bl 80259ec /* Clear flash error flags if were set */ FLASH_ClearFlag(FLASH_FLAG_PGPERR); 802728e: 2040 movs r0, #64 ; 0x40 8027290: f7fe f9c0 bl 8025614 FLASH_ClearFlag(FLASH_FLAG_PGSERR); 8027294: 2080 movs r0, #128 ; 0x80 8027296: f7fe f9bd bl 8025614 log_init(false); //log_test(); //spi_flash_test(); // NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); xTaskCreate( InitTask, "InitTask", 1000, NULL, tskIDLE_PRIORITY, NULL); 802729a: 2400 movs r4, #0 /* Clear flash error flags if were set */ FLASH_ClearFlag(FLASH_FLAG_PGPERR); FLASH_ClearFlag(FLASH_FLAG_PGSERR); gpio_init(); 802729c: f7ff f84a bl 8026334 WDG_Init(); 80272a0: f001 fd0e bl 8028cc0 spi_flash_init(); 80272a4: f7ff fd4c bl 8026d40 log_init(false); 80272a8: 2000 movs r0, #0 80272aa: f002 fd1d bl 8029ce8 //log_test(); //spi_flash_test(); // NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); xTaskCreate( InitTask, "InitTask", 1000, NULL, tskIDLE_PRIORITY, NULL); 80272ae: 490a ldr r1, [pc, #40] ; (80272d8 ) 80272b0: 9400 str r4, [sp, #0] 80272b2: f44f 727a mov.w r2, #1000 ; 0x3e8 80272b6: 4623 mov r3, r4 80272b8: 9401 str r4, [sp, #4] 80272ba: 9402 str r4, [sp, #8] 80272bc: 9403 str r4, [sp, #12] 80272be: 4807 ldr r0, [pc, #28] ; (80272dc ) 80272c0: f003 fdb6 bl 802ae30 vTaskStartScheduler(); 80272c4: f003 fee6 bl 802b094 /*while(1) { }*/ } 80272c8: 4620 mov r0, r4 80272ca: b004 add sp, #16 80272cc: bd10 pop {r4, pc} 80272ce: bf00 nop 80272d0: 40001c00 .word 0x40001c00 80272d4: e000ed00 .word 0xe000ed00 80272d8: 08038876 .word 0x08038876 80272dc: 08027109 .word 0x08027109 080272e0 : * @brief This function handles NMI exception. * @param None * @retval None */ void NMI_Handler(void) { 80272e0: 4770 bx lr 80272e2: 0000 movs r0, r0 080272e4 : } void HardFault_Output(uint32_t *sp) { 80272e4: 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]; 80272e8: e890 0808 ldmia.w r0, {r3, fp} uint32_t r2 = sp[2]; 80272ec: f8d0 a008 ldr.w sl, [r0, #8] uint32_t r3 = sp[3]; 80272f0: f8d0 900c ldr.w r9, [r0, #12] uint32_t r12 = sp[4]; 80272f4: f8d0 8010 ldr.w r8, [r0, #16] uint32_t lr = sp[5]; 80272f8: 6947 ldr r7, [r0, #20] uint32_t pc = sp[6]; 80272fa: 6986 ldr r6, [r0, #24] uint32_t psr = sp[7]; 80272fc: 69c5 ldr r5, [r0, #28] printf("HardFault:\n\r"); 80272fe: 9301 str r3, [sp, #4] void NMI_Handler(void) { } void HardFault_Output(uint32_t *sp) { 8027300: 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"); 8027302: 4816 ldr r0, [pc, #88] ; (802735c ) 8027304: f000 fbc0 bl 8027a88 /* Print CFSR register */ /* Print CPU registers */ printf("\n\rRegisters:\n\r"); 8027308: 4815 ldr r0, [pc, #84] ; (8027360 ) 802730a: f000 fbbd bl 8027a88 printf("SP 0x%08lx\n\r", (uint32_t)sp); 802730e: 4815 ldr r0, [pc, #84] ; (8027364 ) 8027310: 4621 mov r1, r4 8027312: f000 fbb9 bl 8027a88 printf("R0 0x%08lx\n\r", r0); 8027316: 9b01 ldr r3, [sp, #4] 8027318: 4813 ldr r0, [pc, #76] ; (8027368 ) 802731a: 4619 mov r1, r3 802731c: f000 fbb4 bl 8027a88 printf("R1 0x%08lx\n\r", r1); 8027320: 4812 ldr r0, [pc, #72] ; (802736c ) 8027322: 4659 mov r1, fp 8027324: f000 fbb0 bl 8027a88 printf("R2 0x%08lx\n\r", r2); 8027328: 4811 ldr r0, [pc, #68] ; (8027370 ) 802732a: 4651 mov r1, sl 802732c: f000 fbac bl 8027a88 printf("R3 0x%08lx\n\r", r3); 8027330: 4810 ldr r0, [pc, #64] ; (8027374 ) 8027332: 4649 mov r1, r9 8027334: f000 fba8 bl 8027a88 printf("R12 0x%08lx\n\r", r12); 8027338: 480f ldr r0, [pc, #60] ; (8027378 ) 802733a: 4641 mov r1, r8 802733c: f000 fba4 bl 8027a88 printf("LR 0x%08lx\n\r", lr); 8027340: 480e ldr r0, [pc, #56] ; (802737c ) 8027342: 4639 mov r1, r7 8027344: f000 fba0 bl 8027a88 printf("PC 0x%08lx\n\r", pc); 8027348: 480d ldr r0, [pc, #52] ; (8027380 ) 802734a: 4631 mov r1, r6 802734c: f000 fb9c bl 8027a88 printf("PSR 0x%08lx\n\r", psr); 8027350: 480c ldr r0, [pc, #48] ; (8027384 ) 8027352: 4629 mov r1, r5 8027354: f000 fb98 bl 8027a88 8027358: e7fe b.n 8027358 802735a: bf00 nop 802735c: 0803887f .word 0x0803887f 8027360: 0803888c .word 0x0803888c 8027364: 0803889b .word 0x0803889b 8027368: 080388b1 .word 0x080388b1 802736c: 080388c7 .word 0x080388c7 8027370: 080388dd .word 0x080388dd 8027374: 080388f3 .word 0x080388f3 8027378: 08038909 .word 0x08038909 802737c: 0803891f .word 0x0803891f 8027380: 08038935 .word 0x08038935 8027384: 0803894b .word 0x0803894b 08027388 : * @retval None */ __attribute__( (naked) ) void HardFault_Handler(void) { __asm volatile 8027388: f01e 0f04 tst.w lr, #4 802738c: bf0c ite eq 802738e: f3ef 8008 mrseq r0, MSP 8027392: f3ef 8009 mrsne r0, PSP 8027396: f8df 1004 ldr.w r1, [pc, #4] ; 802739c 802739a: 4708 bx r1 0802739c : 802739c: 080272e5 .word 0x080272e5 080273a0 : * @brief This function handles Memory Manage exception. * @param None * @retval None */ void MemManage_Handler(void) { 80273a0: e7fe b.n 80273a0 080273a2 : * @brief This function handles Bus Fault exception. * @param None * @retval None */ void BusFault_Handler(void) { 80273a2: e7fe b.n 80273a2 080273a4 : * @brief This function handles Usage Fault exception. * @param None * @retval None */ void UsageFault_Handler(void) { 80273a4: e7fe b.n 80273a4 080273a6 : * @brief This function handles Debug Monitor exception. * @param None * @retval None */ void DebugMon_Handler(void) { 80273a6: 4770 bx lr 080273a8 : /*void PPP_IRQHandler(void) { }*/ void SDIO_IRQHandler(void) { 80273a8: 4770 bx lr 80273aa: 0000 movs r0, r0 080273ac : * @brief This function handles ethernet DMA interrupt request. * @param None * @retval None */ void ETH_IRQHandler(void) { 80273ac: b507 push {r0, r1, r2, lr} portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; 80273ae: 2300 movs r3, #0 /* Frame received */ if ( ETH_GetDMAFlagStatus(ETH_DMA_FLAG_R) == SET) 80273b0: 2040 movs r0, #64 ; 0x40 * @param None * @retval None */ void ETH_IRQHandler(void) { portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; 80273b2: 9301 str r3, [sp, #4] /* Frame received */ if ( ETH_GetDMAFlagStatus(ETH_DMA_FLAG_R) == SET) 80273b4: f010 fece bl 8038154 80273b8: 2801 cmp r0, #1 80273ba: d104 bne.n 80273c6 { /* Give the semaphore to wakeup LwIP task */ xSemaphoreGiveFromISR( s_xSemaphore, &xHigherPriorityTaskWoken ); 80273bc: 4b09 ldr r3, [pc, #36] ; (80273e4 ) 80273be: a901 add r1, sp, #4 80273c0: 6818 ldr r0, [r3, #0] 80273c2: f003 fbfa bl 802abba } /* Clear the interrupt flags. */ /* Clear the Eth DMA Rx IT pending bits */ ETH_DMAClearITPendingBit(ETH_DMA_IT_R); 80273c6: 2040 movs r0, #64 ; 0x40 80273c8: f010 feda bl 8038180 ETH_DMAClearITPendingBit(ETH_DMA_IT_NIS); 80273cc: f44f 3080 mov.w r0, #65536 ; 0x10000 80273d0: f010 fed6 bl 8038180 // Switch tasks if necessary. */ if( xHigherPriorityTaskWoken != pdFALSE ) 80273d4: 9b01 ldr r3, [sp, #4] 80273d6: b11b cbz r3, 80273e0 { portEND_SWITCHING_ISR( xHigherPriorityTaskWoken ); 80273d8: 4b03 ldr r3, [pc, #12] ; (80273e8 ) 80273da: f04f 5280 mov.w r2, #268435456 ; 0x10000000 80273de: 601a str r2, [r3, #0] } } 80273e0: bd0e pop {r1, r2, r3, pc} 80273e2: bf00 nop 80273e4: 2000c7d0 .word 0x2000c7d0 80273e8: e000ed04 .word 0xe000ed04 080273ec : #ifdef PRINTF_LONG_LONG_SUPPORT static void _TFP_GCC_NO_INLINE_ ulli2a( unsigned long long int num, struct param *p) { 80273ec: 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) 80273f0: 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; 80273f2: 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) { 80273f6: 4681 mov r9, r0 80273f8: 468a mov sl, r1 80273fa: 4690 mov r8, r2 int n = 0; unsigned long long int d = 1; char *bf = p->bf; while (num / d >= p->base) 80273fc: 461e mov r6, r3 80273fe: 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; 8027400: 2401 movs r4, #1 8027402: 2500 movs r5, #0 char *bf = p->bf; while (num / d >= p->base) 8027404: e006 b.n 8027414 d *= p->base; 8027406: fb04 f307 mul.w r3, r4, r7 802740a: fb06 3305 mla r3, r6, r5, r3 802740e: fba4 4506 umull r4, r5, r4, r6 8027412: 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) 8027414: 4648 mov r0, r9 8027416: 4651 mov r1, sl 8027418: 4622 mov r2, r4 802741a: 462b mov r3, r5 802741c: f7f9 fed6 bl 80211cc <__aeabi_uldivmod> 8027420: 42b9 cmp r1, r7 8027422: bf08 it eq 8027424: 42b0 cmpeq r0, r6 8027426: d2ee bcs.n 8027406 8027428: 2600 movs r6, #0 802742a: e02d b.n 8027488 d *= p->base; while (d != 0) { int dgt = num / d; 802742c: 4622 mov r2, r4 802742e: 462b mov r3, r5 8027430: 4648 mov r0, r9 8027432: 4651 mov r1, sl 8027434: f7f9 feca bl 80211cc <__aeabi_uldivmod> num %= d; 8027438: 4651 mov r1, sl 802743a: 4622 mov r2, r4 802743c: 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; 802743e: 4607 mov r7, r0 num %= d; 8027440: 4648 mov r0, r9 8027442: f7f9 fec3 bl 80211cc <__aeabi_uldivmod> d /= p->base; 8027446: 4620 mov r0, r4 8027448: 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; 802744a: 4691 mov r9, r2 802744c: 469a mov sl, r3 d /= p->base; 802744e: f8d8 200c ldr.w r2, [r8, #12] 8027452: 2300 movs r3, #0 8027454: f7f9 feba bl 80211cc <__aeabi_uldivmod> 8027458: 4604 mov r4, r0 802745a: 460d mov r5, r1 if (n || dgt > 0 || d == 0) { 802745c: b926 cbnz r6, 8027468 802745e: 2f00 cmp r7, #0 8027460: dc02 bgt.n 8027468 8027462: ea54 0305 orrs.w r3, r4, r5 8027466: d1e1 bne.n 802742c *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); 8027468: 2f09 cmp r7, #9 802746a: b2fa uxtb r2, r7 802746c: dd07 ble.n 802747e 802746e: f898 3000 ldrb.w r3, [r8] 8027472: f013 0f04 tst.w r3, #4 8027476: bf0c ite eq 8027478: 2357 moveq r3, #87 ; 0x57 802747a: 2337 movne r3, #55 ; 0x37 802747c: e000 b.n 8027480 802747e: 2330 movs r3, #48 ; 0x30 8027480: 189b adds r3, r3, r2 8027482: f80b 3b01 strb.w r3, [fp], #1 ++n; 8027486: 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) { 8027488: ea54 0305 orrs.w r3, r4, r5 802748c: d1ce bne.n 802742c if (n || dgt > 0 || d == 0) { *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); ++n; } } *bf = 0; 802748e: 2300 movs r3, #0 8027490: f88b 3000 strb.w r3, [fp] 8027494: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 08027498 : } #endif #ifdef PRINTF_LONG_SUPPORT static void uli2a(unsigned long int num, struct param *p) { 8027498: b570 push {r4, r5, r6, lr} int n = 0; unsigned long int d = 1; char *bf = p->bf; while (num / d >= p->base) 802749a: 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; 802749c: 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; 802749e: 2301 movs r3, #1 char *bf = p->bf; while (num / d >= p->base) 80274a0: e000 b.n 80274a4 d *= p->base; 80274a2: 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) 80274a4: fbb0 f5f3 udiv r5, r0, r3 80274a8: 4295 cmp r5, r2 80274aa: d2fa bcs.n 80274a2 80274ac: 2500 movs r5, #0 80274ae: e01a b.n 80274e6 d *= p->base; while (d != 0) { int dgt = num / d; num %= d; d /= p->base; 80274b0: 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; 80274b2: fbb0 f2f3 udiv r2, r0, r3 num %= d; 80274b6: fb03 0012 mls r0, r3, r2, r0 d /= p->base; 80274ba: fbb3 f3f6 udiv r3, r3, r6 if (n || dgt > 0 || d == 0) { 80274be: b91d cbnz r5, 80274c8 80274c0: 2a00 cmp r2, #0 80274c2: dc01 bgt.n 80274c8 80274c4: 2b00 cmp r3, #0 80274c6: d1f3 bne.n 80274b0 *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); 80274c8: 2a09 cmp r2, #9 80274ca: b2d6 uxtb r6, r2 80274cc: dd06 ble.n 80274dc 80274ce: 780a ldrb r2, [r1, #0] 80274d0: f012 0f04 tst.w r2, #4 80274d4: bf0c ite eq 80274d6: 2257 moveq r2, #87 ; 0x57 80274d8: 2237 movne r2, #55 ; 0x37 80274da: e000 b.n 80274de 80274dc: 2230 movs r2, #48 ; 0x30 80274de: 1992 adds r2, r2, r6 80274e0: f804 2b01 strb.w r2, [r4], #1 ++n; 80274e4: 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) { 80274e6: 2b00 cmp r3, #0 80274e8: d1e2 bne.n 80274b0 if (n || dgt > 0 || d == 0) { *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); ++n; } } *bf = 0; 80274ea: 7023 strb r3, [r4, #0] 80274ec: bd70 pop {r4, r5, r6, pc} 080274ee : uli2a(num, p); } #endif static void ui2a(unsigned int num, struct param *p) { 80274ee: b570 push {r4, r5, r6, lr} int n = 0; unsigned int d = 1; char *bf = p->bf; while (num / d >= p->base) 80274f0: 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; 80274f2: 690c ldr r4, [r1, #16] #endif static void ui2a(unsigned int num, struct param *p) { int n = 0; unsigned int d = 1; 80274f4: 2301 movs r3, #1 char *bf = p->bf; while (num / d >= p->base) 80274f6: e000 b.n 80274fa d *= p->base; 80274f8: 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) 80274fa: fbb0 f5f3 udiv r5, r0, r3 80274fe: 4295 cmp r5, r2 8027500: d2fa bcs.n 80274f8 8027502: 2500 movs r5, #0 8027504: e01a b.n 802753c d *= p->base; while (d != 0) { int dgt = num / d; num %= d; d /= p->base; 8027506: 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; 8027508: fbb0 f2f3 udiv r2, r0, r3 num %= d; 802750c: fb03 0012 mls r0, r3, r2, r0 d /= p->base; 8027510: fbb3 f3f6 udiv r3, r3, r6 if (n || dgt > 0 || d == 0) { 8027514: b91d cbnz r5, 802751e 8027516: 2a00 cmp r2, #0 8027518: dc01 bgt.n 802751e 802751a: 2b00 cmp r3, #0 802751c: d1f3 bne.n 8027506 *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); 802751e: 2a09 cmp r2, #9 8027520: b2d6 uxtb r6, r2 8027522: dd06 ble.n 8027532 8027524: 780a ldrb r2, [r1, #0] 8027526: f012 0f04 tst.w r2, #4 802752a: bf0c ite eq 802752c: 2257 moveq r2, #87 ; 0x57 802752e: 2237 movne r2, #55 ; 0x37 8027530: e000 b.n 8027534 8027532: 2230 movs r2, #48 ; 0x30 8027534: 1992 adds r2, r2, r6 8027536: f804 2b01 strb.w r2, [r4], #1 ++n; 802753a: 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) { 802753c: 2b00 cmp r3, #0 802753e: d1e2 bne.n 8027506 if (n || dgt > 0 || d == 0) { *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); ++n; } } *bf = 0; 8027540: 7023 strb r3, [r4, #0] 8027542: bd70 pop {r4, r5, r6, pc} 08027544 : } static void putchw(void *putp, putcf putf, struct param *p) { 8027544: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} char ch; int n = p->width; char *bf = p->bf; 8027548: 6913 ldr r3, [r2, #16] } static void putchw(void *putp, putcf putf, struct param *p) { char ch; int n = p->width; 802754a: 6854 ldr r4, [r2, #4] } static void putchw(void *putp, putcf putf, struct param *p) { 802754c: 4606 mov r6, r0 802754e: 460f mov r7, r1 8027550: 4615 mov r5, r2 char ch; int n = p->width; char *bf = p->bf; /* Number of filling characters */ while (*bf++ && n > 0) 8027552: e000 b.n 8027556 n--; 8027554: 3c01 subs r4, #1 char ch; int n = p->width; char *bf = p->bf; /* Number of filling characters */ while (*bf++ && n > 0) 8027556: f813 2b01 ldrb.w r2, [r3], #1 802755a: b912 cbnz r2, 8027562 n--; if (p->sign) 802755c: 7a2b ldrb r3, [r5, #8] 802755e: b91b cbnz r3, 8027568 8027560: e003 b.n 802756a char ch; int n = p->width; char *bf = p->bf; /* Number of filling characters */ while (*bf++ && n > 0) 8027562: 2c00 cmp r4, #0 8027564: dcf6 bgt.n 8027554 8027566: e7f9 b.n 802755c n--; if (p->sign) n--; 8027568: 3c01 subs r4, #1 if (p->alt && p->base == 16) 802756a: 782b ldrb r3, [r5, #0] 802756c: 0799 lsls r1, r3, #30 802756e: d507 bpl.n 8027580 8027570: 68eb ldr r3, [r5, #12] 8027572: 2b10 cmp r3, #16 8027574: d101 bne.n 802757a n -= 2; 8027576: 3c02 subs r4, #2 8027578: e002 b.n 8027580 else if (p->alt && p->base == 8) 802757a: 2b08 cmp r3, #8 n--; 802757c: bf08 it eq 802757e: 3c01 subeq r4, #1 /* Fill with space to align to the right, before alternate or sign */ if (!p->lz && !p->align_left) { 8027580: 782b ldrb r3, [r5, #0] 8027582: f013 0f09 tst.w r3, #9 8027586: d10d bne.n 80275a4 8027588: 46a0 mov r8, r4 802758a: e004 b.n 8027596 while (n-- > 0) putf(putp, ' '); 802758c: 4630 mov r0, r6 802758e: 2120 movs r1, #32 8027590: 47b8 blx r7 8027592: 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) 8027596: f1b8 0f00 cmp.w r8, #0 802759a: dcf7 bgt.n 802758c return neg ? -fvalue : fvalue; } static void putchw(void *putp, putcf putf, struct param *p) 802759c: 1e63 subs r3, r4, #1 802759e: ea24 74e4 bic.w r4, r4, r4, asr #31 80275a2: 1b1c subs r4, r3, r4 while (n-- > 0) putf(putp, ' '); } /* print sign */ if (p->sign) 80275a4: 7a29 ldrb r1, [r5, #8] 80275a6: b109 cbz r1, 80275ac putf(putp, p->sign); 80275a8: 4630 mov r0, r6 80275aa: 47b8 blx r7 /* Alternate */ if (p->alt && p->base == 16) { 80275ac: 782b ldrb r3, [r5, #0] 80275ae: 079a lsls r2, r3, #30 80275b0: d512 bpl.n 80275d8 80275b2: 68eb ldr r3, [r5, #12] 80275b4: 2b10 cmp r3, #16 80275b6: d10a bne.n 80275ce putf(putp, '0'); 80275b8: 2130 movs r1, #48 ; 0x30 80275ba: 4630 mov r0, r6 80275bc: 47b8 blx r7 putf(putp, (p->uc ? 'X' : 'x')); 80275be: 782b ldrb r3, [r5, #0] 80275c0: f013 0f04 tst.w r3, #4 80275c4: 4630 mov r0, r6 80275c6: bf0c ite eq 80275c8: 2178 moveq r1, #120 ; 0x78 80275ca: 2158 movne r1, #88 ; 0x58 80275cc: e003 b.n 80275d6 } else if (p->alt && p->base == 8) { 80275ce: 2b08 cmp r3, #8 80275d0: d102 bne.n 80275d8 putf(putp, '0'); 80275d2: 4630 mov r0, r6 80275d4: 2130 movs r1, #48 ; 0x30 80275d6: 47b8 blx r7 } /* Fill with zeros, after alternate or sign */ if (p->lz) { 80275d8: 782b ldrb r3, [r5, #0] 80275da: 07db lsls r3, r3, #31 80275dc: d50d bpl.n 80275fa 80275de: 46a0 mov r8, r4 80275e0: e004 b.n 80275ec while (n-- > 0) putf(putp, '0'); 80275e2: 4630 mov r0, r6 80275e4: 2130 movs r1, #48 ; 0x30 80275e6: 47b8 blx r7 80275e8: f108 38ff add.w r8, r8, #4294967295 putf(putp, '0'); } /* Fill with zeros, after alternate or sign */ if (p->lz) { while (n-- > 0) 80275ec: f1b8 0f00 cmp.w r8, #0 80275f0: dcf7 bgt.n 80275e2 return neg ? -fvalue : fvalue; } static void putchw(void *putp, putcf putf, struct param *p) 80275f2: 1e63 subs r3, r4, #1 80275f4: ea24 74e4 bic.w r4, r4, r4, asr #31 80275f8: 1b1c subs r4, r3, r4 while (n-- > 0) putf(putp, '0'); } /* Put actual buffer */ bf = p->bf; 80275fa: f8d5 8010 ldr.w r8, [r5, #16] while ((ch = *bf++)) 80275fe: e001 b.n 8027604 putf(putp, ch); 8027600: 4630 mov r0, r6 8027602: 47b8 blx r7 putf(putp, '0'); } /* Put actual buffer */ bf = p->bf; while ((ch = *bf++)) 8027604: f818 1b01 ldrb.w r1, [r8], #1 8027608: 2900 cmp r1, #0 802760a: d1f9 bne.n 8027600 putf(putp, ch); /* Fill with space to align to the left, after string */ if (!p->lz && p->align_left) { 802760c: 782b ldrb r3, [r5, #0] 802760e: f003 0309 and.w r3, r3, #9 8027612: 2b08 cmp r3, #8 8027614: d106 bne.n 8027624 8027616: e003 b.n 8027620 while (n-- > 0) putf(putp, ' '); 8027618: 4630 mov r0, r6 802761a: 2120 movs r1, #32 802761c: 47b8 blx r7 802761e: 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) 8027620: 2c00 cmp r4, #0 8027622: dcf9 bgt.n 8027618 8027624: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 08027628 <_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) 8027628: 6883 ldr r3, [r0, #8] 802762a: 6802 ldr r2, [r0, #0] 802762c: 4293 cmp r3, r2 data->dest[data->num_chars] = c; 802762e: bf3c itt cc 8027630: 6842 ldrcc r2, [r0, #4] 8027632: 54d1 strbcc r1, [r2, r3] data->num_chars ++; 8027634: 6883 ldr r3, [r0, #8] 8027636: 3301 adds r3, #1 8027638: 6083 str r3, [r0, #8] 802763a: 4770 bx lr 0802763c <_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; 802763c: e890 000c ldmia.w r0, {r2, r3} 8027640: 54d1 strb r1, [r2, r3] 8027642: 3301 adds r3, #1 8027644: 6043 str r3, [r0, #4] 8027646: 4770 bx lr 08027648 : putf(putp, ' '); } } void tfp_format(void *putp, putcf putf, const char *fmt, va_list va) { 8027648: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802764c: b09b sub sp, #108 ; 0x6c 802764e: 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; 8027650: aa04 add r2, sp, #16 putf(putp, ' '); } } void tfp_format(void *putp, putcf putf, const char *fmt, va_list va) { 8027652: 4605 mov r5, r0 8027654: 460e mov r6, r1 8027656: 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; 8027658: 920e str r2, [sp, #56] ; 0x38 while ((ch = *(fmt++))) { 802765a: e208 b.n 8027a6e if (ch != '%') { 802765c: 2925 cmp r1, #37 ; 0x25 802765e: d000 beq.n 8027662 8027660: e13a b.n 80278d8 #endif /* Init parameter struct */ p.lz = 0; p.alt = 0; p.width = 0; p.align_left = 0; 8027662: 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; 8027666: 2300 movs r3, #0 p.align_left = 0; 8027668: f002 02fc and.w r2, r2, #252 ; 0xfc 802766c: f363 02c3 bfi r2, r3, #3, #1 8027670: f88d 2028 strb.w r2, [sp, #40] ; 0x28 p.sign = 0; p.prec = 2; 8027674: 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; 8027676: b2d2 uxtb r2, r2 8027678: f002 0c01 and.w ip, r2, #1 802767c: f3c2 0040 ubfx r0, r2, #1, #1 p.alt = 0; p.width = 0; 8027680: 930b str r3, [sp, #44] ; 0x2c p.align_left = 0; p.sign = 0; 8027682: f88d 3030 strb.w r3, [sp, #48] ; 0x30 p.prec = 2; 8027686: f88d 103c strb.w r1, [sp, #60] ; 0x3c 802768a: f3c2 02c0 ubfx r2, r2, #3, #1 /* Flags */ while ((ch = *(fmt++))) { 802768e: e012 b.n 80276b6 switch (ch) { 8027690: 292d cmp r1, #45 ; 0x2d 8027692: d00f beq.n 80276b4 8027694: d804 bhi.n 80276a0 8027696: 2923 cmp r1, #35 ; 0x23 8027698: d008 beq.n 80276ac 802769a: 292b cmp r1, #43 ; 0x2b 802769c: d10f bne.n 80276be 802769e: e007 b.n 80276b0 80276a0: 2930 cmp r1, #48 ; 0x30 80276a2: d000 beq.n 80276a6 80276a4: e00b b.n 80276be case '-': p.align_left = 1; continue; case '0': p.lz = 1; 80276a6: f04f 0c01 mov.w ip, #1 continue; 80276aa: e004 b.n 80276b6 case '#': p.alt = 1; 80276ac: 2001 movs r0, #1 continue; 80276ae: e002 b.n 80276b6 case '+': p.sign = 1; 80276b0: 2301 movs r3, #1 continue; 80276b2: e000 b.n 80276b6 /* Flags */ while ((ch = *(fmt++))) { switch (ch) { case '-': p.align_left = 1; 80276b4: 2201 movs r2, #1 p.align_left = 0; p.sign = 0; p.prec = 2; /* Flags */ while ((ch = *(fmt++))) { 80276b6: f817 1b01 ldrb.w r1, [r7], #1 80276ba: 2900 cmp r1, #0 80276bc: d1e8 bne.n 8027690 80276be: f89d 8028 ldrb.w r8, [sp, #40] ; 0x28 80276c2: f88d 3030 strb.w r3, [sp, #48] ; 0x30 80276c6: f36c 0800 bfi r8, ip, #0, #1 80276ca: 46c4 mov ip, r8 80276cc: f360 0c41 bfi ip, r0, #1, #1 80276d0: 4660 mov r0, ip } break; } /* Width */ if (ch >= '0' && ch <= '9') { 80276d2: f1a1 0330 sub.w r3, r1, #48 ; 0x30 80276d6: f362 00c3 bfi r0, r2, #3, #1 80276da: 2b09 cmp r3, #9 80276dc: f88d 0028 strb.w r0, [sp, #40] ; 0x28 80276e0: d81d bhi.n 802771e 80276e2: e004 b.n 80276ee unsigned int num = 0; int digit; while ((digit = a2d(ch)) >= 0) { if (digit > base) break; num = num * base + digit; 80276e4: fb00 3202 mla r2, r0, r2, r3 ch = *p++; 80276e8: f817 1b01 ldrb.w r1, [r7], #1 80276ec: e001 b.n 80276f2 } break; } /* Width */ if (ch >= '0' && ch <= '9') { 80276ee: 2200 movs r2, #0 unsigned int num = 0; int digit; while ((digit = a2d(ch)) >= 0) { if (digit > base) break; num = num * base + digit; 80276f0: 200a movs r0, #10 ui2a(num, p); } static int a2d(char ch) { if (ch >= '0' && ch <= '9') 80276f2: f1a1 0330 sub.w r3, r1, #48 ; 0x30 80276f6: fa5f fc83 uxtb.w ip, r3 80276fa: f1bc 0f09 cmp.w ip, #9 80276fe: d9f1 bls.n 80276e4 return ch - '0'; else if (ch >= 'a' && ch <= 'f') 8027700: f1a1 0361 sub.w r3, r1, #97 ; 0x61 8027704: 2b05 cmp r3, #5 8027706: d802 bhi.n 802770e return ch - 'a' + 10; 8027708: f1a1 0357 sub.w r3, r1, #87 ; 0x57 802770c: e1b5 b.n 8027a7a else if (ch >= 'A' && ch <= 'F') 802770e: f1a1 0341 sub.w r3, r1, #65 ; 0x41 8027712: 2b05 cmp r3, #5 8027714: d802 bhi.n 802771c return ch - 'A' + 10; 8027716: f1a1 0337 sub.w r3, r1, #55 ; 0x37 802771a: e1ae b.n 8027a7a break; num = num * base + digit; ch = *p++; } *src = p; *nump = num; 802771c: 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 == '.') { 802771e: 292e cmp r1, #46 ; 0x2e 8027720: d10e bne.n 8027740 //p.lz = 1; /* zero-padding */ /* ignore actual 0-fill size: */ ch = *(fmt++); if (ch >= '0' && ch <= '9') 8027722: 783a ldrb r2, [r7, #0] 8027724: 3a30 subs r2, #48 ; 0x30 8027726: 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++); 8027728: 1c7b adds r3, r7, #1 if (ch >= '0' && ch <= '9') 802772a: 2a09 cmp r2, #9 p.prec = ch - '0'; 802772c: bf98 it ls 802772e: f88d 203c strbls.w r2, [sp, #60] ; 0x3c do { ch = *(fmt++); 8027732: f813 1b01 ldrb.w r1, [r3], #1 } while (ch >= '0' && ch <= '9'); 8027736: f1a1 0230 sub.w r2, r1, #48 ; 0x30 802773a: 2a09 cmp r2, #9 ch = *(fmt++); if (ch >= '0' && ch <= '9') p.prec = ch - '0'; do { ch = *(fmt++); 802773c: 461f mov r7, r3 } while (ch >= '0' && ch <= '9'); 802773e: d9f8 bls.n 8027732 } #ifdef PRINTF_SIZE_T_SUPPORT # ifdef PRINTF_LONG_SUPPORT if (ch == 'z') { 8027740: 297a cmp r1, #122 ; 0x7a 8027742: d102 bne.n 802774a ch = *(fmt++); 8027744: f817 1b01 ldrb.w r1, [r7], #1 8027748: e005 b.n 8027756 } else # endif #endif #ifdef PRINTF_LONG_SUPPORT if (ch == 'l') { 802774a: 296c cmp r1, #108 ; 0x6c 802774c: d109 bne.n 8027762 ch = *(fmt++); 802774e: 7839 ldrb r1, [r7, #0] lng = 1; #ifdef PRINTF_LONG_LONG_SUPPORT if (ch == 'l') { 8027750: 296c cmp r1, #108 ; 0x6c 8027752: d002 beq.n 802775a # endif #endif #ifdef PRINTF_LONG_SUPPORT if (ch == 'l') { ch = *(fmt++); 8027754: 3701 adds r7, #1 lng = 1; 8027756: 2301 movs r3, #1 8027758: e004 b.n 8027764 #ifdef PRINTF_LONG_LONG_SUPPORT if (ch == 'l') { ch = *(fmt++); 802775a: 7879 ldrb r1, [r7, #1] lng = 2; 802775c: 2302 movs r3, #2 if (ch == 'l') { ch = *(fmt++); lng = 1; #ifdef PRINTF_LONG_LONG_SUPPORT if (ch == 'l') { ch = *(fmt++); 802775e: 3702 adds r7, #2 8027760: e000 b.n 8027764 while ((ch = *(fmt++))) { if (ch != '%') { putf(putp, ch); } else { #ifdef PRINTF_LONG_SUPPORT char lng = 0; /* 1 for long, 2 for long long */ 8027762: 2300 movs r3, #0 lng = 2; } #endif } #endif switch (ch) { 8027764: 2969 cmp r1, #105 ; 0x69 8027766: d036 beq.n 80277d6 8027768: d816 bhi.n 8027798 802776a: 2963 cmp r1, #99 ; 0x63 802776c: f000 80a1 beq.w 80278b2 8027770: d80c bhi.n 802778c 8027772: 2946 cmp r1, #70 ; 0x46 8027774: f000 80b3 beq.w 80278de 8027778: d806 bhi.n 8027788 802777a: 2900 cmp r1, #0 802777c: f000 8181 beq.w 8027a82 8027780: 2925 cmp r1, #37 ; 0x25 8027782: f040 8174 bne.w 8027a6e 8027786: e0a7 b.n 80278d8 8027788: 2958 cmp r1, #88 ; 0x58 802778a: e012 b.n 80277b2 802778c: 2964 cmp r1, #100 ; 0x64 802778e: d022 beq.n 80277d6 8027790: 2966 cmp r1, #102 ; 0x66 8027792: f040 816c bne.w 8027a6e 8027796: e0a2 b.n 80278de 8027798: 2973 cmp r1, #115 ; 0x73 802779a: f000 8090 beq.w 80278be 802779e: d805 bhi.n 80277ac 80277a0: 296f cmp r1, #111 ; 0x6f 80277a2: d078 beq.n 8027896 80277a4: 2970 cmp r1, #112 ; 0x70 80277a6: f040 8162 bne.w 8027a6e 80277aa: e040 b.n 802782e 80277ac: 2975 cmp r1, #117 ; 0x75 80277ae: d003 beq.n 80277b8 80277b0: 2978 cmp r1, #120 ; 0x78 80277b2: f040 815c bne.w 8027a6e 80277b6: e041 b.n 802783c case 0: goto abort; case 'u': p.base = 10; 80277b8: 220a movs r2, #10 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 80277ba: 2b02 cmp r3, #2 #endif switch (ch) { case 0: goto abort; case 'u': p.base = 10; 80277bc: 920d str r2, [sp, #52] ; 0x34 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 80277be: d107 bne.n 80277d0 ulli2a(va_arg(va, unsigned long long int), &p); 80277c0: 3407 adds r4, #7 80277c2: f024 0307 bic.w r3, r4, #7 80277c6: f103 0408 add.w r4, r3, #8 80277ca: e9d3 0100 ldrd r0, r1, [r3] 80277ce: e017 b.n 8027800 else #endif if (1 == lng) uli2a(va_arg(va, unsigned long int), &p); 80277d0: 6820 ldr r0, [r4, #0] 80277d2: a90a add r1, sp, #40 ; 0x28 80277d4: e04f b.n 8027876 ui2a(va_arg(va, unsigned int), &p); putchw(putp, putf, &p); break; case 'd': case 'i': p.base = 10; 80277d6: 220a movs r2, #10 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 80277d8: 2b02 cmp r3, #2 ui2a(va_arg(va, unsigned int), &p); putchw(putp, putf, &p); break; case 'd': case 'i': p.base = 10; 80277da: 920d str r2, [sp, #52] ; 0x34 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 80277dc: d112 bne.n 8027804 lli2a(va_arg(va, long long int), &p); 80277de: 3407 adds r4, #7 80277e0: f024 0307 bic.w r3, r4, #7 80277e4: e9d3 0100 ldrd r0, r1, [r3] 80277e8: f103 0408 add.w r4, r3, #8 *bf = 0; } static void lli2a(long long int num, struct param *p) { if (num < 0) { 80277ec: 2800 cmp r0, #0 80277ee: f171 0300 sbcs.w r3, r1, #0 80277f2: da05 bge.n 8027800 num = -num; p->sign = '-'; 80277f4: 232d movs r3, #45 ; 0x2d } static void lli2a(long long int num, struct param *p) { if (num < 0) { num = -num; 80277f6: 4240 negs r0, r0 80277f8: eb61 0141 sbc.w r1, r1, r1, lsl #1 p->sign = '-'; 80277fc: f88d 3030 strb.w r3, [sp, #48] ; 0x30 } ulli2a(num, p); 8027800: aa0a add r2, sp, #40 ; 0x28 8027802: e033 b.n 802786c #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) lli2a(va_arg(va, long long int), &p); else #endif if (1 == lng) 8027804: 2b01 cmp r3, #1 li2a(va_arg(va, long int), &p); 8027806: 6820 ldr r0, [r4, #0] 8027808: 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) 802780c: d107 bne.n 802781e *bf = 0; } static void li2a(long num, struct param *p) { if (num < 0) { 802780e: 2800 cmp r0, #0 8027810: da03 bge.n 802781a num = -num; p->sign = '-'; 8027812: 232d movs r3, #45 ; 0x2d } static void li2a(long num, struct param *p) { if (num < 0) { num = -num; 8027814: 4240 negs r0, r0 p->sign = '-'; 8027816: f88d 3030 strb.w r3, [sp, #48] ; 0x30 } uli2a(num, p); 802781a: a90a add r1, sp, #40 ; 0x28 802781c: e02f b.n 802787e *bf = 0; } static void i2a(int num, struct param *p) { if (num < 0) { 802781e: 2800 cmp r0, #0 8027820: da03 bge.n 802782a num = -num; p->sign = '-'; 8027822: 232d movs r3, #45 ; 0x2d } static void i2a(int num, struct param *p) { if (num < 0) { num = -num; 8027824: 4240 negs r0, r0 p->sign = '-'; 8027826: f88d 3030 strb.w r3, [sp, #48] ; 0x30 } ui2a(num, p); 802782a: a90a add r1, sp, #40 ; 0x28 802782c: e02a b.n 8027884 i2a(va_arg(va, int), &p); putchw(putp, putf, &p); break; #ifdef SIZEOF_POINTER case 'p': p.alt = 1; 802782e: f89d 3028 ldrb.w r3, [sp, #40] ; 0x28 8027832: f043 0302 orr.w r3, r3, #2 8027836: f88d 3028 strb.w r3, [sp, #40] ; 0x28 # if defined(SIZEOF_INT) && SIZEOF_POINTER <= SIZEOF_INT lng = 0; 802783a: 2300 movs r3, #0 lng = 2; # endif #endif case 'x': case 'X': p.base = 16; 802783c: 2210 movs r2, #16 p.uc = (ch == 'X')?1:0; 802783e: f1b1 0e58 subs.w lr, r1, #88 ; 0x58 8027842: f1de 0100 rsbs r1, lr, #0 8027846: f89d 0028 ldrb.w r0, [sp, #40] ; 0x28 lng = 2; # endif #endif case 'x': case 'X': p.base = 16; 802784a: 920d str r2, [sp, #52] ; 0x34 p.uc = (ch == 'X')?1:0; 802784c: eb51 010e adcs.w r1, r1, lr 8027850: aa1a add r2, sp, #104 ; 0x68 8027852: f361 0082 bfi r0, r1, #2, #1 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 8027856: 2b02 cmp r3, #2 # endif #endif case 'x': case 'X': p.base = 16; p.uc = (ch == 'X')?1:0; 8027858: f802 0d40 strb.w r0, [r2, #-64]! #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 802785c: d109 bne.n 8027872 ulli2a(va_arg(va, unsigned long long int), &p); 802785e: 3407 adds r4, #7 8027860: f024 0307 bic.w r3, r4, #7 8027864: e9d3 0100 ldrd r0, r1, [r3] 8027868: f103 0408 add.w r4, r3, #8 802786c: f7ff fdbe bl 80273ec 8027870: e00b b.n 802788a else #endif if (1 == lng) uli2a(va_arg(va, unsigned long int), &p); 8027872: 6820 ldr r0, [r4, #0] 8027874: 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) 8027876: 2b01 cmp r3, #1 8027878: f104 0804 add.w r8, r4, #4 802787c: d102 bne.n 8027884 uli2a(va_arg(va, unsigned long int), &p); 802787e: f7ff fe0b bl 8027498 8027882: e001 b.n 8027888 else #endif ui2a(va_arg(va, unsigned int), &p); 8027884: f7ff fe33 bl 80274ee 8027888: 4644 mov r4, r8 putchw(putp, putf, &p); 802788a: 4628 mov r0, r5 802788c: 4631 mov r1, r6 802788e: aa0a add r2, sp, #40 ; 0x28 8027890: f7ff fe58 bl 8027544 break; 8027894: e0eb b.n 8027a6e case 'o': p.base = 8; 8027896: 2308 movs r3, #8 ui2a(va_arg(va, unsigned int), &p); 8027898: 6820 ldr r0, [r4, #0] #endif ui2a(va_arg(va, unsigned int), &p); putchw(putp, putf, &p); break; case 'o': p.base = 8; 802789a: 930d str r3, [sp, #52] ; 0x34 ui2a(va_arg(va, unsigned int), &p); 802789c: a90a add r1, sp, #40 ; 0x28 802789e: f7ff fe26 bl 80274ee putchw(putp, putf, &p); 80278a2: 4628 mov r0, r5 80278a4: 4631 mov r1, r6 80278a6: 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); 80278a8: f104 0804 add.w r8, r4, #4 putchw(putp, putf, &p); 80278ac: f7ff fe4a bl 8027544 80278b0: e010 b.n 80278d4 break; case 'c': putf(putp, (char)(va_arg(va, int))); 80278b2: 4628 mov r0, r5 80278b4: 7821 ldrb r1, [r4, #0] 80278b6: f104 0804 add.w r8, r4, #4 80278ba: 47b0 blx r6 80278bc: e00a b.n 80278d4 break; case 's': p.bf = va_arg(va, char *); 80278be: 6823 ldr r3, [r4, #0] putchw(putp, putf, &p); 80278c0: aa0a add r2, sp, #40 ; 0x28 80278c2: 4628 mov r0, r5 80278c4: 4631 mov r1, r6 break; case 'c': putf(putp, (char)(va_arg(va, int))); break; case 's': p.bf = va_arg(va, char *); 80278c6: 930e str r3, [sp, #56] ; 0x38 putchw(putp, putf, &p); 80278c8: f7ff fe3c bl 8027544 p.bf = bf; 80278cc: aa04 add r2, sp, #16 break; case 'c': putf(putp, (char)(va_arg(va, int))); break; case 's': p.bf = va_arg(va, char *); 80278ce: f104 0804 add.w r8, r4, #4 putchw(putp, putf, &p); p.bf = bf; 80278d2: 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 *); 80278d4: 4644 mov r4, r8 putchw(putp, putf, &p); p.bf = bf; break; 80278d6: e0ca b.n 8027a6e case '%': putf(putp, ch); 80278d8: 4628 mov r0, r5 80278da: 47b0 blx r6 break; 80278dc: e0c7 b.n 8027a6e case 'f': case 'F': fval = va_arg(va, double); 80278de: 3407 adds r4, #7 80278e0: f024 0307 bic.w r3, r4, #7 80278e4: f103 0408 add.w r4, r3, #8 80278e8: e893 0404 ldmia.w r3, {r2, sl} 80278ec: 9200 str r2, [sp, #0] sign = 0; if (fval < 0) 80278ee: 4610 mov r0, r2 80278f0: 4651 mov r1, sl 80278f2: 2200 movs r2, #0 80278f4: 2300 movs r3, #0 80278f6: f7f9 f8d5 bl 8020aa4 <__aeabi_dcmplt> 80278fa: b138 cbz r0, 802790c { sign = 1; p.width--; 80278fc: 9b0b ldr r3, [sp, #44] ; 0x2c 80278fe: 3b01 subs r3, #1 8027900: 930b str r3, [sp, #44] ; 0x2c fval = - fval; 8027902: f10a 4a00 add.w sl, sl, #2147483648 ; 0x80000000 case 'F': fval = va_arg(va, double); sign = 0; if (fval < 0) { sign = 1; 8027906: f04f 0b01 mov.w fp, #1 802790a: e009 b.n 8027920 p.width--; fval = - fval; } else if (p.sign) { 802790c: f89d 3030 ldrb.w r3, [sp, #48] ; 0x30 8027910: b12b cbz r3, 802791e sign = 2; p.width--; 8027912: 9b0b ldr r3, [sp, #44] ; 0x2c 8027914: 3b01 subs r3, #1 8027916: 930b str r3, [sp, #44] ; 0x2c sign = 1; p.width--; fval = - fval; } else if (p.sign) { sign = 2; 8027918: f04f 0b02 mov.w fp, #2 802791c: e000 b.n 8027920 putf(putp, ch); break; case 'f': case 'F': fval = va_arg(va, double); sign = 0; 802791e: 469b mov fp, r3 else if (p.sign) { sign = 2; p.width--; } fpart = (int)fval; 8027920: 4651 mov r1, sl 8027922: 9800 ldr r0, [sp, #0] 8027924: f7f9 f8e6 bl 8020af4 <__aeabi_d2iz> fiter = 0; 8027928: 2200 movs r2, #0 else if (p.sign) { sign = 2; p.width--; } fpart = (int)fval; 802792a: 9001 str r0, [sp, #4] 802792c: 4680 mov r8, r0 fiter = 0; while (fpart != 0) { temp_buffer[fiter++] = fpart % 10; 802792e: 210a movs r1, #10 } fpart = (int)fval; fiter = 0; while (fpart != 0) 8027930: e008 b.n 8027944 { temp_buffer[fiter++] = fpart % 10; 8027932: fb98 f0f1 sdiv r0, r8, r1 8027936: ab10 add r3, sp, #64 ; 0x40 8027938: fb01 8810 mls r8, r1, r0, r8 802793c: f843 8022 str.w r8, [r3, r2, lsl #2] 8027940: 3201 adds r2, #1 fpart = fpart / 10; 8027942: 4680 mov r8, r0 } fpart = (int)fval; fiter = 0; while (fpart != 0) 8027944: f1b8 0f00 cmp.w r8, #0 8027948: d1f3 bne.n 8027932 temp_buffer[fiter++] = fpart % 10; fpart = fpart / 10; } fiter--; if (fiter == -1) 802794a: f102 39ff add.w r9, r2, #4294967295 802794e: b912 cbnz r2, 8027956 p.width--; 8027950: 9a0b ldr r2, [sp, #44] ; 0x2c 8027952: 3a01 subs r2, #1 8027954: 920b str r2, [sp, #44] ; 0x2c /* Leading zeros */ if (p.lz) { 8027956: f89d 2028 ldrb.w r2, [sp, #40] ; 0x28 802795a: 07d0 lsls r0, r2, #31 802795c: d51b bpl.n 8027996 if (sign == 1) 802795e: f1bb 0f01 cmp.w fp, #1 8027962: d102 bne.n 802796a putf(putp, '-'); 8027964: 4628 mov r0, r5 8027966: 212d movs r1, #45 ; 0x2d 8027968: e007 b.n 802797a else if (sign == 2) 802796a: f1bb 0f02 cmp.w fp, #2 802796e: d105 bne.n 802797c putf(putp, '+'); 8027970: 4628 mov r0, r5 8027972: 212b movs r1, #43 ; 0x2b 8027974: e001 b.n 802797a while (p.width-- > p.prec + fiter + 2) { putf(putp, '0'); 8027976: 4628 mov r0, r5 8027978: 2130 movs r1, #48 ; 0x30 802797a: 47b0 blx r6 if (sign == 1) putf(putp, '-'); else if (sign == 2) putf(putp, '+'); while (p.width-- > p.prec + fiter + 2) 802797c: f89d 203c ldrb.w r2, [sp, #60] ; 0x3c 8027980: 9b0b ldr r3, [sp, #44] ; 0x2c 8027982: 444a add r2, r9 8027984: 3202 adds r2, #2 8027986: 1e59 subs r1, r3, #1 8027988: 4293 cmp r3, r2 802798a: 910b str r1, [sp, #44] ; 0x2c 802798c: dcf3 bgt.n 8027976 802798e: e017 b.n 80279c0 else { while (p.width-- > p.prec + fiter + 2) { putf(putp, ' '); 8027990: 4628 mov r0, r5 8027992: 2120 movs r1, #32 8027994: 47b0 blx r6 } } else { while (p.width-- > p.prec + fiter + 2) 8027996: f89d 103c ldrb.w r1, [sp, #60] ; 0x3c 802799a: 9a0b ldr r2, [sp, #44] ; 0x2c 802799c: 4449 add r1, r9 802799e: 3102 adds r1, #2 80279a0: 1e50 subs r0, r2, #1 80279a2: 428a cmp r2, r1 80279a4: 900b str r0, [sp, #44] ; 0x2c 80279a6: dcf3 bgt.n 8027990 { putf(putp, ' '); } if (sign == 1) 80279a8: f1bb 0f01 cmp.w fp, #1 80279ac: d102 bne.n 80279b4 putf(putp, '-'); 80279ae: 4628 mov r0, r5 80279b0: 212d movs r1, #45 ; 0x2d 80279b2: e004 b.n 80279be else if (sign == 2) 80279b4: f1bb 0f02 cmp.w fp, #2 80279b8: d102 bne.n 80279c0 putf(putp, '+'); 80279ba: 4628 mov r0, r5 80279bc: 212b movs r1, #43 ; 0x2b 80279be: 47b0 blx r6 } if (fiter == -1) 80279c0: f1b9 3fff cmp.w r9, #4294967295 80279c4: d102 bne.n 80279cc putf(putp, '0'); 80279c6: 4628 mov r0, r5 80279c8: 2130 movs r1, #48 ; 0x30 80279ca: e007 b.n 80279dc while (fiter > -1) { putf(putp, '0' + (temp_buffer[fiter--])); 80279cc: ab10 add r3, sp, #64 ; 0x40 80279ce: 4628 mov r0, r5 80279d0: f853 1029 ldr.w r1, [r3, r9, lsl #2] 80279d4: 3130 adds r1, #48 ; 0x30 80279d6: f109 39ff add.w r9, r9, #4294967295 80279da: b2c9 uxtb r1, r1 80279dc: 47b0 blx r6 } if (fiter == -1) putf(putp, '0'); while (fiter > -1) 80279de: f1b9 3fff cmp.w r9, #4294967295 80279e2: d1f3 bne.n 80279cc { putf(putp, '0' + (temp_buffer[fiter--])); } putf(putp, '.'); 80279e4: 4628 mov r0, r5 80279e6: 212e movs r1, #46 ; 0x2e 80279e8: 47b0 blx r6 ffactor = 1; 80279ea: f04f 0901 mov.w r9, #1 while (p.prec-- > 0) 80279ee: e01d b.n 8027a2c { ffactor *= 10; 80279f0: 230a movs r3, #10 fpart = (int)((fval - (int)fval)*ffactor); 80279f2: 9801 ldr r0, [sp, #4] putf(putp, '.'); ffactor = 1; while (p.prec-- > 0) { ffactor *= 10; 80279f4: fb03 f909 mul.w r9, r3, r9 fpart = (int)((fval - (int)fval)*ffactor); 80279f8: f7f8 fd7c bl 80204f4 <__aeabi_i2d> 80279fc: 4602 mov r2, r0 80279fe: 460b mov r3, r1 8027a00: 9800 ldr r0, [sp, #0] 8027a02: 4651 mov r1, sl 8027a04: f7f8 fc28 bl 8020258 <__aeabi_dsub> 8027a08: e9cd 0102 strd r0, r1, [sp, #8] 8027a0c: 4648 mov r0, r9 8027a0e: f7f8 fd71 bl 80204f4 <__aeabi_i2d> 8027a12: 4602 mov r2, r0 8027a14: 460b mov r3, r1 8027a16: e9dd 0102 ldrd r0, r1, [sp, #8] 8027a1a: f7f8 fdd1 bl 80205c0 <__aeabi_dmul> 8027a1e: f7f9 f869 bl 8020af4 <__aeabi_d2iz> if (fpart == 0) 8027a22: 4680 mov r8, r0 8027a24: b910 cbnz r0, 8027a2c putf(putp, '0'); 8027a26: 4628 mov r0, r5 8027a28: 2130 movs r1, #48 ; 0x30 8027a2a: 47b0 blx r6 putf(putp, '0' + (temp_buffer[fiter--])); } putf(putp, '.'); ffactor = 1; while (p.prec-- > 0) 8027a2c: f89d 303c ldrb.w r3, [sp, #60] ; 0x3c 8027a30: 1e5a subs r2, r3, #1 8027a32: f88d 203c strb.w r2, [sp, #60] ; 0x3c 8027a36: 2b00 cmp r3, #0 8027a38: d1da bne.n 80279f0 putf(putp, '0'); } fiter = 0; while (fpart != 0) { temp_buffer[fiter++] = fpart % 10; 8027a3a: 220a movs r2, #10 8027a3c: e008 b.n 8027a50 8027a3e: fb98 f1f2 sdiv r1, r8, r2 8027a42: a810 add r0, sp, #64 ; 0x40 8027a44: fb02 8811 mls r8, r2, r1, r8 8027a48: f840 8023 str.w r8, [r0, r3, lsl #2] 8027a4c: 3301 adds r3, #1 fpart = fpart / 10; 8027a4e: 4688 mov r8, r1 fpart = (int)((fval - (int)fval)*ffactor); if (fpart == 0) putf(putp, '0'); } fiter = 0; while (fpart != 0) 8027a50: f1b8 0f00 cmp.w r8, #0 8027a54: d1f3 bne.n 8027a3e 8027a56: 4698 mov r8, r3 temp_buffer[fiter++] = fpart % 10; fpart = fpart / 10; } fiter--; while (fiter > -1) 8027a58: e006 b.n 8027a68 { putf(putp, '0' + (temp_buffer[fiter--])); 8027a5a: ab10 add r3, sp, #64 ; 0x40 8027a5c: 4628 mov r0, r5 8027a5e: f853 1028 ldr.w r1, [r3, r8, lsl #2] 8027a62: 3130 adds r1, #48 ; 0x30 8027a64: b2c9 uxtb r1, r1 8027a66: 47b0 blx r6 temp_buffer[fiter++] = fpart % 10; fpart = fpart / 10; } fiter--; while (fiter > -1) 8027a68: f118 38ff adds.w r8, r8, #4294967295 8027a6c: d2f5 bcs.n 8027a5a char bf[12]; /* int = 32b on some architectures */ #endif char ch; p.bf = bf; while ((ch = *(fmt++))) { 8027a6e: f817 1b01 ldrb.w r1, [r7], #1 8027a72: 2900 cmp r1, #0 8027a74: f47f adf2 bne.w 802765c 8027a78: e003 b.n 8027a82 { const char *p = *src; unsigned int num = 0; int digit; while ((digit = a2d(ch)) >= 0) { if (digit > base) 8027a7a: 2b0a cmp r3, #10 8027a7c: f77f ae32 ble.w 80276e4 8027a80: e64c b.n 802771c break; } } } abort:; } 8027a82: b01b add sp, #108 ; 0x6c 8027a84: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 08027a88 : stdout_putf = putf; stdout_putp = putp; } void tfp_printf(char *fmt, ...) { 8027a88: b40f push {r0, r1, r2, r3} 8027a8a: b507 push {r0, r1, r2, lr} va_list va; va_start(va, fmt); tfp_format(stdout_putp, stdout_putf, fmt, va); 8027a8c: 4906 ldr r1, [pc, #24] ; (8027aa8 ) stdout_putf = putf; stdout_putp = putp; } void tfp_printf(char *fmt, ...) { 8027a8e: ab04 add r3, sp, #16 va_list va; va_start(va, fmt); tfp_format(stdout_putp, stdout_putf, fmt, va); 8027a90: 6808 ldr r0, [r1, #0] 8027a92: 4906 ldr r1, [pc, #24] ; (8027aac ) stdout_putf = putf; stdout_putp = putp; } void tfp_printf(char *fmt, ...) { 8027a94: f853 2b04 ldr.w r2, [r3], #4 va_list va; va_start(va, fmt); tfp_format(stdout_putp, stdout_putf, fmt, va); 8027a98: 6809 ldr r1, [r1, #0] } void tfp_printf(char *fmt, ...) { va_list va; va_start(va, fmt); 8027a9a: 9301 str r3, [sp, #4] tfp_format(stdout_putp, stdout_putf, fmt, va); 8027a9c: f7ff fdd4 bl 8027648 va_end(va); } 8027aa0: e8bd 400e ldmia.w sp!, {r1, r2, r3, lr} 8027aa4: b004 add sp, #16 8027aa6: 4770 bx lr 8027aa8: 20000b14 .word 0x20000b14 8027aac: 20000b10 .word 0x20000b10 08027ab0 : data->dest[data->num_chars] = c; data->num_chars ++; } int tfp_vsnprintf(char *str, size_t size, const char *format, va_list ap) { 8027ab0: b51f push {r0, r1, r2, r3, r4, lr} 8027ab2: 2400 movs r4, #0 struct _vsnprintf_putcf_data data; if (size < 1) 8027ab4: b181 cbz r1, 8027ad8 return 0; data.dest = str; data.dest_capacity = size-1; 8027ab6: 3901 subs r1, #1 struct _vsnprintf_putcf_data data; if (size < 1) return 0; data.dest = str; 8027ab8: 9002 str r0, [sp, #8] data.dest_capacity = size-1; 8027aba: 9101 str r1, [sp, #4] data.num_chars = 0; tfp_format(&data, _vsnprintf_putcf, format, ap); 8027abc: a801 add r0, sp, #4 8027abe: 4908 ldr r1, [pc, #32] ; (8027ae0 ) if (size < 1) return 0; data.dest = str; data.dest_capacity = size-1; data.num_chars = 0; 8027ac0: 9403 str r4, [sp, #12] tfp_format(&data, _vsnprintf_putcf, format, ap); 8027ac2: f7ff fdc1 bl 8027648 if (data.num_chars < data.dest_capacity) 8027ac6: 9903 ldr r1, [sp, #12] 8027ac8: 9b01 ldr r3, [sp, #4] 8027aca: 9a02 ldr r2, [sp, #8] 8027acc: 4299 cmp r1, r3 data.dest[data.num_chars] = '\0'; 8027ace: bf34 ite cc 8027ad0: 5454 strbcc r4, [r2, r1] else data.dest[data.dest_capacity] = '\0'; 8027ad2: 54d4 strbcs r4, [r2, r3] return data.num_chars; 8027ad4: 9803 ldr r0, [sp, #12] 8027ad6: e000 b.n 8027ada int tfp_vsnprintf(char *str, size_t size, const char *format, va_list ap) { struct _vsnprintf_putcf_data data; if (size < 1) return 0; 8027ad8: 4608 mov r0, r1 data.dest[data.num_chars] = '\0'; else data.dest[data.dest_capacity] = '\0'; return data.num_chars; } 8027ada: b004 add sp, #16 8027adc: bd10 pop {r4, pc} 8027ade: bf00 nop 8027ae0: 08027629 .word 0x08027629 08027ae4 : int tfp_snprintf(char *str, size_t size, const char *format, ...) { 8027ae4: b40c push {r2, r3} 8027ae6: b507 push {r0, r1, r2, lr} 8027ae8: ab04 add r3, sp, #16 8027aea: f853 2b04 ldr.w r2, [r3], #4 va_list ap; int retval; va_start(ap, format); 8027aee: 9301 str r3, [sp, #4] retval = tfp_vsnprintf(str, size, format, ap); 8027af0: f7ff ffde bl 8027ab0 va_end(ap); return retval; } 8027af4: e8bd 400e ldmia.w sp!, {r1, r2, r3, lr} 8027af8: b002 add sp, #8 8027afa: 4770 bx lr 08027afc : 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) { 8027afc: b537 push {r0, r1, r2, r4, r5, lr} 8027afe: 460d mov r5, r1 8027b00: 4613 mov r3, r2 struct _vsprintf_putcf_data data; data.dest = str; 8027b02: 9000 str r0, [sp, #0] data.num_chars = 0; 8027b04: 2400 movs r4, #0 tfp_format(&data, _vsprintf_putcf, format, ap); 8027b06: 4668 mov r0, sp 8027b08: 462a mov r2, r5 8027b0a: 4904 ldr r1, [pc, #16] ; (8027b1c ) int tfp_vsprintf(char *str, const char *format, va_list ap) { struct _vsprintf_putcf_data data; data.dest = str; data.num_chars = 0; 8027b0c: 9401 str r4, [sp, #4] tfp_format(&data, _vsprintf_putcf, format, ap); 8027b0e: f7ff fd9b bl 8027648 data.dest[data.num_chars] = '\0'; 8027b12: e89d 000c ldmia.w sp, {r2, r3} 8027b16: 54d4 strb r4, [r2, r3] return data.num_chars; } 8027b18: 9801 ldr r0, [sp, #4] 8027b1a: bd3e pop {r1, r2, r3, r4, r5, pc} 8027b1c: 0802763d .word 0x0802763d 08027b20 : int tfp_sprintf(char *str, const char *format, ...) { 8027b20: b40e push {r1, r2, r3} 8027b22: b503 push {r0, r1, lr} 8027b24: aa03 add r2, sp, #12 8027b26: f852 1b04 ldr.w r1, [r2], #4 va_list ap; int retval; va_start(ap, format); 8027b2a: 9201 str r2, [sp, #4] retval = tfp_vsprintf(str, format, ap); 8027b2c: f7ff ffe6 bl 8027afc va_end(ap); return retval; } 8027b30: e8bd 400c ldmia.w sp!, {r2, r3, lr} 8027b34: b003 add sp, #12 8027b36: 4770 bx lr 08027b38 : /** * @brief */ void GetInputFreqStr(char *str, uint8_t *len) { 8027b38: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", UPS.Freq_in); 8027b3a: 4b08 ldr r3, [pc, #32] ; (8027b5c ) /** * @brief */ void GetInputFreqStr(char *str, uint8_t *len) { 8027b3c: 4604 mov r4, r0 sprintf(str, "%0.1f", UPS.Freq_in); 8027b3e: 6818 ldr r0, [r3, #0] /** * @brief */ void GetInputFreqStr(char *str, uint8_t *len) { 8027b40: 460d mov r5, r1 sprintf(str, "%0.1f", UPS.Freq_in); 8027b42: f7f8 fce9 bl 8020518 <__aeabi_f2d> 8027b46: 4602 mov r2, r0 8027b48: 460b mov r3, r1 8027b4a: 4620 mov r0, r4 8027b4c: 4904 ldr r1, [pc, #16] ; (8027b60 ) 8027b4e: f7ff ffe7 bl 8027b20 *len = strlen(str); 8027b52: 4620 mov r0, r4 8027b54: f7fa fafc bl 8022150 8027b58: 7028 strb r0, [r5, #0] 8027b5a: bd38 pop {r3, r4, r5, pc} 8027b5c: 2000cf64 .word 0x2000cf64 8027b60: 08038961 .word 0x08038961 08027b64 : /** * @brief */ void GetOutputFreqStr(char *str, uint8_t *len) { 8027b64: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", UPS.Freq_in); 8027b66: 4b08 ldr r3, [pc, #32] ; (8027b88 ) /** * @brief */ void GetOutputFreqStr(char *str, uint8_t *len) { 8027b68: 4604 mov r4, r0 sprintf(str, "%0.1f", UPS.Freq_in); 8027b6a: 6818 ldr r0, [r3, #0] /** * @brief */ void GetOutputFreqStr(char *str, uint8_t *len) { 8027b6c: 460d mov r5, r1 sprintf(str, "%0.1f", UPS.Freq_in); 8027b6e: f7f8 fcd3 bl 8020518 <__aeabi_f2d> 8027b72: 4602 mov r2, r0 8027b74: 460b mov r3, r1 8027b76: 4620 mov r0, r4 8027b78: 4904 ldr r1, [pc, #16] ; (8027b8c ) 8027b7a: f7ff ffd1 bl 8027b20 *len = strlen(str); 8027b7e: 4620 mov r0, r4 8027b80: f7fa fae6 bl 8022150 8027b84: 7028 strb r0, [r5, #0] 8027b86: bd38 pop {r3, r4, r5, pc} 8027b88: 2000cf64 .word 0x2000cf64 8027b8c: 08038961 .word 0x08038961 08027b90 : /** * @brief */ void GetInputVoltageStr(char *str, uint8_t *len) { 8027b90: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", UPS.VAC_in); 8027b92: 4b08 ldr r3, [pc, #32] ; (8027bb4 ) /** * @brief */ void GetInputVoltageStr(char *str, uint8_t *len) { 8027b94: 4604 mov r4, r0 sprintf(str, "%0.1f", UPS.VAC_in); 8027b96: 6858 ldr r0, [r3, #4] /** * @brief */ void GetInputVoltageStr(char *str, uint8_t *len) { 8027b98: 460d mov r5, r1 sprintf(str, "%0.1f", UPS.VAC_in); 8027b9a: f7f8 fcbd bl 8020518 <__aeabi_f2d> 8027b9e: 4602 mov r2, r0 8027ba0: 460b mov r3, r1 8027ba2: 4620 mov r0, r4 8027ba4: 4904 ldr r1, [pc, #16] ; (8027bb8 ) 8027ba6: f7ff ffbb bl 8027b20 *len = strlen(str); 8027baa: 4620 mov r0, r4 8027bac: f7fa fad0 bl 8022150 8027bb0: 7028 strb r0, [r5, #0] 8027bb2: bd38 pop {r3, r4, r5, pc} 8027bb4: 2000cf64 .word 0x2000cf64 8027bb8: 08038961 .word 0x08038961 08027bbc : /** * @brief */ void GetOutputVoltageStr(char *str, uint8_t *len) { 8027bbc: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", UPS.VAC_out); 8027bbe: 4b08 ldr r3, [pc, #32] ; (8027be0 ) /** * @brief */ void GetOutputVoltageStr(char *str, uint8_t *len) { 8027bc0: 4604 mov r4, r0 sprintf(str, "%0.1f", UPS.VAC_out); 8027bc2: 6898 ldr r0, [r3, #8] /** * @brief */ void GetOutputVoltageStr(char *str, uint8_t *len) { 8027bc4: 460d mov r5, r1 sprintf(str, "%0.1f", UPS.VAC_out); 8027bc6: f7f8 fca7 bl 8020518 <__aeabi_f2d> 8027bca: 4602 mov r2, r0 8027bcc: 460b mov r3, r1 8027bce: 4620 mov r0, r4 8027bd0: 4904 ldr r1, [pc, #16] ; (8027be4 ) 8027bd2: f7ff ffa5 bl 8027b20 *len = strlen(str); 8027bd6: 4620 mov r0, r4 8027bd8: f7fa faba bl 8022150 8027bdc: 7028 strb r0, [r5, #0] 8027bde: bd38 pop {r3, r4, r5, pc} 8027be0: 2000cf64 .word 0x2000cf64 8027be4: 08038961 .word 0x08038961 08027be8 : /** * @brief */ void GetPowerStr(char *str, uint8_t *len) { 8027be8: b538 push {r3, r4, r5, lr} sprintf(str, "%d", UPS.Load); 8027bea: 4b06 ldr r3, [pc, #24] ; (8027c04 ) /** * @brief */ void GetPowerStr(char *str, uint8_t *len) { 8027bec: 4605 mov r5, r0 8027bee: 460c mov r4, r1 sprintf(str, "%d", UPS.Load); 8027bf0: 7c1a ldrb r2, [r3, #16] 8027bf2: 4905 ldr r1, [pc, #20] ; (8027c08 ) 8027bf4: f7ff ff94 bl 8027b20 *len = strlen(str); 8027bf8: 4628 mov r0, r5 8027bfa: f7fa faa9 bl 8022150 8027bfe: 7020 strb r0, [r4, #0] 8027c00: bd38 pop {r3, r4, r5, pc} 8027c02: bf00 nop 8027c04: 2000cf64 .word 0x2000cf64 8027c08: 08038967 .word 0x08038967 08027c0c : /** * @brief */ void GetBatCapacityStr(char *str, uint8_t *len) { 8027c0c: b538 push {r3, r4, r5, lr} sprintf(str, "%d", UPS.SOC); 8027c0e: 4b06 ldr r3, [pc, #24] ; (8027c28 ) /** * @brief */ void GetBatCapacityStr(char *str, uint8_t *len) { 8027c10: 4605 mov r5, r0 8027c12: 460c mov r4, r1 sprintf(str, "%d", UPS.SOC); 8027c14: 7c5a ldrb r2, [r3, #17] 8027c16: 4905 ldr r1, [pc, #20] ; (8027c2c ) 8027c18: f7ff ff82 bl 8027b20 *len = strlen(str); 8027c1c: 4628 mov r0, r5 8027c1e: f7fa fa97 bl 8022150 8027c22: 7020 strb r0, [r4, #0] 8027c24: bd38 pop {r3, r4, r5, pc} 8027c26: bf00 nop 8027c28: 2000cf64 .word 0x2000cf64 8027c2c: 08038967 .word 0x08038967 08027c30 : /** * @brief */ void GetRuntimeStr(char *str, uint8_t *len) { 8027c30: b538 push {r3, r4, r5, lr} sprintf(str, "%d", UPS.work_time); 8027c32: 4b06 ldr r3, [pc, #24] ; (8027c4c ) /** * @brief */ void GetRuntimeStr(char *str, uint8_t *len) { 8027c34: 4605 mov r5, r0 8027c36: 460c mov r4, r1 sprintf(str, "%d", UPS.work_time); 8027c38: 7c9a ldrb r2, [r3, #18] 8027c3a: 4905 ldr r1, [pc, #20] ; (8027c50 ) 8027c3c: f7ff ff70 bl 8027b20 *len = strlen(str); 8027c40: 4628 mov r0, r5 8027c42: f7fa fa85 bl 8022150 8027c46: 7020 strb r0, [r4, #0] 8027c48: bd38 pop {r3, r4, r5, pc} 8027c4a: bf00 nop 8027c4c: 2000cf64 .word 0x2000cf64 8027c50: 08038967 .word 0x08038967 08027c54 : /** * @brief */ void GetInternalTempStr(char *str, uint8_t *len) { 8027c54: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", UPS.Temp); 8027c56: 4b08 ldr r3, [pc, #32] ; (8027c78 ) /** * @brief */ void GetInternalTempStr(char *str, uint8_t *len) { 8027c58: 4604 mov r4, r0 sprintf(str, "%0.1f", UPS.Temp); 8027c5a: 68d8 ldr r0, [r3, #12] /** * @brief */ void GetInternalTempStr(char *str, uint8_t *len) { 8027c5c: 460d mov r5, r1 sprintf(str, "%0.1f", UPS.Temp); 8027c5e: f7f8 fc5b bl 8020518 <__aeabi_f2d> 8027c62: 4602 mov r2, r0 8027c64: 460b mov r3, r1 8027c66: 4620 mov r0, r4 8027c68: 4904 ldr r1, [pc, #16] ; (8027c7c ) 8027c6a: f7ff ff59 bl 8027b20 *len = strlen(str); 8027c6e: 4620 mov r0, r4 8027c70: f7fa fa6e bl 8022150 8027c74: 7028 strb r0, [r5, #0] 8027c76: bd38 pop {r3, r4, r5, pc} 8027c78: 2000cf64 .word 0x2000cf64 8027c7c: 08038961 .word 0x08038961 08027c80 : /** * @brief */ void GetAlarmMonitorStr(char *str, uint8_t *len) { 8027c80: b538 push {r3, r4, r5, lr} sprintf(str, "%d", UPS.Alarm); 8027c82: 4b06 ldr r3, [pc, #24] ; (8027c9c ) /** * @brief */ void GetAlarmMonitorStr(char *str, uint8_t *len) { 8027c84: 4605 mov r5, r0 8027c86: 460c mov r4, r1 sprintf(str, "%d", UPS.Alarm); 8027c88: 7d1a ldrb r2, [r3, #20] 8027c8a: 4905 ldr r1, [pc, #20] ; (8027ca0 ) 8027c8c: f7ff ff48 bl 8027b20 *len = strlen(str); 8027c90: 4628 mov r0, r5 8027c92: f7fa fa5d bl 8022150 8027c96: 7020 strb r0, [r4, #0] 8027c98: bd38 pop {r3, r4, r5, pc} 8027c9a: bf00 nop 8027c9c: 2000cf64 .word 0x2000cf64 8027ca0: 08038967 .word 0x08038967 08027ca4 : /** * @brief */ void GetConnectMonitorStr(char *str, uint8_t *len) { 8027ca4: b538 push {r3, r4, r5, lr} if(UPS.Present) 8027ca6: 4b08 ldr r3, [pc, #32] ; (8027cc8 ) 8027ca8: f893 302c ldrb.w r3, [r3, #44] ; 0x2c /** * @brief */ void GetConnectMonitorStr(char *str, uint8_t *len) { 8027cac: 4605 mov r5, r0 8027cae: 460c mov r4, r1 if(UPS.Present) 8027cb0: b10b cbz r3, 8027cb6 strcpy(str, "0"); 8027cb2: 4906 ldr r1, [pc, #24] ; (8027ccc ) 8027cb4: e000 b.n 8027cb8 else strcpy(str, "1"); 8027cb6: 4906 ldr r1, [pc, #24] ; (8027cd0 ) 8027cb8: f7fa f9ec bl 8022094 *len = strlen(str); 8027cbc: 4628 mov r0, r5 8027cbe: f7fa fa47 bl 8022150 8027cc2: 7020 strb r0, [r4, #0] 8027cc4: bd38 pop {r3, r4, r5, pc} 8027cc6: bf00 nop 8027cc8: 2000cf64 .word 0x2000cf64 8027ccc: 08038a13 .word 0x08038a13 8027cd0: 08038c9e .word 0x08038c9e 08027cd4 : /** * @brief Ð˜Ð½Ð´Ð¸ÐºÐ°Ñ†Ð¸Ñ Ð°Ð²Ð°Ñ€Ð¸Ð¹Ð½Ñ‹Ñ… Ñитуаций */ void GetAlarmStr(char *str, uint8_t *len) { 8027cd4: b538 push {r3, r4, r5, lr} sprintf(str, "%d", UPS.Status); 8027cd6: 4b06 ldr r3, [pc, #24] ; (8027cf0 ) /** * @brief Ð˜Ð½Ð´Ð¸ÐºÐ°Ñ†Ð¸Ñ Ð°Ð²Ð°Ñ€Ð¸Ð¹Ð½Ñ‹Ñ… Ñитуаций */ void GetAlarmStr(char *str, uint8_t *len) { 8027cd8: 4605 mov r5, r0 8027cda: 460c mov r4, r1 sprintf(str, "%d", UPS.Status); 8027cdc: 7cda ldrb r2, [r3, #19] 8027cde: 4905 ldr r1, [pc, #20] ; (8027cf4 ) 8027ce0: f7ff ff1e bl 8027b20 *len = strlen(str); 8027ce4: 4628 mov r0, r5 8027ce6: f7fa fa33 bl 8022150 8027cea: 7020 strb r0, [r4, #0] 8027cec: bd38 pop {r3, r4, r5, pc} 8027cee: bf00 nop 8027cf0: 2000cf64 .word 0x2000cf64 8027cf4: 08038967 .word 0x08038967 08027cf8 : /** * @brief Дата (Ready for PRS!) */ void GetDateStr(char *str, uint8_t *len) { 8027cf8: b530 push {r4, r5, lr} 8027cfa: b087 sub sp, #28 8027cfc: 4604 mov r4, r0 8027cfe: 460d mov r5, r1 TM_RTC_t data; uint16_t sys_year ; TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8027d00: a802 add r0, sp, #8 8027d02: 2100 movs r1, #0 8027d04: f7fe fd62 bl 80267cc sys_year = 2000 + data.year; sprintf(str, "%04i-%02i-%02i", sys_year, data.month, data.date); 8027d08: 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; 8027d0c: f89d 2011 ldrb.w r2, [sp, #17] sprintf(str, "%04i-%02i-%02i", sys_year, data.month, data.date); 8027d10: f89d 3010 ldrb.w r3, [sp, #16] 8027d14: 9100 str r1, [sp, #0] 8027d16: f502 62fa add.w r2, r2, #2000 ; 0x7d0 8027d1a: 4905 ldr r1, [pc, #20] ; (8027d30 ) 8027d1c: 4620 mov r0, r4 8027d1e: f7ff feff bl 8027b20 *len = strlen(str); 8027d22: 4620 mov r0, r4 8027d24: f7fa fa14 bl 8022150 8027d28: 7028 strb r0, [r5, #0] } 8027d2a: b007 add sp, #28 8027d2c: bd30 pop {r4, r5, pc} 8027d2e: bf00 nop 8027d30: 0803896a .word 0x0803896a 08027d34 : /** * @brief Ð’Ñ€ÐµÐ¼Ñ (Ready for PRS!) */ void GetTimeStr(char *str, uint8_t *len) { 8027d34: b530 push {r4, r5, lr} 8027d36: b085 sub sp, #20 8027d38: 4604 mov r4, r0 8027d3a: 460d mov r5, r1 TM_RTC_t data; TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8027d3c: 4668 mov r0, sp 8027d3e: 2100 movs r1, #0 8027d40: f7fe fd44 bl 80267cc sprintf(str, "%02i:%02i", data.hours, data.minutes); 8027d44: 4906 ldr r1, [pc, #24] ; (8027d60 ) 8027d46: f89d 2005 ldrb.w r2, [sp, #5] 8027d4a: f89d 3004 ldrb.w r3, [sp, #4] 8027d4e: 4620 mov r0, r4 8027d50: f7ff fee6 bl 8027b20 *len = strlen(str); 8027d54: 4620 mov r0, r4 8027d56: f7fa f9fb bl 8022150 8027d5a: 7028 strb r0, [r5, #0] } 8027d5c: b005 add sp, #20 8027d5e: bd30 pop {r4, r5, pc} 8027d60: 080389b0 .word 0x080389b0 08027d64 : /** * @brief Ð’Ñ€ÐµÐ¼Ñ (Ready for PRS!) */ void GetUnixTimeStr(char *str, uint8_t *len) { 8027d64: b530 push {r4, r5, lr} 8027d66: b085 sub sp, #20 8027d68: 4604 mov r4, r0 8027d6a: 460d mov r5, r1 TM_RTC_t data; TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8027d6c: 4668 mov r0, sp 8027d6e: 2100 movs r1, #0 8027d70: f7fe fd2c bl 80267cc sprintf(str, "%d", data.unix); 8027d74: 4905 ldr r1, [pc, #20] ; (8027d8c ) 8027d76: 9a03 ldr r2, [sp, #12] 8027d78: 4620 mov r0, r4 8027d7a: f7ff fed1 bl 8027b20 *len = strlen(str); 8027d7e: 4620 mov r0, r4 8027d80: f7fa f9e6 bl 8022150 8027d84: 7028 strb r0, [r5, #0] } 8027d86: b005 add sp, #20 8027d88: bd30 pop {r4, r5, pc} 8027d8a: bf00 nop 8027d8c: 08038967 .word 0x08038967 08027d90 : /** * @brief СоÑтоÑние SNTP (Ready for PRS!) */ void GetSntpStateStr(char *str, uint8_t *len) { 8027d90: b538 push {r3, r4, r5, lr} if (sSettings.sSNTP.sntpEnable) 8027d92: 4b08 ldr r3, [pc, #32] ; (8027db4 ) 8027d94: f893 3340 ldrb.w r3, [r3, #832] ; 0x340 /** * @brief СоÑтоÑние SNTP (Ready for PRS!) */ void GetSntpStateStr(char *str, uint8_t *len) { 8027d98: 460c mov r4, r1 8027d9a: 4605 mov r5, r0 if (sSettings.sSNTP.sntpEnable) { sprintf(str, "%s", "1"); //авто 8027d9c: 4906 ldr r1, [pc, #24] ; (8027db8 ) /** * @brief СоÑтоÑние SNTP (Ready for PRS!) */ void GetSntpStateStr(char *str, uint8_t *len) { if (sSettings.sSNTP.sntpEnable) 8027d9e: b10b cbz r3, 8027da4 { sprintf(str, "%s", "1"); //авто 8027da0: 4a06 ldr r2, [pc, #24] ; (8027dbc ) 8027da2: e000 b.n 8027da6 *len = strlen(str); } else { sprintf(str, "%s", "0"); //ручной 8027da4: 4a06 ldr r2, [pc, #24] ; (8027dc0 ) 8027da6: f7ff febb bl 8027b20 *len = strlen(str); 8027daa: 4628 mov r0, r5 8027dac: f7fa f9d0 bl 8022150 8027db0: 7020 strb r0, [r4, #0] 8027db2: bd38 pop {r3, r4, r5, pc} 8027db4: 2000cba0 .word 0x2000cba0 8027db8: 0804288f .word 0x0804288f 8027dbc: 08038c9e .word 0x08038c9e 8027dc0: 08038a13 .word 0x08038a13 08027dc4 : /** * @brief IP Ð°Ð´Ñ€ÐµÑ SNTP Ñервера (Ready for PRS!) */ void GetSntpServerIpStr(char *str, uint8_t *len) { 8027dc4: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSNTP.ip); 8027dc6: 4a05 ldr r2, [pc, #20] ; (8027ddc ) /** * @brief IP Ð°Ð´Ñ€ÐµÑ SNTP Ñервера (Ready for PRS!) */ void GetSntpServerIpStr(char *str, uint8_t *len) { 8027dc8: 4605 mov r5, r0 8027dca: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSNTP.ip); 8027dcc: 4904 ldr r1, [pc, #16] ; (8027de0 ) 8027dce: f7ff fea7 bl 8027b20 *len = strlen(str); 8027dd2: 4628 mov r0, r5 8027dd4: f7fa f9bc bl 8022150 8027dd8: 7020 strb r0, [r4, #0] 8027dda: bd38 pop {r3, r4, r5, pc} 8027ddc: 2000cee1 .word 0x2000cee1 8027de0: 0804288f .word 0x0804288f 08027de4 : /** * @brief ЧаÑовой поÑÑ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»Ð»ÐµÑ€Ð° (Ready for PRS!) */ void GetSntpTimeZoneStr(char *str, uint8_t *len) { 8027de4: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", sSettings.sSNTP.timeZone); 8027de6: 4b09 ldr r3, [pc, #36] ; (8027e0c ) /** * @brief ЧаÑовой поÑÑ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»Ð»ÐµÑ€Ð° (Ready for PRS!) */ void GetSntpTimeZoneStr(char *str, uint8_t *len) { 8027de8: 4604 mov r4, r0 sprintf(str, "%0.1f", sSettings.sSNTP.timeZone); 8027dea: f8d3 0370 ldr.w r0, [r3, #880] ; 0x370 /** * @brief ЧаÑовой поÑÑ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»Ð»ÐµÑ€Ð° (Ready for PRS!) */ void GetSntpTimeZoneStr(char *str, uint8_t *len) { 8027dee: 460d mov r5, r1 sprintf(str, "%0.1f", sSettings.sSNTP.timeZone); 8027df0: f7f8 fb92 bl 8020518 <__aeabi_f2d> 8027df4: 4602 mov r2, r0 8027df6: 460b mov r3, r1 8027df8: 4620 mov r0, r4 8027dfa: 4905 ldr r1, [pc, #20] ; (8027e10 ) 8027dfc: f7ff fe90 bl 8027b20 *len = strlen(str); 8027e00: 4620 mov r0, r4 8027e02: f7fa f9a5 bl 8022150 8027e06: 7028 strb r0, [r5, #0] 8027e08: bd38 pop {r3, r4, r5, pc} 8027e0a: bf00 nop 8027e0c: 2000cba0 .word 0x2000cba0 8027e10: 08038961 .word 0x08038961 08027e14 : /** * @brief Дата поÑледней Ñинхронизации SNTP (Ready for PRS!) */ void GetSntpLastDataStr(char *str, uint8_t *len) { 8027e14: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSNTP.data); 8027e16: 4a05 ldr r2, [pc, #20] ; (8027e2c ) /** * @brief Дата поÑледней Ñинхронизации SNTP (Ready for PRS!) */ void GetSntpLastDataStr(char *str, uint8_t *len) { 8027e18: 4605 mov r5, r0 8027e1a: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSNTP.data); 8027e1c: 4904 ldr r1, [pc, #16] ; (8027e30 ) 8027e1e: f7ff fe7f bl 8027b20 *len = strlen(str); 8027e22: 4628 mov r0, r5 8027e24: f7fa f994 bl 8022150 8027e28: 7020 strb r0, [r4, #0] 8027e2a: bd38 pop {r3, r4, r5, pc} 8027e2c: 2000cef1 .word 0x2000cef1 8027e30: 0804288f .word 0x0804288f 08027e34 : /** * @brief Тип дейÑтвий при Ñрабатывание Ñухих контактов */ void GetDINTypeActStr(char *str, uint8_t *len, uint8_t num) { 8027e34: b538 push {r3, r4, r5, lr} sprintf(str, "%d", sSettings.sInOuts.din_type_act[num]); 8027e36: 4b07 ldr r3, [pc, #28] ; (8027e54 ) 8027e38: 189a adds r2, r3, r2 /** * @brief Тип дейÑтвий при Ñрабатывание Ñухих контактов */ void GetDINTypeActStr(char *str, uint8_t *len, uint8_t num) { 8027e3a: 4605 mov r5, r0 8027e3c: 460c mov r4, r1 sprintf(str, "%d", sSettings.sInOuts.din_type_act[num]); 8027e3e: f892 2376 ldrb.w r2, [r2, #886] ; 0x376 8027e42: 4905 ldr r1, [pc, #20] ; (8027e58 ) 8027e44: f7ff fe6c bl 8027b20 *len = strlen(str); 8027e48: 4628 mov r0, r5 8027e4a: f7fa f981 bl 8022150 8027e4e: 7020 strb r0, [r4, #0] 8027e50: bd38 pop {r3, r4, r5, pc} 8027e52: bf00 nop 8027e54: 2000cba0 .word 0x2000cba0 8027e58: 08038967 .word 0x08038967 08027e5c : /** * @brief СоÑтоÑние Ñухого контакта */ void GetDINStatusStr(char *str, uint8_t *len, uint8_t num) { sprintf(str, "%d", get_state_din_outs(DIN1+num)); 8027e5c: 3206 adds r2, #6 /** * @brief СоÑтоÑние Ñухого контакта */ void GetDINStatusStr(char *str, uint8_t *len, uint8_t num) { 8027e5e: b538 push {r3, r4, r5, lr} 8027e60: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DIN1+num)); 8027e62: b2d0 uxtb r0, r2 /** * @brief СоÑтоÑние Ñухого контакта */ void GetDINStatusStr(char *str, uint8_t *len, uint8_t num) { 8027e64: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DIN1+num)); 8027e66: f001 f81c bl 8028ea2 8027e6a: 4905 ldr r1, [pc, #20] ; (8027e80 ) 8027e6c: 4602 mov r2, r0 8027e6e: 4620 mov r0, r4 8027e70: f7ff fe56 bl 8027b20 *len = strlen(str); 8027e74: 4620 mov r0, r4 8027e76: f7fa f96b bl 8022150 8027e7a: 7028 strb r0, [r5, #0] 8027e7c: bd38 pop {r3, r4, r5, pc} 8027e7e: bf00 nop 8027e80: 08038967 .word 0x08038967 08027e84 : /** * @brief СоÑтоÑние Ñухого контакта */ void GetDIN0StatusStr(char *str, uint8_t *len) { 8027e84: b538 push {r3, r4, r5, lr} 8027e86: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DIN1)); 8027e88: 2006 movs r0, #6 /** * @brief СоÑтоÑние Ñухого контакта */ void GetDIN0StatusStr(char *str, uint8_t *len) { 8027e8a: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DIN1)); 8027e8c: f001 f809 bl 8028ea2 8027e90: 4904 ldr r1, [pc, #16] ; (8027ea4 ) 8027e92: 4602 mov r2, r0 8027e94: 4620 mov r0, r4 8027e96: f7ff fe43 bl 8027b20 *len = strlen(str); 8027e9a: 4620 mov r0, r4 8027e9c: f7fa f958 bl 8022150 8027ea0: 7028 strb r0, [r5, #0] 8027ea2: bd38 pop {r3, r4, r5, pc} 8027ea4: 08038967 .word 0x08038967 08027ea8 : /** * @brief ИÑточник ÑÑ€Ð°Ð±Ð°Ñ‚Ñ‹Ð²Ð°Ð½Ð¸Ñ Ñ€ÐµÐ»Ðµ */ void GetROTypeActStr(char *str, uint8_t *len, uint8_t num) { 8027ea8: b538 push {r3, r4, r5, lr} sprintf(str, "%d", sSettings.sInOuts.ro_type_source[num]); 8027eaa: 4b07 ldr r3, [pc, #28] ; (8027ec8 ) 8027eac: 189a adds r2, r3, r2 /** * @brief ИÑточник ÑÑ€Ð°Ð±Ð°Ñ‚Ñ‹Ð²Ð°Ð½Ð¸Ñ Ñ€ÐµÐ»Ðµ */ void GetROTypeActStr(char *str, uint8_t *len, uint8_t num) { 8027eae: 4605 mov r5, r0 8027eb0: 460c mov r4, r1 sprintf(str, "%d", sSettings.sInOuts.ro_type_source[num]); 8027eb2: f892 2374 ldrb.w r2, [r2, #884] ; 0x374 8027eb6: 4905 ldr r1, [pc, #20] ; (8027ecc ) 8027eb8: f7ff fe32 bl 8027b20 *len = strlen(str); 8027ebc: 4628 mov r0, r5 8027ebe: f7fa f947 bl 8022150 8027ec2: 7020 strb r0, [r4, #0] 8027ec4: bd38 pop {r3, r4, r5, pc} 8027ec6: bf00 nop 8027ec8: 2000cba0 .word 0x2000cba0 8027ecc: 08038967 .word 0x08038967 08027ed0 : /** * @brief СоÑтоÑние релейного выхода */ void GetDOUTStatusStr(char *str, uint8_t *len, uint8_t num) { sprintf(str, "%d", get_state_din_outs(DOUT1+num)); 8027ed0: 3207 adds r2, #7 /** * @brief СоÑтоÑние релейного выхода */ void GetDOUTStatusStr(char *str, uint8_t *len, uint8_t num) { 8027ed2: b538 push {r3, r4, r5, lr} 8027ed4: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DOUT1+num)); 8027ed6: b2d0 uxtb r0, r2 /** * @brief СоÑтоÑние релейного выхода */ void GetDOUTStatusStr(char *str, uint8_t *len, uint8_t num) { 8027ed8: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DOUT1+num)); 8027eda: f000 ffe2 bl 8028ea2 8027ede: 4905 ldr r1, [pc, #20] ; (8027ef4 ) 8027ee0: 4602 mov r2, r0 8027ee2: 4620 mov r0, r4 8027ee4: f7ff fe1c bl 8027b20 *len = strlen(str); 8027ee8: 4620 mov r0, r4 8027eea: f7fa f931 bl 8022150 8027eee: 7028 strb r0, [r5, #0] 8027ef0: bd38 pop {r3, r4, r5, pc} 8027ef2: bf00 nop 8027ef4: 08038967 .word 0x08038967 08027ef8 : /** * @brief СоÑтоÑние релейного выхода */ void GetDOUT0StatusStr(char *str, uint8_t *len) { 8027ef8: b538 push {r3, r4, r5, lr} 8027efa: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DOUT1)); 8027efc: 2007 movs r0, #7 /** * @brief СоÑтоÑние релейного выхода */ void GetDOUT0StatusStr(char *str, uint8_t *len) { 8027efe: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DOUT1)); 8027f00: f000 ffcf bl 8028ea2 8027f04: 4904 ldr r1, [pc, #16] ; (8027f18 ) 8027f06: 4602 mov r2, r0 8027f08: 4620 mov r0, r4 8027f0a: f7ff fe09 bl 8027b20 *len = strlen(str); 8027f0e: 4620 mov r0, r4 8027f10: f7fa f91e bl 8022150 8027f14: 7028 strb r0, [r5, #0] 8027f16: bd38 pop {r3, r4, r5, pc} 8027f18: 08038967 .word 0x08038967 08027f1c : /** * @brief СоÑтоÑние релейного выхода */ void GetDOUT1StatusStr(char *str, uint8_t *len) { 8027f1c: b538 push {r3, r4, r5, lr} 8027f1e: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DOUT2)); 8027f20: 2008 movs r0, #8 /** * @brief СоÑтоÑние релейного выхода */ void GetDOUT1StatusStr(char *str, uint8_t *len) { 8027f22: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DOUT2)); 8027f24: f000 ffbd bl 8028ea2 8027f28: 4904 ldr r1, [pc, #16] ; (8027f3c ) 8027f2a: 4602 mov r2, r0 8027f2c: 4620 mov r0, r4 8027f2e: f7ff fdf7 bl 8027b20 *len = strlen(str); 8027f32: 4620 mov r0, r4 8027f34: f7fa f90c bl 8022150 8027f38: 7028 strb r0, [r5, #0] 8027f3a: bd38 pop {r3, r4, r5, pc} 8027f3c: 08038967 .word 0x08038967 08027f40 : /** * @brief Ð’Ñ€ÐµÐ¼Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ уÑтройÑтва */ void GetWorkTimeStr(char *str, uint8_t *len) { 8027f40: b57f push {r0, r1, r2, r3, r4, r5, r6, lr} 8027f42: 4604 mov r4, r0 u32_t tick; uint16_t day; uint8_t hour; uint8_t min; snmp_get_sysuptime(&tick); 8027f44: a803 add r0, sp, #12 /** * @brief Ð’Ñ€ÐµÐ¼Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ уÑтройÑтва */ void GetWorkTimeStr(char *str, uint8_t *len) { 8027f46: 460e mov r6, r1 u32_t tick; uint16_t day; uint8_t hour; uint8_t min; snmp_get_sysuptime(&tick); 8027f48: f00b fdda bl 8033b00 day = tick/8640000; 8027f4c: 9803 ldr r0, [sp, #12] tick = tick%8640000; 8027f4e: 4b0c ldr r3, [pc, #48] ; (8027f80 ) hour = tick/360000; tick = tick%360000; 8027f50: 4d0c ldr r5, [pc, #48] ; (8027f84 ) snmp_get_sysuptime(&tick); day = tick/8640000; tick = tick%8640000; 8027f52: fbb0 f2f3 udiv r2, r0, r3 8027f56: fb03 0012 mls r0, r3, r2, r0 hour = tick/360000; tick = tick%360000; 8027f5a: fbb0 f3f5 udiv r3, r0, r5 8027f5e: fb05 0013 mls r0, r5, r3, r0 min = tick/6000; 8027f62: f241 7170 movw r1, #6000 ; 0x1770 day = tick/8640000; tick = tick%8640000; hour = tick/360000; tick = tick%360000; 8027f66: 9003 str r0, [sp, #12] min = tick/6000; 8027f68: fbb0 f0f1 udiv r0, r0, r1 sprintf(str, "%d дн. %d ч. %d мин.", day, hour, min); 8027f6c: 9000 str r0, [sp, #0] 8027f6e: 4906 ldr r1, [pc, #24] ; (8027f88 ) 8027f70: 4620 mov r0, r4 8027f72: f7ff fdd5 bl 8027b20 *len = strlen(str); 8027f76: 4620 mov r0, r4 8027f78: f7fa f8ea bl 8022150 8027f7c: 7030 strb r0, [r6, #0] } 8027f7e: bd7f pop {r0, r1, r2, r3, r4, r5, r6, pc} 8027f80: 0083d600 .word 0x0083d600 8027f84: 00057e40 .word 0x00057e40 8027f88: 08038979 .word 0x08038979 08027f8c : /** * @brief Модель уÑтройÑтва */ void GetModelStr(char *str, uint8_t *len) { 8027f8c: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sSnmp.sysName); 8027f8e: 4c07 ldr r4, [pc, #28] ; (8027fac ) /** * @brief Модель уÑтройÑтва */ void GetModelStr(char *str, uint8_t *len) { 8027f90: 4605 mov r5, r0 *len = strlen(sSettings.sSnmp.sysName); 8027f92: 4620 mov r0, r4 /** * @brief Модель уÑтройÑтва */ void GetModelStr(char *str, uint8_t *len) { 8027f94: 460e mov r6, r1 *len = strlen(sSettings.sSnmp.sysName); 8027f96: f7fa f8db bl 8022150 8027f9a: 4602 mov r2, r0 8027f9c: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sSnmp.sysName, *len); 8027f9e: 4621 mov r1, r4 8027fa0: 4628 mov r0, r5 8027fa2: b2d2 uxtb r2, r2 } 8027fa4: 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); 8027fa8: f7fa b98a b.w 80222c0 8027fac: 2000cdcb .word 0x2000cdcb 08027fb0 : /** * @brief Дата производÑтва */ void GetProductionDataStr(char *str, uint8_t *len) { 8027fb0: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.productionData); 8027fb2: 4c07 ldr r4, [pc, #28] ; (8027fd0 ) /** * @brief Дата производÑтва */ void GetProductionDataStr(char *str, uint8_t *len) { 8027fb4: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.productionData); 8027fb6: 4620 mov r0, r4 /** * @brief Дата производÑтва */ void GetProductionDataStr(char *str, uint8_t *len) { 8027fb8: 460e mov r6, r1 *len = strlen(sSettings.sInfo.productionData); 8027fba: f7fa f8c9 bl 8022150 8027fbe: 4602 mov r2, r0 8027fc0: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.productionData, *len); 8027fc2: 4621 mov r1, r4 8027fc4: 4628 mov r0, r5 8027fc6: b2d2 uxtb r2, r2 } 8027fc8: 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); 8027fcc: f7fa b978 b.w 80222c0 8027fd0: 2000cc04 .word 0x2000cc04 08027fd4 : /** * @brief ВерÑÐ¸Ñ ÐŸÐž */ void GetVersionStr(char *str, uint8_t *len) // + { 8027fd4: b570 push {r4, r5, r6, lr} *len = strlen(VERSION); 8027fd6: 4c07 ldr r4, [pc, #28] ; (8027ff4 ) /** * @brief ВерÑÐ¸Ñ ÐŸÐž */ void GetVersionStr(char *str, uint8_t *len) // + { 8027fd8: 4605 mov r5, r0 *len = strlen(VERSION); 8027fda: 4620 mov r0, r4 /** * @brief ВерÑÐ¸Ñ ÐŸÐž */ void GetVersionStr(char *str, uint8_t *len) // + { 8027fdc: 460e mov r6, r1 *len = strlen(VERSION); 8027fde: f7fa f8b7 bl 8022150 8027fe2: 4602 mov r2, r0 8027fe4: 7030 strb r0, [r6, #0] strncpy(str, VERSION, *len); 8027fe6: 4621 mov r1, r4 8027fe8: 4628 mov r0, r5 8027fea: b2d2 uxtb r2, r2 } 8027fec: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief ВерÑÐ¸Ñ ÐŸÐž */ void GetVersionStr(char *str, uint8_t *len) // + { *len = strlen(VERSION); strncpy(str, VERSION, *len); 8027ff0: f7fa b966 b.w 80222c0 8027ff4: 08038994 .word 0x08038994 08027ff8 : /** * @brief MAC Ð°Ð´Ñ€ÐµÑ ÑƒÑтройÑтва */ void GetMacStr(char *str, uint8_t *len) { 8027ff8: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.mac); 8027ffa: 4c07 ldr r4, [pc, #28] ; (8028018 ) /** * @brief MAC Ð°Ð´Ñ€ÐµÑ ÑƒÑтройÑтва */ void GetMacStr(char *str, uint8_t *len) { 8027ffc: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.mac); 8027ffe: 4620 mov r0, r4 /** * @brief MAC Ð°Ð´Ñ€ÐµÑ ÑƒÑтройÑтва */ void GetMacStr(char *str, uint8_t *len) { 8028000: 460e mov r6, r1 *len = strlen(sSettings.sInfo.mac); 8028002: f7fa f8a5 bl 8022150 8028006: 4602 mov r2, r0 8028008: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.mac, *len); 802800a: 4621 mov r1, r4 802800c: 4628 mov r0, r5 802800e: b2d2 uxtb r2, r2 } 8028010: 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); 8028014: f7fa b954 b.w 80222c0 8028018: 2000cc2c .word 0x2000cc2c 0802801c : /** * @brief Серийный номер уÑтройÑтва */ void GetSerialNumberStr(char *str, uint8_t *len) { 802801c: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.serialNumber); 802801e: 4c07 ldr r4, [pc, #28] ; (802803c ) /** * @brief Серийный номер уÑтройÑтва */ void GetSerialNumberStr(char *str, uint8_t *len) { 8028020: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.serialNumber); 8028022: 4620 mov r0, r4 /** * @brief Серийный номер уÑтройÑтва */ void GetSerialNumberStr(char *str, uint8_t *len) { 8028024: 460e mov r6, r1 *len = strlen(sSettings.sInfo.serialNumber); 8028026: f7fa f893 bl 8022150 802802a: 4602 mov r2, r0 802802c: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.serialNumber, *len); 802802e: 4621 mov r1, r4 8028030: 4628 mov r0, r5 8028032: b2d2 uxtb r2, r2 } 8028034: 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); 8028038: f7fa b942 b.w 80222c0 802803c: 2000cc3e .word 0x2000cc3e 08028040 : /** * @brief Владелец уÑтройÑтва */ void GetOwnerStr(char *str, uint8_t *len) { 8028040: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sSnmp.sysContact); 8028042: 4c07 ldr r4, [pc, #28] ; (8028060 ) /** * @brief Владелец уÑтройÑтва */ void GetOwnerStr(char *str, uint8_t *len) { 8028044: 4605 mov r5, r0 *len = strlen(sSettings.sSnmp.sysContact); 8028046: 4620 mov r0, r4 /** * @brief Владелец уÑтройÑтва */ void GetOwnerStr(char *str, uint8_t *len) { 8028048: 460e mov r6, r1 *len = strlen(sSettings.sSnmp.sysContact); 802804a: f7fa f881 bl 8022150 802804e: 4602 mov r2, r0 8028050: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sSnmp.sysContact, *len); 8028052: 4621 mov r1, r4 8028054: 4628 mov r0, r5 8028056: b2d2 uxtb r2, r2 } 8028058: 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); 802805c: f7fa b930 b.w 80222c0 8028060: 2000cd99 .word 0x2000cd99 08028064 : /** * @brief МеÑтоположение уÑтройÑтва */ void GetLocationStr(char *str, uint8_t *len) { 8028064: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sSnmp.sysLocation); 8028066: 4c07 ldr r4, [pc, #28] ; (8028084 ) /** * @brief МеÑтоположение уÑтройÑтва */ void GetLocationStr(char *str, uint8_t *len) { 8028068: 4605 mov r5, r0 *len = strlen(sSettings.sSnmp.sysLocation); 802806a: 4620 mov r0, r4 /** * @brief МеÑтоположение уÑтройÑтва */ void GetLocationStr(char *str, uint8_t *len) { 802806c: 460e mov r6, r1 *len = strlen(sSettings.sSnmp.sysLocation); 802806e: f7fa f86f bl 8022150 8028072: 4602 mov r2, r0 8028074: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sSnmp.sysLocation, *len); 8028076: 4621 mov r1, r4 8028078: 4628 mov r0, r5 802807a: b2d2 uxtb r2, r2 } 802807c: 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); 8028080: f7fa b91e b.w 80222c0 8028084: 2000cddf .word 0x2000cddf 08028088 : /** * @brief Комментарии */ void GetCommentsStr(char *str, uint8_t *len) { 8028088: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.comments); 802808a: 4c07 ldr r4, [pc, #28] ; (80280a8 ) /** * @brief Комментарии */ void GetCommentsStr(char *str, uint8_t *len) { 802808c: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.comments); 802808e: 4620 mov r0, r4 /** * @brief Комментарии */ void GetCommentsStr(char *str, uint8_t *len) { 8028090: 460e mov r6, r1 *len = strlen(sSettings.sInfo.comments); 8028092: f7fa f85d bl 8022150 8028096: 4602 mov r2, r0 8028098: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.comments, *len); 802809a: 4621 mov r1, r4 802809c: 4628 mov r0, r5 802809e: b2d2 uxtb r2, r2 } 80280a0: 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); 80280a4: f7fa b90c b.w 80222c0 80280a8: 2000cc4e .word 0x2000cc4e 080280ac : /** * @brief Модель UPS */ void GetUPSModelStr(char *str, uint8_t *len) { 80280ac: b570 push {r4, r5, r6, lr} *len = strlen(UPS.model); 80280ae: 4c07 ldr r4, [pc, #28] ; (80280cc ) /** * @brief Модель UPS */ void GetUPSModelStr(char *str, uint8_t *len) { 80280b0: 4605 mov r5, r0 *len = strlen(UPS.model); 80280b2: 4620 mov r0, r4 /** * @brief Модель UPS */ void GetUPSModelStr(char *str, uint8_t *len) { 80280b4: 460e mov r6, r1 *len = strlen(UPS.model); 80280b6: f7fa f84b bl 8022150 80280ba: 4602 mov r2, r0 80280bc: 7030 strb r0, [r6, #0] strncpy(str, UPS.model, *len); 80280be: 4621 mov r1, r4 80280c0: 4628 mov r0, r5 80280c2: b2d2 uxtb r2, r2 } 80280c4: 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); 80280c8: f7fa b8fa b.w 80222c0 80280cc: 2000cf79 .word 0x2000cf79 080280d0 : /** * @brief ВерÑÐ¸Ñ UPS ПО */ void GetUPSVersionStr(char *str, uint8_t *len) // + { 80280d0: b570 push {r4, r5, r6, lr} *len = strlen(UPS.vertion); 80280d2: 4c07 ldr r4, [pc, #28] ; (80280f0 ) /** * @brief ВерÑÐ¸Ñ UPS ПО */ void GetUPSVersionStr(char *str, uint8_t *len) // + { 80280d4: 4605 mov r5, r0 *len = strlen(UPS.vertion); 80280d6: 4620 mov r0, r4 /** * @brief ВерÑÐ¸Ñ UPS ПО */ void GetUPSVersionStr(char *str, uint8_t *len) // + { 80280d8: 460e mov r6, r1 *len = strlen(UPS.vertion); 80280da: f7fa f839 bl 8022150 80280de: 4602 mov r2, r0 80280e0: 7030 strb r0, [r6, #0] strncpy(str, UPS.vertion, *len); 80280e2: 4621 mov r1, r4 80280e4: 4628 mov r0, r5 80280e6: b2d2 uxtb r2, r2 } 80280e8: 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); 80280ec: f7fa b8e8 b.w 80222c0 80280f0: 2000cf84 .word 0x2000cf84 080280f4 : // ************************************************************************** // // ÐаÑтройки аутентификации void GetUserLogin(uint8_t user_id, char *str, uint8_t *len) { 80280f4: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sAuth[user_id].login); 80280f6: 4b08 ldr r3, [pc, #32] ; (8028118 ) // ************************************************************************** // // ÐаÑтройки аутентификации void GetUserLogin(uint8_t user_id, char *str, uint8_t *len) { 80280f8: 4615 mov r5, r2 sprintf(str, "%s", sSettings.sAuth[user_id].login); 80280fa: 2217 movs r2, #23 80280fc: fb02 3200 mla r2, r2, r0, r3 // ************************************************************************** // // ÐаÑтройки аутентификации void GetUserLogin(uint8_t user_id, char *str, uint8_t *len) { 8028100: 460c mov r4, r1 sprintf(str, "%s", sSettings.sAuth[user_id].login); 8028102: 4608 mov r0, r1 8028104: 3202 adds r2, #2 8028106: 4905 ldr r1, [pc, #20] ; (802811c ) 8028108: f7ff fd0a bl 8027b20 *len = strlen(str); 802810c: 4620 mov r0, r4 802810e: f7fa f81f bl 8022150 8028112: 7028 strb r0, [r5, #0] 8028114: bd38 pop {r3, r4, r5, pc} 8028116: bf00 nop 8028118: 2000ceb0 .word 0x2000ceb0 802811c: 0804288f .word 0x0804288f 08028120 : } void GetUserPassword(uint8_t user_id, char *str, uint8_t *len) { 8028120: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sAuth[user_id].password); 8028122: 4b08 ldr r3, [pc, #32] ; (8028144 ) sprintf(str, "%s", sSettings.sAuth[user_id].login); *len = strlen(str); } void GetUserPassword(uint8_t user_id, char *str, uint8_t *len) { 8028124: 4615 mov r5, r2 sprintf(str, "%s", sSettings.sAuth[user_id].password); 8028126: 2217 movs r2, #23 8028128: 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) { 802812c: 460c mov r4, r1 sprintf(str, "%s", sSettings.sAuth[user_id].password); 802812e: 4608 mov r0, r1 8028130: 3205 adds r2, #5 8028132: 4905 ldr r1, [pc, #20] ; (8028148 ) 8028134: f7ff fcf4 bl 8027b20 *len = strlen(str); 8028138: 4620 mov r0, r4 802813a: f7fa f809 bl 8022150 802813e: 7028 strb r0, [r5, #0] 8028140: bd38 pop {r3, r4, r5, pc} 8028142: bf00 nop 8028144: 2000ceb8 .word 0x2000ceb8 8028148: 0804288f .word 0x0804288f 0802814c : *len = strlen(str); } void GetUserLevelInt(uint8_t user_id, uint8_t *value) { *value = sSettings.sAuth[user_id].level; 802814c: 4b03 ldr r3, [pc, #12] ; (802815c ) 802814e: 2217 movs r2, #23 8028150: fb02 3000 mla r0, r2, r0, r3 8028154: f890 3311 ldrb.w r3, [r0, #785] ; 0x311 8028158: 700b strb r3, [r1, #0] 802815a: 4770 bx lr 802815c: 2000cba0 .word 0x2000cba0 08028160 : * @brief Текущий IP Ð°Ð´Ñ€ÐµÑ */ void GetIpStr(char *str, uint8_t *len) { /* ЕÑли ÑÐµÐ¹Ñ‡Ð°Ñ Ð²Ñ€ÐµÐ¼ÐµÐ½Ð½Ñ‹Ðµ наÑтройки */ if (sSettings.sFlags.netsettingsChanged) 8028160: 4a08 ldr r2, [pc, #32] ; (8028184 ) /** * @brief Текущий IP Ð°Ð´Ñ€ÐµÑ */ void GetIpStr(char *str, uint8_t *len) { 8028162: b538 push {r3, r4, r5, lr} /* ЕÑли ÑÐµÐ¹Ñ‡Ð°Ñ Ð²Ñ€ÐµÐ¼ÐµÐ½Ð½Ñ‹Ðµ наÑтройки */ if (sSettings.sFlags.netsettingsChanged) 8028164: f892 3120 ldrb.w r3, [r2, #288] ; 0x120 /** * @brief Текущий IP Ð°Ð´Ñ€ÐµÑ */ void GetIpStr(char *str, uint8_t *len) { 8028168: 460c mov r4, r1 802816a: 4605 mov r5, r0 /* ЕÑли ÑÐµÐ¹Ñ‡Ð°Ñ Ð²Ñ€ÐµÐ¼ÐµÐ½Ð½Ñ‹Ðµ наÑтройки */ if (sSettings.sFlags.netsettingsChanged) sprintf(str, "%s", sSettings.sWebTempParams.ip); 802816c: 4906 ldr r1, [pc, #24] ; (8028188 ) * @brief Текущий IP Ð°Ð´Ñ€ÐµÑ */ void GetIpStr(char *str, uint8_t *len) { /* ЕÑли ÑÐµÐ¹Ñ‡Ð°Ñ Ð²Ñ€ÐµÐ¼ÐµÐ½Ð½Ñ‹Ðµ наÑтройки */ if (sSettings.sFlags.netsettingsChanged) 802816e: b10b cbz r3, 8028174 sprintf(str, "%s", sSettings.sWebTempParams.ip); 8028170: 3233 adds r2, #51 ; 0x33 8028172: e000 b.n 8028176 else sprintf(str, "%s", sSettings.sWebParams.ip); 8028174: 3202 adds r2, #2 8028176: f7ff fcd3 bl 8027b20 *len = strlen(str); 802817a: 4628 mov r0, r5 802817c: f7f9 ffe8 bl 8022150 8028180: 7020 strb r0, [r4, #0] 8028182: bd38 pop {r3, r4, r5, pc} 8028184: 2000cba0 .word 0x2000cba0 8028188: 0804288f .word 0x0804288f 0802818c : * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { /* ЕÑли ÑÐµÐ¹Ñ‡Ð°Ñ Ð²Ñ€ÐµÐ¼ÐµÐ½Ð½Ñ‹Ðµ наÑтройки */ if (sSettings.sFlags.netsettingsChanged) 802818c: 4a08 ldr r2, [pc, #32] ; (80281b0 ) /** * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { 802818e: b538 push {r3, r4, r5, lr} /* ЕÑли ÑÐµÐ¹Ñ‡Ð°Ñ Ð²Ñ€ÐµÐ¼ÐµÐ½Ð½Ñ‹Ðµ наÑтройки */ if (sSettings.sFlags.netsettingsChanged) 8028190: f892 3120 ldrb.w r3, [r2, #288] ; 0x120 /** * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { 8028194: 460c mov r4, r1 8028196: 4605 mov r5, r0 /* ЕÑли ÑÐµÐ¹Ñ‡Ð°Ñ Ð²Ñ€ÐµÐ¼ÐµÐ½Ð½Ñ‹Ðµ наÑтройки */ if (sSettings.sFlags.netsettingsChanged) sprintf(str, "%s", sSettings.sWebTempParams.gate); 8028198: 4906 ldr r1, [pc, #24] ; (80281b4 ) * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { /* ЕÑли ÑÐµÐ¹Ñ‡Ð°Ñ Ð²Ñ€ÐµÐ¼ÐµÐ½Ð½Ñ‹Ðµ наÑтройки */ if (sSettings.sFlags.netsettingsChanged) 802819a: b10b cbz r3, 80281a0 sprintf(str, "%s", sSettings.sWebTempParams.gate); 802819c: 3243 adds r2, #67 ; 0x43 802819e: e000 b.n 80281a2 else sprintf(str, "%s", sSettings.sWebParams.gate); 80281a0: 3212 adds r2, #18 80281a2: f7ff fcbd bl 8027b20 *len = strlen(str); 80281a6: 4628 mov r0, r5 80281a8: f7f9 ffd2 bl 8022150 80281ac: 7020 strb r0, [r4, #0] 80281ae: bd38 pop {r3, r4, r5, pc} 80281b0: 2000cba0 .word 0x2000cba0 80281b4: 0804288f .word 0x0804288f 080281b8 : * @brief Ð¢ÐµÐºÑƒÑ‰Ð°Ñ Ð¼Ð°Ñка подÑети */ void GetMaskStr(char *str, uint8_t *len) { /* ЕÑли ÑÐµÐ¹Ñ‡Ð°Ñ Ð²Ñ€ÐµÐ¼ÐµÐ½Ð½Ñ‹Ðµ наÑтройки */ if (sSettings.sFlags.netsettingsChanged) 80281b8: 4a08 ldr r2, [pc, #32] ; (80281dc ) /** * @brief Ð¢ÐµÐºÑƒÑ‰Ð°Ñ Ð¼Ð°Ñка подÑети */ void GetMaskStr(char *str, uint8_t *len) { 80281ba: b538 push {r3, r4, r5, lr} /* ЕÑли ÑÐµÐ¹Ñ‡Ð°Ñ Ð²Ñ€ÐµÐ¼ÐµÐ½Ð½Ñ‹Ðµ наÑтройки */ if (sSettings.sFlags.netsettingsChanged) 80281bc: f892 3120 ldrb.w r3, [r2, #288] ; 0x120 /** * @brief Ð¢ÐµÐºÑƒÑ‰Ð°Ñ Ð¼Ð°Ñка подÑети */ void GetMaskStr(char *str, uint8_t *len) { 80281c0: 460c mov r4, r1 80281c2: 4605 mov r5, r0 /* ЕÑли ÑÐµÐ¹Ñ‡Ð°Ñ Ð²Ñ€ÐµÐ¼ÐµÐ½Ð½Ñ‹Ðµ наÑтройки */ if (sSettings.sFlags.netsettingsChanged) sprintf(str, "%s", sSettings.sWebTempParams.mask); 80281c4: 4906 ldr r1, [pc, #24] ; (80281e0 ) * @brief Ð¢ÐµÐºÑƒÑ‰Ð°Ñ Ð¼Ð°Ñка подÑети */ void GetMaskStr(char *str, uint8_t *len) { /* ЕÑли ÑÐµÐ¹Ñ‡Ð°Ñ Ð²Ñ€ÐµÐ¼ÐµÐ½Ð½Ñ‹Ðµ наÑтройки */ if (sSettings.sFlags.netsettingsChanged) 80281c6: b10b cbz r3, 80281cc sprintf(str, "%s", sSettings.sWebTempParams.mask); 80281c8: 3253 adds r2, #83 ; 0x53 80281ca: e000 b.n 80281ce else sprintf(str, "%s", sSettings.sWebParams.mask); 80281cc: 3222 adds r2, #34 ; 0x22 80281ce: f7ff fca7 bl 8027b20 *len = strlen(str); 80281d2: 4628 mov r0, r5 80281d4: f7f9 ffbc bl 8022150 80281d8: 7020 strb r0, [r4, #0] 80281da: bd38 pop {r3, r4, r5, pc} 80281dc: 2000cba0 .word 0x2000cba0 80281e0: 0804288f .word 0x0804288f 080281e4 : * @brief ÐаÑтройка DHCP */ void GetDhcpStateStr(char *str, uint8_t *len) { /* ЕÑли ÑÐµÐ¹Ñ‡Ð°Ñ Ð²Ñ€ÐµÐ¼ÐµÐ½Ð½Ñ‹Ðµ наÑтройки */ if (sSettings.sFlags.netsettingsChanged) 80281e4: 4b08 ldr r3, [pc, #32] ; (8028208 ) 80281e6: f893 2120 ldrb.w r2, [r3, #288] ; 0x120 80281ea: b112 cbz r2, 80281f2 { if (sSettings.sWebTempParams.dhcpEnable) 80281ec: f893 3063 ldrb.w r3, [r3, #99] ; 0x63 80281f0: e001 b.n 80281f6 else *str = '0'; } else { if (sSettings.sWebParams.dhcpEnable) 80281f2: f893 3032 ldrb.w r3, [r3, #50] ; 0x32 80281f6: b10b cbz r3, 80281fc *str = '1'; 80281f8: 2331 movs r3, #49 ; 0x31 80281fa: e000 b.n 80281fe else *str = '0'; 80281fc: 2330 movs r3, #48 ; 0x30 80281fe: 7003 strb r3, [r0, #0] } *len = 1; 8028200: 2301 movs r3, #1 8028202: 700b strb r3, [r1, #0] 8028204: 4770 bx lr 8028206: bf00 nop 8028208: 2000cba0 .word 0x2000cba0 0802820c : /** * @brief Текущее community Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ */ void GetReadCommunity(char *str, uint8_t *len) { 802820c: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.readCommunity); 802820e: 4a05 ldr r2, [pc, #20] ; (8028224 ) /** * @brief Текущее community Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ */ void GetReadCommunity(char *str, uint8_t *len) { 8028210: 4605 mov r5, r0 8028212: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.readCommunity); 8028214: 4904 ldr r1, [pc, #16] ; (8028228 ) 8028216: f7ff fc83 bl 8027b20 *len = strlen(str); 802821a: 4628 mov r0, r5 802821c: f7f9 ff98 bl 8022150 8028220: 7020 strb r0, [r4, #0] 8028222: bd38 pop {r3, r4, r5, pc} 8028224: 2000cd71 .word 0x2000cd71 8028228: 0804288f .word 0x0804288f 0802822c : /** * @brief Текущее community Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи */ void GetWriteCommunity(char *str, uint8_t *len) { 802822c: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.writeCommunity); 802822e: 4a05 ldr r2, [pc, #20] ; (8028244 ) /** * @brief Текущее community Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи */ void GetWriteCommunity(char *str, uint8_t *len) { 8028230: 4605 mov r5, r0 8028232: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.writeCommunity); 8028234: 4904 ldr r1, [pc, #16] ; (8028248 ) 8028236: f7ff fc73 bl 8027b20 *len = strlen(str); 802823a: 4628 mov r0, r5 802823c: f7f9 ff88 bl 8022150 8028240: 7020 strb r0, [r4, #0] 8028242: bd38 pop {r3, r4, r5, pc} 8028244: 2000cd85 .word 0x2000cd85 8028248: 0804288f .word 0x0804288f 0802824c : /** * @brief IP SNMP менеджера */ void GetManagerIp(char *str, uint8_t *len) { 802824c: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP); 802824e: 4a05 ldr r2, [pc, #20] ; (8028264 ) /** * @brief IP SNMP менеджера */ void GetManagerIp(char *str, uint8_t *len) { 8028250: 4605 mov r5, r0 8028252: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP); 8028254: 4904 ldr r1, [pc, #16] ; (8028268 ) 8028256: f7ff fc63 bl 8027b20 *len = strlen(str); 802825a: 4628 mov r0, r5 802825c: f7f9 ff78 bl 8022150 8028260: 7020 strb r0, [r4, #0] 8028262: bd38 pop {r3, r4, r5, pc} 8028264: 2000ce4d .word 0x2000ce4d 8028268: 0804288f .word 0x0804288f 0802826c : } void GetManagerIp2(char *str, uint8_t *len) { 802826c: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP2); 802826e: 4a05 ldr r2, [pc, #20] ; (8028284 ) sprintf(str, "%s", sSettings.sSnmp.managerIP); *len = strlen(str); } void GetManagerIp2(char *str, uint8_t *len) { 8028270: 4605 mov r5, r0 8028272: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP2); 8028274: 4904 ldr r1, [pc, #16] ; (8028288 ) 8028276: f7ff fc53 bl 8027b20 *len = strlen(str); 802827a: 4628 mov r0, r5 802827c: f7f9 ff68 bl 8022150 8028280: 7020 strb r0, [r4, #0] 8028282: bd38 pop {r3, r4, r5, pc} 8028284: 2000ce61 .word 0x2000ce61 8028288: 0804288f .word 0x0804288f 0802828c : } void GetManagerIp3(char *str, uint8_t *len) { 802828c: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP3); 802828e: 4a05 ldr r2, [pc, #20] ; (80282a4 ) sprintf(str, "%s", sSettings.sSnmp.managerIP2); *len = strlen(str); } void GetManagerIp3(char *str, uint8_t *len) { 8028290: 4605 mov r5, r0 8028292: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP3); 8028294: 4904 ldr r1, [pc, #16] ; (80282a8 ) 8028296: f7ff fc43 bl 8027b20 *len = strlen(str); 802829a: 4628 mov r0, r5 802829c: f7f9 ff58 bl 8022150 80282a0: 7020 strb r0, [r4, #0] 80282a2: bd38 pop {r3, r4, r5, pc} 80282a4: 2000ce75 .word 0x2000ce75 80282a8: 0804288f .word 0x0804288f 080282ac : } void GetManagerIp4(char *str, uint8_t *len) { 80282ac: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP4); 80282ae: 4a05 ldr r2, [pc, #20] ; (80282c4 ) sprintf(str, "%s", sSettings.sSnmp.managerIP3); *len = strlen(str); } void GetManagerIp4(char *str, uint8_t *len) { 80282b0: 4605 mov r5, r0 80282b2: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP4); 80282b4: 4904 ldr r1, [pc, #16] ; (80282c8 ) 80282b6: f7ff fc33 bl 8027b20 *len = strlen(str); 80282ba: 4628 mov r0, r5 80282bc: f7f9 ff48 bl 8022150 80282c0: 7020 strb r0, [r4, #0] 80282c2: bd38 pop {r3, r4, r5, pc} 80282c4: 2000ce89 .word 0x2000ce89 80282c8: 0804288f .word 0x0804288f 080282cc : } void GetManagerIp5(char *str, uint8_t *len) { 80282cc: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP5); 80282ce: 4a05 ldr r2, [pc, #20] ; (80282e4 ) sprintf(str, "%s", sSettings.sSnmp.managerIP4); *len = strlen(str); } void GetManagerIp5(char *str, uint8_t *len) { 80282d0: 4605 mov r5, r0 80282d2: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP5); 80282d4: 4904 ldr r1, [pc, #16] ; (80282e8 ) 80282d6: f7ff fc23 bl 8027b20 *len = strlen(str); 80282da: 4628 mov r0, r5 80282dc: f7f9 ff38 bl 8022150 80282e0: 7020 strb r0, [r4, #0] 80282e2: bd38 pop {r3, r4, r5, pc} 80282e4: 2000ce9d .word 0x2000ce9d 80282e8: 0804288f .word 0x0804288f 080282ec : /** * @brief Текущий IP Ð°Ð´Ñ€ÐµÑ */ void GetRDSIpStr(char *str, uint8_t *len) { 80282ec: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sRADIUS.ServerIP); 80282ee: 4a05 ldr r2, [pc, #20] ; (8028304 ) /** * @brief Текущий IP Ð°Ð´Ñ€ÐµÑ */ void GetRDSIpStr(char *str, uint8_t *len) { 80282f0: 4605 mov r5, r0 80282f2: 460c mov r4, r1 sprintf(str, "%s", sSettings.sRADIUS.ServerIP); 80282f4: 4904 ldr r1, [pc, #16] ; (8028308 ) 80282f6: f7ff fc13 bl 8027b20 *len = strlen(str); 80282fa: 4628 mov r0, r5 80282fc: f7f9 ff28 bl 8022150 8028300: 7020 strb r0, [r4, #0] 8028302: bd38 pop {r3, r4, r5, pc} 8028304: 2000cf19 .word 0x2000cf19 8028308: 0804288f .word 0x0804288f 0802830c : /** * @brief Текущий Порт */ void GetRDSPortStr(char *str, uint8_t *len) { 802830c: b538 push {r3, r4, r5, lr} sprintf(str, "%d", sSettings.sRADIUS.port); 802830e: 4b06 ldr r3, [pc, #24] ; (8028328 ) /** * @brief Текущий Порт */ void GetRDSPortStr(char *str, uint8_t *len) { 8028310: 4605 mov r5, r0 8028312: 460c mov r4, r1 sprintf(str, "%d", sSettings.sRADIUS.port); 8028314: f8d3 239c ldr.w r2, [r3, #924] ; 0x39c 8028318: 4904 ldr r1, [pc, #16] ; (802832c ) 802831a: f7ff fc01 bl 8027b20 *len = strlen(str); 802831e: 4628 mov r0, r5 8028320: f7f9 ff16 bl 8022150 8028324: 7020 strb r0, [r4, #0] 8028326: bd38 pop {r3, r4, r5, pc} 8028328: 2000cba0 .word 0x2000cba0 802832c: 08038967 .word 0x08038967 08028330 : /** * @brief Текущий Код access */ void GetRDSKeyAccesstStr(char *str, uint8_t *len) { 8028330: b538 push {r3, r4, r5, lr} sprintf(str, "%d", sSettings.sRADIUS.key_access); 8028332: 4b06 ldr r3, [pc, #24] ; (802834c ) /** * @brief Текущий Код access */ void GetRDSKeyAccesstStr(char *str, uint8_t *len) { 8028334: 4605 mov r5, r0 8028336: 460c mov r4, r1 sprintf(str, "%d", sSettings.sRADIUS.key_access); 8028338: f8d3 23a0 ldr.w r2, [r3, #928] ; 0x3a0 802833c: 4904 ldr r1, [pc, #16] ; (8028350 ) 802833e: f7ff fbef bl 8027b20 *len = strlen(str); 8028342: 4628 mov r0, r5 8028344: f7f9 ff04 bl 8022150 8028348: 7020 strb r0, [r4, #0] 802834a: bd38 pop {r3, r4, r5, pc} 802834c: 2000cba0 .word 0x2000cba0 8028350: 08038967 .word 0x08038967 08028354 : /** * @brief Ð¢ÐµÐºÑƒÑ‰Ð°Ñ Ð¿Ð°Ñ€Ð¾Ð»ÑŒ RADIUS */ void GetRDSPasswordkStr(char *str, uint8_t *len) { 8028354: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sRADIUS.rds_password); 8028356: 4a05 ldr r2, [pc, #20] ; (802836c ) /** * @brief Ð¢ÐµÐºÑƒÑ‰Ð°Ñ Ð¿Ð°Ñ€Ð¾Ð»ÑŒ RADIUS */ void GetRDSPasswordkStr(char *str, uint8_t *len) { 8028358: 4605 mov r5, r0 802835a: 460c mov r4, r1 sprintf(str, "%s", sSettings.sRADIUS.rds_password); 802835c: 4904 ldr r1, [pc, #16] ; (8028370 ) 802835e: f7ff fbdf bl 8027b20 *len = strlen(str); 8028362: 4628 mov r0, r5 8028364: f7f9 fef4 bl 8022150 8028368: 7020 strb r0, [r4, #0] 802836a: bd38 pop {r3, r4, r5, pc} 802836c: 2000cf29 .word 0x2000cf29 8028370: 0804288f .word 0x0804288f 08028374 : /** * @brief ÐаÑтройка вкл/ выкл RADIUS Ñервера */ void GetRDSEnableStateStr(char *str, uint8_t *len) { if (sSettings.sRADIUS.RDSEnable) 8028374: 4b05 ldr r3, [pc, #20] ; (802838c ) 8028376: f893 339a ldrb.w r3, [r3, #922] ; 0x39a 802837a: b10b cbz r3, 8028380 *str = '1'; 802837c: 2331 movs r3, #49 ; 0x31 802837e: e000 b.n 8028382 else *str = '0'; 8028380: 2330 movs r3, #48 ; 0x30 8028382: 7003 strb r3, [r0, #0] *len = 1; 8028384: 2301 movs r3, #1 8028386: 700b strb r3, [r1, #0] 8028388: 4770 bx lr 802838a: bf00 nop 802838c: 2000cba0 .word 0x2000cba0 08028390 : /** * @brief ÐаÑтройка вкл/ выкл авторизации */ void GetAuthEnableStateStr(char *str, uint8_t *len) { if (sSettings.sRADIUS.Auth_enable) 8028390: 4b05 ldr r3, [pc, #20] ; (80283a8 ) 8028392: f893 3378 ldrb.w r3, [r3, #888] ; 0x378 8028396: b10b cbz r3, 802839c *str = '1'; 8028398: 2331 movs r3, #49 ; 0x31 802839a: e000 b.n 802839e else *str = '0'; 802839c: 2330 movs r3, #48 ; 0x30 802839e: 7003 strb r3, [r0, #0] *len = 1; 80283a0: 2301 movs r3, #1 80283a2: 700b strb r3, [r1, #0] 80283a4: 4770 bx lr 80283a6: bf00 nop 80283a8: 2000cba0 .word 0x2000cba0 080283ac : /** * @brief Вернуть признак Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ñетевых параметров */ void GetWebReinitFlag(char *str, uint8_t *len) { 80283ac: b538 push {r3, r4, r5, lr} if (sSettings.sFlags.netsettingsChanged) 80283ae: 4b08 ldr r3, [pc, #32] ; (80283d0 ) 80283b0: f893 3120 ldrb.w r3, [r3, #288] ; 0x120 /** * @brief Вернуть признак Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ñетевых параметров */ void GetWebReinitFlag(char *str, uint8_t *len) { 80283b4: 460c mov r4, r1 80283b6: 4605 mov r5, r0 if (sSettings.sFlags.netsettingsChanged) { sprintf(str, "%s", "true"); 80283b8: 4906 ldr r1, [pc, #24] ; (80283d4 ) /** * @brief Вернуть признак Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ñетевых параметров */ void GetWebReinitFlag(char *str, uint8_t *len) { if (sSettings.sFlags.netsettingsChanged) 80283ba: b10b cbz r3, 80283c0 { sprintf(str, "%s", "true"); 80283bc: 4a06 ldr r2, [pc, #24] ; (80283d8 ) 80283be: e000 b.n 80283c2 *len = strlen(str); } else { sprintf(str, "%s", "false"); 80283c0: 4a06 ldr r2, [pc, #24] ; (80283dc ) 80283c2: f7ff fbad bl 8027b20 *len = strlen(str); 80283c6: 4628 mov r0, r5 80283c8: f7f9 fec2 bl 8022150 80283cc: 7020 strb r0, [r4, #0] 80283ce: bd38 pop {r3, r4, r5, pc} 80283d0: 2000cba0 .word 0x2000cba0 80283d4: 0804288f .word 0x0804288f 80283d8: 0803899e .word 0x0803899e 80283dc: 080389a3 .word 0x080389a3 080283e0 : * @brief УÑтановить признак Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ ÐŸÐž. */ void SetLoadMode(void) { /* Set loadMode = 1 */ RTC_WriteBackupRegister(RTC_BKP_DR1, 1); 80283e0: 2001 movs r0, #1 /** * @brief УÑтановить признак Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ ÐŸÐž. */ void SetLoadMode(void) { 80283e2: b508 push {r3, lr} /* Set loadMode = 1 */ RTC_WriteBackupRegister(RTC_BKP_DR1, 1); 80283e4: 4601 mov r1, r0 80283e6: f7fd fcd3 bl 8025d90 /* Set bootTry = 0 */ RTC_WriteBackupRegister(RTC_BKP_DR2, 0); 80283ea: 2002 movs r0, #2 80283ec: 2100 movs r1, #0 } 80283ee: 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); 80283f2: f7fd bccd b.w 8025d90 80283f6: 0000 movs r0, r0 080283f8 : /** * @brief УÑтановить признак Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ñетевых параметров */ void SetWebReinitFlag(bool value) { sSettings.sFlags.netsettingsChanged = value; 80283f8: 4b01 ldr r3, [pc, #4] ; (8028400 ) 80283fa: f883 0120 strb.w r0, [r3, #288] ; 0x120 80283fe: 4770 bx lr 8028400: 2000cba0 .word 0x2000cba0 08028404 : /** * @brief УÑтановить флаг Ð¿Ð¾Ð´Ñ‚Ð²ÐµÑ€Ð¶Ð´ÐµÐ½Ð¸Ñ Ñетевых наÑтроек пользователем */ void SetConfirmWebParamsFlag(void) { fConfirmWebParams = true; 8028404: 4b01 ldr r3, [pc, #4] ; (802840c ) 8028406: 2201 movs r2, #1 8028408: 701a strb r2, [r3, #0] 802840a: 4770 bx lr 802840c: 20000b18 .word 0x20000b18 08028410 : // Сетевые параметры /** * @brief IP Ð°Ð´Ñ€ÐµÑ */ void SetIPStr(char *str) { 8028410: 4601 mov r1, r0 //strcpy(sSettings.sWebParams.ip, str); strcpy(sSettings.sWebTempParams.ip, str); 8028412: 4801 ldr r0, [pc, #4] ; (8028418 ) 8028414: f7f9 be3e b.w 8022094 8028418: 2000cbd3 .word 0x2000cbd3 0802841c : /** * @brief Шлюз */ void SetGatewayStr(char *str) { 802841c: 4601 mov r1, r0 //strcpy(sSettings.sWebParams.gate, str); strcpy(sSettings.sWebTempParams.gate, str); 802841e: 4801 ldr r0, [pc, #4] ; (8028424 ) 8028420: f7f9 be38 b.w 8022094 8028424: 2000cbe3 .word 0x2000cbe3 08028428 : /** * @brief Ð¢ÐµÐºÑƒÑ‰Ð°Ñ Ð¼Ð°Ñка подÑети */ void SetMaskStr(char *str) { 8028428: 4601 mov r1, r0 //strcpy(sSettings.sWebParams.mask, str); strcpy(sSettings.sWebTempParams.mask, str); 802842a: 4801 ldr r0, [pc, #4] ; (8028430 ) 802842c: f7f9 be32 b.w 8022094 8028430: 2000cbf3 .word 0x2000cbf3 08028434 : /** * @brief ÐаÑтройка DHCP */ void SetDhcpStateStr(char *str) { 8028434: b508 push {r3, lr} if (strncmp(str, "on", 2) == 0) 8028436: 4906 ldr r1, [pc, #24] ; (8028450 ) 8028438: 2202 movs r2, #2 802843a: f7f9 feeb bl 8022214 802843e: 4b05 ldr r3, [pc, #20] ; (8028454 ) 8028440: b908 cbnz r0, 8028446 //sSettings.sWebParams.dhcpEnable = 1; sSettings.sWebTempParams.dhcpEnable = 1; 8028442: 2201 movs r2, #1 8028444: e000 b.n 8028448 else //sSettings.sWebParams.dhcpEnable = 0; sSettings.sWebTempParams.dhcpEnable = 0; 8028446: 2200 movs r2, #0 8028448: f883 2063 strb.w r2, [r3, #99] ; 0x63 802844c: bd08 pop {r3, pc} 802844e: bf00 nop 8028450: 080389a9 .word 0x080389a9 8028454: 2000cba0 .word 0x2000cba0 08028458 : /** * @brief Community Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ */ void SetReadCommunity(char *str) { 8028458: 4601 mov r1, r0 strcpy(sSettings.sSnmp.readCommunity, str); 802845a: 4801 ldr r0, [pc, #4] ; (8028460 ) 802845c: f7f9 be1a b.w 8022094 8028460: 2000cd71 .word 0x2000cd71 08028464 : /** * @brief Community Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи */ void SetWriteCommunity(char *str) { 8028464: 4601 mov r1, r0 strcpy(sSettings.sSnmp.writeCommunity, str); 8028466: 4801 ldr r0, [pc, #4] ; (802846c ) 8028468: f7f9 be14 b.w 8022094 802846c: 2000cd85 .word 0x2000cd85 08028470 : /** * @brief IP SNMP менеджера */ void SetManagerIp(char *str) { 8028470: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP, str); 8028472: 4c05 ldr r4, [pc, #20] ; (8028488 ) /** * @brief IP SNMP менеджера */ void SetManagerIp(char *str) { 8028474: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP, str); 8028476: 4620 mov r0, r4 8028478: f7f9 fe0c bl 8022094 SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 802847c: 4620 mov r0, r4 } 802847e: e8bd 4010 ldmia.w sp!, {r4, lr} * @brief IP SNMP менеджера */ void SetManagerIp(char *str) { strcpy(sSettings.sSnmp.managerIP, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 8028482: f00f b8f9 b.w 8037678 8028486: bf00 nop 8028488: 2000ce4d .word 0x2000ce4d 0802848c : } void SetManagerIp2(char *str) { 802848c: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP2, str); 802848e: 4c05 ldr r4, [pc, #20] ; (80284a4 ) strcpy(sSettings.sSnmp.managerIP, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP); } void SetManagerIp2(char *str) { 8028490: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP2, str); 8028492: 4620 mov r0, r4 8028494: f7f9 fdfe bl 8022094 SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); 8028498: 4620 mov r0, r4 } 802849a: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp2(char *str) { strcpy(sSettings.sSnmp.managerIP2, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); 802849e: f00f b8eb b.w 8037678 80284a2: bf00 nop 80284a4: 2000ce61 .word 0x2000ce61 080284a8 : } void SetManagerIp3(char *str) { 80284a8: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP3, str); 80284aa: 4c05 ldr r4, [pc, #20] ; (80284c0 ) strcpy(sSettings.sSnmp.managerIP2, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); } void SetManagerIp3(char *str) { 80284ac: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP3, str); 80284ae: 4620 mov r0, r4 80284b0: f7f9 fdf0 bl 8022094 SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); 80284b4: 4620 mov r0, r4 } 80284b6: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp3(char *str) { strcpy(sSettings.sSnmp.managerIP3, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); 80284ba: f00f b8dd b.w 8037678 80284be: bf00 nop 80284c0: 2000ce75 .word 0x2000ce75 080284c4 : } void SetManagerIp4(char *str) { 80284c4: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP4, str); 80284c6: 4c05 ldr r4, [pc, #20] ; (80284dc ) strcpy(sSettings.sSnmp.managerIP3, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); } void SetManagerIp4(char *str) { 80284c8: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP4, str); 80284ca: 4620 mov r0, r4 80284cc: f7f9 fde2 bl 8022094 SNMP_SetManagerIP(sSettings.sSnmp.managerIP4); 80284d0: 4620 mov r0, r4 } 80284d2: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp4(char *str) { strcpy(sSettings.sSnmp.managerIP4, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP4); 80284d6: f00f b8cf b.w 8037678 80284da: bf00 nop 80284dc: 2000ce89 .word 0x2000ce89 080284e0 : } void SetManagerIp5(char *str) { 80284e0: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP5, str); 80284e2: 4c05 ldr r4, [pc, #20] ; (80284f8 ) strcpy(sSettings.sSnmp.managerIP4, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP4); } void SetManagerIp5(char *str) { 80284e4: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP5, str); 80284e6: 4620 mov r0, r4 80284e8: f7f9 fdd4 bl 8022094 SNMP_SetManagerIP(sSettings.sSnmp.managerIP5); 80284ec: 4620 mov r0, r4 } 80284ee: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp5(char *str) { strcpy(sSettings.sSnmp.managerIP5, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP5); 80284f2: f00f b8c1 b.w 8037678 80284f6: bf00 nop 80284f8: 2000ce9d .word 0x2000ce9d 080284fc : /** * @brief УÑтановить владельца */ void SetOwner(char *str) { 80284fc: b510 push {r4, lr} strcpy(sSettings.sSnmp.sysContact, str); 80284fe: 4c06 ldr r4, [pc, #24] ; (8028518 ) /** * @brief УÑтановить владельца */ void SetOwner(char *str) { 8028500: 4601 mov r1, r0 strcpy(sSettings.sSnmp.sysContact, str); 8028502: 4620 mov r0, r4 8028504: f7f9 fdc6 bl 8022094 SNMP_SetSysContact(sSettings.sSnmp.sysContact); 8028508: 4620 mov r0, r4 802850a: f00f f88b bl 8037624 SNMP_SetObjDescr(); } 802850e: e8bd 4010 ldmia.w sp!, {r4, lr} */ void SetOwner(char *str) { strcpy(sSettings.sSnmp.sysContact, str); SNMP_SetSysContact(sSettings.sSnmp.sysContact); SNMP_SetObjDescr(); 8028512: f00f b83d b.w 8037590 8028516: bf00 nop 8028518: 2000cd99 .word 0x2000cd99 0802851c : /** * @brief УÑтановить меÑтоположение */ void SetLocation(char *str) { 802851c: b510 push {r4, lr} strcpy(sSettings.sSnmp.sysLocation, str); 802851e: 4c05 ldr r4, [pc, #20] ; (8028534 ) /** * @brief УÑтановить меÑтоположение */ void SetLocation(char *str) { 8028520: 4601 mov r1, r0 strcpy(sSettings.sSnmp.sysLocation, str); 8028522: 4620 mov r0, r4 8028524: f7f9 fdb6 bl 8022094 SNMP_SetSysLocation(sSettings.sSnmp.sysLocation); 8028528: 4620 mov r0, r4 } 802852a: e8bd 4010 ldmia.w sp!, {r4, lr} * @brief УÑтановить меÑтоположение */ void SetLocation(char *str) { strcpy(sSettings.sSnmp.sysLocation, str); SNMP_SetSysLocation(sSettings.sSnmp.sysLocation); 802852e: f00f b895 b.w 803765c 8028532: bf00 nop 8028534: 2000cddf .word 0x2000cddf 08028538 : /** * @brief УÑтановить комментарий */ void SetComment(char *str) { 8028538: 4601 mov r1, r0 strcpy(sSettings.sInfo.comments, str); 802853a: 4801 ldr r0, [pc, #4] ; (8028540 ) 802853c: f7f9 bdaa b.w 8022094 8028540: 2000cc4e .word 0x2000cc4e 08028544 : // Сетевые параметры RADIUS Ñервера /** * @brief IP Ð°Ð´Ñ€ÐµÑ */ void SetRDSIpStr(char *str) { 8028544: 4601 mov r1, r0 strcpy(sSettings.sRADIUS.ServerIP, str); 8028546: 4801 ldr r0, [pc, #4] ; (802854c ) 8028548: f7f9 bda4 b.w 8022094 802854c: 2000cf19 .word 0x2000cf19 08028550 : /** * @brief Порт */ void SetRDSPortStr(char *str) { 8028550: b508 push {r3, lr} sSettings.sRADIUS.port = atoi(str); 8028552: f7f9 fb05 bl 8021b60 8028556: 4b02 ldr r3, [pc, #8] ; (8028560 ) 8028558: f8c3 039c str.w r0, [r3, #924] ; 0x39c 802855c: bd08 pop {r3, pc} 802855e: bf00 nop 8028560: 2000cba0 .word 0x2000cba0 08028564 : /** * @brief Код access */ void SetRDSKeyAccesstStr(char *str) { 8028564: b508 push {r3, lr} sSettings.sRADIUS.key_access = atoi(str); 8028566: f7f9 fafb bl 8021b60 802856a: 4b02 ldr r3, [pc, #8] ; (8028574 ) 802856c: f8c3 03a0 str.w r0, [r3, #928] ; 0x3a0 8028570: bd08 pop {r3, pc} 8028572: bf00 nop 8028574: 2000cba0 .word 0x2000cba0 08028578 : /** * @brief пароль RADIUS */ void SetRDSPasswordkStr(char *str) { 8028578: 4601 mov r1, r0 strcpy(sSettings.sRADIUS.rds_password, str); 802857a: 4801 ldr r0, [pc, #4] ; (8028580 ) 802857c: f7f9 bd8a b.w 8022094 8028580: 2000cf29 .word 0x2000cf29 08028584 : /** * @brief ÐаÑтройка вкл/ выкл RADIUS Ñервера */ void SetRDSEnableStateStr(char *str) { 8028584: b508 push {r3, lr} if (strncmp(str, "on", 2) == 0) 8028586: 4906 ldr r1, [pc, #24] ; (80285a0 ) 8028588: 2202 movs r2, #2 802858a: f7f9 fe43 bl 8022214 802858e: 4b05 ldr r3, [pc, #20] ; (80285a4 ) 8028590: b908 cbnz r0, 8028596 sSettings.sRADIUS.RDSEnable = 1; 8028592: 2201 movs r2, #1 8028594: e000 b.n 8028598 else sSettings.sRADIUS.RDSEnable = 0; 8028596: 2200 movs r2, #0 8028598: f883 239a strb.w r2, [r3, #922] ; 0x39a 802859c: bd08 pop {r3, pc} 802859e: bf00 nop 80285a0: 080389a9 .word 0x080389a9 80285a4: 2000cba0 .word 0x2000cba0 080285a8 : /** * @brief ÐаÑтройка вкл/ выкл авторизации */ void SetAuthEnableStateStr(char *str) { 80285a8: b508 push {r3, lr} if (strncmp(str, "on", 2) == 0) 80285aa: 4906 ldr r1, [pc, #24] ; (80285c4 ) 80285ac: 2202 movs r2, #2 80285ae: f7f9 fe31 bl 8022214 80285b2: 4b05 ldr r3, [pc, #20] ; (80285c8 ) 80285b4: b908 cbnz r0, 80285ba sSettings.sRADIUS.Auth_enable = 1; 80285b6: 2201 movs r2, #1 80285b8: e000 b.n 80285bc else sSettings.sRADIUS.Auth_enable = 0; 80285ba: 2200 movs r2, #0 80285bc: f883 2378 strb.w r2, [r3, #888] ; 0x378 80285c0: bd08 pop {r3, pc} 80285c2: bf00 nop 80285c4: 080389a9 .word 0x080389a9 80285c8: 2000cba0 .word 0x2000cba0 080285cc : /** * @brief Дата */ void SetDateStr(char *str) { 80285cc: b510 push {r4, lr} 80285ce: b08c sub sp, #48 ; 0x30 80285d0: 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); 80285d2: 2100 movs r1, #0 80285d4: 2212 movs r2, #18 80285d6: a807 add r0, sp, #28 80285d8: f7f9 fbe2 bl 8021da0 memset(str_time, 0, 9); 80285dc: 2100 movs r1, #0 80285de: 2209 movs r2, #9 80285e0: 4668 mov r0, sp 80285e2: f7f9 fbdd bl 8021da0 str += 2; strncpy(str_data, (str + 6), 2); 80285e6: f104 0108 add.w r1, r4, #8 80285ea: 2202 movs r2, #2 80285ec: a807 add r0, sp, #28 80285ee: f7f9 fe67 bl 80222c0 strncat(str_data, (str + 2), 4); 80285f2: 1d21 adds r1, r4, #4 80285f4: 2204 movs r2, #4 80285f6: a807 add r0, sp, #28 80285f8: f7f9 fdda bl 80221b0 strncat(str_data, str, 2); 80285fc: 2202 movs r2, #2 80285fe: 1ca1 adds r1, r4, #2 8028600: a807 add r0, sp, #28 8028602: f7f9 fdd5 bl 80221b0 TM_RTC_GetDateTime(&tmp_data, TM_RTC_Format_BIN); 8028606: a803 add r0, sp, #12 8028608: 2100 movs r1, #0 802860a: f7fe f8df bl 80267cc sprintf(str_time, "-01-%02i:%02i", tmp_data.hours, tmp_data.minutes); 802860e: f89d 2011 ldrb.w r2, [sp, #17] 8028612: f89d 3010 ldrb.w r3, [sp, #16] 8028616: 4908 ldr r1, [pc, #32] ; (8028638 ) 8028618: 4668 mov r0, sp 802861a: f7ff fa81 bl 8027b20 len = strlen(str_time); 802861e: 4668 mov r0, sp 8028620: f7f9 fd96 bl 8022150 strncat(str_data, str_time, len); 8028624: 4669 mov r1, sp 8028626: b2c2 uxtb r2, r0 8028628: a807 add r0, sp, #28 802862a: f7f9 fdc1 bl 80221b0 //TM_RTC_SetDateTimeString(&str_data); TM_RTC_SetDateTimeString(str_data); 802862e: a807 add r0, sp, #28 8028630: f7fd ffb2 bl 8026598 } 8028634: b00c add sp, #48 ; 0x30 8028636: bd10 pop {r4, pc} 8028638: 080389ac .word 0x080389ac 0802863c : /** * @brief Ð’Ñ€ÐµÐ¼Ñ */ void SetTimeStr(char *str) { 802863c: b510 push {r4, lr} 802863e: b090 sub sp, #64 ; 0x40 8028640: 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); 8028642: 2100 movs r1, #0 8028644: 2212 movs r2, #18 8028646: a80b add r0, sp, #44 ; 0x2c 8028648: f7f9 fbaa bl 8021da0 memset(str_date, 0, 14); 802864c: 220e movs r2, #14 802864e: 2100 movs r1, #0 8028650: a803 add r0, sp, #12 8028652: f7f9 fba5 bl 8021da0 TM_RTC_GetDateTime(&tmp_data, TM_RTC_Format_BIN); 8028656: a807 add r0, sp, #28 8028658: 2100 movs r1, #0 802865a: f7fe f8b7 bl 80267cc sprintf(str_date, "%02i-%02i-%02i-01-", tmp_data.date, tmp_data.month, tmp_data.year); 802865e: f89d 1025 ldrb.w r1, [sp, #37] ; 0x25 8028662: f89d 3024 ldrb.w r3, [sp, #36] ; 0x24 8028666: f89d 2023 ldrb.w r2, [sp, #35] ; 0x23 802866a: 9100 str r1, [sp, #0] 802866c: a803 add r0, sp, #12 802866e: 490a ldr r1, [pc, #40] ; (8028698 ) 8028670: f7ff fa56 bl 8027b20 len = strlen(str_date); 8028674: a803 add r0, sp, #12 8028676: f7f9 fd6b bl 8022150 strncat(str_data, str_date, len); 802867a: a903 add r1, sp, #12 802867c: b2c2 uxtb r2, r0 802867e: a80b add r0, sp, #44 ; 0x2c 8028680: f7f9 fd96 bl 80221b0 strncat(str_data, str, 5); 8028684: a80b add r0, sp, #44 ; 0x2c 8028686: 4621 mov r1, r4 8028688: 2205 movs r2, #5 802868a: f7f9 fd91 bl 80221b0 //TM_RTC_SetDateTimeString(&str_data); TM_RTC_SetDateTimeString(str_data); 802868e: a80b add r0, sp, #44 ; 0x2c 8028690: f7fd ff82 bl 8026598 } 8028694: b010 add sp, #64 ; 0x40 8028696: bd10 pop {r4, pc} 8028698: 080389ba .word 0x080389ba 0802869c : /** * @brief СоÑтоÑние SNTP */ void SetSntpStateStr(char *str) { 802869c: b538 push {r3, r4, r5, lr} bool old_sntpEnable = sSettings.sSNTP.sntpEnable; 802869e: 4c0d ldr r4, [pc, #52] ; (80286d4 ) if (strncmp(str, "1", 1) == 0){ 80286a0: 490d ldr r1, [pc, #52] ; (80286d8 ) /** * @brief СоÑтоÑние SNTP */ void SetSntpStateStr(char *str) { bool old_sntpEnable = sSettings.sSNTP.sntpEnable; 80286a2: f894 5340 ldrb.w r5, [r4, #832] ; 0x340 if (strncmp(str, "1", 1) == 0){ 80286a6: 2201 movs r2, #1 80286a8: f7f9 fdb4 bl 8022214 80286ac: b948 cbnz r0, 80286c2 sSettings.sSNTP.sntpEnable = true; 80286ae: 2001 movs r0, #1 80286b0: f884 0340 strb.w r0, [r4, #832] ; 0x340 if(old_sntpEnable != sSettings.sSNTP.sntpEnable){ 80286b4: b965 cbnz r5, 80286d0 SNTP_Enable(sSettings.sSNTP.sntpEnable); 80286b6: f00f f8db bl 8037870 } else{ sSettings.sSNTP.sntpEnable = false; SNTP_Enable(sSettings.sSNTP.sntpEnable); } } 80286ba: 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(); 80286be: f00f b919 b.w 80378f4 } } else{ sSettings.sSNTP.sntpEnable = false; 80286c2: 2000 movs r0, #0 80286c4: f884 0340 strb.w r0, [r4, #832] ; 0x340 SNTP_Enable(sSettings.sSNTP.sntpEnable); } } 80286c8: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} SNTP_Poll(); } } else{ sSettings.sSNTP.sntpEnable = false; SNTP_Enable(sSettings.sSNTP.sntpEnable); 80286cc: f00f b8d0 b.w 8037870 80286d0: bd38 pop {r3, r4, r5, pc} 80286d2: bf00 nop 80286d4: 2000cba0 .word 0x2000cba0 80286d8: 08038c9e .word 0x08038c9e 080286dc : /** * @brief IP Ð°Ð´Ñ€ÐµÑ SNTP Ñервера */ void SetSntpServerIpStr(char *str) { 80286dc: 4601 mov r1, r0 strcpy(sSettings.sSNTP.ip, str); 80286de: 4801 ldr r0, [pc, #4] ; (80286e4 ) 80286e0: f7f9 bcd8 b.w 8022094 80286e4: 2000cee1 .word 0x2000cee1 080286e8 : /** * @brief ЧаÑовой поÑÑ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»Ð»ÐµÑ€Ð° */ void SetSntpTimeZoneStr(char *str) { 80286e8: b570 push {r4, r5, r6, lr} float newUtc; newUtc = atof(str); 80286ea: f7f9 fa35 bl 8021b58 80286ee: f7f8 fa49 bl 8020b84 <__aeabi_d2f> if (sSettings.sSNTP.timeZone > 0) 80286f2: 4b27 ldr r3, [pc, #156] ; (8028790 ) 80286f4: f8d3 4370 ldr.w r4, [r3, #880] ; 0x370 */ void SetSntpTimeZoneStr(char *str) { float newUtc; newUtc = atof(str); 80286f8: 4606 mov r6, r0 if (sSettings.sSNTP.timeZone > 0) 80286fa: 2100 movs r1, #0 80286fc: 4620 mov r0, r4 80286fe: f7f8 fd5b bl 80211b8 <__aeabi_fcmpgt> 8028702: b100 cbz r0, 8028706 8028704: e033 b.n 802876e { TM_RTC_Correction(newUtc - sSettings.sSNTP.timeZone); } } else if (sSettings.sSNTP.timeZone < 0) 8028706: 4620 mov r0, r4 8028708: 2100 movs r1, #0 802870a: f7f8 fd37 bl 802117c <__aeabi_fcmplt> 802870e: 2800 cmp r0, #0 8028710: d032 beq.n 8028778 { if (newUtc >= 0) 8028712: 4630 mov r0, r6 8028714: 2100 movs r1, #0 8028716: f7f8 fd45 bl 80211a4 <__aeabi_fcmpge> 802871a: b170 cbz r0, 802873a { TM_RTC_Correction(newUtc + fabs(sSettings.sSNTP.timeZone)); 802871c: 4620 mov r0, r4 802871e: f7f7 fefb bl 8020518 <__aeabi_f2d> 8028722: f7fc feff bl 8025524 8028726: 4604 mov r4, r0 8028728: 460d mov r5, r1 802872a: 4630 mov r0, r6 802872c: f7f7 fef4 bl 8020518 <__aeabi_f2d> 8028730: 4622 mov r2, r4 8028732: 462b mov r3, r5 8028734: f7f7 fd92 bl 802025c <__adddf3> 8028738: e016 b.n 8028768 } else { if (newUtc >= sSettings.sSNTP.timeZone) 802873a: 4630 mov r0, r6 802873c: 4621 mov r1, r4 802873e: f7f8 fd31 bl 80211a4 <__aeabi_fcmpge> 8028742: b1a0 cbz r0, 802876e TM_RTC_Correction(fabs(sSettings.sSNTP.timeZone) - fabs(newUtc)); 8028744: 4620 mov r0, r4 8028746: f7f7 fee7 bl 8020518 <__aeabi_f2d> 802874a: f7fc feeb bl 8025524 802874e: 4604 mov r4, r0 8028750: 4630 mov r0, r6 8028752: 460d mov r5, r1 8028754: f7f7 fee0 bl 8020518 <__aeabi_f2d> 8028758: f7fc fee4 bl 8025524 802875c: 4602 mov r2, r0 802875e: 460b mov r3, r1 8028760: 4620 mov r0, r4 8028762: 4629 mov r1, r5 8028764: f7f7 fd78 bl 8020258 <__aeabi_dsub> 8028768: f7f8 fa0c bl 8020b84 <__aeabi_d2f> 802876c: e00a b.n 8028784 else TM_RTC_Correction(newUtc - sSettings.sSNTP.timeZone); 802876e: 4630 mov r0, r6 8028770: 4621 mov r1, r4 8028772: f7f8 fa5b bl 8020c2c <__aeabi_fsub> 8028776: e005 b.n 8028784 } } else if (sSettings.sSNTP.timeZone == 0) 8028778: 4620 mov r0, r4 802877a: 2100 movs r1, #0 802877c: f7f8 fcf4 bl 8021168 <__aeabi_fcmpeq> 8028780: b110 cbz r0, 8028788 { TM_RTC_Correction(newUtc); 8028782: 4630 mov r0, r6 8028784: f7fe f920 bl 80269c8 } sSettings.sSNTP.timeZone = newUtc; // atof(str); 8028788: 4b01 ldr r3, [pc, #4] ; (8028790 ) 802878a: f8c3 6370 str.w r6, [r3, #880] ; 0x370 802878e: bd70 pop {r4, r5, r6, pc} 8028790: 2000cba0 .word 0x2000cba0 08028794 : /** * @brief Тип дейÑтвий при Ñрабатывание Ñухих контактов */ void SetDINTypeActStr(char *str, uint8_t num) { 8028794: b510 push {r4, lr} 8028796: 460c mov r4, r1 sSettings.sInOuts.din_type_act[num] = atoi(str); 8028798: f7f9 f9e2 bl 8021b60 802879c: 4902 ldr r1, [pc, #8] ; (80287a8 ) 802879e: 1909 adds r1, r1, r4 80287a0: f881 0376 strb.w r0, [r1, #886] ; 0x376 80287a4: bd10 pop {r4, pc} 80287a6: bf00 nop 80287a8: 2000cba0 .word 0x2000cba0 080287ac : /** * @brief */ void SetROStr(char *str, uint8_t num) { 80287ac: b510 push {r4, lr} 80287ae: 460c mov r4, r1 set_state_douts((DOUT1+num), atoi(str)); 80287b0: f7f9 f9d6 bl 8021b60 80287b4: 1de3 adds r3, r4, #7 80287b6: b2c1 uxtb r1, r0 80287b8: b2d8 uxtb r0, r3 } 80287ba: e8bd 4010 ldmia.w sp!, {r4, lr} /** * @brief */ void SetROStr(char *str, uint8_t num) { set_state_douts((DOUT1+num), atoi(str)); 80287be: f000 bb72 b.w 8028ea6 080287c2 : /** * @brief */ void SetROInt(uint8_t val, uint8_t num) { 80287c2: 4603 mov r3, r0 set_state_douts((DOUT1+num), val); 80287c4: 3107 adds r1, #7 80287c6: b2c8 uxtb r0, r1 80287c8: 4619 mov r1, r3 80287ca: f000 bb6c b.w 8028ea6 80287ce: 0000 movs r0, r0 080287d0 : /** * @brief ИÑточник ÑÑ€Ð°Ð±Ð°Ñ‚Ñ‹Ð²Ð°Ð½Ð¸Ñ Ñ€ÐµÐ»Ðµ */ void SetROTypeActStr(char *str, uint8_t num) { 80287d0: b510 push {r4, lr} 80287d2: 460c mov r4, r1 sSettings.sInOuts.ro_type_source[num] = atoi(str); 80287d4: f7f9 f9c4 bl 8021b60 80287d8: 4b04 ldr r3, [pc, #16] ; (80287ec ) 80287da: 191b adds r3, r3, r4 SetROInt(0, num); 80287dc: 4621 mov r1, r4 /** * @brief ИÑточник ÑÑ€Ð°Ð±Ð°Ñ‚Ñ‹Ð²Ð°Ð½Ð¸Ñ Ñ€ÐµÐ»Ðµ */ void SetROTypeActStr(char *str, uint8_t num) { sSettings.sInOuts.ro_type_source[num] = atoi(str); 80287de: f883 0374 strb.w r0, [r3, #884] ; 0x374 SetROInt(0, num); 80287e2: 2000 movs r0, #0 } 80287e4: 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); 80287e8: f7ff bfeb b.w 80287c2 80287ec: 2000cba0 .word 0x2000cba0 080287f0 : /** * @brief УÑтановить параметры Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ ÐŸÐž по умолчанию */ void SETTINGS_SetBootParamsDef(void) { sSettings.bootParams.loadMode = 0; 80287f0: 4b02 ldr r3, [pc, #8] ; (80287fc ) 80287f2: 2200 movs r2, #0 80287f4: 701a strb r2, [r3, #0] sSettings.bootParams.bootTry = 0; 80287f6: 705a strb r2, [r3, #1] 80287f8: 4770 bx lr 80287fa: bf00 nop 80287fc: 2000cba0 .word 0x2000cba0 08028800 : /** * @brief УÑтановить параметры Ñетевого Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ð¿Ð¾ умолчанию */ void SETTINGS_SetWebParamsDef(void) { 8028800: b510 push {r4, lr} strcpy(sSettings.sWebParams.ip, "192.168.1.8"); 8028802: 4c09 ldr r4, [pc, #36] ; (8028828 ) 8028804: 4909 ldr r1, [pc, #36] ; (802882c ) 8028806: 4620 mov r0, r4 8028808: f7f9 fc44 bl 8022094 strcpy(sSettings.sWebParams.gate, "192.168.1.1"); 802880c: 4908 ldr r1, [pc, #32] ; (8028830 ) 802880e: f104 0010 add.w r0, r4, #16 8028812: f7f9 fc3f bl 8022094 strcpy(sSettings.sWebParams.mask, "255.255.255.0"); 8028816: f104 0020 add.w r0, r4, #32 802881a: 4906 ldr r1, [pc, #24] ; (8028834 ) 802881c: f7f9 fc3a bl 8022094 sSettings.sWebParams.dhcpEnable = 1; 8028820: 2201 movs r2, #1 8028822: f884 2030 strb.w r2, [r4, #48] ; 0x30 8028826: bd10 pop {r4, pc} 8028828: 2000cba2 .word 0x2000cba2 802882c: 080389cd .word 0x080389cd 8028830: 080389d9 .word 0x080389d9 8028834: 080389e5 .word 0x080389e5 08028838 : /** * @brief УÑтановить временные параметры Ñетевого Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ð¿Ð¾ умолчанию */ void SETTINGS_SetTempWebParamsDef(void) { 8028838: b510 push {r4, lr} strcpy(sSettings.sWebParams.ip, "192.168.1.2"); 802883a: 4c09 ldr r4, [pc, #36] ; (8028860 ) 802883c: 4909 ldr r1, [pc, #36] ; (8028864 ) 802883e: 4620 mov r0, r4 8028840: f7f9 fc28 bl 8022094 strcpy(sSettings.sWebParams.gate, "192.168.1.1"); 8028844: 4908 ldr r1, [pc, #32] ; (8028868 ) 8028846: f104 0010 add.w r0, r4, #16 802884a: f7f9 fc23 bl 8022094 strcpy(sSettings.sWebParams.mask, "255.255.255.0"); 802884e: f104 0020 add.w r0, r4, #32 8028852: 4906 ldr r1, [pc, #24] ; (802886c ) 8028854: f7f9 fc1e bl 8022094 sSettings.sWebParams.dhcpEnable = 1; 8028858: 2201 movs r2, #1 802885a: f884 2030 strb.w r2, [r4, #48] ; 0x30 802885e: bd10 pop {r4, pc} 8028860: 2000cba2 .word 0x2000cba2 8028864: 080389f3 .word 0x080389f3 8028868: 080389d9 .word 0x080389d9 802886c: 080389e5 .word 0x080389e5 08028870 : /** * @brief УÑтановить параметры SNMP по умолчанию */ void SETTINGS_SetSnmpDef(void) { 8028870: b570 push {r4, r5, r6, lr} strcpy(sSettings.sSnmp.sysDescr, ""); 8028872: 4c1e ldr r4, [pc, #120] ; (80288ec ) 8028874: 4d1e ldr r5, [pc, #120] ; (80288f0 ) strcpy(sSettings.sSnmp.readCommunity, "public"); 8028876: 4e1f ldr r6, [pc, #124] ; (80288f4 ) /** * @brief УÑтановить параметры SNMP по умолчанию */ void SETTINGS_SetSnmpDef(void) { strcpy(sSettings.sSnmp.sysDescr, ""); 8028878: 4629 mov r1, r5 802887a: 4620 mov r0, r4 802887c: f7f9 fc0a bl 8022094 strcpy(sSettings.sSnmp.readCommunity, "public"); 8028880: 4631 mov r1, r6 8028882: f104 00a0 add.w r0, r4, #160 ; 0xa0 8028886: f7f9 fc05 bl 8022094 strcpy(sSettings.sSnmp.writeCommunity, "public"); 802888a: 4631 mov r1, r6 802888c: f104 00b4 add.w r0, r4, #180 ; 0xb4 8028890: f7f9 fc00 bl 8022094 strcpy(sSettings.sSnmp.sysContact, ""); 8028894: 4629 mov r1, r5 8028896: f104 00c8 add.w r0, r4, #200 ; 0xc8 802889a: f7f9 fbfb bl 8022094 strcpy(sSettings.sSnmp.sysName, "BT6702"); 802889e: f104 00fa add.w r0, r4, #250 ; 0xfa 80288a2: 4915 ldr r1, [pc, #84] ; (80288f8 ) 80288a4: f7f9 fbf6 bl 8022094 strcpy(sSettings.sSnmp.sysLocation, ""); 80288a8: 4629 mov r1, r5 strcpy(sSettings.sSnmp.managerIP, "0.0.0.0"); 80288aa: 4d14 ldr r5, [pc, #80] ; (80288fc ) strcpy(sSettings.sSnmp.sysDescr, ""); strcpy(sSettings.sSnmp.readCommunity, "public"); strcpy(sSettings.sSnmp.writeCommunity, "public"); strcpy(sSettings.sSnmp.sysContact, ""); strcpy(sSettings.sSnmp.sysName, "BT6702"); strcpy(sSettings.sSnmp.sysLocation, ""); 80288ac: f504 7087 add.w r0, r4, #270 ; 0x10e 80288b0: f7f9 fbf0 bl 8022094 strcpy(sSettings.sSnmp.managerIP, "0.0.0.0"); 80288b4: 4629 mov r1, r5 80288b6: f504 70be add.w r0, r4, #380 ; 0x17c 80288ba: f7f9 fbeb bl 8022094 strcpy(sSettings.sSnmp.managerIP2, "0.0.0.0"); 80288be: 4629 mov r1, r5 80288c0: f504 70c8 add.w r0, r4, #400 ; 0x190 80288c4: f7f9 fbe6 bl 8022094 strcpy(sSettings.sSnmp.managerIP3, "0.0.0.0"); 80288c8: 4629 mov r1, r5 80288ca: f504 70d2 add.w r0, r4, #420 ; 0x1a4 80288ce: f7f9 fbe1 bl 8022094 strcpy(sSettings.sSnmp.managerIP4, "0.0.0.0"); 80288d2: 4629 mov r1, r5 80288d4: f504 70dc add.w r0, r4, #440 ; 0x1b8 80288d8: f7f9 fbdc bl 8022094 strcpy(sSettings.sSnmp.managerIP5, "0.0.0.0"); 80288dc: f504 70e6 add.w r0, r4, #460 ; 0x1cc 80288e0: 4629 mov r1, r5 } 80288e2: 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"); 80288e6: f7f9 bbd5 b.w 8022094 80288ea: bf00 nop 80288ec: 2000ccd1 .word 0x2000ccd1 80288f0: 08042b4c .word 0x08042b4c 80288f4: 080389ff .word 0x080389ff 80288f8: 08038a06 .word 0x08038a06 80288fc: 08038a0d .word 0x08038a0d 08028900 : /** * @brief УÑтановить Информацию об уÑтройÑтве по умолчанию */ void SETTINGS_SetInfoDef(void) { 8028900: b510 push {r4, lr} strcpy(sSettings.sInfo.productionData, "09.10.2015"); 8028902: 4c0b ldr r4, [pc, #44] ; (8028930 ) 8028904: 490b ldr r1, [pc, #44] ; (8028934 ) 8028906: 4620 mov r0, r4 8028908: f7f9 fbc4 bl 8022094 strcpy(sSettings.sInfo.mac, DEVICE_MAC); 802890c: f104 0028 add.w r0, r4, #40 ; 0x28 8028910: 4909 ldr r1, [pc, #36] ; (8028938 ) 8028912: f7f9 fbbf bl 8022094 strcpy(sSettings.sInfo.serialNumber, SERIAL); 8028916: f104 003a add.w r0, r4, #58 ; 0x3a 802891a: 4908 ldr r1, [pc, #32] ; (802893c ) 802891c: f7f9 fbba bl 8022094 strcpy(sSettings.sInfo.comments, ""); 8028920: 4907 ldr r1, [pc, #28] ; (8028940 ) 8028922: f104 004a add.w r0, r4, #74 ; 0x4a } 8028926: 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, ""); 802892a: f7f9 bbb3 b.w 8022094 802892e: bf00 nop 8028930: 2000cc04 .word 0x2000cc04 8028934: 08038a15 .word 0x08038a15 8028938: 08038a20 .word 0x08038a20 802893c: 08038a32 .word 0x08038a32 8028940: 08042b4c .word 0x08042b4c 08028944 : /** * @brief УÑтановить значение ÑервиÑных наÑтроек по умолчанию */ void SETTINGS_SetServiceDef(void) { 8028944: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8028948: 4d14 ldr r5, [pc, #80] ; (802899c ) 802894a: 2400 movs r4, #0 } /** * @brief УÑтановить значение ÑервиÑных наÑтроек по умолчанию */ void SETTINGS_SetServiceDef(void) 802894c: 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; 802894e: 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) { 8028952: f014 03ff ands.w r3, r4, #255 ; 0xff 8028956: d108 bne.n 802896a /* 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"); 8028958: 4911 ldr r1, [pc, #68] ; (80289a0 ) 802895a: 4812 ldr r0, [pc, #72] ; (80289a4 ) 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; 802895c: f885 3311 strb.w r3, [r5, #785] ; 0x311 strcpy(sSettings.sAuth[user_id].login, "admin"); 8028960: f7f9 fb98 bl 8022094 strcpy(sSettings.sAuth[user_id].password, "12345"); 8028964: 4810 ldr r0, [pc, #64] ; (80289a8 ) 8028966: 4911 ldr r1, [pc, #68] ; (80289ac ) 8028968: e010 b.n 802898c } /** * @brief УÑтановить значение ÑервиÑных наÑтроек по умолчанию */ void SETTINGS_SetServiceDef(void) 802896a: fb07 f604 mul.w r6, r7, r4 802896e: 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"); 8028970: f506 7044 add.w r0, r6, #784 ; 0x310 8028974: 1828 adds r0, r5, r0 8028976: 490e ldr r1, [pc, #56] ; (80289b0 ) strcpy(sSettings.sAuth[user_id].login, "admin"); strcpy(sSettings.sAuth[user_id].password, "12345"); break; case 1: default: sSettings.sAuth[user_id].level = USER; 8028978: f883 8311 strb.w r8, [r3, #785] ; 0x311 strcpy(sSettings.sAuth[user_id].login, "user"); 802897c: 3002 adds r0, #2 strcpy(sSettings.sAuth[user_id].password, "1234"); 802897e: 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"); 8028982: f7f9 fb87 bl 8022094 strcpy(sSettings.sAuth[user_id].password, "1234"); 8028986: 19a8 adds r0, r5, r6 8028988: 490a ldr r1, [pc, #40] ; (80289b4 ) 802898a: 3005 adds r0, #5 802898c: 3401 adds r4, #1 802898e: f7f9 fb81 bl 8022094 */ void SETTINGS_SetServiceDef(void) { uint8_t user_id; for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { 8028992: 2c02 cmp r4, #2 8028994: d1dd bne.n 8028952 strcpy(sSettings.sAuth[user_id].login, "user"); strcpy(sSettings.sAuth[user_id].password, "1234"); break; } } } 8028996: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802899a: bf00 nop 802899c: 2000cba0 .word 0x2000cba0 80289a0: 08038a3e .word 0x08038a3e 80289a4: 2000ceb2 .word 0x2000ceb2 80289a8: 2000cebd .word 0x2000cebd 80289ac: 08038a44 .word 0x08038a44 80289b0: 08038a4a .word 0x08038a4a 80289b4: 08038a4f .word 0x08038a4f 080289b8 : /** * @brief УÑтановить параметры SNTP по умолчанию */ void SETTINGS_SetSntpDef(void) { 80289b8: b510 push {r4, lr} sSettings.sSNTP.sntpEnable = true; 80289ba: 4c08 ldr r4, [pc, #32] ; (80289dc ) strcpy(sSettings.sSNTP.ip, "88.147.254.235"); 80289bc: 4908 ldr r1, [pc, #32] ; (80289e0 ) 80289be: 4809 ldr r0, [pc, #36] ; (80289e4 ) /** * @brief УÑтановить параметры SNTP по умолчанию */ void SETTINGS_SetSntpDef(void) { sSettings.sSNTP.sntpEnable = true; 80289c0: 2301 movs r3, #1 80289c2: f884 3340 strb.w r3, [r4, #832] ; 0x340 strcpy(sSettings.sSNTP.ip, "88.147.254.235"); 80289c6: f7f9 fb65 bl 8022094 sSettings.sSNTP.timeZone = 3.0; 80289ca: 4b07 ldr r3, [pc, #28] ; (80289e8 ) strcpy(sSettings.sSNTP.data, "none"); 80289cc: 4807 ldr r0, [pc, #28] ; (80289ec ) 80289ce: 4908 ldr r1, [pc, #32] ; (80289f0 ) */ void SETTINGS_SetSntpDef(void) { sSettings.sSNTP.sntpEnable = true; strcpy(sSettings.sSNTP.ip, "88.147.254.235"); sSettings.sSNTP.timeZone = 3.0; 80289d0: f8c4 3370 str.w r3, [r4, #880] ; 0x370 strcpy(sSettings.sSNTP.data, "none"); } 80289d4: 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"); 80289d8: f7f9 bb5c b.w 8022094 80289dc: 2000cba0 .word 0x2000cba0 80289e0: 08038a54 .word 0x08038a54 80289e4: 2000cee1 .word 0x2000cee1 80289e8: 40400000 .word 0x40400000 80289ec: 2000cef1 .word 0x2000cef1 80289f0: 08038a63 .word 0x08038a63 080289f4 : /** * @brief УÑтановить параметры наÑтроек Ñухих контактов / реле по умолчанию */ void SETTINGS_SetINOUTSDef(void) { sSettings.sInOuts.ro_type_source[0] = CRITICAL; 80289f4: 4b05 ldr r3, [pc, #20] ; (8028a0c ) 80289f6: 2201 movs r2, #1 80289f8: f883 2374 strb.w r2, [r3, #884] ; 0x374 sSettings.sInOuts.ro_type_source[1] = SNMP_SET; 80289fc: 2203 movs r2, #3 80289fe: f883 2375 strb.w r2, [r3, #885] ; 0x375 sSettings.sInOuts.din_type_act[0] = SNMP_TRAP; 8028a02: 2202 movs r2, #2 8028a04: f883 2376 strb.w r2, [r3, #886] ; 0x376 8028a08: 4770 bx lr 8028a0a: bf00 nop 8028a0c: 2000cba0 .word 0x2000cba0 08028a10 : /** * @brief УÑтановить параметры RADIUS по умолчанию */ void SETTINGS_SetRADIUSDef(void) { 8028a10: b510 push {r4, lr} sSettings.sRADIUS.Auth_enable = true; 8028a12: 4c0b ldr r4, [pc, #44] ; (8028a40 ) sSettings.sRADIUS.RDSEnable = true; strcpy(sSettings.sRADIUS.ServerIP, "127.0.0.1"); 8028a14: 490b ldr r1, [pc, #44] ; (8028a44 ) 8028a16: 480c ldr r0, [pc, #48] ; (8028a48 ) /** * @brief УÑтановить параметры RADIUS по умолчанию */ void SETTINGS_SetRADIUSDef(void) { sSettings.sRADIUS.Auth_enable = true; 8028a18: 2301 movs r3, #1 8028a1a: f884 3378 strb.w r3, [r4, #888] ; 0x378 sSettings.sRADIUS.RDSEnable = true; 8028a1e: f884 339a strb.w r3, [r4, #922] ; 0x39a strcpy(sSettings.sRADIUS.ServerIP, "127.0.0.1"); 8028a22: f7f9 fb37 bl 8022094 sSettings.sRADIUS.port = 1227; 8028a26: f240 43cb movw r3, #1227 ; 0x4cb sSettings.sRADIUS.key_access = 123; strcpy(sSettings.sRADIUS.rds_password, "12345"); 8028a2a: 4808 ldr r0, [pc, #32] ; (8028a4c ) 8028a2c: 4908 ldr r1, [pc, #32] ; (8028a50 ) 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; 8028a2e: f8c4 339c str.w r3, [r4, #924] ; 0x39c sSettings.sRADIUS.key_access = 123; 8028a32: 237b movs r3, #123 ; 0x7b 8028a34: f8c4 33a0 str.w r3, [r4, #928] ; 0x3a0 strcpy(sSettings.sRADIUS.rds_password, "12345"); } 8028a38: 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"); 8028a3c: f7f9 bb2a b.w 8022094 8028a40: 2000cba0 .word 0x2000cba0 8028a44: 08038a68 .word 0x08038a68 8028a48: 2000cf19 .word 0x2000cf19 8028a4c: 2000cf29 .word 0x2000cf29 8028a50: 08038a44 .word 0x08038a44 08028a54 : */ void SETTINGS_ReadFromFlash(uint8_t *data, uint32_t size) { uint32_t baseAddress = SETTINGS_SECTOR; for (uint32_t i = 0; i < size; i++) 8028a54: 2300 movs r3, #0 8028a56: e006 b.n 8028a66 *data++ = (*(uint32_t*)baseAddress++);; 8028a58: f103 6200 add.w r2, r3, #134217728 ; 0x8000000 8028a5c: f502 4280 add.w r2, r2, #16384 ; 0x4000 8028a60: 6812 ldr r2, [r2, #0] 8028a62: 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++) 8028a64: 3301 adds r3, #1 8028a66: 428b cmp r3, r1 8028a68: d1f6 bne.n 8028a58 *data++ = (*(uint32_t*)baseAddress++);; } 8028a6a: 4770 bx lr 08028a6c : */ void SETTINGS_EraseFlashSector(void) { FLASH_Status status; if ((status = FLASH_EraseSector(FLASH_Sector_1, VoltageRange_3)) != FLASH_COMPLETE) { 8028a6c: 2008 movs r0, #8 8028a6e: 2102 movs r1, #2 8028a70: f7fc be3a b.w 80256e8 08028a74 : /** * @brief * @retval */ uint32_t SETTINGS_GetCRC(void) { 8028a74: b508 push {r3, lr} CRC_ResetDR(); 8028a76: f7fc fda1 bl 80255bc return CRC_CalcBlockCRC((uint32_t*)&sSettings, sizeof(sSettings)/4 - 1); 8028a7a: 4803 ldr r0, [pc, #12] ; (8028a88 ) 8028a7c: 21e9 movs r1, #233 ; 0xe9 } 8028a7e: 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); 8028a82: f7fc bda1 b.w 80255c8 8028a86: bf00 nop 8028a88: 2000cba0 .word 0x2000cba0 08028a8c : /** * @brief */ void SETTINGS_WriteToFlash(uint8_t *data, uint32_t size) { 8028a8c: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8028a90: 4606 mov r6, r0 8028a92: 468a mov sl, r1 uint32_t baseAddress = SETTINGS_SECTOR; uint32_t checkCrc = 0; uint32_t crc = SETTINGS_GetCRC(); 8028a94: f7ff ffee bl 8028a74 /** * @brief */ void SETTINGS_WriteToFlash(uint8_t *data, uint32_t size) { uint32_t baseAddress = SETTINGS_SECTOR; 8028a98: 4c17 ldr r4, [pc, #92] ; (8028af8 ) uint32_t checkCrc = 0; uint32_t crc = SETTINGS_GetCRC(); 8028a9a: 4680 mov r8, r0 8028a9c: 2703 movs r7, #3 FLASH_Status status; for (uint8_t i = 0; i < 3; i++) { fAlarm = 0; FLASH_Unlock(); 8028a9e: f7fc fda3 bl 80255e8 8028aa2: 4635 mov r5, r6 SETTINGS_EraseFlashSector(); 8028aa4: f7ff ffe2 bl 8028a6c } /** * @brief */ void SETTINGS_WriteToFlash(uint8_t *data, uint32_t size) 8028aa8: eb04 0b0a add.w fp, r4, sl fAlarm = 0; FLASH_Unlock(); SETTINGS_EraseFlashSector(); for (uint32_t i = 0; i < size; i++) 8028aac: e00a b.n 8028ac4 if ((status = FLASH_ProgramByte(baseAddress++, *data++)) != FLASH_COMPLETE) { 8028aae: f815 1b01 ldrb.w r1, [r5], #1 8028ab2: 4620 mov r0, r4 8028ab4: f7fc fdde bl 8025674 8028ab8: f104 0901 add.w r9, r4, #1 8028abc: 2808 cmp r0, #8 8028abe: 462e mov r6, r5 8028ac0: 464c mov r4, r9 8028ac2: d102 bne.n 8028aca fAlarm = 0; FLASH_Unlock(); SETTINGS_EraseFlashSector(); for (uint32_t i = 0; i < size; i++) 8028ac4: 455c cmp r4, fp 8028ac6: 462e mov r6, r5 8028ac8: d1f1 bne.n 8028aae 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) { 8028aca: 4641 mov r1, r8 8028acc: 480b ldr r0, [pc, #44] ; (8028afc ) 8028ace: f7fc fded bl 80256ac DBG printf("FLASH_ProgramWord error: status = %d\r\n", status); } FLASH_Lock(); 8028ad2: f7fc fd97 bl 8025604 /* Считываем что запиÑали */ SETTINGS_ReadFromFlash((uint8_t*)&sSettings, sizeof(sSettings)); 8028ad6: 480a ldr r0, [pc, #40] ; (8028b00 ) 8028ad8: f44f 716a mov.w r1, #936 ; 0x3a8 8028adc: f7ff ffba bl 8028a54 checkCrc = SETTINGS_GetCRC(); 8028ae0: f7ff ffc8 bl 8028a74 /* ПроверÑем CRC того что было запиÑано */ if (checkCrc == crc) 8028ae4: 4540 cmp r0, r8 8028ae6: d004 beq.n 8028af2 8028ae8: 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++) 8028aea: f017 07ff ands.w r7, r7, #255 ; 0xff 8028aee: d1d6 bne.n 8028a9e 8028af0: e7fe b.n 8028af0 8028af2: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8028af6: bf00 nop 8028af8: 08004000 .word 0x08004000 8028afc: 08005f9c .word 0x08005f9c 8028b00: 2000cba0 .word 0x2000cba0 08028b04 : /** * @brief * @retval */ uint32_t SETTINGS_GetCritSecCRC(void) { 8028b04: b508 push {r3, lr} CRC_ResetDR(); 8028b06: f7fc fd59 bl 80255bc uint32_t critsec_len = (uint32_t)((uint8_t *)(&sSettings.CritSecCRC) - (uint8_t *)&sSettings) / 4; return CRC_CalcBlockCRC((uint32_t *)&sSettings, critsec_len); 8028b0a: 4803 ldr r0, [pc, #12] ; (8028b18 ) 8028b0c: 2147 movs r1, #71 ; 0x47 } 8028b0e: 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); 8028b12: f7fc bd59 b.w 80255c8 8028b16: bf00 nop 8028b18: 2000cba0 .word 0x2000cba0 08028b1c : /** * @brief ЗапиÑÑŒ Ñтруктуры наÑтроек во flesh */ void SETTINGS_Save(void) { 8028b1c: b508 push {r3, lr} /* Calc critical section CRC and store to the settings structure */ sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028b1e: f7ff fff1 bl 8028b04 8028b22: 4b05 ldr r3, [pc, #20] ; (8028b38 ) SETTINGS_WriteToFlash((uint8_t*)&sSettings, sizeof(sSettings)); 8028b24: 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(); 8028b28: f8c3 011c str.w r0, [r3, #284] ; 0x11c SETTINGS_WriteToFlash((uint8_t*)&sSettings, sizeof(sSettings)); 8028b2c: 4618 mov r0, r3 } 8028b2e: 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)); 8028b32: f7ff bfab b.w 8028a8c 8028b36: bf00 nop 8028b38: 2000cba0 .word 0x2000cba0 08028b3c : /** * @brief УÑтановка наÑтроек Ð´Ð»Ñ Ð¾Ñ‚Ð»Ð°Ð´ÐºÐ¸ */ void SETTINGS_SetDefaultDebug(void) { 8028b3c: b510 push {r4, lr} /** * @brief УÑтановить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8028b3e: 4c0d ldr r4, [pc, #52] ; (8028b74 ) /** * @brief УÑтановка наÑтроек Ð´Ð»Ñ Ð¾Ñ‚Ð»Ð°Ð´ÐºÐ¸ */ void SETTINGS_SetDefaultDebug(void) { SETTINGS_SetWebParamsDef(); 8028b40: f7ff fe5e bl 8028800 SETTINGS_SetTempWebParamsDef(); 8028b44: f7ff fe78 bl 8028838 SETTINGS_SetSnmpDef(); 8028b48: f7ff fe92 bl 8028870 SETTINGS_SetBootParamsDef(); 8028b4c: f7ff fe50 bl 80287f0 /** * @brief УÑтановить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8028b50: 2300 movs r3, #0 8028b52: f884 3120 strb.w r3, [r4, #288] ; 0x120 SETTINGS_SetTempWebParamsDef(); SETTINGS_SetSnmpDef(); SETTINGS_SetBootParamsDef(); SETTINGS_SetFlagsDef(); //SETTINGS_SetServiceDef(); SETTINGS_SetSntpDef(); 8028b56: f7ff ff2f bl 80289b8 SETTINGS_SetINOUTSDef(); 8028b5a: f7ff ff4b bl 80289f4 SETTINGS_SetRADIUSDef(); 8028b5e: f7ff ff57 bl 8028a10 //SETTINGS_SetInfoDef(); sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028b62: f7ff ffcf bl 8028b04 sSettings.controlWorld = SETTINGS_CONTROL_WORD; 8028b66: 4b04 ldr r3, [pc, #16] ; (8028b78 ) SETTINGS_SetSntpDef(); SETTINGS_SetINOUTSDef(); SETTINGS_SetRADIUSDef(); //SETTINGS_SetInfoDef(); sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028b68: f8c4 011c str.w r0, [r4, #284] ; 0x11c sSettings.controlWorld = SETTINGS_CONTROL_WORD; 8028b6c: f8c4 33a4 str.w r3, [r4, #932] ; 0x3a4 8028b70: bd10 pop {r4, pc} 8028b72: bf00 nop 8028b74: 2000cba0 .word 0x2000cba0 8028b78: 075bcd15 .word 0x075bcd15 08028b7c : /** * @brief Ð¡Ð±Ñ€Ð¾Ñ Ð²Ñех наÑтроек в Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¿Ð¾ умолчанию */ void SETTINGS_SetAllDefault(void) { 8028b7c: b510 push {r4, lr} /** * @brief УÑтановить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8028b7e: 4c0f ldr r4, [pc, #60] ; (8028bbc ) /** * @brief Ð¡Ð±Ñ€Ð¾Ñ Ð²Ñех наÑтроек в Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¿Ð¾ умолчанию */ void SETTINGS_SetAllDefault(void) { SETTINGS_SetBootParamsDef(); 8028b80: f7ff fe36 bl 80287f0 SETTINGS_SetWebParamsDef(); 8028b84: f7ff fe3c bl 8028800 SETTINGS_SetTempWebParamsDef(); 8028b88: f7ff fe56 bl 8028838 SETTINGS_SetSnmpDef(); 8028b8c: f7ff fe70 bl 8028870 SETTINGS_SetInfoDef(); 8028b90: f7ff feb6 bl 8028900 /** * @brief УÑтановить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8028b94: 2300 movs r3, #0 8028b96: f884 3120 strb.w r3, [r4, #288] ; 0x120 SETTINGS_SetWebParamsDef(); SETTINGS_SetTempWebParamsDef(); SETTINGS_SetSnmpDef(); SETTINGS_SetInfoDef(); SETTINGS_SetFlagsDef(); SETTINGS_SetServiceDef(); 8028b9a: f7ff fed3 bl 8028944 SETTINGS_SetSntpDef(); 8028b9e: f7ff ff0b bl 80289b8 SETTINGS_SetINOUTSDef(); 8028ba2: f7ff ff27 bl 80289f4 SETTINGS_SetRADIUSDef(); 8028ba6: f7ff ff33 bl 8028a10 sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028baa: f7ff ffab bl 8028b04 sSettings.controlWorld = SETTINGS_CONTROL_WORD; 8028bae: 4b04 ldr r3, [pc, #16] ; (8028bc0 ) SETTINGS_SetServiceDef(); SETTINGS_SetSntpDef(); SETTINGS_SetINOUTSDef(); SETTINGS_SetRADIUSDef(); sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028bb0: f8c4 011c str.w r0, [r4, #284] ; 0x11c sSettings.controlWorld = SETTINGS_CONTROL_WORD; 8028bb4: f8c4 33a4 str.w r3, [r4, #932] ; 0x3a4 8028bb8: bd10 pop {r4, pc} 8028bba: bf00 nop 8028bbc: 2000cba0 .word 0x2000cba0 8028bc0: 075bcd15 .word 0x075bcd15 08028bc4 : /** * @brief Загрузка Ñтруктуры наÑтроек из flesh */ void SETTINGS_Load(void) { 8028bc4: b510 push {r4, lr} uint32_t loadCRC; // CRC из flash uint32_t newCRC; // CRC загруженной Ñтруктуры наÑтроек SETTINGS_ReadFromFlash((uint8_t*)&sSettings, sizeof(sSettings)); 8028bc6: 4809 ldr r0, [pc, #36] ; (8028bec ) 8028bc8: f44f 716a mov.w r1, #936 ; 0x3a8 8028bcc: f7ff ff42 bl 8028a54 /* Считываем CRC из флеш памÑти */ loadCRC = (*(uint32_t*)CRC_ADDRESS); 8028bd0: 4b07 ldr r3, [pc, #28] ; (8028bf0 ) 8028bd2: 681c ldr r4, [r3, #0] /* РаÑÑчитываем CRC Ð´Ð»Ñ Ñтруктуры наÑтроек */ newCRC = SETTINGS_GetCRC(); 8028bd4: f7ff ff4e bl 8028a74 if (loadCRC != newCRC) { 8028bd8: 4284 cmp r4, r0 8028bda: d005 beq.n 8028be8 SETTINGS_SetAllDefault(); 8028bdc: f7ff ffce bl 8028b7c SETTINGS_Save(); } } 8028be0: e8bd 4010 ldmia.w sp!, {r4, lr} /* РаÑÑчитываем CRC Ð´Ð»Ñ Ñтруктуры наÑтроек */ newCRC = SETTINGS_GetCRC(); if (loadCRC != newCRC) { SETTINGS_SetAllDefault(); SETTINGS_Save(); 8028be4: f7ff bf9a b.w 8028b1c 8028be8: bd10 pop {r4, pc} 8028bea: bf00 nop 8028bec: 2000cba0 .word 0x2000cba0 8028bf0: 08005f9c .word 0x08005f9c 08028bf4 : /** * @brief Ð¡Ð±Ñ€Ð¾Ñ Ð²Ñех наÑтроек в Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¿Ð¾ умолчанию кроме Ñетевых наÑтроек */ void SETTINGS_SetPartDefault(void) { 8028bf4: b510 push {r4, lr} /** * @brief УÑтановить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8028bf6: 4c0b ldr r4, [pc, #44] ; (8028c24 ) /** * @brief Ð¡Ð±Ñ€Ð¾Ñ Ð²Ñех наÑтроек в Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¿Ð¾ умолчанию кроме Ñетевых наÑтроек */ void SETTINGS_SetPartDefault(void) { SETTINGS_SetBootParamsDef(); 8028bf8: f7ff fdfa bl 80287f0 SETTINGS_SetSnmpDef(); 8028bfc: f7ff fe38 bl 8028870 /** * @brief УÑтановить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8028c00: 2300 movs r3, #0 8028c02: f884 3120 strb.w r3, [r4, #288] ; 0x120 { SETTINGS_SetBootParamsDef(); SETTINGS_SetSnmpDef(); SETTINGS_SetFlagsDef(); // SETTINGS_SetServiceDef(); SETTINGS_SetSntpDef(); 8028c06: f7ff fed7 bl 80289b8 SETTINGS_SetINOUTSDef(); 8028c0a: f7ff fef3 bl 80289f4 SETTINGS_SetRADIUSDef(); 8028c0e: f7ff feff bl 8028a10 sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028c12: f7ff ff77 bl 8028b04 sSettings.controlWorld = SETTINGS_CONTROL_WORD; 8028c16: 4b04 ldr r3, [pc, #16] ; (8028c28 ) // SETTINGS_SetServiceDef(); SETTINGS_SetSntpDef(); SETTINGS_SetINOUTSDef(); SETTINGS_SetRADIUSDef(); sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028c18: f8c4 011c str.w r0, [r4, #284] ; 0x11c sSettings.controlWorld = SETTINGS_CONTROL_WORD; 8028c1c: f8c4 33a4 str.w r3, [r4, #932] ; 0x3a4 8028c20: bd10 pop {r4, pc} 8028c22: bf00 nop 8028c24: 2000cba0 .word 0x2000cba0 8028c28: 075bcd15 .word 0x075bcd15 08028c2c : /** * @brief Ð¡Ð±Ñ€Ð¾Ñ Ñ„Ð»Ð°Ð³Ð° boottry в региÑтре RTC */ void SETTINGS_ResetBootTry(void) { uint8_t bootTry = RTC_ReadBackupRegister(RTC_BKP_DR2); 8028c2c: 2002 movs r0, #2 /** * @brief Ð¡Ð±Ñ€Ð¾Ñ Ñ„Ð»Ð°Ð³Ð° boottry в региÑтре RTC */ void SETTINGS_ResetBootTry(void) { 8028c2e: b508 push {r3, lr} uint8_t bootTry = RTC_ReadBackupRegister(RTC_BKP_DR2); 8028c30: f7fd f8be bl 8025db0 if (bootTry > 0 ) 8028c34: f010 0fff tst.w r0, #255 ; 0xff 8028c38: d014 beq.n 8028c64 { bootTry = 0; RTC_WriteBackupRegister(RTC_BKP_DR2, 0); 8028c3a: 2002 movs r0, #2 8028c3c: 2100 movs r1, #0 8028c3e: f7fd f8a7 bl 8025d90 /* Check FW update flag */ if (RTC_ReadBackupRegister(RTC_BKP_DR3)) { 8028c42: 2003 movs r0, #3 8028c44: f7fd f8b4 bl 8025db0 8028c48: b160 cbz r0, 8028c64 /* Отправка трапа об уÑпешном обновлении ПО */ SNMP_SendUserTrap(FW_VERSION_UPDATED); 8028c4a: 2002 movs r0, #2 8028c4c: f00e fc80 bl 8037550 log_event_data(LOG_UPDATE_SOFT, "УÑпешно"); 8028c50: 2002 movs r0, #2 8028c52: 4905 ldr r1, [pc, #20] ; (8028c68 ) 8028c54: f001 f910 bl 8029e78 /* Clear FW update flag */ RTC_WriteBackupRegister(RTC_BKP_DR3, 0); 8028c58: 2003 movs r0, #3 8028c5a: 2100 movs r1, #0 //taskENTER_CRITICAL(); SETTINGS_Save(); //taskEXIT_CRITICAL(); } */ } 8028c5c: 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); 8028c60: f7fd b896 b.w 8025d90 8028c64: bd08 pop {r3, pc} 8028c66: bf00 nop 8028c68: 08038a72 .word 0x08038a72 08028c6c : /** * @brief Преобразует mac Ð°Ð´Ñ€ÐµÑ Ñтрокового формата в маÑÑив uint8_t * @param mac - буфер Ð´Ð»Ñ Ð²Ñ‹Ð²Ð¾Ð´Ð° mac адреÑа */ void SETTINGS_GetMac(uint8_t *mac) { 8028c6c: b573 push {r0, r1, r4, r5, r6, lr} #if defined ( __ICCARM__ ) macPtr = DEVICE_MAC; #endif for (uint8_t i = 0; i < 6; i++) { strncpy(dummy, macPtr+i*3, 2); 8028c6e: 4e0a ldr r6, [pc, #40] ; (8028c98 ) /** * @brief Преобразует mac Ð°Ð´Ñ€ÐµÑ Ñтрокового формата в маÑÑив uint8_t * @param mac - буфер Ð´Ð»Ñ Ð²Ñ‹Ð²Ð¾Ð´Ð° mac адреÑа */ void SETTINGS_GetMac(uint8_t *mac) 8028c70: 1e45 subs r5, r0, #1 8028c72: 2400 movs r4, #0 #if defined ( __ICCARM__ ) macPtr = DEVICE_MAC; #endif for (uint8_t i = 0; i < 6; i++) { strncpy(dummy, macPtr+i*3, 2); 8028c74: 1931 adds r1, r6, r4 8028c76: 318c adds r1, #140 ; 0x8c 8028c78: 2202 movs r2, #2 8028c7a: a801 add r0, sp, #4 8028c7c: f7f9 fb20 bl 80222c0 mac[i] = (uint8_t)strtol(dummy, NULL, 16); 8028c80: 2100 movs r1, #0 8028c82: 2210 movs r2, #16 8028c84: a801 add r0, sp, #4 8028c86: f7fa fe51 bl 802392c 8028c8a: 3403 adds r4, #3 char *macPtr = sSettings.sInfo.mac; #if defined ( __ICCARM__ ) macPtr = DEVICE_MAC; #endif for (uint8_t i = 0; i < 6; i++) 8028c8c: 2c12 cmp r4, #18 { strncpy(dummy, macPtr+i*3, 2); mac[i] = (uint8_t)strtol(dummy, NULL, 16); 8028c8e: f805 0f01 strb.w r0, [r5, #1]! char *macPtr = sSettings.sInfo.mac; #if defined ( __ICCARM__ ) macPtr = DEVICE_MAC; #endif for (uint8_t i = 0; i < 6; i++) 8028c92: d1ef bne.n 8028c74 { strncpy(dummy, macPtr+i*3, 2); mac[i] = (uint8_t)strtol(dummy, NULL, 16); } } 8028c94: bd7c pop {r2, r3, r4, r5, r6, pc} 8028c96: bf00 nop 8028c98: 2000cba0 .word 0x2000cba0 08028c9c : /** * @brief УÑтановить дату производÑтва */ void SETTINGS_SetProDate(char *proDate, uint8_t len) { 8028c9c: b570 push {r4, r5, r6, lr} memset(sSettings.sInfo.productionData, 0, 40); 8028c9e: 4c07 ldr r4, [pc, #28] ; (8028cbc ) /** * @brief УÑтановить дату производÑтва */ void SETTINGS_SetProDate(char *proDate, uint8_t len) { 8028ca0: 4606 mov r6, r0 8028ca2: 460d mov r5, r1 memset(sSettings.sInfo.productionData, 0, 40); 8028ca4: 2228 movs r2, #40 ; 0x28 8028ca6: 2100 movs r1, #0 8028ca8: 4620 mov r0, r4 8028caa: f7f9 f879 bl 8021da0 memcpy(sSettings.sInfo.productionData, proDate, len); 8028cae: 4620 mov r0, r4 8028cb0: 4631 mov r1, r6 8028cb2: 462a mov r2, r5 } 8028cb4: 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); 8028cb8: f7f8 bfb8 b.w 8021c2c 8028cbc: 2000cc04 .word 0x2000cc04 08028cc0 : /** * @brief * @retval */ void WDG_Init(void) { 8028cc0: b530 push {r4, r5, lr} // GPIO_InitTypeDef GPIO_InitStructure; NVIC_InitTypeDef NVIC_InitStructure; TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure; // RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOE, ENABLE); RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM13, ENABLE); 8028cc2: 2101 movs r1, #1 /** * @brief * @retval */ void WDG_Init(void) { 8028cc4: b085 sub sp, #20 // GPIO_InitTypeDef GPIO_InitStructure; NVIC_InitTypeDef NVIC_InitStructure; TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure; // RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOE, ENABLE); RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM13, ENABLE); 8028cc6: 2080 movs r0, #128 ; 0x80 8028cc8: f7fc fea8 bl 8025a1c GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL; GPIO_Init(GPIOE, &GPIO_InitStructure);*/ NVIC_InitStructure.NVIC_IRQChannel = TIM8_UP_TIM13_IRQn; 8028ccc: 232c movs r3, #44 ; 0x2c NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x6; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0; 8028cce: 2400 movs r4, #0 NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; 8028cd0: 2501 movs r5, #1 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL; GPIO_Init(GPIOE, &GPIO_InitStructure);*/ NVIC_InitStructure.NVIC_IRQChannel = TIM8_UP_TIM13_IRQn; 8028cd2: f88d 3000 strb.w r3, [sp] NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x6; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); 8028cd6: 4668 mov r0, sp GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL; GPIO_Init(GPIOE, &GPIO_InitStructure);*/ NVIC_InitStructure.NVIC_IRQChannel = TIM8_UP_TIM13_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x6; 8028cd8: 2306 movs r3, #6 8028cda: f88d 3001 strb.w r3, [sp, #1] NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0; 8028cde: f88d 4002 strb.w r4, [sp, #2] NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; 8028ce2: f88d 5003 strb.w r5, [sp, #3] NVIC_Init(&NVIC_InitStructure); 8028ce6: f7fc fc2b bl 8025540 __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 */ 8028cea: 4b0f ldr r3, [pc, #60] ; (8028d28 ) 8028cec: 2220 movs r2, #32 8028cee: f883 232c strb.w r2, [r3, #812] ; 0x32c /* APB1 Timer clock is 60Mhz, configure timer clock to 10khz (1 update event per 100 us) */ TIM_TimeBaseStructure.TIM_Prescaler = 6000 - 1; /* Configure timer period to 100ms */ TIM_TimeBaseStructure.TIM_Period = 1000; TIM_TimeBaseStructure.TIM_ClockDivision = 0; 8028cf2: f8ad 400c strh.w r4, [sp, #12] TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; 8028cf6: f8ad 4006 strh.w r4, [sp, #6] TIM_TimeBaseInit(TIM13, &TIM_TimeBaseStructure); 8028cfa: 4c0c ldr r4, [pc, #48] ; (8028d2c ) NVIC_Init(&NVIC_InitStructure); NVIC_SetPriority(TIM8_UP_TIM13_IRQn, 2); /* APB1 Timer clock is 60Mhz, configure timer clock to 10khz (1 update event per 100 us) */ TIM_TimeBaseStructure.TIM_Prescaler = 6000 - 1; 8028cfc: f241 736f movw r3, #5999 ; 0x176f 8028d00: f8ad 3004 strh.w r3, [sp, #4] /* Configure timer period to 100ms */ TIM_TimeBaseStructure.TIM_Period = 1000; TIM_TimeBaseStructure.TIM_ClockDivision = 0; TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; TIM_TimeBaseInit(TIM13, &TIM_TimeBaseStructure); 8028d04: 4620 mov r0, r4 NVIC_SetPriority(TIM8_UP_TIM13_IRQn, 2); /* APB1 Timer clock is 60Mhz, configure timer clock to 10khz (1 update event per 100 us) */ TIM_TimeBaseStructure.TIM_Prescaler = 6000 - 1; /* Configure timer period to 100ms */ TIM_TimeBaseStructure.TIM_Period = 1000; 8028d06: f44f 737a mov.w r3, #1000 ; 0x3e8 TIM_TimeBaseStructure.TIM_ClockDivision = 0; TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; TIM_TimeBaseInit(TIM13, &TIM_TimeBaseStructure); 8028d0a: a901 add r1, sp, #4 NVIC_SetPriority(TIM8_UP_TIM13_IRQn, 2); /* APB1 Timer clock is 60Mhz, configure timer clock to 10khz (1 update event per 100 us) */ TIM_TimeBaseStructure.TIM_Prescaler = 6000 - 1; /* Configure timer period to 100ms */ TIM_TimeBaseStructure.TIM_Period = 1000; 8028d0c: 9302 str r3, [sp, #8] TIM_TimeBaseStructure.TIM_ClockDivision = 0; TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; TIM_TimeBaseInit(TIM13, &TIM_TimeBaseStructure); 8028d0e: f7fd f88b bl 8025e28 TIM_Cmd(TIM13, ENABLE); 8028d12: 4620 mov r0, r4 8028d14: 4629 mov r1, r5 8028d16: f7fd f8c5 bl 8025ea4 TIM_ITConfig(TIM13, TIM_IT_Update, ENABLE); 8028d1a: 4620 mov r0, r4 8028d1c: 4629 mov r1, r5 8028d1e: 462a mov r2, r5 8028d20: f7fd f8cc bl 8025ebc } 8028d24: b005 add sp, #20 8028d26: bd30 pop {r4, r5, pc} 8028d28: e000e100 .word 0xe000e100 8028d2c: 40001c00 .word 0x40001c00 08028d30 : /** * @brief Дергаем пином (ÑÐ±Ñ€Ð¾Ñ Ð²Ð½ÐµÑˆÐ½ÐµÐ³Ð¾ WDT) * @retval */ void TIM8_UP_TIM13_IRQHandler(void) { 8028d30: b508 push {r3, lr} TIM_ClearITPendingBit(TIM13, TIM_IT_Update); 8028d32: 4804 ldr r0, [pc, #16] ; (8028d44 ) 8028d34: 2101 movs r1, #1 8028d36: f7fd f8ca bl 8025ece gpio_invert_output(_WDG); 8028d3a: 2010 movs r0, #16 } 8028d3c: e8bd 4008 ldmia.w sp!, {r3, lr} * @retval */ void TIM8_UP_TIM13_IRQHandler(void) { TIM_ClearITPendingBit(TIM13, TIM_IT_Update); gpio_invert_output(_WDG); 8028d40: f7fd bb2c b.w 802639c 8028d44: 40001c00 .word 0x40001c00 08028d48 : /** * @brief */ void LED_On(gpio_t pin) { gpio_set(pin, 1); 8028d48: 2101 movs r1, #1 8028d4a: f7fd ba93 b.w 8026274 08028d4e : /** * @brief */ void LED_Off(gpio_t pin) { gpio_set(pin, 0); 8028d4e: 2100 movs r1, #0 8028d50: f7fd ba90 b.w 8026274 08028d54 : /** * @brief * @retval */ void LED_Init(void) { 8028d54: b508 push {r3, lr} LED_Off(LED_INIT_R); 8028d56: 2009 movs r0, #9 8028d58: f7ff fff9 bl 8028d4e LED_Off(LED_INIT_G); 8028d5c: 200a movs r0, #10 8028d5e: f7ff fff6 bl 8028d4e LED_Off(LED_MAJOR_R); 8028d62: 200b movs r0, #11 8028d64: f7ff fff3 bl 8028d4e LED_Off(LED_MINOR_G); 8028d68: 200c movs r0, #12 8028d6a: f7ff fff0 bl 8028d4e LED_Off(LED_MINOR_R); 8028d6e: 200d movs r0, #13 } 8028d70: 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); 8028d74: f7ff bfeb b.w 8028d4e 08028d78 : /** * @brief Задача проÑтой мигалки */ void vTaskLedBlink(void *arg) { 8028d78: 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; 8028d7a: 4e0e ldr r6, [pc, #56] ; (8028db4 ) LED_Off(LED_INIT_R); LED_Toggle(LED_INIT_G); } start_status_old = start_status; vTaskDelay(statusLedFreq); 8028d7c: 4d0e ldr r5, [pc, #56] ; (8028db8 ) * @brief Задача проÑтой мигалки */ void vTaskLedBlink(void *arg) { uint8_t start_status = 0; uint8_t start_status_old = 0; 8028d7e: 2300 movs r3, #0 start_status = (UPS.Status >> 7) & 0x01; for (;;) { start_status = (UPS.Status >> 7) & 0x01; 8028d80: 7cf4 ldrb r4, [r6, #19] /* ПроÑто отражает ÑоÑтоÑние контроллера - "живой" */ if((UPS.Status >> 7) & 0x01){ 8028d82: 09e4 lsrs r4, r4, #7 8028d84: d009 beq.n 8028d9a if(start_status_old != start_status) 8028d86: 42a3 cmp r3, r4 8028d88: d002 beq.n 8028d90 LED_Off(LED_INIT_G); 8028d8a: 200a movs r0, #10 8028d8c: f7ff ffdf bl 8028d4e /** * @brief Изменить ÑоÑтоÑние LED */ void LED_Toggle(gpio_t pin) { gpio_invert_output(pin); 8028d90: 200a movs r0, #10 8028d92: f7fd fb03 bl 802639c 8028d96: 2009 movs r0, #9 8028d98: e005 b.n 8028da6 LED_Off(LED_INIT_G); LED_Toggle(LED_INIT_G); LED_Toggle(LED_INIT_R); } else{ if(start_status_old != start_status) 8028d9a: 42a3 cmp r3, r4 8028d9c: d002 beq.n 8028da4 LED_Off(LED_INIT_R); 8028d9e: 2009 movs r0, #9 8028da0: f7ff ffd5 bl 8028d4e /** * @brief Изменить ÑоÑтоÑние LED */ void LED_Toggle(gpio_t pin) { gpio_invert_output(pin); 8028da4: 200a movs r0, #10 8028da6: f7fd faf9 bl 802639c LED_Off(LED_INIT_R); LED_Toggle(LED_INIT_G); } start_status_old = start_status; vTaskDelay(statusLedFreq); 8028daa: 8828 ldrh r0, [r5, #0] 8028dac: f002 fada bl 802b364 uint8_t start_status = 0; uint8_t start_status_old = 0; start_status = (UPS.Status >> 7) & 0x01; for (;;) { start_status = (UPS.Status >> 7) & 0x01; 8028db0: 4623 mov r3, r4 LED_Toggle(LED_INIT_G); } start_status_old = start_status; vTaskDelay(statusLedFreq); } 8028db2: e7e5 b.n 8028d80 8028db4: 2000cf64 .word 0x2000cf64 8028db8: 20000660 .word 0x20000660 08028dbc : /** * @brief Изменить ÑоÑтоÑние LED */ void LED_Toggle(gpio_t pin) { gpio_invert_output(pin); 8028dbc: f7fd baee b.w 802639c 08028dc0 : /** * @brief */ void LED_SetStatusLedFreq(uint16_t freq) { statusLedFreq = freq; 8028dc0: 4b01 ldr r3, [pc, #4] ; (8028dc8 ) 8028dc2: 8018 strh r0, [r3, #0] 8028dc4: 4770 bx lr 8028dc6: bf00 nop 8028dc8: 20000660 .word 0x20000660 08028dcc : /** * @brief Заглушка */ void BUTTON_VoidHandler(void) { 8028dcc: 4770 bx lr 8028dce: 0000 movs r0, r0 08028dd0 : /** * @brief Хендлер кнопки DEFAULT. Ð¡Ð±Ñ€Ð¾Ñ Ð²Ñех наÑтроек, Ñохранение и перезагрузка */ void BUTTON_DEF_DownHandler(void) { 8028dd0: b508 push {r3, lr} //taskENTER_CRITICAL(); SNMP_SendUserTrap(DEVICE_RESTORED); 8028dd2: 2003 movs r0, #3 8028dd4: f00e fbbc bl 8037550 log_event_data(LOG_SYSTEM_DEFCONFIG, "ÐдминиÑтратор"); 8028dd8: 4909 ldr r1, [pc, #36] ; (8028e00 ) 8028dda: 2001 movs r0, #1 8028ddc: f001 f84c bl 8029e78 vTaskDelay(500); 8028de0: f44f 70fa mov.w r0, #500 ; 0x1f4 8028de4: f002 fabe bl 802b364 SETTINGS_SetDefaultDebug(); 8028de8: f7ff fea8 bl 8028b3c SETTINGS_Save(); 8028dec: f7ff fe96 bl 8028b1c vTaskDelay(1010); 8028df0: f240 30f2 movw r0, #1010 ; 0x3f2 8028df4: f002 fab6 bl 802b364 Reboot(); //taskEXIT_CRITICAL(); } 8028df8: e8bd 4008 ldmia.w sp!, {r3, lr} vTaskDelay(500); SETTINGS_SetDefaultDebug(); SETTINGS_Save(); vTaskDelay(1010); Reboot(); 8028dfc: f000 bb4c b.w 8029498 8028e00: 08038a86 .word 0x08038a86 08028e04 : /** * @brief Возвращает ÑотоÑние ключа */ BUTTON_STATE_t BUTTON_GetState(BUTTON_NO_FIX_t *button) { return (BUTTON_STATE_t)gpio_get(button->id_pin); 8028e04: 7800 ldrb r0, [r0, #0] 8028e06: f7fd bad9 b.w 80263bc 8028e0a: 0000 movs r0, r0 08028e0c : /** * @brief * @retval */ void BUTTON_Init(void) { 8028e0c: b510 push {r4, lr} defButton.id_pin = KEY_DEF; 8028e0e: 4c09 ldr r4, [pc, #36] ; (8028e34 ) 8028e10: 230f movs r3, #15 8028e12: 7023 strb r3, [r4, #0] defButton.timeDelay = 5; 8028e14: 2305 movs r3, #5 8028e16: 8063 strh r3, [r4, #2] defButton.pressHandler = BUTTON_VoidHandler; 8028e18: 4b07 ldr r3, [pc, #28] ; (8028e38 ) 8028e1a: 60a3 str r3, [r4, #8] defButton.unpressHandler = BUTTON_DEF_DownHandler; 8028e1c: 4b07 ldr r3, [pc, #28] ; (8028e3c ) defButton.counterActivation = 0; defButton.timeActivation = 40; 8028e1e: 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; 8028e20: 60e3 str r3, [r4, #12] defButton.counterActivation = 0; defButton.timeActivation = 40; defButton.fActivation = false; defButton.stateOld = BUTTON_GetState(&defButton); 8028e22: 4620 mov r0, r4 { defButton.id_pin = KEY_DEF; defButton.timeDelay = 5; defButton.pressHandler = BUTTON_VoidHandler; defButton.unpressHandler = BUTTON_DEF_DownHandler; defButton.counterActivation = 0; 8028e24: 2300 movs r3, #0 8028e26: 6163 str r3, [r4, #20] defButton.timeActivation = 40; 8028e28: 8322 strh r2, [r4, #24] defButton.fActivation = false; 8028e2a: 76a3 strb r3, [r4, #26] defButton.stateOld = BUTTON_GetState(&defButton); 8028e2c: f7ff ffea bl 8028e04 8028e30: 71a0 strb r0, [r4, #6] 8028e32: bd10 pop {r4, pc} 8028e34: 2000cf48 .word 0x2000cf48 8028e38: 08028dcd .word 0x08028dcd 8028e3c: 08028dd1 .word 0x08028dd1 08028e40 : Ð²Ñ€ÐµÐ¼Ñ Ð½Ð°Ð¶Ð°Ñ‚Ð¸Ñ. * @param *button: указатель на Ñтруктуру типа BUTTON_NO_FIX * @retval нет */ void BUTTON_DellayHandler(BUTTON_NO_FIX_t *button) { 8028e40: b510 push {r4, lr} 8028e42: 4604 mov r4, r0 /* Кнопка нажата. Ведем отÑчет времени ÑƒÐ´ÐµÑ€Ð¶Ð°Ð½Ð¸Ñ */ if (gpio_get(button->id_pin) == 0) // определÑем текущее (новое) ÑоÑтоÑние кнопки 8028e44: 7800 ldrb r0, [r0, #0] 8028e46: f7fd fab9 bl 80263bc 8028e4a: 6963 ldr r3, [r4, #20] 8028e4c: b950 cbnz r0, 8028e64 { button->counterActivation++; button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) 8028e4e: 8b22 ldrh r2, [r4, #24] { /* Кнопка нажата. Ведем отÑчет времени ÑƒÐ´ÐµÑ€Ð¶Ð°Ð½Ð¸Ñ */ if (gpio_get(button->id_pin) == 0) // определÑем текущее (новое) ÑоÑтоÑние кнопки { button->counterActivation++; button->fActivation = false; 8028e50: 76a0 strb r0, [r4, #26] void BUTTON_DellayHandler(BUTTON_NO_FIX_t *button) { /* Кнопка нажата. Ведем отÑчет времени ÑƒÐ´ÐµÑ€Ð¶Ð°Ð½Ð¸Ñ */ if (gpio_get(button->id_pin) == 0) // определÑем текущее (новое) ÑоÑтоÑние кнопки { button->counterActivation++; 8028e52: 3301 adds r3, #1 button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) 8028e54: 4293 cmp r3, r2 void BUTTON_DellayHandler(BUTTON_NO_FIX_t *button) { /* Кнопка нажата. Ведем отÑчет времени ÑƒÐ´ÐµÑ€Ð¶Ð°Ð½Ð¸Ñ */ if (gpio_get(button->id_pin) == 0) // определÑем текущее (новое) ÑоÑтоÑние кнопки { button->counterActivation++; 8028e56: 6163 str r3, [r4, #20] button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) 8028e58: d914 bls.n 8028e84 LED_SetStatusLedFreq(100); 8028e5a: 2064 movs r0, #100 ; 0x64 } else button->counterActivation = 0; } } 8028e5c: e8bd 4010 ldmia.w sp!, {r4, lr} button->counterActivation++; button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) LED_SetStatusLedFreq(100); 8028e60: f7ff bfae b.w 8028dc0 } /* Кнопку отжата. ЕÑли до Ñтого она была нажата нужное Ð²Ñ€ÐµÐ¼Ñ - вызываем хендлер */ else { if ((button->counterActivation > button->timeActivation) 8028e64: 8b22 ldrh r2, [r4, #24] 8028e66: 4293 cmp r3, r2 8028e68: d90a bls.n 8028e80 && button->fActivation == false) 8028e6a: 7ea3 ldrb r3, [r4, #26] 8028e6c: b943 cbnz r3, 8028e80 { button->fActivation = true; 8028e6e: 2301 movs r3, #1 8028e70: 76a3 strb r3, [r4, #26] LED_SetStatusLedFreq(1000); 8028e72: f44f 707a mov.w r0, #1000 ; 0x3e8 8028e76: f7ff ffa3 bl 8028dc0 button->unpressHandler(); 8028e7a: 68e3 ldr r3, [r4, #12] 8028e7c: 4798 blx r3 8028e7e: bd10 pop {r4, pc} } else button->counterActivation = 0; 8028e80: 2300 movs r3, #0 8028e82: 6163 str r3, [r4, #20] 8028e84: bd10 pop {r4, pc} 8028e86: 0000 movs r0, r0 08028e88 : /** * @brief ÐžÐ¿Ñ€Ð¾Ñ ÐºÐ½Ð¾Ð¿Ð¾Ðº */ void vTaskButtons(void *pvParameters) { 8028e88: b508 push {r3, lr} for (;;) { BUTTON_DellayHandler(&defButton); 8028e8a: 4803 ldr r0, [pc, #12] ; (8028e98 ) 8028e8c: f7ff ffd8 bl 8028e40 vTaskDelay(100); //20 8028e90: 2064 movs r0, #100 ; 0x64 8028e92: f002 fa67 bl 802b364 8028e96: e7f8 b.n 8028e8a 8028e98: 2000cf48 .word 0x2000cf48 08028e9c : #include #include "gpio.h" bool set_mode_jumper(void) { return gpio_get(MODE_JUMPER); 8028e9c: 200e movs r0, #14 8028e9e: f7fd ba8d b.w 80263bc 08028ea2 : /* 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); 8028ea2: f7fd ba8b b.w 80263bc 08028ea6 : return res; } void set_state_douts(gpio_t pin, uint8_t value) { gpio_set(pin, value); 8028ea6: 3100 adds r1, #0 8028ea8: bf18 it ne 8028eaa: 2101 movne r1, #1 8028eac: f7fd b9e2 b.w 8026274 08028eb0 : extern bool flUpdateLog; void init_UPS_value(void) { 8028eb0: b538 push {r3, r4, r5, lr} UPS.Freq_in = 0; 8028eb2: 4c10 ldr r4, [pc, #64] ; (8028ef4 ) UPS.VAC_in = 0; UPS.VAC_out = 0; UPS.Temp = 0; UPS.Load = 0; 8028eb4: 2500 movs r5, #0 extern bool flUpdateLog; void init_UPS_value(void) { UPS.Freq_in = 0; 8028eb6: 2300 movs r3, #0 UPS.Alarm = 0; UPS.cnt_err_ups = 0; UPS.Flag_Present = false; UPS.Present = false; memset(UPS.model, 0, 11); 8028eb8: 4629 mov r1, r5 8028eba: 220b movs r2, #11 8028ebc: f104 0015 add.w r0, r4, #21 extern bool flUpdateLog; void init_UPS_value(void) { UPS.Freq_in = 0; 8028ec0: 6023 str r3, [r4, #0] UPS.VAC_in = 0; 8028ec2: 6063 str r3, [r4, #4] UPS.VAC_out = 0; 8028ec4: 60a3 str r3, [r4, #8] UPS.Temp = 0; 8028ec6: 60e3 str r3, [r4, #12] UPS.Load = 0; 8028ec8: 7425 strb r5, [r4, #16] UPS.SOC = 0; 8028eca: 7465 strb r5, [r4, #17] UPS.work_time = 0; 8028ecc: 74a5 strb r5, [r4, #18] UPS.Status = 0; 8028ece: 74e5 strb r5, [r4, #19] UPS.Alarm = 0; 8028ed0: 7525 strb r5, [r4, #20] UPS.cnt_err_ups = 0; 8028ed2: f884 502b strb.w r5, [r4, #43] ; 0x2b UPS.Flag_Present = false; 8028ed6: f884 502d strb.w r5, [r4, #45] ; 0x2d UPS.Present = false; 8028eda: f884 502c strb.w r5, [r4, #44] ; 0x2c memset(UPS.model, 0, 11); 8028ede: f7f8 ff5f bl 8021da0 memset(UPS.vertion, 0, 11); 8028ee2: f104 0020 add.w r0, r4, #32 8028ee6: 4629 mov r1, r5 8028ee8: 220b movs r2, #11 } 8028eea: 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); 8028eee: f7f8 bf57 b.w 8021da0 8028ef2: bf00 nop 8028ef4: 2000cf64 .word 0x2000cf64 08028ef8 : } void send_MegaTec_cmd(cmdMegaTecEnums_t command) { 8028ef8: b530 push {r4, r5, lr} if(command == ups_test_time){ 8028efa: 2803 cmp r0, #3 memset(UPS.model, 0, 11); memset(UPS.vertion, 0, 11); } void send_MegaTec_cmd(cmdMegaTecEnums_t command) { 8028efc: b087 sub sp, #28 8028efe: 4d36 ldr r5, [pc, #216] ; (8028fd8 ) if(command == ups_test_time){ 8028f00: d10c bne.n 8028f1c uint8_t req[10]; memset(req, 0, 10); 8028f02: 2100 movs r1, #0 8028f04: 220a movs r2, #10 8028f06: a803 add r0, sp, #12 8028f08: f7f8 ff4a bl 8021da0 sprintf(req, "%s%d\r", MegaTecCMD[command], TimeParam); 8028f0c: 4b33 ldr r3, [pc, #204] ; (8028fdc ) 8028f0e: 4934 ldr r1, [pc, #208] ; (8028fe0 ) 8028f10: 68ea ldr r2, [r5, #12] 8028f12: 881b ldrh r3, [r3, #0] 8028f14: a803 add r0, sp, #12 8028f16: f7fe fe03 bl 8027b20 8028f1a: e037 b.n 8028f8c ups_send_block(req, strlen(req)); } else if(command == ups_shutdown){ 8028f1c: 2805 cmp r0, #5 8028f1e: d13b bne.n 8028f98 uint8_t req[10]; memset(req, 0, 10); 8028f20: 2100 movs r1, #0 8028f22: a803 add r0, sp, #12 8028f24: 220a movs r2, #10 8028f26: f7f8 ff3b bl 8021da0 if(TimeParamFloat >= 1 && TimeParamFloat < 10) 8028f2a: 4b2e ldr r3, [pc, #184] ; (8028fe4 ) 8028f2c: 681c ldr r4, [r3, #0] 8028f2e: f04f 517e mov.w r1, #1065353216 ; 0x3f800000 8028f32: 4620 mov r0, r4 8028f34: f7f8 f936 bl 80211a4 <__aeabi_fcmpge> 8028f38: b160 cbz r0, 8028f54 8028f3a: 4620 mov r0, r4 8028f3c: 492a ldr r1, [pc, #168] ; (8028fe8 ) 8028f3e: f7f8 f91d bl 802117c <__aeabi_fcmplt> 8028f42: b138 cbz r0, 8028f54 { sprintf(req, "%s0%f\r", MegaTecCMD[command], TimeParamFloat); 8028f44: 4620 mov r0, r4 8028f46: f7f7 fae7 bl 8020518 <__aeabi_f2d> 8028f4a: e9cd 0100 strd r0, r1, [sp] 8028f4e: a803 add r0, sp, #12 8028f50: 4926 ldr r1, [pc, #152] ; (8028fec ) 8028f52: e018 b.n 8028f86 } else if(TimeParamFloat < 1){ 8028f54: 4620 mov r0, r4 8028f56: f04f 517e mov.w r1, #1065353216 ; 0x3f800000 8028f5a: f7f8 f90f bl 802117c <__aeabi_fcmplt> 8028f5e: 4d1e ldr r5, [pc, #120] ; (8028fd8 ) 8028f60: b150 cbz r0, 8028f78 sprintf(req, "%s.%f\r", MegaTecCMD[command], 10*TimeParamFloat); 8028f62: 4921 ldr r1, [pc, #132] ; (8028fe8 ) 8028f64: 4620 mov r0, r4 8028f66: f7f7 ff6b bl 8020e40 <__aeabi_fmul> 8028f6a: f7f7 fad5 bl 8020518 <__aeabi_f2d> 8028f6e: e9cd 0100 strd r0, r1, [sp] 8028f72: a803 add r0, sp, #12 8028f74: 491e ldr r1, [pc, #120] ; (8028ff0 ) 8028f76: e006 b.n 8028f86 } else{ sprintf(req, "%s%f\r", MegaTecCMD[command], TimeParamFloat); 8028f78: 4620 mov r0, r4 8028f7a: f7f7 facd bl 8020518 <__aeabi_f2d> 8028f7e: e9cd 0100 strd r0, r1, [sp] 8028f82: 491c ldr r1, [pc, #112] ; (8028ff4 ) 8028f84: a803 add r0, sp, #12 8028f86: 696a ldr r2, [r5, #20] 8028f88: f7fe fdca bl 8027b20 } ups_send_block(req, strlen(req)); 8028f8c: a803 add r0, sp, #12 8028f8e: f7f9 f8df bl 8022150 8028f92: b2c1 uxtb r1, r0 8028f94: a803 add r0, sp, #12 8028f96: e01a b.n 8028fce } else if(command == ups_shutdown_restore){ 8028f98: 2806 cmp r0, #6 8028f9a: d111 bne.n 8028fc0 uint8_t req[10]; memset(req, 0, 10); 8028f9c: 2100 movs r1, #0 8028f9e: 220a movs r2, #10 8028fa0: a803 add r0, sp, #12 8028fa2: f7f8 fefd bl 8021da0 sprintf(req, "%s.%d%s%d\r", MegaTecCMD[command-1], TimeParam, MegaTecCMD[command], TimeParam2); 8028fa6: 69aa ldr r2, [r5, #24] 8028fa8: 4b0c ldr r3, [pc, #48] ; (8028fdc ) 8028faa: 4913 ldr r1, [pc, #76] ; (8028ff8 ) 8028fac: 881b ldrh r3, [r3, #0] 8028fae: 9200 str r2, [sp, #0] 8028fb0: 4a12 ldr r2, [pc, #72] ; (8028ffc ) 8028fb2: 8812 ldrh r2, [r2, #0] 8028fb4: a803 add r0, sp, #12 8028fb6: 9201 str r2, [sp, #4] 8028fb8: 696a ldr r2, [r5, #20] 8028fba: f7fe fdb1 bl 8027b20 8028fbe: e7e5 b.n 8028f8c ups_send_block(req, strlen(req)); } else{ // TODO Ñîãëàñîâàòü èçìåíåíèÿ //ups_send_block(MegaTecCMD[command], strlen(MegaTecCMD[command])); ups_send_block((void*)MegaTecCMD[command], strlen(MegaTecCMD[command])); 8028fc0: f855 4020 ldr.w r4, [r5, r0, lsl #2] 8028fc4: 4620 mov r0, r4 8028fc6: f7f9 f8c3 bl 8022150 8028fca: b2c1 uxtb r1, r0 8028fcc: 4620 mov r0, r4 8028fce: f7fd ffff bl 8026fd0 } } 8028fd2: b007 add sp, #28 8028fd4: bd30 pop {r4, r5, pc} 8028fd6: bf00 nop 8028fd8: 20000664 .word 0x20000664 8028fdc: 20000b54 .word 0x20000b54 8028fe0: 08038aba .word 0x08038aba 8028fe4: 20000b50 .word 0x20000b50 8028fe8: 41200000 .word 0x41200000 8028fec: 08038aa1 .word 0x08038aa1 8028ff0: 08038aa8 .word 0x08038aa8 8028ff4: 08038aaf .word 0x08038aaf 8028ff8: 08038ab5 .word 0x08038ab5 8028ffc: 20000b1a .word 0x20000b1a 08029000 : bool ups_megatec_rx_pdu(void) { 8029000: b510 push {r4, lr} int c = 0; ups_pdu.len = 0; 8029002: 4c0e ldr r4, [pc, #56] ; (802903c ) 8029004: 2000 movs r0, #0 8029006: 8660 strh r0, [r4, #50] ; 0x32 while ((ups_pdu.len < UPS_PDU_MAX_LEN) && (c != 0x0d)) { 8029008: e00d b.n 8029026 c = ups_getchar(500);//portMAX_DELAY 802900a: f44f 70fa mov.w r0, #500 ; 0x1f4 802900e: f7fe f803 bl 8027018 if(c < 0) 8029012: 2800 cmp r0, #0 8029014: da03 bge.n 802901e { ups_pdu.len = 0; 8029016: 4b09 ldr r3, [pc, #36] ; (802903c ) 8029018: 2200 movs r2, #0 802901a: 865a strh r2, [r3, #50] ; 0x32 break; 802901c: e008 b.n 8029030 } ups_pdu.data[ups_pdu.len++] = c; 802901e: 8e63 ldrh r3, [r4, #50] ; 0x32 8029020: 54e0 strb r0, [r4, r3] 8029022: 3301 adds r3, #1 8029024: 8663 strh r3, [r4, #50] ; 0x32 { int c = 0; ups_pdu.len = 0; while ((ups_pdu.len < UPS_PDU_MAX_LEN) && (c != 0x0d)) { 8029026: 8e63 ldrh r3, [r4, #50] ; 0x32 8029028: 2b31 cmp r3, #49 ; 0x31 802902a: d801 bhi.n 8029030 802902c: 280d cmp r0, #13 802902e: d1ec bne.n 802900a break; } ups_pdu.data[ups_pdu.len++] = c; } if (ups_pdu.len == 0) 8029030: 4b02 ldr r3, [pc, #8] ; (802903c ) 8029032: 8e58 ldrh r0, [r3, #50] ; 0x32 return false; return true; } 8029034: 3000 adds r0, #0 8029036: bf18 it ne 8029038: 2001 movne r0, #1 802903a: bd10 pop {r4, pc} 802903c: 20000b1c .word 0x20000b1c 08029040 : void ups_status_response(char *data) { 8029040: 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] != '(') 8029044: 7803 ldrb r3, [r0, #0] 8029046: 2b28 cmp r3, #40 ; 0x28 return true; } void ups_status_response(char *data) { 8029048: 4604 mov r4, r0 uint8_t i; char *endValue; char value[10]; uint8_t len = 0; if(data[0] != '(') 802904a: f040 80e4 bne.w 8029216 return; UPS.Present = true; 802904e: 4b78 ldr r3, [pc, #480] ; (8029230 ) 8029050: 2201 movs r2, #1 8029052: f883 202c strb.w r2, [r3, #44] ; 0x2c UPS.Flag_Present = true; 8029056: f883 202d strb.w r2, [r3, #45] ; 0x2d UPS.cnt_err_ups = 0; 802905a: 2200 movs r2, #0 802905c: f883 202b strb.w r2, [r3, #43] ; 0x2b if(flUpdateLog){ 8029060: 4b74 ldr r3, [pc, #464] ; (8029234 ) 8029062: 7819 ldrb r1, [r3, #0] 8029064: b111 cbz r1, 802906c flUpdateLog = false; 8029066: 701a strb r2, [r3, #0] log_add(data); 8029068: f000 ff16 bl 8029e98 } data++; 802906c: 3401 adds r4, #1 memset(value, 0, 10); 802906e: 220a movs r2, #10 8029070: 2100 movs r1, #0 8029072: a801 add r0, sp, #4 8029074: f7f8 fe94 bl 8021da0 endValue = strpbrk(data," "); 8029078: 4620 mov r0, r4 802907a: 496f ldr r1, [pc, #444] ; (8029238 ) 802907c: f7f9 f952 bl 8022324 len = endValue - data; 8029080: 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); } 8029082: b2c6 uxtb r6, r0 data++; memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8029084: 4632 mov r2, r6 8029086: 4621 mov r1, r4 8029088: a801 add r0, sp, #4 802908a: f7f9 f919 bl 80222c0 data += (len + 1); UPS.VAC_in = atof(value); 802908e: a801 add r0, sp, #4 8029090: f7f8 fd62 bl 8021b58 8029094: f7f7 fd76 bl 8020b84 <__aeabi_d2f> memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8029098: 3601 adds r6, #1 802909a: 19a6 adds r6, r4, r6 UPS.VAC_in = atof(value); 802909c: 4c64 ldr r4, [pc, #400] ; (8029230 ) //TODO memset(value, 0, 10); 802909e: 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); 80290a0: 6060 str r0, [r4, #4] //TODO memset(value, 0, 10); 80290a2: 2100 movs r1, #0 80290a4: a801 add r0, sp, #4 80290a6: f7f8 fe7b bl 8021da0 endValue = strpbrk(data," "); 80290aa: 4630 mov r0, r6 80290ac: 4962 ldr r1, [pc, #392] ; (8029238 ) 80290ae: f7f9 f939 bl 8022324 len = endValue - data; 80290b2: 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); } 80290b4: b2c5 uxtb r5, r0 //TODO memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 80290b6: 4631 mov r1, r6 80290b8: 462a mov r2, r5 80290ba: a801 add r0, sp, #4 data += (len + 1); 80290bc: 3501 adds r5, #1 //TODO memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 80290be: f7f9 f8ff bl 80222c0 data += (len + 1); 80290c2: 1975 adds r5, r6, r5 memset(value, 0, 10); 80290c4: 220a movs r2, #10 80290c6: 2100 movs r1, #0 80290c8: a801 add r0, sp, #4 80290ca: f7f8 fe69 bl 8021da0 endValue = strpbrk(data," "); 80290ce: 4628 mov r0, r5 80290d0: 4959 ldr r1, [pc, #356] ; (8029238 ) 80290d2: f7f9 f927 bl 8022324 len = endValue - data; 80290d6: 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); } 80290d8: fa5f f880 uxtb.w r8, r0 data += (len + 1); memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 80290dc: 4642 mov r2, r8 80290de: 4629 mov r1, r5 80290e0: a801 add r0, sp, #4 80290e2: f7f9 f8ed bl 80222c0 data += (len + 1); UPS.VAC_out = atof(value); 80290e6: a801 add r0, sp, #4 80290e8: f7f8 fd36 bl 8021b58 80290ec: f7f7 fd4a bl 8020b84 <__aeabi_d2f> memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 80290f0: f108 0801 add.w r8, r8, #1 80290f4: 44a8 add r8, r5 UPS.VAC_out = atof(value); memset(value, 0, 10); 80290f6: 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); 80290f8: 60a0 str r0, [r4, #8] memset(value, 0, 10); 80290fa: 2100 movs r1, #0 80290fc: a801 add r0, sp, #4 80290fe: f7f8 fe4f bl 8021da0 endValue = strpbrk(data," "); 8029102: 494d ldr r1, [pc, #308] ; (8029238 ) 8029104: 4640 mov r0, r8 8029106: f7f9 f90d bl 8022324 len = endValue - data; 802910a: 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); } 802910e: b2c7 uxtb r7, r0 UPS.VAC_out = atof(value); memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8029110: 463a mov r2, r7 8029112: 4641 mov r1, r8 8029114: a801 add r0, sp, #4 8029116: f7f9 f8d3 bl 80222c0 data += (len + 1); UPS.Load = atoi(value); 802911a: a801 add r0, sp, #4 802911c: f7f8 fd20 bl 8021b60 memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8029120: 3701 adds r7, #1 8029122: 4447 add r7, r8 UPS.Load = atoi(value); memset(value, 0, 10); 8029124: 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); 8029126: 7420 strb r0, [r4, #16] memset(value, 0, 10); 8029128: 2100 movs r1, #0 802912a: a801 add r0, sp, #4 802912c: f7f8 fe38 bl 8021da0 endValue = strpbrk(data," "); 8029130: 4941 ldr r1, [pc, #260] ; (8029238 ) 8029132: 4638 mov r0, r7 8029134: f7f9 f8f6 bl 8022324 len = endValue - data; 8029138: 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); } 802913a: b2c6 uxtb r6, r0 UPS.Load = atoi(value); memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 802913c: 4632 mov r2, r6 802913e: 4639 mov r1, r7 8029140: a801 add r0, sp, #4 8029142: f7f9 f8bd bl 80222c0 data += (len + 1); UPS.Freq_in = atof(value); 8029146: a801 add r0, sp, #4 8029148: f7f8 fd06 bl 8021b58 802914c: f7f7 fd1a bl 8020b84 <__aeabi_d2f> memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8029150: 3601 adds r6, #1 8029152: 19be adds r6, r7, r6 UPS.Freq_in = atof(value); 8029154: 6020 str r0, [r4, #0] //TODO memset(value, 0, 10); 8029156: 220a movs r2, #10 8029158: 2100 movs r1, #0 802915a: a801 add r0, sp, #4 802915c: f7f8 fe20 bl 8021da0 endValue = strpbrk(data," "); 8029160: 4630 mov r0, r6 8029162: 4935 ldr r1, [pc, #212] ; (8029238 ) 8029164: f7f9 f8de bl 8022324 len = endValue - data; 8029168: 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); } 802916a: b2c5 uxtb r5, r0 //TODO memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 802916c: 462a mov r2, r5 802916e: 4631 mov r1, r6 8029170: a801 add r0, sp, #4 8029172: f7f9 f8a5 bl 80222c0 data += (len + 1); UPS.SOC = 100*((atof(value)) - 1.6)/0.7; 8029176: a801 add r0, sp, #4 8029178: f7f8 fcee bl 8021b58 802917c: a328 add r3, pc, #160 ; (adr r3, 8029220 ) 802917e: e9d3 2300 ldrd r2, r3, [r3] 8029182: f7f7 f869 bl 8020258 <__aeabi_dsub> 8029186: 2200 movs r2, #0 8029188: 4b2c ldr r3, [pc, #176] ; (802923c ) 802918a: f7f7 fa19 bl 80205c0 <__aeabi_dmul> 802918e: a326 add r3, pc, #152 ; (adr r3, 8029228 ) 8029190: e9d3 2300 ldrd r2, r3, [r3] 8029194: f7f7 fb3e bl 8020814 <__aeabi_ddiv> 8029198: f7f7 fcd4 bl 8020b44 <__aeabi_d2uiz> //TODO memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 802919c: 3501 adds r5, #1 802919e: 1975 adds r5, r6, r5 UPS.SOC = 100*((atof(value)) - 1.6)/0.7; 80291a0: 7460 strb r0, [r4, #17] memset(value, 0, 10); 80291a2: 220a movs r2, #10 80291a4: 2100 movs r1, #0 80291a6: a801 add r0, sp, #4 80291a8: f7f8 fdfa bl 8021da0 endValue = strpbrk(data," "); 80291ac: 4628 mov r0, r5 80291ae: 4922 ldr r1, [pc, #136] ; (8029238 ) 80291b0: f7f9 f8b8 bl 8022324 len = endValue - data; 80291b4: 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); } 80291b6: 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); 80291b8: 4632 mov r2, r6 80291ba: 4629 mov r1, r5 80291bc: a801 add r0, sp, #4 80291be: f7f9 f87f bl 80222c0 data += (len + 1); UPS.Temp = atof(value); 80291c2: a801 add r0, sp, #4 80291c4: f7f8 fcc8 bl 8021b58 80291c8: f7f7 fcdc bl 8020b84 <__aeabi_d2f> memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 80291cc: 3601 adds r6, #1 80291ce: 19ad adds r5, r5, r6 UPS.Temp = atof(value); 80291d0: 60e0 str r0, [r4, #12] memset(value, 0, 10); 80291d2: 220a movs r2, #10 80291d4: 2100 movs r1, #0 80291d6: a801 add r0, sp, #4 80291d8: f7f8 fde2 bl 8021da0 endValue = strpbrk(data,"\r"); 80291dc: 4918 ldr r1, [pc, #96] ; (8029240 ) 80291de: 4628 mov r0, r5 80291e0: f7f9 f8a0 bl 8022324 len = endValue - data; 80291e4: 1b40 subs r0, r0, r5 80291e6: b2c4 uxtb r4, r0 strncpy(value, data, len); 80291e8: 4629 mov r1, r5 80291ea: a801 add r0, sp, #4 80291ec: 4622 mov r2, r4 80291ee: f7f9 f867 bl 80222c0 uint8_t stat = 0; for(i = 0; i < len; i ++) 80291f2: 2300 movs r3, #0 memset(value, 0, 10); endValue = strpbrk(data,"\r"); len = endValue - data; strncpy(value, data, len); uint8_t stat = 0; 80291f4: 4619 mov r1, r3 for(i = 0; i < len; i ++) 80291f6: e009 b.n 802920c { stat |= (value[i] - 0x30) << (7-i); 80291f8: aa01 add r2, sp, #4 return false; return true; } void ups_status_response(char *data) 80291fa: 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); 80291fe: 5c9a ldrb r2, [r3, r2] 8029200: 3a30 subs r2, #48 ; 0x30 8029202: fa02 f200 lsl.w r2, r2, r0 8029206: 4311 orrs r1, r2 8029208: b2c9 uxtb r1, r1 802920a: 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 ++) 802920c: b2da uxtb r2, r3 802920e: 42a2 cmp r2, r4 8029210: d3f2 bcc.n 80291f8 { stat |= (value[i] - 0x30) << (7-i); } UPS.Status = stat; 8029212: 4b07 ldr r3, [pc, #28] ; (8029230 ) 8029214: 74d9 strb r1, [r3, #19] } 8029216: e8bd 81ff ldmia.w sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, pc} 802921a: bf00 nop 802921c: f3af 8000 nop.w 8029220: 9999999a .word 0x9999999a 8029224: 3ff99999 .word 0x3ff99999 8029228: 66666666 .word 0x66666666 802922c: 3fe66666 .word 0x3fe66666 8029230: 2000cf64 .word 0x2000cf64 8029234: 20000bc4 .word 0x20000bc4 8029238: 08038ac0 .word 0x08038ac0 802923c: 40590000 .word 0x40590000 8029240: 08044af1 .word 0x08044af1 8029244: f3af 8000 nop.w 08029248 : void ups_info_response(char *data) { 8029248: b570 push {r4, r5, r6, lr} uint8_t i = 0; char *endValue; uint8_t len = 0; if(data[0] != '#') 802924a: 7803 ldrb r3, [r0, #0] 802924c: 2b23 cmp r3, #35 ; 0x23 802924e: d142 bne.n 80292d6 return; UPS.Present = true; 8029250: 4b21 ldr r3, [pc, #132] ; (80292d8 ) 8029252: 2201 movs r2, #1 8029254: f883 202c strb.w r2, [r3, #44] ; 0x2c UPS.Flag_Present = true; 8029258: f883 202d strb.w r2, [r3, #45] ; 0x2d UPS.cnt_err_ups = 0; data++; data += 16; 802925c: 3011 adds r0, #17 if(data[0] != '#') return; UPS.Present = true; UPS.Flag_Present = true; UPS.cnt_err_ups = 0; 802925e: 2200 movs r2, #0 8029260: f883 202b strb.w r2, [r3, #43] ; 0x2b data++; data += 16; while(data[0] == ' '){ 8029264: 4603 mov r3, r0 8029266: 461c mov r4, r3 stat |= (value[i] - 0x30) << (7-i); } UPS.Status = stat; } void ups_info_response(char *data) 8029268: 1a1a subs r2, r3, r0 data++; data += 16; while(data[0] == ' '){ 802926a: 7821 ldrb r1, [r4, #0] 802926c: 3301 adds r3, #1 802926e: 2920 cmp r1, #32 stat |= (value[i] - 0x30) << (7-i); } UPS.Status = stat; } void ups_info_response(char *data) 8029270: b2d2 uxtb r2, r2 data++; data += 16; while(data[0] == ' '){ 8029272: d0f8 beq.n 8029266 data ++; i ++; } if(i < 11){ 8029274: 2a0a cmp r2, #10 8029276: 4d18 ldr r5, [pc, #96] ; (80292d8 ) 8029278: d815 bhi.n 80292a6 endValue = strpbrk(data," "); 802927a: 4918 ldr r1, [pc, #96] ; (80292dc ) 802927c: 4620 mov r0, r4 802927e: f7f9 f851 bl 8022324 len = endValue - data; if(UPS.model[0] == 0){ 8029282: 7d6b ldrb r3, [r5, #21] data ++; i ++; } if(i < 11){ endValue = strpbrk(data," "); len = endValue - data; 8029284: 1b06 subs r6, r0, r4 8029286: b2f2 uxtb r2, r6 if(UPS.model[0] == 0){ strncpy(UPS.model, data, len); 8029288: f105 0015 add.w r0, r5, #21 802928c: 4621 mov r1, r4 i ++; } if(i < 11){ endValue = strpbrk(data," "); len = endValue - data; if(UPS.model[0] == 0){ 802928e: b923 cbnz r3, 802929a strncpy(UPS.model, data, len); 8029290: f7f9 f816 bl 80222c0 SNMP_SetObjDescr(); 8029294: f00e f97c bl 8037590 8029298: e001 b.n 802929e } else{ strncpy(UPS.model, data, len); 802929a: f7f9 f811 bl 80222c0 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); } 802929e: b2f6 uxtb r6, r6 } else{ strncpy(UPS.model, data, len); } data += (len + 1); 80292a0: 3601 adds r6, #1 80292a2: 19a4 adds r4, r4, r6 80292a4: e00b b.n 80292be } else { if(UPS.model[0] == 0){ 80292a6: 7d6b ldrb r3, [r5, #21] strcpy(UPS.model, "RTMP II"); 80292a8: 490d ldr r1, [pc, #52] ; (80292e0 ) 80292aa: f105 0015 add.w r0, r5, #21 data += (len + 1); } else { if(UPS.model[0] == 0){ 80292ae: b923 cbnz r3, 80292ba strcpy(UPS.model, "RTMP II"); 80292b0: f7f8 fef0 bl 8022094 SNMP_SetObjDescr(); 80292b4: f00e f96c bl 8037590 80292b8: e001 b.n 80292be } else{ strcpy(UPS.model, "RTMP II"); 80292ba: f7f8 feeb bl 8022094 } } endValue = strpbrk(data,"\r"); 80292be: 4620 mov r0, r4 80292c0: 4908 ldr r1, [pc, #32] ; (80292e4 ) 80292c2: f7f9 f82f bl 8022324 len = endValue - data; 80292c6: 1b02 subs r2, r0, r4 strncpy(UPS.vertion, data, len); 80292c8: 4807 ldr r0, [pc, #28] ; (80292e8 ) 80292ca: 4621 mov r1, r4 80292cc: b2d2 uxtb r2, r2 } 80292ce: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} } } endValue = strpbrk(data,"\r"); len = endValue - data; strncpy(UPS.vertion, data, len); 80292d2: f7f8 bff5 b.w 80222c0 80292d6: bd70 pop {r4, r5, r6, pc} 80292d8: 2000cf64 .word 0x2000cf64 80292dc: 08038ac0 .word 0x08038ac0 80292e0: 08038ac2 .word 0x08038ac2 80292e4: 08044af1 .word 0x08044af1 80292e8: 2000cf84 .word 0x2000cf84 080292ec : } void ups_remain_time_response(char *data) { 80292ec: b530 push {r4, r5, lr} char value[10]; if(data[0] != '(') 80292ee: 7803 ldrb r3, [r0, #0] 80292f0: 2b28 cmp r3, #40 ; 0x28 strncpy(UPS.vertion, data, len); } void ups_remain_time_response(char *data) { 80292f2: b085 sub sp, #20 80292f4: 4605 mov r5, r0 char value[10]; if(data[0] != '(') 80292f6: d116 bne.n 8029326 return; UPS.Present = true; 80292f8: 4c0c ldr r4, [pc, #48] ; (802932c ) 80292fa: 2301 movs r3, #1 UPS.Flag_Present = true; UPS.cnt_err_ups = 0; data++; memset(value, 0, 10); 80292fc: 220a movs r2, #10 if(data[0] != '(') return; UPS.Present = true; UPS.Flag_Present = true; UPS.cnt_err_ups = 0; 80292fe: 2100 movs r1, #0 data++; memset(value, 0, 10); 8029300: a801 add r0, sp, #4 { char value[10]; if(data[0] != '(') return; UPS.Present = true; 8029302: f884 302c strb.w r3, [r4, #44] ; 0x2c UPS.Flag_Present = true; 8029306: f884 302d strb.w r3, [r4, #45] ; 0x2d UPS.cnt_err_ups = 0; 802930a: f884 102b strb.w r1, [r4, #43] ; 0x2b data++; memset(value, 0, 10); 802930e: f7f8 fd47 bl 8021da0 strcpy(value, data); 8029312: 1c69 adds r1, r5, #1 8029314: a801 add r0, sp, #4 8029316: f7f8 febd bl 8022094 UPS.work_time = atof(value); 802931a: a801 add r0, sp, #4 802931c: f7f8 fc1c bl 8021b58 8029320: f7f7 fc10 bl 8020b44 <__aeabi_d2uiz> 8029324: 74a0 strb r0, [r4, #18] } 8029326: b005 add sp, #20 8029328: bd30 pop {r4, r5, pc} 802932a: bf00 nop 802932c: 2000cf64 .word 0x2000cf64 08029330 : } // TODO Ñîãëàñîâàòü èçìåíåíèÿ //void request_task(void) void request_task(void* params) { 8029330: b570 push {r4, r5, r6, lr} for(;;) { if(UPS.Present == true){ 8029332: 4c2e ldr r4, [pc, #184] ; (80293ec ) //memset(UPS.model, 0, 11); memset(UPS.vertion, 0, 11); } } } if(megatec_send){ 8029334: 4d2e ldr r5, [pc, #184] ; (80293f0 ) if(UPS.Flag_Present == false) { if(UPS.cnt_err_ups != 2) UPS.cnt_err_ups++; else{ UPS.Freq_in = 0; 8029336: 2600 movs r6, #0 void request_task(void* params) { for(;;) { if(UPS.Present == true){ 8029338: f894 302c ldrb.w r3, [r4, #44] ; 0x2c 802933c: b1cb cbz r3, 8029372 if(UPS.Flag_Present == false) 802933e: f894 102d ldrb.w r1, [r4, #45] ; 0x2d 8029342: b9b1 cbnz r1, 8029372 { if(UPS.cnt_err_ups != 2) 8029344: f894 302b ldrb.w r3, [r4, #43] ; 0x2b 8029348: 2b02 cmp r3, #2 802934a: d003 beq.n 8029354 UPS.cnt_err_ups++; 802934c: 3301 adds r3, #1 802934e: f884 302b strb.w r3, [r4, #43] ; 0x2b 8029352: e00e b.n 8029372 UPS.Status = 0; UPS.Alarm = 0; UPS.Present = false; //memset(UPS.model, 0, 11); memset(UPS.vertion, 0, 11); 8029354: 4827 ldr r0, [pc, #156] ; (80293f4 ) if(UPS.Flag_Present == false) { if(UPS.cnt_err_ups != 2) UPS.cnt_err_ups++; else{ UPS.Freq_in = 0; 8029356: 6026 str r6, [r4, #0] UPS.Status = 0; UPS.Alarm = 0; UPS.Present = false; //memset(UPS.model, 0, 11); memset(UPS.vertion, 0, 11); 8029358: 220b movs r2, #11 { if(UPS.cnt_err_ups != 2) UPS.cnt_err_ups++; else{ UPS.Freq_in = 0; UPS.VAC_in = 0; 802935a: 6066 str r6, [r4, #4] UPS.VAC_out = 0; 802935c: 60a6 str r6, [r4, #8] UPS.Temp = 0; 802935e: 60e6 str r6, [r4, #12] UPS.Load = 0; 8029360: 7421 strb r1, [r4, #16] UPS.SOC = 0; 8029362: 7461 strb r1, [r4, #17] UPS.work_time = 0; 8029364: 74a1 strb r1, [r4, #18] UPS.Status = 0; 8029366: 74e1 strb r1, [r4, #19] UPS.Alarm = 0; 8029368: 7521 strb r1, [r4, #20] UPS.Present = false; 802936a: f884 102c strb.w r1, [r4, #44] ; 0x2c //memset(UPS.model, 0, 11); memset(UPS.vertion, 0, 11); 802936e: f7f8 fd17 bl 8021da0 } } } if(megatec_send){ 8029372: 782b ldrb r3, [r5, #0] 8029374: b16b cbz r3, 8029392 megatec_send= false; 8029376: 2000 movs r0, #0 8029378: 7028 strb r0, [r5, #0] UPS.Flag_Present = false; 802937a: f884 002d strb.w r0, [r4, #45] ; 0x2d send_MegaTec_cmd(ups_status_req); 802937e: f7ff fdbb bl 8028ef8 if (ups_megatec_rx_pdu()) 8029382: f7ff fe3d bl 8029000 8029386: b110 cbz r0, 802938e void ups_megatec_process_pdu(cmdMegaTecEnums_t command) { switch(command) { case ups_status_req: ups_status_response(ups_pdu.data); 8029388: 481b ldr r0, [pc, #108] ; (80293f8 ) 802938a: f7ff fe59 bl 8029040 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; 802938e: 2301 movs r3, #1 8029390: 702b strb r3, [r5, #0] } if(megatec_send){ 8029392: 782b ldrb r3, [r5, #0] 8029394: b19b cbz r3, 80293be memset(ups_pdu.data, 0, UPS_PDU_MAX_LEN); 8029396: 2100 movs r1, #0 8029398: 2232 movs r2, #50 ; 0x32 802939a: 4817 ldr r0, [pc, #92] ; (80293f8 ) 802939c: f7f8 fd00 bl 8021da0 megatec_send= false; 80293a0: 2300 movs r3, #0 UPS.Flag_Present = false; send_MegaTec_cmd(ups_remain_time_reg); 80293a2: 200b movs r0, #11 megatec_send=true; } if(megatec_send){ memset(ups_pdu.data, 0, UPS_PDU_MAX_LEN); megatec_send= false; 80293a4: 702b strb r3, [r5, #0] UPS.Flag_Present = false; 80293a6: f884 302d strb.w r3, [r4, #45] ; 0x2d send_MegaTec_cmd(ups_remain_time_reg); 80293aa: f7ff fda5 bl 8028ef8 if (ups_megatec_rx_pdu()) 80293ae: f7ff fe27 bl 8029000 80293b2: b110 cbz r0, 80293ba break; case ups_rating_info: break; case ups_remain_time_reg: ups_remain_time_response(ups_pdu.data); 80293b4: 4810 ldr r0, [pc, #64] ; (80293f8 ) 80293b6: f7ff ff99 bl 80292ec 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; 80293ba: 2301 movs r3, #1 80293bc: 702b strb r3, [r5, #0] } //vTaskDelay(100); if(megatec_send){ 80293be: 782b ldrb r3, [r5, #0] 80293c0: b173 cbz r3, 80293e0 megatec_send = false; 80293c2: 2300 movs r3, #0 UPS.Flag_Present = false; send_MegaTec_cmd(ups_info); 80293c4: 2009 movs r0, #9 megatec_send=true; } //vTaskDelay(100); if(megatec_send){ megatec_send = false; 80293c6: 702b strb r3, [r5, #0] UPS.Flag_Present = false; 80293c8: f884 302d strb.w r3, [r4, #45] ; 0x2d send_MegaTec_cmd(ups_info); 80293cc: f7ff fd94 bl 8028ef8 if (ups_megatec_rx_pdu()) 80293d0: f7ff fe16 bl 8029000 80293d4: b110 cbz r0, 80293dc { case ups_status_req: ups_status_response(ups_pdu.data); break; case ups_info: ups_info_response(ups_pdu.data); 80293d6: 4808 ldr r0, [pc, #32] ; (80293f8 ) 80293d8: f7ff ff36 bl 8029248 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; 80293dc: 2301 movs r3, #1 80293de: 702b strb r3, [r5, #0] } vTaskDelay(1000); 80293e0: f44f 707a mov.w r0, #1000 ; 0x3e8 80293e4: f001 ffbe bl 802b364 } 80293e8: e7a6 b.n 8029338 80293ea: bf00 nop 80293ec: 2000cf64 .word 0x2000cf64 80293f0: 20000662 .word 0x20000662 80293f4: 2000cf84 .word 0x2000cf84 80293f8: 20000b1c .word 0x20000b1c 080293fc : break; } } int ups_metac_service_pdu(cmdMegaTecEnums_t command) { 80293fc: b570 push {r4, r5, r6, lr} 80293fe: 4606 mov r6, r0 while(!megatec_send) 8029400: 4c14 ldr r4, [pc, #80] ; (8029454 ) 8029402: e002 b.n 802940a { vTaskDelay(50); 8029404: 2032 movs r0, #50 ; 0x32 8029406: f001 ffad bl 802b364 } } int ups_metac_service_pdu(cmdMegaTecEnums_t command) { while(!megatec_send) 802940a: 7823 ldrb r3, [r4, #0] 802940c: 4d11 ldr r5, [pc, #68] ; (8029454 ) 802940e: 2b00 cmp r3, #0 8029410: d0f8 beq.n 8029404 { vTaskDelay(50); } megatec_send = false; 8029412: 2300 movs r3, #0 send_MegaTec_cmd(command); 8029414: 4630 mov r0, r6 { while(!megatec_send) { vTaskDelay(50); } megatec_send = false; 8029416: 702b strb r3, [r5, #0] send_MegaTec_cmd(command); 8029418: f7ff fd6e bl 8028ef8 if (ups_megatec_rx_pdu()) 802941c: f7ff fdf0 bl 8029000 8029420: b190 cbz r0, 8029448 { megatec_send = true; 8029422: 2401 movs r4, #1 if(strncmp(ups_pdu.data, "ACK", 3) == 0) 8029424: 480c ldr r0, [pc, #48] ; (8029458 ) 8029426: 490d ldr r1, [pc, #52] ; (802945c ) } megatec_send = false; send_MegaTec_cmd(command); if (ups_megatec_rx_pdu()) { megatec_send = true; 8029428: 702c strb r4, [r5, #0] if(strncmp(ups_pdu.data, "ACK", 3) == 0) 802942a: 2203 movs r2, #3 802942c: f7f8 fef2 bl 8022214 8029430: b168 cbz r0, 802944e return 1; else if(strncmp(ups_pdu.data, "NCK", 3) == 0) 8029432: 490b ldr r1, [pc, #44] ; (8029460 ) 8029434: 4808 ldr r0, [pc, #32] ; (8029458 ) 8029436: 2203 movs r2, #3 8029438: f7f8 feec bl 8022214 return 0; 802943c: 2800 cmp r0, #0 802943e: bf14 ite ne 8029440: f04f 30ff movne.w r0, #4294967295 8029444: 2000 moveq r0, #0 8029446: bd70 pop {r4, r5, r6, pc} } return -1; 8029448: f04f 30ff mov.w r0, #4294967295 802944c: 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; 802944e: 4620 mov r0, r4 else if(strncmp(ups_pdu.data, "NCK", 3) == 0) return 0; } return -1; } 8029450: bd70 pop {r4, r5, r6, pc} 8029452: bf00 nop 8029454: 20000662 .word 0x20000662 8029458: 20000b1c .word 0x20000b1c 802945c: 08038aca .word 0x08038aca 8029460: 08038ace .word 0x08038ace 08029464 : vTaskDelay(1000); } } void ups_megatec_init(void) { 8029464: b51f push {r0, r1, r2, r3, r4, lr} init_UPS_value(); 8029466: f7ff fd23 bl 8028eb0 UPS.Present = true; 802946a: 4b08 ldr r3, [pc, #32] ; (802948c ) xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); 802946c: 4908 ldr r1, [pc, #32] ; (8029490 ) 802946e: 4809 ldr r0, [pc, #36] ; (8029494 ) } } void ups_megatec_init(void) { init_UPS_value(); UPS.Present = true; 8029470: 2201 movs r2, #1 8029472: f883 202c strb.w r2, [r3, #44] ; 0x2c xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); 8029476: 2300 movs r3, #0 8029478: 9300 str r3, [sp, #0] 802947a: 9301 str r3, [sp, #4] 802947c: 9302 str r3, [sp, #8] 802947e: 9303 str r3, [sp, #12] 8029480: f44f 7280 mov.w r2, #256 ; 0x100 8029484: f001 fcd4 bl 802ae30 } 8029488: b005 add sp, #20 802948a: bd00 pop {pc} 802948c: 2000cf64 .word 0x2000cf64 8029490: 08038ad2 .word 0x08038ad2 8029494: 08029331 .word 0x08029331 08029498 : #include "trap_api.h" #include #include "FreeRTOS.h" #include "task.h" void Reboot(void) { 8029498: b508 push {r3, lr} SNMP_SendUserTrap(DEVICE_REBOOTED); 802949a: 2004 movs r0, #4 802949c: f00e f858 bl 8037550 log_event_data(LOG_SYSTEM_BOOT, "ÐдминиÑтратор"); 80294a0: 490a ldr r1, [pc, #40] ; (80294cc ) 80294a2: 2000 movs r0, #0 80294a4: f000 fce8 bl 8029e78 vTaskDelay(1010); 80294a8: f240 30f2 movw r0, #1010 ; 0x3f2 80294ac: f001 ff5a bl 802b364 LOG_Disable(); 80294b0: f000 fc04 bl 8029cbc 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"); 80294b4: 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) | 80294b8: 4a05 ldr r2, [pc, #20] ; (80294d0 ) 80294ba: 4b06 ldr r3, [pc, #24] ; (80294d4 ) 80294bc: 68d1 ldr r1, [r2, #12] 80294be: f401 61e0 and.w r1, r1, #1792 ; 0x700 80294c2: 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) | 80294c4: 60d3 str r3, [r2, #12] 80294c6: f3bf 8f4f dsb sy 80294ca: e7fe b.n 80294ca 80294cc: 08038a86 .word 0x08038a86 80294d0: e000ed00 .word 0xe000ed00 80294d4: 05fa0004 .word 0x05fa0004 080294d8 : #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; 80294d8: 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; 80294da: e880 0006 stmia.w r0, {r1, r2} rbuf32->read_index = 0; 80294de: 6083 str r3, [r0, #8] rbuf32->write_index = 0; 80294e0: 60c3 str r3, [r0, #12] 80294e2: 4770 bx lr 080294e4 : return full_space; } bool rbuf_isfull(rbuf_t *rbuf) { int r_tmp; if (rbuf->write_index == (rbuf->size - 1)) { 80294e4: 6842 ldr r2, [r0, #4] 80294e6: 68c3 ldr r3, [r0, #12] 80294e8: 6880 ldr r0, [r0, #8] 80294ea: 1e51 subs r1, r2, #1 80294ec: 428b cmp r3, r1 r_tmp = rbuf->read_index + rbuf->size; 80294ee: bf08 it eq 80294f0: 1810 addeq r0, r2, r0 } else r_tmp = rbuf->read_index; if (r_tmp - rbuf->write_index == 1) 80294f2: 1ac0 subs r0, r0, r3 return true; else return false; } 80294f4: 1e42 subs r2, r0, #1 80294f6: 4250 negs r0, r2 80294f8: 4150 adcs r0, r2 80294fa: 4770 bx lr 080294fc : rbuf64->read_index = 0; rbuf64->write_index = 0; } bool rbuf_isempty(rbuf_t *rbuf) { if (rbuf->read_index == rbuf->write_index) 80294fc: 6883 ldr r3, [r0, #8] 80294fe: 68c2 ldr r2, [r0, #12] 8029500: 4293 cmp r3, r2 8029502: d105 bne.n 8029510 8029504: e002 b.n 802950c /* 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; 8029506: 2300 movs r3, #0 8029508: 6083 str r3, [r0, #8] 802950a: e00a b.n 8029522 return true; } else return false; 802950c: 2000 movs r0, #0 802950e: 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++]; 8029510: 6802 ldr r2, [r0, #0] 8029512: f852 2023 ldr.w r2, [r2, r3, lsl #2] 8029516: 600a str r2, [r1, #0] /* swap the read pointer */ if (rbuf32->read_index == (rbuf32->size)) 8029518: 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++]; 802951a: 3301 adds r3, #1 /* swap the read pointer */ if (rbuf32->read_index == (rbuf32->size)) 802951c: 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++]; 802951e: 6083 str r3, [r0, #8] /* swap the read pointer */ if (rbuf32->read_index == (rbuf32->size)) 8029520: d0f1 beq.n 8029506 rbuf32->read_index = 0; return true; 8029522: 2001 movs r0, #1 } else return false; } 8029524: 4770 bx lr 08029526 : /* * 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) { 8029526: b538 push {r3, r4, r5, lr} 8029528: 4604 mov r4, r0 802952a: 460d mov r5, r1 if(!rbuf_isfull(rbuf32)) 802952c: f7ff ffda bl 80294e4 8029530: b950 cbnz r0, 8029548 { rbuf32->buf_ptr[rbuf32->write_index++] = data; 8029532: 68e3 ldr r3, [r4, #12] 8029534: 6822 ldr r2, [r4, #0] 8029536: f842 5023 str.w r5, [r2, r3, lsl #2] /* swap the write pointer */ if (rbuf32->write_index == (rbuf32->size)) 802953a: 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; 802953c: 3301 adds r3, #1 /* swap the write pointer */ if (rbuf32->write_index == (rbuf32->size)) 802953e: 4293 cmp r3, r2 */ bool rbuf32_put(rbuf_t *rbuf32, uint32_t data) { if(!rbuf_isfull(rbuf32)) { rbuf32->buf_ptr[rbuf32->write_index++] = data; 8029540: 60e3 str r3, [r4, #12] /* swap the write pointer */ if (rbuf32->write_index == (rbuf32->size)) 8029542: d103 bne.n 802954c rbuf32->write_index = 0; 8029544: 60e0 str r0, [r4, #12] 8029546: e001 b.n 802954c return true; } else return false; 8029548: 2000 movs r0, #0 802954a: 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)) 802954c: 2001 movs r0, #1 rbuf32->write_index = 0; return true; } else return false; } 802954e: bd38 pop {r3, r4, r5, pc} 08029550 : #include #include /* Converts a hex character to its integer value */ char from_hex(char ch) { return isdigit(ch) ? ch - '0' : tolower(ch) - 'a' + 10; 8029550: 4b08 ldr r3, [pc, #32] ; (8029574 ) 8029552: 681b ldr r3, [r3, #0] 8029554: 181b adds r3, r3, r0 8029556: 785b ldrb r3, [r3, #1] 8029558: f003 0204 and.w r2, r3, #4 802955c: b2d2 uxtb r2, r2 802955e: b10a cbz r2, 8029564 8029560: 3830 subs r0, #48 ; 0x30 8029562: e005 b.n 8029570 8029564: f003 0303 and.w r3, r3, #3 8029568: 2b01 cmp r3, #1 802956a: bf08 it eq 802956c: 3020 addeq r0, #32 802956e: 3857 subs r0, #87 ; 0x57 8029570: b2c0 uxtb r0, r0 } 8029572: 4770 bx lr 8029574: 20000000 .word 0x20000000 08029578 : 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) { 8029578: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 802957c: 4607 mov r7, r0 802957e: 460e mov r6, r1 char *pstr = inbuf, *buf = outbuf, *pbuf = buf; 8029580: 4604 mov r4, r0 8029582: 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++ = ' '; 8029584: 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) { 8029588: e01e b.n 80295c8 if (*pstr == '%') { 802958a: 2b25 cmp r3, #37 ; 0x25 802958c: d112 bne.n 80295b4 if (pstr[1] && pstr[2]) { 802958e: 7868 ldrb r0, [r5, #1] 8029590: b1c0 cbz r0, 80295c4 8029592: f895 8002 ldrb.w r8, [r5, #2] 8029596: f1b8 0f00 cmp.w r8, #0 802959a: d013 beq.n 80295c4 *pbuf++ = from_hex(pstr[1]) << 4 | from_hex(pstr[2]); 802959c: f7ff ffd8 bl 8029550 80295a0: 4682 mov sl, r0 80295a2: 4640 mov r0, r8 80295a4: f7ff ffd4 bl 8029550 80295a8: ea40 100a orr.w r0, r0, sl, lsl #4 80295ac: f804 0b01 strb.w r0, [r4], #1 pstr += 2; 80295b0: 3502 adds r5, #2 80295b2: e007 b.n 80295c4 } } else if (*pstr == '+') { 80295b4: 2b2b cmp r3, #43 ; 0x2b 80295b6: f104 0201 add.w r2, r4, #1 *pbuf++ = ' '; 80295ba: bf0c ite eq 80295bc: f884 9000 strbeq.w r9, [r4] } else { *pbuf++ = *pstr; 80295c0: 7023 strbne r3, [r4, #0] 80295c2: 4614 mov r4, r2 } pstr++; 80295c4: 3501 adds r5, #1 outlen--; 80295c6: 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) { 80295c8: 782b ldrb r3, [r5, #0] 80295ca: b10b cbz r3, 80295d0 80295cc: 2e01 cmp r6, #1 80295ce: d8dc bhi.n 802958a *pbuf++ = *pstr; } pstr++; outlen--; } *pbuf = '\0'; 80295d0: 2300 movs r3, #0 80295d2: 7023 strb r3, [r4, #0] return buf; } 80295d4: 4638 mov r0, r7 80295d6: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 80295da: 0000 movs r0, r0 080295dc : /** * @brief Мониторинг бита DI0 state */ void UPS_DI0Monitor(void) { 80295dc: b538 push {r3, r4, r5, lr} static bool isValueRecv = false; static uint8_t DI0OldState = 0; uint8_t DI0StateCurrent; DI0StateCurrent = get_state_din_outs(DIN1); 80295de: 2006 movs r0, #6 80295e0: f7ff fc5f bl 8028ea2 if (!isValueRecv) { 80295e4: 4a18 ldr r2, [pc, #96] ; (8029648 ) 80295e6: 4b19 ldr r3, [pc, #100] ; (802964c ) 80295e8: 7811 ldrb r1, [r2, #0] { static bool isValueRecv = false; static uint8_t DI0OldState = 0; uint8_t DI0StateCurrent; DI0StateCurrent = get_state_din_outs(DIN1); 80295ea: 4604 mov r4, r0 if (!isValueRecv) { 80295ec: b969 cbnz r1, 802960a isValueRecv = true; 80295ee: 2501 movs r5, #1 80295f0: 7015 strb r5, [r2, #0] DI0OldState = DI0StateCurrent; 80295f2: 7018 strb r0, [r3, #0] if (!DI0StateCurrent){ 80295f4: bb38 cbnz r0, 8029646 log_event_data(LOG_ALARM_DIO, "ÐвариÑ"); 80295f6: 2008 movs r0, #8 80295f8: 4915 ldr r1, [pc, #84] ; (8029650 ) 80295fa: f000 fc3d bl 8029e78 SNMP_SendUserTrap(DI0_ALARM); 80295fe: 2006 movs r0, #6 8029600: f00d ffa6 bl 8037550 flUpdateLog = true; 8029604: 4b13 ldr r3, [pc, #76] ; (8029654 ) 8029606: 701d strb r5, [r3, #0] 8029608: bd38 pop {r3, r4, r5, pc} } return; } if (!DI0StateCurrent) 802960a: b910 cbnz r0, 8029612 flCriticalAlarm = true; 802960c: 4a12 ldr r2, [pc, #72] ; (8029658 ) 802960e: 2101 movs r1, #1 8029610: 7011 strb r1, [r2, #0] // Значение параметра изменилоÑÑŒ if (DI0StateCurrent != DI0OldState) 8029612: 781b ldrb r3, [r3, #0] 8029614: 42a3 cmp r3, r4 8029616: d014 beq.n 8029642 { if(sSettings.sInOuts.din_type_act[0] == SNMP_TRAP) 8029618: 4b10 ldr r3, [pc, #64] ; (802965c ) 802961a: f893 3376 ldrb.w r3, [r3, #886] ; 0x376 802961e: 2b02 cmp r3, #2 8029620: d10f bne.n 8029642 8029622: 4d0c ldr r5, [pc, #48] ; (8029654 ) { if (DI0StateCurrent){ log_event_data(LOG_ALARM_DIO, "Ðорма"); 8029624: 2008 movs r0, #8 // Значение параметра изменилоÑÑŒ if (DI0StateCurrent != DI0OldState) { if(sSettings.sInOuts.din_type_act[0] == SNMP_TRAP) { if (DI0StateCurrent){ 8029626: b124 cbz r4, 8029632 log_event_data(LOG_ALARM_DIO, "Ðорма"); 8029628: 490d ldr r1, [pc, #52] ; (8029660 ) 802962a: f000 fc25 bl 8029e78 SNMP_SendUserTrap(DI0_NORM); 802962e: 2005 movs r0, #5 8029630: e003 b.n 802963a flUpdateLog = true; } else{ log_event_data(LOG_ALARM_DIO, "ÐвариÑ"); 8029632: 4907 ldr r1, [pc, #28] ; (8029650 ) 8029634: f000 fc20 bl 8029e78 SNMP_SendUserTrap(DI0_ALARM); 8029638: 2006 movs r0, #6 802963a: f00d ff89 bl 8037550 flUpdateLog = true; 802963e: 2301 movs r3, #1 8029640: 702b strb r3, [r5, #0] } } } DI0OldState = DI0StateCurrent; 8029642: 4b02 ldr r3, [pc, #8] ; (802964c ) 8029644: 701c strb r4, [r3, #0] 8029646: bd38 pop {r3, r4, r5, pc} 8029648: 20000b5d .word 0x20000b5d 802964c: 20000b5a .word 0x20000b5a 8029650: 08038b01 .word 0x08038b01 8029654: 20000bc4 .word 0x20000bc4 8029658: 20000b61 .word 0x20000b61 802965c: 2000cba0 .word 0x2000cba0 8029660: 08038b0e .word 0x08038b0e 08029664 : /** * @brief Мониторинг бита CriticalAlarm */ void UPS_CriticalAlarmMonitor(void) { 8029664: b5f0 push {r4, r5, r6, r7, lr} 8029666: 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); 8029668: 2100 movs r1, #0 802966a: 4668 mov r0, sp 802966c: 221e movs r2, #30 802966e: f7f8 fb97 bl 8021da0 CurrRO1type_Sourse = sSettings.sInOuts.ro_type_source[0]; 8029672: 4b45 ldr r3, [pc, #276] ; (8029788 ) 8029674: f893 5374 ldrb.w r5, [r3, #884] ; 0x374 CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; 8029678: f893 7375 ldrb.w r7, [r3, #885] ; 0x375 CriticalAlarmCurrent = flCriticalAlarm; 802967c: 4b43 ldr r3, [pc, #268] ; (802978c ) 802967e: 781c ldrb r4, [r3, #0] if (!isValueRecv) { 8029680: 4b43 ldr r3, [pc, #268] ; (8029790 ) 8029682: 7819 ldrb r1, [r3, #0] 8029684: bb29 cbnz r1, 80296d2 isValueRecv = true; 8029686: 2201 movs r2, #1 8029688: 701a strb r2, [r3, #0] CriticalAlarmOldState = CriticalAlarmCurrent; 802968a: 4b42 ldr r3, [pc, #264] ; (8029794 ) 802968c: 701c strb r4, [r3, #0] OldRO0type_Sourse = CurrRO1type_Sourse; 802968e: 4b42 ldr r3, [pc, #264] ; (8029798 ) 8029690: 701d strb r5, [r3, #0] OldRO2type_Sourse = CurrRO2type_Sourse; 8029692: 4b42 ldr r3, [pc, #264] ; (802979c ) if(OldRO0type_Sourse == CRITICAL){ 8029694: 4295 cmp r5, r2 if (!isValueRecv) { isValueRecv = true; CriticalAlarmOldState = CriticalAlarmCurrent; OldRO0type_Sourse = CurrRO1type_Sourse; OldRO2type_Sourse = CurrRO2type_Sourse; 8029696: 701f strb r7, [r3, #0] if(OldRO0type_Sourse == CRITICAL){ 8029698: d10a bne.n 80296b0 if(CriticalAlarmCurrent){ 802969a: b14c cbz r4, 80296b0 SetROInt(1, 0); 802969c: 4628 mov r0, r5 802969e: f7ff f890 bl 80287c2 SNMP_SendUserTrap(DO0_TOGGLED); 80296a2: 2007 movs r0, #7 80296a4: f00d ff54 bl 8037550 log_event_data(LOG_DO0_STATE, "Замкнуто"); 80296a8: 2009 movs r0, #9 80296aa: 493d ldr r1, [pc, #244] ; (80297a0 ) 80296ac: f000 fbe4 bl 8029e78 } } if(OldRO2type_Sourse == CRITICAL){ 80296b0: 4b3a ldr r3, [pc, #232] ; (802979c ) 80296b2: 7818 ldrb r0, [r3, #0] 80296b4: 2801 cmp r0, #1 80296b6: d165 bne.n 8029784 if(CriticalAlarmCurrent){ 80296b8: 2c00 cmp r4, #0 80296ba: d063 beq.n 8029784 SetROInt(1, 1); 80296bc: 4601 mov r1, r0 80296be: f7ff f880 bl 80287c2 SNMP_SendUserTrap(DO1_TOGGLED); 80296c2: 2008 movs r0, #8 80296c4: f00d ff44 bl 8037550 log_event_data(LOG_DO1_STATE, "Замкнуто"); 80296c8: 200a movs r0, #10 80296ca: 4935 ldr r1, [pc, #212] ; (80297a0 ) 80296cc: f000 fbd4 bl 8029e78 80296d0: e058 b.n 8029784 } } return; } if(CriticalAlarmCurrent){ 80296d2: b154 cbz r4, 80296ea if (UPS.Present) 80296d4: 4b33 ldr r3, [pc, #204] ; (80297a4 ) 80296d6: f893 302c ldrb.w r3, [r3, #44] ; 0x2c LED_Toggle(LED_MAJOR_R); 80296da: 200b movs r0, #11 } return; } if(CriticalAlarmCurrent){ if (UPS.Present) 80296dc: b113 cbz r3, 80296e4 LED_Toggle(LED_MAJOR_R); 80296de: f7ff fb6d bl 8028dbc 80296e2: e005 b.n 80296f0 else LED_On(LED_MAJOR_R); 80296e4: f7ff fb30 bl 8028d48 80296e8: e002 b.n 80296f0 } else{ LED_Off(LED_MAJOR_R); 80296ea: 200b movs r0, #11 80296ec: f7ff fb2f bl 8028d4e } // Значение параметра изменилоÑÑŒ if (CriticalAlarmCurrent != CriticalAlarmOldState) 80296f0: 4b28 ldr r3, [pc, #160] ; (8029794 ) 80296f2: 781b ldrb r3, [r3, #0] 80296f4: 42a3 cmp r3, r4 80296f6: d03f beq.n 8029778 { if(OldRO0type_Sourse == CRITICAL){ 80296f8: 4b27 ldr r3, [pc, #156] ; (8029798 ) 80296fa: 781e ldrb r6, [r3, #0] 80296fc: 2e01 cmp r6, #1 80296fe: d11b bne.n 8029738 memset(str, 0, 30); 8029700: 4668 mov r0, sp 8029702: 2100 movs r1, #0 8029704: 221e movs r2, #30 8029706: f7f8 fb4b bl 8021da0 if(CriticalAlarmCurrent){ 802970a: b134 cbz r4, 802971a SetROInt(1, 0); 802970c: 4630 mov r0, r6 802970e: 2100 movs r1, #0 8029710: f7ff f857 bl 80287c2 strcat(str, "Замкнуто"); 8029714: 4668 mov r0, sp 8029716: 4922 ldr r1, [pc, #136] ; (80297a0 ) 8029718: e005 b.n 8029726 } else{ SetROInt(0, 0); 802971a: 4620 mov r0, r4 802971c: 4621 mov r1, r4 802971e: f7ff f850 bl 80287c2 strcat(str, "Разомкнуто"); 8029722: 4921 ldr r1, [pc, #132] ; (80297a8 ) 8029724: 4668 mov r0, sp 8029726: f7f8 fba1 bl 8021e6c } SNMP_SendUserTrap(DO0_TOGGLED); 802972a: 2007 movs r0, #7 802972c: f00d ff10 bl 8037550 log_event_data(LOG_DO0_STATE, str); 8029730: 2009 movs r0, #9 8029732: 4669 mov r1, sp 8029734: f000 fba0 bl 8029e78 } if(OldRO2type_Sourse == CRITICAL){ 8029738: 4b18 ldr r3, [pc, #96] ; (802979c ) 802973a: 781e ldrb r6, [r3, #0] 802973c: 2e01 cmp r6, #1 802973e: d11b bne.n 8029778 memset(str, 0, 30); 8029740: 4668 mov r0, sp 8029742: 2100 movs r1, #0 8029744: 221e movs r2, #30 8029746: f7f8 fb2b bl 8021da0 if(CriticalAlarmCurrent){ 802974a: b134 cbz r4, 802975a SetROInt(1, 1); 802974c: 4630 mov r0, r6 802974e: 4631 mov r1, r6 8029750: f7ff f837 bl 80287c2 strcat(str, "Замкнуто"); 8029754: 4668 mov r0, sp 8029756: 4912 ldr r1, [pc, #72] ; (80297a0 ) 8029758: e005 b.n 8029766 } else{ SetROInt(0, 1); 802975a: 4620 mov r0, r4 802975c: 4631 mov r1, r6 802975e: f7ff f830 bl 80287c2 strcat(str, "Разомкнуто"); 8029762: 4911 ldr r1, [pc, #68] ; (80297a8 ) 8029764: 4668 mov r0, sp 8029766: f7f8 fb81 bl 8021e6c } SNMP_SendUserTrap(DO1_TOGGLED); 802976a: 2008 movs r0, #8 802976c: f00d fef0 bl 8037550 log_event_data(LOG_DO1_STATE, str); 8029770: 200a movs r0, #10 8029772: 4669 mov r1, sp 8029774: f000 fb80 bl 8029e78 SNMP_SendUserTrap(DO1_TOGGLED); log_event_data(LOG_DO1_STATE, str); } } OldRO0type_Sourse = CurrRO1type_Sourse; 8029778: 4b07 ldr r3, [pc, #28] ; (8029798 ) 802977a: 701d strb r5, [r3, #0] OldRO2type_Sourse = CurrRO2type_Sourse; 802977c: 4b07 ldr r3, [pc, #28] ; (802979c ) 802977e: 701f strb r7, [r3, #0] CriticalAlarmOldState = CriticalAlarmCurrent; 8029780: 4b04 ldr r3, [pc, #16] ; (8029794 ) 8029782: 701c strb r4, [r3, #0] } 8029784: b009 add sp, #36 ; 0x24 8029786: bdf0 pop {r4, r5, r6, r7, pc} 8029788: 2000cba0 .word 0x2000cba0 802978c: 20000b61 .word 0x20000b61 8029790: 20000b5e .word 0x20000b5e 8029794: 20000b60 .word 0x20000b60 8029798: 20000b56 .word 0x20000b56 802979c: 20000b59 .word 0x20000b59 80297a0: 08038b19 .word 0x08038b19 80297a4: 2000cf64 .word 0x2000cf64 80297a8: 08038b2a .word 0x08038b2a 080297ac : /** * @brief Мониторинг бита NonCriticalAlarm */ void UPS_NonCriticalAlarmMonitor(void) { 80297ac: b5f0 push {r4, r5, r6, r7, lr} 80297ae: 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); 80297b0: 2100 movs r1, #0 80297b2: 221e movs r2, #30 80297b4: 4668 mov r0, sp 80297b6: f7f8 faf3 bl 8021da0 CurrRO1type_Sourse = sSettings.sInOuts.ro_type_source[0]; CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; NonCriticalAlarmCurrent = flNonCriticalAlarm; if (!isValueRecv) { 80297ba: 4f3d ldr r7, [pc, #244] ; (80298b0 ) 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]; 80297bc: 4b3d ldr r3, [pc, #244] ; (80298b4 ) CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; NonCriticalAlarmCurrent = flNonCriticalAlarm; if (!isValueRecv) { 80297be: 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]; 80297c0: f893 5374 ldrb.w r5, [r3, #884] ; 0x374 CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; 80297c4: f893 6375 ldrb.w r6, [r3, #885] ; 0x375 NonCriticalAlarmCurrent = flNonCriticalAlarm; 80297c8: 4b3b ldr r3, [pc, #236] ; (80298b8 ) 80297ca: 4a3c ldr r2, [pc, #240] ; (80298bc ) 80297cc: 781c ldrb r4, [r3, #0] 80297ce: 4b3c ldr r3, [pc, #240] ; (80298c0 ) if (!isValueRecv) { 80297d0: bb19 cbnz r1, 802981a isValueRecv = true; NonCriticalAlarmOldState = NonCriticalAlarmCurrent; OldRO0type_Sourse = CurrRO1type_Sourse; 80297d2: 701d strb r5, [r3, #0] OldRO2type_Sourse = CurrRO2type_Sourse; 80297d4: 4b3b ldr r3, [pc, #236] ; (80298c4 ) CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; NonCriticalAlarmCurrent = flNonCriticalAlarm; if (!isValueRecv) { isValueRecv = true; NonCriticalAlarmOldState = NonCriticalAlarmCurrent; 80297d6: 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; 80297d8: 2001 movs r0, #1 NonCriticalAlarmOldState = NonCriticalAlarmCurrent; OldRO0type_Sourse = CurrRO1type_Sourse; OldRO2type_Sourse = CurrRO2type_Sourse; if(OldRO0type_Sourse == NON_CRITICAL){ 80297da: 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; 80297dc: 7038 strb r0, [r7, #0] NonCriticalAlarmOldState = NonCriticalAlarmCurrent; OldRO0type_Sourse = CurrRO1type_Sourse; OldRO2type_Sourse = CurrRO2type_Sourse; 80297de: 701e strb r6, [r3, #0] if(OldRO0type_Sourse == NON_CRITICAL){ 80297e0: d109 bne.n 80297f6 if(NonCriticalAlarmCurrent){ 80297e2: b144 cbz r4, 80297f6 SetROInt(1, 0); 80297e4: f7fe ffed bl 80287c2 SNMP_SendUserTrap(DO0_TOGGLED); 80297e8: 2007 movs r0, #7 80297ea: f00d feb1 bl 8037550 log_event_data(LOG_DO0_STATE, "Замкнуто"); 80297ee: 2009 movs r0, #9 80297f0: 4935 ldr r1, [pc, #212] ; (80298c8 ) 80297f2: f000 fb41 bl 8029e78 } } if(OldRO2type_Sourse == NON_CRITICAL){ 80297f6: 4b33 ldr r3, [pc, #204] ; (80298c4 ) 80297f8: 781b ldrb r3, [r3, #0] 80297fa: 2b02 cmp r3, #2 80297fc: d155 bne.n 80298aa if(NonCriticalAlarmCurrent){ 80297fe: 2c00 cmp r4, #0 8029800: d053 beq.n 80298aa SetROInt(1, 1); 8029802: 2001 movs r0, #1 8029804: 4601 mov r1, r0 8029806: f7fe ffdc bl 80287c2 SNMP_SendUserTrap(DO1_TOGGLED); 802980a: 2008 movs r0, #8 802980c: f00d fea0 bl 8037550 log_event_data(LOG_DO1_STATE, "Замкнуто"); 8029810: 200a movs r0, #10 8029812: 492d ldr r1, [pc, #180] ; (80298c8 ) 8029814: f000 fb30 bl 8029e78 8029818: e047 b.n 80298aa } return; } // Значение параметра изменилоÑÑŒ if (NonCriticalAlarmCurrent != NonCriticalAlarmOldState) 802981a: 7812 ldrb r2, [r2, #0] 802981c: 42a2 cmp r2, r4 802981e: d03e beq.n 802989e { if(OldRO0type_Sourse == NON_CRITICAL){ 8029820: 781b ldrb r3, [r3, #0] 8029822: 2b02 cmp r3, #2 8029824: d11b bne.n 802985e memset(str, 0, 30); 8029826: 4668 mov r0, sp 8029828: 2100 movs r1, #0 802982a: 221e movs r2, #30 802982c: f7f8 fab8 bl 8021da0 if(NonCriticalAlarmCurrent){ 8029830: b134 cbz r4, 8029840 SetROInt(1, 0); 8029832: 2001 movs r0, #1 8029834: 2100 movs r1, #0 8029836: f7fe ffc4 bl 80287c2 strcat(str, "Замкнуто"); 802983a: 4668 mov r0, sp 802983c: 4922 ldr r1, [pc, #136] ; (80298c8 ) 802983e: e005 b.n 802984c } else{ SetROInt(0, 0); 8029840: 4620 mov r0, r4 8029842: 4621 mov r1, r4 8029844: f7fe ffbd bl 80287c2 strcat(str, "Разомкнуто"); 8029848: 4920 ldr r1, [pc, #128] ; (80298cc ) 802984a: 4668 mov r0, sp 802984c: f7f8 fb0e bl 8021e6c } SNMP_SendUserTrap(DO0_TOGGLED); 8029850: 2007 movs r0, #7 8029852: f00d fe7d bl 8037550 log_event_data(LOG_DO0_STATE, str); 8029856: 2009 movs r0, #9 8029858: 4669 mov r1, sp 802985a: f000 fb0d bl 8029e78 } if(OldRO2type_Sourse == NON_CRITICAL){ 802985e: 4b19 ldr r3, [pc, #100] ; (80298c4 ) 8029860: 781b ldrb r3, [r3, #0] 8029862: 2b02 cmp r3, #2 8029864: d11b bne.n 802989e memset(str, 0, 30); 8029866: 4668 mov r0, sp 8029868: 2100 movs r1, #0 802986a: 221e movs r2, #30 802986c: f7f8 fa98 bl 8021da0 if(NonCriticalAlarmCurrent){ 8029870: b134 cbz r4, 8029880 SetROInt(1, 1); 8029872: 2001 movs r0, #1 8029874: 4601 mov r1, r0 8029876: f7fe ffa4 bl 80287c2 strcat(str, "Разомкнуто"); 802987a: 4668 mov r0, sp 802987c: 4913 ldr r1, [pc, #76] ; (80298cc ) 802987e: e005 b.n 802988c } else{ SetROInt(0, 1); 8029880: 4620 mov r0, r4 8029882: 2101 movs r1, #1 8029884: f7fe ff9d bl 80287c2 strcat(str, "Замкнуто"); 8029888: 490f ldr r1, [pc, #60] ; (80298c8 ) 802988a: 4668 mov r0, sp 802988c: f7f8 faee bl 8021e6c } SNMP_SendUserTrap(DO1_TOGGLED); 8029890: 2008 movs r0, #8 8029892: f00d fe5d bl 8037550 log_event_data(LOG_DO1_STATE, str); 8029896: 200a movs r0, #10 8029898: 4669 mov r1, sp 802989a: f000 faed bl 8029e78 SNMP_SendUserTrap(DO1_TOGGLED); log_event_data(LOG_DO1_STATE, str); } } OldRO0type_Sourse = CurrRO1type_Sourse; 802989e: 4b08 ldr r3, [pc, #32] ; (80298c0 ) 80298a0: 701d strb r5, [r3, #0] OldRO2type_Sourse = CurrRO2type_Sourse; 80298a2: 4b08 ldr r3, [pc, #32] ; (80298c4 ) 80298a4: 701e strb r6, [r3, #0] NonCriticalAlarmOldState = NonCriticalAlarmCurrent; 80298a6: 4b05 ldr r3, [pc, #20] ; (80298bc ) 80298a8: 701c strb r4, [r3, #0] } 80298aa: b009 add sp, #36 ; 0x24 80298ac: bdf0 pop {r4, r5, r6, r7, pc} 80298ae: bf00 nop 80298b0: 20000b62 .word 0x20000b62 80298b4: 2000cba0 .word 0x2000cba0 80298b8: 20000b67 .word 0x20000b67 80298bc: 20000b69 .word 0x20000b69 80298c0: 20000b64 .word 0x20000b64 80298c4: 20000b5f .word 0x20000b5f 80298c8: 08038b19 .word 0x08038b19 80298cc: 08038b2a .word 0x08038b2a 080298d0 : /** * @brief Мониторинг бита LainFail */ void UPS_LineFailMonitor(void) { 80298d0: b538 push {r3, r4, r5, lr} static uint8_t lineFailOldState = 0; uint8_t lineFailCurrent; lineFailCurrent = (UPS.Status >> 7) & 0x01; if (!isValueRecv) { 80298d2: 4a17 ldr r2, [pc, #92] ; (8029930 ) { static bool isValueRecv = false; static uint8_t lineFailOldState = 0; uint8_t lineFailCurrent; lineFailCurrent = (UPS.Status >> 7) & 0x01; 80298d4: 4b17 ldr r3, [pc, #92] ; (8029934 ) if (!isValueRecv) { 80298d6: 7811 ldrb r1, [r2, #0] { static bool isValueRecv = false; static uint8_t lineFailOldState = 0; uint8_t lineFailCurrent; lineFailCurrent = (UPS.Status >> 7) & 0x01; 80298d8: 7cdc ldrb r4, [r3, #19] 80298da: 4b17 ldr r3, [pc, #92] ; (8029938 ) 80298dc: 09e4 lsrs r4, r4, #7 if (!isValueRecv) { 80298de: b969 cbnz r1, 80298fc isValueRecv = true; 80298e0: 2501 movs r5, #1 80298e2: 7015 strb r5, [r2, #0] lineFailOldState = lineFailCurrent; 80298e4: 701c strb r4, [r3, #0] if (lineFailCurrent){ 80298e6: b314 cbz r4, 802992e log_event_data(LOG_ALARM_LINE, "ÐвариÑ"); 80298e8: 200c movs r0, #12 80298ea: 4914 ldr r1, [pc, #80] ; (802993c ) 80298ec: f000 fac4 bl 8029e78 SNMP_SendUserTrap(LINE_ALARM); 80298f0: 200b movs r0, #11 80298f2: f00d fe2d bl 8037550 flUpdateLog = true; 80298f6: 4b12 ldr r3, [pc, #72] ; (8029940 ) 80298f8: 701d strb r5, [r3, #0] 80298fa: bd38 pop {r3, r4, r5, pc} } return; } if (lineFailCurrent) 80298fc: b114 cbz r4, 8029904 flCriticalAlarm = true; 80298fe: 4a11 ldr r2, [pc, #68] ; (8029944 ) 8029900: 2101 movs r1, #1 8029902: 7011 strb r1, [r2, #0] // Значение параметра изменилоÑÑŒ if (lineFailCurrent != lineFailOldState) 8029904: 781b ldrb r3, [r3, #0] 8029906: 42a3 cmp r3, r4 8029908: d00f beq.n 802992a 802990a: 4d0d ldr r5, [pc, #52] ; (8029940 ) { if (lineFailCurrent){ log_event_data(LOG_ALARM_LINE, "ÐвариÑ"); 802990c: 200c movs r0, #12 flCriticalAlarm = true; // Значение параметра изменилоÑÑŒ if (lineFailCurrent != lineFailOldState) { if (lineFailCurrent){ 802990e: b124 cbz r4, 802991a log_event_data(LOG_ALARM_LINE, "ÐвариÑ"); 8029910: 490a ldr r1, [pc, #40] ; (802993c ) 8029912: f000 fab1 bl 8029e78 SNMP_SendUserTrap(LINE_ALARM); 8029916: 200b movs r0, #11 8029918: e003 b.n 8029922 flUpdateLog = true; } else{ log_event_data(LOG_ALARM_LINE, "Ðорма"); 802991a: 490b ldr r1, [pc, #44] ; (8029948 ) 802991c: f000 faac bl 8029e78 SNMP_SendUserTrap(LINE_NORM); 8029920: 200c movs r0, #12 8029922: f00d fe15 bl 8037550 flUpdateLog = true; 8029926: 2301 movs r3, #1 8029928: 702b strb r3, [r5, #0] } } lineFailOldState = lineFailCurrent; 802992a: 4b03 ldr r3, [pc, #12] ; (8029938 ) 802992c: 701c strb r4, [r3, #0] 802992e: bd38 pop {r3, r4, r5, pc} 8029930: 20000b65 .word 0x20000b65 8029934: 2000cf64 .word 0x2000cf64 8029938: 20000b58 .word 0x20000b58 802993c: 08038b01 .word 0x08038b01 8029940: 20000bc4 .word 0x20000bc4 8029944: 20000b61 .word 0x20000b61 8029948: 08038b0e .word 0x08038b0e 0802994c : /** * @brief Мониторинг бита LowBat */ void UPS_LowBatMonitor(void) { 802994c: b538 push {r3, r4, r5, lr} static bool isValueRecv = false; static uint8_t lowBatOldState = 0; uint8_t lowBatCurrent; if((UPS.Status >> 7) & 0x01) 802994e: 4b19 ldr r3, [pc, #100] ; (80299b4 ) lowBatCurrent = (UPS.Status >> 6) & 0x01; else lowBatCurrent = 0; if (!isValueRecv) { 8029950: 4a19 ldr r2, [pc, #100] ; (80299b8 ) void UPS_LowBatMonitor(void) { static bool isValueRecv = false; static uint8_t lowBatOldState = 0; uint8_t lowBatCurrent; if((UPS.Status >> 7) & 0x01) 8029952: 7cdb ldrb r3, [r3, #19] lowBatCurrent = (UPS.Status >> 6) & 0x01; else lowBatCurrent = 0; if (!isValueRecv) { 8029954: 7811 ldrb r1, [r2, #0] void UPS_LowBatMonitor(void) { static bool isValueRecv = false; static uint8_t lowBatOldState = 0; uint8_t lowBatCurrent; if((UPS.Status >> 7) & 0x01) 8029956: 09dc lsrs r4, r3, #7 lowBatCurrent = (UPS.Status >> 6) & 0x01; 8029958: bf18 it ne 802995a: f3c3 1480 ubfxne r4, r3, #6, #1 802995e: 4b17 ldr r3, [pc, #92] ; (80299bc ) else lowBatCurrent = 0; if (!isValueRecv) { 8029960: b969 cbnz r1, 802997e isValueRecv = true; 8029962: 2501 movs r5, #1 8029964: 7015 strb r5, [r2, #0] lowBatOldState = lowBatCurrent; 8029966: 701c strb r4, [r3, #0] if (lowBatCurrent){ 8029968: b31c cbz r4, 80299b2 log_event_data(LOG_ALARM_LOW_BAT, "ÐвариÑ"); 802996a: 200d movs r0, #13 802996c: 4914 ldr r1, [pc, #80] ; (80299c0 ) 802996e: f000 fa83 bl 8029e78 SNMP_SendUserTrap(LOW_BAT_ALARM); 8029972: 200d movs r0, #13 8029974: f00d fdec bl 8037550 flUpdateLog = true; 8029978: 4b12 ldr r3, [pc, #72] ; (80299c4 ) 802997a: 701d strb r5, [r3, #0] 802997c: bd38 pop {r3, r4, r5, pc} } return; } if (lowBatCurrent) 802997e: b114 cbz r4, 8029986 flNonCriticalAlarm = true; 8029980: 4a11 ldr r2, [pc, #68] ; (80299c8 ) 8029982: 2101 movs r1, #1 8029984: 7011 strb r1, [r2, #0] // Значение параметра изменилоÑÑŒ if (lowBatCurrent != lowBatOldState) 8029986: 781b ldrb r3, [r3, #0] 8029988: 42a3 cmp r3, r4 802998a: d010 beq.n 80299ae 802998c: 4d0d ldr r5, [pc, #52] ; (80299c4 ) { if (lowBatCurrent){ 802998e: b12c cbz r4, 802999c SNMP_SendUserTrap(LOW_BAT_ALARM); 8029990: 200d movs r0, #13 8029992: f00d fddd bl 8037550 log_event_data(LOG_ALARM_LOW_BAT, "ÐвариÑ"); 8029996: 200d movs r0, #13 8029998: 4909 ldr r1, [pc, #36] ; (80299c0 ) 802999a: e004 b.n 80299a6 flUpdateLog = true; } else{ SNMP_SendUserTrap(LOW_BAT_NORM); 802999c: 200e movs r0, #14 802999e: f00d fdd7 bl 8037550 log_event_data(LOG_ALARM_LOW_BAT, "Ðорма"); 80299a2: 490a ldr r1, [pc, #40] ; (80299cc ) 80299a4: 200d movs r0, #13 80299a6: f000 fa67 bl 8029e78 flUpdateLog = true; 80299aa: 2301 movs r3, #1 80299ac: 702b strb r3, [r5, #0] } } lowBatOldState = lowBatCurrent; 80299ae: 4b03 ldr r3, [pc, #12] ; (80299bc ) 80299b0: 701c strb r4, [r3, #0] 80299b2: bd38 pop {r3, r4, r5, pc} 80299b4: 2000cf64 .word 0x2000cf64 80299b8: 20000b68 .word 0x20000b68 80299bc: 20000b5b .word 0x20000b5b 80299c0: 08038b01 .word 0x08038b01 80299c4: 20000bc4 .word 0x20000bc4 80299c8: 20000b67 .word 0x20000b67 80299cc: 08038b0e .word 0x08038b0e 080299d0 : /** * @brief Мониторинг нагрузки */ void UPS_PowerMonitor(void) { 80299d0: b538 push {r3, r4, r5, lr} float load; static uint8_t stateCurrent = HYST_IDLE; load = UPS.Load; 80299d2: 4c22 ldr r4, [pc, #136] ; (8029a5c ) 80299d4: 7c20 ldrb r0, [r4, #16] 80299d6: f7f7 f9db bl 8020d90 <__aeabi_ui2f> /* ОтÑлеживаетÑÑ Ð¿ÐµÑ€ÐµÑ…Ð¾Ð´ через верхнюю границу */ if (load > UPS_LOAD) 80299da: 4921 ldr r1, [pc, #132] ; (8029a60 ) void UPS_PowerMonitor(void) { float load; static uint8_t stateCurrent = HYST_IDLE; load = UPS.Load; 80299dc: 4605 mov r5, r0 /* ОтÑлеживаетÑÑ Ð¿ÐµÑ€ÐµÑ…Ð¾Ð´ через верхнюю границу */ if (load > UPS_LOAD) 80299de: f7f7 fbeb bl 80211b8 <__aeabi_fcmpgt> 80299e2: b1d8 cbz r0, 8029a1c { flCriticalAlarm = true; 80299e4: 4b1f ldr r3, [pc, #124] ; (8029a64 ) 80299e6: 2501 movs r5, #1 80299e8: 701d strb r5, [r3, #0] UPS.Alarm = (UPS.Alarm & 0x0e) | (1 << 0); 80299ea: 7d23 ldrb r3, [r4, #20] 80299ec: f003 030e and.w r3, r3, #14 80299f0: 432b orrs r3, r5 80299f2: 7523 strb r3, [r4, #20] if (stateCurrent == HYST_IDLE) 80299f4: 4c1c ldr r4, [pc, #112] ; (8029a68 ) 80299f6: 7823 ldrb r3, [r4, #0] 80299f8: bb73 cbnz r3, 8029a58 { LED_On(LED_MINOR_R); 80299fa: 200d movs r0, #13 80299fc: f7ff f9a4 bl 8028d48 LED_On(LED_MINOR_G); 8029a00: 200c movs r0, #12 8029a02: f7ff f9a1 bl 8028d48 stateCurrent = HYST_UP; log_event_data(LOG_ALARM_POWER, "ÐвариÑ"); 8029a06: 200e movs r0, #14 8029a08: 4918 ldr r1, [pc, #96] ; (8029a6c ) UPS.Alarm = (UPS.Alarm & 0x0e) | (1 << 0); if (stateCurrent == HYST_IDLE) { LED_On(LED_MINOR_R); LED_On(LED_MINOR_G); stateCurrent = HYST_UP; 8029a0a: 7025 strb r5, [r4, #0] log_event_data(LOG_ALARM_POWER, "ÐвариÑ"); 8029a0c: f000 fa34 bl 8029e78 // Отправка трапа о завышении SNMP_SendUserTrap(POWER_ALARM); 8029a10: 200f movs r0, #15 8029a12: f00d fd9d bl 8037550 flUpdateLog = true; 8029a16: 4b16 ldr r3, [pc, #88] ; (8029a70 ) 8029a18: 701d strb r5, [r3, #0] 8029a1a: bd38 pop {r3, r4, r5, pc} } } /* ОтÑлеживаетÑÑ Ð½Ð¾Ñ€Ð¼Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ */ else if (load < (UPS_LOAD - UPS_LOAD_HIST)) 8029a1c: 4628 mov r0, r5 8029a1e: 4915 ldr r1, [pc, #84] ; (8029a74 ) 8029a20: f7f7 fbac bl 802117c <__aeabi_fcmplt> 8029a24: b1c0 cbz r0, 8029a58 { UPS.Alarm = (UPS.Alarm & 0x0e); 8029a26: 7d23 ldrb r3, [r4, #20] if (stateCurrent == HYST_UP) 8029a28: 4d0f ldr r5, [pc, #60] ; (8029a68 ) } } /* ОтÑлеживаетÑÑ Ð½Ð¾Ñ€Ð¼Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ */ else if (load < (UPS_LOAD - UPS_LOAD_HIST)) { UPS.Alarm = (UPS.Alarm & 0x0e); 8029a2a: f003 030e and.w r3, r3, #14 8029a2e: 7523 strb r3, [r4, #20] if (stateCurrent == HYST_UP) 8029a30: 782c ldrb r4, [r5, #0] 8029a32: 2c01 cmp r4, #1 8029a34: d110 bne.n 8029a58 { LED_Off(LED_MINOR_R); 8029a36: 200d movs r0, #13 8029a38: f7ff f989 bl 8028d4e LED_Off(LED_MINOR_G); 8029a3c: 200c movs r0, #12 8029a3e: f7ff f986 bl 8028d4e stateCurrent = HYST_IDLE; 8029a42: 2300 movs r3, #0 log_event_data(LOG_ALARM_POWER, "Ðорма"); 8029a44: 200e movs r0, #14 8029a46: 490c ldr r1, [pc, #48] ; (8029a78 ) UPS.Alarm = (UPS.Alarm & 0x0e); if (stateCurrent == HYST_UP) { LED_Off(LED_MINOR_R); LED_Off(LED_MINOR_G); stateCurrent = HYST_IDLE; 8029a48: 702b strb r3, [r5, #0] log_event_data(LOG_ALARM_POWER, "Ðорма"); 8029a4a: f000 fa15 bl 8029e78 // Отправка трапа о нормализации SNMP_SendUserTrap(POWER_NORM); 8029a4e: 2010 movs r0, #16 8029a50: f00d fd7e bl 8037550 flUpdateLog = true; 8029a54: 4b06 ldr r3, [pc, #24] ; (8029a70 ) 8029a56: 701c strb r4, [r3, #0] 8029a58: bd38 pop {r3, r4, r5, pc} 8029a5a: bf00 nop 8029a5c: 2000cf64 .word 0x2000cf64 8029a60: 428c0000 .word 0x428c0000 8029a64: 20000b61 .word 0x20000b61 8029a68: 20000b5c .word 0x20000b5c 8029a6c: 08038b01 .word 0x08038b01 8029a70: 20000bc4 .word 0x20000bc4 8029a74: 428a0000 .word 0x428a0000 8029a78: 08038b0e .word 0x08038b0e 08029a7c : /** * @brief Мониторинг температуры */ void UPS_TemperatureMonitor(void) { 8029a7c: b538 push {r3, r4, r5, lr} float temperature; static uint8_t stateCurrent = HYST_IDLE; temperature = UPS.Temp; 8029a7e: 4c1b ldr r4, [pc, #108] ; (8029aec ) /* ОтÑлеживаетÑÑ Ð¿ÐµÑ€ÐµÑ…Ð¾Ð´ через верхнюю границу */ if (temperature > UPS_TEMPERATURE) 8029a80: 491b ldr r1, [pc, #108] ; (8029af0 ) void UPS_TemperatureMonitor(void) { float temperature; static uint8_t stateCurrent = HYST_IDLE; temperature = UPS.Temp; 8029a82: 68e5 ldr r5, [r4, #12] /* ОтÑлеживаетÑÑ Ð¿ÐµÑ€ÐµÑ…Ð¾Ð´ через верхнюю границу */ if (temperature > UPS_TEMPERATURE) 8029a84: 4628 mov r0, r5 8029a86: f7f7 fb97 bl 80211b8 <__aeabi_fcmpgt> 8029a8a: b1b0 cbz r0, 8029aba { flCriticalAlarm = true; 8029a8c: 4b19 ldr r3, [pc, #100] ; (8029af4 ) 8029a8e: 2501 movs r5, #1 8029a90: 701d strb r5, [r3, #0] UPS.Alarm = (UPS.Alarm & 0x0d) | (1 << 1); 8029a92: 7d23 ldrb r3, [r4, #20] 8029a94: f003 030d and.w r3, r3, #13 8029a98: f043 0302 orr.w r3, r3, #2 8029a9c: 7523 strb r3, [r4, #20] if (stateCurrent == HYST_IDLE) 8029a9e: 4b16 ldr r3, [pc, #88] ; (8029af8 ) 8029aa0: 781a ldrb r2, [r3, #0] 8029aa2: bb12 cbnz r2, 8029aea { stateCurrent = HYST_UP; log_event_data(LOG_ALARM_TEMP, "ÐвариÑ"); 8029aa4: 200b movs r0, #11 8029aa6: 4915 ldr r1, [pc, #84] ; (8029afc ) { flCriticalAlarm = true; UPS.Alarm = (UPS.Alarm & 0x0d) | (1 << 1); if (stateCurrent == HYST_IDLE) { stateCurrent = HYST_UP; 8029aa8: 701d strb r5, [r3, #0] log_event_data(LOG_ALARM_TEMP, "ÐвариÑ"); 8029aaa: f000 f9e5 bl 8029e78 // Отправка трапа о завышении SNMP_SendUserTrap(BATTERY_TEMPERATURE_ALARM); 8029aae: 200a movs r0, #10 8029ab0: f00d fd4e bl 8037550 flUpdateLog = true; 8029ab4: 4b12 ldr r3, [pc, #72] ; (8029b00 ) 8029ab6: 701d strb r5, [r3, #0] 8029ab8: bd38 pop {r3, r4, r5, pc} } } /* ОтÑлеживаетÑÑ Ð½Ð¾Ñ€Ð¼Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ */ else if (temperature < (UPS_TEMPERATURE - UPS_TEMPERATURE_HIST)) 8029aba: 4628 mov r0, r5 8029abc: 4911 ldr r1, [pc, #68] ; (8029b04 ) 8029abe: f7f7 fb5d bl 802117c <__aeabi_fcmplt> 8029ac2: b190 cbz r0, 8029aea { UPS.Alarm = (UPS.Alarm & 0x0d); 8029ac4: 7d23 ldrb r3, [r4, #20] 8029ac6: f003 030d and.w r3, r3, #13 8029aca: 7523 strb r3, [r4, #20] if (stateCurrent == HYST_UP) 8029acc: 4b0a ldr r3, [pc, #40] ; (8029af8 ) 8029ace: 781c ldrb r4, [r3, #0] 8029ad0: 2c01 cmp r4, #1 8029ad2: d10a bne.n 8029aea { stateCurrent = HYST_IDLE; 8029ad4: 2200 movs r2, #0 log_event_data(LOG_ALARM_TEMP, "Ðорма"); 8029ad6: 200b movs r0, #11 8029ad8: 490b ldr r1, [pc, #44] ; (8029b08 ) else if (temperature < (UPS_TEMPERATURE - UPS_TEMPERATURE_HIST)) { UPS.Alarm = (UPS.Alarm & 0x0d); if (stateCurrent == HYST_UP) { stateCurrent = HYST_IDLE; 8029ada: 701a strb r2, [r3, #0] log_event_data(LOG_ALARM_TEMP, "Ðорма"); 8029adc: f000 f9cc bl 8029e78 // Отправка трапа о нормализации SNMP_SendUserTrap(BATTERY_TEMPERATURE_NORM); 8029ae0: 2009 movs r0, #9 8029ae2: f00d fd35 bl 8037550 flUpdateLog = true; 8029ae6: 4b06 ldr r3, [pc, #24] ; (8029b00 ) 8029ae8: 701c strb r4, [r3, #0] 8029aea: bd38 pop {r3, r4, r5, pc} 8029aec: 2000cf64 .word 0x2000cf64 8029af0: 42200000 .word 0x42200000 8029af4: 20000b61 .word 0x20000b61 8029af8: 20000b6a .word 0x20000b6a 8029afc: 08038b01 .word 0x08038b01 8029b00: 20000bc4 .word 0x20000bc4 8029b04: 421c0000 .word 0x421c0000 8029b08: 08038b0e .word 0x08038b0e 08029b0c : /** * @brief Мониторинг параметра upsParams.connect */ void UPS_ConnectMonitor(void) { 8029b0c: b538 push {r3, r4, r5, lr} static bool isValueRecv = false; static uint8_t connectOldState = 0; uint8_t connectCurrent; connectCurrent = UPS.Present; 8029b0e: 4b1b ldr r3, [pc, #108] ; (8029b7c ) UPS.Alarm = (UPS.Alarm & 0x0b) | ((connectCurrent^1) << 2); 8029b10: 7d1a ldrb r2, [r3, #20] { static bool isValueRecv = false; static uint8_t connectOldState = 0; uint8_t connectCurrent; connectCurrent = UPS.Present; 8029b12: f893 402c ldrb.w r4, [r3, #44] ; 0x2c UPS.Alarm = (UPS.Alarm & 0x0b) | ((connectCurrent^1) << 2); 8029b16: f002 020b and.w r2, r2, #11 8029b1a: f084 0101 eor.w r1, r4, #1 8029b1e: ea42 0281 orr.w r2, r2, r1, lsl #2 8029b22: 751a strb r2, [r3, #20] if (!isValueRecv) { 8029b24: 4a16 ldr r2, [pc, #88] ; (8029b80 ) 8029b26: 4b17 ldr r3, [pc, #92] ; (8029b84 ) 8029b28: 7811 ldrb r1, [r2, #0] 8029b2a: b969 cbnz r1, 8029b48 isValueRecv = true; 8029b2c: 2501 movs r5, #1 8029b2e: 7015 strb r5, [r2, #0] connectOldState = connectCurrent; 8029b30: 701c strb r4, [r3, #0] if (!connectCurrent){ 8029b32: bb14 cbnz r4, 8029b7a log_event_data(LOG_ALARM_UPS, "ÐвариÑ"); 8029b34: 200f movs r0, #15 8029b36: 4914 ldr r1, [pc, #80] ; (8029b88 ) 8029b38: f000 f99e bl 8029e78 SNMP_SendUserTrap(CONNECT_MONITOR_ALARM); 8029b3c: 2011 movs r0, #17 8029b3e: f00d fd07 bl 8037550 flUpdateLog = true; 8029b42: 4b12 ldr r3, [pc, #72] ; (8029b8c ) 8029b44: 701d strb r5, [r3, #0] 8029b46: bd38 pop {r3, r4, r5, pc} } return; } if (!connectCurrent) 8029b48: b914 cbnz r4, 8029b50 flCriticalAlarm = true; 8029b4a: 4a11 ldr r2, [pc, #68] ; (8029b90 ) 8029b4c: 2101 movs r1, #1 8029b4e: 7011 strb r1, [r2, #0] // Значение параметра изменилоÑÑŒ if (connectCurrent != connectOldState) 8029b50: 781b ldrb r3, [r3, #0] 8029b52: 42a3 cmp r3, r4 8029b54: d00f beq.n 8029b76 8029b56: 4d0d ldr r5, [pc, #52] ; (8029b8c ) { if (connectCurrent){ log_event_data(LOG_ALARM_UPS, "Ðорма"); 8029b58: 200f movs r0, #15 if (!connectCurrent) flCriticalAlarm = true; // Значение параметра изменилоÑÑŒ if (connectCurrent != connectOldState) { if (connectCurrent){ 8029b5a: b124 cbz r4, 8029b66 log_event_data(LOG_ALARM_UPS, "Ðорма"); 8029b5c: 490d ldr r1, [pc, #52] ; (8029b94 ) 8029b5e: f000 f98b bl 8029e78 SNMP_SendUserTrap(CONNECT_MONITOR_NORM); 8029b62: 2012 movs r0, #18 8029b64: e003 b.n 8029b6e flUpdateLog = true; } else{ log_event_data(LOG_ALARM_UPS, "ÐвариÑ"); 8029b66: 4908 ldr r1, [pc, #32] ; (8029b88 ) 8029b68: f000 f986 bl 8029e78 SNMP_SendUserTrap(CONNECT_MONITOR_ALARM); 8029b6c: 2011 movs r0, #17 8029b6e: f00d fcef bl 8037550 flUpdateLog = true; 8029b72: 2301 movs r3, #1 8029b74: 702b strb r3, [r5, #0] } } connectOldState = connectCurrent; 8029b76: 4b03 ldr r3, [pc, #12] ; (8029b84 ) 8029b78: 701c strb r4, [r3, #0] 8029b7a: bd38 pop {r3, r4, r5, pc} 8029b7c: 2000cf64 .word 0x2000cf64 8029b80: 20000b57 .word 0x20000b57 8029b84: 20000b6b .word 0x20000b6b 8029b88: 08038b01 .word 0x08038b01 8029b8c: 20000bc4 .word 0x20000bc4 8029b90: 20000b61 .word 0x20000b61 8029b94: 08038b0e .word 0x08038b0e 08029b98 : /** * @brief Мониторинг параметра upsParams.connect */ void UPS_BatteryConnectMonitor(void) { 8029b98: b538 push {r3, r4, r5, lr} static bool isValueRecv = false; static uint8_t AKBconnectOldState = 0; uint8_t AKBconnectCurrent; if(((UPS.Status >> 7) & 0x01) == 0) 8029b9a: 4b1d ldr r3, [pc, #116] ; (8029c10 ) 8029b9c: 7cdc ldrb r4, [r3, #19] 8029b9e: 09e2 lsrs r2, r4, #7 AKBconnectCurrent = (UPS.Status >> 6) & 0x01; else{ AKBconnectCurrent = 0; } UPS.Alarm = (UPS.Alarm & 0x07) | (AKBconnectCurrent << 3); 8029ba0: 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; 8029ba2: bf08 it eq 8029ba4: f3c4 1480 ubfxeq r4, r4, #6, #1 else{ AKBconnectCurrent = 0; } UPS.Alarm = (UPS.Alarm & 0x07) | (AKBconnectCurrent << 3); 8029ba8: f002 0207 and.w r2, r2, #7 uint8_t AKBconnectCurrent; if(((UPS.Status >> 7) & 0x01) == 0) AKBconnectCurrent = (UPS.Status >> 6) & 0x01; else{ AKBconnectCurrent = 0; 8029bac: bf18 it ne 8029bae: 2400 movne r4, #0 } UPS.Alarm = (UPS.Alarm & 0x07) | (AKBconnectCurrent << 3); 8029bb0: ea42 02c4 orr.w r2, r2, r4, lsl #3 8029bb4: 751a strb r2, [r3, #20] if (!isValueRecv) { 8029bb6: 4a17 ldr r2, [pc, #92] ; (8029c14 ) 8029bb8: 4b17 ldr r3, [pc, #92] ; (8029c18 ) 8029bba: 7811 ldrb r1, [r2, #0] 8029bbc: b969 cbnz r1, 8029bda isValueRecv = true; 8029bbe: 2501 movs r5, #1 8029bc0: 7015 strb r5, [r2, #0] AKBconnectOldState = AKBconnectCurrent; 8029bc2: 701c strb r4, [r3, #0] if (AKBconnectCurrent){ 8029bc4: b314 cbz r4, 8029c0c log_event_data(LOG_ALARM_AKB, "ÐвариÑ"); 8029bc6: 2010 movs r0, #16 8029bc8: 4914 ldr r1, [pc, #80] ; (8029c1c ) 8029bca: f000 f955 bl 8029e78 SNMP_SendUserTrap(BATTERY_CONNECT_ALARM); 8029bce: 2013 movs r0, #19 8029bd0: f00d fcbe bl 8037550 flUpdateLog = true; 8029bd4: 4b12 ldr r3, [pc, #72] ; (8029c20 ) 8029bd6: 701d strb r5, [r3, #0] 8029bd8: bd38 pop {r3, r4, r5, pc} } return; } if (AKBconnectCurrent) 8029bda: b114 cbz r4, 8029be2 flCriticalAlarm = true; 8029bdc: 4a11 ldr r2, [pc, #68] ; (8029c24 ) 8029bde: 2101 movs r1, #1 8029be0: 7011 strb r1, [r2, #0] // Значение параметра изменилоÑÑŒ if (AKBconnectCurrent != AKBconnectOldState) 8029be2: 781b ldrb r3, [r3, #0] 8029be4: 42a3 cmp r3, r4 8029be6: d00f beq.n 8029c08 8029be8: 4d0d ldr r5, [pc, #52] ; (8029c20 ) { if (!AKBconnectCurrent){ log_event_data(LOG_ALARM_AKB, "Ðорма"); 8029bea: 2010 movs r0, #16 if (AKBconnectCurrent) flCriticalAlarm = true; // Значение параметра изменилоÑÑŒ if (AKBconnectCurrent != AKBconnectOldState) { if (!AKBconnectCurrent){ 8029bec: b924 cbnz r4, 8029bf8 log_event_data(LOG_ALARM_AKB, "Ðорма"); 8029bee: 490e ldr r1, [pc, #56] ; (8029c28 ) 8029bf0: f000 f942 bl 8029e78 SNMP_SendUserTrap(BATTERY_CONNECT_NORM); 8029bf4: 2014 movs r0, #20 8029bf6: e003 b.n 8029c00 flUpdateLog = true; } else{ log_event_data(LOG_ALARM_AKB, "ÐвариÑ"); 8029bf8: 4908 ldr r1, [pc, #32] ; (8029c1c ) 8029bfa: f000 f93d bl 8029e78 SNMP_SendUserTrap(BATTERY_CONNECT_ALARM); 8029bfe: 2013 movs r0, #19 8029c00: f00d fca6 bl 8037550 flUpdateLog = true; 8029c04: 2301 movs r3, #1 8029c06: 702b strb r3, [r5, #0] } } AKBconnectOldState = AKBconnectCurrent; 8029c08: 4b03 ldr r3, [pc, #12] ; (8029c18 ) 8029c0a: 701c strb r4, [r3, #0] 8029c0c: bd38 pop {r3, r4, r5, pc} 8029c0e: bf00 nop 8029c10: 2000cf64 .word 0x2000cf64 8029c14: 20000b66 .word 0x20000b66 8029c18: 20000b63 .word 0x20000b63 8029c1c: 08038b01 .word 0x08038b01 8029c20: 20000bc4 .word 0x20000bc4 8029c24: 20000b61 .word 0x20000b61 8029c28: 08038b0e .word 0x08038b0e 08029c2c : /** * @brief Задача мониторинга параметров UPS */ void UPS_Monitor(void *params) { 8029c2c: b570 push {r4, r5, r6, lr} vTaskDelay(5000); 8029c2e: f241 3088 movw r0, #5000 ; 0x1388 8029c32: f001 fb97 bl 802b364 for (;;) { flCriticalAlarm = false; 8029c36: 4d10 ldr r5, [pc, #64] ; (8029c78 ) flNonCriticalAlarm = false; 8029c38: 4e10 ldr r6, [pc, #64] ; (8029c7c ) void UPS_Monitor(void *params) { vTaskDelay(5000); for (;;) { flCriticalAlarm = false; 8029c3a: 2400 movs r4, #0 flNonCriticalAlarm = false; // ПроверÑем флаг Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ UPS if (UPS.Present) 8029c3c: 4b10 ldr r3, [pc, #64] ; (8029c80 ) void UPS_Monitor(void *params) { vTaskDelay(5000); for (;;) { flCriticalAlarm = false; 8029c3e: 702c strb r4, [r5, #0] flNonCriticalAlarm = false; // ПроверÑем флаг Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ UPS if (UPS.Present) 8029c40: f893 302c ldrb.w r3, [r3, #44] ; 0x2c { vTaskDelay(5000); for (;;) { flCriticalAlarm = false; flNonCriticalAlarm = false; 8029c44: 7034 strb r4, [r6, #0] // ПроверÑем флаг Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ UPS if (UPS.Present) 8029c46: b14b cbz r3, 8029c5c { UPS_LineFailMonitor(); 8029c48: f7ff fe42 bl 80298d0 UPS_LowBatMonitor(); 8029c4c: f7ff fe7e bl 802994c UPS_PowerMonitor(); 8029c50: f7ff febe bl 80299d0 UPS_TemperatureMonitor(); 8029c54: f7ff ff12 bl 8029a7c UPS_BatteryConnectMonitor(); 8029c58: f7ff ff9e bl 8029b98 } UPS_ConnectMonitor(); 8029c5c: f7ff ff56 bl 8029b0c UPS_DI0Monitor(); 8029c60: f7ff fcbc bl 80295dc UPS_CriticalAlarmMonitor(); 8029c64: f7ff fcfe bl 8029664 UPS_NonCriticalAlarmMonitor(); 8029c68: f7ff fda0 bl 80297ac vTaskDelay(1000); 8029c6c: f44f 707a mov.w r0, #1000 ; 0x3e8 8029c70: f001 fb78 bl 802b364 } 8029c74: e7e2 b.n 8029c3c 8029c76: bf00 nop 8029c78: 20000b61 .word 0x20000b61 8029c7c: 20000b67 .word 0x20000b67 8029c80: 2000cf64 .word 0x2000cf64 08029c84 : } 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); 8029c84: 4608 mov r0, r1 8029c86: 4611 mov r1, r2 8029c88: 461a mov r2, r3 8029c8a: 2300 movs r3, #0 8029c8c: f7fc bfd8 b.w 8026c40 08029c90 : } 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); 8029c90: 4608 mov r0, r1 8029c92: 4611 mov r1, r2 8029c94: 461a mov r2, r3 8029c96: 2300 movs r3, #0 8029c98: f7fd b821 b.w 8026cde 08029c9c : #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); 8029c9c: 4608 mov r0, r1 8029c9e: 2100 movs r1, #0 8029ca0: f7fd b82d b.w 8026cfe 08029ca4 : return true; } } void log_task(void* params) { 8029ca4: b508 push {r3, lr} for(;;){ flUpdateLog = true; 8029ca6: 4c03 ldr r4, [pc, #12] ; (8029cb4 ) 8029ca8: 2501 movs r5, #1 vTaskDelay(LOG_TIME); 8029caa: 4803 ldr r0, [pc, #12] ; (8029cb8 ) } void log_task(void* params) { for(;;){ flUpdateLog = true; 8029cac: 7025 strb r5, [r4, #0] vTaskDelay(LOG_TIME); 8029cae: f001 fb59 bl 802b364 8029cb2: e7fa b.n 8029caa 8029cb4: 20000bc4 .word 0x20000bc4 8029cb8: 000927c0 .word 0x000927c0 08029cbc : /** * @brief Отключает журнал Ð´Ð»Ñ Ð±ÐµÐ·Ð¾Ð¿Ð°Ñной перезагрузки */ bool LOG_Disable(void) { 8029cbc: b508 push {r3, lr} if (fLogInit) { 8029cbe: 4b08 ldr r3, [pc, #32] ; (8029ce0 ) 8029cc0: 781b ldrb r3, [r3, #0] 8029cc2: b15b cbz r3, 8029cdc /* Ожидаем Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð¸Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ Ñ Ð¶ÑƒÑ€Ð½Ð°Ð» */ if ( xSemaphoreTake(log_mutex, 10000) == pdTRUE ) { 8029cc4: 4b07 ldr r3, [pc, #28] ; (8029ce4 ) 8029cc6: 2100 movs r1, #0 8029cc8: 6818 ldr r0, [r3, #0] 8029cca: f242 7210 movw r2, #10000 ; 0x2710 8029cce: 460b mov r3, r1 8029cd0: f000 ffa5 bl 802ac1e 8029cd4: 1e43 subs r3, r0, #1 8029cd6: 4258 negs r0, r3 8029cd8: 4158 adcs r0, r3 8029cda: bd08 pop {r3, pc} else { return false; } } else { return true; 8029cdc: 2001 movs r0, #1 } } 8029cde: bd08 pop {r3, pc} 8029ce0: 20000bcc .word 0x20000bcc 8029ce4: 20000bc8 .word 0x20000bc8 08029ce8 : log_event_data(LOG_SYSTEM_BOOT, "ÐдминиÑтратор"); log_add(")215.7;215.7;220.5;000;50.1;2.30;25.0;00000001;");*/ } } void log_init(bool format) { 8029ce8: b51f push {r0, r1, r2, r3, r4, lr} DBG printf(">>> Event log\n"); if (!spi_flash_desc.present) 8029cea: 4b22 ldr r3, [pc, #136] ; (8029d74 ) 8029cec: 781a ldrb r2, [r3, #0] log_event_data(LOG_SYSTEM_BOOT, "ÐдминиÑтратор"); log_add(")215.7;215.7;220.5;000;50.1;2.30;25.0;00000001;");*/ } } void log_init(bool format) { 8029cee: 4604 mov r4, r0 DBG printf(">>> Event log\n"); if (!spi_flash_desc.present) 8029cf0: 2a00 cmp r2, #0 8029cf2: d03e beq.n 8029d72 return; ringfs_flash.sector_size = spi_flash_desc.sector_size; 8029cf4: 685a ldr r2, [r3, #4] ringfs_flash.sector_count = spi_flash_desc.sector_count/2 - LOG_FLASH_SECTOR_OFFSET; 8029cf6: 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; 8029cf8: 491f ldr r1, [pc, #124] ; (8029d78 ) 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)); 8029cfa: 4820 ldr r0, [pc, #128] ; (8029d7c ) 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; 8029cfc: 600a str r2, [r1, #0] ringfs_flash.sector_count = spi_flash_desc.sector_count/2 - LOG_FLASH_SECTOR_OFFSET; 8029cfe: 085b lsrs r3, r3, #1 8029d00: 3b04 subs r3, #4 8029d02: 608b str r3, [r1, #8] ringfs_init(&fs, &ringfs_flash, LOG_ENTRY_VERSION, sizeof(log_entry_t)); 8029d04: 2201 movs r2, #1 8029d06: 2338 movs r3, #56 ; 0x38 8029d08: f000 fb95 bl 802a436 if (format || ringfs_scan(&fs) != 0) 8029d0c: b11c cbz r4, 8029d16 ringfs_format(&fs); 8029d0e: 481b ldr r0, [pc, #108] ; (8029d7c ) 8029d10: f000 fb9b bl 802a44a 8029d14: e004 b.n 8029d20 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) 8029d16: 4819 ldr r0, [pc, #100] ; (8029d7c ) 8029d18: f000 fc79 bl 802a60e 8029d1c: 2800 cmp r0, #0 8029d1e: d1f6 bne.n 8029d0e ringfs_format(&fs); ringfs_flash2.sector_size = spi_flash_desc.sector_size; 8029d20: 4b14 ldr r3, [pc, #80] ; (8029d74 ) 8029d22: 4917 ldr r1, [pc, #92] ; (8029d80 ) 8029d24: 685a ldr r2, [r3, #4] ringfs_flash2.sector_count = spi_flash_desc.sector_count/2 - LOG_FLASH_SECTOR_OFFSET; 8029d26: 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; 8029d28: 600a str r2, [r1, #0] ringfs_flash2.sector_count = spi_flash_desc.sector_count/2 - LOG_FLASH_SECTOR_OFFSET; 8029d2a: 085b lsrs r3, r3, #1 8029d2c: 3b04 subs r3, #4 8029d2e: 608b str r3, [r1, #8] ringfs_init(&fs2, &ringfs_flash2, LOG_ENTRY_VERSION, sizeof(log_entry_t)); 8029d30: 4814 ldr r0, [pc, #80] ; (8029d84 ) 8029d32: 2201 movs r2, #1 8029d34: 2338 movs r3, #56 ; 0x38 8029d36: f000 fb7e bl 802a436 if (format || ringfs_scan(&fs2) != 0) 8029d3a: b11c cbz r4, 8029d44 ringfs_format(&fs2); 8029d3c: 4811 ldr r0, [pc, #68] ; (8029d84 ) 8029d3e: f000 fb84 bl 802a44a 8029d42: e004 b.n 8029d4e 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) 8029d44: 480f ldr r0, [pc, #60] ; (8029d84 ) 8029d46: f000 fc62 bl 802a60e 8029d4a: 2800 cmp r0, #0 8029d4c: d1f6 bne.n 8029d3c ringfs_format(&fs2); fLogInit = true; 8029d4e: 4b0e ldr r3, [pc, #56] ; (8029d88 ) 8029d50: 2001 movs r0, #1 8029d52: 7018 strb r0, [r3, #0] log_mutex = xSemaphoreCreateMutex(); 8029d54: f000 febd bl 802aad2 8029d58: 4b0c ldr r3, [pc, #48] ; (8029d8c ) xTaskCreate(log_task, ( char * ) "log_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); 8029d5a: 490d ldr r1, [pc, #52] ; (8029d90 ) if (format || ringfs_scan(&fs2) != 0) ringfs_format(&fs2); fLogInit = true; log_mutex = xSemaphoreCreateMutex(); 8029d5c: 6018 str r0, [r3, #0] xTaskCreate(log_task, ( char * ) "log_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); 8029d5e: 2300 movs r3, #0 8029d60: 9300 str r3, [sp, #0] 8029d62: 9301 str r3, [sp, #4] 8029d64: 9302 str r3, [sp, #8] 8029d66: 9303 str r3, [sp, #12] 8029d68: 480a ldr r0, [pc, #40] ; (8029d94 ) 8029d6a: f44f 7280 mov.w r2, #256 ; 0x100 8029d6e: f001 f85f bl 802ae30 } 8029d72: bd1f pop {r0, r1, r2, r3, r4, pc} 8029d74: 2000c840 .word 0x2000c840 8029d78: 200006ac .word 0x200006ac 8029d7c: 20000b98 .word 0x20000b98 8029d80: 20000694 .word 0x20000694 8029d84: 20000b6c .word 0x20000b6c 8029d88: 20000bcc .word 0x20000bcc 8029d8c: 20000bc8 .word 0x20000bc8 8029d90: 08038b3f .word 0x08038b3f 8029d94: 08029ca5 .word 0x08029ca5 08029d98 : } return 0; } int log_append(log_entry_t *entry) { 8029d98: b530 push {r4, r5, lr} int ret; TM_RTC_t data; ret = xSemaphoreTake( log_mutex, portMAX_DELAY ); 8029d9a: 4b12 ldr r3, [pc, #72] ; (8029de4 ) 8029d9c: 2100 movs r1, #0 } return 0; } int log_append(log_entry_t *entry) { 8029d9e: b085 sub sp, #20 8029da0: 4604 mov r4, r0 int ret; TM_RTC_t data; ret = xSemaphoreTake( log_mutex, portMAX_DELAY ); 8029da2: f04f 32ff mov.w r2, #4294967295 8029da6: 6818 ldr r0, [r3, #0] 8029da8: 460b mov r3, r1 8029daa: f000 ff38 bl 802ac1e if (ret == pdFALSE) 8029dae: 4605 mov r5, r0 8029db0: b1a8 cbz r0, 8029dde return ret; if (!entry->timestamp){ 8029db2: 6821 ldr r1, [r4, #0] 8029db4: b921 cbnz r1, 8029dc0 TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8029db6: 4668 mov r0, sp 8029db8: f7fc fd08 bl 80267cc entry->timestamp = data.unix; 8029dbc: 9b03 ldr r3, [sp, #12] 8029dbe: 6023 str r3, [r4, #0] } if(entry->type == LOG_VALUE) 8029dc0: 7923 ldrb r3, [r4, #4] 8029dc2: 2b11 cmp r3, #17 ringfs_append(&fs, entry); 8029dc4: bf0c ite eq 8029dc6: 4808 ldreq r0, [pc, #32] ; (8029de8 ) else ringfs_append(&fs2, entry); 8029dc8: 4808 ldrne r0, [pc, #32] ; (8029dec ) 8029dca: 4621 mov r1, r4 8029dcc: f000 fb70 bl 802a4b0 xSemaphoreGive(log_mutex); 8029dd0: 4b04 ldr r3, [pc, #16] ; (8029de4 ) 8029dd2: 2100 movs r1, #0 8029dd4: 6818 ldr r0, [r3, #0] 8029dd6: 460a mov r2, r1 8029dd8: 460b mov r3, r1 8029dda: f000 fde0 bl 802a99e return ret; } 8029dde: 4628 mov r0, r5 8029de0: b005 add sp, #20 8029de2: bd30 pop {r4, r5, pc} 8029de4: 20000bc8 .word 0x20000bc8 8029de8: 20000b98 .word 0x20000b98 8029dec: 20000b6c .word 0x20000b6c 08029df0 : int log_fetch(log_entry_t *entry, uint32_t timeout) { 8029df0: b570 push {r4, r5, r6, lr} int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 8029df2: 4e0d ldr r6, [pc, #52] ; (8029e28 ) ringfs_append(&fs2, entry); xSemaphoreGive(log_mutex); return ret; } int log_fetch(log_entry_t *entry, uint32_t timeout) { 8029df4: 460a mov r2, r1 int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 8029df6: 2100 movs r1, #0 ringfs_append(&fs2, entry); xSemaphoreGive(log_mutex); return ret; } int log_fetch(log_entry_t *entry, uint32_t timeout) { 8029df8: 4605 mov r5, r0 int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 8029dfa: 460b mov r3, r1 8029dfc: 6830 ldr r0, [r6, #0] 8029dfe: f000 ff0e bl 802ac1e if (ret == pdFALSE) 8029e02: 4604 mov r4, r0 8029e04: b170 cbz r0, 8029e24 return ret; if(entry->type == LOG_VALUE) 8029e06: 792b ldrb r3, [r5, #4] 8029e08: 2b11 cmp r3, #17 ret = ringfs_fetch(&fs, entry); 8029e0a: bf0c ite eq 8029e0c: 4807 ldreq r0, [pc, #28] ; (8029e2c ) else ret = ringfs_fetch(&fs2, entry); 8029e0e: 4808 ldrne r0, [pc, #32] ; (8029e30 ) 8029e10: 4629 mov r1, r5 8029e12: f000 fbb7 bl 802a584 xSemaphoreGive(log_mutex); 8029e16: 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); 8029e18: 4604 mov r4, r0 xSemaphoreGive(log_mutex); 8029e1a: 460a mov r2, r1 8029e1c: 6830 ldr r0, [r6, #0] 8029e1e: 460b mov r3, r1 8029e20: f000 fdbd bl 802a99e return ret; } 8029e24: 4620 mov r0, r4 8029e26: bd70 pop {r4, r5, r6, pc} 8029e28: 20000bc8 .word 0x20000bc8 8029e2c: 20000b98 .word 0x20000b98 8029e30: 20000b6c .word 0x20000b6c 08029e34 : int log_rewind(log_entry_t *entry, uint32_t timeout) { 8029e34: b570 push {r4, r5, r6, lr} int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 8029e36: 4d0d ldr r5, [pc, #52] ; (8029e6c ) ret = ringfs_fetch(&fs2, entry); xSemaphoreGive(log_mutex); return ret; } int log_rewind(log_entry_t *entry, uint32_t timeout) { 8029e38: 460a mov r2, r1 int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 8029e3a: 2100 movs r1, #0 ret = ringfs_fetch(&fs2, entry); xSemaphoreGive(log_mutex); return ret; } int log_rewind(log_entry_t *entry, uint32_t timeout) { 8029e3c: 4606 mov r6, r0 int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 8029e3e: 460b mov r3, r1 8029e40: 6828 ldr r0, [r5, #0] 8029e42: f000 feec bl 802ac1e if (ret == pdFALSE) 8029e46: 4604 mov r4, r0 8029e48: b168 cbz r0, 8029e66 return ret; if(entry->type == LOG_VALUE) 8029e4a: 7933 ldrb r3, [r6, #4] 8029e4c: 2b11 cmp r3, #17 ret = ringfs_rewind(&fs); 8029e4e: bf0c ite eq 8029e50: 4807 ldreq r0, [pc, #28] ; (8029e70 ) else ret = ringfs_rewind(&fs2); 8029e52: 4808 ldrne r0, [pc, #32] ; (8029e74 ) 8029e54: f000 fbd0 bl 802a5f8 xSemaphoreGive(log_mutex); 8029e58: 2100 movs r1, #0 if (ret == pdFALSE) return ret; if(entry->type == LOG_VALUE) ret = ringfs_rewind(&fs); else ret = ringfs_rewind(&fs2); 8029e5a: 4604 mov r4, r0 xSemaphoreGive(log_mutex); 8029e5c: 460a mov r2, r1 8029e5e: 6828 ldr r0, [r5, #0] 8029e60: 460b mov r3, r1 8029e62: f000 fd9c bl 802a99e return ret; } 8029e66: 4620 mov r0, r4 8029e68: bd70 pop {r4, r5, r6, pc} 8029e6a: bf00 nop 8029e6c: 20000bc8 .word 0x20000bc8 8029e70: 20000b98 .word 0x20000b98 8029e74: 20000b6c .word 0x20000b6c 08029e78 : xSemaphoreGive(log_mutex); return ret; } void log_event_data(log_type_t type, char *data) { 8029e78: b500 push {lr} 8029e7a: b08f sub sp, #60 ; 0x3c log_entry_t entry_data; entry_data.timestamp = 0; 8029e7c: 2300 movs r3, #0 8029e7e: 9300 str r3, [sp, #0] entry_data.type = type; strncpy(entry_data.data, data, 49); 8029e80: 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; 8029e82: f88d 0004 strb.w r0, [sp, #4] strncpy(entry_data.data, data, 49); 8029e86: 2231 movs r2, #49 ; 0x31 8029e88: 1d58 adds r0, r3, #5 8029e8a: f7f8 fa19 bl 80222c0 log_append(&entry_data); 8029e8e: 4668 mov r0, sp 8029e90: f7ff ff82 bl 8029d98 } 8029e94: b00f add sp, #60 ; 0x3c 8029e96: bd00 pop {pc} 08029e98 : void log_add(char *log_data) { 8029e98: b530 push {r4, r5, lr} 8029e9a: b08f sub sp, #60 ; 0x3c 8029e9c: 4605 mov r5, r0 char buf_value[50]; uint8_t i, len; memset(buf_value, 0, 50); 8029e9e: 2100 movs r1, #0 8029ea0: 2232 movs r2, #50 ; 0x32 8029ea2: a801 add r0, sp, #4 8029ea4: f7f7 ff7c bl 8021da0 len = strlen(log_data); 8029ea8: 4628 mov r0, r5 8029eaa: f7f8 f951 bl 8022150 8029eae: b2c4 uxtb r4, r0 strncpy(buf_value, log_data, len); 8029eb0: 4629 mov r1, r5 8029eb2: a801 add r0, sp, #4 8029eb4: 4622 mov r2, r4 8029eb6: f7f8 fa03 bl 80222c0 buf_value[0] = '\"'; 8029eba: 2322 movs r3, #34 ; 0x22 8029ebc: f88d 3004 strb.w r3, [sp, #4] for(i = 0; i < len; i++) { if(buf_value[i] == ' ') buf_value[i] = ';'; 8029ec0: 203b movs r0, #59 ; 0x3b len = strlen(log_data); strncpy(buf_value, log_data, len); buf_value[0] = '\"'; for(i = 0; i < len; i++) 8029ec2: 2300 movs r3, #0 8029ec4: e004 b.n 8029ed0 { if(buf_value[i] == ' ') 8029ec6: 5cca ldrb r2, [r1, r3] 8029ec8: 2a20 cmp r2, #32 buf_value[i] = ';'; 8029eca: bf08 it eq 8029ecc: 54c8 strbeq r0, [r1, r3] 8029ece: 3301 adds r3, #1 len = strlen(log_data); strncpy(buf_value, log_data, len); buf_value[0] = '\"'; for(i = 0; i < len; i++) 8029ed0: b2da uxtb r2, r3 8029ed2: 42a2 cmp r2, r4 8029ed4: a901 add r1, sp, #4 8029ed6: d3f6 bcc.n 8029ec6 { if(buf_value[i] == ' ') buf_value[i] = ';'; } buf_value[len - 1] = ';'; 8029ed8: ab0e add r3, sp, #56 ; 0x38 8029eda: 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); 8029edc: 2011 movs r0, #17 for(i = 0; i < len; i++) { if(buf_value[i] == ' ') buf_value[i] = ';'; } buf_value[len - 1] = ';'; 8029ede: 233b movs r3, #59 ; 0x3b 8029ee0: 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); 8029ee4: f7ff ffc8 bl 8029e78 } else log_event_data(LOG_VALUE, buf_value); } 8029ee8: b00f add sp, #60 ; 0x3c 8029eea: bd30 pop {r4, r5, pc} 08029eec : * @brief Возвращает true еÑли журнал проинициализирован */ bool LOG_IsInit() { return fLogInit; } 8029eec: 4b01 ldr r3, [pc, #4] ; (8029ef4 ) 8029eee: 7818 ldrb r0, [r3, #0] 8029ef0: 4770 bx lr 8029ef2: bf00 nop 8029ef4: 20000bcc .word 0x20000bcc 08029ef8 : /** * @brief Возвращает общее количеÑтво Ñтраниц */ uint32_t LOG_GetPageCount(void) { 8029ef8: b508 push {r3, lr} return (((ringfs_count_estimate(&fs)) / 10) + 1); 8029efa: 4804 ldr r0, [pc, #16] ; (8029f0c ) 8029efc: f000 fac6 bl 802a48c 8029f00: 230a movs r3, #10 8029f02: fb90 f0f3 sdiv r0, r0, r3 } 8029f06: 3001 adds r0, #1 8029f08: bd08 pop {r3, pc} 8029f0a: bf00 nop 8029f0c: 20000b98 .word 0x20000b98 08029f10 : uint32_t LOG_GetTotalSTRCount(void) { return ringfs_count_estimate(&fs); 8029f10: 4801 ldr r0, [pc, #4] ; (8029f18 ) 8029f12: f000 babb b.w 802a48c 8029f16: bf00 nop 8029f18: 20000b98 .word 0x20000b98 08029f1c : } void LOG_GetPage(char *str, uint32_t page) { 8029f1c: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 8029f20: b09d sub sp, #116 ; 0x74 8029f22: 460d mov r5, r1 8029f24: 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); 8029f26: f7ff fff3 bl 8029f10 memset(buf, 0, 20); 8029f2a: 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); 8029f2c: 4604 mov r4, r0 memset(buf, 0, 20); 8029f2e: 2214 movs r2, #20 8029f30: a809 add r0, sp, #36 ; 0x24 for(i=0; i < 10; i++){ fs.cursor_position = start - 10*(page-1) - 1 - i; 8029f32: 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); 8029f36: f7f7 ff33 bl 8021da0 for(i=0; i < 10; i++){ fs.cursor_position = start - 10*(page-1) - 1 - i; 8029f3a: fb08 4805 mla r8, r8, r5, r4 8029f3e: 4c2a ldr r4, [pc, #168] ; (8029fe8 ) 8029f40: f108 0809 add.w r8, r8, #9 8029f44: 2500 movs r5, #0 fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; } entry.type = LOG_VALUE; log_fetch(&entry, portMAX_DELAY); entry.data[49] = 0; strncat(str, entry.data, strlen(entry.data)); 8029f46: 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) 8029f4a: 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) 8029f4e: 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; 8029f50: 62a3 str r3, [r4, #40] ; 0x28 if(fs.cursor_position < 0) 8029f52: db46 blt.n 8029fe2 break; else{ fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; 8029f54: f8d4 900c ldr.w r9, [r4, #12] 8029f58: 6920 ldr r0, [r4, #16] 8029f5a: 6821 ldr r1, [r4, #0] 8029f5c: fb93 f2f9 sdiv r2, r3, r9 8029f60: eb02 0e00 add.w lr, r2, r0 8029f64: 6888 ldr r0, [r1, #8] 8029f66: fb9e fcf0 sdiv ip, lr, r0 8029f6a: fb00 e01c mls r0, r0, ip, lr fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; 8029f6e: 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; 8029f72: 6220 str r0, [r4, #32] fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; 8029f74: 6263 str r3, [r4, #36] ; 0x24 } entry.type = LOG_VALUE; log_fetch(&entry, portMAX_DELAY); 8029f76: 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; 8029f7a: 2311 movs r3, #17 log_fetch(&entry, portMAX_DELAY); 8029f7c: 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; 8029f7e: f88d 303c strb.w r3, [sp, #60] ; 0x3c log_fetch(&entry, portMAX_DELAY); 8029f82: f7ff ff35 bl 8029df0 entry.data[49] = 0; 8029f86: 2300 movs r3, #0 strncat(str, entry.data, strlen(entry.data)); 8029f88: 4638 mov r0, r7 fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; } entry.type = LOG_VALUE; log_fetch(&entry, portMAX_DELAY); entry.data[49] = 0; 8029f8a: f88d 306e strb.w r3, [sp, #110] ; 0x6e strncat(str, entry.data, strlen(entry.data)); 8029f8e: f7f8 f8df bl 8022150 8029f92: 4639 mov r1, r7 8029f94: 4602 mov r2, r0 8029f96: 4630 mov r0, r6 8029f98: f7f8 f90a bl 80221b0 TM_RTC_GetDateTimeFromUnix(&rtc_data, entry.timestamp); 8029f9c: a805 add r0, sp, #20 8029f9e: 990e ldr r1, [sp, #56] ; 0x38 8029fa0: f7fc fca4 bl 80268ec sprintf(buf, "%02i.%02i.%02i %02i:%02i:%02i", rtc_data.date, rtc_data.month, 8029fa4: f89d 101d ldrb.w r1, [sp, #29] 8029fa8: f89d 201b ldrb.w r2, [sp, #27] 8029fac: 9100 str r1, [sp, #0] 8029fae: f89d 1019 ldrb.w r1, [sp, #25] 8029fb2: f89d 301c ldrb.w r3, [sp, #28] 8029fb6: 9101 str r1, [sp, #4] 8029fb8: f89d 1018 ldrb.w r1, [sp, #24] 8029fbc: 9102 str r1, [sp, #8] 8029fbe: f89d 1014 ldrb.w r1, [sp, #20] 8029fc2: a809 add r0, sp, #36 ; 0x24 8029fc4: 9103 str r1, [sp, #12] 8029fc6: 4909 ldr r1, [pc, #36] ; (8029fec ) 8029fc8: f7fd fdaa bl 8027b20 rtc_data.year, rtc_data.hours, rtc_data.minutes, rtc_data.seconds); strcat(str, buf); 8029fcc: a909 add r1, sp, #36 ; 0x24 8029fce: 4630 mov r0, r6 8029fd0: f7f7 ff4c bl 8021e6c 8029fd4: 3501 adds r5, #1 strcat(str, "\","); 8029fd6: 4630 mov r0, r6 8029fd8: 4905 ldr r1, [pc, #20] ; (8029ff0 ) 8029fda: f7f7 ff47 bl 8021e6c 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++){ 8029fde: 2d0a cmp r5, #10 8029fe0: d1b3 bne.n 8029f4a 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, "\","); } } 8029fe2: b01d add sp, #116 ; 0x74 8029fe4: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 8029fe8: 20000b98 .word 0x20000b98 8029fec: 08038b48 .word 0x08038b48 8029ff0: 08038b66 .word 0x08038b66 08029ff4 : uint32_t LOG_GetData(int ptr, char *str, uint32_t size, bool start) { 8029ff4: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8029ff8: b09c sub sp, #112 ; 0x70 8029ffa: 4690 mov r8, r2 TM_RTC_t rtc_data; log_entry_t entry; char buf[20]; uint8_t i; entry.type = LOG_VALUE; 8029ffc: 2211 movs r2, #17 strcat(str, "\","); } } uint32_t LOG_GetData(int ptr, char *str, uint32_t size, bool start) { 8029ffe: 4605 mov r5, r0 802a000: 460c mov r4, r1 TM_RTC_t rtc_data; log_entry_t entry; char buf[20]; uint8_t i; entry.type = LOG_VALUE; 802a002: f88d 203c strb.w r2, [sp, #60] ; 0x3c if(start) 802a006: b123 cbz r3, 802a012 log_rewind(&entry, portMAX_DELAY); 802a008: a80e add r0, sp, #56 ; 0x38 802a00a: f04f 31ff mov.w r1, #4294967295 802a00e: f7ff ff11 bl 8029e34 fs.cursor_position = ptr/STRING_SIZE; 802a012: 4b2c ldr r3, [pc, #176] ; (802a0c4 ) 802a014: 2040 movs r0, #64 ; 0x40 802a016: fb95 f0f0 sdiv r0, r5, r0 fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; 802a01a: 681e ldr r6, [r3, #0] 802a01c: 68dd ldr r5, [r3, #12] 802a01e: 691f ldr r7, [r3, #16] 802a020: 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; 802a022: 6298 str r0, [r3, #40] ; 0x28 fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; 802a024: fb90 f1f5 sdiv r1, r0, r5 802a028: 19cf adds r7, r1, r7 802a02a: fb97 f2f6 sdiv r2, r7, r6 802a02e: fb06 7612 mls r6, r6, r2, r7 fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; 802a032: 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; 802a036: 621e str r6, [r3, #32] fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; 802a038: 6258 str r0, [r3, #36] ; 0x24 for(i = 0; i < size/STRING_SIZE; i++) 802a03a: ea4f 1798 mov.w r7, r8, lsr #6 802a03e: 2500 movs r5, #0 { entry.type = LOG_VALUE; log_fetch(&entry, portMAX_DELAY); entry.data[49] = 0; strncat(str, &entry.data[1], (strlen(entry.data) - 1)); 802a040: 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++) 802a044: e035 b.n 802a0b2 { entry.type = LOG_VALUE; 802a046: 2311 movs r3, #17 log_fetch(&entry, portMAX_DELAY); 802a048: f04f 31ff mov.w r1, #4294967295 802a04c: a80e add r0, sp, #56 ; 0x38 fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; for(i = 0; i < size/STRING_SIZE; i++) { entry.type = LOG_VALUE; 802a04e: f88d 303c strb.w r3, [sp, #60] ; 0x3c log_fetch(&entry, portMAX_DELAY); 802a052: f7ff fecd bl 8029df0 entry.data[49] = 0; 802a056: 2300 movs r3, #0 strncat(str, &entry.data[1], (strlen(entry.data) - 1)); 802a058: 4630 mov r0, r6 for(i = 0; i < size/STRING_SIZE; i++) { entry.type = LOG_VALUE; log_fetch(&entry, portMAX_DELAY); entry.data[49] = 0; 802a05a: f88d 306e strb.w r3, [sp, #110] ; 0x6e strncat(str, &entry.data[1], (strlen(entry.data) - 1)); 802a05e: f7f8 f877 bl 8022150 802a062: f10d 013e add.w r1, sp, #62 ; 0x3e 802a066: 1e42 subs r2, r0, #1 802a068: 4620 mov r0, r4 802a06a: f7f8 f8a1 bl 80221b0 TM_RTC_GetDateTimeFromUnix(&rtc_data, entry.timestamp); 802a06e: a805 add r0, sp, #20 802a070: 990e ldr r1, [sp, #56] ; 0x38 802a072: f7fc fc3b bl 80268ec sprintf(buf, "%02i.%02i.%02i %02i:%02i:%02i", rtc_data.date, rtc_data.month, 802a076: f89d 101d ldrb.w r1, [sp, #29] 802a07a: f89d 201b ldrb.w r2, [sp, #27] 802a07e: 9100 str r1, [sp, #0] 802a080: f89d 1019 ldrb.w r1, [sp, #25] 802a084: f89d 301c ldrb.w r3, [sp, #28] 802a088: 9101 str r1, [sp, #4] 802a08a: f89d 1018 ldrb.w r1, [sp, #24] 802a08e: 9102 str r1, [sp, #8] 802a090: f89d 1014 ldrb.w r1, [sp, #20] 802a094: a809 add r0, sp, #36 ; 0x24 802a096: 9103 str r1, [sp, #12] 802a098: 490b ldr r1, [pc, #44] ; (802a0c8 ) 802a09a: f7fd fd41 bl 8027b20 rtc_data.year, rtc_data.hours, rtc_data.minutes, rtc_data.seconds); strcat(str, buf); 802a09e: a909 add r1, sp, #36 ; 0x24 802a0a0: 4620 mov r0, r4 802a0a2: f7f7 fee3 bl 8021e6c strcat(str, "\n"); 802a0a6: 4620 mov r0, r4 802a0a8: 4908 ldr r1, [pc, #32] ; (802a0cc ) 802a0aa: f7f7 fedf bl 8021e6c 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++) 802a0ae: 3501 adds r5, #1 802a0b0: b2ed uxtb r5, r5 802a0b2: 42bd cmp r5, r7 802a0b4: d3c7 bcc.n 802a046 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); 802a0b6: 4620 mov r0, r4 802a0b8: f7f8 f84a bl 8022150 } 802a0bc: b01c add sp, #112 ; 0x70 802a0be: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802a0c2: bf00 nop 802a0c4: 20000b98 .word 0x20000b98 802a0c8: 08038b48 .word 0x08038b48 802a0cc: 08042b4b .word 0x08042b4b 0802a0d0 : /** * @brief Возвращает общее количеÑтво Ñтраниц */ uint32_t History_GetPageCount(void) { 802a0d0: b508 push {r3, lr} return (((ringfs_count_estimate(&fs2)) / 10) + 1); 802a0d2: 4804 ldr r0, [pc, #16] ; (802a0e4 ) 802a0d4: f000 f9da bl 802a48c 802a0d8: 230a movs r3, #10 802a0da: fb90 f0f3 sdiv r0, r0, r3 } 802a0de: 3001 adds r0, #1 802a0e0: bd08 pop {r3, pc} 802a0e2: bf00 nop 802a0e4: 20000b6c .word 0x20000b6c 0802a0e8 : uint32_t History_GetTotalSTRCount(void) { return ringfs_count_estimate(&fs2); 802a0e8: 4801 ldr r0, [pc, #4] ; (802a0f0 ) 802a0ea: f000 b9cf b.w 802a48c 802a0ee: bf00 nop 802a0f0: 20000b6c .word 0x20000b6c 0802a0f4 : } void History_GetPage(char *str, uint32_t page) { 802a0f4: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 802a0f8: b09d sub sp, #116 ; 0x74 802a0fa: 460e mov r6, r1 802a0fc: 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); 802a0fe: f7ff fff3 bl 802a0e8 memset(buf, 0, 20); 802a102: 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); 802a104: 4605 mov r5, r0 memset(buf, 0, 20); 802a106: 2214 movs r2, #20 802a108: a809 add r0, sp, #36 ; 0x24 for(i=0; i < 10; i++){ fs2.cursor_position = start - 10*(page-1) - 1 - i; 802a10a: 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); 802a10e: f7f7 fe47 bl 8021da0 for(i=0; i < 10; i++){ fs2.cursor_position = start - 10*(page-1) - 1 - i; 802a112: fb09 5906 mla r9, r9, r6, r5 802a116: 4d38 ldr r5, [pc, #224] ; (802a1f8 ) 802a118: f109 0909 add.w r9, r9, #9 802a11c: 2600 movs r6, #0 log_fetch(&entry, portMAX_DELAY); strcat(str, "\""); strncat(str, logsStrShortRu[entry.type], (strlen(logsStrShortRu[entry.type]) )); strcat(str, ";"); entry.data[49] = 0; strncat(str, entry.data, (strlen(entry.data) )); 802a11e: 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) 802a122: 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) 802a126: 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; 802a128: 62ab str r3, [r5, #40] ; 0x28 if(fs2.cursor_position < 0) 802a12a: db61 blt.n 802a1f0 break; else{ fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs.slots_per_sector)%fs2.flash->sector_count; 802a12c: 4a33 ldr r2, [pc, #204] ; (802a1fc ) 802a12e: 68d1 ldr r1, [r2, #12] 802a130: 692a ldr r2, [r5, #16] 802a132: fb93 f1f1 sdiv r1, r3, r1 802a136: 1889 adds r1, r1, r2 802a138: 682a ldr r2, [r5, #0] 802a13a: 6892 ldr r2, [r2, #8] 802a13c: fb91 f0f2 sdiv r0, r1, r2 802a140: fb02 1210 mls r2, r2, r0, r1 802a144: 622a str r2, [r5, #32] fs2.cursor.slot = fs2.cursor_position%fs2.slots_per_sector; 802a146: 68ea ldr r2, [r5, #12] 802a148: fb93 f1f2 sdiv r1, r3, r2 802a14c: fb02 3311 mls r3, r2, r1, r3 802a150: 626b str r3, [r5, #36] ; 0x24 } entry.type = LOG_LOGIN; log_fetch(&entry, portMAX_DELAY); 802a152: 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; 802a156: 2305 movs r3, #5 log_fetch(&entry, portMAX_DELAY); 802a158: 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; 802a15a: f88d 303c strb.w r3, [sp, #60] ; 0x3c log_fetch(&entry, portMAX_DELAY); 802a15e: f7ff fe47 bl 8029df0 strcat(str, "\""); 802a162: 4927 ldr r1, [pc, #156] ; (802a200 ) 802a164: 4620 mov r0, r4 802a166: f7f7 fe81 bl 8021e6c strncat(str, logsStrShortRu[entry.type], (strlen(logsStrShortRu[entry.type]) )); 802a16a: 4b26 ldr r3, [pc, #152] ; (802a204 ) 802a16c: f89d 203c ldrb.w r2, [sp, #60] ; 0x3c 802a170: f853 8022 ldr.w r8, [r3, r2, lsl #2] 802a174: 4640 mov r0, r8 802a176: f7f7 ffeb bl 8022150 802a17a: 4641 mov r1, r8 802a17c: 4602 mov r2, r0 802a17e: 4620 mov r0, r4 802a180: f7f8 f816 bl 80221b0 strcat(str, ";"); 802a184: 4920 ldr r1, [pc, #128] ; (802a208 ) 802a186: 4620 mov r0, r4 802a188: f7f7 fe70 bl 8021e6c entry.data[49] = 0; 802a18c: 2300 movs r3, #0 strncat(str, entry.data, (strlen(entry.data) )); 802a18e: 4638 mov r0, r7 entry.type = LOG_LOGIN; log_fetch(&entry, portMAX_DELAY); strcat(str, "\""); strncat(str, logsStrShortRu[entry.type], (strlen(logsStrShortRu[entry.type]) )); strcat(str, ";"); entry.data[49] = 0; 802a190: f88d 306e strb.w r3, [sp, #110] ; 0x6e strncat(str, entry.data, (strlen(entry.data) )); 802a194: f7f7 ffdc bl 8022150 802a198: 4639 mov r1, r7 802a19a: 4602 mov r2, r0 802a19c: 4620 mov r0, r4 802a19e: f7f8 f807 bl 80221b0 strcat(str, ";"); 802a1a2: 4919 ldr r1, [pc, #100] ; (802a208 ) 802a1a4: 4620 mov r0, r4 802a1a6: f7f7 fe61 bl 8021e6c TM_RTC_GetDateTimeFromUnix(&rtc_data, entry.timestamp); 802a1aa: a805 add r0, sp, #20 802a1ac: 990e ldr r1, [sp, #56] ; 0x38 802a1ae: f7fc fb9d bl 80268ec sprintf(buf, "%02i.%02i.%02i %02i:%02i:%02i", rtc_data.date, rtc_data.month, 802a1b2: f89d 101d ldrb.w r1, [sp, #29] 802a1b6: f89d 201b ldrb.w r2, [sp, #27] 802a1ba: 9100 str r1, [sp, #0] 802a1bc: f89d 1019 ldrb.w r1, [sp, #25] 802a1c0: f89d 301c ldrb.w r3, [sp, #28] 802a1c4: 9101 str r1, [sp, #4] 802a1c6: f89d 1018 ldrb.w r1, [sp, #24] 802a1ca: 9102 str r1, [sp, #8] 802a1cc: f89d 1014 ldrb.w r1, [sp, #20] 802a1d0: a809 add r0, sp, #36 ; 0x24 802a1d2: 9103 str r1, [sp, #12] 802a1d4: 490d ldr r1, [pc, #52] ; (802a20c ) 802a1d6: f7fd fca3 bl 8027b20 rtc_data.year, rtc_data.hours, rtc_data.minutes, rtc_data.seconds); strcat(str, buf); 802a1da: a909 add r1, sp, #36 ; 0x24 802a1dc: 4620 mov r0, r4 802a1de: f7f7 fe45 bl 8021e6c 802a1e2: 3601 adds r6, #1 strcat(str, "\","); 802a1e4: 4620 mov r0, r4 802a1e6: 490a ldr r1, [pc, #40] ; (802a210 ) 802a1e8: f7f7 fe40 bl 8021e6c 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++){ 802a1ec: 2e0a cmp r6, #10 802a1ee: d198 bne.n 802a122 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, "\","); } } 802a1f0: b01d add sp, #116 ; 0x74 802a1f2: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 802a1f6: bf00 nop 802a1f8: 20000b6c .word 0x20000b6c 802a1fc: 20000b98 .word 0x20000b98 802a200: 08043cdf .word 0x08043cdf 802a204: 200006c4 .word 0x200006c4 802a208: 08038b69 .word 0x08038b69 802a20c: 08038b48 .word 0x08038b48 802a210: 08038b66 .word 0x08038b66 0802a214 : uint32_t History_GetData(int ptr, char *str, uint32_t size, bool start) { 802a214: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802a218: f5ad 6d8b sub.w sp, sp, #1112 ; 0x458 802a21c: 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; 802a21e: 2205 movs r2, #5 strcat(str, "\","); } } uint32_t History_GetData(int ptr, char *str, uint32_t size, bool start) { 802a220: 4604 mov r4, r0 802a222: 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; 802a224: f88d 203c strb.w r2, [sp, #60] ; 0x3c if(start) 802a228: b123 cbz r3, 802a234 log_rewind(&entry, portMAX_DELAY); 802a22a: a80e add r0, sp, #56 ; 0x38 802a22c: f04f 31ff mov.w r1, #4294967295 802a230: f7ff fe00 bl 8029e34 fs2.cursor_position = ptr/STRING_SIZE_HISTORY; 802a234: 4b43 ldr r3, [pc, #268] ; (802a344 ) 802a236: 2164 movs r1, #100 ; 0x64 fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs2.slots_per_sector)%fs2.flash->sector_count; 802a238: 68de ldr r6, [r3, #12] 802a23a: 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; 802a23c: fb94 f4f1 sdiv r4, r4, r1 fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs2.slots_per_sector)%fs2.flash->sector_count; 802a240: fb94 f0f6 sdiv r0, r4, r6 802a244: eb00 0e07 add.w lr, r0, r7 802a248: 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; 802a24a: 629c str r4, [r3, #40] ; 0x28 fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs2.slots_per_sector)%fs2.flash->sector_count; 802a24c: 68bf ldr r7, [r7, #8] 802a24e: fb9e f2f7 sdiv r2, lr, r7 fs2.cursor.slot = fs2.cursor_position%fs2.slots_per_sector; 802a252: 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; 802a256: fb07 e712 mls r7, r7, r2, lr fs2.cursor.slot = fs2.cursor_position%fs2.slots_per_sector; 802a25a: 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; 802a25c: 621f str r7, [r3, #32] fs2.cursor.slot = fs2.cursor_position%fs2.slots_per_sector; for(i = 0; i < size/STRING_SIZE_HISTORY; i++) 802a25e: fbb8 f8f1 udiv r8, r8, r1 802a262: 2400 movs r4, #0 memset(temp_str, 0, 100); log_fetch(&entry, portMAX_DELAY); strncat(temp_str, logsStrShortRu[entry.type], (strlen(logsStrShortRu[entry.type]))); strcat(temp_str, ";"); entry.data[49] = 0; strncat(temp_str, entry.data, (strlen(entry.data))); 802a264: 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++) 802a268: e062 b.n 802a330 { memset(temp_str, 0, 100); 802a26a: 2264 movs r2, #100 ; 0x64 802a26c: 2100 movs r1, #0 802a26e: a81c add r0, sp, #112 ; 0x70 802a270: f7f7 fd96 bl 8021da0 log_fetch(&entry, portMAX_DELAY); 802a274: f04f 31ff mov.w r1, #4294967295 802a278: a80e add r0, sp, #56 ; 0x38 802a27a: f7ff fdb9 bl 8029df0 strncat(temp_str, logsStrShortRu[entry.type], (strlen(logsStrShortRu[entry.type]))); 802a27e: 4b32 ldr r3, [pc, #200] ; (802a348 ) 802a280: f89d 203c ldrb.w r2, [sp, #60] ; 0x3c 802a284: f853 7022 ldr.w r7, [r3, r2, lsl #2] 802a288: 4638 mov r0, r7 802a28a: f7f7 ff61 bl 8022150 802a28e: 4639 mov r1, r7 802a290: 4602 mov r2, r0 802a292: a81c add r0, sp, #112 ; 0x70 802a294: f7f7 ff8c bl 80221b0 strcat(temp_str, ";"); 802a298: 492c ldr r1, [pc, #176] ; (802a34c ) 802a29a: a81c add r0, sp, #112 ; 0x70 802a29c: f7f7 fde6 bl 8021e6c entry.data[49] = 0; 802a2a0: 2300 movs r3, #0 strncat(temp_str, entry.data, (strlen(entry.data))); 802a2a2: 4630 mov r0, r6 { memset(temp_str, 0, 100); log_fetch(&entry, portMAX_DELAY); strncat(temp_str, logsStrShortRu[entry.type], (strlen(logsStrShortRu[entry.type]))); strcat(temp_str, ";"); entry.data[49] = 0; 802a2a4: f88d 306e strb.w r3, [sp, #110] ; 0x6e strncat(temp_str, entry.data, (strlen(entry.data))); 802a2a8: f7f7 ff52 bl 8022150 802a2ac: 4631 mov r1, r6 802a2ae: 4602 mov r2, r0 802a2b0: a81c add r0, sp, #112 ; 0x70 802a2b2: f7f7 ff7d bl 80221b0 strcat(temp_str, ";"); 802a2b6: 4925 ldr r1, [pc, #148] ; (802a34c ) 802a2b8: a81c add r0, sp, #112 ; 0x70 802a2ba: f7f7 fdd7 bl 8021e6c TM_RTC_GetDateTimeFromUnix(&rtc_data, entry.timestamp); 802a2be: a805 add r0, sp, #20 802a2c0: 990e ldr r1, [sp, #56] ; 0x38 802a2c2: f7fc fb13 bl 80268ec sprintf(buf, "%02i.%02i.%02i %02i:%02i:%02i", rtc_data.date, rtc_data.month, 802a2c6: f89d 101d ldrb.w r1, [sp, #29] 802a2ca: f89d 301c ldrb.w r3, [sp, #28] 802a2ce: 9100 str r1, [sp, #0] 802a2d0: f89d 1019 ldrb.w r1, [sp, #25] 802a2d4: f89d 201b ldrb.w r2, [sp, #27] 802a2d8: 9101 str r1, [sp, #4] 802a2da: f89d 1018 ldrb.w r1, [sp, #24] 802a2de: 9102 str r1, [sp, #8] 802a2e0: f89d 1014 ldrb.w r1, [sp, #20] 802a2e4: a809 add r0, sp, #36 ; 0x24 802a2e6: 9103 str r1, [sp, #12] 802a2e8: 4919 ldr r1, [pc, #100] ; (802a350 ) 802a2ea: f7fd fc19 bl 8027b20 rtc_data.year, rtc_data.hours, rtc_data.minutes, rtc_data.seconds); strcat(temp_str, buf); 802a2ee: a909 add r1, sp, #36 ; 0x24 802a2f0: a81c add r0, sp, #112 ; 0x70 802a2f2: f7f7 fdbb bl 8021e6c len = strlen(temp_str); 802a2f6: a81c add r0, sp, #112 ; 0x70 802a2f8: f7f7 ff2a bl 8022150 if (len <= STRING_SIZE_HISTORY - 1) 802a2fc: b283 uxth r3, r0 802a2fe: 2b63 cmp r3, #99 ; 0x63 802a300: d80c bhi.n 802a31c strncat(str, temp_str, STRING_SIZE_HISTORY); } return strlen(str); } 802a302: 461a mov r2, r3 len = strlen(temp_str); if (len <= STRING_SIZE_HISTORY - 1) { memset(&temp_str[len], ' ', STRING_SIZE_HISTORY - len - 1); 802a304: ab1c add r3, sp, #112 ; 0x70 802a306: 1898 adds r0, r3, r2 802a308: 2120 movs r1, #32 802a30a: f1c2 0263 rsb r2, r2, #99 ; 0x63 802a30e: f7f7 fd47 bl 8021da0 strcat(temp_str, "\n"); 802a312: a81c add r0, sp, #112 ; 0x70 802a314: 490f ldr r1, [pc, #60] ; (802a354 ) 802a316: f7f7 fda9 bl 8021e6c 802a31a: e002 b.n 802a322 } else { temp_str[STRING_SIZE - 1] = 0xa; 802a31c: 230a movs r3, #10 802a31e: f88d 30af strb.w r3, [sp, #175] ; 0xaf } strncat(str, temp_str, STRING_SIZE_HISTORY); 802a322: 4628 mov r0, r5 802a324: a91c add r1, sp, #112 ; 0x70 802a326: 2264 movs r2, #100 ; 0x64 802a328: f7f7 ff42 bl 80221b0 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++) 802a32c: 3401 adds r4, #1 802a32e: b2e4 uxtb r4, r4 802a330: 4544 cmp r4, r8 802a332: d39a bcc.n 802a26a temp_str[STRING_SIZE - 1] = 0xa; } strncat(str, temp_str, STRING_SIZE_HISTORY); } return strlen(str); 802a334: 4628 mov r0, r5 802a336: f7f7 ff0b bl 8022150 } 802a33a: b016 add sp, #88 ; 0x58 802a33c: f50d 6d80 add.w sp, sp, #1024 ; 0x400 802a340: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802a344: 20000b6c .word 0x20000b6c 802a348: 200006c4 .word 0x200006c4 802a34c: 08038b69 .word 0x08038b69 802a350: 08038b48 .word 0x08038b48 802a354: 08042b4b .word 0x08042b4b 0802a358 <_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; 802a358: 6803 ldr r3, [r0, #0] 802a35a: 680a ldr r2, [r1, #0] struct slot_header { uint32_t status; }; static int _slot_address(struct ringfs *fs, struct ringfs_loc *loc) { 802a35c: 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; 802a35e: 685c ldr r4, [r3, #4] 802a360: 18a2 adds r2, r4, r2 802a362: 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; 802a364: 6883 ldr r3, [r0, #8] 802a366: 6848 ldr r0, [r1, #4] 802a368: 3304 adds r3, #4 802a36a: 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) + 802a36c: fb04 3002 mla r0, r4, r2, r3 (sizeof(struct slot_header) + fs->object_size) * loc->slot; } 802a370: 3008 adds r0, #8 802a372: bd10 pop {r4, pc} 0802a374 <_slot_get_status>: static int _slot_get_status(struct ringfs *fs, struct ringfs_loc *loc, uint32_t *status) { 802a374: b570 push {r4, r5, r6, lr} return fs->flash->read(fs->flash, 802a376: 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) { 802a378: 4616 mov r6, r2 return fs->flash->read(fs->flash, 802a37a: f7ff ffed bl 802a358 <_slot_address> 802a37e: 6965 ldr r5, [r4, #20] 802a380: 4601 mov r1, r0 802a382: 4632 mov r2, r6 802a384: 4620 mov r0, r4 802a386: 2304 movs r3, #4 802a388: 47a8 blx r5 _slot_address(fs, loc) + offsetof(struct slot_header, status), status, sizeof(*status)); } 802a38a: bd70 pop {r4, r5, r6, pc} 0802a38c <_slot_set_status>: static int _slot_set_status(struct ringfs *fs, struct ringfs_loc *loc, uint32_t status) { 802a38c: b573 push {r0, r1, r4, r5, r6, lr} 802a38e: ac02 add r4, sp, #8 return fs->flash->program(fs->flash, 802a390: 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) { 802a392: f844 2d04 str.w r2, [r4, #-4]! return fs->flash->program(fs->flash, 802a396: f7ff ffdf bl 802a358 <_slot_address> 802a39a: 692e ldr r6, [r5, #16] 802a39c: 4601 mov r1, r0 802a39e: 4622 mov r2, r4 802a3a0: 4628 mov r0, r5 802a3a2: 2304 movs r3, #4 802a3a4: 47b0 blx r6 _slot_address(fs, loc) + offsetof(struct slot_header, status), &status, sizeof(status)); } 802a3a6: bd7c pop {r2, r3, r4, r5, r6, pc} 0802a3a8 <_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, 802a3a8: 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; 802a3aa: 6843 ldr r3, [r0, #4] 802a3ac: 18cb adds r3, r1, r3 802a3ae: 6801 ldr r1, [r0, #0] } static int _sector_get_status(struct ringfs *fs, int sector, uint32_t *status) { 802a3b0: b510 push {r4, lr} return fs->flash->read(fs->flash, 802a3b2: 4359 muls r1, r3 802a3b4: 6944 ldr r4, [r0, #20] 802a3b6: 2304 movs r3, #4 802a3b8: 47a0 blx r4 _sector_address(fs, sector) + offsetof(struct sector_header, status), status, sizeof(*status)); } 802a3ba: bd10 pop {r4, pc} 0802a3bc <_sector_set_status>: static int _sector_set_status(struct ringfs *fs, int sector, uint32_t status) { 802a3bc: b513 push {r0, r1, r4, lr} return fs->flash->program(fs->flash, 802a3be: 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) { 802a3c0: ab02 add r3, sp, #8 return fs->flash->program(fs->flash, 802a3c2: 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) { 802a3c4: 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; 802a3c8: 6842 ldr r2, [r0, #4] 802a3ca: 188a adds r2, r1, r2 802a3cc: 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, 802a3ce: 4351 muls r1, r2 802a3d0: 461a mov r2, r3 802a3d2: 2304 movs r3, #4 802a3d4: 47a0 blx r4 _sector_address(fs, sector) + offsetof(struct sector_header, status), &status, sizeof(status)); } 802a3d6: bd1c pop {r2, r3, r4, pc} 0802a3d8 <_sector_free>: static int _sector_free(struct ringfs *fs, int sector) { 802a3d8: 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; 802a3da: 6803 ldr r3, [r0, #0] 802a3dc: 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) { 802a3de: 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; 802a3e0: 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); 802a3e2: 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; 802a3e6: 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) { 802a3e8: 460e mov r6, r1 int sector_addr = _sector_address(fs, sector); _sector_set_status(fs, sector, SECTOR_ERASING); 802a3ea: f7ff ffe7 bl 802a3bc <_sector_set_status> fs->flash->sector_erase(fs->flash, sector_addr); 802a3ee: 6820 ldr r0, [r4, #0] 802a3f0: 4629 mov r1, r5 802a3f2: 68c3 ldr r3, [r0, #12] 802a3f4: 4798 blx r3 fs->flash->program(fs->flash, 802a3f6: 4622 mov r2, r4 802a3f8: 1d29 adds r1, r5, #4 802a3fa: f852 0b04 ldr.w r0, [r2], #4 802a3fe: 2304 movs r3, #4 802a400: 6907 ldr r7, [r0, #16] 802a402: 47b8 blx r7 sector_addr + offsetof(struct sector_header, version), &fs->version, sizeof(fs->version)); _sector_set_status(fs, sector, SECTOR_FREE); 802a404: 4620 mov r0, r4 802a406: 4631 mov r1, r6 802a408: f06f 02ff mvn.w r2, #255 ; 0xff 802a40c: f7ff ffd6 bl 802a3bc <_sector_set_status> return 0; } 802a410: 2000 movs r0, #0 802a412: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802a414 <_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++; 802a414: 684b ldr r3, [r1, #4] if (loc->slot >= fs->slots_per_sector) 802a416: 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++; 802a418: 3301 adds r3, #1 if (loc->slot >= fs->slots_per_sector) 802a41a: 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++; 802a41c: 604b str r3, [r1, #4] if (loc->slot >= fs->slots_per_sector) 802a41e: db09 blt.n 802a434 <_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) 802a420: 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++; 802a422: 680a ldr r2, [r1, #0] if (loc->sector >= fs->flash->sector_count) 802a424: 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++; 802a426: 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; 802a428: 2300 movs r3, #0 loc->sector++; if (loc->sector >= fs->flash->sector_count) 802a42a: 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; 802a42c: e881 000c stmia.w r1, {r2, r3} loc->sector++; if (loc->sector >= fs->flash->sector_count) loc->sector = 0; 802a430: bfa8 it ge 802a432: 600b strge r3, [r1, #0] 802a434: 4770 bx lr 0802a436 : 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; 802a436: e880 000e stmia.w r0, {r1, r2, r3} /* Precalculate commonly used values. */ fs->slots_per_sector = (fs->flash->sector_size - sizeof(struct sector_header)) / 802a43a: 680a ldr r2, [r1, #0] (sizeof(struct slot_header) + fs->object_size); 802a43c: 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)) / 802a43e: 3a08 subs r2, #8 802a440: fbb2 f3f3 udiv r3, r2, r3 802a444: 60c3 str r3, [r0, #12] (sizeof(struct slot_header) + fs->object_size); return 0; } 802a446: 2000 movs r0, #0 802a448: 4770 bx lr 0802a44a : int ringfs_format(struct ringfs *fs) { 802a44a: b538 push {r3, r4, r5, lr} 802a44c: 4604 mov r4, r0 /* Mark all sectors to prevent half-erased filesystems. */ for (int sector=0; sectorflash->sector_count; sector++) 802a44e: 2500 movs r5, #0 802a450: e005 b.n 802a45e _sector_set_status(fs, sector, SECTOR_FORMATTING); 802a452: 4629 mov r1, r5 802a454: 4620 mov r0, r4 802a456: 2200 movs r2, #0 802a458: f7ff ffb0 bl 802a3bc <_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++) 802a45c: 3501 adds r5, #1 802a45e: 6823 ldr r3, [r4, #0] 802a460: 689b ldr r3, [r3, #8] 802a462: 429d cmp r5, r3 802a464: dbf5 blt.n 802a452 802a466: 2500 movs r5, #0 802a468: e004 b.n 802a474 _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); 802a46a: 4629 mov r1, r5 802a46c: 4620 mov r0, r4 802a46e: f7ff ffb3 bl 802a3d8 <_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++) 802a472: 3501 adds r5, #1 802a474: 6823 ldr r3, [r4, #0] 802a476: 689b ldr r3, [r3, #8] 802a478: 429d cmp r5, r3 802a47a: dbf6 blt.n 802a46a _sector_free(fs, sector); /* Start reading & writing at the first sector. */ fs->read.sector = 0; 802a47c: 2000 movs r0, #0 802a47e: 6120 str r0, [r4, #16] fs->read.slot = 0; 802a480: 6160 str r0, [r4, #20] fs->write.sector = 0; 802a482: 61a0 str r0, [r4, #24] fs->write.slot = 0; 802a484: 61e0 str r0, [r4, #28] fs->cursor.sector = 0; 802a486: 6220 str r0, [r4, #32] fs->cursor.slot = 0; 802a488: 6260 str r0, [r4, #36] ; 0x24 return 0; } 802a48a: bd38 pop {r3, r4, r5, pc} 0802a48c : 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) % 802a48c: 6803 ldr r3, [r0, #0] 802a48e: 6981 ldr r1, [r0, #24] 802a490: 6902 ldr r2, [r0, #16] 802a492: 689b ldr r3, [r3, #8] 802a494: 1a8a subs r2, r1, r2 802a496: 18d2 adds r2, r2, r3 802a498: fb92 f1f3 sdiv r1, r2, r3 802a49c: fb03 2311 mls r3, r3, r1, r2 { return fs->slots_per_sector * (fs->flash->sector_count - 1); } int ringfs_count_estimate(struct ringfs *fs) { 802a4a0: 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; 802a4a2: 69c1 ldr r1, [r0, #28] 802a4a4: 68c4 ldr r4, [r0, #12] 802a4a6: 6940 ldr r0, [r0, #20] 802a4a8: fb04 1103 mla r1, r4, r3, r1 } 802a4ac: 1a08 subs r0, r1, r0 802a4ae: bd10 pop {r4, pc} 0802a4b0 : * - 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; 802a4b0: 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) { 802a4b2: 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; 802a4b4: 6985 ldr r5, [r0, #24] 802a4b6: 689b ldr r3, [r3, #8] 802a4b8: 3501 adds r5, #1 802a4ba: fb95 f2f3 sdiv r2, r5, r3 802a4be: 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) { 802a4c2: 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); 802a4c4: aa01 add r2, sp, #4 802a4c6: 4629 mov r1, r5 int ringfs_cursor_position(struct ringfs *fs) { return fs->cursor_position; } int ringfs_append(struct ringfs *fs, const void *object) { 802a4c8: 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); 802a4ca: f7ff ff6d bl 802a3a8 <_sector_get_status> if (status != SECTOR_FREE) { 802a4ce: 9b01 ldr r3, [sp, #4] 802a4d0: f513 7f80 cmn.w r3, #256 ; 0x100 802a4d4: d01b beq.n 802a50e /* Next sector must be freed. But first... */ /* Move the read & cursor heads out of the way. */ if (fs->read.sector == next_sector) 802a4d6: 6923 ldr r3, [r4, #16] 802a4d8: 42ab cmp r3, r5 802a4da: d108 bne.n 802a4ee /** 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) 802a4dc: 6821 ldr r1, [r4, #0] 802a4de: 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++; 802a4e0: 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; 802a4e2: 2300 movs r3, #0 loc->sector++; if (loc->sector >= fs->flash->sector_count) 802a4e4: 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++; 802a4e6: 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; 802a4e8: 6163 str r3, [r4, #20] loc->sector++; if (loc->sector >= fs->flash->sector_count) loc->sector = 0; 802a4ea: bfa8 it ge 802a4ec: 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) 802a4ee: 6a23 ldr r3, [r4, #32] 802a4f0: 42ab cmp r3, r5 802a4f2: d108 bne.n 802a506 /** 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) 802a4f4: 6821 ldr r1, [r4, #0] 802a4f6: 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++; 802a4f8: 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; 802a4fa: 2300 movs r3, #0 loc->sector++; if (loc->sector >= fs->flash->sector_count) 802a4fc: 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++; 802a4fe: 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; 802a500: 6263 str r3, [r4, #36] ; 0x24 loc->sector++; if (loc->sector >= fs->flash->sector_count) loc->sector = 0; 802a502: bfa8 it ge 802a504: 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); 802a506: 4620 mov r0, r4 802a508: 4629 mov r1, r5 802a50a: f7ff ff65 bl 802a3d8 <_sector_free> } /* Now we can make sure the current write sector is writable. */ _sector_get_status(fs, fs->write.sector, &status); 802a50e: 4620 mov r0, r4 802a510: 69a1 ldr r1, [r4, #24] 802a512: aa01 add r2, sp, #4 802a514: f7ff ff48 bl 802a3a8 <_sector_get_status> if (status == SECTOR_FREE) { 802a518: 9b01 ldr r3, [sp, #4] 802a51a: f513 7f80 cmn.w r3, #256 ; 0x100 802a51e: d105 bne.n 802a52c /* Free sector. Mark as used. */ _sector_set_status(fs, fs->write.sector, SECTOR_IN_USE); 802a520: 4620 mov r0, r4 802a522: 69a1 ldr r1, [r4, #24] 802a524: 4a15 ldr r2, [pc, #84] ; (802a57c ) 802a526: f7ff ff49 bl 802a3bc <_sector_set_status> 802a52a: e008 b.n 802a53e } else if (status != SECTOR_IN_USE) { 802a52c: f513 3f80 cmn.w r3, #65536 ; 0x10000 802a530: d005 beq.n 802a53e printf("ringfs_append: corrupted filesystem\r\n"); 802a532: 4813 ldr r0, [pc, #76] ; (802a580 ) 802a534: f7fd faa8 bl 8027a88 return -1; 802a538: f04f 30ff mov.w r0, #4294967295 802a53c: e01d b.n 802a57a } /* Preallocate slot. */ _slot_set_status(fs, &fs->write, SLOT_RESERVED); 802a53e: f104 0518 add.w r5, r4, #24 802a542: f06f 02ff mvn.w r2, #255 ; 0xff 802a546: 4629 mov r1, r5 802a548: 4620 mov r0, r4 802a54a: f7ff ff1f bl 802a38c <_slot_set_status> /* Write object. */ fs->flash->program(fs->flash, _slot_address(fs, &fs->write) + sizeof(struct slot_header), 802a54e: 4629 mov r1, r5 802a550: 4620 mov r0, r4 802a552: f7ff ff01 bl 802a358 <_slot_address> /* Preallocate slot. */ _slot_set_status(fs, &fs->write, SLOT_RESERVED); /* Write object. */ fs->flash->program(fs->flash, 802a556: 6826 ldr r6, [r4, #0] 802a558: 68a3 ldr r3, [r4, #8] 802a55a: f8d6 c010 ldr.w ip, [r6, #16] _slot_address(fs, &fs->write) + sizeof(struct slot_header), 802a55e: 1d01 adds r1, r0, #4 /* Preallocate slot. */ _slot_set_status(fs, &fs->write, SLOT_RESERVED); /* Write object. */ fs->flash->program(fs->flash, 802a560: 463a mov r2, r7 802a562: 4630 mov r0, r6 802a564: 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); 802a566: 4629 mov r1, r5 802a568: 4a04 ldr r2, [pc, #16] ; (802a57c ) 802a56a: 4620 mov r0, r4 802a56c: f7ff ff0e bl 802a38c <_slot_set_status> /* Advance the write head. */ _loc_advance_slot(fs, &fs->write); 802a570: 4620 mov r0, r4 802a572: 4629 mov r1, r5 802a574: f7ff ff4e bl 802a414 <_loc_advance_slot> return 0; 802a578: 2000 movs r0, #0 } 802a57a: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 802a57c: ffff0000 .word 0xffff0000 802a580: 08038d96 .word 0x08038d96 0802a584 : int ringfs_fetch(struct ringfs *fs, void *object) { 802a584: e92d 41f3 stmdb sp!, {r0, r1, r4, r5, r6, r7, r8, lr} 802a588: 4604 mov r4, r0 802a58a: 4688 mov r8, r1 /* Advance forward in search of a valid slot. */ while (!_loc_equal(&fs->cursor, &fs->write)) { 802a58c: f100 0520 add.w r5, r0, #32 802a590: e021 b.n 802a5d6 uint32_t status; _slot_get_status(fs, &fs->cursor, &status); 802a592: 4620 mov r0, r4 802a594: 4629 mov r1, r5 802a596: aa01 add r2, sp, #4 802a598: f7ff feec bl 802a374 <_slot_get_status> if (status == SLOT_VALID) { 802a59c: 9b01 ldr r3, [sp, #4] 802a59e: f513 3f80 cmn.w r3, #65536 ; 0x10000 802a5a2: d114 bne.n 802a5ce fs->flash->read(fs->flash, _slot_address(fs, &fs->cursor) + sizeof(struct slot_header), 802a5a4: 4629 mov r1, r5 802a5a6: 4620 mov r0, r4 802a5a8: f7ff fed6 bl 802a358 <_slot_address> uint32_t status; _slot_get_status(fs, &fs->cursor, &status); if (status == SLOT_VALID) { fs->flash->read(fs->flash, 802a5ac: 6827 ldr r7, [r4, #0] 802a5ae: 68a3 ldr r3, [r4, #8] 802a5b0: f8d7 c014 ldr.w ip, [r7, #20] _slot_address(fs, &fs->cursor) + sizeof(struct slot_header), 802a5b4: 1d01 adds r1, r0, #4 uint32_t status; _slot_get_status(fs, &fs->cursor, &status); if (status == SLOT_VALID) { fs->flash->read(fs->flash, 802a5b6: 4642 mov r2, r8 802a5b8: 4638 mov r0, r7 802a5ba: 47e0 blx ip _slot_address(fs, &fs->cursor) + sizeof(struct slot_header), object, fs->object_size); _loc_advance_slot(fs, &fs->cursor); 802a5bc: 4620 mov r0, r4 802a5be: 4629 mov r1, r5 802a5c0: f7ff ff28 bl 802a414 <_loc_advance_slot> fs->cursor_position++; 802a5c4: 6aa3 ldr r3, [r4, #40] ; 0x28 802a5c6: 3301 adds r3, #1 802a5c8: 62a3 str r3, [r4, #40] ; 0x28 return 0; 802a5ca: 4630 mov r0, r6 802a5cc: e012 b.n 802a5f4 } _loc_advance_slot(fs, &fs->cursor); 802a5ce: 4620 mov r0, r4 802a5d0: 4629 mov r1, r5 802a5d2: f7ff ff1f bl 802a414 <_loc_advance_slot> * @{ */ static bool _loc_equal(struct ringfs_loc *a, struct ringfs_loc *b) { return (a->sector == b->sector) && (a->slot == b->slot); 802a5d6: 6a22 ldr r2, [r4, #32] 802a5d8: 69a3 ldr r3, [r4, #24] 802a5da: 429a cmp r2, r3 802a5dc: d105 bne.n 802a5ea 802a5de: 6a66 ldr r6, [r4, #36] ; 0x24 802a5e0: 69e3 ldr r3, [r4, #28] 802a5e2: 1af1 subs r1, r6, r3 802a5e4: 424e negs r6, r1 802a5e6: 414e adcs r6, r1 802a5e8: e000 b.n 802a5ec 802a5ea: 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)) { 802a5ec: 2e00 cmp r6, #0 802a5ee: d0d0 beq.n 802a592 } _loc_advance_slot(fs, &fs->cursor); } return -1; 802a5f0: f04f 30ff mov.w r0, #4294967295 } 802a5f4: e8bd 81fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, pc} 0802a5f8 : return 0; } int ringfs_rewind(struct ringfs *fs) { fs->cursor = fs->read; 802a5f8: f100 0110 add.w r1, r0, #16 fs->cursor_position = 0; return 0; } int ringfs_rewind(struct ringfs *fs) { 802a5fc: 4603 mov r3, r0 fs->cursor = fs->read; 802a5fe: f100 0220 add.w r2, r0, #32 802a602: c903 ldmia r1, {r0, r1} 802a604: e882 0003 stmia.w r2, {r0, r1} fs->cursor_position = 0; 802a608: 2000 movs r0, #0 802a60a: 6298 str r0, [r3, #40] ; 0x28 return 0; } 802a60c: 4770 bx lr 0802a60e : return 0; } int ringfs_scan(struct ringfs *fs) { 802a60e: 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; 802a612: 6803 ldr r3, [r0, #0] 802a614: 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++) { 802a616: 2500 movs r5, #0 return 0; } int ringfs_scan(struct ringfs *fs) { 802a618: b085 sub sp, #20 802a61a: 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; 802a61c: 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; 802a61e: 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; 802a620: 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; 802a622: 46a9 mov r9, r5 return 0; } int ringfs_scan(struct ringfs *fs) { uint32_t previous_sector_status = SECTOR_FREE; 802a624: 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++) { 802a628: e031 b.n 802a68e uint32_t version; }; static int _sector_address(struct ringfs *fs, int sector_offset) { return (fs->flash->sector_offset + sector_offset) * fs->flash->sector_size; 802a62a: 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)); 802a62c: 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; 802a630: eb05 0b03 add.w fp, r5, r3 802a634: 6803 ldr r3, [r0, #0] 802a636: 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)); 802a63a: 4659 mov r1, fp 802a63c: 2308 movs r3, #8 802a63e: aa02 add r2, sp, #8 802a640: 47e0 blx ip /* Detect partially-formatted partitions. */ if (header.status == SECTOR_FORMATTING) { 802a642: 9b02 ldr r3, [sp, #8] 802a644: 2b00 cmp r3, #0 802a646: d06b beq.n 802a720 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) { 802a648: f1b3 4f7f cmp.w r3, #4278190080 ; 0xff000000 802a64c: d001 beq.n 802a652 802a64e: 3301 adds r3, #1 802a650: d106 bne.n 802a660 _sector_free(fs, addr); 802a652: 4620 mov r0, r4 802a654: 4659 mov r1, fp 802a656: f7ff febf bl 802a3d8 <_sector_free> header.status = SECTOR_FREE; 802a65a: f06f 03ff mvn.w r3, #255 ; 0xff 802a65e: 9302 str r3, [sp, #8] } /* Detect corrupted sectors. */ if (header.status != SECTOR_FREE && header.status != SECTOR_IN_USE) { 802a660: 9b02 ldr r3, [sp, #8] 802a662: f513 7f80 cmn.w r3, #256 ; 0x100 802a666: d002 beq.n 802a66e 802a668: f513 3f80 cmn.w r3, #65536 ; 0x10000 802a66c: d158 bne.n 802a720 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) { 802a66e: 6862 ldr r2, [r4, #4] 802a670: 9903 ldr r1, [sp, #12] 802a672: 4291 cmp r1, r2 802a674: d154 bne.n 802a720 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) 802a676: f513 7f80 cmn.w r3, #256 ; 0x100 802a67a: d05b beq.n 802a734 free_seen = true; /* Record the presence of a IN_USE sector. */ if (header.status == SECTOR_IN_USE) 802a67c: f513 3f80 cmn.w r3, #65536 ; 0x10000 802a680: d103 bne.n 802a68a 802a682: e050 b.n 802a726 fs->cursor.slot = 0; return 0; } int ringfs_scan(struct ringfs *fs) 802a684: 1e6e subs r6, r5, #1 return -1; } /* Record the presence of a FREE sector. */ if (header.status == SECTOR_FREE) free_seen = true; 802a686: 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++) { 802a68a: 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) { 802a68c: 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++) { 802a68e: 6820 ldr r0, [r4, #0] 802a690: 6883 ldr r3, [r0, #8] 802a692: 429d cmp r5, r3 802a694: dbc9 blt.n 802a62a previous_sector_status = header.status; } /* Detect the lack of a FREE sector. */ if (!free_seen) { 802a696: f1b8 0f00 cmp.w r8, #0 802a69a: d041 beq.n 802a720 return -1; } /* Start writing at the first sector if the filesystem is empty. */ if (!used_seen) { write_sector = 0; 802a69c: f1ba 0f00 cmp.w sl, #0 802a6a0: bf08 it eq 802a6a2: 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; 802a6a4: 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; 802a6a6: 61a6 str r6, [r4, #24] fs->write.slot = 0; 802a6a8: 61e3 str r3, [r4, #28] while (fs->write.sector == write_sector) { uint32_t status; _slot_get_status(fs, &fs->write, &status); 802a6aa: 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) { 802a6ae: e00b b.n 802a6c8 uint32_t status; _slot_get_status(fs, &fs->write, &status); 802a6b0: 4620 mov r0, r4 802a6b2: 4629 mov r1, r5 802a6b4: aa01 add r2, sp, #4 802a6b6: f7ff fe5d bl 802a374 <_slot_get_status> if (status == SLOT_ERASED) 802a6ba: 9b01 ldr r3, [sp, #4] 802a6bc: 3301 adds r3, #1 802a6be: d006 beq.n 802a6ce break; _loc_advance_slot(fs, &fs->write); 802a6c0: 4620 mov r0, r4 802a6c2: 4629 mov r1, r5 802a6c4: f7ff fea6 bl 802a414 <_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) { 802a6c8: 69a3 ldr r3, [r4, #24] 802a6ca: 42b3 cmp r3, r6 802a6cc: d0f0 beq.n 802a6b0 /* 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; 802a6ce: 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; 802a6d0: f8c4 9010 str.w r9, [r4, #16] fs->read.slot = 0; 802a6d4: 6163 str r3, [r4, #20] while (!_loc_equal(&fs->read, &fs->write)) { 802a6d6: f104 0510 add.w r5, r4, #16 802a6da: e00c b.n 802a6f6 uint32_t status; _slot_get_status(fs, &fs->read, &status); 802a6dc: 4620 mov r0, r4 802a6de: 4629 mov r1, r5 802a6e0: aa01 add r2, sp, #4 802a6e2: f7ff fe47 bl 802a374 <_slot_get_status> if (status == SLOT_VALID) 802a6e6: 9b01 ldr r3, [sp, #4] 802a6e8: f513 3f80 cmn.w r3, #65536 ; 0x10000 802a6ec: d013 beq.n 802a716 break; _loc_advance_slot(fs, &fs->read); 802a6ee: 4620 mov r0, r4 802a6f0: 4629 mov r1, r5 802a6f2: f7ff fe8f bl 802a414 <_loc_advance_slot> * @{ */ static bool _loc_equal(struct ringfs_loc *a, struct ringfs_loc *b) { return (a->sector == b->sector) && (a->slot == b->slot); 802a6f6: 6922 ldr r2, [r4, #16] 802a6f8: 69a3 ldr r3, [r4, #24] 802a6fa: 429a cmp r2, r3 802a6fc: d108 bne.n 802a710 802a6fe: 69e3 ldr r3, [r4, #28] 802a700: 6962 ldr r2, [r4, #20] 802a702: ebb2 0e03 subs.w lr, r2, r3 802a706: f1de 0300 rsbs r3, lr, #0 802a70a: eb53 030e adcs.w r3, r3, lr 802a70e: e000 b.n 802a712 802a710: 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)) { 802a712: 2b00 cmp r3, #0 802a714: d0e2 beq.n 802a6dc _loc_advance_slot(fs, &fs->read); } /* Move the read cursor to the read head position. */ ringfs_rewind(fs); 802a716: 4620 mov r0, r4 802a718: f7ff ff6e bl 802a5f8 return 0; 802a71c: 2000 movs r0, #0 802a71e: e00d b.n 802a73c } /* Detect the lack of a FREE sector. */ if (!free_seen) { DBG printf("ringfs_scan: invariant violated: no FREE sector found\r\n"); return -1; 802a720: f04f 30ff mov.w r0, #4294967295 802a724: e00a b.n 802a73c /* 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) 802a726: f517 7f80 cmn.w r7, #256 ; 0x100 802a72a: bf08 it eq 802a72c: 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; 802a72e: f04f 0a01 mov.w sl, #1 802a732: e7aa b.n 802a68a /* 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) 802a734: f517 3f80 cmn.w r7, #65536 ; 0x10000 802a738: d0a4 beq.n 802a684 802a73a: e7a4 b.n 802a686 /* Move the read cursor to the read head position. */ ringfs_rewind(fs); return 0; } 802a73c: b005 add sp, #20 802a73e: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0802a742 : 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. */ 802a742: f100 0308 add.w r3, r0, #8 802a746: 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; 802a748: 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. */ 802a74c: 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. */ 802a74e: 6103 str r3, [r0, #16] pxList->uxNumberOfItems = ( UBaseType_t ) 0U; 802a750: 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; 802a752: 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; 802a754: 6003 str r3, [r0, #0] 802a756: 4770 bx lr 0802a758 : /*-----------------------------------------------------------*/ void vListInitialiseItem( ListItem_t * const pxItem ) { /* Make sure the list item is not recorded as being on a list. */ pxItem->pvContainer = NULL; 802a758: 2300 movs r3, #0 802a75a: 6103 str r3, [r0, #16] 802a75c: 4770 bx lr 0802a75e : } /*-----------------------------------------------------------*/ void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem ) { ListItem_t * const pxIndex = pxList->pxIndex; 802a75e: 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; 802a760: 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; 802a762: 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; 802a764: 604b str r3, [r1, #4] pxNewListItem->pxPrevious = pxIndex->pxPrevious; 802a766: 608a str r2, [r1, #8] pxIndex->pxPrevious->pxNext = pxNewListItem; 802a768: 689a ldr r2, [r3, #8] pxIndex->pxPrevious = pxNewListItem; 802a76a: 6099 str r1, [r3, #8] /* Remember which list the item is in. */ pxNewListItem->pvContainer = ( void * ) pxList; ( pxList->uxNumberOfItems )++; 802a76c: 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; 802a76e: 6051 str r1, [r2, #4] pxIndex->pxPrevious = pxNewListItem; /* Remember which list the item is in. */ pxNewListItem->pvContainer = ( void * ) pxList; ( pxList->uxNumberOfItems )++; 802a770: 3301 adds r3, #1 802a772: 6003 str r3, [r0, #0] 802a774: 4770 bx lr 0802a776 : /*-----------------------------------------------------------*/ void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) { ListItem_t *pxIterator; const TickType_t xValueOfInsertion = pxNewListItem->xItemValue; 802a776: 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 ) 802a778: 1c53 adds r3, r2, #1 ( pxList->uxNumberOfItems )++; } /*-----------------------------------------------------------*/ void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) { 802a77a: 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 ) 802a77c: d101 bne.n 802a782 { pxIterator = pxList->xListEnd.pxPrevious; 802a77e: 6903 ldr r3, [r0, #16] 802a780: e007 b.n 802a792 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. */ 802a782: f100 0308 add.w r3, r0, #8 802a786: e000 b.n 802a78a 802a788: 4623 mov r3, r4 802a78a: 685c ldr r4, [r3, #4] 802a78c: 6825 ldr r5, [r4, #0] 802a78e: 4295 cmp r5, r2 802a790: d9fa bls.n 802a788 /* There is nothing to do here, just iterating to the wanted insertion position. */ } } pxNewListItem->pxNext = pxIterator->pxNext; 802a792: 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; 802a794: 6108 str r0, [r1, #16] /* There is nothing to do here, just iterating to the wanted insertion position. */ } } pxNewListItem->pxNext = pxIterator->pxNext; 802a796: 604a str r2, [r1, #4] pxNewListItem->pxNext->pxPrevious = pxNewListItem; 802a798: 6091 str r1, [r2, #8] pxNewListItem->pxPrevious = pxIterator; pxIterator->pxNext = pxNewListItem; 802a79a: 6059 str r1, [r3, #4] } } pxNewListItem->pxNext = pxIterator->pxNext; pxNewListItem->pxNext->pxPrevious = pxNewListItem; pxNewListItem->pxPrevious = pxIterator; 802a79c: 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 )++; 802a79e: 6803 ldr r3, [r0, #0] 802a7a0: 3301 adds r3, #1 802a7a2: 6003 str r3, [r0, #0] 802a7a4: bd30 pop {r4, r5, pc} 0802a7a6 : { /* 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; 802a7a6: 6841 ldr r1, [r0, #4] 802a7a8: 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; 802a7aa: 6903 ldr r3, [r0, #16] pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious; 802a7ac: 608a str r2, [r1, #8] pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext; 802a7ae: 6882 ldr r2, [r0, #8] 802a7b0: 6051 str r1, [r2, #4] /* Make sure the index is left pointing to a valid item. */ if( pxList->pxIndex == pxItemToRemove ) 802a7b2: 6859 ldr r1, [r3, #4] 802a7b4: 4281 cmp r1, r0 { pxList->pxIndex = pxItemToRemove->pxPrevious; 802a7b6: bf08 it eq 802a7b8: 605a streq r2, [r3, #4] else { mtCOVERAGE_TEST_MARKER(); } pxItemToRemove->pvContainer = NULL; 802a7ba: 2200 movs r2, #0 802a7bc: 6102 str r2, [r0, #16] ( pxList->uxNumberOfItems )--; 802a7be: 6818 ldr r0, [r3, #0] 802a7c0: 3801 subs r0, #1 802a7c2: 6018 str r0, [r3, #0] return pxList->uxNumberOfItems; } 802a7c4: 4770 bx lr 0802a7c6 : } } /*-----------------------------------------------------------*/ static void prvUnlockQueue( Queue_t * const pxQueue ) { 802a7c6: b538 push {r3, r4, r5, lr} 802a7c8: 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 ) 802a7ca: 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(); 802a7ce: f001 f9bd bl 802bb4c { /* See if data was added to the queue while it was locked. */ while( pxQueue->xTxLock > queueLOCKED_UNMODIFIED ) 802a7d2: e00a b.n 802a7ea } #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 ) 802a7d4: 6a63 ldr r3, [r4, #36] ; 0x24 802a7d6: b15b cbz r3, 802a7f0 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 802a7d8: 4628 mov r0, r5 802a7da: f000 fecd bl 802b578 802a7de: b108 cbz r0, 802a7e4 { /* The task waiting has a higher priority so record that a context switch is required. */ vTaskMissedYield(); 802a7e0: f000 ff44 bl 802b66c break; } } #endif /* configUSE_QUEUE_SETS */ --( pxQueue->xTxLock ); 802a7e4: 6ca3 ldr r3, [r4, #72] ; 0x48 802a7e6: 3b01 subs r3, #1 802a7e8: 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 ) 802a7ea: 6ca3 ldr r3, [r4, #72] ; 0x48 802a7ec: 2b00 cmp r3, #0 802a7ee: dcf1 bgt.n 802a7d4 #endif /* configUSE_QUEUE_SETS */ --( pxQueue->xTxLock ); } pxQueue->xTxLock = queueUNLOCKED; 802a7f0: f04f 33ff mov.w r3, #4294967295 802a7f4: 64a3 str r3, [r4, #72] ; 0x48 } taskEXIT_CRITICAL(); 802a7f6: f001 f9d5 bl 802bba4 { while( pxQueue->xRxLock > queueLOCKED_UNMODIFIED ) { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 802a7fa: f104 0510 add.w r5, r4, #16 pxQueue->xTxLock = queueUNLOCKED; } taskEXIT_CRITICAL(); /* Do the same for the Rx lock. */ taskENTER_CRITICAL(); 802a7fe: f001 f9a5 bl 802bb4c { while( pxQueue->xRxLock > queueLOCKED_UNMODIFIED ) 802a802: e00a b.n 802a81a { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 802a804: 6923 ldr r3, [r4, #16] 802a806: b15b cbz r3, 802a820 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 802a808: 4628 mov r0, r5 802a80a: f000 feb5 bl 802b578 802a80e: b108 cbz r0, 802a814 { vTaskMissedYield(); 802a810: f000 ff2c bl 802b66c else { mtCOVERAGE_TEST_MARKER(); } --( pxQueue->xRxLock ); 802a814: 6c63 ldr r3, [r4, #68] ; 0x44 802a816: 3b01 subs r3, #1 802a818: 6463 str r3, [r4, #68] ; 0x44 taskEXIT_CRITICAL(); /* Do the same for the Rx lock. */ taskENTER_CRITICAL(); { while( pxQueue->xRxLock > queueLOCKED_UNMODIFIED ) 802a81a: 6c63 ldr r3, [r4, #68] ; 0x44 802a81c: 2b00 cmp r3, #0 802a81e: dcf1 bgt.n 802a804 { break; } } pxQueue->xRxLock = queueUNLOCKED; 802a820: f04f 33ff mov.w r3, #4294967295 802a824: 6463 str r3, [r4, #68] ; 0x44 } taskEXIT_CRITICAL(); } 802a826: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} } } pxQueue->xRxLock = queueUNLOCKED; } taskEXIT_CRITICAL(); 802a82a: f001 b9bb b.w 802bba4 0802a82e : } /*-----------------------------------------------------------*/ static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer ) { if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) 802a82e: 6c02 ldr r2, [r0, #64] ; 0x40 return xReturn; } /*-----------------------------------------------------------*/ static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer ) { 802a830: b530 push {r4, r5, lr} 802a832: 4603 mov r3, r0 if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) 802a834: b16a cbz r2, 802a852 { pxQueue->u.pcReadFrom += pxQueue->uxItemSize; 802a836: 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. */ 802a838: 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; 802a83a: 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. */ 802a83c: 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; 802a83e: 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; 802a840: bf24 itt cs 802a842: 6804 ldrcs r4, [r0, #0] 802a844: 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. */ 802a846: 4608 mov r0, r1 802a848: 68d9 ldr r1, [r3, #12] } } 802a84a: 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. */ 802a84e: f7f7 b9ed b.w 8021c2c 802a852: bd30 pop {r4, r5, pc} 0802a854 : #endif /* configUSE_TRACE_FACILITY */ /*-----------------------------------------------------------*/ static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition ) { 802a854: b538 push {r3, r4, r5, lr} 802a856: 4615 mov r5, r2 BaseType_t xReturn = pdFALSE; if( pxQueue->uxItemSize == ( UBaseType_t ) 0 ) 802a858: 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 ) { 802a85a: 4604 mov r4, r0 BaseType_t xReturn = pdFALSE; if( pxQueue->uxItemSize == ( UBaseType_t ) 0 ) 802a85c: b93a cbnz r2, 802a86e { #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 802a85e: 6805 ldr r5, [r0, #0] 802a860: b105 cbz r5, 802a864 802a862: e028 b.n 802a8b6 { /* The mutex is no longer being held. */ xReturn = xTaskPriorityDisinherit( ( void * ) pxQueue->pxMutexHolder ); 802a864: 6840 ldr r0, [r0, #4] 802a866: f000 ff63 bl 802b730 pxQueue->pxMutexHolder = NULL; 802a86a: 6065 str r5, [r4, #4] 802a86c: e024 b.n 802a8b8 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_MUTEXES */ } else if( xPosition == queueSEND_TO_BACK ) 802a86e: b96d cbnz r5, 802a88c { ( 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. */ 802a870: 6880 ldr r0, [r0, #8] 802a872: f7f7 f9db bl 8021c2c pxQueue->pcWriteTo += pxQueue->uxItemSize; 802a876: 68a2 ldr r2, [r4, #8] 802a878: 6c23 ldr r3, [r4, #64] ; 0x40 802a87a: 18d3 adds r3, r2, r3 if( pxQueue->pcWriteTo >= pxQueue->pcTail ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 802a87c: 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; 802a87e: 60a3 str r3, [r4, #8] if( pxQueue->pcWriteTo >= pxQueue->pcTail ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 802a880: 4293 cmp r3, r2 802a882: d318 bcc.n 802a8b6 { pxQueue->pcWriteTo = pxQueue->pcHead; 802a884: 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; 802a886: 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; 802a888: 60a3 str r3, [r4, #8] 802a88a: e015 b.n 802a8b8 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. */ 802a88c: 68c0 ldr r0, [r0, #12] 802a88e: f7f7 f9cd bl 8021c2c pxQueue->u.pcReadFrom -= pxQueue->uxItemSize; 802a892: 6c23 ldr r3, [r4, #64] ; 0x40 802a894: 68e2 ldr r2, [r4, #12] if( pxQueue->u.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 802a896: 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; 802a898: 425b negs r3, r3 802a89a: 18d2 adds r2, r2, r3 if( pxQueue->u.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 802a89c: 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; 802a89e: 60e2 str r2, [r4, #12] if( pxQueue->u.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 802a8a0: d202 bcs.n 802a8a8 { pxQueue->u.pcReadFrom = ( pxQueue->pcTail - pxQueue->uxItemSize ); 802a8a2: 6862 ldr r2, [r4, #4] 802a8a4: 18d3 adds r3, r2, r3 802a8a6: 60e3 str r3, [r4, #12] else { mtCOVERAGE_TEST_MARKER(); } if( xPosition == queueOVERWRITE ) 802a8a8: 2d02 cmp r5, #2 802a8aa: d104 bne.n 802a8b6 { if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 ) 802a8ac: 6ba3 ldr r3, [r4, #56] ; 0x38 802a8ae: b113 cbz r3, 802a8b6 { /* 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 ); 802a8b0: 6ba3 ldr r3, [r4, #56] ; 0x38 802a8b2: 3b01 subs r3, #1 802a8b4: 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; 802a8b6: 2000 movs r0, #0 { mtCOVERAGE_TEST_MARKER(); } } ++( pxQueue->uxMessagesWaiting ); 802a8b8: 6ba3 ldr r3, [r4, #56] ; 0x38 802a8ba: 3301 adds r3, #1 802a8bc: 63a3 str r3, [r4, #56] ; 0x38 return xReturn; } 802a8be: bd38 pop {r3, r4, r5, pc} 0802a8c0 : } \ taskEXIT_CRITICAL() /*-----------------------------------------------------------*/ BaseType_t xQueueGenericReset( QueueHandle_t xQueue, BaseType_t xNewQueue ) { 802a8c0: b538 push {r3, r4, r5, lr} 802a8c2: 460d mov r5, r1 Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802a8c4: 4604 mov r4, r0 802a8c6: b910 cbnz r0, 802a8ce 802a8c8: f001 f938 bl 802bb3c 802a8cc: e7fe b.n 802a8cc taskENTER_CRITICAL(); 802a8ce: f001 f93d bl 802bb4c { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); 802a8d2: 6823 ldr r3, [r4, #0] 802a8d4: 6be0 ldr r0, [r4, #60] ; 0x3c 802a8d6: 6c22 ldr r2, [r4, #64] ; 0x40 pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; pxQueue->pcWriteTo = pxQueue->pcHead; 802a8d8: 60a3 str r3, [r4, #8] configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); 802a8da: 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 ); 802a8de: 3801 subs r0, #1 802a8e0: fb02 3300 mla r3, r2, r0, r3 configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); 802a8e4: 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 ); 802a8e6: 60e3 str r3, [r4, #12] configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; 802a8e8: 2100 movs r1, #0 pxQueue->pcWriteTo = pxQueue->pcHead; pxQueue->u.pcReadFrom = pxQueue->pcHead + ( ( pxQueue->uxLength - ( UBaseType_t ) 1U ) * pxQueue->uxItemSize ); pxQueue->xRxLock = queueUNLOCKED; 802a8ea: f04f 33ff mov.w r3, #4294967295 configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; 802a8ee: 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; 802a8f0: 6463 str r3, [r4, #68] ; 0x44 pxQueue->xTxLock = queueUNLOCKED; 802a8f2: 64a3 str r3, [r4, #72] ; 0x48 if( xNewQueue == pdFALSE ) 802a8f4: b955 cbnz r5, 802a90c /* 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 ) 802a8f6: 6923 ldr r3, [r4, #16] 802a8f8: b183 cbz r3, 802a91c { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) == pdTRUE ) 802a8fa: f104 0010 add.w r0, r4, #16 802a8fe: f000 fe3b bl 802b578 802a902: 2801 cmp r0, #1 802a904: d10a bne.n 802a91c { queueYIELD_IF_USING_PREEMPTION(); 802a906: f001 f90d bl 802bb24 802a90a: e007 b.n 802a91c } } else { /* Ensure the event queues start in the correct state. */ vListInitialise( &( pxQueue->xTasksWaitingToSend ) ); 802a90c: f104 0010 add.w r0, r4, #16 802a910: f7ff ff17 bl 802a742 vListInitialise( &( pxQueue->xTasksWaitingToReceive ) ); 802a914: f104 0024 add.w r0, r4, #36 ; 0x24 802a918: f7ff ff13 bl 802a742 } } taskEXIT_CRITICAL(); 802a91c: f001 f942 bl 802bba4 /* A value is returned for calling semantic consistency with previous versions. */ return pdPASS; } 802a920: 2001 movs r0, #1 802a922: bd38 pop {r3, r4, r5, pc} 0802a924 : /*-----------------------------------------------------------*/ QueueHandle_t xQueueGenericCreate( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType ) { 802a924: b5f8 push {r3, r4, r5, r6, r7, lr} 802a926: 460d mov r5, r1 802a928: 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 ); 802a92a: 4606 mov r6, r0 802a92c: b910 cbnz r0, 802a934 802a92e: f001 f905 bl 802bb3c 802a932: e7fe b.n 802a932 if( uxItemSize == ( UBaseType_t ) 0 ) 802a934: b111 cbz r1, 802a93c } 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. */ 802a936: 4348 muls r0, r1 802a938: 3001 adds r0, #1 802a93a: e000 b.n 802a93e configASSERT( uxQueueLength > ( UBaseType_t ) 0 ); if( uxItemSize == ( UBaseType_t ) 0 ) { /* There is not going to be a queue storage area. */ xQueueSizeInBytes = ( size_t ) 0; 802a93c: 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 ); 802a93e: 3054 adds r0, #84 ; 0x54 802a940: f001 fa12 bl 802bd68 if( pcAllocatedBuffer != NULL ) 802a944: 4604 mov r4, r0 802a946: b138 cbz r0, 802a958 { 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 ) 802a948: b90d cbnz r5, 802a94e { /* 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; 802a94a: 6020 str r0, [r4, #0] 802a94c: e007 b.n 802a95e } 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 ); 802a94e: f100 0354 add.w r3, r0, #84 ; 0x54 802a952: 6003 str r3, [r0, #0] 802a954: e003 b.n 802a95e 802a956: e7fe b.n 802a956 else { mtCOVERAGE_TEST_MARKER(); } configASSERT( xReturn ); 802a958: f001 f8f0 bl 802bb3c 802a95c: e7fb b.n 802a956 pxNewQueue->pcHead = pcAllocatedBuffer + sizeof( Queue_t ); } /* Initialise the queue members as described above where the queue type is defined. */ pxNewQueue->uxLength = uxQueueLength; 802a95e: 63e6 str r6, [r4, #60] ; 0x3c pxNewQueue->uxItemSize = uxItemSize; 802a960: 6425 str r5, [r4, #64] ; 0x40 ( void ) xQueueGenericReset( pxNewQueue, pdTRUE ); 802a962: 4620 mov r0, r4 802a964: 2101 movs r1, #1 802a966: f7ff ffab bl 802a8c0 #if ( configUSE_TRACE_FACILITY == 1 ) { pxNewQueue->ucQueueType = ucQueueType; 802a96a: f884 7050 strb.w r7, [r4, #80] ; 0x50 } configASSERT( xReturn ); return xReturn; } 802a96e: 4620 mov r0, r4 802a970: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802a972 : /*-----------------------------------------------------------*/ #if ( configUSE_COUNTING_SEMAPHORES == 1 ) QueueHandle_t xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount ) { 802a972: b510 push {r4, lr} 802a974: 460c mov r4, r1 QueueHandle_t xHandle; configASSERT( uxMaxCount != 0 ); 802a976: b910 cbnz r0, 802a97e 802a978: f001 f8e0 bl 802bb3c 802a97c: e7fe b.n 802a97c configASSERT( uxInitialCount <= uxMaxCount ); 802a97e: 4281 cmp r1, r0 802a980: d902 bls.n 802a988 802a982: f001 f8db bl 802bb3c 802a986: e7fe b.n 802a986 xHandle = xQueueGenericCreate( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_COUNTING_SEMAPHORE ); 802a988: 2100 movs r1, #0 802a98a: 2202 movs r2, #2 802a98c: f7ff ffca bl 802a924 if( xHandle != NULL ) 802a990: b110 cbz r0, 802a998 { ( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount; 802a992: 6384 str r4, [r0, #56] ; 0x38 802a994: bd10 pop {r4, pc} 802a996: e7fe b.n 802a996 else { traceCREATE_COUNTING_SEMAPHORE_FAILED(); } configASSERT( xHandle ); 802a998: f001 f8d0 bl 802bb3c 802a99c: e7fb b.n 802a996 0802a99e : #endif /* configUSE_COUNTING_SEMAPHORES */ /*-----------------------------------------------------------*/ BaseType_t xQueueGenericSend( QueueHandle_t xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, const BaseType_t xCopyPosition ) { 802a99e: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 802a9a2: b085 sub sp, #20 802a9a4: 460f mov r7, r1 802a9a6: 9201 str r2, [sp, #4] 802a9a8: 461d mov r5, r3 BaseType_t xEntryTimeSet = pdFALSE, xYieldRequired; TimeOut_t xTimeOut; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802a9aa: 4604 mov r4, r0 802a9ac: b910 cbnz r0, 802a9b4 802a9ae: f001 f8c5 bl 802bb3c 802a9b2: e7fe b.n 802a9b2 configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802a9b4: 2900 cmp r1, #0 802a9b6: d17b bne.n 802aab0 802a9b8: 6c03 ldr r3, [r0, #64] ; 0x40 802a9ba: 2b00 cmp r3, #0 802a9bc: d078 beq.n 802aab0 802a9be: e074 b.n 802aaaa 802a9c0: e7fe b.n 802a9c0 configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 802a9c2: 6be3 ldr r3, [r4, #60] ; 0x3c 802a9c4: 2b01 cmp r3, #1 802a9c6: d176 bne.n 802aab6 802a9c8: e078 b.n 802aabc 802a9ca: e7fe b.n 802a9ca #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 802a9cc: 9e01 ldr r6, [sp, #4] 802a9ce: b126 cbz r6, 802a9da 802a9d0: e079 b.n 802aac6 802a9d2: e7fe b.n 802a9d2 802a9d4: 2601 movs r6, #1 802a9d6: e002 b.n 802a9de 802a9d8: 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 ); 802a9da: 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(); 802a9de: f001 f8b5 bl 802bb4c { /* 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 ) ) 802a9e2: 6ba2 ldr r2, [r4, #56] ; 0x38 802a9e4: 6be3 ldr r3, [r4, #60] ; 0x3c 802a9e6: 429a cmp r2, r3 802a9e8: d301 bcc.n 802a9ee 802a9ea: 2d02 cmp r5, #2 802a9ec: d115 bne.n 802aa1a { traceQUEUE_SEND( pxQueue ); xYieldRequired = prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition ); 802a9ee: 4620 mov r0, r4 802a9f0: 4639 mov r1, r7 802a9f2: 462a mov r2, r5 802a9f4: f7ff ff2e bl 802a854 } #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 ) 802a9f8: 6a63 ldr r3, [r4, #36] ; 0x24 802a9fa: b143 cbz r3, 802aa0e { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) == pdTRUE ) 802a9fc: f104 0024 add.w r0, r4, #36 ; 0x24 802aa00: f000 fdba bl 802b578 802aa04: 2801 cmp r0, #1 802aa06: d104 bne.n 802aa12 { /* 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(); 802aa08: f001 f88c bl 802bb24 802aa0c: e001 b.n 802aa12 else { mtCOVERAGE_TEST_MARKER(); } } else if( xYieldRequired != pdFALSE ) 802aa0e: 2800 cmp r0, #0 802aa10: d1fa bne.n 802aa08 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_QUEUE_SETS */ taskEXIT_CRITICAL(); 802aa12: f001 f8c7 bl 802bba4 return pdPASS; 802aa16: 2001 movs r0, #1 802aa18: e058 b.n 802aacc } else { if( xTicksToWait == ( TickType_t ) 0 ) 802aa1a: f8dd 9004 ldr.w r9, [sp, #4] 802aa1e: f1b9 0f00 cmp.w r9, #0 802aa22: d102 bne.n 802aa2a { /* The queue was full and no block time is specified (or the block time has expired) so leave now. */ taskEXIT_CRITICAL(); 802aa24: f001 f8be bl 802bba4 802aa28: e03d b.n 802aaa6 /* Return to the original privilege level before exiting the function. */ traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; } else if( xEntryTimeSet == pdFALSE ) 802aa2a: b916 cbnz r6, 802aa32 { /* The queue was full and a block time was specified so configure the timeout structure. */ vTaskSetTimeOutState( &xTimeOut ); 802aa2c: a802 add r0, sp, #8 802aa2e: f000 fddf bl 802b5f0 /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); 802aa32: f001 f8b7 bl 802bba4 /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); 802aa36: f000 fb5b bl 802b0f0 prvLockQueue( pxQueue ); 802aa3a: f001 f887 bl 802bb4c 802aa3e: 6c63 ldr r3, [r4, #68] ; 0x44 802aa40: 3301 adds r3, #1 802aa42: bf08 it eq 802aa44: f8c4 8044 streq.w r8, [r4, #68] ; 0x44 802aa48: 6ca3 ldr r3, [r4, #72] ; 0x48 802aa4a: 3301 adds r3, #1 802aa4c: bf08 it eq 802aa4e: f8c4 8048 streq.w r8, [r4, #72] ; 0x48 802aa52: f001 f8a7 bl 802bba4 /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 802aa56: a802 add r0, sp, #8 802aa58: a901 add r1, sp, #4 802aa5a: f000 fdd9 bl 802b610 802aa5e: b9e8 cbnz r0, 802aa9c static BaseType_t prvIsQueueFull( const Queue_t *pxQueue ) { BaseType_t xReturn; taskENTER_CRITICAL(); 802aa60: f001 f874 bl 802bb4c { if( pxQueue->uxMessagesWaiting == pxQueue->uxLength ) 802aa64: f8d4 9038 ldr.w r9, [r4, #56] ; 0x38 802aa68: 6be6 ldr r6, [r4, #60] ; 0x3c else { xReturn = pdFALSE; } } taskEXIT_CRITICAL(); 802aa6a: f001 f89b bl 802bba4 prvLockQueue( pxQueue ); /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) { if( prvIsQueueFull( pxQueue ) != pdFALSE ) 802aa6e: 45b1 cmp r9, r6 802aa70: d10e bne.n 802aa90 { traceBLOCKING_ON_QUEUE_SEND( pxQueue ); vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait ); 802aa72: f104 0010 add.w r0, r4, #16 802aa76: 9901 ldr r1, [sp, #4] 802aa78: f000 fd22 bl 802b4c0 /* 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 ); 802aa7c: 4620 mov r0, r4 802aa7e: f7ff fea2 bl 802a7c6 /* 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 ) 802aa82: f000 fbd1 bl 802b228 802aa86: 2800 cmp r0, #0 802aa88: d1a4 bne.n 802a9d4 { portYIELD_WITHIN_API(); 802aa8a: f001 f84b bl 802bb24 802aa8e: e7a1 b.n 802a9d4 } } else { /* Try again. */ prvUnlockQueue( pxQueue ); 802aa90: 4620 mov r0, r4 802aa92: f7ff fe98 bl 802a7c6 ( void ) xTaskResumeAll(); 802aa96: f000 fbc7 bl 802b228 802aa9a: e79b b.n 802a9d4 } } else { /* The timeout has expired. */ prvUnlockQueue( pxQueue ); 802aa9c: 4620 mov r0, r4 802aa9e: f7ff fe92 bl 802a7c6 ( void ) xTaskResumeAll(); 802aaa2: f000 fbc1 bl 802b228 /* Return to the original privilege level before exiting the function. */ traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; 802aaa6: 2000 movs r0, #0 802aaa8: e010 b.n 802aacc 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 ) ) ); 802aaaa: f001 f847 bl 802bb3c 802aaae: e787 b.n 802a9c0 configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 802aab0: 2d02 cmp r5, #2 802aab2: d103 bne.n 802aabc 802aab4: e785 b.n 802a9c2 802aab6: f001 f841 bl 802bb3c 802aaba: e786 b.n 802a9ca #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 802aabc: f000 fddc bl 802b678 802aac0: 2800 cmp r0, #0 802aac2: d189 bne.n 802a9d8 802aac4: e782 b.n 802a9cc 802aac6: f001 f839 bl 802bb3c 802aaca: e782 b.n 802a9d2 function. */ traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; } } } 802aacc: b005 add sp, #20 802aace: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 0802aad2 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) QueueHandle_t xQueueCreateMutex( const uint8_t ucQueueType ) { 802aad2: b570 push {r4, r5, r6, lr} 802aad4: 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 ) ); 802aad6: 2054 movs r0, #84 ; 0x54 802aad8: f001 f946 bl 802bd68 if( pxNewQueue != NULL ) 802aadc: 4604 mov r4, r0 802aade: b108 cbz r0, 802aae4 802aae0: e003 b.n 802aaea 802aae2: e7fe b.n 802aae2 else { traceCREATE_MUTEX_FAILED(); } configASSERT( pxNewQueue ); 802aae4: f001 f82a bl 802bb3c 802aae8: e7fb b.n 802aae2 /* 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; 802aaea: 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; 802aaec: 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; 802aaee: 63c3 str r3, [r0, #60] ; 0x3c pxNewQueue->uxItemSize = ( UBaseType_t ) 0U; pxNewQueue->xRxLock = queueUNLOCKED; 802aaf0: 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; 802aaf4: 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; 802aaf6: 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; 802aaf8: 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; 802aafa: 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; 802aafc: 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; 802aafe: 6085 str r5, [r0, #8] pxNewQueue->u.pcReadFrom = NULL; 802ab00: 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; 802ab02: 6405 str r5, [r0, #64] ; 0x40 pxNewQueue->xRxLock = queueUNLOCKED; pxNewQueue->xTxLock = queueUNLOCKED; #if ( configUSE_TRACE_FACILITY == 1 ) { pxNewQueue->ucQueueType = ucQueueType; 802ab04: f880 6050 strb.w r6, [r0, #80] ; 0x50 pxNewQueue->pxQueueSetContainer = NULL; } #endif /* Ensure the event queues start with the correct state. */ vListInitialise( &( pxNewQueue->xTasksWaitingToSend ) ); 802ab08: 3010 adds r0, #16 802ab0a: f7ff fe1a bl 802a742 vListInitialise( &( pxNewQueue->xTasksWaitingToReceive ) ); 802ab0e: f104 0024 add.w r0, r4, #36 ; 0x24 802ab12: f7ff fe16 bl 802a742 traceCREATE_MUTEX( pxNewQueue ); /* Start with the semaphore in the expected state. */ ( void ) xQueueGenericSend( pxNewQueue, NULL, ( TickType_t ) 0U, queueSEND_TO_BACK ); 802ab16: 4620 mov r0, r4 802ab18: 4629 mov r1, r5 802ab1a: 462a mov r2, r5 802ab1c: 462b mov r3, r5 802ab1e: f7ff ff3e bl 802a99e traceCREATE_MUTEX_FAILED(); } configASSERT( pxNewQueue ); return pxNewQueue; } 802ab22: 4620 mov r0, r4 802ab24: bd70 pop {r4, r5, r6, pc} 0802ab26 : #endif /* configUSE_ALTERNATIVE_API */ /*-----------------------------------------------------------*/ BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue, const void * const pvItemToQueue, BaseType_t * const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition ) { 802ab26: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802ab2a: 460f mov r7, r1 802ab2c: 4616 mov r6, r2 802ab2e: 461d mov r5, r3 BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802ab30: 4604 mov r4, r0 802ab32: b910 cbnz r0, 802ab3a 802ab34: f001 f802 bl 802bb3c 802ab38: e7fe b.n 802ab38 configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802ab3a: bb41 cbnz r1, 802ab8e 802ab3c: 6c03 ldr r3, [r0, #64] ; 0x40 802ab3e: b333 cbz r3, 802ab8e 802ab40: e022 b.n 802ab88 802ab42: e7fe b.n 802ab42 configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 802ab44: 6be3 ldr r3, [r4, #60] ; 0x3c 802ab46: 2b01 cmp r3, #1 802ab48: d124 bne.n 802ab94 802ab4a: e026 b.n 802ab9a 802ab4c: e7fe b.n 802ab4c 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 ) ) 802ab4e: 2d02 cmp r5, #2 802ab50: d118 bne.n 802ab84 /* 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 ); 802ab52: 4620 mov r0, r4 802ab54: 4639 mov r1, r7 802ab56: 462a mov r2, r5 802ab58: f7ff fe7c bl 802a854 /* 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 ) 802ab5c: 6ca3 ldr r3, [r4, #72] ; 0x48 802ab5e: 3301 adds r3, #1 802ab60: d10b bne.n 802ab7a } } } #else /* configUSE_QUEUE_SETS */ { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 802ab62: 6a63 ldr r3, [r4, #36] ; 0x24 802ab64: b903 cbnz r3, 802ab68 802ab66: e00b b.n 802ab80 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 802ab68: f104 0024 add.w r0, r4, #36 ; 0x24 802ab6c: f000 fd04 bl 802b578 802ab70: b130 cbz r0, 802ab80 { /* The task waiting has a higher priority so record that a context switch is required. */ if( pxHigherPriorityTaskWoken != NULL ) 802ab72: b12e cbz r6, 802ab80 { *pxHigherPriorityTaskWoken = pdTRUE; 802ab74: 2401 movs r4, #1 802ab76: 6034 str r4, [r6, #0] 802ab78: e019 b.n 802abae } else { /* Increment the lock count so the task that unlocks the queue knows that data was posted while it was locked. */ ++( pxQueue->xTxLock ); 802ab7a: 6ca3 ldr r3, [r4, #72] ; 0x48 802ab7c: 3301 adds r3, #1 802ab7e: 64a3 str r3, [r4, #72] ; 0x48 } xReturn = pdPASS; 802ab80: 2401 movs r4, #1 802ab82: e014 b.n 802abae } else { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; 802ab84: 2400 movs r4, #0 802ab86: e012 b.n 802abae BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802ab88: f000 ffd8 bl 802bb3c 802ab8c: e7d9 b.n 802ab42 configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 802ab8e: 2d02 cmp r5, #2 802ab90: d103 bne.n 802ab9a 802ab92: e7d7 b.n 802ab44 802ab94: f000 ffd2 bl 802bb3c 802ab98: e7d8 b.n 802ab4c 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(); 802ab9a: f001 f89f bl 802bcdc /* 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(); 802ab9e: f000 ffcd bl 802bb3c { if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) 802aba2: 6ba2 ldr r2, [r4, #56] ; 0x38 802aba4: 6be3 ldr r3, [r4, #60] ; 0x3c 802aba6: 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(); 802aba8: 4680 mov r8, r0 { if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) 802abaa: d2d0 bcs.n 802ab4e 802abac: e7d1 b.n 802ab52 { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); 802abae: 4640 mov r0, r8 802abb0: f000 fff4 bl 802bb9c return xReturn; } 802abb4: 4620 mov r0, r4 802abb6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 0802abba : /*-----------------------------------------------------------*/ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue, BaseType_t * const pxHigherPriorityTaskWoken ) { 802abba: b5f8 push {r3, r4, r5, r6, r7, lr} 802abbc: 460d mov r5, r1 BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802abbe: 4604 mov r4, r0 802abc0: b910 cbnz r0, 802abc8 802abc2: f000 ffbb bl 802bb3c 802abc6: e7fe b.n 802abc6 /* xQueueGenericSendFromISR() should be used in the item size is not 0. */ configASSERT( pxQueue->uxItemSize == 0 ); 802abc8: 6c06 ldr r6, [r0, #64] ; 0x40 802abca: b116 cbz r6, 802abd2 802abcc: f000 ffb6 bl 802bb3c 802abd0: e7fe b.n 802abd0 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(); 802abd2: f001 f883 bl 802bcdc /* 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(); 802abd6: f000 ffb1 bl 802bb3c { /* 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 ) 802abda: 6ba2 ldr r2, [r4, #56] ; 0x38 802abdc: 6be3 ldr r3, [r4, #60] ; 0x3c 802abde: 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(); 802abe0: 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 ) 802abe2: d216 bcs.n 802ac12 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 ); 802abe4: 6ba3 ldr r3, [r4, #56] ; 0x38 802abe6: 3301 adds r3, #1 802abe8: 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 ) 802abea: 6ca3 ldr r3, [r4, #72] ; 0x48 802abec: 3301 adds r3, #1 802abee: d10b bne.n 802ac08 } } } #else /* configUSE_QUEUE_SETS */ { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 802abf0: 6a63 ldr r3, [r4, #36] ; 0x24 802abf2: b903 cbnz r3, 802abf6 802abf4: e00b b.n 802ac0e { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 802abf6: f104 0024 add.w r0, r4, #36 ; 0x24 802abfa: f000 fcbd bl 802b578 802abfe: b130 cbz r0, 802ac0e { /* The task waiting has a higher priority so record that a context switch is required. */ if( pxHigherPriorityTaskWoken != NULL ) 802ac00: b12d cbz r5, 802ac0e { *pxHigherPriorityTaskWoken = pdTRUE; 802ac02: 2401 movs r4, #1 802ac04: 602c str r4, [r5, #0] 802ac06: e005 b.n 802ac14 } else { /* Increment the lock count so the task that unlocks the queue knows that data was posted while it was locked. */ ++( pxQueue->xTxLock ); 802ac08: 6ca3 ldr r3, [r4, #72] ; 0x48 802ac0a: 3301 adds r3, #1 802ac0c: 64a3 str r3, [r4, #72] ; 0x48 } xReturn = pdPASS; 802ac0e: 2401 movs r4, #1 802ac10: e000 b.n 802ac14 } else { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; 802ac12: 4634 mov r4, r6 } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); 802ac14: 4638 mov r0, r7 802ac16: f000 ffc1 bl 802bb9c return xReturn; } 802ac1a: 4620 mov r0, r4 802ac1c: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802ac1e : /*-----------------------------------------------------------*/ BaseType_t xQueueGenericReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait, const BaseType_t xJustPeeking ) { 802ac1e: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 802ac22: b085 sub sp, #20 802ac24: 460e mov r6, r1 802ac26: 9201 str r2, [sp, #4] 802ac28: 4699 mov r9, r3 BaseType_t xEntryTimeSet = pdFALSE; TimeOut_t xTimeOut; int8_t *pcOriginalReadPosition; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802ac2a: 4604 mov r4, r0 802ac2c: b910 cbnz r0, 802ac34 802ac2e: f000 ff85 bl 802bb3c 802ac32: e7fe b.n 802ac32 configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802ac34: 2900 cmp r1, #0 802ac36: f040 8089 bne.w 802ad4c 802ac3a: 6c03 ldr r3, [r0, #64] ; 0x40 802ac3c: 2b00 cmp r3, #0 802ac3e: f000 8085 beq.w 802ad4c 802ac42: e080 b.n 802ad46 802ac44: e7fe b.n 802ac44 #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 802ac46: 9d01 ldr r5, [sp, #4] 802ac48: b125 cbz r5, 802ac54 802ac4a: e085 b.n 802ad58 802ac4c: e7fe b.n 802ac4c 802ac4e: 2501 movs r5, #1 802ac50: e001 b.n 802ac56 802ac52: 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 ); 802ac54: 2700 movs r7, #0 statements within the function itself. This is done in the interest of execution time efficiency. */ for( ;; ) { taskENTER_CRITICAL(); 802ac56: f000 ff79 bl 802bb4c { /* 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 ) 802ac5a: 6ba3 ldr r3, [r4, #56] ; 0x38 802ac5c: b33b cbz r3, 802acae { /* Remember the read position in case the queue is only being peeked. */ pcOriginalReadPosition = pxQueue->u.pcReadFrom; prvCopyDataFromQueue( pxQueue, pvBuffer ); 802ac5e: 4620 mov r0, r4 802ac60: 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; 802ac62: 68e5 ldr r5, [r4, #12] prvCopyDataFromQueue( pxQueue, pvBuffer ); 802ac64: f7ff fde3 bl 802a82e if( xJustPeeking == pdFALSE ) 802ac68: f1b9 0f00 cmp.w r9, #0 802ac6c: d112 bne.n 802ac94 { traceQUEUE_RECEIVE( pxQueue ); /* Actually removing data, not just peeking. */ --( pxQueue->uxMessagesWaiting ); 802ac6e: 6ba3 ldr r3, [r4, #56] ; 0x38 802ac70: 3b01 subs r3, #1 802ac72: 63a3 str r3, [r4, #56] ; 0x38 #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 802ac74: 6823 ldr r3, [r4, #0] 802ac76: b913 cbnz r3, 802ac7e { /* 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. */ 802ac78: f000 fd98 bl 802b7ac 802ac7c: 6060 str r0, [r4, #4] mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_MUTEXES */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 802ac7e: 6923 ldr r3, [r4, #16] 802ac80: b18b cbz r3, 802aca6 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) == pdTRUE ) 802ac82: f104 0010 add.w r0, r4, #16 802ac86: f000 fc77 bl 802b578 802ac8a: 2801 cmp r0, #1 802ac8c: d10b bne.n 802aca6 { queueYIELD_IF_USING_PREEMPTION(); 802ac8e: f000 ff49 bl 802bb24 802ac92: e008 b.n 802aca6 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 ) 802ac94: 6a63 ldr r3, [r4, #36] ; 0x24 { traceQUEUE_PEEK( pxQueue ); /* The data is not being removed, so reset the read pointer. */ pxQueue->u.pcReadFrom = pcOriginalReadPosition; 802ac96: 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 ) 802ac98: b12b cbz r3, 802aca6 { /* 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 ) 802ac9a: f104 0024 add.w r0, r4, #36 ; 0x24 802ac9e: f000 fc6b bl 802b578 802aca2: 2800 cmp r0, #0 802aca4: d1f3 bne.n 802ac8e { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 802aca6: f000 ff7d bl 802bba4 return pdPASS; 802acaa: 2001 movs r0, #1 802acac: e057 b.n 802ad5e } else { if( xTicksToWait == ( TickType_t ) 0 ) 802acae: f8dd 8004 ldr.w r8, [sp, #4] 802acb2: f1b8 0f00 cmp.w r8, #0 802acb6: d102 bne.n 802acbe { /* The queue was empty and no block time is specified (or the block time has expired) so leave now. */ taskEXIT_CRITICAL(); 802acb8: f000 ff74 bl 802bba4 802acbc: e041 b.n 802ad42 traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; } else if( xEntryTimeSet == pdFALSE ) 802acbe: b915 cbnz r5, 802acc6 { /* The queue was empty and a block time was specified so configure the timeout structure. */ vTaskSetTimeOutState( &xTimeOut ); 802acc0: a802 add r0, sp, #8 802acc2: f000 fc95 bl 802b5f0 /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); 802acc6: f000 ff6d bl 802bba4 /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); 802acca: f000 fa11 bl 802b0f0 prvLockQueue( pxQueue ); 802acce: f000 ff3d bl 802bb4c 802acd2: 6c63 ldr r3, [r4, #68] ; 0x44 802acd4: 3301 adds r3, #1 802acd6: bf08 it eq 802acd8: 6467 streq r7, [r4, #68] ; 0x44 802acda: 6ca3 ldr r3, [r4, #72] ; 0x48 802acdc: 3301 adds r3, #1 802acde: bf08 it eq 802ace0: 64a7 streq r7, [r4, #72] ; 0x48 802ace2: f000 ff5f bl 802bba4 /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 802ace6: a802 add r0, sp, #8 802ace8: a901 add r1, sp, #4 802acea: f000 fc91 bl 802b610 802acee: bb18 cbnz r0, 802ad38 static BaseType_t prvIsQueueEmpty( const Queue_t *pxQueue ) { BaseType_t xReturn; taskENTER_CRITICAL(); 802acf0: f000 ff2c bl 802bb4c { if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 ) 802acf4: 6ba5 ldr r5, [r4, #56] ; 0x38 else { xReturn = pdFALSE; } } taskEXIT_CRITICAL(); 802acf6: f000 ff55 bl 802bba4 prvLockQueue( pxQueue ); /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) { if( prvIsQueueEmpty( pxQueue ) != pdFALSE ) 802acfa: b9bd cbnz r5, 802ad2c { traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue ); #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 802acfc: 6823 ldr r3, [r4, #0] 802acfe: b933 cbnz r3, 802ad0e { taskENTER_CRITICAL(); 802ad00: f000 ff24 bl 802bb4c { vTaskPriorityInherit( ( void * ) pxQueue->pxMutexHolder ); 802ad04: 6860 ldr r0, [r4, #4] 802ad06: f000 fcc7 bl 802b698 } taskEXIT_CRITICAL(); 802ad0a: f000 ff4b bl 802bba4 mtCOVERAGE_TEST_MARKER(); } } #endif vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); 802ad0e: f104 0024 add.w r0, r4, #36 ; 0x24 802ad12: 9901 ldr r1, [sp, #4] 802ad14: f000 fbd4 bl 802b4c0 prvUnlockQueue( pxQueue ); 802ad18: 4620 mov r0, r4 802ad1a: f7ff fd54 bl 802a7c6 if( xTaskResumeAll() == pdFALSE ) 802ad1e: f000 fa83 bl 802b228 802ad22: 2800 cmp r0, #0 802ad24: d193 bne.n 802ac4e { portYIELD_WITHIN_API(); 802ad26: f000 fefd bl 802bb24 802ad2a: e790 b.n 802ac4e } } else { /* Try again. */ prvUnlockQueue( pxQueue ); 802ad2c: 4620 mov r0, r4 802ad2e: f7ff fd4a bl 802a7c6 ( void ) xTaskResumeAll(); 802ad32: f000 fa79 bl 802b228 802ad36: e78a b.n 802ac4e } } else { prvUnlockQueue( pxQueue ); 802ad38: 4620 mov r0, r4 802ad3a: f7ff fd44 bl 802a7c6 ( void ) xTaskResumeAll(); 802ad3e: f000 fa73 bl 802b228 traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; 802ad42: 2000 movs r0, #0 802ad44: e00b b.n 802ad5e TimeOut_t xTimeOut; int8_t *pcOriginalReadPosition; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802ad46: f000 fef9 bl 802bb3c 802ad4a: e77b b.n 802ac44 #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 802ad4c: f000 fc94 bl 802b678 802ad50: 2800 cmp r0, #0 802ad52: f47f af7e bne.w 802ac52 802ad56: e776 b.n 802ac46 802ad58: f000 fef0 bl 802bb3c 802ad5c: e776 b.n 802ac4c ( void ) xTaskResumeAll(); traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; } } } 802ad5e: b005 add sp, #20 802ad60: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 0802ad64 : return uxReturn; } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ /*-----------------------------------------------------------*/ UBaseType_t uxQueueSpacesAvailable( const QueueHandle_t xQueue ) { 802ad64: b510 push {r4, lr} UBaseType_t uxReturn; Queue_t *pxQueue; pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802ad66: 4604 mov r4, r0 802ad68: b910 cbnz r0, 802ad70 802ad6a: f000 fee7 bl 802bb3c 802ad6e: e7fe b.n 802ad6e taskENTER_CRITICAL(); 802ad70: f000 feec bl 802bb4c { uxReturn = pxQueue->uxLength - pxQueue->uxMessagesWaiting; 802ad74: 6ba3 ldr r3, [r4, #56] ; 0x38 802ad76: 6be4 ldr r4, [r4, #60] ; 0x3c 802ad78: 1ae4 subs r4, r4, r3 } taskEXIT_CRITICAL(); 802ad7a: f000 ff13 bl 802bba4 return uxReturn; } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ 802ad7e: 4620 mov r0, r4 802ad80: bd10 pop {r4, pc} 0802ad82 : /*-----------------------------------------------------------*/ #if ( configUSE_TIMERS == 1 ) void vQueueWaitForMessageRestricted( QueueHandle_t xQueue, TickType_t xTicksToWait ) { 802ad82: b538 push {r3, r4, r5, lr} 802ad84: 4604 mov r4, r0 802ad86: 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 ); 802ad88: f000 fee0 bl 802bb4c 802ad8c: 6c63 ldr r3, [r4, #68] ; 0x44 802ad8e: 3301 adds r3, #1 802ad90: d101 bne.n 802ad96 802ad92: 2300 movs r3, #0 802ad94: 6463 str r3, [r4, #68] ; 0x44 802ad96: 6ca3 ldr r3, [r4, #72] ; 0x48 802ad98: 3301 adds r3, #1 802ad9a: d101 bne.n 802ada0 802ad9c: 2300 movs r3, #0 802ad9e: 64a3 str r3, [r4, #72] ; 0x48 802ada0: f000 ff00 bl 802bba4 if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0U ) 802ada4: 6ba3 ldr r3, [r4, #56] ; 0x38 802ada6: b923 cbnz r3, 802adb2 { /* There is nothing in the queue, block for the specified period. */ vTaskPlaceOnEventListRestricted( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); 802ada8: f104 0024 add.w r0, r4, #36 ; 0x24 802adac: 4629 mov r1, r5 802adae: f000 fbbb bl 802b528 } else { mtCOVERAGE_TEST_MARKER(); } prvUnlockQueue( pxQueue ); 802adb2: 4620 mov r0, r4 } 802adb4: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} } else { mtCOVERAGE_TEST_MARKER(); } prvUnlockQueue( pxQueue ); 802adb8: f7ff bd05 b.w 802a7c6 0802adbc : static void prvResetNextTaskUnblockTime( void ) { TCB_t *pxTCB; if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 802adbc: 4a06 ldr r2, [pc, #24] ; (802add8 ) 802adbe: 6813 ldr r3, [r2, #0] 802adc0: 6819 ldr r1, [r3, #0] 802adc2: 4b06 ldr r3, [pc, #24] ; (802addc ) 802adc4: b911 cbnz r1, 802adcc /* 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; 802adc6: f04f 32ff mov.w r2, #4294967295 802adca: e003 b.n 802add4 { /* 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 ); 802adcc: 6812 ldr r2, [r2, #0] 802adce: 68d2 ldr r2, [r2, #12] xNextTaskUnblockTime = listGET_LIST_ITEM_VALUE( &( ( pxTCB )->xGenericListItem ) ); 802add0: 68d2 ldr r2, [r2, #12] 802add2: 6852 ldr r2, [r2, #4] 802add4: 601a str r2, [r3, #0] 802add6: 4770 bx lr 802add8: 20000bd4 .word 0x20000bd4 802addc: 20000708 .word 0x20000708 0802ade0 : /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake ) { /* The list item will be inserted in wake time order. */ listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake ); 802ade0: 4b0e ldr r3, [pc, #56] ; (802ae1c ) 802ade2: 681a ldr r2, [r3, #0] #endif /* vTaskDelete */ } /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake ) { 802ade4: b510 push {r4, lr} /* The list item will be inserted in wake time order. */ listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake ); 802ade6: 6050 str r0, [r2, #4] if( xTimeToWake < xTickCount ) 802ade8: 4a0d ldr r2, [pc, #52] ; (802ae20 ) 802adea: 6812 ldr r2, [r2, #0] 802adec: 4290 cmp r0, r2 #endif /* vTaskDelete */ } /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake ) { 802adee: 4604 mov r4, r0 /* The list item will be inserted in wake time order. */ listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake ); if( xTimeToWake < xTickCount ) 802adf0: d207 bcs.n 802ae02 { /* Wake time has overflowed. Place this item in the overflow list. */ vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xGenericListItem ) ); 802adf2: 4a0c ldr r2, [pc, #48] ; (802ae24 ) 802adf4: 6810 ldr r0, [r2, #0] 802adf6: 6819 ldr r1, [r3, #0] 802adf8: 3104 adds r1, #4 else { mtCOVERAGE_TEST_MARKER(); } } } 802adfa: 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 ) ); 802adfe: f7ff bcba b.w 802a776 } else { /* The wake time has not overflowed, so the current block list is used. */ vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xGenericListItem ) ); 802ae02: 4a09 ldr r2, [pc, #36] ; (802ae28 ) 802ae04: 6810 ldr r0, [r2, #0] 802ae06: 6819 ldr r1, [r3, #0] 802ae08: 3104 adds r1, #4 802ae0a: f7ff fcb4 bl 802a776 /* 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 ) 802ae0e: 4b07 ldr r3, [pc, #28] ; (802ae2c ) 802ae10: 681a ldr r2, [r3, #0] 802ae12: 4294 cmp r4, r2 { xNextTaskUnblockTime = xTimeToWake; 802ae14: bf38 it cc 802ae16: 601c strcc r4, [r3, #0] 802ae18: bd10 pop {r4, pc} 802ae1a: bf00 nop 802ae1c: 20000c84 .word 0x20000c84 802ae20: 20000ca0 .word 0x20000ca0 802ae24: 20000ca4 .word 0x20000ca4 802ae28: 20000bd4 .word 0x20000bd4 802ae2c: 20000708 .word 0x20000708 0802ae30 : #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. */ { 802ae30: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 802ae34: 9d0a ldr r5, [sp, #40] ; 0x28 802ae36: f8dd 802c ldr.w r8, [sp, #44] ; 0x2c 802ae3a: 9e0c ldr r6, [sp, #48] ; 0x30 802ae3c: 460f mov r7, r1 802ae3e: 4693 mov fp, r2 802ae40: 469a mov sl, r3 BaseType_t xReturn; TCB_t * pxNewTCB; StackType_t *pxTopOfStack; configASSERT( pxTaskCode ); 802ae42: 4681 mov r9, r0 802ae44: b910 cbnz r0, 802ae4c 802ae46: f000 fe79 bl 802bb3c 802ae4a: e7fe b.n 802ae4a configASSERT( ( ( uxPriority & ( ~portPRIVILEGE_BIT ) ) < configMAX_PRIORITIES ) ); 802ae4c: 2d04 cmp r5, #4 802ae4e: d902 bls.n 802ae56 802ae50: f000 fe74 bl 802bb3c 802ae54: e7fe b.n 802ae54 #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. */ 802ae56: b936 cbnz r6, 802ae66 802ae58: 0090 lsls r0, r2, #2 802ae5a: f000 ff85 bl 802bd68 if( pxStack != NULL ) 802ae5e: 4606 mov r6, r0 802ae60: 2800 cmp r0, #0 802ae62: f000 809e beq.w 802afa2 { /* 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 ) ); 802ae66: 205c movs r0, #92 ; 0x5c 802ae68: f000 ff7e bl 802bd68 if( pxNewTCB != NULL ) 802ae6c: 4604 mov r4, r0 802ae6e: b178 cbz r0, 802ae90 { /* Store the stack location in the TCB. */ pxNewTCB->pxStack = pxStack; 802ae70: 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 ) ); 802ae72: ea4f 028b mov.w r2, fp, lsl #2 802ae76: 4630 mov r0, r6 802ae78: 21a5 movs r1, #165 ; 0xa5 802ae7a: f7f6 ff91 bl 8021da0 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 ); 802ae7e: 6b23 ldr r3, [r4, #48] ; 0x30 802ae80: f10b 3bff add.w fp, fp, #4294967295 802ae84: 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. */ 802ae88: 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++ ) 802ae8c: 2600 movs r6, #0 802ae8e: e003 b.n 802ae98 } else { /* The stack cannot be used as the TCB was not created. Free it again. */ vPortFree( pxStack ); 802ae90: 4630 mov r0, r6 802ae92: f000 ffef bl 802be74 802ae96: e084 b.n 802afa2 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. */ 802ae98: 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 ]; 802ae9a: 5dba ldrb r2, [r7, r6] 802ae9c: 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 ) 802aea0: 5dbb ldrb r3, [r7, r6] 802aea2: b113 cbz r3, 802aeaa 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++ ) 802aea4: 3601 adds r6, #1 802aea6: 2e10 cmp r6, #16 802aea8: d1f6 bne.n 802ae98 } } /* 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'; 802aeaa: 2600 movs r6, #0 pxTCB->uxBasePriority = uxPriority; pxTCB->uxMutexesHeld = 0; } #endif /* configUSE_MUTEXES */ vListInitialiseItem( &( pxTCB->xGenericListItem ) ); 802aeac: 1d27 adds r7, r4, #4 802aeae: 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'; 802aeb0: f884 6043 strb.w r6, [r4, #67] ; 0x43 else { mtCOVERAGE_TEST_MARKER(); } pxTCB->uxPriority = uxPriority; 802aeb4: 62e5 str r5, [r4, #44] ; 0x2c #if ( configUSE_MUTEXES == 1 ) { pxTCB->uxBasePriority = uxPriority; 802aeb6: 64e5 str r5, [r4, #76] ; 0x4c pxTCB->uxMutexesHeld = 0; 802aeb8: 6526 str r6, [r4, #80] ; 0x50 } #endif /* configUSE_MUTEXES */ vListInitialiseItem( &( pxTCB->xGenericListItem ) ); 802aeba: f7ff fc4d bl 802a758 vListInitialiseItem( &( pxTCB->xEventListItem ) ); 802aebe: f104 0018 add.w r0, r4, #24 802aec2: f7ff fc49 bl 802a758 /* 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. */ 802aec6: f1c5 0305 rsb r3, r5, #5 } #endif /* portUSING_MPU_WRAPPERS */ #if ( configUSE_TASK_NOTIFICATIONS == 1 ) { pxTCB->ulNotifiedValue = 0; 802aeca: 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 ); 802aecc: 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. */ 802aece: 61a3 str r3, [r4, #24] listSET_LIST_ITEM_OWNER( &( pxTCB->xEventListItem ), pxTCB ); 802aed0: 6264 str r4, [r4, #36] ; 0x24 #endif /* portUSING_MPU_WRAPPERS */ #if ( configUSE_TASK_NOTIFICATIONS == 1 ) { pxTCB->ulNotifiedValue = 0; pxTCB->eNotifyState = eNotWaitingNotification; 802aed2: 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 ); 802aed6: 4658 mov r0, fp 802aed8: 4649 mov r1, r9 802aeda: 4652 mov r2, sl 802aedc: f000 fe02 bl 802bae4 802aee0: 6020 str r0, [r4, #0] } #endif /* portUSING_MPU_WRAPPERS */ if( ( void * ) pxCreatedTask != NULL ) 802aee2: f1b8 0f00 cmp.w r8, #0 802aee6: d001 beq.n 802aeec { /* 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; 802aee8: f8c8 4000 str.w r4, [r8] mtCOVERAGE_TEST_MARKER(); } /* Ensure interrupts don't access the task lists while they are being updated. */ taskENTER_CRITICAL(); 802aeec: f000 fe2e bl 802bb4c { uxCurrentNumberOfTasks++; 802aef0: 4a2e ldr r2, [pc, #184] ; (802afac ) 802aef2: 6813 ldr r3, [r2, #0] 802aef4: 3301 adds r3, #1 802aef6: 6013 str r3, [r2, #0] if( pxCurrentTCB == NULL ) 802aef8: 4b2d ldr r3, [pc, #180] ; (802afb0 ) 802aefa: 681e ldr r6, [r3, #0] 802aefc: bb36 cbnz r6, 802af4c { /* There are no other tasks, or all the other tasks are in the suspended state - make this the current task. */ pxCurrentTCB = pxNewTCB; 802aefe: 601c str r4, [r3, #0] if( uxCurrentNumberOfTasks == ( UBaseType_t ) 1 ) 802af00: 6813 ldr r3, [r2, #0] 802af02: 2b01 cmp r3, #1 802af04: d12a bne.n 802af5c { UBaseType_t uxPriority; for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); 802af06: f8df 80d0 ldr.w r8, [pc, #208] ; 802afd8 802af0a: f04f 0914 mov.w r9, #20 802af0e: 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++ ) 802af12: 3601 adds r6, #1 { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); 802af14: f7ff fc15 bl 802a742 static void prvInitialiseTaskLists( void ) { UBaseType_t uxPriority; for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) 802af18: 2e05 cmp r6, #5 802af1a: d1f8 bne.n 802af0e { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); } vListInitialise( &xDelayedTaskList1 ); 802af1c: f8df 80bc ldr.w r8, [pc, #188] ; 802afdc vListInitialise( &xDelayedTaskList2 ); 802af20: 4e24 ldr r6, [pc, #144] ; (802afb4 ) for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); } vListInitialise( &xDelayedTaskList1 ); 802af22: 4640 mov r0, r8 802af24: f7ff fc0d bl 802a742 vListInitialise( &xDelayedTaskList2 ); 802af28: 4630 mov r0, r6 802af2a: f7ff fc0a bl 802a742 vListInitialise( &xPendingReadyList ); 802af2e: 4822 ldr r0, [pc, #136] ; (802afb8 ) 802af30: f7ff fc07 bl 802a742 #if ( INCLUDE_vTaskDelete == 1 ) { vListInitialise( &xTasksWaitingTermination ); 802af34: 4821 ldr r0, [pc, #132] ; (802afbc ) 802af36: f7ff fc04 bl 802a742 } #endif /* INCLUDE_vTaskDelete */ #if ( INCLUDE_vTaskSuspend == 1 ) { vListInitialise( &xSuspendedTaskList ); 802af3a: 4821 ldr r0, [pc, #132] ; (802afc0 ) 802af3c: f7ff fc01 bl 802a742 } #endif /* INCLUDE_vTaskSuspend */ /* Start with pxDelayedTaskList using list1 and the pxOverflowDelayedTaskList using list2. */ pxDelayedTaskList = &xDelayedTaskList1; 802af40: 4b20 ldr r3, [pc, #128] ; (802afc4 ) 802af42: f8c3 8000 str.w r8, [r3] pxOverflowDelayedTaskList = &xDelayedTaskList2; 802af46: 4b20 ldr r3, [pc, #128] ; (802afc8 ) 802af48: 601e str r6, [r3, #0] 802af4a: e007 b.n 802af5c 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 ) 802af4c: 4a1f ldr r2, [pc, #124] ; (802afcc ) 802af4e: 6812 ldr r2, [r2, #0] 802af50: b922 cbnz r2, 802af5c { if( pxCurrentTCB->uxPriority <= uxPriority ) 802af52: 681a ldr r2, [r3, #0] 802af54: 6ad2 ldr r2, [r2, #44] ; 0x2c 802af56: 42aa cmp r2, r5 { pxCurrentTCB = pxNewTCB; 802af58: bf98 it ls 802af5a: 601c strls r4, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } } uxTaskNumber++; 802af5c: 4a1c ldr r2, [pc, #112] ; (802afd0 ) 802af5e: 6813 ldr r3, [r2, #0] 802af60: 3301 adds r3, #1 802af62: 6013 str r3, [r2, #0] pxNewTCB->uxTCBNumber = uxTaskNumber; } #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyList( pxNewTCB ); 802af64: 4a1b ldr r2, [pc, #108] ; (802afd4 ) uxTaskNumber++; #if ( configUSE_TRACE_FACILITY == 1 ) { /* Add a counter into the TCB for tracing only. */ pxNewTCB->uxTCBNumber = uxTaskNumber; 802af66: 6463 str r3, [r4, #68] ; 0x44 } #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyList( pxNewTCB ); 802af68: 6ae3 ldr r3, [r4, #44] ; 0x2c 802af6a: 6811 ldr r1, [r2, #0] 802af6c: 2401 movs r4, #1 802af6e: fa04 f003 lsl.w r0, r4, r3 802af72: 4301 orrs r1, r0 802af74: 6011 str r1, [r2, #0] 802af76: 4a18 ldr r2, [pc, #96] ; (802afd8 ) 802af78: 2014 movs r0, #20 802af7a: fb00 2003 mla r0, r0, r3, r2 802af7e: 4639 mov r1, r7 802af80: f7ff fbed bl 802a75e xReturn = pdPASS; portSETUP_TCB( pxNewTCB ); } taskEXIT_CRITICAL(); 802af84: f000 fe0e bl 802bba4 traceTASK_CREATE_FAILED(); } if( xReturn == pdPASS ) { if( xSchedulerRunning != pdFALSE ) 802af88: 4b10 ldr r3, [pc, #64] ; (802afcc ) 802af8a: 681b ldr r3, [r3, #0] 802af8c: b133 cbz r3, 802af9c { /* If the created task is of a higher priority than the current task then it should run now. */ if( pxCurrentTCB->uxPriority < uxPriority ) 802af8e: 4b08 ldr r3, [pc, #32] ; (802afb0 ) 802af90: 681b ldr r3, [r3, #0] 802af92: 6adb ldr r3, [r3, #44] ; 0x2c 802af94: 42ab cmp r3, r5 802af96: d201 bcs.n 802af9c { taskYIELD_IF_USING_PREEMPTION(); 802af98: f000 fdc4 bl 802bb24 #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyList( pxNewTCB ); xReturn = pdPASS; 802af9c: 4620 mov r0, r4 802af9e: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} } taskEXIT_CRITICAL(); } else { xReturn = errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY; 802afa2: f04f 30ff mov.w r0, #4294967295 mtCOVERAGE_TEST_MARKER(); } } return xReturn; } 802afa6: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 802afaa: bf00 nop 802afac: 20000cac .word 0x20000cac 802afb0: 20000c84 .word 0x20000c84 802afb4: 20000bf4 .word 0x20000bf4 802afb8: 20000c88 .word 0x20000c88 802afbc: 20000c70 .word 0x20000c70 802afc0: 20000cb0 .word 0x20000cb0 802afc4: 20000bd4 .word 0x20000bd4 802afc8: 20000ca4 .word 0x20000ca4 802afcc: 20000bd8 .word 0x20000bd8 802afd0: 20000ca8 .word 0x20000ca8 802afd4: 20000cc4 .word 0x20000cc4 802afd8: 20000c0c .word 0x20000c0c 802afdc: 20000be0 .word 0x20000be0 0802afe0 : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelete == 1 ) void vTaskDelete( TaskHandle_t xTaskToDelete ) { 802afe0: b538 push {r3, r4, r5, lr} 802afe2: 4604 mov r4, r0 TCB_t *pxTCB; taskENTER_CRITICAL(); 802afe4: f000 fdb2 bl 802bb4c { /* If null is passed in here then it is the calling task that is being deleted. */ pxTCB = prvGetTCBFromHandle( xTaskToDelete ); 802afe8: b90c cbnz r4, 802afee 802afea: 4b22 ldr r3, [pc, #136] ; (802b074 ) 802afec: 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 ) 802afee: 1d25 adds r5, r4, #4 802aff0: 4628 mov r0, r5 802aff2: f7ff fbd8 bl 802a7a6 802aff6: b968 cbnz r0, 802b014 { taskRESET_READY_PRIORITY( pxTCB->uxPriority ); 802aff8: 6ae2 ldr r2, [r4, #44] ; 0x2c 802affa: 491f ldr r1, [pc, #124] ; (802b078 ) 802affc: 2314 movs r3, #20 802affe: 4353 muls r3, r2 802b000: 58cb ldr r3, [r1, r3] 802b002: b93b cbnz r3, 802b014 802b004: 4b1d ldr r3, [pc, #116] ; (802b07c ) 802b006: 2001 movs r0, #1 802b008: 6819 ldr r1, [r3, #0] 802b00a: fa00 f202 lsl.w r2, r0, r2 802b00e: ea21 0202 bic.w r2, r1, r2 802b012: 601a str r2, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } /* Is the task waiting on an event also? */ if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) 802b014: 6aa3 ldr r3, [r4, #40] ; 0x28 802b016: b11b cbz r3, 802b020 { ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 802b018: f104 0018 add.w r0, r4, #24 802b01c: f7ff fbc3 bl 802a7a6 else { mtCOVERAGE_TEST_MARKER(); } vListInsertEnd( &xTasksWaitingTermination, &( pxTCB->xGenericListItem ) ); 802b020: 4817 ldr r0, [pc, #92] ; (802b080 ) 802b022: 4629 mov r1, r5 802b024: f7ff fb9b bl 802a75e /* 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; 802b028: 4b16 ldr r3, [pc, #88] ; (802b084 ) 802b02a: 681a ldr r2, [r3, #0] 802b02c: 3201 adds r2, #1 802b02e: 601a str r2, [r3, #0] /* Increment the uxTaskNumberVariable also so kernel aware debuggers can detect that the task lists need re-generating. */ uxTaskNumber++; 802b030: 4b15 ldr r3, [pc, #84] ; (802b088 ) 802b032: 681a ldr r2, [r3, #0] 802b034: 3201 adds r2, #1 802b036: 601a str r2, [r3, #0] traceTASK_DELETE( pxTCB ); } taskEXIT_CRITICAL(); 802b038: f000 fdb4 bl 802bba4 /* Force a reschedule if it is the currently running task that has just been deleted. */ if( xSchedulerRunning != pdFALSE ) 802b03c: 4b13 ldr r3, [pc, #76] ; (802b08c ) 802b03e: 681b ldr r3, [r3, #0] 802b040: 2b00 cmp r3, #0 802b042: d015 beq.n 802b070 { if( pxTCB == pxCurrentTCB ) 802b044: 4b0b ldr r3, [pc, #44] ; (802b074 ) 802b046: 681b ldr r3, [r3, #0] 802b048: 429c cmp r4, r3 802b04a: d109 bne.n 802b060 { configASSERT( uxSchedulerSuspended == 0 ); 802b04c: 4b10 ldr r3, [pc, #64] ; (802b090 ) 802b04e: 681b ldr r3, [r3, #0] 802b050: b113 cbz r3, 802b058 802b052: f000 fd73 bl 802bb3c 802b056: e7fe b.n 802b056 prvResetNextTaskUnblockTime(); } taskEXIT_CRITICAL(); } } } 802b058: 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(); 802b05c: f000 bd62 b.w 802bb24 } else { /* Reset the next expected unblock time in case it referred to the task that has just been deleted. */ taskENTER_CRITICAL(); 802b060: f000 fd74 bl 802bb4c { prvResetNextTaskUnblockTime(); 802b064: f7ff feaa bl 802adbc } taskEXIT_CRITICAL(); } } } 802b068: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} the task that has just been deleted. */ taskENTER_CRITICAL(); { prvResetNextTaskUnblockTime(); } taskEXIT_CRITICAL(); 802b06c: f000 bd9a b.w 802bba4 802b070: bd38 pop {r3, r4, r5, pc} 802b072: bf00 nop 802b074: 20000c84 .word 0x20000c84 802b078: 20000c0c .word 0x20000c0c 802b07c: 20000cc4 .word 0x20000cc4 802b080: 20000c70 .word 0x20000c70 802b084: 20000bdc .word 0x20000bdc 802b088: 20000ca8 .word 0x20000ca8 802b08c: 20000bd8 .word 0x20000bd8 802b090: 20000c9c .word 0x20000c9c 0802b094 : #endif /* ( ( INCLUDE_xTaskResumeFromISR == 1 ) && ( INCLUDE_vTaskSuspend == 1 ) ) */ /*-----------------------------------------------------------*/ void vTaskStartScheduler( void ) { 802b094: b530 push {r4, r5, lr} 802b096: 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. */ 802b098: 2400 movs r4, #0 802b09a: 2280 movs r2, #128 ; 0x80 802b09c: 9400 str r4, [sp, #0] 802b09e: 9401 str r4, [sp, #4] 802b0a0: 9402 str r4, [sp, #8] 802b0a2: 9403 str r4, [sp, #12] 802b0a4: 480e ldr r0, [pc, #56] ; (802b0e0 ) 802b0a6: 490f ldr r1, [pc, #60] ; (802b0e4 ) 802b0a8: 4623 mov r3, r4 802b0aa: f7ff fec1 bl 802ae30 } #endif /* INCLUDE_xTaskGetIdleTaskHandle */ #if ( configUSE_TIMERS == 1 ) { if( xReturn == pdPASS ) 802b0ae: 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. */ 802b0b0: 4605 mov r5, r0 } #endif /* INCLUDE_xTaskGetIdleTaskHandle */ #if ( configUSE_TIMERS == 1 ) { if( xReturn == pdPASS ) 802b0b2: d10f bne.n 802b0d4 { xReturn = xTimerCreateTimerTask(); 802b0b4: f000 fbce bl 802b854 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_TIMERS */ if( xReturn == pdPASS ) 802b0b8: 2801 cmp r0, #1 #if ( configUSE_TIMERS == 1 ) { if( xReturn == pdPASS ) { xReturn = xTimerCreateTimerTask(); 802b0ba: 4605 mov r5, r0 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_TIMERS */ if( xReturn == pdPASS ) 802b0bc: d10a bne.n 802b0d4 /* 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(); 802b0be: f000 fd3d bl 802bb3c structure specific to the task that will run first. */ _impure_ptr = &( pxCurrentTCB->xNewLib_reent ); } #endif /* configUSE_NEWLIB_REENTRANT */ xSchedulerRunning = pdTRUE; 802b0c2: 4b09 ldr r3, [pc, #36] ; (802b0e8 ) 802b0c4: 601d str r5, [r3, #0] xTickCount = ( TickType_t ) 0U; 802b0c6: 4b09 ldr r3, [pc, #36] ; (802b0ec ) 802b0c8: 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 ); } } 802b0ca: b005 add sp, #20 802b0cc: 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 ) 802b0d0: f000 bdc0 b.w 802bc54 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 ); 802b0d4: b915 cbnz r5, 802b0dc 802b0d6: f000 fd31 bl 802bb3c 802b0da: e7fe b.n 802b0da } } 802b0dc: b005 add sp, #20 802b0de: bd30 pop {r4, r5, pc} 802b0e0: 0802b301 .word 0x0802b301 802b0e4: 08038dbc .word 0x08038dbc 802b0e8: 20000bd8 .word 0x20000bd8 802b0ec: 20000ca0 .word 0x20000ca0 0802b0f0 : { /* 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; 802b0f0: 4b02 ldr r3, [pc, #8] ; (802b0fc ) 802b0f2: 681a ldr r2, [r3, #0] 802b0f4: 3201 adds r2, #1 802b0f6: 601a str r2, [r3, #0] 802b0f8: 4770 bx lr 802b0fa: bf00 nop 802b0fc: 20000c9c .word 0x20000c9c 0802b100 : TickType_t xTicks; /* Critical section required if running on a 16 bit processor. */ portTICK_TYPE_ENTER_CRITICAL(); { xTicks = xTickCount; 802b100: 4b01 ldr r3, [pc, #4] ; (802b108 ) 802b102: 6818 ldr r0, [r3, #0] } portTICK_TYPE_EXIT_CRITICAL(); return xTicks; } 802b104: 4770 bx lr 802b106: bf00 nop 802b108: 20000ca0 .word 0x20000ca0 0802b10c : /* 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 ) 802b10c: 4b3b ldr r3, [pc, #236] ; (802b1fc ) 802b10e: 681b ldr r3, [r3, #0] #endif /* configUSE_TICKLESS_IDLE */ /*----------------------------------------------------------*/ BaseType_t xTaskIncrementTick( void ) { 802b110: 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 ) 802b114: 2b00 cmp r3, #0 802b116: d15b bne.n 802b1d0 { /* Increment the RTOS tick, switching the delayed and overflowed delayed lists if it wraps to 0. */ ++xTickCount; 802b118: 4b39 ldr r3, [pc, #228] ; (802b200 ) 802b11a: 681a ldr r2, [r3, #0] 802b11c: 3201 adds r2, #1 802b11e: 601a str r2, [r3, #0] { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 802b120: 681e ldr r6, [r3, #0] if( xConstTickCount == ( TickType_t ) 0U ) 802b122: b98e cbnz r6, 802b148 { taskSWITCH_DELAYED_LISTS(); 802b124: 4b37 ldr r3, [pc, #220] ; (802b204 ) 802b126: 681a ldr r2, [r3, #0] 802b128: 6812 ldr r2, [r2, #0] 802b12a: b112 cbz r2, 802b132 802b12c: f000 fd06 bl 802bb3c 802b130: e7fe b.n 802b130 802b132: 4a35 ldr r2, [pc, #212] ; (802b208 ) 802b134: 6819 ldr r1, [r3, #0] 802b136: 6810 ldr r0, [r2, #0] 802b138: 6018 str r0, [r3, #0] 802b13a: 4b34 ldr r3, [pc, #208] ; (802b20c ) 802b13c: 6011 str r1, [r2, #0] 802b13e: 681a ldr r2, [r3, #0] 802b140: 3201 adds r2, #1 802b142: 601a str r2, [r3, #0] 802b144: f7ff fe3a bl 802adbc /* 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 ) 802b148: 4b31 ldr r3, [pc, #196] ; (802b210 ) 802b14a: 681b ldr r3, [r3, #0] 802b14c: 2400 movs r4, #0 802b14e: 429e cmp r6, r3 802b150: d200 bcs.n 802b154 802b152: e032 b.n 802b1ba { for( ;; ) { if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 802b154: 4f2b ldr r7, [pc, #172] ; (802b204 ) mtCOVERAGE_TEST_MARKER(); } /* Place the unblocked task into the appropriate ready list. */ prvAddTaskToReadyList( pxTCB ); 802b156: f8df 80cc ldr.w r8, [pc, #204] ; 802b224 802b15a: f8df a0bc ldr.w sl, [pc, #188] ; 802b218 look any further down the list. */ if( xConstTickCount >= xNextTaskUnblockTime ) { for( ;; ) { if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 802b15e: 683b ldr r3, [r7, #0] 802b160: 681b ldr r3, [r3, #0] 802b162: 2b00 cmp r3, #0 802b164: d13a bne.n 802b1dc /* 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; 802b166: 4b2a ldr r3, [pc, #168] ; (802b210 ) 802b168: f04f 32ff mov.w r2, #4294967295 802b16c: 601a str r2, [r3, #0] break; 802b16e: e024 b.n 802b1ba /* 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; 802b170: 4a27 ldr r2, [pc, #156] ; (802b210 ) 802b172: 6013 str r3, [r2, #0] break; 802b174: e021 b.n 802b1ba { mtCOVERAGE_TEST_MARKER(); } /* It is time to remove the item from the Blocked state. */ ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 802b176: f105 0904 add.w r9, r5, #4 802b17a: 4648 mov r0, r9 802b17c: f7ff fb13 bl 802a7a6 /* Is the task waiting on an event also? If so remove it from the event list. */ if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) 802b180: 6aab ldr r3, [r5, #40] ; 0x28 802b182: b11b cbz r3, 802b18c { ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 802b184: f105 0018 add.w r0, r5, #24 802b188: f7ff fb0d bl 802a7a6 mtCOVERAGE_TEST_MARKER(); } /* Place the unblocked task into the appropriate ready list. */ prvAddTaskToReadyList( pxTCB ); 802b18c: 6aeb ldr r3, [r5, #44] ; 0x2c 802b18e: f8d8 1000 ldr.w r1, [r8] 802b192: 2201 movs r2, #1 802b194: fa02 f203 lsl.w r2, r2, r3 802b198: 2014 movs r0, #20 802b19a: 430a orrs r2, r1 802b19c: fb00 a003 mla r0, r0, r3, sl 802b1a0: 4649 mov r1, r9 802b1a2: f8c8 2000 str.w r2, [r8] 802b1a6: f7ff fada bl 802a75e { /* 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 ) 802b1aa: 4b1a ldr r3, [pc, #104] ; (802b214 ) 802b1ac: 6aea ldr r2, [r5, #44] ; 0x2c 802b1ae: 681b ldr r3, [r3, #0] 802b1b0: 6adb ldr r3, [r3, #44] ; 0x2c { xSwitchRequired = pdTRUE; 802b1b2: 429a cmp r2, r3 802b1b4: bf28 it cs 802b1b6: 2401 movcs r4, #1 802b1b8: e7d1 b.n 802b15e /* 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 ) 802b1ba: 4b16 ldr r3, [pc, #88] ; (802b214 ) 802b1bc: 681b ldr r3, [r3, #0] 802b1be: 6adb ldr r3, [r3, #44] ; 0x2c 802b1c0: 2214 movs r2, #20 802b1c2: 4353 muls r3, r2 802b1c4: 4a14 ldr r2, [pc, #80] ; (802b218 ) 802b1c6: 58d3 ldr r3, [r2, r3] { xSwitchRequired = pdTRUE; 802b1c8: 2b01 cmp r3, #1 802b1ca: bf88 it hi 802b1cc: 2401 movhi r4, #1 802b1ce: e00c b.n 802b1ea } #endif /* configUSE_TICK_HOOK */ } else { ++uxPendedTicks; 802b1d0: 4b12 ldr r3, [pc, #72] ; (802b21c ) 802b1d2: 681a ldr r2, [r3, #0] 802b1d4: 3201 adds r2, #1 802b1d6: 601a str r2, [r3, #0] BaseType_t xTaskIncrementTick( void ) { TCB_t * pxTCB; TickType_t xItemValue; BaseType_t xSwitchRequired = pdFALSE; 802b1d8: 2400 movs r4, #0 802b1da: e006 b.n 802b1ea { /* 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 ); 802b1dc: 683b ldr r3, [r7, #0] 802b1de: 68db ldr r3, [r3, #12] 802b1e0: 68dd ldr r5, [r3, #12] xItemValue = listGET_LIST_ITEM_VALUE( &( pxTCB->xGenericListItem ) ); 802b1e2: 686b ldr r3, [r5, #4] if( xConstTickCount < xItemValue ) 802b1e4: 429e cmp r6, r3 802b1e6: d2c6 bcs.n 802b176 802b1e8: e7c2 b.n 802b170 #endif } #if ( configUSE_PREEMPTION == 1 ) { if( xYieldPending != pdFALSE ) 802b1ea: 4b0d ldr r3, [pc, #52] ; (802b220 ) 802b1ec: 681b ldr r3, [r3, #0] { xSwitchRequired = pdTRUE; 802b1ee: 2b00 cmp r3, #0 802b1f0: bf18 it ne 802b1f2: 2401 movne r4, #1 } } #endif /* configUSE_PREEMPTION */ return xSwitchRequired; } 802b1f4: 4620 mov r0, r4 802b1f6: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802b1fa: bf00 nop 802b1fc: 20000c9c .word 0x20000c9c 802b200: 20000ca0 .word 0x20000ca0 802b204: 20000bd4 .word 0x20000bd4 802b208: 20000ca4 .word 0x20000ca4 802b20c: 20000bd0 .word 0x20000bd0 802b210: 20000708 .word 0x20000708 802b214: 20000c84 .word 0x20000c84 802b218: 20000c0c .word 0x20000c0c 802b21c: 20000c08 .word 0x20000c08 802b220: 20000cc8 .word 0x20000cc8 802b224: 20000cc4 .word 0x20000cc4 0802b228 : #endif /* configUSE_TICKLESS_IDLE */ /*----------------------------------------------------------*/ BaseType_t xTaskResumeAll( void ) { 802b228: 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 ); 802b22c: 4c2c ldr r4, [pc, #176] ; (802b2e0 ) 802b22e: 6823 ldr r3, [r4, #0] 802b230: b913 cbnz r3, 802b238 802b232: f000 fc83 bl 802bb3c 802b236: e7fe b.n 802b236 /* 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(); 802b238: f000 fc88 bl 802bb4c { --uxSchedulerSuspended; 802b23c: 6823 ldr r3, [r4, #0] 802b23e: 3b01 subs r3, #1 802b240: 6023 str r3, [r4, #0] if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 802b242: 6823 ldr r3, [r4, #0] 802b244: b10b cbz r3, 802b24a /*----------------------------------------------------------*/ BaseType_t xTaskResumeAll( void ) { TCB_t *pxTCB; BaseType_t xAlreadyYielded = pdFALSE; 802b246: 2400 movs r4, #0 802b248: e044 b.n 802b2d4 { --uxSchedulerSuspended; if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) 802b24a: 4b26 ldr r3, [pc, #152] ; (802b2e4 ) 802b24c: 681b ldr r3, [r3, #0] 802b24e: bb0b cbnz r3, 802b294 802b250: e7f9 b.n 802b246 { /* 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 ) ); 802b252: 68f3 ldr r3, [r6, #12] 802b254: 68dc ldr r4, [r3, #12] ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 802b256: 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 ) ); 802b25a: f104 0018 add.w r0, r4, #24 802b25e: f7ff faa2 bl 802a7a6 ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 802b262: 4640 mov r0, r8 802b264: f7ff fa9f bl 802a7a6 prvAddTaskToReadyList( pxTCB ); 802b268: 6ae3 ldr r3, [r4, #44] ; 0x2c 802b26a: 682a ldr r2, [r5, #0] 802b26c: 2701 movs r7, #1 802b26e: fa07 f103 lsl.w r1, r7, r3 802b272: 2014 movs r0, #20 802b274: 430a orrs r2, r1 802b276: fb00 9003 mla r0, r0, r3, r9 802b27a: 4641 mov r1, r8 802b27c: 602a str r2, [r5, #0] 802b27e: f7ff fa6e bl 802a75e /* If the moved task has a priority higher than the current task then a yield must be performed. */ if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority ) 802b282: 4b19 ldr r3, [pc, #100] ; (802b2e8 ) 802b284: 6ae2 ldr r2, [r4, #44] ; 0x2c 802b286: 681b ldr r3, [r3, #0] 802b288: 6adb ldr r3, [r3, #44] ; 0x2c 802b28a: 429a cmp r2, r3 802b28c: d306 bcc.n 802b29c { xYieldPending = pdTRUE; 802b28e: 4b17 ldr r3, [pc, #92] ; (802b2ec ) 802b290: 601f str r7, [r3, #0] 802b292: e003 b.n 802b29c { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) { /* Move any readied tasks from the pending list into the appropriate ready list. */ while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) 802b294: 4e16 ldr r6, [pc, #88] ; (802b2f0 ) { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xPendingReadyList ) ); ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); prvAddTaskToReadyList( pxTCB ); 802b296: 4d17 ldr r5, [pc, #92] ; (802b2f4 ) 802b298: f8df 9060 ldr.w r9, [pc, #96] ; 802b2fc { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) { /* Move any readied tasks from the pending list into the appropriate ready list. */ while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) 802b29c: 6833 ldr r3, [r6, #0] 802b29e: 2b00 cmp r3, #0 802b2a0: d1d7 bne.n 802b252 /* 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 ) 802b2a2: 4c15 ldr r4, [pc, #84] ; (802b2f8 ) 802b2a4: 6823 ldr r3, [r4, #0] 802b2a6: b96b cbnz r3, 802b2c4 else { mtCOVERAGE_TEST_MARKER(); } if( xYieldPending == pdTRUE ) 802b2a8: 4b10 ldr r3, [pc, #64] ; (802b2ec ) 802b2aa: 681c ldr r4, [r3, #0] 802b2ac: 2c01 cmp r4, #1 802b2ae: d1ca bne.n 802b246 802b2b0: e00e b.n 802b2d0 time. */ if( uxPendedTicks > ( UBaseType_t ) 0U ) { while( uxPendedTicks > ( UBaseType_t ) 0U ) { if( xTaskIncrementTick() != pdFALSE ) 802b2b2: f7ff ff2b bl 802b10c 802b2b6: b108 cbz r0, 802b2bc { xYieldPending = pdTRUE; 802b2b8: 2301 movs r3, #1 802b2ba: 6033 str r3, [r6, #0] } else { mtCOVERAGE_TEST_MARKER(); } --uxPendedTicks; 802b2bc: 682b ldr r3, [r5, #0] 802b2be: 3b01 subs r3, #1 802b2c0: 602b str r3, [r5, #0] 802b2c2: e001 b.n 802b2c8 { while( uxPendedTicks > ( UBaseType_t ) 0U ) { if( xTaskIncrementTick() != pdFALSE ) { xYieldPending = pdTRUE; 802b2c4: 4e09 ldr r6, [pc, #36] ; (802b2ec ) 802b2c6: 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 ) 802b2c8: 6823 ldr r3, [r4, #0] 802b2ca: 2b00 cmp r3, #0 802b2cc: d1f1 bne.n 802b2b2 802b2ce: e7eb b.n 802b2a8 #if( configUSE_PREEMPTION != 0 ) { xAlreadyYielded = pdTRUE; } #endif taskYIELD_IF_USING_PREEMPTION(); 802b2d0: f000 fc28 bl 802bb24 else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 802b2d4: f000 fc66 bl 802bba4 return xAlreadyYielded; } 802b2d8: 4620 mov r0, r4 802b2da: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 802b2de: bf00 nop 802b2e0: 20000c9c .word 0x20000c9c 802b2e4: 20000cac .word 0x20000cac 802b2e8: 20000c84 .word 0x20000c84 802b2ec: 20000cc8 .word 0x20000cc8 802b2f0: 20000c88 .word 0x20000c88 802b2f4: 20000cc4 .word 0x20000cc4 802b2f8: 20000c08 .word 0x20000c08 802b2fc: 20000c0c .word 0x20000c0c 0802b300 : * * void prvIdleTask( void *pvParameters ); * */ static portTASK_FUNCTION( prvIdleTask, pvParameters ) { 802b300: 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 ) 802b302: 4c14 ldr r4, [pc, #80] ; (802b354 ) { vTaskSuspendAll(); { xListIsEmpty = listLIST_IS_EMPTY( &xTasksWaitingTermination ); 802b304: 4e14 ldr r6, [pc, #80] ; (802b358 ) taskENTER_CRITICAL(); { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xTasksWaitingTermination ) ); ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); --uxCurrentNumberOfTasks; 802b306: 4f15 ldr r7, [pc, #84] ; (802b35c ) { BaseType_t xListIsEmpty; /* ucTasksDeleted is used to prevent vTaskSuspendAll() being called too often in the idle task. */ while( uxTasksDeleted > ( UBaseType_t ) 0U ) 802b308: 6823 ldr r3, [r4, #0] 802b30a: b1e3 cbz r3, 802b346 { vTaskSuspendAll(); 802b30c: f7ff fef0 bl 802b0f0 { xListIsEmpty = listLIST_IS_EMPTY( &xTasksWaitingTermination ); 802b310: 6835 ldr r5, [r6, #0] } ( void ) xTaskResumeAll(); 802b312: f7ff ff89 bl 802b228 if( xListIsEmpty == pdFALSE ) 802b316: 2d00 cmp r5, #0 802b318: d0f6 beq.n 802b308 { TCB_t *pxTCB; taskENTER_CRITICAL(); 802b31a: f000 fc17 bl 802bb4c { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xTasksWaitingTermination ) ); 802b31e: 68f3 ldr r3, [r6, #12] 802b320: 68dd ldr r5, [r3, #12] ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 802b322: 1d28 adds r0, r5, #4 802b324: f7ff fa3f bl 802a7a6 --uxCurrentNumberOfTasks; 802b328: 683b ldr r3, [r7, #0] 802b32a: 3b01 subs r3, #1 802b32c: 603b str r3, [r7, #0] --uxTasksDeleted; 802b32e: 6823 ldr r3, [r4, #0] 802b330: 3b01 subs r3, #1 802b332: 6023 str r3, [r4, #0] } taskEXIT_CRITICAL(); 802b334: f000 fc36 bl 802bba4 vPortFreeAligned( pxTCB->pxStack ); } } #else { vPortFreeAligned( pxTCB->pxStack ); 802b338: 6b28 ldr r0, [r5, #48] ; 0x30 802b33a: f000 fd9b bl 802be74 } #endif vPortFree( pxTCB ); 802b33e: 4628 mov r0, r5 802b340: f000 fd98 bl 802be74 802b344: e7e0 b.n 802b308 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 ) 802b346: 4b06 ldr r3, [pc, #24] ; (802b360 ) 802b348: 681b ldr r3, [r3, #0] 802b34a: 2b01 cmp r3, #1 802b34c: d9dc bls.n 802b308 { taskYIELD(); 802b34e: f000 fbe9 bl 802bb24 802b352: e7d9 b.n 802b308 802b354: 20000bdc .word 0x20000bdc 802b358: 20000c70 .word 0x20000c70 802b35c: 20000cac .word 0x20000cac 802b360: 20000c0c .word 0x20000c0c 0802b364 : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelay == 1 ) void vTaskDelay( const TickType_t xTicksToDelay ) { 802b364: 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 ) 802b366: 4604 mov r4, r0 802b368: b918 cbnz r0, 802b372 } else { mtCOVERAGE_TEST_MARKER(); } } 802b36a: 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(); 802b36e: f000 bbd9 b.w 802bb24 /* A delay time of zero just forces a reschedule. */ if( xTicksToDelay > ( TickType_t ) 0U ) { configASSERT( uxSchedulerSuspended == 0 ); 802b372: 4b11 ldr r3, [pc, #68] ; (802b3b8 ) 802b374: 681b ldr r3, [r3, #0] 802b376: b113 cbz r3, 802b37e 802b378: f000 fbe0 bl 802bb3c 802b37c: e7fe b.n 802b37c vTaskSuspendAll(); 802b37e: f7ff feb7 bl 802b0f0 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; 802b382: 4b0e ldr r3, [pc, #56] ; (802b3bc ) 802b384: 681d ldr r5, [r3, #0] 802b386: 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 ) 802b388: 4c0d ldr r4, [pc, #52] ; (802b3c0 ) 802b38a: 6820 ldr r0, [r4, #0] 802b38c: 3004 adds r0, #4 802b38e: f7ff fa0a bl 802a7a6 802b392: b948 cbnz r0, 802b3a8 { /* 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 ); 802b394: 4b0b ldr r3, [pc, #44] ; (802b3c4 ) 802b396: 6819 ldr r1, [r3, #0] 802b398: 6822 ldr r2, [r4, #0] 802b39a: 6ad2 ldr r2, [r2, #44] ; 0x2c 802b39c: 2001 movs r0, #1 802b39e: fa00 f202 lsl.w r2, r0, r2 802b3a2: ea21 0202 bic.w r2, r1, r2 802b3a6: 601a str r2, [r3, #0] } else { mtCOVERAGE_TEST_MARKER(); } prvAddCurrentTaskToDelayedList( xTimeToWake ); 802b3a8: 4628 mov r0, r5 802b3aa: f7ff fd19 bl 802ade0 } xAlreadyYielded = xTaskResumeAll(); 802b3ae: f7ff ff3b bl 802b228 mtCOVERAGE_TEST_MARKER(); } /* Force a reschedule if xTaskResumeAll has not already done so, we may have put ourselves to sleep. */ if( xAlreadyYielded == pdFALSE ) 802b3b2: 2800 cmp r0, #0 802b3b4: d0d9 beq.n 802b36a } else { mtCOVERAGE_TEST_MARKER(); } } 802b3b6: bd38 pop {r3, r4, r5, pc} 802b3b8: 20000c9c .word 0x20000c9c 802b3bc: 20000ca0 .word 0x20000ca0 802b3c0: 20000c84 .word 0x20000c84 802b3c4: 20000cc4 .word 0x20000cc4 0802b3c8 : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelayUntil == 1 ) void vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement ) { 802b3c8: b570 push {r4, r5, r6, lr} 802b3ca: 460c mov r4, r1 TickType_t xTimeToWake; BaseType_t xAlreadyYielded, xShouldDelay = pdFALSE; configASSERT( pxPreviousWakeTime ); 802b3cc: 4605 mov r5, r0 802b3ce: b910 cbnz r0, 802b3d6 802b3d0: f000 fbb4 bl 802bb3c 802b3d4: e7fe b.n 802b3d4 configASSERT( ( xTimeIncrement > 0U ) ); 802b3d6: b911 cbnz r1, 802b3de 802b3d8: f000 fbb0 bl 802bb3c 802b3dc: e7fe b.n 802b3dc configASSERT( uxSchedulerSuspended == 0 ); 802b3de: 4b1c ldr r3, [pc, #112] ; (802b450 ) 802b3e0: 681e ldr r6, [r3, #0] 802b3e2: b116 cbz r6, 802b3ea 802b3e4: f000 fbaa bl 802bb3c 802b3e8: e7fe b.n 802b3e8 vTaskSuspendAll(); 802b3ea: f7ff fe81 bl 802b0f0 { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 802b3ee: 4b19 ldr r3, [pc, #100] ; (802b454 ) /* Generate the tick time at which the task wants to wake. */ xTimeToWake = *pxPreviousWakeTime + xTimeIncrement; 802b3f0: 682a ldr r2, [r5, #0] vTaskSuspendAll(); { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 802b3f2: 6818 ldr r0, [r3, #0] /* Generate the tick time at which the task wants to wake. */ xTimeToWake = *pxPreviousWakeTime + xTimeIncrement; if( xConstTickCount < *pxPreviousWakeTime ) 802b3f4: 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; 802b3f6: 4414 add r4, r2 if( xConstTickCount < *pxPreviousWakeTime ) 802b3f8: d202 bcs.n 802b400 /* 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 ) ) 802b3fa: 4294 cmp r4, r2 802b3fc: d207 bcs.n 802b40e 802b3fe: e001 b.n 802b404 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 ) ) 802b400: 4294 cmp r4, r2 802b402: d306 bcc.n 802b412 802b404: 4284 cmp r4, r0 802b406: bf94 ite ls 802b408: 2300 movls r3, #0 802b40a: 2301 movhi r3, #1 802b40c: e002 b.n 802b414 #if ( INCLUDE_vTaskDelayUntil == 1 ) void vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement ) { TickType_t xTimeToWake; BaseType_t xAlreadyYielded, xShouldDelay = pdFALSE; 802b40e: 4633 mov r3, r6 802b410: e000 b.n 802b414 /* 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; 802b412: 2301 movs r3, #1 mtCOVERAGE_TEST_MARKER(); } } /* Update the wake time ready for the next call. */ *pxPreviousWakeTime = xTimeToWake; 802b414: 602c str r4, [r5, #0] if( xShouldDelay != pdFALSE ) 802b416: b193 cbz r3, 802b43e { 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 ) 802b418: 4d0f ldr r5, [pc, #60] ; (802b458 ) 802b41a: 6828 ldr r0, [r5, #0] 802b41c: 3004 adds r0, #4 802b41e: f7ff f9c2 bl 802a7a6 802b422: b948 cbnz r0, 802b438 { /* 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 ); 802b424: 4b0d ldr r3, [pc, #52] ; (802b45c ) 802b426: 6819 ldr r1, [r3, #0] 802b428: 682a ldr r2, [r5, #0] 802b42a: 6ad2 ldr r2, [r2, #44] ; 0x2c 802b42c: 2001 movs r0, #1 802b42e: fa00 f202 lsl.w r2, r0, r2 802b432: ea21 0202 bic.w r2, r1, r2 802b436: 601a str r2, [r3, #0] else { mtCOVERAGE_TEST_MARKER(); } prvAddCurrentTaskToDelayedList( xTimeToWake ); 802b438: 4620 mov r0, r4 802b43a: f7ff fcd1 bl 802ade0 else { mtCOVERAGE_TEST_MARKER(); } } xAlreadyYielded = xTaskResumeAll(); 802b43e: f7ff fef3 bl 802b228 /* Force a reschedule if xTaskResumeAll has not already done so, we may have put ourselves to sleep. */ if( xAlreadyYielded == pdFALSE ) 802b442: b918 cbnz r0, 802b44c } else { mtCOVERAGE_TEST_MARKER(); } } 802b444: 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(); 802b448: f000 bb6c b.w 802bb24 802b44c: bd70 pop {r4, r5, r6, pc} 802b44e: bf00 nop 802b450: 20000c9c .word 0x20000c9c 802b454: 20000ca0 .word 0x20000ca0 802b458: 20000c84 .word 0x20000c84 802b45c: 20000cc4 .word 0x20000cc4 0802b460 : #endif /* configUSE_APPLICATION_TASK_TAG */ /*-----------------------------------------------------------*/ void vTaskSwitchContext( void ) { 802b460: b508 push {r3, lr} if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE ) 802b462: 4b12 ldr r3, [pc, #72] ; (802b4ac ) 802b464: 681a ldr r2, [r3, #0] 802b466: 4b12 ldr r3, [pc, #72] ; (802b4b0 ) 802b468: b10a cbz r2, 802b46e { /* The scheduler is currently suspended - do not allow a context switch. */ xYieldPending = pdTRUE; 802b46a: 2201 movs r2, #1 802b46c: e01c b.n 802b4a8 } else { xYieldPending = pdFALSE; 802b46e: 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(); 802b470: 4b10 ldr r3, [pc, #64] ; (802b4b4 ) 802b472: 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 ) ); 802b474: fab2 f282 clz r2, r2 802b478: b2d2 uxtb r2, r2 802b47a: 2314 movs r3, #20 802b47c: f1c2 021f rsb r2, r2, #31 802b480: 490d ldr r1, [pc, #52] ; (802b4b8 ) 802b482: 435a muls r2, r3 802b484: 188b adds r3, r1, r2 802b486: 588a ldr r2, [r1, r2] 802b488: b912 cbnz r2, 802b490 802b48a: f000 fb57 bl 802bb3c 802b48e: e7fe b.n 802b48e 802b490: 685a ldr r2, [r3, #4] 802b492: 6852 ldr r2, [r2, #4] 802b494: f103 0108 add.w r1, r3, #8 802b498: 428a cmp r2, r1 802b49a: 605a str r2, [r3, #4] 802b49c: bf04 itt eq 802b49e: 6852 ldreq r2, [r2, #4] 802b4a0: 605a streq r2, [r3, #4] 802b4a2: 685b ldr r3, [r3, #4] 802b4a4: 68da ldr r2, [r3, #12] 802b4a6: 4b05 ldr r3, [pc, #20] ; (802b4bc ) 802b4a8: 601a str r2, [r3, #0] 802b4aa: bd08 pop {r3, pc} 802b4ac: 20000c9c .word 0x20000c9c 802b4b0: 20000cc8 .word 0x20000cc8 802b4b4: 20000cc4 .word 0x20000cc4 802b4b8: 20000c0c .word 0x20000c0c 802b4bc: 20000c84 .word 0x20000c84 0802b4c0 : } } /*-----------------------------------------------------------*/ void vTaskPlaceOnEventList( List_t * const pxEventList, const TickType_t xTicksToWait ) { 802b4c0: b538 push {r3, r4, r5, lr} 802b4c2: 460d mov r5, r1 TickType_t xTimeToWake; configASSERT( pxEventList ); 802b4c4: b910 cbnz r0, 802b4cc 802b4c6: f000 fb39 bl 802bb3c 802b4ca: e7fe b.n 802b4ca /* 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 ) ); 802b4cc: 4c12 ldr r4, [pc, #72] ; (802b518 ) 802b4ce: 6821 ldr r1, [r4, #0] 802b4d0: 3118 adds r1, #24 802b4d2: f7ff f950 bl 802a776 /* 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 ) 802b4d6: 6820 ldr r0, [r4, #0] 802b4d8: 3004 adds r0, #4 802b4da: f7ff f964 bl 802a7a6 802b4de: b948 cbnz r0, 802b4f4 { /* 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 ); 802b4e0: 4b0e ldr r3, [pc, #56] ; (802b51c ) 802b4e2: 6819 ldr r1, [r3, #0] 802b4e4: 6822 ldr r2, [r4, #0] 802b4e6: 6ad2 ldr r2, [r2, #44] ; 0x2c 802b4e8: 2001 movs r0, #1 802b4ea: fa00 f202 lsl.w r2, r0, r2 802b4ee: ea21 0202 bic.w r2, r1, r2 802b4f2: 601a str r2, [r3, #0] mtCOVERAGE_TEST_MARKER(); } #if ( INCLUDE_vTaskSuspend == 1 ) { if( xTicksToWait == portMAX_DELAY ) 802b4f4: 1c69 adds r1, r5, #1 802b4f6: d107 bne.n 802b508 { /* 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 ) ); 802b4f8: 4b07 ldr r3, [pc, #28] ; (802b518 ) 802b4fa: 4809 ldr r0, [pc, #36] ; (802b520 ) 802b4fc: 6819 ldr r1, [r3, #0] 802b4fe: 3104 adds r1, #4 will handle it. */ xTimeToWake = xTickCount + xTicksToWait; prvAddCurrentTaskToDelayedList( xTimeToWake ); } #endif /* INCLUDE_vTaskSuspend */ } 802b500: 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 ) ); 802b504: f7ff b92b b.w 802a75e 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; 802b508: 4b06 ldr r3, [pc, #24] ; (802b524 ) 802b50a: 6818 ldr r0, [r3, #0] prvAddCurrentTaskToDelayedList( xTimeToWake ); 802b50c: 1828 adds r0, r5, r0 will handle it. */ xTimeToWake = xTickCount + xTicksToWait; prvAddCurrentTaskToDelayedList( xTimeToWake ); } #endif /* INCLUDE_vTaskSuspend */ } 802b50e: 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 ); 802b512: f7ff bc65 b.w 802ade0 802b516: bf00 nop 802b518: 20000c84 .word 0x20000c84 802b51c: 20000cc4 .word 0x20000cc4 802b520: 20000cb0 .word 0x20000cb0 802b524: 20000ca0 .word 0x20000ca0 0802b528 : /*-----------------------------------------------------------*/ #if configUSE_TIMERS == 1 void vTaskPlaceOnEventListRestricted( List_t * const pxEventList, const TickType_t xTicksToWait ) { 802b528: b538 push {r3, r4, r5, lr} 802b52a: 460d mov r5, r1 TickType_t xTimeToWake; configASSERT( pxEventList ); 802b52c: b910 cbnz r0, 802b534 802b52e: f000 fb05 bl 802bb3c 802b532: e7fe b.n 802b532 /* 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 ) ); 802b534: 4c0d ldr r4, [pc, #52] ; (802b56c ) 802b536: 6821 ldr r1, [r4, #0] 802b538: 3118 adds r1, #24 802b53a: f7ff f910 bl 802a75e /* 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 ) 802b53e: 6820 ldr r0, [r4, #0] 802b540: 3004 adds r0, #4 802b542: f7ff f930 bl 802a7a6 802b546: b948 cbnz r0, 802b55c { /* 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 ); 802b548: 4b09 ldr r3, [pc, #36] ; (802b570 ) 802b54a: 6819 ldr r1, [r3, #0] 802b54c: 6822 ldr r2, [r4, #0] 802b54e: 6ad2 ldr r2, [r2, #44] ; 0x2c 802b550: 2001 movs r0, #1 802b552: fa00 f202 lsl.w r2, r0, r2 802b556: ea21 0202 bic.w r2, r1, r2 802b55a: 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; 802b55c: 4b05 ldr r3, [pc, #20] ; (802b574 ) 802b55e: 6818 ldr r0, [r3, #0] traceTASK_DELAY_UNTIL(); prvAddCurrentTaskToDelayedList( xTimeToWake ); 802b560: 1828 adds r0, r5, r0 } 802b562: 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 ); 802b566: f7ff bc3b b.w 802ade0 802b56a: bf00 nop 802b56c: 20000c84 .word 0x20000c84 802b570: 20000cc4 .word 0x20000cc4 802b574: 20000ca0 .word 0x20000ca0 0802b578 : #endif /* configUSE_TIMERS */ /*-----------------------------------------------------------*/ BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList ) { 802b578: 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 ); 802b57a: 68c3 ldr r3, [r0, #12] 802b57c: 68dc ldr r4, [r3, #12] configASSERT( pxUnblockedTCB ); 802b57e: b914 cbnz r4, 802b586 802b580: f000 fadc bl 802bb3c 802b584: e7fe b.n 802b584 ( void ) uxListRemove( &( pxUnblockedTCB->xEventListItem ) ); 802b586: f104 0518 add.w r5, r4, #24 802b58a: 4628 mov r0, r5 802b58c: f7ff f90b bl 802a7a6 if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 802b590: 4b11 ldr r3, [pc, #68] ; (802b5d8 ) 802b592: 681b ldr r3, [r3, #0] 802b594: b983 cbnz r3, 802b5b8 { ( void ) uxListRemove( &( pxUnblockedTCB->xGenericListItem ) ); 802b596: 1d25 adds r5, r4, #4 802b598: 4628 mov r0, r5 802b59a: f7ff f904 bl 802a7a6 prvAddTaskToReadyList( pxUnblockedTCB ); 802b59e: 4a0f ldr r2, [pc, #60] ; (802b5dc ) 802b5a0: 6ae3 ldr r3, [r4, #44] ; 0x2c 802b5a2: 6810 ldr r0, [r2, #0] 802b5a4: 2101 movs r1, #1 802b5a6: fa01 f103 lsl.w r1, r1, r3 802b5aa: 4301 orrs r1, r0 802b5ac: 6011 str r1, [r2, #0] 802b5ae: 4a0c ldr r2, [pc, #48] ; (802b5e0 ) 802b5b0: 2014 movs r0, #20 802b5b2: fb00 2003 mla r0, r0, r3, r2 802b5b6: e000 b.n 802b5ba } else { /* The delayed and ready lists cannot be accessed, so hold this task pending until the scheduler is resumed. */ vListInsertEnd( &( xPendingReadyList ), &( pxUnblockedTCB->xEventListItem ) ); 802b5b8: 480a ldr r0, [pc, #40] ; (802b5e4 ) 802b5ba: 4629 mov r1, r5 802b5bc: f7ff f8cf bl 802a75e } if( pxUnblockedTCB->uxPriority > pxCurrentTCB->uxPriority ) 802b5c0: 4b09 ldr r3, [pc, #36] ; (802b5e8 ) 802b5c2: 6ae2 ldr r2, [r4, #44] ; 0x2c 802b5c4: 681b ldr r3, [r3, #0] 802b5c6: 6adb ldr r3, [r3, #44] ; 0x2c 802b5c8: 429a cmp r2, r3 802b5ca: d903 bls.n 802b5d4 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; 802b5cc: 4b07 ldr r3, [pc, #28] ; (802b5ec ) 802b5ce: 2001 movs r0, #1 802b5d0: 6018 str r0, [r3, #0] 802b5d2: bd38 pop {r3, r4, r5, pc} } else { xReturn = pdFALSE; 802b5d4: 2000 movs r0, #0 prvResetNextTaskUnblockTime(); } #endif return xReturn; } 802b5d6: bd38 pop {r3, r4, r5, pc} 802b5d8: 20000c9c .word 0x20000c9c 802b5dc: 20000cc4 .word 0x20000cc4 802b5e0: 20000c0c .word 0x20000c0c 802b5e4: 20000c88 .word 0x20000c88 802b5e8: 20000c84 .word 0x20000c84 802b5ec: 20000cc8 .word 0x20000cc8 0802b5f0 : return xReturn; } /*-----------------------------------------------------------*/ void vTaskSetTimeOutState( TimeOut_t * const pxTimeOut ) { 802b5f0: b508 push {r3, lr} configASSERT( pxTimeOut ); 802b5f2: b910 cbnz r0, 802b5fa 802b5f4: f000 faa2 bl 802bb3c 802b5f8: e7fe b.n 802b5f8 pxTimeOut->xOverflowCount = xNumOfOverflows; 802b5fa: 4b03 ldr r3, [pc, #12] ; (802b608 ) 802b5fc: 681b ldr r3, [r3, #0] 802b5fe: 6003 str r3, [r0, #0] pxTimeOut->xTimeOnEntering = xTickCount; 802b600: 4b02 ldr r3, [pc, #8] ; (802b60c ) 802b602: 681b ldr r3, [r3, #0] 802b604: 6043 str r3, [r0, #4] 802b606: bd08 pop {r3, pc} 802b608: 20000bd0 .word 0x20000bd0 802b60c: 20000ca0 .word 0x20000ca0 0802b610 : } /*-----------------------------------------------------------*/ BaseType_t xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait ) { 802b610: b538 push {r3, r4, r5, lr} 802b612: 460d mov r5, r1 BaseType_t xReturn; configASSERT( pxTimeOut ); 802b614: 4604 mov r4, r0 802b616: b910 cbnz r0, 802b61e 802b618: f000 fa90 bl 802bb3c 802b61c: e7fe b.n 802b61c configASSERT( pxTicksToWait ); 802b61e: b911 cbnz r1, 802b626 802b620: f000 fa8c bl 802bb3c 802b624: e7fe b.n 802b624 taskENTER_CRITICAL(); 802b626: f000 fa91 bl 802bb4c { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 802b62a: 4b0e ldr r3, [pc, #56] ; (802b664 ) 802b62c: 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 ) 802b62e: 682b ldr r3, [r5, #0] 802b630: 1c59 adds r1, r3, #1 802b632: d010 beq.n 802b656 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. */ 802b634: 490c ldr r1, [pc, #48] ; (802b668 ) 802b636: 6808 ldr r0, [r1, #0] 802b638: 6821 ldr r1, [r4, #0] 802b63a: 4288 cmp r0, r1 802b63c: 6861 ldr r1, [r4, #4] 802b63e: d001 beq.n 802b644 802b640: 428a cmp r2, r1 802b642: d20a bcs.n 802b65a 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 ) 802b644: 1a50 subs r0, r2, r1 802b646: 4298 cmp r0, r3 802b648: d207 bcs.n 802b65a { /* Not a genuine timeout. Adjust parameters for time remaining. */ *pxTicksToWait -= ( xConstTickCount - pxTimeOut->xTimeOnEntering ); 802b64a: 1a8a subs r2, r1, r2 802b64c: 18d3 adds r3, r2, r3 802b64e: 602b str r3, [r5, #0] vTaskSetTimeOutState( pxTimeOut ); 802b650: 4620 mov r0, r4 802b652: f7ff ffcd bl 802b5f0 /* 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; 802b656: 2400 movs r4, #0 802b658: e000 b.n 802b65c { /* 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; 802b65a: 2401 movs r4, #1 else { xReturn = pdTRUE; } } taskEXIT_CRITICAL(); 802b65c: f000 faa2 bl 802bba4 return xReturn; } 802b660: 4620 mov r0, r4 802b662: bd38 pop {r3, r4, r5, pc} 802b664: 20000ca0 .word 0x20000ca0 802b668: 20000bd0 .word 0x20000bd0 0802b66c : /*-----------------------------------------------------------*/ void vTaskMissedYield( void ) { xYieldPending = pdTRUE; 802b66c: 4b01 ldr r3, [pc, #4] ; (802b674 ) 802b66e: 2201 movs r2, #1 802b670: 601a str r2, [r3, #0] 802b672: 4770 bx lr 802b674: 20000cc8 .word 0x20000cc8 0802b678 : BaseType_t xTaskGetSchedulerState( void ) { BaseType_t xReturn; if( xSchedulerRunning == pdFALSE ) 802b678: 4b05 ldr r3, [pc, #20] ; (802b690 ) 802b67a: 681b ldr r3, [r3, #0] 802b67c: b133 cbz r3, 802b68c { xReturn = taskSCHEDULER_NOT_STARTED; } else { if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 802b67e: 4b05 ldr r3, [pc, #20] ; (802b694 ) 802b680: 6818 ldr r0, [r3, #0] { xReturn = taskSCHEDULER_RUNNING; 802b682: 2800 cmp r0, #0 802b684: bf0c ite eq 802b686: 2002 moveq r0, #2 802b688: 2000 movne r0, #0 802b68a: 4770 bx lr { BaseType_t xReturn; if( xSchedulerRunning == pdFALSE ) { xReturn = taskSCHEDULER_NOT_STARTED; 802b68c: 2001 movs r0, #1 xReturn = taskSCHEDULER_SUSPENDED; } } return xReturn; } 802b68e: 4770 bx lr 802b690: 20000bd8 .word 0x20000bd8 802b694: 20000c9c .word 0x20000c9c 0802b698 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) void vTaskPriorityInherit( TaskHandle_t const pxMutexHolder ) { 802b698: 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 ) 802b69a: 4604 mov r4, r0 802b69c: 2800 cmp r0, #0 802b69e: d040 beq.n 802b722 { if( pxTCB->uxPriority < pxCurrentTCB->uxPriority ) 802b6a0: 4a20 ldr r2, [pc, #128] ; (802b724 ) 802b6a2: 6ac3 ldr r3, [r0, #44] ; 0x2c 802b6a4: 6811 ldr r1, [r2, #0] 802b6a6: 6ac9 ldr r1, [r1, #44] ; 0x2c 802b6a8: 428b cmp r3, r1 802b6aa: d23a bcs.n 802b722 { /* 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 ) 802b6ac: 6981 ldr r1, [r0, #24] 802b6ae: 2900 cmp r1, #0 802b6b0: db04 blt.n 802b6bc { 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. */ 802b6b2: 6812 ldr r2, [r2, #0] 802b6b4: 6ad2 ldr r2, [r2, #44] ; 0x2c 802b6b6: f1c2 0205 rsb r2, r2, #5 802b6ba: 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 ) 802b6bc: 4e1a ldr r6, [pc, #104] ; (802b728 ) 802b6be: 6962 ldr r2, [r4, #20] 802b6c0: 2714 movs r7, #20 802b6c2: fb07 6303 mla r3, r7, r3, r6 802b6c6: 429a cmp r2, r3 802b6c8: d127 bne.n 802b71a 802b6ca: e01f b.n 802b70c { if( uxListRemove( &( pxTCB->xGenericListItem ) ) == ( UBaseType_t ) 0 ) { taskRESET_READY_PRIORITY( pxTCB->uxPriority ); 802b6cc: 6ae2 ldr r2, [r4, #44] ; 0x2c 802b6ce: 4357 muls r7, r2 802b6d0: 59f3 ldr r3, [r6, r7] 802b6d2: b93b cbnz r3, 802b6e4 802b6d4: 4b15 ldr r3, [pc, #84] ; (802b72c ) 802b6d6: 2001 movs r0, #1 802b6d8: 6819 ldr r1, [r3, #0] 802b6da: fa00 f202 lsl.w r2, r0, r2 802b6de: ea21 0202 bic.w r2, r1, r2 802b6e2: 601a str r2, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802b6e4: 4b0f ldr r3, [pc, #60] ; (802b724 ) prvAddTaskToReadyList( pxTCB ); 802b6e6: 4a11 ldr r2, [pc, #68] ; (802b72c ) { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802b6e8: 681b ldr r3, [r3, #0] prvAddTaskToReadyList( pxTCB ); 802b6ea: 6810 ldr r0, [r2, #0] { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802b6ec: 6adb ldr r3, [r3, #44] ; 0x2c prvAddTaskToReadyList( pxTCB ); 802b6ee: 2101 movs r1, #1 802b6f0: fa01 f103 lsl.w r1, r1, r3 802b6f4: 4301 orrs r1, r0 802b6f6: 6011 str r1, [r2, #0] 802b6f8: 4a0b ldr r2, [pc, #44] ; (802b728 ) { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802b6fa: 62e3 str r3, [r4, #44] ; 0x2c prvAddTaskToReadyList( pxTCB ); 802b6fc: 2014 movs r0, #20 802b6fe: fb00 2003 mla r0, r0, r3, r2 802b702: 4629 mov r1, r5 } else { mtCOVERAGE_TEST_MARKER(); } } 802b704: 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 ); 802b708: f7ff b829 b.w 802a75e /* 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 ) 802b70c: 1d25 adds r5, r4, #4 802b70e: 4628 mov r0, r5 802b710: f7ff f849 bl 802a7a6 802b714: 2800 cmp r0, #0 802b716: d0d9 beq.n 802b6cc 802b718: e7e4 b.n 802b6e4 prvAddTaskToReadyList( pxTCB ); } else { /* Just inherit the priority. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802b71a: 4b02 ldr r3, [pc, #8] ; (802b724 ) 802b71c: 681b ldr r3, [r3, #0] 802b71e: 6adb ldr r3, [r3, #44] ; 0x2c 802b720: 62e3 str r3, [r4, #44] ; 0x2c 802b722: bdf8 pop {r3, r4, r5, r6, r7, pc} 802b724: 20000c84 .word 0x20000c84 802b728: 20000c0c .word 0x20000c0c 802b72c: 20000cc4 .word 0x20000cc4 0802b730 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) { 802b730: b538 push {r3, r4, r5, lr} TCB_t * const pxTCB = ( TCB_t * ) pxMutexHolder; BaseType_t xReturn = pdFALSE; if( pxMutexHolder != NULL ) 802b732: 4604 mov r4, r0 802b734: b908 cbnz r0, 802b73a #if ( configUSE_MUTEXES == 1 ) BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) { TCB_t * const pxTCB = ( TCB_t * ) pxMutexHolder; BaseType_t xReturn = pdFALSE; 802b736: 2000 movs r0, #0 802b738: bd38 pop {r3, r4, r5, pc} if( pxMutexHolder != NULL ) { configASSERT( pxTCB->uxMutexesHeld ); 802b73a: 6d03 ldr r3, [r0, #80] ; 0x50 802b73c: b913 cbnz r3, 802b744 802b73e: f000 f9fd bl 802bb3c 802b742: e7fe b.n 802b742 ( pxTCB->uxMutexesHeld )--; if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 802b744: 6ac1 ldr r1, [r0, #44] ; 0x2c 802b746: 6cc2 ldr r2, [r0, #76] ; 0x4c BaseType_t xReturn = pdFALSE; if( pxMutexHolder != NULL ) { configASSERT( pxTCB->uxMutexesHeld ); ( pxTCB->uxMutexesHeld )--; 802b748: 3b01 subs r3, #1 if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 802b74a: 4291 cmp r1, r2 BaseType_t xReturn = pdFALSE; if( pxMutexHolder != NULL ) { configASSERT( pxTCB->uxMutexesHeld ); ( pxTCB->uxMutexesHeld )--; 802b74c: 6503 str r3, [r0, #80] ; 0x50 if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 802b74e: d0f2 beq.n 802b736 { /* Only disinherit if no other mutexes are held. */ if( pxTCB->uxMutexesHeld == ( UBaseType_t ) 0 ) 802b750: 2b00 cmp r3, #0 802b752: d1f0 bne.n 802b736 /* 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 ) 802b754: 1d05 adds r5, r0, #4 802b756: 4628 mov r0, r5 802b758: f7ff f825 bl 802a7a6 802b75c: b968 cbnz r0, 802b77a { taskRESET_READY_PRIORITY( pxTCB->uxPriority ); 802b75e: 6ae2 ldr r2, [r4, #44] ; 0x2c 802b760: 4910 ldr r1, [pc, #64] ; (802b7a4 ) 802b762: 2314 movs r3, #20 802b764: 4353 muls r3, r2 802b766: 58cb ldr r3, [r1, r3] 802b768: b93b cbnz r3, 802b77a 802b76a: 4b0f ldr r3, [pc, #60] ; (802b7a8 ) 802b76c: 2001 movs r0, #1 802b76e: 6819 ldr r1, [r3, #0] 802b770: fa00 f202 lsl.w r2, r0, r2 802b774: ea21 0202 bic.w r2, r1, r2 802b778: 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; 802b77a: 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. */ 802b77c: f1c3 0205 rsb r2, r3, #5 802b780: 61a2 str r2, [r4, #24] prvAddTaskToReadyList( pxTCB ); 802b782: 4a09 ldr r2, [pc, #36] ; (802b7a8 ) } /* Disinherit the priority before adding the task into the new ready list. */ traceTASK_PRIORITY_DISINHERIT( pxTCB, pxTCB->uxBasePriority ); pxTCB->uxPriority = pxTCB->uxBasePriority; 802b784: 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 ); 802b786: 6811 ldr r1, [r2, #0] 802b788: 2401 movs r4, #1 802b78a: fa04 f003 lsl.w r0, r4, r3 802b78e: 4301 orrs r1, r0 802b790: 6011 str r1, [r2, #0] 802b792: 4a04 ldr r2, [pc, #16] ; (802b7a4 ) 802b794: 2014 movs r0, #20 802b796: fb00 2003 mla r0, r0, r3, r2 802b79a: 4629 mov r1, r5 802b79c: f7fe ffdf bl 802a75e 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; 802b7a0: 4620 mov r0, r4 { mtCOVERAGE_TEST_MARKER(); } return xReturn; } 802b7a2: bd38 pop {r3, r4, r5, pc} 802b7a4: 20000c0c .word 0x20000c0c 802b7a8: 20000cc4 .word 0x20000cc4 0802b7ac : void *pvTaskIncrementMutexHeldCount( void ) { /* If xSemaphoreCreateMutex() is called before any tasks have been created then pxCurrentTCB will be NULL. */ if( pxCurrentTCB != NULL ) 802b7ac: 4b04 ldr r3, [pc, #16] ; (802b7c0 ) 802b7ae: 681a ldr r2, [r3, #0] 802b7b0: b11a cbz r2, 802b7ba { ( pxCurrentTCB->uxMutexesHeld )++; 802b7b2: 681a ldr r2, [r3, #0] 802b7b4: 6d11 ldr r1, [r2, #80] ; 0x50 802b7b6: 3101 adds r1, #1 802b7b8: 6511 str r1, [r2, #80] ; 0x50 } return pxCurrentTCB; 802b7ba: 6818 ldr r0, [r3, #0] } 802b7bc: 4770 bx lr 802b7be: bf00 nop 802b7c0: 20000c84 .word 0x20000c84 0802b7c4 : pxOverflowTimerList = pxTemp; } /*-----------------------------------------------------------*/ static void prvCheckForValidListAndQueue( void ) { 802b7c4: 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 ) 802b7c6: 4c0f ldr r4, [pc, #60] ; (802b804 ) 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(); 802b7c8: f000 f9c0 bl 802bb4c { if( xTimerQueue == NULL ) 802b7cc: 6825 ldr r5, [r4, #0] 802b7ce: b9ad cbnz r5, 802b7fc { vListInitialise( &xActiveTimerList1 ); 802b7d0: 4f0d ldr r7, [pc, #52] ; (802b808 ) vListInitialise( &xActiveTimerList2 ); 802b7d2: 4e0e ldr r6, [pc, #56] ; (802b80c ) initialised. */ taskENTER_CRITICAL(); { if( xTimerQueue == NULL ) { vListInitialise( &xActiveTimerList1 ); 802b7d4: 4638 mov r0, r7 802b7d6: f7fe ffb4 bl 802a742 vListInitialise( &xActiveTimerList2 ); 802b7da: 4630 mov r0, r6 802b7dc: f7fe ffb1 bl 802a742 pxCurrentTimerList = &xActiveTimerList1; 802b7e0: 4b0b ldr r3, [pc, #44] ; (802b810 ) 802b7e2: 601f str r7, [r3, #0] pxOverflowTimerList = &xActiveTimerList2; 802b7e4: 4b0b ldr r3, [pc, #44] ; (802b814 ) xTimerQueue = xQueueCreate( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, sizeof( DaemonTaskMessage_t ) ); 802b7e6: 200a movs r0, #10 802b7e8: 210c movs r1, #12 802b7ea: 462a mov r2, r5 if( xTimerQueue == NULL ) { vListInitialise( &xActiveTimerList1 ); vListInitialise( &xActiveTimerList2 ); pxCurrentTimerList = &xActiveTimerList1; pxOverflowTimerList = &xActiveTimerList2; 802b7ec: 601e str r6, [r3, #0] xTimerQueue = xQueueCreate( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, sizeof( DaemonTaskMessage_t ) ); 802b7ee: f7ff f899 bl 802a924 802b7f2: 6020 str r0, [r4, #0] configASSERT( xTimerQueue ); 802b7f4: b910 cbnz r0, 802b7fc 802b7f6: f000 f9a1 bl 802bb3c 802b7fa: e7fe b.n 802b7fa { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); } 802b7fc: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr} else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 802b800: f000 b9d0 b.w 802bba4 802b804: 20000cfc .word 0x20000cfc 802b808: 20000cd0 .word 0x20000cd0 802b80c: 20000ce4 .word 0x20000ce4 802b810: 20000ccc .word 0x20000ccc 802b814: 20000d00 .word 0x20000d00 0802b818 : return xTimeNow; } /*-----------------------------------------------------------*/ static BaseType_t prvInsertTimerInActiveList( Timer_t * const pxTimer, const TickType_t xNextExpiryTime, const TickType_t xTimeNow, const TickType_t xCommandTime ) { 802b818: b510 push {r4, lr} 802b81a: 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 ) 802b81c: 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 ); 802b81e: 6041 str r1, [r0, #4] listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); 802b820: 6120 str r0, [r4, #16] if( xNextExpiryTime <= xTimeNow ) 802b822: d805 bhi.n 802b830 { /* 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 ) 802b824: 6981 ldr r1, [r0, #24] 802b826: 1ad2 subs r2, r2, r3 802b828: 428a cmp r2, r1 802b82a: d20c bcs.n 802b846 processed actually exceeds the timers period. */ xProcessTimerNow = pdTRUE; } else { vListInsert( pxOverflowTimerList, &( pxTimer->xTimerListItem ) ); 802b82c: 4b07 ldr r3, [pc, #28] ; (802b84c ) 802b82e: e004 b.n 802b83a } } else { if( ( xTimeNow < xCommandTime ) && ( xNextExpiryTime >= xCommandTime ) ) 802b830: 429a cmp r2, r3 802b832: d201 bcs.n 802b838 802b834: 4299 cmp r1, r3 802b836: d206 bcs.n 802b846 its expiry time and should be processed immediately. */ xProcessTimerNow = pdTRUE; } else { vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); 802b838: 4b05 ldr r3, [pc, #20] ; (802b850 ) 802b83a: 6818 ldr r0, [r3, #0] 802b83c: 1d21 adds r1, r4, #4 802b83e: f7fe ff9a bl 802a776 } /*-----------------------------------------------------------*/ static BaseType_t prvInsertTimerInActiveList( Timer_t * const pxTimer, const TickType_t xNextExpiryTime, const TickType_t xTimeNow, const TickType_t xCommandTime ) { BaseType_t xProcessTimerNow = pdFALSE; 802b842: 2000 movs r0, #0 802b844: 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; 802b846: 2001 movs r0, #1 vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); } } return xProcessTimerNow; } 802b848: bd10 pop {r4, pc} 802b84a: bf00 nop 802b84c: 20000d00 .word 0x20000d00 802b850: 20000ccc .word 0x20000ccc 0802b854 : static void prvProcessTimerOrBlockTask( const TickType_t xNextExpireTime, const BaseType_t xListWasEmpty ) PRIVILEGED_FUNCTION; /*-----------------------------------------------------------*/ BaseType_t xTimerCreateTimerTask( void ) { 802b854: 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(); 802b856: f7ff ffb5 bl 802b7c4 if( xTimerQueue != NULL ) 802b85a: 4b0b ldr r3, [pc, #44] ; (802b888 ) 802b85c: 681b ldr r3, [r3, #0] 802b85e: b913 cbnz r3, 802b866 else { mtCOVERAGE_TEST_MARKER(); } configASSERT( xReturn ); 802b860: f000 f96c bl 802bb3c 802b864: e00d b.n 802b882 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); 802b866: 2302 movs r3, #2 802b868: 9300 str r3, [sp, #0] 802b86a: 2300 movs r3, #0 802b86c: 9301 str r3, [sp, #4] 802b86e: 9302 str r3, [sp, #8] 802b870: 9303 str r3, [sp, #12] 802b872: 4806 ldr r0, [pc, #24] ; (802b88c ) 802b874: 4906 ldr r1, [pc, #24] ; (802b890 ) 802b876: f44f 7280 mov.w r2, #256 ; 0x100 802b87a: f7ff fad9 bl 802ae30 else { mtCOVERAGE_TEST_MARKER(); } configASSERT( xReturn ); 802b87e: b908 cbnz r0, 802b884 802b880: e7ee b.n 802b860 802b882: e7fe b.n 802b882 return xReturn; } 802b884: b005 add sp, #20 802b886: bd00 pop {pc} 802b888: 20000cfc .word 0x20000cfc 802b88c: 0802b94d .word 0x0802b94d 802b890: 08038dd0 .word 0x08038dd0 0802b894 : 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 ) { 802b894: 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 ) 802b896: 4c0f ldr r4, [pc, #60] ; (802b8d4 ) 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 ) { 802b898: 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 ) 802b89a: 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 ) { 802b89c: 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 ) 802b89e: b1b8 cbz r0, 802b8d0 /* 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 ) 802b8a0: 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; 802b8a2: 9101 str r1, [sp, #4] xMessage.u.xTimerParameters.xMessageValue = xOptionalValue; 802b8a4: 9202 str r2, [sp, #8] xMessage.u.xTimerParameters.pxTimer = ( Timer_t * ) xTimer; 802b8a6: 9503 str r5, [sp, #12] if( xCommandID < tmrFIRST_FROM_ISR_COMMAND ) 802b8a8: dc0d bgt.n 802b8c6 { if( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING ) 802b8aa: f7ff fee5 bl 802b678 802b8ae: 2802 cmp r0, #2 { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, xTicksToWait ); 802b8b0: a901 add r1, sp, #4 802b8b2: 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 ) 802b8b4: d102 bne.n 802b8bc { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, xTicksToWait ); 802b8b6: 9a08 ldr r2, [sp, #32] 802b8b8: 2300 movs r3, #0 802b8ba: e001 b.n 802b8c0 } else { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, tmrNO_DELAY ); 802b8bc: 2200 movs r2, #0 802b8be: 4613 mov r3, r2 802b8c0: f7ff f86d bl 802a99e 802b8c4: e004 b.n 802b8d0 } } else { xReturn = xQueueSendToBackFromISR( xTimerQueue, &xMessage, pxHigherPriorityTaskWoken ); 802b8c6: 461a mov r2, r3 802b8c8: a901 add r1, sp, #4 802b8ca: 2300 movs r3, #0 802b8cc: f7ff f92b bl 802ab26 { mtCOVERAGE_TEST_MARKER(); } return xReturn; } 802b8d0: b005 add sp, #20 802b8d2: bd30 pop {r4, r5, pc} 802b8d4: 20000cfc .word 0x20000cfc 0802b8d8 : } } /*-----------------------------------------------------------*/ static void prvSwitchTimerLists( void ) { 802b8d8: 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 ) 802b8dc: 4e19 ldr r6, [pc, #100] ; (802b944 ) listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); } else { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY ); 802b8de: f04f 0800 mov.w r8, #0 802b8e2: e023 b.n 802b92c 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 ); 802b8e4: 68db ldr r3, [r3, #12] /* Remove the timer from the list. */ pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); 802b8e6: 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 ); 802b8e8: 681d ldr r5, [r3, #0] /* Remove the timer from the list. */ pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); 802b8ea: 1d27 adds r7, r4, #4 802b8ec: 4638 mov r0, r7 802b8ee: f7fe ff5a bl 802a7a6 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 ); 802b8f2: 6a63 ldr r3, [r4, #36] ; 0x24 802b8f4: 4620 mov r0, r4 802b8f6: 4798 blx r3 if( pxTimer->uxAutoReload == ( UBaseType_t ) pdTRUE ) 802b8f8: 69e3 ldr r3, [r4, #28] 802b8fa: 2b01 cmp r3, #1 802b8fc: d116 bne.n 802b92c 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 ); 802b8fe: 69a3 ldr r3, [r4, #24] 802b900: 18eb adds r3, r5, r3 if( xReloadTime > xNextExpireTime ) 802b902: 42ab cmp r3, r5 802b904: d906 bls.n 802b914 { listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xReloadTime ); 802b906: 6063 str r3, [r4, #4] listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); 802b908: 6124 str r4, [r4, #16] vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); 802b90a: 6830 ldr r0, [r6, #0] 802b90c: 4639 mov r1, r7 802b90e: f7fe ff32 bl 802a776 802b912: e00b b.n 802b92c } else { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY ); 802b914: 2100 movs r1, #0 802b916: f8cd 8000 str.w r8, [sp] 802b91a: 4620 mov r0, r4 802b91c: 462a mov r2, r5 802b91e: 460b mov r3, r1 802b920: f7ff ffb8 bl 802b894 configASSERT( xResult ); 802b924: b910 cbnz r0, 802b92c 802b926: f000 f909 bl 802bb3c 802b92a: e7fe b.n 802b92a /* 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 ) 802b92c: 6833 ldr r3, [r6, #0] 802b92e: 681a ldr r2, [r3, #0] 802b930: 2a00 cmp r2, #0 802b932: d1d7 bne.n 802b8e4 mtCOVERAGE_TEST_MARKER(); } } pxTemp = pxCurrentTimerList; pxCurrentTimerList = pxOverflowTimerList; 802b934: 4a04 ldr r2, [pc, #16] ; (802b948 ) 802b936: 4803 ldr r0, [pc, #12] ; (802b944 ) 802b938: 6811 ldr r1, [r2, #0] pxOverflowTimerList = pxTemp; 802b93a: 6013 str r3, [r2, #0] mtCOVERAGE_TEST_MARKER(); } } pxTemp = pxCurrentTimerList; pxCurrentTimerList = pxOverflowTimerList; 802b93c: 6001 str r1, [r0, #0] pxOverflowTimerList = pxTemp; } 802b93e: e8bd 81fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, pc} 802b942: bf00 nop 802b944: 20000ccc .word 0x20000ccc 802b948: 20000d00 .word 0x20000d00 0802b94c : pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); } /*-----------------------------------------------------------*/ static void prvTimerTask( void *pvParameters ) { 802b94c: 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 ) 802b950: f8df 816c ldr.w r8, [pc, #364] ; 802bac0 pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); } /*-----------------------------------------------------------*/ static void prvTimerTask( void *pvParameters ) { 802b954: b087 sub sp, #28 802b956: 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 ); 802b958: 4b57 ldr r3, [pc, #348] ; (802bab8 ) 802b95a: 681b ldr r3, [r3, #0] 802b95c: 681f ldr r7, [r3, #0] 802b95e: f1d7 0701 rsbs r7, r7, #1 802b962: bf38 it cc 802b964: 2700 movcc r7, #0 if( *pxListWasEmpty == pdFALSE ) 802b966: b917 cbnz r7, 802b96e { xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList ); 802b968: 68db ldr r3, [r3, #12] 802b96a: 681d ldr r5, [r3, #0] 802b96c: e000 b.n 802b970 } else { /* Ensure the task unblocks when the tick count rolls over. */ xNextExpireTime = ( TickType_t ) 0U; 802b96e: 2500 movs r5, #0 static void prvProcessTimerOrBlockTask( const TickType_t xNextExpireTime, const BaseType_t xListWasEmpty ) { TickType_t xTimeNow; BaseType_t xTimerListsWereSwitched; vTaskSuspendAll(); 802b970: f7ff fbbe bl 802b0f0 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(); 802b974: f7ff fbc4 bl 802b100 if( xTimeNow < xLastTime ) 802b978: f8d8 3000 ldr.w r3, [r8] 802b97c: 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(); 802b97e: 4606 mov r6, r0 if( xTimeNow < xLastTime ) 802b980: d203 bcs.n 802b98a { prvSwitchTimerLists(); 802b982: f7ff ffa9 bl 802b8d8 *pxTimerListsWereSwitched = pdTRUE; 802b986: 2301 movs r3, #1 802b988: e000 b.n 802b98c } else { *pxTimerListsWereSwitched = pdFALSE; 802b98a: 2300 movs r3, #0 } xLastTime = xTimeNow; 802b98c: 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 ) 802b990: 2b00 cmp r3, #0 802b992: d132 bne.n 802b9fa { /* The tick count has not overflowed, has the timer expired? */ if( ( xListWasEmpty == pdFALSE ) && ( xNextExpireTime <= xTimeNow ) ) 802b994: bb2f cbnz r7, 802b9e2 802b996: 42b5 cmp r5, r6 802b998: d823 bhi.n 802b9e2 { ( void ) xTaskResumeAll(); 802b99a: f7ff fc45 bl 802b228 /*-----------------------------------------------------------*/ 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 ); 802b99e: 4b46 ldr r3, [pc, #280] ; (802bab8 ) 802b9a0: 681b ldr r3, [r3, #0] 802b9a2: 68db ldr r3, [r3, #12] 802b9a4: 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 ) ); 802b9a6: 1d20 adds r0, r4, #4 802b9a8: f7fe fefd bl 802a7a6 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 ) 802b9ac: 69e3 ldr r3, [r4, #28] 802b9ae: 2b01 cmp r3, #1 802b9b0: d113 bne.n 802b9da { /* 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 ) 802b9b2: 69a1 ldr r1, [r4, #24] 802b9b4: 4620 mov r0, r4 802b9b6: 1869 adds r1, r5, r1 802b9b8: 4632 mov r2, r6 802b9ba: 462b mov r3, r5 802b9bc: f7ff ff2c bl 802b818 802b9c0: 2801 cmp r0, #1 802b9c2: d10a bne.n 802b9da { /* 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 ); 802b9c4: 9700 str r7, [sp, #0] 802b9c6: 4620 mov r0, r4 802b9c8: 4639 mov r1, r7 802b9ca: 462a mov r2, r5 802b9cc: 463b mov r3, r7 802b9ce: f7ff ff61 bl 802b894 configASSERT( xResult ); 802b9d2: b910 cbnz r0, 802b9da 802b9d4: f000 f8b2 bl 802bb3c 802b9d8: e7fe b.n 802b9d8 { mtCOVERAGE_TEST_MARKER(); } /* Call the timer callback. */ pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); 802b9da: 6a63 ldr r3, [r4, #36] ; 0x24 802b9dc: 4620 mov r0, r4 802b9de: 4798 blx r3 802b9e0: e05f b.n 802baa2 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 ) ); 802b9e2: 4b36 ldr r3, [pc, #216] ; (802babc ) 802b9e4: 1ba9 subs r1, r5, r6 802b9e6: 6818 ldr r0, [r3, #0] 802b9e8: f7ff f9cb bl 802ad82 if( xTaskResumeAll() == pdFALSE ) 802b9ec: f7ff fc1c bl 802b228 802b9f0: 2800 cmp r0, #0 802b9f2: d156 bne.n 802baa2 { /* 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(); 802b9f4: f000 f896 bl 802bb24 802b9f8: e053 b.n 802baa2 } } } else { ( void ) xTaskResumeAll(); 802b9fa: f7ff fc15 bl 802b228 802b9fe: e050 b.n 802baa2 } #endif /* INCLUDE_xTimerPendFunctionCall */ /* Commands that are positive are timer commands rather than pended function calls. */ if( xMessage.xMessageID >= ( BaseType_t ) 0 ) 802ba00: 9b03 ldr r3, [sp, #12] 802ba02: 2b00 cmp r3, #0 802ba04: db4e blt.n 802baa4 { /* The messages uses the xTimerParameters member to work on a software timer. */ pxTimer = xMessage.u.xTimerParameters.pxTimer; 802ba06: 9c05 ldr r4, [sp, #20] if( listIS_CONTAINED_WITHIN( NULL, &( pxTimer->xTimerListItem ) ) == pdFALSE ) 802ba08: 6963 ldr r3, [r4, #20] 802ba0a: b113 cbz r3, 802ba12 { /* The timer is in a list, remove it. */ ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); 802ba0c: 1d20 adds r0, r4, #4 802ba0e: f7fe feca bl 802a7a6 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(); 802ba12: f7ff fb75 bl 802b100 if( xTimeNow < xLastTime ) 802ba16: f8d8 3000 ldr.w r3, [r8] 802ba1a: 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(); 802ba1c: 4605 mov r5, r0 if( xTimeNow < xLastTime ) 802ba1e: d201 bcs.n 802ba24 { prvSwitchTimerLists(); 802ba20: f7ff ff5a bl 802b8d8 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 ) 802ba24: 9b03 ldr r3, [sp, #12] else { *pxTimerListsWereSwitched = pdFALSE; } xLastTime = xTimeNow; 802ba26: 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 ) 802ba2a: 2b09 cmp r3, #9 802ba2c: d83a bhi.n 802baa4 802ba2e: f04f 6204 mov.w r2, #138412032 ; 0x8400000 802ba32: 409a lsls r2, r3 802ba34: d424 bmi.n 802ba80 802ba36: f04f 4263 mov.w r2, #3808428032 ; 0xe3000000 802ba3a: 409a lsls r2, r3 802ba3c: d404 bmi.n 802ba48 802ba3e: f04f 6280 mov.w r2, #67108864 ; 0x4000000 802ba42: 409a lsls r2, r3 802ba44: d429 bmi.n 802ba9a 802ba46: e02d b.n 802baa4 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 ) 802ba48: 9b04 ldr r3, [sp, #16] 802ba4a: 69a1 ldr r1, [r4, #24] 802ba4c: 4620 mov r0, r4 802ba4e: 1859 adds r1, r3, r1 802ba50: 462a mov r2, r5 802ba52: f7ff fee1 bl 802b818 802ba56: 2801 cmp r0, #1 802ba58: d124 bne.n 802baa4 { /* The timer expired before it was added to the active timer list. Process it now. */ pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); 802ba5a: 6a63 ldr r3, [r4, #36] ; 0x24 802ba5c: 4620 mov r0, r4 802ba5e: 4798 blx r3 traceTIMER_EXPIRED( pxTimer ); if( pxTimer->uxAutoReload == ( UBaseType_t ) pdTRUE ) 802ba60: 69e3 ldr r3, [r4, #28] 802ba62: 2b01 cmp r3, #1 802ba64: d11e bne.n 802baa4 { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, NULL, tmrNO_DELAY ); 802ba66: 69a2 ldr r2, [r4, #24] 802ba68: 9b04 ldr r3, [sp, #16] 802ba6a: 2100 movs r1, #0 802ba6c: 18d2 adds r2, r2, r3 802ba6e: 9100 str r1, [sp, #0] 802ba70: 4620 mov r0, r4 802ba72: 460b mov r3, r1 802ba74: f7ff ff0e bl 802b894 configASSERT( xResult ); 802ba78: b9a0 cbnz r0, 802baa4 802ba7a: f000 f85f bl 802bb3c 802ba7e: e7fe b.n 802ba7e There is nothing to do here. */ break; case tmrCOMMAND_CHANGE_PERIOD : case tmrCOMMAND_CHANGE_PERIOD_FROM_ISR : pxTimer->xTimerPeriodInTicks = xMessage.u.xTimerParameters.xMessageValue; 802ba80: 9904 ldr r1, [sp, #16] 802ba82: 61a1 str r1, [r4, #24] configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) ); 802ba84: b911 cbnz r1, 802ba8c 802ba86: f000 f859 bl 802bb3c 802ba8a: e7fe b.n 802ba8a 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 ); 802ba8c: 4620 mov r0, r4 802ba8e: 1869 adds r1, r5, r1 802ba90: 462a mov r2, r5 802ba92: 462b mov r3, r5 802ba94: f7ff fec0 bl 802b818 802ba98: e004 b.n 802baa4 break; case tmrCOMMAND_DELETE : /* The timer has already been removed from the active list, just free up the memory. */ vPortFree( pxTimer ); 802ba9a: 4620 mov r0, r4 802ba9c: f000 f9ea bl 802be74 802baa0: e000 b.n 802baa4 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. */ 802baa2: 4e06 ldr r6, [pc, #24] ; (802babc ) 802baa4: 2200 movs r2, #0 802baa6: 6830 ldr r0, [r6, #0] 802baa8: a903 add r1, sp, #12 802baaa: 4613 mov r3, r2 802baac: f7ff f8b7 bl 802ac1e 802bab0: 2800 cmp r0, #0 802bab2: d1a5 bne.n 802ba00 802bab4: e750 b.n 802b958 802bab6: bf00 nop 802bab8: 20000ccc .word 0x20000ccc 802babc: 20000cfc .word 0x20000cfc 802bac0: 20000cf8 .word 0x20000cf8 0802bac4 : } /*-----------------------------------------------------------*/ static void prvPortStartFirstTask( void ) { __asm volatile( 802bac4: 4806 ldr r0, [pc, #24] ; (802bae0 ) 802bac6: 6800 ldr r0, [r0, #0] 802bac8: 6800 ldr r0, [r0, #0] 802baca: f380 8808 msr MSP, r0 802bace: b662 cpsie i 802bad0: b661 cpsie f 802bad2: f3bf 8f4f dsb sy 802bad6: f3bf 8f6f isb sy 802bada: df00 svc 0 802badc: bf00 nop 802bade: 0000 .short 0x0000 802bae0: e000ed08 .word 0xe000ed08 0802bae4 : 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 */ 802bae4: f04f 7380 mov.w r3, #16777216 ; 0x1000000 pxTopOfStack--; *pxTopOfStack = ( StackType_t ) pxCode; /* PC */ 802bae8: e900 000a stmdb r0, {r1, r3} pxTopOfStack--; *pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */ 802baec: 4b03 ldr r3, [pc, #12] ; (802bafc ) pxTopOfStack -= 5; /* R12, R3, R2 and R1. */ *pxTopOfStack = ( StackType_t ) pvParameters; /* R0 */ 802baee: 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 */ 802baf2: 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; } 802baf6: 3840 subs r0, #64 ; 0x40 802baf8: 4770 bx lr 802bafa: bf00 nop 802bafc: 0802bb81 .word 0x0802bb81 0802bb00 : } /*-----------------------------------------------------------*/ void vPortSVCHandler( void ) { __asm volatile ( 802bb00: 4b07 ldr r3, [pc, #28] ; (802bb20 ) 802bb02: 6819 ldr r1, [r3, #0] 802bb04: 6808 ldr r0, [r1, #0] 802bb06: e8b0 0ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp} 802bb0a: f380 8809 msr PSP, r0 802bb0e: f3bf 8f6f isb sy 802bb12: f04f 0000 mov.w r0, #0 802bb16: f380 8811 msr BASEPRI, r0 802bb1a: f04e 0e0d orr.w lr, lr, #13 802bb1e: 4770 bx lr 0802bb20 : 802bb20: 20000c84 .word 0x20000c84 0802bb24 : /*-----------------------------------------------------------*/ void vPortYield( void ) { /* Set a PendSV to request a context switch. */ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; 802bb24: 4b04 ldr r3, [pc, #16] ; (802bb38 ) 802bb26: f04f 5280 mov.w r2, #268435456 ; 0x10000000 802bb2a: 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" ); 802bb2c: f3bf 8f4f dsb sy __asm volatile( "isb" ); 802bb30: f3bf 8f6f isb sy 802bb34: 4770 bx lr 802bb36: bf00 nop 802bb38: e000ed04 .word 0xe000ed04 0802bb3c : } /*-----------------------------------------------------------*/ __attribute__(( naked )) uint32_t ulPortSetInterruptMask( void ) { __asm volatile \ 802bb3c: f3ef 8011 mrs r0, BASEPRI 802bb40: f04f 0150 mov.w r1, #80 ; 0x50 802bb44: f381 8811 msr BASEPRI, r1 802bb48: 4770 bx lr ); /* This return will not be reached but is necessary to prevent compiler warnings. */ return 0; } 802bb4a: 2000 movs r0, #0 0802bb4c : __asm volatile( "isb" ); } /*-----------------------------------------------------------*/ void vPortEnterCritical( void ) { 802bb4c: b508 push {r3, lr} portDISABLE_INTERRUPTS(); 802bb4e: f7ff fff5 bl 802bb3c uxCriticalNesting++; 802bb52: 4a09 ldr r2, [pc, #36] ; (802bb78 ) 802bb54: 6813 ldr r3, [r2, #0] 802bb56: 3301 adds r3, #1 802bb58: 6013 str r3, [r2, #0] __asm volatile( "dsb" ); 802bb5a: f3bf 8f4f dsb sy __asm volatile( "isb" ); 802bb5e: 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 ) 802bb62: 2b01 cmp r3, #1 802bb64: d107 bne.n 802bb76 { configASSERT( ( portNVIC_INT_CTRL_REG & portVECTACTIVE_MASK ) == 0 ); 802bb66: 4b05 ldr r3, [pc, #20] ; (802bb7c ) 802bb68: 681b ldr r3, [r3, #0] 802bb6a: f013 0fff tst.w r3, #255 ; 0xff 802bb6e: d002 beq.n 802bb76 802bb70: f7ff ffe4 bl 802bb3c 802bb74: e7fe b.n 802bb74 802bb76: bd08 pop {r3, pc} 802bb78: 2000070c .word 0x2000070c 802bb7c: e000ed04 .word 0xe000ed04 0802bb80 : return pxTopOfStack; } /*-----------------------------------------------------------*/ static void prvTaskExitError( void ) { 802bb80: 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 ); 802bb82: 4b05 ldr r3, [pc, #20] ; (802bb98 ) 802bb84: 681b ldr r3, [r3, #0] 802bb86: 3301 adds r3, #1 802bb88: d002 beq.n 802bb90 802bb8a: f7ff ffd7 bl 802bb3c 802bb8e: e7fe b.n 802bb8e portDISABLE_INTERRUPTS(); 802bb90: f7ff ffd4 bl 802bb3c 802bb94: e7fe b.n 802bb94 802bb96: bf00 nop 802bb98: 2000070c .word 0x2000070c 0802bb9c : } /*-----------------------------------------------------------*/ __attribute__(( naked )) void vPortClearInterruptMask( uint32_t ulNewMaskValue ) { __asm volatile \ 802bb9c: f380 8811 msr BASEPRI, r0 802bba0: 4770 bx lr 802bba2: 0000 movs r0, r0 0802bba4 : } } /*-----------------------------------------------------------*/ void vPortExitCritical( void ) { 802bba4: b508 push {r3, lr} configASSERT( uxCriticalNesting ); 802bba6: 4b07 ldr r3, [pc, #28] ; (802bbc4 ) 802bba8: 6818 ldr r0, [r3, #0] 802bbaa: b910 cbnz r0, 802bbb2 802bbac: f7ff ffc6 bl 802bb3c 802bbb0: e7fe b.n 802bbb0 uxCriticalNesting--; 802bbb2: 3801 subs r0, #1 802bbb4: 6018 str r0, [r3, #0] if( uxCriticalNesting == 0 ) 802bbb6: b918 cbnz r0, 802bbc0 { portENABLE_INTERRUPTS(); } } 802bbb8: e8bd 4008 ldmia.w sp!, {r3, lr} { configASSERT( uxCriticalNesting ); uxCriticalNesting--; if( uxCriticalNesting == 0 ) { portENABLE_INTERRUPTS(); 802bbbc: f7ff bfee b.w 802bb9c 802bbc0: bd08 pop {r3, pc} 802bbc2: bf00 nop 802bbc4: 2000070c .word 0x2000070c 0802bbc8 : void xPortPendSVHandler( void ) { /* This is a naked function. */ __asm volatile 802bbc8: f3ef 8009 mrs r0, PSP 802bbcc: f3bf 8f6f isb sy 802bbd0: 4b0d ldr r3, [pc, #52] ; (802bc08 ) 802bbd2: 681a ldr r2, [r3, #0] 802bbd4: e920 0ff0 stmdb r0!, {r4, r5, r6, r7, r8, r9, sl, fp} 802bbd8: 6010 str r0, [r2, #0] 802bbda: e92d 4008 stmdb sp!, {r3, lr} 802bbde: f04f 0050 mov.w r0, #80 ; 0x50 802bbe2: f380 8811 msr BASEPRI, r0 802bbe6: f7ff fc3b bl 802b460 802bbea: f04f 0000 mov.w r0, #0 802bbee: f380 8811 msr BASEPRI, r0 802bbf2: e8bd 4008 ldmia.w sp!, {r3, lr} 802bbf6: 6819 ldr r1, [r3, #0] 802bbf8: 6808 ldr r0, [r1, #0] 802bbfa: e8b0 0ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp} 802bbfe: f380 8809 msr PSP, r0 802bc02: f3bf 8f6f isb sy 802bc06: 4770 bx lr 0802bc08 : 802bc08: 20000c84 .word 0x20000c84 0802bc0c : ); } /*-----------------------------------------------------------*/ void xPortSysTickHandler( void ) { 802bc0c: 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(); 802bc0e: f7ff ff95 bl 802bb3c { /* Increment the RTOS tick. */ if( xTaskIncrementTick() != pdFALSE ) 802bc12: f7ff fa7b bl 802b10c 802bc16: b118 cbz r0, 802bc20 { /* A context switch is required. Context switching is performed in the PendSV interrupt. Pend the PendSV interrupt. */ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; 802bc18: 4b04 ldr r3, [pc, #16] ; (802bc2c ) 802bc1a: f04f 5280 mov.w r2, #268435456 ; 0x10000000 802bc1e: 601a str r2, [r3, #0] } } portCLEAR_INTERRUPT_MASK_FROM_ISR( 0 ); 802bc20: 2000 movs r0, #0 } 802bc22: 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 ); 802bc26: f7ff bfb9 b.w 802bb9c 802bc2a: bf00 nop 802bc2c: e000ed04 .word 0xe000ed04 0802bc30 : 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; 802bc30: 4b06 ldr r3, [pc, #24] ; (802bc4c ) 802bc32: 681a ldr r2, [r3, #0] 802bc34: f44f 737a mov.w r3, #1000 ; 0x3e8 802bc38: fbb2 f2f3 udiv r2, r2, r3 802bc3c: 4b04 ldr r3, [pc, #16] ; (802bc50 ) 802bc3e: 3a01 subs r2, #1 802bc40: 601a str r2, [r3, #0] portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT | portNVIC_SYSTICK_ENABLE_BIT ); 802bc42: 2207 movs r2, #7 802bc44: f843 2c04 str.w r2, [r3, #-4] 802bc48: 4770 bx lr 802bc4a: bf00 nop 802bc4c: 200005bc .word 0x200005bc 802bc50: e000e014 .word 0xe000e014 0802bc54 : /* * See header file for description. */ BaseType_t xPortStartScheduler( void ) { 802bc54: 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; 802bc56: 4b1d ldr r3, [pc, #116] ; (802bccc ) 802bc58: 781a ldrb r2, [r3, #0] 802bc5a: 9201 str r2, [sp, #4] /* Determine the number of priority bits available. First write to all possible bits. */ *pucFirstUserPriorityRegister = portMAX_8_BIT_VALUE; 802bc5c: 22ff movs r2, #255 ; 0xff 802bc5e: 701a strb r2, [r3, #0] /* Read the value back to see how many bits stuck. */ ucMaxPriorityValue = *pucFirstUserPriorityRegister; 802bc60: 781b ldrb r3, [r3, #0] 802bc62: f88d 3003 strb.w r3, [sp, #3] /* Use the same mask on the maximum system call priority. */ ucMaxSysCallPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY & ucMaxPriorityValue; 802bc66: f89d 2003 ldrb.w r2, [sp, #3] 802bc6a: 4b19 ldr r3, [pc, #100] ; (802bcd0 ) 802bc6c: f002 0250 and.w r2, r2, #80 ; 0x50 802bc70: 701a strb r2, [r3, #0] /* Calculate the maximum acceptable priority group value for the number of bits read back. */ ulMaxPRIGROUPValue = portMAX_PRIGROUP_BITS; 802bc72: 4a18 ldr r2, [pc, #96] ; (802bcd4 ) 802bc74: 2307 movs r3, #7 802bc76: 6013 str r3, [r2, #0] while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE ) 802bc78: e005 b.n 802bc86 { ulMaxPRIGROUPValue--; ucMaxPriorityValue <<= ( uint8_t ) 0x01; 802bc7a: f89d 3003 ldrb.w r3, [sp, #3] 802bc7e: 005b lsls r3, r3, #1 802bc80: f88d 3003 strb.w r3, [sp, #3] 802bc84: 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 ) 802bc86: f89d 2003 ldrb.w r2, [sp, #3] 802bc8a: 1e59 subs r1, r3, #1 802bc8c: 0612 lsls r2, r2, #24 802bc8e: d4f4 bmi.n 802bc7a } /* Shift the priority group value back to its position within the AIRCR register. */ ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT; ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK; 802bc90: 4a10 ldr r2, [pc, #64] ; (802bcd4 ) ucMaxPriorityValue <<= ( uint8_t ) 0x01; } /* Shift the priority group value back to its position within the AIRCR register. */ ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT; 802bc92: 021b lsls r3, r3, #8 ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK; 802bc94: f403 63e0 and.w r3, r3, #1792 ; 0x700 802bc98: 6013 str r3, [r2, #0] /* Restore the clobbered interrupt priority register to its original value. */ *pucFirstUserPriorityRegister = ulOriginalPriority; 802bc9a: 4b0c ldr r3, [pc, #48] ; (802bccc ) 802bc9c: 9a01 ldr r2, [sp, #4] 802bc9e: 701a strb r2, [r3, #0] } #endif /* conifgASSERT_DEFINED */ /* Make PendSV and SysTick the lowest priority interrupts. */ portNVIC_SYSPRI2_REG |= portNVIC_PENDSV_PRI; 802bca0: f8d3 2920 ldr.w r2, [r3, #2336] ; 0x920 802bca4: f442 0270 orr.w r2, r2, #15728640 ; 0xf00000 802bca8: f8c3 2920 str.w r2, [r3, #2336] ; 0x920 portNVIC_SYSPRI2_REG |= portNVIC_SYSTICK_PRI; 802bcac: f8d3 2920 ldr.w r2, [r3, #2336] ; 0x920 802bcb0: f042 4270 orr.w r2, r2, #4026531840 ; 0xf0000000 802bcb4: f8c3 2920 str.w r2, [r3, #2336] ; 0x920 /* Start the timer that generates the tick ISR. Interrupts are disabled here already. */ vPortSetupTimerInterrupt(); 802bcb8: f7ff ffba bl 802bc30 /* Initialise the critical nesting count ready for the first task. */ uxCriticalNesting = 0; 802bcbc: 4b06 ldr r3, [pc, #24] ; (802bcd8 ) 802bcbe: 2200 movs r2, #0 802bcc0: 601a str r2, [r3, #0] /* Start the first task. */ prvPortStartFirstTask(); 802bcc2: f7ff feff bl 802bac4 /* 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(); 802bcc6: f7ff ff5b bl 802bb80 802bcca: bf00 nop 802bccc: e000e400 .word 0xe000e400 802bcd0: 20000d04 .word 0x20000d04 802bcd4: 20000d08 .word 0x20000d08 802bcd8: 2000070c .word 0x2000070c 0802bcdc : /*-----------------------------------------------------------*/ #if( configASSERT_DEFINED == 1 ) void vPortValidateInterruptPriority( void ) { 802bcdc: 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 ) ); 802bcde: f3ef 8305 mrs r3, IPSR /* Is the interrupt number a user defined interrupt? */ if( ulCurrentInterrupt >= portFIRST_USER_INTERRUPT_NUMBER ) 802bce2: 2b0f cmp r3, #15 802bce4: d908 bls.n 802bcf8 { /* Look up the interrupt's priority. */ ucCurrentPriority = pcInterruptPriorityRegisters[ ulCurrentInterrupt ]; 802bce6: 4a0a ldr r2, [pc, #40] ; (802bd10 ) 802bce8: 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 ); 802bcea: 4a0a ldr r2, [pc, #40] ; (802bd14 ) 802bcec: 7812 ldrb r2, [r2, #0] 802bcee: 429a cmp r2, r3 802bcf0: d902 bls.n 802bcf8 802bcf2: f7ff ff23 bl 802bb3c 802bcf6: e7fe b.n 802bcf6 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 ); 802bcf8: 4b07 ldr r3, [pc, #28] ; (802bd18 ) 802bcfa: 681a ldr r2, [r3, #0] 802bcfc: 4b07 ldr r3, [pc, #28] ; (802bd1c ) 802bcfe: 681b ldr r3, [r3, #0] 802bd00: f402 62e0 and.w r2, r2, #1792 ; 0x700 802bd04: 429a cmp r2, r3 802bd06: d902 bls.n 802bd0e 802bd08: f7ff ff18 bl 802bb3c 802bd0c: e7fe b.n 802bd0c 802bd0e: bd08 pop {r3, pc} 802bd10: e000e3f0 .word 0xe000e3f0 802bd14: 20000d04 .word 0x20000d04 802bd18: e000ed0c .word 0xe000ed0c 802bd1c: 20000d08 .word 0x20000d08 0802bd20 : xBlockAllocatedBit = ( ( size_t ) 1 ) << ( ( sizeof( size_t ) * heapBITS_PER_BYTE ) - 1 ); } /*-----------------------------------------------------------*/ static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert ) { 802bd20: 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 ) 802bd22: 4b0f ldr r3, [pc, #60] ; (802bd60 ) 802bd24: e000 b.n 802bd28 802bd26: 4613 mov r3, r2 802bd28: 681a ldr r2, [r3, #0] 802bd2a: 4282 cmp r2, r0 802bd2c: d3fb bcc.n 802bd26 } /* 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 ) 802bd2e: 6859 ldr r1, [r3, #4] 802bd30: 185c adds r4, r3, r1 802bd32: 4284 cmp r4, r0 802bd34: d103 bne.n 802bd3e { pxIterator->xBlockSize += pxBlockToInsert->xBlockSize; 802bd36: 6840 ldr r0, [r0, #4] 802bd38: 1841 adds r1, r0, r1 802bd3a: 6059 str r1, [r3, #4] 802bd3c: 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 ) 802bd3e: 6841 ldr r1, [r0, #4] 802bd40: 1844 adds r4, r0, r1 802bd42: 4294 cmp r4, r2 802bd44: d106 bne.n 802bd54 { if( pxIterator->pxNextFreeBlock != pxEnd ) 802bd46: 4c07 ldr r4, [pc, #28] ; (802bd64 ) 802bd48: 6824 ldr r4, [r4, #0] 802bd4a: 42a2 cmp r2, r4 802bd4c: d002 beq.n 802bd54 { /* Form one big block from the two blocks. */ pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize; pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock->pxNextFreeBlock; 802bd4e: 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; 802bd50: 1861 adds r1, r4, r1 802bd52: 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 ) 802bd54: 4283 cmp r3, r0 pxBlockToInsert->pxNextFreeBlock = pxEnd; } } else { pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock; 802bd56: 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; 802bd58: bf18 it ne 802bd5a: 6018 strne r0, [r3, #0] 802bd5c: bd10 pop {r4, pc} 802bd5e: bf00 nop 802bd60: 20000d14 .word 0x20000d14 802bd64: 20000d10 .word 0x20000d10 0802bd68 : static size_t xBlockAllocatedBit = 0; /*-----------------------------------------------------------*/ void *pvPortMalloc( size_t xWantedSize ) { 802bd68: b5f8 push {r3, r4, r5, r6, r7, lr} 802bd6a: 4605 mov r5, r0 BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink; void *pvReturn = NULL; vTaskSuspendAll(); 802bd6c: f7ff f9c0 bl 802b0f0 { /* If this is the first call to malloc then the heap will require initialisation to setup the list of free blocks. */ if( pxEnd == NULL ) 802bd70: 4b3a ldr r3, [pc, #232] ; (802be5c ) 802bd72: 681b ldr r3, [r3, #0] 802bd74: bb1b cbnz r3, 802bdbe 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; 802bd76: 4a3a ldr r2, [pc, #232] ; (802be60 ) if( ( ulAddress & portBYTE_ALIGNMENT_MASK ) != 0 ) 802bd78: 0756 lsls r6, r2, #29 802bd7a: d007 beq.n 802bd8c { ulAddress += ( portBYTE_ALIGNMENT - 1 ); 802bd7c: 1dd3 adds r3, r2, #7 ulAddress &= ~portBYTE_ALIGNMENT_MASK; 802bd7e: f023 0307 bic.w r3, r3, #7 xTotalHeapSize -= ulAddress - ( uint32_t ) ucHeap; 802bd82: f502 4270 add.w r2, r2, #61440 ; 0xf000 802bd86: 1ad1 subs r1, r2, r3 ulAddress = ( uint32_t ) ucHeap; if( ( ulAddress & portBYTE_ALIGNMENT_MASK ) != 0 ) { ulAddress += ( portBYTE_ALIGNMENT - 1 ); ulAddress &= ~portBYTE_ALIGNMENT_MASK; 802bd88: 461a mov r2, r3 802bd8a: e001 b.n 802bd90 static void prvHeapInit( void ) { BlockLink_t *pxFirstFreeBlock; uint8_t *pucAlignedHeap; uint32_t ulAddress; size_t xTotalHeapSize = configTOTAL_HEAP_SIZE; 802bd8c: 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; 802bd90: 1851 adds r1, r2, r1 ulAddress -= xHeapStructSize; 802bd92: 3908 subs r1, #8 ulAddress &= ~portBYTE_ALIGNMENT_MASK; 802bd94: 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; 802bd98: 4832 ldr r0, [pc, #200] ; (802be64 ) xStart.xBlockSize = ( size_t ) 0; 802bd9a: 2300 movs r3, #0 802bd9c: 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; 802bda0: 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; 802bda2: 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; 802bda4: 1a8b subs r3, r1, r2 pxFirstFreeBlock->pxNextFreeBlock = pxEnd; 802bda6: e882 000a stmia.w r2, {r1, r3} /* Only one block exists - and it covers the entire usable heap space. */ xMinimumEverFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 802bdaa: 4a2f ldr r2, [pc, #188] ; (802be68 ) /* 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; 802bdac: 482b ldr r0, [pc, #172] ; (802be5c ) 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; 802bdae: 6013 str r3, [r2, #0] xFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 802bdb0: 4a2e ldr r2, [pc, #184] ; (802be6c ) /* 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; 802bdb2: 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; 802bdb4: 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 ); 802bdb6: 4b2e ldr r3, [pc, #184] ; (802be70 ) 802bdb8: f04f 4200 mov.w r2, #2147483648 ; 0x80000000 802bdbc: 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 ) 802bdbe: 4b2c ldr r3, [pc, #176] ; (802be70 ) 802bdc0: 681e ldr r6, [r3, #0] 802bdc2: 4235 tst r5, r6 802bdc4: d140 bne.n 802be48 { /* The wanted size is increased so it can contain a BlockLink_t structure in addition to the requested amount of bytes. */ if( xWantedSize > 0 ) 802bdc6: 2d00 cmp r5, #0 802bdc8: d03f beq.n 802be4a { xWantedSize += xHeapStructSize; 802bdca: 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 ) 802bdce: 0758 lsls r0, r3, #29 { /* Byte alignment required. */ xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) ); 802bdd0: bf1c itt ne 802bdd2: f023 0307 bicne.w r3, r3, #7 802bdd6: 3308 addne r3, #8 else { mtCOVERAGE_TEST_MARKER(); } if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) ) 802bdd8: 2b00 cmp r3, #0 802bdda: d033 beq.n 802be44 802bddc: 4a23 ldr r2, [pc, #140] ; (802be6c ) 802bdde: 6817 ldr r7, [r2, #0] 802bde0: 42bb cmp r3, r7 802bde2: d831 bhi.n 802be48 { /* Traverse the list from the start (lowest address) block until one of adequate size is found. */ pxPreviousBlock = &xStart; pxBlock = xStart.pxNextFreeBlock; 802bde4: 4a1f ldr r2, [pc, #124] ; (802be64 ) 802bde6: 6814 ldr r4, [r2, #0] while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) 802bde8: e001 b.n 802bdee 802bdea: 4622 mov r2, r4 { pxPreviousBlock = pxBlock; pxBlock = pxBlock->pxNextFreeBlock; 802bdec: 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 ) ) 802bdee: 6861 ldr r1, [r4, #4] 802bdf0: 4299 cmp r1, r3 802bdf2: d304 bcc.n 802bdfe pxBlock = pxBlock->pxNextFreeBlock; } /* If the end marker was reached then a block of adequate size was not found. */ if( pxBlock != pxEnd ) 802bdf4: 4819 ldr r0, [pc, #100] ; (802be5c ) 802bdf6: 6800 ldr r0, [r0, #0] 802bdf8: 4284 cmp r4, r0 802bdfa: d104 bne.n 802be06 802bdfc: e024 b.n 802be48 { /* 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 ) ) 802bdfe: 6820 ldr r0, [r4, #0] 802be00: 2800 cmp r0, #0 802be02: d1f2 bne.n 802bdea 802be04: e7f6 b.n 802bdf4 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; 802be06: 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 ); 802be08: 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; 802be0a: 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 ) 802be0c: 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 ); 802be0e: 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 ) 802be10: 2a10 cmp r2, #16 802be12: d909 bls.n 802be28 { /* 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 ); 802be14: 18e0 adds r0, r4, r3 configASSERT( ( ( ( uint32_t ) pxNewBlockLink ) & portBYTE_ALIGNMENT_MASK ) == 0 ); 802be16: 0741 lsls r1, r0, #29 802be18: d002 beq.n 802be20 802be1a: f7ff fe8f bl 802bb3c 802be1e: e7fe b.n 802be1e /* Calculate the sizes of two blocks split from the single block. */ pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize; 802be20: 6042 str r2, [r0, #4] pxBlock->xBlockSize = xWantedSize; 802be22: 6063 str r3, [r4, #4] /* Insert the new block into the list of free blocks. */ prvInsertBlockIntoFreeList( ( pxNewBlockLink ) ); 802be24: f7ff ff7c bl 802bd20 else { mtCOVERAGE_TEST_MARKER(); } xFreeBytesRemaining -= pxBlock->xBlockSize; 802be28: 6862 ldr r2, [r4, #4] 802be2a: 4910 ldr r1, [pc, #64] ; (802be6c ) 802be2c: 1abb subs r3, r7, r2 802be2e: 600b str r3, [r1, #0] if( xFreeBytesRemaining < xMinimumEverFreeBytesRemaining ) 802be30: 490d ldr r1, [pc, #52] ; (802be68 ) 802be32: 6808 ldr r0, [r1, #0] 802be34: 4283 cmp r3, r0 { xMinimumEverFreeBytesRemaining = xFreeBytesRemaining; 802be36: bf38 it cc 802be38: 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; 802be3a: 4316 orrs r6, r2 pxBlock->pxNextFreeBlock = NULL; 802be3c: 2300 movs r3, #0 802be3e: e884 0048 stmia.w r4, {r3, r6} 802be42: e002 b.n 802be4a /*-----------------------------------------------------------*/ void *pvPortMalloc( size_t xWantedSize ) { BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink; void *pvReturn = NULL; 802be44: 461d mov r5, r3 802be46: e000 b.n 802be4a 802be48: 2500 movs r5, #0 mtCOVERAGE_TEST_MARKER(); } traceMALLOC( pvReturn, xWantedSize ); } ( void ) xTaskResumeAll(); 802be4a: f7ff f9ed bl 802b228 mtCOVERAGE_TEST_MARKER(); } } #endif configASSERT( ( ( ( uint32_t ) pvReturn ) & portBYTE_ALIGNMENT_MASK ) == 0 ); 802be4e: 076b lsls r3, r5, #29 802be50: d002 beq.n 802be58 802be52: f7ff fe73 bl 802bb3c 802be56: e7fe b.n 802be56 return pvReturn; } 802be58: 4628 mov r0, r5 802be5a: bdf8 pop {r3, r4, r5, r6, r7, pc} 802be5c: 20000d10 .word 0x20000d10 802be60: 10000000 .word 0x10000000 802be64: 20000d14 .word 0x20000d14 802be68: 20000d1c .word 0x20000d1c 802be6c: 20000d0c .word 0x20000d0c 802be70: 20000d20 .word 0x20000d20 0802be74 : /*-----------------------------------------------------------*/ void vPortFree( void *pv ) { 802be74: b510 push {r4, lr} uint8_t *puc = ( uint8_t * ) pv; BlockLink_t *pxLink; if( pv != NULL ) 802be76: 4604 mov r4, r0 802be78: b310 cbz r0, 802bec0 /* This casting is to keep the compiler from issuing warnings. */ pxLink = ( void * ) puc; /* Check the block is actually allocated. */ configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 ); 802be7a: 4a12 ldr r2, [pc, #72] ; (802bec4 ) 802be7c: f850 3c04 ldr.w r3, [r0, #-4] 802be80: 6812 ldr r2, [r2, #0] 802be82: 421a tst r2, r3 802be84: d102 bne.n 802be8c 802be86: f7ff fe59 bl 802bb3c 802be8a: e7fe b.n 802be8a configASSERT( pxLink->pxNextFreeBlock == NULL ); 802be8c: f850 1c08 ldr.w r1, [r0, #-8] 802be90: b111 cbz r1, 802be98 802be92: f7ff fe53 bl 802bb3c 802be96: e7fe b.n 802be96 { if( pxLink->pxNextFreeBlock == NULL ) { /* The block is being returned to the heap - it is no longer allocated. */ pxLink->xBlockSize &= ~xBlockAllocatedBit; 802be98: ea23 0302 bic.w r3, r3, r2 802be9c: f840 3c04 str.w r3, [r0, #-4] vTaskSuspendAll(); 802bea0: f7ff f926 bl 802b0f0 { /* Add this block to the list of free blocks. */ xFreeBytesRemaining += pxLink->xBlockSize; 802bea4: 4b08 ldr r3, [pc, #32] ; (802bec8 ) 802bea6: f854 1c04 ldr.w r1, [r4, #-4] 802beaa: 681a ldr r2, [r3, #0] traceFREE( pv, pxLink->xBlockSize ); prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) ); 802beac: f1a4 0008 sub.w r0, r4, #8 pxLink->xBlockSize &= ~xBlockAllocatedBit; vTaskSuspendAll(); { /* Add this block to the list of free blocks. */ xFreeBytesRemaining += pxLink->xBlockSize; 802beb0: 188a adds r2, r1, r2 802beb2: 601a str r2, [r3, #0] traceFREE( pv, pxLink->xBlockSize ); prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) ); 802beb4: f7ff ff34 bl 802bd20 else { mtCOVERAGE_TEST_MARKER(); } } } 802beb8: 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(); 802bebc: f7ff b9b4 b.w 802b228 802bec0: bd10 pop {r4, pc} 802bec2: bf00 nop 802bec4: 20000d20 .word 0x20000d20 802bec8: 20000d0c .word 0x20000d0c 0802becc : static void http_sent_log_err(void * arg, err_t err) { (void)err; (void)arg; /* Clear file transfer in progress flag */ fLogTransInprog = false; 802becc: 4b01 ldr r3, [pc, #4] ; (802bed4 ) 802bece: 2200 movs r2, #0 802bed0: 701a strb r2, [r3, #0] 802bed2: 4770 bx lr 802bed4: 20000d30 .word 0x20000d30 0802bed8 : * @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) { 802bed8: 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) 802beda: 4c09 ldr r4, [pc, #36] ; (802bf00 ) * @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) { 802bedc: 4606 mov r6, r0 802bede: 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)) 802bee0: 4630 mov r0, r6 802bee2: 6861 ldr r1, [r4, #4] 802bee4: f7f5 ffe8 bl 8021eb8 802bee8: b928 cbnz r0, 802bef6 { file->data = f->data; 802beea: 68a3 ldr r3, [r4, #8] 802beec: 602b str r3, [r5, #0] file->len = f->len; 802beee: 68e3 ldr r3, [r4, #12] return 1; 802bef0: 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; 802bef2: 606b str r3, [r5, #4] return 1; 802bef4: 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) 802bef6: 6824 ldr r4, [r4, #0] 802bef8: 2c00 cmp r4, #0 802befa: d1f1 bne.n 802bee0 file->data = f->data; file->len = f->len; return 1; } } return 0; 802befc: 4620 mov r0, r4 } 802befe: bd70 pop {r4, r5, r6, pc} 802bf00: 08042c1c .word 0x08042c1c 0802bf04 : * @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) { 802bf04: 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)); 802bf06: 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) { 802bf08: 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)); 802bf0a: f003 f94b bl 802f1a4 if (hs == NULL) 802bf0e: 4601 mov r1, r0 802bf10: b1a0 cbz r0, 802bf3c { return ERR_MEM; } /* Initialize the structure. */ hs->file = NULL; 802bf12: 2500 movs r5, #0 802bf14: 6005 str r5, [r0, #0] hs->left = 0; 802bf16: 6045 str r5, [r0, #4] /* Tell TCP that this is the structure we wish to be passed for our callbacks. */ tcp_arg(pcb, hs); 802bf18: 4620 mov r0, r4 802bf1a: f003 fdb1 bl 802fa80 /* Tell TCP that we wish to be informed of incoming data by a call to the http_recv() function. */ tcp_recv(pcb, http_recv); 802bf1e: 4620 mov r0, r4 802bf20: 4908 ldr r1, [pc, #32] ; (802bf44 ) 802bf22: f003 fdaf bl 802fa84 tcp_err(pcb, conn_err); 802bf26: 4620 mov r0, r4 802bf28: 4907 ldr r1, [pc, #28] ; (802bf48 ) 802bf2a: f003 fdaf bl 802fa8c tcp_poll(pcb, http_poll, 10); 802bf2e: 4620 mov r0, r4 802bf30: 4906 ldr r1, [pc, #24] ; (802bf4c ) 802bf32: 220a movs r2, #10 802bf34: f003 fdaf bl 802fa96 return ERR_OK; 802bf38: 4628 mov r0, r5 802bf3a: e000 b.n 802bf3e /* 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; 802bf3c: 20ff movs r0, #255 ; 0xff tcp_err(pcb, conn_err); tcp_poll(pcb, http_poll, 10); return ERR_OK; } 802bf3e: b240 sxtb r0, r0 802bf40: bd38 pop {r3, r4, r5, pc} 802bf42: bf00 nop 802bf44: 0802cf85 .word 0x0802cf85 802bf48: 0802bf93 .word 0x0802bf93 802bf4c: 0802bf7b .word 0x0802bf7b 0802bf50 : * @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) { 802bf50: 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) 802bf52: 684b ldr r3, [r1, #4] 802bf54: f8b0 5066 ldrh.w r5, [r0, #102] ; 0x66 802bf58: 429d cmp r5, r3 { len = tcp_sndbuf(pcb); } else { len = hs->left; 802bf5a: bf28 it cs 802bf5c: 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) { 802bf5e: 460c mov r4, r1 } else { len = hs->left; } err = tcp_write(pcb, hs->file, len, 0); 802bf60: 462a mov r2, r5 802bf62: 6809 ldr r1, [r1, #0] 802bf64: 2300 movs r3, #0 802bf66: f005 f8f0 bl 803114a if (err == ERR_OK) 802bf6a: b928 cbnz r0, 802bf78 { hs->file += len; 802bf6c: 6823 ldr r3, [r4, #0] 802bf6e: 195b adds r3, r3, r5 802bf70: 6023 str r3, [r4, #0] hs->left -= len; 802bf72: 6863 ldr r3, [r4, #4] 802bf74: 1b5d subs r5, r3, r5 802bf76: 6065 str r5, [r4, #4] 802bf78: bd38 pop {r3, r4, r5, pc} 0802bf7a : * @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) { 802bf7a: b508 push {r3, lr} if (arg == NULL) 802bf7c: 4603 mov r3, r0 { tcp_close(pcb); 802bf7e: 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) 802bf80: b913 cbnz r3, 802bf88 { tcp_close(pcb); 802bf82: f004 f81b bl 802ffbc 802bf86: e002 b.n 802bf8e } else { send_data(pcb, (struct http_state *)arg); 802bf88: 4619 mov r1, r3 802bf8a: f7ff ffe1 bl 802bf50 } return ERR_OK; } 802bf8e: 2000 movs r0, #0 802bf90: bd08 pop {r3, pc} 0802bf92 : static void conn_err(void *arg, err_t err) { struct http_state *hs; hs = arg; mem_free(hs); 802bf92: f003 b83f b.w 802f014 0802bf96 : * @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) { 802bf96: b538 push {r3, r4, r5, lr} 802bf98: 4604 mov r4, r0 802bf9a: 460d mov r5, r1 tcp_arg(pcb, NULL); 802bf9c: 2100 movs r1, #0 802bf9e: f003 fd6f bl 802fa80 tcp_sent(pcb, NULL); 802bfa2: 4620 mov r0, r4 802bfa4: 2100 movs r1, #0 802bfa6: f003 fd6f bl 802fa88 tcp_recv(pcb, NULL); 802bfaa: 4620 mov r0, r4 802bfac: 2100 movs r1, #0 802bfae: f003 fd69 bl 802fa84 mem_free(hs); 802bfb2: 4628 mov r0, r5 802bfb4: f003 f82e bl 802f014 tcp_close(pcb); 802bfb8: 4620 mov r0, r4 } 802bfba: 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); 802bfbe: f003 bffd b.w 802ffbc 0802bfc2 : * @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) { 802bfc2: b508 push {r3, lr} 802bfc4: 4603 mov r3, r0 802bfc6: 4608 mov r0, r1 struct http_state *hs; hs = arg; if (hs->left > 0) 802bfc8: 685a ldr r2, [r3, #4] { send_data(pcb, hs); 802bfca: 4619 mov r1, r3 { struct http_state *hs; hs = arg; if (hs->left > 0) 802bfcc: b112 cbz r2, 802bfd4 { send_data(pcb, hs); 802bfce: f7ff ffbf bl 802bf50 802bfd2: e001 b.n 802bfd8 } else { close_conn(pcb, hs); 802bfd4: f7ff ffdf bl 802bf96 } return ERR_OK; } 802bfd8: 2000 movs r0, #0 802bfda: bd08 pop {r3, pc} 0802bfdc : /** * @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) { 802bfdc: b570 push {r4, r5, r6, lr} static bool start = true; (void)len; hs = arg; if (hs->left > 0) 802bfde: 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) { 802bfe0: 4604 mov r4, r0 802bfe2: 460e mov r6, r1 static bool start = true; (void)len; hs = arg; if (hs->left > 0) 802bfe4: b125 cbz r5, 802bff0 { send_data(pcb, hs); 802bfe6: 4608 mov r0, r1 802bfe8: 4621 mov r1, r4 802bfea: f7ff ffb1 bl 802bf50 802bfee: e036 b.n 802c05e } else { memset(logFileBuf, 0, FILE_BUF_MAX_LEN); 802bff0: f44f 727a mov.w r2, #1000 ; 0x3e8 802bff4: 481b ldr r0, [pc, #108] ; (802c064 ) 802bff6: 4629 mov r1, r5 802bff8: f7f5 fed2 bl 8021da0 if (log_ptr + FILE_BUF_MAX_LEN_LOG <= log_size) { 802bffc: 4b1a ldr r3, [pc, #104] ; (802c068 ) 802bffe: 6818 ldr r0, [r3, #0] 802c000: 4b1a ldr r3, [pc, #104] ; (802c06c ) 802c002: 681a ldr r2, [r3, #0] 802c004: f500 7320 add.w r3, r0, #640 ; 0x280 802c008: 4293 cmp r3, r2 802c00a: 4b19 ldr r3, [pc, #100] ; (802c070 ) 802c00c: d803 bhi.n 802c016 nbytes = LOG_GetData(log_ptr, logFileBuf, FILE_BUF_MAX_LEN_LOG, start); 802c00e: 4915 ldr r1, [pc, #84] ; (802c064 ) 802c010: f44f 7220 mov.w r2, #640 ; 0x280 802c014: e003 b.n 802c01e } else if (log_ptr < log_size) { 802c016: 4290 cmp r0, r2 802c018: d205 bcs.n 802c026 nbytes = LOG_GetData(log_ptr, logFileBuf, (log_size - log_ptr), start); 802c01a: 4912 ldr r1, [pc, #72] ; (802c064 ) 802c01c: 1a12 subs r2, r2, r0 802c01e: 781b ldrb r3, [r3, #0] 802c020: f7fd ffe8 bl 8029ff4 802c024: 4605 mov r5, r0 } else { nbytes = 0; } log_ptr += nbytes; 802c026: 4b10 ldr r3, [pc, #64] ; (802c068 ) 802c028: 681a ldr r2, [r3, #0] 802c02a: 18aa adds r2, r5, r2 802c02c: 601a str r2, [r3, #0] start = false; 802c02e: 4b10 ldr r3, [pc, #64] ; (802c070 ) 802c030: 2200 movs r2, #0 802c032: 701a strb r2, [r3, #0] if (nbytes == 0) { 802c034: b945 cbnz r5, 802c048 /* File transfer finished. */ start = true; 802c036: 2201 movs r2, #1 close_conn(pcb, hs); 802c038: 4630 mov r0, r6 802c03a: 4621 mov r1, r4 log_ptr += nbytes; start = false; if (nbytes == 0) { /* File transfer finished. */ start = true; 802c03c: 701a strb r2, [r3, #0] close_conn(pcb, hs); 802c03e: f7ff ffaa bl 802bf96 /* Clear file transfer in progress flag */ fLogTransInprog = false; 802c042: 4b0c ldr r3, [pc, #48] ; (802c074 ) 802c044: 701d strb r5, [r3, #0] 802c046: e00a b.n 802c05e return ERR_OK; } hs->file = logFileBuf; 802c048: 4b06 ldr r3, [pc, #24] ; (802c064 ) hs->left = nbytes; send_data(pcb, hs); 802c04a: 4630 mov r0, r6 802c04c: 4621 mov r1, r4 return ERR_OK; } hs->file = logFileBuf; hs->left = nbytes; 802c04e: e884 0028 stmia.w r4, {r3, r5} send_data(pcb, hs); 802c052: f7ff ff7d bl 802bf50 tcp_sent(pcb, http_sent_log); 802c056: 4630 mov r0, r6 802c058: 4907 ldr r1, [pc, #28] ; (802c078 ) 802c05a: f003 fd15 bl 802fa88 } return ERR_OK; } 802c05e: 2000 movs r0, #0 802c060: bd70 pop {r4, r5, r6, pc} 802c062: bf00 nop 802c064: 2000cf94 .word 0x2000cf94 802c068: 20000d28 .word 0x20000d28 802c06c: 20000d34 .word 0x20000d34 802c070: 20000711 .word 0x20000711 802c074: 20000d30 .word 0x20000d30 802c078: 0802bfdd .word 0x0802bfdd 0802c07c : /** * @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) { 802c07c: b570 push {r4, r5, r6, lr} static bool start = true; (void)len; hs = arg; if (hs->left > 0) 802c07e: 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) { 802c080: 4604 mov r4, r0 802c082: 460e mov r6, r1 static bool start = true; (void)len; hs = arg; if (hs->left > 0) 802c084: b125 cbz r5, 802c090 { send_data(pcb, hs); 802c086: 4608 mov r0, r1 802c088: 4621 mov r1, r4 802c08a: f7ff ff61 bl 802bf50 802c08e: e036 b.n 802c0fe } else { memset(logFileBuf, 0, FILE_BUF_MAX_LEN); 802c090: f44f 727a mov.w r2, #1000 ; 0x3e8 802c094: 481b ldr r0, [pc, #108] ; (802c104 ) 802c096: 4629 mov r1, r5 802c098: f7f5 fe82 bl 8021da0 if (log_ptr + FILE_BUF_MAX_LEN <= log_size) { 802c09c: 4b1a ldr r3, [pc, #104] ; (802c108 ) 802c09e: 6818 ldr r0, [r3, #0] 802c0a0: 4b1a ldr r3, [pc, #104] ; (802c10c ) 802c0a2: 681a ldr r2, [r3, #0] 802c0a4: f500 737a add.w r3, r0, #1000 ; 0x3e8 802c0a8: 4293 cmp r3, r2 802c0aa: 4b19 ldr r3, [pc, #100] ; (802c110 ) 802c0ac: d803 bhi.n 802c0b6 nbytes = History_GetData(log_ptr, logFileBuf, FILE_BUF_MAX_LEN, start); 802c0ae: 4915 ldr r1, [pc, #84] ; (802c104 ) 802c0b0: f44f 727a mov.w r2, #1000 ; 0x3e8 802c0b4: e003 b.n 802c0be } else if (log_ptr < log_size) { 802c0b6: 4290 cmp r0, r2 802c0b8: d205 bcs.n 802c0c6 nbytes = History_GetData(log_ptr, logFileBuf, (log_size - log_ptr), start); 802c0ba: 4912 ldr r1, [pc, #72] ; (802c104 ) 802c0bc: 1a12 subs r2, r2, r0 802c0be: 781b ldrb r3, [r3, #0] 802c0c0: f7fe f8a8 bl 802a214 802c0c4: 4605 mov r5, r0 } else { nbytes = 0; } log_ptr += nbytes; 802c0c6: 4b10 ldr r3, [pc, #64] ; (802c108 ) 802c0c8: 681a ldr r2, [r3, #0] 802c0ca: 18aa adds r2, r5, r2 802c0cc: 601a str r2, [r3, #0] start = false; 802c0ce: 4b10 ldr r3, [pc, #64] ; (802c110 ) 802c0d0: 2200 movs r2, #0 802c0d2: 701a strb r2, [r3, #0] if (nbytes == 0) { 802c0d4: b945 cbnz r5, 802c0e8 /* File transfer finished. */ start = true; 802c0d6: 2201 movs r2, #1 close_conn(pcb, hs); 802c0d8: 4630 mov r0, r6 802c0da: 4621 mov r1, r4 log_ptr += nbytes; start = false; if (nbytes == 0) { /* File transfer finished. */ start = true; 802c0dc: 701a strb r2, [r3, #0] close_conn(pcb, hs); 802c0de: f7ff ff5a bl 802bf96 /* Clear file transfer in progress flag */ fLogTransInprog = false; 802c0e2: 4b0c ldr r3, [pc, #48] ; (802c114 ) 802c0e4: 701d strb r5, [r3, #0] 802c0e6: e00a b.n 802c0fe return ERR_OK; } hs->file = logFileBuf; 802c0e8: 4b06 ldr r3, [pc, #24] ; (802c104 ) hs->left = nbytes; send_data(pcb, hs); 802c0ea: 4630 mov r0, r6 802c0ec: 4621 mov r1, r4 return ERR_OK; } hs->file = logFileBuf; hs->left = nbytes; 802c0ee: e884 0028 stmia.w r4, {r3, r5} send_data(pcb, hs); 802c0f2: f7ff ff2d bl 802bf50 tcp_sent(pcb, http_sent_history); 802c0f6: 4630 mov r0, r6 802c0f8: 4907 ldr r1, [pc, #28] ; (802c118 ) 802c0fa: f003 fcc5 bl 802fa88 } return ERR_OK; } 802c0fe: 2000 movs r0, #0 802c100: bd70 pop {r4, r5, r6, pc} 802c102: bf00 nop 802c104: 2000cf94 .word 0x2000cf94 802c108: 20000d28 .word 0x20000d28 802c10c: 20000d34 .word 0x20000d34 802c110: 20000712 .word 0x20000712 802c114: 20000d30 .word 0x20000d30 802c118: 0802c07d .word 0x0802c07d 0802c11c : * @brief Initialize the HTTP server (start its thread) * @param none * @retval None */ void HTTP_Init() { 802c11c: b530 push {r4, r5, lr} 802c11e: b085 sub sp, #20 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(); 802c120: f004 f87a bl 8030218 /* bind HTTP traffic to pcb */ tcp_bind(pcb, IP_ADDR_ANY, 80); 802c124: 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(); 802c126: 4604 mov r4, r0 /* bind HTTP traffic to pcb */ tcp_bind(pcb, IP_ADDR_ANY, 80); 802c128: 4912 ldr r1, [pc, #72] ; (802c174 ) 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()); 802c12a: 4d13 ldr r5, [pc, #76] ; (802c178 ) //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); 802c12c: f003 fbd6 bl 802f8dc /* start listening on port 80 */ pcb = tcp_listen(pcb); 802c130: 21ff movs r1, #255 ; 0xff 802c132: 4620 mov r0, r4 802c134: f003 fc0a bl 802f94c /* define callback function for TCP connection setup */ tcp_accept(pcb, http_accept); 802c138: 4910 ldr r1, [pc, #64] ; (802c17c ) /** * @brief УÑтановка Cookie Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802c13a: 4c11 ldr r4, [pc, #68] ; (802c180 ) /* bind HTTP traffic to pcb */ 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); 802c13c: f003 fca9 bl 802fa92 for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { /* Flush user cookie by random value */ sprintf(buf, "%X", (unsigned int)GetRandomNumber()); 802c140: f7fa f966 bl 8026410 802c144: 4629 mov r1, r5 802c146: 4602 mov r2, r0 802c148: 4668 mov r0, sp 802c14a: f7fb fce9 bl 8027b20 /** * @brief УÑтановка Cookie Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802c14e: 4669 mov r1, sp 802c150: 4620 mov r0, r4 802c152: f7f5 ff9f bl 8022094 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()); 802c156: f7fa f95b bl 8026410 802c15a: 4629 mov r1, r5 802c15c: 4602 mov r2, r0 802c15e: 4668 mov r0, sp 802c160: f7fb fcde bl 8027b20 /** * @brief УÑтановка Cookie Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802c164: f104 0014 add.w r0, r4, #20 802c168: 4669 mov r1, sp 802c16a: f7f5 ff93 bl 8022094 /* Create user logout timers */ //users[user_id].LogoutTimer = // xTimerCreate("LogoutTmr", WEB_LOGOUT_TIME, pdFALSE, ( void * ) user_id, LogoutTimerCallback); } } 802c16e: b005 add sp, #20 802c170: bd30 pop {r4, r5, pc} 802c172: bf00 nop 802c174: 08043fe4 .word 0x08043fe4 802c178: 0804241d .word 0x0804241d 802c17c: 0802bf05 .word 0x0802bf05 802c180: 2000e22c .word 0x2000e22c 0802c184 : /** * @brief * @retval None */ int HTTP_SettingsPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c184: b570 push {r4, r5, r6, lr} 802c186: 4602 mov r2, r0 802c188: b088 sub sp, #32 802c18a: 460c mov r4, r1 char tempStr[30]; strncpy(tempStr, bufIn, 30); 802c18c: 4668 mov r0, sp 802c18e: 4611 mov r1, r2 802c190: 221e movs r2, #30 /** * @brief * @retval None */ int HTTP_SettingsPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c192: 461e mov r6, r3 char tempStr[30]; strncpy(tempStr, bufIn, 30); 802c194: f7f6 f894 bl 80222c0 /* Ð’ запроÑе нет параметров, нужно формировать JSON ответ */ if (strpbrk(tempStr,"?") == 0) 802c198: 4668 mov r0, sp 802c19a: 490b ldr r1, [pc, #44] ; (802c1c8 ) 802c19c: f7f6 f8c2 bl 8022324 802c1a0: 4605 mov r5, r0 /* Ð’ запроÑе еÑть параметры, нужно парÑить и ÑохранÑть наÑтройки */ else { //HTTP_SetSettings(bufIn, lenBufIn); return SEND_REQUIRED_NO; 802c1a2: 2001 movs r0, #1 { char tempStr[30]; strncpy(tempStr, bufIn, 30); /* Ð’ запроÑе нет параметров, нужно формировать JSON ответ */ if (strpbrk(tempStr,"?") == 0) 802c1a4: b975 cbnz r5, 802c1c4 { memset(bufOut, 0, SEND_BUF_MAX_LEN); 802c1a6: 4629 mov r1, r5 802c1a8: f44f 62fa mov.w r2, #2000 ; 0x7d0 802c1ac: 4620 mov r0, r4 802c1ae: f7f5 fdf7 bl 8021da0 HTTP_GetSettings(bufOut); 802c1b2: 4620 mov r0, r4 802c1b4: f001 fbe8 bl 802d988 //printf(bufOut); *lenBufOut = strlen(bufOut); 802c1b8: 4620 mov r0, r4 802c1ba: f7f5 ffc9 bl 8022150 802c1be: 8030 strh r0, [r6, #0] return SEND_REQUIRED_YES; 802c1c0: 4628 mov r0, r5 802c1c2: e7ff b.n 802c1c4 { //HTTP_SetSettings(bufIn, lenBufIn); return SEND_REQUIRED_NO; } } 802c1c4: b008 add sp, #32 802c1c6: bd70 pop {r4, r5, r6, pc} 802c1c8: 08042420 .word 0x08042420 0802c1cc : /** * @brief * @retval None */ int HTTP_InfoPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c1cc: b570 push {r4, r5, r6, lr} 802c1ce: 4602 mov r2, r0 802c1d0: b088 sub sp, #32 802c1d2: 460c mov r4, r1 char tempStr[30]; strncpy(tempStr, bufIn, 30); 802c1d4: 4668 mov r0, sp 802c1d6: 4611 mov r1, r2 802c1d8: 221e movs r2, #30 /** * @brief * @retval None */ int HTTP_InfoPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c1da: 461e mov r6, r3 char tempStr[30]; strncpy(tempStr, bufIn, 30); 802c1dc: f7f6 f870 bl 80222c0 /* Ð’ запроÑе нет параметров, нужно формировать JSON ответ */ if (strpbrk(tempStr,"?") == 0) 802c1e0: 4668 mov r0, sp 802c1e2: 490b ldr r1, [pc, #44] ; (802c210 ) 802c1e4: f7f6 f89e bl 8022324 802c1e8: 4605 mov r5, r0 } /* Ð’ запроÑе еÑть параметры, нужно парÑить и ÑохранÑть наÑтройки */ else { //HTTP_SetInfo(bufIn, lenBufIn); return SEND_REQUIRED_NO; 802c1ea: 2001 movs r0, #1 { char tempStr[30]; strncpy(tempStr, bufIn, 30); /* Ð’ запроÑе нет параметров, нужно формировать JSON ответ */ if (strpbrk(tempStr,"?") == 0) 802c1ec: b975 cbnz r5, 802c20c { memset(bufOut, 0, SEND_BUF_MAX_LEN); 802c1ee: 4629 mov r1, r5 802c1f0: f44f 62fa mov.w r2, #2000 ; 0x7d0 802c1f4: 4620 mov r0, r4 802c1f6: f7f5 fdd3 bl 8021da0 HTTP_GetInfo(bufOut); 802c1fa: 4620 mov r0, r4 802c1fc: f001 fdb6 bl 802dd6c *lenBufOut = strlen(bufOut); 802c200: 4620 mov r0, r4 802c202: f7f5 ffa5 bl 8022150 802c206: 8030 strh r0, [r6, #0] return SEND_REQUIRED_YES; 802c208: 4628 mov r0, r5 802c20a: e7ff b.n 802c20c /* HTTP_SetSettings(bufIn, lenBufIn); return SEND_REQUIRED_NO; */ } } 802c20c: b008 add sp, #32 802c20e: bd70 pop {r4, r5, r6, pc} 802c210: 08042420 .word 0x08042420 0802c214 : /** * @brief ЗапуÑк/оÑтанов теÑта UPS */ void HTTP_UPSTest(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c214: b570 push {r4, r5, r6, lr} 802c216: b08a sub sp, #40 ; 0x28 802c218: 4606 mov r6, r0 802c21a: 460c mov r4, r1 char *valueLen = 0; char tempValue[20]; char tempValue2[20]; int8_t res = 0; memset(tempValue, 0, 20); 802c21c: 2214 movs r2, #20 802c21e: 2100 movs r1, #0 802c220: 4668 mov r0, sp /** * @brief ЗапуÑк/оÑтанов теÑта UPS */ void HTTP_UPSTest(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c222: 461d mov r5, r3 char *valueLen = 0; char tempValue[20]; char tempValue2[20]; int8_t res = 0; memset(tempValue, 0, 20); 802c224: f7f5 fdbc bl 8021da0 memset(tempValue2, 0, 20); 802c228: 2214 movs r2, #20 802c22a: 2100 movs r1, #0 802c22c: a805 add r0, sp, #20 802c22e: f7f5 fdb7 bl 8021da0 strcpy(bufOut, HTTP_200_OK); 802c232: 4932 ldr r1, [pc, #200] ; (802c2fc ) 802c234: 4620 mov r0, r4 802c236: f7f5 ff2d bl 8022094 value = strstr(bufIn, "func"); 802c23a: 4630 mov r0, r6 802c23c: 4930 ldr r1, [pc, #192] ; (802c300 ) 802c23e: f7f6 fa07 bl 8022650 valueLen = strpbrk(value, ":"); 802c242: 4930 ldr r1, [pc, #192] ; (802c304 ) 802c244: f7f6 f86e bl 8022324 802c248: 4606 mov r6, r0 strncpy(tempValue, (valueLen+1), (strlen(valueLen)-2)); 802c24a: f7f5 ff81 bl 8022150 802c24e: 1c71 adds r1, r6, #1 802c250: 1e82 subs r2, r0, #2 802c252: 4668 mov r0, sp 802c254: f7f6 f834 bl 80222c0 if (strcmp(tempValue, "\"stop\"") == 0){ 802c258: 4668 mov r0, sp 802c25a: 492b ldr r1, [pc, #172] ; (802c308 ) 802c25c: f7f5 fe2c bl 8021eb8 802c260: b998 cbnz r0, 802c28a res = ups_metac_service_pdu(ups_cancel_test); 802c262: 2008 movs r0, #8 802c264: f7fd f8ca bl 80293fc 802c268: b2c6 uxtb r6, r0 if(res == 1 || res == 0){ 802c26a: 2e01 cmp r6, #1 802c26c: d807 bhi.n 802c27e strcat(bufOut, "ТеÑÑ‚ оÑтановлен!"); 802c26e: 4927 ldr r1, [pc, #156] ; (802c30c ) 802c270: 4620 mov r0, r4 802c272: f7f5 fdfb bl 8021e6c log_event_data(LOG_TEST_UPS, "ÐдминиÑтратор(ОÑтанов)"); 802c276: 2006 movs r0, #6 802c278: 4925 ldr r1, [pc, #148] ; (802c310 ) 802c27a: f7fd fdfd bl 8029e78 } if(res == -1) 802c27e: b276 sxtb r6, r6 802c280: 1c72 adds r2, r6, #1 802c282: d135 bne.n 802c2f0 strcat(bufOut, "ТеÑÑ‚ не удалоÑÑŒ оÑтановить!"); 802c284: 4620 mov r0, r4 802c286: 4923 ldr r1, [pc, #140] ; (802c314 ) 802c288: e030 b.n 802c2ec *lenBufOut = strlen(bufOut); } else if (strcmp(tempValue, "\"discharge\"") == 0){ 802c28a: 4668 mov r0, sp 802c28c: 4922 ldr r1, [pc, #136] ; (802c318 ) 802c28e: f7f5 fe13 bl 8021eb8 802c292: b908 cbnz r0, 802c298 res = ups_metac_service_pdu(ups_test_low_bat); 802c294: 2002 movs r0, #2 802c296: e017 b.n 802c2c8 } if(res == -1) strcat(bufOut, "ТеÑÑ‚ не удалоÑÑŒ запуÑтить!"); *lenBufOut = strlen(bufOut); } else if (strncmp(tempValue, "\"time\"", 6) == 0){ 802c298: 4668 mov r0, sp 802c29a: 4920 ldr r1, [pc, #128] ; (802c31c ) 802c29c: 2206 movs r2, #6 802c29e: f7f5 ffb9 bl 8022214 802c2a2: bb48 cbnz r0, 802c2f8 valueLen = strpbrk(tempValue, ":"); 802c2a4: 4917 ldr r1, [pc, #92] ; (802c304 ) 802c2a6: 4668 mov r0, sp 802c2a8: f7f6 f83c bl 8022324 802c2ac: 4606 mov r6, r0 strncpy(tempValue2, (valueLen+2), (strlen(valueLen)-2)); 802c2ae: f7f5 ff4f bl 8022150 802c2b2: 1cb1 adds r1, r6, #2 802c2b4: 1e82 subs r2, r0, #2 802c2b6: a805 add r0, sp, #20 802c2b8: f7f6 f802 bl 80222c0 TimeParam = atoi(tempValue2); 802c2bc: a805 add r0, sp, #20 802c2be: f7f5 fc4f bl 8021b60 802c2c2: 4b17 ldr r3, [pc, #92] ; (802c320 ) 802c2c4: 8018 strh r0, [r3, #0] res = ups_metac_service_pdu(ups_test_time); 802c2c6: 2003 movs r0, #3 802c2c8: f7fd f898 bl 80293fc 802c2cc: b2c6 uxtb r6, r0 if(res == 1 || res == 0){ 802c2ce: 2e01 cmp r6, #1 802c2d0: d807 bhi.n 802c2e2 strcat(bufOut, "ТеÑÑ‚ запущен!"); 802c2d2: 4914 ldr r1, [pc, #80] ; (802c324 ) 802c2d4: 4620 mov r0, r4 802c2d6: f7f5 fdc9 bl 8021e6c log_event_data(LOG_TEST_UPS, "ÐдминиÑтратор (Запущен)"); 802c2da: 2006 movs r0, #6 802c2dc: 4912 ldr r1, [pc, #72] ; (802c328 ) 802c2de: f7fd fdcb bl 8029e78 } if(res == -1) 802c2e2: b276 sxtb r6, r6 802c2e4: 1c73 adds r3, r6, #1 802c2e6: d103 bne.n 802c2f0 strcat(bufOut, "ТеÑÑ‚ не удалоÑÑŒ запуÑтить!"); 802c2e8: 4910 ldr r1, [pc, #64] ; (802c32c ) 802c2ea: 4620 mov r0, r4 802c2ec: f7f5 fdbe bl 8021e6c *lenBufOut = strlen(bufOut); 802c2f0: 4620 mov r0, r4 802c2f2: f7f5 ff2d bl 8022150 802c2f6: 8028 strh r0, [r5, #0] } } 802c2f8: b00a add sp, #40 ; 0x28 802c2fa: bd70 pop {r4, r5, r6, pc} 802c2fc: 08043633 .word 0x08043633 802c300: 08042422 .word 0x08042422 802c304: 08043e25 .word 0x08043e25 802c308: 08042427 .word 0x08042427 802c30c: 0804242e .word 0x0804242e 802c310: 0804244d .word 0x0804244d 802c314: 08042478 .word 0x08042478 802c318: 080424ab .word 0x080424ab 802c31c: 0804252d .word 0x0804252d 802c320: 20000b54 .word 0x20000b54 802c324: 080424b7 .word 0x080424b7 802c328: 080424d0 .word 0x080424d0 802c32c: 080424fc .word 0x080424fc 0802c330 : /** * @brief Выклюение UPS */ void HTTP_UPSshutdown(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c330: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802c334: b09a sub sp, #104 ; 0x68 char *valueLenEnd = 0; char tempValue[50]; char tempValue2[50]; int8_t res = 0; memset(tempValue, 0, 50); 802c336: 2232 movs r2, #50 ; 0x32 /** * @brief Выклюение UPS */ void HTTP_UPSshutdown(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c338: 4605 mov r5, r0 802c33a: 460c mov r4, r1 char *valueLenEnd = 0; char tempValue[50]; char tempValue2[50]; int8_t res = 0; memset(tempValue, 0, 50); 802c33c: 4668 mov r0, sp 802c33e: 2100 movs r1, #0 /** * @brief Выклюение UPS */ void HTTP_UPSshutdown(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c340: 461e mov r6, r3 char *valueLenEnd = 0; char tempValue[50]; char tempValue2[50]; int8_t res = 0; memset(tempValue, 0, 50); 802c342: f7f5 fd2d bl 8021da0 strcpy(bufOut, HTTP_200_OK); 802c346: 4941 ldr r1, [pc, #260] ; (802c44c ) 802c348: 4620 mov r0, r4 802c34a: f7f5 fea3 bl 8022094 value = strstr(bufIn, "func"); 802c34e: 4628 mov r0, r5 802c350: 493f ldr r1, [pc, #252] ; (802c450 ) 802c352: f7f6 f97d bl 8022650 valueLen = strpbrk(value, ":"); 802c356: 493f ldr r1, [pc, #252] ; (802c454 ) 802c358: f7f5 ffe4 bl 8022324 802c35c: 4605 mov r5, r0 strncpy(tempValue, (valueLen+1), (strlen(valueLen)-2)); 802c35e: f7f5 fef7 bl 8022150 802c362: 1c69 adds r1, r5, #1 802c364: 1e82 subs r2, r0, #2 802c366: 4668 mov r0, sp 802c368: f7f5 ffaa bl 80222c0 if (strcmp(tempValue, "\"cancel\"") == 0){ 802c36c: 4668 mov r0, sp 802c36e: 493a ldr r1, [pc, #232] ; (802c458 ) 802c370: f7f5 fda2 bl 8021eb8 802c374: b978 cbnz r0, 802c396 res = ups_metac_service_pdu(ups_cancel_shut_down); 802c376: 2007 movs r0, #7 802c378: f7fd f840 bl 80293fc if(res == 1){ 802c37c: b240 sxtb r0, r0 802c37e: 2801 cmp r0, #1 802c380: d106 bne.n 802c390 log_event_data(LOG_SHUTDOWN_UPS, "ÐдминиÑтратор(ОÑтанов)"); 802c382: 2007 movs r0, #7 802c384: 4935 ldr r1, [pc, #212] ; (802c45c ) 802c386: f7fd fd77 bl 8029e78 strcat(bufOut, "Выключение ИБП отменено!"); 802c38a: 4620 mov r0, r4 802c38c: 4934 ldr r1, [pc, #208] ; (802c460 ) 802c38e: e053 b.n 802c438 } else strcat(bufOut, "Выключение ИБП не удалоÑÑŒ отменить!"); 802c390: 4620 mov r0, r4 802c392: 4934 ldr r1, [pc, #208] ; (802c464 ) 802c394: e050 b.n 802c438 *lenBufOut = strlen(bufOut); } else if (strncmp(tempValue, "\"off\"", 5) == 0){ 802c396: 4668 mov r0, sp 802c398: 4933 ldr r1, [pc, #204] ; (802c468 ) 802c39a: 2205 movs r2, #5 802c39c: f7f5 ff3a bl 8022214 802c3a0: 4605 mov r5, r0 802c3a2: 2800 cmp r0, #0 802c3a4: d14e bne.n 802c444 value = strstr(tempValue, "after"); 802c3a6: 4931 ldr r1, [pc, #196] ; (802c46c ) 802c3a8: 4668 mov r0, sp 802c3aa: f7f6 f951 bl 8022650 valueLen = strpbrk(value, ":"); 802c3ae: 4929 ldr r1, [pc, #164] ; (802c454 ) else strcat(bufOut, "Выключение ИБП не удалоÑÑŒ отменить!"); *lenBufOut = strlen(bufOut); } else if (strncmp(tempValue, "\"off\"", 5) == 0){ value = strstr(tempValue, "after"); 802c3b0: 4680 mov r8, r0 valueLen = strpbrk(value, ":"); 802c3b2: f7f5 ffb7 bl 8022324 valueLenEnd = strpbrk(value, ","); 802c3b6: 492e ldr r1, [pc, #184] ; (802c470 ) strcat(bufOut, "Выключение ИБП не удалоÑÑŒ отменить!"); *lenBufOut = strlen(bufOut); } else if (strncmp(tempValue, "\"off\"", 5) == 0){ value = strstr(tempValue, "after"); valueLen = strpbrk(value, ":"); 802c3b8: 4607 mov r7, r0 valueLenEnd = strpbrk(value, ","); 802c3ba: 4640 mov r0, r8 802c3bc: f7f5 ffb2 bl 8022324 memset(tempValue2, 0, 50); 802c3c0: 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, ","); 802c3c2: 4680 mov r8, r0 memset(tempValue2, 0, 50); 802c3c4: 4629 mov r1, r5 802c3c6: a80d add r0, sp, #52 ; 0x34 802c3c8: f7f5 fcea bl 8021da0 strncpy(tempValue2, (valueLen+2), (valueLenEnd - valueLen - 2)); 802c3cc: ebc7 0208 rsb r2, r7, r8 802c3d0: 3a02 subs r2, #2 802c3d2: 1cb9 adds r1, r7, #2 802c3d4: a80d add r0, sp, #52 ; 0x34 802c3d6: f7f5 ff73 bl 80222c0 TimeParam = atoi(tempValue2); 802c3da: a80d add r0, sp, #52 ; 0x34 802c3dc: f7f5 fbc0 bl 8021b60 802c3e0: 4b24 ldr r3, [pc, #144] ; (802c474 ) value = strstr(tempValue, "to"); 802c3e2: 4925 ldr r1, [pc, #148] ; (802c478 ) value = strstr(tempValue, "after"); valueLen = strpbrk(value, ":"); valueLenEnd = strpbrk(value, ","); memset(tempValue2, 0, 50); strncpy(tempValue2, (valueLen+2), (valueLenEnd - valueLen - 2)); TimeParam = atoi(tempValue2); 802c3e4: 8018 strh r0, [r3, #0] value = strstr(tempValue, "to"); 802c3e6: 4668 mov r0, sp 802c3e8: f7f6 f932 bl 8022650 valueLen = strpbrk(value, ":"); 802c3ec: 4919 ldr r1, [pc, #100] ; (802c454 ) 802c3ee: f7f5 ff99 bl 8022324 memset(tempValue2, 0, 50); 802c3f2: 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, ":"); 802c3f4: 4607 mov r7, r0 memset(tempValue2, 0, 50); 802c3f6: 4629 mov r1, r5 802c3f8: a80d add r0, sp, #52 ; 0x34 802c3fa: f7f5 fcd1 bl 8021da0 strncpy(tempValue2, (valueLen+2), (strlen(valueLen) - 2)); 802c3fe: 4638 mov r0, r7 802c400: f7f5 fea6 bl 8022150 802c404: 1cb9 adds r1, r7, #2 802c406: 1e82 subs r2, r0, #2 802c408: a80d add r0, sp, #52 ; 0x34 802c40a: f7f5 ff59 bl 80222c0 TimeParam2 = atoi(tempValue2); 802c40e: a80d add r0, sp, #52 ; 0x34 802c410: f7f5 fba6 bl 8021b60 802c414: 4b19 ldr r3, [pc, #100] ; (802c47c ) 802c416: 8018 strh r0, [r3, #0] res = ups_metac_service_pdu(ups_shutdown_restore); 802c418: 2006 movs r0, #6 802c41a: f7fc ffef bl 80293fc if(res == 1){ 802c41e: b240 sxtb r0, r0 802c420: 2801 cmp r0, #1 strcat(bufOut, "Перезагрузка ИБП!"); 802c422: 4620 mov r0, r4 valueLen = strpbrk(value, ":"); memset(tempValue2, 0, 50); strncpy(tempValue2, (valueLen+2), (strlen(valueLen) - 2)); TimeParam2 = atoi(tempValue2); res = ups_metac_service_pdu(ups_shutdown_restore); if(res == 1){ 802c424: d107 bne.n 802c436 strcat(bufOut, "Перезагрузка ИБП!"); 802c426: 4916 ldr r1, [pc, #88] ; (802c480 ) 802c428: f7f5 fd20 bl 8021e6c log_event_data(LOG_SHUTDOWN_UPS, "ÐдминиÑтратор"); 802c42c: 2007 movs r0, #7 802c42e: 4915 ldr r1, [pc, #84] ; (802c484 ) 802c430: f7fd fd22 bl 8029e78 802c434: e002 b.n 802c43c }else strcat(bufOut, "Отмена перезагрузки ИБП!"); 802c436: 4914 ldr r1, [pc, #80] ; (802c488 ) 802c438: f7f5 fd18 bl 8021e6c *lenBufOut = strlen(bufOut); 802c43c: 4620 mov r0, r4 802c43e: f7f5 fe87 bl 8022150 802c442: 8030 strh r0, [r6, #0] } } 802c444: b01a add sp, #104 ; 0x68 802c446: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802c44a: bf00 nop 802c44c: 08043633 .word 0x08043633 802c450: 08042422 .word 0x08042422 802c454: 08043e25 .word 0x08043e25 802c458: 08042534 .word 0x08042534 802c45c: 0804244d .word 0x0804244d 802c460: 0804253d .word 0x0804253d 802c464: 0804256b .word 0x0804256b 802c468: 080425ad .word 0x080425ad 802c46c: 080425b3 .word 0x080425b3 802c470: 08038b67 .word 0x08038b67 802c474: 20000b54 .word 0x20000b54 802c478: 080425b9 .word 0x080425b9 802c47c: 20000b1a .word 0x20000b1a 802c480: 080425bc .word 0x080425bc 802c484: 08038a86 .word 0x08038a86 802c488: 080425dd .word 0x080425dd 0802c48c : /** * @brief Проверка Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÑ…Ð¾Ð´Ð° в режим bootloader * @retval None */ void HTTP_ConfirmBootPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c48c: b500 push {lr} 802c48e: b093 sub sp, #76 ; 0x4c 802c490: 4601 mov r1, r0 char tempStr[50]; strncpy(tempStr, bufIn, 50); 802c492: 2232 movs r2, #50 ; 0x32 802c494: a805 add r0, sp, #20 802c496: f7f5 ff13 bl 80222c0 char value[20]; uint8_t valueLen; memset(value, 0, 20); 802c49a: 4668 mov r0, sp 802c49c: 2100 movs r1, #0 802c49e: 2214 movs r2, #20 802c4a0: f7f5 fc7e bl 8021da0 //if (strcmp(BOOTLOADER_PASWORD, value) == 0) { // *bufOut = '1'; /* ЗапуÑкаем задачу отложенной перезагрузки. Контроллер должен уÑпеть отправить ответ Ñерверу о ÑтатуÑе Ð¿Ð°Ñ€Ð¾Ð»Ñ */ HTTP_StartResetTask(true); 802c4a4: 2001 movs r0, #1 802c4a6: f001 fe4d bl 802e144 /* else *bufOut = '0';*/ //*lenBufOut = 1; } } 802c4aa: b013 add sp, #76 ; 0x4c 802c4ac: bd00 pop {pc} 802c4ae: 0000 movs r0, r0 0802c4b0 : /* Wrong login or pass, return */ return SEND_REQUIRED_NO; } void HTTP_LOGIN(char *bufOut, uint16_t *lenBufOut) { 802c4b0: b530 push {r4, r5, lr} 802c4b2: b093 sub sp, #76 ; 0x4c 802c4b4: 4604 mov r4, r0 802c4b6: 460d mov r5, r1 char tempStr[50]; uint8_t valueLen; char WebLogin[MAX_WEB_LOGIN_LEN]; GetUserLogin(ADMIN, WebLogin, &valueLen); 802c4b8: 2000 movs r0, #0 802c4ba: a902 add r1, sp, #8 802c4bc: f10d 0207 add.w r2, sp, #7 802c4c0: f7fb fe18 bl 80280f4 memset(tempStr, 0, 50); 802c4c4: 2100 movs r1, #0 802c4c6: 2232 movs r2, #50 ; 0x32 802c4c8: a805 add r0, sp, #20 802c4ca: f7f5 fc69 bl 8021da0 /* TODO replace global flag with user-pass-cookie */ Authenticated = true; 802c4ce: 4b1a ldr r3, [pc, #104] ; (802c538 ) 802c4d0: 2201 movs r2, #1 802c4d2: 701a strb r2, [r3, #0] /* Generate cookie */ sprintf(tempStr, "%X", (unsigned int)GetRandomNumber()); 802c4d4: f7f9 ff9c bl 8026410 802c4d8: 4918 ldr r1, [pc, #96] ; (802c53c ) 802c4da: 4602 mov r2, r0 802c4dc: a805 add r0, sp, #20 802c4de: f7fb fb1f bl 8027b20 /** * @brief УÑтановка Cookie Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802c4e2: a905 add r1, sp, #20 802c4e4: 4816 ldr r0, [pc, #88] ; (802c540 ) 802c4e6: f7f5 fdd5 bl 8022094 HTTP_SetUserCookie(tempStr, ADMIN); HTTP_UpdateUserLoginTime(ADMIN); /* Send login and cookie back */ strcpy(bufOut, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\nSet-Cookie: uname="); 802c4ea: 4916 ldr r1, [pc, #88] ; (802c544 ) 802c4ec: 4620 mov r0, r4 802c4ee: f7f5 fdd1 bl 8022094 strcat(bufOut, WebLogin); 802c4f2: a902 add r1, sp, #8 802c4f4: 4620 mov r0, r4 802c4f6: f7f5 fcb9 bl 8021e6c strcat(bufOut, "\r\nSet-Cookie: id="); 802c4fa: 4913 ldr r1, [pc, #76] ; (802c548 ) 802c4fc: 4620 mov r0, r4 802c4fe: f7f5 fcb5 bl 8021e6c strcat(bufOut, tempStr); 802c502: a905 add r1, sp, #20 802c504: 4620 mov r0, r4 802c506: f7f5 fcb1 bl 8021e6c strcat(bufOut, "\r\nSet-Cookie: role=0"); 802c50a: 4910 ldr r1, [pc, #64] ; (802c54c ) 802c50c: 4620 mov r0, r4 802c50e: f7f5 fcad bl 8021e6c strcat(bufOut, "\r\nSet-Cookie: auth=0"); 802c512: 490f ldr r1, [pc, #60] ; (802c550 ) 802c514: 4620 mov r0, r4 802c516: f7f5 fca9 bl 8021e6c strcat(bufOut, "\r\n\r\n"); 802c51a: 490e ldr r1, [pc, #56] ; (802c554 ) 802c51c: 4620 mov r0, r4 802c51e: f7f5 fca5 bl 8021e6c strcat(bufOut,"\r\n\r\n"); 802c522: 490d ldr r1, [pc, #52] ; (802c558 ) 802c524: 4620 mov r0, r4 802c526: f7f5 fca1 bl 8021e6c *lenBufOut = strlen(bufOut); 802c52a: 4620 mov r0, r4 802c52c: f7f5 fe10 bl 8022150 802c530: 8028 strh r0, [r5, #0] } 802c532: b013 add sp, #76 ; 0x4c 802c534: bd30 pop {r4, r5, pc} 802c536: bf00 nop 802c538: 20000d27 .word 0x20000d27 802c53c: 0804241d .word 0x0804241d 802c540: 2000e22c .word 0x2000e22c 802c544: 0804260b .word 0x0804260b 802c548: 08042647 .word 0x08042647 802c54c: 08042659 .word 0x08042659 802c550: 0804266e .word 0x0804266e 802c554: 08042b48 .word 0x08042b48 802c558: 08042683 .word 0x08042683 0802c55c : /** * @brief * @retval None */ uint8_t GetParamValue(char *inStr, char *paramName, char *paramValue, uint8_t *paramLen) { 802c55c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802c560: 4690 mov r8, r2 802c562: 461f mov r7, r3 char *beginValue = 0; char *endValue = 0; int len = 0; char *strPtr = 0; strPtr = strstr(inStr, paramName); 802c564: f7f6 f874 bl 8022650 if (strPtr != 0) 802c568: 4605 mov r5, r0 802c56a: b1e0 cbz r0, 802c5a6 { beginValue = strpbrk(strPtr,"="); 802c56c: 490f ldr r1, [pc, #60] ; (802c5ac ) 802c56e: f7f5 fed9 bl 8022324 endValue = strpbrk(strPtr,"&"); 802c572: 490f ldr r1, [pc, #60] ; (802c5b0 ) strPtr = strstr(inStr, paramName); if (strPtr != 0) { beginValue = strpbrk(strPtr,"="); 802c574: 4606 mov r6, r0 endValue = strpbrk(strPtr,"&"); 802c576: 4628 mov r0, r5 802c578: f7f5 fed4 bl 8022324 if (endValue == 0) 802c57c: 4604 mov r4, r0 802c57e: b920 cbnz r0, 802c58a endValue = strpbrk(strPtr," "); 802c580: 4628 mov r0, r5 802c582: 490c ldr r1, [pc, #48] ; (802c5b4 ) 802c584: f7f5 fece bl 8022324 802c588: 4604 mov r4, r0 len = endValue - beginValue - 1; 802c58a: 1ba5 subs r5, r4, r6 802c58c: 3d01 subs r5, #1 strncpy(paramValue, beginValue + 1, len); 802c58e: 4640 mov r0, r8 802c590: 1c71 adds r1, r6, #1 802c592: 462a mov r2, r5 802c594: f7f5 fe94 bl 80222c0 *endValue = '0'; 802c598: 2330 movs r3, #48 ; 0x30 802c59a: 7023 strb r3, [r4, #0] *beginValue = '0'; *paramLen = len; return 1; 802c59c: 2001 movs r0, #1 if (endValue == 0) endValue = strpbrk(strPtr," "); len = endValue - beginValue - 1; strncpy(paramValue, beginValue + 1, len); *endValue = '0'; *beginValue = '0'; 802c59e: 7033 strb r3, [r6, #0] *paramLen = len; 802c5a0: 703d strb r5, [r7, #0] return 1; 802c5a2: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} } else { *paramLen = 0; 802c5a6: 7038 strb r0, [r7, #0] return 0; } } 802c5a8: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802c5ac: 080427f9 .word 0x080427f9 802c5b0: 080426ef .word 0x080426ef 802c5b4: 08038ac0 .word 0x08038ac0 0802c5b8 : /** * @brief Проверка Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ð° в Web * @retval None */ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c5b8: b5f0 push {r4, r5, r6, r7, lr} 802c5ba: b0a9 sub sp, #164 ; 0xa4 802c5bc: 4605 mov r5, r0 char *strPtr = 0; char WebPassword[MAX_WEB_PASSWD_LEN]; char WebLogin[MAX_WEB_LOGIN_LEN]; char buf[40]; memset(login, 0, 20); 802c5be: 2214 movs r2, #20 /** * @brief Проверка Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ð° в Web * @retval None */ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c5c0: 460c mov r4, r1 char *strPtr = 0; char WebPassword[MAX_WEB_PASSWD_LEN]; char WebLogin[MAX_WEB_LOGIN_LEN]; char buf[40]; memset(login, 0, 20); 802c5c2: a807 add r0, sp, #28 802c5c4: 2100 movs r1, #0 /** * @brief Проверка Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ð° в Web * @retval None */ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c5c6: 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); 802c5c8: f7f5 fbea bl 8021da0 memset(password, 0, 20); 802c5cc: 2100 movs r1, #0 802c5ce: 2214 movs r2, #20 802c5d0: a80c add r0, sp, #48 ; 0x30 802c5d2: f7f5 fbe5 bl 8021da0 memset(tempStr, 0, 50); 802c5d6: 2100 movs r1, #0 802c5d8: 2232 movs r2, #50 ; 0x32 802c5da: a81b add r0, sp, #108 ; 0x6c 802c5dc: f7f5 fbe0 bl 8021da0 /* Get first 50 bytes of string */ strncpy(tempStr, bufIn, 49); 802c5e0: 2231 movs r2, #49 ; 0x31 802c5e2: 4629 mov r1, r5 802c5e4: a81b add r0, sp, #108 ; 0x6c 802c5e6: f7f5 fe6b bl 80222c0 /* Add " " to the string in order GetParamValue() can be able to parse the param */ strcat(tempStr, " "); if (GetParamValue(tempStr, "login=", login, &valueLen) && 802c5ea: 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, " "); 802c5ee: 4940 ldr r1, [pc, #256] ; (802c6f0 ) 802c5f0: a81b add r0, sp, #108 ; 0x6c 802c5f2: f7f5 fc3b bl 8021e6c if (GetParamValue(tempStr, "login=", login, &valueLen) && 802c5f6: a81b add r0, sp, #108 ; 0x6c 802c5f8: 493e ldr r1, [pc, #248] ; (802c6f4 ) 802c5fa: aa07 add r2, sp, #28 802c5fc: 4633 mov r3, r6 802c5fe: f7ff ffad bl 802c55c 802c602: b920 cbnz r0, 802c60e } } /* No valid login and pass found */ /* TODO replace global flag with user-pass-cookie*/ Authenticated = false; 802c604: 4b3c ldr r3, [pc, #240] ; (802c6f8 ) 802c606: 2200 movs r2, #0 802c608: 701a strb r2, [r3, #0] /* Wrong login or pass, return */ return SEND_REQUIRED_NO; 802c60a: 2001 movs r0, #1 802c60c: e06d b.n 802c6ea /* 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)) 802c60e: a81b add r0, sp, #108 ; 0x6c 802c610: 493a ldr r1, [pc, #232] ; (802c6fc ) 802c612: aa0c add r2, sp, #48 ; 0x30 802c614: 4633 mov r3, r6 802c616: f7ff ffa1 bl 802c55c 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) && 802c61a: 2800 cmp r0, #0 802c61c: d0f2 beq.n 802c604 802c61e: 2500 movs r5, #0 GetParamValue(tempStr, "password=", password, &valueLen)) { for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { GetUserLogin(user_id, WebLogin, &valueLen); 802c620: 4628 mov r0, r5 802c622: a904 add r1, sp, #16 802c624: 4632 mov r2, r6 802c626: f7fb fd65 bl 80280f4 GetUserPassword(user_id, WebPassword, &valueLen); 802c62a: 4628 mov r0, r5 802c62c: a901 add r1, sp, #4 802c62e: 4632 mov r2, r6 802c630: f7fb fd76 bl 8028120 /* Check login and password */ if ((strncmp(WebLogin, login, MAX_WEB_LOGIN_LEN) == 0) && 802c634: a804 add r0, sp, #16 802c636: a907 add r1, sp, #28 802c638: 220b movs r2, #11 802c63a: f7f5 fdeb bl 8022214 802c63e: 2800 cmp r0, #0 802c640: d14e bne.n 802c6e0 (strncmp(WebPassword, password, MAX_WEB_PASSWD_LEN) == 0)) { 802c642: a801 add r0, sp, #4 802c644: a90c add r1, sp, #48 ; 0x30 802c646: 220b movs r2, #11 802c648: f7f5 fde4 bl 8022214 GetUserLogin(user_id, WebLogin, &valueLen); GetUserPassword(user_id, WebPassword, &valueLen); /* Check login and password */ if ((strncmp(WebLogin, login, MAX_WEB_LOGIN_LEN) == 0) && 802c64c: 2800 cmp r0, #0 802c64e: d147 bne.n 802c6e0 if (user_id >= 1) { } /* TODO replace global flag with user-pass-cookie */ Authenticated = true; 802c650: 4b29 ldr r3, [pc, #164] ; (802c6f8 ) 802c652: 2201 movs r2, #1 802c654: 701a strb r2, [r3, #0] /* Generate cookie */ sprintf(tempStr, "%X", (unsigned int)GetRandomNumber()); 802c656: f7f9 fedb bl 8026410 802c65a: 4929 ldr r1, [pc, #164] ; (802c700 ) 802c65c: 4602 mov r2, r0 802c65e: a81b add r0, sp, #108 ; 0x6c 802c660: f7fb fa5e bl 8027b20 /** * @brief УÑтановка Cookie Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802c664: 4b27 ldr r3, [pc, #156] ; (802c704 ) 802c666: 2014 movs r0, #20 802c668: fb00 3005 mla r0, r0, r5, r3 802c66c: a91b add r1, sp, #108 ; 0x6c 802c66e: f7f5 fd11 bl 8022094 HTTP_SetUserCookie(tempStr, user_id); HTTP_UpdateUserLoginTime(user_id); /* Send login and cookie back */ strcpy(bufOut, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\nSet-Cookie: uname="); 802c672: 4925 ldr r1, [pc, #148] ; (802c708 ) 802c674: 4620 mov r0, r4 802c676: f7f5 fd0d bl 8022094 strcat(bufOut, WebLogin); 802c67a: a904 add r1, sp, #16 802c67c: 4620 mov r0, r4 802c67e: f7f5 fbf5 bl 8021e6c strcat(bufOut, "\r\nSet-Cookie: id="); 802c682: 4922 ldr r1, [pc, #136] ; (802c70c ) 802c684: 4620 mov r0, r4 802c686: f7f5 fbf1 bl 8021e6c strcat(bufOut, tempStr); 802c68a: a91b add r1, sp, #108 ; 0x6c 802c68c: 4620 mov r0, r4 802c68e: f7f5 fbed bl 8021e6c sprintf(tempStr, "%d", user_id); 802c692: 462a mov r2, r5 802c694: 491e ldr r1, [pc, #120] ; (802c710 ) 802c696: a81b add r0, sp, #108 ; 0x6c 802c698: f7fb fa42 bl 8027b20 strcat(bufOut, "\r\nSet-Cookie: role="); 802c69c: 491d ldr r1, [pc, #116] ; (802c714 ) 802c69e: 4620 mov r0, r4 802c6a0: f7f5 fbe4 bl 8021e6c strcat(bufOut, tempStr); 802c6a4: a91b add r1, sp, #108 ; 0x6c 802c6a6: 4620 mov r0, r4 802c6a8: f7f5 fbe0 bl 8021e6c strcat(bufOut, "\r\n\r\n"); 802c6ac: 491a ldr r1, [pc, #104] ; (802c718 ) 802c6ae: 4620 mov r0, r4 802c6b0: f7f5 fbdc bl 8021e6c strcat(bufOut,"\r\n\r\n"); 802c6b4: 4919 ldr r1, [pc, #100] ; (802c71c ) 802c6b6: 4620 mov r0, r4 802c6b8: f7f5 fbd8 bl 8021e6c *lenBufOut = strlen(bufOut); 802c6bc: 4620 mov r0, r4 802c6be: f7f5 fd47 bl 8022150 switch (user_id) { case 0: snprintf(buf, sizeof(buf), "ÐдминиÑтратор"); break; case 1: snprintf(buf, sizeof(buf), "Пользователь"); 802c6c2: 2128 movs r1, #40 ; 0x28 strcat(bufOut, "\r\n\r\n"); strcat(bufOut,"\r\n\r\n"); *lenBufOut = strlen(bufOut); switch (user_id) { 802c6c4: 2d01 cmp r5, #1 case 0: snprintf(buf, sizeof(buf), "ÐдминиÑтратор"); 802c6c6: bf14 ite ne 802c6c8: 4a15 ldrne r2, [pc, #84] ; (802c720 ) break; case 1: snprintf(buf, sizeof(buf), "Пользователь"); 802c6ca: 4a16 ldreq r2, [pc, #88] ; (802c724 ) strcat(bufOut, "\r\nSet-Cookie: role="); strcat(bufOut, tempStr); strcat(bufOut, "\r\n\r\n"); strcat(bufOut,"\r\n\r\n"); *lenBufOut = strlen(bufOut); 802c6cc: 8038 strh r0, [r7, #0] switch (user_id) { case 0: snprintf(buf, sizeof(buf), "ÐдминиÑтратор"); break; case 1: snprintf(buf, sizeof(buf), "Пользователь"); 802c6ce: a811 add r0, sp, #68 ; 0x44 802c6d0: f7fb fa08 bl 8027ae4 default: snprintf(buf, sizeof(buf), "", login); break; } log_event_data(LOG_LOGIN, buf); 802c6d4: 2005 movs r0, #5 802c6d6: a911 add r1, sp, #68 ; 0x44 802c6d8: f7fd fbce bl 8029e78 /* ЗапуÑкаем задачу-таймер логаута. */ /* TODO отправить ответ Ñерверу о ÑтатуÑе Ð¿Ð°Ñ€Ð¾Ð»Ñ */ return SEND_REQUIRED_YES; 802c6dc: 2000 movs r0, #0 802c6de: e004 b.n 802c6ea strcat(tempStr, " "); if (GetParamValue(tempStr, "login=", login, &valueLen) && GetParamValue(tempStr, "password=", password, &valueLen)) { for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { 802c6e0: 3501 adds r5, #1 802c6e2: b2ed uxtb r5, r5 802c6e4: 2d02 cmp r5, #2 802c6e6: d08d beq.n 802c604 802c6e8: e79a b.n 802c620 /* TODO replace global flag with user-pass-cookie*/ Authenticated = false; /* Wrong login or pass, return */ return SEND_REQUIRED_NO; } 802c6ea: b029 add sp, #164 ; 0xa4 802c6ec: bdf0 pop {r4, r5, r6, r7, pc} 802c6ee: bf00 nop 802c6f0: 08038ac0 .word 0x08038ac0 802c6f4: 080426f1 .word 0x080426f1 802c6f8: 20000d27 .word 0x20000d27 802c6fc: 080426f8 .word 0x080426f8 802c700: 0804241d .word 0x0804241d 802c704: 2000e22c .word 0x2000e22c 802c708: 0804260b .word 0x0804260b 802c70c: 08042647 .word 0x08042647 802c710: 08038967 .word 0x08038967 802c714: 08042702 .word 0x08042702 802c718: 08042b48 .word 0x08042b48 802c71c: 08042683 .word 0x08042683 802c720: 08038a86 .word 0x08038a86 802c724: 08042716 .word 0x08042716 0802c728 : /** * @brief * @retval None */ void HTTP_SetInfo(char *buf, uint16_t lenBuf) { 802c728: b530 push {r4, r5, lr} uint8_t valueLen = 0; 802c72a: 2400 movs r4, #0 /** * @brief * @retval None */ void HTTP_SetInfo(char *buf, uint16_t lenBuf) { 802c72c: b0bb sub sp, #236 ; 0xec 802c72e: 4605 mov r5, r0 char value[110]; char str[110]; // ClearParamString(buf); memset(value, 0, len); 802c730: 4621 mov r1, r4 802c732: 226e movs r2, #110 ; 0x6e 802c734: a802 add r0, sp, #8 * @brief * @retval None */ void HTTP_SetInfo(char *buf, uint16_t lenBuf) { uint8_t valueLen = 0; 802c736: f88d 4007 strb.w r4, [sp, #7] char value[110]; char str[110]; // ClearParamString(buf); memset(value, 0, len); 802c73a: f7f5 fb31 bl 8021da0 /* Владелец */ GetParamValue(buf, "owner=", value, &valueLen); 802c73e: f10d 0307 add.w r3, sp, #7 802c742: aa02 add r2, sp, #8 802c744: 4628 mov r0, r5 802c746: 491e ldr r1, [pc, #120] ; (802c7c0 ) 802c748: f7ff ff08 bl 802c55c url_decode(str, sizeof(str), value); 802c74c: 216e movs r1, #110 ; 0x6e 802c74e: aa02 add r2, sp, #8 802c750: a81e add r0, sp, #120 ; 0x78 802c752: f7fc ff11 bl 8029578 SetOwner(str); 802c756: a81e add r0, sp, #120 ; 0x78 802c758: f7fb fed0 bl 80284fc memset(value, 0, len); 802c75c: 4621 mov r1, r4 802c75e: 226e movs r2, #110 ; 0x6e 802c760: a802 add r0, sp, #8 802c762: f7f5 fb1d bl 8021da0 /* Владелец */ GetParamValue(buf, "sysLocation=", value, &valueLen); 802c766: f10d 0307 add.w r3, sp, #7 802c76a: aa02 add r2, sp, #8 802c76c: 4628 mov r0, r5 802c76e: 4915 ldr r1, [pc, #84] ; (802c7c4 ) 802c770: f7ff fef4 bl 802c55c url_decode(str, sizeof(str), value); 802c774: 216e movs r1, #110 ; 0x6e 802c776: aa02 add r2, sp, #8 802c778: a81e add r0, sp, #120 ; 0x78 802c77a: f7fc fefd bl 8029578 SetLocation(str); 802c77e: a81e add r0, sp, #120 ; 0x78 802c780: f7fb fecc bl 802851c memset(value, 0, len); 802c784: 4621 mov r1, r4 802c786: 226e movs r2, #110 ; 0x6e 802c788: a802 add r0, sp, #8 802c78a: f7f5 fb09 bl 8021da0 /* Комментарий */ GetParamValue(buf, "comment=", value, &valueLen); 802c78e: f10d 0307 add.w r3, sp, #7 802c792: aa02 add r2, sp, #8 802c794: 4628 mov r0, r5 802c796: 490c ldr r1, [pc, #48] ; (802c7c8 ) 802c798: f7ff fee0 bl 802c55c url_decode(str, sizeof(str), value); 802c79c: 216e movs r1, #110 ; 0x6e 802c79e: aa02 add r2, sp, #8 802c7a0: a81e add r0, sp, #120 ; 0x78 802c7a2: f7fc fee9 bl 8029578 SetComment(str); 802c7a6: a81e add r0, sp, #120 ; 0x78 802c7a8: f7fb fec6 bl 8028538 memset(value, 0, len); 802c7ac: 4621 mov r1, r4 802c7ae: 226e movs r2, #110 ; 0x6e 802c7b0: a802 add r0, sp, #8 802c7b2: f7f5 faf5 bl 8021da0 HTTP_SaveSettings(); 802c7b6: f001 fc8f bl 802e0d8 } 802c7ba: b03b add sp, #236 ; 0xec 802c7bc: bd30 pop {r4, r5, pc} 802c7be: bf00 nop 802c7c0: 0804272f .word 0x0804272f 802c7c4: 08042736 .word 0x08042736 802c7c8: 08042743 .word 0x08042743 0802c7cc : /** * @brief * @retval None */ void HTTP_SetSettings(char *buf, uint16_t lenBuf) { 802c7cc: b530 push {r4, r5, lr} uint8_t valueLen = 0; 802c7ce: 2500 movs r5, #0 /** * @brief * @retval None */ void HTTP_SetSettings(char *buf, uint16_t lenBuf) { 802c7d0: b0a3 sub sp, #140 ; 0x8c 802c7d2: 4604 mov r4, r0 //printf(buf); //ClearParamString(buf); memset(value, 0, len); 802c7d4: 2240 movs r2, #64 ; 0x40 802c7d6: 4629 mov r1, r5 802c7d8: a802 add r0, sp, #8 * @brief * @retval None */ void HTTP_SetSettings(char *buf, uint16_t lenBuf) { uint8_t valueLen = 0; 802c7da: f88d 5007 strb.w r5, [sp, #7] //printf(buf); //ClearParamString(buf); memset(value, 0, len); 802c7de: f7f5 fadf bl 8021da0 memset(str, 0, MAX_WEB_PARAM_LEN); 802c7e2: 2240 movs r2, #64 ; 0x40 802c7e4: 4629 mov r1, r5 802c7e6: a812 add r0, sp, #72 ; 0x48 802c7e8: f7f5 fada bl 8021da0 /* SNMP */ GetParamValue(buf, "read_community=", value, &valueLen); 802c7ec: f10d 0307 add.w r3, sp, #7 802c7f0: 49b6 ldr r1, [pc, #728] ; (802cacc ) 802c7f2: aa02 add r2, sp, #8 802c7f4: 4620 mov r0, r4 802c7f6: f7ff feb1 bl 802c55c SetReadCommunity(value); 802c7fa: a802 add r0, sp, #8 802c7fc: f7fb fe2c bl 8028458 memset(value, 0, len); 802c800: 2240 movs r2, #64 ; 0x40 802c802: 4629 mov r1, r5 802c804: a802 add r0, sp, #8 802c806: f7f5 facb bl 8021da0 GetParamValue(buf, "write_community=", value, &valueLen); 802c80a: f10d 0307 add.w r3, sp, #7 802c80e: 49b0 ldr r1, [pc, #704] ; (802cad0 ) 802c810: aa02 add r2, sp, #8 802c812: 4620 mov r0, r4 802c814: f7ff fea2 bl 802c55c SetWriteCommunity(value); 802c818: a802 add r0, sp, #8 802c81a: f7fb fe23 bl 8028464 memset(value, 0, len); 802c81e: 2240 movs r2, #64 ; 0x40 802c820: 4629 mov r1, r5 802c822: a802 add r0, sp, #8 802c824: f7f5 fabc bl 8021da0 GetParamValue(buf, "managerIP=", value, &valueLen); 802c828: f10d 0307 add.w r3, sp, #7 802c82c: 49a9 ldr r1, [pc, #676] ; (802cad4 ) 802c82e: aa02 add r2, sp, #8 802c830: 4620 mov r0, r4 802c832: f7ff fe93 bl 802c55c SetManagerIp(value); 802c836: a802 add r0, sp, #8 802c838: f7fb fe1a bl 8028470 memset(value, 0, len); 802c83c: 2240 movs r2, #64 ; 0x40 802c83e: 4629 mov r1, r5 802c840: a802 add r0, sp, #8 802c842: f7f5 faad bl 8021da0 GetParamValue(buf, "managerIP2=", value, &valueLen); 802c846: f10d 0307 add.w r3, sp, #7 802c84a: 49a3 ldr r1, [pc, #652] ; (802cad8 ) 802c84c: aa02 add r2, sp, #8 802c84e: 4620 mov r0, r4 802c850: f7ff fe84 bl 802c55c SetManagerIp2(value); 802c854: a802 add r0, sp, #8 802c856: f7fb fe19 bl 802848c memset(value, 0, len); 802c85a: 2240 movs r2, #64 ; 0x40 802c85c: 4629 mov r1, r5 802c85e: a802 add r0, sp, #8 802c860: f7f5 fa9e bl 8021da0 GetParamValue(buf, "managerIP3=", value, &valueLen); 802c864: f10d 0307 add.w r3, sp, #7 802c868: 499c ldr r1, [pc, #624] ; (802cadc ) 802c86a: aa02 add r2, sp, #8 802c86c: 4620 mov r0, r4 802c86e: f7ff fe75 bl 802c55c SetManagerIp3(value); 802c872: a802 add r0, sp, #8 802c874: f7fb fe18 bl 80284a8 memset(value, 0, len); 802c878: 2240 movs r2, #64 ; 0x40 802c87a: 4629 mov r1, r5 802c87c: a802 add r0, sp, #8 802c87e: f7f5 fa8f bl 8021da0 GetParamValue(buf, "managerIP4=", value, &valueLen); 802c882: f10d 0307 add.w r3, sp, #7 802c886: 4996 ldr r1, [pc, #600] ; (802cae0 ) 802c888: aa02 add r2, sp, #8 802c88a: 4620 mov r0, r4 802c88c: f7ff fe66 bl 802c55c SetManagerIp4(value); 802c890: a802 add r0, sp, #8 802c892: f7fb fe17 bl 80284c4 memset(value, 0, len); 802c896: 2240 movs r2, #64 ; 0x40 802c898: 4629 mov r1, r5 802c89a: a802 add r0, sp, #8 802c89c: f7f5 fa80 bl 8021da0 GetParamValue(buf, "managerIP5=", value, &valueLen); 802c8a0: f10d 0307 add.w r3, sp, #7 802c8a4: 498f ldr r1, [pc, #572] ; (802cae4 ) 802c8a6: aa02 add r2, sp, #8 802c8a8: 4620 mov r0, r4 802c8aa: f7ff fe57 bl 802c55c SetManagerIp5(value); 802c8ae: a802 add r0, sp, #8 802c8b0: f7fb fe16 bl 80284e0 memset(value, 0, len); 802c8b4: 2240 movs r2, #64 ; 0x40 802c8b6: 4629 mov r1, r5 802c8b8: a802 add r0, sp, #8 802c8ba: f7f5 fa71 bl 8021da0 /* Сетевые параметры */ GetParamValue(buf, "dhcp=", value, &valueLen); 802c8be: 498a ldr r1, [pc, #552] ; (802cae8 ) 802c8c0: aa02 add r2, sp, #8 802c8c2: f10d 0307 add.w r3, sp, #7 802c8c6: 4620 mov r0, r4 802c8c8: f7ff fe48 bl 802c55c SetDhcpStateStr(value); 802c8cc: a802 add r0, sp, #8 802c8ce: f7fb fdb1 bl 8028434 if (strncmp(value, "on", 2) != 0) // ЕÑли dhcp off уÑтанавливаем параметры 802c8d2: a802 add r0, sp, #8 802c8d4: 4985 ldr r1, [pc, #532] ; (802caec ) 802c8d6: 2202 movs r2, #2 802c8d8: f7f5 fc9c bl 8022214 802c8dc: 2800 cmp r0, #0 802c8de: d031 beq.n 802c944 { memset(value, 0, len); 802c8e0: 4629 mov r1, r5 802c8e2: 2240 movs r2, #64 ; 0x40 802c8e4: a802 add r0, sp, #8 802c8e6: f7f5 fa5b bl 8021da0 GetParamValue(buf, "ipaddr=", value, &valueLen); 802c8ea: f10d 0307 add.w r3, sp, #7 802c8ee: 4980 ldr r1, [pc, #512] ; (802caf0 ) 802c8f0: aa02 add r2, sp, #8 802c8f2: 4620 mov r0, r4 802c8f4: f7ff fe32 bl 802c55c SetIPStr(value); 802c8f8: a802 add r0, sp, #8 802c8fa: f7fb fd89 bl 8028410 memset(value, 0, len); 802c8fe: 4629 mov r1, r5 802c900: 2240 movs r2, #64 ; 0x40 802c902: a802 add r0, sp, #8 802c904: f7f5 fa4c bl 8021da0 GetParamValue(buf, "gw=", value, &valueLen); 802c908: f10d 0307 add.w r3, sp, #7 802c90c: 4979 ldr r1, [pc, #484] ; (802caf4 ) 802c90e: aa02 add r2, sp, #8 802c910: 4620 mov r0, r4 802c912: f7ff fe23 bl 802c55c SetGatewayStr(value); 802c916: a802 add r0, sp, #8 802c918: f7fb fd80 bl 802841c memset(value, 0, len); 802c91c: 4629 mov r1, r5 802c91e: 2240 movs r2, #64 ; 0x40 802c920: a802 add r0, sp, #8 802c922: f7f5 fa3d bl 8021da0 GetParamValue(buf, "mask=", value, &valueLen); 802c926: 4974 ldr r1, [pc, #464] ; (802caf8 ) 802c928: aa02 add r2, sp, #8 802c92a: f10d 0307 add.w r3, sp, #7 802c92e: 4620 mov r0, r4 802c930: f7ff fe14 bl 802c55c SetMaskStr(value); 802c934: a802 add r0, sp, #8 802c936: f7fb fd77 bl 8028428 memset(value, 0, len); 802c93a: a802 add r0, sp, #8 802c93c: 4629 mov r1, r5 802c93e: 2240 movs r2, #64 ; 0x40 802c940: f7f5 fa2e bl 8021da0 } memset(value, 0, len); 802c944: 2100 movs r1, #0 802c946: 2240 movs r2, #64 ; 0x40 802c948: a802 add r0, sp, #8 802c94a: f7f5 fa29 bl 8021da0 GetParamValue(&buf[555], "auth=", value, &valueLen); 802c94e: 496b ldr r1, [pc, #428] ; (802cafc ) 802c950: aa02 add r2, sp, #8 802c952: f10d 0307 add.w r3, sp, #7 802c956: f204 202b addw r0, r4, #555 ; 0x22b 802c95a: f7ff fdff bl 802c55c SetAuthEnableStateStr(value); 802c95e: a802 add r0, sp, #8 802c960: f7fb fe22 bl 80285a8 if (strncmp(value, "on", 2) == 0){ 802c964: 4961 ldr r1, [pc, #388] ; (802caec ) 802c966: a802 add r0, sp, #8 802c968: 2202 movs r2, #2 802c96a: f7f5 fc53 bl 8022214 802c96e: 4601 mov r1, r0 802c970: 2800 cmp r0, #0 802c972: d156 bne.n 802ca22 /* параметры RADIUS*/ memset(value, 0, len); 802c974: 2240 movs r2, #64 ; 0x40 802c976: a802 add r0, sp, #8 802c978: f7f5 fa12 bl 8021da0 GetParamValue(buf, "rs_enabled=", value, &valueLen); 802c97c: 4960 ldr r1, [pc, #384] ; (802cb00 ) 802c97e: aa02 add r2, sp, #8 802c980: f10d 0307 add.w r3, sp, #7 802c984: 4620 mov r0, r4 802c986: f7ff fde9 bl 802c55c SetRDSEnableStateStr(value); 802c98a: a802 add r0, sp, #8 802c98c: f7fb fdfa bl 8028584 if (strncmp(value, "on", 2) == 0) // ЕÑли raddius off уÑтанавливаем параметры 802c990: a802 add r0, sp, #8 802c992: 4956 ldr r1, [pc, #344] ; (802caec ) 802c994: 2202 movs r2, #2 802c996: f7f5 fc3d bl 8022214 802c99a: 4605 mov r5, r0 802c99c: 2800 cmp r0, #0 802c99e: d140 bne.n 802ca22 { memset(value, 0, len); 802c9a0: 4629 mov r1, r5 802c9a2: 2240 movs r2, #64 ; 0x40 802c9a4: a802 add r0, sp, #8 802c9a6: f7f5 f9fb bl 8021da0 GetParamValue(buf, "rs_server=", value, &valueLen); 802c9aa: f10d 0307 add.w r3, sp, #7 802c9ae: 4955 ldr r1, [pc, #340] ; (802cb04 ) 802c9b0: aa02 add r2, sp, #8 802c9b2: 4620 mov r0, r4 802c9b4: f7ff fdd2 bl 802c55c SetRDSIpStr(value); 802c9b8: a802 add r0, sp, #8 802c9ba: f7fb fdc3 bl 8028544 memset(value, 0, len); 802c9be: 4629 mov r1, r5 802c9c0: 2240 movs r2, #64 ; 0x40 802c9c2: a802 add r0, sp, #8 802c9c4: f7f5 f9ec bl 8021da0 GetParamValue(buf, "rs_port=", value, &valueLen); 802c9c8: f10d 0307 add.w r3, sp, #7 802c9cc: 494e ldr r1, [pc, #312] ; (802cb08 ) 802c9ce: aa02 add r2, sp, #8 802c9d0: 4620 mov r0, r4 802c9d2: f7ff fdc3 bl 802c55c SetRDSPortStr(value); 802c9d6: a802 add r0, sp, #8 802c9d8: f7fb fdba bl 8028550 memset(value, 0, len); 802c9dc: 4629 mov r1, r5 802c9de: 2240 movs r2, #64 ; 0x40 802c9e0: a802 add r0, sp, #8 802c9e2: f7f5 f9dd bl 8021da0 GetParamValue(buf, "rs_pwd=", value, &valueLen); 802c9e6: f10d 0307 add.w r3, sp, #7 802c9ea: 4948 ldr r1, [pc, #288] ; (802cb0c ) 802c9ec: aa02 add r2, sp, #8 802c9ee: 4620 mov r0, r4 802c9f0: f7ff fdb4 bl 802c55c SetRDSPasswordkStr(value); 802c9f4: a802 add r0, sp, #8 802c9f6: f7fb fdbf bl 8028578 memset(value, 0, len); 802c9fa: 4629 mov r1, r5 802c9fc: 2240 movs r2, #64 ; 0x40 802c9fe: a802 add r0, sp, #8 802ca00: f7f5 f9ce bl 8021da0 GetParamValue(buf, "rs_key=", value, &valueLen); 802ca04: 4942 ldr r1, [pc, #264] ; (802cb10 ) 802ca06: aa02 add r2, sp, #8 802ca08: f10d 0307 add.w r3, sp, #7 802ca0c: 4620 mov r0, r4 802ca0e: f7ff fda5 bl 802c55c SetRDSKeyAccesstStr(value); 802ca12: a802 add r0, sp, #8 802ca14: f7fb fda6 bl 8028564 memset(value, 0, len); 802ca18: a802 add r0, sp, #8 802ca1a: 4629 mov r1, r5 802ca1c: 2240 movs r2, #64 ; 0x40 802ca1e: f7f5 f9bf bl 8021da0 } } memset(value, 0, len); 802ca22: 2100 movs r1, #0 802ca24: 2240 movs r2, #64 ; 0x40 802ca26: a802 add r0, sp, #8 802ca28: f7f5 f9ba bl 8021da0 // Параметры реле и Ñухих контактов GetParamValue(buf, "di1=", value, &valueLen); 802ca2c: f10d 0307 add.w r3, sp, #7 802ca30: aa02 add r2, sp, #8 802ca32: 4938 ldr r1, [pc, #224] ; (802cb14 ) 802ca34: 4620 mov r0, r4 802ca36: f7ff fd91 bl 802c55c SetDINTypeActStr(value, 0); 802ca3a: a802 add r0, sp, #8 802ca3c: 2100 movs r1, #0 802ca3e: f7fb fea9 bl 8028794 memset(value, 0, len); 802ca42: 2100 movs r1, #0 802ca44: 2240 movs r2, #64 ; 0x40 802ca46: a802 add r0, sp, #8 802ca48: f7f5 f9aa bl 8021da0 GetParamValue(buf, "ro1=", value, &valueLen); 802ca4c: f10d 0307 add.w r3, sp, #7 802ca50: aa02 add r2, sp, #8 802ca52: 4931 ldr r1, [pc, #196] ; (802cb18 ) 802ca54: 4620 mov r0, r4 802ca56: f7ff fd81 bl 802c55c SetROTypeActStr(value, 0); 802ca5a: a802 add r0, sp, #8 802ca5c: 2100 movs r1, #0 802ca5e: f7fb feb7 bl 80287d0 memset(value, 0, len); 802ca62: 2100 movs r1, #0 802ca64: 2240 movs r2, #64 ; 0x40 802ca66: a802 add r0, sp, #8 802ca68: f7f5 f99a bl 8021da0 GetParamValue(buf, "ro2=", value, &valueLen); 802ca6c: f10d 0307 add.w r3, sp, #7 802ca70: aa02 add r2, sp, #8 802ca72: 492a ldr r1, [pc, #168] ; (802cb1c ) 802ca74: 4620 mov r0, r4 802ca76: f7ff fd71 bl 802c55c SetROTypeActStr(value, 1); 802ca7a: a802 add r0, sp, #8 802ca7c: 2101 movs r1, #1 802ca7e: f7fb fea7 bl 80287d0 memset(value, 0, len); 802ca82: 2100 movs r1, #0 802ca84: 2240 movs r2, #64 ; 0x40 802ca86: a802 add r0, sp, #8 802ca88: f7f5 f98a bl 8021da0 // Параметры даты и времени GetParamValue(buf, "ntp=", value, &valueLen); 802ca8c: 4924 ldr r1, [pc, #144] ; (802cb20 ) 802ca8e: aa02 add r2, sp, #8 802ca90: f10d 0307 add.w r3, sp, #7 802ca94: 4620 mov r0, r4 802ca96: f7ff fd61 bl 802c55c SetSntpStateStr(value); 802ca9a: a802 add r0, sp, #8 802ca9c: f7fb fdfe bl 802869c if (strncmp(value, "1", 1) == 0) // ЕÑли ntp on уÑтанавливаем параметры 802caa0: a802 add r0, sp, #8 802caa2: 4920 ldr r1, [pc, #128] ; (802cb24 ) 802caa4: 2201 movs r2, #1 802caa6: f7f5 fbb5 bl 8022214 802caaa: 4605 mov r5, r0 { memset(value, 0, len); 802caac: a802 add r0, sp, #8 // Параметры даты и времени GetParamValue(buf, "ntp=", value, &valueLen); SetSntpStateStr(value); if (strncmp(value, "1", 1) == 0) // ЕÑли ntp on уÑтанавливаем параметры 802caae: 2d00 cmp r5, #0 802cab0: d140 bne.n 802cb34 { memset(value, 0, len); 802cab2: 4629 mov r1, r5 802cab4: 2240 movs r2, #64 ; 0x40 802cab6: f7f5 f973 bl 8021da0 GetParamValue(buf, "ntpservip=", value, &valueLen); 802caba: 4620 mov r0, r4 802cabc: 491a ldr r1, [pc, #104] ; (802cb28 ) 802cabe: aa02 add r2, sp, #8 802cac0: f10d 0307 add.w r3, sp, #7 802cac4: f7ff fd4a bl 802c55c 802cac8: e030 b.n 802cb2c 802caca: bf00 nop 802cacc: 0804274c .word 0x0804274c 802cad0: 0804275c .word 0x0804275c 802cad4: 0804276d .word 0x0804276d 802cad8: 08042778 .word 0x08042778 802cadc: 08042784 .word 0x08042784 802cae0: 08042790 .word 0x08042790 802cae4: 0804279c .word 0x0804279c 802cae8: 080427a8 .word 0x080427a8 802caec: 080389a9 .word 0x080389a9 802caf0: 080427ae .word 0x080427ae 802caf4: 080427b6 .word 0x080427b6 802caf8: 080427ba .word 0x080427ba 802cafc: 080427c0 .word 0x080427c0 802cb00: 080427c6 .word 0x080427c6 802cb04: 080427d2 .word 0x080427d2 802cb08: 080427dd .word 0x080427dd 802cb0c: 080427e6 .word 0x080427e6 802cb10: 080427ee .word 0x080427ee 802cb14: 080427f6 .word 0x080427f6 802cb18: 080427fb .word 0x080427fb 802cb1c: 08042800 .word 0x08042800 802cb20: 08042805 .word 0x08042805 802cb24: 08038c9e .word 0x08038c9e 802cb28: 0804280a .word 0x0804280a SetSntpServerIpStr(value); 802cb2c: a802 add r0, sp, #8 802cb2e: f7fb fdd5 bl 80286dc 802cb32: e023 b.n 802cb7c memset(value, 0, len); } else if (strncmp(value, "0", 1) == 0){ 802cb34: 4924 ldr r1, [pc, #144] ; (802cbc8 ) 802cb36: 2201 movs r2, #1 802cb38: f7f5 fb6c bl 8022214 802cb3c: 4605 mov r5, r0 802cb3e: bb10 cbnz r0, 802cb86 GetParamValue(buf, "date=", value, &valueLen); 802cb40: f10d 0307 add.w r3, sp, #7 802cb44: 4921 ldr r1, [pc, #132] ; (802cbcc ) 802cb46: aa02 add r2, sp, #8 802cb48: 4620 mov r0, r4 802cb4a: f7ff fd07 bl 802c55c SetDateStr(value); 802cb4e: a802 add r0, sp, #8 802cb50: f7fb fd3c bl 80285cc memset(value, 0, len); 802cb54: 4629 mov r1, r5 802cb56: 2240 movs r2, #64 ; 0x40 802cb58: a802 add r0, sp, #8 802cb5a: f7f5 f921 bl 8021da0 GetParamValue(buf, "time=", value, &valueLen); 802cb5e: 491c ldr r1, [pc, #112] ; (802cbd0 ) 802cb60: aa02 add r2, sp, #8 802cb62: f10d 0307 add.w r3, sp, #7 802cb66: 4620 mov r0, r4 802cb68: f7ff fcf8 bl 802c55c url_decode(str, sizeof(str), value); 802cb6c: a812 add r0, sp, #72 ; 0x48 802cb6e: 2140 movs r1, #64 ; 0x40 802cb70: aa02 add r2, sp, #8 802cb72: f7fc fd01 bl 8029578 SetTimeStr(str); 802cb76: a812 add r0, sp, #72 ; 0x48 802cb78: f7fb fd60 bl 802863c memset(value, 0, len); 802cb7c: a802 add r0, sp, #8 802cb7e: 4629 mov r1, r5 802cb80: 2240 movs r2, #64 ; 0x40 802cb82: f7f5 f90d bl 8021da0 } GetParamValue(buf, "utc=", value, &valueLen); 802cb86: 4913 ldr r1, [pc, #76] ; (802cbd4 ) 802cb88: aa02 add r2, sp, #8 802cb8a: f10d 0307 add.w r3, sp, #7 802cb8e: 4620 mov r0, r4 802cb90: f7ff fce4 bl 802c55c SetSntpTimeZoneStr(value); 802cb94: a802 add r0, sp, #8 802cb96: f7fb fda7 bl 80286e8 memset(value, 0, len); 802cb9a: 2100 movs r1, #0 802cb9c: 2240 movs r2, #64 ; 0x40 802cb9e: a802 add r0, sp, #8 802cba0: f7f5 f8fe bl 8021da0 /* ЕÑли параметры WEB изменилиÑÑŒ выÑтавлÑем флаг, ÑохранÑем наÑтройки и перезагружаемÑÑ */ if (GetStateWebReinit() == true) 802cba4: f00a fb06 bl 80371b4 802cba8: b150 cbz r0, 802cbc0 { SetWebReinitFlag(true); 802cbaa: 2001 movs r0, #1 802cbac: f7fb fc24 bl 80283f8 HTTP_SaveSettings(); 802cbb0: f001 fa92 bl 802e0d8 /* Блокируем управление ключем на тау Ñекунд*/ //IO_KeyBlockOn(); vTaskDelay(1010); 802cbb4: f240 30f2 movw r0, #1010 ; 0x3f2 802cbb8: f7fe fbd4 bl 802b364 Reboot(); 802cbbc: f7fc fc6c bl 8029498 } HTTP_SaveSettings(); 802cbc0: f001 fa8a bl 802e0d8 } 802cbc4: b023 add sp, #140 ; 0x8c 802cbc6: bd30 pop {r4, r5, pc} 802cbc8: 08038a13 .word 0x08038a13 802cbcc: 08042828 .word 0x08042828 802cbd0: 08042815 .word 0x08042815 802cbd4: 0804281b .word 0x0804281b 0802cbd8 : /** * @brief * @retval None */ uint8_t GetCookieValue(char *inStr, char *paramName, char *paramValue, uint8_t *paramLen) { 802cbd8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802cbdc: 4690 mov r8, r2 802cbde: 461f mov r7, r3 char *beginValue = 0; char *endValue = 0; int len = 0; char *strPtr = 0; strPtr = strstr(inStr, paramName); 802cbe0: f7f5 fd36 bl 8022650 if (strPtr != 0) 802cbe4: 4605 mov r5, r0 802cbe6: b1e0 cbz r0, 802cc22 { beginValue = strpbrk(strPtr,"="); 802cbe8: 490f ldr r1, [pc, #60] ; (802cc28 ) 802cbea: f7f5 fb9b bl 8022324 endValue = strpbrk(strPtr,";"); 802cbee: 490f ldr r1, [pc, #60] ; (802cc2c ) strPtr = strstr(inStr, paramName); if (strPtr != 0) { beginValue = strpbrk(strPtr,"="); 802cbf0: 4606 mov r6, r0 endValue = strpbrk(strPtr,";"); 802cbf2: 4628 mov r0, r5 802cbf4: f7f5 fb96 bl 8022324 if (endValue == 0) 802cbf8: 4604 mov r4, r0 802cbfa: b920 cbnz r0, 802cc06 endValue = strpbrk(strPtr,"\n"); 802cbfc: 4628 mov r0, r5 802cbfe: 490c ldr r1, [pc, #48] ; (802cc30 ) 802cc00: f7f5 fb90 bl 8022324 802cc04: 4604 mov r4, r0 len = endValue - beginValue - 1; 802cc06: 1ba5 subs r5, r4, r6 802cc08: 3d01 subs r5, #1 strncpy(paramValue, beginValue + 1, len); 802cc0a: 4640 mov r0, r8 802cc0c: 1c71 adds r1, r6, #1 802cc0e: 462a mov r2, r5 802cc10: f7f5 fb56 bl 80222c0 *endValue = '0'; 802cc14: 2330 movs r3, #48 ; 0x30 802cc16: 7023 strb r3, [r4, #0] *beginValue = '0'; *paramLen = len; return 1; 802cc18: 2001 movs r0, #1 if (endValue == 0) endValue = strpbrk(strPtr,"\n"); len = endValue - beginValue - 1; strncpy(paramValue, beginValue + 1, len); *endValue = '0'; *beginValue = '0'; 802cc1a: 7033 strb r3, [r6, #0] *paramLen = len; 802cc1c: 703d strb r5, [r7, #0] return 1; 802cc1e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} } else { *paramLen = 0; 802cc22: 7038 strb r0, [r7, #0] return 0; } } 802cc24: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802cc28: 080427f9 .word 0x080427f9 802cc2c: 08038b69 .word 0x08038b69 802cc30: 08042b4b .word 0x08042b4b 0802cc34 : } } */ void ClearParamString(char *inBuf) { 802cc34: b510 push {r4, lr} uint16_t len; char *str; str = strstr(inBuf, "HTTP"); 802cc36: 4908 ldr r1, [pc, #32] ; (802cc58 ) } } */ void ClearParamString(char *inBuf) { 802cc38: 4604 mov r4, r0 uint16_t len; char *str; str = strstr(inBuf, "HTTP"); 802cc3a: f7f5 fd09 bl 8022650 if (str != 0) 802cc3e: b148 cbz r0, 802cc54 { len = str - inBuf; 802cc40: 1b02 subs r2, r0, r4 memset(str, 0, RECIVE_BUF_MAX_LEN - len - 1); 802cc42: b292 uxth r2, r2 802cc44: f5c2 62bb rsb r2, r2, #1496 ; 0x5d8 802cc48: 2100 movs r1, #0 802cc4a: 3203 adds r2, #3 } } 802cc4c: 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); 802cc50: f7f5 b8a6 b.w 8021da0 802cc54: bd10 pop {r4, pc} 802cc56: bf00 nop 802cc58: 08042820 .word 0x08042820 0802cc5c : /** * @brief УÑтановка даты производÑтва */ // TODO Убрать заглушку! void HTTP_Prodate(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802cc5c: b5f0 push {r4, r5, r6, r7, lr} uint8_t valueLen = 0; 802cc5e: 2500 movs r5, #0 /** * @brief УÑтановка даты производÑтва */ // TODO Убрать заглушку! void HTTP_Prodate(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802cc60: b087 sub sp, #28 802cc62: 4606 mov r6, r0 802cc64: 460c mov r4, r1 uint8_t valueLen = 0; char value[20]; memset(bufOut, 0, SEND_BUF_MAX_LEN); 802cc66: f44f 62fa mov.w r2, #2000 ; 0x7d0 802cc6a: 4608 mov r0, r1 802cc6c: 4629 mov r1, r5 /** * @brief УÑтановка даты производÑтва */ // TODO Убрать заглушку! void HTTP_Prodate(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802cc6e: 461f mov r7, r3 uint8_t valueLen = 0; 802cc70: f88d 5003 strb.w r5, [sp, #3] char value[20]; memset(bufOut, 0, SEND_BUF_MAX_LEN); 802cc74: f7f5 f894 bl 8021da0 ClearParamString(bufIn); 802cc78: 4630 mov r0, r6 802cc7a: f7ff ffdb bl 802cc34 memset(value, 0, 20); 802cc7e: 4629 mov r1, r5 802cc80: 2214 movs r2, #20 802cc82: a801 add r0, sp, #4 802cc84: f7f5 f88c bl 8021da0 GetParamValue(bufIn, "prodate=", value, &valueLen); 802cc88: aa01 add r2, sp, #4 802cc8a: f10d 0303 add.w r3, sp, #3 802cc8e: 490b ldr r1, [pc, #44] ; (802ccbc ) 802cc90: 4630 mov r0, r6 802cc92: f7ff fc63 bl 802c55c printf(value); printf("\r\n"); */ /* УÑтанавливаем дату производÑтва */ SETTINGS_SetProDate(value, valueLen); 802cc96: f89d 1003 ldrb.w r1, [sp, #3] 802cc9a: a801 add r0, sp, #4 802cc9c: f7fb fffe bl 8028c9c /* УÑтанавливаем дату Ñледующей профилактики +1 год */ RTC_SetProfTime(value); 802cca0: a801 add r0, sp, #4 802cca2: f7f9 fef1 bl 8026a88 /* Пока отправлÑем true */ strcpy(bufOut, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\nTrue"); 802cca6: 4906 ldr r1, [pc, #24] ; (802ccc0 ) 802cca8: 4620 mov r0, r4 802ccaa: f7f5 f9f3 bl 8022094 *lenBufOut = strlen(bufOut); 802ccae: 4620 mov r0, r4 802ccb0: f7f5 fa4e bl 8022150 802ccb4: 8038 strh r0, [r7, #0] // TEST_SetServerFlag(); } 802ccb6: b007 add sp, #28 802ccb8: bdf0 pop {r4, r5, r6, r7, pc} 802ccba: bf00 nop 802ccbc: 08042825 .word 0x08042825 802ccc0: 0804282e .word 0x0804282e 0802ccc4 : } } } int HTTP_UpsHistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802ccc4: b5f0 push {r4, r5, r6, r7, lr} uint8_t i, valueLen = 0; 802ccc6: 2500 movs r5, #0 } } } int HTTP_UpsHistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802ccc8: b087 sub sp, #28 802ccca: 4607 mov r7, r0 char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802cccc: f44f 727a mov.w r2, #1000 ; 0x3e8 802ccd0: 4608 mov r0, r1 } } } int HTTP_UpsHistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802ccd2: 460c mov r4, r1 char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802ccd4: 4629 mov r1, r5 } } } int HTTP_UpsHistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802ccd6: 461e mov r6, r3 uint8_t i, valueLen = 0; 802ccd8: f88d 5003 strb.w r5, [sp, #3] char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802ccdc: f7f5 f860 bl 8021da0 ClearParamString(bufIn); 802cce0: 4638 mov r0, r7 802cce2: f7ff ffa7 bl 802cc34 memset(value, 0, 20); 802cce6: 4629 mov r1, r5 802cce8: 2214 movs r2, #20 802ccea: a801 add r0, sp, #4 802ccec: f7f5 f858 bl 8021da0 GetParamValue(bufIn, "page=", value, &valueLen); 802ccf0: 491d ldr r1, [pc, #116] ; (802cd68 ) 802ccf2: 4638 mov r0, r7 802ccf4: aa01 add r2, sp, #4 802ccf6: f10d 0303 add.w r3, sp, #3 802ccfa: f7ff fc2f bl 802c55c if (strcmp(value, "all") == 0) 802ccfe: a801 add r0, sp, #4 802cd00: 491a ldr r1, [pc, #104] ; (802cd6c ) 802cd02: f7f5 f8d9 bl 8021eb8 802cd06: b9e8 cbnz r0, 802cd44 { if (!LOG_IsInit()) { 802cd08: f7fd f8f0 bl 8029eec 802cd0c: b908 cbnz r0, 802cd12 return SEND_REQUIRED_NO; 802cd0e: 2001 movs r0, #1 802cd10: e028 b.n 802cd64 } if (fLogTransInprog == false) { 802cd12: 4d17 ldr r5, [pc, #92] ; (802cd70 ) 802cd14: 782b ldrb r3, [r5, #0] 802cd16: 2b00 cmp r3, #0 802cd18: d1f9 bne.n 802cd0e // Send log as raw data log_ptr = 0; 802cd1a: 4a16 ldr r2, [pc, #88] ; (802cd74 ) 802cd1c: 6013 str r3, [r2, #0] log_size = LOG_GetTotalSTRCount() * STRING_SIZE + sizeof(UTF8_BOM)-1; 802cd1e: f7fd f8f7 bl 8029f10 802cd22: 4b15 ldr r3, [pc, #84] ; (802cd78 ) sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n%s", log_size, UTF8_BOM); 802cd24: 4915 ldr r1, [pc, #84] ; (802cd7c ) if (fLogTransInprog == false) { // Send log as raw data log_ptr = 0; log_size = LOG_GetTotalSTRCount() * STRING_SIZE + sizeof(UTF8_BOM)-1; 802cd26: 0180 lsls r0, r0, #6 802cd28: 1cc2 adds r2, r0, #3 802cd2a: 601a str r2, [r3, #0] sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n%s", log_size, UTF8_BOM); 802cd2c: 4620 mov r0, r4 802cd2e: 4b14 ldr r3, [pc, #80] ; (802cd80 ) 802cd30: f7fa fef6 bl 8027b20 *lenBufOut = strlen(bufOut); 802cd34: 4620 mov r0, r4 802cd36: f7f5 fa0b bl 8022150 // Set file transfer in progress flag fLogTransInprog = true; 802cd3a: 2301 movs r3, #1 log_ptr = 0; log_size = LOG_GetTotalSTRCount() * STRING_SIZE + sizeof(UTF8_BOM)-1; sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n%s", log_size, UTF8_BOM); *lenBufOut = strlen(bufOut); 802cd3c: 8030 strh r0, [r6, #0] // Set file transfer in progress flag fLogTransInprog = true; 802cd3e: 702b strb r3, [r5, #0] return SEND_REQUIRED_FILE; 802cd40: 2002 movs r0, #2 802cd42: e00f b.n 802cd64 // We send nothing if file transfer already in progress return SEND_REQUIRED_NO; } } else { if (!LOG_IsInit()) { 802cd44: f7fd f8d2 bl 8029eec 802cd48: 2800 cmp r0, #0 802cd4a: d0e0 beq.n 802cd0e return SEND_REQUIRED_NO; } else { HTTP_GetUpsHistoryPage(bufOut, atoi(value)); 802cd4c: a801 add r0, sp, #4 802cd4e: f7f4 ff07 bl 8021b60 802cd52: 4601 mov r1, r0 802cd54: 4620 mov r0, r4 802cd56: f001 f949 bl 802dfec *lenBufOut = strlen(bufOut); 802cd5a: 4620 mov r0, r4 802cd5c: f7f5 f9f8 bl 8022150 802cd60: 8030 strh r0, [r6, #0] return SEND_REQUIRED_YES; 802cd62: 4628 mov r0, r5 } } } 802cd64: b007 add sp, #28 802cd66: bdf0 pop {r4, r5, r6, r7, pc} 802cd68: 0804285e .word 0x0804285e 802cd6c: 08042864 .word 0x08042864 802cd70: 20000d30 .word 0x20000d30 802cd74: 20000d28 .word 0x20000d28 802cd78: 20000d34 .word 0x20000d34 802cd7c: 08042868 .word 0x08042868 802cd80: 0803c56c .word 0x0803c56c 0802cd84 : */ } } int HTTP_HistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802cd84: b5f0 push {r4, r5, r6, r7, lr} uint8_t i, valueLen = 0; 802cd86: 2500 movs r5, #0 */ } } int HTTP_HistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802cd88: b087 sub sp, #28 802cd8a: 4607 mov r7, r0 char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802cd8c: f44f 727a mov.w r2, #1000 ; 0x3e8 802cd90: 4608 mov r0, r1 */ } } int HTTP_HistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802cd92: 460c mov r4, r1 char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802cd94: 4629 mov r1, r5 */ } } int HTTP_HistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802cd96: 461e mov r6, r3 uint8_t i, valueLen = 0; 802cd98: f88d 5003 strb.w r5, [sp, #3] char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802cd9c: f7f5 f800 bl 8021da0 ClearParamString(bufIn); 802cda0: 4638 mov r0, r7 802cda2: f7ff ff47 bl 802cc34 memset(value, 0, 20); 802cda6: 4629 mov r1, r5 802cda8: 2214 movs r2, #20 802cdaa: a801 add r0, sp, #4 802cdac: f7f4 fff8 bl 8021da0 GetParamValue(bufIn, "page=", value, &valueLen); 802cdb0: 491e ldr r1, [pc, #120] ; (802ce2c ) 802cdb2: 4638 mov r0, r7 802cdb4: aa01 add r2, sp, #4 802cdb6: f10d 0303 add.w r3, sp, #3 802cdba: f7ff fbcf bl 802c55c if (strcmp(value, "all") == 0) 802cdbe: a801 add r0, sp, #4 802cdc0: 491b ldr r1, [pc, #108] ; (802ce30 ) 802cdc2: f7f5 f879 bl 8021eb8 802cdc6: b9f0 cbnz r0, 802ce06 { if (!LOG_IsInit()) { 802cdc8: f7fd f890 bl 8029eec 802cdcc: b908 cbnz r0, 802cdd2 return SEND_REQUIRED_NO; 802cdce: 2001 movs r0, #1 802cdd0: e029 b.n 802ce26 } if (fLogTransInprog == false) { 802cdd2: 4d18 ldr r5, [pc, #96] ; (802ce34 ) 802cdd4: 782b ldrb r3, [r5, #0] 802cdd6: 2b00 cmp r3, #0 802cdd8: d1f9 bne.n 802cdce // Send log as raw data log_ptr = 0; 802cdda: 4a17 ldr r2, [pc, #92] ; (802ce38 ) 802cddc: 6013 str r3, [r2, #0] log_size = History_GetTotalSTRCount() * STRING_SIZE_HISTORY + sizeof(UTF8_BOM)-1; 802cdde: f7fd f983 bl 802a0e8 802cde2: 2264 movs r2, #100 ; 0x64 802cde4: 4350 muls r0, r2 802cde6: 4b15 ldr r3, [pc, #84] ; (802ce3c ) sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n%s", log_size, UTF8_BOM); 802cde8: 4915 ldr r1, [pc, #84] ; (802ce40 ) if (fLogTransInprog == false) { // Send log as raw data log_ptr = 0; log_size = History_GetTotalSTRCount() * STRING_SIZE_HISTORY + sizeof(UTF8_BOM)-1; 802cdea: 1cc2 adds r2, r0, #3 802cdec: 601a str r2, [r3, #0] sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n%s", log_size, UTF8_BOM); 802cdee: 4620 mov r0, r4 802cdf0: 4b14 ldr r3, [pc, #80] ; (802ce44 ) 802cdf2: f7fa fe95 bl 8027b20 *lenBufOut = strlen(bufOut); 802cdf6: 4620 mov r0, r4 802cdf8: f7f5 f9aa bl 8022150 // Set file transfer in progress flag fLogTransInprog = true; 802cdfc: 2301 movs r3, #1 log_ptr = 0; log_size = History_GetTotalSTRCount() * STRING_SIZE_HISTORY + sizeof(UTF8_BOM)-1; sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n%s", log_size, UTF8_BOM); *lenBufOut = strlen(bufOut); 802cdfe: 8030 strh r0, [r6, #0] // Set file transfer in progress flag fLogTransInprog = true; 802ce00: 702b strb r3, [r5, #0] return SEND_REQUIRED_FILE; 802ce02: 2002 movs r0, #2 802ce04: e00f b.n 802ce26 // We send nothing if file transfer already in progress return SEND_REQUIRED_NO; } } else { if (!LOG_IsInit()) { 802ce06: f7fd f871 bl 8029eec 802ce0a: 2800 cmp r0, #0 802ce0c: d0df beq.n 802cdce return SEND_REQUIRED_NO; } else { HTTP_GetHistoryPage(bufOut, atoi(value)); 802ce0e: a801 add r0, sp, #4 802ce10: f7f4 fea6 bl 8021b60 802ce14: 4601 mov r1, r0 802ce16: 4620 mov r0, r4 802ce18: f001 f886 bl 802df28 *lenBufOut = strlen(bufOut); 802ce1c: 4620 mov r0, r4 802ce1e: f7f5 f997 bl 8022150 802ce22: 8030 strh r0, [r6, #0] return SEND_REQUIRED_YES; 802ce24: 4628 mov r0, r5 } } } 802ce26: b007 add sp, #28 802ce28: bdf0 pop {r4, r5, r6, r7, pc} 802ce2a: bf00 nop 802ce2c: 0804285e .word 0x0804285e 802ce30: 08042864 .word 0x08042864 802ce34: 20000d30 .word 0x20000d30 802ce38: 20000d28 .word 0x20000d28 802ce3c: 20000d34 .word 0x20000d34 802ce40: 08042868 .word 0x08042868 802ce44: 0803c56c .word 0x0803c56c 0802ce48 : /** * @brief Смена Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ * @retval None */ int HTTP_ChangeUserPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802ce48: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802ce4c: b0b0 sub sp, #192 ; 0xc0 802ce4e: 4605 mov r5, r0 802ce50: 460c mov r4, r1 uint8_t valueLen, valueLen2, user_id; char WebLogin[MAX_WEB_LOGIN_LEN]; (void)lenBufIn; memset(login, 0, 20); 802ce52: 2214 movs r2, #20 802ce54: 2100 movs r1, #0 802ce56: a80a add r0, sp, #40 ; 0x28 /** * @brief Смена Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ * @retval None */ int HTTP_ChangeUserPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802ce58: 461e mov r6, r3 uint8_t valueLen, valueLen2, user_id; char WebLogin[MAX_WEB_LOGIN_LEN]; (void)lenBufIn; memset(login, 0, 20); 802ce5a: f7f4 ffa1 bl 8021da0 memset(password, 0, 20); 802ce5e: 2100 movs r1, #0 802ce60: 2214 movs r2, #20 802ce62: a80f add r0, sp, #60 ; 0x3c 802ce64: f7f4 ff9c bl 8021da0 memset(tempStr, 0, 50); memset(value, 0, 20); 802ce68: af05 add r7, sp, #20 (void)lenBufIn; memset(login, 0, 20); memset(password, 0, 20); memset(tempStr, 0, 50); 802ce6a: 2100 movs r1, #0 802ce6c: 2232 movs r2, #50 ; 0x32 802ce6e: a814 add r0, sp, #80 ; 0x50 802ce70: f7f4 ff96 bl 8021da0 memset(value, 0, 20); 802ce74: 2100 movs r1, #0 802ce76: 2214 movs r2, #20 802ce78: 4638 mov r0, r7 802ce7a: f7f4 ff91 bl 8021da0 ClearParamString(bufIn); 802ce7e: 4628 mov r0, r5 802ce80: f7ff fed8 bl 802cc34 strncpy(tempStr, bufIn, 110); 802ce84: 226e movs r2, #110 ; 0x6e 802ce86: 4629 mov r1, r5 802ce88: a814 add r0, sp, #80 ; 0x50 802ce8a: f7f5 fa19 bl 80222c0 strcpy(bufOut, HTTP_200_OK); if (GetParamValue(tempStr, "username=", login, &valueLen) && 802ce8e: f10d 0806 add.w r8, sp, #6 ClearParamString(bufIn); strncpy(tempStr, bufIn, 110); strcpy(bufOut, HTTP_200_OK); 802ce92: 4933 ldr r1, [pc, #204] ; (802cf60 ) 802ce94: 4620 mov r0, r4 802ce96: f7f5 f8fd bl 8022094 if (GetParamValue(tempStr, "username=", login, &valueLen) && 802ce9a: a814 add r0, sp, #80 ; 0x50 802ce9c: 4931 ldr r1, [pc, #196] ; (802cf64 ) 802ce9e: aa0a add r2, sp, #40 ; 0x28 802cea0: 4643 mov r3, r8 802cea2: f7ff fb5b bl 802c55c 802cea6: 2800 cmp r0, #0 802cea8: d04e beq.n 802cf48 GetParamValue(tempStr, "oldpass=", password, &valueLen)) 802ceaa: a814 add r0, sp, #80 ; 0x50 802ceac: 492e ldr r1, [pc, #184] ; (802cf68 ) 802ceae: aa0f add r2, sp, #60 ; 0x3c 802ceb0: 4643 mov r3, r8 802ceb2: f7ff fb53 bl 802c55c strncpy(tempStr, bufIn, 110); strcpy(bufOut, HTTP_200_OK); if (GetParamValue(tempStr, "username=", login, &valueLen) && 802ceb6: 2800 cmp r0, #0 802ceb8: d046 beq.n 802cf48 802ceba: 2500 movs r5, #0 GetParamValue(tempStr, "oldpass=", password, &valueLen)) { for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { memset(value, 0, 20); 802cebc: 2100 movs r1, #0 802cebe: 2214 movs r2, #20 802cec0: 4638 mov r0, r7 802cec2: f7f4 ff6d bl 8021da0 memset(WebLogin, 0, MAX_WEB_LOGIN_LEN); 802cec6: 2100 movs r1, #0 802cec8: 220b movs r2, #11 802ceca: a802 add r0, sp, #8 802cecc: f7f4 ff68 bl 8021da0 GetUserLogin(user_id, WebLogin, &valueLen); 802ced0: 4628 mov r0, r5 802ced2: a902 add r1, sp, #8 802ced4: 4642 mov r2, r8 802ced6: f7fb f90d bl 80280f4 GetUserPassword(user_id, value, &valueLen2); 802ceda: 4628 mov r0, r5 802cedc: 4639 mov r1, r7 802cede: f10d 0207 add.w r2, sp, #7 802cee2: f7fb f91d bl 8028120 /* Check login and password */ if ((strncmp(WebLogin, login, MAX_WEB_LOGIN_LEN) == 0) && 802cee6: a802 add r0, sp, #8 802cee8: a90a add r1, sp, #40 ; 0x28 802ceea: 220b movs r2, #11 802ceec: f7f5 f992 bl 8022214 802cef0: bb18 cbnz r0, 802cf3a (memcmp(password, value, 11) == 0)) 802cef2: 4639 mov r1, r7 802cef4: a80f add r0, sp, #60 ; 0x3c 802cef6: 220b movs r2, #11 802cef8: f7f4 fe66 bl 8021bc8 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) && 802cefc: 4601 mov r1, r0 802cefe: b9e0 cbnz r0, 802cf3a (memcmp(password, value, 11) == 0)) { memset(password, 0, 20); 802cf00: 2214 movs r2, #20 802cf02: a80f add r0, sp, #60 ; 0x3c 802cf04: f7f4 ff4c bl 8021da0 if (GetParamValue(tempStr, "newpass=", password, &valueLen)) 802cf08: a814 add r0, sp, #80 ; 0x50 802cf0a: 4918 ldr r1, [pc, #96] ; (802cf6c ) 802cf0c: aa0f add r2, sp, #60 ; 0x3c 802cf0e: 4643 mov r3, r8 802cf10: f7ff fb24 bl 802c55c 802cf14: b1c0 cbz r0, 802cf48 { memcpy(sSettings.sAuth[user_id].password, password, 11); 802cf16: 4b16 ldr r3, [pc, #88] ; (802cf70 ) 802cf18: 2217 movs r2, #23 802cf1a: fb02 3005 mla r0, r2, r5, r3 802cf1e: a90f add r1, sp, #60 ; 0x3c 802cf20: 220b movs r2, #11 802cf22: 3005 adds r0, #5 802cf24: f7f4 fe82 bl 8021c2c HTTP_SaveSettings(); 802cf28: f001 f8d6 bl 802e0d8 log_event_data(LOG_PSW_CHANGE, "ÐдминиÑтратор"); 802cf2c: 2003 movs r0, #3 802cf2e: 4911 ldr r1, [pc, #68] ; (802cf74 ) 802cf30: f7fc ffa2 bl 8029e78 strcat(bufOut, "Пароль уÑпешно изменён"); 802cf34: 4620 mov r0, r4 802cf36: 4910 ldr r1, [pc, #64] ; (802cf78 ) 802cf38: e008 b.n 802cf4c 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++) 802cf3a: 3501 adds r5, #1 802cf3c: b2ed uxtb r5, r5 802cf3e: 2d02 cmp r5, #2 802cf40: d1bc bne.n 802cebc *lenBufOut = strlen(bufOut); return SEND_REQUIRED_YES; } } } strcat(bufOut, "Введён неверный пароль!"); 802cf42: 4620 mov r0, r4 802cf44: 490d ldr r1, [pc, #52] ; (802cf7c ) 802cf46: e001 b.n 802cf4c *lenBufOut = strlen(bufOut); return SEND_REQUIRED_YES; } else { strcat(bufOut, "Введены некорректные данные!"); 802cf48: 490d ldr r1, [pc, #52] ; (802cf80 ) 802cf4a: 4620 mov r0, r4 802cf4c: f7f4 ff8e bl 8021e6c *lenBufOut = strlen(bufOut); 802cf50: 4620 mov r0, r4 802cf52: f7f5 f8fd bl 8022150 802cf56: 8030 strh r0, [r6, #0] return SEND_REQUIRED_YES; } } 802cf58: 2000 movs r0, #0 802cf5a: b030 add sp, #192 ; 0xc0 802cf5c: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802cf60: 08043633 .word 0x08043633 802cf64: 08042892 .word 0x08042892 802cf68: 0804289c .word 0x0804289c 802cf6c: 080428a5 .word 0x080428a5 802cf70: 2000ceb8 .word 0x2000ceb8 802cf74: 08038a86 .word 0x08038a86 802cf78: 080428ae .word 0x080428ae 802cf7c: 0804290f .word 0x0804290f 802cf80: 080428d9 .word 0x080428d9 0802cf84 : * @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) { 802cf84: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802cf88: b09d sub sp, #116 ; 0x74 802cf8a: 4617 mov r7, r2 struct http_state *hs; char CookieBuf[50]; char *CookiePtr = NULL; char name[MAX_WEB_COOKIE_LEN]; char id[MAX_WEB_COOKIE_LEN]; uint8_t nameLen = 0, idLen = 0; 802cf8c: 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) { 802cf8e: 4604 mov r4, r0 802cf90: 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; 802cf92: f88d 200a strb.w r2, [sp, #10] 802cf96: f88d 200b strb.w r2, [sp, #11] struct fs_file file = {0, 0}; 802cf9a: 9205 str r2, [sp, #20] 802cf9c: 9206 str r2, [sp, #24] hs = arg; if (err == ERR_OK && p != NULL) 802cf9e: 2b00 cmp r3, #0 802cfa0: f040 83c2 bne.w 802d728 802cfa4: 2f00 cmp r7, #0 802cfa6: f000 83bf beq.w 802d728 { tcp_recved(pcb, p->tot_len); 802cfaa: 4608 mov r0, r1 802cfac: 8939 ldrh r1, [r7, #8] 802cfae: f002 fd35 bl 802fa1c if (hs->file == NULL) 802cfb2: f8d4 9000 ldr.w r9, [r4] 802cfb6: f1b9 0f00 cmp.w r9, #0 802cfba: f040 83b2 bne.w 802d722 printLen = p->tot_len; memcpy(printBuf, p->payload , printLen); printf(printBuf); */ receivedBufLen = p->tot_len; memcpy(receiveBuf, p->payload , receivedBufLen); 802cfbe: f8df a308 ldr.w sl, [pc, #776] ; 802d2c8 { tcp_recved(pcb, p->tot_len); if (hs->file == NULL) { data = p->payload; 802cfc2: 687e ldr r6, [r7, #4] /* printLen = p->tot_len; memcpy(printBuf, p->payload , printLen); printf(printBuf); */ receivedBufLen = p->tot_len; 802cfc4: 893a ldrh r2, [r7, #8] 802cfc6: f8df 82fc ldr.w r8, [pc, #764] ; 802d2c4 memcpy(receiveBuf, p->payload , receivedBufLen); 802cfca: 4650 mov r0, sl 802cfcc: 4631 mov r1, r6 /* printLen = p->tot_len; memcpy(printBuf, p->payload , printLen); printf(printBuf); */ receivedBufLen = p->tot_len; 802cfce: f8a8 2000 strh.w r2, [r8] memcpy(receiveBuf, p->payload , receivedBufLen); 802cfd2: f7f4 fe2b bl 8021c2c receiveBuf[receivedBufLen] = '\0'; 802cfd6: f8b8 3000 ldrh.w r3, [r8] // printf("receive %s \r\n", receiveBuf); /* Get cookie "uname" value */ CookiePtr = strstr(receiveBuf, "uname="); 802cfda: 49a8 ldr r1, [pc, #672] ; (802d27c ) printf(printBuf); */ receivedBufLen = p->tot_len; memcpy(receiveBuf, p->payload , receivedBufLen); receiveBuf[receivedBufLen] = '\0'; 802cfdc: f80a 9003 strb.w r9, [sl, r3] // printf("receive %s \r\n", receiveBuf); /* Get cookie "uname" value */ CookiePtr = strstr(receiveBuf, "uname="); 802cfe0: 4650 mov r0, sl 802cfe2: f7f5 fb35 bl 8022650 strncpy(CookieBuf, CookiePtr, 50); 802cfe6: f10d 083c add.w r8, 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="); 802cfea: 4601 mov r1, r0 strncpy(CookieBuf, CookiePtr, 50); 802cfec: 2232 movs r2, #50 ; 0x32 802cfee: 4640 mov r0, r8 802cff0: f7f5 f966 bl 80222c0 //printf("********CookieBuf1= %s\r\n", CookieBuf); memset(name, 0, MAX_WEB_COOKIE_LEN); 802cff4: 4649 mov r1, r9 802cff6: 2210 movs r2, #16 802cff8: a807 add r0, sp, #28 802cffa: f7f4 fed1 bl 8021da0 GetCookieValue(CookieBuf, "uname=", name, &nameLen); 802cffe: f10d 030a add.w r3, sp, #10 802d002: aa07 add r2, sp, #28 802d004: 499d ldr r1, [pc, #628] ; (802d27c ) 802d006: 4640 mov r0, r8 802d008: f7ff fde6 bl 802cbd8 //printf("********CookieBuf2= %s\r\n", CookieBuf); //printf("********uname= %s\r\n", name); /* Get cookie "id" value */ CookiePtr = strstr(receiveBuf, "id="); 802d00c: 4650 mov r0, sl 802d00e: 499c ldr r1, [pc, #624] ; (802d280 ) 802d010: f7f5 fb1e bl 8022650 strncpy(CookieBuf, CookiePtr, 50); //printf("********CookieBuf1= %s\r\n", CookieBuf); memset(id, 0, MAX_WEB_COOKIE_LEN); 802d014: f10d 0a2c add.w sl, 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="); 802d018: 4601 mov r1, r0 strncpy(CookieBuf, CookiePtr, 50); 802d01a: 2232 movs r2, #50 ; 0x32 802d01c: 4640 mov r0, r8 802d01e: f7f5 f94f bl 80222c0 //printf("********CookieBuf1= %s\r\n", CookieBuf); memset(id, 0, MAX_WEB_COOKIE_LEN); 802d022: 4649 mov r1, r9 802d024: 2210 movs r2, #16 802d026: 4650 mov r0, sl 802d028: f7f4 feba bl 8021da0 GetCookieValue(CookieBuf, "id=", id, &idLen); 802d02c: 4652 mov r2, sl 802d02e: f10d 030b add.w r3, sp, #11 802d032: 4640 mov r0, r8 802d034: 4992 ldr r1, [pc, #584] ; (802d280 ) 802d036: f7ff fdcf bl 802cbd8 /* Id of currently logged-in user */ uint8_t user_id; /* Level of currently logged-in user */ seclevel = 0xFF; 802d03a: 4b92 ldr r3, [pc, #584] ; (802d284 ) 802d03c: 22ff movs r2, #255 ; 0xff 802d03e: 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); 802d040: 4b91 ldr r3, [pc, #580] ; (802d288 ) 802d042: 4992 ldr r1, [pc, #584] ; (802d28c ) 802d044: 2214 movs r2, #20 802d046: fb02 3209 mla r2, r2, r9, r3 802d04a: 4640 mov r0, r8 802d04c: f7fa fd68 bl 8027b20 *len = strlen(str); 802d050: 4640 mov r0, r8 802d052: f7f5 f87d bl 8022150 802d056: 4602 mov r2, r0 802d058: 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 ) { 802d05c: 4641 mov r1, r8 802d05e: 4650 mov r0, sl 802d060: b2d2 uxtb r2, r2 802d062: f7f5 f8d7 bl 8022214 802d066: fa5f fb89 uxtb.w fp, r9 802d06a: 4b89 ldr r3, [pc, #548] ; (802d290 ) 802d06c: b940 cbnz r0, 802d080 GetUserLevelInt(user_id, &seclevel); 802d06e: 4658 mov r0, fp 802d070: 4984 ldr r1, [pc, #528] ; (802d284 ) 802d072: 9301 str r3, [sp, #4] 802d074: f7fb f86a bl 802814c Authenticated = true; 802d078: 9b01 ldr r3, [sp, #4] 802d07a: 2201 movs r2, #1 802d07c: 701a strb r2, [r3, #0] break; 802d07e: e009 b.n 802d094 } Authenticated = false; 802d080: 2200 movs r2, #0 802d082: 701a strb r2, [r3, #0] 802d084: f109 0901 add.w r9, r9, #1 seclevel = 0xFF; 802d088: 4b7e ldr r3, [pc, #504] ; (802d284 ) 802d08a: 22ff movs r2, #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++) { 802d08c: f1b9 0f02 cmp.w r9, #2 GetUserLevelInt(user_id, &seclevel); Authenticated = true; break; } Authenticated = false; seclevel = 0xFF; 802d090: 701a strb r2, [r3, #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++) { 802d092: d1d5 bne.n 802d040 } Authenticated = false; seclevel = 0xFF; } if ( Authenticated == false && sSettings.sRADIUS.Auth_enable == false) 802d094: 4b7e ldr r3, [pc, #504] ; (802d290 ) 802d096: 781b ldrb r3, [r3, #0] 802d098: 2b00 cmp r3, #0 802d09a: f040 8150 bne.w 802d33e 802d09e: 4b7d ldr r3, [pc, #500] ; (802d294 ) 802d0a0: f893 3378 ldrb.w r3, [r3, #888] ; 0x378 802d0a4: b93b cbnz r3, 802d0b6 { HTTP_LOGIN(sendBuf, &sendBufLoadLen); 802d0a6: f8df 8234 ldr.w r8, [pc, #564] ; 802d2dc 802d0aa: 4e7b ldr r6, [pc, #492] ; (802d298 ) 802d0ac: 4640 mov r0, r8 802d0ae: 4631 mov r1, r6 802d0b0: f7ff f9fe bl 802c4b0 802d0b4: e321 b.n 802d6fa tcp_sent(pcb, http_sent); } else if ( Authenticated == false )//&& sSettings.sRADIUS.Auth_enable == true { if (strncmp(data, "GET /main.css", 13) == 0) // + 802d0b6: 4630 mov r0, r6 802d0b8: 4978 ldr r1, [pc, #480] ; (802d29c ) 802d0ba: 220d movs r2, #13 802d0bc: f7f5 f8aa bl 8022214 802d0c0: b900 cbnz r0, 802d0c4 802d0c2: e142 b.n 802d34a 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) // + 802d0c4: 4630 mov r0, r6 802d0c6: 4976 ldr r1, [pc, #472] ; (802d2a0 ) 802d0c8: 220e movs r2, #14 802d0ca: f7f5 f8a3 bl 8022214 802d0ce: b900 cbnz r0, 802d0d2 802d0d0: e143 b.n 802d35a 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) // ? 802d0d2: 4630 mov r0, r6 802d0d4: 4973 ldr r1, [pc, #460] ; (802d2a4 ) 802d0d6: 2210 movs r2, #16 802d0d8: f7f5 f89c bl 8022214 802d0dc: b900 cbnz r0, 802d0e0 802d0de: e144 b.n 802d36a 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) 802d0e0: 4630 mov r0, r6 802d0e2: 4971 ldr r1, [pc, #452] ; (802d2a8 ) 802d0e4: 220c movs r2, #12 802d0e6: f7f5 f895 bl 8022214 802d0ea: b900 cbnz r0, 802d0ee 802d0ec: e14d b.n 802d38a 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)) 802d0ee: 4630 mov r0, r6 802d0f0: 496e ldr r1, [pc, #440] ; (802d2ac ) 802d0f2: 220f movs r2, #15 802d0f4: f7f5 f88e bl 8022214 802d0f8: b120 cbz r0, 802d104 802d0fa: 4b6d ldr r3, [pc, #436] ; (802d2b0 ) 802d0fc: 681b ldr r3, [r3, #0] 802d0fe: 2b00 cmp r3, #0 802d100: f000 80ee beq.w 802d2e0 { uint32_t i=0,size=0, S=1; int32_t j=0; char sizestring[6], *ptr; ContentLengthOffset =0; 802d104: 4a6b ldr r2, [pc, #428] ; (802d2b4 ) 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); 802d106: f8b7 9008 ldrh.w r9, [r7, #8] { uint32_t i=0,size=0, S=1; int32_t j=0; char sizestring[6], *ptr; ContentLengthOffset =0; 802d10a: 2300 movs r3, #0 802d10c: 6013 str r3, [r2, #0] /* find Content-Length data in packet buffer */ for (i=0;i { if (strncmp ((char*)(data+i), Content_Length, 16)==0) 802d112: eb06 0008 add.w r0, r6, r8 802d116: 4968 ldr r1, [pc, #416] ; (802d2b8 ) 802d118: 2210 movs r2, #16 802d11a: f7f5 f87b bl 8022214 802d11e: b920 cbnz r0, 802d12a { ContentLengthOffset = i+16; 802d120: 4b64 ldr r3, [pc, #400] ; (802d2b4 ) 802d122: f108 0210 add.w r2, r8, #16 802d126: 601a str r2, [r3, #0] 802d128: e003 b.n 802d132 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) 802d132: 4b60 ldr r3, [pc, #384] ; (802d2b4 ) 802d134: 681a ldr r2, [r3, #0] 802d136: 4618 mov r0, r3 802d138: b90a cbnz r2, 802d13e * @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; 802d13a: 2200 movs r2, #0 802d13c: e023 b.n 802d186 } /* read Content-Length value */ if (ContentLengthOffset) { i=0; ptr = (char*)(data + ContentLengthOffset); 802d13e: eb06 0c02 add.w ip, r6, r2 } } /* read Content-Length value */ if (ContentLengthOffset) { i=0; 802d142: 2300 movs r3, #0 802d144: e004 b.n 802d150 ptr = (char*)(data + ContentLengthOffset); while(*(ptr+i)!=0x0d) { sizestring[i] = *(ptr+i); 802d146: f10d 0e0c add.w lr, sp, #12 802d14a: f803 100e strb.w r1, [r3, lr] i++; 802d14e: 3301 adds r3, #1 /* read Content-Length value */ if (ContentLengthOffset) { i=0; ptr = (char*)(data + ContentLengthOffset); while(*(ptr+i)!=0x0d) 802d150: f81c 1003 ldrb.w r1, [ip, r3] 802d154: 290d cmp r1, #13 802d156: eb03 0e02 add.w lr, r3, r2 802d15a: d1f4 bne.n 802d146 802d15c: f8c0 e000 str.w lr, [r0] { sizestring[i] = *(ptr+i); i++; ContentLengthOffset++; } if (i>0) 802d160: 2b00 cmp r3, #0 802d162: d0ea beq.n 802d13a { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) 802d164: 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; 802d166: 2101 movs r1, #1 802d168: 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; 802d16a: 200a movs r0, #10 802d16c: e009 b.n 802d182 if (i>0) { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) { size += (sizestring[j]-0x30)*S; 802d16e: f10d 0e0c add.w lr, sp, #12 802d172: f813 e00e ldrb.w lr, [r3, lr] 802d176: f1ae 0e30 sub.w lr, lr, #48 ; 0x30 802d17a: fb01 220e mla r2, r1, lr, r2 ContentLengthOffset++; } if (i>0) { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) 802d17e: 3b01 subs r3, #1 { size += (sizestring[j]-0x30)*S; S=S*10; 802d180: 4341 muls r1, r0 ContentLengthOffset++; } if (i>0) { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) 802d182: 2b00 cmp r3, #0 802d184: daf3 bge.n 802d16e 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); 802d186: f8df 814c ldr.w r8, [pc, #332] ; 802d2d4 //printf("Content-length: %d\r\n", (int)post_data_count); if (post_data_count < MAX_POST_REQ_LEN) { 802d18a: 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); 802d18c: f8c8 2000 str.w r2, [r8] //printf("Content-length: %d\r\n", (int)post_data_count); if (post_data_count < MAX_POST_REQ_LEN) { 802d190: d86a bhi.n 802d268 memset(post_req_data, 0, MAX_POST_REQ_LEN); 802d192: 484a ldr r0, [pc, #296] ; (802d2bc ) /* parse packet for "\r\n\r\n" */ for (i = 0; i < receivedBufLen; i++) 802d194: f8df 912c ldr.w r9, [pc, #300] ; 802d2c4 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); 802d198: 2100 movs r1, #0 802d19a: f44f 7280 mov.w r2, #256 ; 0x100 802d19e: f7f4 fdff bl 8021da0 /* parse packet for "\r\n\r\n" */ for (i = 0; i < receivedBufLen; i++) 802d1a2: f04f 0800 mov.w r8, #0 802d1a6: e00b b.n 802d1c0 { if (strncmp ((char*)(data+i), "\r\n\r\n", 4) == 0) 802d1a8: eb06 0008 add.w r0, r6, r8 802d1ac: 4944 ldr r1, [pc, #272] ; (802d2c0 ) 802d1ae: 2204 movs r2, #4 802d1b0: f7f5 f830 bl 8022214 802d1b4: b910 cbnz r0, 802d1bc { offset = i+4; 802d1b6: f108 0804 add.w r8, r8, #4 //printf("offset: %d\r\n", (int)offset); break; 802d1ba: e007 b.n 802d1cc 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++) 802d1bc: f108 0801 add.w r8, r8, #1 802d1c0: f8b9 3000 ldrh.w r3, [r9] 802d1c4: 4598 cmp r8, r3 802d1c6: d3ef bcc.n 802d1a8 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; 802d1c8: f04f 0800 mov.w r8, #0 //printf("offset: %d\r\n", (int)offset); break; } } req_data_received = receivedBufLen - offset; 802d1cc: 4b3d ldr r3, [pc, #244] ; (802d2c4 ) 802d1ce: 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) { 802d1d2: f1b8 0f00 cmp.w r8, #0 802d1d6: d02a beq.n 802d22e /* if data was splited in two packets */ if (req_data_received < post_data_count) { 802d1d8: f8df 90f8 ldr.w r9, [pc, #248] ; 802d2d4 /* Copy request data to buffer */ snprintf(post_req_data, req_data_received, "%s", receiveBuf); 802d1dc: 4837 ldr r0, [pc, #220] ; (802d2bc ) /* 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) { 802d1de: f8d9 2000 ldr.w r2, [r9] //printf("offset: %d\r\n", (int)offset); break; } } req_data_received = receivedBufLen - offset; 802d1e2: ebc8 0a0a rsb sl, r8, sl /* Check if "\r\n\r\n" was found */ if (offset != 0) { /* if data was splited in two packets */ if (req_data_received < post_data_count) { 802d1e6: 4592 cmp sl, r2 802d1e8: d20b bcs.n 802d202 /* Copy request data to buffer */ snprintf(post_req_data, req_data_received, "%s", receiveBuf); 802d1ea: 4b37 ldr r3, [pc, #220] ; (802d2c8 ) 802d1ec: 4a27 ldr r2, [pc, #156] ; (802d28c ) 802d1ee: 4651 mov r1, sl 802d1f0: f7fa fc78 bl 8027ae4 //printf("copied: %d\r\n", (int)req_data_received); post_data_count -= req_data_received; 802d1f4: f8d9 3000 ldr.w r3, [r9] 802d1f8: ebca 0303 rsb r3, sl, r3 802d1fc: f8c9 3000 str.w r3, [r9] 802d200: e28f b.n 802d722 } /* if data received completely */ else { strncat(post_req_data, (char *)(data + offset), post_data_count); 802d202: eb06 0108 add.w r1, r6, r8 802d206: f7f4 ffd3 bl 80221b0 //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) { 802d20a: 482c ldr r0, [pc, #176] ; (802d2bc ) 802d20c: f8df 80cc ldr.w r8, [pc, #204] ; 802d2dc 802d210: 4e21 ldr r6, [pc, #132] ; (802d298 ) 802d212: f7f4 ff9d bl 8022150 802d216: 4641 mov r1, r8 802d218: b282 uxth r2, r0 802d21a: 4633 mov r3, r6 802d21c: 4827 ldr r0, [pc, #156] ; (802d2bc ) 802d21e: f7ff f9cb bl 802c5b8 802d222: 2800 cmp r0, #0 802d224: d173 bne.n 802d30e hs->file = sendBuf; 802d226: f8c4 8000 str.w r8, [r4] hs->left = sendBufLoadLen; 802d22a: 8833 ldrh r3, [r6, #0] 802d22c: e076 b.n 802d31c /* request was fragmented before "\r\n\r\n" */ else { //printf("no data found!\r\n"); /* wait next packet */ log_post_reqn++; 802d22e: 4e20 ldr r6, [pc, #128] ; (802d2b0 ) 802d230: 6833 ldr r3, [r6, #0] 802d232: 3301 adds r3, #1 /* wait max 2 requests */ if (log_post_reqn > 1) { 802d234: 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++; 802d236: 6033 str r3, [r6, #0] /* wait max 2 requests */ if (log_post_reqn > 1) { 802d238: f240 8273 bls.w 802d722 /* Redirect to login page */ fs_open("/login.html", &file); 802d23c: a905 add r1, sp, #20 802d23e: 4823 ldr r0, [pc, #140] ; (802d2cc ) 802d240: f7fe fe4a bl 802bed8 hs->file = file.data; 802d244: 9b05 ldr r3, [sp, #20] 802d246: 6023 str r3, [r4, #0] hs->left = file.len; 802d248: 9b06 ldr r3, [sp, #24] send_data(pcb, hs); 802d24a: 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; 802d24c: 6063 str r3, [r4, #4] send_data(pcb, hs); 802d24e: 4621 mov r1, r4 802d250: f7fe fe7e bl 802bf50 tcp_sent(pcb, http_sent); 802d254: 4628 mov r0, r5 802d256: 491e ldr r1, [pc, #120] ; (802d2d0 ) 802d258: f002 fc16 bl 802fa88 /* End reqest */ post_data_count = 0; 802d25c: 4b1d ldr r3, [pc, #116] ; (802d2d4 ) log_post_reqn = 0; 802d25e: f8c6 8000 str.w r8, [r6] hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); /* End reqest */ post_data_count = 0; 802d262: f8c3 8000 str.w r8, [r3] 802d266: e25c b.n 802d722 log_post_reqn = 0; } } } else { printf("Too long POST request!\r\n"); 802d268: 481b ldr r0, [pc, #108] ; (802d2d8 ) 802d26a: f7fa fc0d bl 8027a88 /* Ignore request */ post_data_count = 0; log_post_reqn = 0; 802d26e: 4a10 ldr r2, [pc, #64] ; (802d2b0 ) } } else { printf("Too long POST request!\r\n"); /* Ignore request */ post_data_count = 0; 802d270: 2300 movs r3, #0 802d272: f8c8 3000 str.w r3, [r8] log_post_reqn = 0; 802d276: 6013 str r3, [r2, #0] 802d278: e05f b.n 802d33a 802d27a: bf00 nop 802d27c: 08042640 .word 0x08042640 802d280: 08042655 .word 0x08042655 802d284: 20000710 .word 0x20000710 802d288: 2000e22c .word 0x2000e22c 802d28c: 0804288f .word 0x0804288f 802d290: 20000d27 .word 0x20000d27 802d294: 2000cba0 .word 0x2000cba0 802d298: 20000d24 .word 0x20000d24 802d29c: 0804293b .word 0x0804293b 802d2a0: 08042949 .word 0x08042949 802d2a4: 08042958 .word 0x08042958 802d2a8: 08042969 .word 0x08042969 802d2ac: 08042976 .word 0x08042976 802d2b0: 2000e228 .word 0x2000e228 802d2b4: 20000d2c .word 0x20000d2c 802d2b8: 0803c546 .word 0x0803c546 802d2bc: 2000e128 .word 0x2000e128 802d2c0: 08042b48 .word 0x08042b48 802d2c4: 20000d38 .word 0x20000d38 802d2c8: 2000db4c .word 0x2000db4c 802d2cc: 08042986 .word 0x08042986 802d2d0: 0802bfc3 .word 0x0802bfc3 802d2d4: 2000e254 .word 0x2000e254 802d2d8: 08042992 .word 0x08042992 802d2dc: 2000d37c .word 0x2000d37c hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } } else if (post_data_count > 0) 802d2e0: 4b90 ldr r3, [pc, #576] ; (802d524 ) 802d2e2: 681a ldr r2, [r3, #0] 802d2e4: 2a00 cmp r2, #0 802d2e6: d028 beq.n 802d33a { strncat(post_req_data, data, post_data_count); 802d2e8: 4631 mov r1, r6 802d2ea: 488f ldr r0, [pc, #572] ; (802d528 ) 802d2ec: f7f4 ff60 bl 80221b0 //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) { 802d2f0: 488d ldr r0, [pc, #564] ; (802d528 ) 802d2f2: f7f4 ff2d bl 8022150 802d2f6: 498d ldr r1, [pc, #564] ; (802d52c ) 802d2f8: 4b8d ldr r3, [pc, #564] ; (802d530 ) 802d2fa: b282 uxth r2, r0 802d2fc: 488a ldr r0, [pc, #552] ; (802d528 ) 802d2fe: f7ff f95b bl 802c5b8 802d302: b920 cbnz r0, 802d30e hs->file = sendBuf; 802d304: 4b89 ldr r3, [pc, #548] ; (802d52c ) 802d306: 6023 str r3, [r4, #0] hs->left = sendBufLoadLen; 802d308: 4b89 ldr r3, [pc, #548] ; (802d530 ) 802d30a: 881b ldrh r3, [r3, #0] 802d30c: e006 b.n 802d31c tcp_sent(pcb, http_sent); } else { /* Redirect to login page */ fs_open("/login.html", &file); 802d30e: 4889 ldr r0, [pc, #548] ; (802d534 ) 802d310: a905 add r1, sp, #20 802d312: f7fe fde1 bl 802bed8 hs->file = file.data; 802d316: 9b05 ldr r3, [sp, #20] 802d318: 6023 str r3, [r4, #0] hs->left = file.len; 802d31a: 9b06 ldr r3, [sp, #24] 802d31c: 6063 str r3, [r4, #4] send_data(pcb, hs); 802d31e: 4628 mov r0, r5 802d320: 4621 mov r1, r4 802d322: f7fe fe15 bl 802bf50 tcp_sent(pcb, http_sent); 802d326: 4628 mov r0, r5 802d328: 4983 ldr r1, [pc, #524] ; (802d538 ) 802d32a: f002 fbad bl 802fa88 } /* End reqest */ post_data_count = 0; 802d32e: 4a7d ldr r2, [pc, #500] ; (802d524 ) 802d330: 2300 movs r3, #0 802d332: 6013 str r3, [r2, #0] log_post_reqn = 0; 802d334: 4a81 ldr r2, [pc, #516] ; (802d53c ) 802d336: 6013 str r3, [r2, #0] 802d338: e1f3 b.n 802d722 } else { fs_open("/login.html", &file); 802d33a: 487e ldr r0, [pc, #504] ; (802d534 ) 802d33c: e1e2 b.n 802d704 } else if ( Authenticated == true ) { if (strncmp(data, "GET /main.css", 13) == 0) // + 802d33e: 4630 mov r0, r6 802d340: 497f ldr r1, [pc, #508] ; (802d540 ) 802d342: 220d movs r2, #13 802d344: f7f4 ff66 bl 8022214 802d348: b908 cbnz r0, 802d34e { fs_open("/main.css", &file); 802d34a: 487e ldr r0, [pc, #504] ; (802d544 ) 802d34c: e1da b.n 802d704 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) // + 802d34e: 4630 mov r0, r6 802d350: 497d ldr r1, [pc, #500] ; (802d548 ) 802d352: 220e movs r2, #14 802d354: f7f4 ff5e bl 8022214 802d358: b908 cbnz r0, 802d35e { fs_open("/rotek.png", &file); 802d35a: 487c ldr r0, [pc, #496] ; (802d54c ) 802d35c: e1d2 b.n 802d704 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) // ? 802d35e: 4630 mov r0, r6 802d360: 497b ldr r1, [pc, #492] ; (802d550 ) 802d362: 2210 movs r2, #16 802d364: f7f4 ff56 bl 8022214 802d368: b908 cbnz r0, 802d36e { fs_open("/favicon.ico", &file); 802d36a: 487a ldr r0, [pc, #488] ; (802d554 ) 802d36c: e1ca b.n 802d704 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) // + 802d36e: 4630 mov r0, r6 802d370: 4979 ldr r1, [pc, #484] ; (802d558 ) 802d372: 220c movs r2, #12 802d374: f7f4 ff4e bl 8022214 802d378: b908 cbnz r0, 802d37e { fs_open("/main.js", &file); 802d37a: 4878 ldr r0, [pc, #480] ; (802d55c ) 802d37c: e1c2 b.n 802d704 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /role.js", 12) == 0) 802d37e: 4630 mov r0, r6 802d380: 4977 ldr r1, [pc, #476] ; (802d560 ) 802d382: 220c movs r2, #12 802d384: f7f4 ff46 bl 8022214 802d388: b908 cbnz r0, 802d38e { fs_open("/role.js", &file); 802d38a: 4876 ldr r0, [pc, #472] ; (802d564 ) 802d38c: e1ba b.n 802d704 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /settings.html", 18) == 0) // + 802d38e: 4630 mov r0, r6 802d390: 4975 ldr r1, [pc, #468] ; (802d568 ) 802d392: 2212 movs r2, #18 802d394: f7f4 ff3e bl 8022214 802d398: b928 cbnz r0, 802d3a6 { HTTP_UpdateUserLoginTime(user_id); if (seclevel == 0){ 802d39a: 4b74 ldr r3, [pc, #464] ; (802d56c ) 802d39c: 781b ldrb r3, [r3, #0] 802d39e: 2b00 cmp r3, #0 802d3a0: f040 81af bne.w 802d702 802d3a4: e161 b.n 802d66a hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } } else if (strncmp(data, "GET /info.html", 14) == 0) // + 802d3a6: 4630 mov r0, r6 802d3a8: 4971 ldr r1, [pc, #452] ; (802d570 ) 802d3aa: 220e movs r2, #14 802d3ac: f7f4 ff32 bl 8022214 802d3b0: b908 cbnz r0, 802d3b6 { HTTP_UpdateUserLoginTime(user_id); fs_open("/info.html", &file); 802d3b2: 4870 ldr r0, [pc, #448] ; (802d574 ) 802d3b4: e1a6 b.n 802d704 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) 802d3b6: 4630 mov r0, r6 802d3b8: 496f ldr r1, [pc, #444] ; (802d578 ) 802d3ba: 2211 movs r2, #17 802d3bc: f7f4 ff2a bl 8022214 802d3c0: b908 cbnz r0, 802d3c6 { HTTP_UpdateUserLoginTime(user_id); fs_open("/history.html", &file); 802d3c2: 486e ldr r0, [pc, #440] ; (802d57c ) 802d3c4: e19e b.n 802d704 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) 802d3c6: 4630 mov r0, r6 802d3c8: 496d ldr r1, [pc, #436] ; (802d580 ) 802d3ca: 2215 movs r2, #21 802d3cc: f7f4 ff22 bl 8022214 802d3d0: b908 cbnz r0, 802d3d6 { HTTP_UpdateUserLoginTime(user_id); fs_open("/ups_history.html", &file); 802d3d2: 486c ldr r0, [pc, #432] ; (802d584 ) 802d3d4: e196 b.n 802d704 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) // + 802d3d6: 4630 mov r0, r6 802d3d8: 496b ldr r1, [pc, #428] ; (802d588 ) 802d3da: 2210 movs r2, #16 802d3dc: f7f4 ff1a bl 8022214 802d3e0: b940 cbnz r0, 802d3f4 { HTTP_GetParamsPage1(sendBuf); 802d3e2: 4e52 ldr r6, [pc, #328] ; (802d52c ) 802d3e4: 4630 mov r0, r6 802d3e6: f000 f9c7 bl 802d778 hs->file = sendBuf; 802d3ea: 6026 str r6, [r4, #0] hs->left = strlen(sendBuf); 802d3ec: 4630 mov r0, r6 802d3ee: f7f4 feaf bl 8022150 802d3f2: e043 b.n 802d47c send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /settings.cgi", 17) == 0) // + 802d3f4: 4630 mov r0, r6 802d3f6: 4965 ldr r1, [pc, #404] ; (802d58c ) 802d3f8: 2211 movs r2, #17 802d3fa: f7f4 ff0b bl 8022214 802d3fe: b990 cbnz r0, 802d426 { SET_PAGE = SET_PAGE_PAGE2; 802d400: 4b63 ldr r3, [pc, #396] ; (802d590 ) 802d402: 2202 movs r2, #2 802d404: 701a strb r2, [r3, #0] if (seclevel == 0) { 802d406: 4b59 ldr r3, [pc, #356] ; (802d56c ) 802d408: 781b ldrb r3, [r3, #0] 802d40a: 2b00 cmp r3, #0 802d40c: f040 8189 bne.w 802d722 if (HTTP_SettingsPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen) == SEND_REQUIRED_YES) 802d410: f8df 8118 ldr.w r8, [pc, #280] ; 802d52c 802d414: 4e46 ldr r6, [pc, #280] ; (802d530 ) 802d416: 4b5f ldr r3, [pc, #380] ; (802d594 ) 802d418: 485f ldr r0, [pc, #380] ; (802d598 ) 802d41a: 881a ldrh r2, [r3, #0] 802d41c: 4641 mov r1, r8 802d41e: 4633 mov r3, r6 802d420: f7fe feb0 bl 802c184 802d424: e0f1 b.n 802d60a send_data(pcb, hs); tcp_sent(pcb, http_sent); }*/ } } else if (strncmp(data, "POST /settings.cgi", 18) == 0) 802d426: 4630 mov r0, r6 802d428: 495c ldr r1, [pc, #368] ; (802d59c ) 802d42a: 2212 movs r2, #18 802d42c: f7f4 fef2 bl 8022214 802d430: 4680 mov r8, r0 802d432: bb28 cbnz r0, 802d480 { //strncat(&receiveBuf, " ", 1); strncat(receiveBuf, " ", 1); 802d434: 2201 movs r2, #1 802d436: 495a ldr r1, [pc, #360] ; (802d5a0 ) 802d438: 4857 ldr r0, [pc, #348] ; (802d598 ) HTTP_SetSettings(receiveBuf, receivedBufLen); memset(sendBuf, 0, SEND_BUF_MAX_LEN); 802d43a: 4e3c ldr r6, [pc, #240] ; (802d52c ) } } else if (strncmp(data, "POST /settings.cgi", 18) == 0) { //strncat(&receiveBuf, " ", 1); strncat(receiveBuf, " ", 1); 802d43c: f7f4 feb8 bl 80221b0 HTTP_SetSettings(receiveBuf, receivedBufLen); 802d440: 4b54 ldr r3, [pc, #336] ; (802d594 ) 802d442: 4855 ldr r0, [pc, #340] ; (802d598 ) 802d444: 8819 ldrh r1, [r3, #0] 802d446: f7ff f9c1 bl 802c7cc memset(sendBuf, 0, SEND_BUF_MAX_LEN); 802d44a: f44f 62fa mov.w r2, #2000 ; 0x7d0 802d44e: 4641 mov r1, r8 802d450: 4630 mov r0, r6 802d452: f7f4 fca5 bl 8021da0 strcpy(sendBuf, "HTTP/1.1 200 OK\r\n"); 802d456: 4953 ldr r1, [pc, #332] ; (802d5a4 ) 802d458: 4630 mov r0, r6 802d45a: f7f4 fe1b bl 8022094 strcat(sendBuf, "\r\n\r\n"); 802d45e: 4952 ldr r1, [pc, #328] ; (802d5a8 ) 802d460: 4630 mov r0, r6 802d462: f7f4 fd03 bl 8021e6c strcat(sendBuf,"\r\n\r\n"); 802d466: 4951 ldr r1, [pc, #324] ; (802d5ac ) 802d468: 4630 mov r0, r6 802d46a: f7f4 fcff bl 8021e6c sendBufLoadLen = strlen(sendBuf); 802d46e: 4630 mov r0, r6 802d470: f7f4 fe6e bl 8022150 802d474: 4b2e ldr r3, [pc, #184] ; (802d530 ) 802d476: 8018 strh r0, [r3, #0] hs->file = sendBuf; 802d478: 6026 str r6, [r4, #0] hs->left = sendBufLoadLen; 802d47a: b280 uxth r0, r0 802d47c: 6060 str r0, [r4, #4] 802d47e: e148 b.n 802d712 send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /info.cgi", 13) == 0) // + 802d480: 4630 mov r0, r6 802d482: 494b ldr r1, [pc, #300] ; (802d5b0 ) 802d484: 220d movs r2, #13 802d486: f7f4 fec5 bl 8022214 802d48a: b950 cbnz r0, 802d4a2 { if (HTTP_InfoPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen) == SEND_REQUIRED_YES) 802d48c: f8df 809c ldr.w r8, [pc, #156] ; 802d52c 802d490: 4e27 ldr r6, [pc, #156] ; (802d530 ) 802d492: 4b40 ldr r3, [pc, #256] ; (802d594 ) 802d494: 4840 ldr r0, [pc, #256] ; (802d598 ) 802d496: 881a ldrh r2, [r3, #0] 802d498: 4641 mov r1, r8 802d49a: 4633 mov r3, r6 802d49c: f7fe fe96 bl 802c1cc 802d4a0: e0b3 b.n 802d60a hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); }*/ } else if (strncmp(data, "POST /info.cgi", 14) == 0) 802d4a2: 4630 mov r0, r6 802d4a4: 4943 ldr r1, [pc, #268] ; (802d5b4 ) 802d4a6: 220e movs r2, #14 802d4a8: f7f4 feb4 bl 8022214 802d4ac: 4680 mov r8, r0 802d4ae: b9d8 cbnz r0, 802d4e8 { //strncat(&receiveBuf, " ", 1); strncat(receiveBuf, " ", 1); 802d4b0: 2201 movs r2, #1 802d4b2: 493b ldr r1, [pc, #236] ; (802d5a0 ) 802d4b4: 4838 ldr r0, [pc, #224] ; (802d598 ) HTTP_SetInfo(receiveBuf, receivedBufLen); memset(sendBuf, 0, SEND_BUF_MAX_LEN); 802d4b6: 4e1d ldr r6, [pc, #116] ; (802d52c ) }*/ } else if (strncmp(data, "POST /info.cgi", 14) == 0) { //strncat(&receiveBuf, " ", 1); strncat(receiveBuf, " ", 1); 802d4b8: f7f4 fe7a bl 80221b0 HTTP_SetInfo(receiveBuf, receivedBufLen); 802d4bc: 4b35 ldr r3, [pc, #212] ; (802d594 ) 802d4be: 4836 ldr r0, [pc, #216] ; (802d598 ) 802d4c0: 8819 ldrh r1, [r3, #0] 802d4c2: f7ff f931 bl 802c728 memset(sendBuf, 0, SEND_BUF_MAX_LEN); 802d4c6: f44f 62fa mov.w r2, #2000 ; 0x7d0 802d4ca: 4641 mov r1, r8 802d4cc: 4630 mov r0, r6 802d4ce: f7f4 fc67 bl 8021da0 strcpy(sendBuf, "HTTP/1.1 200 OK\r\n"); 802d4d2: 4934 ldr r1, [pc, #208] ; (802d5a4 ) 802d4d4: 4630 mov r0, r6 802d4d6: f7f4 fddd bl 8022094 strcat(sendBuf, "\r\n\r\n"); 802d4da: 4933 ldr r1, [pc, #204] ; (802d5a8 ) 802d4dc: 4630 mov r0, r6 802d4de: f7f4 fcc5 bl 8021e6c strcat(sendBuf,"\r\n\r\n"); 802d4e2: 4630 mov r0, r6 802d4e4: 4934 ldr r1, [pc, #208] ; (802d5b8 ) 802d4e6: e7c0 b.n 802d46a hs->file = sendBuf; hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /history.cgi", 16) == 0) 802d4e8: 4630 mov r0, r6 802d4ea: 4934 ldr r1, [pc, #208] ; (802d5bc ) 802d4ec: 2210 movs r2, #16 802d4ee: f7f4 fe91 bl 8022214 802d4f2: 2800 cmp r0, #0 802d4f4: d166 bne.n 802d5c4 { int res; res = HTTP_HistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802d4f6: 4b27 ldr r3, [pc, #156] ; (802d594 ) 802d4f8: f8df 8030 ldr.w r8, [pc, #48] ; 802d52c 802d4fc: 4e0c ldr r6, [pc, #48] ; (802d530 ) 802d4fe: 881a ldrh r2, [r3, #0] 802d500: 4825 ldr r0, [pc, #148] ; (802d598 ) 802d502: 4641 mov r1, r8 802d504: 4633 mov r3, r6 802d506: f7ff fc3d bl 802cd84 if (res == SEND_REQUIRED_FILE) 802d50a: 2802 cmp r0, #2 802d50c: d17d bne.n 802d60a { hs->file = sendBuf; hs->left = sendBufLoadLen; 802d50e: 8833 ldrh r3, [r6, #0] res = HTTP_HistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); if (res == SEND_REQUIRED_FILE) { hs->file = sendBuf; 802d510: f8c4 8000 str.w r8, [r4] hs->left = sendBufLoadLen; send_data(pcb, hs); 802d514: 4628 mov r0, r5 802d516: 4621 mov r1, r4 res = HTTP_HistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); if (res == SEND_REQUIRED_FILE) { hs->file = sendBuf; hs->left = sendBufLoadLen; 802d518: 6063 str r3, [r4, #4] send_data(pcb, hs); 802d51a: f7fe fd19 bl 802bf50 tcp_sent(pcb, http_sent_history); 802d51e: 4628 mov r0, r5 802d520: 4927 ldr r1, [pc, #156] ; (802d5c0 ) 802d522: e06b b.n 802d5fc 802d524: 2000e254 .word 0x2000e254 802d528: 2000e128 .word 0x2000e128 802d52c: 2000d37c .word 0x2000d37c 802d530: 20000d24 .word 0x20000d24 802d534: 08042986 .word 0x08042986 802d538: 0802bfc3 .word 0x0802bfc3 802d53c: 2000e228 .word 0x2000e228 802d540: 0804293b .word 0x0804293b 802d544: 0804293f .word 0x0804293f 802d548: 08042949 .word 0x08042949 802d54c: 0804294d .word 0x0804294d 802d550: 08042958 .word 0x08042958 802d554: 0804295c .word 0x0804295c 802d558: 080429ab .word 0x080429ab 802d55c: 080429af .word 0x080429af 802d560: 08042969 .word 0x08042969 802d564: 0804296d .word 0x0804296d 802d568: 080429b8 .word 0x080429b8 802d56c: 20000710 .word 0x20000710 802d570: 080429d7 .word 0x080429d7 802d574: 080429db .word 0x080429db 802d578: 080429e6 .word 0x080429e6 802d57c: 080429ea .word 0x080429ea 802d580: 080429f8 .word 0x080429f8 802d584: 080429fc .word 0x080429fc 802d588: 08042a0e .word 0x08042a0e 802d58c: 08042a1f .word 0x08042a1f 802d590: 20000d26 .word 0x20000d26 802d594: 20000d38 .word 0x20000d38 802d598: 2000db4c .word 0x2000db4c 802d59c: 08042a31 .word 0x08042a31 802d5a0: 08038ac0 .word 0x08038ac0 802d5a4: 08042a44 .word 0x08042a44 802d5a8: 08042b48 .word 0x08042b48 802d5ac: 08042a56 .word 0x08042a56 802d5b0: 08042ac5 .word 0x08042ac5 802d5b4: 08042ad3 .word 0x08042ad3 802d5b8: 08042ae2 .word 0x08042ae2 802d5bc: 08042b4d .word 0x08042b4d 802d5c0: 0802c07d .word 0x0802c07d hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } } else if (strncmp(data, "GET /ups_history.cgi", 19) == 0) 802d5c4: 4630 mov r0, r6 802d5c6: 495a ldr r1, [pc, #360] ; (802d730 ) 802d5c8: 2213 movs r2, #19 802d5ca: f7f4 fe23 bl 8022214 802d5ce: bb00 cbnz r0, 802d612 { int res; res = HTTP_UpsHistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802d5d0: 4b58 ldr r3, [pc, #352] ; (802d734 ) 802d5d2: f8df 81a0 ldr.w r8, [pc, #416] ; 802d774 802d5d6: 4e58 ldr r6, [pc, #352] ; (802d738 ) 802d5d8: 881a ldrh r2, [r3, #0] 802d5da: 4858 ldr r0, [pc, #352] ; (802d73c ) 802d5dc: 4641 mov r1, r8 802d5de: 4633 mov r3, r6 802d5e0: f7ff fb70 bl 802ccc4 if (res == SEND_REQUIRED_FILE) 802d5e4: 2802 cmp r0, #2 802d5e6: d110 bne.n 802d60a { hs->file = sendBuf; hs->left = sendBufLoadLen; 802d5e8: 8833 ldrh r3, [r6, #0] res = HTTP_UpsHistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); if (res == SEND_REQUIRED_FILE) { hs->file = sendBuf; 802d5ea: f8c4 8000 str.w r8, [r4] hs->left = sendBufLoadLen; send_data(pcb, hs); 802d5ee: 4628 mov r0, r5 802d5f0: 4621 mov r1, r4 res = HTTP_UpsHistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); if (res == SEND_REQUIRED_FILE) { hs->file = sendBuf; hs->left = sendBufLoadLen; 802d5f2: 6063 str r3, [r4, #4] send_data(pcb, hs); 802d5f4: f7fe fcac bl 802bf50 tcp_sent(pcb, http_sent_log); 802d5f8: 4951 ldr r1, [pc, #324] ; (802d740 ) 802d5fa: 4628 mov r0, r5 802d5fc: f002 fa44 bl 802fa88 tcp_err(pcb, http_sent_log_err); 802d600: 4628 mov r0, r5 802d602: 4950 ldr r1, [pc, #320] ; (802d744 ) 802d604: f002 fa42 bl 802fa8c 802d608: e08b b.n 802d722 } else if (res == SEND_REQUIRED_YES) { 802d60a: 2800 cmp r0, #0 802d60c: f040 8089 bne.w 802d722 802d610: e073 b.n 802d6fa send_data(pcb, hs); tcp_sent(pcb, http_sent); } } /* ТеÑÑ‚ ÐКБ ИБП */ else if (strncmp(data, "POST /bat_test.cgi", 18) == 0) 802d612: 4630 mov r0, r6 802d614: 494c ldr r1, [pc, #304] ; (802d748 ) 802d616: 2212 movs r2, #18 802d618: f7f4 fdfc bl 8022214 802d61c: b950 cbnz r0, 802d634 { HTTP_UPSTest(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802d61e: f8df 8154 ldr.w r8, [pc, #340] ; 802d774 802d622: 4e45 ldr r6, [pc, #276] ; (802d738 ) 802d624: 4b43 ldr r3, [pc, #268] ; (802d734 ) 802d626: 4845 ldr r0, [pc, #276] ; (802d73c ) 802d628: 881a ldrh r2, [r3, #0] 802d62a: 4641 mov r1, r8 802d62c: 4633 mov r3, r6 802d62e: f7fe fdf1 bl 802c214 802d632: e062 b.n 802d6fa hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Выключение ИБП */ else if (strncmp(data, "POST /ups_power.cgi", 19) == 0) 802d634: 4630 mov r0, r6 802d636: 4945 ldr r1, [pc, #276] ; (802d74c ) 802d638: 2213 movs r2, #19 802d63a: f7f4 fdeb bl 8022214 802d63e: b950 cbnz r0, 802d656 { HTTP_UPSshutdown(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802d640: f8df 8130 ldr.w r8, [pc, #304] ; 802d774 802d644: 4e3c ldr r6, [pc, #240] ; (802d738 ) 802d646: 4b3b ldr r3, [pc, #236] ; (802d734 ) 802d648: 483c ldr r0, [pc, #240] ; (802d73c ) 802d64a: 881a ldrh r2, [r3, #0] 802d64c: 4641 mov r1, r8 802d64e: 4633 mov r3, r6 802d650: f7fe fe6e bl 802c330 802d654: e051 b.n 802d6fa hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Ð¡Ð±Ñ€Ð¾Ñ Ð½Ð°Ñтроек и Ñохранине */ else if (strncmp(data, "GET /reset.cgi", 14) == 0) 802d656: 4630 mov r0, r6 802d658: 493d ldr r1, [pc, #244] ; (802d750 ) 802d65a: 220e movs r2, #14 802d65c: f7f4 fdda bl 8022214 802d660: b928 cbnz r0, 802d66e { HTTP_ResetSettings(); 802d662: f000 fd25 bl 802e0b0 HTTP_SaveSettings(); 802d666: f000 fd37 bl 802e0d8 fs_open("/settings.html", &file); 802d66a: 483a ldr r0, [pc, #232] ; (802d754 ) 802d66c: e04a b.n 802d704 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Перезагрузка контроллера */ else if (strncmp(data, "GET /reboot.cgi", 15) == 0) 802d66e: 4630 mov r0, r6 802d670: 4939 ldr r1, [pc, #228] ; (802d758 ) 802d672: 220f movs r2, #15 802d674: f7f4 fdce bl 8022214 802d678: b910 cbnz r0, 802d680 { HTTP_Reboot(); 802d67a: f000 fd59 bl 802e130 802d67e: e050 b.n 802d722 } /* Подтверждение новых Ñетевых наÑтроек */ else if (strncmp(data, "GET /confirm.cgi", 16) == 0) 802d680: 4630 mov r0, r6 802d682: 4936 ldr r1, [pc, #216] ; (802d75c ) 802d684: 2210 movs r2, #16 802d686: f7f4 fdc5 bl 8022214 802d68a: b920 cbnz r0, 802d696 { SetWebReinitFlag(false); 802d68c: f7fa feb4 bl 80283f8 SetConfirmWebParamsFlag(); 802d690: f7fa feb8 bl 8028404 802d694: e035 b.n 802d702 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Проверка паролÑ, переход в bootloader */ else if (strncmp(data, "GET /fw_update.cgi", 18) == 0) 802d696: 4630 mov r0, r6 802d698: 4931 ldr r1, [pc, #196] ; (802d760 ) 802d69a: 2212 movs r2, #18 802d69c: f7f4 fdba bl 8022214 802d6a0: b950 cbnz r0, 802d6b8 { HTTP_ConfirmBootPwd(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802d6a2: f8df 80d0 ldr.w r8, [pc, #208] ; 802d774 802d6a6: 4e24 ldr r6, [pc, #144] ; (802d738 ) 802d6a8: 4b22 ldr r3, [pc, #136] ; (802d734 ) 802d6aa: 4824 ldr r0, [pc, #144] ; (802d73c ) 802d6ac: 881a ldrh r2, [r3, #0] 802d6ae: 4641 mov r1, r8 802d6b0: 4633 mov r3, r6 802d6b2: f7fe feeb bl 802c48c 802d6b6: e020 b.n 802d6fa hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Смена Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ */ else if (strncmp(data, "POST /changepwd.cgi", 19) == 0) 802d6b8: 4630 mov r0, r6 802d6ba: 492a ldr r1, [pc, #168] ; (802d764 ) 802d6bc: 2213 movs r2, #19 802d6be: f7f4 fda9 bl 8022214 802d6c2: b950 cbnz r0, 802d6da { HTTP_ChangeUserPwd(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802d6c4: f8df 80ac ldr.w r8, [pc, #172] ; 802d774 802d6c8: 4e1b ldr r6, [pc, #108] ; (802d738 ) 802d6ca: 4b1a ldr r3, [pc, #104] ; (802d734 ) 802d6cc: 481b ldr r0, [pc, #108] ; (802d73c ) 802d6ce: 881a ldrh r2, [r3, #0] 802d6d0: 4641 mov r1, r8 802d6d2: 4633 mov r3, r6 802d6d4: f7ff fbb8 bl 802ce48 802d6d8: e00f b.n 802d6fa hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } // Ðа производÑтве else if (strncmp(data, "GET /setProdate.cgi", 19) == 0) 802d6da: 4630 mov r0, r6 802d6dc: 4922 ldr r1, [pc, #136] ; (802d768 ) 802d6de: 2213 movs r2, #19 802d6e0: f7f4 fd98 bl 8022214 802d6e4: b968 cbnz r0, 802d702 { HTTP_Prodate(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802d6e6: 4b13 ldr r3, [pc, #76] ; (802d734 ) 802d6e8: f8df 8088 ldr.w r8, [pc, #136] ; 802d774 802d6ec: 4e12 ldr r6, [pc, #72] ; (802d738 ) 802d6ee: 881a ldrh r2, [r3, #0] 802d6f0: 4812 ldr r0, [pc, #72] ; (802d73c ) 802d6f2: 4641 mov r1, r8 802d6f4: 4633 mov r3, r6 802d6f6: f7ff fab1 bl 802cc5c hs->file = sendBuf; 802d6fa: f8c4 8000 str.w r8, [r4] hs->left = sendBufLoadLen; 802d6fe: 8833 ldrh r3, [r6, #0] 802d700: e006 b.n 802d710 tcp_sent(pcb, http_sent); } else { HTTP_UpdateUserLoginTime(user_id); fs_open("/index.html", &file); // + 802d702: 481a ldr r0, [pc, #104] ; (802d76c ) 802d704: a905 add r1, sp, #20 802d706: f7fe fbe7 bl 802bed8 hs->file = file.data; 802d70a: 9b05 ldr r3, [sp, #20] 802d70c: 6023 str r3, [r4, #0] hs->left = file.len; 802d70e: 9b06 ldr r3, [sp, #24] 802d710: 6063 str r3, [r4, #4] send_data(pcb, hs); 802d712: 4628 mov r0, r5 802d714: 4621 mov r1, r4 802d716: f7fe fc1b bl 802bf50 tcp_sent(pcb, http_sent); 802d71a: 4628 mov r0, r5 802d71c: 4914 ldr r1, [pc, #80] ; (802d770 ) 802d71e: f002 f9b3 bl 802fa88 } } } pbuf_free(p); 802d722: 4638 mov r0, r7 802d724: f001 fee8 bl 802f4f8 /* if (err == ERR_OK && p == NULL) { close_conn(pcb, hs); }*/ return ERR_OK; } 802d728: 2000 movs r0, #0 802d72a: b01d add sp, #116 ; 0x74 802d72c: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802d730: 08042b5e .word 0x08042b5e 802d734: 20000d38 .word 0x20000d38 802d738: 20000d24 .word 0x20000d24 802d73c: 2000db4c .word 0x2000db4c 802d740: 0802bfdd .word 0x0802bfdd 802d744: 0802becd .word 0x0802becd 802d748: 08042b73 .word 0x08042b73 802d74c: 08042b86 .word 0x08042b86 802d750: 08042b9a .word 0x08042b9a 802d754: 080429bc .word 0x080429bc 802d758: 08042ba9 .word 0x08042ba9 802d75c: 08042bb9 .word 0x08042bb9 802d760: 08042bca .word 0x08042bca 802d764: 08042bdd .word 0x08042bdd 802d768: 08042bf1 .word 0x08042bf1 802d76c: 080429cb .word 0x080429cb 802d770: 0802bfc3 .word 0x0802bfc3 802d774: 2000d37c .word 0x2000d37c 0802d778 : /** * @brief ВозвращÑет Ñтроку Ñ Ð½Ð°Ñтройками на первой Ñтранице * @retval None */ void HTTP_GetParamsPage1(char *buf) { 802d778: b510 push {r4, lr} char str[40]; uint8_t len; memset(buf, 0, 1000); 802d77a: f44f 727a mov.w r2, #1000 ; 0x3e8 /** * @brief ВозвращÑет Ñтроку Ñ Ð½Ð°Ñтройками на первой Ñтранице * @retval None */ void HTTP_GetParamsPage1(char *buf) { 802d77e: b08c sub sp, #48 ; 0x30 802d780: 4604 mov r4, r0 char str[40]; uint8_t len; memset(buf, 0, 1000); 802d782: 2100 movs r1, #0 802d784: f7f4 fb0c bl 8021da0 // Headers Ð´Ð»Ñ Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶ÐºÐ¸ saffari strcpy(buf, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\n"); 802d788: 4620 mov r0, r4 802d78a: 496f ldr r1, [pc, #444] ; (802d948 ) 802d78c: f7f4 fc82 bl 8022094 // Параметры UPS GetInputVoltageStr(str, &len); 802d790: a802 add r0, sp, #8 802d792: f10d 0107 add.w r1, sp, #7 802d796: f7fa f9fb bl 8027b90 strcat(buf, "{\"AC\":\""); 802d79a: 4620 mov r0, r4 802d79c: 496b ldr r1, [pc, #428] ; (802d94c ) 802d79e: f7f4 fb65 bl 8021e6c strncat(buf, str, len); 802d7a2: f89d 2007 ldrb.w r2, [sp, #7] 802d7a6: a902 add r1, sp, #8 802d7a8: 4620 mov r0, r4 802d7aa: f7f4 fd01 bl 80221b0 GetOutputVoltageStr(str, &len); 802d7ae: a802 add r0, sp, #8 802d7b0: f10d 0107 add.w r1, sp, #7 802d7b4: f7fa fa02 bl 8027bbc strcat(buf, "\",\"DC\":\""); 802d7b8: 4620 mov r0, r4 802d7ba: 4965 ldr r1, [pc, #404] ; (802d950 ) 802d7bc: f7f4 fb56 bl 8021e6c strncat(buf, str, len); 802d7c0: f89d 2007 ldrb.w r2, [sp, #7] 802d7c4: a902 add r1, sp, #8 802d7c6: 4620 mov r0, r4 802d7c8: f7f4 fcf2 bl 80221b0 GetInputFreqStr(str, &len); 802d7cc: a802 add r0, sp, #8 802d7ce: f10d 0107 add.w r1, sp, #7 802d7d2: f7fa f9b1 bl 8027b38 strcat(buf, "\",\"in_freq\":\""); 802d7d6: 4620 mov r0, r4 802d7d8: 495e ldr r1, [pc, #376] ; (802d954 ) 802d7da: f7f4 fb47 bl 8021e6c strncat(buf, str, len); 802d7de: f89d 2007 ldrb.w r2, [sp, #7] 802d7e2: a902 add r1, sp, #8 802d7e4: 4620 mov r0, r4 802d7e6: f7f4 fce3 bl 80221b0 GetOutputFreqStr(str, &len); 802d7ea: a802 add r0, sp, #8 802d7ec: f10d 0107 add.w r1, sp, #7 802d7f0: f7fa f9b8 bl 8027b64 strcat(buf, "\",\"out_freq\":\""); 802d7f4: 4620 mov r0, r4 802d7f6: 4958 ldr r1, [pc, #352] ; (802d958 ) 802d7f8: f7f4 fb38 bl 8021e6c strncat(buf, str, len); 802d7fc: f89d 2007 ldrb.w r2, [sp, #7] 802d800: a902 add r1, sp, #8 802d802: 4620 mov r0, r4 802d804: f7f4 fcd4 bl 80221b0 GetPowerStr(str, &len); 802d808: a802 add r0, sp, #8 802d80a: f10d 0107 add.w r1, sp, #7 802d80e: f7fa f9eb bl 8027be8 strcat(buf, "\",\"pwr\":\""); 802d812: 4620 mov r0, r4 802d814: 4951 ldr r1, [pc, #324] ; (802d95c ) 802d816: f7f4 fb29 bl 8021e6c strncat(buf, str, len); 802d81a: f89d 2007 ldrb.w r2, [sp, #7] 802d81e: a902 add r1, sp, #8 802d820: 4620 mov r0, r4 802d822: f7f4 fcc5 bl 80221b0 GetBatCapacityStr(str, &len); 802d826: a802 add r0, sp, #8 802d828: f10d 0107 add.w r1, sp, #7 802d82c: f7fa f9ee bl 8027c0c strcat(buf, "\",\"bat_cap\":\""); 802d830: 4620 mov r0, r4 802d832: 494b ldr r1, [pc, #300] ; (802d960 ) 802d834: f7f4 fb1a bl 8021e6c strncat(buf, str, len); 802d838: f89d 2007 ldrb.w r2, [sp, #7] 802d83c: a902 add r1, sp, #8 802d83e: 4620 mov r0, r4 802d840: f7f4 fcb6 bl 80221b0 GetInternalTempStr(str, &len); 802d844: a802 add r0, sp, #8 802d846: f10d 0107 add.w r1, sp, #7 802d84a: f7fa fa03 bl 8027c54 strcat(buf, "\",\"inner_temp\":\""); 802d84e: 4620 mov r0, r4 802d850: 4944 ldr r1, [pc, #272] ; (802d964 ) 802d852: f7f4 fb0b bl 8021e6c strncat(buf, str, len); 802d856: f89d 2007 ldrb.w r2, [sp, #7] 802d85a: a902 add r1, sp, #8 802d85c: 4620 mov r0, r4 802d85e: f7f4 fca7 bl 80221b0 GetRuntimeStr(str, &len); 802d862: a802 add r0, sp, #8 802d864: f10d 0107 add.w r1, sp, #7 802d868: f7fa f9e2 bl 8027c30 strcat(buf, "\",\"bat_time_left\":\""); 802d86c: 4620 mov r0, r4 802d86e: 493e ldr r1, [pc, #248] ; (802d968 ) 802d870: f7f4 fafc bl 8021e6c strncat(buf, str, len); 802d874: a902 add r1, sp, #8 802d876: f89d 2007 ldrb.w r2, [sp, #7] 802d87a: 4620 mov r0, r4 802d87c: f7f4 fc98 bl 80221b0 GetDINStatusStr(str, &len, 0); 802d880: 2200 movs r2, #0 802d882: a802 add r0, sp, #8 802d884: f10d 0107 add.w r1, sp, #7 802d888: f7fa fae8 bl 8027e5c strcat(buf, "\",\"di1\":\""); 802d88c: 4620 mov r0, r4 802d88e: 4937 ldr r1, [pc, #220] ; (802d96c ) 802d890: f7f4 faec bl 8021e6c strncat(buf, str, len); 802d894: a902 add r1, sp, #8 802d896: f89d 2007 ldrb.w r2, [sp, #7] 802d89a: 4620 mov r0, r4 802d89c: f7f4 fc88 bl 80221b0 GetDOUTStatusStr(str, &len, 0); 802d8a0: a802 add r0, sp, #8 802d8a2: f10d 0107 add.w r1, sp, #7 802d8a6: 2200 movs r2, #0 802d8a8: f7fa fb12 bl 8027ed0 strcat(buf, "\",\"ro1\":\""); 802d8ac: 4620 mov r0, r4 802d8ae: 4930 ldr r1, [pc, #192] ; (802d970 ) 802d8b0: f7f4 fadc bl 8021e6c strncat(buf, str, len); 802d8b4: a902 add r1, sp, #8 802d8b6: f89d 2007 ldrb.w r2, [sp, #7] 802d8ba: 4620 mov r0, r4 802d8bc: f7f4 fc78 bl 80221b0 GetDOUTStatusStr(str, &len, 1); 802d8c0: 2201 movs r2, #1 802d8c2: a802 add r0, sp, #8 802d8c4: f10d 0107 add.w r1, sp, #7 802d8c8: f7fa fb02 bl 8027ed0 strcat(buf, "\",\"ro2\":\""); 802d8cc: 4620 mov r0, r4 802d8ce: 4929 ldr r1, [pc, #164] ; (802d974 ) 802d8d0: f7f4 facc bl 8021e6c strncat(buf, str, len); 802d8d4: f89d 2007 ldrb.w r2, [sp, #7] 802d8d8: a902 add r1, sp, #8 802d8da: 4620 mov r0, r4 802d8dc: f7f4 fc68 bl 80221b0 // Мониторинг // load_monitor (нагрузка, 0 - норма, 1 - fail) // temp_monitor (внутреннÑÑ Ñ‚ÐµÐ¼Ð¿ÐµÑ€Ð°Ñ‚ÑƒÑ€Ð°, 0 - норма, 1 - fail) // connect_monitor (ÑвÑзь Ñ UPSом, 0 - норма, 1 - fail) GetAlarmMonitorStr(str, &len); 802d8e0: a802 add r0, sp, #8 802d8e2: f10d 0107 add.w r1, sp, #7 802d8e6: f7fa f9cb bl 8027c80 strcat(buf, "\",\"m_alarm\":\""); 802d8ea: 4620 mov r0, r4 802d8ec: 4922 ldr r1, [pc, #136] ; (802d978 ) 802d8ee: f7f4 fabd bl 8021e6c strncat(buf, str, len); 802d8f2: f89d 2007 ldrb.w r2, [sp, #7] 802d8f6: a902 add r1, sp, #8 802d8f8: 4620 mov r0, r4 802d8fa: f7f4 fc59 bl 80221b0 GetAlarmStr(str, &len); 802d8fe: a802 add r0, sp, #8 802d900: f10d 0107 add.w r1, sp, #7 802d904: f7fa f9e6 bl 8027cd4 strcat(buf, "\",\"u_alarm\":\""); 802d908: 4620 mov r0, r4 802d90a: 491c ldr r1, [pc, #112] ; (802d97c ) 802d90c: f7f4 faae bl 8021e6c strncat(buf, str, len); 802d910: f89d 2007 ldrb.w r2, [sp, #7] 802d914: a902 add r1, sp, #8 802d916: 4620 mov r0, r4 802d918: f7f4 fc4a bl 80221b0 // Признак Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ñетевых наÑтроек GetWebReinitFlag(str, &len); 802d91c: a802 add r0, sp, #8 802d91e: f10d 0107 add.w r1, sp, #7 802d922: f7fa fd43 bl 80283ac strcat(buf, "\",\"netsettings_changed\":\""); 802d926: 4620 mov r0, r4 802d928: 4915 ldr r1, [pc, #84] ; (802d980 ) 802d92a: f7f4 fa9f bl 8021e6c strncat(buf, str, len); 802d92e: a902 add r1, sp, #8 802d930: f89d 2007 ldrb.w r2, [sp, #7] 802d934: 4620 mov r0, r4 802d936: f7f4 fc3b bl 80221b0 strncat(buf, "\"}", 2); 802d93a: 4620 mov r0, r4 802d93c: 4911 ldr r1, [pc, #68] ; (802d984 ) 802d93e: 2202 movs r2, #2 802d940: f7f4 fc36 bl 80221b0 //printf(buf); } 802d944: b00c add sp, #48 ; 0x30 802d946: bd10 pop {r4, pc} 802d948: 08043c40 .word 0x08043c40 802d94c: 08043c6c .word 0x08043c6c 802d950: 08043c74 .word 0x08043c74 802d954: 08043c7d .word 0x08043c7d 802d958: 08043c8b .word 0x08043c8b 802d95c: 08043c9a .word 0x08043c9a 802d960: 08043ca4 .word 0x08043ca4 802d964: 08043cb2 .word 0x08043cb2 802d968: 08043cc3 .word 0x08043cc3 802d96c: 08043cd7 .word 0x08043cd7 802d970: 08043ce1 .word 0x08043ce1 802d974: 08043ceb .word 0x08043ceb 802d978: 08043cf5 .word 0x08043cf5 802d97c: 08043d03 .word 0x08043d03 802d980: 08043d11 .word 0x08043d11 802d984: 08043d2b .word 0x08043d2b 0802d988 : /** * @brief ВозвращÑет Ñтроку Ñ Ð½Ð°Ñтройками на второй Ñтранице * @retval None */ void HTTP_GetSettings(char *buf) { 802d988: 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"); 802d98a: 49bf ldr r1, [pc, #764] ; (802dc88 ) /** * @brief ВозвращÑет Ñтроку Ñ Ð½Ð°Ñтройками на второй Ñтранице * @retval None */ void HTTP_GetSettings(char *buf) { 802d98c: b08a sub sp, #40 ; 0x28 802d98e: 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"); 802d990: f7f4 fb80 bl 8022094 /* SNMP */ GetReadCommunity(str, &len); 802d994: a802 add r0, sp, #8 802d996: f10d 0107 add.w r1, sp, #7 802d99a: f7fa fc37 bl 802820c strcat(buf, "{\"read_community\":\""); 802d99e: 4620 mov r0, r4 802d9a0: 49ba ldr r1, [pc, #744] ; (802dc8c ) 802d9a2: f7f4 fa63 bl 8021e6c strncat(buf, str, len); 802d9a6: f89d 2007 ldrb.w r2, [sp, #7] 802d9aa: a902 add r1, sp, #8 802d9ac: 4620 mov r0, r4 802d9ae: f7f4 fbff bl 80221b0 GetWriteCommunity(str, &len); 802d9b2: a802 add r0, sp, #8 802d9b4: f10d 0107 add.w r1, sp, #7 802d9b8: f7fa fc38 bl 802822c strcat(buf, "\",\"write_community\":\""); 802d9bc: 4620 mov r0, r4 802d9be: 49b4 ldr r1, [pc, #720] ; (802dc90 ) 802d9c0: f7f4 fa54 bl 8021e6c strncat(buf, str, len); 802d9c4: f89d 2007 ldrb.w r2, [sp, #7] 802d9c8: a902 add r1, sp, #8 802d9ca: 4620 mov r0, r4 802d9cc: f7f4 fbf0 bl 80221b0 GetManagerIp(str, &len); 802d9d0: a802 add r0, sp, #8 802d9d2: f10d 0107 add.w r1, sp, #7 802d9d6: f7fa fc39 bl 802824c strcat(buf, "\",\"managerIP\":\""); 802d9da: 4620 mov r0, r4 802d9dc: 49ad ldr r1, [pc, #692] ; (802dc94 ) 802d9de: f7f4 fa45 bl 8021e6c strncat(buf, str, len); 802d9e2: f89d 2007 ldrb.w r2, [sp, #7] 802d9e6: a902 add r1, sp, #8 802d9e8: 4620 mov r0, r4 802d9ea: f7f4 fbe1 bl 80221b0 GetManagerIp2(str, &len); 802d9ee: a802 add r0, sp, #8 802d9f0: f10d 0107 add.w r1, sp, #7 802d9f4: f7fa fc3a bl 802826c strcat(buf, "\",\"managerIP2\":\""); 802d9f8: 4620 mov r0, r4 802d9fa: 49a7 ldr r1, [pc, #668] ; (802dc98 ) 802d9fc: f7f4 fa36 bl 8021e6c strncat(buf, str, len); 802da00: f89d 2007 ldrb.w r2, [sp, #7] 802da04: a902 add r1, sp, #8 802da06: 4620 mov r0, r4 802da08: f7f4 fbd2 bl 80221b0 GetManagerIp3(str, &len); 802da0c: a802 add r0, sp, #8 802da0e: f10d 0107 add.w r1, sp, #7 802da12: f7fa fc3b bl 802828c strcat(buf, "\",\"managerIP3\":\""); 802da16: 4620 mov r0, r4 802da18: 49a0 ldr r1, [pc, #640] ; (802dc9c ) 802da1a: f7f4 fa27 bl 8021e6c strncat(buf, str, len); 802da1e: f89d 2007 ldrb.w r2, [sp, #7] 802da22: a902 add r1, sp, #8 802da24: 4620 mov r0, r4 802da26: f7f4 fbc3 bl 80221b0 GetManagerIp4(str, &len); 802da2a: a802 add r0, sp, #8 802da2c: f10d 0107 add.w r1, sp, #7 802da30: f7fa fc3c bl 80282ac strcat(buf, "\",\"managerIP4\":\""); 802da34: 4620 mov r0, r4 802da36: 499a ldr r1, [pc, #616] ; (802dca0 ) 802da38: f7f4 fa18 bl 8021e6c strncat(buf, str, len); 802da3c: f89d 2007 ldrb.w r2, [sp, #7] 802da40: a902 add r1, sp, #8 802da42: 4620 mov r0, r4 802da44: f7f4 fbb4 bl 80221b0 GetManagerIp5(str, &len); 802da48: a802 add r0, sp, #8 802da4a: f10d 0107 add.w r1, sp, #7 802da4e: f7fa fc3d bl 80282cc strcat(buf, "\",\"managerIP5\":\""); 802da52: 4620 mov r0, r4 802da54: 4993 ldr r1, [pc, #588] ; (802dca4 ) 802da56: f7f4 fa09 bl 8021e6c strncat(buf, str, len); 802da5a: a902 add r1, sp, #8 802da5c: f89d 2007 ldrb.w r2, [sp, #7] 802da60: 4620 mov r0, r4 802da62: f7f4 fba5 bl 80221b0 /*Параметры реле и Ñухих контактов*/ GetDINTypeActStr(str, &len, 0); 802da66: 2200 movs r2, #0 802da68: a802 add r0, sp, #8 802da6a: f10d 0107 add.w r1, sp, #7 802da6e: f7fa f9e1 bl 8027e34 strcat(buf, "\",\"di1\":\""); 802da72: 4620 mov r0, r4 802da74: 498c ldr r1, [pc, #560] ; (802dca8 ) 802da76: f7f4 f9f9 bl 8021e6c strncat(buf, str, len); 802da7a: a902 add r1, sp, #8 802da7c: f89d 2007 ldrb.w r2, [sp, #7] 802da80: 4620 mov r0, r4 802da82: f7f4 fb95 bl 80221b0 GetROTypeActStr(str, &len, 0); 802da86: 2200 movs r2, #0 802da88: a802 add r0, sp, #8 802da8a: f10d 0107 add.w r1, sp, #7 802da8e: f7fa fa0b bl 8027ea8 strcat(buf, "\",\"ro1\":\""); 802da92: 4620 mov r0, r4 802da94: 4985 ldr r1, [pc, #532] ; (802dcac ) 802da96: f7f4 f9e9 bl 8021e6c strncat(buf, str, len); 802da9a: a902 add r1, sp, #8 802da9c: f89d 2007 ldrb.w r2, [sp, #7] 802daa0: 4620 mov r0, r4 802daa2: f7f4 fb85 bl 80221b0 GetROTypeActStr(str, &len, 1); 802daa6: 2201 movs r2, #1 802daa8: a802 add r0, sp, #8 802daaa: f10d 0107 add.w r1, sp, #7 802daae: f7fa f9fb bl 8027ea8 strcat(buf, "\",\"ro2\":\""); 802dab2: 4620 mov r0, r4 802dab4: 497e ldr r1, [pc, #504] ; (802dcb0 ) 802dab6: f7f4 f9d9 bl 8021e6c strncat(buf, str, len); 802daba: f89d 2007 ldrb.w r2, [sp, #7] 802dabe: a902 add r1, sp, #8 802dac0: 4620 mov r0, r4 802dac2: f7f4 fb75 bl 80221b0 /* WEB */ GetIpStr(str, &len); 802dac6: a802 add r0, sp, #8 802dac8: f10d 0107 add.w r1, sp, #7 802dacc: f7fa fb48 bl 8028160 strcat(buf, "\",\"ipaddr\":\""); 802dad0: 4620 mov r0, r4 802dad2: 4978 ldr r1, [pc, #480] ; (802dcb4 ) 802dad4: f7f4 f9ca bl 8021e6c strncat(buf, str, len); 802dad8: f89d 2007 ldrb.w r2, [sp, #7] 802dadc: a902 add r1, sp, #8 802dade: 4620 mov r0, r4 802dae0: f7f4 fb66 bl 80221b0 GetGatewayStr(str, &len); 802dae4: a802 add r0, sp, #8 802dae6: f10d 0107 add.w r1, sp, #7 802daea: f7fa fb4f bl 802818c strcat(buf, "\",\"gw\":\""); 802daee: 4620 mov r0, r4 802daf0: 4971 ldr r1, [pc, #452] ; (802dcb8 ) 802daf2: f7f4 f9bb bl 8021e6c strncat(buf, str, len); 802daf6: f89d 2007 ldrb.w r2, [sp, #7] 802dafa: a902 add r1, sp, #8 802dafc: 4620 mov r0, r4 802dafe: f7f4 fb57 bl 80221b0 GetMaskStr(str, &len); 802db02: a802 add r0, sp, #8 802db04: f10d 0107 add.w r1, sp, #7 802db08: f7fa fb56 bl 80281b8 strcat(buf, "\",\"mask\":\""); 802db0c: 4620 mov r0, r4 802db0e: 496b ldr r1, [pc, #428] ; (802dcbc ) 802db10: f7f4 f9ac bl 8021e6c strncat(buf, str, len); 802db14: f89d 2007 ldrb.w r2, [sp, #7] 802db18: a902 add r1, sp, #8 802db1a: 4620 mov r0, r4 802db1c: f7f4 fb48 bl 80221b0 GetDhcpStateStr(str, &len); 802db20: a802 add r0, sp, #8 802db22: f10d 0107 add.w r1, sp, #7 802db26: f7fa fb5d bl 80281e4 strcat(buf, "\",\"dhcp\":"); 802db2a: 4620 mov r0, r4 802db2c: 4964 ldr r1, [pc, #400] ; (802dcc0 ) 802db2e: f7f4 f99d bl 8021e6c strncat(buf, str, len); 802db32: f89d 2007 ldrb.w r2, [sp, #7] 802db36: a902 add r1, sp, #8 802db38: 4620 mov r0, r4 802db3a: f7f4 fb39 bl 80221b0 GetAuthEnableStateStr(str, &len); 802db3e: a802 add r0, sp, #8 802db40: f10d 0107 add.w r1, sp, #7 802db44: f7fa fc24 bl 8028390 strcat(buf, ",\"auth\":"); 802db48: 4620 mov r0, r4 802db4a: 495e ldr r1, [pc, #376] ; (802dcc4 ) 802db4c: f7f4 f98e bl 8021e6c strncat(buf, str, len); 802db50: f89d 2007 ldrb.w r2, [sp, #7] 802db54: a902 add r1, sp, #8 802db56: 4620 mov r0, r4 802db58: f7f4 fb2a bl 80221b0 /* RADIUS */ GetRDSIpStr(str, &len); 802db5c: a802 add r0, sp, #8 802db5e: f10d 0107 add.w r1, sp, #7 802db62: f7fa fbc3 bl 80282ec strcat(buf, ",\"rs_server\":\""); 802db66: 4620 mov r0, r4 802db68: 4957 ldr r1, [pc, #348] ; (802dcc8 ) 802db6a: f7f4 f97f bl 8021e6c strncat(buf, str, len); 802db6e: f89d 2007 ldrb.w r2, [sp, #7] 802db72: a902 add r1, sp, #8 802db74: 4620 mov r0, r4 802db76: f7f4 fb1b bl 80221b0 GetRDSPortStr(str, &len); 802db7a: a802 add r0, sp, #8 802db7c: f10d 0107 add.w r1, sp, #7 802db80: f7fa fbc4 bl 802830c strcat(buf, "\",\"rs_port\":\""); 802db84: 4620 mov r0, r4 802db86: 4951 ldr r1, [pc, #324] ; (802dccc ) 802db88: f7f4 f970 bl 8021e6c strncat(buf, str, len); 802db8c: f89d 2007 ldrb.w r2, [sp, #7] 802db90: a902 add r1, sp, #8 802db92: 4620 mov r0, r4 802db94: f7f4 fb0c bl 80221b0 GetRDSPasswordkStr(str, &len); 802db98: a802 add r0, sp, #8 802db9a: f10d 0107 add.w r1, sp, #7 802db9e: f7fa fbd9 bl 8028354 strcat(buf, "\",\"rs_pwd\":\""); 802dba2: 4620 mov r0, r4 802dba4: 494a ldr r1, [pc, #296] ; (802dcd0 ) 802dba6: f7f4 f961 bl 8021e6c strncat(buf, str, len); 802dbaa: f89d 2007 ldrb.w r2, [sp, #7] 802dbae: a902 add r1, sp, #8 802dbb0: 4620 mov r0, r4 802dbb2: f7f4 fafd bl 80221b0 GetRDSKeyAccesstStr(str, &len); 802dbb6: a802 add r0, sp, #8 802dbb8: f10d 0107 add.w r1, sp, #7 802dbbc: f7fa fbb8 bl 8028330 strcat(buf, "\",\"rs_key\":\""); 802dbc0: 4620 mov r0, r4 802dbc2: 4944 ldr r1, [pc, #272] ; (802dcd4 ) 802dbc4: f7f4 f952 bl 8021e6c strncat(buf, str, len); 802dbc8: f89d 2007 ldrb.w r2, [sp, #7] 802dbcc: a902 add r1, sp, #8 802dbce: 4620 mov r0, r4 802dbd0: f7f4 faee bl 80221b0 GetRDSEnableStateStr(str, &len); 802dbd4: a802 add r0, sp, #8 802dbd6: f10d 0107 add.w r1, sp, #7 802dbda: f7fa fbcb bl 8028374 strcat(buf, "\",\"rs_enabled\":"); 802dbde: 4620 mov r0, r4 802dbe0: 493d ldr r1, [pc, #244] ; (802dcd8 ) 802dbe2: f7f4 f943 bl 8021e6c strncat(buf, str, len); 802dbe6: f89d 2007 ldrb.w r2, [sp, #7] 802dbea: a902 add r1, sp, #8 802dbec: 4620 mov r0, r4 802dbee: f7f4 fadf bl 80221b0 /* Параметры даты и времени */ GetDateStr(str, &len); 802dbf2: a802 add r0, sp, #8 802dbf4: f10d 0107 add.w r1, sp, #7 802dbf8: f7fa f87e bl 8027cf8 strcat(buf, ",\"date\":\""); 802dbfc: 4620 mov r0, r4 802dbfe: 4937 ldr r1, [pc, #220] ; (802dcdc ) 802dc00: f7f4 f934 bl 8021e6c strncat(buf, str, len); 802dc04: f89d 2007 ldrb.w r2, [sp, #7] 802dc08: a902 add r1, sp, #8 802dc0a: 4620 mov r0, r4 802dc0c: f7f4 fad0 bl 80221b0 GetTimeStr(str, &len); 802dc10: a802 add r0, sp, #8 802dc12: f10d 0107 add.w r1, sp, #7 802dc16: f7fa f88d bl 8027d34 strcat(buf, "\",\"time\":\""); 802dc1a: 4620 mov r0, r4 802dc1c: 4930 ldr r1, [pc, #192] ; (802dce0 ) 802dc1e: f7f4 f925 bl 8021e6c strncat(buf, str, len); 802dc22: f89d 2007 ldrb.w r2, [sp, #7] 802dc26: a902 add r1, sp, #8 802dc28: 4620 mov r0, r4 802dc2a: f7f4 fac1 bl 80221b0 /* Параметры SNTP */ GetSntpStateStr(str, &len); 802dc2e: a802 add r0, sp, #8 802dc30: f10d 0107 add.w r1, sp, #7 802dc34: f7fa f8ac bl 8027d90 strcat(buf, "\",\"ntp\":\""); 802dc38: 4620 mov r0, r4 802dc3a: 492a ldr r1, [pc, #168] ; (802dce4 ) 802dc3c: f7f4 f916 bl 8021e6c strncat(buf, str, len); 802dc40: f89d 2007 ldrb.w r2, [sp, #7] 802dc44: a902 add r1, sp, #8 802dc46: 4620 mov r0, r4 802dc48: f7f4 fab2 bl 80221b0 GetSntpServerIpStr(str, &len); 802dc4c: a802 add r0, sp, #8 802dc4e: f10d 0107 add.w r1, sp, #7 802dc52: f7fa f8b7 bl 8027dc4 strcat(buf, "\",\"ntpservip\":\""); 802dc56: 4620 mov r0, r4 802dc58: 4923 ldr r1, [pc, #140] ; (802dce8 ) 802dc5a: f7f4 f907 bl 8021e6c strncat(buf, str, len); 802dc5e: f89d 2007 ldrb.w r2, [sp, #7] 802dc62: a902 add r1, sp, #8 802dc64: 4620 mov r0, r4 802dc66: f7f4 faa3 bl 80221b0 GetSntpTimeZoneStr(str, &len); 802dc6a: a802 add r0, sp, #8 802dc6c: f10d 0107 add.w r1, sp, #7 802dc70: f7fa f8b8 bl 8027de4 strcat(buf, "\",\"utc\":\""); 802dc74: 4620 mov r0, r4 802dc76: 491d ldr r1, [pc, #116] ; (802dcec ) 802dc78: f7f4 f8f8 bl 8021e6c strncat(buf, str, len); 802dc7c: f89d 2007 ldrb.w r2, [sp, #7] 802dc80: a902 add r1, sp, #8 802dc82: 4620 mov r0, r4 802dc84: e034 b.n 802dcf0 802dc86: bf00 nop 802dc88: 08043c40 .word 0x08043c40 802dc8c: 08043d2e .word 0x08043d2e 802dc90: 08043d42 .word 0x08043d42 802dc94: 08043d58 .word 0x08043d58 802dc98: 08043d68 .word 0x08043d68 802dc9c: 08043d79 .word 0x08043d79 802dca0: 08043d8a .word 0x08043d8a 802dca4: 08043d9b .word 0x08043d9b 802dca8: 08043cd7 .word 0x08043cd7 802dcac: 08043ce1 .word 0x08043ce1 802dcb0: 08043ceb .word 0x08043ceb 802dcb4: 08043dac .word 0x08043dac 802dcb8: 08043db9 .word 0x08043db9 802dcbc: 08043dc2 .word 0x08043dc2 802dcc0: 08043dcd .word 0x08043dcd 802dcc4: 08043dd7 .word 0x08043dd7 802dcc8: 08043de0 .word 0x08043de0 802dccc: 08043def .word 0x08043def 802dcd0: 08043dfd .word 0x08043dfd 802dcd4: 08043e0a .word 0x08043e0a 802dcd8: 08043e17 .word 0x08043e17 802dcdc: 08043e27 .word 0x08043e27 802dce0: 08043e31 .word 0x08043e31 802dce4: 08043e3c .word 0x08043e3c 802dce8: 08043e46 .word 0x08043e46 802dcec: 08043e56 .word 0x08043e56 802dcf0: f7f4 fa5e bl 80221b0 GetUnixTimeStr(str, &len); 802dcf4: a802 add r0, sp, #8 802dcf6: f10d 0107 add.w r1, sp, #7 802dcfa: f7fa f833 bl 8027d64 strcat(buf, "\",\"utm\":\""); 802dcfe: 4620 mov r0, r4 802dd00: 4916 ldr r1, [pc, #88] ; (802dd5c ) 802dd02: f7f4 f8b3 bl 8021e6c strncat(buf, str, len); 802dd06: f89d 2007 ldrb.w r2, [sp, #7] 802dd0a: a902 add r1, sp, #8 802dd0c: 4620 mov r0, r4 802dd0e: f7f4 fa4f bl 80221b0 GetSntpLastDataStr(str, &len); 802dd12: a802 add r0, sp, #8 802dd14: f10d 0107 add.w r1, sp, #7 802dd18: f7fa f87c bl 8027e14 strcat(buf, "\",\"lastsynctime\":\""); 802dd1c: 4620 mov r0, r4 802dd1e: 4910 ldr r1, [pc, #64] ; (802dd60 ) 802dd20: f7f4 f8a4 bl 8021e6c strncat(buf, str, len); 802dd24: f89d 2007 ldrb.w r2, [sp, #7] 802dd28: a902 add r1, sp, #8 802dd2a: 4620 mov r0, r4 802dd2c: f7f4 fa40 bl 80221b0 /* Признак Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ñетевых наÑтроек */ GetWebReinitFlag(str, &len); 802dd30: a802 add r0, sp, #8 802dd32: f10d 0107 add.w r1, sp, #7 802dd36: f7fa fb39 bl 80283ac strcat(buf, "\",\"netsettings_changed\":\""); 802dd3a: 4620 mov r0, r4 802dd3c: 4909 ldr r1, [pc, #36] ; (802dd64 ) 802dd3e: f7f4 f895 bl 8021e6c strncat(buf, str, len); 802dd42: a902 add r1, sp, #8 802dd44: f89d 2007 ldrb.w r2, [sp, #7] 802dd48: 4620 mov r0, r4 802dd4a: f7f4 fa31 bl 80221b0 strncat(buf, "\"}", 2); 802dd4e: 4620 mov r0, r4 802dd50: 4905 ldr r1, [pc, #20] ; (802dd68 ) 802dd52: 2202 movs r2, #2 802dd54: f7f4 fa2c bl 80221b0 //printf(buf); } 802dd58: b00a add sp, #40 ; 0x28 802dd5a: bd10 pop {r4, pc} 802dd5c: 08043e60 .word 0x08043e60 802dd60: 08043e6a .word 0x08043e6a 802dd64: 08043d11 .word 0x08043d11 802dd68: 08043d2b .word 0x08043d2b 0802dd6c : * @brief ВозвращÑет Ñтроку Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸ÐµÐ¹ об уÑтройÑтве * @retval None */ // TODO СоглаÑовать макÑимальную длину Ñтрок void HTTP_GetInfo(char *buf) { 802dd6c: 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"); 802dd6e: 4960 ldr r1, [pc, #384] ; (802def0 ) * @brief ВозвращÑет Ñтроку Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸ÐµÐ¹ об уÑтройÑтве * @retval None */ // TODO СоглаÑовать макÑимальную длину Ñтрок void HTTP_GetInfo(char *buf) { 802dd70: b08c sub sp, #48 ; 0x30 802dd72: 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"); 802dd74: f7f4 f98e bl 8022094 GetWorkTimeStr(str, &len); 802dd78: a802 add r0, sp, #8 802dd7a: f10d 0107 add.w r1, sp, #7 802dd7e: f7fa f8df bl 8027f40 strcat(buf, "{\"uptime\":\""); 802dd82: 4620 mov r0, r4 802dd84: 495b ldr r1, [pc, #364] ; (802def4 ) 802dd86: f7f4 f871 bl 8021e6c strncat(buf, str, len); 802dd8a: f89d 2007 ldrb.w r2, [sp, #7] 802dd8e: a902 add r1, sp, #8 802dd90: 4620 mov r0, r4 802dd92: f7f4 fa0d bl 80221b0 GetModelStr(str, &len); 802dd96: a802 add r0, sp, #8 802dd98: f10d 0107 add.w r1, sp, #7 802dd9c: f7fa f8f6 bl 8027f8c strcat(buf, "\",\"model\":\""); 802dda0: 4620 mov r0, r4 802dda2: 4955 ldr r1, [pc, #340] ; (802def8 ) 802dda4: f7f4 f862 bl 8021e6c strncat(buf, str, len); 802dda8: f89d 2007 ldrb.w r2, [sp, #7] 802ddac: a902 add r1, sp, #8 802ddae: 4620 mov r0, r4 802ddb0: f7f4 f9fe bl 80221b0 GetProductionDataStr(str, &len); 802ddb4: a802 add r0, sp, #8 802ddb6: f10d 0107 add.w r1, sp, #7 802ddba: f7fa f8f9 bl 8027fb0 strcat(buf, "\",\"prodate\":\""); 802ddbe: 4620 mov r0, r4 802ddc0: 494e ldr r1, [pc, #312] ; (802defc ) 802ddc2: f7f4 f853 bl 8021e6c strncat(buf, str, len); 802ddc6: f89d 2007 ldrb.w r2, [sp, #7] 802ddca: a902 add r1, sp, #8 802ddcc: 4620 mov r0, r4 802ddce: f7f4 f9ef bl 80221b0 GetVersionStr(str, &len); 802ddd2: a802 add r0, sp, #8 802ddd4: f10d 0107 add.w r1, sp, #7 802ddd8: f7fa f8fc bl 8027fd4 strcat(buf, "\",\"fwversion\":\""); 802dddc: 4620 mov r0, r4 802ddde: 4948 ldr r1, [pc, #288] ; (802df00 ) 802dde0: f7f4 f844 bl 8021e6c strncat(buf, str, len); 802dde4: f89d 2007 ldrb.w r2, [sp, #7] 802dde8: a902 add r1, sp, #8 802ddea: 4620 mov r0, r4 802ddec: f7f4 f9e0 bl 80221b0 GetMacStr(str, &len); 802ddf0: a802 add r0, sp, #8 802ddf2: f10d 0107 add.w r1, sp, #7 802ddf6: f7fa f8ff bl 8027ff8 strcat(buf, "\",\"macaddr\":\""); 802ddfa: 4620 mov r0, r4 802ddfc: 4941 ldr r1, [pc, #260] ; (802df04 ) 802ddfe: f7f4 f835 bl 8021e6c strncat(buf, str, len); 802de02: f89d 2007 ldrb.w r2, [sp, #7] 802de06: a902 add r1, sp, #8 802de08: 4620 mov r0, r4 802de0a: f7f4 f9d1 bl 80221b0 GetSerialNumberStr(str, &len); 802de0e: a802 add r0, sp, #8 802de10: f10d 0107 add.w r1, sp, #7 802de14: f7fa f902 bl 802801c strcat(buf, "\",\"serno\":\""); 802de18: 4620 mov r0, r4 802de1a: 493b ldr r1, [pc, #236] ; (802df08 ) 802de1c: f7f4 f826 bl 8021e6c strncat(buf, str, len); 802de20: f89d 2007 ldrb.w r2, [sp, #7] 802de24: a902 add r1, sp, #8 802de26: 4620 mov r0, r4 802de28: f7f4 f9c2 bl 80221b0 GetOwnerStr(str, &len); 802de2c: a802 add r0, sp, #8 802de2e: f10d 0107 add.w r1, sp, #7 802de32: f7fa f905 bl 8028040 strcat(buf, "\",\"owner\":\""); 802de36: 4620 mov r0, r4 802de38: 4934 ldr r1, [pc, #208] ; (802df0c ) 802de3a: f7f4 f817 bl 8021e6c strncat(buf, str, len); 802de3e: f89d 2007 ldrb.w r2, [sp, #7] 802de42: a902 add r1, sp, #8 802de44: 4620 mov r0, r4 802de46: f7f4 f9b3 bl 80221b0 GetLocationStr(str, &len); 802de4a: a802 add r0, sp, #8 802de4c: f10d 0107 add.w r1, sp, #7 802de50: f7fa f908 bl 8028064 strcat(buf, "\",\"sysLocation\":\""); 802de54: 4620 mov r0, r4 802de56: 492e ldr r1, [pc, #184] ; (802df10 ) 802de58: f7f4 f808 bl 8021e6c strncat(buf, str, len); 802de5c: f89d 2007 ldrb.w r2, [sp, #7] 802de60: a902 add r1, sp, #8 802de62: 4620 mov r0, r4 802de64: f7f4 f9a4 bl 80221b0 GetCommentsStr(str, &len); 802de68: a802 add r0, sp, #8 802de6a: f10d 0107 add.w r1, sp, #7 802de6e: f7fa f90b bl 8028088 strcat(buf, "\",\"comment\":\""); 802de72: 4620 mov r0, r4 802de74: 4927 ldr r1, [pc, #156] ; (802df14 ) 802de76: f7f3 fff9 bl 8021e6c strncat(buf, str, len); 802de7a: f89d 2007 ldrb.w r2, [sp, #7] 802de7e: a902 add r1, sp, #8 802de80: 4620 mov r0, r4 802de82: f7f4 f995 bl 80221b0 GetUPSModelStr(str, &len); 802de86: a802 add r0, sp, #8 802de88: f10d 0107 add.w r1, sp, #7 802de8c: f7fa f90e bl 80280ac strcat(buf, "\",\"ups_model\":\""); 802de90: 4620 mov r0, r4 802de92: 4921 ldr r1, [pc, #132] ; (802df18 ) 802de94: f7f3 ffea bl 8021e6c strncat(buf, str, len); 802de98: f89d 2007 ldrb.w r2, [sp, #7] 802de9c: a902 add r1, sp, #8 802de9e: 4620 mov r0, r4 802dea0: f7f4 f986 bl 80221b0 GetUPSVersionStr(str, &len); 802dea4: a802 add r0, sp, #8 802dea6: f10d 0107 add.w r1, sp, #7 802deaa: f7fa f911 bl 80280d0 strcat(buf, "\",\"ups_fwversion\":\""); 802deae: 4620 mov r0, r4 802deb0: 491a ldr r1, [pc, #104] ; (802df1c ) 802deb2: f7f3 ffdb bl 8021e6c strncat(buf, str, len); 802deb6: f89d 2007 ldrb.w r2, [sp, #7] 802deba: a902 add r1, sp, #8 802debc: 4620 mov r0, r4 802debe: f7f4 f977 bl 80221b0 /* Признак Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ñетевых наÑтроек */ GetWebReinitFlag(str, &len); 802dec2: a802 add r0, sp, #8 802dec4: f10d 0107 add.w r1, sp, #7 802dec8: f7fa fa70 bl 80283ac strcat(buf, "\",\"netsettings_changed\":\""); 802decc: 4620 mov r0, r4 802dece: 4914 ldr r1, [pc, #80] ; (802df20 ) 802ded0: f7f3 ffcc bl 8021e6c strncat(buf, str, len); 802ded4: a902 add r1, sp, #8 802ded6: f89d 2007 ldrb.w r2, [sp, #7] 802deda: 4620 mov r0, r4 802dedc: f7f4 f968 bl 80221b0 strncat(buf, "\"}", 2); 802dee0: 4620 mov r0, r4 802dee2: 4910 ldr r1, [pc, #64] ; (802df24 ) 802dee4: 2202 movs r2, #2 802dee6: f7f4 f963 bl 80221b0 } 802deea: b00c add sp, #48 ; 0x30 802deec: bd10 pop {r4, pc} 802deee: bf00 nop 802def0: 08043c40 .word 0x08043c40 802def4: 08043e7d .word 0x08043e7d 802def8: 08043e89 .word 0x08043e89 802defc: 08043e95 .word 0x08043e95 802df00: 08043ea3 .word 0x08043ea3 802df04: 08043eb3 .word 0x08043eb3 802df08: 08043ec1 .word 0x08043ec1 802df0c: 08043ecd .word 0x08043ecd 802df10: 08043ed9 .word 0x08043ed9 802df14: 08043eeb .word 0x08043eeb 802df18: 08043ef9 .word 0x08043ef9 802df1c: 08043f09 .word 0x08043f09 802df20: 08043d11 .word 0x08043d11 802df24: 08043d2b .word 0x08043d2b 0802df28 : void HTTP_GetHistoryPage(char* buf, uint32_t pageNumber) { 802df28: b530 push {r4, r5, lr} 802df2a: 4605 mov r5, r0 802df2c: b087 sub sp, #28 802df2e: 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"); 802df30: 4927 ldr r1, [pc, #156] ; (802dfd0 ) 802df32: f7f4 f8af bl 8022094 strcat(buf, "{\"page\": ["); 802df36: 4628 mov r0, r5 802df38: 4926 ldr r1, [pc, #152] ; (802dfd4 ) 802df3a: f7f3 ff97 bl 8021e6c History_GetPage(buf, pageNumber); 802df3e: 4621 mov r1, r4 802df40: 4628 mov r0, r5 802df42: f7fc f8d7 bl 802a0f4 len = strlen(buf); 802df46: 4628 mov r0, r5 802df48: f7f4 f902 bl 8022150 802df4c: f8ad 0006 strh.w r0, [sp, #6] buf +=len-1; 802df50: b280 uxth r0, r0 802df52: 1e43 subs r3, r0, #1 802df54: 18ec adds r4, r5, r3 *buf = 0; 802df56: 2100 movs r1, #0 buf -=len-1; 802df58: f1c0 0001 rsb r0, r0, #1 strcat(buf, "{\"page\": ["); History_GetPage(buf, pageNumber); len = strlen(buf); buf +=len-1; *buf = 0; 802df5c: 54e9 strb r1, [r5, r3] buf -=len-1; 802df5e: 1824 adds r4, r4, r0 /* КоличеÑтво Ñтраниц */ memset(str, 0, 16); 802df60: 2210 movs r2, #16 802df62: a802 add r0, sp, #8 802df64: f7f3 ff1c bl 8021da0 sprintf(str, "%i", History_GetPageCount()); 802df68: f7fc f8b2 bl 802a0d0 802df6c: 491a ldr r1, [pc, #104] ; (802dfd8 ) 802df6e: 4602 mov r2, r0 802df70: a802 add r0, sp, #8 802df72: f7f9 fdd5 bl 8027b20 strcat(buf, "],\"pages\":\""); 802df76: 4620 mov r0, r4 802df78: 4918 ldr r1, [pc, #96] ; (802dfdc ) 802df7a: f7f3 ff77 bl 8021e6c strcat(buf, str); 802df7e: a902 add r1, sp, #8 802df80: 4620 mov r0, r4 802df82: f7f3 ff73 bl 8021e6c /* ЧаÑовой поÑÑ */ GetSntpTimeZoneStr(str, (uint8_t*)&len); 802df86: a802 add r0, sp, #8 802df88: f10d 0106 add.w r1, sp, #6 802df8c: f7f9 ff2a bl 8027de4 strcat(buf, "\",\"utc\":\""); 802df90: 4620 mov r0, r4 802df92: 4913 ldr r1, [pc, #76] ; (802dfe0 ) 802df94: f7f3 ff6a bl 8021e6c strncat(buf, str, len); 802df98: f8bd 2006 ldrh.w r2, [sp, #6] 802df9c: a902 add r1, sp, #8 802df9e: 4620 mov r0, r4 802dfa0: f7f4 f906 bl 80221b0 GetUnixTimeStr(str, (uint8_t*)&len); 802dfa4: a802 add r0, sp, #8 802dfa6: f10d 0106 add.w r1, sp, #6 802dfaa: f7f9 fedb bl 8027d64 strcat(buf, "\",\"utm\":\""); 802dfae: 4620 mov r0, r4 802dfb0: 490c ldr r1, [pc, #48] ; (802dfe4 ) 802dfb2: f7f3 ff5b bl 8021e6c strncat(buf, str, len); 802dfb6: a902 add r1, sp, #8 802dfb8: 4620 mov r0, r4 802dfba: f8bd 2006 ldrh.w r2, [sp, #6] 802dfbe: f7f4 f8f7 bl 80221b0 strcat(buf, "\"}"); 802dfc2: 4620 mov r0, r4 802dfc4: 4908 ldr r1, [pc, #32] ; (802dfe8 ) 802dfc6: f7f3 ff51 bl 8021e6c //printf(buf); } 802dfca: b007 add sp, #28 802dfcc: bd30 pop {r4, r5, pc} 802dfce: bf00 nop 802dfd0: 08043f1d .word 0x08043f1d 802dfd4: 08043f49 .word 0x08043f49 802dfd8: 08043f54 .word 0x08043f54 802dfdc: 08043f57 .word 0x08043f57 802dfe0: 08043e56 .word 0x08043e56 802dfe4: 08043e60 .word 0x08043e60 802dfe8: 08043d2b .word 0x08043d2b 0802dfec : void HTTP_GetUpsHistoryPage(char* buf, uint32_t pageNumber) { 802dfec: b530 push {r4, r5, lr} 802dfee: 4605 mov r5, r0 802dff0: b087 sub sp, #28 802dff2: 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"); 802dff4: 4927 ldr r1, [pc, #156] ; (802e094 ) 802dff6: f7f4 f84d bl 8022094 strcat(buf, "{\"page\": ["); 802dffa: 4628 mov r0, r5 802dffc: 4926 ldr r1, [pc, #152] ; (802e098 ) 802dffe: f7f3 ff35 bl 8021e6c LOG_GetPage(buf, pageNumber); 802e002: 4621 mov r1, r4 802e004: 4628 mov r0, r5 802e006: f7fb ff89 bl 8029f1c len = strlen(buf); 802e00a: 4628 mov r0, r5 802e00c: f7f4 f8a0 bl 8022150 802e010: f8ad 0006 strh.w r0, [sp, #6] buf +=len-1; 802e014: b280 uxth r0, r0 802e016: 1e43 subs r3, r0, #1 802e018: 18ec adds r4, r5, r3 *buf = 0; 802e01a: 2100 movs r1, #0 buf -=len-1; 802e01c: f1c0 0001 rsb r0, r0, #1 strcat(buf, "{\"page\": ["); LOG_GetPage(buf, pageNumber); len = strlen(buf); buf +=len-1; *buf = 0; 802e020: 54e9 strb r1, [r5, r3] buf -=len-1; 802e022: 1824 adds r4, r4, r0 /* КоличеÑтво Ñтраниц */ memset(str, 0, 16); 802e024: 2210 movs r2, #16 802e026: a802 add r0, sp, #8 802e028: f7f3 feba bl 8021da0 sprintf(str, "%i", LOG_GetPageCount()); 802e02c: f7fb ff64 bl 8029ef8 802e030: 491a ldr r1, [pc, #104] ; (802e09c ) 802e032: 4602 mov r2, r0 802e034: a802 add r0, sp, #8 802e036: f7f9 fd73 bl 8027b20 strcat(buf, "],\"pages\":\""); 802e03a: 4620 mov r0, r4 802e03c: 4918 ldr r1, [pc, #96] ; (802e0a0 ) 802e03e: f7f3 ff15 bl 8021e6c strcat(buf, str); 802e042: a902 add r1, sp, #8 802e044: 4620 mov r0, r4 802e046: f7f3 ff11 bl 8021e6c /* ЧаÑовой поÑÑ */ GetSntpTimeZoneStr(str, (uint8_t*)&len); 802e04a: a802 add r0, sp, #8 802e04c: f10d 0106 add.w r1, sp, #6 802e050: f7f9 fec8 bl 8027de4 strcat(buf, "\",\"utc\":\""); 802e054: 4620 mov r0, r4 802e056: 4913 ldr r1, [pc, #76] ; (802e0a4 ) 802e058: f7f3 ff08 bl 8021e6c strncat(buf, str, len); 802e05c: f8bd 2006 ldrh.w r2, [sp, #6] 802e060: a902 add r1, sp, #8 802e062: 4620 mov r0, r4 802e064: f7f4 f8a4 bl 80221b0 GetUnixTimeStr(str, (uint8_t*)&len); 802e068: a802 add r0, sp, #8 802e06a: f10d 0106 add.w r1, sp, #6 802e06e: f7f9 fe79 bl 8027d64 strcat(buf, "\",\"utm\":\""); 802e072: 4620 mov r0, r4 802e074: 490c ldr r1, [pc, #48] ; (802e0a8 ) 802e076: f7f3 fef9 bl 8021e6c strncat(buf, str, len); 802e07a: a902 add r1, sp, #8 802e07c: 4620 mov r0, r4 802e07e: f8bd 2006 ldrh.w r2, [sp, #6] 802e082: f7f4 f895 bl 80221b0 strcat(buf, "\"}"); 802e086: 4620 mov r0, r4 802e088: 4908 ldr r1, [pc, #32] ; (802e0ac ) 802e08a: f7f3 feef bl 8021e6c //printf(buf); } 802e08e: b007 add sp, #28 802e090: bd30 pop {r4, r5, pc} 802e092: bf00 nop 802e094: 08043f1d .word 0x08043f1d 802e098: 08043f49 .word 0x08043f49 802e09c: 08043f54 .word 0x08043f54 802e0a0: 08043f57 .word 0x08043f57 802e0a4: 08043e56 .word 0x08043e56 802e0a8: 08043e60 .word 0x08043e60 802e0ac: 08043d2b .word 0x08043d2b 0802e0b0 : /** * @brief Ð¡Ð±Ñ€Ð¾Ñ Ð½Ð°Ñтроек (вÑÑ‘ кроме Ñетевых параметров) */ void HTTP_ResetSettings(void) { 802e0b0: b508 push {r3, lr} //taskENTER_CRITICAL(); SNMP_SendUserTrap(DEVICE_RESTORED); 802e0b2: 2003 movs r0, #3 802e0b4: f009 fa4c bl 8037550 log_event_data(LOG_SYSTEM_DEFCONFIG, "ÐдминиÑтратор"); 802e0b8: 4906 ldr r1, [pc, #24] ; (802e0d4 ) 802e0ba: 2001 movs r0, #1 802e0bc: f7fb fedc bl 8029e78 vTaskDelay(500); 802e0c0: f44f 70fa mov.w r0, #500 ; 0x1f4 802e0c4: f7fd f94e bl 802b364 SETTINGS_SetPartDefault(); 802e0c8: f7fa fd94 bl 8028bf4 SETTINGS_Save(); //taskEXIT_CRITICAL(); } 802e0cc: e8bd 4008 ldmia.w sp!, {r3, lr} SNMP_SendUserTrap(DEVICE_RESTORED); log_event_data(LOG_SYSTEM_DEFCONFIG, "ÐдминиÑтратор"); vTaskDelay(500); SETTINGS_SetPartDefault(); SETTINGS_Save(); 802e0d0: f7fa bd24 b.w 8028b1c 802e0d4: 08038a86 .word 0x08038a86 0802e0d8 : /** * @brief Сохранение наÑтроек */ void HTTP_SaveSettings(void) { 802e0d8: b508 push {r3, lr} // taskENTER_CRITICAL(); SETTINGS_Save(); 802e0da: f7fa fd1f bl 8028b1c log_event_data(LOG_SETTING_SAVE, "ÐдминиÑтратор"); 802e0de: 4903 ldr r1, [pc, #12] ; (802e0ec ) 802e0e0: 2004 movs r0, #4 // taskEXIT_CRITICAL(); } 802e0e2: e8bd 4008 ldmia.w sp!, {r3, lr} { // taskENTER_CRITICAL(); SETTINGS_Save(); log_event_data(LOG_SETTING_SAVE, "ÐдминиÑтратор"); 802e0e6: f7fb bec7 b.w 8029e78 802e0ea: bf00 nop 802e0ec: 08038a86 .word 0x08038a86 0802e0f0 : /** * @brief */ void vTaskReboot(void * pvParameters) { 802e0f0: b510 push {r4, lr} 802e0f2: 4604 mov r4, r0 for (;;) { mode = *(bool*)pvParameters; if (mode) 802e0f4: 7823 ldrb r3, [r4, #0] 802e0f6: b16b cbz r3, 802e114 { SNMP_SendUserTrap(FW_VERSION_UPDATE); 802e0f8: 2001 movs r0, #1 802e0fa: f009 fa29 bl 8037550 log_event_data(LOG_UPDATE_SOFT, "ÐдминиÑтратор"); 802e0fe: 2002 movs r0, #2 802e100: 490a ldr r1, [pc, #40] ; (802e12c ) 802e102: f7fb feb9 bl 8029e78 SetLoadMode(); 802e106: f7fa f96b bl 80283e0 HTTP_SaveSettings(); 802e10a: f7ff ffe5 bl 802e0d8 vTaskDelay(2000); 802e10e: f44f 60fa mov.w r0, #2000 ; 0x7d0 802e112: e001 b.n 802e118 vTaskDelay(1010); Reboot(); } else { vTaskDelay(1000); 802e114: f44f 707a mov.w r0, #1000 ; 0x3e8 802e118: f7fd f924 bl 802b364 /* Блокируем управление ключем на тау Ñекунд*/ //IO_KeyBlockOn(); vTaskDelay(1010); 802e11c: f240 30f2 movw r0, #1010 ; 0x3f2 802e120: f7fd f920 bl 802b364 Reboot(); 802e124: f7fb f9b8 bl 8029498 802e128: e7e4 b.n 802e0f4 802e12a: bf00 nop 802e12c: 08038a86 .word 0x08038a86 0802e130 : /** * @brief Перезагрузка контроллера */ void HTTP_Reboot(void) { 802e130: b508 push {r3, lr} vTaskDelay(1010); 802e132: f240 30f2 movw r0, #1010 ; 0x3f2 802e136: f7fd f915 bl 802b364 Reboot(); } 802e13a: e8bd 4008 ldmia.w sp!, {r3, lr} * @brief Перезагрузка контроллера */ void HTTP_Reboot(void) { vTaskDelay(1010); Reboot(); 802e13e: f7fb b9ab b.w 8029498 802e142: 0000 movs r0, r0 0802e144 : * bootloader и перезапиÑаны наÑтройки * * false - Ð¾Ð±Ñ‹Ñ‡Ð½Ð°Ñ Ð¿ÐµÑ€ÐµÐ·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ° */ void HTTP_StartResetTask(bool fBootMode) { 802e144: b51f push {r0, r1, r2, r3, r4, lr} static bool temp; temp = fBootMode; 802e146: 4b07 ldr r3, [pc, #28] ; (802e164 ) xTaskCreate(vTaskReboot, "RebootTask", configMINIMAL_STACK_SIZE, 802e148: 4907 ldr r1, [pc, #28] ; (802e168 ) */ void HTTP_StartResetTask(bool fBootMode) { static bool temp; temp = fBootMode; 802e14a: 7018 strb r0, [r3, #0] xTaskCreate(vTaskReboot, "RebootTask", configMINIMAL_STACK_SIZE, 802e14c: 2200 movs r2, #0 802e14e: 9200 str r2, [sp, #0] 802e150: 9201 str r2, [sp, #4] 802e152: 9202 str r2, [sp, #8] 802e154: 9203 str r2, [sp, #12] 802e156: 4805 ldr r0, [pc, #20] ; (802e16c ) 802e158: 2280 movs r2, #128 ; 0x80 802e15a: f7fc fe69 bl 802ae30 (void*)&temp, tskIDLE_PRIORITY, NULL); } 802e15e: b005 add sp, #20 802e160: bd00 pop {pc} 802e162: bf00 nop 802e164: 20000d3a .word 0x20000d3a 802e168: 08043f63 .word 0x08043f63 802e16c: 0802e0f1 .word 0x0802e0f1 0802e170 : tcpip_thread(void *arg) { struct tcpip_msg *msg; LWIP_UNUSED_ARG(arg); if (tcpip_init_done != NULL) { 802e170: 4b1e ldr r3, [pc, #120] ; (802e1ec ) 802e172: 681b ldr r3, [r3, #0] * * @param arg unused argument */ static void tcpip_thread(void *arg) { 802e174: b507 push {r0, r1, r2, lr} struct tcpip_msg *msg; LWIP_UNUSED_ARG(arg); if (tcpip_init_done != NULL) { 802e176: b113 cbz r3, 802e17e tcpip_init_done(tcpip_init_done_arg); 802e178: 4a1d ldr r2, [pc, #116] ; (802e1f0 ) 802e17a: 6810 ldr r0, [r2, #0] 802e17c: 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); 802e17e: 481d ldr r0, [pc, #116] ; (802e1f4 ) 802e180: a901 add r1, sp, #4 802e182: f003 fd0d bl 8031ba0 LOCK_TCPIP_CORE(); switch (msg->type) { 802e186: 9b01 ldr r3, [sp, #4] 802e188: 781a ldrb r2, [r3, #0] 802e18a: 2a05 cmp r2, #5 802e18c: d8f7 bhi.n 802e17e 802e18e: e8df f002 tbb [pc, r2] 802e192: 0703 .short 0x0703 802e194: 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)); 802e198: 6898 ldr r0, [r3, #8] 802e19a: 6803 ldr r3, [r0, #0] 802e19c: 3004 adds r0, #4 802e19e: e7ed b.n 802e17c #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)) { 802e1a0: 68d9 ldr r1, [r3, #12] ethernet_input(msg->msg.inp.p, msg->msg.inp.netif); 802e1a2: 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)) { 802e1a4: f891 202d ldrb.w r2, [r1, #45] ; 0x2d 802e1a8: f012 0f60 tst.w r2, #96 ; 0x60 802e1ac: d002 beq.n 802e1b4 ethernet_input(msg->msg.inp.p, msg->msg.inp.netif); 802e1ae: f008 fb71 bl 8036894 802e1b2: e001 b.n 802e1b8 } else #endif /* LWIP_ETHERNET */ { ip_input(msg->msg.inp.p, msg->msg.inp.netif); 802e1b4: f004 f94e bl 8032454 } memp_free(MEMP_TCPIP_MSG_INPKT, msg); 802e1b8: 2008 movs r0, #8 802e1ba: e00e b.n 802e1da #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); 802e1bc: f103 0008 add.w r0, r3, #8 802e1c0: c807 ldmia r0, {r0, r1, r2} 802e1c2: f003 fc1f bl 8031a04 802e1c6: e007 b.n 802e1d8 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); 802e1c8: 68d8 ldr r0, [r3, #12] 802e1ca: 6919 ldr r1, [r3, #16] 802e1cc: f003 fcc4 bl 8031b58 802e1d0: e002 b.n 802e1d8 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); 802e1d2: 689a ldr r2, [r3, #8] 802e1d4: 68d8 ldr r0, [r3, #12] 802e1d6: 4790 blx r2 memp_free(MEMP_TCPIP_MSG_API, msg); 802e1d8: 2007 movs r0, #7 802e1da: 9901 ldr r1, [sp, #4] 802e1dc: f001 f882 bl 802f2e4 break; 802e1e0: e7cd b.n 802e17e 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); 802e1e2: 689a ldr r2, [r3, #8] 802e1e4: 68d8 ldr r0, [r3, #12] 802e1e6: 4790 blx r2 break; 802e1e8: e7c9 b.n 802e17e 802e1ea: bf00 nop 802e1ec: 20000d44 .word 0x20000d44 802e1f0: 20000d40 .word 0x20000d40 802e1f4: 20000d3c .word 0x20000d3c 0802e1f8 : * 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) { 802e1f8: 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)) { 802e1fa: 4d0e ldr r5, [pc, #56] ; (802e234 ) 802e1fc: 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) { 802e1fe: 4606 mov r6, r0 802e200: 460f mov r7, r1 UNLOCK_TCPIP_CORE(); return ret; #else /* LWIP_TCPIP_CORE_LOCKING_INPUT */ struct tcpip_msg *msg; if (!sys_mbox_valid(&mbox)) { 802e202: b193 cbz r3, 802e22a return ERR_VAL; } msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT); 802e204: 2008 movs r0, #8 802e206: f001 f857 bl 802f2b8 if (msg == NULL) { 802e20a: 4604 mov r4, r0 802e20c: b178 cbz r0, 802e22e return ERR_MEM; } msg->type = TCPIP_MSG_INPKT; 802e20e: 2301 movs r3, #1 802e210: 7003 strb r3, [r0, #0] msg->msg.inp.p = p; 802e212: 6086 str r6, [r0, #8] msg->msg.inp.netif = inp; 802e214: 60c7 str r7, [r0, #12] if (sys_mbox_trypost(&mbox, msg) != ERR_OK) { 802e216: 4621 mov r1, r4 802e218: 4628 mov r0, r5 802e21a: f008 fd89 bl 8036d30 802e21e: b138 cbz r0, 802e230 memp_free(MEMP_TCPIP_MSG_INPKT, msg); 802e220: 2008 movs r0, #8 802e222: 4621 mov r1, r4 802e224: f001 f85e bl 802f2e4 802e228: e001 b.n 802e22e return ret; #else /* LWIP_TCPIP_CORE_LOCKING_INPUT */ struct tcpip_msg *msg; if (!sys_mbox_valid(&mbox)) { return ERR_VAL; 802e22a: 20fa movs r0, #250 ; 0xfa 802e22c: e000 b.n 802e230 } msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT); if (msg == NULL) { return ERR_MEM; 802e22e: 20ff movs r0, #255 ; 0xff memp_free(MEMP_TCPIP_MSG_INPKT, msg); return ERR_MEM; } return ERR_OK; #endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */ } 802e230: b240 sxtb r0, r0 802e232: bdf8 pop {r3, r4, r5, r6, r7, pc} 802e234: 20000d3c .word 0x20000d3c 0802e238 : * @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) { 802e238: b537 push {r0, r1, r2, r4, r5, lr} 802e23a: 4604 mov r4, r0 802e23c: 460d mov r5, r1 lwip_init(); 802e23e: f000 feb3 bl 802efa8 tcpip_init_done = initfunc; 802e242: 4b09 ldr r3, [pc, #36] ; (802e268 ) tcpip_init_done_arg = arg; if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 802e244: 4809 ldr r0, [pc, #36] ; (802e26c ) void tcpip_init(tcpip_init_done_fn initfunc, void *arg) { lwip_init(); tcpip_init_done = initfunc; 802e246: 601c str r4, [r3, #0] tcpip_init_done_arg = arg; 802e248: 4b09 ldr r3, [pc, #36] ; (802e270 ) if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 802e24a: 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; 802e24c: 601d str r5, [r3, #0] if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 802e24e: f008 fd61 bl 8036d14 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); 802e252: 2303 movs r3, #3 802e254: 9300 str r3, [sp, #0] 802e256: 4907 ldr r1, [pc, #28] ; (802e274 ) 802e258: 4807 ldr r0, [pc, #28] ; (802e278 ) 802e25a: 2200 movs r2, #0 802e25c: f44f 73c8 mov.w r3, #400 ; 0x190 802e260: f008 fdd7 bl 8036e12 } 802e264: bd3e pop {r1, r2, r3, r4, r5, pc} 802e266: bf00 nop 802e268: 20000d44 .word 0x20000d44 802e26c: 20000d3c .word 0x20000d3c 802e270: 20000d40 .word 0x20000d40 802e274: 0802e171 .word 0x0802e171 802e278: 08043f6e .word 0x08043f6e 0802e27c : * @return n in network byte order */ u16_t lwip_htons(u16_t n) { return ((n & 0xff) << 8) | ((n & 0xff00) >> 8); 802e27c: 0a03 lsrs r3, r0, #8 802e27e: ea43 2000 orr.w r0, r3, r0, lsl #8 } 802e282: b280 uxth r0, r0 802e284: 4770 bx lr 0802e286 : * @return n in network byte order */ u16_t lwip_htons(u16_t n) { return ((n & 0xff) << 8) | ((n & 0xff00) >> 8); 802e286: 0a03 lsrs r3, r0, #8 802e288: ea43 2000 orr.w r0, r3, r0, lsl #8 */ u16_t lwip_ntohs(u16_t n) { return lwip_htons(n); } 802e28c: b280 uxth r0, r0 802e28e: 4770 bx lr 0802e290 : { return ((n & 0xff) << 24) | ((n & 0xff00) << 8) | ((n & 0xff0000UL) >> 8) | ((n & 0xff000000UL) >> 24); } 802e290: ba00 rev r0, r0 802e292: 4770 bx lr 0802e294 : * @return n in host byte order */ u32_t lwip_ntohl(u32_t n) { return lwip_htonl(n); 802e294: f7ff bffc b.w 802e290 0802e298 : * 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) { 802e298: 7b03 ldrb r3, [r0, #12] 802e29a: 428b cmp r3, r1 802e29c: d003 beq.n 802e2a6 dhcp->state = new_state; dhcp->tries = 0; 802e29e: 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; 802e2a0: 7301 strb r1, [r0, #12] dhcp->tries = 0; 802e2a2: 7343 strb r3, [r0, #13] dhcp->request_timeout = 0; 802e2a4: 8343 strh r3, [r0, #26] 802e2a6: 4770 bx lr 0802e2a8 : */ 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; 802e2a8: 8b03 ldrh r3, [r0, #24] * DHCP message. * */ static void dhcp_option(struct dhcp *dhcp, u8_t option_type, u8_t option_len) { 802e2aa: 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; 802e2ac: 6944 ldr r4, [r0, #20] 802e2ae: 18e4 adds r4, r4, r3 802e2b0: f884 10f0 strb.w r1, [r4, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = option_len; 802e2b4: 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; 802e2b6: 1c5c adds r4, r3, #1 dhcp->msg_out->options[dhcp->options_out_len++] = option_len; 802e2b8: fa11 f184 uxtah r1, r1, r4 802e2bc: 3302 adds r3, #2 802e2be: f881 20f0 strb.w r2, [r1, #240] ; 0xf0 802e2c2: 8303 strh r3, [r0, #24] 802e2c4: bd10 pop {r4, pc} 0802e2c6 : */ 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; 802e2c6: 8b03 ldrh r3, [r0, #24] 802e2c8: 6942 ldr r2, [r0, #20] 802e2ca: 18d2 adds r2, r2, r3 802e2cc: 3301 adds r3, #1 802e2ce: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802e2d2: 8303 strh r3, [r0, #24] 802e2d4: 4770 bx lr 0802e2d6 : 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); 802e2d6: 8b03 ldrh r3, [r0, #24] 802e2d8: 6942 ldr r2, [r0, #20] 802e2da: 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) { 802e2dc: 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); 802e2de: 0a0c lsrs r4, r1, #8 802e2e0: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t) (value & 0x00ffU); 802e2e4: 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); 802e2e6: 1c5c adds r4, r3, #1 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t) (value & 0x00ffU); 802e2e8: fa12 f284 uxtah r2, r2, r4 802e2ec: 3302 adds r3, #2 802e2ee: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802e2f2: 8303 strh r3, [r0, #24] 802e2f4: bd10 pop {r4, pc} 0802e2f6 : 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); 802e2f6: 8b03 ldrh r3, [r0, #24] 802e2f8: 6942 ldr r2, [r0, #20] 802e2fa: 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) { 802e2fc: 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); 802e2fe: 0e0c lsrs r4, r1, #24 802e300: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); 802e304: 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); 802e306: 1c5c adds r4, r3, #1 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); 802e308: fa12 f284 uxtah r2, r2, r4 802e30c: f3c1 4407 ubfx r4, r1, #16, #8 802e310: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); 802e314: 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); 802e316: 1c9c adds r4, r3, #2 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); 802e318: fa12 f284 uxtah r2, r2, r4 802e31c: f3c1 2407 ubfx r4, r1, #8, #8 802e320: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x000000ffUL)); 802e324: 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); 802e326: 1cdc adds r4, r3, #3 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x000000ffUL)); 802e328: fa12 f284 uxtah r2, r2, r4 802e32c: 3304 adds r3, #4 802e32e: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802e332: 8303 strh r3, [r0, #24] 802e334: bd10 pop {r4, pc} 0802e336 : * @param dhcp DHCP state structure */ static void dhcp_option_trailer(struct dhcp *dhcp) { LWIP_ERROR("dhcp_option_trailer: dhcp != NULL", (dhcp != NULL), return;); 802e336: b190 cbz r0, 802e35e 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; 802e338: 8b03 ldrh r3, [r0, #24] 802e33a: 6942 ldr r2, [r0, #20] 802e33c: 18d2 adds r2, r2, r3 802e33e: 21ff movs r1, #255 ; 0xff 802e340: 3301 adds r3, #1 802e342: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802e346: 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; 802e348: 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)) && 802e34a: e005 b.n 802e358 (dhcp->options_out_len < DHCP_OPTIONS_LEN)) { /* add a fill/padding byte */ dhcp->msg_out->options[dhcp->options_out_len++] = 0; 802e34c: 6942 ldr r2, [r0, #20] 802e34e: 18d2 adds r2, r2, r3 802e350: 3301 adds r3, #1 802e352: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802e356: 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)) && 802e358: 8b03 ldrh r3, [r0, #24] 802e35a: 2b43 cmp r3, #67 ; 0x43 802e35c: d9f6 bls.n 802e34c 802e35e: 4770 bx lr 0802e360 : * @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) { 802e360: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802e364: 460c mov r4, r1 802e366: 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;); 802e368: 4606 mov r6, r0 802e36a: 2800 cmp r0, #0 802e36c: f000 808e beq.w 802e48c LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); 802e370: 2900 cmp r1, #0 802e372: f000 808d beq.w 802e490 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); 802e376: 2000 movs r0, #0 802e378: f44f 719a mov.w r1, #308 ; 0x134 802e37c: 4602 mov r2, r0 802e37e: f001 f908 bl 802f592 802e382: 6120 str r0, [r4, #16] if (dhcp->p_out == NULL) { 802e384: 2800 cmp r0, #0 802e386: f000 8085 beq.w 802e494 } 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) { 802e38a: 7b62 ldrb r2, [r4, #13] 802e38c: 4b43 ldr r3, [pc, #268] ; (802e49c ) 802e38e: b912 cbnz r2, 802e396 #if DHCP_CREATE_RAND_XID && defined(LWIP_RAND) xid = LWIP_RAND(); #else /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ xid++; 802e390: 681a ldr r2, [r3, #0] 802e392: 3201 adds r2, #1 802e394: 601a str r2, [r3, #0] #endif /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ } dhcp->xid = xid; 802e396: 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; 802e398: 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; 802e39a: 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; 802e39c: 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; 802e39e: 6162 str r2, [r4, #20] dhcp->msg_out->op = DHCP_BOOTREQUEST; 802e3a0: 7013 strb r3, [r2, #0] /* TODO: make link layer independent */ dhcp->msg_out->htype = DHCP_HTYPE_ETH; 802e3a2: 6962 ldr r2, [r4, #20] 802e3a4: 7053 strb r3, [r2, #1] dhcp->msg_out->hlen = netif->hwaddr_len; 802e3a6: 6963 ldr r3, [r4, #20] 802e3a8: f896 2026 ldrb.w r2, [r6, #38] ; 0x26 802e3ac: 709a strb r2, [r3, #2] dhcp->msg_out->hops = 0; 802e3ae: 6963 ldr r3, [r4, #20] 802e3b0: 2500 movs r5, #0 802e3b2: 70dd strb r5, [r3, #3] dhcp->msg_out->xid = htonl(dhcp->xid); 802e3b4: 6820 ldr r0, [r4, #0] 802e3b6: f8d4 8014 ldr.w r8, [r4, #20] 802e3ba: f7ff ff69 bl 802e290 802e3be: f8c8 0004 str.w r0, [r8, #4] dhcp->msg_out->secs = 0; 802e3c2: 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) || 802e3c4: 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; 802e3c6: 721d strb r5, [r3, #8] 802e3c8: 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; 802e3ca: 729d strb r5, [r3, #10] 802e3cc: 72dd strb r5, [r3, #11] ip_addr_set_zero(&dhcp->msg_out->ciaddr); 802e3ce: 731d strb r5, [r3, #12] 802e3d0: 735d strb r5, [r3, #13] 802e3d2: 739d strb r5, [r3, #14] 802e3d4: 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) || 802e3d6: d007 beq.n 802e3e8 802e3d8: 2f04 cmp r7, #4 802e3da: d005 beq.n 802e3e8 802e3dc: 2f03 cmp r7, #3 802e3de: d105 bne.n 802e3ec ((message_type == DHCP_REQUEST) && /* DHCP_BOUND not used for sending! */ ((dhcp->state==DHCP_RENEWING) || dhcp->state==DHCP_REBINDING))) { 802e3e0: 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! */ 802e3e2: 3a04 subs r2, #4 802e3e4: 2a01 cmp r2, #1 802e3e6: d801 bhi.n 802e3ec ((dhcp->state==DHCP_RENEWING) || dhcp->state==DHCP_REBINDING))) { ip_addr_copy(dhcp->msg_out->ciaddr, netif->ip_addr); 802e3e8: 6872 ldr r2, [r6, #4] 802e3ea: 60da str r2, [r3, #12] } ip_addr_set_zero(&dhcp->msg_out->yiaddr); 802e3ec: 2500 movs r5, #0 802e3ee: 741d strb r5, [r3, #16] 802e3f0: 745d strb r5, [r3, #17] 802e3f2: 749d strb r5, [r3, #18] 802e3f4: 74dd strb r5, [r3, #19] ip_addr_set_zero(&dhcp->msg_out->siaddr); 802e3f6: 751d strb r5, [r3, #20] 802e3f8: 755d strb r5, [r3, #21] 802e3fa: 759d strb r5, [r3, #22] 802e3fc: 75dd strb r5, [r3, #23] ip_addr_set_zero(&dhcp->msg_out->giaddr); 802e3fe: 761d strb r5, [r3, #24] 802e400: 765d strb r5, [r3, #25] 802e402: 769d strb r5, [r3, #26] 802e404: 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*/; 802e406: f896 1026 ldrb.w r1, [r6, #38] ; 0x26 802e40a: 6962 ldr r2, [r4, #20] 802e40c: b2ab uxth r3, r5 802e40e: 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) 802e410: bf88 it hi 802e412: 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*/; 802e414: 442a add r2, r5 802e416: bf8c ite hi 802e418: f893 3027 ldrbhi.w r3, [r3, #39] ; 0x27 802e41c: 2300 movls r3, #0 802e41e: 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++) { 802e420: 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*/; 802e422: 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++) { 802e424: d1ef bne.n 802e406 802e426: 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; 802e428: 4619 mov r1, r3 802e42a: 6962 ldr r2, [r4, #20] 802e42c: 18d2 adds r2, r2, r3 802e42e: 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++) { 802e430: 2b40 cmp r3, #64 ; 0x40 dhcp->msg_out->sname[i] = 0; 802e432: 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++) { 802e436: d1f8 bne.n 802e42a 802e438: 2200 movs r2, #0 dhcp->msg_out->sname[i] = 0; } for (i = 0; i < DHCP_FILE_LEN; i++) { dhcp->msg_out->file[i] = 0; 802e43a: 4610 mov r0, r2 802e43c: 6963 ldr r3, [r4, #20] 802e43e: 1899 adds r1, r3, r2 802e440: 3201 adds r2, #1 802e442: 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++) { 802e444: 2a80 cmp r2, #128 ; 0x80 dhcp->msg_out->file[i] = 0; 802e446: 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++) { 802e44a: d1f7 bne.n 802e43c dhcp->msg_out->file[i] = 0; } dhcp->msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE); 802e44c: 6962 ldr r2, [r4, #20] 802e44e: f06f 007d mvn.w r0, #125 ; 0x7d 802e452: 2163 movs r1, #99 ; 0x63 802e454: f882 00ed strb.w r0, [r2, #237] ; 0xed 802e458: 2053 movs r0, #83 ; 0x53 802e45a: f882 10ec strb.w r1, [r2, #236] ; 0xec 802e45e: f882 00ee strb.w r0, [r2, #238] ; 0xee 802e462: f882 10ef strb.w r1, [r2, #239] ; 0xef dhcp->options_out_len = 0; 802e466: 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 */ 802e468: 6962 ldr r2, [r4, #20] 802e46a: 18d2 adds r2, r2, r3 802e46c: f882 30f0 strb.w r3, [r2, #240] ; 0xf0 802e470: 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++) { 802e472: 2b44 cmp r3, #68 ; 0x44 802e474: d1f8 bne.n 802e468 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); 802e476: 4620 mov r0, r4 802e478: 2135 movs r1, #53 ; 0x35 802e47a: 2201 movs r2, #1 802e47c: f7ff ff14 bl 802e2a8 dhcp_option_byte(dhcp, message_type); 802e480: 4620 mov r0, r4 802e482: 4639 mov r1, r7 802e484: f7ff ff1f bl 802e2c6 return ERR_OK; 802e488: 2000 movs r0, #0 802e48a: e004 b.n 802e496 if (!xid_initialised) { xid = DHCP_GLOBAL_XID; xid_initialised = !xid_initialised; } #endif LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return ERR_ARG;); 802e48c: 20f2 movs r0, #242 ; 0xf2 802e48e: e002 b.n 802e496 LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); 802e490: 20fa movs r0, #250 ; 0xfa 802e492: e000 b.n 802e496 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; 802e494: 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; } 802e496: b240 sxtb r0, r0 802e498: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802e49c: 20000714 .word 0x20000714 0802e4a0 : * * @param dhcp the dhcp struct to free the request from */ static void dhcp_delete_msg(struct dhcp *dhcp) { 802e4a0: b510 push {r4, lr} LWIP_ERROR("dhcp_delete_msg: dhcp != NULL", (dhcp != NULL), return;); 802e4a2: 4604 mov r4, r0 802e4a4: b130 cbz r0, 802e4b4 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) { 802e4a6: 6900 ldr r0, [r0, #16] 802e4a8: b108 cbz r0, 802e4ae pbuf_free(dhcp->p_out); 802e4aa: f001 f825 bl 802f4f8 } dhcp->p_out = NULL; 802e4ae: 2300 movs r3, #0 802e4b0: 6123 str r3, [r4, #16] dhcp->msg_out = NULL; 802e4b2: 6163 str r3, [r4, #20] 802e4b4: bd10 pop {r4, pc} 802e4b6: 0000 movs r0, r0 0802e4b8 : * * @param netif the netif under DHCP control */ static err_t dhcp_discover(struct netif *netif) { 802e4b8: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802e4ba: 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); 802e4bc: 2300 movs r3, #0 * * @param netif the netif under DHCP control */ static err_t dhcp_discover(struct netif *netif) { 802e4be: 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); 802e4c0: 6263 str r3, [r4, #36] ; 0x24 dhcp_set_state(dhcp, DHCP_SELECTING); 802e4c2: 4620 mov r0, r4 802e4c4: 2106 movs r1, #6 802e4c6: f7ff fee7 bl 802e298 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER); 802e4ca: 4628 mov r0, r5 802e4cc: 4621 mov r1, r4 802e4ce: 2201 movs r2, #1 802e4d0: f7ff ff46 bl 802e360 if (result == ERR_OK) { 802e4d4: 4606 mov r6, r0 802e4d6: 2800 cmp r0, #0 802e4d8: d130 bne.n 802e53c 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); 802e4da: 2202 movs r2, #2 802e4dc: 4620 mov r0, r4 802e4de: 2139 movs r1, #57 ; 0x39 802e4e0: f7ff fee2 bl 802e2a8 dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 802e4e4: 4620 mov r0, r4 802e4e6: 8ca9 ldrh r1, [r5, #36] ; 0x24 802e4e8: f7ff fef5 bl 802e2d6 dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, 4/*num options*/); 802e4ec: 2204 movs r2, #4 802e4ee: 4620 mov r0, r4 802e4f0: 2137 movs r1, #55 ; 0x37 802e4f2: f7ff fed9 bl 802e2a8 dhcp_option_byte(dhcp, DHCP_OPTION_SUBNET_MASK); 802e4f6: 4620 mov r0, r4 802e4f8: 2101 movs r1, #1 802e4fa: f7ff fee4 bl 802e2c6 dhcp_option_byte(dhcp, DHCP_OPTION_ROUTER); 802e4fe: 4620 mov r0, r4 802e500: 2103 movs r1, #3 802e502: f7ff fee0 bl 802e2c6 dhcp_option_byte(dhcp, DHCP_OPTION_BROADCAST); 802e506: 4620 mov r0, r4 802e508: 211c movs r1, #28 802e50a: f7ff fedc bl 802e2c6 dhcp_option_byte(dhcp, DHCP_OPTION_DNS_SERVER); 802e50e: 2106 movs r1, #6 802e510: 4620 mov r0, r4 802e512: f7ff fed8 bl 802e2c6 dhcp_option_trailer(dhcp); 802e516: 4620 mov r0, r4 802e518: f7ff ff0d bl 802e336 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); 802e51c: 8b21 ldrh r1, [r4, #24] 802e51e: 6920 ldr r0, [r4, #16] 802e520: 31f0 adds r1, #240 ; 0xf0 802e522: b289 uxth r1, r1 802e524: f001 f80f bl 802f546 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); 802e528: 9500 str r5, [sp, #0] 802e52a: 6860 ldr r0, [r4, #4] 802e52c: 6921 ldr r1, [r4, #16] 802e52e: 4a0f ldr r2, [pc, #60] ; (802e56c ) 802e530: 2343 movs r3, #67 ; 0x43 802e532: f003 fc81 bl 8031e38 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: deleting()ing\n")); dhcp_delete_msg(dhcp); 802e536: 4620 mov r0, r4 802e538: f7ff ffb2 bl 802e4a0 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++; 802e53c: 7b63 ldrb r3, [r4, #13] 802e53e: 3301 adds r3, #1 802e540: 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; 802e542: 2b05 cmp r3, #5 802e544: bf98 it ls 802e546: 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++; 802e54a: 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; 802e54c: bf9a itte ls 802e54e: fa02 f303 lslls.w r3, r2, r3 802e552: b29b uxthls r3, r3 802e554: f64e 2360 movwhi r3, #60000 ; 0xea60 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802e558: f44f 72fa mov.w r2, #500 ; 0x1f4 802e55c: f203 13f3 addw r3, r3, #499 ; 0x1f3 802e560: fb93 f3f2 sdiv r3, r3, r2 802e564: 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; } 802e566: 4630 mov r0, r6 802e568: bd7c pop {r2, r3, r4, r5, r6, pc} 802e56a: bf00 nop 802e56c: 08043fe0 .word 0x08043fe0 0802e570 : * * @param netif network interface which must rebind with a DHCP server */ static err_t dhcp_rebind(struct netif *netif) { 802e570: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802e572: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must rebind with a DHCP server */ static err_t dhcp_rebind(struct netif *netif) { 802e574: 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); 802e576: 2104 movs r1, #4 802e578: 4620 mov r0, r4 802e57a: f7ff fe8d bl 802e298 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 802e57e: 4628 mov r0, r5 802e580: 4621 mov r1, r4 802e582: 2203 movs r2, #3 802e584: f7ff feec bl 802e360 if (result == ERR_OK) { 802e588: 4606 mov r6, r0 802e58a: b9d8 cbnz r0, 802e5c4 dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 802e58c: 2202 movs r2, #2 802e58e: 4620 mov r0, r4 802e590: 2139 movs r1, #57 ; 0x39 802e592: f7ff fe89 bl 802e2a8 dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 802e596: 8ca9 ldrh r1, [r5, #36] ; 0x24 802e598: 4620 mov r0, r4 802e59a: f7ff fe9c bl 802e2d6 dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); dhcp_option_long(dhcp, ntohl(dhcp->server_ip_addr.addr)); #endif dhcp_option_trailer(dhcp); 802e59e: 4620 mov r0, r4 802e5a0: f7ff fec9 bl 802e336 pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802e5a4: 8b21 ldrh r1, [r4, #24] 802e5a6: 6920 ldr r0, [r4, #16] 802e5a8: 31f0 adds r1, #240 ; 0xf0 802e5aa: b289 uxth r1, r1 802e5ac: f000 ffcb bl 802f546 /* broadcast to server */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802e5b0: 9500 str r5, [sp, #0] 802e5b2: 6860 ldr r0, [r4, #4] 802e5b4: 6921 ldr r1, [r4, #16] 802e5b6: 4a0e ldr r2, [pc, #56] ; (802e5f0 ) 802e5b8: 2343 movs r3, #67 ; 0x43 802e5ba: f003 fc3d bl 8031e38 dhcp_delete_msg(dhcp); 802e5be: 4620 mov r0, r4 802e5c0: f7ff ff6e bl 802e4a0 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++; 802e5c4: 7b63 ldrb r3, [r4, #13] 802e5c6: 3301 adds r3, #1 802e5c8: b2db uxtb r3, r3 msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802e5ca: 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++; 802e5cc: 7363 strb r3, [r4, #13] msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802e5ce: d804 bhi.n 802e5da 802e5d0: f44f 727a mov.w r2, #1000 ; 0x3e8 802e5d4: 4353 muls r3, r2 802e5d6: b29b uxth r3, r3 802e5d8: e001 b.n 802e5de 802e5da: f242 7310 movw r3, #10000 ; 0x2710 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802e5de: f44f 72fa mov.w r2, #500 ; 0x1f4 802e5e2: f203 13f3 addw r3, r3, #499 ; 0x1f3 802e5e6: fb93 f3f2 sdiv r3, r3, r2 802e5ea: 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; } 802e5ec: 4630 mov r0, r6 802e5ee: bd7c pop {r2, r3, r4, r5, r6, pc} 802e5f0: 08043fe0 .word 0x08043fe0 0802e5f4 : * * @param netif network interface which must reboot */ static err_t dhcp_reboot(struct netif *netif) { 802e5f4: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802e5f6: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must reboot */ static err_t dhcp_reboot(struct netif *netif) { 802e5f8: 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); 802e5fa: 2103 movs r1, #3 802e5fc: 4620 mov r0, r4 802e5fe: f7ff fe4b bl 802e298 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 802e602: 4628 mov r0, r5 802e604: 4621 mov r1, r4 802e606: 2203 movs r2, #3 802e608: f7ff feaa bl 802e360 if (result == ERR_OK) { 802e60c: 4606 mov r6, r0 802e60e: bb40 cbnz r0, 802e662 dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 802e610: 2202 movs r2, #2 802e612: 4620 mov r0, r4 802e614: 2139 movs r1, #57 ; 0x39 802e616: f7ff fe47 bl 802e2a8 dhcp_option_short(dhcp, 576); 802e61a: 4620 mov r0, r4 802e61c: f44f 7110 mov.w r1, #576 ; 0x240 802e620: f7ff fe59 bl 802e2d6 dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); 802e624: 2204 movs r2, #4 802e626: 2132 movs r1, #50 ; 0x32 802e628: 4620 mov r0, r4 802e62a: f7ff fe3d bl 802e2a8 dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); 802e62e: 6a60 ldr r0, [r4, #36] ; 0x24 802e630: f7ff fe30 bl 802e294 802e634: 4601 mov r1, r0 802e636: 4620 mov r0, r4 802e638: f7ff fe5d bl 802e2f6 dhcp_option_trailer(dhcp); 802e63c: 4620 mov r0, r4 802e63e: f7ff fe7a bl 802e336 pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802e642: 8b21 ldrh r1, [r4, #24] 802e644: 6920 ldr r0, [r4, #16] 802e646: 31f0 adds r1, #240 ; 0xf0 802e648: b289 uxth r1, r1 802e64a: f000 ff7c bl 802f546 /* broadcast to server */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802e64e: 9500 str r5, [sp, #0] 802e650: 6860 ldr r0, [r4, #4] 802e652: 6921 ldr r1, [r4, #16] 802e654: 4a0e ldr r2, [pc, #56] ; (802e690 ) 802e656: 2343 movs r3, #67 ; 0x43 802e658: f003 fbee bl 8031e38 dhcp_delete_msg(dhcp); 802e65c: 4620 mov r0, r4 802e65e: f7ff ff1f bl 802e4a0 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++; 802e662: 7b63 ldrb r3, [r4, #13] 802e664: 3301 adds r3, #1 802e666: b2db uxtb r3, r3 msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802e668: 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++; 802e66a: 7363 strb r3, [r4, #13] msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802e66c: d804 bhi.n 802e678 802e66e: f44f 727a mov.w r2, #1000 ; 0x3e8 802e672: 4353 muls r3, r2 802e674: b29b uxth r3, r3 802e676: e001 b.n 802e67c 802e678: f242 7310 movw r3, #10000 ; 0x2710 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802e67c: f44f 72fa mov.w r2, #500 ; 0x1f4 802e680: f203 13f3 addw r3, r3, #499 ; 0x1f3 802e684: fb93 f3f2 sdiv r3, r3, r2 802e688: 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; } 802e68a: 4630 mov r0, r6 802e68c: bd7c pop {r2, r3, r4, r5, r6, pc} 802e68e: bf00 nop 802e690: 08043fe0 .word 0x08043fe0 0802e694 : * @param netif the netif under DHCP control * @return lwIP specific error (see error.h) */ static err_t dhcp_select(struct netif *netif) { 802e694: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802e696: 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) { 802e698: 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); 802e69a: 2101 movs r1, #1 802e69c: 4620 mov r0, r4 802e69e: f7ff fdfb bl 802e298 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 802e6a2: 4628 mov r0, r5 802e6a4: 4621 mov r1, r4 802e6a6: 2203 movs r2, #3 802e6a8: f7ff fe5a bl 802e360 if (result == ERR_OK) { 802e6ac: 4606 mov r6, r0 802e6ae: 2800 cmp r0, #0 802e6b0: d148 bne.n 802e744 dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 802e6b2: 2202 movs r2, #2 802e6b4: 4620 mov r0, r4 802e6b6: 2139 movs r1, #57 ; 0x39 802e6b8: f7ff fdf6 bl 802e2a8 dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 802e6bc: 4620 mov r0, r4 802e6be: 8ca9 ldrh r1, [r5, #36] ; 0x24 802e6c0: f7ff fe09 bl 802e2d6 /* MUST request the offered IP address */ dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); 802e6c4: 2204 movs r2, #4 802e6c6: 2132 movs r1, #50 ; 0x32 802e6c8: 4620 mov r0, r4 802e6ca: f7ff fded bl 802e2a8 dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); 802e6ce: 6a60 ldr r0, [r4, #36] ; 0x24 802e6d0: f7ff fde0 bl 802e294 802e6d4: 4601 mov r1, r0 802e6d6: 4620 mov r0, r4 802e6d8: f7ff fe0d bl 802e2f6 dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); 802e6dc: 2204 movs r2, #4 802e6de: 2136 movs r1, #54 ; 0x36 802e6e0: 4620 mov r0, r4 802e6e2: f7ff fde1 bl 802e2a8 dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->server_ip_addr))); 802e6e6: 6a20 ldr r0, [r4, #32] 802e6e8: f7ff fdd4 bl 802e294 802e6ec: 4601 mov r1, r0 802e6ee: 4620 mov r0, r4 802e6f0: f7ff fe01 bl 802e2f6 dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, 4/*num options*/); 802e6f4: 2204 movs r2, #4 802e6f6: 4620 mov r0, r4 802e6f8: 2137 movs r1, #55 ; 0x37 802e6fa: f7ff fdd5 bl 802e2a8 dhcp_option_byte(dhcp, DHCP_OPTION_SUBNET_MASK); 802e6fe: 4620 mov r0, r4 802e700: 2101 movs r1, #1 802e702: f7ff fde0 bl 802e2c6 dhcp_option_byte(dhcp, DHCP_OPTION_ROUTER); 802e706: 4620 mov r0, r4 802e708: 2103 movs r1, #3 802e70a: f7ff fddc bl 802e2c6 dhcp_option_byte(dhcp, DHCP_OPTION_BROADCAST); 802e70e: 4620 mov r0, r4 802e710: 211c movs r1, #28 802e712: f7ff fdd8 bl 802e2c6 dhcp_option_byte(dhcp, DHCP_OPTION_DNS_SERVER); 802e716: 2106 movs r1, #6 802e718: 4620 mov r0, r4 802e71a: f7ff fdd4 bl 802e2c6 #if LWIP_NETIF_HOSTNAME dhcp_option_hostname(dhcp, netif); #endif /* LWIP_NETIF_HOSTNAME */ dhcp_option_trailer(dhcp); 802e71e: 4620 mov r0, r4 802e720: f7ff fe09 bl 802e336 /* shrink the pbuf to the actual content length */ pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802e724: 8b21 ldrh r1, [r4, #24] 802e726: 6920 ldr r0, [r4, #16] 802e728: 31f0 adds r1, #240 ; 0xf0 802e72a: b289 uxth r1, r1 802e72c: f000 ff0b bl 802f546 /* send broadcast to any DHCP server */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802e730: 9500 str r5, [sp, #0] 802e732: 6860 ldr r0, [r4, #4] 802e734: 6921 ldr r1, [r4, #16] 802e736: 4a0f ldr r2, [pc, #60] ; (802e774 ) 802e738: 2343 movs r3, #67 ; 0x43 802e73a: f003 fb7d bl 8031e38 dhcp_delete_msg(dhcp); 802e73e: 4620 mov r0, r4 802e740: f7ff feae bl 802e4a0 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++; 802e744: 7b63 ldrb r3, [r4, #13] 802e746: 3301 adds r3, #1 802e748: b2db uxtb r3, r3 msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; 802e74a: 2b05 cmp r3, #5 802e74c: bf98 it ls 802e74e: 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++; 802e752: 7363 strb r3, [r4, #13] msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; 802e754: bf9a itte ls 802e756: fa02 f303 lslls.w r3, r2, r3 802e75a: b29b uxthls r3, r3 802e75c: f64e 2360 movwhi r3, #60000 ; 0xea60 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802e760: f44f 72fa mov.w r2, #500 ; 0x1f4 802e764: f203 13f3 addw r3, r3, #499 ; 0x1f3 802e768: fb93 f3f2 sdiv r3, r3, r2 802e76c: 8363 strh r3, [r4, #26] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_select(): set request timeout %"U16_F" msecs\n", msecs)); return result; } 802e76e: 4630 mov r0, r6 802e770: bd7c pop {r2, r3, r4, r5, r6, pc} 802e772: bf00 nop 802e774: 08043fe0 .word 0x08043fe0 0802e778 : * * @param netif the netif under DHCP control */ static void dhcp_check(struct netif *netif) { 802e778: b538 push {r3, r4, r5, lr} struct dhcp *dhcp = netif->dhcp; 802e77a: 6a04 ldr r4, [r0, #32] * * @param netif the netif under DHCP control */ static void dhcp_check(struct netif *netif) { 802e77c: 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); 802e77e: 2108 movs r1, #8 802e780: 4620 mov r0, r4 802e782: f7ff fd89 bl 802e298 /* 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); 802e786: 4628 mov r0, r5 802e788: f104 0124 add.w r1, r4, #36 ; 0x24 802e78c: 2200 movs r2, #0 802e78e: f007 ff61 bl 8036654 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++; 802e792: 7b63 ldrb r3, [r4, #13] 802e794: 3301 adds r3, #1 802e796: 7363 strb r3, [r4, #13] msecs = 500; dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802e798: 2301 movs r3, #1 802e79a: 8363 strh r3, [r4, #26] 802e79c: bd38 pop {r3, r4, r5, pc} 0802e79e : * * @param netif network interface to bind to the offered address */ static void dhcp_bind(struct netif *netif) { 802e79e: 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;); 802e7a0: 4605 mov r5, r0 802e7a2: 2800 cmp r0, #0 802e7a4: d059 beq.n 802e85a dhcp = netif->dhcp; 802e7a6: 6a04 ldr r4, [r0, #32] LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;); 802e7a8: 2c00 cmp r4, #0 802e7aa: d056 beq.n 802e85a 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) { 802e7ac: 6b63 ldr r3, [r4, #52] ; 0x34 802e7ae: 1c58 adds r0, r3, #1 802e7b0: d00d beq.n 802e7ce /* 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; 802e7b2: 223c movs r2, #60 ; 0x3c 802e7b4: 331e adds r3, #30 802e7b6: fbb3 f3f2 udiv r3, r3, r2 if(timeout > 0xffff) { timeout = 0xffff; } dhcp->t1_timeout = (u16_t)timeout; 802e7ba: f64f 72ff movw r2, #65535 ; 0xffff 802e7be: 4293 cmp r3, r2 802e7c0: bf28 it cs 802e7c2: 4613 movcs r3, r2 802e7c4: b29b uxth r3, r3 802e7c6: 83a3 strh r3, [r4, #28] if (dhcp->t1_timeout == 0) { 802e7c8: b90b cbnz r3, 802e7ce dhcp->t1_timeout = 1; 802e7ca: 2301 movs r3, #1 802e7cc: 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) { 802e7ce: 6ba3 ldr r3, [r4, #56] ; 0x38 802e7d0: 1c59 adds r1, r3, #1 802e7d2: d00d beq.n 802e7f0 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; 802e7d4: 223c movs r2, #60 ; 0x3c 802e7d6: 331e adds r3, #30 802e7d8: fbb3 f3f2 udiv r3, r3, r2 if(timeout > 0xffff) { timeout = 0xffff; } dhcp->t2_timeout = (u16_t)timeout; 802e7dc: f64f 72ff movw r2, #65535 ; 0xffff 802e7e0: 4293 cmp r3, r2 802e7e2: bf28 it cs 802e7e4: 4613 movcs r3, r2 802e7e6: b29b uxth r3, r3 802e7e8: 83e3 strh r3, [r4, #30] if (dhcp->t2_timeout == 0) { 802e7ea: b90b cbnz r3, 802e7f0 dhcp->t2_timeout = 1; 802e7ec: 2301 movs r3, #1 802e7ee: 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)) { 802e7f0: 8be3 ldrh r3, [r4, #30] 802e7f2: 8ba2 ldrh r2, [r4, #28] 802e7f4: 429a cmp r2, r3 802e7f6: d302 bcc.n 802e7fe 802e7f8: b10b cbz r3, 802e7fe dhcp->t1_timeout = 0; 802e7fa: 2300 movs r3, #0 802e7fc: 83a3 strh r3, [r4, #28] } if (dhcp->subnet_mask_given) { 802e7fe: 7ba3 ldrb r3, [r4, #14] 802e800: b10b cbz r3, 802e806 /* copy offered network mask */ ip_addr_copy(sn_mask, dhcp->offered_sn_mask); 802e802: 6aa3 ldr r3, [r4, #40] ; 0x28 802e804: e00b b.n 802e81e } else { /* subnet mask not given, choose a safe subnet mask given the network class */ u8_t first_octet = ip4_addr1(&dhcp->offered_ip_addr); 802e806: f894 3024 ldrb.w r3, [r4, #36] ; 0x24 if (first_octet <= 127) { 802e80a: 061a lsls r2, r3, #24 802e80c: d401 bmi.n 802e812 ip4_addr_set_u32(&sn_mask, PP_HTONL(0xff000000UL)); 802e80e: 23ff movs r3, #255 ; 0xff 802e810: e005 b.n 802e81e } else if (first_octet >= 192) { 802e812: 2bbf cmp r3, #191 ; 0xbf ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffffff00UL)); 802e814: bf8c ite hi 802e816: f06f 437f mvnhi.w r3, #4278190080 ; 0xff000000 } else { ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffff0000UL)); 802e81a: f64f 73ff movwls r3, #65535 ; 0xffff 802e81e: 9300 str r3, [sp, #0] } } ip_addr_copy(gw_addr, dhcp->offered_gw_addr); 802e820: 6ae3 ldr r3, [r4, #44] ; 0x2c 802e822: 9301 str r3, [sp, #4] /* gateway address not given? */ if (ip_addr_isany(&gw_addr)) { 802e824: b92b cbnz r3, 802e832 /* copy network address */ ip_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask); 802e826: 6a63 ldr r3, [r4, #36] ; 0x24 802e828: 9a00 ldr r2, [sp, #0] 802e82a: 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)); 802e82c: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000 802e830: 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); 802e832: 4628 mov r0, r5 802e834: f104 0124 add.w r1, r4, #36 ; 0x24 802e838: f000 fd6a bl 802f310 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); 802e83c: 4628 mov r0, r5 802e83e: 4669 mov r1, sp 802e840: f000 fda6 bl 802f390 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); 802e844: a901 add r1, sp, #4 802e846: 4628 mov r0, r5 802e848: f000 fd9e bl 802f388 /* bring the interface up */ netif_set_up(netif); 802e84c: 4628 mov r0, r5 802e84e: f000 fdf5 bl 802f43c /* netif is now bound to DHCP leased address */ dhcp_set_state(dhcp, DHCP_BOUND); 802e852: 4620 mov r0, r4 802e854: 210a movs r1, #10 802e856: f7ff fd1f bl 802e298 } 802e85a: bd3e pop {r1, r2, r3, r4, r5, pc} 0802e85c : /** * 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) { 802e85c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802e860: 4692 mov sl, r2 802e862: 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) { 802e864: 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; 802e868: f8d0 8020 ldr.w r8, [r0, #32] struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload; 802e86c: 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) { 802e86e: 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) { 802e870: 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) { 802e872: f240 81b8 bls.w 802ebe6 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) { 802e876: 7813 ldrb r3, [r2, #0] 802e878: 2b02 cmp r3, #2 802e87a: f040 81b4 bne.w 802ebe6 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++) { 802e87e: f890 1026 ldrb.w r1, [r0, #38] ; 0x26 802e882: 2300 movs r3, #0 802e884: e008 b.n 802e898 /** * 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) 802e886: 18e8 adds r0, r5, r3 802e888: 3301 adds r3, #1 802e88a: 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]) { 802e88c: f890 0027 ldrb.w r0, [r0, #39] ; 0x27 802e890: 7ee4 ldrb r4, [r4, #27] 802e892: 4284 cmp r4, r0 802e894: f040 81a7 bne.w 802ebe6 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++) { 802e898: b2d8 uxtb r0, r3 802e89a: 4288 cmp r0, r1 802e89c: d3f3 bcc.n 802e886 (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) { 802e89e: 6850 ldr r0, [r2, #4] 802e8a0: f7ff fcf8 bl 802e294 802e8a4: f8d8 3000 ldr.w r3, [r8] 802e8a8: 4298 cmp r0, r3 802e8aa: f040 819c bne.w 802ebe6 struct pbuf *q; int parse_file_as_options = 0; int parse_sname_as_options = 0; /* clear received options */ dhcp_clear_all_options(dhcp); 802e8ae: 2100 movs r1, #0 802e8b0: 220a movs r2, #10 802e8b2: 489d ldr r0, [pc, #628] ; (802eb28 ) 802e8b4: f7f3 fa74 bl 8021da0 /* check that beginning of dhcp_msg (up to and including chaddr) is in first pbuf */ if (p->len < DHCP_SNAME_OFS) { 802e8b8: f8ba 300a ldrh.w r3, [sl, #10] 802e8bc: 2b2b cmp r3, #43 ; 0x2b 802e8be: f240 8192 bls.w 802ebe6 return ERR_BUF; } dhcp->msg_in = (struct dhcp_msg *)p->payload; 802e8c2: 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; 802e8c6: 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; 802e8ca: 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; 802e8ce: f04f 0b00 mov.w fp, #0 #endif /* LWIP_DHCP_BOOTP_FILE */ /* parse options */ /* start with options field */ options_idx = DHCP_OPTIONS_OFS; 802e8d2: 22f0 movs r2, #240 ; 0xf0 802e8d4: e004 b.n 802e8e0 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; 802e8d6: f04f 0b00 mov.w fp, #0 options_idx = DHCP_SNAME_OFS; options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN; 802e8da: 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; 802e8de: 222c movs r2, #44 ; 0x2c #endif /* LWIP_DHCP_BOOTP_FILE */ /* parse options */ /* start with options field */ options_idx = DHCP_OPTIONS_OFS; 802e8e0: 4657 mov r7, sl 802e8e2: e009 b.n 802e8f8 again: q = p; while((q != NULL) && (options_idx >= q->len)) { options_idx -= q->len; options_idx_max -= q->len; q = q->next; 802e8e4: 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; 802e8e6: 1ad2 subs r2, r2, r3 options_idx_max -= q->len; 802e8e8: 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; 802e8ec: b292 uxth r2, r2 options_idx_max -= q->len; 802e8ee: 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)) { 802e8f2: 2f00 cmp r7, #0 802e8f4: f000 8177 beq.w 802ebe6 802e8f8: 897b ldrh r3, [r7, #10] 802e8fa: 429a cmp r2, r3 802e8fc: d2f2 bcs.n 802e8e4 if (q == NULL) { return ERR_BUF; } offset = options_idx; offset_max = options_idx_max; options = (u8_t*)q->payload; 802e8fe: 6878 ldr r0, [r7, #4] 802e900: 9003 str r0, [sp, #12] 802e902: e0db b.n 802eabc 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) { 802e904: 897b ldrh r3, [r7, #10] 802e906: 1c50 adds r0, r2, #1 802e908: 4298 cmp r0, r3 802e90a: da03 bge.n 802e914 len = options[offset + 1]; 802e90c: 9803 ldr r0, [sp, #12] 802e90e: 1883 adds r3, r0, r2 802e910: 785b ldrb r3, [r3, #1] 802e912: e003 b.n 802e91c } else { len = (q->next != NULL ? ((u8_t*)q->next->payload)[0] : 0); 802e914: 683b ldr r3, [r7, #0] 802e916: b10b cbz r3, 802e91c 802e918: 685b ldr r3, [r3, #4] 802e91a: 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) { 802e91c: 2933 cmp r1, #51 ; 0x33 802e91e: d038 beq.n 802e992 802e920: d807 bhi.n 802e932 802e922: 2901 cmp r1, #1 802e924: d019 beq.n 802e95a 802e926: d311 bcc.n 802e94c 802e928: 2903 cmp r1, #3 802e92a: d01d beq.n 802e968 802e92c: 2906 cmp r1, #6 802e92e: d155 bne.n 802e9dc 802e930: e021 b.n 802e976 802e932: 2936 cmp r1, #54 ; 0x36 802e934: d03d beq.n 802e9b2 802e936: d804 bhi.n 802e942 802e938: 2934 cmp r1, #52 ; 0x34 802e93a: d031 beq.n 802e9a0 802e93c: 2935 cmp r1, #53 ; 0x35 802e93e: d14d bne.n 802e9dc 802e940: e035 b.n 802e9ae 802e942: 293a cmp r1, #58 ; 0x3a 802e944: d03c beq.n 802e9c0 802e946: 293b cmp r1, #59 ; 0x3b 802e948: d148 bne.n 802e9dc 802e94a: e040 b.n 802e9ce /* case(DHCP_OPTION_END): handled above */ case(DHCP_OPTION_PAD): /* special option: no len encoded */ decode_len = len = 0; /* will be increased below */ offset--; 802e94c: 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; 802e94e: 2300 movs r3, #0 /* will be increased below */ offset--; 802e950: 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; 802e952: 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; 802e956: 461e mov r6, r3 802e958: e044 b.n 802e9e4 /* will be increased below */ offset--; break; case(DHCP_OPTION_SUBNET_MASK): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802e95a: 2b04 cmp r3, #4 802e95c: f040 8143 bne.w 802ebe6 802e960: 461e mov r6, r3 802e962: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_SUBNET_MASK; 802e964: 2406 movs r4, #6 802e966: e03d b.n 802e9e4 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;); 802e968: 2b03 cmp r3, #3 802e96a: f240 813c bls.w 802ebe6 802e96e: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_ROUTER; 802e970: 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 */ 802e972: 2604 movs r6, #4 802e974: e036 b.n 802e9e4 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;); 802e976: 0799 lsls r1, r3, #30 802e978: f040 8135 bne.w 802ebe6 /* limit number of DNS servers */ decode_len = LWIP_MIN(len, 4 * DNS_MAX_SERVERS); 802e97c: 2b08 cmp r3, #8 802e97e: bf34 ite cc 802e980: 461e movcc r6, r3 802e982: 2608 movcs r6, #8 802e984: b2f6 uxtb r6, r6 LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); 802e986: 42b3 cmp r3, r6 802e988: f0c0 812d bcc.w 802ebe6 802e98c: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_DNS_SERVER; 802e98e: 2408 movs r4, #8 802e990: e028 b.n 802e9e4 break; case(DHCP_OPTION_LEASE_TIME): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802e992: 2b04 cmp r3, #4 802e994: f040 8127 bne.w 802ebe6 802e998: 461e mov r6, r3 802e99a: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_LEASE_TIME; 802e99c: 2403 movs r4, #3 802e99e: e021 b.n 802e9e4 break; case(DHCP_OPTION_OVERLOAD): LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); 802e9a0: 2b01 cmp r3, #1 802e9a2: f040 8120 bne.w 802ebe6 802e9a6: 461e mov r6, r3 802e9a8: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_OVERLOAD; 802e9aa: 2400 movs r4, #0 802e9ac: e01a b.n 802e9e4 break; case(DHCP_OPTION_MESSAGE_TYPE): LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); 802e9ae: 2b01 cmp r3, #1 802e9b0: e007 b.n 802e9c2 decode_idx = DHCP_OPTION_IDX_MSG_TYPE; break; case(DHCP_OPTION_SERVER_ID): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802e9b2: 2b04 cmp r3, #4 802e9b4: f040 8117 bne.w 802ebe6 802e9b8: 461e mov r6, r3 802e9ba: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_SERVER_ID; 802e9bc: 2402 movs r4, #2 802e9be: e011 b.n 802e9e4 break; case(DHCP_OPTION_T1): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802e9c0: 2b04 cmp r3, #4 802e9c2: f040 8110 bne.w 802ebe6 802e9c6: 461e mov r6, r3 802e9c8: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_T1; 802e9ca: 461c mov r4, r3 802e9cc: e00a b.n 802e9e4 break; case(DHCP_OPTION_T2): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802e9ce: 2b04 cmp r3, #4 802e9d0: f040 8109 bne.w 802ebe6 802e9d4: 461e mov r6, r3 802e9d6: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_T2; 802e9d8: 2405 movs r4, #5 802e9da: e003 b.n 802e9e4 } 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) { 802e9dc: 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; 802e9de: 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; 802e9e2: 2600 movs r6, #0 LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", op)); break; } offset += len + 2; 802e9e4: 3102 adds r1, #2 802e9e6: fa13 f381 uxtah r3, r3, r1 802e9ea: b29b uxth r3, r3 802e9ec: 9301 str r3, [sp, #4] if (decode_len > 0) { 802e9ee: 2e00 cmp r6, #0 802e9f0: d04f beq.n 802ea92 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; 802e9f2: 3202 adds r2, #2 802e9f4: 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; 802e9f6: 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; 802e9f8: 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; 802e9fa: 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) 802e9fc: 4a4b ldr r2, [pc, #300] ; (802eb2c ) LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", op)); break; } offset += len + 2; if (decode_len > 0) { u32_t value = 0; 802e9fe: 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) 802ea02: 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; 802ea06: 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) 802ea08: 9206 str r2, [sp, #24] 802ea0a: 9302 str r3, [sp, #8] 802ea0c: 9805 ldr r0, [sp, #20] 802ea0e: 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)) { 802ea10: 4a45 ldr r2, [pc, #276] ; (802eb28 ) /** * 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) 802ea12: 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)) { 802ea14: 4844 ldr r0, [pc, #272] ; (802eb28 ) 802ea16: 18a2 adds r2, r4, r2 802ea18: 9207 str r2, [sp, #28] 802ea1a: 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) 802ea1c: ebc1 0c06 rsb ip, r1, r6 802ea20: b29b uxth r3, r3 802ea22: 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)) { 802ea26: 2a00 cmp r2, #0 802ea28: d133 bne.n 802ea92 copy_len = LWIP_MIN(decode_len, 4); pbuf_copy_partial(q, &value, copy_len, val_offset); 802ea2a: f1bc 0f03 cmp.w ip, #3 802ea2e: bf94 ite ls 802ea30: 4662 movls r2, ip 802ea32: 2204 movhi r2, #4 802ea34: 4638 mov r0, r7 802ea36: 9904 ldr r1, [sp, #16] 802ea38: f8cd c000 str.w ip, [sp] 802ea3c: f000 feaa bl 802f794 if (decode_len > 4) { 802ea40: f8dd c000 ldr.w ip, [sp] 802ea44: f1bc 0f04 cmp.w ip, #4 802ea48: d90f bls.n 802ea6a /* decode more than one u32_t */ LWIP_ERROR("decode_len % 4 == 0", decode_len % 4 == 0, return ERR_VAL;); 802ea4a: f01c 0f03 tst.w ip, #3 802ea4e: f040 80ca bne.w 802ebe6 dhcp_got_option(dhcp, decode_idx); 802ea52: 9907 ldr r1, [sp, #28] dhcp_set_option_value(dhcp, decode_idx, htonl(value)); 802ea54: 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); 802ea56: 2201 movs r2, #1 802ea58: 700a strb r2, [r1, #0] dhcp_set_option_value(dhcp, decode_idx, htonl(value)); 802ea5a: f7ff fc19 bl 802e290 802ea5e: 9b02 ldr r3, [sp, #8] 802ea60: 9906 ldr r1, [sp, #24] decode_len -= 4; val_offset += 4; decode_idx++; 802ea62: 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)); 802ea64: 50c8 str r0, [r1, r3] 802ea66: 3304 adds r3, #4 802ea68: e7cf b.n 802ea0a decode_len -= 4; val_offset += 4; decode_idx++; goto decode_next; } else if (decode_len == 4) { 802ea6a: d104 bne.n 802ea76 value = ntohl(value); 802ea6c: 9809 ldr r0, [sp, #36] ; 0x24 802ea6e: f7ff fc11 bl 802e294 802ea72: 9009 str r0, [sp, #36] ; 0x24 802ea74: e006 b.n 802ea84 } else { LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;); 802ea76: f1bc 0f01 cmp.w ip, #1 802ea7a: f040 80b4 bne.w 802ebe6 value = ((u8_t*)&value)[0]; 802ea7e: f89d 3024 ldrb.w r3, [sp, #36] ; 0x24 802ea82: 9309 str r3, [sp, #36] ; 0x24 } dhcp_got_option(dhcp, decode_idx); 802ea84: 4a28 ldr r2, [pc, #160] ; (802eb28 ) dhcp_set_option_value(dhcp, decode_idx, value); 802ea86: 4829 ldr r0, [pc, #164] ; (802eb2c ) 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); 802ea88: 2301 movs r3, #1 802ea8a: 5513 strb r3, [r2, r4] dhcp_set_option_value(dhcp, decode_idx, value); 802ea8c: 9b09 ldr r3, [sp, #36] ; 0x24 802ea8e: f840 3024 str.w r3, [r0, r4, lsl #2] } } if (offset >= q->len) { 802ea92: 897b ldrh r3, [r7, #10] 802ea94: 9901 ldr r1, [sp, #4] 802ea96: 4299 cmp r1, r3 802ea98: d30f bcc.n 802eaba offset -= q->len; 802ea9a: 1aca subs r2, r1, r3 offset_max -= q->len; 802ea9c: 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; 802eaa0: b292 uxth r2, r2 offset_max -= q->len; 802eaa2: fa1f f989 uxth.w r9, r9 if ((offset < offset_max) && offset_max) { 802eaa6: 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; 802eaa8: 9201 str r2, [sp, #4] offset_max -= q->len; if ((offset < offset_max) && offset_max) { 802eaaa: d303 bcc.n 802eab4 break; } } } /* is this an overloaded message? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) { 802eaac: 4a1e ldr r2, [pc, #120] ; (802eb28 ) 802eaae: 7813 ldrb r3, [r2, #0] 802eab0: b963 cbnz r3, 802eacc 802eab2: e09f b.n 802ebf4 } if (offset >= q->len) { offset -= q->len; offset_max -= q->len; if ((offset < offset_max) && offset_max) { q = q->next; 802eab4: 683f ldr r7, [r7, #0] LWIP_ASSERT("next pbuf was null", q); options = (u8_t*)q->payload; 802eab6: 687b ldr r3, [r7, #4] 802eab8: 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); 802eaba: 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)) { 802eabc: 9803 ldr r0, [sp, #12] 802eabe: 5c81 ldrb r1, [r0, r2] 802eac0: 29ff cmp r1, #255 ; 0xff 802eac2: d0f3 beq.n 802eaac 802eac4: 454a cmp r2, r9 802eac6: f4ff af1d bcc.w 802e904 802eaca: e7ef b.n 802eaac } } } /* 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); 802eacc: 4b17 ldr r3, [pc, #92] ; (802eb2c ) dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); 802eace: 4916 ldr r1, [pc, #88] ; (802eb28 ) } } } /* 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); 802ead0: 681b ldr r3, [r3, #0] dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); 802ead2: 2200 movs r2, #0 if (overload == DHCP_OVERLOAD_FILE) { 802ead4: 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); 802ead6: 700a strb r2, [r1, #0] if (overload == DHCP_OVERLOAD_FILE) { 802ead8: f000 8093 beq.w 802ec02 parse_file_as_options = 1; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded file field\n")); } else if (overload == DHCP_OVERLOAD_SNAME) { 802eadc: 2b02 cmp r3, #2 802eade: f43f aefa beq.w 802e8d6 parse_sname_as_options = 1; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname field\n")); } else if (overload == DHCP_OVERLOAD_SNAME_FILE) { 802eae2: 2b03 cmp r3, #3 802eae4: f040 8086 bne.w 802ebf4 802eae8: e089 b.n 802ebfe 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); 802eaea: 4a10 ldr r2, [pc, #64] ; (802eb2c ) 802eaec: 7911 ldrb r1, [r2, #4] /* message type is DHCP ACK? */ if (msg_type == DHCP_ACK) { 802eaee: 2905 cmp r1, #5 802eaf0: d140 bne.n 802eb74 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_ACK received\n")); /* in requesting state? */ if (dhcp->state == DHCP_REQUESTING) { 802eaf2: f898 100c ldrb.w r1, [r8, #12] 802eaf6: 2901 cmp r1, #1 802eaf8: d135 bne.n 802eb66 * @param netif the netif under DHCP control */ static void dhcp_handle_ack(struct netif *netif) { struct dhcp *dhcp = netif->dhcp; 802eafa: 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)) { 802eafc: 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); 802eafe: f8c4 b028 str.w fp, [r4, #40] ; 0x28 ip_addr_set_zero(&dhcp->offered_gw_addr); 802eb02: 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)) { 802eb06: b10b cbz r3, 802eb0c /* remember offered lease time */ dhcp->offered_t0_lease = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_LEASE_TIME); 802eb08: 68d3 ldr r3, [r2, #12] 802eb0a: 6323 str r3, [r4, #48] ; 0x30 } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) { 802eb0c: 4b06 ldr r3, [pc, #24] ; (802eb28 ) 802eb0e: 791a ldrb r2, [r3, #4] 802eb10: b112 cbz r2, 802eb18 /* remember given renewal period */ dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1); 802eb12: 4a06 ldr r2, [pc, #24] ; (802eb2c ) 802eb14: 6912 ldr r2, [r2, #16] 802eb16: e001 b.n 802eb1c } else { /* calculate safe periods for renewal */ dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2; 802eb18: 6b22 ldr r2, [r4, #48] ; 0x30 802eb1a: 0852 lsrs r2, r2, #1 } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) { 802eb1c: 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; 802eb1e: 6362 str r2, [r4, #52] ; 0x34 } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) { 802eb20: b133 cbz r3, 802eb30 /* remember given rebind period */ dhcp->offered_t2_rebind = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T2); 802eb22: 4b02 ldr r3, [pc, #8] ; (802eb2c ) 802eb24: 695b ldr r3, [r3, #20] 802eb26: e004 b.n 802eb32 802eb28: 2000e258 .word 0x2000e258 802eb2c: 2000e264 .word 0x2000e264 } else { /* calculate safe periods for rebinding */ dhcp->offered_t2_rebind = dhcp->offered_t0_lease; 802eb30: 6b23 ldr r3, [r4, #48] ; 0x30 802eb32: 63a3 str r3, [r4, #56] ; 0x38 } /* (y)our internet address */ ip_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); 802eb34: 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)) { 802eb36: 4a39 ldr r2, [pc, #228] ; (802ec1c ) /* 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); 802eb38: 691b ldr r3, [r3, #16] 802eb3a: 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)) { 802eb3c: 7993 ldrb r3, [r2, #6] 802eb3e: 4616 mov r6, r2 802eb40: b12b cbz r3, 802eb4e /* remember given subnet mask */ ip4_addr_set_u32(&dhcp->offered_sn_mask, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SUBNET_MASK))); 802eb42: 4b37 ldr r3, [pc, #220] ; (802ec20 ) 802eb44: 6998 ldr r0, [r3, #24] 802eb46: f7ff fba3 bl 802e290 dhcp->subnet_mask_given = 1; 802eb4a: 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))); 802eb4c: 62a0 str r0, [r4, #40] ; 0x28 dhcp->subnet_mask_given = 1; } else { dhcp->subnet_mask_given = 0; 802eb4e: 73a3 strb r3, [r4, #14] } /* gateway router */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_ROUTER)) { 802eb50: 79f3 ldrb r3, [r6, #7] 802eb52: b123 cbz r3, 802eb5e ip4_addr_set_u32(&dhcp->offered_gw_addr, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_ROUTER))); 802eb54: 4b32 ldr r3, [pc, #200] ; (802ec20 ) 802eb56: 69d8 ldr r0, [r3, #28] 802eb58: f7ff fb9a bl 802e290 802eb5c: 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); 802eb5e: 4628 mov r0, r5 802eb60: f7ff fe0a bl 802e778 802eb64: e03f b.n 802ebe6 /* 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)) { 802eb66: 3903 subs r1, #3 802eb68: 2902 cmp r1, #2 802eb6a: d83c bhi.n 802ebe6 dhcp_bind(netif); 802eb6c: 4628 mov r0, r5 802eb6e: f7ff fe16 bl 802e79e 802eb72: e038 b.n 802ebe6 } } /* received a DHCP_NAK in appropriate state? */ else if ((msg_type == DHCP_NAK) && 802eb74: 2906 cmp r1, #6 802eb76: d121 bne.n 802ebbc 802eb78: f898 300c ldrb.w r3, [r8, #12] 802eb7c: 2b05 cmp r3, #5 802eb7e: d832 bhi.n 802ebe6 802eb80: f998 300c ldrsb.w r3, [r8, #12] 802eb84: f04f 42b8 mov.w r2, #1543503872 ; 0x5c000000 802eb88: 409a lsls r2, r3 802eb8a: d52c bpl.n 802ebe6 { 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); 802eb8c: 4628 mov r0, r5 * @param netif the netif under DHCP control */ static void dhcp_handle_nak(struct netif *netif) { struct dhcp *dhcp = netif->dhcp; 802eb8e: 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); 802eb90: f000 fc6e bl 802f470 /* remove IP address from interface */ netif_set_ipaddr(netif, IP_ADDR_ANY); 802eb94: 4628 mov r0, r5 802eb96: 4923 ldr r1, [pc, #140] ; (802ec24 ) 802eb98: f000 fbba bl 802f310 netif_set_gw(netif, IP_ADDR_ANY); 802eb9c: 4628 mov r0, r5 802eb9e: 4921 ldr r1, [pc, #132] ; (802ec24 ) 802eba0: f000 fbf2 bl 802f388 netif_set_netmask(netif, IP_ADDR_ANY); 802eba4: 4628 mov r0, r5 802eba6: 491f ldr r1, [pc, #124] ; (802ec24 ) 802eba8: f000 fbf2 bl 802f390 /* Change to a defined state */ dhcp_set_state(dhcp, DHCP_BACKING_OFF); 802ebac: 4620 mov r0, r4 802ebae: 210c movs r1, #12 802ebb0: f7ff fb72 bl 802e298 /* We can immediately restart discovery */ dhcp_discover(netif); 802ebb4: 4628 mov r0, r5 802ebb6: f7ff fc7f bl 802e4b8 802ebba: e014 b.n 802ebe6 (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)) { 802ebbc: 2902 cmp r1, #2 802ebbe: d112 bne.n 802ebe6 802ebc0: f898 100c ldrb.w r1, [r8, #12] 802ebc4: 2906 cmp r1, #6 802ebc6: d10e bne.n 802ebe6 { 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)) { 802ebc8: 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; 802ebca: 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; 802ebce: 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)) { 802ebd0: b14b cbz r3, 802ebe6 ip4_addr_set_u32(&dhcp->server_ip_addr, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SERVER_ID))); 802ebd2: 6890 ldr r0, [r2, #8] 802ebd4: f7ff fb5c bl 802e290 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); 802ebd8: 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))); 802ebda: 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); 802ebdc: 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); 802ebde: 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); 802ebe0: 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); 802ebe2: f7ff fd57 bl 802e694 dhcp->request_timeout = 0; /* remember offered lease */ dhcp_handle_offer(netif); } free_pbuf_and_return: dhcp->msg_in = NULL; 802ebe6: 2300 movs r3, #0 802ebe8: f8c8 3008 str.w r3, [r8, #8] pbuf_free(p); 802ebec: 4650 mov r0, sl 802ebee: f000 fc83 bl 802f4f8 802ebf2: e010 b.n 802ec16 /* 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) { 802ebf4: f1bb 0f00 cmp.w fp, #0 802ebf8: f47f ae6d bne.w 802e8d6 802ebfc: e005 b.n 802ec0a 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; 802ebfe: 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; 802ec02: 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; 802ec06: 226c movs r2, #108 ; 0x6c 802ec08: e66a b.n 802e8e0 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)) { 802ec0a: 4b04 ldr r3, [pc, #16] ; (802ec1c ) 802ec0c: 785a ldrb r2, [r3, #1] 802ec0e: 2a00 cmp r2, #0 802ec10: f47f af6b bne.w 802eaea 802ec14: e7e7 b.n 802ebe6 dhcp_handle_offer(netif); } free_pbuf_and_return: dhcp->msg_in = NULL; pbuf_free(p); } 802ec16: b00b add sp, #44 ; 0x2c 802ec18: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802ec1c: 2000e258 .word 0x2000e258 802ec20: 2000e264 .word 0x2000e264 802ec24: 08043fe4 .word 0x08043fe4 0802ec28 : * * @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) { 802ec28: b537 push {r0, r1, r2, r4, r5, lr} LWIP_ERROR("netif != NULL", (netif != NULL), return;); 802ec2a: 4605 mov r5, r0 802ec2c: 2800 cmp r0, #0 802ec2e: d037 beq.n 802eca0 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)) { 802ec30: 6a04 ldr r4, [r0, #32] 802ec32: 2c00 cmp r4, #0 802ec34: d034 beq.n 802eca0 802ec36: 7b23 ldrb r3, [r4, #12] 802ec38: 2b08 cmp r3, #8 802ec3a: d131 bne.n 802eca0 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)) { 802ec3c: 680a ldr r2, [r1, #0] 802ec3e: 6a63 ldr r3, [r4, #36] ; 0x24 802ec40: 429a cmp r2, r3 802ec42: d12d bne.n 802eca0 { 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); 802ec44: 4620 mov r0, r4 802ec46: 210c movs r1, #12 802ec48: f7ff fb26 bl 802e298 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_DECLINE); 802ec4c: 4628 mov r0, r5 802ec4e: 4621 mov r1, r4 802ec50: 2204 movs r2, #4 802ec52: f7ff fb85 bl 802e360 if (result == ERR_OK) { 802ec56: b9f0 cbnz r0, 802ec96 dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); 802ec58: 2204 movs r2, #4 802ec5a: 2132 movs r1, #50 ; 0x32 802ec5c: 4620 mov r0, r4 802ec5e: f7ff fb23 bl 802e2a8 dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); 802ec62: 6a60 ldr r0, [r4, #36] ; 0x24 802ec64: f7ff fb16 bl 802e294 802ec68: 4601 mov r1, r0 802ec6a: 4620 mov r0, r4 802ec6c: f7ff fb43 bl 802e2f6 dhcp_option_trailer(dhcp); 802ec70: 4620 mov r0, r4 802ec72: f7ff fb60 bl 802e336 /* resize pbuf to reflect true size of options */ pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802ec76: 8b21 ldrh r1, [r4, #24] 802ec78: 6920 ldr r0, [r4, #16] 802ec7a: 31f0 adds r1, #240 ; 0xf0 802ec7c: b289 uxth r1, r1 802ec7e: f000 fc62 bl 802f546 /* per section 4.4.4, broadcast DECLINE messages */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802ec82: 9500 str r5, [sp, #0] 802ec84: 6860 ldr r0, [r4, #4] 802ec86: 6921 ldr r1, [r4, #16] 802ec88: 4a06 ldr r2, [pc, #24] ; (802eca4 ) 802ec8a: 2343 movs r3, #67 ; 0x43 802ec8c: f003 f8d4 bl 8031e38 dhcp_delete_msg(dhcp); 802ec90: 4620 mov r0, r4 802ec92: f7ff fc05 bl 802e4a0 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++; 802ec96: 7b63 ldrb r3, [r4, #13] 802ec98: 3301 adds r3, #1 802ec9a: 7363 strb r3, [r4, #13] msecs = 10*1000; dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802ec9c: 2314 movs r3, #20 802ec9e: 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); } } } 802eca0: bd3e pop {r1, r2, r3, r4, r5, pc} 802eca2: bf00 nop 802eca4: 08043fe0 .word 0x08043fe0 0802eca8 : * * @param netif network interface which must renew its lease */ err_t dhcp_renew(struct netif *netif) { 802eca8: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802ecaa: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must renew its lease */ err_t dhcp_renew(struct netif *netif) { 802ecac: 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); 802ecae: 2105 movs r1, #5 802ecb0: 4620 mov r0, r4 802ecb2: f7ff faf1 bl 802e298 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 802ecb6: 4628 mov r0, r5 802ecb8: 4621 mov r1, r4 802ecba: 2203 movs r2, #3 802ecbc: f7ff fb50 bl 802e360 if (result == ERR_OK) { 802ecc0: 4606 mov r6, r0 802ecc2: b9e0 cbnz r0, 802ecfe dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 802ecc4: 2202 movs r2, #2 802ecc6: 4620 mov r0, r4 802ecc8: 2139 movs r1, #57 ; 0x39 802ecca: f7ff faed bl 802e2a8 dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 802ecce: 8ca9 ldrh r1, [r5, #36] ; 0x24 802ecd0: 4620 mov r0, r4 802ecd2: f7ff fb00 bl 802e2d6 #if LWIP_NETIF_HOSTNAME dhcp_option_hostname(dhcp, netif); #endif /* LWIP_NETIF_HOSTNAME */ /* append DHCP message trailer */ dhcp_option_trailer(dhcp); 802ecd6: 4620 mov r0, r4 802ecd8: f7ff fb2d bl 802e336 pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802ecdc: 8b21 ldrh r1, [r4, #24] 802ecde: 6920 ldr r0, [r4, #16] 802ece0: 31f0 adds r1, #240 ; 0xf0 802ece2: b289 uxth r1, r1 802ece4: f000 fc2f bl 802f546 udp_sendto_if(dhcp->pcb, dhcp->p_out, &dhcp->server_ip_addr, DHCP_SERVER_PORT, netif); 802ece8: 9500 str r5, [sp, #0] 802ecea: 6860 ldr r0, [r4, #4] 802ecec: 6921 ldr r1, [r4, #16] 802ecee: f104 0220 add.w r2, r4, #32 802ecf2: 2343 movs r3, #67 ; 0x43 802ecf4: f003 f8a0 bl 8031e38 dhcp_delete_msg(dhcp); 802ecf8: 4620 mov r0, r4 802ecfa: f7ff fbd1 bl 802e4a0 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++; 802ecfe: 7b63 ldrb r3, [r4, #13] 802ed00: 3301 adds r3, #1 802ed02: b2db uxtb r3, r3 /* back-off on retries, but to a maximum of 20 seconds */ msecs = dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000; 802ed04: 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++; 802ed06: 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; 802ed08: d804 bhi.n 802ed14 802ed0a: f44f 62fa mov.w r2, #2000 ; 0x7d0 802ed0e: 4353 muls r3, r2 802ed10: b29b uxth r3, r3 802ed12: e001 b.n 802ed18 802ed14: f644 6320 movw r3, #20000 ; 0x4e20 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802ed18: f44f 72fa mov.w r2, #500 ; 0x1f4 802ed1c: f203 13f3 addw r3, r3, #499 ; 0x1f3 802ed20: fb93 f3f2 sdiv r3, r3, r2 802ed24: 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; } 802ed26: 4630 mov r0, r6 802ed28: bd7c pop {r2, r3, r4, r5, r6, pc} 802ed2a: 0000 movs r0, r0 0802ed2c : /** * The DHCP timer that checks for lease renewal/rebind timeouts. */ void dhcp_coarse_tmr() { 802ed2c: b538 push {r3, r4, r5, lr} struct netif *netif = netif_list; 802ed2e: 4b15 ldr r3, [pc, #84] ; (802ed84 ) 802ed30: 4d15 ldr r5, [pc, #84] ; (802ed88 ) 802ed32: 681c ldr r4, [r3, #0] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_coarse_tmr()\n")); /* iterate through all network interfaces */ while (netif != NULL) { 802ed34: e023 b.n 802ed7e /* only act on DHCP configured interfaces */ if (netif->dhcp != NULL) { 802ed36: 6a23 ldr r3, [r4, #32] 802ed38: b303 cbz r3, 802ed7c /* timer is active (non zero), and triggers (zeroes) now? */ if (netif->dhcp->t2_timeout-- == 1) { 802ed3a: 8bda ldrh r2, [r3, #30] 802ed3c: 1e51 subs r1, r2, #1 802ed3e: 2a01 cmp r2, #1 802ed40: 83d9 strh r1, [r3, #30] 802ed42: d10b bne.n 802ed5c 802ed44: 7b1a ldrb r2, [r3, #12] 802ed46: 2a0a cmp r2, #10 802ed48: d818 bhi.n 802ed7c 802ed4a: f993 300c ldrsb.w r3, [r3, #12] 802ed4e: fa15 f303 lsls.w r3, r5, r3 802ed52: d513 bpl.n 802ed7c /* 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); 802ed54: 4620 mov r0, r4 802ed56: f7ff fc0b bl 802e570 802ed5a: e00f b.n 802ed7c 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) { 802ed5c: 8b9a ldrh r2, [r3, #28] 802ed5e: 1e51 subs r1, r2, #1 802ed60: 2a01 cmp r2, #1 802ed62: 8399 strh r1, [r3, #28] 802ed64: d10a bne.n 802ed7c 802ed66: 7b1a ldrb r2, [r3, #12] 802ed68: 2a0a cmp r2, #10 802ed6a: d807 bhi.n 802ed7c 802ed6c: f993 300c ldrsb.w r3, [r3, #12] 802ed70: fa15 f303 lsls.w r3, r5, r3 802ed74: d502 bpl.n 802ed7c * 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); 802ed76: 4620 mov r0, r4 802ed78: f7ff ff96 bl 802eca8 /* this clients' renewal timeout triggered */ dhcp_t1_timeout(netif); } } /* proceed to next netif */ netif = netif->next; 802ed7c: 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) { 802ed7e: 2c00 cmp r4, #0 802ed80: d1d9 bne.n 802ed36 } } /* proceed to next netif */ netif = netif->next; } } 802ed82: bd38 pop {r3, r4, r5, pc} 802ed84: 2000f6a0 .word 0x2000f6a0 802ed88: 44200000 .word 0x44200000 0802ed8c : * * @param netif network interface which must release its lease */ err_t dhcp_release(struct netif *netif) { 802ed8c: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802ed8e: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must release its lease */ err_t dhcp_release(struct netif *netif) { 802ed90: 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); 802ed92: 2100 movs r1, #0 802ed94: 4620 mov r0, r4 802ed96: f7ff fa7f bl 802e298 /* clean old DHCP offer */ ip_addr_set_zero(&dhcp->server_ip_addr); 802ed9a: 2300 movs r3, #0 802ed9c: 6223 str r3, [r4, #32] ip_addr_set_zero(&dhcp->offered_ip_addr); 802ed9e: 6263 str r3, [r4, #36] ; 0x24 ip_addr_set_zero(&dhcp->offered_sn_mask); 802eda0: 62a3 str r3, [r4, #40] ; 0x28 ip_addr_set_zero(&dhcp->offered_gw_addr); 802eda2: 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; 802eda4: 63a3 str r3, [r4, #56] ; 0x38 802eda6: 6363 str r3, [r4, #52] ; 0x34 802eda8: 6323 str r3, [r4, #48] ; 0x30 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_RELEASE); 802edaa: 4628 mov r0, r5 802edac: 4621 mov r1, r4 802edae: 2207 movs r2, #7 802edb0: f7ff fad6 bl 802e360 if (result == ERR_OK) { 802edb4: 4606 mov r6, r0 802edb6: b998 cbnz r0, 802ede0 dhcp_option_trailer(dhcp); 802edb8: 4620 mov r0, r4 802edba: f7ff fabc bl 802e336 pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802edbe: 8b21 ldrh r1, [r4, #24] 802edc0: 6920 ldr r0, [r4, #16] 802edc2: 31f0 adds r1, #240 ; 0xf0 802edc4: b289 uxth r1, r1 802edc6: f000 fbbe bl 802f546 udp_sendto_if(dhcp->pcb, dhcp->p_out, &dhcp->server_ip_addr, DHCP_SERVER_PORT, netif); 802edca: 9500 str r5, [sp, #0] 802edcc: 6860 ldr r0, [r4, #4] 802edce: 6921 ldr r1, [r4, #16] 802edd0: f104 0220 add.w r2, r4, #32 802edd4: 2343 movs r3, #67 ; 0x43 802edd6: f003 f82f bl 8031e38 dhcp_delete_msg(dhcp); 802edda: 4620 mov r0, r4 802eddc: f7ff fb60 bl 802e4a0 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++; 802ede0: 7b63 ldrb r3, [r4, #13] 802ede2: 3301 adds r3, #1 802ede4: b2db uxtb r3, r3 msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802ede6: 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++; 802ede8: 7363 strb r3, [r4, #13] msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802edea: d804 bhi.n 802edf6 802edec: f44f 727a mov.w r2, #1000 ; 0x3e8 802edf0: 4353 muls r3, r2 802edf2: b29b uxth r3, r3 802edf4: e001 b.n 802edfa 802edf6: f242 7310 movw r3, #10000 ; 0x2710 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802edfa: f44f 72fa mov.w r2, #500 ; 0x1f4 802edfe: f203 13f3 addw r3, r3, #499 ; 0x1f3 802ee02: fb93 f3f2 sdiv r3, r3, r2 802ee06: 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); 802ee08: 4628 mov r0, r5 802ee0a: f000 fb31 bl 802f470 /* remove IP address from interface */ netif_set_ipaddr(netif, IP_ADDR_ANY); 802ee0e: 4628 mov r0, r5 802ee10: 4906 ldr r1, [pc, #24] ; (802ee2c ) 802ee12: f000 fa7d bl 802f310 netif_set_gw(netif, IP_ADDR_ANY); 802ee16: 4628 mov r0, r5 802ee18: 4904 ldr r1, [pc, #16] ; (802ee2c ) 802ee1a: f000 fab5 bl 802f388 netif_set_netmask(netif, IP_ADDR_ANY); 802ee1e: 4628 mov r0, r5 802ee20: 4902 ldr r1, [pc, #8] ; (802ee2c ) 802ee22: f000 fab5 bl 802f390 return result; } 802ee26: 4630 mov r0, r6 802ee28: bd7c pop {r2, r3, r4, r5, r6, pc} 802ee2a: bf00 nop 802ee2c: 08043fe4 .word 0x08043fe4 0802ee30 : * 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() { 802ee30: b538 push {r3, r4, r5, lr} struct netif *netif = netif_list; 802ee32: 4b26 ldr r3, [pc, #152] ; (802eecc ) /* 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--; 802ee34: 2500 movs r5, #0 * This timer checks whether an outstanding DHCP request is timed out. */ void dhcp_fine_tmr() { struct netif *netif = netif_list; 802ee36: 681c ldr r4, [r3, #0] /* loop through netif's */ while (netif != NULL) { 802ee38: e044 b.n 802eec4 /* only act on DHCP configured interfaces */ if (netif->dhcp != NULL) { 802ee3a: 6a23 ldr r3, [r4, #32] 802ee3c: 2b00 cmp r3, #0 802ee3e: d040 beq.n 802eec2 /* timer is active (non zero), and is about to trigger now */ if (netif->dhcp->request_timeout > 1) { 802ee40: 8b5a ldrh r2, [r3, #26] 802ee42: 2a01 cmp r2, #1 802ee44: d902 bls.n 802ee4c netif->dhcp->request_timeout--; 802ee46: 3a01 subs r2, #1 802ee48: 835a strh r2, [r3, #26] 802ee4a: e03a b.n 802eec2 } else if (netif->dhcp->request_timeout == 1) { 802ee4c: d139 bne.n 802eec2 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)) { 802ee4e: 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--; 802ee50: 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)) { 802ee52: 2a0c cmp r2, #12 802ee54: d028 beq.n 802eea8 802ee56: 2a06 cmp r2, #6 802ee58: d100 bne.n 802ee5c 802ee5a: e025 b.n 802eea8 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) { 802ee5c: 2a01 cmp r2, #1 802ee5e: d106 bne.n 802ee6e LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REQUESTING, DHCP request timed out\n")); if (dhcp->tries <= 5) { 802ee60: 7b5b ldrb r3, [r3, #13] 802ee62: 2b05 cmp r3, #5 dhcp_select(netif); 802ee64: 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) { 802ee66: d81d bhi.n 802eea4 dhcp_select(netif); 802ee68: f7ff fc14 bl 802e694 802ee6c: e029 b.n 802eec2 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) { 802ee6e: 2a08 cmp r2, #8 802ee70: d109 bne.n 802ee86 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): CHECKING, ARP request timed out\n")); if (dhcp->tries <= 1) { 802ee72: 7b5b ldrb r3, [r3, #13] 802ee74: 2b01 cmp r3, #1 dhcp_check(netif); 802ee76: 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) { 802ee78: d802 bhi.n 802ee80 dhcp_check(netif); 802ee7a: f7ff fc7d bl 802e778 802ee7e: e020 b.n 802eec2 /* 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); 802ee80: f7ff fc8d bl 802e79e 802ee84: e01d b.n 802eec2 } #endif /* DHCP_DOES_ARP_CHECK */ } /* did not get response to renew request? */ else if (dhcp->state == DHCP_RENEWING) { 802ee86: 2a05 cmp r2, #5 802ee88: d103 bne.n 802ee92 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); 802ee8a: 4620 mov r0, r4 802ee8c: f7ff ff0c bl 802eca8 802ee90: e017 b.n 802eec2 /* did not get response to rebind request? */ } else if (dhcp->state == DHCP_REBINDING) { 802ee92: 2a04 cmp r2, #4 802ee94: d10a bne.n 802eeac LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REBINDING, DHCP request timed out\n")); if (dhcp->tries <= 8) { 802ee96: 7b5b ldrb r3, [r3, #13] 802ee98: 2b08 cmp r3, #8 dhcp_rebind(netif); 802ee9a: 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) { 802ee9c: d802 bhi.n 802eea4 dhcp_rebind(netif); 802ee9e: f7ff fb67 bl 802e570 802eea2: e00e b.n 802eec2 } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): RELEASING, DISCOVERING\n")); dhcp_release(netif); 802eea4: f7ff ff72 bl 802ed8c dhcp_discover(netif); 802eea8: 4620 mov r0, r4 802eeaa: e008 b.n 802eebe } } else if (dhcp->state == DHCP_REBOOTING) { 802eeac: 2a03 cmp r2, #3 802eeae: d108 bne.n 802eec2 if (dhcp->tries < REBOOT_TRIES) { 802eeb0: 7b5b ldrb r3, [r3, #13] 802eeb2: 2b01 cmp r3, #1 dhcp_reboot(netif); 802eeb4: 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) { 802eeb6: d802 bhi.n 802eebe dhcp_reboot(netif); 802eeb8: f7ff fb9c bl 802e5f4 802eebc: e001 b.n 802eec2 } else { dhcp_discover(netif); 802eebe: f7ff fafb bl 802e4b8 /* this client's request timeout triggered */ dhcp_timeout(netif); } } /* proceed to next network interface */ netif = netif->next; 802eec2: 6824 ldr r4, [r4, #0] void dhcp_fine_tmr() { struct netif *netif = netif_list; /* loop through netif's */ while (netif != NULL) { 802eec4: 2c00 cmp r4, #0 802eec6: d1b8 bne.n 802ee3a } } /* proceed to next network interface */ netif = netif->next; } } 802eec8: bd38 pop {r3, r4, r5, pc} 802eeca: bf00 nop 802eecc: 2000f6a0 .word 0x2000f6a0 0802eed0 : * * @param netif The network interface to stop DHCP on */ void dhcp_stop(struct netif *netif) { 802eed0: b510 push {r4, lr} struct dhcp *dhcp; LWIP_ERROR("dhcp_stop: netif != NULL", (netif != NULL), return;); 802eed2: b198 cbz r0, 802eefc dhcp = netif->dhcp; /* Remove the flag that says this netif is handled by DHCP. */ netif->flags &= ~NETIF_FLAG_DHCP; 802eed4: 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; 802eed8: 6a04 ldr r4, [r0, #32] /* Remove the flag that says this netif is handled by DHCP. */ netif->flags &= ~NETIF_FLAG_DHCP; 802eeda: f023 0308 bic.w r3, r3, #8 802eede: 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) { 802eee2: b15c cbz r4, 802eefc autoip_stop(netif); dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; } #endif /* LWIP_DHCP_AUTOIP_COOP */ if (dhcp->pcb != NULL) { 802eee4: 6860 ldr r0, [r4, #4] 802eee6: b118 cbz r0, 802eef0 udp_remove(dhcp->pcb); 802eee8: f003 f852 bl 8031f90 dhcp->pcb = NULL; 802eeec: 2300 movs r3, #0 802eeee: 6063 str r3, [r4, #4] } LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); dhcp_set_state(dhcp, DHCP_OFF); 802eef0: 4620 mov r0, r4 802eef2: 2100 movs r1, #0 } } 802eef4: 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); 802eef8: f7ff b9ce b.w 802e298 802eefc: bd10 pop {r4, pc} 802eefe: 0000 movs r0, r0 0802ef00 : * - ERR_OK - No error * - ERR_MEM - Out of memory */ err_t dhcp_start(struct netif *netif) { 802ef00: b538 push {r3, r4, r5, lr} struct dhcp *dhcp; err_t result = ERR_OK; LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;); 802ef02: 4604 mov r4, r0 802ef04: b908 cbnz r0, 802ef0a 802ef06: 20f2 movs r0, #242 ; 0xf2 802ef08: e047 b.n 802ef9a 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; 802ef0a: 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; 802ef0e: 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; 802ef10: f023 0208 bic.w r2, r3, #8 /* check hwtype of the netif */ if ((netif->flags & NETIF_FLAG_ETHARP) == 0) { 802ef14: f003 0320 and.w r3, r3, #32 802ef18: 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; 802ef1a: f880 202d strb.w r2, [r0, #45] ; 0x2d /* check hwtype of the netif */ if ((netif->flags & NETIF_FLAG_ETHARP) == 0) { 802ef1e: 2b00 cmp r3, #0 802ef20: d0f1 beq.n 802ef06 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) { 802ef22: 8c83 ldrh r3, [r0, #36] ; 0x24 802ef24: f5b3 7f10 cmp.w r3, #576 ; 0x240 802ef28: d200 bcs.n 802ef2c 802ef2a: e02e b.n 802ef8a 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) { 802ef2c: b935 cbnz r5, 802ef3c LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): starting new DHCP client\n")); dhcp = (struct dhcp *)mem_malloc(sizeof(struct dhcp)); 802ef2e: 203c movs r0, #60 ; 0x3c 802ef30: f000 f938 bl 802f1a4 if (dhcp == NULL) { 802ef34: 4605 mov r5, r0 802ef36: b340 cbz r0, 802ef8a 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; 802ef38: 6220 str r0, [r4, #32] 802ef3a: e003 b.n 802ef44 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) { 802ef3c: 6868 ldr r0, [r5, #4] 802ef3e: b108 cbz r0, 802ef44 udp_remove(dhcp->pcb); 802ef40: f003 f826 bl 8031f90 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)); 802ef44: 2100 movs r1, #0 802ef46: 223c movs r2, #60 ; 0x3c 802ef48: 4628 mov r0, r5 802ef4a: f7f2 ff29 bl 8021da0 /* dhcp_set_state(&dhcp, DHCP_OFF); */ /* allocate UDP PCB */ dhcp->pcb = udp_new(); 802ef4e: f003 f83b bl 8031fc8 802ef52: 6068 str r0, [r5, #4] if (dhcp->pcb == NULL) { 802ef54: b1c8 cbz r0, 802ef8a LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not obtain pcb\n")); return ERR_MEM; } ip_set_option(dhcp->pcb, SOF_BROADCAST); 802ef56: 7a03 ldrb r3, [r0, #8] /* set up local and remote port for the pcb */ udp_bind(dhcp->pcb, IP_ADDR_ANY, DHCP_CLIENT_PORT); 802ef58: 4911 ldr r1, [pc, #68] ; (802efa0 ) 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); 802ef5a: f043 0320 orr.w r3, r3, #32 802ef5e: 7203 strb r3, [r0, #8] /* set up local and remote port for the pcb */ udp_bind(dhcp->pcb, IP_ADDR_ANY, DHCP_CLIENT_PORT); 802ef60: 2244 movs r2, #68 ; 0x44 802ef62: 6868 ldr r0, [r5, #4] 802ef64: f002 ff18 bl 8031d98 udp_connect(dhcp->pcb, IP_ADDR_ANY, DHCP_SERVER_PORT); 802ef68: 490d ldr r1, [pc, #52] ; (802efa0 ) 802ef6a: 6868 ldr r0, [r5, #4] 802ef6c: 2243 movs r2, #67 ; 0x43 802ef6e: f002 ffdd bl 8031f2c /* set up the recv callback and argument */ udp_recv(dhcp->pcb, dhcp_recv, netif); 802ef72: 6868 ldr r0, [r5, #4] 802ef74: 490b ldr r1, [pc, #44] ; (802efa4 ) 802ef76: 4622 mov r2, r4 802ef78: f003 f806 bl 8031f88 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): starting DHCP configuration\n")); /* (re)start the DHCP negotiation */ result = dhcp_discover(netif); 802ef7c: 4620 mov r0, r4 802ef7e: f7ff fa9b bl 802e4b8 if (result != ERR_OK) { 802ef82: b120 cbz r0, 802ef8e /* free resources allocated above */ dhcp_stop(netif); 802ef84: 4620 mov r0, r4 802ef86: f7ff ffa3 bl 802eed0 return ERR_MEM; 802ef8a: 20ff movs r0, #255 ; 0xff 802ef8c: e005 b.n 802ef9a } /* Set the flag that says this netif is handled by DHCP. */ netif->flags |= NETIF_FLAG_DHCP; 802ef8e: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 802ef92: f043 0308 orr.w r3, r3, #8 802ef96: f884 302d strb.w r3, [r4, #45] ; 0x2d return result; } 802ef9a: b240 sxtb r0, r0 802ef9c: bd38 pop {r3, r4, r5, pc} 802ef9e: bf00 nop 802efa0: 08043fe4 .word 0x08043fe4 802efa4: 0802e85d .word 0x0802e85d 0802efa8 : /** * Perform Sanity check of user-configurable values, and initialize all modules. */ void lwip_init(void) { 802efa8: b508 push {r3, lr} /* Modules initialization */ stats_init(); #if !NO_SYS sys_init(); 802efaa: f007 ff2f bl 8036e0c #endif /* !NO_SYS */ mem_init(); 802efae: f000 f80f bl 802efd0 memp_init(); 802efb2: f000 f95b bl 802f26c pbuf_init(); netif_init(); 802efb6: f000 f9a9 bl 802f30c #endif /* LWIP_ARP */ #if LWIP_RAW raw_init(); #endif /* LWIP_RAW */ #if LWIP_UDP udp_init(); 802efba: f002 fe27 bl 8031c0c #endif /* LWIP_UDP */ #if LWIP_TCP tcp_init(); 802efbe: f000 fc8b bl 802f8d8 #endif /* LWIP_TCP */ #if LWIP_SNMP snmp_init(); 802efc2: f005 fde1 bl 8034b88 #endif /* LWIP_DNS */ #if LWIP_TIMERS sys_timeouts_init(); #endif /* LWIP_TIMERS */ } 802efc6: e8bd 4008 ldmia.w sp!, {r3, lr} #if LWIP_DNS dns_init(); #endif /* LWIP_DNS */ #if LWIP_TIMERS sys_timeouts_init(); 802efca: f002 bd49 b.w 8031a60 802efce: 0000 movs r0, r0 0802efd0 : 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); 802efd0: 4b0b ldr r3, [pc, #44] ; (802f000 ) 802efd2: 4a0c ldr r2, [pc, #48] ; (802f004 ) 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]; 802efd4: 480c ldr r0, [pc, #48] ; (802f008 ) 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); 802efd6: f023 0303 bic.w r3, r3, #3 802efda: 6013 str r3, [r2, #0] /* initialize the start of the heap */ mem = (struct mem *)(void *)ram; mem->next = MEM_SIZE_ALIGNED; 802efdc: f44f 51a0 mov.w r1, #5120 ; 0x1400 mem->prev = 0; 802efe0: 2200 movs r2, #0 802efe2: 805a strh r2, [r3, #2] mem->used = 0; 802efe4: 711a strb r2, [r3, #4] /* initialize the end of the heap */ ram_end = (struct mem *)(void *)&ram[MEM_SIZE_ALIGNED]; 802efe6: 185a adds r2, r3, r1 802efe8: 6002 str r2, [r0, #0] ram_end->used = 1; 802efea: 2001 movs r0, #1 802efec: 7110 strb r0, [r2, #4] ram_end->next = MEM_SIZE_ALIGNED; ram_end->prev = MEM_SIZE_ALIGNED; 802efee: 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; 802eff0: 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) { 802eff2: 4806 ldr r0, [pc, #24] ; (802f00c ) 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; 802eff4: 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; 802eff6: 4a06 ldr r2, [pc, #24] ; (802f010 ) 802eff8: 6013 str r3, [r2, #0] MEM_STATS_AVAIL(avail, MEM_SIZE_ALIGNED); if(sys_mutex_new(&mem_mutex) != ERR_OK) { 802effa: f007 bee9 b.w 8036dd0 802effe: bf00 nop 802f000: 2000e28f .word 0x2000e28f 802f004: 20000d54 .word 0x20000d54 802f008: 20000d4c .word 0x20000d4c 802f00c: 20000d50 .word 0x20000d50 802f010: 20000d48 .word 0x20000d48 0802f014 : * @param rmem is the data portion of a struct mem as returned by a previous * call to mem_malloc() */ void mem_free(void *rmem) { 802f014: b570 push {r4, r5, r6, lr} struct mem *mem; LWIP_MEM_FREE_DECL_PROTECT(); if (rmem == NULL) { 802f016: 4604 mov r4, r0 802f018: 2800 cmp r0, #0 802f01a: d04c beq.n 802f0b6 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) { 802f01c: 4b26 ldr r3, [pc, #152] ; (802f0b8 ) 802f01e: 681b ldr r3, [r3, #0] 802f020: 4298 cmp r0, r3 802f022: d303 bcc.n 802f02c 802f024: 4b25 ldr r3, [pc, #148] ; (802f0bc ) 802f026: 681b ldr r3, [r3, #0] 802f028: 4298 cmp r0, r3 802f02a: d305 bcc.n 802f038 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); 802f02c: f007 ff08 bl 8036e40 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(); } 802f030: 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); 802f034: f007 bf0e b.w 8036e54 return; } /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); 802f038: 4821 ldr r0, [pc, #132] ; (802f0c0 ) 802f03a: f007 fed5 bl 8036de8 /* 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; 802f03e: 2300 movs r3, #0 802f040: f804 3c04 strb.w r3, [r4, #-4] if (mem < lfree) { 802f044: 4b1f ldr r3, [pc, #124] ; (802f0c4 ) 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]; 802f046: 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) { 802f04a: 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); 802f04c: 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) { 802f050: 428a cmp r2, r1 /* the newly freed struct is now the lowest */ lfree = mem; 802f052: bf38 it cc 802f054: 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]; 802f056: 4b18 ldr r3, [pc, #96] ; (802f0b8 ) 802f058: 681b ldr r3, [r3, #0] 802f05a: 1819 adds r1, r3, r0 if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) { 802f05c: 428a cmp r2, r1 802f05e: d011 beq.n 802f084 802f060: 790d ldrb r5, [r1, #4] 802f062: b97d cbnz r5, 802f084 802f064: 4d15 ldr r5, [pc, #84] ; (802f0bc ) 802f066: 682d ldr r5, [r5, #0] 802f068: 42a9 cmp r1, r5 802f06a: d00b beq.n 802f084 /* if mem->next is unused and not end of ram, combine mem and mem->next */ if (lfree == nmem) { 802f06c: 4d15 ldr r5, [pc, #84] ; (802f0c4 ) 802f06e: 682e ldr r6, [r5, #0] 802f070: 428e cmp r6, r1 lfree = mem; } mem->next = nmem->next; 802f072: 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; 802f074: bf08 it eq 802f076: 602a streq r2, [r5, #0] } mem->next = nmem->next; 802f078: f824 1c08 strh.w r1, [r4, #-8] ((struct mem *)(void *)&ram[nmem->next])->prev = (mem_size_t)((u8_t *)mem - ram); 802f07c: 5a19 ldrh r1, [r3, r0] 802f07e: 1859 adds r1, r3, r1 802f080: 1ad0 subs r0, r2, r3 802f082: 8048 strh r0, [r1, #2] } /* plug hole backward */ pmem = (struct mem *)(void *)&ram[mem->prev]; 802f084: f834 0c06 ldrh.w r0, [r4, #-6] 802f088: 1819 adds r1, r3, r0 if (pmem != mem && pmem->used == 0) { 802f08a: 4291 cmp r1, r2 802f08c: d00e beq.n 802f0ac 802f08e: 790d ldrb r5, [r1, #4] 802f090: b965 cbnz r5, 802f0ac /* if mem->prev is unused, combine mem and mem->prev */ if (lfree == mem) { 802f092: 4d0c ldr r5, [pc, #48] ; (802f0c4 ) 802f094: 682e ldr r6, [r5, #0] 802f096: 4296 cmp r6, r2 lfree = pmem; } pmem->next = mem->next; 802f098: 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; 802f09c: bf08 it eq 802f09e: 6029 streq r1, [r5, #0] } pmem->next = mem->next; 802f0a0: 521a strh r2, [r3, r0] ((struct mem *)(void *)&ram[mem->next])->prev = (mem_size_t)((u8_t *)pmem - ram); 802f0a2: f834 2c08 ldrh.w r2, [r4, #-8] 802f0a6: 189a adds r2, r3, r2 802f0a8: 1acb subs r3, r1, r3 802f0aa: 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(); 802f0ac: 4804 ldr r0, [pc, #16] ; (802f0c0 ) } 802f0ae: 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(); 802f0b2: f007 bea5 b.w 8036e00 802f0b6: bd70 pop {r4, r5, r6, pc} 802f0b8: 20000d54 .word 0x20000d54 802f0bc: 20000d4c .word 0x20000d4c 802f0c0: 20000d50 .word 0x20000d50 802f0c4: 20000d48 .word 0x20000d48 0802f0c8 : * 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) { 802f0c8: 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); 802f0cc: 3103 adds r1, #3 802f0ce: f64f 75fc movw r5, #65532 ; 0xfffc 802f0d2: 400d ands r5, r1 if(newsize < MIN_SIZE_ALIGNED) { 802f0d4: 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) { 802f0d6: 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) { 802f0d8: d903 bls.n 802f0e2 /* every data block must be at least MIN_SIZE_ALIGNED long */ newsize = MIN_SIZE_ALIGNED; } if (newsize > MEM_SIZE_ALIGNED) { 802f0da: f5b5 5fa0 cmp.w r5, #5120 ; 0x1400 802f0de: d901 bls.n 802f0e4 802f0e0: e053 b.n 802f18a 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; 802f0e2: 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) { 802f0e4: f8df 80b8 ldr.w r8, [pc, #184] ; 802f1a0 802f0e8: f8d8 3000 ldr.w r3, [r8] 802f0ec: 429c cmp r4, r3 802f0ee: d303 bcc.n 802f0f8 802f0f0: 4a28 ldr r2, [pc, #160] ; (802f194 ) 802f0f2: 6812 ldr r2, [r2, #0] 802f0f4: 4294 cmp r4, r2 802f0f6: d304 bcc.n 802f102 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); 802f0f8: f007 fea2 bl 8036e40 MEM_STATS_INC(illegal); SYS_ARCH_UNPROTECT(lev); 802f0fc: f007 feaa bl 8036e54 return rmem; 802f100: e044 b.n 802f18c } /* Get the corresponding struct mem ... */ mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); 802f102: 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; 802f106: 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); 802f10a: 1af6 subs r6, r6, r3 size = mem->next - ptr - SIZEOF_STRUCT_MEM; 802f10c: 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); 802f10e: b2b6 uxth r6, r6 size = mem->next - ptr - SIZEOF_STRUCT_MEM; 802f110: 1bbf subs r7, r7, r6 802f112: b2bf uxth r7, r7 LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size); if (newsize > size) { 802f114: 42bd cmp r5, r7 802f116: d838 bhi.n 802f18a /* not supported */ return NULL; } if (newsize == size) { 802f118: d038 beq.n 802f18c /* No change in size, simply return */ return rmem; } /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); 802f11a: 481f ldr r0, [pc, #124] ; (802f198 ) 802f11c: f007 fe64 bl 8036de8 mem2 = (struct mem *)(void *)&ram[mem->next]; 802f120: f8d8 3000 ldr.w r3, [r8] 802f124: f834 1c08 ldrh.w r1, [r4, #-8] 802f128: 185a adds r2, r3, r1 if(mem2->used == 0) { 802f12a: 7910 ldrb r0, [r2, #4] 802f12c: b978 cbnz r0, 802f14e /* The next struct is unused, we can simply move it at little */ mem_size_t next; /* remember the old next pointer */ next = mem2->next; 802f12e: 5a5f ldrh r7, [r3, r1] /* create new struct mem which is moved directly after the shrinked mem */ ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; 802f130: f106 0108 add.w r1, r6, #8 802f134: 186d adds r5, r5, r1 if (lfree == mem2) { 802f136: 4919 ldr r1, [pc, #100] ; (802f19c ) 802f138: 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; 802f13a: b2ad uxth r5, r5 if (lfree == mem2) { 802f13c: 4290 cmp r0, r2 802f13e: eb03 0205 add.w r2, r3, r5 lfree = (struct mem *)(void *)&ram[ptr2]; 802f142: bf08 it eq 802f144: 600a streq r2, [r1, #0] } mem2 = (struct mem *)(void *)&ram[ptr2]; mem2->used = 0; 802f146: 2100 movs r1, #0 802f148: 7111 strb r1, [r2, #4] /* restore the next pointer */ mem2->next = next; 802f14a: 535f strh r7, [r3, r5] 802f14c: e010 b.n 802f170 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) { 802f14e: f105 0214 add.w r2, r5, #20 802f152: 42ba cmp r2, r7 802f154: d815 bhi.n 802f182 * @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) { 802f156: 4811 ldr r0, [pc, #68] ; (802f19c ) * 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; 802f158: f106 0208 add.w r2, r6, #8 802f15c: 18ad adds r5, r5, r2 mem2 = (struct mem *)(void *)&ram[ptr2]; if (mem2 < lfree) { 802f15e: 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; 802f160: b2ad uxth r5, r5 mem2 = (struct mem *)(void *)&ram[ptr2]; 802f162: 195a adds r2, r3, r5 if (mem2 < lfree) { 802f164: 42ba cmp r2, r7 lfree = mem2; 802f166: bf38 it cc 802f168: 6002 strcc r2, [r0, #0] } mem2->used = 0; mem2->next = mem->next; 802f16a: 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; 802f16c: 2000 movs r0, #0 802f16e: 7110 strb r0, [r2, #4] mem2->next = mem->next; mem2->prev = ptr; 802f170: 8056 strh r6, [r2, #2] mem->next = ptr2; 802f172: f824 5c08 strh.w r5, [r4, #-8] if (mem2->next != MEM_SIZE_ALIGNED) { 802f176: 5b5a ldrh r2, [r3, r5] 802f178: f5b2 5fa0 cmp.w r2, #5120 ; 0x1400 ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; 802f17c: bf1c itt ne 802f17e: 189b addne r3, r3, r2 802f180: 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(); 802f182: 4805 ldr r0, [pc, #20] ; (802f198 ) 802f184: f007 fe3c bl 8036e00 return rmem; 802f188: e000 b.n 802f18c /* every data block must be at least MIN_SIZE_ALIGNED long */ newsize = MIN_SIZE_ALIGNED; } if (newsize > MEM_SIZE_ALIGNED) { return NULL; 802f18a: 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; } 802f18c: 4620 mov r0, r4 802f18e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802f192: bf00 nop 802f194: 20000d4c .word 0x20000d4c 802f198: 20000d50 .word 0x20000d50 802f19c: 20000d48 .word 0x20000d48 802f1a0: 20000d54 .word 0x20000d54 0802f1a4 : * * Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT). */ void * mem_malloc(mem_size_t size) { 802f1a4: 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) { 802f1a6: 2800 cmp r0, #0 802f1a8: d056 beq.n 802f258 return NULL; } /* Expand the size of the allocated memory region so that we can adjust for alignment. */ size = LWIP_MEM_ALIGN_SIZE(size); 802f1aa: 3003 adds r0, #3 802f1ac: f64f 74fc movw r4, #65532 ; 0xfffc 802f1b0: 4004 ands r4, r0 if(size < MIN_SIZE_ALIGNED) { 802f1b2: 2c0b cmp r4, #11 802f1b4: d903 bls.n 802f1be /* every data block must be at least MIN_SIZE_ALIGNED long */ size = MIN_SIZE_ALIGNED; } if (size > MEM_SIZE_ALIGNED) { 802f1b6: f5b4 5fa0 cmp.w r4, #5120 ; 0x1400 802f1ba: d901 bls.n 802f1c0 802f1bc: e04b b.n 802f256 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; 802f1be: 240c movs r4, #12 if (size > MEM_SIZE_ALIGNED) { return NULL; } /* protect the heap from concurrent access */ sys_mutex_lock(&mem_mutex); 802f1c0: 4826 ldr r0, [pc, #152] ; (802f25c ) 802f1c2: f007 fe11 bl 8036de8 #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; 802f1c6: 4b26 ldr r3, [pc, #152] ; (802f260 ) 802f1c8: 6819 ldr r1, [r3, #0] 802f1ca: 4b26 ldr r3, [pc, #152] ; (802f264 ) 802f1cc: 681a ldr r2, [r3, #0] 802f1ce: 1a8b subs r3, r1, r2 802f1d0: b29b uxth r3, r3 802f1d2: f5c4 5ea0 rsb lr, r4, #5120 ; 0x1400 802f1d6: e039 b.n 802f24c ptr = ((struct mem *)(void *)&ram[ptr])->next) { mem = (struct mem *)(void *)&ram[ptr]; 802f1d8: 18d5 adds r5, r2, r3 local_mem_free_count = 1; break; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if ((!mem->used) && 802f1da: 792f ldrb r7, [r5, #4] 802f1dc: 2f00 cmp r7, #0 802f1de: d134 bne.n 802f24a (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) { 802f1e0: 5ad6 ldrh r6, [r2, r3] 802f1e2: f1a6 0008 sub.w r0, r6, #8 802f1e6: 1ac0 subs r0, r0, r3 local_mem_free_count = 1; break; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if ((!mem->used) && 802f1e8: 42a0 cmp r0, r4 802f1ea: d32e bcc.n 802f24a (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)) { 802f1ec: f104 0e14 add.w lr, r4, #20 802f1f0: 4570 cmp r0, lr 802f1f2: d310 bcc.n 802f216 * 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; 802f1f4: 3408 adds r4, #8 802f1f6: 191c adds r4, r3, r4 802f1f8: b2a4 uxth r4, r4 /* create mem2 struct */ mem2 = (struct mem *)(void *)&ram[ptr2]; 802f1fa: 1910 adds r0, r2, r4 mem2->used = 0; mem2->next = mem->next; 802f1fc: 5316 strh r6, [r2, r4] mem2->prev = ptr; 802f1fe: 8043 strh r3, [r0, #2] /* and insert it between mem and mem->next */ mem->next = ptr2; 802f200: 802c strh r4, [r5, #0] mem->used = 1; 802f202: 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; 802f204: 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; 802f206: 712b strb r3, [r5, #4] if (mem2->next != MEM_SIZE_ALIGNED) { 802f208: 5b13 ldrh r3, [r2, r4] 802f20a: f5b3 5fa0 cmp.w r3, #5120 ; 0x1400 802f20e: d004 beq.n 802f21a ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; 802f210: 18d2 adds r2, r2, r3 802f212: 8054 strh r4, [r2, #2] 802f214: e001 b.n 802f21a * 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; 802f216: 2301 movs r3, #1 802f218: 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) { 802f21a: 428d cmp r5, r1 802f21c: d10f bne.n 802f23e struct mem *cur = lfree; /* Find next free block after mem and update lowest free pointer */ while (cur->used && cur != ram_end) { 802f21e: 4b12 ldr r3, [pc, #72] ; (802f268 ) 802f220: 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]; 802f222: 4b10 ldr r3, [pc, #64] ; (802f264 ) 802f224: 6819 ldr r1, [r3, #0] 802f226: 462b mov r3, r5 802f228: e001 b.n 802f22e 802f22a: 881b ldrh r3, [r3, #0] 802f22c: 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) { 802f22e: 7918 ldrb r0, [r3, #4] 802f230: b910 cbnz r0, 802f238 goto mem_malloc_adjust_lfree; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ cur = (struct mem *)(void *)&ram[cur->next]; } lfree = cur; 802f232: 4a0b ldr r2, [pc, #44] ; (802f260 ) 802f234: 6013 str r3, [r2, #0] 802f236: e002 b.n 802f23e 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) { 802f238: 4293 cmp r3, r2 802f23a: d1f6 bne.n 802f22a 802f23c: e7f9 b.n 802f232 } lfree = cur; LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used))); } LWIP_MEM_ALLOC_UNPROTECT(); sys_mutex_unlock(&mem_mutex); 802f23e: 4807 ldr r0, [pc, #28] ; (802f25c ) 802f240: f007 fdde bl 8036e00 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; 802f244: f105 0008 add.w r0, r5, #8 802f248: 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) { 802f24a: 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; 802f24c: 4573 cmp r3, lr 802f24e: dbc3 blt.n 802f1d8 } 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); 802f250: 4802 ldr r0, [pc, #8] ; (802f25c ) 802f252: f007 fdd5 bl 8036e00 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; 802f256: 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; } 802f258: bdf8 pop {r3, r4, r5, r6, r7, pc} 802f25a: bf00 nop 802f25c: 20000d50 .word 0x20000d50 802f260: 20000d48 .word 0x20000d48 802f264: 20000d54 .word 0x20000d54 802f268: 20000d4c .word 0x20000d4c 0802f26c : 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); 802f26c: 4a0e ldr r2, [pc, #56] ; (802f2a8 ) 802f26e: 490f ldr r1, [pc, #60] ; (802f2ac ) * * Carves out memp_memory into linked lists for each pool-type. */ void memp_init(void) { 802f270: 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); 802f272: 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) { 802f274: 4e0e ldr r6, [pc, #56] ; (802f2b0 ) memp->next = memp_tab[i]; memp_tab[i] = memp; memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + memp_sizes[i] 802f276: 4f0f ldr r7, [pc, #60] ; (802f2b4 ) 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); 802f278: 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; 802f27c: 461d mov r5, r3 802f27e: 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) { 802f282: f833 c006 ldrh.w ip, [r3, r6] 802f286: 2000 movs r0, #0 802f288: e008 b.n 802f29c memp->next = memp_tab[i]; 802f28a: f851 4c04 ldr.w r4, [r1, #-4] 802f28e: 6014 str r4, [r2, #0] memp_tab[i] = memp; memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + memp_sizes[i] 802f290: 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; 802f292: 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) { 802f296: 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] 802f298: 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) { 802f29a: b280 uxth r0, r0 802f29c: 4560 cmp r0, ip 802f29e: d1f4 bne.n 802f28a 802f2a0: 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) { 802f2a2: 2b20 cmp r3, #32 802f2a4: d1eb bne.n 802f27e #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 */ } 802f2a6: bdf0 pop {r4, r5, r6, r7, pc} 802f2a8: 20000d5b .word 0x20000d5b 802f2ac: 2000c398 .word 0x2000c398 802f2b0: 08043f7c .word 0x08043f7c 802f2b4: 08043f9c .word 0x08043f9c 0802f2b8 : #endif { struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); 802f2b8: 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 { 802f2ba: b538 push {r3, r4, r5, lr} 802f2bc: 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;); 802f2be: d80b bhi.n 802f2d8 SYS_ARCH_PROTECT(old_level); 802f2c0: f007 fdbe bl 8036e40 #if MEMP_OVERFLOW_CHECK >= 2 memp_overflow_check_all(); #endif /* MEMP_OVERFLOW_CHECK >= 2 */ memp = memp_tab[type]; 802f2c4: 4b06 ldr r3, [pc, #24] ; (802f2e0 ) 802f2c6: f853 4025 ldr.w r4, [r3, r5, lsl #2] if (memp != NULL) { 802f2ca: b114 cbz r4, 802f2d2 memp_tab[type] = memp->next; 802f2cc: 6822 ldr r2, [r4, #0] 802f2ce: 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); 802f2d2: f007 fdbf bl 8036e54 return memp; 802f2d6: e000 b.n 802f2da #endif { struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); 802f2d8: 2400 movs r4, #0 } SYS_ARCH_UNPROTECT(old_level); return memp; } 802f2da: 4620 mov r0, r4 802f2dc: bd38 pop {r3, r4, r5, pc} 802f2de: bf00 nop 802f2e0: 2000c398 .word 0x2000c398 0802f2e4 : * @param type the pool where to put mem * @param mem the memp element to free */ void memp_free(memp_t type, void *mem) { 802f2e4: b538 push {r3, r4, r5, lr} 802f2e6: 4605 mov r5, r0 struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); if (mem == NULL) { 802f2e8: 460c mov r4, r1 802f2ea: b159 cbz r1, 802f304 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); 802f2ec: f007 fda8 bl 8036e40 #endif /* MEMP_OVERFLOW_CHECK >= 2 */ #endif /* MEMP_OVERFLOW_CHECK */ MEMP_STATS_DEC(used, type); memp->next = memp_tab[type]; 802f2f0: 4b05 ldr r3, [pc, #20] ; (802f308 ) 802f2f2: f853 2025 ldr.w r2, [r3, r5, lsl #2] 802f2f6: 6022 str r2, [r4, #0] memp_tab[type] = memp; 802f2f8: 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); } 802f2fc: 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); 802f300: f007 bda8 b.w 8036e54 802f304: bd38 pop {r3, r4, r5, pc} 802f306: bf00 nop 802f308: 2000c398 .word 0x2000c398 0802f30c : } #endif /* LWIP_HAVE_LOOPIF */ void netif_init(void) { 802f30c: 4770 bx lr 802f30e: 0000 movs r0, r0 0802f310 : * @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) { 802f310: b570 push {r4, r5, r6, lr} 802f312: 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) { 802f314: 460d mov r5, r1 802f316: b941 cbnz r1, 802f32a ip_addr_set(&(lpcb->local_ip), ipaddr); } } } #endif snmp_delete_ipaddridx_tree(netif); 802f318: 4620 mov r0, r4 802f31a: f004 fdb5 bl 8033e88 snmp_delete_iprteidx_tree(0,netif); 802f31e: 2000 movs r0, #0 802f320: 4621 mov r1, r4 802f322: f004 fe47 bl 8033fb4 /* set new IP address to netif */ ip_addr_set(&(netif->ip_addr), ipaddr); 802f326: b9fd cbnz r5, 802f368 802f328: e01f b.n 802f36a #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) { 802f32a: 680a ldr r2, [r1, #0] 802f32c: 6843 ldr r3, [r0, #4] 802f32e: 429a cmp r2, r3 802f330: d0f2 beq.n 802f318 /* 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; 802f332: 4b13 ldr r3, [pc, #76] ; (802f380 ) 802f334: 6818 ldr r0, [r3, #0] while (pcb != NULL) { 802f336: e007 b.n 802f348 /* PCB bound to current local interface address? */ if (ip_addr_cmp(&(pcb->local_ip), &(netif->ip_addr)) 802f338: 6802 ldr r2, [r0, #0] 802f33a: 6863 ldr r3, [r4, #4] 802f33c: 68c6 ldr r6, [r0, #12] 802f33e: 429a cmp r2, r3 802f340: d101 bne.n 802f346 #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); 802f342: f000 fd89 bl 802fe58 pcb = next; } else { pcb = pcb->next; 802f346: 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) { 802f348: 2800 cmp r0, #0 802f34a: d1f5 bne.n 802f338 pcb = next; } else { pcb = pcb->next; } } for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 802f34c: 4b0d ldr r3, [pc, #52] ; (802f384 ) 802f34e: 681b ldr r3, [r3, #0] 802f350: e007 b.n 802f362 /* PCB bound to current local interface address? */ if ((!(ip_addr_isany(&(lpcb->local_ip)))) && 802f352: 681a ldr r2, [r3, #0] 802f354: b122 cbz r2, 802f360 802f356: 6861 ldr r1, [r4, #4] 802f358: 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); 802f35a: bf04 itt eq 802f35c: 682a ldreq r2, [r5, #0] 802f35e: 601a streq r2, [r3, #0] pcb = next; } else { pcb = pcb->next; } } for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 802f360: 68db ldr r3, [r3, #12] 802f362: 2b00 cmp r3, #0 802f364: d1f5 bne.n 802f352 802f366: e7d7 b.n 802f318 } #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); 802f368: 682d ldr r5, [r5, #0] snmp_insert_ipaddridx_tree(netif); 802f36a: 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); 802f36c: 6065 str r5, [r4, #4] snmp_insert_ipaddridx_tree(netif); 802f36e: f004 fd49 bl 8033e04 snmp_insert_iprteidx_tree(0,netif); 802f372: 2000 movs r0, #0 802f374: 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))); } 802f376: 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); 802f37a: f004 bdcf b.w 8033f1c 802f37e: bf00 nop 802f380: 2000f6ac .word 0x2000f6ac 802f384: 2000f6b4 .word 0x2000f6b4 0802f388 : * @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); 802f388: b101 cbz r1, 802f38c 802f38a: 6809 ldr r1, [r1, #0] 802f38c: 60c1 str r1, [r0, #12] 802f38e: 4770 bx lr 0802f390 : * @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) { 802f390: b538 push {r3, r4, r5, lr} 802f392: 4604 mov r4, r0 802f394: 460d mov r5, r1 snmp_delete_iprteidx_tree(0, netif); 802f396: 2000 movs r0, #0 802f398: 4621 mov r1, r4 802f39a: f004 fe0b bl 8033fb4 /* set new netmask to netif */ ip_addr_set(&(netif->netmask), netmask); 802f39e: b105 cbz r5, 802f3a2 802f3a0: 682d ldr r5, [r5, #0] snmp_insert_iprteidx_tree(0, netif); 802f3a2: 2000 movs r0, #0 802f3a4: 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); 802f3a6: 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))); } 802f3a8: 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); 802f3ac: f004 bdb6 b.w 8033f1c 0802f3b0 : * @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) { 802f3b0: b570 push {r4, r5, r6, lr} 802f3b2: 4605 mov r5, r0 802f3b4: 4616 mov r6, r2 802f3b6: 461c mov r4, r3 netif_set_ipaddr(netif, ipaddr); 802f3b8: f7ff ffaa bl 802f310 netif_set_netmask(netif, netmask); 802f3bc: 4628 mov r0, r5 802f3be: 4631 mov r1, r6 802f3c0: f7ff ffe6 bl 802f390 * @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); 802f3c4: b104 cbz r4, 802f3c8 802f3c6: 6824 ldr r4, [r4, #0] 802f3c8: 60ec str r4, [r5, #12] 802f3ca: bd70 pop {r4, r5, r6, pc} 0802f3cc : * @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) { 802f3cc: 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; 802f3ce: 9e06 ldr r6, [sp, #24] 802f3d0: 61c6 str r6, [r0, #28] netif->num = netif_num++; 802f3d2: 4e10 ldr r6, [pc, #64] ; (802f414 ) 802f3d4: 7837 ldrb r7, [r6, #0] 802f3d6: f880 7030 strb.w r7, [r0, #48] ; 0x30 802f3da: 3701 adds r7, #1 802f3dc: 7037 strb r7, [r6, #0] netif->input = input; 802f3de: 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); 802f3e0: 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) { 802f3e2: 4604 mov r4, r0 LWIP_ASSERT("No init function given", init != NULL); /* reset new interface configuration state */ ip_addr_set_zero(&netif->ip_addr); 802f3e4: 6045 str r5, [r0, #4] ip_addr_set_zero(&netif->netmask); 802f3e6: 6085 str r5, [r0, #8] ip_addr_set_zero(&netif->gw); 802f3e8: 60c5 str r5, [r0, #12] netif->flags = 0; 802f3ea: f880 502d strb.w r5, [r0, #45] ; 0x2d #if LWIP_DHCP /* netif not under DHCP control by default */ netif->dhcp = NULL; 802f3ee: 6205 str r5, [r0, #32] #endif /* ENABLE_LOOPBACK */ /* remember netif specific state information data */ netif->state = state; netif->num = netif_num++; netif->input = input; 802f3f0: 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); 802f3f2: f7ff ffdd bl 802f3b0 /* call user specified initialization function for netif */ if (init(netif) != ERR_OK) { 802f3f6: 4620 mov r0, r4 802f3f8: 9b07 ldr r3, [sp, #28] 802f3fa: 4798 blx r3 802f3fc: b930 cbnz r0, 802f40c return NULL; } /* add this netif to the list */ netif->next = netif_list; 802f3fe: 4b06 ldr r3, [pc, #24] ; (802f418 ) 802f400: 681a ldr r2, [r3, #0] 802f402: 6022 str r2, [r4, #0] netif_list = netif; 802f404: 601c str r4, [r3, #0] snmp_inc_iflist(); 802f406: f004 fbe1 bl 8033bcc 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; 802f40a: e000 b.n 802f40e netif_set_addr(netif, ipaddr, netmask, gw); /* call user specified initialization function for netif */ if (init(netif) != ERR_OK) { return NULL; 802f40c: 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; } 802f40e: 4620 mov r0, r4 802f410: bdf8 pop {r3, r4, r5, r6, r7, pc} 802f412: bf00 nop 802f414: 2000c3d8 .word 0x2000c3d8 802f418: 2000f6a0 .word 0x2000f6a0 0802f41c : * * @param netif the default network interface */ void netif_set_default(struct netif *netif) { 802f41c: b510 push {r4, lr} if (netif == NULL) { 802f41e: 4604 mov r4, r0 /* remove default route */ snmp_delete_iprteidx_tree(1, netif); 802f420: 4621 mov r1, r4 802f422: 2001 movs r0, #1 * @param netif the default network interface */ void netif_set_default(struct netif *netif) { if (netif == NULL) { 802f424: b914 cbnz r4, 802f42c /* remove default route */ snmp_delete_iprteidx_tree(1, netif); 802f426: f004 fdc5 bl 8033fb4 802f42a: e001 b.n 802f430 } else { /* install default route */ snmp_insert_iprteidx_tree(1, netif); 802f42c: f004 fd76 bl 8033f1c } netif_default = netif; 802f430: 4b01 ldr r3, [pc, #4] ; (802f438 ) 802f432: 601c str r4, [r3, #0] 802f434: bd10 pop {r4, pc} 802f436: bf00 nop 802f438: 2000f6a4 .word 0x2000f6a4 0802f43c : * up once configured. * * @see dhcp_start() */ void netif_set_up(struct netif *netif) { 802f43c: b510 push {r4, lr} if (!(netif->flags & NETIF_FLAG_UP)) { 802f43e: f890 302d ldrb.w r3, [r0, #45] ; 0x2d 802f442: 07da lsls r2, r3, #31 * up once configured. * * @see dhcp_start() */ void netif_set_up(struct netif *netif) { 802f444: 4604 mov r4, r0 if (!(netif->flags & NETIF_FLAG_UP)) { 802f446: d412 bmi.n 802f46e netif->flags |= NETIF_FLAG_UP; 802f448: f043 0301 orr.w r3, r3, #1 802f44c: f880 302d strb.w r3, [r0, #45] ; 0x2d #if LWIP_SNMP snmp_get_sysuptime(&netif->ts); 802f450: 3038 adds r0, #56 ; 0x38 802f452: f004 fb55 bl 8033b00 * @note: Enabling DHCP on a down interface will make it come * up once configured. * * @see dhcp_start() */ void netif_set_up(struct netif *netif) 802f456: 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)) { 802f45a: f003 0330 and.w r3, r3, #48 ; 0x30 802f45e: 2b30 cmp r3, #48 ; 0x30 802f460: d105 bne.n 802f46e etharp_gratuitous(netif); 802f462: 4620 mov r0, r4 802f464: 1d21 adds r1, r4, #4 igmp_report_groups( netif); } #endif /* LWIP_IGMP */ } } } 802f466: 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); 802f46a: f007 b89d b.w 80365a8 802f46e: bd10 pop {r4, pc} 0802f470 : * up once configured. * * @see dhcp_start() */ void netif_set_down(struct netif *netif) { 802f470: b510 push {r4, lr} if (netif->flags & NETIF_FLAG_UP) { 802f472: f890 302d ldrb.w r3, [r0, #45] ; 0x2d 802f476: 07d9 lsls r1, r3, #31 * up once configured. * * @see dhcp_start() */ void netif_set_down(struct netif *netif) { 802f478: 4604 mov r4, r0 if (netif->flags & NETIF_FLAG_UP) { 802f47a: d511 bpl.n 802f4a0 netif->flags &= ~NETIF_FLAG_UP; 802f47c: f023 0301 bic.w r3, r3, #1 802f480: f880 302d strb.w r3, [r0, #45] ; 0x2d #if LWIP_SNMP snmp_get_sysuptime(&netif->ts); 802f484: 3038 adds r0, #56 ; 0x38 802f486: f004 fb3b bl 8033b00 #endif #if LWIP_ARP if (netif->flags & NETIF_FLAG_ETHARP) { 802f48a: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 802f48e: f003 0320 and.w r3, r3, #32 802f492: b2db uxtb r3, r3 802f494: b123 cbz r3, 802f4a0 etharp_cleanup_netif(netif); 802f496: 4620 mov r0, r4 } #endif /* LWIP_ARP */ NETIF_STATUS_CALLBACK(netif); } } 802f498: 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); 802f49c: f007 b854 b.w 8036548 802f4a0: bd10 pop {r4, pc} 0802f4a2 : * @return non-zero on failure, zero on success. * */ u8_t pbuf_header(struct pbuf *p, s16_t header_size_increment) { 802f4a2: 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)) { 802f4a4: b321 cbz r1, 802f4f0 802f4a6: b330 cbz r0, 802f4f6 return 0; } if (header_size_increment < 0){ 802f4a8: 2900 cmp r1, #0 802f4aa: da05 bge.n 802f4b8 increment_magnitude = -header_size_increment; 802f4ac: 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;); 802f4ae: 8942 ldrh r2, [r0, #10] if ((header_size_increment == 0) || (p == NULL)) { return 0; } if (header_size_increment < 0){ increment_magnitude = -header_size_increment; 802f4b0: 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;); 802f4b2: 429a cmp r2, r3 802f4b4: d201 bcs.n 802f4ba 802f4b6: e01d b.n 802f4f4 } else { increment_magnitude = header_size_increment; 802f4b8: 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; 802f4ba: 7b02 ldrb r2, [r0, #12] /* remember current payload pointer */ payload = p->payload; 802f4bc: 6844 ldr r4, [r0, #4] /* pbuf types containing payloads? */ if (type == PBUF_RAM || type == PBUF_POOL) { 802f4be: b10a cbz r2, 802f4c4 802f4c0: 2a03 cmp r2, #3 802f4c2: d105 bne.n 802f4d0 /* set new payload pointer */ p->payload = (u8_t *)p->payload - header_size_increment; 802f4c4: 1a64 subs r4, r4, r1 /* boundary check fails? */ if ((u8_t *)p->payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) { 802f4c6: f100 0310 add.w r3, r0, #16 802f4ca: 429c cmp r4, r3 802f4cc: d312 bcc.n 802f4f4 802f4ce: e008 b.n 802f4e2 p->payload = payload; /* bail out unsuccesfully */ return 1; } /* pbuf types refering to external payloads? */ } else if (type == PBUF_REF || type == PBUF_ROM) { 802f4d0: 3a01 subs r2, #1 802f4d2: 2a01 cmp r2, #1 802f4d4: d80e bhi.n 802f4f4 /* hide a header in the payload? */ if ((header_size_increment < 0) && (increment_magnitude <= p->len)) { 802f4d6: 2900 cmp r1, #0 802f4d8: da0c bge.n 802f4f4 802f4da: 8942 ldrh r2, [r0, #10] 802f4dc: 429a cmp r2, r3 802f4de: d309 bcc.n 802f4f4 /* increase payload pointer */ p->payload = (u8_t *)p->payload - header_size_increment; 802f4e0: 1a64 subs r4, r4, r1 /* Unknown type */ LWIP_ASSERT("bad pbuf type", 0); return 1; } /* modify pbuf length fields */ p->len += header_size_increment; 802f4e2: 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; 802f4e4: 6044 str r4, [r0, #4] /* Unknown type */ LWIP_ASSERT("bad pbuf type", 0); return 1; } /* modify pbuf length fields */ p->len += header_size_increment; 802f4e6: 18cb adds r3, r1, r3 802f4e8: 8143 strh r3, [r0, #10] p->tot_len += header_size_increment; 802f4ea: 8903 ldrh r3, [r0, #8] 802f4ec: 18c9 adds r1, r1, r3 802f4ee: 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; 802f4f0: 2000 movs r0, #0 802f4f2: 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;); 802f4f4: 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; } 802f4f6: bd10 pop {r4, pc} 0802f4f8 : * 1->1->1 becomes ....... * */ u8_t pbuf_free(struct pbuf *p) { 802f4f8: b570 push {r4, r5, r6, lr} u16_t type; struct pbuf *q; u8_t count; if (p == NULL) { 802f4fa: 4604 mov r4, r0 802f4fc: b300 cbz r0, 802f540 802f4fe: 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); 802f500: f007 fc9e bl 8036e40 /* 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); 802f504: 89e6 ldrh r6, [r4, #14] 802f506: 3e01 subs r6, #1 802f508: b2b6 uxth r6, r6 802f50a: 81e6 strh r6, [r4, #14] SYS_ARCH_UNPROTECT(old_level); 802f50c: f007 fca2 bl 8036e54 /* this pbuf is no longer referenced to? */ if (ref == 0) { 802f510: b9be cbnz r6, 802f542 /* 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; 802f512: 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; 802f514: 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) { 802f516: 2b03 cmp r3, #3 802f518: d101 bne.n 802f51e memp_free(MEMP_PBUF_POOL, p); 802f51a: 200f movs r0, #15 802f51c: e003 b.n 802f526 /* is this a ROM or RAM referencing pbuf? */ } else if (type == PBUF_ROM || type == PBUF_REF) { 802f51e: 3b01 subs r3, #1 802f520: 2b01 cmp r3, #1 802f522: d804 bhi.n 802f52e memp_free(MEMP_PBUF, p); 802f524: 200e movs r0, #14 802f526: 4621 mov r1, r4 802f528: f7ff fedc bl 802f2e4 802f52c: e002 b.n 802f534 /* type == PBUF_RAM */ } else { mem_free(p); 802f52e: 4620 mov r0, r4 802f530: f7ff fd70 bl 802f014 } } count++; 802f534: 3501 adds r5, #1 802f536: 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) { 802f538: 4634 mov r4, r6 802f53a: 2e00 cmp r6, #0 802f53c: d1e0 bne.n 802f500 802f53e: e000 b.n 802f542 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; 802f540: 4605 mov r5, r0 } } PERF_STOP("pbuf_free"); /* return number of de-allocated pbufs */ return count; } 802f542: 4628 mov r0, r5 802f544: bd70 pop {r4, r5, r6, pc} 0802f546 : * * @note Despite its name, pbuf_realloc cannot grow the size of a pbuf (chain). */ void pbuf_realloc(struct pbuf *p, u16_t new_len) { 802f546: 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) { 802f548: 8903 ldrh r3, [r0, #8] 802f54a: 4299 cmp r1, r3 802f54c: d220 bcs.n 802f590 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; 802f54e: 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) { 802f550: 460d mov r5, r1 802f552: 4604 mov r4, r0 802f554: e005 b.n 802f562 /* decrease remaining length by pbuf length */ rem_len -= q->len; 802f556: 1aed subs r5, r5, r3 /* decrease total length indicator */ LWIP_ASSERT("grow < max_u16_t", grow < 0xffff); q->tot_len += (u16_t)grow; 802f558: 8923 ldrh r3, [r4, #8] 802f55a: 18d3 adds r3, r2, r3 802f55c: 8123 strh r3, [r4, #8] /* proceed to next pbuf in chain */ q = q->next; 802f55e: 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; 802f560: 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) { 802f562: 8963 ldrh r3, [r4, #10] 802f564: 429d cmp r5, r3 802f566: d8f6 bhi.n 802f556 /* 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)) { 802f568: 7b22 ldrb r2, [r4, #12] 802f56a: b94a cbnz r2, 802f580 802f56c: 429d cmp r5, r3 802f56e: d007 beq.n 802f580 /* 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); 802f570: 6863 ldr r3, [r4, #4] 802f572: 1b1b subs r3, r3, r4 802f574: 18e9 adds r1, r5, r3 802f576: 4620 mov r0, r4 802f578: b289 uxth r1, r1 802f57a: f7ff fda5 bl 802f0c8 802f57e: 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) { 802f580: 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; 802f582: 8165 strh r5, [r4, #10] q->tot_len = q->len; 802f584: 8125 strh r5, [r4, #8] /* any remaining pbufs in chain? */ if (q->next != NULL) { 802f586: b108 cbz r0, 802f58c /* free remaining pbufs in chain */ pbuf_free(q->next); 802f588: f7ff ffb6 bl 802f4f8 } /* q is last packet in chain */ q->next = NULL; 802f58c: 2300 movs r3, #0 802f58e: 6023 str r3, [r4, #0] 802f590: bd38 pop {r3, r4, r5, pc} 0802f592 : * @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) { 802f592: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 802f596: 460d mov r5, r1 802f598: 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) { 802f59a: 2803 cmp r0, #3 802f59c: d87c bhi.n 802f698 802f59e: e8df f000 tbb [pc, r0] 802f5a2: 0802 .short 0x0802 802f5a4: 0604 .short 0x0604 case PBUF_TRANSPORT: /* add room for transport (often TCP) layer header */ offset = PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN; 802f5a6: 2636 movs r6, #54 ; 0x36 802f5a8: e004 b.n 802f5b4 /* 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; 802f5aa: 260e movs r6, #14 break; 802f5ac: e002 b.n 802f5b4 case PBUF_RAW: offset = 0; 802f5ae: 2600 movs r6, #0 break; 802f5b0: e000 b.n 802f5b4 /* 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; 802f5b2: 2622 movs r6, #34 ; 0x22 default: LWIP_ASSERT("pbuf_alloc: bad pbuf layer", 0); return NULL; } switch (type) { 802f5b4: 2f03 cmp r7, #3 802f5b6: d86f bhi.n 802f698 802f5b8: e8df f007 tbb [pc, r7] 802f5bc: 025e5e46 .word 0x025e5e46 case PBUF_POOL: /* allocate head of pbuf chain into p */ p = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); 802f5c0: 200f movs r0, #15 802f5c2: f7ff fe79 bl 802f2b8 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc: allocated pbuf %p\n", (void *)p)); if (p == NULL) { 802f5c6: 4604 mov r4, r0 802f5c8: b900 cbnz r0, 802f5cc 802f5ca: e065 b.n 802f698 } 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))); 802f5cc: 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)); 802f5ce: 3603 adds r6, #3 802f5d0: 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))); 802f5d4: 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)); 802f5d6: 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; 802f5da: 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))); 802f5dc: 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)); 802f5e0: 3604 adds r6, #4 802f5e2: 42ae cmp r6, r5 802f5e4: bfa8 it ge 802f5e6: 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; 802f5e8: 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))); 802f5ea: 6042 str r2, [r0, #4] if (p == NULL) { PBUF_POOL_IS_EMPTY(); return NULL; } p->type = type; p->next = NULL; 802f5ec: 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; 802f5ee: 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)); 802f5f0: 8146 strh r6, [r0, #10] if (p == NULL) { PBUF_POOL_IS_EMPTY(); return NULL; } p->type = type; p->next = NULL; 802f5f2: 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; 802f5f4: 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; 802f5f6: 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; 802f5f8: 1bae subs r6, r5, r6 /* any remaining pbufs to be allocated? */ while (rem_len > 0) { 802f5fa: 4607 mov r7, r0 802f5fc: 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); 802f5fe: f240 6903 movw r9, #1539 ; 0x603 802f602: 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) { 802f606: e01c b.n 802f642 q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); 802f608: 200f movs r0, #15 802f60a: f7ff fe55 bl 802f2b8 if (q == NULL) { 802f60e: 4605 mov r5, r0 802f610: b918 cbnz r0, 802f61a PBUF_POOL_IS_EMPTY(); /* free chain so far allocated */ pbuf_free(p); 802f612: 4620 mov r0, r4 802f614: f7ff ff70 bl 802f4f8 802f618: e03e b.n 802f698 /* bail out unsuccesfully */ return NULL; } q->type = type; 802f61a: 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); 802f61c: f100 0210 add.w r2, r0, #16 /* free chain so far allocated */ pbuf_free(p); /* bail out unsuccesfully */ return NULL; } q->type = type; 802f620: 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; 802f622: b2b3 uxth r3, r6 802f624: 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); 802f626: 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); 802f628: 454b cmp r3, r9 802f62a: bf88 it hi 802f62c: 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; 802f62e: 2201 movs r2, #1 /* bail out unsuccesfully */ return NULL; } q->type = type; q->flags = 0; q->next = NULL; 802f630: f8c0 8000 str.w r8, [r0] pbuf_free(p); /* bail out unsuccesfully */ return NULL; } q->type = type; q->flags = 0; 802f634: f880 800d strb.w r8, [r0, #13] q->next = NULL; /* make previous pbuf point to this pbuf */ r->next = q; 802f638: 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); 802f63a: 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; 802f63c: 81c2 strh r2, [r0, #14] /* calculate remaining length to be allocated */ rem_len -= q->len; 802f63e: 1af6 subs r6, r6, r3 802f640: 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) { 802f642: 2e00 cmp r6, #0 802f644: dce0 bgt.n 802f608 802f646: e022 b.n 802f68e /*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)); 802f648: f106 0013 add.w r0, r6, #19 802f64c: 1ceb adds r3, r5, #3 802f64e: f023 0303 bic.w r3, r3, #3 802f652: f020 0003 bic.w r0, r0, #3 802f656: 18c0 adds r0, r0, r3 802f658: b280 uxth r0, r0 802f65a: f7ff fda3 bl 802f1a4 if (p == NULL) { 802f65e: 4604 mov r4, r0 802f660: b1d0 cbz r0, 802f698 return NULL; } /* Set up internal structure of the pbuf. */ p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)); 802f662: 1986 adds r6, r0, r6 802f664: 3613 adds r6, #19 p->len = p->tot_len = length; p->next = NULL; 802f666: 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)); 802f668: f026 0603 bic.w r6, r6, #3 802f66c: 6046 str r6, [r0, #4] p->len = p->tot_len = length; 802f66e: 8105 strh r5, [r0, #8] 802f670: 8145 strh r5, [r0, #10] p->next = NULL; 802f672: 6003 str r3, [r0, #0] p->type = type; 802f674: 7303 strb r3, [r0, #12] 802f676: e00a b.n 802f68e /* 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); 802f678: 200e movs r0, #14 802f67a: f7ff fe1d bl 802f2b8 if (p == NULL) { 802f67e: 4604 mov r4, r0 802f680: b150 cbz r0, 802f698 ("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; 802f682: 2300 movs r3, #0 802f684: 6043 str r3, [r0, #4] p->len = p->tot_len = length; 802f686: 8105 strh r5, [r0, #8] 802f688: 8145 strh r5, [r0, #10] p->next = NULL; 802f68a: 6003 str r3, [r0, #0] p->type = type; 802f68c: 7307 strb r7, [r0, #12] default: LWIP_ASSERT("pbuf_alloc: erroneous type", 0); return NULL; } /* set reference count */ p->ref = 1; 802f68e: 2301 movs r3, #1 802f690: 81e3 strh r3, [r4, #14] /* set flags */ p->flags = 0; 802f692: 2300 movs r3, #0 802f694: 7363 strb r3, [r4, #13] LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p)); return p; 802f696: e000 b.n 802f69a p->next = NULL; p->type = type; break; default: LWIP_ASSERT("pbuf_alloc: erroneous type", 0); return NULL; 802f698: 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; } 802f69a: 4620 mov r0, r4 802f69c: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 0802f6a0 : * @return the number of pbufs in a chain */ u8_t pbuf_clen(struct pbuf *p) { 802f6a0: 4603 mov r3, r0 u8_t len; len = 0; 802f6a2: 2000 movs r0, #0 while (p != NULL) { 802f6a4: e002 b.n 802f6ac ++len; 802f6a6: 3001 adds r0, #1 p = p->next; 802f6a8: 681b ldr r3, [r3, #0] { u8_t len; len = 0; while (p != NULL) { ++len; 802f6aa: b2c0 uxtb r0, r0 pbuf_clen(struct pbuf *p) { u8_t len; len = 0; while (p != NULL) { 802f6ac: 2b00 cmp r3, #0 802f6ae: d1fa bne.n 802f6a6 ++len; p = p->next; } return len; } 802f6b0: 4770 bx lr 0802f6b2 : * @param p pbuf to increase reference counter of * */ void pbuf_ref(struct pbuf *p) { 802f6b2: b510 push {r4, lr} SYS_ARCH_DECL_PROTECT(old_level); /* pbuf given? */ if (p != NULL) { 802f6b4: 4604 mov r4, r0 802f6b6: b140 cbz r0, 802f6ca SYS_ARCH_PROTECT(old_level); 802f6b8: f007 fbc2 bl 8036e40 ++(p->ref); 802f6bc: 89e3 ldrh r3, [r4, #14] 802f6be: 3301 adds r3, #1 802f6c0: 81e3 strh r3, [r4, #14] SYS_ARCH_UNPROTECT(old_level); } } 802f6c2: 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); 802f6c6: f007 bbc5 b.w 8036e54 802f6ca: bd10 pop {r4, pc} 0802f6cc : * @see pbuf_chain() */ void pbuf_cat(struct pbuf *h, struct pbuf *t) { 802f6cc: b510 push {r4, lr} struct pbuf *p; LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)", 802f6ce: b168 cbz r0, 802f6ec 802f6d0: b161 cbz r1, 802f6ec 802f6d2: e003 b.n 802f6dc ((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; 802f6d4: 8904 ldrh r4, [r0, #8] 802f6d6: 191b adds r3, r3, r4 802f6d8: 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) { 802f6da: 4610 mov r0, r2 802f6dc: 6802 ldr r2, [r0, #0] 802f6de: 890b ldrh r3, [r1, #8] 802f6e0: 2a00 cmp r2, #0 802f6e2: d1f7 bne.n 802f6d4 } /* { 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; 802f6e4: 8902 ldrh r2, [r0, #8] /* chain last pbuf of head (p) with first of tail (t) */ p->next = t; 802f6e6: 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; 802f6e8: 189b adds r3, r3, r2 802f6ea: 8103 strh r3, [r0, #8] 802f6ec: bd10 pop {r4, pc} 0802f6ee : * The ->ref field of the first pbuf of the tail chain is adjusted. * */ void pbuf_chain(struct pbuf *h, struct pbuf *t) { 802f6ee: b510 push {r4, lr} 802f6f0: 460c mov r4, r1 pbuf_cat(h, t); 802f6f2: f7ff ffeb bl 802f6cc /* t is now referenced by h */ pbuf_ref(t); 802f6f6: 4620 mov r0, r4 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t)); } 802f6f8: 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); 802f6fc: f7ff bfd9 b.w 802f6b2 0802f700 : * 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) { 802f700: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802f704: 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) && 802f706: 4605 mov r5, r0 802f708: b908 cbnz r0, 802f70e 802f70a: 20f2 movs r0, #242 ; 0xf2 802f70c: e03f b.n 802f78e 802f70e: 2900 cmp r1, #0 802f710: d0fb beq.n 802f70a 802f712: 8902 ldrh r2, [r0, #8] 802f714: 890b ldrh r3, [r1, #8] 802f716: 429a cmp r2, r3 802f718: d3f7 bcc.n 802f70a 802f71a: 2600 movs r6, #0 802f71c: 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)) { 802f71e: f8b4 800a ldrh.w r8, [r4, #10] 802f722: 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); 802f724: 6861 ldr r1, [r4, #4] 802f726: 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)) { 802f728: ebc6 0808 rsb r8, r6, r8 802f72c: 1bdb subs r3, r3, r7 802f72e: 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; 802f730: bfb4 ite lt 802f732: 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; 802f736: 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); 802f73a: 19c0 adds r0, r0, r7 802f73c: 1989 adds r1, r1, r6 802f73e: 4642 mov r2, r8 802f740: f7f2 fa74 bl 8021c2c offset_to += len; offset_from += len; 802f744: 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) { 802f746: 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; 802f748: 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) { 802f74a: 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; 802f74c: 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) { 802f74e: 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; 802f750: bf98 it ls 802f752: 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; 802f754: 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; 802f756: bf98 it ls 802f758: 2600 movls r6, #0 p_from = p_from->next; } if (offset_to == p_to->len) { 802f75a: 42bb cmp r3, r7 802f75c: d105 bne.n 802f76a /* on to next p_to (if any) */ offset_to = 0; p_to = p_to->next; 802f75e: 682d ldr r5, [r5, #0] LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL) , return ERR_ARG;); 802f760: b915 cbnz r5, 802f768 802f762: 2c00 cmp r4, #0 802f764: d1d1 bne.n 802f70a 802f766: e00f b.n 802f788 offset_from = 0; p_from = p_from->next; } if (offset_to == p_to->len) { /* on to next p_to (if any) */ offset_to = 0; 802f768: 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)) { 802f76a: b12c cbz r4, 802f778 802f76c: 8962 ldrh r2, [r4, #10] 802f76e: 8923 ldrh r3, [r4, #8] 802f770: 429a cmp r2, r3 802f772: d101 bne.n 802f778 /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!\n", 802f774: 6823 ldr r3, [r4, #0] 802f776: b94b cbnz r3, 802f78c (p_from->next == NULL), return ERR_VAL;); } if((p_to != NULL) && (p_to->len == p_to->tot_len)) { 802f778: 896a ldrh r2, [r5, #10] 802f77a: 892b ldrh r3, [r5, #8] 802f77c: 429a cmp r2, r3 802f77e: d101 bne.n 802f784 /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!\n", 802f780: 682b ldr r3, [r5, #0] 802f782: b91b cbnz r3, 802f78c (p_to->next == NULL), return ERR_VAL;); } } while (p_from); 802f784: 2c00 cmp r4, #0 802f786: d1ca bne.n 802f71e LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n")); return ERR_OK; 802f788: 4620 mov r0, r4 802f78a: e000 b.n 802f78e 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", 802f78c: 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; } 802f78e: b240 sxtb r0, r0 802f790: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 0802f794 : * @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) { 802f794: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 802f798: 4688 mov r8, r1 802f79a: 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;); 802f79c: b328 cbz r0, 802f7ea LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;); 802f79e: b331 cbz r1, 802f7ee 802f7a0: 2400 movs r4, #0 802f7a2: 4605 mov r5, r0 802f7a4: 46a1 mov r9, r4 802f7a6: e01c b.n 802f7e2 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)) { 802f7a8: b12b cbz r3, 802f7b6 802f7aa: 896a ldrh r2, [r5, #10] 802f7ac: 4293 cmp r3, r2 802f7ae: d302 bcc.n 802f7b6 /* don't copy from this buffer -> on to the next */ offset -= p->len; 802f7b0: 1a9b subs r3, r3, r2 802f7b2: b29b uxth r3, r3 802f7b4: e014 b.n 802f7e0 } else { /* copy from this buffer. maybe only partially. */ buf_copy_len = p->len - offset; 802f7b6: 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); 802f7b8: 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; 802f7ba: 1aff subs r7, r7, r3 802f7bc: b2bf uxth r7, r7 802f7be: 42b7 cmp r7, r6 802f7c0: bf28 it cs 802f7c2: 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); 802f7c4: eb08 0009 add.w r0, r8, r9 802f7c8: 18c9 adds r1, r1, r3 802f7ca: 463a mov r2, r7 copied_total += buf_copy_len; 802f7cc: 193c adds r4, r7, r4 left += buf_copy_len; 802f7ce: 44b9 add r9, r7 len -= buf_copy_len; 802f7d0: 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); 802f7d2: f7f2 fa2b bl 8021c2c copied_total += buf_copy_len; 802f7d6: b2a4 uxth r4, r4 left += buf_copy_len; 802f7d8: fa1f f989 uxth.w r9, r9 len -= buf_copy_len; 802f7dc: b2b6 uxth r6, r6 offset = 0; 802f7de: 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) { 802f7e0: 682d ldr r5, [r5, #0] 802f7e2: b12e cbz r6, 802f7f0 802f7e4: 2d00 cmp r5, #0 802f7e6: d1df bne.n 802f7a8 802f7e8: e002 b.n 802f7f0 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;); 802f7ea: 4604 mov r4, r0 802f7ec: e000 b.n 802f7f0 802f7ee: 460c mov r4, r1 len -= buf_copy_len; offset = 0; } } return copied_total; } 802f7f0: 4620 mov r0, r4 802f7f2: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 802f7f6: 0000 movs r0, r0 0802f7f8 : * caller). * */ u8_t raw_input(struct pbuf *p, struct netif *inp) { 802f7f8: 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); 802f7fc: 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))) { 802f7fe: f8df a074 ldr.w sl, [pc, #116] ; 802f874 u8_t eaten = 0; LWIP_UNUSED_ARG(inp); iphdr = (struct ip_hdr *)p->payload; proto = IPH_PROTO(iphdr); 802f802: f893 9009 ldrb.w r9, [r3, #9] prev = NULL; pcb = raw_pcbs; 802f806: 4b19 ldr r3, [pc, #100] ; (802f86c ) * caller). * */ u8_t raw_input(struct pbuf *p, struct netif *inp) { 802f808: 4606 mov r6, r0 iphdr = (struct ip_hdr *)p->payload; proto = IPH_PROTO(iphdr); prev = NULL; pcb = raw_pcbs; 802f80a: 681c ldr r4, [r3, #0] LWIP_UNUSED_ARG(inp); iphdr = (struct ip_hdr *)p->payload; proto = IPH_PROTO(iphdr); prev = NULL; 802f80c: 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; 802f80e: 4698 mov r8, r3 802f810: e023 b.n 802f85a 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) && 802f812: 7c23 ldrb r3, [r4, #16] 802f814: 454b cmp r3, r9 802f816: d118 bne.n 802f84a (ip_addr_isany(&pcb->local_ip) || 802f818: 6823 ldr r3, [r4, #0] 802f81a: b11b cbz r3, 802f824 802f81c: f8da 2000 ldr.w r2, [sl] 802f820: 4293 cmp r3, r2 802f822: d112 bne.n 802f84a /* 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) { 802f824: 6967 ldr r7, [r4, #20] 802f826: b187 cbz r7, 802f84a /* the receive callback function did not eat the packet? */ if (pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr()) != 0) { 802f828: 69a0 ldr r0, [r4, #24] 802f82a: 4b11 ldr r3, [pc, #68] ; (802f870 ) 802f82c: 4621 mov r1, r4 802f82e: 4632 mov r2, r6 802f830: 47b8 blx r7 802f832: b150 cbz r0, 802f84a /* receive function ate the packet */ p = NULL; eaten = 1; if (prev != NULL) { 802f834: b15d cbz r5, 802f84e /* move the pcb to the front of raw_pcbs so that is found faster next time */ prev->next = pcb->next; 802f836: 68e3 ldr r3, [r4, #12] 802f838: 60eb str r3, [r5, #12] pcb->next = raw_pcbs; 802f83a: f8d8 3000 ldr.w r3, [r8] raw_pcbs = pcb; 802f83e: 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; 802f842: 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; 802f844: 2600 movs r6, #0 eaten = 1; 802f846: 2301 movs r3, #1 802f848: e003 b.n 802f852 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) || 802f84a: 2300 movs r3, #0 802f84c: e001 b.n 802f852 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; 802f84e: 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; 802f850: 462e mov r6, r5 /* no receive callback function was set for this raw PCB */ } /* drop the packet */ } prev = pcb; pcb = pcb->next; 802f852: 68e2 ldr r2, [r4, #12] 802f854: 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)) { 802f856: b92b cbnz r3, 802f864 /* no receive callback function was set for this raw PCB */ } /* drop the packet */ } prev = pcb; pcb = pcb->next; 802f858: 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)) { 802f85a: 2c00 cmp r4, #0 802f85c: d1d9 bne.n 802f812 802f85e: 4620 mov r0, r4 802f860: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802f864: 2001 movs r0, #1 } prev = pcb; pcb = pcb->next; } return eaten; } 802f866: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802f86a: bf00 nop 802f86c: 2000c3dc .word 0x2000c3dc 802f870: 2000f6cc .word 0x2000f6cc 802f874: 2000f6d4 .word 0x2000f6d4 0802f878 : LWIP_UNUSED_ARG(arg); LWIP_UNUSED_ARG(pcb); LWIP_UNUSED_ARG(err); return ERR_ABRT; } 802f878: f06f 0009 mvn.w r0, #9 802f87c: 4770 bx lr 802f87e: 0000 movs r0, r0 0802f880 : * * @return a new (free) local TCP port number */ static u16_t tcp_new_port(void) { 802f880: 4b13 ldr r3, [pc, #76] ; (802f8d0 ) 802f882: b570 push {r4, r5, r6, lr} 802f884: 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) { 802f886: 4d13 ldr r5, [pc, #76] ; (802f8d4 ) * * @return a new (free) local TCP port number */ static u16_t tcp_new_port(void) { 802f888: 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) { 802f88c: f64f 74ff movw r4, #65535 ; 0xffff 802f890: 42a0 cmp r0, r4 802f892: d002 beq.n 802f89a 802f894: 3001 adds r0, #1 802f896: b280 uxth r0, r0 802f898: e001 b.n 802f89e tcp_port = TCP_LOCAL_PORT_RANGE_START; 802f89a: f44f 4040 mov.w r0, #49152 ; 0xc000 802f89e: 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) { 802f8a0: 5959 ldr r1, [r3, r5] 802f8a2: 6809 ldr r1, [r1, #0] 802f8a4: e00b b.n 802f8be if (pcb->local_port == tcp_port) { 802f8a6: 8b4e ldrh r6, [r1, #26] 802f8a8: 4286 cmp r6, r0 802f8aa: d107 bne.n 802f8bc 802f8ac: 3a01 subs r2, #1 802f8ae: b292 uxth r2, r2 if (++n > (TCP_LOCAL_PORT_RANGE_END - TCP_LOCAL_PORT_RANGE_START)) { 802f8b0: 2a00 cmp r2, #0 802f8b2: d1ed bne.n 802f890 802f8b4: 4b06 ldr r3, [pc, #24] ; (802f8d0 ) 802f8b6: 8018 strh r0, [r3, #0] return 0; 802f8b8: 4610 mov r0, r2 802f8ba: 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) { 802f8bc: 68c9 ldr r1, [r1, #12] 802f8be: 2900 cmp r1, #0 802f8c0: d1f1 bne.n 802f8a6 802f8c2: 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++) { 802f8c4: 2b10 cmp r3, #16 802f8c6: d1eb bne.n 802f8a0 802f8c8: 4b01 ldr r3, [pc, #4] ; (802f8d0 ) 802f8ca: 8018 strh r0, [r3, #0] goto again; } } } return tcp_port; } 802f8cc: bd70 pop {r4, r5, r6, pc} 802f8ce: bf00 nop 802f8d0: 2000071c .word 0x2000071c 802f8d4: 08043fbc .word 0x08043fbc 0802f8d8 : /** * Initialize this module. */ void tcp_init(void) { 802f8d8: 4770 bx lr 802f8da: 0000 movs r0, r0 0802f8dc : * 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) { 802f8dc: 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); 802f8de: 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) { 802f8e0: 4604 mov r4, r0 802f8e2: 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); 802f8e4: bb33 cbnz r3, 802f934 if (ip_get_option(pcb, SOF_REUSEADDR)) { max_pcb_list = NUM_TCP_PCB_LISTS_NO_TIME_WAIT; } #endif /* SO_REUSE */ if (port == 0) { 802f8e6: b91a cbnz r2, 802f8f0 port = tcp_new_port(); 802f8e8: f7ff ffca bl 802f880 if (port == 0) { 802f8ec: 4602 mov r2, r0 802f8ee: b318 cbz r0, 802f938 } } /* 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) { 802f8f0: 4f14 ldr r7, [pc, #80] ; (802f944 ) * 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) { 802f8f2: 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) { 802f8f4: 59cb ldr r3, [r1, r7] 802f8f6: 681b ldr r3, [r3, #0] 802f8f8: e00a b.n 802f910 if (cpcb->local_port == port) { 802f8fa: 8b58 ldrh r0, [r3, #26] 802f8fc: 4290 cmp r0, r2 802f8fe: d106 bne.n 802f90e 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)) || 802f900: 681e ldr r6, [r3, #0] 802f902: b1de cbz r6, 802f93c 802f904: b1d5 cbz r5, 802f93c ip_addr_isany(ipaddr) || 802f906: 6828 ldr r0, [r5, #0] 802f908: b1c0 cbz r0, 802f93c 802f90a: 4286 cmp r6, r0 802f90c: d016 beq.n 802f93c } } /* 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) { 802f90e: 68db ldr r3, [r3, #12] 802f910: 2b00 cmp r3, #0 802f912: d1f2 bne.n 802f8fa 802f914: 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++) { 802f916: 2910 cmp r1, #16 802f918: d1ec bne.n 802f8f4 } } } } if (!ip_addr_isany(ipaddr)) { 802f91a: b115 cbz r5, 802f922 802f91c: 682b ldr r3, [r5, #0] 802f91e: b103 cbz r3, 802f922 pcb->local_ip = *ipaddr; 802f920: 6023 str r3, [r4, #0] } pcb->local_port = port; TCP_REG(&tcp_bound_pcbs, pcb); 802f922: 4b09 ldr r3, [pc, #36] ; (802f948 ) } if (!ip_addr_isany(ipaddr)) { pcb->local_ip = *ipaddr; } pcb->local_port = port; 802f924: 8362 strh r2, [r4, #26] TCP_REG(&tcp_bound_pcbs, pcb); 802f926: 681a ldr r2, [r3, #0] 802f928: 601c str r4, [r3, #0] 802f92a: 60e2 str r2, [r4, #12] 802f92c: f002 f8de bl 8031aec LWIP_DEBUGF(TCP_DEBUG, ("tcp_bind: bind to port %"U16_F"\n", port)); return ERR_OK; 802f930: 2000 movs r0, #0 802f932: e004 b.n 802f93e { 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); 802f934: 20fa movs r0, #250 ; 0xfa 802f936: e002 b.n 802f93e #endif /* SO_REUSE */ if (port == 0) { port = tcp_new_port(); if (port == 0) { return ERR_BUF; 802f938: 20fe movs r0, #254 ; 0xfe 802f93a: e000 b.n 802f93e #endif /* SO_REUSE */ { if (ip_addr_isany(&(cpcb->local_ip)) || ip_addr_isany(ipaddr) || ip_addr_cmp(&(cpcb->local_ip), ipaddr)) { return ERR_USE; 802f93c: 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; } 802f93e: b240 sxtb r0, r0 802f940: bdf8 pop {r3, r4, r5, r6, r7, pc} 802f942: bf00 nop 802f944: 08043fbc .word 0x08043fbc 802f948: 2000f6bc .word 0x2000f6bc 0802f94c : * called like this: * tpcb = tcp_listen(tpcb); */ struct tcp_pcb * tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog) { 802f94c: 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); 802f94e: 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) { 802f950: 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); 802f952: b10b cbz r3, 802f958 802f954: 2000 movs r0, #0 802f956: bd38 pop {r3, r4, r5, pc} } } } } #endif /* SO_REUSE */ lpcb = (struct tcp_pcb_listen *)memp_malloc(MEMP_TCP_PCB_LISTEN); 802f958: 2003 movs r0, #3 802f95a: f7ff fcad bl 802f2b8 if (lpcb == NULL) { 802f95e: 4605 mov r5, r0 802f960: 2800 cmp r0, #0 802f962: d0f7 beq.n 802f954 return NULL; } lpcb->callback_arg = pcb->callback_arg; 802f964: 6923 ldr r3, [r4, #16] 802f966: 6103 str r3, [r0, #16] lpcb->local_port = pcb->local_port; 802f968: 8b63 ldrh r3, [r4, #26] 802f96a: 8343 strh r3, [r0, #26] lpcb->state = LISTEN; 802f96c: 2301 movs r3, #1 802f96e: 7603 strb r3, [r0, #24] lpcb->prio = pcb->prio; 802f970: 7e63 ldrb r3, [r4, #25] 802f972: 7643 strb r3, [r0, #25] lpcb->so_options = pcb->so_options; ip_set_option(lpcb, SOF_ACCEPTCONN); 802f974: 7a23 ldrb r3, [r4, #8] 802f976: f043 0302 orr.w r3, r3, #2 802f97a: 7203 strb r3, [r0, #8] lpcb->ttl = pcb->ttl; 802f97c: 7aa3 ldrb r3, [r4, #10] 802f97e: 7283 strb r3, [r0, #10] lpcb->tos = pcb->tos; 802f980: 7a63 ldrb r3, [r4, #9] 802f982: 7243 strb r3, [r0, #9] ip_addr_copy(lpcb->local_ip, pcb->local_ip); 802f984: 6823 ldr r3, [r4, #0] 802f986: 6003 str r3, [r0, #0] if (pcb->local_port != 0) { 802f988: 8b63 ldrh r3, [r4, #26] 802f98a: b1ab cbz r3, 802f9b8 TCP_RMV(&tcp_bound_pcbs, pcb); 802f98c: 4a11 ldr r2, [pc, #68] ; (802f9d4 ) 802f98e: 6813 ldr r3, [r2, #0] 802f990: 42a3 cmp r3, r4 802f992: d101 bne.n 802f998 802f994: 68e3 ldr r3, [r4, #12] 802f996: e00c b.n 802f9b2 802f998: 4a0f ldr r2, [pc, #60] ; (802f9d8 ) 802f99a: 6013 str r3, [r2, #0] 802f99c: e007 b.n 802f9ae 802f99e: 68d9 ldr r1, [r3, #12] 802f9a0: 42a1 cmp r1, r4 802f9a2: d103 bne.n 802f9ac 802f9a4: 6013 str r3, [r2, #0] 802f9a6: 68e2 ldr r2, [r4, #12] 802f9a8: 60da str r2, [r3, #12] 802f9aa: e003 b.n 802f9b4 802f9ac: 460b mov r3, r1 802f9ae: 2b00 cmp r3, #0 802f9b0: d1f5 bne.n 802f99e 802f9b2: 6013 str r3, [r2, #0] 802f9b4: 2300 movs r3, #0 802f9b6: 60e3 str r3, [r4, #12] } memp_free(MEMP_TCP_PCB, pcb); 802f9b8: 2002 movs r0, #2 802f9ba: 4621 mov r1, r4 802f9bc: f7ff fc92 bl 802f2e4 #if LWIP_CALLBACK_API lpcb->accept = tcp_accept_null; 802f9c0: 4b06 ldr r3, [pc, #24] ; (802f9dc ) 802f9c2: 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); 802f9c4: 4b06 ldr r3, [pc, #24] ; (802f9e0 ) 802f9c6: 681a ldr r2, [r3, #0] 802f9c8: 601d str r5, [r3, #0] 802f9ca: 60ea str r2, [r5, #12] 802f9cc: f002 f88e bl 8031aec return (struct tcp_pcb *)lpcb; 802f9d0: 4628 mov r0, r5 } 802f9d2: bd38 pop {r3, r4, r5, pc} 802f9d4: 2000f6bc .word 0x2000f6bc 802f9d8: 2000f6b8 .word 0x2000f6b8 802f9dc: 0802f879 .word 0x0802f879 802f9e0: 2000f6b4 .word 0x2000f6b4 0802f9e4 : * * 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) { 802f9e4: 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))) { 802f9e6: 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; 802f9e8: 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))) { 802f9ea: 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; 802f9ec: 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) { 802f9ee: 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))) { 802f9f0: f640 3068 movw r0, #2920 ; 0xb68 802f9f4: 4285 cmp r5, r0 802f9f6: bf28 it cs 802f9f8: 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; 802f9fa: 1a60 subs r0, r4, r1 if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { 802f9fc: 1880 adds r0, r0, r2 802f9fe: 1b45 subs r5, r0, r5 802fa00: 2d00 cmp r5, #0 802fa02: db01 blt.n 802fa08 /* we can advertise more window */ pcb->rcv_ann_wnd = pcb->rcv_wnd; 802fa04: 85dc strh r4, [r3, #46] ; 0x2e return new_right_edge - pcb->rcv_ann_right_edge; 802fa06: bd30 pop {r4, r5, pc} } else { if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) { 802fa08: 1a50 subs r0, r2, r1 802fa0a: 2800 cmp r0, #0 802fa0c: f04f 0000 mov.w r0, #0 802fa10: dd01 ble.n 802fa16 /* 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; 802fa12: 85d8 strh r0, [r3, #46] ; 0x2e 802fa14: 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; 802fa16: 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; 802fa18: 85da strh r2, [r3, #46] ; 0x2e } return 0; } } 802fa1a: bd30 pop {r4, r5, pc} 0802fa1c : 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; 802fa1c: 8d83 ldrh r3, [r0, #44] ; 0x2c 802fa1e: 18c9 adds r1, r1, r3 802fa20: b289 uxth r1, r1 if (pcb->rcv_wnd > TCP_WND) { 802fa22: f241 63d0 movw r3, #5840 ; 0x16d0 802fa26: 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) { 802fa28: 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; 802fa2a: bf8c ite hi 802fa2c: 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; 802fa2e: 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) { 802fa30: 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); 802fa32: f7ff ffd7 bl 802f9e4 /* 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) { 802fa36: f240 53b3 movw r3, #1459 ; 0x5b3 802fa3a: 4298 cmp r0, r3 802fa3c: dd08 ble.n 802fa50 tcp_ack_now(pcb); 802fa3e: 7fa3 ldrb r3, [r4, #30] tcp_output(pcb); 802fa40: 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); 802fa42: f043 0302 orr.w r3, r3, #2 802fa46: 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)); } 802fa48: 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); 802fa4c: f001 bd90 b.w 8031570 802fa50: bd10 pop {r4, pc} 0802fa52 : * * @param seg single tcp_seg to free */ void tcp_seg_free(struct tcp_seg *seg) { 802fa52: b510 push {r4, lr} if (seg != NULL) { 802fa54: 4604 mov r4, r0 802fa56: b148 cbz r0, 802fa6c if (seg->p != NULL) { 802fa58: 6840 ldr r0, [r0, #4] 802fa5a: b108 cbz r0, 802fa60 pbuf_free(seg->p); 802fa5c: f7ff fd4c bl 802f4f8 #if TCP_DEBUG seg->p = NULL; #endif /* TCP_DEBUG */ } memp_free(MEMP_TCP_SEG, seg); 802fa60: 2004 movs r0, #4 802fa62: 4621 mov r1, r4 } } 802fa64: 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); 802fa68: f7ff bc3c b.w 802f2e4 802fa6c: bd10 pop {r4, pc} 0802fa6e : * * @param seg tcp_seg list of TCP segments to free */ void tcp_segs_free(struct tcp_seg *seg) { 802fa6e: b510 push {r4, lr} while (seg != NULL) { 802fa70: e003 b.n 802fa7a struct tcp_seg *next = seg->next; 802fa72: 6804 ldr r4, [r0, #0] tcp_seg_free(seg); 802fa74: f7ff ffed bl 802fa52 seg = next; 802fa78: 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) { 802fa7a: 2800 cmp r0, #0 802fa7c: d1f9 bne.n 802fa72 struct tcp_seg *next = seg->next; tcp_seg_free(seg); seg = next; } } 802fa7e: bd10 pop {r4, pc} 0802fa80 : 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; 802fa80: 6101 str r1, [r0, #16] 802fa82: 4770 bx lr 0802fa84 : */ 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; 802fa84: 67c1 str r1, [r0, #124] ; 0x7c 802fa86: 4770 bx lr 0802fa88 : */ 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; 802fa88: 6781 str r1, [r0, #120] ; 0x78 802fa8a: 4770 bx lr 0802fa8c : */ 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; 802fa8c: f8c0 1088 str.w r1, [r0, #136] ; 0x88 802fa90: 4770 bx lr 0802fa92 : 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; 802fa92: 6141 str r1, [r0, #20] 802fa94: 4770 bx lr 0802fa96 : 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; 802fa96: f8c0 1084 str.w r1, [r0, #132] ; 0x84 #else /* LWIP_CALLBACK_API */ LWIP_UNUSED_ARG(poll); #endif /* LWIP_CALLBACK_API */ pcb->pollinterval = interval; 802fa9a: f880 2020 strb.w r2, [r0, #32] 802fa9e: 4770 bx lr 0802faa0 : * @param pcb tcp_pcb to purge. The pcb itself is not deallocated! */ void tcp_pcb_purge(struct tcp_pcb *pcb) { if (pcb->state != CLOSED && 802faa0: 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) { 802faa2: b510 push {r4, lr} 802faa4: 4604 mov r4, r0 if (pcb->state != CLOSED && 802faa6: b1bb cbz r3, 802fad8 802faa8: 2b0a cmp r3, #10 802faaa: d015 beq.n 802fad8 pcb->state != TIME_WAIT && 802faac: 2b01 cmp r3, #1 802faae: d013 beq.n 802fad8 } } #endif /* TCP_LISTEN_BACKLOG */ if (pcb->refused_data != NULL) { 802fab0: 6f40 ldr r0, [r0, #116] ; 0x74 802fab2: b118 cbz r0, 802fabc LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->refused_data\n")); pbuf_free(pcb->refused_data); 802fab4: f7ff fd20 bl 802f4f8 pcb->refused_data = NULL; 802fab8: 2300 movs r3, #0 802faba: 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; 802fabc: f64f 73ff movw r3, #65535 ; 0xffff 802fac0: 86a3 strh r3, [r4, #52] ; 0x34 tcp_segs_free(pcb->unsent); 802fac2: 6ee0 ldr r0, [r4, #108] ; 0x6c 802fac4: f7ff ffd3 bl 802fa6e tcp_segs_free(pcb->unacked); 802fac8: 6f20 ldr r0, [r4, #112] ; 0x70 802faca: f7ff ffd0 bl 802fa6e pcb->unacked = pcb->unsent = NULL; 802face: 2300 movs r3, #0 802fad0: 66e3 str r3, [r4, #108] ; 0x6c 802fad2: 6723 str r3, [r4, #112] ; 0x70 #if TCP_OVERSIZE pcb->unsent_oversize = 0; 802fad4: f8a4 306a strh.w r3, [r4, #106] ; 0x6a 802fad8: bd10 pop {r4, pc} 802fada: 0000 movs r0, r0 0802fadc : u8_t pcb_reset; /* flag if a RST should be sent when removing */ err_t err; err = ERR_OK; ++tcp_ticks; 802fadc: 4b9c ldr r3, [pc, #624] ; (802fd50 ) * * Automatically called from tcp_tmr(). */ void tcp_slowtmr(void) { 802fade: 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; 802fae2: 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; 802fae4: f8df 8284 ldr.w r8, [pc, #644] ; 802fd6c u8_t pcb_reset; /* flag if a RST should be sent when removing */ err_t err; err = ERR_OK; ++tcp_ticks; 802fae8: 3201 adds r2, #1 802faea: 601a str r2, [r3, #0] ++tcp_timer_ctr; 802faec: 4b99 ldr r3, [pc, #612] ; (802fd54 ) 802faee: 781a ldrb r2, [r3, #0] 802faf0: 3201 adds r2, #1 802faf2: 701a strb r2, [r3, #0] 802faf4: 46c1 mov r9, r8 tcp_slowtmr_start: /* Steps through all of the active PCBs. */ prev = NULL; pcb = tcp_active_pcbs; 802faf6: 4b98 ldr r3, [pc, #608] ; (802fd58 ) 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) { 802faf8: f8df a258 ldr.w sl, [pc, #600] ; 802fd54 ++tcp_timer_ctr; tcp_slowtmr_start: /* Steps through all of the active PCBs. */ prev = NULL; pcb = tcp_active_pcbs; 802fafc: 681c ldr r4, [r3, #0] ++tcp_ticks; ++tcp_timer_ctr; tcp_slowtmr_start: /* Steps through all of the active PCBs. */ prev = NULL; 802fafe: 2600 movs r6, #0 pcb = tcp_active_pcbs; if (pcb == NULL) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: no active pcbs\n")); } while (pcb != NULL) { 802fb00: e0ff b.n 802fd02 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) { 802fb02: f89a 3000 ldrb.w r3, [sl] 802fb06: f894 2021 ldrb.w r2, [r4, #33] ; 0x21 802fb0a: 429a cmp r2, r3 802fb0c: d101 bne.n 802fb12 /* skip this pcb, we have already processed it */ pcb = pcb->next; 802fb0e: 68e7 ldr r7, [r4, #12] continue; 802fb10: e0f6 b.n 802fd00 pcb->last_timer = tcp_timer_ctr; pcb_remove = 0; pcb_reset = 0; if (pcb->state == SYN_SENT && pcb->nrtx == TCP_SYNMAXRTX) { 802fb12: 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; 802fb14: f884 3021 strb.w r3, [r4, #33] ; 0x21 pcb_remove = 0; pcb_reset = 0; if (pcb->state == SYN_SENT && pcb->nrtx == TCP_SYNMAXRTX) { 802fb18: 2902 cmp r1, #2 802fb1a: f894 2046 ldrb.w r2, [r4, #70] ; 0x46 802fb1e: d101 bne.n 802fb24 802fb20: 2a06 cmp r2, #6 802fb22: d051 beq.n 802fbc8 ++pcb_remove; LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max SYN retries reached\n")); } else if (pcb->nrtx == TCP_MAXRTX) { 802fb24: 2a0c cmp r2, #12 802fb26: d04f beq.n 802fbc8 ++pcb_remove; LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n")); } else { if (pcb->persist_backoff > 0) { 802fb28: f894 3091 ldrb.w r3, [r4, #145] ; 0x91 802fb2c: b1c3 cbz r3, 802fb60 /* 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]) { 802fb2e: 498b ldr r1, [pc, #556] ; (802fd5c ) 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++; 802fb30: f894 2090 ldrb.w r2, [r4, #144] ; 0x90 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 802fb34: 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++; 802fb36: 3201 adds r2, #1 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 802fb38: 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++; 802fb3c: b2d2 uxtb r2, r2 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 802fb3e: 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++; 802fb40: f884 2090 strb.w r2, [r4, #144] ; 0x90 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 802fb44: d900 bls.n 802fb48 802fb46: e03d b.n 802fbc4 pcb->persist_cnt = 0; 802fb48: 2200 movs r2, #0 if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { 802fb4a: 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; 802fb4c: f884 2090 strb.w r2, [r4, #144] ; 0x90 if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { 802fb50: d802 bhi.n 802fb58 pcb->persist_backoff++; 802fb52: 3301 adds r3, #1 802fb54: f884 3091 strb.w r3, [r4, #145] ; 0x91 } tcp_zero_window_probe(pcb); 802fb58: 4620 mov r0, r4 802fb5a: f001 ff04 bl 8031966 802fb5e: e031 b.n 802fbc4 } } else { /* Increase the retransmission timer if it is running */ if(pcb->rtime >= 0) { 802fb60: 8ea3 ldrh r3, [r4, #52] ; 0x34 802fb62: 0418 lsls r0, r3, #16 802fb64: d401 bmi.n 802fb6a ++pcb->rtime; 802fb66: 3301 adds r3, #1 802fb68: 86a3 strh r3, [r4, #52] ; 0x34 } if (pcb->unacked != NULL && pcb->rtime >= pcb->rto) { 802fb6a: 6f23 ldr r3, [r4, #112] ; 0x70 802fb6c: b353 cbz r3, 802fbc4 802fb6e: f9b4 0034 ldrsh.w r0, [r4, #52] ; 0x34 802fb72: f9b4 3044 ldrsh.w r3, [r4, #68] ; 0x44 802fb76: 4298 cmp r0, r3 802fb78: db24 blt.n 802fbc4 " 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) { 802fb7a: 2902 cmp r1, #2 802fb7c: d00b beq.n 802fb96 pcb->rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[pcb->nrtx]; 802fb7e: f9b4 1040 ldrsh.w r1, [r4, #64] ; 0x40 802fb82: f9b4 3042 ldrsh.w r3, [r4, #66] ; 0x42 802fb86: eb03 03e1 add.w r3, r3, r1, asr #3 802fb8a: 4975 ldr r1, [pc, #468] ; (802fd60 ) 802fb8c: 5c8a ldrb r2, [r1, r2] 802fb8e: fa03 f302 lsl.w r3, r3, r2 802fb92: f8a4 3044 strh.w r3, [r4, #68] ; 0x44 } /* Reset the retransmission timer. */ pcb->rtime = 0; 802fb96: 2300 movs r3, #0 /* Reduce congestion window and ssthresh. */ eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); 802fb98: 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; 802fb9c: 86a3 strh r3, [r4, #52] ; 0x34 /* Reduce congestion window and ssthresh. */ eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); 802fb9e: f8b4 3060 ldrh.w r3, [r4, #96] ; 0x60 pcb->ssthresh = eff_wnd >> 1; 802fba2: 4299 cmp r1, r3 802fba4: bf28 it cs 802fba6: 4619 movcs r1, r3 if (pcb->ssthresh < (pcb->mss << 1)) { 802fba8: 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; 802fbaa: 0849 lsrs r1, r1, #1 if (pcb->ssthresh < (pcb->mss << 1)) { 802fbac: 005a lsls r2, r3, #1 802fbae: 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; 802fbb0: f8a4 104e strh.w r1, [r4, #78] ; 0x4e if (pcb->ssthresh < (pcb->mss << 1)) { pcb->ssthresh = (pcb->mss << 1); } pcb->cwnd = pcb->mss; 802fbb4: 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); 802fbb8: bfb8 it lt 802fbba: 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); 802fbbe: 4620 mov r0, r4 802fbc0: f001 fe40 bl 8031844 pcb = pcb->next; continue; } pcb->last_timer = tcp_timer_ctr; pcb_remove = 0; 802fbc4: 2500 movs r5, #0 802fbc6: e000 b.n 802fbca pcb_reset = 0; if (pcb->state == SYN_SENT && pcb->nrtx == TCP_SYNMAXRTX) { ++pcb_remove; 802fbc8: 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) { 802fbca: 7e23 ldrb r3, [r4, #24] 802fbcc: 2b06 cmp r3, #6 802fbce: d10c bne.n 802fbea /* If this PCB is in FIN_WAIT_2 because of SHUT_WR don't let it time out. */ if (pcb->flags & TF_RXCLOSED) { 802fbd0: 7fa2 ldrb r2, [r4, #30] 802fbd2: f002 0210 and.w r2, r2, #16 802fbd6: b2d2 uxtb r2, r2 802fbd8: b13a cbz r2, 802fbea /* PCB was fully closed (either through close() or SHUT_RDWR): normal FIN-WAIT timeout handling. */ if ((u32_t)(tcp_ticks - pcb->tmr) > 802fbda: 4a5d ldr r2, [pc, #372] ; (802fd50 ) 802fbdc: 6811 ldr r1, [r2, #0] 802fbde: 6a62 ldr r2, [r4, #36] ; 0x24 802fbe0: 1a8a subs r2, r1, r2 802fbe2: 2a28 cmp r2, #40 ; 0x28 802fbe4: d901 bls.n 802fbea TCP_FIN_WAIT_TIMEOUT / TCP_SLOW_INTERVAL) { ++pcb_remove; 802fbe6: 3501 adds r5, #1 802fbe8: b2ed uxtb r5, r5 } } } /* Check if KEEPALIVE should be sent */ if(ip_get_option(pcb, SOF_KEEPALIVE) && 802fbea: 7a27 ldrb r7, [r4, #8] 802fbec: f007 0708 and.w r7, r7, #8 802fbf0: b2ff uxtb r7, r7 802fbf2: b34f cbz r7, 802fc48 802fbf4: 2b04 cmp r3, #4 802fbf6: d001 beq.n 802fbfc ((pcb->state == ESTABLISHED) || 802fbf8: 2b07 cmp r3, #7 802fbfa: d124 bne.n 802fc46 (pcb->state == CLOSE_WAIT))) { if((u32_t)(tcp_ticks - pcb->tmr) > 802fbfc: 4b54 ldr r3, [pc, #336] ; (802fd50 ) (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) 802fbfe: 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) > 802fc02: 681a ldr r2, [r3, #0] 802fc04: 6a63 ldr r3, [r4, #36] ; 0x24 802fc06: 1ad2 subs r2, r2, r3 (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) 802fc08: f500 2324 add.w r3, r0, #671744 ; 0xa4000 802fc0c: f603 43b8 addw r3, r3, #3256 ; 0xcb8 802fc10: f44f 71fa mov.w r1, #500 ; 0x1f4 802fc14: 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) > 802fc18: 429a cmp r2, r3 802fc1a: d903 bls.n 802fc24 { 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; 802fc1c: 3501 adds r5, #1 802fc1e: b2ed uxtb r5, r5 ++pcb_reset; 802fc20: 2701 movs r7, #1 802fc22: e011 b.n 802fc48 } else if((u32_t)(tcp_ticks - pcb->tmr) > (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) 802fc24: f894 3092 ldrb.w r3, [r4, #146] ; 0x92 802fc28: 4f4e ldr r7, [pc, #312] ; (802fd64 ) 802fc2a: fb07 0003 mla r0, r7, r3, r0 / TCP_SLOW_INTERVAL) 802fc2e: 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) > 802fc32: 428a cmp r2, r1 802fc34: d907 bls.n 802fc46 (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) / TCP_SLOW_INTERVAL) { tcp_keepalive(pcb); 802fc36: 4620 mov r0, r4 802fc38: f001 fe76 bl 8031928 pcb->keep_cnt_sent++; 802fc3c: f894 3092 ldrb.w r3, [r4, #146] ; 0x92 802fc40: 3301 adds r3, #1 802fc42: f884 3092 strb.w r3, [r4, #146] ; 0x92 continue; } pcb->last_timer = tcp_timer_ctr; pcb_remove = 0; pcb_reset = 0; 802fc46: 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) { 802fc48: 7e23 ldrb r3, [r4, #24] 802fc4a: 2b03 cmp r3, #3 802fc4c: d108 bne.n 802fc60 if ((u32_t)(tcp_ticks - pcb->tmr) > 802fc4e: 4b40 ldr r3, [pc, #256] ; (802fd50 ) 802fc50: 681a ldr r2, [r3, #0] 802fc52: 6a63 ldr r3, [r4, #36] ; 0x24 802fc54: 1ad3 subs r3, r2, r3 802fc56: 2b28 cmp r3, #40 ; 0x28 802fc58: d90a bls.n 802fc70 TCP_SYN_RCVD_TIMEOUT / TCP_SLOW_INTERVAL) { ++pcb_remove; 802fc5a: 3501 adds r5, #1 802fc5c: b2ed uxtb r5, r5 802fc5e: e007 b.n 802fc70 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) { 802fc60: 2b09 cmp r3, #9 802fc62: d105 bne.n 802fc70 if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { 802fc64: 4b3a ldr r3, [pc, #232] ; (802fd50 ) 802fc66: 681a ldr r2, [r3, #0] 802fc68: 6a63 ldr r3, [r4, #36] ; 0x24 802fc6a: 1ad3 subs r3, r2, r3 802fc6c: 2bf0 cmp r3, #240 ; 0xf0 802fc6e: d800 bhi.n 802fc72 LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in LAST-ACK\n")); } } /* If the PCB should be removed, do it. */ if (pcb_remove) { 802fc70: b345 cbz r5, 802fcc4 struct tcp_pcb *pcb2; tcp_err_fn err_fn; void *err_arg; tcp_pcb_purge(pcb); 802fc72: 4620 mov r0, r4 802fc74: f7ff ff14 bl 802faa0 802fc78: 68e3 ldr r3, [r4, #12] /* Remove PCB from tcp_active_pcbs list. */ if (prev != NULL) { 802fc7a: b10e cbz r6, 802fc80 LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs); prev->next = pcb->next; 802fc7c: 60f3 str r3, [r6, #12] 802fc7e: e001 b.n 802fc84 } else { /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb); tcp_active_pcbs = pcb->next; 802fc80: 4a35 ldr r2, [pc, #212] ; (802fd58 ) 802fc82: 6013 str r3, [r2, #0] } if (pcb_reset) { 802fc84: b14f cbz r7, 802fc9a tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, 802fc86: 8b63 ldrh r3, [r4, #26] 802fc88: 9300 str r3, [sp, #0] 802fc8a: 8ba3 ldrh r3, [r4, #28] 802fc8c: 9301 str r3, [sp, #4] 802fc8e: 6d20 ldr r0, [r4, #80] ; 0x50 802fc90: 6aa1 ldr r1, [r4, #40] ; 0x28 802fc92: 4622 mov r2, r4 802fc94: 1d23 adds r3, r4, #4 802fc96: f001 fd8f bl 80317b8 pcb->local_port, pcb->remote_port); } err_fn = pcb->errf; 802fc9a: f8d4 5088 ldr.w r5, [r4, #136] ; 0x88 err_arg = pcb->callback_arg; 802fc9e: f8d4 b010 ldr.w fp, [r4, #16] pcb2 = pcb; pcb = pcb->next; 802fca2: 68e7 ldr r7, [r4, #12] memp_free(MEMP_TCP_PCB, pcb2); 802fca4: 2002 movs r0, #2 802fca6: 4621 mov r1, r4 802fca8: f7ff fb1c bl 802f2e4 tcp_active_pcbs_changed = 0; 802fcac: 2300 movs r3, #0 802fcae: f888 3000 strb.w r3, [r8] TCP_EVENT_ERR(err_fn, err_arg, ERR_ABRT); 802fcb2: b11d cbz r5, 802fcbc 802fcb4: 4658 mov r0, fp 802fcb6: f06f 0109 mvn.w r1, #9 802fcba: 47a8 blx r5 if (tcp_active_pcbs_changed) { 802fcbc: f899 3000 ldrb.w r3, [r9] 802fcc0: b1f3 cbz r3, 802fd00 802fcc2: e718 b.n 802faf6 /* 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; 802fcc4: 7fe3 ldrb r3, [r4, #31] if (prev->polltmr >= prev->pollinterval) { 802fcc6: 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; 802fcca: 68e7 ldr r7, [r4, #12] /* We check if we should poll the connection. */ ++prev->polltmr; 802fccc: 3301 adds r3, #1 802fcce: b2db uxtb r3, r3 if (prev->polltmr >= prev->pollinterval) { 802fcd0: 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; 802fcd2: 77e3 strb r3, [r4, #31] if (prev->polltmr >= prev->pollinterval) { 802fcd4: d813 bhi.n 802fcfe prev->polltmr = 0; LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n")); tcp_active_pcbs_changed = 0; TCP_EVENT_POLL(prev, err); 802fcd6: 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; 802fcda: 77e5 strb r5, [r4, #31] LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n")); tcp_active_pcbs_changed = 0; 802fcdc: f888 5000 strb.w r5, [r8] TCP_EVENT_POLL(prev, err); 802fce0: b11b cbz r3, 802fcea 802fce2: 6920 ldr r0, [r4, #16] 802fce4: 4621 mov r1, r4 802fce6: 4798 blx r3 802fce8: e000 b.n 802fcec 802fcea: 4628 mov r0, r5 if (tcp_active_pcbs_changed) { 802fcec: f899 3000 ldrb.w r3, [r9] 802fcf0: 2b00 cmp r3, #0 802fcf2: f47f af00 bne.w 802faf6 goto tcp_slowtmr_start; } /* if err == ERR_ABRT, 'prev' is already deallocated */ if (err == ERR_OK) { 802fcf6: b910 cbnz r0, 802fcfe tcp_output(prev); 802fcf8: 4620 mov r0, r4 802fcfa: f001 fc39 bl 8031570 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) { 802fcfe: 4626 mov r6, r4 prev = pcb; pcb = pcb->next; /* We check if we should poll the connection. */ ++prev->polltmr; if (prev->polltmr >= prev->pollinterval) { 802fd00: 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) { 802fd02: 2c00 cmp r4, #0 802fd04: f47f aefd bne.w 802fb02 } /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; 802fd08: 4b17 ldr r3, [pc, #92] ; (802fd68 ) 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) { 802fd0a: 4e11 ldr r6, [pc, #68] ; (802fd50 ) } /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; 802fd0c: 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; 802fd0e: 461f mov r7, r3 /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; while (pcb != NULL) { 802fd10: e00f b.n 802fd32 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) { 802fd12: 6832 ldr r2, [r6, #0] 802fd14: 6a6b ldr r3, [r5, #36] ; 0x24 802fd16: 1ad3 subs r3, r2, r3 802fd18: 2bf0 cmp r3, #240 ; 0xf0 802fd1a: d810 bhi.n 802fd3e 802fd1c: e00c b.n 802fd38 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; 802fd1e: 60e2 str r2, [r4, #12] 802fd20: e000 b.n 802fd24 } else { /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb); tcp_tw_pcbs = pcb->next; 802fd22: 603a str r2, [r7, #0] } pcb2 = pcb; pcb = pcb->next; memp_free(MEMP_TCP_PCB, pcb2); 802fd24: 4629 mov r1, r5 802fd26: 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; 802fd28: f8d5 800c ldr.w r8, [r5, #12] memp_free(MEMP_TCP_PCB, pcb2); 802fd2c: f7ff fada bl 802f2e4 /* 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; 802fd30: 4645 mov r5, r8 /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; while (pcb != NULL) { 802fd32: 2d00 cmp r5, #0 802fd34: d1ed bne.n 802fd12 802fd36: e009 b.n 802fd4c pcb2 = pcb; pcb = pcb->next; memp_free(MEMP_TCP_PCB, pcb2); } else { prev = pcb; pcb = pcb->next; 802fd38: 462c mov r4, r5 802fd3a: 68ed ldr r5, [r5, #12] 802fd3c: e7f9 b.n 802fd32 /* If the PCB should be removed, do it. */ if (pcb_remove) { struct tcp_pcb *pcb2; tcp_pcb_purge(pcb); 802fd3e: 4628 mov r0, r5 802fd40: f7ff feae bl 802faa0 802fd44: 68ea ldr r2, [r5, #12] /* Remove PCB from tcp_tw_pcbs list. */ if (prev != NULL) { 802fd46: 2c00 cmp r4, #0 802fd48: d1e9 bne.n 802fd1e 802fd4a: e7ea b.n 802fd22 } else { prev = pcb; pcb = pcb->next; } } } 802fd4c: e8bd 8ffe ldmia.w sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 802fd50: 2000f6b0 .word 0x2000f6b0 802fd54: 2000c3e1 .word 0x2000c3e1 802fd58: 2000f6ac .word 0x2000f6ac 802fd5c: 08043fd9 .word 0x08043fd9 802fd60: 08043fcc .word 0x08043fcc 802fd64: 000124f8 .word 0x000124f8 802fd68: 2000f6c0 .word 0x2000f6c0 802fd6c: 2000f6a8 .word 0x2000f6a8 0802fd70 : * @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); 802fd70: 6803 ldr r3, [r0, #0] 802fd72: 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) { 802fd74: b510 push {r4, lr} 802fd76: 460c mov r4, r1 TCP_RMV(pcblist, pcb); 802fd78: d102 bne.n 802fd80 802fd7a: 68cb ldr r3, [r1, #12] 802fd7c: 6003 str r3, [r0, #0] 802fd7e: e00d b.n 802fd9c 802fd80: 4a11 ldr r2, [pc, #68] ; (802fdc8 ) 802fd82: 6013 str r3, [r2, #0] 802fd84: e007 b.n 802fd96 802fd86: 68d9 ldr r1, [r3, #12] 802fd88: 42a1 cmp r1, r4 802fd8a: d103 bne.n 802fd94 802fd8c: 6013 str r3, [r2, #0] 802fd8e: 68e2 ldr r2, [r4, #12] 802fd90: 60da str r2, [r3, #12] 802fd92: e003 b.n 802fd9c 802fd94: 460b mov r3, r1 802fd96: 2b00 cmp r3, #0 802fd98: d1f5 bne.n 802fd86 802fd9a: 6013 str r3, [r2, #0] 802fd9c: 2300 movs r3, #0 802fd9e: 60e3 str r3, [r4, #12] tcp_pcb_purge(pcb); 802fda0: 4620 mov r0, r4 802fda2: f7ff fe7d bl 802faa0 /* if there is an outstanding delayed ACKs, send it */ if (pcb->state != TIME_WAIT && 802fda6: 7e23 ldrb r3, [r4, #24] 802fda8: 2b0a cmp r3, #10 802fdaa: d00a beq.n 802fdc2 802fdac: 2b01 cmp r3, #1 802fdae: d008 beq.n 802fdc2 pcb->state != LISTEN && pcb->flags & TF_ACK_DELAY) { 802fdb0: 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 && 802fdb2: 07da lsls r2, r3, #31 802fdb4: d505 bpl.n 802fdc2 pcb->flags & TF_ACK_DELAY) { pcb->flags |= TF_ACK_NOW; 802fdb6: f043 0302 orr.w r3, r3, #2 802fdba: 77a3 strb r3, [r4, #30] tcp_output(pcb); 802fdbc: 4620 mov r0, r4 802fdbe: f001 fbd7 bl 8031570 #if TCP_QUEUE_OOSEQ LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL); #endif /* TCP_QUEUE_OOSEQ */ } pcb->state = CLOSED; 802fdc2: 2300 movs r3, #0 802fdc4: 7623 strb r3, [r4, #24] 802fdc6: bd10 pop {r4, pc} 802fdc8: 2000f6b8 .word 0x2000f6b8 0802fdcc : 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) { 802fdcc: 7e03 ldrb r3, [r0, #24] 802fdce: 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) { 802fdd0: e92d 43f7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, lr} 802fdd4: 4604 mov r4, r0 802fdd6: 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) { 802fdd8: d10a bne.n 802fdf0 tcp_pcb_remove(&tcp_tw_pcbs, pcb); 802fdda: 4621 mov r1, r4 802fddc: 481b ldr r0, [pc, #108] ; (802fe4c ) 802fdde: f7ff ffc7 bl 802fd70 memp_free(MEMP_TCP_PCB, pcb); 802fde2: 2002 movs r0, #2 802fde4: 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); } } 802fde6: b003 add sp, #12 802fde8: 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); 802fdec: f7ff ba7a b.w 802f2e4 } else { seqno = pcb->snd_nxt; 802fdf0: f8d0 8050 ldr.w r8, [r0, #80] ; 0x50 ackno = pcb->rcv_nxt; 802fdf4: 6a87 ldr r7, [r0, #40] ; 0x28 #if LWIP_CALLBACK_API errf = pcb->errf; 802fdf6: f8d0 5088 ldr.w r5, [r0, #136] ; 0x88 #endif /* LWIP_CALLBACK_API */ errf_arg = pcb->callback_arg; 802fdfa: 6906 ldr r6, [r0, #16] TCP_PCB_REMOVE_ACTIVE(pcb); 802fdfc: 4814 ldr r0, [pc, #80] ; (802fe50 ) 802fdfe: 4621 mov r1, r4 802fe00: f7ff ffb6 bl 802fd70 802fe04: 4b13 ldr r3, [pc, #76] ; (802fe54 ) if (pcb->unacked != NULL) { 802fe06: 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); 802fe08: 2201 movs r2, #1 802fe0a: 701a strb r2, [r3, #0] if (pcb->unacked != NULL) { 802fe0c: b108 cbz r0, 802fe12 tcp_segs_free(pcb->unacked); 802fe0e: f7ff fe2e bl 802fa6e } if (pcb->unsent != NULL) { 802fe12: 6ee0 ldr r0, [r4, #108] ; 0x6c 802fe14: b108 cbz r0, 802fe1a tcp_segs_free(pcb->unsent); 802fe16: f7ff fe2a bl 802fa6e #if TCP_QUEUE_OOSEQ if (pcb->ooseq != NULL) { tcp_segs_free(pcb->ooseq); } #endif /* TCP_QUEUE_OOSEQ */ if (reset) { 802fe1a: f1b9 0f00 cmp.w r9, #0 802fe1e: d009 beq.n 802fe34 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); 802fe20: 8b63 ldrh r3, [r4, #26] 802fe22: 9300 str r3, [sp, #0] 802fe24: 8ba3 ldrh r3, [r4, #28] 802fe26: 4640 mov r0, r8 802fe28: 9301 str r3, [sp, #4] 802fe2a: 4639 mov r1, r7 802fe2c: 4622 mov r2, r4 802fe2e: 1d23 adds r3, r4, #4 802fe30: f001 fcc2 bl 80317b8 } memp_free(MEMP_TCP_PCB, pcb); 802fe34: 2002 movs r0, #2 802fe36: 4621 mov r1, r4 802fe38: f7ff fa54 bl 802f2e4 TCP_EVENT_ERR(errf, errf_arg, ERR_ABRT); 802fe3c: b11d cbz r5, 802fe46 802fe3e: 4630 mov r0, r6 802fe40: f06f 0109 mvn.w r1, #9 802fe44: 47a8 blx r5 } } 802fe46: b003 add sp, #12 802fe48: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 802fe4c: 2000f6c0 .word 0x2000f6c0 802fe50: 2000f6ac .word 0x2000f6ac 802fe54: 2000f6a8 .word 0x2000f6a8 0802fe58 : * @param pcb the tcp pcb to abort */ void tcp_abort(struct tcp_pcb *pcb) { tcp_abandon(pcb, 1); 802fe58: 2101 movs r1, #1 802fe5a: f7ff bfb7 b.w 802fdcc 802fe5e: 0000 movs r0, r0 0802fe60 : * @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) { 802fe60: b537 push {r0, r1, r2, r4, r5, lr} 802fe62: 4604 mov r4, r0 err_t err; if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { 802fe64: 2900 cmp r1, #0 802fe66: d043 beq.n 802fef0 802fe68: 7e03 ldrb r3, [r0, #24] 802fe6a: 2b04 cmp r3, #4 802fe6c: d001 beq.n 802fe72 802fe6e: 2b07 cmp r3, #7 802fe70: d13e bne.n 802fef0 if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND)) { 802fe72: 6f63 ldr r3, [r4, #116] ; 0x74 802fe74: b923 cbnz r3, 802fe80 802fe76: 8da2 ldrh r2, [r4, #44] ; 0x2c 802fe78: f241 63d0 movw r3, #5840 ; 0x16d0 802fe7c: 429a cmp r2, r3 802fe7e: d037 beq.n 802fef0 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, 802fe80: 8b63 ldrh r3, [r4, #26] 802fe82: 6d20 ldr r0, [r4, #80] ; 0x50 802fe84: 9300 str r3, [sp, #0] 802fe86: 8ba3 ldrh r3, [r4, #28] 802fe88: 6aa1 ldr r1, [r4, #40] ; 0x28 802fe8a: 9301 str r3, [sp, #4] 802fe8c: 4622 mov r2, r4 802fe8e: 1d23 adds r3, r4, #4 802fe90: f001 fc92 bl 80317b8 pcb->local_port, pcb->remote_port); tcp_pcb_purge(pcb); 802fe94: 4620 mov r0, r4 802fe96: f7ff fe03 bl 802faa0 TCP_RMV_ACTIVE(pcb); 802fe9a: 4a42 ldr r2, [pc, #264] ; (802ffa4 ) 802fe9c: 6813 ldr r3, [r2, #0] 802fe9e: 42a3 cmp r3, r4 802fea0: d101 bne.n 802fea6 802fea2: 68e3 ldr r3, [r4, #12] 802fea4: e00c b.n 802fec0 802fea6: 4a40 ldr r2, [pc, #256] ; (802ffa8 ) 802fea8: 6013 str r3, [r2, #0] 802feaa: e007 b.n 802febc 802feac: 68d9 ldr r1, [r3, #12] 802feae: 42a1 cmp r1, r4 802feb0: d103 bne.n 802feba 802feb2: 6013 str r3, [r2, #0] 802feb4: 68e2 ldr r2, [r4, #12] 802feb6: 60da str r2, [r3, #12] 802feb8: e003 b.n 802fec2 802feba: 460b mov r3, r1 802febc: 2b00 cmp r3, #0 802febe: d1f5 bne.n 802feac 802fec0: 6013 str r3, [r2, #0] 802fec2: 4b3a ldr r3, [pc, #232] ; (802ffac ) 802fec4: 2201 movs r2, #1 802fec6: 701a strb r2, [r3, #0] if (pcb->state == ESTABLISHED) { 802fec8: 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); 802feca: 2500 movs r5, #0 if (pcb->state == ESTABLISHED) { 802fecc: 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); 802fece: 60e5 str r5, [r4, #12] if (pcb->state == ESTABLISHED) { 802fed0: d108 bne.n 802fee4 /* move to TIME_WAIT since we close actively */ pcb->state = TIME_WAIT; 802fed2: 230a movs r3, #10 802fed4: 7623 strb r3, [r4, #24] TCP_REG(&tcp_tw_pcbs, pcb); 802fed6: 4b36 ldr r3, [pc, #216] ; (802ffb0 ) 802fed8: 681a ldr r2, [r3, #0] 802feda: 601c str r4, [r3, #0] 802fedc: 60e2 str r2, [r4, #12] 802fede: f001 fe05 bl 8031aec 802fee2: e003 b.n 802feec } else { /* CLOSE_WAIT: deallocate the pcb since we already sent a RST for it */ memp_free(MEMP_TCP_PCB, pcb); 802fee4: 2002 movs r0, #2 802fee6: 4621 mov r1, r4 802fee8: f7ff f9fc bl 802f2e4 } return ERR_OK; 802feec: 4628 mov r0, r5 802feee: e051 b.n 802ff94 } } switch (pcb->state) { 802fef0: 7e23 ldrb r3, [r4, #24] 802fef2: 2b07 cmp r3, #7 802fef4: d853 bhi.n 802ff9e 802fef6: e8df f003 tbb [pc, r3] 802fefa: 1e04 .short 0x1e04 802fefc: 523c3527 .word 0x523c3527 802ff00: 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) { 802ff02: 8b63 ldrh r3, [r4, #26] 802ff04: b1ab cbz r3, 802ff32 TCP_RMV(&tcp_bound_pcbs, pcb); 802ff06: 4a2b ldr r2, [pc, #172] ; (802ffb4 ) 802ff08: 6813 ldr r3, [r2, #0] 802ff0a: 42a3 cmp r3, r4 802ff0c: d101 bne.n 802ff12 802ff0e: 68e3 ldr r3, [r4, #12] 802ff10: e00c b.n 802ff2c 802ff12: 4a25 ldr r2, [pc, #148] ; (802ffa8 ) 802ff14: 6013 str r3, [r2, #0] 802ff16: e007 b.n 802ff28 802ff18: 68d9 ldr r1, [r3, #12] 802ff1a: 42a1 cmp r1, r4 802ff1c: d103 bne.n 802ff26 802ff1e: 6013 str r3, [r2, #0] 802ff20: 68e2 ldr r2, [r4, #12] 802ff22: 60da str r2, [r3, #12] 802ff24: e003 b.n 802ff2e 802ff26: 460b mov r3, r1 802ff28: 2b00 cmp r3, #0 802ff2a: d1f5 bne.n 802ff18 802ff2c: 6013 str r3, [r2, #0] 802ff2e: 2300 movs r3, #0 802ff30: 60e3 str r3, [r4, #12] } memp_free(MEMP_TCP_PCB, pcb); 802ff32: 2002 movs r0, #2 802ff34: e004 b.n 802ff40 pcb = NULL; break; case LISTEN: err = ERR_OK; tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb); 802ff36: 4820 ldr r0, [pc, #128] ; (802ffb8 ) 802ff38: 4621 mov r1, r4 802ff3a: f7ff ff19 bl 802fd70 memp_free(MEMP_TCP_PCB_LISTEN, pcb); 802ff3e: 2003 movs r0, #3 802ff40: 4621 mov r1, r4 802ff42: f7ff f9cf bl 802f2e4 pcb = NULL; break; 802ff46: e02a b.n 802ff9e case SYN_SENT: err = ERR_OK; TCP_PCB_REMOVE_ACTIVE(pcb); 802ff48: 4621 mov r1, r4 802ff4a: 4816 ldr r0, [pc, #88] ; (802ffa4 ) 802ff4c: f7ff ff10 bl 802fd70 802ff50: 4b16 ldr r3, [pc, #88] ; (802ffac ) 802ff52: 2201 movs r2, #1 memp_free(MEMP_TCP_PCB, pcb); 802ff54: 2002 movs r0, #2 802ff56: 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); 802ff58: 701a strb r2, [r3, #0] memp_free(MEMP_TCP_PCB, pcb); 802ff5a: f7ff f9c3 bl 802f2e4 pcb = NULL; snmp_inc_tcpattemptfails(); 802ff5e: f004 f8af bl 80340c0 break; 802ff62: e01c b.n 802ff9e case SYN_RCVD: err = tcp_send_fin(pcb); 802ff64: 4620 mov r0, r4 802ff66: f001 fabe bl 80314e6 if (err == ERR_OK) { 802ff6a: b998 cbnz r0, 802ff94 snmp_inc_tcpattemptfails(); 802ff6c: f004 f8a8 bl 80340c0 802ff70: e005 b.n 802ff7e pcb->state = FIN_WAIT_1; } break; case ESTABLISHED: err = tcp_send_fin(pcb); 802ff72: 4620 mov r0, r4 802ff74: f001 fab7 bl 80314e6 if (err == ERR_OK) { 802ff78: b960 cbnz r0, 802ff94 snmp_inc_tcpestabresets(); 802ff7a: f004 f8a9 bl 80340d0 pcb->state = FIN_WAIT_1; 802ff7e: 2305 movs r3, #5 802ff80: e006 b.n 802ff90 } break; case CLOSE_WAIT: err = tcp_send_fin(pcb); 802ff82: 4620 mov r0, r4 802ff84: f001 faaf bl 80314e6 if (err == ERR_OK) { 802ff88: b920 cbnz r0, 802ff94 snmp_inc_tcpestabresets(); 802ff8a: f004 f8a1 bl 80340d0 pcb->state = LAST_ACK; 802ff8e: 2309 movs r3, #9 802ff90: 7623 strb r3, [r4, #24] 802ff92: e001 b.n 802ff98 802ff94: b240 sxtb r0, r0 802ff96: e004 b.n 802ffa2 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); 802ff98: 4620 mov r0, r4 802ff9a: f001 fae9 bl 8031570 802ff9e: 2000 movs r0, #0 802ffa0: e7f8 b.n 802ff94 } return err; } 802ffa2: bd3e pop {r1, r2, r3, r4, r5, pc} 802ffa4: 2000f6ac .word 0x2000f6ac 802ffa8: 2000f6b8 .word 0x2000f6b8 802ffac: 2000f6a8 .word 0x2000f6a8 802ffb0: 2000f6c0 .word 0x2000f6c0 802ffb4: 2000f6bc .word 0x2000f6bc 802ffb8: 2000f6b4 .word 0x2000f6b4 0802ffbc : #if TCP_DEBUG LWIP_DEBUGF(TCP_DEBUG, ("tcp_close: closing in ")); tcp_debug_print_state(pcb->state); #endif /* TCP_DEBUG */ if (pcb->state != LISTEN) { 802ffbc: 7e03 ldrb r3, [r0, #24] 802ffbe: 2b01 cmp r3, #1 802ffc0: d003 beq.n 802ffca /* Set a flag not to receive any more data... */ pcb->flags |= TF_RXCLOSED; 802ffc2: 7f83 ldrb r3, [r0, #30] 802ffc4: f043 0310 orr.w r3, r3, #16 802ffc8: 7783 strb r3, [r0, #30] } /* ... and close */ return tcp_close_shutdown(pcb, 1); 802ffca: 2101 movs r1, #1 802ffcc: f7ff bf48 b.w 802fe60 0802ffd0 : * 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) { 802ffd0: b510 push {r4, lr} 802ffd2: 4608 mov r0, r1 LWIP_UNUSED_ARG(arg); if (p != NULL) { 802ffd4: 4614 mov r4, r2 802ffd6: b132 cbz r2, 802ffe6 tcp_recved(pcb, p->tot_len); 802ffd8: 8911 ldrh r1, [r2, #8] 802ffda: f7ff fd1f bl 802fa1c pbuf_free(p); 802ffde: 4620 mov r0, r4 802ffe0: f7ff fa8a bl 802f4f8 802ffe4: e004 b.n 802fff0 } else if (err == ERR_OK) { 802ffe6: b91b cbnz r3, 802fff0 return tcp_close(pcb); } return ERR_OK; } 802ffe8: 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); 802ffec: f7ff bfe6 b.w 802ffbc } return ERR_OK; } 802fff0: 2000 movs r0, #0 802fff2: bd10 pop {r4, pc} 0802fff4 : } /** Pass pcb->refused_data to the recv callback */ err_t tcp_process_refused_data(struct tcp_pcb *pcb) { 802fff4: b5f8 push {r3, r4, r5, r6, r7, lr} err_t err; u8_t refused_flags = pcb->refused_data->flags; 802fff6: 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); 802fff8: 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; 802fffa: 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; 802fffc: 2300 movs r3, #0 } /** Pass pcb->refused_data to the recv callback */ err_t tcp_process_refused_data(struct tcp_pcb *pcb) { 802fffe: 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; 8030000: 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); 8030002: b126 cbz r6, 803000e 8030004: 4621 mov r1, r4 8030006: 462a mov r2, r5 8030008: 6900 ldr r0, [r0, #16] 803000a: 47b0 blx r6 803000c: e005 b.n 803001a 803000e: 4630 mov r0, r6 8030010: 4621 mov r1, r4 8030012: 462a mov r2, r5 8030014: 4633 mov r3, r6 8030016: f7ff ffdb bl 802ffd0 if (err == ERR_OK) { 803001a: b9b0 cbnz r0, 803004a /* did refused_data include a FIN? */ if (refused_flags & PBUF_FLAG_TCP_FIN) { 803001c: f007 0720 and.w r7, r7, #32 8030020: b2ff uxtb r7, r7 8030022: b1bf cbz r7, 8030054 /* correct rcv_wnd as the application won't call tcp_recved() for the FIN's seqno */ if (pcb->rcv_wnd != TCP_WND) { 8030024: 8da3 ldrh r3, [r4, #44] ; 0x2c 8030026: f241 62d0 movw r2, #5840 ; 0x16d0 803002a: 4293 cmp r3, r2 803002c: d001 beq.n 8030032 pcb->rcv_wnd++; 803002e: 3301 adds r3, #1 8030030: 85a3 strh r3, [r4, #44] ; 0x2c } TCP_EVENT_CLOSED(pcb, err); 8030032: 6fe5 ldr r5, [r4, #124] ; 0x7c 8030034: b905 cbnz r5, 8030038 8030036: e00c b.n 8030052 8030038: 2200 movs r2, #0 803003a: 6920 ldr r0, [r4, #16] 803003c: 4621 mov r1, r4 803003e: 4613 mov r3, r2 8030040: 47a8 blx r5 if (err == ERR_ABRT) { 8030042: 300a adds r0, #10 8030044: d105 bne.n 8030052 return ERR_ABRT; 8030046: 20f6 movs r0, #246 ; 0xf6 8030048: e004 b.n 8030054 } } } else if (err == ERR_ABRT) { 803004a: b240 sxtb r0, r0 803004c: 300a adds r0, #10 803004e: d0fa beq.n 8030046 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; 8030050: 6765 str r5, [r4, #116] ; 0x74 } return ERR_OK; 8030052: 2000 movs r0, #0 } 8030054: b240 sxtb r0, r0 8030056: bdf8 pop {r3, r4, r5, r6, r7, pc} 08030058 : * * Automatically called from tcp_tmr(). */ void tcp_fasttmr(void) { 8030058: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} struct tcp_pcb *pcb; ++tcp_timer_ctr; 803005c: 4b18 ldr r3, [pc, #96] ; (80300c0 ) tcp_fasttmr_start: pcb = tcp_active_pcbs; 803005e: 4f19 ldr r7, [pc, #100] ; (80300c4 ) void tcp_fasttmr(void) { struct tcp_pcb *pcb; ++tcp_timer_ctr; 8030060: 781a ldrb r2, [r3, #0] 8030062: 3201 adds r2, #1 8030064: 701a strb r2, [r3, #0] tcp_fasttmr_start: pcb = tcp_active_pcbs; while(pcb != NULL) { if (pcb->last_timer != tcp_timer_ctr) { 8030066: 4698 mov r8, r3 struct tcp_pcb *pcb; ++tcp_timer_ctr; tcp_fasttmr_start: pcb = tcp_active_pcbs; 8030068: 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; 803006a: 4d17 ldr r5, [pc, #92] ; (80300c8 ) 803006c: 2600 movs r6, #0 ++tcp_timer_ctr; tcp_fasttmr_start: pcb = tcp_active_pcbs; while(pcb != NULL) { 803006e: e022 b.n 80300b6 if (pcb->last_timer != tcp_timer_ctr) { 8030070: f898 2000 ldrb.w r2, [r8] 8030074: f894 3021 ldrb.w r3, [r4, #33] ; 0x21 8030078: 4293 cmp r3, r2 803007a: d020 beq.n 80300be struct tcp_pcb *next; pcb->last_timer = tcp_timer_ctr; 803007c: f884 2021 strb.w r2, [r4, #33] ; 0x21 /* send delayed ACKs */ if (pcb->flags & TF_ACK_DELAY) { 8030080: 7fa2 ldrb r2, [r4, #30] 8030082: 07d1 lsls r1, r2, #31 8030084: d509 bpl.n 803009a LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n")); tcp_ack_now(pcb); 8030086: f042 0202 orr.w r2, r2, #2 803008a: 77a2 strb r2, [r4, #30] tcp_output(pcb); 803008c: 4620 mov r0, r4 803008e: f001 fa6f bl 8031570 pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); 8030092: 7fa3 ldrb r3, [r4, #30] 8030094: f023 0303 bic.w r3, r3, #3 8030098: 77a3 strb r3, [r4, #30] } next = pcb->next; /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 803009a: 6f63 ldr r3, [r4, #116] ; 0x74 tcp_ack_now(pcb); tcp_output(pcb); pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); } next = pcb->next; 803009c: f8d4 900c ldr.w r9, [r4, #12] /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 80300a0: b90b cbnz r3, 80300a6 80300a2: 464c mov r4, r9 80300a4: e007 b.n 80300b6 tcp_active_pcbs_changed = 0; tcp_process_refused_data(pcb); 80300a6: 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; 80300a8: 702e strb r6, [r5, #0] tcp_process_refused_data(pcb); 80300aa: f7ff ffa3 bl 802fff4 if (tcp_active_pcbs_changed) { 80300ae: 782b ldrb r3, [r5, #0] 80300b0: 2b00 cmp r3, #0 80300b2: d1d9 bne.n 8030068 80300b4: e7f5 b.n 80300a2 ++tcp_timer_ctr; tcp_fasttmr_start: pcb = tcp_active_pcbs; while(pcb != NULL) { 80300b6: 2c00 cmp r4, #0 80300b8: d1da bne.n 8030070 80300ba: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 80300be: e7fe b.n 80300be 80300c0: 2000c3e1 .word 0x2000c3e1 80300c4: 2000f6ac .word 0x2000f6ac 80300c8: 2000f6a8 .word 0x2000f6a8 080300cc : /** * Called periodically to dispatch TCP timers. */ void tcp_tmr(void) { 80300cc: b508 push {r3, lr} /* Call tcp_fasttmr() every 250 ms */ tcp_fasttmr(); 80300ce: f7ff ffc3 bl 8030058 if (++tcp_timer & 1) { 80300d2: 4a06 ldr r2, [pc, #24] ; (80300ec ) 80300d4: 7813 ldrb r3, [r2, #0] 80300d6: 3301 adds r3, #1 80300d8: b2db uxtb r3, r3 80300da: 07d8 lsls r0, r3, #31 80300dc: 7013 strb r3, [r2, #0] 80300de: d503 bpl.n 80300e8 /* Call tcp_tmr() every 500 ms, i.e., every other timer tcp_tmr() is called. */ tcp_slowtmr(); } } 80300e0: 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(); 80300e4: f7ff bcfa b.w 802fadc 80300e8: bd08 pop {r3, pc} 80300ea: bf00 nop 80300ec: 2000c3e0 .word 0x2000c3e0 080300f0 : u32_t tcp_next_iss(void) { static u32_t iss = 6510; iss += tcp_ticks; /* XXX */ 80300f0: 4b03 ldr r3, [pc, #12] ; (8030100 ) 80300f2: 4a04 ldr r2, [pc, #16] ; (8030104 ) 80300f4: 6810 ldr r0, [r2, #0] 80300f6: 681a ldr r2, [r3, #0] 80300f8: 1880 adds r0, r0, r2 80300fa: 6018 str r0, [r3, #0] return iss; } 80300fc: 4770 bx lr 80300fe: bf00 nop 8030100: 20000718 .word 0x20000718 8030104: 2000f6b0 .word 0x2000f6b0 08030108 : * @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) { 8030108: b5f8 push {r3, r4, r5, r6, r7, lr} 803010a: 4605 mov r5, r0 struct tcp_pcb *pcb; u32_t iss; pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 803010c: 2002 movs r0, #2 803010e: f7ff f8d3 bl 802f2b8 if (pcb == NULL) { 8030112: 4604 mov r4, r0 8030114: 2800 cmp r0, #0 8030116: d136 bne.n 8030186 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) { 8030118: 4b39 ldr r3, [pc, #228] ; (8030200 ) if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 803011a: 4a3a ldr r2, [pc, #232] ; (8030204 ) 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) { 803011c: 681b ldr r3, [r3, #0] if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 803011e: 6811 ldr r1, [r2, #0] 8030120: e007 b.n 8030132 8030122: 6a5a ldr r2, [r3, #36] ; 0x24 8030124: 1a8a subs r2, r1, r2 8030126: 42a2 cmp r2, r4 8030128: bf34 ite cc 803012a: 4622 movcc r2, r4 803012c: 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) { 803012e: 68db ldr r3, [r3, #12] 8030130: 4614 mov r4, r2 8030132: 2b00 cmp r3, #0 8030134: d1f5 bne.n 8030122 if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { inactivity = tcp_ticks - pcb->tmr; inactive = pcb; } } if (inactive != NULL) { 8030136: b108 cbz r0, 803013c LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_timewait: killing oldest TIME-WAIT PCB %p (%"S32_F")\n", (void *)inactive, inactivity)); tcp_abort(inactive); 8030138: f7ff fe8e bl 802fe58 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); 803013c: 2002 movs r0, #2 803013e: f7ff f8bb bl 802f2b8 if (pcb == NULL) { 8030142: 4604 mov r4, r0 8030144: b9f8 cbnz r0, 8030186 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) { 8030146: 4a2f ldr r2, [pc, #188] ; (8030204 ) 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) { 8030148: 4b2f ldr r3, [pc, #188] ; (8030208 ) if (pcb->prio <= prio && pcb->prio <= mprio && (u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 803014a: 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) { 803014c: 681b ldr r3, [r3, #0] struct tcp_pcb *pcb, *inactive; u32_t inactivity; u8_t mprio; mprio = TCP_PRIO_MAX; 803014e: 207f movs r0, #127 ; 0x7f /* We kill the oldest active connection that has lower priority than prio. */ inactivity = 0; inactive = NULL; 8030150: 4622 mov r2, r4 8030152: e00c b.n 803016e for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { if (pcb->prio <= prio && 8030154: 7e59 ldrb r1, [r3, #25] 8030156: 42a9 cmp r1, r5 8030158: d808 bhi.n 803016c 803015a: 4281 cmp r1, r0 803015c: d806 bhi.n 803016c pcb->prio <= mprio && (u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 803015e: 6a5e ldr r6, [r3, #36] ; 0x24 8030160: 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 && 8030162: 42a6 cmp r6, r4 8030164: d302 bcc.n 803016c 8030166: 4608 mov r0, r1 8030168: 4634 mov r4, r6 803016a: 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) { 803016c: 68db ldr r3, [r3, #12] 803016e: 2b00 cmp r3, #0 8030170: d1f0 bne.n 8030154 inactivity = tcp_ticks - pcb->tmr; inactive = pcb; mprio = pcb->prio; } } if (inactive != NULL) { 8030172: b112 cbz r2, 803017a LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB %p (%"S32_F")\n", (void *)inactive, inactivity)); tcp_abort(inactive); 8030174: 4610 mov r0, r2 8030176: f7ff fe6f bl 802fe58 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); 803017a: 2002 movs r0, #2 803017c: f7ff f89c bl 802f2b8 if (pcb != NULL) { /* adjust err stats: timewait PCB was freed above */ MEMP_STATS_DEC(err, MEMP_TCP_PCB); } } if (pcb != NULL) { 8030180: 4604 mov r4, r0 8030182: 2800 cmp r0, #0 8030184: d039 beq.n 80301fa memset(pcb, 0, sizeof(struct tcp_pcb)); 8030186: 2100 movs r1, #0 8030188: 2294 movs r2, #148 ; 0x94 803018a: 4620 mov r0, r4 803018c: f7f1 fe08 bl 8021da0 pcb->prio = prio; pcb->snd_buf = TCP_SND_BUF; pcb->snd_queuelen = 0; pcb->rcv_wnd = TCP_WND; 8030190: 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; 8030194: f246 63a8 movw r3, #26280 ; 0x66a8 8030198: f8a4 3066 strh.w r3, [r4, #102] ; 0x66 pcb->snd_queuelen = 0; pcb->rcv_wnd = TCP_WND; 803019c: 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; 803019e: 2300 movs r3, #0 pcb->rcv_wnd = TCP_WND; pcb->rcv_ann_wnd = TCP_WND; 80301a0: 85e2 strh r2, [r4, #46] ; 0x2e pcb->tos = 0; pcb->ttl = TCP_TTL; 80301a2: 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; 80301a4: 7665 strb r5, [r4, #25] pcb->snd_buf = TCP_SND_BUF; pcb->snd_queuelen = 0; 80301a6: f8a4 3068 strh.w r3, [r4, #104] ; 0x68 80301aa: 461d mov r5, r3 pcb->rcv_wnd = TCP_WND; pcb->rcv_ann_wnd = TCP_WND; pcb->tos = 0; 80301ac: 7263 strb r3, [r4, #9] pcb->ttl = TCP_TTL; 80301ae: 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; 80301b0: 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; 80301b4: 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; 80301b8: 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; 80301bc: 86e2 strh r2, [r4, #54] ; 0x36 pcb->rto = 3000 / TCP_SLOW_INTERVAL; pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; 80301be: 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; 80301c0: 2206 movs r2, #6 pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; pcb->cwnd = 1; 80301c2: 2301 movs r3, #1 80301c4: 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; 80301c8: f8a4 2044 strh.w r2, [r4, #68] ; 0x44 pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; 80301cc: f8a4 2042 strh.w r2, [r4, #66] ; 0x42 pcb->rtime = -1; pcb->cwnd = 1; iss = tcp_next_iss(); 80301d0: f7ff ff8e bl 80300f0 pcb->snd_wl2 = iss; pcb->snd_nxt = iss; pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; 80301d4: 4b0b ldr r3, [pc, #44] ; (8030204 ) pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; pcb->cwnd = 1; iss = tcp_next_iss(); pcb->snd_wl2 = iss; 80301d6: 65a0 str r0, [r4, #88] ; 0x58 pcb->snd_nxt = iss; pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; 80301d8: 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; 80301da: 6520 str r0, [r4, #80] ; 0x50 pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; 80301dc: 6263 str r3, [r4, #36] ; 0x24 pcb->last_timer = tcp_timer_ctr; 80301de: 4b0b ldr r3, [pc, #44] ; (803020c ) pcb->rtime = -1; pcb->cwnd = 1; iss = tcp_next_iss(); pcb->snd_wl2 = iss; pcb->snd_nxt = iss; pcb->lastack = iss; 80301e0: 64a0 str r0, [r4, #72] ; 0x48 pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; pcb->last_timer = tcp_timer_ctr; 80301e2: 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; 80301e4: 65e0 str r0, [r4, #92] ; 0x5c pcb->tmr = tcp_ticks; pcb->last_timer = tcp_timer_ctr; 80301e6: f884 3021 strb.w r3, [r4, #33] ; 0x21 pcb->polltmr = 0; #if LWIP_CALLBACK_API pcb->recv = tcp_recv_null; 80301ea: 4b09 ldr r3, [pc, #36] ; (8030210 ) pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; pcb->last_timer = tcp_timer_ctr; pcb->polltmr = 0; 80301ec: 77e5 strb r5, [r4, #31] #if LWIP_CALLBACK_API pcb->recv = tcp_recv_null; 80301ee: 67e3 str r3, [r4, #124] ; 0x7c #endif /* LWIP_CALLBACK_API */ /* Init KEEPALIVE timer */ pcb->keep_idle = TCP_KEEPIDLE_DEFAULT; 80301f0: 4b08 ldr r3, [pc, #32] ; (8030214 ) #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; 80301f2: 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; 80301f6: f8c4 308c str.w r3, [r4, #140] ; 0x8c #endif /* LWIP_TCP_KEEPALIVE */ pcb->keep_cnt_sent = 0; } return pcb; } 80301fa: 4620 mov r0, r4 80301fc: bdf8 pop {r3, r4, r5, r6, r7, pc} 80301fe: bf00 nop 8030200: 2000f6c0 .word 0x2000f6c0 8030204: 2000f6b0 .word 0x2000f6b0 8030208: 2000f6ac .word 0x2000f6ac 803020c: 2000c3e1 .word 0x2000c3e1 8030210: 0802ffd1 .word 0x0802ffd1 8030214: 006ddd00 .word 0x006ddd00 08030218 : * @return a new tcp_pcb that initially is in state CLOSED */ struct tcp_pcb * tcp_new(void) { return tcp_alloc(TCP_PRIO_NORMAL); 8030218: 2040 movs r0, #64 ; 0x40 803021a: f7ff bf75 b.w 8030108 0803021e : * 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) { 803021e: b510 push {r4, lr} 8030220: 4604 mov r4, r0 u16_t mss_s; struct netif *outif; outif = ip_route(addr); 8030222: 4608 mov r0, r1 8030224: f002 f8f2 bl 803240c if ((outif != NULL) && (outif->mtu != 0)) { 8030228: b130 cbz r0, 8030238 803022a: 8c83 ldrh r3, [r0, #36] ; 0x24 803022c: b123 cbz r3, 8030238 mss_s = outif->mtu - IP_HLEN - TCP_HLEN; 803022e: 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); 8030230: b29b uxth r3, r3 8030232: 429c cmp r4, r3 8030234: bf28 it cs 8030236: 461c movcs r4, r3 } return sendmss; } 8030238: 4620 mov r0, r4 803023a: bd10 pop {r4, pc} 0803023c : * * @param pcb the tcp_pcb for which a segment arrived */ static void tcp_parseopt(struct tcp_pcb *pcb) { 803023c: 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; 803023e: 4d1e ldr r5, [pc, #120] ; (80302b8 ) 8030240: 682c ldr r4, [r5, #0] * * @param pcb the tcp_pcb for which a segment arrived */ static void tcp_parseopt(struct tcp_pcb *pcb) { 8030242: 4606 mov r6, r0 #endif opts = (u8_t *)tcphdr + TCP_HLEN; /* Parse the TCP MSS option, if present. */ if(TCPH_HDRLEN(tcphdr) > 0x5) { 8030244: 89a0 ldrh r0, [r4, #12] 8030246: f7fe f81e bl 802e286 803024a: f3c0 300f ubfx r0, r0, #12, #16 803024e: 2805 cmp r0, #5 8030250: d931 bls.n 80302b6 max_c = (TCPH_HDRLEN(tcphdr) - 5) << 2; 8030252: 682b ldr r3, [r5, #0] 8030254: 8998 ldrh r0, [r3, #12] 8030256: f7fe f816 bl 802e286 803025a: 0b00 lsrs r0, r0, #12 803025c: 1f41 subs r1, r0, #5 803025e: 0089 lsls r1, r1, #2 u8_t *opts, opt; #if LWIP_TCP_TIMESTAMPS u32_t tsval; #endif opts = (u8_t *)tcphdr + TCP_HLEN; 8030260: 3414 adds r4, #20 /* Parse the TCP MSS option, if present. */ if(TCPH_HDRLEN(tcphdr) > 0x5) { max_c = (TCPH_HDRLEN(tcphdr) - 5) << 2; 8030262: b289 uxth r1, r1 for (c = 0; c < max_c; ) { 8030264: 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; 8030266: f240 50b3 movw r0, #1459 ; 0x5b3 803026a: 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; ) { 803026e: e020 b.n 80302b2 opt = opts[c]; switch (opt) { 8030270: 5ce2 ldrb r2, [r4, r3] 8030272: 2a01 cmp r2, #1 8030274: d005 beq.n 8030282 8030276: d31e bcc.n 80302b6 8030278: 2a02 cmp r2, #2 803027a: eb04 0203 add.w r2, r4, r3 803027e: d114 bne.n 80302aa 8030280: e001 b.n 8030286 /* End of options. */ LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: EOL\n")); return; case 0x01: /* NOP option. */ ++c; 8030282: 3301 adds r3, #1 8030284: e014 b.n 80302b0 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) { 8030286: 7857 ldrb r7, [r2, #1] 8030288: 2f04 cmp r7, #4 803028a: d114 bne.n 80302b6 803028c: 1cdf adds r7, r3, #3 803028e: 428f cmp r7, r1 8030290: da11 bge.n 80302b6 /* 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]; 8030292: 7897 ldrb r7, [r2, #2] 8030294: 78d2 ldrb r2, [r2, #3] 8030296: 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; 803029a: 1e57 subs r7, r2, #1 803029c: b2bf uxth r7, r7 803029e: 4287 cmp r7, r0 80302a0: bf88 it hi 80302a2: 462a movhi r2, r5 80302a4: 86f2 strh r2, [r6, #54] ; 0x36 /* Advance to next option */ c += 0x04; 80302a6: 3304 adds r3, #4 80302a8: e002 b.n 80302b0 c += 0x0A; break; #endif default: LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n")); if (opts[c + 1] == 0) { 80302aa: 7852 ldrb r2, [r2, #1] 80302ac: b11a cbz r2, 80302b6 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]; 80302ae: 18d3 adds r3, r2, r3 80302b0: 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; ) { 80302b2: 428b cmp r3, r1 80302b4: d3dc bcc.n 8030270 80302b6: bdf8 pop {r3, r4, r5, r6, r7, pc} 80302b8: 2000c3e4 .word 0x2000c3e4 080302bc : * * Called from tcp_process(). */ static void tcp_receive(struct tcp_pcb *pcb) { 80302bc: 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) { 80302c0: 4ba0 ldr r3, [pc, #640] ; (8030544 ) 80302c2: 781b ldrb r3, [r3, #0] 80302c4: f003 0310 and.w r3, r3, #16 80302c8: b2db uxtb r3, r3 * * Called from tcp_process(). */ static void tcp_receive(struct tcp_pcb *pcb) { 80302ca: 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) { 80302cc: 2b00 cmp r3, #0 80302ce: f000 816b beq.w 80305a8 right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2; /* Update window. */ if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || 80302d2: 4a9d ldr r2, [pc, #628] ; (8030548 ) 80302d4: 6d43 ldr r3, [r0, #84] ; 0x54 80302d6: 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; 80302d8: f8b0 5060 ldrh.w r5, [r0, #96] ; 0x60 80302dc: 6d81 ldr r1, [r0, #88] ; 0x58 /* Update window. */ if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || 80302de: 1a98 subs r0, r3, r2 80302e0: 2800 cmp r0, #0 80302e2: db0e blt.n 8030302 80302e4: 4293 cmp r3, r2 80302e6: 4b99 ldr r3, [pc, #612] ; (803054c ) 80302e8: d103 bne.n 80302f2 (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || 80302ea: 6818 ldr r0, [r3, #0] 80302ec: 1a08 subs r0, r1, r0 80302ee: 2800 cmp r0, #0 80302f0: db07 blt.n 8030302 80302f2: 681b ldr r3, [r3, #0] 80302f4: 4299 cmp r1, r3 80302f6: d11f bne.n 8030338 (pcb->snd_wl2 == ackno && tcphdr->wnd > pcb->snd_wnd)) { 80302f8: 4b95 ldr r3, [pc, #596] ; (8030550 ) 80302fa: 681b ldr r3, [r3, #0] 80302fc: 89db ldrh r3, [r3, #14] 80302fe: 42ab cmp r3, r5 8030300: d91a bls.n 8030338 pcb->snd_wnd = tcphdr->wnd; 8030302: 4b93 ldr r3, [pc, #588] ; (8030550 ) /* keep track of the biggest window announced by the remote host to calculate the maximum segment size */ if (pcb->snd_wnd_max < tcphdr->wnd) { 8030304: 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; 8030308: 681b ldr r3, [r3, #0] 803030a: 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; 803030c: 6562 str r2, [r4, #84] ; 0x54 pcb->snd_wl2 = ackno; 803030e: 4a8f ldr r2, [pc, #572] ; (803054c ) /* 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; 8030310: 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; 8030314: 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) { 8030316: 4286 cmp r6, r0 pcb->snd_wnd_max = tcphdr->wnd; } pcb->snd_wl1 = seqno; pcb->snd_wl2 = ackno; 8030318: 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; 803031a: bf38 it cc 803031c: f8a4 0062 strhcc.w r0, [r4, #98] ; 0x62 8030320: f894 2091 ldrb.w r2, [r4, #145] ; 0x91 } pcb->snd_wl1 = seqno; pcb->snd_wl2 = ackno; if (pcb->snd_wnd == 0) { 8030324: b920 cbnz r0, 8030330 if (pcb->persist_backoff == 0) { 8030326: b93a cbnz r2, 8030338 /* start persist timer */ pcb->persist_cnt = 0; 8030328: f884 0090 strb.w r0, [r4, #144] ; 0x90 pcb->persist_backoff = 1; 803032c: 2301 movs r3, #1 803032e: e001 b.n 8030334 } } else if (pcb->persist_backoff > 0) { 8030330: b112 cbz r2, 8030338 /* stop persist timer */ pcb->persist_backoff = 0; 8030332: 2300 movs r3, #0 8030334: 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)) { 8030338: 4b84 ldr r3, [pc, #528] ; (803054c ) 803033a: 6ca2 ldr r2, [r4, #72] ; 0x48 803033c: 681b ldr r3, [r3, #0] 803033e: 1a98 subs r0, r3, r2 8030340: 2800 cmp r0, #0 8030342: dc34 bgt.n 80303ae pcb->acked = 0; 8030344: 2000 movs r0, #0 8030346: f8a4 0064 strh.w r0, [r4, #100] ; 0x64 /* Clause 2 */ if (tcplen == 0) { 803034a: 4882 ldr r0, [pc, #520] ; (8030554 ) 803034c: 8800 ldrh r0, [r0, #0] 803034e: 2800 cmp r0, #0 8030350: f040 81f4 bne.w 803073c /* Clause 3 */ if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge){ 8030354: f8b4 6060 ldrh.w r6, [r4, #96] ; 0x60 8030358: 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; 803035a: 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){ 803035c: 1830 adds r0, r6, r0 803035e: 4288 cmp r0, r1 8030360: f040 81ec bne.w 803073c /* Clause 4 */ if (pcb->rtime >= 0) { 8030364: f9b4 1034 ldrsh.w r1, [r4, #52] ; 0x34 8030368: 2900 cmp r1, #0 803036a: f2c0 81e7 blt.w 803073c /* Clause 5 */ if (pcb->lastack == ackno) { 803036e: 429a cmp r2, r3 8030370: f040 81e4 bne.w 803073c found_dupack = 1; if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) { 8030374: f894 2047 ldrb.w r2, [r4, #71] ; 0x47 8030378: 1c53 adds r3, r2, #1 803037a: b2db uxtb r3, r3 803037c: 4293 cmp r3, r2 ++pcb->dupacks; 803037e: bf88 it hi 8030380: f884 3047 strbhi.w r3, [r4, #71] ; 0x47 } if (pcb->dupacks > 3) { 8030384: f894 3047 ldrb.w r3, [r4, #71] ; 0x47 8030388: 2b03 cmp r3, #3 803038a: d90a bls.n 80303a2 /* Inflate the congestion window, but not if it means that the value overflows. */ if ((u16_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { 803038c: f8b4 204c ldrh.w r2, [r4, #76] ; 0x4c 8030390: 8ee3 ldrh r3, [r4, #54] ; 0x36 8030392: 18d3 adds r3, r2, r3 8030394: b29b uxth r3, r3 8030396: 4293 cmp r3, r2 8030398: f240 80b2 bls.w 8030500 pcb->cwnd += pcb->mss; 803039c: f8a4 304c strh.w r3, [r4, #76] ; 0x4c 80303a0: e0ae b.n 8030500 } } else if (pcb->dupacks == 3) { 80303a2: f040 80ad bne.w 8030500 /* Do fast retransmit */ tcp_rexmit_fast(pcb); 80303a6: 4620 mov r0, r4 80303a8: f001 fa92 bl 80318d0 80303ac: e0a8 b.n 8030500 /* 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)){ 80303ae: 43d1 mvns r1, r2 80303b0: 42d9 cmn r1, r3 80303b2: d47e bmi.n 80304b2 80303b4: 6d21 ldr r1, [r4, #80] ; 0x50 80303b6: 1a59 subs r1, r3, r1 80303b8: 2900 cmp r1, #0 80303ba: dc7a bgt.n 80304b2 /* 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) { 80303bc: 7fa1 ldrb r1, [r4, #30] 80303be: f001 0004 and.w r0, r1, #4 80303c2: b2c0 uxtb r0, r0 80303c4: b130 cbz r0, 80303d4 pcb->flags &= ~TF_INFR; 80303c6: f021 0104 bic.w r1, r1, #4 80303ca: 77a1 strb r1, [r4, #30] pcb->cwnd = pcb->ssthresh; 80303cc: f8b4 104e ldrh.w r1, [r4, #78] ; 0x4e 80303d0: 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; 80303d4: f9b4 5040 ldrsh.w r5, [r4, #64] ; 0x40 80303d8: f8b4 0042 ldrh.w r0, [r4, #66] ; 0x42 pcb->snd_buf += pcb->acked; /* Reset the fast retransmit variables. */ pcb->dupacks = 0; pcb->lastack = ackno; 80303dc: 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; 80303de: 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); 80303e2: 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; 80303e4: 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) { 80303e8: 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; 80303ea: 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); 80303ee: f8a4 2064 strh.w r2, [r4, #100] ; 0x64 pcb->flags &= ~TF_INFR; pcb->cwnd = pcb->ssthresh; } /* Reset the number of retransmissions. */ pcb->nrtx = 0; 80303f2: 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; 80303f4: 1812 adds r2, r2, r0 pcb->dupacks = 0; pcb->lastack = ackno; /* Update the congestion control variables (cwnd and ssthresh). */ if (pcb->state >= ESTABLISHED) { 80303f6: 2b03 cmp r3, #3 pcb->flags &= ~TF_INFR; pcb->cwnd = pcb->ssthresh; } /* Reset the number of retransmissions. */ pcb->nrtx = 0; 80303f8: 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; 80303fc: f8a4 2066 strh.w r2, [r4, #102] ; 0x66 /* Reset the fast retransmit variables. */ pcb->dupacks = 0; 8030400: f884 1047 strb.w r1, [r4, #71] ; 0x47 pcb->lastack = ackno; /* Update the congestion control variables (cwnd and ssthresh). */ if (pcb->state >= ESTABLISHED) { 8030404: d931 bls.n 803046a if (pcb->cwnd < pcb->ssthresh) { 8030406: f8b4 204e ldrh.w r2, [r4, #78] ; 0x4e 803040a: f8b4 304c ldrh.w r3, [r4, #76] ; 0x4c 803040e: 429a cmp r2, r3 if ((u16_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { 8030410: 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) { 8030412: d900 bls.n 8030416 8030414: e002 b.n 803041c 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); 8030416: 4352 muls r2, r2 8030418: fb92 f2f3 sdiv r2, r2, r3 803041c: 189a adds r2, r3, r2 803041e: b292 uxth r2, r2 if (new_cwnd > pcb->cwnd) { 8030420: 429a cmp r2, r3 8030422: d922 bls.n 803046a pcb->cwnd = new_cwnd; 8030424: f8a4 204c strh.w r2, [r4, #76] ; 0x4c 8030428: e01f b.n 803046a 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; 803042a: 6f25 ldr r5, [r4, #112] ; 0x70 pcb->unacked = pcb->unacked->next; 803042c: 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))); 803042e: 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; 8030430: 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))); 8030432: f7ff f935 bl 802f6a0 /* Prevent ACK for FIN to generate a sent event */ if ((pcb->acked != 0) && ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0)) { 8030436: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 803043a: b153 cbz r3, 8030452 803043c: 68eb ldr r3, [r5, #12] 803043e: 8998 ldrh r0, [r3, #12] 8030440: f7fd ff21 bl 802e286 8030444: 07c3 lsls r3, r0, #31 8030446: d504 bpl.n 8030452 pcb->acked--; 8030448: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 803044c: 3b01 subs r3, #1 803044e: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 } pcb->snd_queuelen -= pbuf_clen(next->p); 8030452: 6868 ldr r0, [r5, #4] 8030454: f8b4 7068 ldrh.w r7, [r4, #104] ; 0x68 8030458: f7ff f922 bl 802f6a0 803045c: 1a38 subs r0, r7, r0 803045e: f8a4 0068 strh.w r0, [r4, #104] ; 0x68 tcp_seg_free(next); 8030462: 4628 mov r0, r5 8030464: f7ff faf5 bl 802fa52 8030468: e000 b.n 803046c 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) + 803046a: 4e38 ldr r6, [pc, #224] ; (803054c ) 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 && 803046c: 6f23 ldr r3, [r4, #112] ; 0x70 803046e: b91b cbnz r3, 8030478 } } /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if(pcb->unacked == NULL) 8030470: 6f22 ldr r2, [r4, #112] ; 0x70 8030472: 2300 movs r3, #0 8030474: b9d2 cbnz r2, 80304ac 8030476: e015 b.n 80304a4 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) + 8030478: 68db ldr r3, [r3, #12] 803047a: 6858 ldr r0, [r3, #4] 803047c: f7fd ff0a bl 802e294 8030480: 6f23 ldr r3, [r4, #112] ; 0x70 8030482: 891d ldrh r5, [r3, #8] 8030484: 68db ldr r3, [r3, #12] 8030486: 4607 mov r7, r0 8030488: 8998 ldrh r0, [r3, #12] 803048a: f7fd fefc bl 802e286 803048e: 6833 ldr r3, [r6, #0] 8030490: f010 0003 ands.w r0, r0, #3 8030494: bf18 it ne 8030496: 2001 movne r0, #1 8030498: 1afb subs r3, r7, r3 803049a: 1828 adds r0, r5, r0 803049c: 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 && 803049e: 2b00 cmp r3, #0 80304a0: ddc3 ble.n 803042a 80304a2: e7e5 b.n 8030470 } /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if(pcb->unacked == NULL) pcb->rtime = -1; 80304a4: f64f 72ff movw r2, #65535 ; 0xffff 80304a8: 86a2 strh r2, [r4, #52] ; 0x34 80304aa: e000 b.n 80304ae else pcb->rtime = 0; 80304ac: 86a3 strh r3, [r4, #52] ; 0x34 pcb->polltmr = 0; 80304ae: 77e3 strb r3, [r4, #31] 80304b0: e026 b.n 8030500 } else { /* Fix bug bug #21582: out of sequence ACK, didn't really ack anything */ pcb->acked = 0; 80304b2: 2300 movs r3, #0 80304b4: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 80304b8: e022 b.n 8030500 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; 80304ba: 6ee5 ldr r5, [r4, #108] ; 0x6c pcb->unsent = pcb->unsent->next; 80304bc: 682b ldr r3, [r5, #0] 80304be: 66e3 str r3, [r4, #108] ; 0x6c #if TCP_OVERSIZE if (pcb->unsent == NULL) { 80304c0: b90b cbnz r3, 80304c6 pcb->unsent_oversize = 0; 80304c2: 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))); 80304c6: 6868 ldr r0, [r5, #4] 80304c8: f7ff f8ea bl 802f6a0 /* Prevent ACK for FIN to generate a sent event */ if ((pcb->acked != 0) && ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0)) { 80304cc: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 80304d0: b153 cbz r3, 80304e8 80304d2: 68eb ldr r3, [r5, #12] 80304d4: 8998 ldrh r0, [r3, #12] 80304d6: f7fd fed6 bl 802e286 80304da: 07c7 lsls r7, r0, #31 80304dc: d504 bpl.n 80304e8 pcb->acked--; 80304de: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 80304e2: 3b01 subs r3, #1 80304e4: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 } pcb->snd_queuelen -= pbuf_clen(next->p); 80304e8: 6868 ldr r0, [r5, #4] 80304ea: f8b4 7068 ldrh.w r7, [r4, #104] ; 0x68 80304ee: f7ff f8d7 bl 802f6a0 80304f2: 1a38 subs r0, r7, r0 80304f4: f8a4 0068 strh.w r0, [r4, #104] ; 0x68 tcp_seg_free(next); 80304f8: 4628 mov r0, r5 80304fa: f7ff faaa bl 802fa52 80304fe: e000 b.n 8030502 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) + 8030500: 4e12 ldr r6, [pc, #72] ; (803054c ) 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 && 8030502: 6ee3 ldr r3, [r4, #108] ; 0x6c 8030504: b913 cbnz r3, 803050c 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)) { 8030506: 6ba3 ldr r3, [r4, #56] ; 0x38 8030508: bb33 cbnz r3, 8030558 803050a: e04d b.n 80305a8 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) + 803050c: 68db ldr r3, [r3, #12] 803050e: 6835 ldr r5, [r6, #0] 8030510: 6858 ldr r0, [r3, #4] 8030512: f7fd febf bl 802e294 8030516: 6ee3 ldr r3, [r4, #108] ; 0x6c 8030518: 891f ldrh r7, [r3, #8] 803051a: 68db ldr r3, [r3, #12] 803051c: 4680 mov r8, r0 803051e: 8998 ldrh r0, [r3, #12] 8030520: f7fd feb1 bl 802e286 8030524: f010 0003 ands.w r0, r0, #3 8030528: bf18 it ne 803052a: 2001 movne r0, #1 803052c: ebc8 0505 rsb r5, r8, r5 8030530: 1838 adds r0, r7, r0 8030532: 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 && 8030534: 2d00 cmp r5, #0 8030536: dbe6 blt.n 8030506 TCP_SEQ_BETWEEN(ackno, ntohl(pcb->unsent->tcphdr->seqno) + 8030538: 6832 ldr r2, [r6, #0] 803053a: 6d23 ldr r3, [r4, #80] ; 0x50 803053c: 1ad3 subs r3, r2, r3 803053e: 2b00 cmp r3, #0 8030540: ddbb ble.n 80304ba 8030542: e7e0 b.n 8030506 8030544: 2000c3f4 .word 0x2000c3f4 8030548: 2000c3e8 .word 0x2000c3e8 803054c: 2000c3f0 .word 0x2000c3f0 8030550: 2000c3e4 .word 0x2000c3e4 8030554: 2000c3ec .word 0x2000c3ec 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)) { 8030558: 497b ldr r1, [pc, #492] ; (8030748 ) 803055a: 6be2 ldr r2, [r4, #60] ; 0x3c 803055c: 6809 ldr r1, [r1, #0] 803055e: 1a52 subs r2, r2, r1 8030560: 2a00 cmp r2, #0 8030562: da21 bge.n 80305a8 /* 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); 8030564: 4a79 ldr r2, [pc, #484] ; (803074c ) 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); 8030566: 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); 803056a: 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); 803056c: 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); 8030570: 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); 8030572: 1a12 subs r2, r2, r0 8030574: b292 uxth r2, r2 8030576: b293 uxth r3, r2 pcb->sa += m; 8030578: 1851 adds r1, r2, r1 803057a: b289 uxth r1, r1 if (m < 0) { 803057c: 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; 803057e: f8a4 1040 strh.w r1, [r4, #64] ; 0x40 if (m < 0) { 8030582: d501 bpl.n 8030588 m = -m; 8030584: 4253 negs r3, r2 8030586: b29b uxth r3, r3 } m = m - (pcb->sv >> 2); 8030588: f8b4 2042 ldrh.w r2, [r4, #66] ; 0x42 803058c: f342 008d sbfx r0, r2, #2, #14 8030590: 1a12 subs r2, r2, r0 pcb->sv += m; 8030592: 18d3 adds r3, r2, r3 8030594: b29b uxth r3, r3 pcb->rto = (pcb->sa >> 3) + pcb->sv; 8030596: f341 01cc sbfx r1, r1, #3, #13 pcb->sa += m; if (m < 0) { m = -m; } m = m - (pcb->sv >> 2); pcb->sv += m; 803059a: f8a4 3042 strh.w r3, [r4, #66] ; 0x42 pcb->rto = (pcb->sa >> 3) + pcb->sv; 803059e: 185b adds r3, r3, r1 80305a0: 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; 80305a4: 2300 movs r3, #0 80305a6: 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)) { 80305a8: 4b69 ldr r3, [pc, #420] ; (8030750 ) 80305aa: 4a6a ldr r2, [pc, #424] ; (8030754 ) 80305ac: 8818 ldrh r0, [r3, #0] 80305ae: 2800 cmp r0, #0 80305b0: f000 80b3 beq.w 803071a 80305b4: 7e23 ldrb r3, [r4, #24] 80305b6: 2b06 cmp r3, #6 80305b8: f200 80af bhi.w 803071a 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)){ 80305bc: 6811 ldr r1, [r2, #0] 80305be: 6aa3 ldr r3, [r4, #40] ; 0x28 80305c0: 43ca mvns r2, r1 80305c2: 42da cmn r2, r3 80305c4: d425 bmi.n 8030612 80305c6: 1c5a adds r2, r3, #1 80305c8: 1a52 subs r2, r2, r1 80305ca: 1a10 subs r0, r2, r0 80305cc: 2800 cmp r0, #0 80305ce: dc20 bgt.n 8030612 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; 80305d0: 1a59 subs r1, r3, r1 p = inseg.p; 80305d2: 4b61 ldr r3, [pc, #388] ; (8030758 ) 80305d4: 6858 ldr r0, [r3, #4] LWIP_ASSERT("inseg.p != NULL", inseg.p); LWIP_ASSERT("insane offset!", (off < 0x7fff)); if (inseg.p->len < off) { 80305d6: 8943 ldrh r3, [r0, #10] 80305d8: 428b cmp r3, r1 80305da: da0a bge.n 80305f2 LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); new_tot_len = (u16_t)(inseg.p->tot_len - off); 80305dc: 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; 80305de: 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); 80305e0: 1a52 subs r2, r2, r1 while (p->len < off) { 80305e2: e003 b.n 80305ec 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; 80305e4: 8102 strh r2, [r0, #8] p->len = 0; 80305e6: 8145 strh r5, [r0, #10] p = p->next; 80305e8: 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; 80305ea: 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) { 80305ec: 8943 ldrh r3, [r0, #10] 80305ee: 428b cmp r3, r1 80305f0: dbf8 blt.n 80305e4 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)) { 80305f2: 4249 negs r1, r1 80305f4: b209 sxth r1, r1 80305f6: f7fe ff54 bl 802f4a2 /* 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); 80305fa: 4a57 ldr r2, [pc, #348] ; (8030758 ) 80305fc: 4955 ldr r1, [pc, #340] ; (8030754 ) 80305fe: 8915 ldrh r5, [r2, #8] 8030600: 6808 ldr r0, [r1, #0] 8030602: 6aa3 ldr r3, [r4, #40] ; 0x28 8030604: 1940 adds r0, r0, r5 8030606: 1ac0 subs r0, r0, r3 8030608: 8110 strh r0, [r2, #8] inseg.tcphdr->seqno = seqno = pcb->rcv_nxt; 803060a: 68d2 ldr r2, [r2, #12] 803060c: 600b str r3, [r1, #0] 803060e: 6053 str r3, [r2, #4] 8030610: e006 b.n 8030620 } else { if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)){ 8030612: 1ac9 subs r1, r1, r3 8030614: 2900 cmp r1, #0 8030616: da03 bge.n 8030620 /* 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); 8030618: 7fa3 ldrb r3, [r4, #30] 803061a: f043 0302 orr.w r3, r3, #2 803061e: 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, 8030620: 4b4c ldr r3, [pc, #304] ; (8030754 ) 8030622: 6aa2 ldr r2, [r4, #40] ; 0x28 8030624: 681b ldr r3, [r3, #0] 8030626: 1a99 subs r1, r3, r2 8030628: 2900 cmp r1, #0 803062a: db71 blt.n 8030710 803062c: 1c59 adds r1, r3, #1 803062e: 8da0 ldrh r0, [r4, #44] ; 0x2c 8030630: 1a89 subs r1, r1, r2 8030632: 1a09 subs r1, r1, r0 8030634: 2900 cmp r1, #0 8030636: dc6b bgt.n 8030710 pcb->rcv_nxt + pcb->rcv_wnd - 1)){ if (pcb->rcv_nxt == seqno) { 8030638: 429a cmp r2, r3 803063a: d169 bne.n 8030710 /* 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); 803063c: 4d46 ldr r5, [pc, #280] ; (8030758 ) 803063e: 68eb ldr r3, [r5, #12] 8030640: 892e ldrh r6, [r5, #8] 8030642: 8998 ldrh r0, [r3, #12] 8030644: f7fd fe1f bl 802e286 8030648: f010 0003 ands.w r0, r0, #3 803064c: bf18 it ne 803064e: 2001 movne r0, #1 8030650: 4b3f ldr r3, [pc, #252] ; (8030750 ) 8030652: 1830 adds r0, r6, r0 8030654: b280 uxth r0, r0 8030656: 8018 strh r0, [r3, #0] if (tcplen > pcb->rcv_wnd) { 8030658: 8da3 ldrh r3, [r4, #44] ; 0x2c 803065a: 4283 cmp r3, r0 803065c: d230 bcs.n 80306c0 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) { 803065e: 68eb ldr r3, [r5, #12] 8030660: 8998 ldrh r0, [r3, #12] 8030662: f7fd fe10 bl 802e286 8030666: 07c0 lsls r0, r0, #31 8030668: d50c bpl.n 8030684 /* 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); 803066a: 68ed ldr r5, [r5, #12] 803066c: 89ae ldrh r6, [r5, #12] 803066e: 4630 mov r0, r6 8030670: f7fd fe09 bl 802e286 8030674: f000 003e and.w r0, r0, #62 ; 0x3e 8030678: f7fd fe00 bl 802e27c 803067c: f426 567c bic.w r6, r6, #16128 ; 0x3f00 8030680: 4330 orrs r0, r6 8030682: 81a8 strh r0, [r5, #12] } /* Adjust length of segment to fit in the window. */ inseg.len = pcb->rcv_wnd; 8030684: 8da3 ldrh r3, [r4, #44] ; 0x2c 8030686: 4d34 ldr r5, [pc, #208] ; (8030758 ) 8030688: 812b strh r3, [r5, #8] if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { 803068a: 68eb ldr r3, [r5, #12] 803068c: 8998 ldrh r0, [r3, #12] 803068e: f7fd fdfa bl 802e286 8030692: f000 0002 and.w r0, r0, #2 8030696: b280 uxth r0, r0 8030698: b110 cbz r0, 80306a0 inseg.len -= 1; 803069a: 892b ldrh r3, [r5, #8] 803069c: 3b01 subs r3, #1 803069e: 812b strh r3, [r5, #8] } pbuf_realloc(inseg.p, inseg.len); 80306a0: 6868 ldr r0, [r5, #4] 80306a2: 8929 ldrh r1, [r5, #8] 80306a4: f7fe ff4f bl 802f546 tcplen = TCP_TCPLEN(&inseg); 80306a8: 68eb ldr r3, [r5, #12] 80306aa: 892e ldrh r6, [r5, #8] 80306ac: 8998 ldrh r0, [r3, #12] 80306ae: f7fd fdea bl 802e286 80306b2: f010 0003 ands.w r0, r0, #3 80306b6: bf18 it ne 80306b8: 2001 movne r0, #1 80306ba: 4b25 ldr r3, [pc, #148] ; (8030750 ) 80306bc: 1830 adds r0, r6, r0 80306be: 8018 strh r0, [r3, #0] pcb->ooseq = next; } } #endif /* TCP_QUEUE_OOSEQ */ pcb->rcv_nxt = seqno + tcplen; 80306c0: 4b23 ldr r3, [pc, #140] ; (8030750 ) 80306c2: 4a24 ldr r2, [pc, #144] ; (8030754 ) 80306c4: 881b ldrh r3, [r3, #0] 80306c6: 6812 ldr r2, [r2, #0] 80306c8: 189a adds r2, r3, r2 80306ca: 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; 80306cc: 8da2 ldrh r2, [r4, #44] ; 0x2c 80306ce: 1ad3 subs r3, r2, r3 80306d0: 85a3 strh r3, [r4, #44] ; 0x2c tcp_update_rcv_ann_wnd(pcb); 80306d2: 4620 mov r0, r4 80306d4: f7ff f986 bl 802f9e4 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) { 80306d8: 4b1f ldr r3, [pc, #124] ; (8030758 ) 80306da: 685a ldr r2, [r3, #4] 80306dc: 8911 ldrh r1, [r2, #8] 80306de: b119 cbz r1, 80306e8 recv_data = inseg.p; 80306e0: 491e ldr r1, [pc, #120] ; (803075c ) 80306e2: 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; 80306e4: 2200 movs r2, #0 80306e6: 605a str r2, [r3, #4] } if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { 80306e8: 68db ldr r3, [r3, #12] 80306ea: 8998 ldrh r0, [r3, #12] 80306ec: f7fd fdcb bl 802e286 80306f0: 07c1 lsls r1, r0, #31 80306f2: d504 bpl.n 80306fe LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: received FIN.\n")); recv_flags |= TF_GOT_FIN; 80306f4: 4b1a ldr r3, [pc, #104] ; (8030760 ) 80306f6: 781a ldrb r2, [r3, #0] 80306f8: f042 0220 orr.w r2, r2, #32 80306fc: 701a strb r2, [r3, #0] } #endif /* TCP_QUEUE_OOSEQ */ /* Acknowledge the segment(s). */ tcp_ack(pcb); 80306fe: 7fa3 ldrb r3, [r4, #30] 8030700: 07da lsls r2, r3, #31 8030702: d502 bpl.n 803070a 8030704: f023 0301 bic.w r3, r3, #1 8030708: e013 b.n 8030732 803070a: f043 0301 orr.w r3, r3, #1 803070e: e012 b.n 8030736 } else { /* We get here if the incoming segment is out-of-sequence. */ tcp_send_empty_ack(pcb); 8030710: 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); } } } 8030712: 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); 8030716: f000 bf09 b.w 803152c } 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)){ 803071a: 6812 ldr r2, [r2, #0] 803071c: 6aa3 ldr r3, [r4, #40] ; 0x28 803071e: 1ad1 subs r1, r2, r3 8030720: 2900 cmp r1, #0 8030722: db05 blt.n 8030730 8030724: 3201 adds r2, #1 8030726: 8da1 ldrh r1, [r4, #44] ; 0x2c 8030728: 1ad3 subs r3, r2, r3 803072a: 1a5b subs r3, r3, r1 803072c: 2b00 cmp r3, #0 803072e: dd09 ble.n 8030744 tcp_ack_now(pcb); 8030730: 7fa3 ldrb r3, [r4, #30] 8030732: f043 0302 orr.w r3, r3, #2 8030736: 77a3 strb r3, [r4, #30] 8030738: 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; 803073c: 2300 movs r3, #0 803073e: f884 3047 strb.w r3, [r4, #71] ; 0x47 8030742: e6dd b.n 8030500 8030744: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8030748: 2000c3f0 .word 0x2000c3f0 803074c: 2000f6b0 .word 0x2000f6b0 8030750: 2000c3ec .word 0x2000c3ec 8030754: 2000c3e8 .word 0x2000c3e8 8030758: 2000c400 .word 0x2000c400 803075c: 2000c3f8 .word 0x2000c3f8 8030760: 2000c3f5 .word 0x2000c3f5 08030764 : * @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) { 8030764: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8030768: 4606 mov r6, r0 803076a: 460f mov r7, r1 err_t err; PERF_START; TCP_STATS_INC(tcp.recv); snmp_inc_tcpinsegs(); 803076c: f003 fcb8 bl 80340e0 iphdr = (struct ip_hdr *)p->payload; 8030770: 6873 ldr r3, [r6, #4] 8030772: 4aa7 ldr r2, [pc, #668] ; (8030a10 ) tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4); 8030774: 4ca7 ldr r4, [pc, #668] ; (8030a14 ) PERF_START; TCP_STATS_INC(tcp.recv); snmp_inc_tcpinsegs(); iphdr = (struct ip_hdr *)p->payload; 8030776: 6013 str r3, [r2, #0] tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4); 8030778: 781a ldrb r2, [r3, #0] 803077a: 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))) { 803077e: 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); 8030780: 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))) { 8030784: 4630 mov r0, r6 8030786: 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); 8030788: 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))) { 803078a: f7fe fe8a bl 802f4a2 803078e: 2800 cmp r0, #0 8030790: f040 83ce bne.w 8030f30 8030794: 8933 ldrh r3, [r6, #8] 8030796: 2b13 cmp r3, #19 8030798: f240 83ca bls.w 8030f30 TCP_STATS_INC(tcp.lenerr); goto dropped; } /* Don't even process incoming broadcasts/multicasts. */ if (ip_addr_isbroadcast(¤t_iphdr_dest, inp) || 803079c: 4d9e ldr r5, [pc, #632] ; (8030a18 ) 803079e: 4639 mov r1, r7 80307a0: 6828 ldr r0, [r5, #0] 80307a2: f001 fd43 bl 803222c 80307a6: 2800 cmp r0, #0 80307a8: f040 83c2 bne.w 8030f30 ip_addr_ismulticast(¤t_iphdr_dest)) { 80307ac: 682b ldr r3, [r5, #0] 80307ae: 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) || 80307b2: 2be0 cmp r3, #224 ; 0xe0 80307b4: f000 83bc beq.w 8030f30 } #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); 80307b8: 6823 ldr r3, [r4, #0] 80307ba: 8998 ldrh r0, [r3, #12] 80307bc: f7fd fd63 bl 802e286 if(pbuf_header(p, -(hdrlen * 4))){ 80307c0: f06f 0103 mvn.w r1, #3 80307c4: f3c0 3307 ubfx r3, r0, #12, #8 80307c8: 4359 muls r1, r3 80307ca: 4630 mov r0, r6 80307cc: f7fe fe69 bl 802f4a2 80307d0: 4683 mov fp, r0 80307d2: 2800 cmp r0, #0 80307d4: f040 83ac bne.w 8030f30 TCP_STATS_INC(tcp.lenerr); goto dropped; } /* Convert fields in TCP header to host byte order. */ tcphdr->src = ntohs(tcphdr->src); 80307d8: 6827 ldr r7, [r4, #0] 80307da: 8838 ldrh r0, [r7, #0] 80307dc: f7fd fd53 bl 802e286 80307e0: 8038 strh r0, [r7, #0] tcphdr->dest = ntohs(tcphdr->dest); 80307e2: 6827 ldr r7, [r4, #0] 80307e4: 8878 ldrh r0, [r7, #2] 80307e6: f7fd fd4e bl 802e286 80307ea: 8078 strh r0, [r7, #2] seqno = tcphdr->seqno = ntohl(tcphdr->seqno); 80307ec: 6827 ldr r7, [r4, #0] 80307ee: 6878 ldr r0, [r7, #4] 80307f0: f7fd fd50 bl 802e294 80307f4: 4b89 ldr r3, [pc, #548] ; (8030a1c ) 80307f6: 6078 str r0, [r7, #4] ackno = tcphdr->ackno = ntohl(tcphdr->ackno); 80307f8: 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); 80307fa: 6018 str r0, [r3, #0] ackno = tcphdr->ackno = ntohl(tcphdr->ackno); 80307fc: 68b8 ldr r0, [r7, #8] 80307fe: f7fd fd49 bl 802e294 8030802: 4b87 ldr r3, [pc, #540] ; (8030a20 ) 8030804: 60b8 str r0, [r7, #8] tcphdr->wnd = ntohs(tcphdr->wnd); 8030806: 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); 8030808: 6018 str r0, [r3, #0] tcphdr->wnd = ntohs(tcphdr->wnd); 803080a: 89f8 ldrh r0, [r7, #14] 803080c: f7fd fd3b bl 802e286 8030810: 81f8 strh r0, [r7, #14] flags = TCPH_FLAGS(tcphdr); 8030812: 6823 ldr r3, [r4, #0] 8030814: 8998 ldrh r0, [r3, #12] 8030816: f7fd fd36 bl 802e286 803081a: 4b82 ldr r3, [pc, #520] ; (8030a24 ) tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 803081c: 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 && 8030820: 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); 8030822: 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); 8030826: f000 013f and.w r1, r0, #63 ; 0x3f tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 803082a: bf18 it ne 803082c: 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); 8030830: 7019 strb r1, [r3, #0] tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 8030832: 44c4 add ip, r8 8030834: 4b7c ldr r3, [pc, #496] ; (8030a28 ) 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)) { 8030836: 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); 8030838: fa1f fc8c uxth.w ip, ip 803083c: 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) { 8030840: 4b7a ldr r3, [pc, #488] ; (8030a2c ) 8030842: 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) && 8030846: 4b7a ldr r3, [pc, #488] ; (8030a30 ) 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); 8030848: 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) && 803084a: 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) { 803084e: 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; 8030850: 4658 mov r0, fp for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 8030852: e019 b.n 8030888 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 && 8030854: 8ba5 ldrh r5, [r4, #28] 8030856: 883b ldrh r3, [r7, #0] 8030858: 429d cmp r5, r3 803085a: d113 bne.n 8030884 803085c: 8b65 ldrh r5, [r4, #26] 803085e: 887b ldrh r3, [r7, #2] 8030860: 429d cmp r5, r3 8030862: d10f bne.n 8030884 pcb->local_port == tcphdr->dest && 8030864: 6863 ldr r3, [r4, #4] 8030866: 454b cmp r3, r9 8030868: d10c bne.n 8030884 ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src) && 803086a: 6823 ldr r3, [r4, #0] 803086c: 428b cmp r3, r1 803086e: d109 bne.n 8030884 /* 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) { 8030870: 2800 cmp r0, #0 8030872: f000 8382 beq.w 8030f7a prev->next = pcb->next; 8030876: 68e3 ldr r3, [r4, #12] 8030878: 60c3 str r3, [r0, #12] pcb->next = tcp_active_pcbs; tcp_active_pcbs = pcb; 803087a: 4b6c ldr r3, [pc, #432] ; (8030a2c ) 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; 803087c: f8c4 a00c str.w sl, [r4, #12] tcp_active_pcbs = pcb; 8030880: 601c str r4, [r3, #0] 8030882: e37a b.n 8030f7a 8030884: 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) { 8030886: 68e4 ldr r4, [r4, #12] 8030888: 2c00 cmp r4, #0 803088a: d1e3 bne.n 8030854 803088c: e372 b.n 8030f74 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 && 803088e: 8b98 ldrh r0, [r3, #28] 8030890: 883c ldrh r4, [r7, #0] 8030892: 4284 cmp r4, r0 8030894: d130 bne.n 80308f8 pcb->local_port == tcphdr->dest && 8030896: 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 && 8030898: 887d ldrh r5, [r7, #2] 803089a: 4285 cmp r5, r0 803089c: d12c bne.n 80308f8 pcb->local_port == tcphdr->dest && 803089e: 6858 ldr r0, [r3, #4] 80308a0: 4548 cmp r0, r9 80308a2: d129 bne.n 80308f8 ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src) && 80308a4: 6818 ldr r0, [r3, #0] 80308a6: 4288 cmp r0, r1 80308a8: d126 bne.n 80308f8 /* 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) { 80308aa: f002 0104 and.w r1, r2, #4 80308ae: b2c9 uxtb r1, r1 80308b0: 2900 cmp r1, #0 80308b2: f040 833f bne.w 8030f34 return ERR_OK; } /* - fourth, check the SYN bit, */ if (flags & TCP_SYN) { 80308b6: f002 0102 and.w r1, r2, #2 80308ba: b2c9 uxtb r1, r1 80308bc: b159 cbz r1, 80308d6 /* 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)) { 80308be: 4a57 ldr r2, [pc, #348] ; (8030a1c ) 80308c0: 6811 ldr r1, [r2, #0] 80308c2: 6a9a ldr r2, [r3, #40] ; 0x28 80308c4: 1a8a subs r2, r1, r2 80308c6: d40b bmi.n 80308e0 80308c8: 8d98 ldrh r0, [r3, #44] ; 0x2c 80308ca: 1a12 subs r2, r2, r0 80308cc: 2a00 cmp r2, #0 80308ce: dc07 bgt.n 80308e0 /* 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(), 80308d0: 9500 str r5, [sp, #0] 80308d2: 9401 str r4, [sp, #4] 80308d4: e041 b.n 803095a tcphdr->dest, tcphdr->src); return ERR_OK; } } else if (flags & TCP_FIN) { 80308d6: 07d2 lsls r2, r2, #31 80308d8: d502 bpl.n 80308e0 /* - eighth, check the FIN bit: Remain in the TIME-WAIT state. Restart the 2 MSL time-wait timeout.*/ pcb->tmr = tcp_ticks; 80308da: 4a56 ldr r2, [pc, #344] ; (8030a34 ) 80308dc: 6812 ldr r2, [r2, #0] 80308de: 625a str r2, [r3, #36] ; 0x24 } if ((tcplen > 0)) { 80308e0: f1bc 0f00 cmp.w ip, #0 80308e4: f000 8326 beq.w 8030f34 /* Acknowledge data, FIN or out-of-window SYN */ pcb->flags |= TF_ACK_NOW; 80308e8: 7f9a ldrb r2, [r3, #30] 80308ea: f042 0202 orr.w r2, r2, #2 80308ee: 779a strb r2, [r3, #30] return tcp_output(pcb); 80308f0: 4618 mov r0, r3 80308f2: f000 fe3d bl 8031570 80308f6: e31d b.n 8030f34 } 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) { 80308f8: 68db ldr r3, [r3, #12] 80308fa: 2b00 cmp r3, #0 80308fc: d1c7 bne.n 803088e } /* 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) { 80308fe: 484e ldr r0, [pc, #312] ; (8030a38 ) 8030900: 6804 ldr r4, [r0, #0] 8030902: 4625 mov r5, r4 8030904: e00f b.n 8030926 if (lpcb->local_port == tcphdr->dest) { 8030906: 8b68 ldrh r0, [r5, #26] 8030908: f8b7 8002 ldrh.w r8, [r7, #2] 803090c: 4580 cmp r8, r0 803090e: d108 bne.n 8030922 /* found an ANY-match */ lpcb_any = lpcb; lpcb_prev = prev; } #else /* SO_REUSE */ if (ip_addr_cmp(&(lpcb->local_ip), ¤t_iphdr_dest) || 8030910: f8d5 8000 ldr.w r8, [r5] 8030914: 4588 cmp r8, r1 8030916: f000 8342 beq.w 8030f9e ip_addr_isany(&(lpcb->local_ip))) { 803091a: f1b8 0f00 cmp.w r8, #0 803091e: f000 833e beq.w 8030f9e 8030922: 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) { 8030924: 68ed ldr r5, [r5, #12] 8030926: 2d00 cmp r5, #0 8030928: d1ed bne.n 8030906 803092a: e33c b.n 8030fa6 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; 803092c: 68e9 ldr r1, [r5, #12] 803092e: 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; 8030930: 4b41 ldr r3, [pc, #260] ; (8030a38 ) 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; 8030932: 60ec str r4, [r5, #12] /* put this listening pcb at the head of the listening list */ tcp_listen_pcbs.listen_pcbs = lpcb; 8030934: 601d str r5, [r3, #0] tcp_listen_input(struct tcp_pcb_listen *pcb) { struct tcp_pcb *npcb; err_t rc; if (flags & TCP_RST) { 8030936: f002 0304 and.w r3, r2, #4 803093a: b2db uxtb r3, r3 803093c: 2b00 cmp r3, #0 803093e: f040 82f9 bne.w 8030f34 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) { 8030942: f002 0810 and.w r8, r2, #16 8030946: fa5f f888 uxtb.w r8, r8 803094a: f1b8 0f00 cmp.w r8, #0 803094e: d00c beq.n 803096a /* 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(), 8030950: 4b32 ldr r3, [pc, #200] ; (8030a1c ) 8030952: 6819 ldr r1, [r3, #0] 8030954: 9000 str r0, [sp, #0] 8030956: 883b ldrh r3, [r7, #0] 8030958: 9301 str r3, [sp, #4] 803095a: 4b31 ldr r3, [pc, #196] ; (8030a20 ) 803095c: 6818 ldr r0, [r3, #0] 803095e: 4461 add r1, ip 8030960: 4a2d ldr r2, [pc, #180] ; (8030a18 ) 8030962: 4b33 ldr r3, [pc, #204] ; (8030a30 ) 8030964: f000 ff28 bl 80317b8 8030968: e2e4 b.n 8030f34 ip_current_src_addr(), tcphdr->dest, tcphdr->src); } else if (flags & TCP_SYN) { 803096a: f002 0202 and.w r2, r2, #2 803096e: b2d2 uxtb r2, r2 8030970: 2a00 cmp r2, #0 8030972: f000 82df beq.w 8030f34 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); 8030976: 7e68 ldrb r0, [r5, #25] 8030978: f7ff fbc6 bl 8030108 /* 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) { 803097c: 4604 mov r4, r0 803097e: 2800 cmp r0, #0 8030980: f000 82d8 beq.w 8030f34 } #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); 8030984: 4b24 ldr r3, [pc, #144] ; (8030a18 ) 8030986: 681b ldr r3, [r3, #0] 8030988: 6003 str r3, [r0, #0] npcb->local_port = pcb->local_port; 803098a: 8b6b ldrh r3, [r5, #26] 803098c: 8343 strh r3, [r0, #26] ip_addr_copy(npcb->remote_ip, current_iphdr_src); 803098e: 4b28 ldr r3, [pc, #160] ; (8030a30 ) 8030990: 681b ldr r3, [r3, #0] 8030992: 6043 str r3, [r0, #4] npcb->remote_port = tcphdr->src; 8030994: 4b1f ldr r3, [pc, #124] ; (8030a14 ) 8030996: 681b ldr r3, [r3, #0] 8030998: 7859 ldrb r1, [r3, #1] 803099a: 781a ldrb r2, [r3, #0] 803099c: ea42 2201 orr.w r2, r2, r1, lsl #8 80309a0: 8382 strh r2, [r0, #28] npcb->state = SYN_RCVD; 80309a2: 2203 movs r2, #3 80309a4: 7602 strb r2, [r0, #24] npcb->rcv_nxt = seqno + 1; 80309a6: 4a1d ldr r2, [pc, #116] ; (8030a1c ) 80309a8: 6812 ldr r2, [r2, #0] 80309aa: 1c51 adds r1, r2, #1 80309ac: 6281 str r1, [r0, #40] ; 0x28 npcb->rcv_ann_right_edge = npcb->rcv_nxt; 80309ae: 6301 str r1, [r0, #48] ; 0x30 npcb->snd_wnd = tcphdr->wnd; 80309b0: 89db ldrh r3, [r3, #14] 80309b2: f8a0 3060 strh.w r3, [r0, #96] ; 0x60 npcb->snd_wnd_max = tcphdr->wnd; 80309b6: f8a0 3062 strh.w r3, [r0, #98] ; 0x62 npcb->ssthresh = npcb->snd_wnd; 80309ba: 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; 80309be: 692b ldr r3, [r5, #16] 80309c0: 6103 str r3, [r0, #16] #if LWIP_CALLBACK_API npcb->accept = pcb->accept; 80309c2: 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 */ 80309c4: 3a01 subs r2, #1 80309c6: 6542 str r2, [r0, #84] ; 0x54 npcb->callback_arg = pcb->callback_arg; #if LWIP_CALLBACK_API npcb->accept = pcb->accept; 80309c8: 6143 str r3, [r0, #20] #endif /* LWIP_CALLBACK_API */ /* inherit socket options */ npcb->so_options = pcb->so_options & SOF_INHERITED; 80309ca: 7a2b ldrb r3, [r5, #8] 80309cc: f023 0373 bic.w r3, r3, #115 ; 0x73 80309d0: 7203 strb r3, [r0, #8] /* Register the new PCB so that we can begin receiving segments for it. */ TCP_REG_ACTIVE(npcb); 80309d2: 4b16 ldr r3, [pc, #88] ; (8030a2c ) 80309d4: 681a ldr r2, [r3, #0] 80309d6: 6018 str r0, [r3, #0] 80309d8: 60c2 str r2, [r0, #12] 80309da: f001 f887 bl 8031aec 80309de: 4b17 ldr r3, [pc, #92] ; (8030a3c ) 80309e0: 2201 movs r2, #1 /* Parse any options in the SYN. */ tcp_parseopt(npcb); 80309e2: 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); 80309e4: 701a strb r2, [r3, #0] /* Parse any options in the SYN. */ tcp_parseopt(npcb); 80309e6: f7ff fc29 bl 803023c #if TCP_CALCULATE_EFF_SEND_MSS npcb->mss = tcp_eff_send_mss(npcb->mss, &(npcb->remote_ip)); 80309ea: 1d21 adds r1, r4, #4 80309ec: 8ee0 ldrh r0, [r4, #54] ; 0x36 80309ee: f7ff fc16 bl 803021e 80309f2: 86e0 strh r0, [r4, #54] ; 0x36 #endif /* TCP_CALCULATE_EFF_SEND_MSS */ snmp_inc_tcppassiveopens(); 80309f4: f003 fb5c bl 80340b0 /* Send a SYN|ACK together with the MSS option. */ rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK); 80309f8: 4620 mov r0, r4 80309fa: 2112 movs r1, #18 80309fc: f000 fd28 bl 8031450 if (rc != ERR_OK) { 8030a00: b120 cbz r0, 8030a0c tcp_abandon(npcb, 0); 8030a02: 4620 mov r0, r4 8030a04: 4641 mov r1, r8 8030a06: f7ff f9e1 bl 802fdcc 8030a0a: e293 b.n 8030f34 return rc; } return tcp_output(npcb); 8030a0c: 4620 mov r0, r4 8030a0e: e770 b.n 80308f2 8030a10: 2000c3fc .word 0x2000c3fc 8030a14: 2000c3e4 .word 0x2000c3e4 8030a18: 2000f6d4 .word 0x2000f6d4 8030a1c: 2000c3e8 .word 0x2000c3e8 8030a20: 2000c3f0 .word 0x2000c3f0 8030a24: 2000c3f4 .word 0x2000c3f4 8030a28: 2000c3ec .word 0x2000c3ec 8030a2c: 2000f6ac .word 0x2000f6ac 8030a30: 2000f6cc .word 0x2000f6cc 8030a34: 2000f6b0 .word 0x2000f6b0 8030a38: 2000f6b4 .word 0x2000f6b4 8030a3c: 2000f6a8 .word 0x2000f6a8 recv_data = NULL; recv_flags = 0; if (flags & TCP_PSH) { p->flags |= PBUF_FLAG_PUSH; 8030a40: 7b73 ldrb r3, [r6, #13] 8030a42: f043 0301 orr.w r3, r3, #1 8030a46: 7373 strb r3, [r6, #13] } /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 8030a48: 6f63 ldr r3, [r4, #116] ; 0x74 8030a4a: b163 cbz r3, 8030a66 if ((tcp_process_refused_data(pcb) == ERR_ABRT) || 8030a4c: 4620 mov r0, r4 8030a4e: f7ff fad1 bl 802fff4 8030a52: 300a adds r0, #10 8030a54: d004 beq.n 8030a60 8030a56: 6f63 ldr r3, [r4, #116] ; 0x74 8030a58: b12b cbz r3, 8030a66 ((pcb->refused_data != NULL) && (tcplen > 0))) { 8030a5a: 4b9f ldr r3, [pc, #636] ; (8030cd8 ) 8030a5c: 881b ldrh r3, [r3, #0] 8030a5e: b113 cbz r3, 8030a66 /* pcb has been aborted or refused data is still refused and the new segment contains data */ TCP_STATS_INC(tcp.drop); snmp_inc_tcpinerrs(); 8030a60: f003 fb56 bl 8034110 goto aborted; 8030a64: e249 b.n 8030efa } } tcp_input_pcb = pcb; 8030a66: 4b9d ldr r3, [pc, #628] ; (8030cdc ) 8030a68: 601c str r4, [r3, #0] err_t err; err = ERR_OK; /* Process incoming RST segments. */ if (flags & TCP_RST) { 8030a6a: 4b9d ldr r3, [pc, #628] ; (8030ce0 ) 8030a6c: 781b ldrb r3, [r3, #0] 8030a6e: f003 0204 and.w r2, r3, #4 8030a72: b2d2 uxtb r2, r2 8030a74: b1aa cbz r2, 8030aa2 /* First, determine if the reset is acceptable. */ if (pcb->state == SYN_SENT) { 8030a76: 7e23 ldrb r3, [r4, #24] 8030a78: 2b02 cmp r3, #2 8030a7a: d106 bne.n 8030a8a if (ackno == pcb->snd_nxt) { 8030a7c: 4b99 ldr r3, [pc, #612] ; (8030ce4 ) 8030a7e: 681a ldr r2, [r3, #0] 8030a80: 6d23 ldr r3, [r4, #80] ; 0x50 8030a82: 429a cmp r2, r3 8030a84: f040 82a1 bne.w 8030fca 8030a88: e296 b.n 8030fb8 acceptable = 1; } } else { if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, 8030a8a: 4b97 ldr r3, [pc, #604] ; (8030ce8 ) 8030a8c: 681a ldr r2, [r3, #0] 8030a8e: 6aa3 ldr r3, [r4, #40] ; 0x28 8030a90: 1ad3 subs r3, r2, r3 8030a92: f100 829a bmi.w 8030fca 8030a96: 8da1 ldrh r1, [r4, #44] ; 0x2c 8030a98: 1a5b subs r3, r3, r1 8030a9a: 2b00 cmp r3, #0 8030a9c: f300 8295 bgt.w 8030fca 8030aa0: e28a b.n 8030fb8 seqno, pcb->rcv_nxt)); return ERR_OK; } } if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) { 8030aa2: f003 0302 and.w r3, r3, #2 8030aa6: b2db uxtb r3, r3 8030aa8: b123 cbz r3, 8030ab4 8030aaa: 7e23 ldrb r3, [r4, #24] 8030aac: 3b02 subs r3, #2 8030aae: 2b01 cmp r3, #1 8030ab0: d900 bls.n 8030ab4 8030ab2: e06b b.n 8030b8c /* Cope with new connection attempt after remote end crashed */ tcp_ack_now(pcb); return ERR_OK; } if ((pcb->flags & TF_RXCLOSED) == 0) { 8030ab4: 7fa3 ldrb r3, [r4, #30] 8030ab6: f003 0310 and.w r3, r3, #16 8030aba: b2db uxtb r3, r3 8030abc: b913 cbnz r3, 8030ac4 /* Update the PCB (in)activity timer unless rx is closed (see tcp_shutdown) */ pcb->tmr = tcp_ticks; 8030abe: 4b8b ldr r3, [pc, #556] ; (8030cec ) 8030ac0: 681b ldr r3, [r3, #0] 8030ac2: 6263 str r3, [r4, #36] ; 0x24 } pcb->keep_cnt_sent = 0; 8030ac4: 2300 movs r3, #0 8030ac6: f884 3092 strb.w r3, [r4, #146] ; 0x92 tcp_parseopt(pcb); 8030aca: 4620 mov r0, r4 8030acc: f7ff fbb6 bl 803023c /* Do different things depending on the TCP state. */ switch (pcb->state) { 8030ad0: 7e23 ldrb r3, [r4, #24] 8030ad2: 3b02 subs r3, #2 8030ad4: 2b07 cmp r3, #7 8030ad6: f200 8278 bhi.w 8030fca 8030ada: e8df f013 tbh [pc, r3, lsl #1] 8030ade: 0008 .short 0x0008 8030ae0: 00c90077 .word 0x00c90077 8030ae4: 013000da .word 0x013000da 8030ae8: 015200c9 .word 0x015200c9 8030aec: 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) 8030aee: 4b7c ldr r3, [pc, #496] ; (8030ce0 ) 8030af0: 781b ldrb r3, [r3, #0] 8030af2: f003 0312 and.w r3, r3, #18 8030af6: 2b12 cmp r3, #18 8030af8: d153 bne.n 8030ba2 && ackno == ntohl(pcb->unacked->tcphdr->seqno) + 1) { 8030afa: 6f23 ldr r3, [r4, #112] ; 0x70 8030afc: 4d79 ldr r5, [pc, #484] ; (8030ce4 ) 8030afe: 68db ldr r3, [r3, #12] 8030b00: 682e ldr r6, [r5, #0] 8030b02: 6858 ldr r0, [r3, #4] 8030b04: f7fd fbc6 bl 802e294 8030b08: 3001 adds r0, #1 8030b0a: 4286 cmp r6, r0 8030b0c: d149 bne.n 8030ba2 pcb->snd_buf++; 8030b0e: 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)); 8030b12: 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++; 8030b14: 3301 adds r3, #1 8030b16: f8a4 3066 strh.w r3, [r4, #102] ; 0x66 pcb->rcv_nxt = seqno + 1; 8030b1a: 4b73 ldr r3, [pc, #460] ; (8030ce8 ) 8030b1c: 681b ldr r3, [r3, #0] 8030b1e: 1c5a adds r2, r3, #1 8030b20: 62a2 str r2, [r4, #40] ; 0x28 pcb->rcv_ann_right_edge = pcb->rcv_nxt; 8030b22: 6322 str r2, [r4, #48] ; 0x30 pcb->lastack = ackno; 8030b24: 682a ldr r2, [r5, #0] 8030b26: 64a2 str r2, [r4, #72] ; 0x48 pcb->snd_wnd = tcphdr->wnd; 8030b28: 4a71 ldr r2, [pc, #452] ; (8030cf0 ) 8030b2a: 6812 ldr r2, [r2, #0] pcb->snd_wnd_max = tcphdr->wnd; pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ 8030b2c: 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; 8030b2e: 89d2 ldrh r2, [r2, #14] pcb->snd_wnd_max = tcphdr->wnd; pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ 8030b30: 6563 str r3, [r4, #84] ; 0x54 pcb->state = ESTABLISHED; 8030b32: 2304 movs r3, #4 8030b34: 7623 strb r3, [r4, #24] #if TCP_CALCULATE_EFF_SEND_MSS pcb->mss = tcp_eff_send_mss(pcb->mss, &(pcb->remote_ip)); 8030b36: 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; 8030b38: f8a4 2060 strh.w r2, [r4, #96] ; 0x60 pcb->snd_wnd_max = tcphdr->wnd; 8030b3c: 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)); 8030b40: f7ff fb6d bl 803021e #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; 8030b44: 230a movs r3, #10 8030b46: 4343 muls r3, r0 8030b48: f8a4 304e strh.w r3, [r4, #78] ; 0x4e pcb->cwnd = ((pcb->cwnd == 1) ? (pcb->mss * 2) : pcb->mss); 8030b4c: 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)); 8030b50: 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); 8030b52: 2b01 cmp r3, #1 8030b54: d101 bne.n 8030b5a 8030b56: 0040 lsls r0, r0, #1 8030b58: b280 uxth r0, r0 LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0)); --pcb->snd_queuelen; 8030b5a: 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); 8030b5e: 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; 8030b62: 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; 8030b64: 3b01 subs r3, #1 8030b66: 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; 8030b6a: 6803 ldr r3, [r0, #0] 8030b6c: 6723 str r3, [r4, #112] ; 0x70 tcp_seg_free(rseg); 8030b6e: f7fe ff70 bl 802fa52 /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if(pcb->unacked == NULL) 8030b72: 6f23 ldr r3, [r4, #112] ; 0x70 8030b74: b91b cbnz r3, 8030b7e pcb->rtime = -1; 8030b76: f64f 73ff movw r3, #65535 ; 0xffff 8030b7a: 86a3 strh r3, [r4, #52] ; 0x34 8030b7c: e003 b.n 8030b86 else { pcb->rtime = 0; 8030b7e: 2300 movs r3, #0 8030b80: 86a3 strh r3, [r4, #52] ; 0x34 pcb->nrtx = 0; 8030b82: 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); 8030b86: f8d4 3080 ldr.w r3, [r4, #128] ; 0x80 8030b8a: b91b cbnz r3, 8030b94 if (err == ERR_ABRT) { return ERR_ABRT; } tcp_ack_now(pcb); 8030b8c: 7fa3 ldrb r3, [r4, #30] 8030b8e: f043 0302 orr.w r3, r3, #2 8030b92: e219 b.n 8030fc8 pcb->nrtx = 0; } /* Call the user specified function to call when sucessfully * connected. */ TCP_EVENT_CONNECTED(pcb, ERR_OK, err); 8030b94: 2200 movs r2, #0 8030b96: 6920 ldr r0, [r4, #16] 8030b98: 4621 mov r1, r4 8030b9a: 4798 blx r3 if (err == ERR_ABRT) { 8030b9c: 300a adds r0, #10 8030b9e: d1f5 bne.n 8030b8c 8030ba0: e1ab b.n 8030efa return ERR_ABRT; } tcp_ack_now(pcb); } /* received ACK? possibly a half-open connection */ else if (flags & TCP_ACK) { 8030ba2: 4b4f ldr r3, [pc, #316] ; (8030ce0 ) 8030ba4: 781b ldrb r3, [r3, #0] 8030ba6: f003 0310 and.w r3, r3, #16 8030baa: b2db uxtb r3, r3 8030bac: 2b00 cmp r3, #0 8030bae: f000 820c beq.w 8030fca /* 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); 8030bb2: 4b4f ldr r3, [pc, #316] ; (8030cf0 ) 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(), 8030bb4: 4a48 ldr r2, [pc, #288] ; (8030cd8 ) tcphdr->dest, tcphdr->src); 8030bb6: 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(), 8030bb8: 8811 ldrh r1, [r2, #0] 8030bba: 8858 ldrh r0, [r3, #2] 8030bbc: 4a4a ldr r2, [pc, #296] ; (8030ce8 ) 8030bbe: 6812 ldr r2, [r2, #0] 8030bc0: 9000 str r0, [sp, #0] 8030bc2: 881b ldrh r3, [r3, #0] 8030bc4: 9301 str r3, [sp, #4] 8030bc6: 4b47 ldr r3, [pc, #284] ; (8030ce4 ) 8030bc8: 6818 ldr r0, [r3, #0] 8030bca: e03a b.n 8030c42 tcphdr->dest, tcphdr->src); } break; case SYN_RCVD: if (flags & TCP_ACK) { 8030bcc: 4b44 ldr r3, [pc, #272] ; (8030ce0 ) 8030bce: 781b ldrb r3, [r3, #0] 8030bd0: f003 0210 and.w r2, r3, #16 8030bd4: b2d2 uxtb r2, r2 8030bd6: 2a00 cmp r2, #0 8030bd8: d039 beq.n 8030c4e /* expected ACK number? */ if (TCP_SEQ_BETWEEN(ackno, pcb->lastack+1, pcb->snd_nxt)) { 8030bda: 4b42 ldr r3, [pc, #264] ; (8030ce4 ) 8030bdc: 6818 ldr r0, [r3, #0] 8030bde: 6ca3 ldr r3, [r4, #72] ; 0x48 8030be0: 43db mvns r3, r3 8030be2: 42c3 cmn r3, r0 8030be4: d423 bmi.n 8030c2e 8030be6: 6d23 ldr r3, [r4, #80] ; 0x50 8030be8: 1ac3 subs r3, r0, r3 8030bea: 2b00 cmp r3, #0 8030bec: dc1f bgt.n 8030c2e u16_t old_cwnd; pcb->state = ESTABLISHED; 8030bee: 2304 movs r3, #4 8030bf0: 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); 8030bf2: 6963 ldr r3, [r4, #20] 8030bf4: b903 cbnz r3, 8030bf8 8030bf6: e147 b.n 8030e88 8030bf8: 6920 ldr r0, [r4, #16] 8030bfa: 4621 mov r1, r4 8030bfc: 2200 movs r2, #0 8030bfe: 4798 blx r3 if (err != ERR_OK) { 8030c00: b118 cbz r0, 8030c0a /* If the accept function returns with an error, we abort * the connection. */ /* Already aborted? */ if (err != ERR_ABRT) { 8030c02: 300a adds r0, #10 8030c04: f040 8140 bne.w 8030e88 8030c08: e177 b.n 8030efa 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); 8030c0a: 4620 mov r0, r4 if (err != ERR_ABRT) { tcp_abort(pcb); } return ERR_ABRT; } old_cwnd = pcb->cwnd; 8030c0c: 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); 8030c10: f7ff fb54 bl 80302bc /* Prevent ACK for SYN to generate a sent event */ if (pcb->acked != 0) { 8030c14: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 8030c18: b113 cbz r3, 8030c20 pcb->acked--; 8030c1a: 3b01 subs r3, #1 8030c1c: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 } pcb->cwnd = ((old_cwnd == 1) ? (pcb->mss * 2) : pcb->mss); 8030c20: 8ee3 ldrh r3, [r4, #54] ; 0x36 8030c22: 2d01 cmp r5, #1 8030c24: bf08 it eq 8030c26: 005b lsleq r3, r3, #1 8030c28: f8a4 304c strh.w r3, [r4, #76] ; 0x4c 8030c2c: e023 b.n 8030c76 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); 8030c2e: 4b30 ldr r3, [pc, #192] ; (8030cf0 ) 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(), 8030c30: 4a29 ldr r2, [pc, #164] ; (8030cd8 ) tcphdr->dest, tcphdr->src); 8030c32: 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(), 8030c34: 8811 ldrh r1, [r2, #0] 8030c36: 885d ldrh r5, [r3, #2] 8030c38: 4a2b ldr r2, [pc, #172] ; (8030ce8 ) 8030c3a: 6812 ldr r2, [r2, #0] 8030c3c: 9500 str r5, [sp, #0] 8030c3e: 881b ldrh r3, [r3, #0] 8030c40: 9301 str r3, [sp, #4] 8030c42: 1889 adds r1, r1, r2 8030c44: 4b2b ldr r3, [pc, #172] ; (8030cf4 ) 8030c46: 4a2c ldr r2, [pc, #176] ; (8030cf8 ) 8030c48: f000 fdb6 bl 80317b8 8030c4c: e1bd b.n 8030fca tcphdr->dest, tcphdr->src); } } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) { 8030c4e: f003 0302 and.w r3, r3, #2 8030c52: b2db uxtb r3, r3 8030c54: 2b00 cmp r3, #0 8030c56: f000 81b8 beq.w 8030fca 8030c5a: 4a23 ldr r2, [pc, #140] ; (8030ce8 ) 8030c5c: 6aa3 ldr r3, [r4, #40] ; 0x28 8030c5e: 6812 ldr r2, [r2, #0] 8030c60: 3b01 subs r3, #1 8030c62: 429a cmp r2, r3 8030c64: f040 81b1 bne.w 8030fca /* Looks like another copy of the SYN - retransmit our SYN-ACK */ tcp_rexmit(pcb); 8030c68: 4620 mov r0, r4 8030c6a: f000 fe03 bl 8031874 8030c6e: e1ac b.n 8030fca } break; case CLOSE_WAIT: /* FALLTHROUGH */ case ESTABLISHED: tcp_receive(pcb); 8030c70: 4620 mov r0, r4 8030c72: f7ff fb23 bl 80302bc if (recv_flags & TF_GOT_FIN) { /* passive close */ 8030c76: 4b21 ldr r3, [pc, #132] ; (8030cfc ) 8030c78: 781b ldrb r3, [r3, #0] 8030c7a: f003 0320 and.w r3, r3, #32 8030c7e: b2db uxtb r3, r3 8030c80: 2b00 cmp r3, #0 8030c82: f000 81a2 beq.w 8030fca tcp_ack_now(pcb); 8030c86: 7fa3 ldrb r3, [r4, #30] 8030c88: f043 0302 orr.w r3, r3, #2 8030c8c: 77a3 strb r3, [r4, #30] pcb->state = CLOSE_WAIT; 8030c8e: 2307 movs r3, #7 8030c90: e053 b.n 8030d3a } break; case FIN_WAIT_1: tcp_receive(pcb); 8030c92: 4620 mov r0, r4 8030c94: f7ff fb12 bl 80302bc if (recv_flags & TF_GOT_FIN) { 8030c98: 4b18 ldr r3, [pc, #96] ; (8030cfc ) 8030c9a: 781a ldrb r2, [r3, #0] 8030c9c: 4b10 ldr r3, [pc, #64] ; (8030ce0 ) if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 8030c9e: 781b ldrb r3, [r3, #0] pcb->state = CLOSE_WAIT; } break; case FIN_WAIT_1: tcp_receive(pcb); if (recv_flags & TF_GOT_FIN) { 8030ca0: f002 0220 and.w r2, r2, #32 if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 8030ca4: 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) { 8030ca8: b2d2 uxtb r2, r2 if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 8030caa: b2db uxtb r3, r3 pcb->state = CLOSE_WAIT; } break; case FIN_WAIT_1: tcp_receive(pcb); if (recv_flags & TF_GOT_FIN) { 8030cac: 2a00 cmp r2, #0 8030cae: d03a beq.n 8030d26 if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 8030cb0: 2b00 cmp r3, #0 8030cb2: d032 beq.n 8030d1a 8030cb4: 4b0b ldr r3, [pc, #44] ; (8030ce4 ) 8030cb6: 681a ldr r2, [r3, #0] 8030cb8: 6d23 ldr r3, [r4, #80] ; 0x50 8030cba: 429a cmp r2, r3 8030cbc: d12d bne.n 8030d1a 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); 8030cbe: 7fa3 ldrb r3, [r4, #30] 8030cc0: f043 0302 orr.w r3, r3, #2 8030cc4: 77a3 strb r3, [r4, #30] tcp_pcb_purge(pcb); 8030cc6: 4620 mov r0, r4 8030cc8: f7fe feea bl 802faa0 TCP_RMV_ACTIVE(pcb); 8030ccc: 4a0c ldr r2, [pc, #48] ; (8030d00 ) 8030cce: 6813 ldr r3, [r2, #0] 8030cd0: 42a3 cmp r3, r4 8030cd2: d117 bne.n 8030d04 8030cd4: e06d b.n 8030db2 8030cd6: bf00 nop 8030cd8: 2000c3ec .word 0x2000c3ec 8030cdc: 2000f6c4 .word 0x2000f6c4 8030ce0: 2000c3f4 .word 0x2000c3f4 8030ce4: 2000c3f0 .word 0x2000c3f0 8030ce8: 2000c3e8 .word 0x2000c3e8 8030cec: 2000f6b0 .word 0x2000f6b0 8030cf0: 2000c3e4 .word 0x2000c3e4 8030cf4: 2000f6cc .word 0x2000f6cc 8030cf8: 2000f6d4 .word 0x2000f6d4 8030cfc: 2000c3f5 .word 0x2000c3f5 8030d00: 2000f6ac .word 0x2000f6ac 8030d04: 4a8e ldr r2, [pc, #568] ; (8030f40 ) 8030d06: 6013 str r3, [r2, #0] 8030d08: e004 b.n 8030d14 8030d0a: 68d9 ldr r1, [r3, #12] 8030d0c: 42a1 cmp r1, r4 8030d0e: d100 bne.n 8030d12 8030d10: e057 b.n 8030dc2 8030d12: 460b mov r3, r1 8030d14: 2b00 cmp r3, #0 8030d16: d1f8 bne.n 8030d0a 8030d18: e05a b.n 8030dd0 pcb->state = TIME_WAIT; TCP_REG(&tcp_tw_pcbs, pcb); } else { tcp_ack_now(pcb); 8030d1a: 7fa3 ldrb r3, [r4, #30] 8030d1c: f043 0302 orr.w r3, r3, #2 8030d20: 77a3 strb r3, [r4, #30] pcb->state = CLOSING; 8030d22: 2308 movs r3, #8 8030d24: e009 b.n 8030d3a } } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 8030d26: 2b00 cmp r3, #0 8030d28: f000 814f beq.w 8030fca 8030d2c: 4b85 ldr r3, [pc, #532] ; (8030f44 ) 8030d2e: 681a ldr r2, [r3, #0] 8030d30: 6d23 ldr r3, [r4, #80] ; 0x50 8030d32: 429a cmp r2, r3 8030d34: f040 8149 bne.w 8030fca pcb->state = FIN_WAIT_2; 8030d38: 2306 movs r3, #6 8030d3a: 7623 strb r3, [r4, #24] 8030d3c: e145 b.n 8030fca } break; case FIN_WAIT_2: tcp_receive(pcb); 8030d3e: 4620 mov r0, r4 8030d40: f7ff fabc bl 80302bc if (recv_flags & TF_GOT_FIN) { 8030d44: 4b80 ldr r3, [pc, #512] ; (8030f48 ) 8030d46: 781b ldrb r3, [r3, #0] 8030d48: f003 0320 and.w r3, r3, #32 8030d4c: b2db uxtb r3, r3 8030d4e: 2b00 cmp r3, #0 8030d50: f000 813b beq.w 8030fca 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); 8030d54: 7fa3 ldrb r3, [r4, #30] 8030d56: f043 0302 orr.w r3, r3, #2 8030d5a: 77a3 strb r3, [r4, #30] tcp_pcb_purge(pcb); 8030d5c: 4620 mov r0, r4 8030d5e: f7fe fe9f bl 802faa0 TCP_RMV_ACTIVE(pcb); 8030d62: 4a7a ldr r2, [pc, #488] ; (8030f4c ) 8030d64: 6813 ldr r3, [r2, #0] 8030d66: 42a3 cmp r3, r4 8030d68: d100 bne.n 8030d6c 8030d6a: e022 b.n 8030db2 8030d6c: 4a74 ldr r2, [pc, #464] ; (8030f40 ) 8030d6e: 6013 str r3, [r2, #0] 8030d70: e004 b.n 8030d7c 8030d72: 68d9 ldr r1, [r3, #12] 8030d74: 42a1 cmp r1, r4 8030d76: d100 bne.n 8030d7a 8030d78: e023 b.n 8030dc2 8030d7a: 460b mov r3, r1 8030d7c: 2b00 cmp r3, #0 8030d7e: d1f8 bne.n 8030d72 8030d80: e026 b.n 8030dd0 pcb->state = TIME_WAIT; TCP_REG(&tcp_tw_pcbs, pcb); } break; case CLOSING: tcp_receive(pcb); 8030d82: 4620 mov r0, r4 8030d84: f7ff fa9a bl 80302bc if (flags & TCP_ACK && ackno == pcb->snd_nxt) { 8030d88: 4b71 ldr r3, [pc, #452] ; (8030f50 ) 8030d8a: 781b ldrb r3, [r3, #0] 8030d8c: f003 0310 and.w r3, r3, #16 8030d90: b2db uxtb r3, r3 8030d92: 2b00 cmp r3, #0 8030d94: f000 8119 beq.w 8030fca 8030d98: 4b6a ldr r3, [pc, #424] ; (8030f44 ) 8030d9a: 681a ldr r2, [r3, #0] 8030d9c: 6d23 ldr r3, [r4, #80] ; 0x50 8030d9e: 429a cmp r2, r3 8030da0: f040 8113 bne.w 8030fca LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: CLOSING %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); tcp_pcb_purge(pcb); 8030da4: 4620 mov r0, r4 8030da6: f7fe fe7b bl 802faa0 TCP_RMV_ACTIVE(pcb); 8030daa: 4a68 ldr r2, [pc, #416] ; (8030f4c ) 8030dac: 6813 ldr r3, [r2, #0] 8030dae: 42a3 cmp r3, r4 8030db0: d101 bne.n 8030db6 8030db2: 68e3 ldr r3, [r4, #12] 8030db4: e00c b.n 8030dd0 8030db6: 4a62 ldr r2, [pc, #392] ; (8030f40 ) 8030db8: 6013 str r3, [r2, #0] 8030dba: e007 b.n 8030dcc 8030dbc: 68d9 ldr r1, [r3, #12] 8030dbe: 42a1 cmp r1, r4 8030dc0: d103 bne.n 8030dca 8030dc2: 6013 str r3, [r2, #0] 8030dc4: 68e2 ldr r2, [r4, #12] 8030dc6: 60da str r2, [r3, #12] 8030dc8: e003 b.n 8030dd2 8030dca: 460b mov r3, r1 8030dcc: 2b00 cmp r3, #0 8030dce: d1f5 bne.n 8030dbc 8030dd0: 6013 str r3, [r2, #0] 8030dd2: 4b60 ldr r3, [pc, #384] ; (8030f54 ) 8030dd4: 2201 movs r2, #1 8030dd6: 701a strb r2, [r3, #0] pcb->state = TIME_WAIT; 8030dd8: 230a movs r3, #10 8030dda: 7623 strb r3, [r4, #24] TCP_REG(&tcp_tw_pcbs, pcb); 8030ddc: 4b5e ldr r3, [pc, #376] ; (8030f58 ) 8030dde: 681a ldr r2, [r3, #0] 8030de0: 601c str r4, [r3, #0] 8030de2: 60e2 str r2, [r4, #12] 8030de4: f000 fe82 bl 8031aec 8030de8: e0ef b.n 8030fca } break; case LAST_ACK: tcp_receive(pcb); 8030dea: 4620 mov r0, r4 8030dec: f7ff fa66 bl 80302bc if (flags & TCP_ACK && ackno == pcb->snd_nxt) { 8030df0: 4b57 ldr r3, [pc, #348] ; (8030f50 ) 8030df2: 781b ldrb r3, [r3, #0] 8030df4: f003 0310 and.w r3, r3, #16 8030df8: b2db uxtb r3, r3 8030dfa: 2b00 cmp r3, #0 8030dfc: f000 80e5 beq.w 8030fca 8030e00: 4b50 ldr r3, [pc, #320] ; (8030f44 ) 8030e02: 681a ldr r2, [r3, #0] 8030e04: 6d23 ldr r3, [r4, #80] ; 0x50 8030e06: 429a cmp r2, r3 8030e08: f040 80df bne.w 8030fca 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; 8030e0c: 4b4e ldr r3, [pc, #312] ; (8030f48 ) 8030e0e: 781a ldrb r2, [r3, #0] 8030e10: f042 0210 orr.w r2, r2, #16 8030e14: 701a strb r2, [r3, #0] 8030e16: e0d8 b.n 8030fca 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); 8030e18: f8d4 3088 ldr.w r3, [r4, #136] ; 0x88 8030e1c: b19b cbz r3, 8030e46 8030e1e: 6920 ldr r0, [r4, #16] 8030e20: f06f 010a mvn.w r1, #10 8030e24: e00e b.n 8030e44 tcp_pcb_remove(&tcp_active_pcbs, pcb); memp_free(MEMP_TCP_PCB, pcb); } else if (recv_flags & TF_CLOSED) { 8030e26: f003 0310 and.w r3, r3, #16 8030e2a: b2db uxtb r3, r3 8030e2c: b1a3 cbz r3, 8030e58 /* The connection has been closed and we will deallocate the PCB. */ if (!(pcb->flags & TF_RXCLOSED)) { 8030e2e: 7fa3 ldrb r3, [r4, #30] 8030e30: f003 0310 and.w r3, r3, #16 8030e34: b2db uxtb r3, r3 8030e36: b933 cbnz r3, 8030e46 /* 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); 8030e38: f8d4 3088 ldr.w r3, [r4, #136] ; 0x88 8030e3c: b11b cbz r3, 8030e46 8030e3e: 6920 ldr r0, [r4, #16] 8030e40: f06f 010b mvn.w r1, #11 8030e44: 4798 blx r3 } tcp_pcb_remove(&tcp_active_pcbs, pcb); 8030e46: 4621 mov r1, r4 8030e48: 4840 ldr r0, [pc, #256] ; (8030f4c ) 8030e4a: f7fe ff91 bl 802fd70 memp_free(MEMP_TCP_PCB, pcb); 8030e4e: 2002 movs r0, #2 8030e50: 4621 mov r1, r4 8030e52: f7fe fa47 bl 802f2e4 8030e56: e050 b.n 8030efa } 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) { 8030e58: f8b4 2064 ldrh.w r2, [r4, #100] ; 0x64 8030e5c: b91a cbnz r2, 8030e66 if (err == ERR_ABRT) { goto aborted; } } if (recv_data != NULL) { 8030e5e: 4b3f ldr r3, [pc, #252] ; (8030f5c ) 8030e60: 681a ldr r2, [r3, #0] 8030e62: b94a cbnz r2, 8030e78 8030e64: e026 b.n 8030eb4 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); 8030e66: 6fa3 ldr r3, [r4, #120] ; 0x78 8030e68: 2b00 cmp r3, #0 8030e6a: d0f8 beq.n 8030e5e 8030e6c: 6920 ldr r0, [r4, #16] 8030e6e: 4621 mov r1, r4 8030e70: 4798 blx r3 if (err == ERR_ABRT) { 8030e72: 300a adds r0, #10 8030e74: d1f3 bne.n 8030e5e 8030e76: e040 b.n 8030efa } } if (recv_data != NULL) { LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL); if (pcb->flags & TF_RXCLOSED) { 8030e78: 7fa3 ldrb r3, [r4, #30] 8030e7a: f003 0310 and.w r3, r3, #16 8030e7e: b2db uxtb r3, r3 8030e80: b133 cbz r3, 8030e90 /* received data although already closed -> abort (send RST) to notify the remote host that not all data has been processed */ pbuf_free(recv_data); 8030e82: 4610 mov r0, r2 8030e84: f7fe fb38 bl 802f4f8 tcp_abort(pcb); 8030e88: 4620 mov r0, r4 8030e8a: f7fe ffe5 bl 802fe58 goto aborted; 8030e8e: e034 b.n 8030efa } /* Notify application that data has been received. */ TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err); 8030e90: 6fe5 ldr r5, [r4, #124] ; 0x7c 8030e92: b11d cbz r5, 8030e9c 8030e94: 6920 ldr r0, [r4, #16] 8030e96: 4621 mov r1, r4 8030e98: 47a8 blx r5 8030e9a: e004 b.n 8030ea6 8030e9c: 4628 mov r0, r5 8030e9e: 4621 mov r1, r4 8030ea0: 462b mov r3, r5 8030ea2: f7ff f895 bl 802ffd0 if (err == ERR_ABRT) { 8030ea6: b243 sxtb r3, r0 8030ea8: 330a adds r3, #10 8030eaa: d026 beq.n 8030efa goto aborted; } /* If the upper layer can't receive this data, store it */ if (err != ERR_OK) { 8030eac: b110 cbz r0, 8030eb4 pcb->refused_data = recv_data; 8030eae: 4b2b ldr r3, [pc, #172] ; (8030f5c ) 8030eb0: 681b ldr r3, [r3, #0] 8030eb2: 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) { 8030eb4: 4b24 ldr r3, [pc, #144] ; (8030f48 ) 8030eb6: 781b ldrb r3, [r3, #0] 8030eb8: f003 0320 and.w r3, r3, #32 8030ebc: b2db uxtb r3, r3 8030ebe: b1b3 cbz r3, 8030eee if (pcb->refused_data != NULL) { 8030ec0: 6f63 ldr r3, [r4, #116] ; 0x74 8030ec2: b123 cbz r3, 8030ece /* Delay this if we have refused data. */ pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN; 8030ec4: 7b5a ldrb r2, [r3, #13] 8030ec6: f042 0220 orr.w r2, r2, #32 8030eca: 735a strb r2, [r3, #13] 8030ecc: e00f b.n 8030eee } else { /* correct rcv_wnd as the application won't call tcp_recved() for the FIN's seqno */ if (pcb->rcv_wnd != TCP_WND) { 8030ece: 8da3 ldrh r3, [r4, #44] ; 0x2c 8030ed0: f241 62d0 movw r2, #5840 ; 0x16d0 8030ed4: 4293 cmp r3, r2 8030ed6: d001 beq.n 8030edc pcb->rcv_wnd++; 8030ed8: 3301 adds r3, #1 8030eda: 85a3 strh r3, [r4, #44] ; 0x2c } TCP_EVENT_CLOSED(pcb, err); 8030edc: 6fe5 ldr r5, [r4, #124] ; 0x7c 8030ede: b135 cbz r5, 8030eee 8030ee0: 2200 movs r2, #0 8030ee2: 6920 ldr r0, [r4, #16] 8030ee4: 4621 mov r1, r4 8030ee6: 4613 mov r3, r2 8030ee8: 47a8 blx r5 if (err == ERR_ABRT) { 8030eea: 300a adds r0, #10 8030eec: d005 beq.n 8030efa goto aborted; } } } tcp_input_pcb = NULL; 8030eee: 4b1c ldr r3, [pc, #112] ; (8030f60 ) 8030ef0: 2200 movs r2, #0 /* Try to send something out. */ tcp_output(pcb); 8030ef2: 4620 mov r0, r4 goto aborted; } } } tcp_input_pcb = NULL; 8030ef4: 601a str r2, [r3, #0] /* Try to send something out. */ tcp_output(pcb); 8030ef6: f000 fb3b bl 8031570 } } /* 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; 8030efa: 4b19 ldr r3, [pc, #100] ; (8030f60 ) recv_data = NULL; /* give up our reference to inseg.p */ if (inseg.p != NULL) 8030efc: 4d19 ldr r5, [pc, #100] ; (8030f64 ) } } /* 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; 8030efe: 2400 movs r4, #0 8030f00: 601c str r4, [r3, #0] recv_data = NULL; /* give up our reference to inseg.p */ if (inseg.p != NULL) 8030f02: 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; 8030f04: 4b15 ldr r3, [pc, #84] ; (8030f5c ) 8030f06: 601c str r4, [r3, #0] /* give up our reference to inseg.p */ if (inseg.p != NULL) 8030f08: 2800 cmp r0, #0 8030f0a: d067 beq.n 8030fdc { pbuf_free(inseg.p); 8030f0c: f7fe faf4 bl 802f4f8 inseg.p = NULL; 8030f10: 606c str r4, [r5, #4] 8030f12: e063 b.n 8030fdc 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); 8030f14: 4b14 ldr r3, [pc, #80] ; (8030f68 ) 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, 8030f16: 4a15 ldr r2, [pc, #84] ; (8030f6c ) ip_current_dest_addr(), ip_current_src_addr(), tcphdr->dest, tcphdr->src); 8030f18: 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, 8030f1a: 8811 ldrh r1, [r2, #0] 8030f1c: 8858 ldrh r0, [r3, #2] 8030f1e: 4a14 ldr r2, [pc, #80] ; (8030f70 ) 8030f20: 6812 ldr r2, [r2, #0] 8030f22: 9000 str r0, [sp, #0] 8030f24: 881b ldrh r3, [r3, #0] 8030f26: 9301 str r3, [sp, #4] 8030f28: 4b06 ldr r3, [pc, #24] ; (8030f44 ) 8030f2a: 1889 adds r1, r1, r2 8030f2c: 6818 ldr r0, [r3, #0] 8030f2e: e517 b.n 8030960 LWIP_ASSERT("tcp_input: tcp_pcbs_sane()", tcp_pcbs_sane()); PERF_STOP("tcp_input"); return; dropped: TCP_STATS_INC(tcp.drop); snmp_inc_tcpinerrs(); 8030f30: f003 f8ee bl 8034110 pbuf_free(p); 8030f34: 4630 mov r0, r6 } 8030f36: b003 add sp, #12 8030f38: 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); 8030f3c: f7fe badc b.w 802f4f8 8030f40: 2000f6b8 .word 0x2000f6b8 8030f44: 2000c3f0 .word 0x2000c3f0 8030f48: 2000c3f5 .word 0x2000c3f5 8030f4c: 2000f6ac .word 0x2000f6ac 8030f50: 2000c3f4 .word 0x2000c3f4 8030f54: 2000f6a8 .word 0x2000f6a8 8030f58: 2000f6c0 .word 0x2000f6c0 8030f5c: 2000c3f8 .word 0x2000c3f8 8030f60: 2000f6c4 .word 0x2000f6c4 8030f64: 2000c400 .word 0x2000c400 8030f68: 2000c3e4 .word 0x2000c3e4 8030f6c: 2000c3ec .word 0x2000c3ec 8030f70: 2000c3e8 .word 0x2000c3e8 } 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) { 8030f74: 4b1b ldr r3, [pc, #108] ; (8030fe4 ) 8030f76: 681b ldr r3, [r3, #0] 8030f78: e4bf b.n 80308fa tcp_debug_print_state(pcb->state); #endif /* TCP_DEBUG */ #endif /* TCP_INPUT_DEBUG */ /* Set up a tcp_seg structure. */ inseg.next = NULL; 8030f7a: 4b1b ldr r3, [pc, #108] ; (8030fe8 ) 8030f7c: 2100 movs r1, #0 8030f7e: 6019 str r1, [r3, #0] inseg.len = p->tot_len; 8030f80: f8a3 8008 strh.w r8, [r3, #8] inseg.p = p; 8030f84: 605e str r6, [r3, #4] inseg.tcphdr = tcphdr; 8030f86: 60df str r7, [r3, #12] recv_data = NULL; 8030f88: 4b18 ldr r3, [pc, #96] ; (8030fec ) recv_flags = 0; if (flags & TCP_PSH) { 8030f8a: f002 0208 and.w r2, r2, #8 inseg.next = NULL; inseg.len = p->tot_len; inseg.p = p; inseg.tcphdr = tcphdr; recv_data = NULL; 8030f8e: 6019 str r1, [r3, #0] recv_flags = 0; 8030f90: 4b17 ldr r3, [pc, #92] ; (8030ff0 ) if (flags & TCP_PSH) { 8030f92: b2d2 uxtb r2, r2 inseg.len = p->tot_len; inseg.p = p; inseg.tcphdr = tcphdr; recv_data = NULL; recv_flags = 0; 8030f94: 7019 strb r1, [r3, #0] if (flags & TCP_PSH) { 8030f96: 2a00 cmp r2, #0 8030f98: f47f ad52 bne.w 8030a40 8030f9c: e554 b.n 8030a48 #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) { 8030f9e: 2b00 cmp r3, #0 8030fa0: f47f acc4 bne.w 803092c 8030fa4: e4c7 b.n 8030936 } 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)) { 8030fa6: 89b8 ldrh r0, [r7, #12] 8030fa8: f7fd f96d bl 802e286 8030fac: f000 0004 and.w r0, r0, #4 8030fb0: b280 uxth r0, r0 8030fb2: 2800 cmp r0, #0 8030fb4: d1be bne.n 8030f34 8030fb6: e7ad b.n 8030f14 } 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; 8030fb8: 4b0d ldr r3, [pc, #52] ; (8030ff0 ) 8030fba: 781a ldrb r2, [r3, #0] 8030fbc: f042 0208 orr.w r2, r2, #8 8030fc0: 701a strb r2, [r3, #0] pcb->flags &= ~TF_ACK_DELAY; 8030fc2: 7fa3 ldrb r3, [r4, #30] 8030fc4: f023 0301 bic.w r3, r3, #1 8030fc8: 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) { 8030fca: 4b09 ldr r3, [pc, #36] ; (8030ff0 ) 8030fcc: 781b ldrb r3, [r3, #0] 8030fce: f003 0208 and.w r2, r3, #8 8030fd2: b2d2 uxtb r2, r2 8030fd4: 2a00 cmp r2, #0 8030fd6: f47f af1f bne.w 8030e18 8030fda: e724 b.n 8030e26 return; dropped: TCP_STATS_INC(tcp.drop); snmp_inc_tcpinerrs(); pbuf_free(p); } 8030fdc: b003 add sp, #12 8030fde: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8030fe2: bf00 nop 8030fe4: 2000f6c0 .word 0x2000f6c0 8030fe8: 2000c400 .word 0x2000c400 8030fec: 2000c3f8 .word 0x2000c3f8 8030ff0: 2000c3f5 .word 0x2000c3f5 08030ff4 : #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) { 8030ff4: 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) { 8030ff6: 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) { 8030ff8: 460c mov r4, r1 8030ffa: 461e mov r6, r3 8030ffc: 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) { 8030ffe: d21a bcs.n 8031036 * * Did the user set TCP_WRITE_FLAG_MORE? * * Will the Nagle algorithm defer transmission of this segment? */ if ((apiflags & TCP_WRITE_FLAG_MORE) || 8031000: f89d 3014 ldrb.w r3, [sp, #20] 8031004: f003 0302 and.w r3, r3, #2 8031008: b2db uxtb r3, r3 803100a: b95b cbnz r3, 8031024 (!(pcb->flags & TF_NODELAY) && 803100c: 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) || 803100e: f003 0340 and.w r3, r3, #64 ; 0x40 8031012: b2db uxtb r3, r3 8031014: b97b cbnz r3, 8031036 (!(pcb->flags & TF_NODELAY) && 8031016: f89d 3018 ldrb.w r3, [sp, #24] 803101a: b11b cbz r3, 8031024 (!first_seg || 803101c: 6ee9 ldr r1, [r5, #108] ; 0x6c 803101e: b909 cbnz r1, 8031024 pcb->unsent != NULL || 8031020: 6f2b ldr r3, [r5, #112] ; 0x70 8031022: b143 cbz r3, 8031036 pcb->unacked != NULL))) { alloc = LWIP_MIN(max_length, LWIP_MEM_ALIGN_SIZE(length + TCP_OVERSIZE)); 8031024: f204 51b7 addw r1, r4, #1463 ; 0x5b7 8031028: f021 0103 bic.w r1, r1, #3 803102c: 4291 cmp r1, r2 803102e: bfa8 it ge 8031030: 4611 movge r1, r2 8031032: b289 uxth r1, r1 8031034: e000 b.n 8031038 * Will the Nagle algorithm defer transmission of this segment? */ if ((apiflags & TCP_WRITE_FLAG_MORE) || (!(pcb->flags & TF_NODELAY) && (!first_seg || pcb->unsent != NULL || 8031036: 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); 8031038: 2200 movs r2, #0 803103a: f7fe faaa bl 802f592 if (p == NULL) { 803103e: b120 cbz r0, 803104a return NULL; } LWIP_ASSERT("need unchained pbuf", p->next == NULL); *oversize = p->len - length; 8031040: 8943 ldrh r3, [r0, #10] 8031042: 1b1b subs r3, r3, r4 8031044: 8033 strh r3, [r6, #0] /* trim p->len to the currently used size */ p->len = p->tot_len = length; 8031046: 8104 strh r4, [r0, #8] 8031048: 8144 strh r4, [r0, #10] return p; } 803104a: bd70 pop {r4, r5, r6, pc} 0803104c : * 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) { 803104c: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8031050: f89d 6020 ldrb.w r6, [sp, #32] struct tcp_seg *seg; u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); 8031054: f006 0702 and.w r7, r6, #2 8031058: f016 0f01 tst.w r6, #1 803105c: 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) { 803105e: 4680 mov r8, r0 8031060: 469a mov sl, r3 struct tcp_seg *seg; u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); 8031062: bf0c ite eq 8031064: 2300 moveq r3, #0 8031066: 2304 movne r3, #4 8031068: 2f00 cmp r7, #0 803106a: bf14 ite ne 803106c: 270c movne r7, #12 803106e: 2700 moveq r7, #0 if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { 8031070: 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) { 8031072: 460d mov r5, r1 8031074: 4691 mov r9, r2 struct tcp_seg *seg; u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); 8031076: 18ff adds r7, r7, r3 if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { 8031078: f7fe f91e bl 802f2b8 803107c: 4604 mov r4, r0 803107e: b918 cbnz r0, 8031088 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_create_segment: no memory.\n")); pbuf_free(p); 8031080: 4628 mov r0, r5 8031082: f7fe fa39 bl 802f4f8 return NULL; 8031086: e030 b.n 80310ea } seg->flags = optflags; 8031088: 7286 strb r6, [r0, #10] seg->next = NULL; seg->p = p; seg->len = p->tot_len - optlen; 803108a: 892b ldrh r3, [r5, #8] pbuf_free(p); return NULL; } seg->flags = optflags; seg->next = NULL; seg->p = p; 803108c: 6045 str r5, [r0, #4] seg->len = p->tot_len - optlen; 803108e: 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; 8031090: 2600 movs r6, #0 8031092: 6006 str r6, [r0, #0] seg->p = p; seg->len = p->tot_len - optlen; 8031094: 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)) { 8031096: 2114 movs r1, #20 8031098: 4628 mov r0, r5 803109a: f7fe fa02 bl 802f4a2 803109e: 4605 mov r5, r0 80310a0: b120 cbz r0, 80310ac 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); 80310a2: 4620 mov r0, r4 80310a4: f7fe fcd5 bl 802fa52 return NULL; 80310a8: 4634 mov r4, r6 80310aa: e01e b.n 80310ea } seg->tcphdr = (struct tcp_hdr *)seg->p->payload; 80310ac: 6863 ldr r3, [r4, #4] seg->tcphdr->src = htons(pcb->local_port); 80310ae: 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; 80310b2: 685e ldr r6, [r3, #4] 80310b4: 60e6 str r6, [r4, #12] seg->tcphdr->src = htons(pcb->local_port); 80310b6: f7fd f8e1 bl 802e27c 80310ba: 8030 strh r0, [r6, #0] seg->tcphdr->dest = htons(pcb->remote_port); 80310bc: f8b8 001c ldrh.w r0, [r8, #28] 80310c0: 68e6 ldr r6, [r4, #12] 80310c2: f7fd f8db bl 802e27c 80310c6: 8070 strh r0, [r6, #2] seg->tcphdr->seqno = htonl(seqno); 80310c8: 4650 mov r0, sl 80310ca: 68e6 ldr r6, [r4, #12] 80310cc: f7fd f8e0 bl 802e290 /* ackno is set in tcp_output */ TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), flags); 80310d0: 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); 80310d2: 6070 str r0, [r6, #4] /* ackno is set in tcp_output */ TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), flags); 80310d4: f507 40a0 add.w r0, r7, #20480 ; 0x5000 80310d8: ea40 0009 orr.w r0, r0, r9 80310dc: 68e6 ldr r6, [r4, #12] 80310de: f7fd f8cd bl 802e27c 80310e2: 81b0 strh r0, [r6, #12] /* wnd and chksum are set in tcp_output */ seg->tcphdr->urgp = 0; 80310e4: 68e3 ldr r3, [r4, #12] 80310e6: 749d strb r5, [r3, #18] 80310e8: 74dd strb r5, [r3, #19] return seg; } 80310ea: 4620 mov r0, r4 80310ec: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 080310f0 : 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); 80310f0: 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, 80310f2: 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); 80310f4: 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, 80310f6: 4605 mov r5, r0 80310f8: 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); 80310fa: 2001 movs r0, #1 80310fc: 2200 movs r2, #0 80310fe: f7fe fa48 bl 802f592 if (p != NULL) { 8031102: 4606 mov r6, r0 8031104: b1f8 cbz r0, 8031146 LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", (p->len >= TCP_HLEN + optlen)); tcphdr = (struct tcp_hdr *)p->payload; 8031106: 6844 ldr r4, [r0, #4] tcphdr->src = htons(pcb->local_port); 8031108: 8b68 ldrh r0, [r5, #26] 803110a: f7fd f8b7 bl 802e27c 803110e: 8020 strh r0, [r4, #0] tcphdr->dest = htons(pcb->remote_port); 8031110: 8ba8 ldrh r0, [r5, #28] 8031112: f7fd f8b3 bl 802e27c tcphdr->seqno = seqno_be; 8031116: 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); 8031118: 8060 strh r0, [r4, #2] tcphdr->seqno = seqno_be; tcphdr->ackno = htonl(pcb->rcv_nxt); 803111a: 6aa8 ldr r0, [r5, #40] ; 0x28 803111c: f7fd f8b8 bl 802e290 8031120: 60a0 str r0, [r4, #8] TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), TCP_ACK); 8031122: f245 0010 movw r0, #20496 ; 0x5010 8031126: f7fd f8a9 bl 802e27c 803112a: 81a0 strh r0, [r4, #12] tcphdr->wnd = htons(pcb->rcv_ann_wnd); 803112c: 8de8 ldrh r0, [r5, #46] ; 0x2e 803112e: f7fd f8a5 bl 802e27c tcphdr->chksum = 0; 8031132: 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); 8031134: 81e0 strh r0, [r4, #14] tcphdr->chksum = 0; 8031136: 7423 strb r3, [r4, #16] 8031138: 7463 strb r3, [r4, #17] tcphdr->urgp = 0; 803113a: 74a3 strb r3, [r4, #18] 803113c: 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; 803113e: 8dea ldrh r2, [r5, #46] ; 0x2e 8031140: 6aab ldr r3, [r5, #40] ; 0x28 8031142: 18d3 adds r3, r2, r3 8031144: 632b str r3, [r5, #48] ; 0x30 } return p; } 8031146: 4630 mov r0, r6 8031148: bdf8 pop {r3, r4, r5, r6, r7, pc} 0803114a : * - 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) { 803114a: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 803114e: b08f sub sp, #60 ; 0x3c 8031150: 4691 mov r9, r2 8031152: 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; 8031154: 2300 movs r3, #0 8031156: 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) { 803115a: 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); 803115c: f8b0 2062 ldrh.w r2, [r0, #98] ; 0x62 8031160: 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)", 8031162: 9106 str r1, [sp, #24] 8031164: 2900 cmp r1, #0 8031166: f000 8168 beq.w 803143a 803116a: 7e01 ldrb r1, [r0, #24] 803116c: 2907 cmp r1, #7 803116e: f200 8166 bhi.w 803143e 8031172: f990 1018 ldrsb.w r1, [r0, #24] 8031176: f04f 5064 mov.w r0, #956301312 ; 0x39000000 803117a: 4088 lsls r0, r1 803117c: f140 815f bpl.w 803143e (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) { 8031180: f1b9 0f00 cmp.w r9, #0 8031184: d00d beq.n 80311a2 return ERR_OK; } /* fail on too much data */ if (len > pcb->snd_buf) { 8031186: f8b4 1066 ldrh.w r1, [r4, #102] ; 0x66 803118a: 4549 cmp r1, r9 803118c: d200 bcs.n 8031190 803118e: e003 b.n 8031198 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)) { 8031190: f8b4 1068 ldrh.w r1, [r4, #104] ; 0x68 8031194: 2947 cmp r1, #71 ; 0x47 8031196: d904 bls.n 80311a2 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; 8031198: 7fa3 ldrb r3, [r4, #30] 803119a: f063 037f orn r3, r3, #127 ; 0x7f 803119e: 77a3 strb r3, [r4, #30] 80311a0: e151 b.n 8031446 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); 80311a2: 0852 lsrs r2, r2, #1 * * pos records progress as data is segmented. */ /* Find the tail of the unsent queue. */ if (pcb->unsent != NULL) { 80311a4: 6ee6 ldr r6, [r4, #108] ; 0x6c err = tcp_write_checks(pcb, len); if (err != ERR_OK) { return err; } queuelen = pcb->snd_queuelen; 80311a6: 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); 80311aa: 429a cmp r2, r3 80311ac: bf28 it cs 80311ae: 461a movcs r2, r3 80311b0: 920a str r2, [sp, #40] ; 0x28 * * pos records progress as data is segmented. */ /* Find the tail of the unsent queue. */ if (pcb->unsent != NULL) { 80311b2: b90e cbnz r6, 80311b8 80311b4: e066 b.n 8031284 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); 80311b6: 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; 80311b8: 6833 ldr r3, [r6, #0] 80311ba: 2b00 cmp r3, #0 80311bc: d1fb bne.n 80311b6 last_unsent = last_unsent->next); /* Usable space at the end of the last unsent segment */ unsent_optlen = LWIP_TCP_OPT_LENGTH(last_unsent->flags); 80311be: 7ab3 ldrb r3, [r6, #10] space = mss_local - (last_unsent->len + unsent_optlen); 80311c0: 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); 80311c2: 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; 80311c4: 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); 80311c8: f013 0f01 tst.w r3, #1 80311cc: f003 0302 and.w r3, r3, #2 80311d0: bf0c ite eq 80311d2: 2100 moveq r1, #0 80311d4: 2104 movne r1, #4 80311d6: b2db uxtb r3, r3 80311d8: 1bc2 subs r2, r0, r7 80311da: 2b00 cmp r3, #0 80311dc: bf14 ite ne 80311de: 230c movne r3, #12 80311e0: 2300 moveq r3, #0 space = mss_local - (last_unsent->len + unsent_optlen); 80311e2: 1a52 subs r2, r2, r1 80311e4: 1ad2 subs r2, r2, r3 80311e6: 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) { 80311e8: b91d cbnz r5, 80311f2 #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; 80311ea: 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; 80311ee: 462b mov r3, r5 80311f0: e00a b.n 8031208 #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; 80311f2: 45a9 cmp r9, r5 80311f4: bf34 ite cc 80311f6: 464b movcc r3, r9 80311f8: 462b movcs r3, r5 pos += oversize_used; oversize -= oversize_used; 80311fa: 1aed subs r5, r5, r3 space -= oversize_used; 80311fc: 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; 80311fe: f8ad 5036 strh.w r5, [sp, #54] ; 0x36 space -= oversize_used; 8031202: 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; 8031204: 461d mov r5, r3 oversize -= oversize_used; space -= oversize_used; 8031206: 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)) { 8031208: 454d cmp r5, r9 803120a: d23f bcs.n 803128c 803120c: 2a00 cmp r2, #0 803120e: d03d beq.n 803128c 8031210: 2f00 cmp r7, #0 8031212: d03e beq.n 8031292 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) { 8031214: 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; 8031216: ebc5 0a09 rsb sl, r5, r9 803121a: 4592 cmp sl, r2 803121c: bfa8 it ge 803121e: 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) { 8031220: 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; 8031222: 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) { 8031226: d514 bpl.n 8031252 /* Data is copied */ if ((concat_p = tcp_pbuf_prealloc(PBUF_RAW, seglen, space, &oversize, pcb, apiflags, 1)) == NULL) { 8031228: 2301 movs r3, #1 803122a: 9101 str r1, [sp, #4] 803122c: 9302 str r3, [sp, #8] 803122e: 9400 str r4, [sp, #0] 8031230: 2003 movs r0, #3 8031232: 4641 mov r1, r8 8031234: f10d 0336 add.w r3, sp, #54 ; 0x36 8031238: f7ff fedc bl 8030ff4 803123c: 4607 mov r7, r0 803123e: 2800 cmp r0, #0 8031240: f000 80e9 beq.w 8031416 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); 8031244: 9a06 ldr r2, [sp, #24] 8031246: 6840 ldr r0, [r0, #4] 8031248: 1951 adds r1, r2, r5 803124a: 4642 mov r2, r8 803124c: f7f0 fcee bl 8021c2c 8031250: e00b b.n 803126a #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) { 8031252: 2003 movs r0, #3 8031254: 4641 mov r1, r8 8031256: 2201 movs r2, #1 8031258: f7fe f99b bl 802f592 803125c: 4607 mov r7, r0 803125e: 2800 cmp r0, #0 8031260: f000 80d9 beq.w 8031416 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; 8031264: 9806 ldr r0, [sp, #24] 8031266: 1943 adds r3, r0, r5 8031268: 607b str r3, [r7, #4] } pos += seglen; queuelen += pbuf_clen(concat_p); 803126a: 4638 mov r0, r7 803126c: f7fe fa18 bl 802f6a0 #endif /* TCP_CHECKSUM_ON_COPY */ /* reference the non-volatile payload data */ concat_p->payload = (u8_t*)arg + pos; } pos += seglen; 8031270: 44a8 add r8, r5 8031272: fa1f f888 uxth.w r8, r8 queuelen += pbuf_clen(concat_p); 8031276: 4458 add r0, fp 8031278: 46aa mov sl, r5 803127a: 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; 803127e: 4645 mov r5, r8 queuelen += pbuf_clen(concat_p); 8031280: 4633 mov r3, r6 8031282: e007 b.n 8031294 u16_t queuelen; u8_t optlen = 0; u8_t optflags = 0; #if TCP_OVERSIZE u16_t oversize = 0; u16_t oversize_used = 0; 8031284: 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 */ 8031286: 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; 8031288: 4633 mov r3, r6 803128a: e000 b.n 803128e * * 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)) { 803128c: 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; 803128e: 2700 movs r7, #0 8031290: e000 b.n 8031294 * * 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)) { 8031292: 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) { 8031294: 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) { 8031296: 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) { 803129a: 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) { 803129e: 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) { 80312a2: 9108 str r1, [sp, #32] 80312a4: e068 b.n 8031378 * 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; 80312a6: ebc5 0309 rsb r3, r5, r9 u16_t max_len = mss_local - optlen; u16_t seglen = left > max_len ? max_len : left; 80312aa: 9a0a ldr r2, [sp, #40] ; 0x28 80312ac: b29b uxth r3, r3 80312ae: 4293 cmp r3, r2 80312b0: bf38 it cc 80312b2: 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) { 80312b4: 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; 80312b6: 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) { 80312b8: b1db cbz r3, 80312f2 /* 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) { 80312ba: f1d8 0301 rsbs r3, r8, #1 80312be: 9807 ldr r0, [sp, #28] 80312c0: 9400 str r4, [sp, #0] 80312c2: bf38 it cc 80312c4: 2300 movcc r3, #0 80312c6: 9001 str r0, [sp, #4] 80312c8: 9302 str r3, [sp, #8] 80312ca: 4611 mov r1, r2 80312cc: 2000 movs r0, #0 80312ce: 9a0a ldr r2, [sp, #40] ; 0x28 80312d0: f10d 0336 add.w r3, sp, #54 ; 0x36 80312d4: f7ff fe8e bl 8030ff4 80312d8: 4684 mov ip, r0 80312da: 2800 cmp r0, #0 80312dc: f000 809e beq.w 803141c 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); 80312e0: 9a06 ldr r2, [sp, #24] 80312e2: 6840 ldr r0, [r0, #4] 80312e4: f8cd c014 str.w ip, [sp, #20] 80312e8: 1951 adds r1, r2, r5 80312ea: 9a09 ldr r2, [sp, #36] ; 0x24 80312ec: f7f0 fc9e bl 8021c2c 80312f0: e019 b.n 8031326 */ 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) { 80312f2: 9808 ldr r0, [sp, #32] 80312f4: 9909 ldr r1, [sp, #36] ; 0x24 80312f6: 2201 movs r2, #1 80312f8: f7fe f94b bl 802f592 80312fc: 4603 mov r3, r0 80312fe: 2800 cmp r0, #0 8031300: f000 808c beq.w 803141c #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; 8031304: 9806 ldr r0, [sp, #24] 8031306: 1942 adds r2, r0, r5 /* Second, allocate a pbuf for the headers. */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 8031308: 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; 803130a: 605a str r2, [r3, #4] /* Second, allocate a pbuf for the headers. */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 803130c: 4601 mov r1, r0 803130e: 4602 mov r2, r0 8031310: 9305 str r3, [sp, #20] 8031312: f7fe f93e bl 802f592 8031316: 9b05 ldr r3, [sp, #20] 8031318: b908 cbnz r0, 803131e /* If allocation fails, we have to deallocate the data pbuf as * well. */ pbuf_free(p2); 803131a: 4618 mov r0, r3 803131c: e013 b.n 8031346 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*/); 803131e: 4619 mov r1, r3 8031320: 9005 str r0, [sp, #20] 8031322: f7fe f9d3 bl 802f6cc 8031326: f8dd c014 ldr.w ip, [sp, #20] } queuelen += pbuf_clen(p); 803132a: 4660 mov r0, ip 803132c: f8cd c014 str.w ip, [sp, #20] 8031330: f7fe f9b6 bl 802f6a0 8031334: 4458 add r0, fp 8031336: 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)) { 803133a: f1bb 0f48 cmp.w fp, #72 ; 0x48 803133e: f8dd c014 ldr.w ip, [sp, #20] 8031342: d903 bls.n 803134c LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_write: queue too long %"U16_F" (%"U16_F")\n", queuelen, TCP_SND_QUEUELEN)); pbuf_free(p); 8031344: 4660 mov r0, ip 8031346: f7fe f8d7 bl 802f4f8 goto memerr; 803134a: e067 b.n 803141c } if ((seg = tcp_create_segment(pcb, p, 0, pcb->snd_lbb + pos, optflags)) == NULL) { 803134c: 6de3 ldr r3, [r4, #92] ; 0x5c 803134e: 2200 movs r2, #0 8031350: 18eb adds r3, r5, r3 8031352: 9200 str r2, [sp, #0] 8031354: 4620 mov r0, r4 8031356: 4661 mov r1, ip 8031358: f7ff fe78 bl 803104c 803135c: 4603 mov r3, r0 803135e: 2800 cmp r0, #0 8031360: d05c beq.n 803141c 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) { 8031362: f1b8 0f00 cmp.w r8, #0 8031366: d002 beq.n 803136e 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; 8031368: 990b ldr r1, [sp, #44] ; 0x2c 803136a: 6008 str r0, [r1, #0] 803136c: e000 b.n 8031370 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) { 803136e: 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; 8031370: 9a09 ldr r2, [sp, #36] ; 0x24 8031372: 930b str r3, [sp, #44] ; 0x2c 8031374: 1955 adds r5, r2, r5 8031376: 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) { 8031378: 454d cmp r5, r9 803137a: d394 bcc.n 80312a6 /* * 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) { 803137c: f1ba 0f00 cmp.w sl, #0 8031380: d019 beq.n 80313b6 struct pbuf *p; /* Bump tot_len of whole chain, len of tail */ for (p = last_unsent->p; p; p = p->next) { 8031382: 6875 ldr r5, [r6, #4] 8031384: e011 b.n 80313aa p->tot_len += oversize_used; 8031386: 892a ldrh r2, [r5, #8] 8031388: 4452 add r2, sl 803138a: 812a strh r2, [r5, #8] if (p->next == NULL) { 803138c: 682a ldr r2, [r5, #0] 803138e: b95a cbnz r2, 80313a8 TCP_DATA_COPY((char *)p->payload + p->len, arg, oversize_used, last_unsent); 8031390: 686a ldr r2, [r5, #4] 8031392: 8968 ldrh r0, [r5, #10] 8031394: 9906 ldr r1, [sp, #24] 8031396: 9305 str r3, [sp, #20] 8031398: 1810 adds r0, r2, r0 803139a: 4652 mov r2, sl 803139c: f7f0 fc46 bl 8021c2c p->len += oversize_used; 80313a0: 896a ldrh r2, [r5, #10] 80313a2: 9b05 ldr r3, [sp, #20] 80313a4: 4452 add r2, sl 80313a6: 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) { 80313a8: 682d ldr r5, [r5, #0] 80313aa: 2d00 cmp r5, #0 80313ac: d1eb bne.n 8031386 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; 80313ae: 8932 ldrh r2, [r6, #8] 80313b0: 4492 add sl, r2 80313b2: 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; 80313b6: f8bd 2036 ldrh.w r2, [sp, #54] ; 0x36 80313ba: 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) { 80313be: b157 cbz r7, 80313d6 LWIP_ASSERT("tcp_write: cannot concatenate when pcb->unsent is empty", (last_unsent != NULL)); pbuf_cat(last_unsent->p, concat_p); 80313c0: 6870 ldr r0, [r6, #4] 80313c2: 9305 str r3, [sp, #20] 80313c4: 4639 mov r1, r7 80313c6: f7fe f981 bl 802f6cc last_unsent->len += concat_p->tot_len; 80313ca: 8939 ldrh r1, [r7, #8] 80313cc: 8932 ldrh r2, [r6, #8] 80313ce: 9b05 ldr r3, [sp, #20] 80313d0: 188a adds r2, r1, r2 80313d2: 8132 strh r2, [r6, #8] 80313d4: e003 b.n 80313de /* * Phase 3: Append queue to pcb->unsent. Queue may be NULL, but that * is harmless */ if (last_unsent == NULL) { 80313d6: b916 cbnz r6, 80313de pcb->unsent = queue; 80313d8: f8c4 806c str.w r8, [r4, #108] ; 0x6c 80313dc: e001 b.n 80313e2 } else { last_unsent->next = queue; 80313de: f8c6 8000 str.w r8, [r6] } /* * Finally update the pcb state. */ pcb->snd_lbb += len; 80313e2: 6de2 ldr r2, [r4, #92] ; 0x5c pcb->snd_buf -= len; pcb->snd_queuelen = queuelen; 80313e4: f8a4 b068 strh.w fp, [r4, #104] ; 0x68 } /* * Finally update the pcb state. */ pcb->snd_lbb += len; 80313e8: 444a add r2, r9 80313ea: 65e2 str r2, [r4, #92] ; 0x5c pcb->snd_buf -= len; 80313ec: f8b4 2066 ldrh.w r2, [r4, #102] ; 0x66 80313f0: ebc9 0902 rsb r9, r9, r2 80313f4: 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)) { 80313f8: b333 cbz r3, 8031448 80313fa: 68dc ldr r4, [r3, #12] 80313fc: b30c cbz r4, 8031442 80313fe: 9b07 ldr r3, [sp, #28] 8031400: f003 0502 and.w r5, r3, #2 8031404: b2ed uxtb r5, r5 8031406: b9e5 cbnz r5, 8031442 TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); 8031408: 2008 movs r0, #8 803140a: 89a6 ldrh r6, [r4, #12] 803140c: f7fc ff36 bl 802e27c 8031410: 4330 orrs r0, r6 8031412: 81a0 strh r0, [r4, #12] 8031414: e015 b.n 8031442 */ 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; 8031416: f04f 0800 mov.w r8, #0 803141a: 4647 mov r7, r8 TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); } return ERR_OK; memerr: pcb->flags |= TF_NAGLEMEMERR; 803141c: 7fa3 ldrb r3, [r4, #30] 803141e: f063 037f orn r3, r3, #127 ; 0x7f 8031422: 77a3 strb r3, [r4, #30] TCP_STATS_INC(tcp.memerr); if (concat_p != NULL) { 8031424: b117 cbz r7, 803142c pbuf_free(concat_p); 8031426: 4638 mov r0, r7 8031428: f7fe f866 bl 802f4f8 } if (queue != NULL) { 803142c: f1b8 0f00 cmp.w r8, #0 8031430: d009 beq.n 8031446 tcp_segs_free(queue); 8031432: 4640 mov r0, r8 8031434: f7fe fb1b bl 802fa6e 8031438: e005 b.n 8031446 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)", 803143a: 23f2 movs r3, #242 ; 0xf2 803143c: e004 b.n 8031448 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; 803143e: 23f3 movs r3, #243 ; 0xf3 8031440: e002 b.n 8031448 /* 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; 8031442: 2300 movs r3, #0 8031444: e000 b.n 8031448 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; 8031446: 23ff movs r3, #255 ; 0xff 8031448: b258 sxtb r0, r3 } 803144a: b00f add sp, #60 ; 0x3c 803144c: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 08031450 : 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)) { 8031450: f8b0 3068 ldrh.w r3, [r0, #104] ; 0x68 8031454: 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) { 8031456: b573 push {r0, r1, r4, r5, r6, lr} 8031458: 4604 mov r4, r0 803145a: 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)) { 803145c: d900 bls.n 8031460 803145e: e014 b.n 803148a /* 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) { 8031460: 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; 8031464: 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); 8031468: 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) { 803146a: 2b00 cmp r3, #0 803146c: d038 beq.n 80314e0 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) { 803146e: 2000 movs r0, #0 8031470: 4602 mov r2, r0 8031472: f7fe f88e bl 802f592 8031476: 4601 mov r1, r0 8031478: b900 cbnz r0, 803147c 803147a: e006 b.n 803148a } 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) { 803147c: 9600 str r6, [sp, #0] 803147e: 4620 mov r0, r4 8031480: 462a mov r2, r5 8031482: 6de3 ldr r3, [r4, #92] ; 0x5c 8031484: f7ff fde2 bl 803104c 8031488: b920 cbnz r0, 8031494 pcb->flags |= TF_NAGLEMEMERR; 803148a: 7fa3 ldrb r3, [r4, #30] 803148c: f063 037f orn r3, r3, #127 ; 0x7f 8031490: 77a3 strb r3, [r4, #30] 8031492: e025 b.n 80314e0 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) { 8031494: 6ee3 ldr r3, [r4, #108] ; 0x6c 8031496: b913 cbnz r3, 803149e pcb->unsent = seg; 8031498: 66e0 str r0, [r4, #108] ; 0x6c 803149a: e004 b.n 80314a6 } else { struct tcp_seg *useg; for (useg = pcb->unsent; useg->next != NULL; useg = useg->next); 803149c: 4613 mov r3, r2 803149e: 681a ldr r2, [r3, #0] 80314a0: 2a00 cmp r2, #0 80314a2: d1fb bne.n 803149c useg->next = seg; 80314a4: 6018 str r0, [r3, #0] } #if TCP_OVERSIZE /* The new unsent tail has no space */ pcb->unsent_oversize = 0; 80314a6: 2300 movs r3, #0 #endif /* TCP_OVERSIZE */ /* SYN and FIN bump the sequence number */ if ((flags & TCP_SYN) || (flags & TCP_FIN)) { 80314a8: 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; 80314aa: 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)) { 80314ae: d007 beq.n 80314c0 pcb->snd_lbb++; 80314b0: 6de3 ldr r3, [r4, #92] ; 0x5c 80314b2: 3301 adds r3, #1 80314b4: 65e3 str r3, [r4, #92] ; 0x5c /* optlen does not influence snd_buf */ pcb->snd_buf--; 80314b6: f8b4 3066 ldrh.w r3, [r4, #102] ; 0x66 80314ba: 3b01 subs r3, #1 80314bc: f8a4 3066 strh.w r3, [r4, #102] ; 0x66 } if (flags & TCP_FIN) { 80314c0: 07ea lsls r2, r5, #31 80314c2: d503 bpl.n 80314cc pcb->flags |= TF_FIN; 80314c4: 7fa3 ldrb r3, [r4, #30] 80314c6: f043 0320 orr.w r3, r3, #32 80314ca: 77a3 strb r3, [r4, #30] } /* update number of segments on the queues */ pcb->snd_queuelen += pbuf_clen(seg->p); 80314cc: 6840 ldr r0, [r0, #4] 80314ce: f8b4 5068 ldrh.w r5, [r4, #104] ; 0x68 80314d2: f7fe f8e5 bl 802f6a0 80314d6: 1940 adds r0, r0, r5 80314d8: 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; 80314dc: 2000 movs r0, #0 80314de: e000 b.n 80314e2 * 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; 80314e0: 20ff movs r0, #255 ; 0xff LWIP_ASSERT("tcp_enqueue_flags: invalid queue length", pcb->unacked != NULL || pcb->unsent != NULL); } return ERR_OK; } 80314e2: b240 sxtb r0, r0 80314e4: bd7c pop {r2, r3, r4, r5, r6, pc} 080314e6 : * @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) { 80314e6: b5f8 push {r3, r4, r5, r6, r7, lr} /* first, try to add the fin to the last unsent segment */ if (pcb->unsent != NULL) { 80314e8: 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) { 80314ea: 4605 mov r5, r0 /* first, try to add the fin to the last unsent segment */ if (pcb->unsent != NULL) { 80314ec: b90c cbnz r4, 80314f2 80314ee: e00a b.n 8031506 struct tcp_seg *last_unsent; for (last_unsent = pcb->unsent; last_unsent->next != NULL; last_unsent = last_unsent->next); 80314f0: 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; 80314f2: 6823 ldr r3, [r4, #0] 80314f4: 2b00 cmp r3, #0 80314f6: d1fb bne.n 80314f0 last_unsent = last_unsent->next); if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) { 80314f8: 68e3 ldr r3, [r4, #12] 80314fa: 8998 ldrh r0, [r3, #12] 80314fc: f7fc fec3 bl 802e286 8031500: f010 0607 ands.w r6, r0, #7 8031504: d005 beq.n 8031512 pcb->flags |= TF_FIN; return ERR_OK; } } /* no data, no length, flags, copy=1, no optdata */ return tcp_enqueue_flags(pcb, TCP_FIN); 8031506: 4628 mov r0, r5 8031508: 2101 movs r1, #1 } 803150a: 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); 803150e: f7ff bf9f b.w 8031450 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); 8031512: 68e4 ldr r4, [r4, #12] 8031514: 2001 movs r0, #1 8031516: 89a7 ldrh r7, [r4, #12] 8031518: f7fc feb0 bl 802e27c 803151c: 4338 orrs r0, r7 803151e: 81a0 strh r0, [r4, #12] pcb->flags |= TF_FIN; 8031520: 7fab ldrb r3, [r5, #30] 8031522: f043 0320 orr.w r3, r3, #32 8031526: 77ab strb r3, [r5, #30] return ERR_OK; } } /* no data, no length, flags, copy=1, no optdata */ return tcp_enqueue_flags(pcb, TCP_FIN); } 8031528: 4630 mov r0, r6 803152a: bdf8 pop {r3, r4, r5, r6, r7, pc} 0803152c : * * @param pcb Protocol control block for the TCP connection to send the ACK */ err_t tcp_send_empty_ack(struct tcp_pcb *pcb) { 803152c: b537 push {r0, r1, r2, r4, r5, lr} 803152e: 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)); 8031530: 6d00 ldr r0, [r0, #80] ; 0x50 8031532: f7fc fead bl 802e290 8031536: 2100 movs r1, #0 8031538: 4602 mov r2, r0 803153a: 4620 mov r0, r4 803153c: f7ff fdd8 bl 80310f0 if (p == NULL) { 8031540: 4605 mov r5, r0 8031542: b188 cbz r0, 8031568 } 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); 8031544: 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, 8031546: 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); 8031548: 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, 803154c: 9200 str r2, [sp, #0] 803154e: 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); 8031550: 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, 8031552: 9201 str r2, [sp, #4] 8031554: 7aa3 ldrb r3, [r4, #10] 8031556: 4621 mov r1, r4 8031558: 1d22 adds r2, r4, #4 803155a: f001 f8ab bl 80326b4 IP_PROTO_TCP); #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 803155e: 4628 mov r0, r5 8031560: f7fd ffca bl 802f4f8 return ERR_OK; 8031564: 2000 movs r0, #0 8031566: e000 b.n 803156a #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; 8031568: 20fe movs r0, #254 ; 0xfe IP_PROTO_TCP); #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); return ERR_OK; } 803156a: b240 sxtb r0, r0 803156c: bd3e pop {r1, r2, r3, r4, r5, pc} 803156e: 0000 movs r0, r0 08031570 : /* 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) { 8031570: 4b8f ldr r3, [pc, #572] ; (80317b0 ) 8031572: 681b ldr r3, [r3, #0] 8031574: 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) { 8031576: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 803157a: 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) { 803157c: f000 8113 beq.w 80317a6 return ERR_OK; } wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd); 8031580: f8b0 304c ldrh.w r3, [r0, #76] ; 0x4c 8031584: f8b0 9060 ldrh.w r9, [r0, #96] ; 0x60 seg = pcb->unsent; 8031588: 6ec5 ldr r5, [r0, #108] ; 0x6c with. */ if (tcp_input_pcb == pcb) { return ERR_OK; } wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd); 803158a: 4599 cmp r9, r3 803158c: bf28 it cs 803158e: 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 && 8031590: 7f83 ldrb r3, [r0, #30] 8031592: f003 0302 and.w r3, r3, #2 8031596: b2db uxtb r3, r3 8031598: b183 cbz r3, 80315bc 803159a: b92d cbnz r5, 80315a8 (seg == NULL || ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd)) { return tcp_send_empty_ack(pcb); 803159c: 4620 mov r0, r4 } #endif /* TCP_OVERSIZE */ pcb->flags &= ~TF_NAGLEMEMERR; return ERR_OK; } 803159e: b003 add sp, #12 80315a0: 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); 80315a4: f7ff bfc2 b.w 803152c * * 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)) { 80315a8: 68eb ldr r3, [r5, #12] 80315aa: 6858 ldr r0, [r3, #4] 80315ac: f7fc fe72 bl 802e294 80315b0: 892a ldrh r2, [r5, #8] 80315b2: 6ca3 ldr r3, [r4, #72] ; 0x48 80315b4: 1ad3 subs r3, r2, r3 80315b6: 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 || 80315b8: 4548 cmp r0, r9 80315ba: d8ef bhi.n 803159c 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; 80315bc: 6f26 ldr r6, [r4, #112] ; 0x70 if (useg != NULL) { 80315be: b90e cbnz r6, 80315c4 80315c0: e0d1 b.n 8031766 for (; useg->next != NULL; useg = useg->next); 80315c2: 461e mov r6, r3 80315c4: 6833 ldr r3, [r6, #0] 80315c6: 2b00 cmp r3, #0 80315c8: d1fb bne.n 80315c2 80315ca: e0cc b.n 8031766 } #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!", 80315cc: 68eb ldr r3, [r5, #12] 80315ce: 8998 ldrh r0, [r3, #12] 80315d0: f7fc fe59 bl 802e286 * - 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) && 80315d4: 6f23 ldr r3, [r4, #112] ; 0x70 80315d6: b19b cbz r3, 8031600 80315d8: 7fa2 ldrb r2, [r4, #30] 80315da: f012 0f44 tst.w r2, #68 ; 0x44 80315de: d10f bne.n 8031600 80315e0: 6ee3 ldr r3, [r4, #108] ; 0x6c 80315e2: b12b cbz r3, 80315f0 80315e4: 6819 ldr r1, [r3, #0] 80315e6: b959 cbnz r1, 8031600 80315e8: 8919 ldrh r1, [r3, #8] 80315ea: 8ee3 ldrh r3, [r4, #54] ; 0x36 80315ec: 4299 cmp r1, r3 80315ee: d207 bcs.n 8031600 80315f0: f8b4 3066 ldrh.w r3, [r4, #102] ; 0x66 80315f4: b123 cbz r3, 8031600 80315f6: f8b4 3068 ldrh.w r3, [r4, #104] ; 0x68 80315fa: 2b47 cmp r3, #71 ; 0x47 80315fc: f240 80ce bls.w 803179c pcb->lastack, ntohl(seg->tcphdr->seqno), pcb->lastack, i)); ++i; #endif /* TCP_CWND_DEBUG */ pcb->unsent = seg->next; 8031600: 682b ldr r3, [r5, #0] 8031602: 66e3 str r3, [r4, #108] ; 0x6c if (pcb->state != SYN_SENT) { 8031604: 7e23 ldrb r3, [r4, #24] 8031606: 2b02 cmp r3, #2 8031608: d00c beq.n 8031624 TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); 803160a: 68ef ldr r7, [r5, #12] 803160c: 2010 movs r0, #16 803160e: f8b7 b00c ldrh.w fp, [r7, #12] 8031612: f7fc fe33 bl 802e27c 8031616: ea40 000b orr.w r0, r0, fp 803161a: 81b8 strh r0, [r7, #12] pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); 803161c: 7fa3 ldrb r3, [r4, #30] 803161e: f023 0303 bic.w r3, r3, #3 8031622: 77a3 strb r3, [r4, #30] u16_t len; struct netif *netif; u32_t *opts; /** @bug Exclude retransmitted segments from this count. */ snmp_inc_tcpoutsegs(); 8031624: f002 fd64 bl 80340f0 /* The TCP header has already been constructed, but the ackno and wnd fields remain. */ seg->tcphdr->ackno = htonl(pcb->rcv_nxt); 8031628: 6aa0 ldr r0, [r4, #40] ; 0x28 803162a: 68ef ldr r7, [r5, #12] 803162c: f7fc fe30 bl 802e290 8031630: 60b8 str r0, [r7, #8] /* advertise our receive window size in this TCP segment */ seg->tcphdr->wnd = htons(pcb->rcv_ann_wnd); 8031632: 8de0 ldrh r0, [r4, #46] ; 0x2e 8031634: 68ef ldr r7, [r5, #12] 8031636: f7fc fe21 bl 802e27c 803163a: 81f8 strh r0, [r7, #14] pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; 803163c: 8de2 ldrh r2, [r4, #46] ; 0x2e 803163e: 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); 8031640: 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; 8031642: 18d3 adds r3, r2, r3 8031644: 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) { 8031646: 7aab ldrb r3, [r5, #10] 8031648: 07d8 lsls r0, r3, #31 803164a: d509 bpl.n 8031660 u16_t mss; #if TCP_CALCULATE_EFF_SEND_MSS mss = tcp_eff_send_mss(TCP_MSS, &pcb->remote_ip); 803164c: 4641 mov r1, r8 803164e: f240 50b4 movw r0, #1460 ; 0x5b4 8031652: f7fe fde4 bl 803021e #else /* TCP_CALCULATE_EFF_SEND_MSS */ mss = TCP_MSS; #endif /* TCP_CALCULATE_EFF_SEND_MSS */ *opts = TCP_BUILD_MSS_OPTION(mss); 8031656: f040 7001 orr.w r0, r0, #33816576 ; 0x2040000 803165a: f7fc fe19 bl 802e290 803165e: 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) { 8031660: f9b4 3034 ldrsh.w r3, [r4, #52] ; 0x34 8031664: 3301 adds r3, #1 8031666: d101 bne.n 803166c pcb->rtime = 0; 8031668: 2300 movs r3, #0 803166a: 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))) { 803166c: 6823 ldr r3, [r4, #0] 803166e: b92b cbnz r3, 803167c netif = ip_route(&(pcb->remote_ip)); 8031670: 4640 mov r0, r8 8031672: f000 fecb bl 803240c if (netif == NULL) { 8031676: b310 cbz r0, 80316be return; } ip_addr_copy(pcb->local_ip, netif->ip_addr); 8031678: 6843 ldr r3, [r0, #4] 803167a: 6023 str r3, [r4, #0] } if (pcb->rttest == 0) { 803167c: 6ba3 ldr r3, [r4, #56] ; 0x38 803167e: b93b cbnz r3, 8031690 pcb->rttest = tcp_ticks; 8031680: f8da 3000 ldr.w r3, [sl] 8031684: 63a3 str r3, [r4, #56] ; 0x38 pcb->rtseq = ntohl(seg->tcphdr->seqno); 8031686: 68eb ldr r3, [r5, #12] 8031688: 6858 ldr r0, [r3, #4] 803168a: f7fc fe03 bl 802e294 803168e: 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); 8031690: 6868 ldr r0, [r5, #4] 8031692: 68eb ldr r3, [r5, #12] 8031694: 6842 ldr r2, [r0, #4] seg->p->len -= len; 8031696: 8941 ldrh r1, [r0, #10] seg->p->tot_len -= len; seg->p->payload = seg->tcphdr; 8031698: 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); 803169a: 1a9a subs r2, r3, r2 seg->p->len -= len; 803169c: 1a89 subs r1, r1, r2 803169e: 8141 strh r1, [r0, #10] seg->p->tot_len -= len; 80316a0: 8901 ldrh r1, [r0, #8] 80316a2: 1a8a subs r2, r1, r2 80316a4: 8102 strh r2, [r0, #8] seg->p->payload = seg->tcphdr; seg->tcphdr->chksum = 0; 80316a6: 2200 movs r2, #0 80316a8: 741a strb r2, [r3, #16] 80316aa: 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, 80316ac: 7a62 ldrb r2, [r4, #9] 80316ae: 7aa3 ldrb r3, [r4, #10] 80316b0: 9200 str r2, [sp, #0] 80316b2: 2206 movs r2, #6 80316b4: 9201 str r2, [sp, #4] 80316b6: 4621 mov r1, r4 80316b8: 4642 mov r2, r8 80316ba: f000 fffb bl 80326b4 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); 80316be: 68eb ldr r3, [r5, #12] 80316c0: 6858 ldr r0, [r3, #4] 80316c2: f7fc fde7 bl 802e294 80316c6: 68ea ldr r2, [r5, #12] 80316c8: f8b5 b008 ldrh.w fp, [r5, #8] 80316cc: 4607 mov r7, r0 80316ce: 8990 ldrh r0, [r2, #12] 80316d0: f7fc fdd9 bl 802e286 80316d4: f010 0003 ands.w r0, r0, #3 80316d8: bf18 it ne 80316da: 2001 movne r0, #1 if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 80316dc: 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); 80316de: eb0b 0300 add.w r3, fp, r0 80316e2: 19db adds r3, r3, r7 if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 80316e4: 1ad2 subs r2, r2, r3 80316e6: 2a00 cmp r2, #0 pcb->snd_nxt = snd_nxt; 80316e8: bfb8 it lt 80316ea: 6523 strlt r3, [r4, #80] ; 0x50 } /* put segment on unacknowledged list if length > 0 */ if (TCP_TCPLEN(seg) > 0) { 80316ec: 68eb ldr r3, [r5, #12] 80316ee: 892f ldrh r7, [r5, #8] 80316f0: 8998 ldrh r0, [r3, #12] 80316f2: f7fc fdc8 bl 802e286 80316f6: f010 0003 ands.w r0, r0, #3 80316fa: bf18 it ne 80316fc: 2001 movne r0, #1 80316fe: 1838 adds r0, r7, r0 8031700: b360 cbz r0, 803175c seg->next = NULL; 8031702: 2300 movs r3, #0 8031704: 602b str r3, [r5, #0] /* unacked list is empty? */ if (pcb->unacked == NULL) { 8031706: 6f23 ldr r3, [r4, #112] ; 0x70 8031708: b90b cbnz r3, 803170e pcb->unacked = seg; 803170a: 6725 str r5, [r4, #112] ; 0x70 803170c: e024 b.n 8031758 /* 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))) { 803170e: 68eb ldr r3, [r5, #12] 8031710: 6858 ldr r0, [r3, #4] 8031712: f7fc fdbf bl 802e294 8031716: 68f3 ldr r3, [r6, #12] 8031718: 4607 mov r7, r0 803171a: 6858 ldr r0, [r3, #4] 803171c: f7fc fdba bl 802e294 8031720: 1a38 subs r0, r7, r0 8031722: 2800 cmp r0, #0 8031724: da17 bge.n 8031756 /* add segment to before tail of unacked list, keeping the list sorted */ struct tcp_seg **cur_seg = &(pcb->unacked); 8031726: f104 0770 add.w r7, r4, #112 ; 0x70 while (*cur_seg && 803172a: e000 b.n 803172e TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); 803172c: 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 && 803172e: 683b ldr r3, [r7, #0] 8031730: b91b cbnz r3, 803173a TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); } seg->next = (*cur_seg); 8031732: 683b ldr r3, [r7, #0] 8031734: 602b str r3, [r5, #0] (*cur_seg) = seg; 8031736: 603d str r5, [r7, #0] 8031738: e013 b.n 8031762 * 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))) { 803173a: 68db ldr r3, [r3, #12] 803173c: 6858 ldr r0, [r3, #4] 803173e: f7fc fda9 bl 802e294 8031742: 68eb ldr r3, [r5, #12] 8031744: 4683 mov fp, r0 8031746: 6858 ldr r0, [r3, #4] 8031748: f7fc fda4 bl 802e294 803174c: 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 && 8031750: 2800 cmp r0, #0 8031752: dbeb blt.n 803172c 8031754: e7ed b.n 8031732 } seg->next = (*cur_seg); (*cur_seg) = seg; } else { /* add segment to tail of unacked list */ useg->next = seg; 8031756: 6035 str r5, [r6, #0] 8031758: 462e mov r6, r5 803175a: e002 b.n 8031762 useg = useg->next; } } /* do not queue empty segments on the unacked list */ } else { tcp_seg_free(seg); 803175c: 4628 mov r0, r5 803175e: f7fe f978 bl 802fa52 } seg = pcb->unsent; 8031762: 6ee5 ldr r5, [r4, #108] ; 0x6c 8031764: e003 b.n 803176e } ip_addr_copy(pcb->local_ip, netif->ip_addr); } if (pcb->rttest == 0) { pcb->rttest = tcp_ticks; 8031766: f8df a04c ldr.w sl, [pc, #76] ; 80317b4 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); 803176a: 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 && 803176e: b915 cbnz r5, 8031776 tcp_seg_free(seg); } seg = pcb->unsent; } #if TCP_OVERSIZE if (pcb->unsent == NULL) { 8031770: 6ee3 ldr r3, [r4, #108] ; 0x6c 8031772: b973 cbnz r3, 8031792 8031774: e00b b.n 803178e 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) { 8031776: 68eb ldr r3, [r5, #12] 8031778: 6858 ldr r0, [r3, #4] 803177a: f7fc fd8b bl 802e294 803177e: 892a ldrh r2, [r5, #8] 8031780: 6ca3 ldr r3, [r4, #72] ; 0x48 8031782: 1ad3 subs r3, r2, r3 8031784: 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 && 8031786: 4548 cmp r0, r9 8031788: f67f af20 bls.w 80315cc 803178c: e7f0 b.n 8031770 seg = pcb->unsent; } #if TCP_OVERSIZE if (pcb->unsent == NULL) { /* last unsent has been removed, reset unsent_oversize */ pcb->unsent_oversize = 0; 803178e: f8a4 306a strh.w r3, [r4, #106] ; 0x6a } #endif /* TCP_OVERSIZE */ pcb->flags &= ~TF_NAGLEMEMERR; 8031792: 7fa3 ldrb r3, [r4, #30] 8031794: f003 037f and.w r3, r3, #127 ; 0x7f 8031798: 77a3 strb r3, [r4, #30] return ERR_OK; 803179a: e004 b.n 80317a6 * - 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) && 803179c: f012 0fa0 tst.w r2, #160 ; 0xa0 80317a0: f47f af2e bne.w 8031600 80317a4: e7e4 b.n 8031770 } #endif /* TCP_OVERSIZE */ pcb->flags &= ~TF_NAGLEMEMERR; return ERR_OK; } 80317a6: 2000 movs r0, #0 80317a8: b003 add sp, #12 80317aa: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80317ae: bf00 nop 80317b0: 2000f6c4 .word 0x2000f6c4 80317b4: 2000f6b0 .word 0x2000f6b0 080317b8 : */ 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) { 80317b8: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 80317bc: 4681 mov r9, r0 80317be: 460d mov r5, r1 80317c0: 4690 mov r8, r2 struct pbuf *p; struct tcp_hdr *tcphdr; p = pbuf_alloc(PBUF_IP, TCP_HLEN, PBUF_RAM); 80317c2: 2001 movs r0, #1 80317c4: 2114 movs r1, #20 80317c6: 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) { 80317c8: 461f mov r7, r3 80317ca: f8bd b030 ldrh.w fp, [sp, #48] ; 0x30 80317ce: f8bd a034 ldrh.w sl, [sp, #52] ; 0x34 struct pbuf *p; struct tcp_hdr *tcphdr; p = pbuf_alloc(PBUF_IP, TCP_HLEN, PBUF_RAM); 80317d2: f7fd fede bl 802f592 if (p == NULL) { 80317d6: 4606 mov r6, r0 80317d8: 2800 cmp r0, #0 80317da: d030 beq.n 803183e return; } LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", (p->len >= sizeof(struct tcp_hdr))); tcphdr = (struct tcp_hdr *)p->payload; 80317dc: 6844 ldr r4, [r0, #4] tcphdr->src = htons(local_port); 80317de: 4658 mov r0, fp 80317e0: f7fc fd4c bl 802e27c 80317e4: 8020 strh r0, [r4, #0] tcphdr->dest = htons(remote_port); 80317e6: 4650 mov r0, sl 80317e8: f7fc fd48 bl 802e27c 80317ec: 8060 strh r0, [r4, #2] tcphdr->seqno = htonl(seqno); 80317ee: 4648 mov r0, r9 80317f0: f7fc fd4e bl 802e290 80317f4: 6060 str r0, [r4, #4] tcphdr->ackno = htonl(ackno); 80317f6: 4628 mov r0, r5 80317f8: f7fc fd4a bl 802e290 80317fc: 60a0 str r0, [r4, #8] TCPH_HDRLEN_FLAGS_SET(tcphdr, TCP_HLEN/4, TCP_RST | TCP_ACK); 80317fe: f245 0014 movw r0, #20500 ; 0x5014 8031802: f7fc fd3b bl 802e27c tcphdr->wnd = PP_HTONS(TCP_WND); 8031806: 2316 movs r3, #22 8031808: 2500 movs r5, #0 803180a: 73a3 strb r3, [r4, #14] 803180c: 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); 8031810: 81a0 strh r0, [r4, #12] tcphdr->wnd = PP_HTONS(TCP_WND); 8031812: 73e3 strb r3, [r4, #15] tcphdr->chksum = 0; 8031814: 7425 strb r5, [r4, #16] 8031816: 7465 strb r5, [r4, #17] tcphdr->urgp = 0; 8031818: 74a5 strb r5, [r4, #18] 803181a: 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(); 803181c: f002 fc80 bl 8034120 /* 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); 8031820: 2306 movs r3, #6 8031822: 9301 str r3, [sp, #4] 8031824: 9500 str r5, [sp, #0] 8031826: 4630 mov r0, r6 8031828: 4641 mov r1, r8 803182a: 463a mov r2, r7 803182c: 23ff movs r3, #255 ; 0xff 803182e: f000 ff41 bl 80326b4 pbuf_free(p); 8031832: 4630 mov r0, r6 LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); } 8031834: b003 add sp, #12 8031836: 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); 803183a: f7fd be5d b.w 802f4f8 LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); } 803183e: b003 add sp, #12 8031840: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 08031844 : void tcp_rexmit_rto(struct tcp_pcb *pcb) { struct tcp_seg *seg; if (pcb->unacked == NULL) { 8031844: 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) { 8031846: b510 push {r4, lr} struct tcp_seg *seg; if (pcb->unacked == NULL) { 8031848: b19a cbz r2, 8031872 803184a: 4611 mov r1, r2 803184c: e000 b.n 8031850 return; } /* Move all unacked segments to the head of the unsent queue */ for (seg = pcb->unacked; seg->next != NULL; seg = seg->next); 803184e: 4619 mov r1, r3 8031850: 680b ldr r3, [r1, #0] 8031852: 2b00 cmp r3, #0 8031854: d1fb bne.n 803184e /* concatenate unsent queue after unacked queue */ seg->next = pcb->unsent; 8031856: 6ec4 ldr r4, [r0, #108] ; 0x6c 8031858: 600c str r4, [r1, #0] /* unsent queue is the concatenated queue (of unacked, unsent) */ pcb->unsent = pcb->unacked; 803185a: 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; 803185c: 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; 8031860: 6703 str r3, [r0, #112] ; 0x70 /* last unsent hasn't changed, no need to reset unsent_oversize */ /* increment number of retransmissions */ ++pcb->nrtx; 8031862: 3201 adds r2, #1 8031864: f880 2046 strb.w r2, [r0, #70] ; 0x46 /* Don't take any RTT measurements after retransmitting. */ pcb->rttest = 0; 8031868: 6383 str r3, [r0, #56] ; 0x38 /* Do the actual retransmission */ tcp_output(pcb); } 803186a: 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); 803186e: f7ff be7f b.w 8031570 8031872: bd10 pop {r4, pc} 08031874 : * * @param pcb the tcp_pcb for which to retransmit the first unacked segment */ void tcp_rexmit(struct tcp_pcb *pcb) { 8031874: b5f8 push {r3, r4, r5, r6, r7, lr} struct tcp_seg *seg; struct tcp_seg **cur_seg; if (pcb->unacked == NULL) { 8031876: 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) { 8031878: 4604 mov r4, r0 struct tcp_seg *seg; struct tcp_seg **cur_seg; if (pcb->unacked == NULL) { 803187a: 2d00 cmp r5, #0 803187c: d027 beq.n 80318ce } /* Move the first unacked segment to the unsent queue */ /* Keep the unsent queue sorted. */ seg = pcb->unacked; pcb->unacked = seg->next; 803187e: 682b ldr r3, [r5, #0] cur_seg = &(pcb->unsent); 8031880: 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; 8031884: 6703 str r3, [r0, #112] ; 0x70 cur_seg = &(pcb->unsent); while (*cur_seg && 8031886: e000 b.n 803188a TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); 8031888: 6836 ldr r6, [r6, #0] /* Keep the unsent queue sorted. */ seg = pcb->unacked; pcb->unacked = seg->next; cur_seg = &(pcb->unsent); while (*cur_seg && 803188a: 6833 ldr r3, [r6, #0] 803188c: b92b cbnz r3, 803189a TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); } seg->next = *cur_seg; 803188e: 6833 ldr r3, [r6, #0] 8031890: 602b str r3, [r5, #0] *cur_seg = seg; 8031892: 6035 str r5, [r6, #0] #if TCP_OVERSIZE if (seg->next == NULL) { 8031894: 682b ldr r3, [r5, #0] 8031896: b97b cbnz r3, 80318b8 8031898: e00c b.n 80318b4 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))) { 803189a: 68db ldr r3, [r3, #12] 803189c: 6858 ldr r0, [r3, #4] 803189e: f7fc fcf9 bl 802e294 80318a2: 68eb ldr r3, [r5, #12] 80318a4: 4607 mov r7, r0 80318a6: 6858 ldr r0, [r3, #4] 80318a8: f7fc fcf4 bl 802e294 80318ac: 1a38 subs r0, r7, r0 /* Keep the unsent queue sorted. */ seg = pcb->unacked; pcb->unacked = seg->next; cur_seg = &(pcb->unsent); while (*cur_seg && 80318ae: 2800 cmp r0, #0 80318b0: dbea blt.n 8031888 80318b2: e7ec b.n 803188e 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; 80318b4: f8a4 306a strh.w r3, [r4, #106] ; 0x6a } #endif /* TCP_OVERSIZE */ ++pcb->nrtx; 80318b8: f894 3046 ldrb.w r3, [r4, #70] ; 0x46 80318bc: 3301 adds r3, #1 80318be: f884 3046 strb.w r3, [r4, #70] ; 0x46 /* Don't take any rtt measurements after retransmitting. */ pcb->rttest = 0; 80318c2: 2300 movs r3, #0 80318c4: 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. */ } 80318c6: 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(); 80318ca: f002 bc19 b.w 8034100 80318ce: bdf8 pop {r3, r4, r5, r6, r7, pc} 080318d0 : * @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)) { 80318d0: 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) { 80318d2: b510 push {r4, lr} 80318d4: 4604 mov r4, r0 if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) { 80318d6: b333 cbz r3, 8031926 80318d8: 7f83 ldrb r3, [r0, #30] 80318da: f003 0304 and.w r3, r3, #4 80318de: b2db uxtb r3, r3 80318e0: bb0b cbnz r3, 8031926 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); 80318e2: f7ff ffc7 bl 8031874 /* Set ssthresh to half of the minimum of the current * cwnd and the advertised window */ if (pcb->cwnd > pcb->snd_wnd) { 80318e6: f8b4 304c ldrh.w r3, [r4, #76] ; 0x4c 80318ea: f8b4 2060 ldrh.w r2, [r4, #96] ; 0x60 80318ee: 4293 cmp r3, r2 80318f0: d903 bls.n 80318fa pcb->ssthresh = pcb->snd_wnd / 2; 80318f2: 0852 lsrs r2, r2, #1 80318f4: f8a4 204e strh.w r2, [r4, #78] ; 0x4e 80318f8: e002 b.n 8031900 } else { pcb->ssthresh = pcb->cwnd / 2; 80318fa: 085b lsrs r3, r3, #1 80318fc: f8a4 304e strh.w r3, [r4, #78] ; 0x4e } /* The minimum value for ssthresh should be 2 MSS */ if (pcb->ssthresh < 2*pcb->mss) { 8031900: 8ee3 ldrh r3, [r4, #54] ; 0x36 8031902: f8b4 104e ldrh.w r1, [r4, #78] ; 0x4e 8031906: 005a lsls r2, r3, #1 8031908: 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; 803190a: bfb8 it lt 803190c: f8a4 204e strhlt.w r2, [r4, #78] ; 0x4e } pcb->cwnd = pcb->ssthresh + 3 * pcb->mss; 8031910: f8b4 204e ldrh.w r2, [r4, #78] ; 0x4e 8031914: 2103 movs r1, #3 8031916: fb01 2303 mla r3, r1, r3, r2 803191a: f8a4 304c strh.w r3, [r4, #76] ; 0x4c pcb->flags |= TF_INFR; 803191e: 7fa3 ldrb r3, [r4, #30] 8031920: f043 0304 orr.w r3, r3, #4 8031924: 77a3 strb r3, [r4, #30] 8031926: bd10 pop {r4, pc} 08031928 : * * @param pcb the tcp_pcb for which to send a keepalive packet */ void tcp_keepalive(struct tcp_pcb *pcb) { 8031928: b537 push {r0, r1, r2, r4, r5, lr} 803192a: 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)); 803192c: 6d00 ldr r0, [r0, #80] ; 0x50 803192e: 3801 subs r0, #1 8031930: f7fc fcae bl 802e290 8031934: 2100 movs r1, #0 8031936: 4602 mov r2, r0 8031938: 4620 mov r0, r4 803193a: f7ff fbd9 bl 80310f0 if(p == NULL) { 803193e: 4605 mov r5, r0 8031940: b178 cbz r0, 8031962 /* 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); 8031942: 2200 movs r2, #0 8031944: f04f 0e06 mov.w lr, #6 8031948: e88d 4004 stmia.w sp, {r2, lr} 803194c: 7aa3 ldrb r3, [r4, #10] 803194e: 4621 mov r1, r4 8031950: 1d22 adds r2, r4, #4 8031952: f000 feaf bl 80326b4 #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 8031956: 4628 mov r0, r5 LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: seqno %"U32_F" ackno %"U32_F".\n", pcb->snd_nxt - 1, pcb->rcv_nxt)); } 8031958: b003 add sp, #12 803195a: 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); 803195e: f7fd bdcb b.w 802f4f8 LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: seqno %"U32_F" ackno %"U32_F".\n", pcb->snd_nxt - 1, pcb->rcv_nxt)); } 8031962: b003 add sp, #12 8031964: bd30 pop {r4, r5, pc} 08031966 : * * @param pcb the tcp_pcb for which to send a zero-window probe packet */ void tcp_zero_window_probe(struct tcp_pcb *pcb) { 8031966: 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; 803196a: 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) { 803196c: 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) { 803196e: b914 cbnz r4, 8031976 seg = pcb->unsent; 8031970: 6ec4 ldr r4, [r0, #108] ; 0x6c } if(seg == NULL) { 8031972: 2c00 cmp r4, #0 8031974: d042 beq.n 80319fc return; } is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); 8031976: 68e3 ldr r3, [r4, #12] 8031978: 8998 ldrh r0, [r3, #12] 803197a: f7fc fc84 bl 802e286 803197e: f010 0001 ands.w r0, r0, #1 8031982: d005 beq.n 8031990 8031984: 8921 ldrh r1, [r4, #8] 8031986: f1d1 0101 rsbs r1, r1, #1 803198a: bf38 it cc 803198c: 2100 movcc r1, #0 803198e: e000 b.n 8031992 8031990: 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); 8031992: 68e3 ldr r3, [r4, #12] } if(seg == NULL) { return; } is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); 8031994: 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); 8031998: 4628 mov r0, r5 803199a: f081 0101 eor.w r1, r1, #1 803199e: 685a ldr r2, [r3, #4] 80319a0: f7ff fba6 bl 80310f0 if(p == NULL) { 80319a4: 4606 mov r6, r0 80319a6: 2800 cmp r0, #0 80319a8: d028 beq.n 80319fc LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n")); return; } tcphdr = (struct tcp_hdr *)p->payload; 80319aa: 6847 ldr r7, [r0, #4] if (is_fin) { 80319ac: f1b8 0f00 cmp.w r8, #0 80319b0: d009 beq.n 80319c6 /* FIN segment, no data */ TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN); 80319b2: 89bc ldrh r4, [r7, #12] 80319b4: 2011 movs r0, #17 80319b6: f7fc fc61 bl 802e27c 80319ba: f424 547c bic.w r4, r4, #16128 ; 0x3f00 80319be: b2a4 uxth r4, r4 80319c0: 4320 orrs r0, r4 80319c2: 81b8 strh r0, [r7, #12] 80319c4: e009 b.n 80319da /* 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); 80319c6: 6860 ldr r0, [r4, #4] 80319c8: 8923 ldrh r3, [r4, #8] 80319ca: 8902 ldrh r2, [r0, #8] 80319cc: 1ad3 subs r3, r2, r3 80319ce: f107 0114 add.w r1, r7, #20 80319d2: 2201 movs r2, #1 80319d4: b29b uxth r3, r3 80319d6: f7fd fedd bl 802f794 /* 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); 80319da: 2200 movs r2, #0 80319dc: f04f 0c06 mov.w ip, #6 80319e0: e88d 1004 stmia.w sp, {r2, ip} 80319e4: 7aab ldrb r3, [r5, #10] 80319e6: 4630 mov r0, r6 80319e8: 4629 mov r1, r5 80319ea: 1d2a adds r2, r5, #4 80319ec: f000 fe62 bl 80326b4 #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 80319f0: 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)); } 80319f2: b002 add sp, #8 80319f4: 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); 80319f8: f7fd bd7e b.w 802f4f8 LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: seqno %"U32_F " ackno %"U32_F".\n", pcb->snd_nxt - 1, pcb->rcv_nxt)); } 80319fc: b002 add sp, #8 80319fe: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8031a02: 0000 movs r0, r0 08031a04 : 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 */ { 8031a04: b570 push {r4, r5, r6, lr} 8031a06: 4604 mov r4, r0 struct sys_timeo *timeout, *t; timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); 8031a08: 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 */ { 8031a0a: 460d mov r5, r1 8031a0c: 4616 mov r6, r2 struct sys_timeo *timeout, *t; timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); 8031a0e: f7fd fc53 bl 802f2b8 if (timeout == NULL) { 8031a12: 4603 mov r3, r0 8031a14: b308 cbz r0, 8031a5a 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) { 8031a16: 4911 ldr r1, [pc, #68] ; (8031a5c ) 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; 8031a18: 2200 movs r2, #0 timeout->h = handler; timeout->arg = arg; timeout->time = msecs; 8031a1a: 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) { 8031a1e: 680a ldr r2, [r1, #0] 8031a20: b902 cbnz r2, 8031a24 8031a22: e005 b.n 8031a30 next_timeout = timeout; return; } if (next_timeout->time > msecs) { 8031a24: 6850 ldr r0, [r2, #4] 8031a26: 42a0 cmp r0, r4 8031a28: d90c bls.n 8031a44 next_timeout->time -= msecs; 8031a2a: 1b04 subs r4, r0, r4 8031a2c: 6054 str r4, [r2, #4] timeout->next = next_timeout; 8031a2e: 601a str r2, [r3, #0] next_timeout = timeout; 8031a30: 600b str r3, [r1, #0] 8031a32: 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) { 8031a34: 684c ldr r4, [r1, #4] 8031a36: 4284 cmp r4, r0 8031a38: d80c bhi.n 8031a54 8031a3a: 460a mov r2, r1 8031a3c: e002 b.n 8031a44 if (t->next != NULL) { t->next->time -= timeout->time; } timeout->next = t->next; 8031a3e: 6019 str r1, [r3, #0] t->next = timeout; 8031a40: 6013 str r3, [r2, #0] break; 8031a42: 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; 8031a44: 6851 ldr r1, [r2, #4] 8031a46: 6858 ldr r0, [r3, #4] 8031a48: 1a40 subs r0, r0, r1 if (t->next == NULL || t->next->time > timeout->time) { 8031a4a: 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; 8031a4c: 6058 str r0, [r3, #4] if (t->next == NULL || t->next->time > timeout->time) { 8031a4e: 2900 cmp r1, #0 8031a50: d1f0 bne.n 8031a34 8031a52: e7f4 b.n 8031a3e if (t->next != NULL) { t->next->time -= timeout->time; 8031a54: 1a20 subs r0, r4, r0 8031a56: 6048 str r0, [r1, #4] 8031a58: e7f1 b.n 8031a3e 8031a5a: bd70 pop {r4, r5, r6, pc} 8031a5c: 2000c414 .word 0x2000c414 08031a60 : } #endif /* LWIP_DNS */ /** Initialize this module */ void sys_timeouts_init(void) { 8031a60: 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); 8031a62: 2200 movs r2, #0 8031a64: f241 3088 movw r0, #5000 ; 0x1388 8031a68: 4908 ldr r1, [pc, #32] ; (8031a8c ) 8031a6a: f7ff ffcb bl 8031a04 #endif /* LWIP_ARP */ #if LWIP_DHCP sys_timeout(DHCP_COARSE_TIMER_MSECS, dhcp_timer_coarse, NULL); 8031a6e: 2200 movs r2, #0 8031a70: f64e 2060 movw r0, #60000 ; 0xea60 8031a74: 4906 ldr r1, [pc, #24] ; (8031a90 ) 8031a76: f7ff ffc5 bl 8031a04 sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL); 8031a7a: 4906 ldr r1, [pc, #24] ; (8031a94 ) 8031a7c: f44f 70fa mov.w r0, #500 ; 0x1f4 8031a80: 2200 movs r2, #0 #if NO_SYS /* Initialise timestamp for sys_check_timeouts */ timeouts_last_time = sys_now(); #endif } 8031a82: 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); 8031a86: f7ff bfbd b.w 8031a04 8031a8a: bf00 nop 8031a8c: 08031ad1 .word 0x08031ad1 8031a90: 08031ab5 .word 0x08031ab5 8031a94: 08031a99 .word 0x08031a99 08031a98 : * * @param arg unused argument */ static void dhcp_timer_fine(void *arg) { 8031a98: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: dhcp_fine_tmr()\n")); dhcp_fine_tmr(); 8031a9a: f7fd f9c9 bl 802ee30 sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL); 8031a9e: 4904 ldr r1, [pc, #16] ; (8031ab0 ) 8031aa0: f44f 70fa mov.w r0, #500 ; 0x1f4 8031aa4: 2200 movs r2, #0 } 8031aa6: 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); 8031aaa: f7ff bfab b.w 8031a04 8031aae: bf00 nop 8031ab0: 08031a99 .word 0x08031a99 08031ab4 : * * @param arg unused argument */ static void dhcp_timer_coarse(void *arg) { 8031ab4: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: dhcp_coarse_tmr()\n")); dhcp_coarse_tmr(); 8031ab6: f7fd f939 bl 802ed2c sys_timeout(DHCP_COARSE_TIMER_MSECS, dhcp_timer_coarse, NULL); 8031aba: 4904 ldr r1, [pc, #16] ; (8031acc ) 8031abc: f64e 2060 movw r0, #60000 ; 0xea60 8031ac0: 2200 movs r2, #0 } 8031ac2: 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); 8031ac6: f7ff bf9d b.w 8031a04 8031aca: bf00 nop 8031acc: 08031ab5 .word 0x08031ab5 08031ad0 : * * @param arg unused argument */ static void arp_timer(void *arg) { 8031ad0: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: etharp_tmr()\n")); etharp_tmr(); 8031ad2: f004 fd1b bl 803650c sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 8031ad6: 4904 ldr r1, [pc, #16] ; (8031ae8 ) 8031ad8: f241 3088 movw r0, #5000 ; 0x1388 8031adc: 2200 movs r2, #0 } 8031ade: 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); 8031ae2: f7ff bf8f b.w 8031a04 8031ae6: bf00 nop 8031ae8: 08031ad1 .word 0x08031ad1 08031aec : */ void tcp_timer_needed(void) { /* timer is off but needed again? */ if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) { 8031aec: 4b08 ldr r3, [pc, #32] ; (8031b10 ) 8031aee: 681b ldr r3, [r3, #0] 8031af0: b96b cbnz r3, 8031b0e 8031af2: 4b08 ldr r3, [pc, #32] ; (8031b14 ) 8031af4: 681b ldr r3, [r3, #0] 8031af6: b913 cbnz r3, 8031afe 8031af8: 4b07 ldr r3, [pc, #28] ; (8031b18 ) 8031afa: 681b ldr r3, [r3, #0] 8031afc: b13b cbz r3, 8031b0e /* enable and start timer */ tcpip_tcp_timer_active = 1; 8031afe: 4b04 ldr r3, [pc, #16] ; (8031b10 ) sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 8031b00: 4906 ldr r1, [pc, #24] ; (8031b1c ) 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; 8031b02: 2201 movs r2, #1 8031b04: 601a str r2, [r3, #0] sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 8031b06: 20fa movs r0, #250 ; 0xfa 8031b08: 2200 movs r2, #0 8031b0a: f7ff bf7b b.w 8031a04 8031b0e: 4770 bx lr 8031b10: 2000c410 .word 0x2000c410 8031b14: 2000f6ac .word 0x2000f6ac 8031b18: 2000f6c0 .word 0x2000f6c0 8031b1c: 08031b21 .word 0x08031b21 08031b20 : * * @param arg unused argument */ static void tcpip_tcp_timer(void *arg) { 8031b20: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); /* call TCP timer handler */ tcp_tmr(); 8031b22: f7fe fad3 bl 80300cc /* timer still needed? */ if (tcp_active_pcbs || tcp_tw_pcbs) { 8031b26: 4b08 ldr r3, [pc, #32] ; (8031b48 ) 8031b28: 681b ldr r3, [r3, #0] 8031b2a: b913 cbnz r3, 8031b32 8031b2c: 4b07 ldr r3, [pc, #28] ; (8031b4c ) 8031b2e: 681b ldr r3, [r3, #0] 8031b30: b133 cbz r3, 8031b40 /* restart timer */ sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 8031b32: 4907 ldr r1, [pc, #28] ; (8031b50 ) 8031b34: 20fa movs r0, #250 ; 0xfa 8031b36: 2200 movs r2, #0 } else { /* disable timer */ tcpip_tcp_timer_active = 0; } } 8031b38: 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); 8031b3c: f7ff bf62 b.w 8031a04 } else { /* disable timer */ tcpip_tcp_timer_active = 0; 8031b40: 4a04 ldr r2, [pc, #16] ; (8031b54 ) 8031b42: 6013 str r3, [r2, #0] 8031b44: bd08 pop {r3, pc} 8031b46: bf00 nop 8031b48: 2000f6ac .word 0x2000f6ac 8031b4c: 2000f6c0 .word 0x2000f6c0 8031b50: 08031b21 .word 0x08031b21 8031b54: 2000c410 .word 0x2000c410 08031b58 : void sys_untimeout(sys_timeout_handler handler, void *arg) { struct sys_timeo *prev_t, *t; if (next_timeout == NULL) { 8031b58: 4b10 ldr r3, [pc, #64] ; (8031b9c ) 8031b5a: 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) { 8031b5c: b510 push {r4, lr} struct sys_timeo *prev_t, *t; if (next_timeout == NULL) { 8031b5e: b1e3 cbz r3, 8031b9a 8031b60: 2200 movs r2, #0 8031b62: e000 b.n 8031b66 return; } for (t = next_timeout, prev_t = NULL; t != NULL; prev_t = t, t = t->next) { 8031b64: 4623 mov r3, r4 if ((t->h == handler) && (t->arg == arg)) { 8031b66: 689c ldr r4, [r3, #8] 8031b68: 4284 cmp r4, r0 8031b6a: d112 bne.n 8031b92 8031b6c: 68dc ldr r4, [r3, #12] 8031b6e: 428c cmp r4, r1 8031b70: d10f bne.n 8031b92 8031b72: 6819 ldr r1, [r3, #0] /* We have a match */ /* Unlink from previous in list */ if (prev_t == NULL) { 8031b74: b902 cbnz r2, 8031b78 next_timeout = t->next; 8031b76: 4a09 ldr r2, [pc, #36] ; (8031b9c ) } else { prev_t->next = t->next; 8031b78: 6011 str r1, [r2, #0] } /* If not the last one, add time of this one back to next */ if (t->next != NULL) { 8031b7a: 681a ldr r2, [r3, #0] 8031b7c: b11a cbz r2, 8031b86 t->next->time += t->time; 8031b7e: 6850 ldr r0, [r2, #4] 8031b80: 6859 ldr r1, [r3, #4] 8031b82: 1841 adds r1, r0, r1 8031b84: 6051 str r1, [r2, #4] } memp_free(MEMP_SYS_TIMEOUT, t); 8031b86: 2009 movs r0, #9 8031b88: 4619 mov r1, r3 return; } } return; } 8031b8a: 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); 8031b8e: f7fd bba9 b.w 802f2e4 if (next_timeout == NULL) { return; } for (t = next_timeout, prev_t = NULL; t != NULL; prev_t = t, t = t->next) { 8031b92: 681c ldr r4, [r3, #0] 8031b94: 461a mov r2, r3 8031b96: 2c00 cmp r4, #0 8031b98: d1e4 bne.n 8031b64 8031b9a: bd10 pop {r4, pc} 8031b9c: 2000c414 .word 0x2000c414 08031ba0 : * @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) { 8031ba0: 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) { 8031ba4: 4e18 ldr r6, [pc, #96] ; (8031c08 ) * @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) { 8031ba6: 4604 mov r4, r0 8031ba8: 460d mov r5, r1 8031baa: 4637 mov r7, r6 struct sys_timeo *tmptimeout; sys_timeout_handler handler; void *arg; again: if (!next_timeout) { 8031bac: 6832 ldr r2, [r6, #0] 8031bae: b92a cbnz r2, 8031bbc time_needed = sys_arch_mbox_fetch(mbox, msg, 0); 8031bb0: 4620 mov r0, r4 8031bb2: 4629 mov r1, r5 } else { next_timeout->time = 0; } } } } 8031bb4: 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); 8031bb8: f005 b8d4 b.w 8036d64 } else { if (next_timeout->time > 0) { 8031bbc: 6852 ldr r2, [r2, #4] 8031bbe: b96a cbnz r2, 8031bdc 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; 8031bc0: 6839 ldr r1, [r7, #0] next_timeout = tmptimeout->next; 8031bc2: 680a ldr r2, [r1, #0] handler = tmptimeout->h; 8031bc4: 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; 8031bc8: 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); 8031bca: 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; 8031bcc: 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); 8031bd0: f7fd fb88 bl 802f2e4 if (handler != NULL) { 8031bd4: f1b8 0f00 cmp.w r8, #0 8031bd8: d0e8 beq.n 8031bac 8031bda: e006 b.n 8031bea 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); 8031bdc: 4620 mov r0, r4 8031bde: 4629 mov r1, r5 8031be0: f005 f8c0 bl 8036d64 } else { time_needed = SYS_ARCH_TIMEOUT; } if (time_needed == SYS_ARCH_TIMEOUT) { 8031be4: 1c43 adds r3, r0, #1 8031be6: d0eb beq.n 8031bc0 8031be8: e002 b.n 8031bf0 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); 8031bea: 4648 mov r0, r9 8031bec: 47c0 blx r8 8031bee: e7dd b.n 8031bac 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) { 8031bf0: 4b05 ldr r3, [pc, #20] ; (8031c08 ) 8031bf2: 681b ldr r3, [r3, #0] 8031bf4: 6859 ldr r1, [r3, #4] 8031bf6: 4288 cmp r0, r1 next_timeout->time -= time_needed; 8031bf8: bf34 ite cc 8031bfa: ebc0 0201 rsbcc r2, r0, r1 } else { next_timeout->time = 0; 8031bfe: 2200 movcs r2, #0 8031c00: 605a str r2, [r3, #4] 8031c02: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8031c06: bf00 nop 8031c08: 2000c414 .word 0x2000c414 08031c0c : /** * Initialize this module. */ void udp_init(void) { 8031c0c: 4770 bx lr 8031c0e: 0000 movs r0, r0 08031c10 : * @param inp network interface on which the datagram was received. * */ void udp_input(struct pbuf *p, struct netif *inp) { 8031c10: 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; 8031c14: 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))) { 8031c18: 8903 ldrh r3, [r0, #8] * @param inp network interface on which the datagram was received. * */ void udp_input(struct pbuf *p, struct netif *inp) { 8031c1a: 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))) { 8031c1c: f899 1000 ldrb.w r1, [r9] 8031c20: f001 010f and.w r1, r1, #15 8031c24: 1c8a adds r2, r1, #2 8031c26: 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) { 8031c2a: b085 sub sp, #20 8031c2c: 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))) { 8031c2e: db05 blt.n 8031c3c 8031c30: 0089 lsls r1, r1, #2 8031c32: 4249 negs r1, r1 8031c34: f7fd fc35 bl 802f4a2 8031c38: 4683 mov fp, r0 8031c3a: b110 cbz r0, 8031c42 /* 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(); 8031c3c: f002 fa88 bl 8034150 8031c40: e096 b.n 8031d70 } udphdr = (struct udp_hdr *)p->payload; /* is broadcast packet ? */ broadcast = ip_addr_isbroadcast(¤t_iphdr_dest, inp); 8031c42: f8df a150 ldr.w sl, [pc, #336] ; 8031d94 snmp_inc_udpinerrors(); pbuf_free(p); goto end; } udphdr = (struct udp_hdr *)p->payload; 8031c46: 686c ldr r4, [r5, #4] /* is broadcast packet ? */ broadcast = ip_addr_isbroadcast(¤t_iphdr_dest, inp); 8031c48: f8da 0000 ldr.w r0, [sl] 8031c4c: 4631 mov r1, r6 8031c4e: f000 faed bl 803222c 8031c52: 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); 8031c54: 8820 ldrh r0, [r4, #0] 8031c56: f7fc fb16 bl 802e286 8031c5a: 4607 mov r7, r0 dest = ntohs(udphdr->dest); 8031c5c: 8860 ldrh r0, [r4, #2] 8031c5e: f7fc fb12 bl 802e286 #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) { 8031c62: 2844 cmp r0, #68 ; 0x44 8031c64: d10f bne.n 8031c86 /* all packets for DHCP_CLIENT_PORT not coming from DHCP_SERVER_PORT are dropped! */ if (src == DHCP_SERVER_PORT) { 8031c66: 2f43 cmp r7, #67 ; 0x43 8031c68: d14f bne.n 8031d0a if ((inp->dhcp != NULL) && (inp->dhcp->pcb != NULL)) { 8031c6a: 6a33 ldr r3, [r6, #32] 8031c6c: 2b00 cmp r3, #0 8031c6e: d04c beq.n 8031d0a 8031c70: 685c ldr r4, [r3, #4] 8031c72: 2c00 cmp r4, #0 8031c74: d049 beq.n 8031d0a /* 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) || 8031c76: 6863 ldr r3, [r4, #4] 8031c78: 2b00 cmp r3, #0 8031c7a: d04e beq.n 8031d1a ip_addr_cmp(&(inp->dhcp->pcb->remote_ip), ¤t_iphdr_src))) { 8031c7c: 4a43 ldr r2, [pc, #268] ; (8031d8c ) 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) || 8031c7e: 6812 ldr r2, [r2, #0] 8031c80: 4293 cmp r3, r2 8031c82: d142 bne.n 8031d0a 8031c84: e049 b.n 8031d1a 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) { 8031c86: 4b42 ldr r3, [pc, #264] ; (8031d90 ) /* 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) || 8031c88: 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) { 8031c8c: 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))) { 8031c90: 4b3e ldr r3, [pc, #248] ; (8031d8c ) 8031c92: 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) { 8031c94: 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))) { 8031c96: 9303 str r3, [sp, #12] } } } else #endif /* LWIP_DHCP */ { prev = NULL; 8031c98: 4659 mov r1, fp local_match = 0; uncon_pcb = NULL; 8031c9a: 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) { 8031c9c: e032 b.n 8031d04 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) { 8031c9e: 8a62 ldrh r2, [r4, #18] 8031ca0: 4282 cmp r2, r0 8031ca2: d12d bne.n 8031d00 8031ca4: 6822 ldr r2, [r4, #0] if ( 8031ca6: f1b8 0f00 cmp.w r8, #0 8031caa: d100 bne.n 8031cae (!broadcast && ip_addr_isany(&pcb->local_ip)) || 8031cac: b15a cbz r2, 8031cc6 8031cae: 4552 cmp r2, sl 8031cb0: d009 beq.n 8031cc6 ip_addr_cmp(&(pcb->local_ip), ¤t_iphdr_dest) || 8031cb2: f1b8 0f00 cmp.w r8, #0 8031cb6: d023 beq.n 8031d00 (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) || 8031cb8: b12a cbz r2, 8031cc6 ip_addr_netcmp(&pcb->local_ip, ip_current_dest_addr(), &inp->netmask)))) { 8031cba: ea8a 0b02 eor.w fp, sl, r2 8031cbe: 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) || 8031cc0: ea1b 0f02 tst.w fp, r2 8031cc4: d11c bne.n 8031d00 ip_addr_netcmp(&pcb->local_ip, ip_current_dest_addr(), &inp->netmask)))) { #endif /* IP_SOF_BROADCAST_RECV */ local_match = 1; if ((uncon_pcb == NULL) && 8031cc6: 2b00 cmp r3, #0 8031cc8: d158 bne.n 8031d7c ((pcb->flags & UDP_FLAGS_CONNECTED) == 0)) { 8031cca: 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) && 8031ccc: f003 0304 and.w r3, r3, #4 8031cd0: b2db uxtb r3, r3 8031cd2: 2b00 cmp r3, #0 8031cd4: bf0c ite eq 8031cd6: 4623 moveq r3, r4 8031cd8: 2300 movne r3, #0 8031cda: e04f b.n 8031d7c } } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && (pcb->remote_port == src) && (ip_addr_isany(&pcb->remote_ip) || 8031cdc: f8d4 b004 ldr.w fp, [r4, #4] 8031ce0: f1bb 0f00 cmp.w fp, #0 8031ce4: d101 bne.n 8031cea ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src))) { /* the first fully matching PCB */ if (prev != NULL) { 8031ce6: b921 cbnz r1, 8031cf2 8031ce8: e017 b.n 8031d1a } } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && (pcb->remote_port == src) && (ip_addr_isany(&pcb->remote_ip) || 8031cea: 9a03 ldr r2, [sp, #12] 8031cec: 4593 cmp fp, r2 8031cee: d107 bne.n 8031d00 8031cf0: e7f9 b.n 8031ce6 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; 8031cf2: 68e3 ldr r3, [r4, #12] 8031cf4: 60cb str r3, [r1, #12] pcb->next = udp_pcbs; udp_pcbs = pcb; 8031cf6: 4b26 ldr r3, [pc, #152] ; (8031d90 ) /* 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; 8031cf8: f8c4 c00c str.w ip, [r4, #12] udp_pcbs = pcb; 8031cfc: 601c str r4, [r3, #0] 8031cfe: e00c b.n 8031d1a 8031d00: 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) { 8031d02: 68e4 ldr r4, [r4, #12] 8031d04: 2c00 cmp r4, #0 8031d06: d1ca bne.n 8031c9e 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)) { 8031d08: b933 cbnz r3, 8031d18 8031d0a: 4b22 ldr r3, [pc, #136] ; (8031d94 ) 8031d0c: 6872 ldr r2, [r6, #4] 8031d0e: 681b ldr r3, [r3, #0] 8031d10: 429a cmp r2, r3 8031d12: d12d bne.n 8031d70 8031d14: 2400 movs r4, #0 8031d16: e000 b.n 8031d1a 8031d18: 461c mov r4, r3 goto end; } } #endif /* CHECKSUM_CHECK_UDP */ } if(pbuf_header(p, -UDP_HLEN)) { 8031d1a: 4628 mov r0, r5 8031d1c: f06f 0107 mvn.w r1, #7 8031d20: f7fd fbbf bl 802f4a2 8031d24: 2800 cmp r0, #0 8031d26: d189 bne.n 8031c3c UDP_STATS_INC(udp.drop); snmp_inc_udpinerrors(); pbuf_free(p); goto end; } if (pcb != NULL) { 8031d28: b154 cbz r4, 8031d40 snmp_inc_udpindatagrams(); 8031d2a: f002 fa01 bl 8034130 pbuf_header(p, -(s16_t)((IPH_HL(iphdr) * 4) + UDP_HLEN)); } } #endif /* SO_REUSE && SO_REUSE_RXTOALL */ /* callback */ if (pcb->recv != NULL) { 8031d2e: 69a6 ldr r6, [r4, #24] 8031d30: b1f6 cbz r6, 8031d70 /* now the recv function is responsible for freeing p */ pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src); 8031d32: 9700 str r7, [sp, #0] 8031d34: 69e0 ldr r0, [r4, #28] 8031d36: 4b15 ldr r3, [pc, #84] ; (8031d8c ) 8031d38: 4621 mov r1, r4 8031d3a: 462a mov r2, r5 8031d3c: 47b0 blx r6 8031d3e: e021 b.n 8031d84 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 && 8031d40: f1b8 0f00 cmp.w r8, #0 8031d44: d112 bne.n 8031d6c !ip_addr_ismulticast(¤t_iphdr_dest)) { 8031d46: 4b13 ldr r3, [pc, #76] ; (8031d94 ) 8031d48: 681b ldr r3, [r3, #0] 8031d4a: 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 && 8031d4e: 2be0 cmp r3, #224 ; 0xe0 8031d50: d00c beq.n 8031d6c !ip_addr_ismulticast(¤t_iphdr_dest)) { /* move payload pointer back to ip header */ pbuf_header(p, (IPH_HL(iphdr) * 4) + UDP_HLEN); 8031d52: f899 1000 ldrb.w r1, [r9] 8031d56: f001 010f and.w r1, r1, #15 8031d5a: 3102 adds r1, #2 8031d5c: 0089 lsls r1, r1, #2 8031d5e: 4628 mov r0, r5 8031d60: f7fd fb9f bl 802f4a2 LWIP_ASSERT("p->payload == iphdr", (p->payload == iphdr)); icmp_dest_unreach(p, ICMP_DUR_PORT); 8031d64: 4628 mov r0, r5 8031d66: 2103 movs r1, #3 8031d68: f000 f9d2 bl 8032110 } #endif /* LWIP_ICMP */ UDP_STATS_INC(udp.proterr); UDP_STATS_INC(udp.drop); snmp_inc_udpnoports(); 8031d6c: f002 f9e8 bl 8034140 pbuf_free(p); 8031d70: 4628 mov r0, r5 } else { pbuf_free(p); } end: PERF_STOP("udp_input"); } 8031d72: b005 add sp, #20 8031d74: 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); 8031d78: f7fd bbbe b.w 802f4f8 uncon_pcb = pcb; } } } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && 8031d7c: 8aa2 ldrh r2, [r4, #20] 8031d7e: 42ba cmp r2, r7 8031d80: d1be bne.n 8031d00 8031d82: e7ab b.n 8031cdc } else { pbuf_free(p); } end: PERF_STOP("udp_input"); } 8031d84: b005 add sp, #20 8031d86: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8031d8a: bf00 nop 8031d8c: 2000f6cc .word 0x2000f6cc 8031d90: 2000f6c8 .word 0x2000f6c8 8031d94: 2000f6d4 .word 0x2000f6d4 08031d98 : * * @see udp_disconnect() */ err_t udp_bind(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 8031d98: 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) { 8031d9a: 4b25 ldr r3, [pc, #148] ; (8031e30 ) * * @see udp_disconnect() */ err_t udp_bind(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 8031d9c: 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) { 8031d9e: 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; 8031da0: 2500 movs r5, #0 /* Check for double bind and rebind of the same pcb */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 8031da2: 4603 mov r3, r0 8031da4: e012 b.n 8031dcc /* is this UDP PCB already on active list? */ if (pcb == ipcb) { 8031da6: 429c cmp r4, r3 8031da8: d00e beq.n 8031dc8 !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) && 8031daa: 8a5e ldrh r6, [r3, #18] 8031dac: 4296 cmp r6, r2 8031dae: d10c bne.n 8031dca /* IP address matches, or one is IP_ADDR_ANY? */ (ip_addr_isany(&(ipcb->local_ip)) || 8031db0: 681f ldr r7, [r3, #0] 8031db2: b90f cbnz r7, 8031db8 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; 8031db4: 20f8 movs r0, #248 ; 0xf8 8031db6: e039 b.n 8031e2c /* 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)) || 8031db8: 2900 cmp r1, #0 8031dba: d0fb beq.n 8031db4 ip_addr_isany(ipaddr) || 8031dbc: 680e ldr r6, [r1, #0] 8031dbe: 2e00 cmp r6, #0 8031dc0: d0f8 beq.n 8031db4 8031dc2: 42b7 cmp r7, r6 8031dc4: d101 bne.n 8031dca 8031dc6: e7f5 b.n 8031db4 /* 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; 8031dc8: 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) { 8031dca: 68db ldr r3, [r3, #12] 8031dcc: 2b00 cmp r3, #0 8031dce: d1ea bne.n 8031da6 return ERR_USE; } } } ip_addr_set(&pcb->local_ip, ipaddr); 8031dd0: b101 cbz r1, 8031dd4 8031dd2: 6809 ldr r1, [r1, #0] 8031dd4: 6021 str r1, [r4, #0] /* no port specified? */ if (port == 0) { 8031dd6: b9fa cbnz r2, 8031e18 8031dd8: 4b16 ldr r3, [pc, #88] ; (8031e34 ) 8031dda: 881a ldrh r2, [r3, #0] 8031ddc: f44f 4180 mov.w r1, #16384 ; 0x4000 { u16_t n = 0; struct udp_pcb *pcb; again: if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) { 8031de0: f64f 76ff movw r6, #65535 ; 0xffff 8031de4: 42b2 cmp r2, r6 8031de6: d002 beq.n 8031dee 8031de8: 3201 adds r2, #1 8031dea: b292 uxth r2, r2 8031dec: e001 b.n 8031df2 udp_port = UDP_LOCAL_PORT_RANGE_START; 8031dee: f44f 4240 mov.w r2, #49152 ; 0xc000 } /* Check all PCBs. */ for(pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 8031df2: 4603 mov r3, r0 8031df4: e00a b.n 8031e0c if (pcb->local_port == udp_port) { 8031df6: 8a5f ldrh r7, [r3, #18] 8031df8: 4297 cmp r7, r2 8031dfa: d106 bne.n 8031e0a 8031dfc: 3901 subs r1, #1 8031dfe: b289 uxth r1, r1 if (++n > (UDP_LOCAL_PORT_RANGE_END - UDP_LOCAL_PORT_RANGE_START)) { 8031e00: 2900 cmp r1, #0 8031e02: d1ef bne.n 8031de4 8031e04: 4b0b ldr r3, [pc, #44] ; (8031e34 ) 8031e06: 801a strh r2, [r3, #0] 8031e08: e7d4 b.n 8031db4 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) { 8031e0a: 68db ldr r3, [r3, #12] 8031e0c: 2b00 cmp r3, #0 8031e0e: d1f2 bne.n 8031df6 8031e10: 4b08 ldr r3, [pc, #32] ; (8031e34 ) 8031e12: 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) { 8031e14: 2a00 cmp r2, #0 8031e16: d0cd beq.n 8031db4 /* 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; 8031e18: 8262 strh r2, [r4, #18] snmp_insert_udpidx_tree(pcb); 8031e1a: 4620 mov r0, r4 8031e1c: f002 f9a8 bl 8034170 /* pcb not active yet? */ if (rebind == 0) { 8031e20: b91d cbnz r5, 8031e2a /* place the PCB on the active list if not already there */ pcb->next = udp_pcbs; 8031e22: 4b03 ldr r3, [pc, #12] ; (8031e30 ) 8031e24: 681a ldr r2, [r3, #0] udp_pcbs = pcb; 8031e26: 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; 8031e28: 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; 8031e2a: 2000 movs r0, #0 } 8031e2c: b240 sxtb r0, r0 8031e2e: bdf8 pop {r3, r4, r5, r6, r7, pc} 8031e30: 2000f6c8 .word 0x2000f6c8 8031e34: 2000071e .word 0x2000071e 08031e38 : * @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) { 8031e38: e92d 47ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr} 8031e3c: 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) { 8031e3e: 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) { 8031e40: f8dd 8030 ldr.w r8, [sp, #48] ; 0x30 8031e44: 4605 mov r5, r0 8031e46: 460e mov r6, r1 8031e48: 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) { 8031e4a: b132 cbz r2, 8031e5a return err; } } /* not enough space to add an UDP header to first pbuf in given p chain? */ if (pbuf_header(p, UDP_HLEN)) { 8031e4c: 4630 mov r0, r6 8031e4e: 2108 movs r1, #8 8031e50: f7fd fb27 bl 802f4a2 8031e54: b940 cbnz r0, 8031e68 8031e56: 4634 mov r4, r6 8031e58: e013 b.n 8031e82 #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); 8031e5a: 4601 mov r1, r0 8031e5c: f7ff ff9c bl 8031d98 if (err != ERR_OK) { 8031e60: 4607 mov r7, r0 8031e62: 2800 cmp r0, #0 8031e64: d0f2 beq.n 8031e4c 8031e66: e044 b.n 8031ef2 } /* 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); 8031e68: 2001 movs r0, #1 8031e6a: 2108 movs r1, #8 8031e6c: 2200 movs r2, #0 8031e6e: f7fd fb90 bl 802f592 /* new header pbuf could not be allocated? */ if (q == NULL) { 8031e72: 4604 mov r4, r0 8031e74: 2800 cmp r0, #0 8031e76: d039 beq.n 8031eec 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) { 8031e78: 8933 ldrh r3, [r6, #8] 8031e7a: b113 cbz r3, 8031e82 /* chain header q in front of given pbuf p (only if p contains data) */ pbuf_chain(q, p); 8031e7c: 4631 mov r1, r6 8031e7e: f7fd fc36 bl 802f6ee } 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); 8031e82: 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; 8031e84: 6867 ldr r7, [r4, #4] udphdr->src = htons(pcb->local_port); 8031e86: f7fc f9f9 bl 802e27c 8031e8a: 8038 strh r0, [r7, #0] udphdr->dest = htons(dst_port); 8031e8c: 4648 mov r0, r9 8031e8e: f7fc f9f5 bl 802e27c /* in UDP, 0 checksum means 'no checksum' */ udphdr->chksum = 0x0000; 8031e92: 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); 8031e94: 8078 strh r0, [r7, #2] /* in UDP, 0 checksum means 'no checksum' */ udphdr->chksum = 0x0000; 8031e96: 71bb strb r3, [r7, #6] 8031e98: 71fb strb r3, [r7, #7] } #endif /* LWIP_IGMP */ /* PCB local address is IP_ANY_ADDR? */ if (ip_addr_isany(&pcb->local_ip)) { 8031e9a: 682b ldr r3, [r5, #0] 8031e9c: b913 cbnz r3, 8031ea4 /* use outgoing network interface IP address as source address */ src_ip = &(netif->ip_addr); 8031e9e: f108 0904 add.w r9, r8, #4 8031ea2: e00a b.n 8031eba } 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))) { 8031ea4: f8d8 2004 ldr.w r2, [r8, #4] 8031ea8: 4293 cmp r3, r2 8031eaa: d005 beq.n 8031eb8 /* local_ip doesn't match, drop the packet */ if (q != p) { 8031eac: 42b4 cmp r4, r6 8031eae: d01f beq.n 8031ef0 /* free the header pbuf */ pbuf_free(q); 8031eb0: 4620 mov r0, r4 8031eb2: f7fd fb21 bl 802f4f8 8031eb6: e01b b.n 8031ef0 } #endif /* LWIP_IGMP */ /* PCB local address is IP_ANY_ADDR? */ if (ip_addr_isany(&pcb->local_ip)) { 8031eb8: 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); 8031eba: 8920 ldrh r0, [r4, #8] 8031ebc: f7fc f9de bl 802e27c 8031ec0: 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); 8031ec2: 7a6a ldrb r2, [r5, #9] 8031ec4: 7aab ldrb r3, [r5, #10] 8031ec6: 9200 str r2, [sp, #0] 8031ec8: 2211 movs r2, #17 8031eca: 9201 str r2, [sp, #4] 8031ecc: 4649 mov r1, r9 8031ece: 4652 mov r2, sl 8031ed0: f8cd 8008 str.w r8, [sp, #8] 8031ed4: 4620 mov r0, r4 8031ed6: f000 fb9d bl 8032614 8031eda: 4607 mov r7, r0 NETIF_SET_HWADDRHINT(netif, NULL); } /* TODO: must this be increased even if error occured? */ snmp_inc_udpoutdatagrams(); 8031edc: f002 f940 bl 8034160 /* did we chain a separate header pbuf earlier? */ if (q != p) { 8031ee0: 42b4 cmp r4, r6 8031ee2: d006 beq.n 8031ef2 /* free the header pbuf */ pbuf_free(q); 8031ee4: 4620 mov r0, r4 8031ee6: f7fd fb07 bl 802f4f8 8031eea: e002 b.n 8031ef2 /* 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; 8031eec: 27ff movs r7, #255 ; 0xff 8031eee: e000 b.n 8031ef2 /* free the header pbuf */ pbuf_free(q); q = NULL; /* p is still referenced by the caller, and will live on */ } return ERR_VAL; 8031ef0: 27fa movs r7, #250 ; 0xfa /* p is still referenced by the caller, and will live on */ } UDP_STATS_INC(udp.xmit); return err; } 8031ef2: b278 sxtb r0, r7 8031ef4: b004 add sp, #16 8031ef6: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 08031efa : * @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) { 8031efa: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} 8031efc: 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); 8031efe: 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) { 8031f00: 460f mov r7, r1 8031f02: 4614 mov r4, r2 8031f04: 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); 8031f06: f000 fa81 bl 803240c #endif /* LWIP_IGMP */ /* no outgoing network interface could be found? */ if (netif == NULL) { 8031f0a: b138 cbz r0, 8031f1c 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); 8031f0c: 9000 str r0, [sp, #0] 8031f0e: 4639 mov r1, r7 8031f10: 4628 mov r0, r5 8031f12: 4622 mov r2, r4 8031f14: 4633 mov r3, r6 8031f16: f7ff ff8f bl 8031e38 8031f1a: e000 b.n 8031f1e /* 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; 8031f1c: 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 */ } 8031f1e: b240 sxtb r0, r0 8031f20: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 08031f22 : */ 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); 8031f22: 8a83 ldrh r3, [r0, #20] 8031f24: 1d02 adds r2, r0, #4 8031f26: f7ff bfe8 b.w 8031efa 8031f2a: 0000 movs r0, r0 08031f2c : * * @see udp_disconnect() */ err_t udp_connect(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 8031f2c: b570 push {r4, r5, r6, lr} 8031f2e: 4616 mov r6, r2 struct udp_pcb *ipcb; if (pcb->local_port == 0) { 8031f30: 8a42 ldrh r2, [r0, #18] * * @see udp_disconnect() */ err_t udp_connect(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 8031f32: 4604 mov r4, r0 8031f34: 460d mov r5, r1 struct udp_pcb *ipcb; if (pcb->local_port == 0) { 8031f36: b10a cbz r2, 8031f3c if (err != ERR_OK) { return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); 8031f38: b935 cbnz r5, 8031f48 8031f3a: e006 b.n 8031f4a 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); 8031f3c: 4601 mov r1, r0 8031f3e: f7ff ff2b bl 8031d98 if (err != ERR_OK) { 8031f42: 2800 cmp r0, #0 8031f44: d0f8 beq.n 8031f38 8031f46: e013 b.n 8031f70 return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); 8031f48: 682d ldr r5, [r5, #0] pcb->remote_port = port; pcb->flags |= UDP_FLAGS_CONNECTED; 8031f4a: 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) { 8031f4c: 4a09 ldr r2, [pc, #36] ; (8031f74 ) if (err != ERR_OK) { return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); 8031f4e: 6065 str r5, [r4, #4] pcb->remote_port = port; pcb->flags |= UDP_FLAGS_CONNECTED; 8031f50: f043 0304 orr.w r3, r3, #4 8031f54: 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) { 8031f56: 6813 ldr r3, [r2, #0] return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); pcb->remote_port = port; 8031f58: 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) { 8031f5a: 4618 mov r0, r3 8031f5c: e002 b.n 8031f64 if (pcb == ipcb) { 8031f5e: 4284 cmp r4, r0 8031f60: d005 beq.n 8031f6e 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) { 8031f62: 68c0 ldr r0, [r0, #12] 8031f64: 2800 cmp r0, #0 8031f66: d1fa bne.n 8031f5e /* already on the list, just return */ return ERR_OK; } } /* PCB not yet on the list, add PCB now */ pcb->next = udp_pcbs; 8031f68: 60e3 str r3, [r4, #12] udp_pcbs = pcb; 8031f6a: 6014 str r4, [r2, #0] return ERR_OK; 8031f6c: e000 b.n 8031f70 /* 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; 8031f6e: 2000 movs r0, #0 } /* PCB not yet on the list, add PCB now */ pcb->next = udp_pcbs; udp_pcbs = pcb; return ERR_OK; } 8031f70: b240 sxtb r0, r0 8031f72: bd70 pop {r4, r5, r6, pc} 8031f74: 2000f6c8 .word 0x2000f6c8 08031f78 : */ void udp_disconnect(struct udp_pcb *pcb) { /* reset remote address association */ ip_addr_set_any(&pcb->remote_ip); 8031f78: 2300 movs r3, #0 8031f7a: 6043 str r3, [r0, #4] pcb->remote_port = 0; 8031f7c: 8283 strh r3, [r0, #20] /* mark PCB as unconnected */ pcb->flags &= ~UDP_FLAGS_CONNECTED; 8031f7e: 7c03 ldrb r3, [r0, #16] 8031f80: f023 0304 bic.w r3, r3, #4 8031f84: 7403 strb r3, [r0, #16] 8031f86: 4770 bx lr 08031f88 : */ void udp_recv(struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg) { /* remember recv() callback and user data */ pcb->recv = recv; 8031f88: 6181 str r1, [r0, #24] pcb->recv_arg = recv_arg; 8031f8a: 61c2 str r2, [r0, #28] 8031f8c: 4770 bx lr 8031f8e: 0000 movs r0, r0 08031f90 : * * @see udp_new() */ void udp_remove(struct udp_pcb *pcb) { 8031f90: b510 push {r4, lr} 8031f92: 4604 mov r4, r0 struct udp_pcb *pcb2; snmp_delete_udpidx_tree(pcb); 8031f94: f002 f930 bl 80341f8 /* pcb to be removed is first in list? */ if (udp_pcbs == pcb) { 8031f98: 4a0a ldr r2, [pc, #40] ; (8031fc4 ) 8031f9a: 6813 ldr r3, [r2, #0] 8031f9c: 42a3 cmp r3, r4 8031f9e: d109 bne.n 8031fb4 /* make list start at 2nd pcb */ udp_pcbs = udp_pcbs->next; 8031fa0: 68e3 ldr r3, [r4, #12] 8031fa2: 6013 str r3, [r2, #0] 8031fa4: e008 b.n 8031fb8 /* 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) { 8031fa6: 68da ldr r2, [r3, #12] 8031fa8: b11a cbz r2, 8031fb2 8031faa: 42a2 cmp r2, r4 /* remove pcb from list */ pcb2->next = pcb->next; 8031fac: bf04 itt eq 8031fae: 68e2 ldreq r2, [r4, #12] 8031fb0: 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) { 8031fb2: 68db ldr r3, [r3, #12] 8031fb4: 2b00 cmp r3, #0 8031fb6: d1f6 bne.n 8031fa6 /* remove pcb from list */ pcb2->next = pcb->next; } } } memp_free(MEMP_UDP_PCB, pcb); 8031fb8: 2001 movs r0, #1 8031fba: 4621 mov r1, r4 } 8031fbc: e8bd 4010 ldmia.w sp!, {r4, lr} /* remove pcb from list */ pcb2->next = pcb->next; } } } memp_free(MEMP_UDP_PCB, pcb); 8031fc0: f7fd b990 b.w 802f2e4 8031fc4: 2000f6c8 .word 0x2000f6c8 08031fc8 : * * @see udp_remove() */ struct udp_pcb * udp_new(void) { 8031fc8: b510 push {r4, lr} struct udp_pcb *pcb; pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB); 8031fca: 2001 movs r0, #1 8031fcc: f7fd f974 bl 802f2b8 /* could allocate UDP PCB? */ if (pcb != NULL) { 8031fd0: 4604 mov r4, r0 8031fd2: b128 cbz r0, 8031fe0 /* 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)); 8031fd4: 2100 movs r1, #0 8031fd6: 2220 movs r2, #32 8031fd8: f7ef fee2 bl 8021da0 pcb->ttl = UDP_TTL; 8031fdc: 23ff movs r3, #255 ; 0xff 8031fde: 72a3 strb r3, [r4, #10] } return pcb; } 8031fe0: 4620 mov r0, r4 8031fe2: bd10 pop {r4, pc} 08031fe4 : * @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) { 8031fe4: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 8031fe8: 4604 mov r4, r0 8031fea: b085 sub sp, #20 8031fec: 460f mov r7, r1 struct icmp_echo_hdr *iecho; struct ip_hdr *iphdr; s16_t hlen; ICMP_STATS_INC(icmp.recv); snmp_inc_icmpinmsgs(); 8031fee: f002 f837 bl 8034060 iphdr = (struct ip_hdr *)p->payload; 8031ff2: 6865 ldr r5, [r4, #4] hlen = IPH_HL(iphdr) * 4; 8031ff4: f895 8000 ldrb.w r8, [r5] 8031ff8: f008 080f and.w r8, r8, #15 8031ffc: ea4f 0888 mov.w r8, r8, lsl #2 if (pbuf_header(p, -hlen) || (p->tot_len < sizeof(u16_t)*2)) { 8032000: f1c8 0900 rsb r9, r8, #0 8032004: 4620 mov r0, r4 8032006: fa0f f189 sxth.w r1, r9 803200a: f7fd fa4a bl 802f4a2 803200e: 2800 cmp r0, #0 8032010: d172 bne.n 80320f8 8032012: 8923 ldrh r3, [r4, #8] 8032014: 2b03 cmp r3, #3 8032016: d96f bls.n 80320f8 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short ICMP (%"U16_F" bytes) received\n", p->tot_len)); goto lenerr; } type = *((u8_t *)p->payload); 8032018: 6863 ldr r3, [r4, #4] #ifdef LWIP_DEBUG code = *(((u8_t *)p->payload)+1); #endif /* LWIP_DEBUG */ switch (type) { 803201a: 781b ldrb r3, [r3, #0] 803201c: 2b08 cmp r3, #8 803201e: d165 bne.n 80320ec #if !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING { int accepted = 1; #if !LWIP_MULTICAST_PING /* multicast destination address? */ if (ip_addr_ismulticast(¤t_iphdr_dest)) { 8032020: 4b39 ldr r3, [pc, #228] ; (8032108 ) 8032022: 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)) { 8032024: 4639 mov r1, r7 8032026: 4630 mov r0, r6 8032028: f000 f900 bl 803222c 803202c: 2800 cmp r0, #0 803202e: d15d bne.n 80320ec #if !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING { int accepted = 1; #if !LWIP_MULTICAST_PING /* multicast destination address? */ if (ip_addr_ismulticast(¤t_iphdr_dest)) { 8032030: 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) { 8032034: 2ee0 cmp r6, #224 ; 0xe0 8032036: d100 bne.n 803203a 8032038: e058 b.n 80320ec 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)) { 803203a: 8923 ldrh r3, [r4, #8] 803203c: 2b07 cmp r3, #7 803203e: d95b bls.n 80320f8 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: bad ICMP echo received\n")); goto lenerr; } if (inet_chksum_pbuf(p) != 0) { 8032040: 4620 mov r0, r4 8032042: f000 f8cf bl 80321e4 8032046: b100 cbz r0, 803204a 8032048: e056 b.n 80320f8 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))) { 803204a: 4620 mov r0, r4 803204c: 2122 movs r1, #34 ; 0x22 ICMP_STATS_INC(icmp.recv); snmp_inc_icmpinmsgs(); iphdr = (struct ip_hdr *)p->payload; hlen = IPH_HL(iphdr) * 4; 803204e: 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))) { 8032052: f7fd fa26 bl 802f4a2 8032056: b1f8 cbz r0, 8032098 /* 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)) { 8032058: 4620 mov r0, r4 803205a: 4641 mov r1, r8 803205c: f7fd fa21 bl 802f4a2 8032060: 4602 mov r2, r0 8032062: 2800 cmp r0, #0 8032064: d148 bne.n 80320f8 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); 8032066: 2002 movs r0, #2 8032068: 8921 ldrh r1, [r4, #8] 803206a: f7fd fa92 bl 802f592 if (r == NULL) { 803206e: 4606 mov r6, r0 8032070: 2800 cmp r0, #0 8032072: d041 beq.n 80320f8 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) { 8032074: 4621 mov r1, r4 8032076: f7fd fb43 bl 802f700 803207a: 2800 cmp r0, #0 803207c: d13c bne.n 80320f8 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)) { 803207e: 4630 mov r0, r6 8032080: 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; 8032084: 6875 ldr r5, [r6, #4] /* switch r->payload back to icmp header */ if (pbuf_header(r, -hlen)) { 8032086: f7fd fa0c bl 802f4a2 803208a: 2800 cmp r0, #0 803208c: d134 bne.n 80320f8 LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0); goto memerr; } /* free the original p */ pbuf_free(p); 803208e: 4620 mov r0, r4 8032090: f7fd fa32 bl 802f4f8 8032094: 4634 mov r4, r6 8032096: e006 b.n 80320a6 /* 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))) { 8032098: 4620 mov r0, r4 803209a: f06f 0121 mvn.w r1, #33 ; 0x21 803209e: f7fd fa00 bl 802f4a2 80320a2: 2800 cmp r0, #0 80320a4: d128 bne.n 80320f8 #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()); 80320a6: f8df 9060 ldr.w r9, [pc, #96] ; 8032108 } #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; 80320aa: 6863 ldr r3, [r4, #4] ip_addr_copy(iphdr->src, *ip_current_dest_addr()); 80320ac: f8d9 2000 ldr.w r2, [r9] 80320b0: 60ea str r2, [r5, #12] ip_addr_copy(iphdr->dest, *ip_current_src_addr()); 80320b2: 4a16 ldr r2, [pc, #88] ; (803210c ) 80320b4: 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); 80320b6: 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()); 80320b8: 612a str r2, [r5, #16] ICMPH_TYPE_SET(iecho, ICMP_ER); 80320ba: 2200 movs r2, #0 80320bc: 701a strb r2, [r3, #0] //----------------------------------------------------------- // Добавил Ñ„Ð¸ÐºÑ 15.08.15. // Ð¤Ð¸ÐºÑ Ð¸ÑправлÑет баг Ñ Ð¿Ð¸Ð½Ð³Ð¾Ð¼. #ifdef CHECKSUM_BY_HARDWARE iecho->chksum = 0; 80320be: 709a strb r2, [r3, #2] 80320c0: 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); 80320c2: 72aa strb r2, [r5, #10] 80320c4: 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); 80320c6: 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(); 80320c8: f001 ffda bl 8034080 /* increase number of echo replies attempted to send */ snmp_inc_icmpoutechoreps(); 80320cc: f001 ffe8 bl 80340a0 if(pbuf_header(p, hlen)) { 80320d0: 4620 mov r0, r4 80320d2: 4641 mov r1, r8 80320d4: f7fd f9e5 bl 802f4a2 80320d8: 4602 mov r2, r0 80320da: b938 cbnz r0, 80320ec 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, 80320dc: 2301 movs r3, #1 80320de: e88d 0089 stmia.w sp, {r0, r3, r7} 80320e2: 4620 mov r0, r4 80320e4: 4649 mov r1, r9 80320e6: 4633 mov r3, r6 80320e8: f000 fa94 bl 8032614 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); 80320ec: 4620 mov r0, r4 pbuf_free(p); ICMP_STATS_INC(icmp.err); snmp_inc_icmpinerrors(); return; #endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ } 80320ee: b005 add sp, #20 80320f0: 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); 80320f4: f7fd ba00 b.w 802f4f8 ICMP_STATS_INC(icmp.lenerr); snmp_inc_icmpinerrors(); return; #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN memerr: pbuf_free(p); 80320f8: 4620 mov r0, r4 80320fa: f7fd f9fd bl 802f4f8 ICMP_STATS_INC(icmp.err); snmp_inc_icmpinerrors(); return; #endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ } 80320fe: b005 add sp, #20 8032100: 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(); 8032104: f001 bfb4 b.w 8034070 8032108: 2000f6d4 .word 0x2000f6d4 803210c: 2000f6cc .word 0x2000f6cc 08032110 : * 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) { 8032110: e92d 41ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, lr} 8032114: 4607 mov r7, r0 8032116: 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, 8032118: 2001 movs r0, #1 803211a: 2124 movs r1, #36 ; 0x24 803211c: 2200 movs r2, #0 803211e: f7fd fa38 bl 802f592 PBUF_RAM); if (q == NULL) { 8032122: 4606 mov r6, r0 8032124: b358 cbz r0, 803217e 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; 8032126: 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; 8032128: 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; 803212c: 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; 803212e: 2303 movs r3, #3 icmphdr->code = code; icmphdr->id = 0; 8032130: 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; 8032132: 7023 strb r3, [r4, #0] icmphdr->code = code; icmphdr->id = 0; 8032134: 7125 strb r5, [r4, #4] 8032136: 7165 strb r5, [r4, #5] icmphdr->seqno = 0; 8032138: 71a5 strb r5, [r4, #6] 803213a: 71e5 strb r5, [r4, #7] /* copy fields from original packet */ SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload, 803213c: 6840 ldr r0, [r0, #4] 803213e: 6879 ldr r1, [r7, #4] 8032140: 221c movs r2, #28 8032142: 3008 adds r0, #8 8032144: f7ef fd72 bl 8021c2c IP_HLEN + ICMP_DEST_UNREACH_DATASIZE); /* calculate checksum */ icmphdr->chksum = 0; 8032148: 70a5 strb r5, [r4, #2] 803214a: 70e5 strb r5, [r4, #3] icmphdr->chksum = inet_chksum(icmphdr, q->len); 803214c: 8971 ldrh r1, [r6, #10] 803214e: 4620 mov r0, r4 8032150: f000 f842 bl 80321d8 8032154: 8060 strh r0, [r4, #2] ICMP_STATS_INC(icmp.xmit); /* increase number of messages attempted to send */ snmp_inc_icmpoutmsgs(); 8032156: f001 ff93 bl 8034080 /* increase number of destination unreachable messages attempted to send */ snmp_inc_icmpouttimeexcds(); 803215a: f001 ff99 bl 8034090 ip_addr_copy(iphdr_src, iphdr->src); 803215e: f8d8 300c ldr.w r3, [r8, #12] 8032162: aa04 add r2, sp, #16 ip_output(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP); 8032164: 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); 8032166: f842 3d04 str.w r3, [r2, #-4]! ip_output(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP); 803216a: 2301 movs r3, #1 803216c: 9301 str r3, [sp, #4] 803216e: 9500 str r5, [sp, #0] 8032170: 4629 mov r1, r5 8032172: 23ff movs r3, #255 ; 0xff 8032174: f000 fa9e bl 80326b4 pbuf_free(q); 8032178: 4630 mov r0, r6 803217a: f7fd f9bd bl 802f4f8 */ void icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t) { icmp_send_response(p, ICMP_DUR, t); } 803217e: e8bd 81ff ldmia.w sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, pc} 08032182 : * @return host order (!) lwip checksum (non-inverted Internet sum) */ static u16_t lwip_standard_chksum(void *dataptr, int len) { 8032182: b513 push {r0, r1, r4, lr} u8_t *pb = (u8_t *)dataptr; u16_t *ps, t = 0; 8032184: 2300 movs r3, #0 u32_t sum = 0; int odd = ((mem_ptr_t)pb & 1); /* Get aligned to u16_t */ if (odd && len > 0) { 8032186: 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; 803218a: 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) { 803218e: d006 beq.n 803219e 8032190: 4299 cmp r1, r3 8032192: dd04 ble.n 803219e ((u8_t *)&t)[1] = *pb++; 8032194: f810 3b01 ldrb.w r3, [r0], #1 len--; 8032198: 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++; 803219a: 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; 803219e: 2300 movs r3, #0 len--; } /* Add the bulk of the data */ ps = (u16_t *)(void *)pb; while (len > 1) { 80321a0: e003 b.n 80321aa sum += *ps++; 80321a2: f830 4b02 ldrh.w r4, [r0], #2 len -= 2; 80321a6: 3902 subs r1, #2 } /* Add the bulk of the data */ ps = (u16_t *)(void *)pb; while (len > 1) { sum += *ps++; 80321a8: 191b adds r3, r3, r4 len--; } /* Add the bulk of the data */ ps = (u16_t *)(void *)pb; while (len > 1) { 80321aa: 2901 cmp r1, #1 80321ac: dcf9 bgt.n 80321a2 len -= 2; } /* Consume left-over byte, if any */ if (len > 0) { ((u8_t *)&t)[0] = *(u8_t *)ps; 80321ae: bf04 itt eq 80321b0: 7801 ldrbeq r1, [r0, #0] 80321b2: f88d 1006 strbeq.w r1, [sp, #6] } /* Add end bytes */ sum += t; 80321b6: f8bd 0006 ldrh.w r0, [sp, #6] 80321ba: 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); 80321bc: b298 uxth r0, r3 80321be: eb00 4313 add.w r3, r0, r3, lsr #16 sum = FOLD_U32T(sum); 80321c2: b298 uxth r0, r3 80321c4: eb00 4013 add.w r0, r0, r3, lsr #16 /* Swap if alignment was odd */ if (odd) { 80321c8: b122 cbz r2, 80321d4 sum = SWAP_BYTES_IN_WORD(sum); 80321ca: 0603 lsls r3, r0, #24 80321cc: f3c0 2007 ubfx r0, r0, #8, #8 80321d0: ea40 4013 orr.w r0, r0, r3, lsr #16 } return (u16_t)sum; } 80321d4: b280 uxth r0, r0 80321d6: bd1c pop {r2, r3, r4, pc} 080321d8 : * @return checksum (as u16_t) to be saved directly in the protocol header */ u16_t inet_chksum(void *dataptr, u16_t len) { 80321d8: b508 push {r3, lr} return ~LWIP_CHKSUM(dataptr, len); 80321da: f7ff ffd2 bl 8032182 80321de: 43c0 mvns r0, r0 } 80321e0: b280 uxth r0, r0 80321e2: bd08 pop {r3, pc} 080321e4 : * @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) { 80321e4: b570 push {r4, r5, r6, lr} u32_t acc; struct pbuf *q; u8_t swapped; acc = 0; swapped = 0; 80321e6: 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) { 80321e8: 4605 mov r5, r0 u32_t acc; struct pbuf *q; u8_t swapped; acc = 0; 80321ea: 4634 mov r4, r6 swapped = 0; for(q = p; q != NULL; q = q->next) { 80321ec: e013 b.n 8032216 acc += LWIP_CHKSUM(q->payload, q->len); 80321ee: 8969 ldrh r1, [r5, #10] 80321f0: 6868 ldr r0, [r5, #4] 80321f2: f7ff ffc6 bl 8032182 acc = FOLD_U32T(acc); if (q->len % 2 != 0) { 80321f6: 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); 80321f8: 1900 adds r0, r0, r4 acc = FOLD_U32T(acc); 80321fa: b284 uxth r4, r0 if (q->len % 2 != 0) { 80321fc: 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); 80321fe: eb04 4410 add.w r4, r4, r0, lsr #16 if (q->len % 2 != 0) { 8032202: d507 bpl.n 8032214 swapped = 1 - swapped; acc = SWAP_BYTES_IN_WORD(acc); 8032204: 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; 8032206: f1c6 0601 rsb r6, r6, #1 acc = SWAP_BYTES_IN_WORD(acc); 803220a: 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; 803220e: b2f6 uxtb r6, r6 acc = SWAP_BYTES_IN_WORD(acc); 8032210: 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) { 8032214: 682d ldr r5, [r5, #0] 8032216: 2d00 cmp r5, #0 8032218: d1e9 bne.n 80321ee swapped = 1 - swapped; acc = SWAP_BYTES_IN_WORD(acc); } } if (swapped) { 803221a: b126 cbz r6, 8032226 acc = SWAP_BYTES_IN_WORD(acc); 803221c: 0623 lsls r3, r4, #24 803221e: f3c4 2407 ubfx r4, r4, #8, #8 8032222: ea44 4413 orr.w r4, r4, r3, lsr #16 } return (u16_t)~(acc & 0xffffUL); 8032226: 43e0 mvns r0, r4 } 8032228: b280 uxth r0, r0 803222a: bd70 pop {r4, r5, r6, pc} 0803222c : { ip_addr_t ipaddr; ip4_addr_set_u32(&ipaddr, addr); /* all ones (broadcast) or all zeroes (old skool broadcast) */ if ((~addr == IPADDR_ANY) || 803222c: 1e43 subs r3, r0, #1 803222e: 3303 adds r3, #3 8032230: d811 bhi.n 8032256 (addr == IPADDR_ANY)) { return 1; /* no broadcast support on this network interface? */ } else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) { 8032232: f891 302d ldrb.w r3, [r1, #45] ; 0x2d 8032236: f003 0302 and.w r3, r3, #2 803223a: b2db uxtb r3, r3 803223c: b16b cbz r3, 803225a /* 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)) { 803223e: 684a ldr r2, [r1, #4] 8032240: 4290 cmp r0, r2 8032242: d00a beq.n 803225a return 0; /* on the same (sub) network... */ } else if (ip_addr_netcmp(&ipaddr, &(netif->ip_addr), &(netif->netmask)) 8032244: 688b ldr r3, [r1, #8] 8032246: 4042 eors r2, r0 8032248: 421a tst r2, r3 803224a: d000 beq.n 803224e 803224c: e005 b.n 803225a /* ...and host identifier bits are all ones? =>... */ && ((addr & ~ip4_addr_get_u32(&netif->netmask)) == 803224e: 43db mvns r3, r3 8032250: 4018 ands r0, r3 8032252: 4298 cmp r0, r3 8032254: d101 bne.n 803225a ip4_addr_set_u32(&ipaddr, addr); /* all ones (broadcast) or all zeroes (old skool broadcast) */ if ((~addr == IPADDR_ANY) || (addr == IPADDR_ANY)) { return 1; 8032256: 2001 movs r0, #1 8032258: 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; 803225a: 2000 movs r0, #0 /* => network broadcast address */ return 1; } else { return 0; } } 803225c: 4770 bx lr 0803225e : * @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) { 803225e: b5f0 push {r4, r5, r6, r7, lr} u8_t base; char c; u32_t parts[4]; u32_t *pp = parts; c = *cp; 8032260: 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) { 8032262: b085 sub sp, #20 8032264: 460e mov r6, r1 u8_t base; char c; u32_t parts[4]; u32_t *pp = parts; c = *cp; 8032266: 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) 8032268: aa00 add r2, sp, #0 803226a: 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)) 803226c: f1a3 0230 sub.w r2, r3, #48 ; 0x30 8032270: 2a09 cmp r2, #9 8032272: d86d bhi.n 8032350 return (0); val = 0; base = 10; if (c == '0') { 8032274: 2b30 cmp r3, #48 ; 0x30 8032276: d10b bne.n 8032290 c = *++cp; 8032278: 7843 ldrb r3, [r0, #1] if (c == 'x' || c == 'X') { 803227a: 2b78 cmp r3, #120 ; 0x78 803227c: d004 beq.n 8032288 803227e: 2b58 cmp r3, #88 ; 0x58 8032280: d002 beq.n 8032288 if (!isdigit(c)) return (0); val = 0; base = 10; if (c == '0') { c = *++cp; 8032282: 3001 adds r0, #1 if (c == 'x' || c == 'X') { base = 16; c = *++cp; } else base = 8; 8032284: 2508 movs r5, #8 8032286: e004 b.n 8032292 base = 10; if (c == '0') { c = *++cp; if (c == 'x' || c == 'X') { base = 16; c = *++cp; 8032288: 7883 ldrb r3, [r0, #2] val = 0; base = 10; if (c == '0') { c = *++cp; if (c == 'x' || c == 'X') { base = 16; 803228a: 2510 movs r5, #16 c = *++cp; 803228c: 3002 adds r0, #2 803228e: e000 b.n 8032292 * 0x=hex, 0=octal, 1-9=decimal. */ if (!isdigit(c)) return (0); val = 0; base = 10; 8032290: 250a movs r5, #10 8032292: 4602 mov r2, r0 if (c == '0') { c = *++cp; if (c == 'x' || c == 'X') { base = 16; 8032294: 2000 movs r0, #0 8032296: e000 b.n 803229a 8032298: 3201 adds r2, #1 c = *++cp; } else base = 8; } for (;;) { if (isdigit(c)) { 803229a: f1a3 0130 sub.w r1, r3, #48 ; 0x30 803229e: 2909 cmp r1, #9 80322a0: d803 bhi.n 80322aa val = (val * base) + (int)(c - '0'); 80322a2: fb05 3000 mla r0, r5, r0, r3 80322a6: 3830 subs r0, #48 ; 0x30 80322a8: e013 b.n 80322d2 c = *++cp; } else if (base == 16 && isxdigit(c)) { 80322aa: 2d10 cmp r5, #16 80322ac: d113 bne.n 80322d6 80322ae: f1a3 0161 sub.w r1, r3, #97 ; 0x61 80322b2: b2c9 uxtb r1, r1 80322b4: 2905 cmp r1, #5 80322b6: d904 bls.n 80322c2 80322b8: f1a3 0c41 sub.w ip, r3, #65 ; 0x41 80322bc: f1bc 0f05 cmp.w ip, #5 80322c0: d809 bhi.n 80322d6 val = (val << 4) | (int)(c + 10 - (islower(c) ? 'a' : 'A')); 80322c2: 330a adds r3, #10 80322c4: 2919 cmp r1, #25 80322c6: bf8c ite hi 80322c8: 2141 movhi r1, #65 ; 0x41 80322ca: 2161 movls r1, #97 ; 0x61 80322cc: 1a5b subs r3, r3, r1 80322ce: ea43 1000 orr.w r0, r3, r0, lsl #4 c = *++cp; 80322d2: 7853 ldrb r3, [r2, #1] 80322d4: e7e0 b.n 8032298 } else break; } if (c == '.') { 80322d6: 2b2e cmp r3, #46 ; 0x2e 80322d8: d107 bne.n 80322ea * 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) { 80322da: 2c0c cmp r4, #12 80322dc: d038 beq.n 8032350 return (0); } *pp++ = val; 80322de: f84d 0004 str.w r0, [sp, r4] c = *++cp; 80322e2: 7853 ldrb r3, [r2, #1] 80322e4: 1c50 adds r0, r2, #1 80322e6: 3404 adds r4, #4 } else break; } 80322e8: e7be b.n 8032268 80322ea: 2b0d cmp r3, #13 80322ec: d803 bhi.n 80322f6 80322ee: 2b09 cmp r3, #9 80322f0: d203 bcs.n 80322fa 80322f2: b113 cbz r3, 80322fa 80322f4: e02c b.n 8032350 80322f6: 2b20 cmp r3, #32 80322f8: d12a bne.n 8032350 } /* * Concoct the address according to * the number of parts specified. */ switch (pp - parts + 1) { 80322fa: 466b mov r3, sp 80322fc: 1afb subs r3, r7, r3 80322fe: 109b asrs r3, r3, #2 8032300: 3301 adds r3, #1 8032302: 2b04 cmp r3, #4 8032304: d81f bhi.n 8032346 8032306: e8df f003 tbb [pc, r3] 803230a: 1e23 .short 0x1e23 803230c: 0a03 .short 0x0a03 803230e: 13 .byte 0x13 803230f: 00 .byte 0x00 case 1: /* a -- 32 bits */ break; case 2: /* a.b -- 8.24 bits */ if (val > 0xffffffUL) { 8032310: f1b0 7f80 cmp.w r0, #16777216 ; 0x1000000 8032314: d21c bcs.n 8032350 return (0); } val |= parts[0] << 24; 8032316: 9b00 ldr r3, [sp, #0] 8032318: ea40 6003 orr.w r0, r0, r3, lsl #24 break; 803231c: e013 b.n 8032346 case 3: /* a.b.c -- 8.8.16 bits */ if (val > 0xffff) { 803231e: f5b0 3f80 cmp.w r0, #65536 ; 0x10000 8032322: d215 bcs.n 8032350 return (0); } val |= (parts[0] << 24) | (parts[1] << 16); 8032324: 9b00 ldr r3, [sp, #0] 8032326: 061a lsls r2, r3, #24 8032328: 9b01 ldr r3, [sp, #4] 803232a: ea42 4303 orr.w r3, r2, r3, lsl #16 803232e: e009 b.n 8032344 break; case 4: /* a.b.c.d -- 8.8.8.8 bits */ if (val > 0xff) { 8032330: 28ff cmp r0, #255 ; 0xff 8032332: d80d bhi.n 8032350 return (0); } val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); 8032334: 9b00 ldr r3, [sp, #0] 8032336: 061a lsls r2, r3, #24 8032338: 9b01 ldr r3, [sp, #4] 803233a: ea42 4203 orr.w r2, r2, r3, lsl #16 803233e: 9b02 ldr r3, [sp, #8] 8032340: ea42 2303 orr.w r3, r2, r3, lsl #8 8032344: 4318 orrs r0, r3 break; default: LWIP_ASSERT("unhandled", 0); break; } if (addr) { 8032346: b12e cbz r6, 8032354 ip4_addr_set_u32(addr, htonl(val)); 8032348: f7fb ffa2 bl 802e290 803234c: 6030 str r0, [r6, #0] 803234e: e001 b.n 8032354 * Collect number up to ``.''. * Values are specified as for C: * 0x=hex, 0=octal, 1-9=decimal. */ if (!isdigit(c)) return (0); 8032350: 2000 movs r0, #0 8032352: e000 b.n 8032356 break; } if (addr) { ip4_addr_set_u32(addr, htonl(val)); } return (1); 8032354: 2001 movs r0, #1 } 8032356: b005 add sp, #20 8032358: bdf0 pop {r4, r5, r6, r7, pc} 0803235a : * @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) { 803235a: b507 push {r0, r1, r2, lr} ip_addr_t val; if (ipaddr_aton(cp, &val)) { 803235c: a901 add r1, sp, #4 803235e: f7ff ff7e bl 803225e 8032362: b108 cbz r0, 8032368 return ip4_addr_get_u32(&val); 8032364: 9801 ldr r0, [sp, #4] 8032366: e001 b.n 803236c } return (IPADDR_NONE); 8032368: f04f 30ff mov.w r0, #4294967295 } 803236c: bd0e pop {r1, r2, r3, pc} 0803236e : * @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) { 803236e: 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); 8032372: 6803 ldr r3, [r0, #0] 8032374: 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) 8032376: 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); 803237a: f840 3d04 str.w r3, [r0, #-4]! rp = buf; 803237e: 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) 8032380: 3801 subs r0, #1 char *rp; u8_t *ap; u8_t rem; u8_t n; u8_t i; int len = 0; 8032382: 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; 8032384: f04f 0c0a mov.w ip, #10 *rp++ = inv[i]; } if (len++ >= buflen) { return NULL; } *rp++ = '.'; 8032388: f04f 092e mov.w r9, #46 ; 0x2e 803238c: 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) 803238e: 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; 8032390: fbb3 f6fc udiv r6, r3, ip *ap /= (u8_t)10; inv[i++] = '0' + rem; 8032394: 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; 8032398: fb0c 3a16 mls sl, ip, r6, r3 *ap /= (u8_t)10; inv[i++] = '0' + rem; 803239c: eb0b 0305 add.w r3, fp, r5 80323a0: f10a 0a30 add.w sl, sl, #48 ; 0x30 80323a4: 3501 adds r5, #1 80323a6: f803 ac08 strb.w sl, [r3, #-8] } while(*ap); 80323aa: 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; 80323ae: b2ed uxtb r5, r5 } while(*ap); 80323b0: d1ee bne.n 8032390 80323b2: 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) 80323b4: 1be6 subs r6, r4, r7 80323b6: f800 3f01 strb.w r3, [r0, #1]! 80323ba: b2ed uxtb r5, r5 80323bc: 463b mov r3, r7 80323be: 4637 mov r7, r6 80323c0: e00b b.n 80323da 80323c2: 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) { 80323c4: 4293 cmp r3, r2 80323c6: b2e4 uxtb r4, r4 80323c8: da16 bge.n 80323f8 return NULL; } *rp++ = inv[i]; 80323ca: f10d 0a08 add.w sl, sp, #8 80323ce: 4455 add r5, sl 80323d0: f815 5c08 ldrb.w r5, [r5, #-8] 80323d4: 54fd strb r5, [r7, r3] 80323d6: 3301 adds r3, #1 80323d8: 4625 mov r5, r4 do { rem = *ap % (u8_t)10; *ap /= (u8_t)10; inv[i++] = '0' + rem; } while(*ap); while(i--) { 80323da: 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) 80323dc: 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--) { 80323e0: d1ef bne.n 80323c2 if (len++ >= buflen) { return NULL; } *rp++ = inv[i]; } if (len++ >= buflen) { 80323e2: 1c5f adds r7, r3, #1 80323e4: 4293 cmp r3, r2 80323e6: da07 bge.n 80323f8 s_addr = ip4_addr_get_u32(addr); rp = buf; ap = (u8_t *)&s_addr; for(n = 0; n < 4; n++) { 80323e8: 4540 cmp r0, r8 *rp++ = inv[i]; } if (len++ >= buflen) { return NULL; } *rp++ = '.'; 80323ea: 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++) { 80323ee: d1cd bne.n 803238c return NULL; } *rp++ = '.'; ap++; } *--rp = 0; 80323f0: 2300 movs r3, #0 80323f2: f804 3c01 strb.w r3, [r4, #-1] 80323f6: e000 b.n 80323fa *ap /= (u8_t)10; inv[i++] = '0' + rem; } while(*ap); while(i--) { if (len++ >= buflen) { return NULL; 80323f8: 2100 movs r1, #0 *rp++ = '.'; ap++; } *--rp = 0; return buf; } 80323fa: 4608 mov r0, r1 80323fc: e8bd 8ffe ldmia.w sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 08032400 : */ char * ipaddr_ntoa(const ip_addr_t *addr) { static char str[16]; return ipaddr_ntoa_r(addr, str, 16); 8032400: 4901 ldr r1, [pc, #4] ; (8032408 ) 8032402: 2210 movs r2, #16 8032404: f7ff bfb3 b.w 803236e 8032408: 2000c418 .word 0x2000c418 0803240c : return netif; } #endif /* iterate through netifs */ for (netif = netif_list; netif != NULL; netif = netif->next) { 803240c: 4b0f ldr r3, [pc, #60] ; (803244c ) * @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) { 803240e: b510 push {r4, lr} return netif; } #endif /* iterate through netifs */ for (netif = netif_list; netif != NULL; netif = netif->next) { 8032410: 681c ldr r4, [r3, #0] 8032412: e00a b.n 803242a /* network mask matches? */ if (netif_is_up(netif)) { 8032414: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 8032418: 07d9 lsls r1, r3, #31 803241a: d505 bpl.n 8032428 if (ip_addr_netcmp(dest, &(netif->ip_addr), &(netif->netmask))) { 803241c: 6803 ldr r3, [r0, #0] 803241e: 6862 ldr r2, [r4, #4] 8032420: 405a eors r2, r3 8032422: 68a3 ldr r3, [r4, #8] 8032424: 421a tst r2, r3 8032426: d00e beq.n 8032446 return netif; } #endif /* iterate through netifs */ for (netif = netif_list; netif != NULL; netif = netif->next) { 8032428: 6824 ldr r4, [r4, #0] 803242a: 2c00 cmp r4, #0 803242c: d1f2 bne.n 8032414 /* return netif on which to forward IP packet */ return netif; } } } if ((netif_default == NULL) || (!netif_is_up(netif_default))) { 803242e: 4b08 ldr r3, [pc, #32] ; (8032450 ) 8032430: 681b ldr r3, [r3, #0] 8032432: b12b cbz r3, 8032440 8032434: f893 202d ldrb.w r2, [r3, #45] ; 0x2d 8032438: 07d2 lsls r2, r2, #31 803243a: bf48 it mi 803243c: 461c movmi r4, r3 803243e: d402 bmi.n 8032446 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(); 8032440: f001 fcd8 bl 8033df4 return NULL; 8032444: e7ff b.n 8032446 } /* no matching netif found, use default netif */ return netif_default; } 8032446: 4620 mov r0, r4 8032448: bd10 pop {r4, pc} 803244a: bf00 nop 803244c: 2000f6a0 .word 0x2000f6a0 8032450: 2000f6a4 .word 0x2000f6a4 08032454 : * @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) { 8032454: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8032458: 4604 mov r4, r0 803245a: 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(); 803245c: f001 fc8a bl 8033d74 /* identify the IP header */ iphdr = (struct ip_hdr *)p->payload; 8032460: 6866 ldr r6, [r4, #4] if (IPH_V(iphdr) != 4) { 8032462: f896 8000 ldrb.w r8, [r6] 8032466: ea4f 1318 mov.w r3, r8, lsr #4 803246a: 2b04 cmp r3, #4 803246c: d005 beq.n 803247a 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); 803246e: 4620 mov r0, r4 8032470: f7fd f842 bl 802f4f8 IP_STATS_INC(ip.err); IP_STATS_INC(ip.drop); snmp_inc_ipinhdrerrors(); 8032474: f001 fc86 bl 8033d84 return ERR_OK; 8032478: e0be b.n 80325f8 /* 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)); 803247a: 8870 ldrh r0, [r6, #2] 803247c: f7fb ff03 bl 802e286 return ERR_OK; } #endif /* obtain IP header length in number of 32-bit words */ iphdr_hlen = IPH_HL(iphdr); 8032480: 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)) { 8032484: 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; 8032486: 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)) { 803248a: 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)); 803248c: 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); 803248e: 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)) { 8032490: d302 bcc.n 8032498 8032492: 8923 ldrh r3, [r4, #8] 8032494: 428b cmp r3, r1 8032496: d202 bcs.n 803249e 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); 8032498: f7fd f82e bl 802f4f8 803249c: e045 b.n 803252a } #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); 803249e: f7fd f852 bl 802f546 /* copy IP addresses to aligned ip_addr_t */ ip_addr_copy(current_iphdr_dest, iphdr->dest); 80324a2: 6932 ldr r2, [r6, #16] 80324a4: 4b56 ldr r3, [pc, #344] ; (8032600 ) } #endif /* LWIP_AUTOIP */ } if (first) { first = 0; netif = netif_list; 80324a6: f8df b168 ldr.w fp, [pc, #360] ; 8032610 /* 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); 80324aa: 601a str r2, [r3, #0] ip_addr_copy(current_iphdr_src, iphdr->src); 80324ac: 68f1 ldr r1, [r6, #12] 80324ae: 4a55 ldr r2, [pc, #340] ; (8032604 ) 80324b0: 463d mov r5, r7 80324b2: 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; 80324b4: 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)) || 80324b8: 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)))) { 80324ba: f895 302d ldrb.w r3, [r5, #45] ; 0x2d 80324be: 07d8 lsls r0, r3, #31 80324c0: d403 bmi.n 80324ca /* break out of for loop */ break; } #endif /* LWIP_AUTOIP */ } if (first) { 80324c2: f1b9 0f00 cmp.w r9, #0 80324c6: d10e bne.n 80324e6 80324c8: e010 b.n 80324ec 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)))) { 80324ca: 686b ldr r3, [r5, #4] 80324cc: 2b00 cmp r3, #0 80324ce: d0f8 beq.n 80324c2 /* unicast to this interface address? */ if (ip_addr_cmp(¤t_iphdr_dest, &(netif->ip_addr)) || 80324d0: f8da 0000 ldr.w r0, [sl] 80324d4: 4298 cmp r0, r3 80324d6: f000 8088 beq.w 80325ea /* or broadcast on this interface network address? */ ip_addr_isbroadcast(¤t_iphdr_dest, netif)) { 80324da: 4629 mov r1, r5 80324dc: f7ff fea6 bl 803222c 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)) || 80324e0: 2800 cmp r0, #0 80324e2: d0ee beq.n 80324c2 80324e4: e081 b.n 80325ea } #endif /* LWIP_AUTOIP */ } if (first) { first = 0; netif = netif_list; 80324e6: f8db 5000 ldr.w r5, [fp] 80324ea: e000 b.n 80324ee } else { netif = netif->next; 80324ec: 682d ldr r5, [r5, #0] } if (netif == inp) { 80324ee: 42bd cmp r5, r7 netif = netif->next; 80324f0: bf08 it eq 80324f2: 682d ldreq r5, [r5, #0] 80324f4: f04f 0900 mov.w r9, #0 } } while(netif != NULL); 80324f8: 2d00 cmp r5, #0 80324fa: d1de bne.n 80324ba 80324fc: e072 b.n 80325e4 /* 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)) { 80324fe: eb06 0308 add.w r3, r6, r8 8032502: 885b ldrh r3, [r3, #2] 8032504: f5b3 4f88 cmp.w r3, #17408 ; 0x4400 8032508: d16f bne.n 80325ea 803250a: e011 b.n 8032530 /* 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)) || 803250c: 4639 mov r1, r7 803250e: f7ff fe8d bl 803222c 8032512: b928 cbnz r0, 8032520 (ip_addr_ismulticast(¤t_iphdr_src))) { 8032514: f8d8 3000 ldr.w r3, [r8] 8032518: 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)) || 803251c: 2be0 cmp r3, #224 ; 0xe0 803251e: d108 bne.n 8032532 (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); 8032520: 4620 mov r0, r4 8032522: f7fc ffe9 bl 802f4f8 IP_STATS_INC(ip.drop); snmp_inc_ipinaddrerrors(); 8032526: f001 fc35 bl 8033d94 snmp_inc_ipindiscards(); 803252a: f001 fc43 bl 8033db4 return ERR_OK; 803252e: e063 b.n 80325f8 /* 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)) { 8032530: 463d mov r5, r7 return ERR_OK; } } /* packet not for us? */ if (netif == NULL) { 8032532: b93d cbnz r5, 8032544 /* try to forward IP packet on (other) interfaces */ ip_forward(p, iphdr, inp); } else #endif /* IP_FORWARD */ { snmp_inc_ipinaddrerrors(); 8032534: f001 fc2e bl 8033d94 snmp_inc_ipindiscards(); 8032538: f001 fc3c bl 8033db4 } pbuf_free(p); 803253c: 4620 mov r0, r4 803253e: f7fc ffdb bl 802f4f8 return ERR_OK; 8032542: e059 b.n 80325f8 } /* packet consists of multiple fragments? */ if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) { 8032544: 88f3 ldrh r3, [r6, #6] 8032546: f023 03c0 bic.w r3, r3, #192 ; 0xc0 803254a: b29b uxth r3, r3 803254c: b12b cbz r3, 803255a 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); 803254e: 4620 mov r0, r4 8032550: f7fc ffd2 bl 802f4f8 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(); 8032554: f001 fc26 bl 8033da4 return ERR_OK; 8032558: e04e b.n 80325f8 /* 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; 803255a: 4b2b ldr r3, [pc, #172] ; (8032608 ) 803255c: 601f str r7, [r3, #0] current_header = iphdr; 803255e: 4b2b ldr r3, [pc, #172] ; (803260c ) #if LWIP_RAW /* raw input did not eat the packet? */ if (raw_input(p, inp) == 0) 8032560: 4620 mov r0, r4 8032562: 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; 8032564: 601e str r6, [r3, #0] #if LWIP_RAW /* raw input did not eat the packet? */ if (raw_input(p, inp) == 0) 8032566: f7fd f947 bl 802f7f8 803256a: bb88 cbnz r0, 80325d0 #endif /* LWIP_RAW */ { switch (IPH_PROTO(iphdr)) { 803256c: 7a73 ldrb r3, [r6, #9] 803256e: 2b06 cmp r3, #6 8032570: d00b beq.n 803258a 8032572: 2b11 cmp r3, #17 8032574: d002 beq.n 803257c 8032576: 2b01 cmp r3, #1 8032578: d115 bne.n 80325a6 803257a: e00d b.n 8032598 #if LWIP_UDP case IP_PROTO_UDP: #if LWIP_UDPLITE case IP_PROTO_UDPLITE: #endif /* LWIP_UDPLITE */ snmp_inc_ipindelivers(); 803257c: f001 fc22 bl 8033dc4 udp_input(p, inp); 8032580: 4620 mov r0, r4 8032582: 4639 mov r1, r7 8032584: f7ff fb44 bl 8031c10 break; 8032588: e022 b.n 80325d0 #endif /* LWIP_UDP */ #if LWIP_TCP case IP_PROTO_TCP: snmp_inc_ipindelivers(); 803258a: f001 fc1b bl 8033dc4 tcp_input(p, inp); 803258e: 4620 mov r0, r4 8032590: 4639 mov r1, r7 8032592: f7fe f8e7 bl 8030764 break; 8032596: e01b b.n 80325d0 #endif /* LWIP_TCP */ #if LWIP_ICMP case IP_PROTO_ICMP: snmp_inc_ipindelivers(); 8032598: f001 fc14 bl 8033dc4 icmp_input(p, inp); 803259c: 4620 mov r0, r4 803259e: 4639 mov r1, r7 80325a0: f7ff fd20 bl 8031fe4 break; 80325a4: e014 b.n 80325d0 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) && 80325a6: 4d16 ldr r5, [pc, #88] ; (8032600 ) 80325a8: 4639 mov r1, r7 80325aa: 6828 ldr r0, [r5, #0] 80325ac: f7ff fe3e bl 803222c 80325b0: b948 cbnz r0, 80325c6 !ip_addr_ismulticast(¤t_iphdr_dest)) { 80325b2: 682b ldr r3, [r5, #0] 80325b4: 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) && 80325b8: 2be0 cmp r3, #224 ; 0xe0 80325ba: d004 beq.n 80325c6 !ip_addr_ismulticast(¤t_iphdr_dest)) { p->payload = iphdr; 80325bc: 6066 str r6, [r4, #4] icmp_dest_unreach(p, ICMP_DUR_PROTO); 80325be: 4620 mov r0, r4 80325c0: 2102 movs r1, #2 80325c2: f7ff fda5 bl 8032110 } #endif /* LWIP_ICMP */ pbuf_free(p); 80325c6: 4620 mov r0, r4 80325c8: f7fc ff96 bl 802f4f8 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(); 80325cc: f001 fbea bl 8033da4 } } current_netif = NULL; 80325d0: 4a0d ldr r2, [pc, #52] ; (8032608 ) 80325d2: 2300 movs r3, #0 80325d4: 6013 str r3, [r2, #0] current_header = NULL; 80325d6: 4a0d ldr r2, [pc, #52] ; (803260c ) 80325d8: 6013 str r3, [r2, #0] ip_addr_set_any(¤t_iphdr_src); 80325da: 4a0a ldr r2, [pc, #40] ; (8032604 ) 80325dc: 6013 str r3, [r2, #0] ip_addr_set_any(¤t_iphdr_dest); 80325de: 4a08 ldr r2, [pc, #32] ; (8032600 ) 80325e0: 6013 str r3, [r2, #0] return ERR_OK; 80325e2: e009 b.n 80325f8 * * #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) { 80325e4: 7a73 ldrb r3, [r6, #9] 80325e6: 2b11 cmp r3, #17 80325e8: d089 beq.n 80324fe #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)) 80325ea: f8df 8018 ldr.w r8, [pc, #24] ; 8032604 80325ee: f8d8 0000 ldr.w r0, [r8] 80325f2: 2800 cmp r0, #0 80325f4: d09d beq.n 8032532 80325f6: e789 b.n 803250c current_header = NULL; ip_addr_set_any(¤t_iphdr_src); ip_addr_set_any(¤t_iphdr_dest); return ERR_OK; } 80325f8: 2000 movs r0, #0 80325fa: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 80325fe: bf00 nop 8032600: 2000f6d4 .word 0x2000f6d4 8032604: 2000f6cc .word 0x2000f6cc 8032608: 2000f6d0 .word 0x2000f6d0 803260c: 2000f6d8 .word 0x2000f6d8 8032610: 2000f6a0 .word 0x2000f6a0 08032614 : */ 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) { 8032614: e92d 47f3 stmdb sp!, {r0, r1, r4, r5, r6, r7, r8, r9, sl, lr} 8032618: 4615 mov r5, r2 803261a: 4606 mov r6, r0 803261c: 4689 mov r9, r1 803261e: 469a mov sl, r3 8032620: 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(); 8032622: f001 fbd7 bl 8033dd4 /* Should the IP header be generated or is it already included in p? */ if (dest != IP_HDRINCL) { 8032626: b3b5 cbz r5, 8032696 } #endif /* CHECKSUM_GEN_IP_INLINE */ } #endif /* IP_OPTIONS_SEND */ /* generate IP header */ if (pbuf_header(p, IP_HLEN)) { 8032628: 4630 mov r0, r6 803262a: 2114 movs r1, #20 803262c: f7fc ff39 bl 802f4a2 8032630: 4680 mov r8, r0 8032632: b118 cbz r0, 803263c 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(); 8032634: f001 fbd6 bl 8033de4 return ERR_BUF; 8032638: 20fe movs r0, #254 ; 0xfe 803263a: e036 b.n 80326aa } iphdr = (struct ip_hdr *)p->payload; 803263c: 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); 803263e: 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); 8032642: f884 a008 strb.w sl, [r4, #8] IPH_PROTO_SET(iphdr, proto); 8032646: 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); 8032648: 682b ldr r3, [r5, #0] 803264a: 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); 803264c: 2345 movs r3, #69 ; 0x45 803264e: 7023 strb r3, [r4, #0] IPH_TOS_SET(iphdr, tos); 8032650: f89d 3028 ldrb.w r3, [sp, #40] ; 0x28 8032654: 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)); 8032656: 8930 ldrh r0, [r6, #8] 8032658: f7fb fe10 bl 802e27c #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_len; #endif /* CHECKSUM_GEN_IP_INLINE */ IPH_OFFSET_SET(iphdr, 0); 803265c: f884 8006 strb.w r8, [r4, #6] 8032660: f884 8007 strb.w r8, [r4, #7] IPH_ID_SET(iphdr, htons(ip_id)); 8032664: f8df 8048 ldr.w r8, [pc, #72] ; 80326b0 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)); 8032668: 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)); 803266a: f8b8 0000 ldrh.w r0, [r8] 803266e: f7fb fe05 bl 802e27c 8032672: 80a0 strh r0, [r4, #4] #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_id; #endif /* CHECKSUM_GEN_IP_INLINE */ ++ip_id; 8032674: f8b8 3000 ldrh.w r3, [r8] 8032678: 3301 adds r3, #1 803267a: f8a8 3000 strh.w r3, [r8] if (ip_addr_isany(src)) { 803267e: f1b9 0f00 cmp.w r9, #0 8032682: d002 beq.n 803268a 8032684: f8d9 3000 ldr.w r3, [r9] 8032688: b903 cbnz r3, 803268c ip_addr_copy(iphdr->src, netif->ip_addr); 803268a: 687b ldr r3, [r7, #4] } else { /* src cannot be NULL here */ ip_addr_copy(iphdr->src, *src); 803268c: 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); 803268e: 2300 movs r3, #0 8032690: 72a3 strb r3, [r4, #10] 8032692: 72e3 strb r3, [r4, #11] 8032694: e004 b.n 80326a0 #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); 8032696: 6873 ldr r3, [r6, #4] 8032698: ad02 add r5, sp, #8 803269a: 691b ldr r3, [r3, #16] 803269c: 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); 80326a0: 697b ldr r3, [r7, #20] 80326a2: 4638 mov r0, r7 80326a4: 4631 mov r1, r6 80326a6: 462a mov r2, r5 80326a8: 4798 blx r3 } 80326aa: b240 sxtb r0, r0 80326ac: e8bd 87fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, r9, sl, pc} 80326b0: 2000c428 .word 0x2000c428 080326b4 : * 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) { 80326b4: b5f0 push {r4, r5, r6, r7, lr} 80326b6: 4605 mov r5, r0 80326b8: 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) { 80326ba: 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) { 80326bc: 460f mov r7, r1 80326be: 4614 mov r4, r2 80326c0: 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) { 80326c2: f7ff fea3 bl 803240c 80326c6: b168 cbz r0, 80326e4 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); 80326c8: f89d 3028 ldrb.w r3, [sp, #40] ; 0x28 80326cc: 9002 str r0, [sp, #8] 80326ce: 9300 str r3, [sp, #0] 80326d0: f89d 302c ldrb.w r3, [sp, #44] ; 0x2c 80326d4: 4628 mov r0, r5 80326d6: 9301 str r3, [sp, #4] 80326d8: 4639 mov r1, r7 80326da: 4622 mov r2, r4 80326dc: 4633 mov r3, r6 80326de: f7ff ff99 bl 8032614 80326e2: e000 b.n 80326e6 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; 80326e4: 20fc movs r0, #252 ; 0xfc } return ip_output_if(p, src, dest, ttl, tos, proto, netif); } 80326e6: b240 sxtb r0, r0 80326e8: b005 add sp, #20 80326ea: bdf0 pop {r4, r5, r6, r7, pc} 080326ec : * @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) { 80326ec: b510 push {r4, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 80326ee: 2300 movs r3, #0 while (p != NULL) 80326f0: e00c b.n 803270c { base = plen; plen += p->len; 80326f2: 8944 ldrh r4, [r0, #10] 80326f4: 191c adds r4, r3, r4 80326f6: b2a4 uxth r4, r4 if (ofs < plen) 80326f8: 42a1 cmp r1, r4 80326fa: d205 bcs.n 8032708 { msg_ptr = (u8_t*)p->payload; 80326fc: 6840 ldr r0, [r0, #4] msg_ptr += ofs - base; 80326fe: 1acb subs r3, r1, r3 *type = *msg_ptr; 8032700: 5cc3 ldrb r3, [r0, r3] return ERR_OK; 8032702: 2000 movs r0, #0 plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; *type = *msg_ptr; 8032704: 7013 strb r3, [r2, #0] return ERR_OK; 8032706: e004 b.n 8032712 } p = p->next; 8032708: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 803270a: 4623 mov r3, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 803270c: 2800 cmp r0, #0 803270e: d1f0 bne.n 80326f2 return ERR_OK; } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; 8032710: 20f2 movs r0, #242 ; 0xf2 } 8032712: b240 sxtb r0, r0 8032714: bd10 pop {r4, pc} 08032716 : * @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) { 8032716: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8032718: 2500 movs r5, #0 while (p != NULL) 803271a: e079 b.n 8032810 { base = plen; plen += p->len; 803271c: 8944 ldrh r4, [r0, #10] 803271e: 192c adds r4, r5, r4 8032720: b2a4 uxth r4, r4 if (ofs < plen) 8032722: 42a1 cmp r1, r4 8032724: d272 bcs.n 803280c { msg_ptr = (u8_t*)p->payload; 8032726: f8d0 c004 ldr.w ip, [r0, #4] msg_ptr += ofs - base; 803272a: 1b4f subs r7, r1, r5 803272c: eb0c 0507 add.w r5, ip, r7 if (*msg_ptr < 0x80) 8032730: f81c 6007 ldrb.w r6, [ip, r7] 8032734: f016 0f80 tst.w r6, #128 ; 0x80 8032738: d105 bne.n 8032746 { /* primitive definite length format */ *octets_used = 1; 803273a: 2101 movs r1, #1 803273c: 7011 strb r1, [r2, #0] *length = *msg_ptr; 803273e: f81c 2007 ldrb.w r2, [ip, r7] 8032742: 801a strh r2, [r3, #0] 8032744: e05a b.n 80327fc return ERR_OK; } else if (*msg_ptr == 0x80) 8032746: 2e80 cmp r6, #128 ; 0x80 8032748: d12a bne.n 80327a0 { /* constructed indefinite length format, termination with two zero octets */ u8_t zeros; u8_t i; *length = 0; 803274a: 2600 movs r6, #0 803274c: 801e strh r6, [r3, #0] 803274e: e022 b.n 8032796 { i = 2; while (i > 0) { i--; (*length) += 1; 8032750: f8b3 c000 ldrh.w ip, [r3] ofs += 1; 8032754: 3101 adds r1, #1 8032756: b289 uxth r1, r1 { i = 2; while (i > 0) { i--; (*length) += 1; 8032758: f10c 0c01 add.w ip, ip, #1 ofs += 1; if (ofs >= plen) 803275c: 42a1 cmp r1, r4 { i = 2; while (i > 0) { i--; (*length) += 1; 803275e: f8a3 c000 strh.w ip, [r3] ofs += 1; if (ofs >= plen) 8032762: d308 bcc.n 8032776 { /* next octet in next pbuf */ p = p->next; 8032764: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8032766: b900 cbnz r0, 803276a 8032768: e04e b.n 8032808 msg_ptr = (u8_t*)p->payload; plen += p->len; 803276a: 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; 803276e: 6845 ldr r5, [r0, #4] plen += p->len; 8032770: 4464 add r4, ip 8032772: b2a4 uxth r4, r4 8032774: e000 b.n 8032778 } else { /* next octet in same pbuf */ msg_ptr++; 8032776: 3501 adds r5, #1 } if (*msg_ptr == 0) 8032778: f895 c000 ldrb.w ip, [r5] 803277c: f1bc 0f00 cmp.w ip, #0 8032780: d104 bne.n 803278c { zeros++; 8032782: 3601 adds r6, #1 8032784: b2f6 uxtb r6, r6 if (zeros == 2) 8032786: 2e02 cmp r6, #2 8032788: d101 bne.n 803278e 803278a: e007 b.n 803279c i = 0; } } else { zeros = 0; 803278c: 2600 movs r6, #0 *length = 0; zeros = 0; while (zeros != 2) { i = 2; while (i > 0) 803278e: 42b9 cmp r1, r7 8032790: d1de bne.n 8032750 u8_t zeros; u8_t i; *length = 0; zeros = 0; while (zeros != 2) 8032792: 2e02 cmp r6, #2 8032794: d002 beq.n 803279c * @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) 8032796: 1c8f adds r7, r1, #2 8032798: b2bf uxth r7, r7 803279a: e7d9 b.n 8032750 { zeros = 0; } } } *octets_used = 1; 803279c: 2301 movs r3, #1 803279e: e02c b.n 80327fa return ERR_OK; } else if (*msg_ptr == 0x81) 80327a0: 2e81 cmp r6, #129 ; 0x81 80327a2: d10c bne.n 80327be { /* constructed definite length format, one octet */ ofs += 1; 80327a4: 3101 adds r1, #1 if (ofs >= plen) 80327a6: b289 uxth r1, r1 80327a8: 42a1 cmp r1, r4 80327aa: d303 bcc.n 80327b4 { /* next octet in next pbuf */ p = p->next; 80327ac: 6801 ldr r1, [r0, #0] if (p == NULL) { return ERR_ARG; } 80327ae: b359 cbz r1, 8032808 msg_ptr = (u8_t*)p->payload; 80327b0: 684d ldr r5, [r1, #4] 80327b2: e000 b.n 80327b6 } else { /* next octet in same pbuf */ msg_ptr++; 80327b4: 3501 adds r5, #1 } *length = *msg_ptr; 80327b6: 7829 ldrb r1, [r5, #0] 80327b8: 8019 strh r1, [r3, #0] *octets_used = 2; 80327ba: 2302 movs r3, #2 80327bc: e01d b.n 80327fa return ERR_OK; } else if (*msg_ptr == 0x82) 80327be: 2e82 cmp r6, #130 ; 0x82 80327c0: d11e bne.n 8032800 /* constructed definite length format, two octets */ i = 2; while (i > 0) { i--; ofs += 1; 80327c2: 1c4e adds r6, r1, #1 if (ofs >= plen) 80327c4: b2b6 uxth r6, r6 80327c6: 42a6 cmp r6, r4 80327c8: d201 bcs.n 80327ce plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 80327ca: 3501 adds r5, #1 80327cc: e005 b.n 80327da i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 80327ce: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80327d0: b1d0 cbz r0, 8032808 msg_ptr = (u8_t*)p->payload; plen += p->len; 80327d2: 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; 80327d4: 6845 ldr r5, [r0, #4] plen += p->len; 80327d6: 19a4 adds r4, r4, r6 80327d8: b2a4 uxth r4, r4 *length |= *msg_ptr; } else { /* most significant length octet */ *length = (*msg_ptr) << 8; 80327da: 782e ldrb r6, [r5, #0] /* constructed definite length format, two octets */ i = 2; while (i > 0) { i--; ofs += 1; 80327dc: 3102 adds r1, #2 if (ofs >= plen) 80327de: b289 uxth r1, r1 *length |= *msg_ptr; } else { /* most significant length octet */ *length = (*msg_ptr) << 8; 80327e0: 0236 lsls r6, r6, #8 i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 80327e2: 42a1 cmp r1, r4 *length |= *msg_ptr; } else { /* most significant length octet */ *length = (*msg_ptr) << 8; 80327e4: 801e strh r6, [r3, #0] i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 80327e6: d201 bcs.n 80327ec plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 80327e8: 3501 adds r5, #1 80327ea: e002 b.n 80327f2 i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 80327ec: 6801 ldr r1, [r0, #0] if (p == NULL) { return ERR_ARG; } 80327ee: b159 cbz r1, 8032808 msg_ptr = (u8_t*)p->payload; 80327f0: 684d ldr r5, [r1, #4] msg_ptr++; } if (i == 0) { /* least significant length octet */ *length |= *msg_ptr; 80327f2: 7829 ldrb r1, [r5, #0] 80327f4: 430e orrs r6, r1 80327f6: 801e strh r6, [r3, #0] { /* most significant length octet */ *length = (*msg_ptr) << 8; } } *octets_used = 3; 80327f8: 2303 movs r3, #3 80327fa: 7013 strb r3, [r2, #0] return ERR_OK; 80327fc: 2000 movs r0, #0 80327fe: e00a b.n 8032816 } 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); 8032800: f006 067f and.w r6, r6, #127 ; 0x7f 8032804: 3601 adds r6, #1 8032806: 7016 strb r6, [r2, #0] return ERR_ARG; 8032808: 20f2 movs r0, #242 ; 0xf2 803280a: e004 b.n 8032816 } } p = p->next; 803280c: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 803280e: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8032810: 2800 cmp r0, #0 8032812: d183 bne.n 803271c 8032814: e7f8 b.n 8032808 p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 8032816: b240 sxtb r0, r0 8032818: bdf0 pop {r4, r5, r6, r7, pc} 0803281a : * 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) { 803281a: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 803281e: 2500 movs r5, #0 while (p != NULL) 8032820: e049 b.n 80328b6 { base = plen; plen += p->len; 8032822: 8944 ldrh r4, [r0, #10] 8032824: 192c adds r4, r5, r4 8032826: b2a4 uxth r4, r4 if (ofs < plen) 8032828: 42a1 cmp r1, r4 803282a: d242 bcs.n 80328b2 { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if ((len > 0) && (len < 6)) 803282c: 1e56 subs r6, r2, #1 { base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; 803282e: f8d0 c004 ldr.w ip, [r0, #4] msg_ptr += ofs - base; if ((len > 0) && (len < 6)) 8032832: b2b6 uxth r6, r6 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8032834: 1b4f subs r7, r1, r5 if ((len > 0) && (len < 6)) 8032836: 2e04 cmp r6, #4 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8032838: eb0c 0507 add.w r5, ip, r7 if ((len > 0) && (len < 6)) 803283c: d901 bls.n 8032842 *value |= *msg_ptr; return ERR_OK; } else { return ERR_ARG; 803283e: 20f2 movs r0, #242 ; 0xf2 8032840: e03c b.n 80328bc msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if ((len > 0) && (len < 6)) { /* start from zero */ *value = 0; 8032842: f04f 0800 mov.w r8, #0 8032846: f8c3 8000 str.w r8, [r3] if (*msg_ptr & 0x80) 803284a: f81c 7007 ldrb.w r7, [ip, r7] 803284e: f017 0f80 tst.w r7, #128 ; 0x80 8032852: d1f4 bne.n 803283e return ERR_ARG; } else { /* positive */ if ((len > 1) && (*msg_ptr == 0)) 8032854: 2a01 cmp r2, #1 8032856: d00e beq.n 8032876 8032858: b96f cbnz r7, 8032876 { /* skip leading "sign byte" octet 0x00 */ len--; ofs += 1; 803285a: 3101 adds r1, #1 803285c: b289 uxth r1, r1 if (ofs >= plen) 803285e: 42a1 cmp r1, r4 { /* positive */ if ((len > 1) && (*msg_ptr == 0)) { /* skip leading "sign byte" octet 0x00 */ len--; 8032860: 4632 mov r2, r6 ofs += 1; if (ofs >= plen) 8032862: d307 bcc.n 8032874 { /* next octet in next pbuf */ p = p->next; 8032864: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8032866: 2800 cmp r0, #0 8032868: d0e9 beq.n 803283e msg_ptr = (u8_t*)p->payload; plen += p->len; 803286a: 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; 803286c: 6845 ldr r5, [r0, #4] plen += p->len; 803286e: 19a4 adds r4, r4, r6 8032870: b2a4 uxth r4, r4 8032872: e000 b.n 8032876 } else { /* next octet in same pbuf */ msg_ptr++; 8032874: 3501 adds r5, #1 8032876: 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) 8032878: 188a adds r2, r1, r2 803287a: b2b6 uxth r6, r6 803287c: b292 uxth r2, r2 803287e: e010 b.n 80328a2 } /* OR octets with value */ while (len > 1) { len--; *value |= *msg_ptr; 8032880: 7829 ldrb r1, [r5, #0] 8032882: 430f orrs r7, r1 *value <<= 8; 8032884: 023f lsls r7, r7, #8 ofs += 1; if (ofs >= plen) 8032886: 42a6 cmp r6, r4 /* OR octets with value */ while (len > 1) { len--; *value |= *msg_ptr; *value <<= 8; 8032888: 601f str r7, [r3, #0] ofs += 1; if (ofs >= plen) 803288a: d307 bcc.n 803289c { /* next octet in next pbuf */ p = p->next; 803288c: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 803288e: 2800 cmp r0, #0 8032890: d0d5 beq.n 803283e msg_ptr = (u8_t*)p->payload; plen += p->len; 8032892: 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; 8032894: 6845 ldr r5, [r0, #4] plen += p->len; 8032896: 1864 adds r4, r4, r1 8032898: b2a4 uxth r4, r4 803289a: e000 b.n 803289e } else { /* next octet in same pbuf */ msg_ptr++; 803289c: 3501 adds r5, #1 803289e: 3601 adds r6, #1 80328a0: b2b6 uxth r6, r6 msg_ptr++; } } } /* OR octets with value */ while (len > 1) 80328a2: 4296 cmp r6, r2 80328a4: 681f ldr r7, [r3, #0] 80328a6: d1eb bne.n 8032880 { /* next octet in same pbuf */ msg_ptr++; } } *value |= *msg_ptr; 80328a8: 782a ldrb r2, [r5, #0] 80328aa: 4317 orrs r7, r2 80328ac: 601f str r7, [r3, #0] return ERR_OK; 80328ae: 2000 movs r0, #0 80328b0: e004 b.n 80328bc else { return ERR_ARG; } } p = p->next; 80328b2: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 80328b4: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 80328b6: 2800 cmp r0, #0 80328b8: d1b3 bne.n 8032822 80328ba: e7c0 b.n 803283e } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 80328bc: b240 sxtb r0, r0 80328be: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 080328c2 : * * @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) { 80328c2: 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; 80328c6: 2500 movs r5, #0 while (p != NULL) 80328c8: e04e b.n 8032968 { base = plen; plen += p->len; 80328ca: 8944 ldrh r4, [r0, #10] 80328cc: 192c adds r4, r5, r4 80328ce: b2a4 uxth r4, r4 if (ofs < plen) 80328d0: 42a1 cmp r1, r4 80328d2: d247 bcs.n 8032964 { msg_ptr = (u8_t*)p->payload; 80328d4: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; if ((len > 0) && (len < 5)) 80328d6: 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; 80328da: 1b4e subs r6, r1, r5 if ((len > 0) && (len < 5)) 80328dc: f1bc 0f03 cmp.w ip, #3 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 80328e0: eb07 0506 add.w r5, r7, r6 if ((len > 0) && (len < 5)) 80328e4: d901 bls.n 80328ea } return ERR_OK; } else { return ERR_ARG; 80328e6: 20f2 movs r0, #242 ; 0xf2 80328e8: e041 b.n 803296e { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if ((len > 0) && (len < 5)) { if (*msg_ptr & 0x80) 80328ea: 57be ldrsb r6, [r7, r6] 80328ec: 2e00 cmp r6, #0 80328ee: da0b bge.n 8032908 { /* negative, start from -1 */ *value = -1; 80328f0: f04f 36ff mov.w r6, #4294967295 80328f4: 601e str r6, [r3, #0] sign = 1; 80328f6: 2601 movs r6, #1 80328f8: 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) 80328fc: 1852 adds r2, r2, r1 80328fe: fa1f fc8c uxth.w ip, ip 8032902: b292 uxth r2, r2 len--; if (sign) { *lsb_ptr &= *msg_ptr; *value <<= 8; *lsb_ptr |= 255; 8032904: 21ff movs r1, #255 ; 0xff 8032906: e022 b.n 803294e sign = 1; } else { /* positive, start from 0 */ *value = 0; 8032908: 2600 movs r6, #0 803290a: 601e str r6, [r3, #0] 803290c: e7f4 b.n 80328f8 803290e: f895 8000 ldrb.w r8, [r5] } /* OR/AND octets with value */ while (len > 1) { len--; if (sign) 8032912: b13e cbz r6, 8032924 { *lsb_ptr &= *msg_ptr; 8032914: ea08 0707 and.w r7, r8, r7 8032918: 701f strb r7, [r3, #0] *value <<= 8; 803291a: 681f ldr r7, [r3, #0] 803291c: 023f lsls r7, r7, #8 803291e: 601f str r7, [r3, #0] *lsb_ptr |= 255; 8032920: 7019 strb r1, [r3, #0] 8032922: e005 b.n 8032930 } else { *lsb_ptr |= *msg_ptr; 8032924: ea48 0707 orr.w r7, r8, r7 8032928: 701f strb r7, [r3, #0] *value <<= 8; 803292a: 681f ldr r7, [r3, #0] 803292c: 023f lsls r7, r7, #8 803292e: 601f str r7, [r3, #0] } ofs += 1; if (ofs >= plen) 8032930: 45a4 cmp ip, r4 8032932: d307 bcc.n 8032944 { /* next octet in next pbuf */ p = p->next; 8032934: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8032936: 2800 cmp r0, #0 8032938: d0d5 beq.n 80328e6 msg_ptr = (u8_t*)p->payload; plen += p->len; 803293a: 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; 803293c: 6845 ldr r5, [r0, #4] plen += p->len; 803293e: 19e4 adds r4, r4, r7 8032940: b2a4 uxth r4, r4 8032942: e000 b.n 8032946 } else { /* next octet in same pbuf */ msg_ptr++; 8032944: 3501 adds r5, #1 8032946: f10c 0c01 add.w ip, ip, #1 803294a: fa1f fc8c uxth.w ip, ip /* positive, start from 0 */ *value = 0; sign = 0; } /* OR/AND octets with value */ while (len > 1) 803294e: 4594 cmp ip, r2 8032950: 781f ldrb r7, [r3, #0] 8032952: d1dc bne.n 803290e 8032954: 782a ldrb r2, [r5, #0] { /* next octet in same pbuf */ msg_ptr++; } } if (sign) 8032956: b11e cbz r6, 8032960 { *lsb_ptr &= *msg_ptr; 8032958: 4017 ands r7, r2 803295a: 701f strb r7, [r3, #0] } else { *lsb_ptr |= *msg_ptr; } return ERR_OK; 803295c: 2000 movs r0, #0 803295e: e006 b.n 803296e { *lsb_ptr &= *msg_ptr; } else { *lsb_ptr |= *msg_ptr; 8032960: 4317 orrs r7, r2 8032962: e7fa b.n 803295a else { return ERR_ARG; } } p = p->next; 8032964: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8032966: 4625 mov r5, r4 u8_t *lsb_ptr = (u8_t*)value + sizeof(s32_t) - 1; #endif u8_t sign; plen = 0; while (p != NULL) 8032968: 2800 cmp r0, #0 803296a: d1ae bne.n 80328ca 803296c: e7bb b.n 80328e6 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 803296e: b240 sxtb r0, r0 8032970: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 08032974 : * @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) { 8032974: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} u16_t plen, base; u8_t *msg_ptr; s32_t *oid_ptr; plen = 0; 8032978: 2600 movs r6, #0 while (p != NULL) 803297a: e08d b.n 8032a98 { base = plen; plen += p->len; 803297c: 8944 ldrh r4, [r0, #10] 803297e: 1934 adds r4, r6, r4 8032980: b2a4 uxth r4, r4 if (ofs < plen) 8032982: 42a1 cmp r1, r4 8032984: f080 8086 bcs.w 8032a94 { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; oid->len = 0; 8032988: f04f 0800 mov.w r8, #0 { base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; 803298c: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; oid->len = 0; 803298e: f883 8000 strb.w r8, [r3] oid_ptr = &oid->id[0]; if (len > 0) 8032992: b90a cbnz r2, 8032998 } else { /* accepting zero length identifiers e.g. for getnext operation. uncommon but valid */ return ERR_OK; 8032994: 2000 movs r0, #0 8032996: e083 b.n 8032aa0 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8032998: 1b8e subs r6, r1, r6 803299a: 19bd adds r5, r7, r6 oid->len = 0; oid_ptr = &oid->id[0]; if (len > 0) { /* first compressed octet */ if (*msg_ptr == 0x2B) 803299c: f817 c006 ldrb.w ip, [r7, r6] 80329a0: f1bc 0f2b cmp.w ip, #43 ; 0x2b 80329a4: d103 bne.n 80329ae { /* (most) common case 1.3 (iso.org) */ *oid_ptr = 1; 80329a6: 2601 movs r6, #1 80329a8: 605e str r6, [r3, #4] oid_ptr++; *oid_ptr = 3; 80329aa: 2603 movs r6, #3 80329ac: e016 b.n 80329dc oid_ptr++; } else if (*msg_ptr < 40) 80329ae: f1bc 0f27 cmp.w ip, #39 ; 0x27 80329b2: d803 bhi.n 80329bc { *oid_ptr = 0; 80329b4: f8c3 8004 str.w r8, [r3, #4] oid_ptr++; *oid_ptr = *msg_ptr; 80329b8: 5dbe ldrb r6, [r7, r6] 80329ba: e00f b.n 80329dc oid_ptr++; } else if (*msg_ptr < 80) 80329bc: f1bc 0f4f cmp.w ip, #79 ; 0x4f 80329c0: d806 bhi.n 80329d0 { *oid_ptr = 1; 80329c2: f04f 0c01 mov.w ip, #1 80329c6: f8c3 c004 str.w ip, [r3, #4] oid_ptr++; *oid_ptr = (*msg_ptr) - 40; 80329ca: 5dbe ldrb r6, [r7, r6] 80329cc: 3e28 subs r6, #40 ; 0x28 80329ce: e005 b.n 80329dc oid_ptr++; } else { *oid_ptr = 2; 80329d0: f04f 0c02 mov.w ip, #2 80329d4: f8c3 c004 str.w ip, [r3, #4] oid_ptr++; *oid_ptr = (*msg_ptr) - 80; 80329d8: 5dbe ldrb r6, [r7, r6] 80329da: 3e50 subs r6, #80 ; 0x50 { /* accepting zero length identifiers e.g. for getnext operation. uncommon but valid */ return ERR_OK; } len--; 80329dc: 3a01 subs r2, #1 *oid_ptr = 2; oid_ptr++; *oid_ptr = (*msg_ptr) - 80; oid_ptr++; } oid->len = 2; 80329de: 2702 movs r7, #2 { /* accepting zero length identifiers e.g. for getnext operation. uncommon but valid */ return ERR_OK; } len--; 80329e0: b292 uxth r2, r2 } else { *oid_ptr = 2; oid_ptr++; *oid_ptr = (*msg_ptr) - 80; 80329e2: 609e str r6, [r3, #8] oid_ptr++; } oid->len = 2; 80329e4: 701f strb r7, [r3, #0] else { *oid_ptr = 2; oid_ptr++; *oid_ptr = (*msg_ptr) - 80; oid_ptr++; 80329e6: 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) 80329ea: 2a00 cmp r2, #0 80329ec: d04b beq.n 8032a86 { ofs += 1; 80329ee: 3101 adds r1, #1 80329f0: b289 uxth r1, r1 if (ofs >= plen) 80329f2: 42a1 cmp r1, r4 80329f4: d308 bcc.n 8032a08 { /* next octet in next pbuf */ p = p->next; 80329f6: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80329f8: b908 cbnz r0, 80329fe 80329fa: 20f2 movs r0, #242 ; 0xf2 80329fc: e050 b.n 8032aa0 msg_ptr = (u8_t*)p->payload; plen += p->len; 80329fe: 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; 8032a00: 6845 ldr r5, [r0, #4] plen += p->len; 8032a02: 19e4 adds r4, r4, r7 8032a04: b2a4 uxth r4, r4 8032a06: e03e b.n 8032a86 } else { /* next octet in same pbuf */ msg_ptr++; 8032a08: 3501 adds r5, #1 8032a0a: e03c b.n 8032a86 } } while ((len > 0) && (oid->len < LWIP_SNMP_OBJ_ID_LEN)) { /* sub-identifier uses multiple octets */ if (*msg_ptr & 0x80) 8032a0c: 782f ldrb r7, [r5, #0] 8032a0e: f017 0f80 tst.w r7, #128 ; 0x80 8032a12: d023 beq.n 8032a5c 8032a14: e014 b.n 8032a40 while ((*msg_ptr & 0x80) && (len > 1)) { len--; sub_id = (sub_id << 7) + (*msg_ptr & ~0x80); ofs += 1; 8032a16: 3101 adds r1, #1 8032a18: b289 uxth r1, r1 { s32_t sub_id = 0; while ((*msg_ptr & 0x80) && (len > 1)) { len--; 8032a1a: 3a01 subs r2, #1 sub_id = (sub_id << 7) + (*msg_ptr & ~0x80); 8032a1c: f02c 0c80 bic.w ip, ip, #128 ; 0x80 ofs += 1; if (ofs >= plen) 8032a20: 42a1 cmp r1, r4 { s32_t sub_id = 0; while ((*msg_ptr & 0x80) && (len > 1)) { len--; 8032a22: b292 uxth r2, r2 sub_id = (sub_id << 7) + (*msg_ptr & ~0x80); 8032a24: eb0c 17c7 add.w r7, ip, r7, lsl #7 ofs += 1; if (ofs >= plen) 8032a28: d308 bcc.n 8032a3c { /* next octet in next pbuf */ p = p->next; 8032a2a: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8032a2c: 2800 cmp r0, #0 8032a2e: d0e4 beq.n 80329fa msg_ptr = (u8_t*)p->payload; plen += p->len; 8032a30: 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; 8032a34: 6845 ldr r5, [r0, #4] plen += p->len; 8032a36: 4464 add r4, ip 8032a38: b2a4 uxth r4, r4 8032a3a: e002 b.n 8032a42 } else { /* next octet in same pbuf */ msg_ptr++; 8032a3c: 3501 adds r5, #1 8032a3e: e000 b.n 8032a42 } } while ((len > 0) && (oid->len < LWIP_SNMP_OBJ_ID_LEN)) { /* sub-identifier uses multiple octets */ if (*msg_ptr & 0x80) 8032a40: 2700 movs r7, #0 { s32_t sub_id = 0; while ((*msg_ptr & 0x80) && (len > 1)) 8032a42: f895 c000 ldrb.w ip, [r5] 8032a46: f01c 0f80 tst.w ip, #128 ; 0x80 8032a4a: d02c beq.n 8032aa6 8032a4c: 2a01 cmp r2, #1 8032a4e: d1e2 bne.n 8032a16 8032a50: e009 b.n 8032a66 } } if (!(*msg_ptr & 0x80) && (len > 0)) { /* last octet sub-identifier */ len--; 8032a52: 3a01 subs r2, #1 8032a54: b292 uxth r2, r2 sub_id = (sub_id << 7) + *msg_ptr; 8032a56: eb0c 17c7 add.w r7, ip, r7, lsl #7 8032a5a: e001 b.n 8032a60 } } else { /* !(*msg_ptr & 0x80) sub-identifier uses single octet */ len--; 8032a5c: 3a01 subs r2, #1 8032a5e: b292 uxth r2, r2 *oid_ptr = *msg_ptr; 8032a60: f846 7c04 str.w r7, [r6, #-4] } if (len > 0) 8032a64: b162 cbz r2, 8032a80 { /* remaining oid bytes available ... */ ofs += 1; 8032a66: 3101 adds r1, #1 8032a68: b289 uxth r1, r1 if (ofs >= plen) 8032a6a: 42a1 cmp r1, r4 8032a6c: d307 bcc.n 8032a7e { /* next octet in next pbuf */ p = p->next; 8032a6e: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8032a70: 2800 cmp r0, #0 8032a72: d0c2 beq.n 80329fa msg_ptr = (u8_t*)p->payload; plen += p->len; 8032a74: 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; 8032a76: 6845 ldr r5, [r0, #4] plen += p->len; 8032a78: 19e4 adds r4, r4, r7 8032a7a: b2a4 uxth r4, r4 8032a7c: e000 b.n 8032a80 } else { /* next octet in same pbuf */ msg_ptr++; 8032a7e: 3501 adds r5, #1 } } oid_ptr++; oid->len++; 8032a80: 781f ldrb r7, [r3, #0] 8032a82: 3701 adds r7, #1 8032a84: 701f strb r7, [r3, #0] 8032a86: 3604 adds r6, #4 { /* next octet in same pbuf */ msg_ptr++; } } while ((len > 0) && (oid->len < LWIP_SNMP_OBJ_ID_LEN)) 8032a88: 2a00 cmp r2, #0 8032a8a: d083 beq.n 8032994 8032a8c: 781f ldrb r7, [r3, #0] 8032a8e: 2f1f cmp r7, #31 8032a90: d9bc bls.n 8032a0c 8032a92: e7b2 b.n 80329fa /* len > 0, oid->len == LWIP_SNMP_OBJ_ID_LEN or malformed encoding */ return ERR_ARG; } } p = p->next; 8032a94: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8032a96: 4626 mov r6, r4 u16_t plen, base; u8_t *msg_ptr; s32_t *oid_ptr; plen = 0; while (p != NULL) 8032a98: 2800 cmp r0, #0 8032a9a: f47f af6f bne.w 803297c 8032a9e: e7ac b.n 80329fa 8032aa0: b240 sxtb r0, r0 8032aa2: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} { /* next octet in same pbuf */ msg_ptr++; } } if (!(*msg_ptr & 0x80) && (len > 0)) 8032aa6: 2a00 cmp r2, #0 8032aa8: d1d3 bne.n 8032a52 8032aaa: e7e9 b.n 8032a80 08032aac : * @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) { 8032aac: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; if (len > 0) 8032aae: 2a00 cmp r2, #0 8032ab0: d12d bne.n 8032b0e 8032ab2: e027 b.n 8032b04 { plen = 0; while (p != NULL) { base = plen; plen += p->len; 8032ab4: 8944 ldrh r4, [r0, #10] 8032ab6: 1934 adds r4, r6, r4 8032ab8: b2a4 uxth r4, r4 if (ofs < plen) 8032aba: 42a1 cmp r1, r4 8032abc: d224 bcs.n 8032b08 { msg_ptr = (u8_t*)p->payload; 8032abe: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 8032ac0: 1b8d subs r5, r1, r6 if (raw_len >= len) 8032ac2: 4293 cmp r3, r2 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8032ac4: 443d add r5, r7 if (raw_len >= len) 8032ac6: d305 bcc.n 8032ad4 8032ac8: 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) 8032aca: b29e uxth r6, r3 8032acc: 18b2 adds r2, r6, r2 8032ace: b292 uxth r2, r2 8032ad0: 1b89 subs r1, r1, r6 8032ad2: e011 b.n 8032af8 return ERR_OK; } else { /* raw_len < len, not enough dst space */ return ERR_ARG; 8032ad4: 20f2 movs r0, #242 ; 0xf2 8032ad6: e01e b.n 8032b16 { while (len > 1) { /* copy len - 1 octets */ len--; *raw = *msg_ptr; 8032ad8: 782e ldrb r6, [r5, #0] 8032ada: 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) 8032ade: 18ce adds r6, r1, r3 /* copy len - 1 octets */ len--; *raw = *msg_ptr; raw++; ofs += 1; if (ofs >= plen) 8032ae0: b2b6 uxth r6, r6 8032ae2: 42a6 cmp r6, r4 8032ae4: d307 bcc.n 8032af6 { /* next octet in next pbuf */ p = p->next; 8032ae6: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8032ae8: 2800 cmp r0, #0 8032aea: d0f3 beq.n 8032ad4 msg_ptr = (u8_t*)p->payload; plen += p->len; 8032aec: 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; 8032aee: 6845 ldr r5, [r0, #4] plen += p->len; 8032af0: 19a4 adds r4, r4, r6 8032af2: b2a4 uxth r4, r4 8032af4: e000 b.n 8032af8 } else { /* next octet in same pbuf */ msg_ptr++; 8032af6: 3501 adds r5, #1 { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if (raw_len >= len) { while (len > 1) 8032af8: 1ad7 subs r7, r2, r3 8032afa: b2bf uxth r7, r7 8032afc: 2f01 cmp r7, #1 8032afe: d8eb bhi.n 8032ad8 /* next octet in same pbuf */ msg_ptr++; } } /* copy last octet */ *raw = *msg_ptr; 8032b00: 782a ldrb r2, [r5, #0] 8032b02: 701a strb r2, [r3, #0] return ERR_OK; 8032b04: 2000 movs r0, #0 8032b06: e006 b.n 8032b16 { /* raw_len < len, not enough dst space */ return ERR_ARG; } } p = p->next; 8032b08: 6800 ldr r0, [r0, #0] { plen = 0; while (p != NULL) { base = plen; plen += p->len; 8032b0a: 4626 mov r6, r4 8032b0c: e000 b.n 8032b10 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) 8032b0e: 2600 movs r6, #0 { plen = 0; while (p != NULL) 8032b10: 2800 cmp r0, #0 8032b12: d1cf bne.n 8032ab4 8032b14: e7de b.n 8032ad4 else { /* len == 0, empty string */ return ERR_OK; } } 8032b16: b240 sxtb r0, r0 8032b18: bdf0 pop {r4, r5, r6, r7, pc} 08032b1a : * @param octets_needed points to the return value */ void snmp_asn1_enc_length_cnt(u16_t length, u8_t *octets_needed) { if (length < 0x80U) 8032b1a: 287f cmp r0, #127 ; 0x7f 8032b1c: d801 bhi.n 8032b22 { *octets_needed = 1; 8032b1e: 2301 movs r3, #1 8032b20: e004 b.n 8032b2c } else if (length < 0x100U) 8032b22: 28ff cmp r0, #255 ; 0xff 8032b24: d801 bhi.n 8032b2a { *octets_needed = 2; 8032b26: 2302 movs r3, #2 8032b28: e000 b.n 8032b2c } else { *octets_needed = 3; 8032b2a: 2303 movs r3, #3 8032b2c: 700b strb r3, [r1, #0] 8032b2e: 4770 bx lr 08032b30 : * 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) 8032b30: 287f cmp r0, #127 ; 0x7f 8032b32: d801 bhi.n 8032b38 { *octets_needed = 1; 8032b34: 2301 movs r3, #1 8032b36: e00e b.n 8032b56 } else if (value < 0x8000UL) 8032b38: f5b0 4f00 cmp.w r0, #32768 ; 0x8000 8032b3c: d201 bcs.n 8032b42 { *octets_needed = 2; 8032b3e: 2302 movs r3, #2 8032b40: e009 b.n 8032b56 } else if (value < 0x800000UL) 8032b42: f5b0 0f00 cmp.w r0, #8388608 ; 0x800000 8032b46: d201 bcs.n 8032b4c { *octets_needed = 3; 8032b48: 2303 movs r3, #3 8032b4a: e004 b.n 8032b56 } else if (value < 0x80000000UL) 8032b4c: 2800 cmp r0, #0 8032b4e: db01 blt.n 8032b54 { *octets_needed = 4; 8032b50: 2304 movs r3, #4 8032b52: e000 b.n 8032b56 } else { *octets_needed = 5; 8032b54: 2305 movs r3, #5 8032b56: 800b strh r3, [r1, #0] 8032b58: 4770 bx lr 08032b5a : void snmp_asn1_enc_s32t_cnt(s32_t value, u16_t *octets_needed) { if (value < 0) { value = ~value; 8032b5a: 43c3 mvns r3, r0 8032b5c: 4283 cmp r3, r0 8032b5e: bfa8 it ge 8032b60: 4618 movge r0, r3 } if (value < 0x80L) 8032b62: 287f cmp r0, #127 ; 0x7f 8032b64: dc01 bgt.n 8032b6a { *octets_needed = 1; 8032b66: 2301 movs r3, #1 8032b68: e00a b.n 8032b80 } else if (value < 0x8000L) 8032b6a: f5b0 4f00 cmp.w r0, #32768 ; 0x8000 8032b6e: da01 bge.n 8032b74 { *octets_needed = 2; 8032b70: 2302 movs r3, #2 8032b72: e005 b.n 8032b80 } else if (value < 0x800000L) 8032b74: f5b0 0f00 cmp.w r0, #8388608 ; 0x800000 8032b78: da01 bge.n 8032b7e { *octets_needed = 3; 8032b7a: 2303 movs r3, #3 8032b7c: e000 b.n 8032b80 } else { *octets_needed = 4; 8032b7e: 2304 movs r3, #4 8032b80: 800b strh r3, [r1, #0] 8032b82: 4770 bx lr 08032b84 : { s32_t sub_id; u8_t cnt; cnt = 0; if (ident_len > 1) 8032b84: 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) { 8032b86: b510 push {r4, lr} s32_t sub_id; u8_t cnt; cnt = 0; if (ident_len > 1) 8032b88: d904 bls.n 8032b94 { /* compressed prefix in one octet */ cnt++; ident_len -= 2; 8032b8a: 3802 subs r0, #2 8032b8c: b2c0 uxtb r0, r0 ident += 2; 8032b8e: 3108 adds r1, #8 cnt = 0; if (ident_len > 1) { /* compressed prefix in one octet */ cnt++; 8032b90: 2301 movs r3, #1 8032b92: e000 b.n 8032b96 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; 8032b94: 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) 8032b96: 3904 subs r1, #4 8032b98: e008 b.n 8032bac ident_len -= 2; ident += 2; } while(ident_len > 0) { ident_len--; 8032b9a: 3801 subs r0, #1 sub_id = *ident; 8032b9c: f851 4f04 ldr.w r4, [r1, #4]! ident_len -= 2; ident += 2; } while(ident_len > 0) { ident_len--; 8032ba0: b2c0 uxtb r0, r0 sub_id >>= 7; cnt++; while(sub_id > 0) { sub_id >>= 7; 8032ba2: 11e4 asrs r4, r4, #7 cnt++; 8032ba4: 3301 adds r3, #1 ident_len--; sub_id = *ident; sub_id >>= 7; cnt++; while(sub_id > 0) 8032ba6: 2c00 cmp r4, #0 { sub_id >>= 7; cnt++; 8032ba8: b2db uxtb r3, r3 ident_len--; sub_id = *ident; sub_id >>= 7; cnt++; while(sub_id > 0) 8032baa: dcfa bgt.n 8032ba2 /* compressed prefix in one octet */ cnt++; ident_len -= 2; ident += 2; } while(ident_len > 0) 8032bac: 2800 cmp r0, #0 8032bae: d1f4 bne.n 8032b9a sub_id >>= 7; cnt++; } ident++; } *octets_needed = cnt; 8032bb0: 8013 strh r3, [r2, #0] 8032bb2: bd10 pop {r4, pc} 08032bb4 : * @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) { 8032bb4: b510 push {r4, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8032bb6: 2300 movs r3, #0 while (p != NULL) 8032bb8: e00b b.n 8032bd2 { base = plen; plen += p->len; 8032bba: 8944 ldrh r4, [r0, #10] 8032bbc: 191c adds r4, r3, r4 8032bbe: b2a4 uxth r4, r4 if (ofs < plen) 8032bc0: 42a1 cmp r1, r4 8032bc2: d204 bcs.n 8032bce { msg_ptr = (u8_t*)p->payload; 8032bc4: 6840 ldr r0, [r0, #4] msg_ptr += ofs - base; 8032bc6: 1acb subs r3, r1, r3 *msg_ptr = type; 8032bc8: 54c2 strb r2, [r0, r3] return ERR_OK; 8032bca: 2000 movs r0, #0 8032bcc: e004 b.n 8032bd8 } p = p->next; 8032bce: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8032bd0: 4623 mov r3, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8032bd2: 2800 cmp r0, #0 8032bd4: d1f1 bne.n 8032bba return ERR_OK; } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; 8032bd6: 20f2 movs r0, #242 ; 0xf2 } 8032bd8: b240 sxtb r0, r0 8032bda: bd10 pop {r4, pc} 08032bdc : * @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) { 8032bdc: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8032bde: 2400 movs r4, #0 while (p != NULL) 8032be0: e03f b.n 8032c62 { base = plen; plen += p->len; 8032be2: 8943 ldrh r3, [r0, #10] 8032be4: 18e3 adds r3, r4, r3 8032be6: b29b uxth r3, r3 if (ofs < plen) 8032be8: 4299 cmp r1, r3 8032bea: d238 bcs.n 8032c5e { msg_ptr = (u8_t*)p->payload; 8032bec: 6845 ldr r5, [r0, #4] msg_ptr += ofs - base; 8032bee: 1b0c subs r4, r1, r4 if (length < 0x80) 8032bf0: 2a7f cmp r2, #127 ; 0x7f base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8032bf2: eb05 0604 add.w r6, r5, r4 if (length < 0x80) 8032bf6: d801 bhi.n 8032bfc { *msg_ptr = (u8_t)length; 8032bf8: 552a strb r2, [r5, r4] 8032bfa: e02e b.n 8032c5a return ERR_OK; } else if (length < 0x100) 8032bfc: 2aff cmp r2, #255 ; 0xff 8032bfe: f101 0701 add.w r7, r1, #1 8032c02: d80d bhi.n 8032c20 { *msg_ptr = 0x81; ofs += 1; if (ofs >= plen) 8032c04: b2bf uxth r7, r7 *msg_ptr = (u8_t)length; return ERR_OK; } else if (length < 0x100) { *msg_ptr = 0x81; 8032c06: 2181 movs r1, #129 ; 0x81 ofs += 1; if (ofs >= plen) 8032c08: 429f cmp r7, r3 *msg_ptr = (u8_t)length; return ERR_OK; } else if (length < 0x100) { *msg_ptr = 0x81; 8032c0a: 5529 strb r1, [r5, r4] ofs += 1; if (ofs >= plen) 8032c0c: d305 bcc.n 8032c1a { /* next octet in next pbuf */ p = p->next; 8032c0e: 6803 ldr r3, [r0, #0] if (p == NULL) { return ERR_ARG; } 8032c10: b90b cbnz r3, 8032c16 8032c12: 20f2 movs r0, #242 ; 0xf2 8032c14: e028 b.n 8032c68 msg_ptr = (u8_t*)p->payload; 8032c16: 685e ldr r6, [r3, #4] 8032c18: e000 b.n 8032c1c } else { /* next octet in same pbuf */ msg_ptr++; 8032c1a: 3601 adds r6, #1 } *msg_ptr = (u8_t)length; 8032c1c: 7032 strb r2, [r6, #0] 8032c1e: e01c b.n 8032c5a i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 8032c20: b2bf uxth r7, r7 else { u8_t i; /* length >= 0x100 && length <= 0xFFFF */ *msg_ptr = 0x82; 8032c22: f04f 0c82 mov.w ip, #130 ; 0x82 i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 8032c26: 429f cmp r7, r3 else { u8_t i; /* length >= 0x100 && length <= 0xFFFF */ *msg_ptr = 0x82; 8032c28: f805 c004 strb.w ip, [r5, r4] i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 8032c2c: d201 bcs.n 8032c32 plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 8032c2e: 1c74 adds r4, r6, #1 8032c30: e006 b.n 8032c40 i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 8032c32: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8032c34: 2800 cmp r0, #0 8032c36: d0ec beq.n 8032c12 msg_ptr = (u8_t*)p->payload; plen += p->len; 8032c38: 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; 8032c3a: 6844 ldr r4, [r0, #4] plen += p->len; 8032c3c: 195b adds r3, r3, r5 8032c3e: b29b uxth r3, r3 *msg_ptr = 0x82; i = 2; while (i > 0) { i--; ofs += 1; 8032c40: 3102 adds r1, #2 if (ofs >= plen) 8032c42: b289 uxth r1, r1 *msg_ptr = (u8_t)length; } else { /* most significant length octet */ *msg_ptr = (u8_t)(length >> 8); 8032c44: 0a15 lsrs r5, r2, #8 i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 8032c46: 4299 cmp r1, r3 *msg_ptr = (u8_t)length; } else { /* most significant length octet */ *msg_ptr = (u8_t)(length >> 8); 8032c48: 7025 strb r5, [r4, #0] i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 8032c4a: d201 bcs.n 8032c50 plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 8032c4c: 3401 adds r4, #1 8032c4e: e003 b.n 8032c58 i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 8032c50: 6803 ldr r3, [r0, #0] if (p == NULL) { return ERR_ARG; } 8032c52: 2b00 cmp r3, #0 8032c54: d0dd beq.n 8032c12 msg_ptr = (u8_t*)p->payload; 8032c56: 685c ldr r4, [r3, #4] msg_ptr++; } if (i == 0) { /* least significant length octet */ *msg_ptr = (u8_t)length; 8032c58: 7022 strb r2, [r4, #0] { /* most significant length octet */ *msg_ptr = (u8_t)(length >> 8); } } return ERR_OK; 8032c5a: 2000 movs r0, #0 8032c5c: e004 b.n 8032c68 } } p = p->next; 8032c5e: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8032c60: 461c mov r4, r3 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8032c62: 2800 cmp r0, #0 8032c64: d1bd bne.n 8032be2 8032c66: e7d4 b.n 8032c12 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 8032c68: b240 sxtb r0, r0 8032c6a: bdf0 pop {r4, r5, r6, r7, pc} 08032c6c : * * @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) { 8032c6c: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8032c6e: 2500 movs r5, #0 while (p != NULL) 8032c70: e037 b.n 8032ce2 { base = plen; plen += p->len; 8032c72: 8944 ldrh r4, [r0, #10] 8032c74: 192c adds r4, r5, r4 8032c76: b2a4 uxth r4, r4 if (ofs < plen) 8032c78: 42a1 cmp r1, r4 8032c7a: d230 bcs.n 8032cde { msg_ptr = (u8_t*)p->payload; 8032c7c: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 8032c7e: 1b4e subs r6, r1, r5 if (octets_needed == 5) 8032c80: 2a05 cmp r2, #5 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8032c82: eb07 0506 add.w r5, r7, r6 if (octets_needed == 5) 8032c86: d110 bne.n 8032caa { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; *msg_ptr = 0x00; ofs += 1; 8032c88: 3101 adds r1, #1 8032c8a: b289 uxth r1, r1 if (octets_needed == 5) { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; *msg_ptr = 0x00; 8032c8c: 2200 movs r2, #0 ofs += 1; if (ofs >= plen) 8032c8e: 42a1 cmp r1, r4 if (octets_needed == 5) { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; *msg_ptr = 0x00; 8032c90: 55ba strb r2, [r7, r6] ofs += 1; if (ofs >= plen) 8032c92: d308 bcc.n 8032ca6 { /* next octet in next pbuf */ p = p->next; 8032c94: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8032c96: b908 cbnz r0, 8032c9c 8032c98: 20f2 movs r0, #242 ; 0xf2 8032c9a: e025 b.n 8032ce8 msg_ptr = (u8_t*)p->payload; plen += p->len; 8032c9c: 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; 8032c9e: 6845 ldr r5, [r0, #4] plen += p->len; 8032ca0: 18a4 adds r4, r4, r2 8032ca2: b2a4 uxth r4, r4 8032ca4: e000 b.n 8032ca8 } else { /* next octet in same pbuf */ msg_ptr++; 8032ca6: 3501 adds r5, #1 msg_ptr += ofs - base; if (octets_needed == 5) { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; 8032ca8: 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) 8032caa: 1851 adds r1, r2, r1 8032cac: e012 b.n 8032cd4 msg_ptr++; } } while (octets_needed > 1) { octets_needed--; 8032cae: 3a01 subs r2, #1 8032cb0: b292 uxth r2, r2 *msg_ptr = (u8_t)(value >> (octets_needed << 3)); 8032cb2: 00d6 lsls r6, r2, #3 8032cb4: fa23 f606 lsr.w r6, r3, r6 8032cb8: 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) 8032cba: 1a8e subs r6, r1, r2 while (octets_needed > 1) { octets_needed--; *msg_ptr = (u8_t)(value >> (octets_needed << 3)); ofs += 1; if (ofs >= plen) 8032cbc: b2b6 uxth r6, r6 8032cbe: 42a6 cmp r6, r4 8032cc0: d307 bcc.n 8032cd2 { /* next octet in next pbuf */ p = p->next; 8032cc2: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8032cc4: 2800 cmp r0, #0 8032cc6: d0e7 beq.n 8032c98 msg_ptr = (u8_t*)p->payload; plen += p->len; 8032cc8: 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; 8032cca: 6845 ldr r5, [r0, #4] plen += p->len; 8032ccc: 19a4 adds r4, r4, r6 8032cce: b2a4 uxth r4, r4 8032cd0: e000 b.n 8032cd4 } else { /* next octet in same pbuf */ msg_ptr++; 8032cd2: 3501 adds r5, #1 { /* next octet in same pbuf */ msg_ptr++; } } while (octets_needed > 1) 8032cd4: 2a01 cmp r2, #1 8032cd6: d8ea bhi.n 8032cae /* next octet in same pbuf */ msg_ptr++; } } /* (only) one least significant octet */ *msg_ptr = (u8_t)value; 8032cd8: 702b strb r3, [r5, #0] return ERR_OK; 8032cda: 2000 movs r0, #0 8032cdc: e004 b.n 8032ce8 } p = p->next; 8032cde: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8032ce0: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8032ce2: 2800 cmp r0, #0 8032ce4: d1c5 bne.n 8032c72 8032ce6: e7d7 b.n 8032c98 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 8032ce8: b240 sxtb r0, r0 8032cea: bdf0 pop {r4, r5, r6, r7, pc} 08032cec : * * @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) { 8032cec: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8032cee: 2600 movs r6, #0 while (p != NULL) 8032cf0: e024 b.n 8032d3c { base = plen; plen += p->len; 8032cf2: 8944 ldrh r4, [r0, #10] 8032cf4: 1934 adds r4, r6, r4 8032cf6: b2a4 uxth r4, r4 if (ofs < plen) 8032cf8: 42a1 cmp r1, r4 8032cfa: d21d bcs.n 8032d38 { msg_ptr = (u8_t*)p->payload; 8032cfc: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 8032cfe: 1b8d subs r5, r1, r6 8032d00: 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) 8032d02: 1851 adds r1, r2, r1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (octets_needed > 1) 8032d04: e013 b.n 8032d2e { octets_needed--; 8032d06: 3a01 subs r2, #1 8032d08: b292 uxth r2, r2 *msg_ptr = (u8_t)(value >> (octets_needed << 3)); 8032d0a: 00d6 lsls r6, r2, #3 8032d0c: fa43 f606 asr.w r6, r3, r6 8032d10: 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) 8032d12: 1a8e subs r6, r1, r2 while (octets_needed > 1) { octets_needed--; *msg_ptr = (u8_t)(value >> (octets_needed << 3)); ofs += 1; if (ofs >= plen) 8032d14: b2b6 uxth r6, r6 8032d16: 42a6 cmp r6, r4 8032d18: d308 bcc.n 8032d2c { /* next octet in next pbuf */ p = p->next; 8032d1a: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8032d1c: b908 cbnz r0, 8032d22 8032d1e: 20f2 movs r0, #242 ; 0xf2 8032d20: e00f b.n 8032d42 msg_ptr = (u8_t*)p->payload; plen += p->len; 8032d22: 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; 8032d24: 6845 ldr r5, [r0, #4] plen += p->len; 8032d26: 19a4 adds r4, r4, r6 8032d28: b2a4 uxth r4, r4 8032d2a: e000 b.n 8032d2e } else { /* next octet in same pbuf */ msg_ptr++; 8032d2c: 3501 adds r5, #1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (octets_needed > 1) 8032d2e: 2a01 cmp r2, #1 8032d30: d8e9 bhi.n 8032d06 /* next octet in same pbuf */ msg_ptr++; } } /* (only) one least significant octet */ *msg_ptr = (u8_t)value; 8032d32: 702b strb r3, [r5, #0] return ERR_OK; 8032d34: 2000 movs r0, #0 8032d36: e004 b.n 8032d42 } p = p->next; 8032d38: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8032d3a: 4626 mov r6, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8032d3c: 2800 cmp r0, #0 8032d3e: d1d8 bne.n 8032cf2 8032d40: e7ed b.n 8032d1e } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 8032d42: b240 sxtb r0, r0 8032d44: bdf0 pop {r4, r5, r6, r7, pc} 08032d46 : * @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) { 8032d46: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8032d4a: 2500 movs r5, #0 while (p != NULL) 8032d4c: e068 b.n 8032e20 { base = plen; plen += p->len; 8032d4e: 8944 ldrh r4, [r0, #10] 8032d50: 192c adds r4, r5, r4 8032d52: b2a4 uxth r4, r4 if (ofs < plen) 8032d54: 42a1 cmp r1, r4 8032d56: d261 bcs.n 8032e1c { msg_ptr = (u8_t*)p->payload; 8032d58: 6846 ldr r6, [r0, #4] msg_ptr += ofs - base; 8032d5a: 1b4d subs r5, r1, r5 if (ident_len > 1) 8032d5c: 2a01 cmp r2, #1 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8032d5e: eb06 0805 add.w r8, r6, r5 if (ident_len > 1) 8032d62: d801 bhi.n 8032d68 } 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; 8032d64: 20f2 movs r0, #242 ; 0xf2 8032d66: e05e b.n 8032e26 msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if (ident_len > 1) { if ((ident[0] == 1) && (ident[1] == 3)) 8032d68: f8d3 c000 ldr.w ip, [r3] 8032d6c: f1bc 0f01 cmp.w ip, #1 8032d70: d105 bne.n 8032d7e 8032d72: 685f ldr r7, [r3, #4] 8032d74: 2f03 cmp r7, #3 8032d76: d102 bne.n 8032d7e { /* compressed (most common) prefix .iso.org */ *msg_ptr = 0x2b; 8032d78: 272b movs r7, #43 ; 0x2b 8032d7a: 5577 strb r7, [r6, r5] 8032d7c: e006 b.n 8032d8c } else { /* calculate prefix */ *msg_ptr = (u8_t)((ident[0] * 40) + ident[1]); 8032d7e: 685f ldr r7, [r3, #4] 8032d80: f04f 0928 mov.w r9, #40 ; 0x28 8032d84: fb09 7c0c mla ip, r9, ip, r7 8032d88: f806 c005 strb.w ip, [r6, r5] } ofs += 1; 8032d8c: 3101 adds r1, #1 8032d8e: b289 uxth r1, r1 if (ofs >= plen) 8032d90: 42a1 cmp r1, r4 8032d92: d307 bcc.n 8032da4 { /* next octet in next pbuf */ p = p->next; 8032d94: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8032d96: 2800 cmp r0, #0 8032d98: d0e4 beq.n 8032d64 msg_ptr = (u8_t*)p->payload; plen += p->len; 8032d9a: 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; 8032d9c: 6845 ldr r5, [r0, #4] plen += p->len; 8032d9e: 19a4 adds r4, r4, r6 8032da0: b2a4 uxth r4, r4 8032da2: e001 b.n 8032da8 } else { /* next octet in same pbuf */ msg_ptr++; 8032da4: f108 0501 add.w r5, r8, #1 } ident_len -= 2; 8032da8: 3a02 subs r2, #2 8032daa: 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) 8032dac: 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) 8032dae: e031 b.n 8032e14 { s32_t sub_id; u8_t shift, tail; ident_len--; 8032db0: 3a01 subs r2, #1 sub_id = *ident; 8032db2: f853 cf04 ldr.w ip, [r3, #4]! while (ident_len > 0) { s32_t sub_id; u8_t shift, tail; ident_len--; 8032db6: b2d2 uxtb r2, r2 sub_id = *ident; 8032db8: 261c movs r6, #28 tail = 0; 8032dba: 2700 movs r7, #0 shift = 28; while(shift > 0) { u8_t code; code = (u8_t)(sub_id >> shift); 8032dbc: fa4c f806 asr.w r8, ip, r6 if ((code != 0) || (tail != 0)) 8032dc0: f018 0fff tst.w r8, #255 ; 0xff 8032dc4: d100 bne.n 8032dc8 8032dc6: b18f cbz r7, 8032dec { tail = 1; *msg_ptr = code | 0x80; ofs += 1; 8032dc8: 3101 adds r1, #1 8032dca: b289 uxth r1, r1 code = (u8_t)(sub_id >> shift); if ((code != 0) || (tail != 0)) { tail = 1; *msg_ptr = code | 0x80; 8032dcc: f048 0880 orr.w r8, r8, #128 ; 0x80 ofs += 1; if (ofs >= plen) 8032dd0: 42a1 cmp r1, r4 code = (u8_t)(sub_id >> shift); if ((code != 0) || (tail != 0)) { tail = 1; *msg_ptr = code | 0x80; 8032dd2: f885 8000 strb.w r8, [r5] ofs += 1; if (ofs >= plen) 8032dd6: d307 bcc.n 8032de8 { /* next octet in next pbuf */ p = p->next; 8032dd8: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8032dda: 2800 cmp r0, #0 8032ddc: d0c2 beq.n 8032d64 msg_ptr = (u8_t*)p->payload; plen += p->len; 8032dde: 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; 8032de0: 6845 ldr r5, [r0, #4] plen += p->len; 8032de2: 19e4 adds r4, r4, r7 8032de4: b2a4 uxth r4, r4 8032de6: e000 b.n 8032dea } else { /* next octet in same pbuf */ msg_ptr++; 8032de8: 3501 adds r5, #1 u8_t code; code = (u8_t)(sub_id >> shift); if ((code != 0) || (tail != 0)) { tail = 1; 8032dea: 2701 movs r7, #1 ident_len--; sub_id = *ident; tail = 0; shift = 28; while(shift > 0) 8032dec: 3e07 subs r6, #7 8032dee: d1e5 bne.n 8032dbc msg_ptr++; } } shift -= 7; } *msg_ptr = (u8_t)sub_id & 0x7F; 8032df0: f00c 0c7f and.w ip, ip, #127 ; 0x7f 8032df4: f885 c000 strb.w ip, [r5] if (ident_len > 0) 8032df8: b172 cbz r2, 8032e18 { ofs += 1; 8032dfa: 3101 adds r1, #1 8032dfc: b289 uxth r1, r1 if (ofs >= plen) 8032dfe: 42a1 cmp r1, r4 8032e00: d307 bcc.n 8032e12 { /* next octet in next pbuf */ p = p->next; 8032e02: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8032e04: 2800 cmp r0, #0 8032e06: d0ad beq.n 8032d64 msg_ptr = (u8_t*)p->payload; plen += p->len; 8032e08: 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; 8032e0a: 6845 ldr r5, [r0, #4] plen += p->len; 8032e0c: 19a4 adds r4, r4, r6 8032e0e: b2a4 uxth r4, r4 8032e10: e000 b.n 8032e14 } else { /* next octet in same pbuf */ msg_ptr++; 8032e12: 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) 8032e14: 2a00 cmp r2, #0 8032e16: d1cb bne.n 8032db0 } } /* proceed to next sub-identifier */ ident++; } return ERR_OK; 8032e18: 2000 movs r0, #0 8032e1a: e004 b.n 8032e26 } p = p->next; 8032e1c: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8032e1e: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8032e20: 2800 cmp r0, #0 8032e22: d194 bne.n 8032d4e 8032e24: e79e b.n 8032d64 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 8032e26: b240 sxtb r0, r0 8032e28: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 08032e2c : * @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) { 8032e2c: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8032e2e: 2600 movs r6, #0 while (p != NULL) 8032e30: e025 b.n 8032e7e { base = plen; plen += p->len; 8032e32: 8944 ldrh r4, [r0, #10] 8032e34: 1934 adds r4, r6, r4 8032e36: b2a4 uxth r4, r4 if (ofs < plen) 8032e38: 42a1 cmp r1, r4 8032e3a: d21e bcs.n 8032e7a { msg_ptr = (u8_t*)p->payload; 8032e3c: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 8032e3e: 1b8d subs r5, r1, r6 8032e40: 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) 8032e42: 1851 adds r1, r2, r1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (raw_len > 1) 8032e44: e012 b.n 8032e6c { /* copy raw_len - 1 octets */ raw_len--; 8032e46: 3a01 subs r2, #1 *msg_ptr = *raw; 8032e48: f813 6b01 ldrb.w r6, [r3], #1 msg_ptr += ofs - base; while (raw_len > 1) { /* copy raw_len - 1 octets */ raw_len--; 8032e4c: b292 uxth r2, r2 *msg_ptr = *raw; 8032e4e: 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) 8032e50: 1a8e subs r6, r1, r2 /* copy raw_len - 1 octets */ raw_len--; *msg_ptr = *raw; raw++; ofs += 1; if (ofs >= plen) 8032e52: b2b6 uxth r6, r6 8032e54: 42a6 cmp r6, r4 8032e56: d308 bcc.n 8032e6a { /* next octet in next pbuf */ p = p->next; 8032e58: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8032e5a: b908 cbnz r0, 8032e60 8032e5c: 20f2 movs r0, #242 ; 0xf2 8032e5e: e012 b.n 8032e86 msg_ptr = (u8_t*)p->payload; plen += p->len; 8032e60: 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; 8032e62: 6845 ldr r5, [r0, #4] plen += p->len; 8032e64: 19a4 adds r4, r4, r6 8032e66: b2a4 uxth r4, r4 8032e68: e000 b.n 8032e6c } else { /* next octet in same pbuf */ msg_ptr++; 8032e6a: 3501 adds r5, #1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (raw_len > 1) 8032e6c: 2a01 cmp r2, #1 8032e6e: d8ea bhi.n 8032e46 { /* next octet in same pbuf */ msg_ptr++; } } if (raw_len > 0) 8032e70: b142 cbz r2, 8032e84 { /* copy last or single octet */ *msg_ptr = *raw; 8032e72: 781b ldrb r3, [r3, #0] } return ERR_OK; 8032e74: 2000 movs r0, #0 } } if (raw_len > 0) { /* copy last or single octet */ *msg_ptr = *raw; 8032e76: 702b strb r3, [r5, #0] 8032e78: e005 b.n 8032e86 } return ERR_OK; } p = p->next; 8032e7a: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8032e7c: 4626 mov r6, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8032e7e: 2800 cmp r0, #0 8032e80: d1d7 bne.n 8032e32 8032e82: e7eb b.n 8032e5c if (raw_len > 0) { /* copy last or single octet */ *msg_ptr = *raw; } return ERR_OK; 8032e84: 4610 mov r0, r2 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 8032e86: b240 sxtb r0, r0 8032e88: bdf0 pop {r4, r5, r6, r7, pc} 08032e8a : 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; 8032e8a: 2300 movs r3, #0 8032e8c: 7013 strb r3, [r2, #0] 8032e8e: 4770 bx lr 08032e90 : } void noleafs_get_value(struct obj_def *od, u16_t len, void *value) { 8032e90: 4770 bx lr 08032e92 : LWIP_UNUSED_ARG(od); LWIP_UNUSED_ARG(len); LWIP_UNUSED_ARG(value); /* can't set */ return 0; } 8032e92: 2000 movs r0, #0 8032e94: 4770 bx lr 08032e96 : void noleafs_set_value(struct obj_def *od, u16_t len, void *value) { 8032e96: 4770 bx lr 08032e98 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8032e98: 2801 cmp r0, #1 8032e9a: d145 bne.n 8032f28 { od->id_inst_len = ident_len; 8032e9c: 2002 movs r0, #2 { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 8032e9e: 1f0b subs r3, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; 8032ea0: 7190 strb r0, [r2, #6] od->id_inst_ptr = ident; 8032ea2: 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) 8032ea4: f811 3c04 ldrb.w r3, [r1, #-4] 8032ea8: 3b01 subs r3, #1 8032eaa: 2b06 cmp r3, #6 8032eac: d83c bhi.n 8032f28 8032eae: e8df f003 tbb [pc, r3] 8032eb2: 0b04 .short 0x0b04 8032eb4: 2a221a14 .word 0x2a221a14 8032eb8: 34 .byte 0x34 8032eb9: 00 .byte 0x00 { case 1: /* sysDescr */ od->instance = MIB_OBJECT_SCALAR; 8032eba: 2301 movs r3, #1 8032ebc: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8032ebe: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8032ec0: 2304 movs r3, #4 8032ec2: 7093 strb r3, [r2, #2] od->v_len = *sysdescr_len_ptr; 8032ec4: 4b1a ldr r3, [pc, #104] ; (8032f30 ) 8032ec6: e025 b.n 8032f14 break; case 2: /* sysObjectID */ od->instance = MIB_OBJECT_SCALAR; 8032ec8: 2301 movs r3, #1 8032eca: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8032ecc: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID); 8032ece: 2306 movs r3, #6 8032ed0: 7093 strb r3, [r2, #2] od->v_len = sysobjid.len * sizeof(s32_t); 8032ed2: 4b18 ldr r3, [pc, #96] ; (8032f34 ) 8032ed4: 781b ldrb r3, [r3, #0] 8032ed6: 009b lsls r3, r3, #2 8032ed8: e024 b.n 8032f24 break; case 3: /* sysUpTime */ od->instance = MIB_OBJECT_SCALAR; 8032eda: 2301 movs r3, #1 8032edc: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8032ede: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS); 8032ee0: 2343 movs r3, #67 ; 0x43 8032ee2: 7093 strb r3, [r2, #2] 8032ee4: e01d b.n 8032f22 od->v_len = sizeof(u32_t); break; case 4: /* sysContact */ od->instance = MIB_OBJECT_SCALAR; 8032ee6: 2301 movs r3, #1 8032ee8: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8032eea: 2303 movs r3, #3 8032eec: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8032eee: 2304 movs r3, #4 8032ef0: 7093 strb r3, [r2, #2] od->v_len = *syscontact_len_ptr; 8032ef2: 4b11 ldr r3, [pc, #68] ; (8032f38 ) 8032ef4: e00e b.n 8032f14 break; case 5: /* sysName */ od->instance = MIB_OBJECT_SCALAR; 8032ef6: 2301 movs r3, #1 8032ef8: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8032efa: 2303 movs r3, #3 8032efc: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8032efe: 2304 movs r3, #4 8032f00: 7093 strb r3, [r2, #2] od->v_len = *sysname_len_ptr; 8032f02: 4b0e ldr r3, [pc, #56] ; (8032f3c ) 8032f04: e006 b.n 8032f14 break; case 6: /* sysLocation */ od->instance = MIB_OBJECT_SCALAR; 8032f06: 2301 movs r3, #1 8032f08: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8032f0a: 2303 movs r3, #3 8032f0c: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8032f0e: 2304 movs r3, #4 8032f10: 7093 strb r3, [r2, #2] od->v_len = *syslocation_len_ptr; 8032f12: 4b0b ldr r3, [pc, #44] ; (8032f40 ) 8032f14: 681b ldr r3, [r3, #0] 8032f16: 781b ldrb r3, [r3, #0] 8032f18: e004 b.n 8032f24 break; case 7: /* sysServices */ od->instance = MIB_OBJECT_SCALAR; 8032f1a: 2301 movs r3, #1 8032f1c: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8032f1e: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 8032f20: 7090 strb r0, [r2, #2] od->v_len = sizeof(s32_t); 8032f22: 2304 movs r3, #4 8032f24: 8093 strh r3, [r2, #4] break; 8032f26: 4770 bx lr }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("system_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8032f28: 2300 movs r3, #0 8032f2a: 7013 strb r3, [r2, #0] 8032f2c: 4770 bx lr 8032f2e: bf00 nop 8032f30: 2000093c .word 0x2000093c 8032f34: 200007ec .word 0x200007ec 8032f38: 20000798 .word 0x20000798 8032f3c: 20000794 .word 0x20000794 8032f40: 20000980 .word 0x20000980 08032f44 : 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) 8032f44: 2801 cmp r0, #1 8032f46: d109 bne.n 8032f5c { od->id_inst_len = ident_len; 8032f48: 2302 movs r3, #2 8032f4a: 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; 8032f4c: 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); 8032f4e: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 8032f50: 2304 movs r3, #4 ident_len += 1; ident -= 1; if (ident_len == 2) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8032f52: 6091 str r1, [r2, #8] od->instance = MIB_OBJECT_SCALAR; 8032f54: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8032f56: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); od->v_len = sizeof(s32_t); 8032f58: 8093 strh r3, [r2, #4] 8032f5a: 4770 bx lr } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("interfaces_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8032f5c: 2300 movs r3, #0 8032f5e: 7013 strb r3, [r2, #0] 8032f60: 4770 bx lr 8032f62: 0000 movs r0, r0 08032f64 : */ 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) 8032f64: 6883 ldr r3, [r0, #8] 8032f66: 681b ldr r3, [r3, #0] 8032f68: 2b01 cmp r3, #1 8032f6a: d102 bne.n 8032f72 { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = iflist_root.count; 8032f6c: 4b01 ldr r3, [pc, #4] ; (8032f74 ) 8032f6e: 8b9b ldrh r3, [r3, #28] 8032f70: 6013 str r3, [r2, #0] 8032f72: 4770 bx lr 8032f74: 200007cc .word 0x200007cc 08032f78 : { 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]; 8032f78: 6883 ldr r3, [r0, #8] switch (id) 8032f7a: 781b ldrb r3, [r3, #0] 8032f7c: 3b01 subs r3, #1 8032f7e: 2b16 cmp r3, #22 8032f80: d836 bhi.n 8032ff0 8032f82: e8df f003 tbb [pc, r3] 8032f86: 0e0c .short 0x0e0c 8032f88: 16141210 .word 0x16141210 8032f8c: 1e1c1a18 .word 0x1e1c1a18 8032f90: 26242220 .word 0x26242220 8032f94: 2e2c2a28 .word 0x2e2c2a28 8032f98: 35353530 .word 0x35353530 8032f9c: 32 .byte 0x32 8032f9d: 00 .byte 0x00 #if IP_FORWARD /* forwarding */ *sint_ptr = 1; #else /* not-forwarding */ *sint_ptr = 2; 8032f9e: 2302 movs r3, #2 8032fa0: e025 b.n 8032fee } break; case 2: /* ipDefaultTTL */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = IP_DEFAULT_TTL; 8032fa2: 23ff movs r3, #255 ; 0xff 8032fa4: e023 b.n 8032fee } break; case 3: /* ipInReceives */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinreceives; 8032fa6: 4b13 ldr r3, [pc, #76] ; (8032ff4 ) 8032fa8: e020 b.n 8032fec } break; case 4: /* ipInHdrErrors */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinhdrerrors; 8032faa: 4b13 ldr r3, [pc, #76] ; (8032ff8 ) 8032fac: e01e b.n 8032fec } break; case 5: /* ipInAddrErrors */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinaddrerrors; 8032fae: 4b13 ldr r3, [pc, #76] ; (8032ffc ) 8032fb0: e01c b.n 8032fec } break; case 6: /* ipForwDatagrams */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipforwdatagrams; 8032fb2: 4b13 ldr r3, [pc, #76] ; (8033000 ) 8032fb4: e01a b.n 8032fec } break; case 7: /* ipInUnknownProtos */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinunknownprotos; 8032fb6: 4b13 ldr r3, [pc, #76] ; (8033004 ) 8032fb8: e018 b.n 8032fec } break; case 8: /* ipInDiscards */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipindiscards; 8032fba: 4b13 ldr r3, [pc, #76] ; (8033008 ) 8032fbc: e016 b.n 8032fec } break; case 9: /* ipInDelivers */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipindelivers; 8032fbe: 4b13 ldr r3, [pc, #76] ; (803300c ) 8032fc0: e014 b.n 8032fec } break; case 10: /* ipOutRequests */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipoutrequests; 8032fc2: 4b13 ldr r3, [pc, #76] ; (8033010 ) 8032fc4: e012 b.n 8032fec } break; case 11: /* ipOutDiscards */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipoutdiscards; 8032fc6: 4b13 ldr r3, [pc, #76] ; (8033014 ) 8032fc8: e010 b.n 8032fec } break; case 12: /* ipOutNoRoutes */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipoutnoroutes; 8032fca: 4b13 ldr r3, [pc, #76] ; (8033018 ) 8032fcc: e00e b.n 8032fec { s32_t *sint_ptr = (s32_t*)value; #if IP_REASSEMBLY *sint_ptr = IP_REASS_MAXAGE; #else *sint_ptr = 0; 8032fce: 2300 movs r3, #0 8032fd0: e00d b.n 8032fee } break; case 14: /* ipReasmReqds */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipreasmreqds; 8032fd2: 4b12 ldr r3, [pc, #72] ; (803301c ) 8032fd4: e00a b.n 8032fec } break; case 15: /* ipReasmOKs */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipreasmoks; 8032fd6: 4b12 ldr r3, [pc, #72] ; (8033020 ) 8032fd8: e008 b.n 8032fec } break; case 16: /* ipReasmFails */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipreasmfails; 8032fda: 4b12 ldr r3, [pc, #72] ; (8033024 ) 8032fdc: e006 b.n 8032fec } break; case 17: /* ipFragOKs */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipfragoks; 8032fde: 4b12 ldr r3, [pc, #72] ; (8033028 ) 8032fe0: e004 b.n 8032fec } break; case 18: /* ipFragFails */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipfragfails; 8032fe2: 4b12 ldr r3, [pc, #72] ; (803302c ) 8032fe4: e002 b.n 8032fec } break; case 19: /* ipFragCreates */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipfragcreates; 8032fe6: 4b12 ldr r3, [pc, #72] ; (8033030 ) 8032fe8: e000 b.n 8032fec 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; 8032fea: 4b12 ldr r3, [pc, #72] ; (8033034 ) 8032fec: 681b ldr r3, [r3, #0] 8032fee: 6013 str r3, [r2, #0] 8032ff0: 4770 bx lr 8032ff2: bf00 nop 8032ff4: 2000c4d8 .word 0x2000c4d8 8032ff8: 2000c460 .word 0x2000c460 8032ffc: 2000c444 .word 0x2000c444 8033000: 2000c560 .word 0x2000c560 8033004: 2000c4a0 .word 0x2000c4a0 8033008: 2000c52c .word 0x2000c52c 803300c: 2000c564 .word 0x2000c564 8033010: 2000c54c .word 0x2000c54c 8033014: 2000c4f0 .word 0x2000c4f0 8033018: 2000c570 .word 0x2000c570 803301c: 2000c4c0 .word 0x2000c4c0 8033020: 2000c46c .word 0x2000c46c 8033024: 2000c520 .word 0x2000c520 8033028: 2000c430 .word 0x2000c430 803302c: 2000c49c .word 0x2000c49c 8033030: 2000c53c .word 0x2000c53c 8033034: 2000c528 .word 0x2000c528 08033038 : 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]; 8033038: 6883 ldr r3, [r0, #8] switch (id) 803303a: 781b ldrb r3, [r3, #0] 803303c: 2b01 cmp r3, #1 803303e: d002 beq.n 8033046 8033040: 2b02 cmp r3, #2 8033042: d109 bne.n 8033058 8033044: e002 b.n 803304c #if IP_FORWARD /* forwarding */ if (*sint_ptr == 1) #else /* not-forwarding */ if (*sint_ptr == 2) 8033046: 6810 ldr r0, [r2, #0] { u8_t id, set_ok; s32_t *sint_ptr = (s32_t*)value; LWIP_UNUSED_ARG(len); set_ok = 0; 8033048: 2802 cmp r0, #2 803304a: e001 b.n 8033050 { set_ok = 1; } break; case 2: /* ipDefaultTTL */ if (*sint_ptr == IP_DEFAULT_TTL) 803304c: 6810 ldr r0, [r2, #0] { u8_t id, set_ok; s32_t *sint_ptr = (s32_t*)value; LWIP_UNUSED_ARG(len); set_ok = 0; 803304e: 28ff cmp r0, #255 ; 0xff 8033050: bf14 ite ne 8033052: 2000 movne r0, #0 8033054: 2001 moveq r0, #1 8033056: 4770 bx lr 8033058: 2000 movs r0, #0 set_ok = 1; } break; }; return set_ok; } 803305a: 4770 bx lr 0803305c : /* return to object name, adding index depth (4) */ ident_len += 4; ident -= 4; if (ident_len == 5) 803305c: 2801 cmp r0, #1 803305e: d12c bne.n 80330ba { od->id_inst_len = ident_len; 8033060: 2305 movs r3, #5 8033062: 7193 strb r3, [r2, #6] { u8_t id; /* return to object name, adding index depth (4) */ ident_len += 4; ident -= 4; 8033064: f1a1 0310 sub.w r3, r1, #16 if (ident_len == 5) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8033068: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 803306a: f811 3c10 ldrb.w r3, [r1, #-16] 803306e: 3b01 subs r3, #1 8033070: 2b0c cmp r3, #12 8033072: d822 bhi.n 80330ba 8033074: e8df f003 tbb [pc, r3] 8033078: 0d0d0d07 .word 0x0d0d0d07 803307c: 0d070d0d .word 0x0d070d0d 8033080: 0d070d11 .word 0x0d070d11 8033084: 18 .byte 0x18 8033085: 00 .byte 0x00 { case 1: /* ipRouteDest */ case 7: /* ipRouteNextHop */ case 11: /* ipRouteMask */ od->instance = MIB_OBJECT_TAB; 8033086: 2302 movs r3, #2 8033088: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 803308a: 2303 movs r3, #3 803308c: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 803308e: 2340 movs r3, #64 ; 0x40 8033090: e007 b.n 80330a2 case 5: /* ipRouteMetric3 */ case 6: /* ipRouteMetric4 */ case 8: /* ipRouteType */ case 10: /* ipRouteAge */ case 12: /* ipRouteMetric5 */ od->instance = MIB_OBJECT_TAB; 8033092: 2302 movs r3, #2 8033094: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8033096: 2103 movs r1, #3 8033098: e002 b.n 80330a0 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; 803309a: 2302 movs r3, #2 803309c: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 803309e: 2101 movs r1, #1 80330a0: 7051 strb r1, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 80330a2: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 80330a4: 2304 movs r3, #4 80330a6: e006 b.n 80330b6 break; case 13: /* ipRouteInfo */ /** @note returning zeroDotZero (0.0) no routing protocol specific MIB */ od->instance = MIB_OBJECT_TAB; 80330a8: 2302 movs r3, #2 80330aa: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 80330ac: 2301 movs r3, #1 80330ae: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID); 80330b0: 2306 movs r3, #6 80330b2: 7093 strb r3, [r2, #2] od->v_len = iprouteinfo.len * sizeof(s32_t); 80330b4: 2308 movs r3, #8 80330b6: 8093 strh r3, [r2, #4] break; 80330b8: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_rteentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 80330ba: 2300 movs r3, #0 80330bc: 7013 strb r3, [r2, #0] 80330be: 4770 bx lr 080330c0 : 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) && 80330c0: 2801 cmp r0, #1 80330c2: d110 bne.n 80330e6 (ident[0] > 0) && (ident[0] < 27)) 80330c4: 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) && 80330c8: 2b00 cmp r3, #0 80330ca: dd0c ble.n 80330e6 (ident[0] > 0) && (ident[0] < 27)) 80330cc: 2b1a cmp r3, #26 80330ce: dc0a bgt.n 80330e6 { od->id_inst_len = ident_len; 80330d0: 2302 movs r3, #2 80330d2: 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); 80330d4: 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; 80330d6: 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); 80330d8: 7093 strb r3, [r2, #2] od->v_len = sizeof(u32_t); 80330da: 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; 80330dc: 6091 str r1, [r2, #8] od->instance = MIB_OBJECT_SCALAR; 80330de: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 80330e0: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); od->v_len = sizeof(u32_t); 80330e2: 8093 strh r3, [r2, #4] 80330e4: 4770 bx lr } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("icmp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 80330e6: 2300 movs r3, #0 80330e8: 7013 strb r3, [r2, #0] 80330ea: 4770 bx lr 080330ec : 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]; 80330ec: 6883 ldr r3, [r0, #8] switch (id) 80330ee: 781b ldrb r3, [r3, #0] 80330f0: 3b01 subs r3, #1 80330f2: 2b19 cmp r3, #25 80330f4: d843 bhi.n 803317e 80330f6: e8df f003 tbb [pc, r3] 80330fa: 0f0d .short 0x0f0d 80330fc: 17151311 .word 0x17151311 8033100: 1f1d1b19 .word 0x1f1d1b19 8033104: 27252321 .word 0x27252321 8033108: 2f2d2b29 .word 0x2f2d2b29 803310c: 37353331 .word 0x37353331 8033110: 3f3d3b39 .word 0x3f3d3b39 { case 1: /* icmpInMsgs */ *uint_ptr = icmpinmsgs; 8033114: 4b1a ldr r3, [pc, #104] ; (8033180 ) 8033116: e030 b.n 803317a break; case 2: /* icmpInErrors */ *uint_ptr = icmpinerrors; 8033118: 4b1a ldr r3, [pc, #104] ; (8033184 ) 803311a: e02e b.n 803317a break; case 3: /* icmpInDestUnreachs */ *uint_ptr = icmpindestunreachs; 803311c: 4b1a ldr r3, [pc, #104] ; (8033188 ) 803311e: e02c b.n 803317a break; case 4: /* icmpInTimeExcds */ *uint_ptr = icmpintimeexcds; 8033120: 4b1a ldr r3, [pc, #104] ; (803318c ) 8033122: e02a b.n 803317a break; case 5: /* icmpInParmProbs */ *uint_ptr = icmpinparmprobs; 8033124: 4b1a ldr r3, [pc, #104] ; (8033190 ) 8033126: e028 b.n 803317a break; case 6: /* icmpInSrcQuenchs */ *uint_ptr = icmpinsrcquenchs; 8033128: 4b1a ldr r3, [pc, #104] ; (8033194 ) 803312a: e026 b.n 803317a break; case 7: /* icmpInRedirects */ *uint_ptr = icmpinredirects; 803312c: 4b1a ldr r3, [pc, #104] ; (8033198 ) 803312e: e024 b.n 803317a break; case 8: /* icmpInEchos */ *uint_ptr = icmpinechos; 8033130: 4b1a ldr r3, [pc, #104] ; (803319c ) 8033132: e022 b.n 803317a break; case 9: /* icmpInEchoReps */ *uint_ptr = icmpinechoreps; 8033134: 4b1a ldr r3, [pc, #104] ; (80331a0 ) 8033136: e020 b.n 803317a break; case 10: /* icmpInTimestamps */ *uint_ptr = icmpintimestamps; 8033138: 4b1a ldr r3, [pc, #104] ; (80331a4 ) 803313a: e01e b.n 803317a break; case 11: /* icmpInTimestampReps */ *uint_ptr = icmpintimestampreps; 803313c: 4b1a ldr r3, [pc, #104] ; (80331a8 ) 803313e: e01c b.n 803317a break; case 12: /* icmpInAddrMasks */ *uint_ptr = icmpinaddrmasks; 8033140: 4b1a ldr r3, [pc, #104] ; (80331ac ) 8033142: e01a b.n 803317a break; case 13: /* icmpInAddrMaskReps */ *uint_ptr = icmpinaddrmaskreps; 8033144: 4b1a ldr r3, [pc, #104] ; (80331b0 ) 8033146: e018 b.n 803317a break; case 14: /* icmpOutMsgs */ *uint_ptr = icmpoutmsgs; 8033148: 4b1a ldr r3, [pc, #104] ; (80331b4 ) 803314a: e016 b.n 803317a break; case 15: /* icmpOutErrors */ *uint_ptr = icmpouterrors; 803314c: 4b1a ldr r3, [pc, #104] ; (80331b8 ) 803314e: e014 b.n 803317a break; case 16: /* icmpOutDestUnreachs */ *uint_ptr = icmpoutdestunreachs; 8033150: 4b1a ldr r3, [pc, #104] ; (80331bc ) 8033152: e012 b.n 803317a break; case 17: /* icmpOutTimeExcds */ *uint_ptr = icmpouttimeexcds; 8033154: 4b1a ldr r3, [pc, #104] ; (80331c0 ) 8033156: e010 b.n 803317a break; case 18: /* icmpOutParmProbs */ *uint_ptr = icmpoutparmprobs; 8033158: 4b1a ldr r3, [pc, #104] ; (80331c4 ) 803315a: e00e b.n 803317a break; case 19: /* icmpOutSrcQuenchs */ *uint_ptr = icmpoutsrcquenchs; 803315c: 4b1a ldr r3, [pc, #104] ; (80331c8 ) 803315e: e00c b.n 803317a break; case 20: /* icmpOutRedirects */ *uint_ptr = icmpoutredirects; 8033160: 4b1a ldr r3, [pc, #104] ; (80331cc ) 8033162: e00a b.n 803317a break; case 21: /* icmpOutEchos */ *uint_ptr = icmpoutechos; 8033164: 4b1a ldr r3, [pc, #104] ; (80331d0 ) 8033166: e008 b.n 803317a break; case 22: /* icmpOutEchoReps */ *uint_ptr = icmpoutechoreps; 8033168: 4b1a ldr r3, [pc, #104] ; (80331d4 ) 803316a: e006 b.n 803317a break; case 23: /* icmpOutTimestamps */ *uint_ptr = icmpouttimestamps; 803316c: 4b1a ldr r3, [pc, #104] ; (80331d8 ) 803316e: e004 b.n 803317a break; case 24: /* icmpOutTimestampReps */ *uint_ptr = icmpouttimestampreps; 8033170: 4b1a ldr r3, [pc, #104] ; (80331dc ) 8033172: e002 b.n 803317a break; case 25: /* icmpOutAddrMasks */ *uint_ptr = icmpoutaddrmasks; 8033174: 4b1a ldr r3, [pc, #104] ; (80331e0 ) 8033176: e000 b.n 803317a break; case 26: /* icmpOutAddrMaskReps */ *uint_ptr = icmpoutaddrmaskreps; 8033178: 4b1a ldr r3, [pc, #104] ; (80331e4 ) 803317a: 681b ldr r3, [r3, #0] 803317c: 6013 str r3, [r2, #0] 803317e: 4770 bx lr 8033180: 2000c468 .word 0x2000c468 8033184: 2000c464 .word 0x2000c464 8033188: 2000c440 .word 0x2000c440 803318c: 2000c524 .word 0x2000c524 8033190: 2000c558 .word 0x2000c558 8033194: 2000c450 .word 0x2000c450 8033198: 2000c47c .word 0x2000c47c 803319c: 2000c51c .word 0x2000c51c 80331a0: 2000c494 .word 0x2000c494 80331a4: 2000c484 .word 0x2000c484 80331a8: 2000c4c4 .word 0x2000c4c4 80331ac: 2000c55c .word 0x2000c55c 80331b0: 2000c4f8 .word 0x2000c4f8 80331b4: 2000c4e8 .word 0x2000c4e8 80331b8: 2000c56c .word 0x2000c56c 80331bc: 2000c500 .word 0x2000c500 80331c0: 2000c4b4 .word 0x2000c4b4 80331c4: 2000c478 .word 0x2000c478 80331c8: 2000c4cc .word 0x2000c4cc 80331cc: 2000c488 .word 0x2000c488 80331d0: 2000c568 .word 0x2000c568 80331d4: 2000c508 .word 0x2000c508 80331d8: 2000c4d4 .word 0x2000c4d4 80331dc: 2000c4b8 .word 0x2000c4b8 80331e0: 2000c480 .word 0x2000c480 80331e4: 2000c4e0 .word 0x2000c4e0 080331e8 : 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]; 80331e8: 6883 ldr r3, [r0, #8] switch (id) 80331ea: 781b ldrb r3, [r3, #0] 80331ec: 3b01 subs r3, #1 80331ee: 2b0e cmp r3, #14 80331f0: d836 bhi.n 8033260 80331f2: e8df f003 tbb [pc, r3] 80331f6: 0a08 .short 0x0a08 80331f8: 1412100d .word 0x1412100d 80331fc: 2a1a1816 .word 0x2a1a1816 8033200: 30352e2c .word 0x30352e2c 8033204: 32 .byte 0x32 8033205: 00 .byte 0x00 { case 1: /* tcpRtoAlgorithm, vanj(4) */ *sint_ptr = 4; 8033206: 2304 movs r3, #4 8033208: e029 b.n 803325e break; case 2: /* tcpRtoMin */ /* @todo not the actual value, a guess, needs to be calculated */ *sint_ptr = 1000; 803320a: f44f 737a mov.w r3, #1000 ; 0x3e8 803320e: e026 b.n 803325e break; case 3: /* tcpRtoMax */ /* @todo not the actual value, a guess, needs to be calculated */ *sint_ptr = 60000; 8033210: f64e 2360 movw r3, #60000 ; 0xea60 8033214: e023 b.n 803325e break; case 4: /* tcpMaxConn */ *sint_ptr = MEMP_NUM_TCP_PCB; 8033216: 230c movs r3, #12 8033218: e021 b.n 803325e break; case 5: /* tcpActiveOpens */ *uint_ptr = tcpactiveopens; 803321a: 4b12 ldr r3, [pc, #72] ; (8033264 ) 803321c: e01e b.n 803325c break; case 6: /* tcpPassiveOpens */ *uint_ptr = tcppassiveopens; 803321e: 4b12 ldr r3, [pc, #72] ; (8033268 ) 8033220: e01c b.n 803325c break; case 7: /* tcpAttemptFails */ *uint_ptr = tcpattemptfails; 8033222: 4b12 ldr r3, [pc, #72] ; (803326c ) 8033224: e01a b.n 803325c break; case 8: /* tcpEstabResets */ *uint_ptr = tcpestabresets; 8033226: 4b12 ldr r3, [pc, #72] ; (8033270 ) 8033228: e018 b.n 803325c break; case 9: /* tcpCurrEstab */ { u16_t tcpcurrestab = 0; struct tcp_pcb *pcb = tcp_active_pcbs; 803322a: 4b12 ldr r3, [pc, #72] ; (8033274 ) case 8: /* tcpEstabResets */ *uint_ptr = tcpestabresets; break; case 9: /* tcpCurrEstab */ { u16_t tcpcurrestab = 0; 803322c: 2100 movs r1, #0 struct tcp_pcb *pcb = tcp_active_pcbs; 803322e: 681b ldr r3, [r3, #0] while (pcb != NULL) 8033230: e007 b.n 8033242 { if ((pcb->state == ESTABLISHED) || 8033232: 7e18 ldrb r0, [r3, #24] 8033234: 2804 cmp r0, #4 8033236: d001 beq.n 803323c 8033238: 2807 cmp r0, #7 803323a: d101 bne.n 8033240 (pcb->state == CLOSE_WAIT)) { tcpcurrestab++; 803323c: 3101 adds r1, #1 803323e: b289 uxth r1, r1 } pcb = pcb->next; 8033240: 68db ldr r3, [r3, #12] break; case 9: /* tcpCurrEstab */ { u16_t tcpcurrestab = 0; struct tcp_pcb *pcb = tcp_active_pcbs; while (pcb != NULL) 8033242: 2b00 cmp r3, #0 8033244: d1f5 bne.n 8033232 { tcpcurrestab++; } pcb = pcb->next; } *uint_ptr = tcpcurrestab; 8033246: 6011 str r1, [r2, #0] } break; 8033248: 4770 bx lr case 10: /* tcpInSegs */ *uint_ptr = tcpinsegs; 803324a: 4b0b ldr r3, [pc, #44] ; (8033278 ) 803324c: e006 b.n 803325c break; case 11: /* tcpOutSegs */ *uint_ptr = tcpoutsegs; 803324e: 4b0b ldr r3, [pc, #44] ; (803327c ) 8033250: e004 b.n 803325c break; case 12: /* tcpRetransSegs */ *uint_ptr = tcpretranssegs; 8033252: 4b0b ldr r3, [pc, #44] ; (8033280 ) 8033254: e002 b.n 803325c break; case 14: /* tcpInErrs */ *uint_ptr = tcpinerrs; 8033256: 4b0b ldr r3, [pc, #44] ; (8033284 ) 8033258: e000 b.n 803325c break; case 15: /* tcpOutRsts */ *uint_ptr = tcpoutrsts; 803325a: 4b0b ldr r3, [pc, #44] ; (8033288 ) 803325c: 681b ldr r3, [r3, #0] 803325e: 6013 str r3, [r2, #0] 8033260: 4770 bx lr 8033262: bf00 nop 8033264: 2000c45c .word 0x2000c45c 8033268: 2000c490 .word 0x2000c490 803326c: 2000c4dc .word 0x2000c4dc 8033270: 2000c470 .word 0x2000c470 8033274: 2000f6ac .word 0x2000f6ac 8033278: 2000c4ec .word 0x2000c4ec 803327c: 2000c538 .word 0x2000c538 8033280: 2000c50c .word 0x2000c50c 8033284: 2000c498 .word 0x2000c498 8033288: 2000c4fc .word 0x2000c4fc 0803328c : 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) && 803328c: 2801 cmp r0, #1 803328e: d110 bne.n 80332b2 (ident[0] > 0) && (ident[0] < 6)) 8033290: 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) && 8033294: 2b00 cmp r3, #0 8033296: dd0c ble.n 80332b2 (ident[0] > 0) && (ident[0] < 6)) 8033298: 2b05 cmp r3, #5 803329a: dc0a bgt.n 80332b2 { od->id_inst_len = ident_len; 803329c: 2302 movs r3, #2 803329e: 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); 80332a0: 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; 80332a2: 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); 80332a4: 7093 strb r3, [r2, #2] od->v_len = sizeof(u32_t); 80332a6: 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; 80332a8: 6091 str r1, [r2, #8] od->instance = MIB_OBJECT_SCALAR; 80332aa: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 80332ac: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); od->v_len = sizeof(u32_t); 80332ae: 8093 strh r3, [r2, #4] 80332b0: 4770 bx lr } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("udp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 80332b2: 2300 movs r3, #0 80332b4: 7013 strb r3, [r2, #0] 80332b6: 4770 bx lr 080332b8 : 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]; 80332b8: 6883 ldr r3, [r0, #8] switch (id) 80332ba: 781b ldrb r3, [r3, #0] 80332bc: 3b01 subs r3, #1 80332be: 2b03 cmp r3, #3 80332c0: d80c bhi.n 80332dc 80332c2: e8df f003 tbb [pc, r3] 80332c6: 0402 .short 0x0402 80332c8: 0806 .short 0x0806 { case 1: /* udpInDatagrams */ *uint_ptr = udpindatagrams; 80332ca: 4b05 ldr r3, [pc, #20] ; (80332e0 ) 80332cc: e004 b.n 80332d8 break; case 2: /* udpNoPorts */ *uint_ptr = udpnoports; 80332ce: 4b05 ldr r3, [pc, #20] ; (80332e4 ) 80332d0: e002 b.n 80332d8 break; case 3: /* udpInErrors */ *uint_ptr = udpinerrors; 80332d2: 4b05 ldr r3, [pc, #20] ; (80332e8 ) 80332d4: e000 b.n 80332d8 break; case 4: /* udpOutDatagrams */ *uint_ptr = udpoutdatagrams; 80332d6: 4b05 ldr r3, [pc, #20] ; (80332ec ) 80332d8: 681b ldr r3, [r3, #0] 80332da: 6013 str r3, [r2, #0] 80332dc: 4770 bx lr 80332de: bf00 nop 80332e0: 2000c518 .word 0x2000c518 80332e4: 2000c4d0 .word 0x2000c4d0 80332e8: 2000c540 .word 0x2000c540 80332ec: 2000c4c8 .word 0x2000c4c8 080332f0 : 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]; 80332f0: 6883 ldr r3, [r0, #8] switch (id) 80332f2: 781b ldrb r3, [r3, #0] 80332f4: 3b01 subs r3, #1 80332f6: 2b1d cmp r3, #29 80332f8: d84b bhi.n 8033392 80332fa: e8df f003 tbb [pc, r3] 80332fe: 110f .short 0x110f 8033300: 19171513 .word 0x19171513 8033304: 1f1d1b4a .word 0x1f1d1b4a 8033308: 27252321 .word 0x27252321 803330c: 2f2d2b29 .word 0x2f2d2b29 8033310: 37353331 .word 0x37353331 8033314: 3d3b394a .word 0x3d3b394a 8033318: 4643413f .word 0x4643413f { case 1: /* snmpInPkts */ *uint_ptr = snmpinpkts; 803331c: 4b1d ldr r3, [pc, #116] ; (8033394 ) 803331e: e032 b.n 8033386 break; case 2: /* snmpOutPkts */ *uint_ptr = snmpoutpkts; 8033320: 4b1d ldr r3, [pc, #116] ; (8033398 ) 8033322: e030 b.n 8033386 break; case 3: /* snmpInBadVersions */ *uint_ptr = snmpinbadversions; 8033324: 4b1d ldr r3, [pc, #116] ; (803339c ) 8033326: e02e b.n 8033386 break; case 4: /* snmpInBadCommunityNames */ *uint_ptr = snmpinbadcommunitynames; 8033328: 4b1d ldr r3, [pc, #116] ; (80333a0 ) 803332a: e02c b.n 8033386 break; case 5: /* snmpInBadCommunityUses */ *uint_ptr = snmpinbadcommunityuses; 803332c: 4b1d ldr r3, [pc, #116] ; (80333a4 ) 803332e: e02a b.n 8033386 break; case 6: /* snmpInASNParseErrs */ *uint_ptr = snmpinasnparseerrs; 8033330: 4b1d ldr r3, [pc, #116] ; (80333a8 ) 8033332: e028 b.n 8033386 break; case 8: /* snmpInTooBigs */ *uint_ptr = snmpintoobigs; 8033334: 4b1d ldr r3, [pc, #116] ; (80333ac ) 8033336: e026 b.n 8033386 break; case 9: /* snmpInNoSuchNames */ *uint_ptr = snmpinnosuchnames; 8033338: 4b1d ldr r3, [pc, #116] ; (80333b0 ) 803333a: e024 b.n 8033386 break; case 10: /* snmpInBadValues */ *uint_ptr = snmpinbadvalues; 803333c: 4b1d ldr r3, [pc, #116] ; (80333b4 ) 803333e: e022 b.n 8033386 break; case 11: /* snmpInReadOnlys */ *uint_ptr = snmpinreadonlys; 8033340: 4b1d ldr r3, [pc, #116] ; (80333b8 ) 8033342: e020 b.n 8033386 break; case 12: /* snmpInGenErrs */ *uint_ptr = snmpingenerrs; 8033344: 4b1d ldr r3, [pc, #116] ; (80333bc ) 8033346: e01e b.n 8033386 break; case 13: /* snmpInTotalReqVars */ *uint_ptr = snmpintotalreqvars; 8033348: 4b1d ldr r3, [pc, #116] ; (80333c0 ) 803334a: e01c b.n 8033386 break; case 14: /* snmpInTotalSetVars */ *uint_ptr = snmpintotalsetvars; 803334c: 4b1d ldr r3, [pc, #116] ; (80333c4 ) 803334e: e01a b.n 8033386 break; case 15: /* snmpInGetRequests */ *uint_ptr = snmpingetrequests; 8033350: 4b1d ldr r3, [pc, #116] ; (80333c8 ) 8033352: e018 b.n 8033386 break; case 16: /* snmpInGetNexts */ *uint_ptr = snmpingetnexts; 8033354: 4b1d ldr r3, [pc, #116] ; (80333cc ) 8033356: e016 b.n 8033386 break; case 17: /* snmpInSetRequests */ *uint_ptr = snmpinsetrequests; 8033358: 4b1d ldr r3, [pc, #116] ; (80333d0 ) 803335a: e014 b.n 8033386 break; case 18: /* snmpInGetResponses */ *uint_ptr = snmpingetresponses; 803335c: 4b1d ldr r3, [pc, #116] ; (80333d4 ) 803335e: e012 b.n 8033386 break; case 19: /* snmpInTraps */ *uint_ptr = snmpintraps; 8033360: 4b1d ldr r3, [pc, #116] ; (80333d8 ) 8033362: e010 b.n 8033386 break; case 20: /* snmpOutTooBigs */ *uint_ptr = snmpouttoobigs; 8033364: 4b1d ldr r3, [pc, #116] ; (80333dc ) 8033366: e00e b.n 8033386 break; case 21: /* snmpOutNoSuchNames */ *uint_ptr = snmpoutnosuchnames; 8033368: 4b1d ldr r3, [pc, #116] ; (80333e0 ) 803336a: e00c b.n 8033386 break; case 22: /* snmpOutBadValues */ *uint_ptr = snmpoutbadvalues; 803336c: 4b1d ldr r3, [pc, #116] ; (80333e4 ) 803336e: e00a b.n 8033386 break; case 24: /* snmpOutGenErrs */ *uint_ptr = snmpoutgenerrs; 8033370: 4b1d ldr r3, [pc, #116] ; (80333e8 ) 8033372: e008 b.n 8033386 break; case 25: /* snmpOutGetRequests */ *uint_ptr = snmpoutgetrequests; 8033374: 4b1d ldr r3, [pc, #116] ; (80333ec ) 8033376: e006 b.n 8033386 break; case 26: /* snmpOutGetNexts */ *uint_ptr = snmpoutgetnexts; 8033378: 4b1d ldr r3, [pc, #116] ; (80333f0 ) 803337a: e004 b.n 8033386 break; case 27: /* snmpOutSetRequests */ *uint_ptr = snmpoutsetrequests; 803337c: 4b1d ldr r3, [pc, #116] ; (80333f4 ) 803337e: e002 b.n 8033386 break; case 28: /* snmpOutGetResponses */ *uint_ptr = snmpoutgetresponses; 8033380: 4b1d ldr r3, [pc, #116] ; (80333f8 ) 8033382: e000 b.n 8033386 break; case 29: /* snmpOutTraps */ *uint_ptr = snmpouttraps; 8033384: 4b1d ldr r3, [pc, #116] ; (80333fc ) 8033386: 681b ldr r3, [r3, #0] 8033388: e002 b.n 8033390 break; case 30: /* snmpEnableAuthenTraps */ *uint_ptr = *snmpenableauthentraps_ptr; 803338a: 4b1d ldr r3, [pc, #116] ; (8033400 ) 803338c: 681b ldr r3, [r3, #0] 803338e: 781b ldrb r3, [r3, #0] 8033390: 6013 str r3, [r2, #0] 8033392: 4770 bx lr 8033394: 2000c474 .word 0x2000c474 8033398: 2000c544 .word 0x2000c544 803339c: 2000c530 .word 0x2000c530 80333a0: 2000c448 .word 0x2000c448 80333a4: 2000c44c .word 0x2000c44c 80333a8: 2000c534 .word 0x2000c534 80333ac: 2000c4f4 .word 0x2000c4f4 80333b0: 2000c574 .word 0x2000c574 80333b4: 2000c510 .word 0x2000c510 80333b8: 2000c4e4 .word 0x2000c4e4 80333bc: 2000c4bc .word 0x2000c4bc 80333c0: 2000c514 .word 0x2000c514 80333c4: 2000c454 .word 0x2000c454 80333c8: 2000c4a8 .word 0x2000c4a8 80333cc: 2000c42c .word 0x2000c42c 80333d0: 2000c550 .word 0x2000c550 80333d4: 2000c4a4 .word 0x2000c4a4 80333d8: 2000c43c .word 0x2000c43c 80333dc: 2000c48c .word 0x2000c48c 80333e0: 2000c458 .word 0x2000c458 80333e4: 2000c438 .word 0x2000c438 80333e8: 2000c578 .word 0x2000c578 80333ec: 2000c4b0 .word 0x2000c4b0 80333f0: 2000c548 .word 0x2000c548 80333f4: 2000c554 .word 0x2000c554 80333f8: 2000c434 .word 0x2000c434 80333fc: 2000c4ac .word 0x2000c4ac 8033400: 20000898 .word 0x20000898 08033404 : { 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]; 8033404: 6883 ldr r3, [r0, #8] if (id == 30) 8033406: 781b ldrb r3, [r3, #0] 8033408: 2b1e cmp r3, #30 803340a: d103 bne.n 8033414 { /* snmpEnableAuthenTraps */ /* @todo @fixme: which kind of pointer is 'value'? s32_t or u8_t??? */ u8_t *ptr = (u8_t*)value; *snmpenableauthentraps_ptr = *ptr; 803340c: 4b02 ldr r3, [pc, #8] ; (8033418 ) 803340e: 7812 ldrb r2, [r2, #0] 8033410: 681b ldr r3, [r3, #0] 8033412: 701a strb r2, [r3, #0] 8033414: 4770 bx lr 8033416: bf00 nop 8033418: 20000898 .word 0x20000898 0803341c : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 803341c: 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) { 803341e: b513 push {r0, r1, r4, lr} 8033420: 4614 mov r4, r2 u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8033422: d149 bne.n 80334b8 { od->id_inst_len = ident_len; 8033424: 2302 movs r3, #2 8033426: 7193 strb r3, [r2, #6] { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 8033428: 1f0a subs r2, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 803342a: 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) 803342c: f811 2c04 ldrb.w r2, [r1, #-4] 8033430: 3a01 subs r2, #1 8033432: 2a15 cmp r2, #21 8033434: d840 bhi.n 80334b8 8033436: e8df f002 tbb [pc, r2] 803343a: 0e0b .short 0x0e0b 803343c: 19140b0b .word 0x19140b0b 8033440: 302b0b27 .word 0x302b0b27 8033444: 30303030 .word 0x30303030 8033448: 30303030 .word 0x30303030 803344c: 37143030 .word 0x37143030 { case 1: /* ifIndex */ case 3: /* ifType */ case 4: /* ifMtu */ case 8: /* ifOperStatus */ od->instance = MIB_OBJECT_TAB; 8033450: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8033452: 2201 movs r2, #1 8033454: e01a b.n 803348c 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; 8033456: 2201 movs r2, #1 8033458: 7062 strb r2, [r4, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 803345a: 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; 803345c: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 803345e: 70a2 strb r2, [r4, #2] 8033460: e028 b.n 80334b4 /** @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; 8033462: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8033464: 2301 movs r3, #1 8033466: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_GAUGE); 8033468: 2342 movs r3, #66 ; 0x42 803346a: e01a b.n 80334a2 break; case 6: /* ifPhysAddress */ { struct netif *netif; snmp_ifindextonetif(ident[1], &netif); 803346c: 6808 ldr r0, [r1, #0] 803346e: a901 add r1, sp, #4 8033470: f001 f81c bl 80344ac od->instance = MIB_OBJECT_TAB; 8033474: 2302 movs r3, #2 8033476: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8033478: 2301 movs r3, #1 803347a: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 803347c: 2304 movs r3, #4 803347e: 70a3 strb r3, [r4, #2] od->v_len = netif->hwaddr_len; 8033480: 9b01 ldr r3, [sp, #4] 8033482: f893 3026 ldrb.w r3, [r3, #38] ; 0x26 8033486: e015 b.n 80334b4 } break; case 7: /* ifAdminStatus */ od->instance = MIB_OBJECT_TAB; 8033488: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_WRITE; 803348a: 2203 movs r2, #3 803348c: 7062 strb r2, [r4, #1] 803348e: e008 b.n 80334a2 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; 8033490: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8033492: 2301 movs r3, #1 8033494: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS); 8033496: 2343 movs r3, #67 ; 0x43 8033498: e003 b.n 80334a2 case 16: /* ifOutOctets */ case 17: /* ifOutUcastPkts */ case 18: /* ifOutNUcastPkts */ case 19: /* ifOutDiscarts */ case 20: /* ifOutErrors */ od->instance = MIB_OBJECT_TAB; 803349a: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 803349c: 2301 movs r3, #1 803349e: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 80334a0: 2341 movs r3, #65 ; 0x41 80334a2: 70a3 strb r3, [r4, #2] od->v_len = sizeof(u32_t); 80334a4: 2304 movs r3, #4 80334a6: e005 b.n 80334b4 break; case 22: /* ifSpecific */ /** @note returning zeroDotZero (0.0) no media specific MIB support */ od->instance = MIB_OBJECT_TAB; 80334a8: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 80334aa: 2301 movs r3, #1 80334ac: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID); 80334ae: 2306 movs r3, #6 80334b0: 70a3 strb r3, [r4, #2] od->v_len = ifspecific.len * sizeof(s32_t); 80334b2: 2308 movs r3, #8 80334b4: 80a3 strh r3, [r4, #4] break; 80334b6: e001 b.n 80334bc }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ifentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 80334b8: 2300 movs r3, #0 80334ba: 7023 strb r3, [r4, #0] } } 80334bc: bd1c pop {r2, r3, r4, pc} 80334be: 0000 movs r0, r0 080334c0 : } } static void udpentry_get_value(struct obj_def *od, u16_t len, void *value) { 80334c0: b537 push {r0, r1, r2, r4, r5, lr} 80334c2: 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); 80334c4: 6880 ldr r0, [r0, #8] 80334c6: a901 add r1, sp, #4 80334c8: 3004 adds r0, #4 } } static void udpentry_get_value(struct obj_def *od, u16_t len, void *value) { 80334ca: 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); 80334cc: f001 f80c bl 80344e8 LWIP_ASSERT("invalid port", (od->id_inst_ptr[5] >= 0) && (od->id_inst_ptr[5] <= 0xffff)); port = (u16_t)od->id_inst_ptr[5]; 80334d0: 68a1 ldr r1, [r4, #8] pcb = udp_pcbs; 80334d2: 4b0c ldr r3, [pc, #48] ; (8033504 ) 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]; 80334d4: 8a8a ldrh r2, [r1, #20] pcb = udp_pcbs; 80334d6: 681b ldr r3, [r3, #0] while ((pcb != NULL) && !(ip_addr_cmp(&pcb->local_ip, &ip) && 80334d8: 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) && 80334da: e000 b.n 80334de !(ip_addr_cmp(&pcb->local_ip, &ip) && (pcb->local_port == port))) { pcb = pcb->next; 80334dc: 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) && 80334de: b17b cbz r3, 8033500 80334e0: 681c ldr r4, [r3, #0] 80334e2: 4284 cmp r4, r0 80334e4: d1fa bne.n 80334dc !(ip_addr_cmp(&pcb->local_ip, &ip) && (pcb->local_port == port))) 80334e6: 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) && 80334e8: 4294 cmp r4, r2 80334ea: d1f7 bne.n 80334dc 80334ec: e003 b.n 80334f6 switch (id) { case 1: /* udpLocalAddress */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = pcb->local_ip; 80334ee: 6028 str r0, [r5, #0] } break; 80334f0: e006 b.n 8033500 case 2: /* udpLocalPort */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = pcb->local_port; 80334f2: 602a str r2, [r5, #0] } break; 80334f4: e004 b.n 8033500 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) 80334f6: 780b ldrb r3, [r1, #0] 80334f8: 2b01 cmp r3, #1 80334fa: d0f8 beq.n 80334ee 80334fc: 2b02 cmp r3, #2 80334fe: d0f8 beq.n 80334f2 *sint_ptr = pcb->local_port; } break; } } } 8033500: bd3e pop {r1, r2, r3, r4, r5, pc} 8033502: bf00 nop 8033504: 2000f6c8 .word 0x2000f6c8 08033508 : } } static void ip_addrentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033508: b573 push {r0, r1, r4, r5, r6, lr} 803350a: 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); 803350c: 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; 803350e: 4b18 ldr r3, [pc, #96] ; (8033570 ) LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); 8033510: a901 add r1, sp, #4 8033512: 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; 8033514: 681c ldr r4, [r3, #0] } } static void ip_addrentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033516: 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); 8033518: f000 ffe6 bl 80344e8 ifidx = 0; while ((netif != NULL) && !ip_addr_cmp(&ip, &netif->ip_addr)) 803351c: 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; 803351e: 2300 movs r3, #0 while ((netif != NULL) && !ip_addr_cmp(&ip, &netif->ip_addr)) 8033520: e002 b.n 8033528 { netif = netif->next; ifidx++; 8033522: 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; 8033524: 6824 ldr r4, [r4, #0] ifidx++; 8033526: 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)) 8033528: b304 cbz r4, 803356c 803352a: 6862 ldr r2, [r4, #4] 803352c: 4291 cmp r1, r2 803352e: d1f8 bne.n 8033522 8033530: e00a b.n 8033548 switch (id) { case 1: /* ipAdEntAddr */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = netif->ip_addr; 8033532: 6863 ldr r3, [r4, #4] 8033534: e006 b.n 8033544 } break; case 2: /* ipAdEntIfIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = ifidx + 1; 8033536: 3301 adds r3, #1 8033538: e004 b.n 8033544 } break; case 3: /* ipAdEntNetMask */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = netif->netmask; 803353a: 68a3 ldr r3, [r4, #8] 803353c: e002 b.n 8033544 { 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; 803353e: 2301 movs r3, #1 8033540: e000 b.n 8033544 *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; 8033542: 2300 movs r3, #0 8033544: 602b str r3, [r5, #0] #endif } break; 8033546: e011 b.n 803356c } 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]; 8033548: 68b2 ldr r2, [r6, #8] switch (id) 803354a: 7812 ldrb r2, [r2, #0] 803354c: 3a01 subs r2, #1 803354e: 2a04 cmp r2, #4 8033550: d80c bhi.n 803356c 8033552: a101 add r1, pc, #4 ; (adr r1, 8033558 ) 8033554: f851 f022 ldr.w pc, [r1, r2, lsl #2] 8033558: 08033533 .word 0x08033533 803355c: 08033537 .word 0x08033537 8033560: 0803353b .word 0x0803353b 8033564: 0803353f .word 0x0803353f 8033568: 08033543 .word 0x08033543 #endif } break; } } } 803356c: bd7c pop {r2, r3, r4, r5, r6, pc} 803356e: bf00 nop 8033570: 2000f6a0 .word 0x2000f6a0 08033574 : } } static void ip_ntomentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033574: 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); 8033576: 6883 ldr r3, [r0, #8] } } static void ip_ntomentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033578: b085 sub sp, #20 803357a: 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); 803357c: a903 add r1, sp, #12 803357e: 6858 ldr r0, [r3, #4] } } static void ip_ntomentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033580: 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); 8033582: f000 ff93 bl 80344ac snmp_oidtoip(&od->id_inst_ptr[2], &ip); 8033586: 68a8 ldr r0, [r5, #8] 8033588: a902 add r1, sp, #8 803358a: 3008 adds r0, #8 803358c: f000 ffac bl 80344e8 #if LWIP_ARP /** @todo implement a netif_find_addr */ if (etharp_find_addr(netif, &ip, ðaddr_ret, &ipaddr_ret) > -1) 8033590: 9803 ldr r0, [sp, #12] 8033592: a902 add r1, sp, #8 8033594: 466a mov r2, sp 8033596: ab01 add r3, sp, #4 8033598: f002 ffea bl 8036570 803359c: 2800 cmp r0, #0 803359e: db15 blt.n 80335cc { LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 80335a0: 68ab ldr r3, [r5, #8] switch (id) 80335a2: 781a ldrb r2, [r3, #0] 80335a4: 3a01 subs r2, #1 80335a6: 2a03 cmp r2, #3 80335a8: d810 bhi.n 80335cc 80335aa: e8df f002 tbb [pc, r2] 80335ae: 0402 .short 0x0402 80335b0: 0d0a .short 0x0d0a { case 1: /* ipNetToMediaIfIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = od->id_inst_ptr[1]; 80335b2: 685b ldr r3, [r3, #4] 80335b4: e009 b.n 80335ca break; case 2: /* ipNetToMediaPhysAddress */ { struct eth_addr *dst = (struct eth_addr*)value; *dst = *ethaddr_ret; 80335b6: 9b00 ldr r3, [sp, #0] 80335b8: 681a ldr r2, [r3, #0] 80335ba: 6022 str r2, [r4, #0] 80335bc: 889b ldrh r3, [r3, #4] 80335be: 80a3 strh r3, [r4, #4] } break; 80335c0: e004 b.n 80335cc case 3: /* ipNetToMediaNetAddress */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = *ipaddr_ret; 80335c2: 9b01 ldr r3, [sp, #4] 80335c4: 681b ldr r3, [r3, #0] 80335c6: e000 b.n 80335ca break; case 4: /* ipNetToMediaType */ { s32_t *sint_ptr = (s32_t*)value; /* dynamic (?) */ *sint_ptr = 3; 80335c8: 2303 movs r3, #3 80335ca: 6023 str r3, [r4, #0] } break; } } #endif /* LWIP_ARP */ } 80335cc: b005 add sp, #20 80335ce: bd30 pop {r4, r5, pc} 080335d0 : } } static void atentry_get_value(struct obj_def *od, u16_t len, void *value) { 80335d0: 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); 80335d2: 6883 ldr r3, [r0, #8] } } static void atentry_get_value(struct obj_def *od, u16_t len, void *value) { 80335d4: b085 sub sp, #20 80335d6: 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); 80335d8: a903 add r1, sp, #12 80335da: 6858 ldr r0, [r3, #4] } } static void atentry_get_value(struct obj_def *od, u16_t len, void *value) { 80335dc: 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); 80335de: f000 ff65 bl 80344ac snmp_oidtoip(&od->id_inst_ptr[2], &ip); 80335e2: 68a8 ldr r0, [r5, #8] 80335e4: a902 add r1, sp, #8 80335e6: 3008 adds r0, #8 80335e8: f000 ff7e bl 80344e8 #if LWIP_ARP /** @todo implement a netif_find_addr */ if (etharp_find_addr(netif, &ip, ðaddr_ret, &ipaddr_ret) > -1) 80335ec: 9803 ldr r0, [sp, #12] 80335ee: a902 add r1, sp, #8 80335f0: 466a mov r2, sp 80335f2: ab01 add r3, sp, #4 80335f4: f002 ffbc bl 8036570 80335f8: 2800 cmp r0, #0 80335fa: db12 blt.n 8033622 { LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 80335fc: 68aa ldr r2, [r5, #8] switch (id) 80335fe: 7813 ldrb r3, [r2, #0] 8033600: 2b02 cmp r3, #2 8033602: d005 beq.n 8033610 8033604: 2b03 cmp r3, #3 8033606: d009 beq.n 803361c 8033608: 2b01 cmp r3, #1 803360a: d10a bne.n 8033622 { case 1: /* atIfIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = od->id_inst_ptr[1]; 803360c: 6853 ldr r3, [r2, #4] 803360e: e007 b.n 8033620 break; case 2: /* atPhysAddress */ { struct eth_addr *dst = (struct eth_addr*)value; *dst = *ethaddr_ret; 8033610: 9b00 ldr r3, [sp, #0] 8033612: 681a ldr r2, [r3, #0] 8033614: 6022 str r2, [r4, #0] 8033616: 889b ldrh r3, [r3, #4] 8033618: 80a3 strh r3, [r4, #4] } break; 803361a: e002 b.n 8033622 case 3: /* atNetAddress */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = *ipaddr_ret; 803361c: 9b01 ldr r3, [sp, #4] 803361e: 681b ldr r3, [r3, #0] 8033620: 6023 str r3, [r4, #0] } break; } } #endif /* LWIP_ARP */ } 8033622: b005 add sp, #20 8033624: bd30 pop {r4, r5, pc} 8033626: 0000 movs r0, r0 08033628 : 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]; 8033628: 6883 ldr r3, [r0, #8] switch (id) 803362a: 781b ldrb r3, [r3, #0] 803362c: 2b05 cmp r3, #5 803362e: d007 beq.n 8033640 8033630: 2b06 cmp r3, #6 8033632: d00f beq.n 8033654 8033634: 2b04 cmp r3, #4 8033636: d111 bne.n 803365c { case 4: /* sysContact */ if ((syscontact_ptr != syscontact_default) && 8033638: 4b09 ldr r3, [pc, #36] ; (8033660 ) 803363a: 681a ldr r2, [r3, #0] 803363c: 4b09 ldr r3, [pc, #36] ; (8033664 ) 803363e: e002 b.n 8033646 { set_ok = 1; } break; case 5: /* sysName */ if ((sysname_ptr != sysname_default) && 8033640: 4b09 ldr r3, [pc, #36] ; (8033668 ) 8033642: 681a ldr r2, [r3, #0] 8033644: 4b09 ldr r3, [pc, #36] ; (803366c ) 8033646: 429a cmp r2, r3 8033648: d008 beq.n 803365c system_set_test(struct obj_def *od, u16_t len, void *value) { u8_t id, set_ok; LWIP_UNUSED_ARG(value); set_ok = 0; 803364a: 29ff cmp r1, #255 ; 0xff 803364c: bf8c ite hi 803364e: 2000 movhi r0, #0 8033650: 2001 movls r0, #1 8033652: 4770 bx lr { set_ok = 1; } break; case 6: /* sysLocation */ if ((syslocation_ptr != syslocation_default) && 8033654: 4b06 ldr r3, [pc, #24] ; (8033670 ) 8033656: 681a ldr r2, [r3, #0] 8033658: 4b06 ldr r3, [pc, #24] ; (8033674 ) 803365a: e7f4 b.n 8033646 system_set_test(struct obj_def *od, u16_t len, void *value) { u8_t id, set_ok; LWIP_UNUSED_ARG(value); set_ok = 0; 803365c: 2000 movs r0, #0 set_ok = 1; } break; }; return set_ok; } 803365e: 4770 bx lr 8033660: 20000914 .word 0x20000914 8033664: 080443e4 .word 0x080443e4 8033668: 200008a0 .word 0x200008a0 803366c: 080440fc .word 0x080440fc 8033670: 20000a2c .word 0x20000a2c 8033674: 0804412c .word 0x0804412c 08033678 : { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; if (ident_len == 6) 8033678: 2801 cmp r0, #1 803367a: d120 bne.n 80336be { od->id_inst_len = ident_len; 803367c: 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; 803367e: f1a1 0314 sub.w r3, r1, #20 if (ident_len == 6) { od->id_inst_len = ident_len; 8033682: 7190 strb r0, [r2, #6] od->id_inst_ptr = ident; 8033684: 6093 str r3, [r2, #8] switch (ident[0]) 8033686: f851 3c14 ldr.w r3, [r1, #-20] 803368a: 2b02 cmp r3, #2 803368c: d008 beq.n 80336a0 803368e: 2b03 cmp r3, #3 8033690: d00d beq.n 80336ae 8033692: 2b01 cmp r3, #1 8033694: d113 bne.n 80336be { case 1: /* atIfIndex */ od->instance = MIB_OBJECT_TAB; 8033696: 2302 movs r3, #2 od->access = MIB_OBJECT_READ_WRITE; 8033698: 2103 movs r1, #3 od->id_inst_ptr = ident; switch (ident[0]) { case 1: /* atIfIndex */ od->instance = MIB_OBJECT_TAB; 803369a: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 803369c: 7051 strb r1, [r2, #1] 803369e: e00a b.n 80336b6 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; 80336a0: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 80336a2: 2303 movs r3, #3 80336a4: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 80336a6: 2304 movs r3, #4 80336a8: 7093 strb r3, [r2, #2] od->v_len = 6; /** @todo try to use netif::hwaddr_len */ 80336aa: 8090 strh r0, [r2, #4] break; 80336ac: 4770 bx lr case 3: /* atNetAddress */ od->instance = MIB_OBJECT_TAB; 80336ae: 2102 movs r1, #2 od->access = MIB_OBJECT_READ_WRITE; 80336b0: 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; 80336b2: 7011 strb r1, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 80336b4: 2340 movs r3, #64 ; 0x40 80336b6: 7093 strb r3, [r2, #2] od->v_len = 4; 80336b8: 2304 movs r3, #4 80336ba: 8093 strh r3, [r2, #4] break; 80336bc: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("atentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 80336be: 2300 movs r3, #0 80336c0: 7013 strb r3, [r2, #0] 80336c2: 4770 bx lr 080336c4 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 80336c4: 2801 cmp r0, #1 #endif /* LWIP_ARP */ } static void ip_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { 80336c6: b510 push {r4, lr} u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 80336c8: d121 bne.n 803370e { od->id_inst_len = ident_len; 80336ca: 2402 movs r4, #2 { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 80336cc: 1f0b subs r3, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; 80336ce: 7194 strb r4, [r2, #6] od->id_inst_ptr = ident; 80336d0: 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) 80336d2: f811 3c04 ldrb.w r3, [r1, #-4] 80336d6: 2b17 cmp r3, #23 80336d8: d819 bhi.n 803370e 80336da: 490e ldr r1, [pc, #56] ; (8033714 ) 80336dc: 4099 lsls r1, r3 80336de: d40b bmi.n 80336f8 80336e0: f44f 2180 mov.w r1, #262144 ; 0x40000 80336e4: 4099 lsls r1, r3 80336e6: d40c bmi.n 8033702 80336e8: f04f 41c0 mov.w r1, #1610612736 ; 0x60000000 80336ec: 4099 lsls r1, r3 80336ee: d50e bpl.n 803370e { case 1: /* ipForwarding */ case 2: /* ipDefaultTTL */ od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_WRITE; 80336f0: 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; 80336f2: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 80336f4: 7053 strb r3, [r2, #1] 80336f6: e006 b.n 8033706 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); 80336f8: 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; 80336fa: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 80336fc: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 80336fe: 7093 strb r3, [r2, #2] 8033700: e002 b.n 8033708 od->v_len = sizeof(u32_t); break; case 13: /* ipReasmTimeout */ od->instance = MIB_OBJECT_SCALAR; 8033702: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033704: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 8033706: 7094 strb r4, [r2, #2] od->v_len = sizeof(s32_t); 8033708: 2304 movs r3, #4 803370a: 8093 strh r3, [r2, #4] break; 803370c: bd10 pop {r4, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 803370e: 2300 movs r3, #0 8033710: 7013 strb r3, [r2, #0] 8033712: bd10 pop {r4, pc} 8033714: 1ffbf100 .word 0x1ffbf100 08033718 : { /* return to object name, adding index depth (4) */ ident_len += 4; ident -= 4; if (ident_len == 5) 8033718: 2801 cmp r0, #1 803371a: d11c bne.n 8033756 { u8_t id; od->id_inst_len = ident_len; 803371c: 2305 movs r3, #5 803371e: 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; 8033720: 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; 8033724: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 8033726: f811 3c10 ldrb.w r3, [r1, #-16] 803372a: 2b05 cmp r3, #5 803372c: d813 bhi.n 8033756 803372e: f04f 5130 mov.w r1, #738197504 ; 0x2c000000 8033732: 4099 lsls r1, r3 8033734: d408 bmi.n 8033748 8033736: f04f 41a0 mov.w r1, #1342177280 ; 0x50000000 803373a: 4099 lsls r1, r3 803373c: d50b bpl.n 8033756 { case 1: /* ipAdEntAddr */ case 3: /* ipAdEntNetMask */ od->instance = MIB_OBJECT_TAB; 803373e: 2302 movs r3, #2 8033740: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033742: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 8033744: 2340 movs r3, #64 ; 0x40 8033746: e002 b.n 803374e od->v_len = 4; break; case 2: /* ipAdEntIfIndex */ case 4: /* ipAdEntBcastAddr */ case 5: /* ipAdEntReasmMaxSize */ od->instance = MIB_OBJECT_TAB; 8033748: 2302 movs r3, #2 803374a: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 803374c: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 803374e: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 8033750: 2304 movs r3, #4 8033752: 8093 strh r3, [r2, #4] break; 8033754: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_addrentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033756: 2300 movs r3, #0 8033758: 7013 strb r3, [r2, #0] 803375a: 4770 bx lr 0803375c : { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; if (ident_len == 6) 803375c: 2801 cmp r0, #1 803375e: d123 bne.n 80337a8 { u8_t id; od->id_inst_len = ident_len; 8033760: 2306 movs r3, #6 8033762: 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; 8033764: 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; 8033768: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 803376a: f811 3c14 ldrb.w r3, [r1, #-20] 803376e: 3b01 subs r3, #1 8033770: 2b03 cmp r3, #3 8033772: d819 bhi.n 80337a8 8033774: e8df f003 tbb [pc, r3] 8033778: 020f0702 .word 0x020f0702 { case 1: /* ipNetToMediaIfIndex */ case 4: /* ipNetToMediaType */ od->instance = MIB_OBJECT_TAB; 803377c: 2302 movs r3, #2 od->access = MIB_OBJECT_READ_WRITE; 803377e: 2103 movs r1, #3 id = (u8_t)ident[0]; switch (id) { case 1: /* ipNetToMediaIfIndex */ case 4: /* ipNetToMediaType */ od->instance = MIB_OBJECT_TAB; 8033780: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8033782: 7051 strb r1, [r2, #1] 8033784: e00c b.n 80337a0 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; 8033786: 2302 movs r3, #2 8033788: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 803378a: 2303 movs r3, #3 803378c: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 803378e: 2304 movs r3, #4 8033790: 7093 strb r3, [r2, #2] od->v_len = 6; /** @todo try to use netif::hwaddr_len */ 8033792: 2306 movs r3, #6 8033794: e006 b.n 80337a4 break; case 3: /* ipNetToMediaNetAddress */ od->instance = MIB_OBJECT_TAB; 8033796: 2302 movs r3, #2 8033798: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 803379a: 2303 movs r3, #3 803379c: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 803379e: 2340 movs r3, #64 ; 0x40 80337a0: 7093 strb r3, [r2, #2] od->v_len = 4; 80337a2: 2304 movs r3, #4 80337a4: 8093 strh r3, [r2, #4] break; 80337a6: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_ntomentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 80337a8: 2300 movs r3, #0 80337aa: 7013 strb r3, [r2, #0] 80337ac: 4770 bx lr 80337ae: 0000 movs r0, r0 080337b0 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 80337b0: 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) { 80337b2: b510 push {r4, lr} u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 80337b4: d121 bne.n 80337fa { od->id_inst_len = ident_len; 80337b6: 2402 movs r4, #2 { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 80337b8: 1f0b subs r3, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; 80337ba: 7194 strb r4, [r2, #6] od->id_inst_ptr = ident; 80337bc: 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) 80337be: f811 3c04 ldrb.w r3, [r1, #-4] 80337c2: 2b0f cmp r3, #15 80337c4: d819 bhi.n 80337fa 80337c6: 490e ldr r1, [pc, #56] ; (8033800 ) 80337c8: 4099 lsls r1, r3 80337ca: d40b bmi.n 80337e4 80337cc: f44f 0180 mov.w r1, #4194304 ; 0x400000 80337d0: 4099 lsls r1, r3 80337d2: d40b bmi.n 80337ec 80337d4: f04f 41f0 mov.w r1, #2013265920 ; 0x78000000 80337d8: 4099 lsls r1, r3 80337da: d50e bpl.n 80337fa { case 1: /* tcpRtoAlgorithm */ case 2: /* tcpRtoMin */ case 3: /* tcpRtoMax */ case 4: /* tcpMaxConn */ od->instance = MIB_OBJECT_SCALAR; 80337dc: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 80337de: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 80337e0: 7094 strb r4, [r2, #2] 80337e2: e007 b.n 80337f4 case 10: /* tcpInSegs */ case 11: /* tcpOutSegs */ case 12: /* tcpRetransSegs */ case 14: /* tcpInErrs */ case 15: /* tcpOutRsts */ od->instance = MIB_OBJECT_SCALAR; 80337e4: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 80337e6: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 80337e8: 2341 movs r3, #65 ; 0x41 80337ea: e002 b.n 80337f2 od->v_len = sizeof(u32_t); break; case 9: /* tcpCurrEstab */ od->instance = MIB_OBJECT_TAB; 80337ec: 7014 strb r4, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 80337ee: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_GAUGE); 80337f0: 2342 movs r3, #66 ; 0x42 80337f2: 7093 strb r3, [r2, #2] od->v_len = sizeof(u32_t); 80337f4: 2304 movs r3, #4 80337f6: 8093 strh r3, [r2, #4] break; 80337f8: bd10 pop {r4, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("tcp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 80337fa: 2300 movs r3, #0 80337fc: 7013 strb r3, [r2, #0] 80337fe: bd10 pop {r4, pc} 8033800: 07bb0000 .word 0x07bb0000 08033804 : { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; if (ident_len == 6) 8033804: 2801 cmp r0, #1 8033806: d116 bne.n 8033836 { od->id_inst_len = ident_len; 8033808: 2306 movs r3, #6 803380a: 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; 803380c: f1a1 0314 sub.w r3, r1, #20 if (ident_len == 6) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8033810: 6093 str r3, [r2, #8] switch (ident[0]) 8033812: f851 3c14 ldr.w r3, [r1, #-20] 8033816: 2b01 cmp r3, #1 8033818: d002 beq.n 8033820 803381a: 2b02 cmp r3, #2 803381c: d10b bne.n 8033836 803381e: e004 b.n 803382a { case 1: /* udpLocalAddress */ od->instance = MIB_OBJECT_TAB; 8033820: 2102 movs r1, #2 od->access = MIB_OBJECT_READ_ONLY; 8033822: 7053 strb r3, [r2, #1] od->id_inst_ptr = ident; switch (ident[0]) { case 1: /* udpLocalAddress */ od->instance = MIB_OBJECT_TAB; 8033824: 7011 strb r1, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 8033826: 2340 movs r3, #64 ; 0x40 8033828: e001 b.n 803382e od->v_len = 4; break; case 2: /* udpLocalPort */ od->instance = MIB_OBJECT_TAB; 803382a: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 803382c: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 803382e: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 8033830: 2304 movs r3, #4 8033832: 8093 strh r3, [r2, #4] break; 8033834: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("udpentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033836: 2300 movs r3, #0 8033838: 7013 strb r3, [r2, #0] 803383a: 4770 bx lr 0803383c : 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) 803383c: 2801 cmp r0, #1 } } static void snmp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { 803383e: b510 push {r4, lr} /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8033840: d119 bne.n 8033876 { u8_t id; od->id_inst_len = ident_len; 8033842: 2302 movs r3, #2 8033844: 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; 8033846: 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) 8033848: 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; 803384c: 6094 str r4, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 803384e: 291e cmp r1, #30 8033850: d811 bhi.n 8033876 8033852: 4c0a ldr r4, [pc, #40] ; (803387c ) 8033854: 408c lsls r4, r1 8033856: d403 bmi.n 8033860 8033858: fa13 f101 lsls.w r1, r3, r1 803385c: d404 bmi.n 8033868 803385e: e00a b.n 8033876 case 25: /* snmpOutGetRequests */ case 26: /* snmpOutGetNexts */ case 27: /* snmpOutSetRequests */ case 28: /* snmpOutGetResponses */ case 29: /* snmpOutTraps */ od->instance = MIB_OBJECT_SCALAR; 8033860: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033862: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 8033864: 2341 movs r3, #65 ; 0x41 8033866: e002 b.n 803386e od->v_len = sizeof(u32_t); break; case 30: /* snmpEnableAuthenTraps */ od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_WRITE; 8033868: 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; 803386a: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 803386c: 7051 strb r1, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 803386e: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 8033870: 2304 movs r3, #4 8033872: 8093 strh r3, [r2, #4] break; 8033874: bd10 pop {r4, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("snmp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033876: 2300 movs r3, #0 8033878: 7013 strb r3, [r2, #0] 803387a: bd10 pop {r4, pc} 803387c: 7efffefc .word 0x7efffefc 08033880 : 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]; 8033880: 6883 ldr r3, [r0, #8] if (id == 30) 8033882: 781b ldrb r3, [r3, #0] 8033884: 2b1e cmp r3, #30 8033886: d10f bne.n 80338a8 { /* snmpEnableAuthenTraps */ s32_t *sint_ptr = (s32_t*)value; if (snmpenableauthentraps_ptr != &snmpenableauthentraps_default) 8033888: 4b08 ldr r3, [pc, #32] ; (80338ac ) 803388a: 6810 ldr r0, [r2, #0] 803388c: 6819 ldr r1, [r3, #0] 803388e: 4b08 ldr r3, [pc, #32] ; (80338b0 ) 8033890: 4299 cmp r1, r3 8033892: d005 beq.n 80338a0 { /* we should have writable non-volatile mem here */ if ((*sint_ptr == 1) || (*sint_ptr == 2)) 8033894: 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; 8033896: 2801 cmp r0, #1 8033898: bf8c ite hi 803389a: 2000 movhi r0, #0 803389c: 2001 movls r0, #1 803389e: 4770 bx lr 80338a0: 1e83 subs r3, r0, #2 80338a2: 4258 negs r0, r3 80338a4: 4158 adcs r0, r3 80338a6: 4770 bx lr 80338a8: 2000 movs r0, #0 set_ok = 1; } } } return set_ok; } 80338aa: 4770 bx lr 80338ac: 20000898 .word 0x20000898 80338b0: 080441e0 .word 0x080441e0 080338b4 : * @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) { 80338b4: b510 push {r4, lr} u16_t i = n; while (i > 0) { 80338b6: 2300 movs r3, #0 80338b8: e002 b.n 80338c0 i--; *dst++ = *src++; 80338ba: 5ccc ldrb r4, [r1, r3] 80338bc: 54c4 strb r4, [r0, r3] 80338be: 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) { 80338c0: b29c uxth r4, r3 80338c2: 42a2 cmp r2, r4 80338c4: d1f9 bne.n 80338ba i--; *dst++ = *src++; } } 80338c6: bd10 pop {r4, pc} 080338c8 : { 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]; 80338c8: 6883 ldr r3, [r0, #8] switch (id) 80338ca: 781b ldrb r3, [r3, #0] 80338cc: 2b05 cmp r3, #5 return set_ok; } static void system_set_value(struct obj_def *od, u16_t len, void *value) { 80338ce: b510 push {r4, lr} 80338d0: 460c mov r4, r1 80338d2: 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) 80338d4: d00a beq.n 80338ec 80338d6: 2b06 cmp r3, #6 80338d8: d00f beq.n 80338fa 80338da: 2b04 cmp r3, #4 80338dc: d115 bne.n 803390a { case 4: /* sysContact */ ocstrncpy(syscontact_ptr, (u8_t*)value, len); 80338de: 4b0b ldr r3, [pc, #44] ; (803390c ) 80338e0: 4622 mov r2, r4 80338e2: 6818 ldr r0, [r3, #0] 80338e4: f7ff ffe6 bl 80338b4 *syscontact_len_ptr = (u8_t)len; 80338e8: 4b09 ldr r3, [pc, #36] ; (8033910 ) 80338ea: e00c b.n 8033906 break; case 5: /* sysName */ ocstrncpy(sysname_ptr, (u8_t*)value, len); 80338ec: 4b09 ldr r3, [pc, #36] ; (8033914 ) 80338ee: 4622 mov r2, r4 80338f0: 6818 ldr r0, [r3, #0] 80338f2: f7ff ffdf bl 80338b4 *sysname_len_ptr = (u8_t)len; 80338f6: 4b08 ldr r3, [pc, #32] ; (8033918 ) 80338f8: e005 b.n 8033906 break; case 6: /* sysLocation */ ocstrncpy(syslocation_ptr, (u8_t*)value, len); 80338fa: 4b08 ldr r3, [pc, #32] ; (803391c ) 80338fc: 4622 mov r2, r4 80338fe: 6818 ldr r0, [r3, #0] 8033900: f7ff ffd8 bl 80338b4 *syslocation_len_ptr = (u8_t)len; 8033904: 4b06 ldr r3, [pc, #24] ; (8033920 ) 8033906: 681b ldr r3, [r3, #0] 8033908: 701c strb r4, [r3, #0] 803390a: bd10 pop {r4, pc} 803390c: 20000914 .word 0x20000914 8033910: 20000798 .word 0x20000798 8033914: 200008a0 .word 0x200008a0 8033918: 20000794 .word 0x20000794 803391c: 20000a2c .word 0x20000a2c 8033920: 20000980 .word 0x20000980 08033924 : * * @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) 8033924: 3904 subs r1, #4 { u8_t i = n; while(i > 0) { 8033926: e005 b.n 8033934 i--; *dst++ = *src++; 8033928: 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--; 803392c: 3a01 subs r2, #1 *dst++ = *src++; 803392e: 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--; 8033932: 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) { 8033934: 2a00 cmp r2, #0 8033936: d1f7 bne.n 8033928 i--; *dst++ = *src++; } } 8033938: 4770 bx lr 803393a: 0000 movs r0, r0 0803393c : * @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) { 803393c: b573 push {r0, r1, r4, r5, r6, lr} struct netif *netif; u8_t id; snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 803393e: 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) { 8033940: 4606 mov r6, r0 8033942: 460d mov r5, r1 struct netif *netif; u8_t id; snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 8033944: 6858 ldr r0, [r3, #4] 8033946: 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) { 8033948: 4614 mov r4, r2 struct netif *netif; u8_t id; snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 803394a: f000 fdaf bl 80344ac LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 803394e: 68b3 ldr r3, [r6, #8] switch (id) 8033950: 781a ldrb r2, [r3, #0] 8033952: 3a01 subs r2, #1 8033954: 2a15 cmp r2, #21 8033956: d85c bhi.n 8033a12 8033958: e8df f002 tbb [pc, r2] 803395c: 15110d0b .word 0x15110d0b 8033960: 2e221b18 .word 0x2e221b18 8033964: 403d3a37 .word 0x403d3a37 8033968: 46525243 .word 0x46525243 803396c: 524f4c49 .word 0x524f4c49 8033970: 5552 .short 0x5552 { case 1: /* ifIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = od->id_inst_ptr[1]; 8033972: 685b ldr r3, [r3, #4] 8033974: e045 b.n 8033a02 } break; case 2: /* ifDescr */ ocstrncpy((u8_t*)value, (u8_t*)netif->name, len); 8033976: 9901 ldr r1, [sp, #4] 8033978: 4620 mov r0, r4 803397a: 312e adds r1, #46 ; 0x2e 803397c: e00c b.n 8033998 break; case 3: /* ifType */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = netif->link_type; 803397e: 9b01 ldr r3, [sp, #4] 8033980: f893 3031 ldrb.w r3, [r3, #49] ; 0x31 8033984: e03d b.n 8033a02 } break; case 4: /* ifMtu */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = netif->mtu; 8033986: 9b01 ldr r3, [sp, #4] 8033988: 8c9b ldrh r3, [r3, #36] ; 0x24 803398a: e03a b.n 8033a02 } break; case 5: /* ifSpeed */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->link_speed; 803398c: 9b01 ldr r3, [sp, #4] 803398e: 6b5b ldr r3, [r3, #52] ; 0x34 8033990: e037 b.n 8033a02 } break; case 6: /* ifPhysAddress */ ocstrncpy((u8_t*)value, netif->hwaddr, len); 8033992: 9901 ldr r1, [sp, #4] 8033994: 4620 mov r0, r4 8033996: 3127 adds r1, #39 ; 0x27 8033998: 462a mov r2, r5 803399a: f7ff ff8b bl 80338b4 break; 803399e: e038 b.n 8033a12 case 7: /* ifAdminStatus */ { s32_t *sint_ptr = (s32_t*)value; if (netif_is_up(netif)) 80339a0: 9b01 ldr r3, [sp, #4] 80339a2: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 80339a6: 07d9 lsls r1, r3, #31 80339a8: d50d bpl.n 80339c6 { if (netif_is_link_up(netif)) 80339aa: f003 0310 and.w r3, r3, #16 80339ae: b2db uxtb r3, r3 80339b0: b103 cbz r3, 80339b4 80339b2: e006 b.n 80339c2 { *sint_ptr = 1; /* up */ } else { *sint_ptr = 7; /* lowerLayerDown */ 80339b4: 2307 movs r3, #7 80339b6: e024 b.n 8033a02 } break; case 8: /* ifOperStatus */ { s32_t *sint_ptr = (s32_t*)value; if (netif_is_up(netif)) 80339b8: 9b01 ldr r3, [sp, #4] 80339ba: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 80339be: 07da lsls r2, r3, #31 80339c0: d501 bpl.n 80339c6 { *sint_ptr = 1; 80339c2: 2301 movs r3, #1 80339c4: e01d b.n 8033a02 } else { *sint_ptr = 2; 80339c6: 2302 movs r3, #2 80339c8: e01b b.n 8033a02 } break; case 9: /* ifLastChange */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ts; 80339ca: 9b01 ldr r3, [sp, #4] 80339cc: 6b9b ldr r3, [r3, #56] ; 0x38 80339ce: e018 b.n 8033a02 } break; case 10: /* ifInOctets */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifinoctets; 80339d0: 9b01 ldr r3, [sp, #4] 80339d2: 6bdb ldr r3, [r3, #60] ; 0x3c 80339d4: e015 b.n 8033a02 } break; case 11: /* ifInUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifinucastpkts; 80339d6: 9b01 ldr r3, [sp, #4] 80339d8: 6c1b ldr r3, [r3, #64] ; 0x40 80339da: e012 b.n 8033a02 } break; case 12: /* ifInNUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifinnucastpkts; 80339dc: 9b01 ldr r3, [sp, #4] 80339de: 6c5b ldr r3, [r3, #68] ; 0x44 80339e0: e00f b.n 8033a02 } break; case 13: /* ifInDiscarts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifindiscards; 80339e2: 9b01 ldr r3, [sp, #4] 80339e4: 6c9b ldr r3, [r3, #72] ; 0x48 80339e6: e00c b.n 8033a02 } break; case 16: /* ifOutOctets */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutoctets; 80339e8: 9b01 ldr r3, [sp, #4] 80339ea: 6cdb ldr r3, [r3, #76] ; 0x4c 80339ec: e009 b.n 8033a02 } break; case 17: /* ifOutUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutucastpkts; 80339ee: 9b01 ldr r3, [sp, #4] 80339f0: 6d1b ldr r3, [r3, #80] ; 0x50 80339f2: e006 b.n 8033a02 } break; case 18: /* ifOutNUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutnucastpkts; 80339f4: 9b01 ldr r3, [sp, #4] 80339f6: 6d5b ldr r3, [r3, #84] ; 0x54 80339f8: e003 b.n 8033a02 } break; case 19: /* ifOutDiscarts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutdiscards; 80339fa: 9b01 ldr r3, [sp, #4] 80339fc: 6d9b ldr r3, [r3, #88] ; 0x58 80339fe: e000 b.n 8033a02 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; 8033a00: 2300 movs r3, #0 8033a02: 6023 str r3, [r4, #0] } break; 8033a04: e005 b.n 8033a12 case 22: /* ifSpecific */ objectidncpy((s32_t*)value, (s32_t*)ifspecific.id, (u8_t)(len / sizeof(s32_t))); 8033a06: 4620 mov r0, r4 8033a08: 4902 ldr r1, [pc, #8] ; (8033a14 ) 8033a0a: f3c5 0287 ubfx r2, r5, #2, #8 8033a0e: f7ff ff89 bl 8033924 break; }; } 8033a12: bd7c pop {r2, r3, r4, r5, r6, pc} 8033a14: 08044268 .word 0x08044268 08033a18 : } } static void ip_rteentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033a18: 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; 8033a1a: 6885 ldr r5, [r0, #8] } } static void ip_rteentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033a1c: 460f mov r7, r1 ip_addr_t dest; s32_t *ident; u8_t id; ident = od->id_inst_ptr; snmp_oidtoip(&ident[1], &dest); 8033a1e: 1d28 adds r0, r5, #4 8033a20: a901 add r1, sp, #4 } } static void ip_rteentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033a22: 4614 mov r4, r2 ip_addr_t dest; s32_t *ident; u8_t id; ident = od->id_inst_ptr; snmp_oidtoip(&ident[1], &dest); 8033a24: f000 fd60 bl 80344e8 if (ip_addr_isany(&dest)) 8033a28: 9b01 ldr r3, [sp, #4] 8033a2a: b91b cbnz r3, 8033a34 { /* ip_route() uses default netif for default route */ netif = netif_default; 8033a2c: 4a23 ldr r2, [pc, #140] ; (8033abc ) 8033a2e: 6810 ldr r0, [r2, #0] !ip_addr_netcmp(&dest, &(netif->ip_addr), &(netif->netmask)) ) { netif = netif->next; } } if (netif != NULL) 8033a30: b960 cbnz r0, 8033a4c 8033a32: e041 b.n 8033ab8 netif = netif_default; } else { /* not using ip_route(), need exact match! */ netif = netif_list; 8033a34: 4a22 ldr r2, [pc, #136] ; (8033ac0 ) 8033a36: 6810 ldr r0, [r2, #0] while ((netif != NULL) && 8033a38: e000 b.n 8033a3c !ip_addr_netcmp(&dest, &(netif->ip_addr), &(netif->netmask)) ) { netif = netif->next; 8033a3a: 6800 ldr r0, [r0, #0] } else { /* not using ip_route(), need exact match! */ netif = netif_list; while ((netif != NULL) && 8033a3c: 2800 cmp r0, #0 8033a3e: d03b beq.n 8033ab8 !ip_addr_netcmp(&dest, &(netif->ip_addr), &(netif->netmask)) ) 8033a40: 6846 ldr r6, [r0, #4] 8033a42: ea83 0206 eor.w r2, r3, r6 8033a46: 6886 ldr r6, [r0, #8] } else { /* not using ip_route(), need exact match! */ netif = netif_list; while ((netif != NULL) && 8033a48: 4232 tst r2, r6 8033a4a: d1f6 bne.n 8033a3a } if (netif != NULL) { LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 8033a4c: 782d ldrb r5, [r5, #0] 8033a4e: 3d01 subs r5, #1 8033a50: 2d0c cmp r5, #12 8033a52: d831 bhi.n 8033ab8 8033a54: e8df f005 tbb [pc, r5] 8033a58: 14110d07 .word 0x14110d07 8033a5c: 1c171414 .word 0x1c171414 8033a60: 14252321 .word 0x14252321 8033a64: 2a .byte 0x2a 8033a65: 00 .byte 0x00 { case 1: /* ipRouteDest */ { ip_addr_t *dst = (ip_addr_t*)value; if (ip_addr_isany(&dest)) 8033a66: b903 cbnz r3, 8033a6a 8033a68: e01e b.n 8033aa8 ip_addr_set_zero(dst); } else { /* netifs have netaddress dest */ ip_addr_get_network(dst, &netif->ip_addr, &netif->netmask); 8033a6a: 6882 ldr r2, [r0, #8] 8033a6c: 6843 ldr r3, [r0, #4] 8033a6e: 4013 ands r3, r2 8033a70: e01a b.n 8033aa8 break; case 2: /* ipRouteIfIndex */ { s32_t *sint_ptr = (s32_t*)value; snmp_netiftoifindex(netif, sint_ptr); 8033a72: 4621 mov r1, r4 8033a74: f000 fd28 bl 80344c8 } break; 8033a78: e01e b.n 8033ab8 case 3: /* ipRouteMetric1 */ { s32_t *sint_ptr = (s32_t*)value; if (ip_addr_isany(&dest)) 8033a7a: b983 cbnz r3, 8033a9e { /* default rte has metric 1 */ *sint_ptr = 1; 8033a7c: 2301 movs r3, #1 8033a7e: e013 b.n 8033aa8 case 6: /* ipRouteMetric4 */ case 12: /* ipRouteMetric5 */ { s32_t *sint_ptr = (s32_t*)value; /* not used */ *sint_ptr = -1; 8033a80: f04f 33ff mov.w r3, #4294967295 8033a84: e010 b.n 8033aa8 break; case 7: /* ipRouteNextHop */ { ip_addr_t *dst = (ip_addr_t*)value; if (ip_addr_isany(&dest)) 8033a86: b90b cbnz r3, 8033a8c { /* default rte: gateway */ *dst = netif->gw; 8033a88: 68c3 ldr r3, [r0, #12] 8033a8a: e00d b.n 8033aa8 } else { /* other rtes: netif ip_addr */ *dst = netif->ip_addr; 8033a8c: 6843 ldr r3, [r0, #4] 8033a8e: e00b b.n 8033aa8 break; case 8: /* ipRouteType */ { s32_t *sint_ptr = (s32_t*)value; if (ip_addr_isany(&dest)) 8033a90: b90b cbnz r3, 8033a96 { /* default rte is indirect */ *sint_ptr = 4; 8033a92: 2304 movs r3, #4 8033a94: e008 b.n 8033aa8 } else { /* other rtes are direct */ *sint_ptr = 3; 8033a96: 2303 movs r3, #3 8033a98: e006 b.n 8033aa8 break; case 9: /* ipRouteProto */ { s32_t *sint_ptr = (s32_t*)value; /* locally defined routes */ *sint_ptr = 2; 8033a9a: 2302 movs r3, #2 8033a9c: e004 b.n 8033aa8 case 10: /* ipRouteAge */ { s32_t *sint_ptr = (s32_t*)value; /** @todo (sysuptime - timestamp last change) / 100 @see snmp_insert_iprteidx_tree() */ *sint_ptr = 0; 8033a9e: 2300 movs r3, #0 8033aa0: e002 b.n 8033aa8 break; case 11: /* ipRouteMask */ { ip_addr_t *dst = (ip_addr_t*)value; if (ip_addr_isany(&dest)) 8033aa2: b903 cbnz r3, 8033aa6 8033aa4: e000 b.n 8033aa8 ip_addr_set_zero(dst); } else { /* other rtes use netmask */ *dst = netif->netmask; 8033aa6: 6883 ldr r3, [r0, #8] 8033aa8: 6023 str r3, [r4, #0] 8033aaa: e005 b.n 8033ab8 } } break; case 13: /* ipRouteInfo */ objectidncpy((s32_t*)value, (s32_t*)iprouteinfo.id, (u8_t)(len / sizeof(s32_t))); 8033aac: 4620 mov r0, r4 8033aae: 4905 ldr r1, [pc, #20] ; (8033ac4 ) 8033ab0: f3c7 0287 ubfx r2, r7, #2, #8 8033ab4: f7ff ff36 bl 8033924 break; } } } 8033ab8: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 8033aba: bf00 nop 8033abc: 2000f6a4 .word 0x2000f6a4 8033ac0: 2000f6a0 .word 0x2000f6a0 8033ac4: 0804407c .word 0x0804407c 08033ac8 : * @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) 8033ac8: b118 cbz r0, 8033ad2 { sysdescr_ptr = str; 8033aca: 4b02 ldr r3, [pc, #8] ; (8033ad4 ) 8033acc: 6018 str r0, [r3, #0] sysdescr_len_ptr = len; 8033ace: 4b02 ldr r3, [pc, #8] ; (8033ad8 ) 8033ad0: 6019 str r1, [r3, #0] 8033ad2: 4770 bx lr 8033ad4: 200008c0 .word 0x200008c0 8033ad8: 2000093c .word 0x2000093c 08033adc : * Initializes sysObjectID value. * * @param oid points to stuct snmp_obj_id to copy */ void snmp_set_sysobjid(struct snmp_obj_id *oid) { 8033adc: 4601 mov r1, r0 8033ade: b508 push {r3, lr} sysobjid = *oid; 8033ae0: 2284 movs r2, #132 ; 0x84 8033ae2: 4802 ldr r0, [pc, #8] ; (8033aec ) 8033ae4: f7ee f8a2 bl 8021c2c 8033ae8: bd08 pop {r3, pc} 8033aea: bf00 nop 8033aec: 200007ec .word 0x200007ec 08033af0 : * 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++; 8033af0: 4b02 ldr r3, [pc, #8] ; (8033afc ) 8033af2: 681a ldr r2, [r3, #0] 8033af4: 3201 adds r2, #1 8033af6: 601a str r2, [r3, #0] 8033af8: 4770 bx lr 8033afa: bf00 nop 8033afc: 2000c504 .word 0x2000c504 08033b00 : { sysuptime+=value; } void snmp_get_sysuptime(u32_t *value) { 8033b00: b510 push {r4, lr} 8033b02: 4604 mov r4, r0 SNMP_GET_SYSUPTIME(sysuptime); 8033b04: f003 f983 bl 8036e0e 8033b08: 230a movs r3, #10 8033b0a: 4a03 ldr r2, [pc, #12] ; (8033b18 ) 8033b0c: fbb0 f0f3 udiv r0, r0, r3 8033b10: 6010 str r0, [r2, #0] *value = sysuptime; 8033b12: 6020 str r0, [r4, #0] 8033b14: bd10 pop {r4, pc} 8033b16: bf00 nop 8033b18: 2000c504 .word 0x2000c504 08033b1c : * @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) { 8033b1c: 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]; 8033b1e: 6882 ldr r2, [r0, #8] switch (id) 8033b20: 7812 ldrb r2, [r2, #0] 8033b22: 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) { 8033b24: b510 push {r4, lr} 8033b26: 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) 8033b28: 2a06 cmp r2, #6 8033b2a: d825 bhi.n 8033b78 8033b2c: e8df f002 tbb [pc, r2] 8033b30: 140f0704 .word 0x140f0704 8033b34: 1a17 .short 0x1a17 8033b36: 22 .byte 0x22 8033b37: 00 .byte 0x00 { case 1: /* sysDescr */ ocstrncpy((u8_t*)value, sysdescr_ptr, len); 8033b38: 4618 mov r0, r3 8033b3a: 4b10 ldr r3, [pc, #64] ; (8033b7c ) 8033b3c: e014 b.n 8033b68 break; case 2: /* sysObjectID */ objectidncpy((s32_t*)value, (s32_t*)sysobjid.id, (u8_t)(len / sizeof(s32_t))); 8033b3e: 4910 ldr r1, [pc, #64] ; (8033b80 ) 8033b40: 4618 mov r0, r3 8033b42: f3c4 0287 ubfx r2, r4, #2, #8 s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; } break; }; } 8033b46: 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))); 8033b4a: f7ff beeb b.w 8033924 break; case 3: /* sysUpTime */ { snmp_get_sysuptime((u32_t*)value); 8033b4e: 4618 mov r0, r3 s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; } break; }; } 8033b50: 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); 8033b54: f7ff bfd4 b.w 8033b00 } break; case 4: /* sysContact */ ocstrncpy((u8_t*)value, syscontact_ptr, len); 8033b58: 4618 mov r0, r3 8033b5a: 4b0a ldr r3, [pc, #40] ; (8033b84 ) 8033b5c: e004 b.n 8033b68 break; case 5: /* sysName */ ocstrncpy((u8_t*)value, sysname_ptr, len); 8033b5e: 4618 mov r0, r3 8033b60: 4b09 ldr r3, [pc, #36] ; (8033b88 ) 8033b62: e001 b.n 8033b68 break; case 6: /* sysLocation */ ocstrncpy((u8_t*)value, syslocation_ptr, len); 8033b64: 4618 mov r0, r3 8033b66: 4b09 ldr r3, [pc, #36] ; (8033b8c ) 8033b68: 6819 ldr r1, [r3, #0] 8033b6a: 4622 mov r2, r4 s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; } break; }; } 8033b6c: 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); 8033b70: f7ff bea0 b.w 80338b4 break; case 7: /* sysServices */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; 8033b74: 2248 movs r2, #72 ; 0x48 8033b76: 601a str r2, [r3, #0] 8033b78: bd10 pop {r4, pc} 8033b7a: bf00 nop 8033b7c: 200008c0 .word 0x200008c0 8033b80: 200007f0 .word 0x200007f0 8033b84: 20000914 .word 0x20000914 8033b88: 200008a0 .word 0x200008a0 8033b8c: 20000a2c .word 0x20000a2c 08033b90 : * @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) 8033b90: b118 cbz r0, 8033b9a { syscontact_ptr = ocstr; 8033b92: 4b02 ldr r3, [pc, #8] ; (8033b9c ) 8033b94: 6018 str r0, [r3, #0] syscontact_len_ptr = ocstrlen; 8033b96: 4b02 ldr r3, [pc, #8] ; (8033ba0 ) 8033b98: 6019 str r1, [r3, #0] 8033b9a: 4770 bx lr 8033b9c: 20000914 .word 0x20000914 8033ba0: 20000798 .word 0x20000798 08033ba4 : * @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) 8033ba4: b118 cbz r0, 8033bae { sysname_ptr = ocstr; 8033ba6: 4b02 ldr r3, [pc, #8] ; (8033bb0 ) 8033ba8: 6018 str r0, [r3, #0] sysname_len_ptr = ocstrlen; 8033baa: 4b02 ldr r3, [pc, #8] ; (8033bb4 ) 8033bac: 6019 str r1, [r3, #0] 8033bae: 4770 bx lr 8033bb0: 200008a0 .word 0x200008a0 8033bb4: 20000794 .word 0x20000794 08033bb8 : * @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) 8033bb8: b118 cbz r0, 8033bc2 { syslocation_ptr = ocstr; 8033bba: 4b02 ldr r3, [pc, #8] ; (8033bc4 ) 8033bbc: 6018 str r0, [r3, #0] syslocation_len_ptr = ocstrlen; 8033bbe: 4b02 ldr r3, [pc, #8] ; (8033bc8 ) 8033bc0: 6019 str r1, [r3, #0] 8033bc2: 4770 bx lr 8033bc4: 20000a2c .word 0x20000a2c 8033bc8: 20000980 .word 0x20000980 08033bcc : { (ni->ifoutdiscards)++; } void snmp_inc_iflist(void) { 8033bcc: 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); 8033bce: 4806 ldr r0, [pc, #24] ; (8033be8 ) (ni->ifoutdiscards)++; } void snmp_inc_iflist(void) { struct mib_list_node *if_node = NULL; 8033bd0: aa02 add r2, sp, #8 snmp_mib_node_insert(&iflist_root, iflist_root.count + 1, &if_node); 8033bd2: 8b81 ldrh r1, [r0, #28] (ni->ifoutdiscards)++; } void snmp_inc_iflist(void) { struct mib_list_node *if_node = NULL; 8033bd4: 2300 movs r3, #0 8033bd6: f842 3d04 str.w r3, [r2, #-4]! snmp_mib_node_insert(&iflist_root, iflist_root.count + 1, &if_node); 8033bda: 3101 adds r1, #1 8033bdc: f000 fccc bl 8034578 /* enable getnext traversal on filled table */ iftable.maxlength = 1; 8033be0: 4b02 ldr r3, [pc, #8] ; (8033bec ) 8033be2: 2201 movs r2, #1 8033be4: 825a strh r2, [r3, #18] } 8033be6: bd0e pop {r1, r2, r3, pc} 8033be8: 200007cc .word 0x200007cc 8033bec: 20000944 .word 0x20000944 08033bf0 : /** * 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) { 8033bf0: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8033bf4: b086 sub sp, #24 8033bf6: 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]); 8033bf8: a901 add r1, sp, #4 8033bfa: f000 fc65 bl 80344c8 snmp_iptooid(ip, &arpidx[1]); 8033bfe: 4620 mov r0, r4 8033c00: a902 add r1, sp, #8 8033c02: f000 fc7e bl 8034502 for (tree = 0; tree < 2; tree++) { if (tree == 0) { at_rn = &arptree_root; 8033c06: f8df 80a0 ldr.w r8, [pc, #160] ; 8033ca8 LWIP_ASSERT("ni != NULL", ni != NULL); snmp_netiftoifindex(ni, &arpidx[0]); snmp_iptooid(ip, &arpidx[1]); for (tree = 0; tree < 2; tree++) 8033c0a: 2500 movs r5, #0 { if (tree == 0) { at_rn = &arptree_root; 8033c0c: 4c1f ldr r4, [pc, #124] ; (8033c8c ) 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; 8033c0e: f8df 909c ldr.w r9, [pc, #156] ; 8033cac at_rn->set_value = noleafs_set_value; 8033c12: f8df a09c ldr.w sl, [pc, #156] ; 8033cb0 for (tree = 0; tree < 2; tree++) { if (tree == 0) { at_rn = &arptree_root; 8033c16: 2d00 cmp r5, #0 8033c18: bf18 it ne 8033c1a: 4644 movne r4, r8 } else { at_rn = &ipntomtree_root; 8033c1c: 2600 movs r6, #0 } for (level = 0; level < 5; level++) { at_node = NULL; 8033c1e: 2300 movs r3, #0 8033c20: 9300 str r3, [sp, #0] snmp_mib_node_insert(at_rn, arpidx[level], &at_node); 8033c22: ab01 add r3, sp, #4 8033c24: 4620 mov r0, r4 8033c26: f853 1026 ldr.w r1, [r3, r6, lsl #2] 8033c2a: aa00 add r2, sp, #0 8033c2c: b2f7 uxtb r7, r6 8033c2e: f000 fca3 bl 8034578 if ((level != 4) && (at_node != NULL)) 8033c32: 2f04 cmp r7, #4 8033c34: d01d beq.n 8033c72 8033c36: 9b00 ldr r3, [sp, #0] 8033c38: b1db cbz r3, 8033c72 { if (at_node->nptr == NULL) 8033c3a: 68dc ldr r4, [r3, #12] 8033c3c: b9cc cbnz r4, 8033c72 { at_rn = snmp_mib_lrn_alloc(); 8033c3e: f000 fc79 bl 8034534 at_node->nptr = (struct mib_node*)at_rn; 8033c42: 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(); 8033c44: 4604 mov r4, r0 at_node->nptr = (struct mib_node*)at_rn; 8033c46: 60d8 str r0, [r3, #12] if (at_rn != NULL) 8033c48: b920 cbnz r0, 8033c54 LWIP_ASSERT("ni != NULL", ni != NULL); snmp_netiftoifindex(ni, &arpidx[0]); snmp_iptooid(ip, &arpidx[1]); for (tree = 0; tree < 2; tree++) 8033c4a: 3501 adds r5, #1 8033c4c: b2ed uxtb r5, r5 8033c4e: 2d02 cmp r5, #2 8033c50: d1dc bne.n 8033c0c 8033c52: e012 b.n 8033c7a { at_rn = snmp_mib_lrn_alloc(); at_node->nptr = (struct mib_node*)at_rn; if (at_rn != NULL) { if (level == 3) 8033c54: 2f03 cmp r7, #3 8033c56: d10c bne.n 8033c72 { if (tree == 0) 8033c58: b91d cbnz r5, 8033c62 { at_rn->get_object_def = atentry_get_object_def; 8033c5a: 4b0d ldr r3, [pc, #52] ; (8033c90 ) 8033c5c: 6003 str r3, [r0, #0] at_rn->get_value = atentry_get_value; 8033c5e: 4b0d ldr r3, [pc, #52] ; (8033c94 ) 8033c60: e002 b.n 8033c68 } else { at_rn->get_object_def = ip_ntomentry_get_object_def; 8033c62: 4b0d ldr r3, [pc, #52] ; (8033c98 ) 8033c64: 6003 str r3, [r0, #0] at_rn->get_value = ip_ntomentry_get_value; 8033c66: 4b0d ldr r3, [pc, #52] ; (8033c9c ) 8033c68: 6063 str r3, [r4, #4] } at_rn->set_test = noleafs_set_test; 8033c6a: f8c4 9008 str.w r9, [r4, #8] at_rn->set_value = noleafs_set_value; 8033c6e: f8c4 a00c str.w sl, [r4, #12] 8033c72: 3601 adds r6, #1 } else { at_rn = &ipntomtree_root; } for (level = 0; level < 5; level++) 8033c74: 2e05 cmp r6, #5 8033c76: d1d2 bne.n 8033c1e 8033c78: e7e7 b.n 8033c4a } } } } /* enable getnext traversal on filled tables */ at.maxlength = 1; 8033c7a: 4a09 ldr r2, [pc, #36] ; (8033ca0 ) 8033c7c: 2301 movs r3, #1 8033c7e: 8253 strh r3, [r2, #18] ipntomtable.maxlength = 1; 8033c80: 4a08 ldr r2, [pc, #32] ; (8033ca4 ) 8033c82: 8253 strh r3, [r2, #18] } 8033c84: b006 add sp, #24 8033c86: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 8033c8a: bf00 nop 8033c8c: 20000918 .word 0x20000918 8033c90: 08033679 .word 0x08033679 8033c94: 080335d1 .word 0x080335d1 8033c98: 0803375d .word 0x0803375d 8033c9c: 08033575 .word 0x08033575 8033ca0: 2000073c .word 0x2000073c 8033ca4: 20000720 .word 0x20000720 8033ca8: 20000a08 .word 0x20000a08 8033cac: 08032e93 .word 0x08032e93 8033cb0: 08032e97 .word 0x08032e97 08033cb4 : /** * Removes ARP table indexes (.xIfIndex.xNetAddress) * from arp table index trees. */ void snmp_delete_arpidx_tree(struct netif *ni, ip_addr_t *ip) { 8033cb4: b5f0 push {r4, r5, r6, r7, lr} 8033cb6: b091 sub sp, #68 ; 0x44 8033cb8: 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]); 8033cba: a90b add r1, sp, #44 ; 0x2c 8033cbc: f000 fc04 bl 80344c8 snmp_iptooid(ip, &arpidx[1]); 8033cc0: 4620 mov r0, r4 8033cc2: a90c add r1, sp, #48 ; 0x30 8033cc4: f000 fc1d bl 8034502 for (tree = 0; tree < 2; tree++) 8033cc8: 2700 movs r7, #0 { /* mark nodes for deletion */ if (tree == 0) { at_rn = &arptree_root; 8033cca: 4b26 ldr r3, [pc, #152] ; (8033d64 ) 8033ccc: 4d26 ldr r5, [pc, #152] ; (8033d68 ) } else { at_rn = &ipntomtree_root; 8033cce: 2600 movs r6, #0 for (tree = 0; tree < 2; tree++) { /* mark nodes for deletion */ if (tree == 0) { at_rn = &arptree_root; 8033cd0: 2f00 cmp r7, #0 8033cd2: bf08 it eq 8033cd4: 461d moveq r5, r3 } else { at_rn = &ipntomtree_root; 8033cd6: 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); 8033cd8: ab0b add r3, sp, #44 ; 0x2c 8033cda: 4628 mov r0, r5 8033cdc: 58f1 ldr r1, [r6, r3] 8033cde: aa00 add r2, sp, #0 8033ce0: f000 fc85 bl 80345ee 8033ce4: b2c0 uxtb r0, r0 if (fc == 0) 8033ce6: b198 cbz r0, 8033d10 { /* arpidx[level] does not exist */ del_cnt = 0; at_rn = NULL; } else if (fc == 1) 8033ce8: 2801 cmp r0, #1 8033cea: d10b bne.n 8033d04 { del_rn[del_cnt] = at_rn; 8033cec: ab10 add r3, sp, #64 ; 0x40 8033cee: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = at_n; 8033cf2: 9b00 ldr r3, [sp, #0] del_cnt = 0; at_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = at_rn; 8033cf4: f842 5c3c str.w r5, [r2, #-60] del_n[del_cnt] = at_n; del_cnt++; 8033cf8: 3401 adds r4, #1 at_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = at_rn; del_n[del_cnt] = at_n; 8033cfa: f842 3c28 str.w r3, [r2, #-40] del_cnt++; 8033cfe: b2e4 uxtb r4, r4 at_rn = (struct mib_list_rootnode*)(at_n->nptr); 8033d00: 68dd ldr r5, [r3, #12] 8033d02: e007 b.n 8033d14 } else if (fc == 2) 8033d04: 2802 cmp r0, #2 8033d06: d105 bne.n 8033d14 { /* reset delete (2 or more childs) */ del_cnt = 0; at_rn = (struct mib_list_rootnode*)(at_n->nptr); 8033d08: 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; 8033d0a: 2400 movs r4, #0 at_rn = (struct mib_list_rootnode*)(at_n->nptr); 8033d0c: 68dd ldr r5, [r3, #12] 8033d0e: e001 b.n 8033d14 { fc = snmp_mib_node_find(at_rn, arpidx[level], &at_n); if (fc == 0) { /* arpidx[level] does not exist */ del_cnt = 0; 8033d10: 4604 mov r4, r0 at_rn = NULL; 8033d12: 4605 mov r5, r0 8033d14: 3604 adds r6, #4 { at_rn = &ipntomtree_root; } level = 0; del_cnt = 0; while ((level < 5) && (at_rn != NULL)) 8033d16: 2e14 cmp r6, #20 8033d18: d011 beq.n 8033d3e 8033d1a: 2d00 cmp r5, #0 8033d1c: d1dc bne.n 8033cd8 8033d1e: e00e b.n 8033d3e level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 8033d20: 3c01 subs r4, #1 8033d22: b2e4 uxtb r4, r4 at_rn = del_rn[del_cnt]; 8033d24: aa10 add r2, sp, #64 ; 0x40 8033d26: eb02 0384 add.w r3, r2, r4, lsl #2 at_n = del_n[del_cnt]; 8033d2a: f853 1c28 ldr.w r1, [r3, #-40] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; at_rn = del_rn[del_cnt]; 8033d2e: f853 0c3c ldr.w r0, [r3, #-60] at_n = del_n[del_cnt]; 8033d32: 9100 str r1, [sp, #0] next = snmp_mib_node_delete(at_rn, at_n); 8033d34: f000 fc75 bl 8034622 if (next != NULL) 8033d38: b108 cbz r0, 8033d3e { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 8033d3a: f000 fc19 bl 8034570 at_rn = (struct mib_list_rootnode*)(at_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 8033d3e: 2c00 cmp r4, #0 8033d40: d1ee bne.n 8033d20 u8_t fc, tree, level, del_cnt; snmp_netiftoifindex(ni, &arpidx[0]); snmp_iptooid(ip, &arpidx[1]); for (tree = 0; tree < 2; tree++) 8033d42: 3701 adds r7, #1 8033d44: b2ff uxtb r7, r7 8033d46: 2f02 cmp r7, #2 8033d48: d1bf bne.n 8033cca snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty tables */ if(arptree_root.count == 0) at.maxlength = 0; 8033d4a: 4b06 ldr r3, [pc, #24] ; (8033d64 ) 8033d4c: 8b9b ldrh r3, [r3, #28] 8033d4e: b90b cbnz r3, 8033d54 8033d50: 4b06 ldr r3, [pc, #24] ; (8033d6c ) 8033d52: 825c strh r4, [r3, #18] if(ipntomtree_root.count == 0) ipntomtable.maxlength = 0; 8033d54: 4b04 ldr r3, [pc, #16] ; (8033d68 ) 8033d56: 8b9b ldrh r3, [r3, #28] 8033d58: b90b cbnz r3, 8033d5e 8033d5a: 4a05 ldr r2, [pc, #20] ; (8033d70 ) 8033d5c: 8253 strh r3, [r2, #18] } 8033d5e: b011 add sp, #68 ; 0x44 8033d60: bdf0 pop {r4, r5, r6, r7, pc} 8033d62: bf00 nop 8033d64: 20000918 .word 0x20000918 8033d68: 20000a08 .word 0x20000a08 8033d6c: 2000073c .word 0x2000073c 8033d70: 20000720 .word 0x20000720 08033d74 : void snmp_inc_ipinreceives(void) { ipinreceives++; 8033d74: 4b02 ldr r3, [pc, #8] ; (8033d80 ) 8033d76: 681a ldr r2, [r3, #0] 8033d78: 3201 adds r2, #1 8033d7a: 601a str r2, [r3, #0] 8033d7c: 4770 bx lr 8033d7e: bf00 nop 8033d80: 2000c4d8 .word 0x2000c4d8 08033d84 : } void snmp_inc_ipinhdrerrors(void) { ipinhdrerrors++; 8033d84: 4b02 ldr r3, [pc, #8] ; (8033d90 ) 8033d86: 681a ldr r2, [r3, #0] 8033d88: 3201 adds r2, #1 8033d8a: 601a str r2, [r3, #0] 8033d8c: 4770 bx lr 8033d8e: bf00 nop 8033d90: 2000c460 .word 0x2000c460 08033d94 : } void snmp_inc_ipinaddrerrors(void) { ipinaddrerrors++; 8033d94: 4b02 ldr r3, [pc, #8] ; (8033da0 ) 8033d96: 681a ldr r2, [r3, #0] 8033d98: 3201 adds r2, #1 8033d9a: 601a str r2, [r3, #0] 8033d9c: 4770 bx lr 8033d9e: bf00 nop 8033da0: 2000c444 .word 0x2000c444 08033da4 : ipforwdatagrams++; } void snmp_inc_ipinunknownprotos(void) { ipinunknownprotos++; 8033da4: 4b02 ldr r3, [pc, #8] ; (8033db0 ) 8033da6: 681a ldr r2, [r3, #0] 8033da8: 3201 adds r2, #1 8033daa: 601a str r2, [r3, #0] 8033dac: 4770 bx lr 8033dae: bf00 nop 8033db0: 2000c4a0 .word 0x2000c4a0 08033db4 : } void snmp_inc_ipindiscards(void) { ipindiscards++; 8033db4: 4b02 ldr r3, [pc, #8] ; (8033dc0 ) 8033db6: 681a ldr r2, [r3, #0] 8033db8: 3201 adds r2, #1 8033dba: 601a str r2, [r3, #0] 8033dbc: 4770 bx lr 8033dbe: bf00 nop 8033dc0: 2000c52c .word 0x2000c52c 08033dc4 : } void snmp_inc_ipindelivers(void) { ipindelivers++; 8033dc4: 4b02 ldr r3, [pc, #8] ; (8033dd0 ) 8033dc6: 681a ldr r2, [r3, #0] 8033dc8: 3201 adds r2, #1 8033dca: 601a str r2, [r3, #0] 8033dcc: 4770 bx lr 8033dce: bf00 nop 8033dd0: 2000c564 .word 0x2000c564 08033dd4 : } void snmp_inc_ipoutrequests(void) { ipoutrequests++; 8033dd4: 4b02 ldr r3, [pc, #8] ; (8033de0 ) 8033dd6: 681a ldr r2, [r3, #0] 8033dd8: 3201 adds r2, #1 8033dda: 601a str r2, [r3, #0] 8033ddc: 4770 bx lr 8033dde: bf00 nop 8033de0: 2000c54c .word 0x2000c54c 08033de4 : } void snmp_inc_ipoutdiscards(void) { ipoutdiscards++; 8033de4: 4b02 ldr r3, [pc, #8] ; (8033df0 ) 8033de6: 681a ldr r2, [r3, #0] 8033de8: 3201 adds r2, #1 8033dea: 601a str r2, [r3, #0] 8033dec: 4770 bx lr 8033dee: bf00 nop 8033df0: 2000c4f0 .word 0x2000c4f0 08033df4 : } void snmp_inc_ipoutnoroutes(void) { ipoutnoroutes++; 8033df4: 4b02 ldr r3, [pc, #8] ; (8033e00 ) 8033df6: 681a ldr r2, [r3, #0] 8033df8: 3201 adds r2, #1 8033dfa: 601a str r2, [r3, #0] 8033dfc: 4770 bx lr 8033dfe: bf00 nop 8033e00: 2000c570 .word 0x2000c570 08033e04 : /** * Inserts ipAddrTable indexes (.ipAdEntAddr) * into index tree. */ void snmp_insert_ipaddridx_tree(struct netif *ni) { 8033e04: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8033e08: 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]); 8033e0a: 3004 adds r0, #4 8033e0c: a902 add r1, sp, #8 8033e0e: f000 fb78 bl 8034502 level = 0; ipa_rn = &ipaddrtree_root; 8033e12: 4c17 ldr r4, [pc, #92] ; (8033e70 ) 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; 8033e14: 4f17 ldr r7, [pc, #92] ; (8033e74 ) ipa_rn->get_value = ip_addrentry_get_value; 8033e16: f8df 806c ldr.w r8, [pc, #108] ; 8033e84 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]); 8033e1a: 2500 movs r5, #0 level = 0; ipa_rn = &ipaddrtree_root; while (level < 4) { ipa_node = NULL; 8033e1c: 2300 movs r3, #0 8033e1e: 9301 str r3, [sp, #4] snmp_mib_node_insert(ipa_rn, ipaddridx[level], &ipa_node); 8033e20: ab02 add r3, sp, #8 8033e22: 4620 mov r0, r4 8033e24: f853 1025 ldr.w r1, [r3, r5, lsl #2] 8033e28: aa01 add r2, sp, #4 8033e2a: b2ee uxtb r6, r5 8033e2c: f000 fba4 bl 8034578 if ((level != 3) && (ipa_node != NULL)) 8033e30: 2e03 cmp r6, #3 8033e32: d015 beq.n 8033e60 8033e34: 9b01 ldr r3, [sp, #4] 8033e36: b19b cbz r3, 8033e60 { if (ipa_node->nptr == NULL) 8033e38: 68dc ldr r4, [r3, #12] 8033e3a: b98c cbnz r4, 8033e60 { ipa_rn = snmp_mib_lrn_alloc(); 8033e3c: f000 fb7a bl 8034534 ipa_node->nptr = (struct mib_node*)ipa_rn; 8033e40: 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(); 8033e42: 4604 mov r4, r0 ipa_node->nptr = (struct mib_node*)ipa_rn; 8033e44: 60d8 str r0, [r3, #12] if (ipa_rn != NULL) 8033e46: b918 cbnz r0, 8033e50 } } level++; } /* enable getnext traversal on filled table */ ipaddrtable.maxlength = 1; 8033e48: 4b0b ldr r3, [pc, #44] ; (8033e78 ) 8033e4a: 2201 movs r2, #1 8033e4c: 825a strh r2, [r3, #18] 8033e4e: e00b b.n 8033e68 { ipa_rn = snmp_mib_lrn_alloc(); ipa_node->nptr = (struct mib_node*)ipa_rn; if (ipa_rn != NULL) { if (level == 2) 8033e50: 2e02 cmp r6, #2 8033e52: d105 bne.n 8033e60 { 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; 8033e54: 4b09 ldr r3, [pc, #36] ; (8033e7c ) 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; 8033e56: e880 0180 stmia.w r0, {r7, r8} ipa_rn->set_test = noleafs_set_test; 8033e5a: 6083 str r3, [r0, #8] ipa_rn->set_value = noleafs_set_value; 8033e5c: 4b08 ldr r3, [pc, #32] ; (8033e80 ) 8033e5e: 60c3 str r3, [r0, #12] 8033e60: 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) 8033e62: 2d04 cmp r5, #4 8033e64: d1da bne.n 8033e1c 8033e66: e7ef b.n 8033e48 } level++; } /* enable getnext traversal on filled table */ ipaddrtable.maxlength = 1; } 8033e68: b006 add sp, #24 8033e6a: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8033e6e: bf00 nop 8033e70: 20000874 .word 0x20000874 8033e74: 08033719 .word 0x08033719 8033e78: 200008f8 .word 0x200008f8 8033e7c: 08032e93 .word 0x08032e93 8033e80: 08032e97 .word 0x08032e97 8033e84: 08033509 .word 0x08033509 08033e88 : /** * Removes ipAddrTable indexes (.ipAdEntAddr) * from index tree. */ void snmp_delete_ipaddridx_tree(struct netif *ni) { 8033e88: b570 push {r4, r5, r6, lr} 8033e8a: 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]); 8033e8c: 3004 adds r0, #4 8033e8e: a90a add r1, sp, #40 ; 0x28 8033e90: f000 fb37 bl 8034502 8033e94: 2600 movs r6, #0 /* mark nodes for deletion */ level = 0; del_cnt = 0; ipa_rn = &ipaddrtree_root; 8033e96: 4d1f ldr r5, [pc, #124] ; (8033f14 ) LWIP_ASSERT("ni != NULL", ni != NULL); snmp_iptooid(&ni->ip_addr, &ipaddridx[0]); /* mark nodes for deletion */ level = 0; del_cnt = 0; 8033e98: 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); 8033e9a: ab0a add r3, sp, #40 ; 0x28 8033e9c: 4628 mov r0, r5 8033e9e: 58f1 ldr r1, [r6, r3] 8033ea0: aa01 add r2, sp, #4 8033ea2: f000 fba4 bl 80345ee 8033ea6: b2c0 uxtb r0, r0 if (fc == 0) 8033ea8: b198 cbz r0, 8033ed2 { /* ipaddridx[level] does not exist */ del_cnt = 0; ipa_rn = NULL; } else if (fc == 1) 8033eaa: 2801 cmp r0, #1 8033eac: d10b bne.n 8033ec6 { del_rn[del_cnt] = ipa_rn; 8033eae: ab0e add r3, sp, #56 ; 0x38 8033eb0: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = ipa_n; 8033eb4: 9b01 ldr r3, [sp, #4] del_cnt = 0; ipa_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = ipa_rn; 8033eb6: f842 5c30 str.w r5, [r2, #-48] del_n[del_cnt] = ipa_n; del_cnt++; 8033eba: 3401 adds r4, #1 ipa_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = ipa_rn; del_n[del_cnt] = ipa_n; 8033ebc: f842 3c20 str.w r3, [r2, #-32] del_cnt++; 8033ec0: b2e4 uxtb r4, r4 ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); 8033ec2: 68dd ldr r5, [r3, #12] 8033ec4: e007 b.n 8033ed6 } else if (fc == 2) 8033ec6: 2802 cmp r0, #2 8033ec8: d105 bne.n 8033ed6 { /* reset delete (2 or more childs) */ del_cnt = 0; ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); 8033eca: 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; 8033ecc: 2400 movs r4, #0 ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); 8033ece: 68dd ldr r5, [r3, #12] 8033ed0: e001 b.n 8033ed6 { fc = snmp_mib_node_find(ipa_rn, ipaddridx[level], &ipa_n); if (fc == 0) { /* ipaddridx[level] does not exist */ del_cnt = 0; 8033ed2: 4604 mov r4, r0 ipa_rn = NULL; 8033ed4: 4605 mov r5, r0 /* mark nodes for deletion */ level = 0; del_cnt = 0; ipa_rn = &ipaddrtree_root; while ((level < 4) && (ipa_rn != NULL)) 8033ed6: 2e0c cmp r6, #12 8033ed8: d012 beq.n 8033f00 8033eda: 3604 adds r6, #4 8033edc: 2d00 cmp r5, #0 8033ede: d1dc bne.n 8033e9a 8033ee0: e00e b.n 8033f00 level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 8033ee2: 3c01 subs r4, #1 8033ee4: b2e4 uxtb r4, r4 ipa_rn = del_rn[del_cnt]; 8033ee6: aa0e add r2, sp, #56 ; 0x38 8033ee8: eb02 0384 add.w r3, r2, r4, lsl #2 ipa_n = del_n[del_cnt]; 8033eec: f853 1c20 ldr.w r1, [r3, #-32] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; ipa_rn = del_rn[del_cnt]; 8033ef0: f853 0c30 ldr.w r0, [r3, #-48] ipa_n = del_n[del_cnt]; 8033ef4: 9101 str r1, [sp, #4] next = snmp_mib_node_delete(ipa_rn, ipa_n); 8033ef6: f000 fb94 bl 8034622 if (next != NULL) 8033efa: b108 cbz r0, 8033f00 { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 8033efc: f000 fb38 bl 8034570 ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 8033f00: 2c00 cmp r4, #0 8033f02: d1ee bne.n 8033ee2 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; 8033f04: 4b03 ldr r3, [pc, #12] ; (8033f14 ) 8033f06: 8b9b ldrh r3, [r3, #28] 8033f08: b90b cbnz r3, 8033f0e 8033f0a: 4b03 ldr r3, [pc, #12] ; (8033f18 ) 8033f0c: 825c strh r4, [r3, #18] } 8033f0e: b00e add sp, #56 ; 0x38 8033f10: bd70 pop {r4, r5, r6, pc} 8033f12: bf00 nop 8033f14: 20000874 .word 0x20000874 8033f18: 200008f8 .word 0x200008f8 08033f1c : * * @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) { 8033f1c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8033f20: b086 sub sp, #24 u8_t insert = 0; ip_addr_t dst; if (dflt != 0) 8033f22: b110 cbz r0, 8033f2a { /* the default route 0.0.0.0 */ ip_addr_set_any(&dst); 8033f24: 2300 movs r3, #0 8033f26: 9300 str r3, [sp, #0] 8033f28: e02b b.n 8033f82 insert = 1; } else { /* route to the network address */ ip_addr_get_network(&dst, &ni->ip_addr, &ni->netmask); 8033f2a: 688a ldr r2, [r1, #8] 8033f2c: 684b ldr r3, [r1, #4] 8033f2e: 4013 ands r3, r2 8033f30: 9300 str r3, [sp, #0] /* exclude 0.0.0.0 network (reserved for default rte) */ if (!ip_addr_isany(&dst)) { 8033f32: bb33 cbnz r3, 8033f82 8033f34: e021 b.n 8033f7a snmp_iptooid(&dst, &iprteidx[0]); level = 0; iprte_rn = &iprtetree_root; while (level < 4) { iprte_node = NULL; 8033f36: 2300 movs r3, #0 8033f38: 9301 str r3, [sp, #4] snmp_mib_node_insert(iprte_rn, iprteidx[level], &iprte_node); 8033f3a: ab02 add r3, sp, #8 8033f3c: 4620 mov r0, r4 8033f3e: f853 1025 ldr.w r1, [r3, r5, lsl #2] 8033f42: aa01 add r2, sp, #4 8033f44: b2ee uxtb r6, r5 8033f46: f000 fb17 bl 8034578 if ((level != 3) && (iprte_node != NULL)) 8033f4a: 2e03 cmp r6, #3 8033f4c: d012 beq.n 8033f74 8033f4e: 9b01 ldr r3, [sp, #4] 8033f50: b183 cbz r3, 8033f74 { if (iprte_node->nptr == NULL) 8033f52: 68dc ldr r4, [r3, #12] 8033f54: b974 cbnz r4, 8033f74 { iprte_rn = snmp_mib_lrn_alloc(); 8033f56: f000 faed bl 8034534 iprte_node->nptr = (struct mib_node*)iprte_rn; 8033f5a: 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(); 8033f5c: 4604 mov r4, r0 iprte_node->nptr = (struct mib_node*)iprte_rn; 8033f5e: 60d8 str r0, [r3, #12] if (iprte_rn != NULL) 8033f60: b158 cbz r0, 8033f7a { if (level == 2) 8033f62: 2e02 cmp r6, #2 8033f64: d106 bne.n 8033f74 { 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; 8033f66: 4b0d ldr r3, [pc, #52] ; (8033f9c ) 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; 8033f68: f8c0 8000 str.w r8, [r0] iprte_rn->get_value = ip_rteentry_get_value; iprte_rn->set_test = noleafs_set_test; 8033f6c: 6083 str r3, [r0, #8] iprte_rn->set_value = noleafs_set_value; 8033f6e: 4b0c ldr r3, [pc, #48] ; (8033fa0 ) 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; 8033f70: 6047 str r7, [r0, #4] iprte_rn->set_test = noleafs_set_test; iprte_rn->set_value = noleafs_set_value; 8033f72: 60c3 str r3, [r0, #12] 8033f74: 3501 adds r5, #1 u8_t level; snmp_iptooid(&dst, &iprteidx[0]); level = 0; iprte_rn = &iprtetree_root; while (level < 4) 8033f76: 2d04 cmp r5, #4 8033f78: d1dd bne.n 8033f36 } level++; } } /* enable getnext traversal on filled table */ iprtetable.maxlength = 1; 8033f7a: 4b0a ldr r3, [pc, #40] ; (8033fa4 ) 8033f7c: 2201 movs r2, #1 8033f7e: 825a strh r2, [r3, #18] 8033f80: e009 b.n 8033f96 struct mib_list_rootnode *iprte_rn; struct mib_list_node *iprte_node; s32_t iprteidx[4]; u8_t level; snmp_iptooid(&dst, &iprteidx[0]); 8033f82: 4668 mov r0, sp 8033f84: a902 add r1, sp, #8 8033f86: f000 fabc bl 8034502 8033f8a: 2500 movs r5, #0 level = 0; iprte_rn = &iprtetree_root; 8033f8c: 4c06 ldr r4, [pc, #24] ; (8033fa8 ) 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; 8033f8e: f8df 8020 ldr.w r8, [pc, #32] ; 8033fb0 iprte_rn->get_value = ip_rteentry_get_value; 8033f92: 4f06 ldr r7, [pc, #24] ; (8033fac ) 8033f94: e7cf b.n 8033f36 level++; } } /* enable getnext traversal on filled table */ iprtetable.maxlength = 1; } 8033f96: b006 add sp, #24 8033f98: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8033f9c: 08032e93 .word 0x08032e93 8033fa0: 08032e97 .word 0x08032e97 8033fa4: 20000960 .word 0x20000960 8033fa8: 200007a4 .word 0x200007a4 8033fac: 08033a19 .word 0x08033a19 8033fb0: 0803305d .word 0x0803305d 08033fb4 : * @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) { 8033fb4: b570 push {r4, r5, r6, lr} 8033fb6: b08e sub sp, #56 ; 0x38 u8_t del = 0; ip_addr_t dst; if (dflt != 0) 8033fb8: b110 cbz r0, 8033fc0 { /* the default route 0.0.0.0 */ ip_addr_set_any(&dst); 8033fba: 2300 movs r3, #0 8033fbc: 9300 str r3, [sp, #0] 8033fbe: e041 b.n 8034044 del = 1; } else { /* route to the network address */ ip_addr_get_network(&dst, &ni->ip_addr, &ni->netmask); 8033fc0: 688a ldr r2, [r1, #8] 8033fc2: 684b ldr r3, [r1, #4] 8033fc4: 4013 ands r3, r2 8033fc6: 9300 str r3, [sp, #0] /* exclude 0.0.0.0 network (reserved for default rte) */ if (!ip_addr_isany(&dst)) { 8033fc8: 2b00 cmp r3, #0 8033fca: d13b bne.n 8034044 8033fcc: e034 b.n 8034038 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); 8033fce: ab0a add r3, sp, #40 ; 0x28 8033fd0: 4628 mov r0, r5 8033fd2: 58f1 ldr r1, [r6, r3] 8033fd4: aa01 add r2, sp, #4 8033fd6: f000 fb0a bl 80345ee 8033fda: b2c0 uxtb r0, r0 if (fc == 0) 8033fdc: b198 cbz r0, 8034006 { /* iprteidx[level] does not exist */ del_cnt = 0; iprte_rn = NULL; } else if (fc == 1) 8033fde: 2801 cmp r0, #1 8033fe0: d10b bne.n 8033ffa { del_rn[del_cnt] = iprte_rn; 8033fe2: ab0e add r3, sp, #56 ; 0x38 8033fe4: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = iprte_n; 8033fe8: 9b01 ldr r3, [sp, #4] del_cnt = 0; iprte_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = iprte_rn; 8033fea: f842 5c30 str.w r5, [r2, #-48] del_n[del_cnt] = iprte_n; del_cnt++; 8033fee: 3401 adds r4, #1 iprte_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = iprte_rn; del_n[del_cnt] = iprte_n; 8033ff0: f842 3c20 str.w r3, [r2, #-32] del_cnt++; 8033ff4: b2e4 uxtb r4, r4 iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); 8033ff6: 68dd ldr r5, [r3, #12] 8033ff8: e007 b.n 803400a } else if (fc == 2) 8033ffa: 2802 cmp r0, #2 8033ffc: d105 bne.n 803400a { /* reset delete (2 or more childs) */ del_cnt = 0; iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); 8033ffe: 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; 8034000: 2400 movs r4, #0 iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); 8034002: 68dd ldr r5, [r3, #12] 8034004: e001 b.n 803400a { fc = snmp_mib_node_find(iprte_rn, iprteidx[level], &iprte_n); if (fc == 0) { /* iprteidx[level] does not exist */ del_cnt = 0; 8034006: 4604 mov r4, r0 iprte_rn = NULL; 8034008: 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)) 803400a: 2e0c cmp r6, #12 803400c: d012 beq.n 8034034 803400e: 3604 adds r6, #4 8034010: 2d00 cmp r5, #0 8034012: d1dc bne.n 8033fce 8034014: e00e b.n 8034034 level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 8034016: 3c01 subs r4, #1 8034018: b2e4 uxtb r4, r4 iprte_rn = del_rn[del_cnt]; 803401a: aa0e add r2, sp, #56 ; 0x38 803401c: eb02 0384 add.w r3, r2, r4, lsl #2 iprte_n = del_n[del_cnt]; 8034020: f853 1c20 ldr.w r1, [r3, #-32] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; iprte_rn = del_rn[del_cnt]; 8034024: f853 0c30 ldr.w r0, [r3, #-48] iprte_n = del_n[del_cnt]; 8034028: 9101 str r1, [sp, #4] next = snmp_mib_node_delete(iprte_rn, iprte_n); 803402a: f000 fafa bl 8034622 if (next != NULL) 803402e: b108 cbz r0, 8034034 { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 8034030: f000 fa9e bl 8034570 iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 8034034: 2c00 cmp r4, #0 8034036: d1ee bne.n 8034016 snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty table */ if (iprtetree_root.count == 0) iprtetable.maxlength = 0; 8034038: 4b07 ldr r3, [pc, #28] ; (8034058 ) 803403a: 8b9b ldrh r3, [r3, #28] 803403c: b953 cbnz r3, 8034054 803403e: 4a07 ldr r2, [pc, #28] ; (803405c ) 8034040: 8253 strh r3, [r2, #18] 8034042: e007 b.n 8034054 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]); 8034044: 4668 mov r0, sp 8034046: a90a add r1, sp, #40 ; 0x28 8034048: 2600 movs r6, #0 803404a: f000 fa5a bl 8034502 /* mark nodes for deletion */ level = 0; del_cnt = 0; 803404e: 4634 mov r4, r6 iprte_rn = &iprtetree_root; 8034050: 4d01 ldr r5, [pc, #4] ; (8034058 ) 8034052: e7bc b.n 8033fce } } } /* disable getnext traversal on empty table */ if (iprtetree_root.count == 0) iprtetable.maxlength = 0; } 8034054: b00e add sp, #56 ; 0x38 8034056: bd70 pop {r4, r5, r6, pc} 8034058: 200007a4 .word 0x200007a4 803405c: 20000960 .word 0x20000960 08034060 : void snmp_inc_icmpinmsgs(void) { icmpinmsgs++; 8034060: 4b02 ldr r3, [pc, #8] ; (803406c ) 8034062: 681a ldr r2, [r3, #0] 8034064: 3201 adds r2, #1 8034066: 601a str r2, [r3, #0] 8034068: 4770 bx lr 803406a: bf00 nop 803406c: 2000c468 .word 0x2000c468 08034070 : } void snmp_inc_icmpinerrors(void) { icmpinerrors++; 8034070: 4b02 ldr r3, [pc, #8] ; (803407c ) 8034072: 681a ldr r2, [r3, #0] 8034074: 3201 adds r2, #1 8034076: 601a str r2, [r3, #0] 8034078: 4770 bx lr 803407a: bf00 nop 803407c: 2000c464 .word 0x2000c464 08034080 : icmpinaddrmaskreps++; } void snmp_inc_icmpoutmsgs(void) { icmpoutmsgs++; 8034080: 4b02 ldr r3, [pc, #8] ; (803408c ) 8034082: 681a ldr r2, [r3, #0] 8034084: 3201 adds r2, #1 8034086: 601a str r2, [r3, #0] 8034088: 4770 bx lr 803408a: bf00 nop 803408c: 2000c4e8 .word 0x2000c4e8 08034090 : icmpoutdestunreachs++; } void snmp_inc_icmpouttimeexcds(void) { icmpouttimeexcds++; 8034090: 4b02 ldr r3, [pc, #8] ; (803409c ) 8034092: 681a ldr r2, [r3, #0] 8034094: 3201 adds r2, #1 8034096: 601a str r2, [r3, #0] 8034098: 4770 bx lr 803409a: bf00 nop 803409c: 2000c4b4 .word 0x2000c4b4 080340a0 : icmpoutechos++; } void snmp_inc_icmpoutechoreps(void) { icmpoutechoreps++; 80340a0: 4b02 ldr r3, [pc, #8] ; (80340ac ) 80340a2: 681a ldr r2, [r3, #0] 80340a4: 3201 adds r2, #1 80340a6: 601a str r2, [r3, #0] 80340a8: 4770 bx lr 80340aa: bf00 nop 80340ac: 2000c508 .word 0x2000c508 080340b0 : tcpactiveopens++; } void snmp_inc_tcppassiveopens(void) { tcppassiveopens++; 80340b0: 4b02 ldr r3, [pc, #8] ; (80340bc ) 80340b2: 681a ldr r2, [r3, #0] 80340b4: 3201 adds r2, #1 80340b6: 601a str r2, [r3, #0] 80340b8: 4770 bx lr 80340ba: bf00 nop 80340bc: 2000c490 .word 0x2000c490 080340c0 : } void snmp_inc_tcpattemptfails(void) { tcpattemptfails++; 80340c0: 4b02 ldr r3, [pc, #8] ; (80340cc ) 80340c2: 681a ldr r2, [r3, #0] 80340c4: 3201 adds r2, #1 80340c6: 601a str r2, [r3, #0] 80340c8: 4770 bx lr 80340ca: bf00 nop 80340cc: 2000c4dc .word 0x2000c4dc 080340d0 : } void snmp_inc_tcpestabresets(void) { tcpestabresets++; 80340d0: 4b02 ldr r3, [pc, #8] ; (80340dc ) 80340d2: 681a ldr r2, [r3, #0] 80340d4: 3201 adds r2, #1 80340d6: 601a str r2, [r3, #0] 80340d8: 4770 bx lr 80340da: bf00 nop 80340dc: 2000c470 .word 0x2000c470 080340e0 : } void snmp_inc_tcpinsegs(void) { tcpinsegs++; 80340e0: 4b02 ldr r3, [pc, #8] ; (80340ec ) 80340e2: 681a ldr r2, [r3, #0] 80340e4: 3201 adds r2, #1 80340e6: 601a str r2, [r3, #0] 80340e8: 4770 bx lr 80340ea: bf00 nop 80340ec: 2000c4ec .word 0x2000c4ec 080340f0 : } void snmp_inc_tcpoutsegs(void) { tcpoutsegs++; 80340f0: 4b02 ldr r3, [pc, #8] ; (80340fc ) 80340f2: 681a ldr r2, [r3, #0] 80340f4: 3201 adds r2, #1 80340f6: 601a str r2, [r3, #0] 80340f8: 4770 bx lr 80340fa: bf00 nop 80340fc: 2000c538 .word 0x2000c538 08034100 : } void snmp_inc_tcpretranssegs(void) { tcpretranssegs++; 8034100: 4b02 ldr r3, [pc, #8] ; (803410c ) 8034102: 681a ldr r2, [r3, #0] 8034104: 3201 adds r2, #1 8034106: 601a str r2, [r3, #0] 8034108: 4770 bx lr 803410a: bf00 nop 803410c: 2000c50c .word 0x2000c50c 08034110 : } void snmp_inc_tcpinerrs(void) { tcpinerrs++; 8034110: 4b02 ldr r3, [pc, #8] ; (803411c ) 8034112: 681a ldr r2, [r3, #0] 8034114: 3201 adds r2, #1 8034116: 601a str r2, [r3, #0] 8034118: 4770 bx lr 803411a: bf00 nop 803411c: 2000c498 .word 0x2000c498 08034120 : } void snmp_inc_tcpoutrsts(void) { tcpoutrsts++; 8034120: 4b02 ldr r3, [pc, #8] ; (803412c ) 8034122: 681a ldr r2, [r3, #0] 8034124: 3201 adds r2, #1 8034126: 601a str r2, [r3, #0] 8034128: 4770 bx lr 803412a: bf00 nop 803412c: 2000c4fc .word 0x2000c4fc 08034130 : } void snmp_inc_udpindatagrams(void) { udpindatagrams++; 8034130: 4b02 ldr r3, [pc, #8] ; (803413c ) 8034132: 681a ldr r2, [r3, #0] 8034134: 3201 adds r2, #1 8034136: 601a str r2, [r3, #0] 8034138: 4770 bx lr 803413a: bf00 nop 803413c: 2000c518 .word 0x2000c518 08034140 : } void snmp_inc_udpnoports(void) { udpnoports++; 8034140: 4b02 ldr r3, [pc, #8] ; (803414c ) 8034142: 681a ldr r2, [r3, #0] 8034144: 3201 adds r2, #1 8034146: 601a str r2, [r3, #0] 8034148: 4770 bx lr 803414a: bf00 nop 803414c: 2000c4d0 .word 0x2000c4d0 08034150 : } void snmp_inc_udpinerrors(void) { udpinerrors++; 8034150: 4b02 ldr r3, [pc, #8] ; (803415c ) 8034152: 681a ldr r2, [r3, #0] 8034154: 3201 adds r2, #1 8034156: 601a str r2, [r3, #0] 8034158: 4770 bx lr 803415a: bf00 nop 803415c: 2000c540 .word 0x2000c540 08034160 : } void snmp_inc_udpoutdatagrams(void) { udpoutdatagrams++; 8034160: 4b02 ldr r3, [pc, #8] ; (803416c ) 8034162: 681a ldr r2, [r3, #0] 8034164: 3201 adds r2, #1 8034166: 601a str r2, [r3, #0] 8034168: 4770 bx lr 803416a: bf00 nop 803416c: 2000c4c8 .word 0x2000c4c8 08034170 : /** * Inserts udpTable indexes (.udpLocalAddress.udpLocalPort) * into index tree. */ void snmp_insert_udpidx_tree(struct udp_pcb *pcb) { 8034170: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8034174: 4604 mov r4, r0 8034176: 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]); 8034178: a901 add r1, sp, #4 803417a: f000 f9c2 bl 8034502 udpidx[4] = pcb->local_port; 803417e: 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; 8034180: 4f17 ldr r7, [pc, #92] ; (80341e0 ) LWIP_ASSERT("pcb != NULL", pcb != NULL); snmp_iptooid(&pcb->local_ip, &udpidx[0]); udpidx[4] = pcb->local_port; udp_rn = &udp_root; 8034182: 4c18 ldr r4, [pc, #96] ; (80341e4 ) if (udp_rn != NULL) { if (level == 3) { udp_rn->get_object_def = udpentry_get_object_def; udp_rn->get_value = udpentry_get_value; 8034184: f8df 806c ldr.w r8, [pc, #108] ; 80341f4 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; 8034188: 9305 str r3, [sp, #20] 803418a: 2500 movs r5, #0 udp_rn = &udp_root; for (level = 0; level < 5; level++) { udp_node = NULL; 803418c: 2300 movs r3, #0 803418e: 9300 str r3, [sp, #0] snmp_mib_node_insert(udp_rn, udpidx[level], &udp_node); 8034190: ab01 add r3, sp, #4 8034192: 4620 mov r0, r4 8034194: f853 1025 ldr.w r1, [r3, r5, lsl #2] 8034198: 466a mov r2, sp 803419a: b2ee uxtb r6, r5 803419c: f000 f9ec bl 8034578 if ((level != 4) && (udp_node != NULL)) 80341a0: 2e04 cmp r6, #4 80341a2: d015 beq.n 80341d0 80341a4: 9b00 ldr r3, [sp, #0] 80341a6: b19b cbz r3, 80341d0 { if (udp_node->nptr == NULL) 80341a8: 68dc ldr r4, [r3, #12] 80341aa: b98c cbnz r4, 80341d0 { udp_rn = snmp_mib_lrn_alloc(); 80341ac: f000 f9c2 bl 8034534 udp_node->nptr = (struct mib_node*)udp_rn; 80341b0: 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(); 80341b2: 4604 mov r4, r0 udp_node->nptr = (struct mib_node*)udp_rn; 80341b4: 60d8 str r0, [r3, #12] if (udp_rn != NULL) 80341b6: b918 cbnz r0, 80341c0 { udp_rn = (struct mib_list_rootnode*)udp_node->nptr; } } } udptable.maxlength = 1; 80341b8: 4b0b ldr r3, [pc, #44] ; (80341e8 ) 80341ba: 2201 movs r2, #1 80341bc: 825a strh r2, [r3, #18] 80341be: e00b b.n 80341d8 { udp_rn = snmp_mib_lrn_alloc(); udp_node->nptr = (struct mib_node*)udp_rn; if (udp_rn != NULL) { if (level == 3) 80341c0: 2e03 cmp r6, #3 80341c2: d105 bne.n 80341d0 { udp_rn->get_object_def = udpentry_get_object_def; udp_rn->get_value = udpentry_get_value; udp_rn->set_test = noleafs_set_test; 80341c4: 4b09 ldr r3, [pc, #36] ; (80341ec ) if (udp_rn != NULL) { if (level == 3) { udp_rn->get_object_def = udpentry_get_object_def; udp_rn->get_value = udpentry_get_value; 80341c6: e880 0180 stmia.w r0, {r7, r8} udp_rn->set_test = noleafs_set_test; 80341ca: 6083 str r3, [r0, #8] udp_rn->set_value = noleafs_set_value; 80341cc: 4b08 ldr r3, [pc, #32] ; (80341f0 ) 80341ce: 60c3 str r3, [r0, #12] 80341d0: 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++) 80341d2: 2d05 cmp r5, #5 80341d4: d1da bne.n 803418c 80341d6: e7ef b.n 80341b8 udp_rn = (struct mib_list_rootnode*)udp_node->nptr; } } } udptable.maxlength = 1; } 80341d8: b006 add sp, #24 80341da: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80341de: bf00 nop 80341e0: 08033805 .word 0x08033805 80341e4: 20000774 .word 0x20000774 80341e8: 20000758 .word 0x20000758 80341ec: 08032e93 .word 0x08032e93 80341f0: 08032e97 .word 0x08032e97 80341f4: 080334c1 .word 0x080334c1 080341f8 : /** * Removes udpTable indexes (.udpLocalAddress.udpLocalPort) * from index tree. */ void snmp_delete_udpidx_tree(struct udp_pcb *pcb) { 80341f8: b570 push {r4, r5, r6, lr} 80341fa: 4604 mov r4, r0 80341fc: 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]); 80341fe: a90b add r1, sp, #44 ; 0x2c 8034200: f000 f97f bl 8034502 udpidx[4] = pcb->local_port; 8034204: 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; 8034206: 4b2a ldr r3, [pc, #168] ; (80342b0 ) 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; 8034208: 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; 803420a: 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; 803420c: 2200 movs r2, #0 npcb = udp_pcbs; while ((npcb != NULL)) 803420e: e009 b.n 8034224 { if (ip_addr_cmp(&npcb->local_ip, &pcb->local_ip) && 8034210: 681d ldr r5, [r3, #0] 8034212: 6820 ldr r0, [r4, #0] 8034214: 4285 cmp r5, r0 8034216: d104 bne.n 8034222 (npcb->local_port == udpidx[4])) 8034218: 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) && 803421a: 4288 cmp r0, r1 803421c: d101 bne.n 8034222 (npcb->local_port == udpidx[4])) { bindings++; 803421e: 3201 adds r2, #1 8034220: b2d2 uxtb r2, r2 } npcb = npcb->next; 8034222: 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)) 8034224: 2b00 cmp r3, #0 8034226: d1f3 bne.n 8034210 { bindings++; } npcb = npcb->next; } if (bindings == 1) 8034228: 2a01 cmp r2, #1 803422a: d004 beq.n 8034236 snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty table */ if (udp_root.count == 0) udptable.maxlength = 0; 803422c: 4b21 ldr r3, [pc, #132] ; (80342b4 ) 803422e: 8b9b ldrh r3, [r3, #28] 8034230: 2b00 cmp r3, #0 8034232: d039 beq.n 80342a8 8034234: e03a b.n 80342ac { /* selectively remove */ /* mark nodes for deletion */ level = 0; del_cnt = 0; udp_rn = &udp_root; 8034236: 4d1f ldr r5, [pc, #124] ; (80342b4 ) { bindings++; } npcb = npcb->next; } if (bindings == 1) 8034238: 461e mov r6, r3 803423a: 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); 803423c: ab0b add r3, sp, #44 ; 0x2c 803423e: 4628 mov r0, r5 8034240: 58f1 ldr r1, [r6, r3] 8034242: 466a mov r2, sp 8034244: f000 f9d3 bl 80345ee 8034248: b2c0 uxtb r0, r0 if (fc == 0) 803424a: b198 cbz r0, 8034274 { /* udpidx[level] does not exist */ del_cnt = 0; udp_rn = NULL; } else if (fc == 1) 803424c: 2801 cmp r0, #1 803424e: d10b bne.n 8034268 { del_rn[del_cnt] = udp_rn; 8034250: ab10 add r3, sp, #64 ; 0x40 8034252: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = udp_n; 8034256: 9b00 ldr r3, [sp, #0] del_cnt = 0; udp_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = udp_rn; 8034258: f842 5c3c str.w r5, [r2, #-60] del_n[del_cnt] = udp_n; del_cnt++; 803425c: 3401 adds r4, #1 udp_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = udp_rn; del_n[del_cnt] = udp_n; 803425e: f842 3c28 str.w r3, [r2, #-40] del_cnt++; 8034262: b2e4 uxtb r4, r4 udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); 8034264: 68dd ldr r5, [r3, #12] 8034266: e007 b.n 8034278 } else if (fc == 2) 8034268: 2802 cmp r0, #2 803426a: d105 bne.n 8034278 { /* reset delete (2 or more childs) */ del_cnt = 0; udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); 803426c: 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; 803426e: 2400 movs r4, #0 udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); 8034270: 68dd ldr r5, [r3, #12] 8034272: e001 b.n 8034278 { fc = snmp_mib_node_find(udp_rn, udpidx[level], &udp_n); if (fc == 0) { /* udpidx[level] does not exist */ del_cnt = 0; 8034274: 4604 mov r4, r0 udp_rn = NULL; 8034276: 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)) 8034278: 2e10 cmp r6, #16 803427a: d012 beq.n 80342a2 803427c: 3604 adds r6, #4 803427e: 2d00 cmp r5, #0 8034280: d1dc bne.n 803423c 8034282: e00e b.n 80342a2 level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 8034284: 3c01 subs r4, #1 8034286: b2e4 uxtb r4, r4 udp_rn = del_rn[del_cnt]; 8034288: aa10 add r2, sp, #64 ; 0x40 803428a: eb02 0384 add.w r3, r2, r4, lsl #2 udp_n = del_n[del_cnt]; 803428e: f853 1c28 ldr.w r1, [r3, #-40] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; udp_rn = del_rn[del_cnt]; 8034292: f853 0c3c ldr.w r0, [r3, #-60] udp_n = del_n[del_cnt]; 8034296: 9100 str r1, [sp, #0] next = snmp_mib_node_delete(udp_rn, udp_n); 8034298: f000 f9c3 bl 8034622 if (next != NULL) 803429c: b108 cbz r0, 80342a2 { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 803429e: f000 f967 bl 8034570 udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 80342a2: 2c00 cmp r4, #0 80342a4: d1ee bne.n 8034284 80342a6: e7c1 b.n 803422c snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty table */ if (udp_root.count == 0) udptable.maxlength = 0; 80342a8: 4a03 ldr r2, [pc, #12] ; (80342b8 ) 80342aa: 8253 strh r3, [r2, #18] } 80342ac: b010 add sp, #64 ; 0x40 80342ae: bd70 pop {r4, r5, r6, pc} 80342b0: 2000f6c8 .word 0x2000f6c8 80342b4: 20000774 .word 0x20000774 80342b8: 20000758 .word 0x20000758 080342bc : void snmp_inc_snmpinpkts(void) { snmpinpkts++; 80342bc: 4b02 ldr r3, [pc, #8] ; (80342c8 ) 80342be: 681a ldr r2, [r3, #0] 80342c0: 3201 adds r2, #1 80342c2: 601a str r2, [r3, #0] 80342c4: 4770 bx lr 80342c6: bf00 nop 80342c8: 2000c474 .word 0x2000c474 080342cc : } void snmp_inc_snmpoutpkts(void) { snmpoutpkts++; 80342cc: 4b02 ldr r3, [pc, #8] ; (80342d8 ) 80342ce: 681a ldr r2, [r3, #0] 80342d0: 3201 adds r2, #1 80342d2: 601a str r2, [r3, #0] 80342d4: 4770 bx lr 80342d6: bf00 nop 80342d8: 2000c544 .word 0x2000c544 080342dc : } void snmp_inc_snmpinbadversions(void) { snmpinbadversions++; 80342dc: 4b02 ldr r3, [pc, #8] ; (80342e8 ) 80342de: 681a ldr r2, [r3, #0] 80342e0: 3201 adds r2, #1 80342e2: 601a str r2, [r3, #0] 80342e4: 4770 bx lr 80342e6: bf00 nop 80342e8: 2000c530 .word 0x2000c530 080342ec : } void snmp_inc_snmpinbadcommunitynames(void) { snmpinbadcommunitynames++; 80342ec: 4b02 ldr r3, [pc, #8] ; (80342f8 ) 80342ee: 681a ldr r2, [r3, #0] 80342f0: 3201 adds r2, #1 80342f2: 601a str r2, [r3, #0] 80342f4: 4770 bx lr 80342f6: bf00 nop 80342f8: 2000c448 .word 0x2000c448 080342fc : snmpinbadcommunityuses++; } void snmp_inc_snmpinasnparseerrs(void) { snmpinasnparseerrs++; 80342fc: 4b02 ldr r3, [pc, #8] ; (8034308 ) 80342fe: 681a ldr r2, [r3, #0] 8034300: 3201 adds r2, #1 8034302: 601a str r2, [r3, #0] 8034304: 4770 bx lr 8034306: bf00 nop 8034308: 2000c534 .word 0x2000c534 0803430c : } void snmp_inc_snmpintoobigs(void) { snmpintoobigs++; 803430c: 4b02 ldr r3, [pc, #8] ; (8034318 ) 803430e: 681a ldr r2, [r3, #0] 8034310: 3201 adds r2, #1 8034312: 601a str r2, [r3, #0] 8034314: 4770 bx lr 8034316: bf00 nop 8034318: 2000c4f4 .word 0x2000c4f4 0803431c : } void snmp_inc_snmpinnosuchnames(void) { snmpinnosuchnames++; 803431c: 4b02 ldr r3, [pc, #8] ; (8034328 ) 803431e: 681a ldr r2, [r3, #0] 8034320: 3201 adds r2, #1 8034322: 601a str r2, [r3, #0] 8034324: 4770 bx lr 8034326: bf00 nop 8034328: 2000c574 .word 0x2000c574 0803432c : } void snmp_inc_snmpinbadvalues(void) { snmpinbadvalues++; 803432c: 4b02 ldr r3, [pc, #8] ; (8034338 ) 803432e: 681a ldr r2, [r3, #0] 8034330: 3201 adds r2, #1 8034332: 601a str r2, [r3, #0] 8034334: 4770 bx lr 8034336: bf00 nop 8034338: 2000c510 .word 0x2000c510 0803433c : } void snmp_inc_snmpinreadonlys(void) { snmpinreadonlys++; 803433c: 4b02 ldr r3, [pc, #8] ; (8034348 ) 803433e: 681a ldr r2, [r3, #0] 8034340: 3201 adds r2, #1 8034342: 601a str r2, [r3, #0] 8034344: 4770 bx lr 8034346: bf00 nop 8034348: 2000c4e4 .word 0x2000c4e4 0803434c : } void snmp_inc_snmpingenerrs(void) { snmpingenerrs++; 803434c: 4b02 ldr r3, [pc, #8] ; (8034358 ) 803434e: 681a ldr r2, [r3, #0] 8034350: 3201 adds r2, #1 8034352: 601a str r2, [r3, #0] 8034354: 4770 bx lr 8034356: bf00 nop 8034358: 2000c4bc .word 0x2000c4bc 0803435c : } void snmp_add_snmpintotalreqvars(u8_t value) { snmpintotalreqvars += value; 803435c: 4b02 ldr r3, [pc, #8] ; (8034368 ) 803435e: 681a ldr r2, [r3, #0] 8034360: 1880 adds r0, r0, r2 8034362: 6018 str r0, [r3, #0] 8034364: 4770 bx lr 8034366: bf00 nop 8034368: 2000c514 .word 0x2000c514 0803436c : } void snmp_add_snmpintotalsetvars(u8_t value) { snmpintotalsetvars += value; 803436c: 4b02 ldr r3, [pc, #8] ; (8034378 ) 803436e: 681a ldr r2, [r3, #0] 8034370: 1880 adds r0, r0, r2 8034372: 6018 str r0, [r3, #0] 8034374: 4770 bx lr 8034376: bf00 nop 8034378: 2000c454 .word 0x2000c454 0803437c : } void snmp_inc_snmpingetrequests(void) { snmpingetrequests++; 803437c: 4b02 ldr r3, [pc, #8] ; (8034388 ) 803437e: 681a ldr r2, [r3, #0] 8034380: 3201 adds r2, #1 8034382: 601a str r2, [r3, #0] 8034384: 4770 bx lr 8034386: bf00 nop 8034388: 2000c4a8 .word 0x2000c4a8 0803438c : } void snmp_inc_snmpingetnexts(void) { snmpingetnexts++; 803438c: 4b02 ldr r3, [pc, #8] ; (8034398 ) 803438e: 681a ldr r2, [r3, #0] 8034390: 3201 adds r2, #1 8034392: 601a str r2, [r3, #0] 8034394: 4770 bx lr 8034396: bf00 nop 8034398: 2000c42c .word 0x2000c42c 0803439c : } void snmp_inc_snmpinsetrequests(void) { snmpinsetrequests++; 803439c: 4b02 ldr r3, [pc, #8] ; (80343a8 ) 803439e: 681a ldr r2, [r3, #0] 80343a0: 3201 adds r2, #1 80343a2: 601a str r2, [r3, #0] 80343a4: 4770 bx lr 80343a6: bf00 nop 80343a8: 2000c550 .word 0x2000c550 080343ac : } void snmp_inc_snmpingetresponses(void) { snmpingetresponses++; 80343ac: 4b02 ldr r3, [pc, #8] ; (80343b8 ) 80343ae: 681a ldr r2, [r3, #0] 80343b0: 3201 adds r2, #1 80343b2: 601a str r2, [r3, #0] 80343b4: 4770 bx lr 80343b6: bf00 nop 80343b8: 2000c4a4 .word 0x2000c4a4 080343bc : } void snmp_inc_snmpintraps(void) { snmpintraps++; 80343bc: 4b02 ldr r3, [pc, #8] ; (80343c8 ) 80343be: 681a ldr r2, [r3, #0] 80343c0: 3201 adds r2, #1 80343c2: 601a str r2, [r3, #0] 80343c4: 4770 bx lr 80343c6: bf00 nop 80343c8: 2000c43c .word 0x2000c43c 080343cc : } void snmp_inc_snmpouttoobigs(void) { snmpouttoobigs++; 80343cc: 4b02 ldr r3, [pc, #8] ; (80343d8 ) 80343ce: 681a ldr r2, [r3, #0] 80343d0: 3201 adds r2, #1 80343d2: 601a str r2, [r3, #0] 80343d4: 4770 bx lr 80343d6: bf00 nop 80343d8: 2000c48c .word 0x2000c48c 080343dc : } void snmp_inc_snmpoutnosuchnames(void) { snmpoutnosuchnames++; 80343dc: 4b02 ldr r3, [pc, #8] ; (80343e8 ) 80343de: 681a ldr r2, [r3, #0] 80343e0: 3201 adds r2, #1 80343e2: 601a str r2, [r3, #0] 80343e4: 4770 bx lr 80343e6: bf00 nop 80343e8: 2000c458 .word 0x2000c458 080343ec : } void snmp_inc_snmpoutbadvalues(void) { snmpoutbadvalues++; 80343ec: 4b02 ldr r3, [pc, #8] ; (80343f8 ) 80343ee: 681a ldr r2, [r3, #0] 80343f0: 3201 adds r2, #1 80343f2: 601a str r2, [r3, #0] 80343f4: 4770 bx lr 80343f6: bf00 nop 80343f8: 2000c438 .word 0x2000c438 080343fc : } void snmp_inc_snmpoutgenerrs(void) { snmpoutgenerrs++; 80343fc: 4b02 ldr r3, [pc, #8] ; (8034408 ) 80343fe: 681a ldr r2, [r3, #0] 8034400: 3201 adds r2, #1 8034402: 601a str r2, [r3, #0] 8034404: 4770 bx lr 8034406: bf00 nop 8034408: 2000c578 .word 0x2000c578 0803440c : snmpoutsetrequests++; } void snmp_inc_snmpoutgetresponses(void) { snmpoutgetresponses++; 803440c: 4b02 ldr r3, [pc, #8] ; (8034418 ) 803440e: 681a ldr r2, [r3, #0] 8034410: 3201 adds r2, #1 8034412: 601a str r2, [r3, #0] 8034414: 4770 bx lr 8034416: bf00 nop 8034418: 2000c434 .word 0x2000c434 0803441c : } void snmp_inc_snmpouttraps(void) { snmpouttraps++; 803441c: 4b02 ldr r3, [pc, #8] ; (8034428 ) 803441e: 681a ldr r2, [r3, #0] 8034420: 3201 adds r2, #1 8034422: 601a str r2, [r3, #0] 8034424: 4770 bx lr 8034426: bf00 nop 8034428: 2000c4ac .word 0x2000c4ac 0803442c : } void snmp_get_snmpgrpid_ptr(struct snmp_obj_id **oid) { *oid = &snmpgrp_id; 803442c: 4b01 ldr r3, [pc, #4] ; (8034434 ) 803442e: 6003 str r3, [r0, #0] 8034430: 4770 bx lr 8034432: bf00 nop 8034434: 20000984 .word 0x20000984 08034438 : } } void snmp_get_snmpenableauthentraps(u8_t *value) { *value = *snmpenableauthentraps_ptr; 8034438: 4b02 ldr r3, [pc, #8] ; (8034444 ) 803443a: 681b ldr r3, [r3, #0] 803443c: 781b ldrb r3, [r3, #0] 803443e: 7003 strb r3, [r0, #0] 8034440: 4770 bx lr 8034442: bf00 nop 8034444: 20000898 .word 0x20000898 08034448 : /** * Pushes nse struct onto stack. */ static void push_node(struct nse* node) { 8034448: 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) 803444a: 4d07 ldr r5, [pc, #28] ; (8034468 ) 803444c: 782b ldrb r3, [r5, #0] 803444e: 2b1f cmp r3, #31 8034450: d808 bhi.n 8034464 { node_stack[node_stack_cnt] = *node; 8034452: 4a06 ldr r2, [pc, #24] ; (803446c ) 8034454: 240c movs r4, #12 8034456: fb04 2403 mla r4, r4, r3, r2 803445a: c807 ldmia r0, {r0, r1, r2} 803445c: e884 0007 stmia.w r4, {r0, r1, r2} node_stack_cnt++; 8034460: 3301 adds r3, #1 8034462: 702b strb r3, [r5, #0] 8034464: bd30 pop {r4, r5, pc} 8034466: bf00 nop 8034468: 2000c57c .word 0x2000c57c 803446c: 2000c580 .word 0x2000c580 08034470 : empty_table(struct mib_node *node) { u8_t node_type; u8_t empty = 0; if (node != NULL) 8034470: b1d0 cbz r0, 80344a8 { node_type = node->node_type; 8034472: 7c03 ldrb r3, [r0, #16] if (node_type == MIB_NODE_LR) 8034474: 2b04 cmp r3, #4 8034476: d105 bne.n 8034484 { struct mib_list_rootnode *lrn; lrn = (struct mib_list_rootnode *)node; if ((lrn->count == 0) || (lrn->head == NULL)) 8034478: 8b83 ldrh r3, [r0, #28] 803447a: b903 cbnz r3, 803447e 803447c: e009 b.n 8034492 803447e: 6943 ldr r3, [r0, #20] 8034480: b13b cbz r3, 8034492 8034482: e010 b.n 80344a6 { empty = 1; } } else if ((node_type == MIB_NODE_AR) || (node_type == MIB_NODE_RA)) 8034484: 1e9a subs r2, r3, #2 8034486: 2a01 cmp r2, #1 8034488: d805 bhi.n 8034496 { struct mib_array_node *an; an = (struct mib_array_node *)node; if ((an->maxlength == 0) || (an->nptr == NULL)) 803448a: 8a43 ldrh r3, [r0, #18] 803448c: b10b cbz r3, 8034492 803448e: 6980 ldr r0, [r0, #24] 8034490: e004 b.n 803449c { empty = 1; 8034492: 2001 movs r0, #1 8034494: 4770 bx lr } } else if (node_type == MIB_NODE_EX) 8034496: 2b05 cmp r3, #5 8034498: d105 bne.n 80344a6 { struct mib_external_node *en; en = (struct mib_external_node *)node; if (en->tree_levels == 0) 803449a: 7e00 ldrb r0, [r0, #24] */ static u8_t empty_table(struct mib_node *node) { u8_t node_type; u8_t empty = 0; 803449c: f1d0 0001 rsbs r0, r0, #1 80344a0: bf38 it cc 80344a2: 2000 movcc r0, #0 80344a4: 4770 bx lr 80344a6: 2000 movs r0, #0 empty = 1; } } } return empty; } 80344a8: 4770 bx lr 80344aa: 0000 movs r0, r0 080344ac : * @param netif points to returned netif struct pointer */ void snmp_ifindextonetif(s32_t ifindex, struct netif **netif) { struct netif *nif = netif_list; 80344ac: 4b05 ldr r3, [pc, #20] ; (80344c4 ) s32_t i, ifidx; ifidx = ifindex - 1; 80344ae: 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; 80344b0: 681b ldr r3, [r3, #0] s32_t i, ifidx; ifidx = ifindex - 1; i = 0; 80344b2: 2200 movs r2, #0 while ((nif != NULL) && (i < ifidx)) 80344b4: e001 b.n 80344ba { nif = nif->next; 80344b6: 681b ldr r3, [r3, #0] i++; 80344b8: 3201 adds r2, #1 struct netif *nif = netif_list; s32_t i, ifidx; ifidx = ifindex - 1; i = 0; while ((nif != NULL) && (i < ifidx)) 80344ba: b10b cbz r3, 80344c0 80344bc: 4282 cmp r2, r0 80344be: dbfa blt.n 80344b6 { nif = nif->next; i++; } *netif = nif; 80344c0: 600b str r3, [r1, #0] 80344c2: 4770 bx lr 80344c4: 2000f6a0 .word 0x2000f6a0 080344c8 : * @param ifidx points to s32_t object sub-identifier */ void snmp_netiftoifindex(struct netif *netif, s32_t *ifidx) { struct netif *nif = netif_list; 80344c8: 4b06 ldr r3, [pc, #24] ; (80344e4 ) u16_t i; i = 0; 80344ca: 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; 80344cc: 681b ldr r3, [r3, #0] u16_t i; i = 0; while ((nif != NULL) && (nif != netif)) 80344ce: e001 b.n 80344d4 { nif = nif->next; 80344d0: 681b ldr r3, [r3, #0] i++; 80344d2: b292 uxth r2, r2 80344d4: 3201 adds r2, #1 { struct netif *nif = netif_list; u16_t i; i = 0; while ((nif != NULL) && (nif != netif)) 80344d6: b90b cbnz r3, 80344dc { nif = nif->next; i++; } *ifidx = i+1; 80344d8: 600a str r2, [r1, #0] 80344da: 4770 bx lr { struct netif *nif = netif_list; u16_t i; i = 0; while ((nif != NULL) && (nif != netif)) 80344dc: 4283 cmp r3, r0 80344de: d1f7 bne.n 80344d0 80344e0: e7fa b.n 80344d8 80344e2: bf00 nop 80344e4: 2000f6a0 .word 0x2000f6a0 080344e8 : * @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]); 80344e8: 7802 ldrb r2, [r0, #0] 80344ea: 68c3 ldr r3, [r0, #12] 80344ec: ea42 6303 orr.w r3, r2, r3, lsl #24 80344f0: 7a02 ldrb r2, [r0, #8] 80344f2: ea43 4302 orr.w r3, r3, r2, lsl #16 80344f6: 6842 ldr r2, [r0, #4] 80344f8: 0612 lsls r2, r2, #24 80344fa: ea43 4312 orr.w r3, r3, r2, lsr #16 80344fe: 600b str r3, [r1, #0] 8034500: 4770 bx lr 08034502 : * @param ident points to s32_t ident[4] output */ void snmp_iptooid(ip_addr_t *ip, s32_t *ident) { ident[0] = ip4_addr1(ip); 8034502: 7803 ldrb r3, [r0, #0] 8034504: 600b str r3, [r1, #0] ident[1] = ip4_addr2(ip); 8034506: 7843 ldrb r3, [r0, #1] 8034508: 604b str r3, [r1, #4] ident[2] = ip4_addr3(ip); 803450a: 7883 ldrb r3, [r0, #2] 803450c: 608b str r3, [r1, #8] ident[3] = ip4_addr4(ip); 803450e: 78c3 ldrb r3, [r0, #3] 8034510: 60cb str r3, [r1, #12] 8034512: 4770 bx lr 08034514 : } struct mib_list_node * snmp_mib_ln_alloc(s32_t id) { 8034514: b510 push {r4, lr} 8034516: 4604 mov r4, r0 struct mib_list_node *ln; ln = (struct mib_list_node *)memp_malloc(MEMP_SNMP_NODE); 8034518: 200b movs r0, #11 803451a: f7fa fecd bl 802f2b8 if (ln != NULL) 803451e: b120 cbz r0, 803452a { ln->prev = NULL; 8034520: 2300 movs r3, #0 8034522: 6003 str r3, [r0, #0] ln->next = NULL; 8034524: 6043 str r3, [r0, #4] ln->objid = id; 8034526: 6084 str r4, [r0, #8] ln->nptr = NULL; 8034528: 60c3 str r3, [r0, #12] } return ln; } 803452a: bd10 pop {r4, pc} 0803452c : void snmp_mib_ln_free(struct mib_list_node *ln) { 803452c: 4601 mov r1, r0 memp_free(MEMP_SNMP_NODE, ln); 803452e: 200b movs r0, #11 8034530: f7fa bed8 b.w 802f2e4 08034534 : } struct mib_list_rootnode * snmp_mib_lrn_alloc(void) { 8034534: b508 push {r3, lr} struct mib_list_rootnode *lrn; lrn = (struct mib_list_rootnode*)memp_malloc(MEMP_SNMP_ROOTNODE); 8034536: 200a movs r0, #10 8034538: f7fa febe bl 802f2b8 if (lrn != NULL) 803453c: b170 cbz r0, 803455c { lrn->get_object_def = noleafs_get_object_def; 803453e: 4b08 ldr r3, [pc, #32] ; (8034560 ) 8034540: 6003 str r3, [r0, #0] lrn->get_value = noleafs_get_value; 8034542: 4b08 ldr r3, [pc, #32] ; (8034564 ) 8034544: 6043 str r3, [r0, #4] lrn->set_test = noleafs_set_test; 8034546: 4b08 ldr r3, [pc, #32] ; (8034568 ) 8034548: 6083 str r3, [r0, #8] lrn->set_value = noleafs_set_value; 803454a: 4b08 ldr r3, [pc, #32] ; (803456c ) 803454c: 60c3 str r3, [r0, #12] lrn->node_type = MIB_NODE_LR; 803454e: 2304 movs r3, #4 8034550: 7403 strb r3, [r0, #16] lrn->maxlength = 0; 8034552: 2300 movs r3, #0 8034554: 8243 strh r3, [r0, #18] lrn->head = NULL; 8034556: 6143 str r3, [r0, #20] lrn->tail = NULL; 8034558: 6183 str r3, [r0, #24] lrn->count = 0; 803455a: 8383 strh r3, [r0, #28] } return lrn; } 803455c: bd08 pop {r3, pc} 803455e: bf00 nop 8034560: 08032e8b .word 0x08032e8b 8034564: 08032e91 .word 0x08032e91 8034568: 08032e93 .word 0x08032e93 803456c: 08032e97 .word 0x08032e97 08034570 : void snmp_mib_lrn_free(struct mib_list_rootnode *lrn) { 8034570: 4601 mov r1, r0 memp_free(MEMP_SNMP_ROOTNODE, lrn); 8034572: 200a movs r0, #10 8034574: f7fa beb6 b.w 802f2e4 08034578 : * 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) { 8034578: b5f8 push {r3, r4, r5, r6, r7, lr} 803457a: 4605 mov r5, r0 803457c: 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) 803457e: 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) { 8034580: 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) 8034582: b93c cbnz r4, 8034594 { /* empty list, add first node */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("alloc empty list objid==%"S32_F"\n",objid)); nn = snmp_mib_ln_alloc(objid); 8034584: f7ff ffc6 bl 8034514 if (nn != NULL) 8034588: b350 cbz r0, 80345e0 { rn->head = nn; 803458a: 6168 str r0, [r5, #20] rn->tail = nn; 803458c: 61a8 str r0, [r5, #24] *insn = nn; 803458e: 6030 str r0, [r6, #0] 8034590: e021 b.n 80345d6 *insn = n; insert = 2; } else if (n->objid < objid) { if (n->next == NULL) 8034592: 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) 8034594: 68a3 ldr r3, [r4, #8] 8034596: 4283 cmp r3, r0 8034598: d102 bne.n 80345a0 { /* node is already there */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("node already there objid==%"S32_F"\n",objid)); *insn = n; 803459a: 6034 str r4, [r6, #0] insert = 2; 803459c: 2302 movs r3, #2 803459e: e023 b.n 80345e8 } else if (n->objid < objid) 80345a0: da0a bge.n 80345b8 { if (n->next == NULL) 80345a2: 6867 ldr r7, [r4, #4] 80345a4: 2f00 cmp r7, #0 80345a6: d1f4 bne.n 8034592 { /* 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); 80345a8: f7ff ffb4 bl 8034514 if (nn != NULL) 80345ac: b1d8 cbz r0, 80345e6 { nn->next = NULL; nn->prev = n; 80345ae: e880 0090 stmia.w r0, {r4, r7} n->next = nn; 80345b2: 6060 str r0, [r4, #4] rn->tail = nn; 80345b4: 61a8 str r0, [r5, #24] 80345b6: e00b b.n 80345d0 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); 80345b8: f7ff ffac bl 8034514 if (nn != NULL) 80345bc: b198 cbz r0, 80345e6 { if (n->prev == NULL) 80345be: 6822 ldr r2, [r4, #0] { /* insert at the head */ nn->next = n; nn->prev = NULL; 80345c0: 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) 80345c4: b90a cbnz r2, 80345ca { /* insert at the head */ nn->next = n; nn->prev = NULL; rn->head = nn; 80345c6: 6168 str r0, [r5, #20] 80345c8: e001 b.n 80345ce else { /* insert in the middle */ nn->next = n; nn->prev = n->prev; n->prev->next = nn; 80345ca: 6822 ldr r2, [r4, #0] 80345cc: 6050 str r0, [r2, #4] n->prev = nn; 80345ce: 6020 str r0, [r4, #0] } *insn = nn; 80345d0: 6030 str r0, [r6, #0] insert = 1; 80345d2: 2301 movs r3, #1 80345d4: e008 b.n 80345e8 } } } if (insert == 1) { rn->count += 1; 80345d6: 8bab ldrh r3, [r5, #28] 80345d8: 3301 adds r3, #1 80345da: 83ab strh r3, [r5, #28] 80345dc: 2301 movs r3, #1 80345de: e000 b.n 80345e2 *insn = nn; insert = 1; } else { insert = -1; 80345e0: 23ff movs r3, #255 ; 0xff if (insert == 1) { rn->count += 1; } LWIP_ASSERT("insert != 0",insert != 0); return insert; 80345e2: b258 sxtb r0, r3 80345e4: bdf8 pop {r3, r4, r5, r6, r7, pc} insert = 1; } else { /* insertion failure */ insert = -1; 80345e6: 23ff movs r3, #255 ; 0xff } } } } if (insert == 1) 80345e8: 2b01 cmp r3, #1 80345ea: d1fa bne.n 80345e2 80345ec: e7f3 b.n 80345d6 080345ee : { s8_t fc; struct mib_list_node *n; LWIP_ASSERT("rn != NULL",rn != NULL); n = rn->head; 80345ee: 6943 ldr r3, [r0, #20] while ((n != NULL) && (n->objid != objid)) 80345f0: e000 b.n 80345f4 { n = n->next; 80345f2: 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)) 80345f4: b16b cbz r3, 8034612 80345f6: 6898 ldr r0, [r3, #8] 80345f8: 4288 cmp r0, r1 80345fa: d1fa bne.n 80345f2 } if (n == NULL) { fc = 0; } else if (n->nptr == NULL) 80345fc: 68d9 ldr r1, [r3, #12] 80345fe: b161 cbz r1, 803461a } else { struct mib_list_rootnode *r; if (n->nptr->node_type == MIB_NODE_LR) 8034600: 7c08 ldrb r0, [r1, #16] 8034602: 2804 cmp r0, #4 8034604: d107 bne.n 8034616 { r = (struct mib_list_rootnode *)n->nptr; if (r->count > 1) 8034606: 8b88 ldrh r0, [r1, #28] { /* can't delete node */ fc = 2; 8034608: 2801 cmp r0, #1 803460a: bf94 ite ls 803460c: 2001 movls r0, #1 803460e: 2002 movhi r0, #2 8034610: e004 b.n 803461c { n = n->next; } if (n == NULL) { fc = 0; 8034612: 4618 mov r0, r3 8034614: e002 b.n 803461c } } else { /* other node type */ fc = 3; 8034616: 2003 movs r0, #3 8034618: e000 b.n 803461c fc = 0; } else if (n->nptr == NULL) { /* leaf, can delete node */ fc = 1; 803461a: 2001 movs r0, #1 { /* other node type */ fc = 3; } } *fn = n; 803461c: 6013 str r3, [r2, #0] return fc; } 803461e: b240 sxtb r0, r0 8034620: 4770 bx lr 08034622 : * @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) { 8034622: 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; 8034624: 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); 8034626: 68cd ldr r5, [r1, #12] rn->count -= 1; 8034628: 3b01 subs r3, #1 803462a: 8383 strh r3, [r0, #28] if (n == rn->head) 803462c: 6943 ldr r3, [r0, #20] 803462e: 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) { 8034630: 4604 mov r4, r0 /* caller must remove this sub-tree */ next = (struct mib_list_rootnode*)(n->nptr); rn->count -= 1; if (n == rn->head) 8034632: d105 bne.n 8034640 { rn->head = n->next; 8034634: 684b ldr r3, [r1, #4] 8034636: 6143 str r3, [r0, #20] if (n->next != NULL) 8034638: b17b cbz r3, 803465a { /* not last node, new list begin */ n->next->prev = NULL; 803463a: 2200 movs r2, #0 803463c: 601a str r2, [r3, #0] 803463e: e00c b.n 803465a } } else if (n == rn->tail) 8034640: 6983 ldr r3, [r0, #24] 8034642: 4299 cmp r1, r3 8034644: 680b ldr r3, [r1, #0] 8034646: d104 bne.n 8034652 { rn->tail = n->prev; 8034648: 6183 str r3, [r0, #24] if (n->prev != NULL) 803464a: b133 cbz r3, 803465a { /* not last node, new list end */ n->prev->next = NULL; 803464c: 2200 movs r2, #0 803464e: 605a str r2, [r3, #4] 8034650: e003 b.n 803465a } } else { /* node must be in the middle */ n->prev->next = n->next; 8034652: 684a ldr r2, [r1, #4] 8034654: 605a str r2, [r3, #4] n->next->prev = n->prev; 8034656: 684a ldr r2, [r1, #4] 8034658: 6013 str r3, [r2, #0] } LWIP_DEBUGF(SNMP_MIB_DEBUG,("free list objid==%"S32_F"\n",n->objid)); snmp_mib_ln_free(n); 803465a: 4608 mov r0, r1 803465c: f7ff ff66 bl 803452c if (rn->count == 0) 8034660: 8ba3 ldrh r3, [r4, #28] 8034662: b90b cbnz r3, 8034668 { rn->head = NULL; 8034664: 6163 str r3, [r4, #20] rn->tail = NULL; 8034666: 61a3 str r3, [r4, #24] } return next; } 8034668: 4628 mov r0, r5 803466a: bd38 pop {r3, r4, r5, pc} 0803466c : * @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) { 803466c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8034670: 4604 mov r4, r0 8034672: b085 sub sp, #20 8034674: 460d mov r5, r1 8034676: 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) 8034678: f102 0804 add.w r8, r2, #4 { u8_t node_type, ext_level; ext_level = 0; 803467c: f04f 0b00 mov.w fp, #0 LWIP_DEBUGF(SNMP_MIB_DEBUG,("node==%p *ident==%"S32_F"\n",(void*)node,*ident)); while (node != NULL) 8034680: e068 b.n 8034754 { node_type = node->node_type; 8034682: 7c23 ldrb r3, [r4, #16] if ((node_type == MIB_NODE_AR) || (node_type == MIB_NODE_RA)) 8034684: 1e9a subs r2, r3, #2 8034686: 2a01 cmp r2, #1 8034688: d812 bhi.n 80346b0 { struct mib_array_node *an; u16_t i; if (ident_len > 0) 803468a: b90d cbnz r5, 8034690 } else { /* search failed, short object identifier (nosuchname) */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("an search failed, short object identifier\n")); return NULL; 803468c: 2000 movs r0, #0 803468e: e06a b.n 8034766 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)) 8034690: 8a67 ldrh r7, [r4, #18] 8034692: 2300 movs r3, #0 8034694: b29a uxth r2, r3 8034696: 42ba cmp r2, r7 8034698: d2f8 bcs.n 803468c 803469a: 009a lsls r2, r3, #2 803469c: 6961 ldr r1, [r4, #20] 803469e: 5888 ldr r0, [r1, r2] 80346a0: f858 1c04 ldr.w r1, [r8, #-4] 80346a4: 3301 adds r3, #1 80346a6: 4288 cmp r0, r1 80346a8: d1f4 bne.n 8034694 } 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) 80346aa: 69a3 ldr r3, [r4, #24] 80346ac: 589b ldr r3, [r3, r2] 80346ae: e057 b.n 8034760 /* 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) 80346b0: 2b04 cmp r3, #4 80346b2: d10c bne.n 80346ce { struct mib_list_rootnode *lrn; struct mib_list_node *ln; if (ident_len > 0) 80346b4: 2d00 cmp r5, #0 80346b6: d0e9 beq.n 803468c { /* list root node (internal 'RAM', variable length) */ lrn = (struct mib_list_rootnode *)node; ln = lrn->head; 80346b8: 6963 ldr r3, [r4, #20] /* iterate over list, head to tail */ while ((ln != NULL) && (ln->objid != *ident)) 80346ba: e000 b.n 80346be { ln = ln->next; 80346bc: 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)) 80346be: 2b00 cmp r3, #0 80346c0: d0e4 beq.n 803468c 80346c2: 6899 ldr r1, [r3, #8] 80346c4: f858 2c04 ldr.w r2, [r8, #-4] 80346c8: 4291 cmp r1, r2 80346ca: d1f7 bne.n 80346bc 80346cc: e047 b.n 803475e /* 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) 80346ce: 2b05 cmp r3, #5 80346d0: d12e bne.n 8034730 { struct mib_external_node *en; u16_t i, len; if (ident_len > 0) 80346d2: 2d00 cmp r5, #0 80346d4: d0da beq.n 803468c { /* external node (addressing and access via functions) */ en = (struct mib_external_node *)node; i = 0; len = en->level_length(en->addr_inf,ext_level); 80346d6: 69e3 ldr r3, [r4, #28] 80346d8: 6960 ldr r0, [r4, #20] 80346da: 4659 mov r1, fp 80346dc: 4798 blx r3 if (ident_len > 0) { /* external node (addressing and access via functions) */ en = (struct mib_external_node *)node; i = 0; 80346de: f04f 0900 mov.w r9, #0 len = en->level_length(en->addr_inf,ext_level); 80346e2: 4684 mov ip, r0 while ((i < len) && (en->ident_cmp(en->addr_inf,ext_level,i,*ident) != 0)) 80346e4: e003 b.n 80346ee { i++; 80346e6: f109 0901 add.w r9, r9, #1 80346ea: 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)) 80346ee: 45e1 cmp r9, ip 80346f0: d0cc beq.n 803468c 80346f2: 6960 ldr r0, [r4, #20] 80346f4: f858 3c04 ldr.w r3, [r8, #-4] 80346f8: 6a27 ldr r7, [r4, #32] 80346fa: f8cd c004 str.w ip, [sp, #4] 80346fe: 4659 mov r1, fp 8034700: 464a mov r2, r9 8034702: 47b8 blx r7 8034704: f8dd c004 ldr.w ip, [sp, #4] 8034708: 2800 cmp r0, #0 803470a: d1ec bne.n 80346e6 { i++; } if (i < len) 803470c: 45e1 cmp r9, ip 803470e: d2bd bcs.n 803468c { s32_t debug_id; en->get_objid(en->addr_inf,ext_level,i,&debug_id); 8034710: 4659 mov r1, fp 8034712: ab03 add r3, sp, #12 8034714: 6a67 ldr r7, [r4, #36] ; 0x24 8034716: 6960 ldr r0, [r4, #20] 8034718: 464a mov r2, r9 803471a: 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) 803471c: 7e23 ldrb r3, [r4, #24] 803471e: f10b 0b01 add.w fp, fp, #1 8034722: 459b cmp fp, r3 8034724: d100 bne.n 8034728 8034726: e00b b.n 8034740 else { /* found it, proceed to child */ ident_len--; ident++; ext_level++; 8034728: fa5f fb8b uxtb.w fp, fp 803472c: 4623 mov r3, r4 803472e: e00c b.n 803474a /* 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) 8034730: 2b01 cmp r3, #1 8034732: d1ab bne.n 803468c { mib_scalar_node *sn; sn = (mib_scalar_node *)node; if ((ident_len == 1) && (*ident == 0)) 8034734: 2d01 cmp r5, #1 8034736: d1a9 bne.n 803468c 8034738: f8da 3000 ldr.w r3, [sl] 803473c: 2b00 cmp r3, #0 803473e: d1a5 bne.n 803468c { np->ident_len = ident_len; 8034740: 7035 strb r5, [r6, #0] np->ident = ident; 8034742: f8c6 a004 str.w sl, [r6, #4] return (struct mib_node*)sn; 8034746: 4620 mov r0, r4 8034748: e00d b.n 8034766 803474a: 3d01 subs r5, #1 803474c: b2ed uxtb r5, r5 803474e: f108 0804 add.w r8, r8, #4 8034752: 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) 8034754: 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) 8034758: 2c00 cmp r4, #0 803475a: d192 bne.n 8034682 803475c: e796 b.n 803468c } 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) 803475e: 68db ldr r3, [r3, #12] 8034760: 2b00 cmp r3, #0 8034762: d1f2 bne.n 803474a 8034764: e7ec b.n 8034740 } } /* done, found nothing */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("search failed node==%p\n",(void*)node)); return NULL; } 8034766: b005 add sp, #20 8034768: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0803476c : /** * Tree expansion. */ struct mib_node * snmp_expand_tree(struct mib_node *node, u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret) { 803476c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8034770: 461d mov r5, r3 8034772: b08b sub sp, #44 ; 0x2c u8_t node_type, ext_level, climb_tree; ext_level = 0; /* reset node stack */ node_stack_cnt = 0; 8034774: 4ba4 ldr r3, [pc, #656] ; (8034a08 ) 8034776: 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); 803477a: 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) { 803477c: 4604 mov r4, r0 803477e: 460e mov r6, r1 8034780: 4690 mov r8, r2 u8_t node_type, ext_level, climb_tree; ext_level = 0; /* reset node stack */ node_stack_cnt = 0; 8034782: 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); 8034786: 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) 8034788: e19c b.n 8034ac4 { climb_tree = 0; node_type = node->node_type; 803478a: 7c23 ldrb r3, [r4, #16] if ((node_type == MIB_NODE_AR) || (node_type == MIB_NODE_RA)) 803478c: 1e9a subs r2, r3, #2 803478e: 2a01 cmp r2, #1 8034790: f200 808f bhi.w 80348b2 8034794: 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) 8034796: b90e cbnz r6, 803479c else { u8_t j; /* ident_len == 0, complete with leftmost '.thing' */ j = 0; while ((j < an->maxlength) && empty_table(an->nptr[j])) 8034798: 46b1 mov r9, r6 803479a: e06f b.n 803487c /* 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)) 803479c: f04f 0c00 mov.w ip, #0 80347a0: fa1f f28c uxth.w r2, ip 80347a4: 42ba cmp r2, r7 80347a6: f080 8168 bcs.w 8034a7a 80347aa: 6963 ldr r3, [r4, #20] 80347ac: f853 102c ldr.w r1, [r3, ip, lsl #2] 80347b0: f8d8 3000 ldr.w r3, [r8] 80347b4: 4299 cmp r1, r3 80347b6: ea4f 098c mov.w r9, ip, lsl #2 80347ba: f10c 0c01 add.w ip, ip, #1 80347be: dbef blt.n 80347a0 } 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]; 80347c0: 782b ldrb r3, [r5, #0] 80347c2: eb05 0783 add.w r7, r5, r3, lsl #2 80347c6: 6079 str r1, [r7, #4] (oidret->len)++; 80347c8: 1c59 adds r1, r3, #1 80347ca: 7029 strb r1, [r5, #0] if (an->nptr[i] == NULL) 80347cc: f8d4 b018 ldr.w fp, [r4, #24] 80347d0: f85b 0009 ldr.w r0, [fp, r9] 80347d4: b998 cbnz r0, 80347fe { LWIP_DEBUGF(SNMP_MIB_DEBUG,("leaf node\n")); /* leaf node (e.g. in a fixed size table) */ if (an->objid[i] > *ident) 80347d6: 6960 ldr r0, [r4, #20] 80347d8: f850 6009 ldr.w r6, [r0, r9] 80347dc: f8d8 0000 ldr.w r0, [r8] 80347e0: 4286 cmp r6, r0 80347e2: f300 8173 bgt.w 8034acc { return (struct mib_node*)an; } else if ((i + 1) < an->maxlength) 80347e6: 8a60 ldrh r0, [r4, #18] { /* an->objid[i] == *ident */ (oidret->len)--; 80347e8: 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) 80347ea: 3201 adds r2, #1 80347ec: 4282 cmp r2, r0 80347ee: f280 8144 bge.w 8034a7a { /* an->objid[i] == *ident */ (oidret->len)--; oidret->id[oidret->len] = an->objid[i + 1]; 80347f2: 6963 ldr r3, [r4, #20] 80347f4: f853 302c ldr.w r3, [r3, ip, lsl #2] (oidret->len)++; 80347f8: 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]; 80347fa: 607b str r3, [r7, #4] 80347fc: e166 b.n 8034acc 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; 80347fe: 3201 adds r2, #1 while ((j < an->maxlength) && (empty_table(an->nptr[j]))) 8034800: 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; 8034802: fa5f fc82 uxtb.w ip, r2 while ((j < an->maxlength) && (empty_table(an->nptr[j]))) 8034806: 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) 8034808: eb0c 0307 add.w r3, ip, r7 803480c: 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]))) 803480e: 428b cmp r3, r1 8034810: d21a bcs.n 8034848 8034812: b21b sxth r3, r3 8034814: 009a lsls r2, r3, #2 8034816: f85b 3023 ldr.w r3, [fp, r3, lsl #2] 803481a: 9104 str r1, [sp, #16] 803481c: 4618 mov r0, r3 803481e: 9203 str r2, [sp, #12] 8034820: 9302 str r3, [sp, #8] 8034822: f8cd c004 str.w ip, [sp, #4] 8034826: f7ff fe23 bl 8034470 803482a: 3701 adds r7, #1 803482c: 9904 ldr r1, [sp, #16] 803482e: 9a03 ldr r2, [sp, #12] 8034830: 9b02 ldr r3, [sp, #8] 8034832: f8dd c004 ldr.w ip, [sp, #4] 8034836: 2800 cmp r0, #0 8034838: d1e6 bne.n 8034808 { j++; } if (j < an->maxlength) { cur_node.r_ptr = an->nptr[j]; 803483a: 9307 str r3, [sp, #28] cur_node.r_id = an->objid[j]; 803483c: 6963 ldr r3, [r4, #20] 803483e: 589b ldr r3, [r3, r2] cur_node.r_nl = 0; 8034840: 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]; 8034844: 9308 str r3, [sp, #32] 8034846: e001 b.n 803484c cur_node.r_nl = 0; } else { cur_node.r_ptr = NULL; 8034848: 2300 movs r3, #0 803484a: 9307 str r3, [sp, #28] } push_node(&cur_node); 803484c: a807 add r0, sp, #28 803484e: f7ff fdfb bl 8034448 if (an->objid[i] == *ident) 8034852: 6963 ldr r3, [r4, #20] 8034854: f853 2009 ldr.w r2, [r3, r9] 8034858: f8d8 3000 ldr.w r3, [r8] 803485c: 429a cmp r2, r3 803485e: d104 bne.n 803486a { ident_len--; 8034860: 3e01 subs r6, #1 8034862: b2f6 uxtb r6, r6 ident++; 8034864: f108 0804 add.w r8, r8, #4 8034868: e000 b.n 803486c } else { /* an->objid[i] < *ident */ ident_len = 0; 803486a: 2600 movs r6, #0 } /* follow next child pointer */ node = an->nptr[i]; 803486c: 69a3 ldr r3, [r4, #24] 803486e: f853 3009 ldr.w r3, [r3, r9] 8034872: e140 b.n 8034af6 u8_t j; /* ident_len == 0, complete with leftmost '.thing' */ j = 0; while ((j < an->maxlength) && empty_table(an->nptr[j])) { j++; 8034874: f109 0901 add.w r9, r9, #1 8034878: 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])) 803487c: 45b9 cmp r9, r7 803487e: f080 80fc bcs.w 8034a7a 8034882: fa0f f289 sxth.w r2, r9 8034886: 69a3 ldr r3, [r4, #24] 8034888: f853 0022 ldr.w r0, [r3, r2, lsl #2] 803488c: ea4f 0b82 mov.w fp, r2, lsl #2 8034890: f7ff fdee bl 8034470 8034894: 2800 cmp r0, #0 8034896: d1ed bne.n 8034874 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]; 8034898: 6962 ldr r2, [r4, #20] 803489a: 782b ldrb r3, [r5, #0] 803489c: f852 100b ldr.w r1, [r2, fp] 80348a0: eb05 0283 add.w r2, r5, r3, lsl #2 (oidret->len)++; 80348a4: 3301 adds r3, #1 80348a6: 702b strb r3, [r5, #0] if (an->nptr[j] == NULL) 80348a8: 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]; 80348aa: 6051 str r1, [r2, #4] (oidret->len)++; if (an->nptr[j] == NULL) 80348ac: f853 300b ldr.w r3, [r3, fp] 80348b0: e11f b.n 8034af2 /* j == an->maxlength */ climb_tree = 1; } } } else if(node_type == MIB_NODE_LR) 80348b2: 2b04 cmp r3, #4 80348b4: d14c bne.n 8034950 80348b6: 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) 80348b8: 2e00 cmp r6, #0 80348ba: d040 beq.n 803493e { ln = lrn->head; /* iterate over list, head to tail */ while ((ln != NULL) && (ln->objid < *ident)) 80348bc: e000 b.n 80348c0 { ln = ln->next; 80348be: 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)) 80348c0: 2f00 cmp r7, #0 80348c2: f000 80da beq.w 8034a7a 80348c6: 68ba ldr r2, [r7, #8] 80348c8: f8d8 3000 ldr.w r3, [r8] 80348cc: 429a cmp r2, r3 80348ce: dbf6 blt.n 80348be 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; 80348d0: 782b ldrb r3, [r5, #0] 80348d2: eb05 0183 add.w r1, r5, r3, lsl #2 80348d6: 604a str r2, [r1, #4] (oidret->len)++; 80348d8: 1c5a adds r2, r3, #1 80348da: 702a strb r2, [r5, #0] if (ln->nptr == NULL) 80348dc: 68f8 ldr r0, [r7, #12] 80348de: b978 cbnz r0, 8034900 { /* leaf node */ if (ln->objid > *ident) 80348e0: 68b8 ldr r0, [r7, #8] 80348e2: f8d8 6000 ldr.w r6, [r8] 80348e6: 42b0 cmp r0, r6 80348e8: f300 80f0 bgt.w 8034acc { return (struct mib_node*)lrn; } else if (ln->next != NULL) 80348ec: 6878 ldr r0, [r7, #4] { /* ln->objid == *ident */ (oidret->len)--; 80348ee: 702b strb r3, [r5, #0] /* leaf node */ if (ln->objid > *ident) { return (struct mib_node*)lrn; } else if (ln->next != NULL) 80348f0: 2800 cmp r0, #0 80348f2: f000 80c2 beq.w 8034a7a { /* ln->objid == *ident */ (oidret->len)--; oidret->id[oidret->len] = ln->next->objid; 80348f6: 687b ldr r3, [r7, #4] 80348f8: 689b ldr r3, [r3, #8] (oidret->len)++; 80348fa: 702a strb r2, [r5, #0] } else if (ln->next != NULL) { /* ln->objid == *ident */ (oidret->len)--; oidret->id[oidret->len] = ln->next->objid; 80348fc: 604b str r3, [r1, #4] 80348fe: e0e5 b.n 8034acc { struct mib_list_node *jn; struct nse cur_node; /* non-leaf, store right child ptr and id */ jn = ln->next; 8034900: 687c ldr r4, [r7, #4] while ((jn != NULL) && empty_table(jn->nptr)) 8034902: e000 b.n 8034906 { jn = jn->next; 8034904: 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)) 8034906: 2c00 cmp r4, #0 8034908: f000 80e9 beq.w 8034ade 803490c: f8d4 900c ldr.w r9, [r4, #12] 8034910: 4648 mov r0, r9 8034912: f7ff fdad bl 8034470 8034916: 2800 cmp r0, #0 8034918: d1f4 bne.n 8034904 803491a: e0d9 b.n 8034ad0 } else { cur_node.r_ptr = NULL; } push_node(&cur_node); 803491c: a807 add r0, sp, #28 803491e: f7ff fd93 bl 8034448 if (ln->objid == *ident) 8034922: 68ba ldr r2, [r7, #8] 8034924: f8d8 3000 ldr.w r3, [r8] 8034928: 429a cmp r2, r3 803492a: d104 bne.n 8034936 { ident_len--; 803492c: 3e01 subs r6, #1 803492e: b2f6 uxtb r6, r6 ident++; 8034930: f108 0804 add.w r8, r8, #4 8034934: e000 b.n 8034938 } else { /* ln->objid < *ident */ ident_len = 0; 8034936: 2600 movs r6, #0 } /* follow next child pointer */ node = ln->nptr; 8034938: 68fb ldr r3, [r7, #12] 803493a: e0dc b.n 8034af6 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; 803493c: 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)) 803493e: 2f00 cmp r7, #0 8034940: f000 809b beq.w 8034a7a 8034944: 68f8 ldr r0, [r7, #12] 8034946: f7ff fd93 bl 8034470 803494a: 2800 cmp r0, #0 803494c: d1f6 bne.n 803493c 803494e: e0c8 b.n 8034ae2 /* jn == NULL */ climb_tree = 1; } } } else if(node_type == MIB_NODE_EX) 8034950: 2b05 cmp r3, #5 8034952: f040 8086 bne.w 8034a62 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) 8034956: 2e00 cmp r6, #0 8034958: d06e beq.n 8034a38 { u16_t i, len; i = 0; len = en->level_length(en->addr_inf,ext_level); 803495a: 69e3 ldr r3, [r4, #28] 803495c: 6960 ldr r0, [r4, #20] 803495e: 4651 mov r1, sl 8034960: 4798 blx r3 en = (struct mib_external_node *)node; if (ident_len > 0) { u16_t i, len; i = 0; 8034962: f04f 0900 mov.w r9, #0 len = en->level_length(en->addr_inf,ext_level); 8034966: 4683 mov fp, r0 while ((i < len) && (en->ident_cmp(en->addr_inf,ext_level,i,*ident) < 0)) 8034968: e003 b.n 8034972 { i++; 803496a: f109 0901 add.w r9, r9, #1 803496e: 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)) 8034972: 45d9 cmp r9, fp 8034974: f000 8081 beq.w 8034a7a 8034978: 6a27 ldr r7, [r4, #32] 803497a: 6960 ldr r0, [r4, #20] 803497c: f8d8 3000 ldr.w r3, [r8] 8034980: 4651 mov r1, sl 8034982: 464a mov r2, r9 8034984: 47b8 blx r7 8034986: 2800 cmp r0, #0 8034988: dbef blt.n 803496a { i++; } if (i < len) 803498a: 45d9 cmp r9, fp 803498c: d275 bcs.n 8034a7a { /* add identifier to oidret */ en->get_objid(en->addr_inf,ext_level,i,&ex_id); 803498e: 4651 mov r1, sl 8034990: 464a mov r2, r9 8034992: ab06 add r3, sp, #24 8034994: 6a67 ldr r7, [r4, #36] ; 0x24 8034996: 6960 ldr r0, [r4, #20] 8034998: 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; 803499a: 782b ldrb r3, [r5, #0] 803499c: 9a06 ldr r2, [sp, #24] 803499e: eb05 0183 add.w r1, r5, r3, lsl #2 (oidret->len)++; if ((ext_level + 1) == en->tree_levels) 80349a2: 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; 80349a6: 604a str r2, [r1, #4] (oidret->len)++; 80349a8: 1c59 adds r1, r3, #1 80349aa: 7029 strb r1, [r5, #0] if ((ext_level + 1) == en->tree_levels) 80349ac: 7e21 ldrb r1, [r4, #24] 80349ae: 458c cmp ip, r1 80349b0: d118 bne.n 80349e4 { LWIP_DEBUGF(SNMP_MIB_DEBUG,("leaf node\n")); /* leaf node */ if (ex_id > *ident) 80349b2: f8d8 1000 ldr.w r1, [r8] 80349b6: 428a cmp r2, r1 80349b8: f300 8088 bgt.w 8034acc { return (struct mib_node*)en; } else if ((i + 1) < len) 80349bc: f109 0201 add.w r2, r9, #1 80349c0: 455a cmp r2, fp 80349c2: da0d bge.n 80349e0 { /* ex_id == *ident */ en->get_objid(en->addr_inf,ext_level,i + 1,&ex_id); 80349c4: ab06 add r3, sp, #24 80349c6: 6a66 ldr r6, [r4, #36] ; 0x24 80349c8: 6960 ldr r0, [r4, #20] 80349ca: 4651 mov r1, sl 80349cc: b292 uxth r2, r2 80349ce: 47b0 blx r6 (oidret->len)--; 80349d0: 782b ldrb r3, [r5, #0] 80349d2: 3b01 subs r3, #1 oidret->id[oidret->len] = ex_id; 80349d4: b2db uxtb r3, r3 80349d6: eb05 0583 add.w r5, r5, r3, lsl #2 80349da: 9b06 ldr r3, [sp, #24] 80349dc: 606b str r3, [r5, #4] 80349de: e075 b.n 8034acc return (struct mib_node*)en; } else { /* (i + 1) == len */ (oidret->len)--; 80349e0: 702b strb r3, [r5, #0] 80349e2: e04a b.n 8034a7a 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; 80349e4: f109 0201 add.w r2, r9, #1 if (j < len) 80349e8: b2d2 uxtb r2, r2 80349ea: 455a cmp r2, fp 80349ec: d20e bcs.n 8034a0c { /* right node is the current external node */ cur_node.r_ptr = node; 80349ee: 9407 str r4, [sp, #28] en->get_objid(en->addr_inf,ext_level,j,&cur_node.r_id); 80349f0: 6960 ldr r0, [r4, #20] 80349f2: 9b05 ldr r3, [sp, #20] 80349f4: f8cd c004 str.w ip, [sp, #4] 80349f8: 4651 mov r1, sl 80349fa: 6a67 ldr r7, [r4, #36] ; 0x24 80349fc: 47b8 blx r7 cur_node.r_nl = ext_level + 1; 80349fe: f8dd c004 ldr.w ip, [sp, #4] 8034a02: f88d c024 strb.w ip, [sp, #36] ; 0x24 8034a06: e003 b.n 8034a10 8034a08: 2000c57c .word 0x2000c57c } else { cur_node.r_ptr = NULL; 8034a0c: 2300 movs r3, #0 8034a0e: 9307 str r3, [sp, #28] } push_node(&cur_node); 8034a10: a807 add r0, sp, #28 8034a12: f7ff fd19 bl 8034448 if (en->ident_cmp(en->addr_inf,ext_level,i,*ident) == 0) 8034a16: 6a27 ldr r7, [r4, #32] 8034a18: 6960 ldr r0, [r4, #20] 8034a1a: f8d8 3000 ldr.w r3, [r8] 8034a1e: 4651 mov r1, sl 8034a20: 464a mov r2, r9 8034a22: 47b8 blx r7 8034a24: b920 cbnz r0, 8034a30 { ident_len--; 8034a26: 3e01 subs r6, #1 8034a28: b2f6 uxtb r6, r6 ident++; 8034a2a: f108 0804 add.w r8, r8, #4 8034a2e: e000 b.n 8034a32 } else { /* external id < *ident */ ident_len = 0; 8034a30: 2600 movs r6, #0 } /* proceed to child */ ext_level++; 8034a32: f10a 0a01 add.w sl, sl, #1 8034a36: e011 b.n 8034a5c } } else { /* ident_len == 0, complete with leftmost '.thing' */ en->get_objid(en->addr_inf,ext_level,0,&ex_id); 8034a38: 4651 mov r1, sl 8034a3a: 4632 mov r2, r6 8034a3c: ab06 add r3, sp, #24 8034a3e: 6a67 ldr r7, [r4, #36] ; 0x24 8034a40: 6960 ldr r0, [r4, #20] 8034a42: 47b8 blx r7 LWIP_DEBUGF(SNMP_MIB_DEBUG,("left en->objid==%"S32_F"\n",ex_id)); oidret->id[oidret->len] = ex_id; 8034a44: 782b ldrb r3, [r5, #0] 8034a46: 9a06 ldr r2, [sp, #24] 8034a48: eb05 0183 add.w r1, r5, r3, lsl #2 (oidret->len)++; 8034a4c: 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; 8034a4e: 604a str r2, [r1, #4] (oidret->len)++; 8034a50: 702b strb r3, [r5, #0] if ((ext_level + 1) == en->tree_levels) 8034a52: 7e23 ldrb r3, [r4, #24] 8034a54: f10a 0a01 add.w sl, sl, #1 8034a58: 459a cmp sl, r3 8034a5a: d037 beq.n 8034acc return (struct mib_node*)en; } else { /* no leaf, proceed to child */ ext_level++; 8034a5c: fa5f fa8a uxtb.w sl, sl 8034a60: e030 b.n 8034ac4 } } } else if(node_type == MIB_NODE_SC) 8034a62: 2b01 cmp r3, #1 8034a64: d001 beq.n 8034a6a } else { /* unknown/unhandled node_type */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("expand failed node_type %"U16_F" unkown\n",(u16_t)node_type)); return NULL; 8034a66: 2000 movs r0, #0 8034a68: e047 b.n 8034afa { mib_scalar_node *sn; /* scalar node */ sn = (mib_scalar_node *)node; if (ident_len > 0) 8034a6a: b936 cbnz r6, 8034a7a climb_tree = 1; } else { /* ident_len == 0, complete object identifier */ oidret->id[oidret->len] = 0; 8034a6c: 782b ldrb r3, [r5, #0] 8034a6e: eb05 0283 add.w r2, r5, r3, lsl #2 (oidret->len)++; 8034a72: 3301 adds r3, #1 climb_tree = 1; } else { /* ident_len == 0, complete object identifier */ oidret->id[oidret->len] = 0; 8034a74: 6056 str r6, [r2, #4] (oidret->len)++; 8034a76: 702b strb r3, [r5, #0] 8034a78: e028 b.n 8034acc 8034a7a: 4921 ldr r1, [pc, #132] ; (8034b00 ) struct nse child; /* find right child ptr */ child.r_ptr = NULL; child.r_id = 0; child.r_nl = 0; 8034a7c: f04f 0a00 mov.w sl, #0 8034a80: 780b ldrb r3, [r1, #0] pop_node(struct nse* node) { if (node_stack_cnt > 0) { node_stack_cnt--; *node = node_stack[node_stack_cnt]; 8034a82: 4920 ldr r1, [pc, #128] ; (8034b04 ) { struct nse child; /* find right child ptr */ child.r_ptr = NULL; child.r_id = 0; 8034a84: 4652 mov r2, sl if (climb_tree) { struct nse child; /* find right child ptr */ child.r_ptr = NULL; 8034a86: 4654 mov r4, sl pop_node(struct nse* node) { if (node_stack_cnt > 0) { node_stack_cnt--; *node = node_stack[node_stack_cnt]; 8034a88: 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)) 8034a8a: e00b b.n 8034aa4 static void pop_node(struct nse* node) { if (node_stack_cnt > 0) { node_stack_cnt--; 8034a8c: 3b01 subs r3, #1 8034a8e: b2db uxtb r3, r3 *node = node_stack[node_stack_cnt]; 8034a90: fb06 f203 mul.w r2, r6, r3 8034a94: 1888 adds r0, r1, r2 8034a96: 588c ldr r4, [r1, r2] 8034a98: f890 a008 ldrb.w sl, [r0, #8] 8034a9c: 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)--; 8034a9e: 7828 ldrb r0, [r5, #0] 8034aa0: 3801 subs r0, #1 8034aa2: 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)) 8034aa4: b91b cbnz r3, 8034aae 8034aa6: 4f16 ldr r7, [pc, #88] ; (8034b00 ) 8034aa8: 703b strb r3, [r7, #0] { pop_node(&child); /* trim returned oid */ (oidret->len)--; } if (child.r_ptr != NULL) 8034aaa: b924 cbnz r4, 8034ab6 8034aac: e7db b.n 8034a66 /* 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)) 8034aae: 2c00 cmp r4, #0 8034ab0: d0ec beq.n 8034a8c 8034ab2: 4913 ldr r1, [pc, #76] ; (8034b00 ) 8034ab4: 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; 8034ab6: 782b ldrb r3, [r5, #0] 8034ab8: eb05 0183 add.w r1, r5, r3, lsl #2 oidret->len++; 8034abc: 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; 8034abe: 604a str r2, [r1, #4] oidret->len++; 8034ac0: 702b strb r3, [r5, #0] (oidret->len)--; } if (child.r_ptr != NULL) { /* incoming ident is useless beyond this point */ ident_len = 0; 8034ac2: 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) 8034ac4: 2c00 cmp r4, #0 8034ac6: f47f ae60 bne.w 803478a 8034aca: e7cc b.n 8034a66 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) 8034acc: 4620 mov r0, r4 8034ace: e014 b.n 8034afa jn = jn->next; } if (jn != NULL) { cur_node.r_ptr = jn->nptr; cur_node.r_id = jn->objid; 8034ad0: 68a3 ldr r3, [r4, #8] { jn = jn->next; } if (jn != NULL) { cur_node.r_ptr = jn->nptr; 8034ad2: f8cd 901c str.w r9, [sp, #28] cur_node.r_id = jn->objid; 8034ad6: 9308 str r3, [sp, #32] cur_node.r_nl = 0; 8034ad8: f88d 0024 strb.w r0, [sp, #36] ; 0x24 8034adc: e71e b.n 803491c } else { cur_node.r_ptr = NULL; 8034ade: 9407 str r4, [sp, #28] 8034ae0: e71c b.n 803491c 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; 8034ae2: 782b ldrb r3, [r5, #0] 8034ae4: 68ba ldr r2, [r7, #8] 8034ae6: eb05 0183 add.w r1, r5, r3, lsl #2 (oidret->len)++; 8034aea: 3301 adds r3, #1 8034aec: 702b strb r3, [r5, #0] if (jn->nptr == NULL) 8034aee: 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; 8034af0: 604a str r2, [r1, #4] (oidret->len)++; if (jn->nptr == NULL) 8034af2: 2b00 cmp r3, #0 8034af4: d0ea beq.n 8034acc (oidret->len)--; } if (child.r_ptr != NULL) { /* incoming ident is useless beyond this point */ ident_len = 0; 8034af6: 461c mov r4, r3 8034af8: e7e4 b.n 8034ac4 } } /* done, found nothing */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("expand failed node==%p\n",(void*)node)); return NULL; } 8034afa: b00b add sp, #44 ; 0x2c 8034afc: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8034b00: 2000c57c .word 0x2000c57c 8034b04: 2000c580 .word 0x2000c580 08034b08 : * @return 1 if it matches, 0 otherwise */ u8_t snmp_iso_prefix_tst(u8_t ident_len, s32_t *ident) { if ((ident_len > 3) && 8034b08: 2803 cmp r0, #3 8034b0a: d90d bls.n 8034b28 8034b0c: 680b ldr r3, [r1, #0] 8034b0e: 2b01 cmp r3, #1 8034b10: d10a bne.n 8034b28 (ident[0] == 1) && (ident[1] == 3) && 8034b12: 684b ldr r3, [r1, #4] 8034b14: 2b03 cmp r3, #3 8034b16: d107 bne.n 8034b28 8034b18: 688b ldr r3, [r1, #8] 8034b1a: 2b06 cmp r3, #6 8034b1c: d104 bne.n 8034b28 (ident[2] == 6) && (ident[3] == 1)) 8034b1e: 68c8 ldr r0, [r1, #12] { return 1; 8034b20: 1e43 subs r3, r0, #1 8034b22: 4258 negs r0, r3 8034b24: 4158 adcs r0, r3 8034b26: 4770 bx lr } else { return 0; 8034b28: 2000 movs r0, #0 } } 8034b2a: 4770 bx lr 08034b2c : 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))) 8034b2c: 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) { 8034b2e: 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]; 8034b32: 1d15 adds r5, r2, #4 ident_len = ((ident_len < 4)?ident_len:4); 8034b34: 2804 cmp r0, #4 8034b36: bf34 ite cc 8034b38: 4680 movcc r8, r0 8034b3a: f04f 0804 movcs.w r8, #4 { const s32_t *prefix_ptr; s32_t *ret_ptr; u8_t i; i = 0; 8034b3e: 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) 8034b40: 4f10 ldr r7, [pc, #64] ; (8034b84 ) 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))) 8034b42: e003 b.n 8034b4c { *ret_ptr++ = *prefix_ptr++; ident++; i++; 8034b44: 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++; 8034b46: 50ee str r6, [r5, r3] ident++; i++; 8034b48: b2e4 uxtb r4, r4 8034b4a: 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))) 8034b4c: 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) 8034b4e: eb05 0c03 add.w ip, r5, r3 8034b52: 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))) 8034b56: d101 bne.n 8034b5c 8034b58: 2300 movs r3, #0 8034b5a: e00c b.n 8034b76 8034b5c: 59de ldr r6, [r3, r7] 8034b5e: 58c8 ldr r0, [r1, r3] 8034b60: 42b0 cmp r0, r6 8034b62: ddef ble.n 8034b44 return 1; } else { /* i != ident_len */ return 0; 8034b64: 2000 movs r0, #0 8034b66: 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++; 8034b6a: 58f1 ldr r1, [r6, r3] i++; 8034b6c: 3401 adds r4, #1 if (i == ident_len) { /* match, complete missing bits */ while (i < 4) { *ret_ptr++ = *prefix_ptr++; 8034b6e: f84c 1003 str.w r1, [ip, r3] i++; 8034b72: b2e4 uxtb r4, r4 8034b74: 3304 adds r3, #4 i++; } if (i == ident_len) { /* match, complete missing bits */ while (i < 4) 8034b76: 2c03 cmp r4, #3 8034b78: d9f7 bls.n 8034b6a { *ret_ptr++ = *prefix_ptr++; i++; } oidret->len = i; 8034b7a: 7014 strb r4, [r2, #0] return 1; 8034b7c: 2001 movs r0, #1 else { /* i != ident_len */ return 0; } } 8034b7e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8034b82: bf00 nop 8034b84: 080448f8 .word 0x080448f8 08034b88 : * Starts SNMP Agent. * Allocates UDP pcb and binds it to IP_ADDR_ANY port 161. */ void snmp_init(void) { 8034b88: b510 push {r4, lr} struct snmp_msg_pstat *msg_ps; u8_t i; snmp1_pcb = udp_new(); 8034b8a: f7fd fa1d bl 8031fc8 8034b8e: 4c0b ldr r4, [pc, #44] ; (8034bbc ) 8034b90: 6020 str r0, [r4, #0] if (snmp1_pcb != NULL) 8034b92: b140 cbz r0, 8034ba6 { udp_recv(snmp1_pcb, snmp_recv, (void *)SNMP_IN_PORT); 8034b94: 490a ldr r1, [pc, #40] ; (8034bc0 ) 8034b96: 22a1 movs r2, #161 ; 0xa1 8034b98: f7fd f9f6 bl 8031f88 udp_bind(snmp1_pcb, IP_ADDR_ANY, SNMP_IN_PORT); 8034b9c: 6820 ldr r0, [r4, #0] 8034b9e: 4909 ldr r1, [pc, #36] ; (8034bc4 ) 8034ba0: 22a1 movs r2, #161 ; 0xa1 8034ba2: f7fd f8f9 bl 8031d98 } msg_ps = &msg_input_list[0]; for (i=0; istate = SNMP_MSG_EMPTY; 8034ba6: 4b08 ldr r3, [pc, #32] ; (8034bc8 ) 8034ba8: 2200 movs r2, #0 8034baa: f883 205a strb.w r2, [r3, #90] ; 0x5a msg_ps->error_index = 0; 8034bae: 615a str r2, [r3, #20] msg_ps->error_status = SNMP_ES_NOERROR; 8034bb0: 611a str r2, [r3, #16] msg_ps++; } trap_msg.pcb = snmp1_pcb; 8034bb2: 4b02 ldr r3, [pc, #8] ; (8034bbc ) 8034bb4: 681a ldr r2, [r3, #0] 8034bb6: 4b05 ldr r3, [pc, #20] ; (8034bcc ) 8034bb8: 601a str r2, [r3, #0] 8034bba: bd10 pop {r4, pc} 8034bbc: 2000f6dc .word 0x2000f6dc 8034bc0: 08035735 .word 0x08035735 8034bc4: 08043fe4 .word 0x08043fe4 8034bc8: 2000f6e0 .word 0x2000f6e0 8034bcc: 2000f818 .word 0x2000f818 08034bd0 : return ERR_OK; } struct snmp_varbind* snmp_varbind_alloc(struct snmp_obj_id *oid, u8_t type, u8_t len) { 8034bd0: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 8034bd4: 4680 mov r8, r0 struct snmp_varbind *vb; vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 8034bd6: 200c movs r0, #12 return ERR_OK; } struct snmp_varbind* snmp_varbind_alloc(struct snmp_obj_id *oid, u8_t type, u8_t len) { 8034bd8: 4689 mov r9, r1 8034bda: 4617 mov r7, r2 struct snmp_varbind *vb; vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 8034bdc: f7fa fb6c bl 802f2b8 if (vb != NULL) 8034be0: 4604 mov r4, r0 8034be2: 2800 cmp r0, #0 8034be4: d032 beq.n 8034c4c { u8_t i; vb->next = NULL; 8034be6: 2300 movs r3, #0 8034be8: 6003 str r3, [r0, #0] vb->prev = NULL; 8034bea: 6043 str r3, [r0, #4] i = oid->len; 8034bec: f898 5000 ldrb.w r5, [r8] vb->ident_len = i; 8034bf0: 7205 strb r5, [r0, #8] if (i > 0) 8034bf2: b1ad cbz r5, 8034c20 { 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); 8034bf4: 200d movs r0, #13 8034bf6: f7fa fb5f bl 802f2b8 8034bfa: 4606 mov r6, r0 8034bfc: 60e0 str r0, [r4, #12] if (vb->ident == NULL) 8034bfe: b928 cbnz r0, 8034c0c { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_varbind_alloc: couldn't allocate ident value space\n")); memp_free(MEMP_SNMP_VARBIND, vb); 8034c00: 4621 mov r1, r4 8034c02: 200c movs r0, #12 8034c04: f7fa fb6e bl 802f2e4 return NULL; 8034c08: 4634 mov r4, r6 8034c0a: e01f b.n 8034c4c } while(i > 0) { i--; 8034c0c: 3d01 subs r5, #1 8034c0e: b2ed uxtb r5, r5 vb->ident[i] = oid->id[i]; 8034c10: eb08 0385 add.w r3, r8, r5, lsl #2 8034c14: 685b ldr r3, [r3, #4] 8034c16: 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) 8034c1a: 2d00 cmp r5, #0 8034c1c: d1f6 bne.n 8034c0c 8034c1e: e000 b.n 8034c22 } } else { /* i == 0, pass zero length object identifier */ vb->ident = NULL; 8034c20: 60c5 str r5, [r0, #12] } vb->value_type = type; 8034c22: f884 9010 strb.w r9, [r4, #16] vb->value_len = len; 8034c26: 7467 strb r7, [r4, #17] if (len > 0) 8034c28: b17f cbz r7, 8034c4a { 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); 8034c2a: 200d movs r0, #13 8034c2c: f7fa fb44 bl 802f2b8 8034c30: 6160 str r0, [r4, #20] if (vb->value == NULL) 8034c32: b958 cbnz r0, 8034c4c { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_varbind_alloc: couldn't allocate value space\n")); if (vb->ident != NULL) 8034c34: 68e1 ldr r1, [r4, #12] 8034c36: b111 cbz r1, 8034c3e { memp_free(MEMP_SNMP_VALUE, vb->ident); 8034c38: 200d movs r0, #13 8034c3a: f7fa fb53 bl 802f2e4 } memp_free(MEMP_SNMP_VARBIND, vb); 8034c3e: 4621 mov r1, r4 8034c40: 200c movs r0, #12 8034c42: f7fa fb4f bl 802f2e4 return NULL; 8034c46: 2400 movs r4, #0 8034c48: e000 b.n 8034c4c } } else { /* ASN1_NUL type, or zero length ASN1_OC_STR */ vb->value = NULL; 8034c4a: 6167 str r7, [r4, #20] else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_varbind_alloc: couldn't allocate varbind space\n")); } return vb; } 8034c4c: 4620 mov r0, r4 8034c4e: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 08034c52 : void snmp_varbind_free(struct snmp_varbind *vb) { if (vb->value != NULL ) 8034c52: 6941 ldr r1, [r0, #20] return vb; } void snmp_varbind_free(struct snmp_varbind *vb) { 8034c54: b510 push {r4, lr} 8034c56: 4604 mov r4, r0 if (vb->value != NULL ) 8034c58: b111 cbz r1, 8034c60 { memp_free(MEMP_SNMP_VALUE, vb->value); 8034c5a: 200d movs r0, #13 8034c5c: f7fa fb42 bl 802f2e4 } if (vb->ident != NULL ) 8034c60: 68e1 ldr r1, [r4, #12] 8034c62: b111 cbz r1, 8034c6a { memp_free(MEMP_SNMP_VALUE, vb->ident); 8034c64: 200d movs r0, #13 8034c66: f7fa fb3d bl 802f2e4 } memp_free(MEMP_SNMP_VARBIND, vb); 8034c6a: 200c movs r0, #12 8034c6c: 4621 mov r1, r4 } 8034c6e: e8bd 4010 ldmia.w sp!, {r4, lr} } if (vb->ident != NULL ) { memp_free(MEMP_SNMP_VALUE, vb->ident); } memp_free(MEMP_SNMP_VARBIND, vb); 8034c72: f7fa bb37 b.w 802f2e4 08034c76 : } void snmp_varbind_list_free(struct snmp_varbind_root *root) { 8034c76: b538 push {r3, r4, r5, lr} 8034c78: 4604 mov r4, r0 struct snmp_varbind *vb, *prev; vb = root->tail; 8034c7a: 6840 ldr r0, [r0, #4] while ( vb != NULL ) 8034c7c: e003 b.n 8034c86 { prev = vb->prev; 8034c7e: 6845 ldr r5, [r0, #4] snmp_varbind_free(vb); 8034c80: f7ff ffe7 bl 8034c52 vb = prev; 8034c84: 4628 mov r0, r5 snmp_varbind_list_free(struct snmp_varbind_root *root) { struct snmp_varbind *vb, *prev; vb = root->tail; while ( vb != NULL ) 8034c86: 2800 cmp r0, #0 8034c88: d1f9 bne.n 8034c7e { prev = vb->prev; snmp_varbind_free(vb); vb = prev; } root->count = 0; 8034c8a: 7220 strb r0, [r4, #8] root->head = NULL; 8034c8c: 6020 str r0, [r4, #0] root->tail = NULL; 8034c8e: 6060 str r0, [r4, #4] 8034c90: bd38 pop {r3, r4, r5, pc} 08034c92 : //snmp_coldstart_trap(); } static void snmp_error_response(struct snmp_msg_pstat *msg_ps, u8_t error) { 8034c92: b570 push {r4, r5, r6, lr} 8034c94: 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++) { 8034c96: 2200 movs r2, #0 //snmp_coldstart_trap(); } static void snmp_error_response(struct snmp_msg_pstat *msg_ps, u8_t error) { 8034c98: 460e mov r6, r1 /* move names back from outvb to invb */ int v; struct snmp_varbind *vbi = msg_ps->invb.head; 8034c9a: f8d0 0100 ldr.w r0, [r0, #256] ; 0x100 struct snmp_varbind *vbo = msg_ps->outvb.head; 8034c9e: f8d4 310c ldr.w r3, [r4, #268] ; 0x10c for (v=0; vvb_idx; v++) { vbi->ident_len = vbo->ident_len; vbo->ident_len = 0; 8034ca2: 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++) { 8034ca4: e008 b.n 8034cb8 vbi->ident_len = vbo->ident_len; 8034ca6: 7a1d ldrb r5, [r3, #8] 8034ca8: 7205 strb r5, [r0, #8] vbo->ident_len = 0; vbi->ident = vbo->ident; 8034caa: 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; 8034cac: 7219 strb r1, [r3, #8] vbi->ident = vbo->ident; 8034cae: 60c5 str r5, [r0, #12] vbo->ident = NULL; 8034cb0: 60d9 str r1, [r3, #12] vbi = vbi->next; 8034cb2: 6800 ldr r0, [r0, #0] vbo = vbo->next; 8034cb4: 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++) { 8034cb6: 3201 adds r2, #1 8034cb8: f894 50f8 ldrb.w r5, [r4, #248] ; 0xf8 8034cbc: 42aa cmp r2, r5 8034cbe: dbf2 blt.n 8034ca6 vbo->ident = NULL; vbi = vbi->next; vbo = vbo->next; } /* free outvb */ snmp_varbind_list_free(&msg_ps->outvb); 8034cc0: f504 7586 add.w r5, r4, #268 ; 0x10c 8034cc4: 4628 mov r0, r5 8034cc6: f7ff ffd6 bl 8034c76 /* we send invb back */ msg_ps->outvb = msg_ps->invb; 8034cca: f504 7380 add.w r3, r4, #256 ; 0x100 8034cce: e893 0007 ldmia.w r3, {r0, r1, r2} msg_ps->invb.head = NULL; 8034cd2: 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; 8034cd4: 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; 8034cd6: f8c4 3100 str.w r3, [r4, #256] ; 0x100 msg_ps->invb.tail = NULL; 8034cda: f8c4 3104 str.w r3, [r4, #260] ; 0x104 msg_ps->invb.count = 0; 8034cde: 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; 8034ce2: bf18 it ne 8034ce4: 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; 8034ce8: 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; 8034cea: bf18 it ne 8034cec: 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; 8034cee: 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; 8034cf2: 6163 str r3, [r4, #20] snmp_send_response(msg_ps); 8034cf4: 4620 mov r0, r4 8034cf6: f001 f877 bl 8035de8 snmp_varbind_list_free(&msg_ps->outvb); 8034cfa: 4628 mov r0, r5 8034cfc: f7ff ffbb bl 8034c76 msg_ps->state = SNMP_MSG_EMPTY; 8034d00: 2300 movs r3, #0 8034d02: f884 305a strb.w r3, [r4, #90] ; 0x5a 8034d06: bd70 pop {r4, r5, r6, pc} 08034d08 : } static void snmp_ok_response(struct snmp_msg_pstat *msg_ps) { 8034d08: b510 push {r4, lr} 8034d0a: 4604 mov r4, r0 err_t err_ret; err_ret = snmp_send_response(msg_ps); 8034d0c: f001 f86c bl 8035de8 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); 8034d10: f504 7080 add.w r0, r4, #256 ; 0x100 8034d14: f7ff ffaf bl 8034c76 snmp_varbind_list_free(&msg_ps->outvb); 8034d18: f504 7086 add.w r0, r4, #268 ; 0x10c 8034d1c: f7ff ffab bl 8034c76 msg_ps->state = SNMP_MSG_EMPTY; 8034d20: 2300 movs r3, #0 8034d22: f884 305a strb.w r3, [r4, #90] ; 0x5a 8034d26: bd10 pop {r4, pc} 08034d28 : } void snmp_varbind_tail_add(struct snmp_varbind_root *root, struct snmp_varbind *vb) { if (root->count == 0) 8034d28: 7a03 ldrb r3, [r0, #8] 8034d2a: b90b cbnz r3, 8034d30 { /* add first varbind to list */ root->head = vb; 8034d2c: 6001 str r1, [r0, #0] 8034d2e: e002 b.n 8034d36 root->tail = vb; } else { /* add nth varbind to list tail */ root->tail->next = vb; 8034d30: 6843 ldr r3, [r0, #4] 8034d32: 6019 str r1, [r3, #0] vb->prev = root->tail; 8034d34: 604b str r3, [r1, #4] root->tail = vb; } root->count += 1; 8034d36: 7a03 ldrb r3, [r0, #8] else { /* add nth varbind to list tail */ root->tail->next = vb; vb->prev = root->tail; root->tail = vb; 8034d38: 6041 str r1, [r0, #4] } root->count += 1; 8034d3a: 3301 adds r3, #1 8034d3c: 7203 strb r3, [r0, #8] 8034d3e: 4770 bx lr 08034d40 : * * @param request_id identifies requests from 0 to (SNMP_CONCURRENT_REQUESTS-1) */ void snmp_msg_event(u8_t request_id) { 8034d40: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} struct snmp_msg_pstat *msg_ps; if (request_id < SNMP_CONCURRENT_REQUESTS) 8034d44: 4605 mov r5, r0 * * @param request_id identifies requests from 0 to (SNMP_CONCURRENT_REQUESTS-1) */ void snmp_msg_event(u8_t request_id) { 8034d46: b0a7 sub sp, #156 ; 0x9c struct snmp_msg_pstat *msg_ps; if (request_id < SNMP_CONCURRENT_REQUESTS) 8034d48: 2800 cmp r0, #0 8034d4a: f040 8390 bne.w 803546e { msg_ps = &msg_input_list[request_id]; if (msg_ps->rt == SNMP_ASN1_PDU_GET_NEXT_REQ) 8034d4e: 4cb2 ldr r4, [pc, #712] ; (8035018 ) 8034d50: 7aa6 ldrb r6, [r4, #10] 8034d52: 2e01 cmp r6, #1 8034d54: f040 80d4 bne.w 8034f00 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) 8034d58: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 8034d5c: 2b07 cmp r3, #7 8034d5e: d125 bne.n 8034dac /* 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); 8034d60: 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; 8034d64: 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); 8034d68: eb04 0282 add.w r2, r4, r2, lsl #2 8034d6c: 4631 mov r1, r6 8034d6e: 3274 adds r2, #116 ; 0x74 8034d70: f104 0368 add.w r3, r4, #104 ; 0x68 8034d74: f8d8 7038 ldr.w r7, [r8, #56] ; 0x38 8034d78: 47b8 blx r7 if (msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) 8034d7a: f894 0068 ldrb.w r0, [r4, #104] ; 0x68 8034d7e: b148 cbz r0, 8034d94 { msg_ps->state = SNMP_MSG_EXTERNAL_GET_VALUE; 8034d80: 2308 movs r3, #8 8034d82: f884 305a strb.w r3, [r4, #90] ; 0x5a en->get_value_q(request_id, &msg_ps->ext_object_def); 8034d86: f8d8 302c ldr.w r3, [r8, #44] ; 0x2c 8034d8a: 4628 mov r0, r5 8034d8c: f104 0168 add.w r1, r4, #104 ; 0x68 8034d90: 4798 blx r3 8034d92: e0a6 b.n 8034ee2 } else { en->get_object_def_pc(request_id, 1, &msg_ps->ext_oid.id[msg_ps->ext_oid.len - 1]); 8034d94: f894 2074 ldrb.w r2, [r4, #116] ; 0x74 8034d98: f8d8 3048 ldr.w r3, [r8, #72] ; 0x48 8034d9c: eb04 0282 add.w r2, r4, r2, lsl #2 8034da0: 4631 mov r1, r6 8034da2: 3274 adds r2, #116 ; 0x74 8034da4: 4798 blx r3 /* search failed, object id points to unknown object (nosuchname) */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 8034da6: 4620 mov r0, r4 8034da8: 2102 movs r1, #2 8034daa: e02a b.n 8034e02 } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_VALUE) 8034dac: 2b08 cmp r3, #8 8034dae: f040 8098 bne.w 8034ee2 /* 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, 8034db2: f104 0074 add.w r0, r4, #116 ; 0x74 8034db6: f894 106a ldrb.w r1, [r4, #106] ; 0x6a 8034dba: 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; 8034dbe: 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, 8034dc2: f7ff ff05 bl 8034bd0 msg_ps->ext_object_def.asn_type, (u8_t)msg_ps->ext_object_def.v_len); if (vb != NULL) 8034dc6: 4607 mov r7, r0 8034dc8: b1a0 cbz r0, 8034df4 { en->get_value_a(request_id, &msg_ps->ext_object_def, vb->value_len, vb->value); 8034dca: 697b ldr r3, [r7, #20] 8034dcc: f8d8 c03c ldr.w ip, [r8, #60] ; 0x3c 8034dd0: 7c7a ldrb r2, [r7, #17] 8034dd2: 4628 mov r0, r5 8034dd4: f104 0168 add.w r1, r4, #104 ; 0x68 8034dd8: 47e0 blx ip snmp_varbind_tail_add(&msg_ps->outvb, vb); 8034dda: f504 7086 add.w r0, r4, #268 ; 0x10c 8034dde: 4639 mov r1, r7 8034de0: f7ff ffa2 bl 8034d28 msg_ps->state = SNMP_MSG_SEARCH_OBJ; msg_ps->vb_idx += 1; 8034de4: 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; 8034de8: f884 605a strb.w r6, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8034dec: 3301 adds r3, #1 8034dee: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8034df2: e076 b.n 8034ee2 } else { en->get_value_pc(request_id, &msg_ps->ext_object_def); 8034df4: f104 0168 add.w r1, r4, #104 ; 0x68 8034df8: f8d8 304c ldr.w r3, [r8, #76] ; 0x4c 8034dfc: 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); 8034dfe: 4620 mov r0, r4 8034e00: 4631 mov r1, r6 8034e02: f7ff ff46 bl 8034c92 8034e06: e06c b.n 8034ee2 (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_obj_id oid; if (msg_ps->vb_idx == 0) 8034e08: b913 cbnz r3, 8034e10 { msg_ps->vb_ptr = msg_ps->invb.head; 8034e0a: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 8034e0e: e002 b.n 8034e16 } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 8034e10: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8034e14: 681b ldr r3, [r3, #0] 8034e16: 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)) 8034e1a: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8034e1e: aa05 add r2, sp, #20 8034e20: 7a18 ldrb r0, [r3, #8] 8034e22: 68d9 ldr r1, [r3, #12] 8034e24: f7ff fe82 bl 8034b2c 8034e28: 2800 cmp r0, #0 8034e2a: f000 82ff beq.w 803542c { if (msg_ps->vb_ptr->ident_len > 3) 8034e2e: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8034e32: 7a19 ldrb r1, [r3, #8] 8034e34: 2903 cmp r1, #3 8034e36: d905 bls.n 8034e44 { /* can offset ident_len and ident */ mn = snmp_expand_tree((struct mib_node*)&internet, 8034e38: 68da ldr r2, [r3, #12] 8034e3a: 4878 ldr r0, [pc, #480] ; (803501c ) 8034e3c: 3904 subs r1, #4 8034e3e: b2c9 uxtb r1, r1 8034e40: 3210 adds r2, #16 8034e42: e002 b.n 8034e4a 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); 8034e44: 2100 movs r1, #0 8034e46: 4875 ldr r0, [pc, #468] ; (803501c ) 8034e48: 460a mov r2, r1 8034e4a: ab05 add r3, sp, #20 8034e4c: f7ff fc8e bl 803476c 8034e50: 4605 mov r5, r0 } else { mn = NULL; } if (mn != NULL) 8034e52: 2800 cmp r0, #0 8034e54: f000 82ea beq.w 803542c { if (mn->node_type == MIB_NODE_EX) 8034e58: 7c03 ldrb r3, [r0, #16] 8034e5a: 2b05 cmp r3, #5 8034e5c: d113 bne.n 8034e86 { /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; 8034e5e: 2307 movs r3, #7 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; 8034e60: 65e0 str r0, [r4, #92] ; 0x5c msg_ps->ext_oid = oid; 8034e62: a905 add r1, sp, #20 8034e64: 2284 movs r2, #132 ; 0x84 8034e66: 486e ldr r0, [pc, #440] ; (8035020 ) 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; 8034e68: 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; 8034e6c: f7ec fede bl 8021c2c en->get_object_def_q(en->addr_inf, request_id, 1, &oid.id[oid.len - 1]); 8034e70: f89d 3014 ldrb.w r3, [sp, #20] 8034e74: 6aae ldr r6, [r5, #40] ; 0x28 8034e76: 6968 ldr r0, [r5, #20] 8034e78: ad05 add r5, sp, #20 8034e7a: 2100 movs r1, #0 8034e7c: 2201 movs r2, #1 8034e7e: eb05 0383 add.w r3, r5, r3, lsl #2 8034e82: 47b0 blx r6 8034e84: e02e b.n 8034ee4 { /* internal object */ struct obj_def object_def; struct snmp_varbind *vb; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; 8034e86: 2302 movs r3, #2 mn->get_object_def(1, &oid.id[oid.len - 1], &object_def); 8034e88: 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; 8034e8c: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_object_def(1, &oid.id[oid.len - 1], &object_def); 8034e90: af05 add r7, sp, #20 8034e92: 6803 ldr r3, [r0, #0] 8034e94: eb07 0181 add.w r1, r7, r1, lsl #2 8034e98: 2001 movs r0, #1 8034e9a: aa02 add r2, sp, #8 8034e9c: 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); 8034e9e: a805 add r0, sp, #20 8034ea0: f89d 100a ldrb.w r1, [sp, #10] 8034ea4: f89d 200c ldrb.w r2, [sp, #12] 8034ea8: f7ff fe92 bl 8034bd0 if (vb != NULL) 8034eac: 4606 mov r6, r0 8034eae: b1a8 cbz r0, 8034edc { msg_ps->state = SNMP_MSG_INTERNAL_GET_VALUE; 8034eb0: 2303 movs r3, #3 8034eb2: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_value(&object_def, object_def.v_len, vb->value); 8034eb6: 686b ldr r3, [r5, #4] 8034eb8: f8bd 100c ldrh.w r1, [sp, #12] 8034ebc: 6972 ldr r2, [r6, #20] 8034ebe: a802 add r0, sp, #8 8034ec0: 4798 blx r3 snmp_varbind_tail_add(&msg_ps->outvb, vb); 8034ec2: 4858 ldr r0, [pc, #352] ; (8035024 ) 8034ec4: 4631 mov r1, r6 8034ec6: f7ff ff2f bl 8034d28 msg_ps->state = SNMP_MSG_SEARCH_OBJ; 8034eca: 2301 movs r3, #1 8034ecc: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8034ed0: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8034ed4: 3301 adds r3, #1 8034ed6: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8034eda: e003 b.n 8034ee4 } else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_recv couldn't allocate outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); 8034edc: 484e ldr r0, [pc, #312] ; (8035018 ) 8034ede: 2101 movs r1, #1 8034ee0: e2a6 b.n 8035430 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) && 8034ee2: 4c4d ldr r4, [pc, #308] ; (8035018 ) 8034ee4: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 8034ee8: 2b01 cmp r3, #1 8034eea: f040 82c0 bne.w 803546e (msg_ps->vb_idx < msg_ps->invb.count)) 8034eee: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8034ef2: 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) && 8034ef6: 4293 cmp r3, r2 8034ef8: d386 bcc.n 8034e08 8034efa: e2a7 b.n 803544c } } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && (msg_ps->vb_idx == msg_ps->invb.count)) { snmp_ok_response(msg_ps); 8034efc: 4846 ldr r0, [pc, #280] ; (8035018 ) 8034efe: e292 b.n 8035426 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) 8034f00: 2e00 cmp r6, #0 8034f02: f040 8126 bne.w 8035152 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) 8034f06: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 8034f0a: 2b07 cmp r3, #7 8034f0c: d122 bne.n 8034f54 { struct mib_external_node *en; struct snmp_name_ptr np; /* get_object_def() answer*/ en = msg_ps->ext_mib_node; 8034f0e: 6de5 ldr r5, [r4, #92] ; 0x5c np = msg_ps->ext_name_ptr; 8034f10: f894 9060 ldrb.w r9, [r4, #96] ; 0x60 8034f14: 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); 8034f18: 6baf ldr r7, [r5, #56] ; 0x38 8034f1a: f104 0368 add.w r3, r4, #104 ; 0x68 8034f1e: 4649 mov r1, r9 8034f20: 4642 mov r2, r8 8034f22: 47b8 blx r7 if ((msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) && 8034f24: f894 3068 ldrb.w r3, [r4, #104] ; 0x68 8034f28: b163 cbz r3, 8034f44 (msg_ps->ext_object_def.access & MIB_ACCESS_READ)) 8034f2a: 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) && 8034f2e: 07da lsls r2, r3, #31 8034f30: d508 bpl.n 8034f44 (msg_ps->ext_object_def.access & MIB_ACCESS_READ)) { msg_ps->state = SNMP_MSG_EXTERNAL_GET_VALUE; 8034f32: 2308 movs r3, #8 8034f34: f884 305a strb.w r3, [r4, #90] ; 0x5a en->get_value_q(request_id, &msg_ps->ext_object_def); 8034f38: 6aeb ldr r3, [r5, #44] ; 0x2c 8034f3a: 4630 mov r0, r6 8034f3c: f104 0168 add.w r1, r4, #104 ; 0x68 8034f40: 4798 blx r3 8034f42: e0f7 b.n 8035134 } else { en->get_object_def_pc(request_id, np.ident_len, np.ident); 8034f44: 2000 movs r0, #0 8034f46: 4649 mov r1, r9 8034f48: 6cab ldr r3, [r5, #72] ; 0x48 8034f4a: 4642 mov r2, r8 8034f4c: 4798 blx r3 /* search failed, object id points to unknown object (nosuchname) */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 8034f4e: 4832 ldr r0, [pc, #200] ; (8035018 ) 8034f50: 2102 movs r1, #2 8034f52: e059 b.n 8035008 } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_VALUE) 8034f54: 2b08 cmp r3, #8 8034f56: f040 80ed bne.w 8035134 /* get_value() answer */ en = msg_ps->ext_mib_node; /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 8034f5a: 200c movs r0, #12 { struct mib_external_node *en; struct snmp_varbind *vb; /* get_value() answer */ en = msg_ps->ext_mib_node; 8034f5c: f8d4 805c ldr.w r8, [r4, #92] ; 0x5c /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 8034f60: f7fa f9aa bl 802f2b8 if (vb != NULL) 8034f64: 4605 mov r5, r0 8034f66: 2800 cmp r0, #0 8034f68: d047 beq.n 8034ffa { vb->next = NULL; 8034f6a: 6006 str r6, [r0, #0] vb->prev = NULL; 8034f6c: 6046 str r6, [r0, #4] /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 8034f6e: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8034f72: 68da ldr r2, [r3, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 8034f74: 7a1b ldrb r3, [r3, #8] { vb->next = NULL; vb->prev = NULL; /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 8034f76: 60c2 str r2, [r0, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 8034f78: 7203 strb r3, [r0, #8] /* ensure this memory is refereced once only */ msg_ps->vb_ptr->ident = NULL; 8034f7a: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc msg_ps->vb_ptr->ident_len = 0; 8034f7e: 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; 8034f80: 60de str r6, [r3, #12] msg_ps->vb_ptr->ident_len = 0; vb->value_type = msg_ps->ext_object_def.asn_type; 8034f82: f894 306a ldrb.w r3, [r4, #106] ; 0x6a 8034f86: 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; 8034f88: f894 706c ldrb.w r7, [r4, #108] ; 0x6c 8034f8c: 7447 strb r7, [r0, #17] if (vb->value_len > 0) 8034f8e: b1ef cbz r7, 8034fcc { 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); 8034f90: 200d movs r0, #13 8034f92: f7fa f991 bl 802f2b8 8034f96: 4603 mov r3, r0 8034f98: 6168 str r0, [r5, #20] if (vb->value != NULL) 8034f9a: b138 cbz r0, 8034fac { en->get_value_a(request_id, &msg_ps->ext_object_def, vb->value_len, vb->value); 8034f9c: f8d8 703c ldr.w r7, [r8, #60] ; 0x3c 8034fa0: 7c6a ldrb r2, [r5, #17] 8034fa2: 4630 mov r0, r6 8034fa4: f104 0168 add.w r1, r4, #104 ; 0x68 8034fa8: 47b8 blx r7 8034faa: e018 b.n 8034fde msg_ps->state = SNMP_MSG_SEARCH_OBJ; msg_ps->vb_idx += 1; } else { en->get_value_pc(request_id, &msg_ps->ext_object_def); 8034fac: f8d8 304c ldr.w r3, [r8, #76] ; 0x4c 8034fb0: f104 0168 add.w r1, r4, #104 ; 0x68 8034fb4: 4798 blx r3 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: no variable space\n")); msg_ps->vb_ptr->ident = vb->ident; 8034fb6: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8034fba: 68ea ldr r2, [r5, #12] 8034fbc: 60da str r2, [r3, #12] msg_ps->vb_ptr->ident_len = vb->ident_len; 8034fbe: 7a2a ldrb r2, [r5, #8] memp_free(MEMP_SNMP_VARBIND, vb); 8034fc0: 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; 8034fc2: 721a strb r2, [r3, #8] memp_free(MEMP_SNMP_VARBIND, vb); 8034fc4: 4629 mov r1, r5 8034fc6: f7fa f98d bl 802f2e4 8034fca: e01b b.n 8035004 } } else { /* vb->value_len == 0, empty value (e.g. empty string) */ en->get_value_a(request_id, &msg_ps->ext_object_def, 0, NULL); 8034fcc: f8d8 603c ldr.w r6, [r8, #60] ; 0x3c 8034fd0: 4638 mov r0, r7 8034fd2: f104 0168 add.w r1, r4, #104 ; 0x68 8034fd6: 463a mov r2, r7 8034fd8: 463b mov r3, r7 8034fda: 47b0 blx r6 vb->value = NULL; 8034fdc: 616f str r7, [r5, #20] snmp_varbind_tail_add(&msg_ps->outvb, vb); 8034fde: f504 7086 add.w r0, r4, #268 ; 0x10c 8034fe2: 4629 mov r1, r5 8034fe4: f7ff fea0 bl 8034d28 /* search again (if vb_idx < msg_ps->invb.count) */ msg_ps->state = SNMP_MSG_SEARCH_OBJ; 8034fe8: 2301 movs r3, #1 8034fea: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8034fee: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8034ff2: 3301 adds r3, #1 8034ff4: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8034ff8: e09c b.n 8035134 } } else { en->get_value_pc(request_id, &msg_ps->ext_object_def); 8034ffa: f8d8 304c ldr.w r3, [r8, #76] ; 0x4c 8034ffe: f104 0168 add.w r1, r4, #104 ; 0x68 8035002: 4798 blx r3 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: no outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); 8035004: 4620 mov r0, r4 8035006: 2101 movs r1, #1 8035008: f7ff fe43 bl 8034c92 803500c: e092 b.n 8035134 (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_name_ptr np; if (msg_ps->vb_idx == 0) 803500e: b95b cbnz r3, 8035028 { msg_ps->vb_ptr = msg_ps->invb.head; 8035010: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 8035014: e00b b.n 803502e 8035016: bf00 nop 8035018: 2000f6e0 .word 0x2000f6e0 803501c: 08044810 .word 0x08044810 8035020: 2000f754 .word 0x2000f754 8035024: 2000f7ec .word 0x2000f7ec } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 8035028: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 803502c: 681b ldr r3, [r3, #0] 803502e: 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)) 8035032: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035036: 7a18 ldrb r0, [r3, #8] 8035038: 68d9 ldr r1, [r3, #12] 803503a: f7ff fd65 bl 8034b08 803503e: 2800 cmp r0, #0 8035040: d073 beq.n 803512a { mn = snmp_search_tree((struct mib_node*)&internet, msg_ps->vb_ptr->ident_len - 4, 8035042: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035046: 48a6 ldr r0, [pc, #664] ; (80352e0 ) 8035048: 7a19 ldrb r1, [r3, #8] 803504a: 68da ldr r2, [r3, #12] 803504c: 3904 subs r1, #4 803504e: b2c9 uxtb r1, r1 8035050: 3210 adds r2, #16 8035052: 466b mov r3, sp 8035054: f7ff fb0a bl 803466c msg_ps->vb_ptr->ident + 4, &np); if (mn != NULL) 8035058: 4606 mov r6, r0 803505a: 2800 cmp r0, #0 803505c: d065 beq.n 803512a { if (mn->node_type == MIB_NODE_EX) 803505e: 7c03 ldrb r3, [r0, #16] 8035060: 2b05 cmp r3, #5 8035062: d110 bne.n 8035086 /* 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; 8035064: 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; 8035066: 2307 movs r3, #7 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 8035068: 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; 803506c: 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; 8035070: 4b9c ldr r3, [pc, #624] ; (80352e4 ) en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 8035072: 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; 8035076: e883 0003 stmia.w r3, {r0, r1} en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 803507a: 2100 movs r1, #0 803507c: 6ab5 ldr r5, [r6, #40] ; 0x28 803507e: 6970 ldr r0, [r6, #20] 8035080: 9b01 ldr r3, [sp, #4] 8035082: 47a8 blx r5 8035084: e058 b.n 8035138 else { /* internal object */ struct obj_def object_def; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; 8035086: 2302 movs r3, #2 8035088: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_object_def(np.ident_len, np.ident, &object_def); 803508c: 6803 ldr r3, [r0, #0] 803508e: 9901 ldr r1, [sp, #4] 8035090: f89d 0000 ldrb.w r0, [sp] 8035094: aa02 add r2, sp, #8 8035096: 4798 blx r3 if ((object_def.instance != MIB_OBJECT_NONE) && 8035098: f89d 3008 ldrb.w r3, [sp, #8] 803509c: 2b00 cmp r3, #0 803509e: d044 beq.n 803512a (object_def.access & MIB_ACCESS_READ)) 80350a0: 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) && 80350a4: 07db lsls r3, r3, #31 80350a6: f100 81c6 bmi.w 8035436 80350aa: e03e b.n 803512a 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; 80350ac: 2200 movs r2, #0 80350ae: 602a str r2, [r5, #0] vb->prev = NULL; 80350b0: 606a str r2, [r5, #4] /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 80350b2: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80350b6: 68d9 ldr r1, [r3, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 80350b8: 7a1b ldrb r3, [r3, #8] { vb->next = NULL; vb->prev = NULL; /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 80350ba: 60e9 str r1, [r5, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 80350bc: 722b strb r3, [r5, #8] /* ensure this memory is refereced once only */ msg_ps->vb_ptr->ident = NULL; 80350be: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc msg_ps->vb_ptr->ident_len = 0; 80350c2: 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; 80350c4: 60da str r2, [r3, #12] msg_ps->vb_ptr->ident_len = 0; vb->value_type = object_def.asn_type; 80350c6: f89d 300a ldrb.w r3, [sp, #10] 80350ca: 742b strb r3, [r5, #16] LWIP_ASSERT("invalid length", object_def.v_len <= 0xff); vb->value_len = (u8_t)object_def.v_len; 80350cc: f89d 300c ldrb.w r3, [sp, #12] 80350d0: 746b strb r3, [r5, #17] if (vb->value_len > 0) 80350d2: b1bb cbz r3, 8035104 { 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); 80350d4: 200d movs r0, #13 80350d6: f7fa f8ef bl 802f2b8 80350da: 4602 mov r2, r0 80350dc: 6168 str r0, [r5, #20] if (vb->value != NULL) 80350de: b120 cbz r0, 80350ea { mn->get_value(&object_def, vb->value_len, vb->value); 80350e0: 6877 ldr r7, [r6, #4] 80350e2: 7c69 ldrb r1, [r5, #17] 80350e4: a802 add r0, sp, #8 80350e6: 47b8 blx r7 80350e8: e00d b.n 8035106 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; 80350ea: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80350ee: 68e9 ldr r1, [r5, #12] 80350f0: 60d9 str r1, [r3, #12] msg_ps->vb_ptr->ident_len = vb->ident_len; 80350f2: 7a29 ldrb r1, [r5, #8] vb->ident = NULL; 80350f4: 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; 80350f6: 7219 strb r1, [r3, #8] vb->ident = NULL; vb->ident_len = 0; 80350f8: 7228 strb r0, [r5, #8] memp_free(MEMP_SNMP_VARBIND, vb); 80350fa: 4629 mov r1, r5 80350fc: 200c movs r0, #12 80350fe: f7fa f8f1 bl 802f2e4 8035102: e00d b.n 8035120 } } else { /* vb->value_len == 0, empty value (e.g. empty string) */ vb->value = NULL; 8035104: 616b str r3, [r5, #20] snmp_varbind_tail_add(&msg_ps->outvb, vb); 8035106: 4878 ldr r0, [pc, #480] ; (80352e8 ) 8035108: 4629 mov r1, r5 803510a: f7ff fe0d bl 8034d28 msg_ps->state = SNMP_MSG_SEARCH_OBJ; 803510e: 2301 movs r3, #1 8035110: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8035114: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035118: 3301 adds r3, #1 803511a: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 803511e: e003 b.n 8035128 } } else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: couldn't allocate outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); 8035120: 4872 ldr r0, [pc, #456] ; (80352ec ) 8035122: 2101 movs r1, #1 8035124: f7ff fdb5 bl 8034c92 } else { mn = NULL; } if (mn == NULL) 8035128: b936 cbnz r6, 8035138 { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 803512a: 4870 ldr r0, [pc, #448] ; (80352ec ) 803512c: 2102 movs r1, #2 803512e: f7ff fdb0 bl 8034c92 8035132: e001 b.n 8035138 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) && 8035134: 4c6d ldr r4, [pc, #436] ; (80352ec ) 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, 8035136: 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) && 8035138: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 803513c: 2b01 cmp r3, #1 803513e: f040 8196 bne.w 803546e (msg_ps->vb_idx < msg_ps->invb.count)) 8035142: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035146: 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) && 803514a: 4293 cmp r3, r2 803514c: f4ff af5f bcc.w 803500e 8035150: e17c b.n 803544c } 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) 8035152: 2e03 cmp r6, #3 8035154: f040 818b bne.w 803546e 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) 8035158: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 803515c: 2b07 cmp r3, #7 803515e: d11b bne.n 8035198 { struct mib_external_node *en; struct snmp_name_ptr np; /* get_object_def() answer*/ en = msg_ps->ext_mib_node; 8035160: 6de6 ldr r6, [r4, #92] ; 0x5c np = msg_ps->ext_name_ptr; 8035162: f894 9060 ldrb.w r9, [r4, #96] ; 0x60 8035166: 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); 803516a: 6bb7 ldr r7, [r6, #56] ; 0x38 803516c: 4649 mov r1, r9 803516e: 4642 mov r2, r8 8035170: f104 0368 add.w r3, r4, #104 ; 0x68 8035174: 47b8 blx r7 if (msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) 8035176: f894 0068 ldrb.w r0, [r4, #104] ; 0x68 803517a: b140 cbz r0, 803518e { msg_ps->state = SNMP_MSG_EXTERNAL_SET_TEST; 803517c: 2309 movs r3, #9 803517e: f884 305a strb.w r3, [r4, #90] ; 0x5a en->set_test_q(request_id, &msg_ps->ext_object_def); 8035182: 6b33 ldr r3, [r6, #48] ; 0x30 8035184: 4628 mov r0, r5 8035186: f104 0168 add.w r1, r4, #104 ; 0x68 803518a: 4798 blx r3 803518c: e0d5 b.n 803533a } else { en->get_object_def_pc(request_id, np.ident_len, np.ident); 803518e: 6cb3 ldr r3, [r6, #72] ; 0x48 8035190: 4649 mov r1, r9 8035192: 4642 mov r2, r8 8035194: 4798 blx r3 8035196: e023 b.n 80351e0 /* 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) 8035198: 2b09 cmp r3, #9 803519a: d124 bne.n 80351e6 struct mib_external_node *en; /* set_test() answer*/ en = msg_ps->ext_mib_node; if (msg_ps->ext_object_def.access & MIB_ACCESS_WRITE) 803519c: 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; 80351a0: 6de5 ldr r5, [r4, #92] ; 0x5c if (msg_ps->ext_object_def.access & MIB_ACCESS_WRITE) 80351a2: f003 0302 and.w r3, r3, #2 80351a6: b2db uxtb r3, r3 80351a8: b1b3 cbz r3, 80351d8 { if ((msg_ps->ext_object_def.asn_type == msg_ps->vb_ptr->value_type) && 80351aa: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80351ae: f894 106a ldrb.w r1, [r4, #106] ; 0x6a 80351b2: 7c1a ldrb r2, [r3, #16] 80351b4: 4291 cmp r1, r2 80351b6: d108 bne.n 80351ca (en->set_test_a(request_id,&msg_ps->ext_object_def, 80351b8: 7c5a ldrb r2, [r3, #17] 80351ba: 6c2e ldr r6, [r5, #64] ; 0x40 80351bc: 695b ldr r3, [r3, #20] 80351be: f104 0168 add.w r1, r4, #104 ; 0x68 80351c2: 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) && 80351c4: b108 cbz r0, 80351ca (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; 80351c6: 2301 movs r3, #1 80351c8: e040 b.n 803524c msg_ps->vb_idx += 1; } else { en->set_test_pc(request_id,&msg_ps->ext_object_def); 80351ca: 2000 movs r0, #0 80351cc: 4948 ldr r1, [pc, #288] ; (80352f0 ) 80351ce: 6d2b ldr r3, [r5, #80] ; 0x50 80351d0: 4798 blx r3 /* bad value */ snmp_error_response(msg_ps,SNMP_ES_BADVALUE); 80351d2: 4846 ldr r0, [pc, #280] ; (80352ec ) 80351d4: 2103 movs r1, #3 80351d6: e029 b.n 803522c } } else { en->set_test_pc(request_id,&msg_ps->ext_object_def); 80351d8: 6d2b ldr r3, [r5, #80] ; 0x50 80351da: f104 0168 add.w r1, r4, #104 ; 0x68 80351de: 4798 blx r3 /* object not available for set */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 80351e0: 4620 mov r0, r4 80351e2: 2102 movs r1, #2 80351e4: e022 b.n 803522c } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_OBJDEF_S) 80351e6: 2b0a cmp r3, #10 80351e8: d123 bne.n 8035232 { struct mib_external_node *en; struct snmp_name_ptr np; /* get_object_def() answer*/ en = msg_ps->ext_mib_node; 80351ea: 6de6 ldr r6, [r4, #92] ; 0x5c np = msg_ps->ext_name_ptr; 80351ec: f894 9060 ldrb.w r9, [r4, #96] ; 0x60 80351f0: 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); 80351f4: 6bb7 ldr r7, [r6, #56] ; 0x38 80351f6: 4649 mov r1, r9 80351f8: 4642 mov r2, r8 80351fa: f104 0368 add.w r3, r4, #104 ; 0x68 80351fe: 47b8 blx r7 if (msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) 8035200: f894 0068 ldrb.w r0, [r4, #104] ; 0x68 8035204: b160 cbz r0, 8035220 { msg_ps->state = SNMP_MSG_EXTERNAL_SET_VALUE; 8035206: 230b movs r3, #11 8035208: 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); 803520c: 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, 8035210: 6b76 ldr r6, [r6, #52] ; 0x34 8035212: 7c5a ldrb r2, [r3, #17] 8035214: 695b ldr r3, [r3, #20] 8035216: 4628 mov r0, r5 8035218: f104 0168 add.w r1, r4, #104 ; 0x68 803521c: 47b0 blx r6 803521e: e08c b.n 803533a msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value); } else { en->get_object_def_pc(request_id, np.ident_len, np.ident); 8035220: 4649 mov r1, r9 8035222: 6cb3 ldr r3, [r6, #72] ; 0x48 8035224: 4642 mov r2, r8 8035226: 4798 blx r3 /* set_value failed, object has disappeared for some odd reason?? */ snmp_error_response(msg_ps,SNMP_ES_GENERROR); 8035228: 4620 mov r0, r4 803522a: 2105 movs r1, #5 803522c: f7ff fd31 bl 8034c92 8035230: e083 b.n 803533a } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_SET_VALUE) 8035232: 2b0b cmp r3, #11 8035234: f040 8081 bne.w 803533a 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); 8035238: 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, 803523c: 6de2 ldr r2, [r4, #92] ; 0x5c 803523e: f104 0168 add.w r1, r4, #104 ; 0x68 8035242: 6c55 ldr r5, [r2, #68] ; 0x44 8035244: 7c5a ldrb r2, [r3, #17] 8035246: 695b ldr r3, [r3, #20] 8035248: 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; 803524a: 2306 movs r3, #6 803524c: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8035250: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035254: 3301 adds r3, #1 8035256: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 803525a: e06e b.n 803533a (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_name_ptr np; if (msg_ps->vb_idx == 0) 803525c: b912 cbnz r2, 8035264 { msg_ps->vb_ptr = msg_ps->invb.head; 803525e: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 8035262: e002 b.n 803526a } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 8035264: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035268: 681b ldr r3, [r3, #0] 803526a: 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)) 803526e: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035272: 7a18 ldrb r0, [r3, #8] 8035274: 68d9 ldr r1, [r3, #12] 8035276: f7ff fc47 bl 8034b08 803527a: 2800 cmp r0, #0 803527c: d058 beq.n 8035330 { mn = snmp_search_tree((struct mib_node*)&internet, msg_ps->vb_ptr->ident_len - 4, 803527e: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035282: 4817 ldr r0, [pc, #92] ; (80352e0 ) 8035284: 7a19 ldrb r1, [r3, #8] 8035286: 68da ldr r2, [r3, #12] 8035288: 3904 subs r1, #4 803528a: b2c9 uxtb r1, r1 803528c: 3210 adds r2, #16 803528e: 466b mov r3, sp 8035290: f7ff f9ec bl 803466c msg_ps->vb_ptr->ident + 4, &np); if (mn != NULL) 8035294: 4605 mov r5, r0 8035296: 2800 cmp r0, #0 8035298: d04a beq.n 8035330 { if (mn->node_type == MIB_NODE_EX) 803529a: 7c03 ldrb r3, [r0, #16] 803529c: 2b05 cmp r3, #5 803529e: d110 bne.n 80352c2 /* 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; 80352a0: 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; 80352a2: 2307 movs r3, #7 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 80352a4: 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; 80352a8: 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; 80352ac: 4b0d ldr r3, [pc, #52] ; (80352e4 ) en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 80352ae: 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; 80352b2: e883 0003 stmia.w r3, {r0, r1} en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 80352b6: 2100 movs r1, #0 80352b8: 6aaf ldr r7, [r5, #40] ; 0x28 80352ba: 6968 ldr r0, [r5, #20] 80352bc: 9b01 ldr r3, [sp, #4] 80352be: 47b8 blx r7 80352c0: e03d b.n 803533e else { /* internal object */ struct obj_def object_def; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; 80352c2: 2702 movs r7, #2 80352c4: f884 705a strb.w r7, [r4, #90] ; 0x5a mn->get_object_def(np.ident_len, np.ident, &object_def); 80352c8: 6803 ldr r3, [r0, #0] 80352ca: 9901 ldr r1, [sp, #4] 80352cc: f89d 0000 ldrb.w r0, [sp] 80352d0: aa02 add r2, sp, #8 80352d2: 4798 blx r3 if (object_def.instance != MIB_OBJECT_NONE) 80352d4: f89d 3008 ldrb.w r3, [sp, #8] 80352d8: 2b00 cmp r3, #0 80352da: f040 80b9 bne.w 8035450 80352de: e027 b.n 8035330 80352e0: 08044810 .word 0x08044810 80352e4: 2000f740 .word 0x2000f740 80352e8: 2000f7ec .word 0x2000f7ec 80352ec: 2000f6e0 .word 0x2000f6e0 80352f0: 2000f748 .word 0x2000f748 { 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) && 80352f4: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80352f8: f89d 100a ldrb.w r1, [sp, #10] 80352fc: 7c1a ldrb r2, [r3, #16] 80352fe: 4291 cmp r1, r2 8035300: d10e bne.n 8035320 (mn->set_test(&object_def,msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value) != 0)) 8035302: 68af ldr r7, [r5, #8] 8035304: 7c59 ldrb r1, [r3, #17] 8035306: 695a ldr r2, [r3, #20] 8035308: a802 add r0, sp, #8 803530a: 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) && 803530c: b140 cbz r0, 8035320 (mn->set_test(&object_def,msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value) != 0)) { msg_ps->state = SNMP_MSG_SEARCH_OBJ; 803530e: 2301 movs r3, #1 8035310: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8035314: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035318: 3301 adds r3, #1 803531a: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 803531e: e006 b.n 803532e } else { /* bad value */ snmp_error_response(msg_ps,SNMP_ES_BADVALUE); 8035320: 4854 ldr r0, [pc, #336] ; (8035474 ) 8035322: 2103 movs r1, #3 8035324: e001 b.n 803532a } } else { /* object not available for set */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 8035326: 4853 ldr r0, [pc, #332] ; (8035474 ) 8035328: 4639 mov r1, r7 803532a: f7ff fcb2 bl 8034c92 } else { mn = NULL; } if (mn == NULL) 803532e: b935 cbnz r5, 803533e { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 8035330: 4850 ldr r0, [pc, #320] ; (8035474 ) 8035332: 2102 movs r1, #2 8035334: f7ff fcad bl 8034c92 8035338: e001 b.n 803533e 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) && 803533a: 4c4e ldr r4, [pc, #312] ; (8035474 ) 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, 803533c: 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) && 803533e: f894 205a ldrb.w r2, [r4, #90] ; 0x5a 8035342: 4b4c ldr r3, [pc, #304] ; (8035474 ) 8035344: 2a01 cmp r2, #1 8035346: d151 bne.n 80353ec (msg_ps->vb_idx < msg_ps->invb.count)) 8035348: f894 20f8 ldrb.w r2, [r4, #248] ; 0xf8 803534c: 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) && 8035350: 428a cmp r2, r1 8035352: d383 bcc.n 803525c 8035354: e088 b.n 8035468 } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && (msg_ps->vb_idx == msg_ps->invb.count)) { msg_ps->vb_idx = 0; 8035356: 2200 movs r2, #0 8035358: f883 20f8 strb.w r2, [r3, #248] ; 0xf8 msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; 803535c: 2206 movs r2, #6 803535e: f883 205a strb.w r2, [r3, #90] ; 0x5a 8035362: e043 b.n 80353ec (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_name_ptr np; if (msg_ps->vb_idx == 0) 8035364: b913 cbnz r3, 803536c { msg_ps->vb_ptr = msg_ps->invb.head; 8035366: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 803536a: e002 b.n 8035372 } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 803536c: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035370: 681b ldr r3, [r3, #0] 8035372: 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, 8035376: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 803537a: 483f ldr r0, [pc, #252] ; (8035478 ) 803537c: 7a19 ldrb r1, [r3, #8] 803537e: 68da ldr r2, [r3, #12] 8035380: 3904 subs r1, #4 8035382: b2c9 uxtb r1, r1 8035384: 3210 adds r2, #16 8035386: 466b mov r3, sp 8035388: f7ff f970 bl 803466c msg_ps->vb_ptr->ident + 4, &np); /* check if object is still available (e.g. external hot-plug thingy present?) */ if (mn != NULL) 803538c: 4605 mov r5, r0 803538e: 2800 cmp r0, #0 8035390: d02e beq.n 80353f0 { if (mn->node_type == MIB_NODE_EX) 8035392: 7c03 ldrb r3, [r0, #16] 8035394: 2b05 cmp r3, #5 8035396: d110 bne.n 80353ba /* 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; 8035398: 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; 803539a: 230a movs r3, #10 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 803539c: 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; 80353a0: 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; 80353a4: 4b35 ldr r3, [pc, #212] ; (803547c ) en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 80353a6: 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; 80353aa: e883 0003 stmia.w r3, {r0, r1} en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 80353ae: 2100 movs r1, #0 80353b0: 6aaf ldr r7, [r5, #40] ; 0x28 80353b2: 6968 ldr r0, [r5, #20] 80353b4: 9b01 ldr r3, [sp, #4] 80353b6: 47b8 blx r7 80353b8: e01a b.n 80353f0 else { /* internal object */ struct obj_def object_def; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF_S; 80353ba: 2305 movs r3, #5 80353bc: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_object_def(np.ident_len, np.ident, &object_def); 80353c0: 6803 ldr r3, [r0, #0] 80353c2: 9901 ldr r1, [sp, #4] 80353c4: f89d 0000 ldrb.w r0, [sp] 80353c8: aa02 add r2, sp, #8 80353ca: 4798 blx r3 msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; 80353cc: 2306 movs r3, #6 80353ce: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->set_value(&object_def,msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value); 80353d2: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80353d6: 68ed ldr r5, [r5, #12] 80353d8: 7c59 ldrb r1, [r3, #17] 80353da: 695a ldr r2, [r3, #20] 80353dc: a802 add r0, sp, #8 80353de: 47a8 blx r5 msg_ps->vb_idx += 1; 80353e0: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 80353e4: 3301 adds r3, #1 80353e6: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 80353ea: e001 b.n 80353f0 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) && 80353ec: 4c21 ldr r4, [pc, #132] ; (8035474 ) 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, 80353ee: 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) && 80353f0: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 80353f4: 4d1f ldr r5, [pc, #124] ; (8035474 ) 80353f6: 2b06 cmp r3, #6 80353f8: d139 bne.n 803546e (msg_ps->vb_idx < msg_ps->invb.count)) 80353fa: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 80353fe: 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) && 8035402: 4293 cmp r3, r2 8035404: d3ae bcc.n 8035364 8035406: e031 b.n 803546c (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; 8035408: f505 7280 add.w r2, r5, #256 ; 0x100 803540c: ca07 ldmia r2, {r0, r1, r2} 803540e: f505 7386 add.w r3, r5, #268 ; 0x10c 8035412: e883 0007 stmia.w r3, {r0, r1, r2} msg_ps->invb.head = NULL; 8035416: 2300 movs r3, #0 8035418: f8c5 3100 str.w r3, [r5, #256] ; 0x100 msg_ps->invb.tail = NULL; 803541c: f8c5 3104 str.w r3, [r5, #260] ; 0x104 msg_ps->invb.count = 0; 8035420: f885 3108 strb.w r3, [r5, #264] ; 0x108 snmp_ok_response(msg_ps); 8035424: 4628 mov r0, r5 8035426: f7ff fc6f bl 8034d08 803542a: e020 b.n 803546e } } if (mn == NULL) { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 803542c: 4811 ldr r0, [pc, #68] ; (8035474 ) 803542e: 2102 movs r1, #2 8035430: f7ff fc2f bl 8034c92 8035434: e556 b.n 8034ee4 } if (mn != NULL) { struct snmp_varbind *vb; msg_ps->state = SNMP_MSG_INTERNAL_GET_VALUE; 8035436: 2303 movs r3, #3 /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 8035438: 200c movs r0, #12 } if (mn != NULL) { struct snmp_varbind *vb; msg_ps->state = SNMP_MSG_INTERNAL_GET_VALUE; 803543a: f884 305a strb.w r3, [r4, #90] ; 0x5a /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 803543e: f7f9 ff3b bl 802f2b8 if (vb != NULL) 8035442: 4605 mov r5, r0 8035444: 2800 cmp r0, #0 8035446: f47f ae31 bne.w 80350ac 803544a: e669 b.n 8035120 { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); } } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 803544c: d10f bne.n 803546e 803544e: e555 b.n 8034efc /* search failed, object id points to unknown object (nosuchname) */ mn = NULL; } if (mn != NULL) { msg_ps->state = SNMP_MSG_INTERNAL_SET_TEST; 8035450: 2304 movs r3, #4 8035452: f884 305a strb.w r3, [r4, #90] ; 0x5a if (object_def.access & MIB_ACCESS_WRITE) 8035456: f89d 3009 ldrb.w r3, [sp, #9] 803545a: f003 0302 and.w r3, r3, #2 803545e: b2db uxtb r3, r3 8035460: 2b00 cmp r3, #0 8035462: f47f af47 bne.w 80352f4 8035466: e75e b.n 8035326 /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); } } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 8035468: d1c0 bne.n 80353ec 803546a: e774 b.n 8035356 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) && 803546c: d0cc beq.n 8035408 else if(msg_ps->rt == SNMP_ASN1_PDU_SET_REQ) { snmp_msg_set_event(request_id, msg_ps); } } } 803546e: b027 add sp, #156 ; 0x9c 8035470: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 8035474: 2000f6e0 .word 0x2000f6e0 8035478: 08044810 .word 0x08044810 803547c: 2000f740 .word 0x2000f740 08035480 : 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) { 8035480: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8035484: 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); 8035486: 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) { 803548a: 468a mov sl, r1 803548c: 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); 803548e: 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) { 8035490: 4604 mov r4, r0 8035492: 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); 8035494: 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); 8035498: f7fd f928 bl 80326ec derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &vb_len); 803549c: f10a 0101 add.w r1, sl, #1 80354a0: 4620 mov r0, r4 80354a2: b289 uxth r1, r1 80354a4: f10d 020a add.w r2, sp, #10 80354a8: 4633 mov r3, r6 80354aa: f7fd f934 bl 8032716 if ((derr != ERR_OK) || 80354ae: b910 cbnz r0, 80354b6 80354b0: 783b ldrb r3, [r7, #0] 80354b2: 2b30 cmp r3, #48 ; 0x30 80354b4: d002 beq.n 80354bc (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ))) { snmp_inc_snmpinasnparseerrs(); 80354b6: f7fe ff21 bl 80342fc 80354ba: e02b b.n 8035514 return ERR_ARG; } ofs += (1 + len_octets); 80354bc: f89d 800a ldrb.w r8, [sp, #10] /* start with empty list */ m_stat->invb.count = 0; 80354c0: 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); 80354c4: f108 0801 add.w r8, r8, #1 80354c8: 44d0 add r8, sl 80354ca: fa1f f888 uxth.w r8, r8 /* start with empty list */ m_stat->invb.count = 0; m_stat->invb.head = NULL; 80354ce: f8c5 0100 str.w r0, [r5, #256] ; 0x100 m_stat->invb.tail = NULL; 80354d2: f8c5 0104 str.w r0, [r5, #260] ; 0x104 while (vb_len > 0) 80354d6: e118 b.n 803570a { struct snmp_obj_id oid, oid_value; struct snmp_varbind *vb; snmp_asn1_dec_type(p, ofs, &type); 80354d8: 4641 mov r1, r8 80354da: 463a mov r2, r7 80354dc: 4620 mov r0, r4 80354de: f7fd f905 bl 80326ec derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 80354e2: f108 0101 add.w r1, r8, #1 80354e6: 4620 mov r0, r4 80354e8: b289 uxth r1, r1 80354ea: f10d 020a add.w r2, sp, #10 80354ee: ab03 add r3, sp, #12 80354f0: f7fd f911 bl 8032716 if ((derr != ERR_OK) || 80354f4: b940 cbnz r0, 8035508 80354f6: 783b ldrb r3, [r7, #0] 80354f8: 2b30 cmp r3, #48 ; 0x30 80354fa: d105 bne.n 8035508 (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)) || (len == 0) || (len > vb_len)) 80354fc: 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)) || 8035500: b112 cbz r2, 8035508 (len == 0) || (len > vb_len)) 8035502: 8833 ldrh r3, [r6, #0] 8035504: 429a cmp r2, r3 8035506: d907 bls.n 8035518 { snmp_inc_snmpinasnparseerrs(); 8035508: f7fe fef8 bl 80342fc /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); 803550c: f505 7080 add.w r0, r5, #256 ; 0x100 8035510: f7ff fbb1 bl 8034c76 8035514: 20f2 movs r0, #242 ; 0xf2 8035516: e109 b.n 803572c return ERR_ARG; } ofs += (1 + len_octets); 8035518: f89d 200a ldrb.w r2, [sp, #10] 803551c: 4490 add r8, r2 803551e: fa1f f888 uxth.w r8, r8 8035522: f108 0a01 add.w sl, r8, #1 vb_len -= (1 + len_octets); 8035526: 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); 8035528: fa1f fa8a uxth.w sl, sl vb_len -= (1 + len_octets); 803552c: 189b adds r3, r3, r2 snmp_asn1_dec_type(p, ofs, &type); 803552e: 4651 mov r1, sl 8035530: 463a mov r2, r7 8035532: 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); 8035534: 8033 strh r3, [r6, #0] snmp_asn1_dec_type(p, ofs, &type); 8035536: f7fd f8d9 bl 80326ec derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 803553a: f108 0102 add.w r1, r8, #2 803553e: 4620 mov r0, r4 8035540: b289 uxth r1, r1 8035542: f10d 020a add.w r2, sp, #10 8035546: ab03 add r3, sp, #12 8035548: f7fd f8e5 bl 8032716 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID))) 803554c: 2800 cmp r0, #0 803554e: d1db bne.n 8035508 8035550: 783b ldrb r3, [r7, #0] 8035552: 2b06 cmp r3, #6 8035554: d1d8 bne.n 8035508 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); 8035556: f89d 100a ldrb.w r1, [sp, #10] 803555a: f8bd 200c ldrh.w r2, [sp, #12] 803555e: 3101 adds r1, #1 8035560: 4451 add r1, sl 8035562: 4620 mov r0, r4 8035564: b289 uxth r1, r1 8035566: ab04 add r3, sp, #16 8035568: f7fd fa04 bl 8032974 if (derr != ERR_OK) 803556c: 2800 cmp r0, #0 803556e: d1cb bne.n 8035508 snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets + len); 8035570: f89d 300a ldrb.w r3, [sp, #10] 8035574: f8bd 200c ldrh.w r2, [sp, #12] 8035578: 1899 adds r1, r3, r2 803557a: 448a add sl, r1 803557c: fa1f fa8a uxth.w sl, sl vb_len -= (1 + len_octets + len); 8035580: 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); 8035582: f10a 0801 add.w r8, sl, #1 vb_len -= (1 + len_octets + len); 8035586: 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); 8035588: fa1f f888 uxth.w r8, r8 vb_len -= (1 + len_octets + len); 803558c: 43db mvns r3, r3 803558e: 18d3 adds r3, r2, r3 snmp_asn1_dec_type(p, ofs, &type); 8035590: 4641 mov r1, r8 8035592: 463a mov r2, r7 8035594: 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); 8035596: 8033 strh r3, [r6, #0] snmp_asn1_dec_type(p, ofs, &type); 8035598: f7fd f8a8 bl 80326ec derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 803559c: f10a 0102 add.w r1, sl, #2 80355a0: 4620 mov r0, r4 80355a2: b289 uxth r1, r1 80355a4: f10d 020a add.w r2, sp, #10 80355a8: ab03 add r3, sp, #12 80355aa: f7fd f8b4 bl 8032716 if (derr != ERR_OK) 80355ae: 2800 cmp r0, #0 80355b0: d1aa bne.n 8035508 /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } switch (type) 80355b2: 7839 ldrb r1, [r7, #0] 80355b4: 2906 cmp r1, #6 80355b6: d047 beq.n 8035648 80355b8: d805 bhi.n 80355c6 80355ba: 2904 cmp r1, #4 80355bc: d036 beq.n 803562c 80355be: d839 bhi.n 8035634 80355c0: 2902 cmp r1, #2 80355c2: d1a1 bne.n 8035508 80355c4: e009 b.n 80355da 80355c6: 2943 cmp r1, #67 ; 0x43 80355c8: d804 bhi.n 80355d4 80355ca: 2941 cmp r1, #65 ; 0x41 80355cc: d219 bcs.n 8035602 80355ce: 2940 cmp r1, #64 ; 0x40 80355d0: d19a bne.n 8035508 80355d2: e069 b.n 80356a8 80355d4: 2944 cmp r1, #68 ; 0x44 80355d6: d197 bne.n 8035508 80355d8: e028 b.n 803562c { case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG): vb = snmp_varbind_alloc(&oid, type, sizeof(s32_t)); 80355da: a804 add r0, sp, #16 80355dc: 2204 movs r2, #4 80355de: f7ff faf7 bl 8034bd0 if (vb != NULL) 80355e2: 4683 mov fp, r0 80355e4: 2800 cmp r0, #0 80355e6: d08f beq.n 8035508 { s32_t *vptr = (s32_t*)vb->value; derr = snmp_asn1_dec_s32t(p, ofs + 1 + len_octets, len, vptr); 80355e8: f89d 100a ldrb.w r1, [sp, #10] 80355ec: f8bd 200c ldrh.w r2, [sp, #12] 80355f0: f8db 3014 ldr.w r3, [fp, #20] 80355f4: 3101 adds r1, #1 80355f6: 4441 add r1, r8 80355f8: 4620 mov r0, r4 80355fa: b289 uxth r1, r1 80355fc: f7fd f961 bl 80328c2 8035600: e06b b.n 80356da } 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)); 8035602: a804 add r0, sp, #16 8035604: 2204 movs r2, #4 8035606: f7ff fae3 bl 8034bd0 if (vb != NULL) 803560a: 4683 mov fp, r0 803560c: 2800 cmp r0, #0 803560e: f43f af7b beq.w 8035508 { u32_t *vptr = (u32_t*)vb->value; derr = snmp_asn1_dec_u32t(p, ofs + 1 + len_octets, len, vptr); 8035612: f89d 100a ldrb.w r1, [sp, #10] 8035616: f8bd 200c ldrh.w r2, [sp, #12] 803561a: f8db 3014 ldr.w r3, [fp, #20] 803561e: 3101 adds r1, #1 8035620: 4441 add r1, r8 8035622: 4620 mov r0, r4 8035624: b289 uxth r1, r1 8035626: f7fd f8f8 bl 803281a 803562a: e056 b.n 80356da } 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); 803562c: a804 add r0, sp, #16 803562e: f89d 200c ldrb.w r2, [sp, #12] 8035632: e03f b.n 80356b4 { derr = ERR_ARG; } break; case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_NUL): vb = snmp_varbind_alloc(&oid, type, 0); 8035634: 2105 movs r1, #5 8035636: a804 add r0, sp, #16 8035638: 2200 movs r2, #0 803563a: f7ff fac9 bl 8034bd0 if (vb != NULL) 803563e: 4601 mov r1, r0 8035640: 2800 cmp r0, #0 8035642: f43f af61 beq.w 8035508 8035646: e02a b.n 803569e { 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); 8035648: f89d 100a ldrb.w r1, [sp, #10] 803564c: f8bd 200c ldrh.w r2, [sp, #12] 8035650: 3101 adds r1, #1 8035652: 4441 add r1, r8 8035654: 4620 mov r0, r4 8035656: b289 uxth r1, r1 8035658: ab25 add r3, sp, #148 ; 0x94 803565a: f7fd f98b bl 8032974 if (derr == ERR_OK) 803565e: 2800 cmp r0, #0 8035660: f47f af52 bne.w 8035508 { vb = snmp_varbind_alloc(&oid, type, oid_value.len * sizeof(s32_t)); 8035664: f89d 2094 ldrb.w r2, [sp, #148] ; 0x94 8035668: 7839 ldrb r1, [r7, #0] 803566a: 0092 lsls r2, r2, #2 803566c: a804 add r0, sp, #16 803566e: f002 02fc and.w r2, r2, #252 ; 0xfc 8035672: f7ff faad bl 8034bd0 if (vb != NULL) 8035676: 4601 mov r1, r0 8035678: 2800 cmp r0, #0 803567a: f43f af45 beq.w 8035508 { u8_t i = oid_value.len; 803567e: f89d 3094 ldrb.w r3, [sp, #148] ; 0x94 s32_t *vptr = (s32_t*)vb->value; 8035682: 6940 ldr r0, [r0, #20] while(i > 0) 8035684: e009 b.n 803569a { i--; 8035686: 3b01 subs r3, #1 8035688: b2db uxtb r3, r3 vptr[i] = oid_value.id[i]; 803568a: f50d 7e8c add.w lr, sp, #280 ; 0x118 803568e: eb0e 0283 add.w r2, lr, r3, lsl #2 8035692: f852 2c80 ldr.w r2, [r2, #-128] 8035696: 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) 803569a: 2b00 cmp r3, #0 803569c: d1f3 bne.n 8035686 { i--; vptr[i] = oid_value.id[i]; } snmp_varbind_tail_add(&m_stat->invb, vb); 803569e: f505 7080 add.w r0, r5, #256 ; 0x100 80356a2: f7ff fb41 bl 8034d28 80356a6: e022 b.n 80356ee derr = ERR_ARG; } } break; case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR): if (len == 4) 80356a8: f8bd 200c ldrh.w r2, [sp, #12] 80356ac: 2a04 cmp r2, #4 80356ae: f47f af2b bne.w 8035508 { /* must be exactly 4 octets! */ vb = snmp_varbind_alloc(&oid, type, 4); 80356b2: a804 add r0, sp, #16 80356b4: f7ff fa8c bl 8034bd0 if (vb != NULL) 80356b8: 4683 mov fp, r0 80356ba: 2800 cmp r0, #0 80356bc: f43f af24 beq.w 8035508 { derr = snmp_asn1_dec_raw(p, ofs + 1 + len_octets, len, vb->value_len, (u8_t*)vb->value); 80356c0: f89d 100a ldrb.w r1, [sp, #10] 80356c4: 7c43 ldrb r3, [r0, #17] 80356c6: 6940 ldr r0, [r0, #20] 80356c8: f8bd 200c ldrh.w r2, [sp, #12] 80356cc: 9000 str r0, [sp, #0] 80356ce: 3101 adds r1, #1 80356d0: 4441 add r1, r8 80356d2: 4620 mov r0, r4 80356d4: b289 uxth r1, r1 80356d6: f7fd f9e9 bl 8032aac 80356da: 4682 mov sl, r0 snmp_varbind_tail_add(&m_stat->invb, vb); 80356dc: 4659 mov r1, fp 80356de: f505 7080 add.w r0, r5, #256 ; 0x100 80356e2: f7ff fb21 bl 8034d28 break; default: derr = ERR_ARG; break; } if (derr != ERR_OK) 80356e6: f1ba 0f00 cmp.w sl, #0 80356ea: f47f af0d bne.w 8035508 snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets + len); 80356ee: f8bd 200c ldrh.w r2, [sp, #12] 80356f2: f89d 300a ldrb.w r3, [sp, #10] 80356f6: 1c51 adds r1, r2, #1 80356f8: 1859 adds r1, r3, r1 80356fa: 4488 add r8, r1 vb_len -= (1 + len_octets + len); 80356fc: 8831 ldrh r1, [r6, #0] 80356fe: 43db mvns r3, r3 8035700: 1a8a subs r2, r1, r2 8035702: 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); 8035704: fa1f f888 uxth.w r8, r8 vb_len -= (1 + len_octets + len); 8035708: 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) 803570a: 8833 ldrh r3, [r6, #0] 803570c: 2b00 cmp r3, #0 803570e: f47f aee3 bne.w 80354d8 } ofs += (1 + len_octets + len); vb_len -= (1 + len_octets + len); } if (m_stat->rt == SNMP_ASN1_PDU_SET_REQ) 8035712: 7aab ldrb r3, [r5, #10] 8035714: f895 0108 ldrb.w r0, [r5, #264] ; 0x108 8035718: 2b03 cmp r3, #3 803571a: d102 bne.n 8035722 { snmp_add_snmpintotalsetvars(m_stat->invb.count); 803571c: f7fe fe26 bl 803436c 8035720: e001 b.n 8035726 } else { snmp_add_snmpintotalreqvars(m_stat->invb.count); 8035722: f7fe fe1b bl 803435c } *ofs_ret = ofs; 8035726: f8a9 8000 strh.w r8, [r9] return ERR_OK; 803572a: 2000 movs r0, #0 } 803572c: b240 sxtb r0, r0 803572e: b047 add sp, #284 ; 0x11c 8035730: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 08035734 : /* 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) { 8035734: 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)) 8035738: 4da3 ldr r5, [pc, #652] ; (80359c8 ) { //volatile struct snmp_msg_pstat *msg_ps; struct snmp_msg_pstat *msg_ps; u8_t req_idx; err_t err_ret; u16_t payload_len = p->tot_len; 803573a: 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)) 803573c: 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) { 8035740: b087 sub sp, #28 8035742: 4699 mov r9, r3 struct snmp_msg_pstat *msg_ps; u8_t req_idx; err_t err_ret; u16_t payload_len = p->tot_len; u16_t payload_ofs = 0; u16_t varbind_ofs = 0; 8035744: 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) { 8035746: 4688 mov r8, r1 8035748: 4614 mov r4, r2 struct snmp_msg_pstat *msg_ps; u8_t req_idx; err_t err_ret; u16_t payload_len = p->tot_len; u16_t payload_ofs = 0; u16_t varbind_ofs = 0; 803574a: 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)) 803574e: 2e00 cmp r6, #0 8035750: f000 81a7 beq.w 8035aa2 msg_ps++; } if (req_idx == SNMP_CONCURRENT_REQUESTS) { /* exceeding number of concurrent requests */ pbuf_free(p); 8035754: 4620 mov r0, r4 8035756: f7f9 fecf bl 802f4f8 803575a: e1d3 b.n 8035b04 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)) || 803575c: f89d 600e ldrb.w r6, [sp, #14] 8035760: f8bd 3012 ldrh.w r3, [sp, #18] 8035764: 1c75 adds r5, r6, #1 8035766: 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) || 8035768: 429f cmp r7, r3 803576a: f040 80c4 bne.w 80358f6 (pdu_len != (1 + len_octets + len)) || 803576e: f89d 300f ldrb.w r3, [sp, #15] 8035772: 2b30 cmp r3, #48 ; 0x30 8035774: d000 beq.n 8035778 8035776: e0be b.n 80358f6 (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ))) { snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets); 8035778: b2ad uxth r5, r5 snmp_asn1_dec_type(p, ofs, &type); 803577a: 4629 mov r1, r5 803577c: f10d 020f add.w r2, sp, #15 8035780: 4620 mov r0, r4 8035782: f7fc ffb3 bl 80326ec derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8035786: 4620 mov r0, r4 8035788: 1cb1 adds r1, r6, #2 803578a: f10d 020e add.w r2, sp, #14 803578e: f10d 0312 add.w r3, sp, #18 8035792: f7fc ffc0 bl 8032716 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 8035796: 2800 cmp r0, #0 8035798: f040 80ad bne.w 80358f6 803579c: f89d 300f ldrb.w r3, [sp, #15] 80357a0: 2b02 cmp r3, #2 80357a2: f040 80a8 bne.w 80358f6 { /* 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); 80357a6: f89d 100e ldrb.w r1, [sp, #14] 80357aa: f8bd 2012 ldrh.w r2, [sp, #18] 80357ae: 3101 adds r1, #1 80357b0: 4620 mov r0, r4 80357b2: 1869 adds r1, r5, r1 80357b4: ab05 add r3, sp, #20 80357b6: f7fd f884 bl 80328c2 if (derr != ERR_OK) 80357ba: 2800 cmp r0, #0 80357bc: f040 809b bne.w 80358f6 { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } if (version != 0) 80357c0: 9b05 ldr r3, [sp, #20] 80357c2: b113 cbz r3, 80357ca { /* not version 1 */ snmp_inc_snmpinbadversions(); 80357c4: f7fe fd8a bl 80342dc 80357c8: e7c4 b.n 8035754 return ERR_ARG; } ofs += (1 + len_octets + len); 80357ca: f89d 200e ldrb.w r2, [sp, #14] 80357ce: f8bd 3012 ldrh.w r3, [sp, #18] 80357d2: 18d3 adds r3, r2, r3 80357d4: 18ed adds r5, r5, r3 80357d6: b2ad uxth r5, r5 80357d8: 1c6e adds r6, r5, #1 80357da: b2b6 uxth r6, r6 snmp_asn1_dec_type(p, ofs, &type); 80357dc: 4631 mov r1, r6 80357de: f10d 020f add.w r2, sp, #15 80357e2: 4620 mov r0, r4 80357e4: f7fc ff82 bl 80326ec derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 80357e8: 1ca9 adds r1, r5, #2 80357ea: 4620 mov r0, r4 80357ec: b289 uxth r1, r1 80357ee: f10d 020e add.w r2, sp, #14 80357f2: f10d 0312 add.w r3, sp, #18 80357f6: f7fc ff8e bl 8032716 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR))) 80357fa: 2800 cmp r0, #0 80357fc: d17b bne.n 80358f6 80357fe: f89d 300f ldrb.w r3, [sp, #15] 8035802: 2b04 cmp r3, #4 8035804: d177 bne.n 80358f6 { /* 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); 8035806: f89d 100e ldrb.w r1, [sp, #14] 803580a: 4d70 ldr r5, [pc, #448] ; (80359cc ) 803580c: f8bd 2012 ldrh.w r2, [sp, #18] 8035810: 9500 str r5, [sp, #0] 8035812: 3101 adds r1, #1 8035814: 1871 adds r1, r6, r1 8035816: 4620 mov r0, r4 8035818: b289 uxth r1, r1 803581a: 2340 movs r3, #64 ; 0x40 803581c: f7fd f946 bl 8032aac if (derr != ERR_OK) 8035820: 2800 cmp r0, #0 8035822: d168 bne.n 80358f6 { snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } /* add zero terminator */ len = ((len < (SNMP_COMMUNITY_STR_LEN))?(len):(SNMP_COMMUNITY_STR_LEN)); 8035824: f8bd 3012 ldrh.w r3, [sp, #18] m_stat->community[len] = 0; 8035828: 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)); 803582c: 2b40 cmp r3, #64 ; 0x40 803582e: bf28 it cs 8035830: 2340 movcs r3, #64 ; 0x40 m_stat->community[len] = 0; 8035832: 18d1 adds r1, r2, r3 snmp_inc_snmpinbadcommunitynames(); snmp_authfail_trap(); return ERR_ARG; }*/ ofs += (1 + len_octets + len); 8035834: 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)); 8035838: f8ad 3012 strh.w r3, [sp, #18] m_stat->community[len] = 0; m_stat->com_strlen = (u8_t)len; 803583c: f885 3041 strb.w r3, [r5, #65] ; 0x41 snmp_inc_snmpinbadcommunitynames(); snmp_authfail_trap(); return ERR_ARG; }*/ ofs += (1 + len_octets + len); 8035840: 189b adds r3, r3, r2 8035842: 18f6 adds r6, r6, r3 8035844: b2b6 uxth r6, r6 8035846: f106 0801 add.w r8, r6, #1 803584a: 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; 803584e: 7608 strb r0, [r1, #24] snmp_authfail_trap(); return ERR_ARG; }*/ ofs += (1 + len_octets + len); snmp_asn1_dec_type(p, ofs, &type); 8035850: f10d 020f add.w r2, sp, #15 8035854: 4641 mov r1, r8 8035856: 4620 mov r0, r4 8035858: f7fc ff48 bl 80326ec derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 803585c: 1cb1 adds r1, r6, #2 803585e: 4620 mov r0, r4 8035860: b289 uxth r1, r1 8035862: f10d 020e add.w r2, sp, #14 8035866: f10d 0312 add.w r3, sp, #18 803586a: f7fc ff54 bl 8032716 if (derr != ERR_OK) 803586e: 2800 cmp r0, #0 8035870: d141 bne.n 80358f6 return ERR_ARG; } /* FIX for write/read communuty */ /* GetRequest PDU */ if (type == (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_REQ)) 8035872: f89d 300f ldrb.w r3, [sp, #15] 8035876: 2ba0 cmp r3, #160 ; 0xa0 8035878: d10f bne.n 803589a { if (strncmp(sSettings.sSnmp.readCommunity, (const char*)m_stat->community, strlen(sSettings.sSnmp.readCommunity)) != 0 803587a: 4855 ldr r0, [pc, #340] ; (80359d0 ) 803587c: f7ec fc68 bl 8022150 8035880: 4629 mov r1, r5 8035882: 4602 mov r2, r0 8035884: 4852 ldr r0, [pc, #328] ; (80359d0 ) 8035886: f7ec fcc5 bl 8022214 803588a: b120 cbz r0, 8035896 || (strlen(sSettings.sSnmp.readCommunity) != strlen((const char*)m_stat->community)) ) { snmp_inc_snmpinbadcommunitynames(); 803588c: f7fe fd2e bl 80342ec snmp_authfail_trap(); 8035890: f000 fd82 bl 8036398 8035894: e75e b.n 8035754 /* 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)) ) 8035896: 484e ldr r0, [pc, #312] ; (80359d0 ) 8035898: e00c b.n 80358b4 snmp_authfail_trap(); return ERR_ARG; } } /* SetRequest PDU */ else if (type == (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_SET_REQ)) 803589a: 2ba3 cmp r3, #163 ; 0xa3 803589c: d112 bne.n 80358c4 { if (strncmp(sSettings.sSnmp.writeCommunity, (const char*)m_stat->community, strlen(sSettings.sSnmp.writeCommunity)) != 0 803589e: 484d ldr r0, [pc, #308] ; (80359d4 ) 80358a0: f7ec fc56 bl 8022150 80358a4: 4629 mov r1, r5 80358a6: 4602 mov r2, r0 80358a8: 484a ldr r0, [pc, #296] ; (80359d4 ) 80358aa: f7ec fcb3 bl 8022214 80358ae: 2800 cmp r0, #0 80358b0: d1ec bne.n 803588c || (strlen(sSettings.sSnmp.writeCommunity) != strlen((const char*)m_stat->community)) ) 80358b2: 4848 ldr r0, [pc, #288] ; (80359d4 ) 80358b4: f7ec fc4c bl 8022150 80358b8: 4606 mov r6, r0 80358ba: 4628 mov r0, r5 80358bc: f7ec fc48 bl 8022150 80358c0: 4286 cmp r6, r0 80358c2: d1e3 bne.n 803588c snmp_authfail_trap(); return ERR_ARG; } } switch(type) 80358c4: f89d 300f ldrb.w r3, [sp, #15] 80358c8: 3ba0 subs r3, #160 ; 0xa0 80358ca: 2b04 cmp r3, #4 80358cc: d813 bhi.n 80358f6 80358ce: e8df f003 tbb [pc, r3] 80358d2: 0603 .short 0x0603 80358d4: 0c09 .short 0x0c09 80358d6: 0f .byte 0x0f 80358d7: 00 .byte 0x00 { case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_REQ): // GetRequest PDU snmp_inc_snmpingetrequests(); 80358d8: f7fe fd50 bl 803437c 80358dc: e0fd b.n 8035ada derr = ERR_OK; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_NEXT_REQ): // GetNextRequest PDU snmp_inc_snmpingetnexts(); 80358de: f7fe fd55 bl 803438c 80358e2: e0fa b.n 8035ada derr = ERR_OK; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_RESP): // GetResponse PDU snmp_inc_snmpingetresponses(); 80358e4: f7fe fd62 bl 80343ac 80358e8: e734 b.n 8035754 derr = ERR_ARG; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_SET_REQ): // SetRequest PDU snmp_inc_snmpinsetrequests(); 80358ea: f7fe fd57 bl 803439c 80358ee: e0f4 b.n 8035ada derr = ERR_OK; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_TRAP): // Trap PDU snmp_inc_snmpintraps(); 80358f0: f7fe fd64 bl 80343bc 80358f4: e72e b.n 8035754 derr = ERR_ARG; break; default: snmp_inc_snmpinasnparseerrs(); 80358f6: f7fe fd01 bl 80342fc 80358fa: e72b b.n 8035754 { /* decoded PDU length does not equal actual payload length */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } snmp_asn1_dec_type(p, ofs, &type); 80358fc: 4631 mov r1, r6 80358fe: f10d 020f add.w r2, sp, #15 8035902: 4620 mov r0, r4 8035904: f7fc fef2 bl 80326ec derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8035908: f108 0102 add.w r1, r8, #2 803590c: 4620 mov r0, r4 803590e: b289 uxth r1, r1 8035910: f10d 020e add.w r2, sp, #14 8035914: f10d 0312 add.w r3, sp, #18 8035918: f7fc fefd bl 8032716 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 803591c: 2800 cmp r0, #0 803591e: d1ea bne.n 80358f6 8035920: f89d 300f ldrb.w r3, [sp, #15] 8035924: 2b02 cmp r3, #2 8035926: d1e6 bne.n 80358f6 { /* 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); 8035928: f89d 100e ldrb.w r1, [sp, #14] 803592c: f8bd 2012 ldrh.w r2, [sp, #18] 8035930: 3101 adds r1, #1 8035932: 1871 adds r1, r6, r1 8035934: 4620 mov r0, r4 8035936: b289 uxth r1, r1 8035938: f105 030c add.w r3, r5, #12 803593c: f7fc ffc1 bl 80328c2 if (derr != ERR_OK) 8035940: 2800 cmp r0, #0 8035942: d1d8 bne.n 80358f6 { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets + len); 8035944: f89d 200e ldrb.w r2, [sp, #14] 8035948: f8bd 3012 ldrh.w r3, [sp, #18] 803594c: 18d3 adds r3, r2, r3 803594e: 18f6 adds r6, r6, r3 8035950: b2b6 uxth r6, r6 8035952: 1c77 adds r7, r6, #1 8035954: b2bf uxth r7, r7 snmp_asn1_dec_type(p, ofs, &type); 8035956: 4639 mov r1, r7 8035958: f10d 020f add.w r2, sp, #15 803595c: 4620 mov r0, r4 803595e: f7fc fec5 bl 80326ec derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8035962: 1cb1 adds r1, r6, #2 8035964: 4620 mov r0, r4 8035966: b289 uxth r1, r1 8035968: f10d 020e add.w r2, sp, #14 803596c: f10d 0312 add.w r3, sp, #18 8035970: f7fc fed1 bl 8032716 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 8035974: 2800 cmp r0, #0 8035976: d1be bne.n 80358f6 8035978: f89d 300f ldrb.w r3, [sp, #15] 803597c: 2b02 cmp r3, #2 803597e: d1ba bne.n 80358f6 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); 8035980: f89d 100e ldrb.w r1, [sp, #14] 8035984: f8bd 2012 ldrh.w r2, [sp, #18] 8035988: 3101 adds r1, #1 803598a: 1879 adds r1, r7, r1 803598c: 4620 mov r0, r4 803598e: b289 uxth r1, r1 8035990: f105 0310 add.w r3, r5, #16 8035994: f7fc ff95 bl 80328c2 if (derr != ERR_OK) 8035998: 2800 cmp r0, #0 803599a: d1ac bne.n 80358f6 { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } switch (m_stat->error_status) 803599c: 692b ldr r3, [r5, #16] 803599e: 3b01 subs r3, #1 80359a0: 2b04 cmp r3, #4 80359a2: d81b bhi.n 80359dc 80359a4: e8df f003 tbb [pc, r3] 80359a8: 0c090603 .word 0x0c090603 80359ac: 18 .byte 0x18 80359ad: 00 .byte 0x00 { case SNMP_ES_TOOBIG: snmp_inc_snmpintoobigs(); 80359ae: f7fe fcad bl 803430c 80359b2: e013 b.n 80359dc break; case SNMP_ES_NOSUCHNAME: snmp_inc_snmpinnosuchnames(); 80359b4: f7fe fcb2 bl 803431c 80359b8: e010 b.n 80359dc break; case SNMP_ES_BADVALUE: snmp_inc_snmpinbadvalues(); 80359ba: f7fe fcb7 bl 803432c 80359be: e00d b.n 80359dc break; case SNMP_ES_READONLY: snmp_inc_snmpinreadonlys(); 80359c0: f7fe fcbc bl 803433c 80359c4: e00a b.n 80359dc 80359c6: bf00 nop 80359c8: 2000f6e0 .word 0x2000f6e0 80359cc: 2000f6f8 .word 0x2000f6f8 80359d0: 2000cd71 .word 0x2000cd71 80359d4: 2000cd85 .word 0x2000cd85 break; case SNMP_ES_GENERROR: snmp_inc_snmpingenerrs(); 80359d8: f7fe fcb8 bl 803434c break; } ofs += (1 + len_octets + len); 80359dc: f89d 200e ldrb.w r2, [sp, #14] 80359e0: f8bd 3012 ldrh.w r3, [sp, #18] 80359e4: 18d3 adds r3, r2, r3 80359e6: 18ff adds r7, r7, r3 80359e8: b2bf uxth r7, r7 80359ea: 1c7d adds r5, r7, #1 80359ec: b2ad uxth r5, r5 snmp_asn1_dec_type(p, ofs, &type); 80359ee: 4629 mov r1, r5 80359f0: f10d 020f add.w r2, sp, #15 80359f4: 4620 mov r0, r4 80359f6: f7fc fe79 bl 80326ec derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 80359fa: 1cb9 adds r1, r7, #2 80359fc: 4620 mov r0, r4 80359fe: b289 uxth r1, r1 8035a00: f10d 020e add.w r2, sp, #14 8035a04: f10d 0312 add.w r3, sp, #18 8035a08: f7fc fe85 bl 8032716 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 8035a0c: 2800 cmp r0, #0 8035a0e: f47f af72 bne.w 80358f6 8035a12: f89d 300f ldrb.w r3, [sp, #15] 8035a16: 2b02 cmp r3, #2 8035a18: f47f af6d bne.w 80358f6 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); 8035a1c: f89d 100e ldrb.w r1, [sp, #14] 8035a20: f8bd 2012 ldrh.w r2, [sp, #18] 8035a24: 4b39 ldr r3, [pc, #228] ; (8035b0c ) 8035a26: 3101 adds r1, #1 8035a28: 1869 adds r1, r5, r1 8035a2a: 4620 mov r0, r4 8035a2c: b289 uxth r1, r1 8035a2e: f7fc ff48 bl 80328c2 if (derr != ERR_OK) 8035a32: 2800 cmp r0, #0 8035a34: f47f af5f bne.w 80358f6 { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets + len); 8035a38: f8bd 3012 ldrh.w r3, [sp, #18] 8035a3c: f89d 200e ldrb.w r2, [sp, #14] 8035a40: 3301 adds r3, #1 8035a42: 189b adds r3, r3, r2 /* check total length, version, community, pdu type */ err_ret = snmp_pdu_header_check(p, payload_ofs, payload_len, &varbind_ofs, msg_ps); /* Only accept requests and requests without error (be robust) */ /* Reject response and trap headers or error requests as input! */ if ((err_ret != ERR_OK) || ((msg_ps->rt != SNMP_ASN1_PDU_GET_REQ) && 8035a44: 4a32 ldr r2, [pc, #200] ; (8035b10 ) { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets + len); 8035a46: 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) && 8035a48: 7a93 ldrb r3, [r2, #10] /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets + len); *ofs_ret = ofs; 8035a4a: 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) || 8035a4e: 2b01 cmp r3, #1 8035a50: d902 bls.n 8035a58 ((msg_ps->rt != SNMP_ASN1_PDU_GET_REQ) && (msg_ps->rt != SNMP_ASN1_PDU_GET_NEXT_REQ) && 8035a52: 2b03 cmp r3, #3 8035a54: f47f ae7e bne.w 8035754 (msg_ps->rt != SNMP_ASN1_PDU_SET_REQ)) || 8035a58: 6913 ldr r3, [r2, #16] ((msg_ps->error_status != SNMP_ES_NOERROR) || 8035a5a: 4d2d ldr r5, [pc, #180] ; (8035b10 ) /* 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)) || 8035a5c: 2b00 cmp r3, #0 8035a5e: f47f ae79 bne.w 8035754 ((msg_ps->error_status != SNMP_ES_NOERROR) || 8035a62: 696b ldr r3, [r5, #20] 8035a64: 2b00 cmp r3, #0 8035a66: f47f ae75 bne.w 8035754 } 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); 8035a6a: aa06 add r2, sp, #24 8035a6c: 4620 mov r0, r4 8035a6e: f832 1d08 ldrh.w r1, [r2, #-8]! 8035a72: 462b mov r3, r5 8035a74: f7ff fd04 bl 8035480 8035a78: 4606 mov r6, r0 /* we've decoded the incoming message, release input msg now */ pbuf_free(p); 8035a7a: 4620 mov r0, r4 8035a7c: f7f9 fd3c bl 802f4f8 if ((err_ret != ERR_OK) || (msg_ps->invb.count == 0)) 8035a80: 2e00 cmp r6, #0 8035a82: d13f bne.n 8035b04 8035a84: f895 3108 ldrb.w r3, [r5, #264] ; 0x108 8035a88: 2b00 cmp r3, #0 8035a8a: d03b beq.n 8035b04 } 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; 8035a8c: 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; 8035a8e: 612e str r6, [r5, #16] msg_ps->error_index = 0; 8035a90: 616e str r6, [r5, #20] /* find object for each variable binding */ msg_ps->state = SNMP_MSG_SEARCH_OBJ; 8035a92: f885 305a strb.w r3, [r5, #90] ; 0x5a /* first variable binding from list to inspect */ msg_ps->vb_idx = 0; 8035a96: 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); 8035a9a: 4630 mov r0, r6 8035a9c: f7ff f950 bl 8034d40 8035aa0: e030 b.n 8035b04 pbuf_free(p); return; } /* accepting request */ snmp_inc_snmpinpkts(); 8035aa2: f7fe fc0b bl 80342bc /* record used 'protocol control block' */ msg_ps->pcb = pcb; /* source address (network order) */ msg_ps->sip = *addr; 8035aa6: f8d9 3000 ldr.w r3, [r9] } /* accepting request */ snmp_inc_snmpinpkts(); /* record used 'protocol control block' */ msg_ps->pcb = pcb; 8035aaa: f8c5 8000 str.w r8, [r5] /* source address (network order) */ msg_ps->sip = *addr; 8035aae: 606b str r3, [r5, #4] /* source port (host order (lwIP oddity)) */ msg_ps->sp = port; 8035ab0: 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); 8035ab4: 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; 8035ab6: 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); 8035ab8: f10d 020f add.w r2, sp, #15 8035abc: 4620 mov r0, r4 8035abe: f7fc fe15 bl 80326ec derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8035ac2: 4620 mov r0, r4 8035ac4: 2101 movs r1, #1 8035ac6: f10d 020e add.w r2, sp, #14 8035aca: f10d 0312 add.w r3, sp, #18 8035ace: f7fc fe22 bl 8032716 if ((derr != ERR_OK) || 8035ad2: 2800 cmp r0, #0 8035ad4: f43f ae42 beq.w 803575c 8035ad8: e70d b.n 80358f6 if (derr != ERR_OK) { /* unsupported input PDU for this agent (no parse error) */ return ERR_ARG; } m_stat->rt = type & 0x1F; 8035ada: f89d 300f ldrb.w r3, [sp, #15] 8035ade: 4d0c ldr r5, [pc, #48] ; (8035b10 ) 8035ae0: f003 031f and.w r3, r3, #31 8035ae4: 72ab strb r3, [r5, #10] ofs += (1 + len_octets); 8035ae6: f89d 300e ldrb.w r3, [sp, #14] 8035aea: 4498 add r8, r3 8035aec: fa1f f888 uxth.w r8, r8 8035af0: f108 0601 add.w r6, r8, #1 8035af4: b2b6 uxth r6, r6 if (len != (pdu_len - (ofs - ofs_base))) 8035af6: f8bd 3012 ldrh.w r3, [sp, #18] 8035afa: 1bbf subs r7, r7, r6 8035afc: 42bb cmp r3, r7 8035afe: f43f aefd beq.w 80358fc 8035b02: e6f8 b.n 80358f6 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); } 8035b04: b007 add sp, #28 8035b06: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 8035b0a: bf00 nop 8035b0c: 2000f6f4 .word 0x2000f6f4 8035b10: 2000f6e0 .word 0x2000f6e0 08035b14 : * @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) { 8035b14: 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; 8035b16: 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) { 8035b18: 4606 mov r6, r0 u32_t *uint_ptr; s32_t *sint_ptr; u16_t tot_len; tot_len = 0; vb = root->tail; 8035b1a: 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; 8035b1c: 462f mov r7, r5 s32_t *sint_ptr; u16_t tot_len; tot_len = 0; vb = root->tail; while ( vb != NULL ) 8035b1e: e051 b.n 8035bc4 { /* encoded value lenght depends on type */ switch (vb->value_type) 8035b20: 7c23 ldrb r3, [r4, #16] 8035b22: 2b06 cmp r3, #6 8035b24: d020 beq.n 8035b68 8035b26: d805 bhi.n 8035b34 8035b28: 2b02 cmp r3, #2 8035b2a: d00c beq.n 8035b46 8035b2c: d324 bcc.n 8035b78 8035b2e: 2b04 cmp r3, #4 8035b30: d322 bcc.n 8035b78 8035b32: e016 b.n 8035b62 8035b34: 2b43 cmp r3, #67 ; 0x43 8035b36: d803 bhi.n 8035b40 8035b38: 2b41 cmp r3, #65 ; 0x41 8035b3a: d20b bcs.n 8035b54 8035b3c: 2b40 cmp r3, #64 ; 0x40 8035b3e: e000 b.n 8035b42 8035b40: 2b44 cmp r3, #68 ; 0x44 8035b42: d119 bne.n 8035b78 8035b44: e00d b.n 8035b62 { 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); 8035b46: 6963 ldr r3, [r4, #20] 8035b48: f104 0120 add.w r1, r4, #32 8035b4c: 6818 ldr r0, [r3, #0] 8035b4e: f7fd f804 bl 8032b5a break; 8035b52: e012 b.n 8035b7a 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); 8035b54: 6963 ldr r3, [r4, #20] 8035b56: f104 0120 add.w r1, r4, #32 8035b5a: 6818 ldr r0, [r3, #0] 8035b5c: f7fc ffe8 bl 8032b30 break; 8035b60: e00b b.n 8035b7a 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; 8035b62: 7c63 ldrb r3, [r4, #17] 8035b64: 8423 strh r3, [r4, #32] break; 8035b66: e008 b.n 8035b7a 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); 8035b68: 7c60 ldrb r0, [r4, #17] 8035b6a: 6961 ldr r1, [r4, #20] 8035b6c: 0880 lsrs r0, r0, #2 8035b6e: f104 0220 add.w r2, r4, #32 8035b72: f7fd f807 bl 8032b84 break; 8035b76: e000 b.n 8035b7a default: /* unsupported type */ vb->vlen = 0; 8035b78: 8427 strh r7, [r4, #32] break; }; /* encoding length of value length field */ snmp_asn1_enc_length_cnt(vb->vlen, &vb->vlenlen); 8035b7a: 8c20 ldrh r0, [r4, #32] 8035b7c: f104 011a add.w r1, r4, #26 8035b80: f7fc ffcb bl 8032b1a snmp_asn1_enc_oid_cnt(vb->ident_len, vb->ident, &vb->olen); 8035b84: f104 021e add.w r2, r4, #30 8035b88: 7a20 ldrb r0, [r4, #8] 8035b8a: 68e1 ldr r1, [r4, #12] 8035b8c: f7fc fffa bl 8032b84 snmp_asn1_enc_length_cnt(vb->olen, &vb->olenlen); 8035b90: 8be0 ldrh r0, [r4, #30] 8035b92: f104 0119 add.w r1, r4, #25 8035b96: f7fc ffc0 bl 8032b1a vb->seqlen = 1 + vb->vlenlen + vb->vlen; 8035b9a: 8be3 ldrh r3, [r4, #30] 8035b9c: 8c20 ldrh r0, [r4, #32] 8035b9e: 18c0 adds r0, r0, r3 8035ba0: 7ea3 ldrb r3, [r4, #26] vb->seqlen += 1 + vb->olenlen + vb->olen; 8035ba2: 3002 adds r0, #2 8035ba4: 18c0 adds r0, r0, r3 8035ba6: 7e63 ldrb r3, [r4, #25] 8035ba8: 18c0 adds r0, r0, r3 8035baa: b280 uxth r0, r0 8035bac: 83a0 strh r0, [r4, #28] snmp_asn1_enc_length_cnt(vb->seqlen, &vb->seqlenlen); 8035bae: f104 0118 add.w r1, r4, #24 8035bb2: f7fc ffb2 bl 8032b1a /* varbind seq */ tot_len += 1 + vb->seqlenlen + vb->seqlen; 8035bb6: 8ba3 ldrh r3, [r4, #28] 8035bb8: 7e22 ldrb r2, [r4, #24] vb = vb->prev; 8035bba: 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; 8035bbc: 3301 adds r3, #1 8035bbe: 189b adds r3, r3, r2 8035bc0: 18ed adds r5, r5, r3 8035bc2: b2ad uxth r5, r5 s32_t *sint_ptr; u16_t tot_len; tot_len = 0; vb = root->tail; while ( vb != NULL ) 8035bc4: 2c00 cmp r4, #0 8035bc6: d1ab bne.n 8035b20 vb = vb->prev; } /* varbind-list seq */ root->seqlen = tot_len; snmp_asn1_enc_length_cnt(root->seqlen, &root->seqlenlen); 8035bc8: 4628 mov r0, r5 vb = vb->prev; } /* varbind-list seq */ root->seqlen = tot_len; 8035bca: 8175 strh r5, [r6, #10] snmp_asn1_enc_length_cnt(root->seqlen, &root->seqlenlen); 8035bcc: f106 0109 add.w r1, r6, #9 8035bd0: f7fc ffa3 bl 8032b1a tot_len += 1 + root->seqlenlen; 8035bd4: 7a73 ldrb r3, [r6, #9] 8035bd6: 3301 adds r3, #1 8035bd8: 18e8 adds r0, r5, r3 return tot_len; } 8035bda: b280 uxth r0, r0 8035bdc: bdf8 pop {r3, r4, r5, r6, r7, pc} 8035bde: 0000 movs r0, r0 08035be0 : * @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) { 8035be0: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8035be4: 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); 8035be6: 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) { 8035bea: 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); 8035bec: 6940 ldr r0, [r0, #20] 8035bee: f504 7190 add.w r1, r4, #288 ; 0x120 8035bf2: f7fc ffb2 bl 8032b5a snmp_asn1_enc_length_cnt(rhl->erridxlen, &rhl->erridxlenlen); 8035bf6: f8b4 0120 ldrh.w r0, [r4, #288] ; 0x120 8035bfa: 4629 mov r1, r5 8035bfc: f7fc ff8d bl 8032b1a tot_len += 1 + rhl->erridxlenlen + rhl->erridxlen; snmp_asn1_enc_s32t_cnt(m_stat->error_status, &rhl->errstatlen); 8035c00: 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; 8035c02: f894 8118 ldrb.w r8, [r4, #280] ; 0x118 8035c06: f8b4 a120 ldrh.w sl, [r4, #288] ; 0x120 snmp_asn1_enc_s32t_cnt(m_stat->error_status, &rhl->errstatlen); 8035c0a: f504 7191 add.w r1, r4, #290 ; 0x122 8035c0e: f7fc ffa4 bl 8032b5a snmp_asn1_enc_length_cnt(rhl->errstatlen, &rhl->errstatlenlen); 8035c12: 1c69 adds r1, r5, #1 8035c14: f8b4 0122 ldrh.w r0, [r4, #290] ; 0x122 8035c18: f7fc ff7f bl 8032b1a tot_len += 1 + rhl->errstatlenlen + rhl->errstatlen; 8035c1c: f8b4 9122 ldrh.w r9, [r4, #290] ; 0x122 snmp_asn1_enc_s32t_cnt(m_stat->rid, &rhl->ridlen); 8035c20: 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; 8035c22: f894 6119 ldrb.w r6, [r4, #281] ; 0x119 snmp_asn1_enc_s32t_cnt(m_stat->rid, &rhl->ridlen); 8035c26: f504 7192 add.w r1, r4, #292 ; 0x124 8035c2a: f7fc ff96 bl 8032b5a snmp_asn1_enc_length_cnt(rhl->ridlen, &rhl->ridlenlen); 8035c2e: f8b4 0124 ldrh.w r0, [r4, #292] ; 0x124 8035c32: f504 718d add.w r1, r4, #282 ; 0x11a 8035c36: f7fc ff70 bl 8032b1a 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; 8035c3a: 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; 8035c3c: f8b4 3124 ldrh.w r3, [r4, #292] ; 0x124 8035c40: f109 0903 add.w r9, r9, #3 8035c44: 4499 add r9, r3 8035c46: 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; 8035c4a: f894 311a ldrb.w r3, [r4, #282] ; 0x11a 8035c4e: 4446 add r6, r8 8035c50: 18f6 adds r6, r6, r3 8035c52: fa17 f686 uxtah r6, r7, r6 8035c56: b2b6 uxth r6, r6 rhl->pdulen = tot_len; snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); 8035c58: 1ce9 adds r1, r5, #3 8035c5a: 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; 8035c5c: f8a4 6126 strh.w r6, [r4, #294] ; 0x126 snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); 8035c60: f7fc ff5b bl 8032b1a tot_len += 1 + rhl->pdulenlen; rhl->comlen = m_stat->com_strlen; 8035c64: 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; 8035c68: f894 811b ldrb.w r8, [r4, #283] ; 0x11b rhl->comlen = m_stat->com_strlen; 8035c6c: f8a4 0128 strh.w r0, [r4, #296] ; 0x128 snmp_asn1_enc_length_cnt(rhl->comlen, &rhl->comlenlen); 8035c70: f504 718e add.w r1, r4, #284 ; 0x11c 8035c74: f7fc ff51 bl 8032b1a tot_len += 1 + rhl->comlenlen + rhl->comlen; snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); 8035c78: 4b14 ldr r3, [pc, #80] ; (8035ccc ) 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; 8035c7a: f894 711c ldrb.w r7, [r4, #284] ; 0x11c snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); 8035c7e: 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; 8035c80: f8b4 9128 ldrh.w r9, [r4, #296] ; 0x128 snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); 8035c84: f504 7195 add.w r1, r4, #298 ; 0x12a 8035c88: f7fc ff67 bl 8032b5a snmp_asn1_enc_length_cnt(rhl->verlen, &rhl->verlenlen); 8035c8c: 1d69 adds r1, r5, #5 8035c8e: f8b4 012a ldrh.w r0, [r4, #298] ; 0x12a 8035c92: f7fc ff42 bl 8032b1a 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; 8035c96: 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; 8035c9a: 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; 8035c9e: 444d add r5, r9 8035ca0: 3503 adds r5, #3 8035ca2: 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; 8035ca4: 197d adds r5, r7, r5 8035ca6: 18ed adds r5, r5, r3 8035ca8: fa16 f585 uxtah r5, r6, r5 8035cac: b2ad uxth r5, r5 rhl->seqlen = tot_len; snmp_asn1_enc_length_cnt(rhl->seqlen, &rhl->seqlenlen); 8035cae: 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; 8035cb0: f8a4 512c strh.w r5, [r4, #300] ; 0x12c snmp_asn1_enc_length_cnt(rhl->seqlen, &rhl->seqlenlen); 8035cb4: f504 718f add.w r1, r4, #286 ; 0x11e 8035cb8: f7fc ff2f bl 8032b1a tot_len += 1 + rhl->seqlenlen; 8035cbc: f894 311e ldrb.w r3, [r4, #286] ; 0x11e 8035cc0: 3301 adds r3, #1 8035cc2: 18e8 adds r0, r5, r3 return tot_len; } 8035cc4: b280 uxth r0, r0 8035cc6: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 8035cca: bf00 nop 8035ccc: 08044908 .word 0x08044908 08035cd0 : /** * 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) { 8035cd0: b570 push {r4, r5, r6, lr} 8035cd2: 4616 mov r6, r2 8035cd4: 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; 8035cd6: 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) { 8035cd8: 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)); 8035cda: 4608 mov r0, r1 ofs += 1; 8035cdc: 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)); 8035cde: 4611 mov r1, r2 8035ce0: 2230 movs r2, #48 ; 0x30 8035ce2: f7fc ff67 bl 8032bb4 ofs += 1; snmp_asn1_enc_length(p, ofs, root->seqlen); 8035ce6: 4628 mov r0, r5 8035ce8: 4631 mov r1, r6 8035cea: 8962 ldrh r2, [r4, #10] 8035cec: f7fc ff76 bl 8032bdc ofs += root->seqlenlen; 8035cf0: 7a63 ldrb r3, [r4, #9] 8035cf2: e064 b.n 8035dbe vb = root->head; while ( vb != NULL ) { snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); 8035cf4: 4631 mov r1, r6 ofs += 1; 8035cf6: 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)); 8035cf8: 2230 movs r2, #48 ; 0x30 ofs += 1; 8035cfa: 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)); 8035cfc: 4628 mov r0, r5 8035cfe: f7fc ff59 bl 8032bb4 ofs += 1; snmp_asn1_enc_length(p, ofs, vb->seqlen); 8035d02: 4631 mov r1, r6 8035d04: 8ba2 ldrh r2, [r4, #28] 8035d06: 4628 mov r0, r5 8035d08: f7fc ff68 bl 8032bdc ofs += vb->seqlenlen; 8035d0c: 7e23 ldrb r3, [r4, #24] 8035d0e: 18f6 adds r6, r6, r3 8035d10: b2b6 uxth r6, r6 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); 8035d12: 4631 mov r1, r6 ofs += 1; 8035d14: 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)); 8035d16: 2206 movs r2, #6 ofs += 1; 8035d18: 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)); 8035d1a: 4628 mov r0, r5 8035d1c: f7fc ff4a bl 8032bb4 ofs += 1; snmp_asn1_enc_length(p, ofs, vb->olen); 8035d20: 4631 mov r1, r6 8035d22: 8be2 ldrh r2, [r4, #30] 8035d24: 4628 mov r0, r5 8035d26: f7fc ff59 bl 8032bdc ofs += vb->olenlen; 8035d2a: 7e63 ldrb r3, [r4, #25] snmp_asn1_enc_oid(p, ofs, vb->ident_len, &vb->ident[0]); 8035d2c: 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; 8035d2e: 18f6 adds r6, r6, r3 8035d30: b2b6 uxth r6, r6 snmp_asn1_enc_oid(p, ofs, vb->ident_len, &vb->ident[0]); 8035d32: 4631 mov r1, r6 8035d34: 68e3 ldr r3, [r4, #12] 8035d36: 4628 mov r0, r5 8035d38: f7fd f805 bl 8032d46 ofs += vb->olen; 8035d3c: 8be3 ldrh r3, [r4, #30] snmp_asn1_enc_type(p, ofs, vb->value_type); 8035d3e: 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; 8035d40: 18f6 adds r6, r6, r3 8035d42: b2b6 uxth r6, r6 snmp_asn1_enc_type(p, ofs, vb->value_type); 8035d44: 4631 mov r1, r6 ofs += 1; 8035d46: 3601 adds r6, #1 8035d48: 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); 8035d4a: 4628 mov r0, r5 8035d4c: f7fc ff32 bl 8032bb4 ofs += 1; snmp_asn1_enc_length(p, ofs, vb->vlen); 8035d50: 4631 mov r1, r6 8035d52: 4628 mov r0, r5 8035d54: 8c22 ldrh r2, [r4, #32] 8035d56: f7fc ff41 bl 8032bdc ofs += vb->vlenlen; 8035d5a: 7ea3 ldrb r3, [r4, #26] 8035d5c: 18f6 adds r6, r6, r3 switch (vb->value_type) 8035d5e: 7c23 ldrb r3, [r4, #16] 8035d60: 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; 8035d62: b2b6 uxth r6, r6 switch (vb->value_type) 8035d64: d01c beq.n 8035da0 8035d66: d806 bhi.n 8035d76 8035d68: 2b04 cmp r3, #4 8035d6a: d019 beq.n 8035da0 8035d6c: 2b06 cmp r3, #6 8035d6e: d01e beq.n 8035dae 8035d70: 2b02 cmp r3, #2 8035d72: d123 bne.n 8035dbc 8035d74: e004 b.n 8035d80 8035d76: 2b43 cmp r3, #67 ; 0x43 8035d78: d90a bls.n 8035d90 8035d7a: 2b44 cmp r3, #68 ; 0x44 8035d7c: d11e bne.n 8035dbc 8035d7e: e00f b.n 8035da0 { 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); 8035d80: 6963 ldr r3, [r4, #20] 8035d82: 8c22 ldrh r2, [r4, #32] 8035d84: 681b ldr r3, [r3, #0] 8035d86: 4628 mov r0, r5 8035d88: 4631 mov r1, r6 8035d8a: f7fc ffaf bl 8032cec break; 8035d8e: e015 b.n 8035dbc 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); 8035d90: 6963 ldr r3, [r4, #20] 8035d92: 8c22 ldrh r2, [r4, #32] 8035d94: 681b ldr r3, [r3, #0] 8035d96: 4628 mov r0, r5 8035d98: 4631 mov r1, r6 8035d9a: f7fc ff67 bl 8032c6c break; 8035d9e: e00d b.n 8035dbc 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); 8035da0: 4628 mov r0, r5 8035da2: 4631 mov r1, r6 8035da4: 8c22 ldrh r2, [r4, #32] 8035da6: 6963 ldr r3, [r4, #20] 8035da8: f7fd f840 bl 8032e2c break; 8035dac: e006 b.n 8035dbc 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); 8035dae: 7c62 ldrb r2, [r4, #17] 8035db0: 6963 ldr r3, [r4, #20] 8035db2: 4628 mov r0, r5 8035db4: 4631 mov r1, r6 8035db6: 0892 lsrs r2, r2, #2 8035db8: f7fc ffc5 bl 8032d46 break; default: /* unsupported type */ break; }; ofs += vb->vlen; 8035dbc: 8c23 ldrh r3, [r4, #32] vb = vb->next; 8035dbe: 6824 ldr r4, [r4, #0] break; default: /* unsupported type */ break; }; ofs += vb->vlen; 8035dc0: 18f6 adds r6, r6, r3 8035dc2: b2b6 uxth r6, r6 ofs += 1; snmp_asn1_enc_length(p, ofs, root->seqlen); ofs += root->seqlenlen; vb = root->head; while ( vb != NULL ) 8035dc4: 2c00 cmp r4, #0 8035dc6: d195 bne.n 8035cf4 }; ofs += vb->vlen; vb = vb->next; } return ofs; } 8035dc8: 4630 mov r0, r6 8035dca: bd70 pop {r4, r5, r6, pc} 08035dcc : * @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) 8035dcc: b908 cbnz r0, 8035dd2 { trap_dst[dst_idx].enable = enable; 8035dce: 4b01 ldr r3, [pc, #4] ; (8035dd4 ) 8035dd0: 7119 strb r1, [r3, #4] 8035dd2: 4770 bx lr 8035dd4: 2000f810 .word 0x2000f810 08035dd8 : * @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) 8035dd8: b918 cbnz r0, 8035de2 { ip_addr_set(&trap_dst[dst_idx].dip, dst); 8035dda: b101 cbz r1, 8035dde 8035ddc: 6809 ldr r1, [r1, #0] 8035dde: 4b01 ldr r3, [pc, #4] ; (8035de4 ) 8035de0: 6019 str r1, [r3, #0] 8035de2: 4770 bx lr 8035de4: 2000f810 .word 0x2000f810 08035de8 : * @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) { 8035de8: b5f0 push {r4, r5, r6, r7, lr} 8035dea: 4604 mov r4, r0 8035dec: b085 sub sp, #20 struct snmp_varbind_root emptyvb = {NULL, NULL, 0, 0, 0}; 8035dee: 220c movs r2, #12 8035df0: 2100 movs r1, #0 8035df2: 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); 8035df4: 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}; 8035df8: f7eb ffd2 bl 8021da0 struct pbuf *p; u16_t tot_len; err_t err; /* pass 0, calculate length fields */ tot_len = snmp_varbind_list_sum(&m_stat->outvb); 8035dfc: 4630 mov r0, r6 8035dfe: f7ff fe89 bl 8035b14 8035e02: 4601 mov r1, r0 tot_len = snmp_resp_header_sum(m_stat, tot_len); 8035e04: 4620 mov r0, r4 8035e06: f7ff feeb bl 8035be0 /* try allocating pbuf(s) for complete response */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 8035e0a: 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); 8035e0c: 4601 mov r1, r0 /* try allocating pbuf(s) for complete response */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 8035e0e: 2000 movs r0, #0 8035e10: f7f9 fbbf bl 802f592 if (p == NULL) 8035e14: 4605 mov r5, r0 8035e16: b990 cbnz r0, 8035e3e { 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; 8035e18: 2301 movs r3, #1 8035e1a: 6123 str r3, [r4, #16] m_stat->error_index = 0; 8035e1c: 6160 str r0, [r4, #20] /* pass 0, recalculate lengths, for empty varbind-list */ tot_len = snmp_varbind_list_sum(&emptyvb); 8035e1e: a801 add r0, sp, #4 8035e20: f7ff fe78 bl 8035b14 8035e24: 4601 mov r1, r0 tot_len = snmp_resp_header_sum(m_stat, tot_len); 8035e26: 4620 mov r0, r4 8035e28: f7ff feda bl 8035be0 /* retry allocation once for header and empty varbind-list */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 8035e2c: 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); 8035e2e: 4601 mov r1, r0 /* retry allocation once for header and empty varbind-list */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 8035e30: 4628 mov r0, r5 8035e32: f7f9 fbae bl 802f592 } if (p != NULL) 8035e36: 4605 mov r5, r0 8035e38: 2800 cmp r0, #0 8035e3a: f000 80dc beq.w 8035ff6 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)); 8035e3e: 2100 movs r1, #0 8035e40: 2230 movs r2, #48 ; 0x30 8035e42: 4628 mov r0, r5 8035e44: f7fc feb6 bl 8032bb4 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.seqlen); 8035e48: 2101 movs r1, #1 8035e4a: f8b4 212c ldrh.w r2, [r4, #300] ; 0x12c 8035e4e: 4628 mov r0, r5 8035e50: f7fc fec4 bl 8032bdc ofs += m_stat->rhl.seqlenlen; 8035e54: f894 711e ldrb.w r7, [r4, #286] ; 0x11e snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8035e58: 2202 movs r2, #2 8035e5a: 1c79 adds r1, r7, #1 8035e5c: 4628 mov r0, r5 ofs += 1; 8035e5e: 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)); 8035e60: f7fc fea8 bl 8032bb4 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.verlen); 8035e64: 4639 mov r1, r7 8035e66: f8b4 212a ldrh.w r2, [r4, #298] ; 0x12a 8035e6a: 4628 mov r0, r5 8035e6c: f7fc feb6 bl 8032bdc ofs += m_stat->rhl.verlenlen; 8035e70: f894 311d ldrb.w r3, [r4, #285] ; 0x11d snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.verlen, snmp_version); 8035e74: 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; 8035e78: 18ff adds r7, r7, r3 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.verlen, snmp_version); 8035e7a: 4b61 ldr r3, [pc, #388] ; (8036000 ) 8035e7c: 4639 mov r1, r7 8035e7e: 681b ldr r3, [r3, #0] 8035e80: 4628 mov r0, r5 8035e82: f7fc ff33 bl 8032cec ofs += m_stat->rhl.verlen; 8035e86: f8b4 312a ldrh.w r3, [r4, #298] ; 0x12a 8035e8a: 18ff adds r7, r7, r3 8035e8c: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); 8035e8e: 4639 mov r1, r7 ofs += 1; 8035e90: 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)); 8035e92: 2204 movs r2, #4 ofs += 1; 8035e94: 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)); 8035e96: 4628 mov r0, r5 8035e98: f7fc fe8c bl 8032bb4 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.comlen); 8035e9c: 4639 mov r1, r7 8035e9e: f8b4 2128 ldrh.w r2, [r4, #296] ; 0x128 8035ea2: 4628 mov r0, r5 8035ea4: f7fc fe9a bl 8032bdc ofs += m_stat->rhl.comlenlen; 8035ea8: f894 311c ldrb.w r3, [r4, #284] ; 0x11c snmp_asn1_enc_raw(p, ofs, m_stat->rhl.comlen, m_stat->community); 8035eac: 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; 8035eb0: 18ff adds r7, r7, r3 8035eb2: b2bf uxth r7, r7 snmp_asn1_enc_raw(p, ofs, m_stat->rhl.comlen, m_stat->community); 8035eb4: 4639 mov r1, r7 8035eb6: f104 0318 add.w r3, r4, #24 8035eba: 4628 mov r0, r5 8035ebc: f7fc ffb6 bl 8032e2c ofs += m_stat->rhl.comlen; 8035ec0: f8b4 3128 ldrh.w r3, [r4, #296] ; 0x128 8035ec4: 18ff adds r7, r7, r3 8035ec6: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_RESP)); 8035ec8: 4639 mov r1, r7 ofs += 1; 8035eca: 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)); 8035ecc: 22a2 movs r2, #162 ; 0xa2 ofs += 1; 8035ece: 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)); 8035ed0: 4628 mov r0, r5 8035ed2: f7fc fe6f bl 8032bb4 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.pdulen); 8035ed6: 4639 mov r1, r7 8035ed8: f8b4 2126 ldrh.w r2, [r4, #294] ; 0x126 8035edc: 4628 mov r0, r5 8035ede: f7fc fe7d bl 8032bdc ofs += m_stat->rhl.pdulenlen; 8035ee2: f894 311b ldrb.w r3, [r4, #283] ; 0x11b 8035ee6: 18ff adds r7, r7, r3 8035ee8: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8035eea: 4639 mov r1, r7 ofs += 1; 8035eec: 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)); 8035eee: 2202 movs r2, #2 ofs += 1; 8035ef0: 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)); 8035ef2: 4628 mov r0, r5 8035ef4: f7fc fe5e bl 8032bb4 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.ridlen); 8035ef8: 4639 mov r1, r7 8035efa: f8b4 2124 ldrh.w r2, [r4, #292] ; 0x124 8035efe: 4628 mov r0, r5 8035f00: f7fc fe6c bl 8032bdc ofs += m_stat->rhl.ridlenlen; 8035f04: f894 311a ldrb.w r3, [r4, #282] ; 0x11a snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.ridlen, m_stat->rid); 8035f08: 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; 8035f0c: 18ff adds r7, r7, r3 8035f0e: b2bf uxth r7, r7 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.ridlen, m_stat->rid); 8035f10: 4639 mov r1, r7 8035f12: 68e3 ldr r3, [r4, #12] 8035f14: 4628 mov r0, r5 8035f16: f7fc fee9 bl 8032cec ofs += m_stat->rhl.ridlen; 8035f1a: f8b4 3124 ldrh.w r3, [r4, #292] ; 0x124 8035f1e: 18ff adds r7, r7, r3 8035f20: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8035f22: 4639 mov r1, r7 ofs += 1; 8035f24: 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)); 8035f26: 2202 movs r2, #2 ofs += 1; 8035f28: 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)); 8035f2a: 4628 mov r0, r5 8035f2c: f7fc fe42 bl 8032bb4 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.errstatlen); 8035f30: 4639 mov r1, r7 8035f32: f8b4 2122 ldrh.w r2, [r4, #290] ; 0x122 8035f36: 4628 mov r0, r5 8035f38: f7fc fe50 bl 8032bdc ofs += m_stat->rhl.errstatlenlen; 8035f3c: f894 3119 ldrb.w r3, [r4, #281] ; 0x119 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.errstatlen, m_stat->error_status); 8035f40: 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; 8035f44: 18ff adds r7, r7, r3 8035f46: b2bf uxth r7, r7 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.errstatlen, m_stat->error_status); 8035f48: 4639 mov r1, r7 8035f4a: 6923 ldr r3, [r4, #16] 8035f4c: 4628 mov r0, r5 8035f4e: f7fc fecd bl 8032cec ofs += m_stat->rhl.errstatlen; 8035f52: f8b4 3122 ldrh.w r3, [r4, #290] ; 0x122 8035f56: 18ff adds r7, r7, r3 8035f58: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8035f5a: 4639 mov r1, r7 ofs += 1; 8035f5c: 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)); 8035f5e: 2202 movs r2, #2 ofs += 1; 8035f60: 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)); 8035f62: 4628 mov r0, r5 8035f64: f7fc fe26 bl 8032bb4 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.erridxlen); 8035f68: 4639 mov r1, r7 8035f6a: f8b4 2120 ldrh.w r2, [r4, #288] ; 0x120 8035f6e: 4628 mov r0, r5 8035f70: f7fc fe34 bl 8032bdc ofs += m_stat->rhl.erridxlenlen; 8035f74: f894 3118 ldrb.w r3, [r4, #280] ; 0x118 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.erridxlen, m_stat->error_index); 8035f78: 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; 8035f7c: 18ff adds r7, r7, r3 8035f7e: b2bf uxth r7, r7 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.erridxlen, m_stat->error_index); 8035f80: 4639 mov r1, r7 8035f82: 6963 ldr r3, [r4, #20] 8035f84: 4628 mov r0, r5 8035f86: f7fc feb1 bl 8032cec ofs += m_stat->rhl.erridxlen; 8035f8a: f8b4 3120 ldrh.w r3, [r4, #288] ; 0x120 8035f8e: 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); 8035f90: 4630 mov r0, r6 8035f92: 4629 mov r1, r5 8035f94: b292 uxth r2, r2 8035f96: f7ff fe9b bl 8035cd0 switch (m_stat->error_status) 8035f9a: 6923 ldr r3, [r4, #16] 8035f9c: 3b01 subs r3, #1 8035f9e: 2b04 cmp r3, #4 8035fa0: d80f bhi.n 8035fc2 8035fa2: e8df f003 tbb [pc, r3] 8035fa6: 0603 .short 0x0603 8035fa8: 0e09 .short 0x0e09 8035faa: 0c .byte 0x0c 8035fab: 00 .byte 0x00 { case SNMP_ES_TOOBIG: snmp_inc_snmpouttoobigs(); 8035fac: f7fe fa0e bl 80343cc break; 8035fb0: e007 b.n 8035fc2 case SNMP_ES_NOSUCHNAME: snmp_inc_snmpoutnosuchnames(); 8035fb2: f7fe fa13 bl 80343dc break; 8035fb6: e004 b.n 8035fc2 case SNMP_ES_BADVALUE: snmp_inc_snmpoutbadvalues(); 8035fb8: f7fe fa18 bl 80343ec break; 8035fbc: e001 b.n 8035fc2 case SNMP_ES_GENERROR: snmp_inc_snmpoutgenerrs(); 8035fbe: f7fe fa1d bl 80343fc break; } snmp_inc_snmpoutgetresponses(); 8035fc2: f7fe fa23 bl 803440c snmp_inc_snmpoutpkts(); 8035fc6: f7fe f981 bl 80342cc /** @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); 8035fca: 8922 ldrh r2, [r4, #8] 8035fcc: 6820 ldr r0, [r4, #0] 8035fce: 1d21 adds r1, r4, #4 8035fd0: f7fb ffac bl 8031f2c err = udp_send(m_stat->pcb, p); 8035fd4: 4629 mov r1, r5 8035fd6: 6820 ldr r0, [r4, #0] 8035fd8: f7fb ffa3 bl 8031f22 /** @todo release some memory, retry and return tooBig? tooMuchHassle? */ err = ERR_MEM; } else { err = ERR_OK; 8035fdc: f1b0 3fff cmp.w r0, #4294967295 8035fe0: bf0c ite eq 8035fe2: f04f 36ff moveq.w r6, #4294967295 8035fe6: 2600 movne r6, #0 } /** disassociate remote address and port with this pcb */ udp_disconnect(m_stat->pcb); 8035fe8: 6820 ldr r0, [r4, #0] 8035fea: f7fb ffc5 bl 8031f78 pbuf_free(p); 8035fee: 4628 mov r0, r5 8035ff0: f7f9 fa82 bl 802f4f8 8035ff4: e000 b.n 8035ff8 } else { /* first pbuf alloc try or retry alloc failed very low on memory, couldn't return tooBig */ return ERR_MEM; 8035ff6: 26ff movs r6, #255 ; 0xff } } 8035ff8: b270 sxtb r0, r6 8035ffa: b005 add sp, #20 8035ffc: bdf0 pop {r4, r5, r6, r7, pc} 8035ffe: bf00 nop 8036000: 08044908 .word 0x08044908 08036004 : * 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) { 8036004: 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)) 8036008: 4b11 ldr r3, [pc, #68] ; (8036050 ) * 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) { 803600a: 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)) 803600c: 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) { 803600e: b085 sub sp, #20 8036010: 4605 mov r5, r0 8036012: 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)) 8036014: 2a00 cmp r2, #0 8036016: f000 81b8 beq.w 803638a 803601a: 6818 ldr r0, [r3, #0] 803601c: 2800 cmp r0, #0 803601e: f000 81b4 beq.w 803638a { /* network order trap destination */ ip_addr_copy(trap_msg.dip, td->dip); 8036022: 4c0c ldr r4, [pc, #48] ; (8036054 ) 8036024: 6060 str r0, [r4, #4] /* lookup current source address for this dst */ dst_if = ip_route(&td->dip); 8036026: 4618 mov r0, r3 8036028: f7fc f9f0 bl 803240c ip_addr_copy(dst_ip, dst_if->ip_addr); 803602c: 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; 803602e: 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); 8036030: 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); 8036034: 7323 strb r3, [r4, #12] trap_msg.sip_raw[1] = ip4_addr2(&dst_ip); 8036036: 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) 8036038: 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); 803603a: f3c3 4207 ubfx r2, r3, #16, #8 trap_msg.sip_raw[3] = ip4_addr4(&dst_ip); 803603e: 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); 8036042: 73a2 strb r2, [r4, #14] trap_msg.sip_raw[3] = ip4_addr4(&dst_ip); 8036044: 73e3 strb r3, [r4, #15] trap_msg.gen_trap = generic_trap; trap_msg.spc_trap = specific_trap; 8036046: 6167 str r7, [r4, #20] if (generic_trap == SNMP_GENTRAP_ENTERPRISESPC) 8036048: d106 bne.n 8036058 { /* enterprise-Specific trap */ trap_msg.enterprise = eoid; 803604a: 60a6 str r6, [r4, #8] 803604c: e008 b.n 8036060 803604e: bf00 nop 8036050: 2000f810 .word 0x2000f810 8036054: 2000f818 .word 0x2000f818 } else { /* generic (MIB-II) trap */ snmp_get_snmpgrpid_ptr(&trap_msg.enterprise); 8036058: f104 0008 add.w r0, r4, #8 803605c: f7fe f9e6 bl 803442c } snmp_get_sysuptime(&trap_msg.ts); 8036060: 48bb ldr r0, [pc, #748] ; (8036350 ) struct snmp_trap_header_lengths *thl; thl = &m_trap->thl; tot_len = vb_len; snmp_asn1_enc_u32t_cnt(m_trap->ts, &thl->tslen); 8036062: 4cbc ldr r4, [pc, #752] ; (8036354 ) else { /* generic (MIB-II) trap */ snmp_get_snmpgrpid_ptr(&trap_msg.enterprise); } snmp_get_sysuptime(&trap_msg.ts); 8036064: f7fd fd4c bl 8033b00 /* pass 0, calculate length fields */ tot_len = snmp_varbind_list_sum(&trap_msg.outvb); 8036068: 48bb ldr r0, [pc, #748] ; (8036358 ) 803606a: f7ff fd53 bl 8035b14 struct snmp_trap_header_lengths *thl; thl = &m_trap->thl; tot_len = vb_len; snmp_asn1_enc_u32t_cnt(m_trap->ts, &thl->tslen); 803606e: 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); 8036072: 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); 8036074: 69a0 ldr r0, [r4, #24] 8036076: f7fc fd5b bl 8032b30 snmp_asn1_enc_length_cnt(thl->tslen, &thl->tslenlen); 803607a: 8e60 ldrh r0, [r4, #50] ; 0x32 803607c: f104 0128 add.w r1, r4, #40 ; 0x28 8036080: f7fc fd4b bl 8032b1a tot_len += 1 + thl->tslen + thl->tslenlen; 8036084: f8b4 c032 ldrh.w ip, [r4, #50] ; 0x32 snmp_asn1_enc_s32t_cnt(m_trap->spc_trap, &thl->strplen); 8036088: 6960 ldr r0, [r4, #20] 803608a: f8cd c004 str.w ip, [sp, #4] 803608e: 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; 8036092: f894 9028 ldrb.w r9, [r4, #40] ; 0x28 snmp_asn1_enc_s32t_cnt(m_trap->spc_trap, &thl->strplen); 8036096: f7fc fd60 bl 8032b5a snmp_asn1_enc_length_cnt(thl->strplen, &thl->strplenlen); 803609a: 8ea0 ldrh r0, [r4, #52] ; 0x34 803609c: f104 0129 add.w r1, r4, #41 ; 0x29 80360a0: f7fc fd3b bl 8032b1a tot_len += 1 + thl->strplen + thl->strplenlen; 80360a4: 8ea3 ldrh r3, [r4, #52] ; 0x34 snmp_asn1_enc_s32t_cnt(m_trap->gen_trap, &thl->gtrplen); 80360a6: 6920 ldr r0, [r4, #16] 80360a8: 9302 str r3, [sp, #8] 80360aa: 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; 80360ae: 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; 80360b2: 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); 80360b4: f7fc fd51 bl 8032b5a snmp_asn1_enc_length_cnt(thl->gtrplen, &thl->gtrplenlen); 80360b8: 8ee0 ldrh r0, [r4, #54] ; 0x36 80360ba: f104 012a add.w r1, r4, #42 ; 0x2a 80360be: f7fc fd2c bl 8032b1a tot_len += 1 + thl->gtrplen + thl->gtrplenlen; thl->aaddrlen = 4; snmp_asn1_enc_length_cnt(thl->aaddrlen, &thl->aaddrlenlen); 80360c2: 4628 mov r0, r5 80360c4: 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; 80360c8: f8b4 b036 ldrh.w fp, [r4, #54] ; 0x36 80360cc: f894 702a ldrb.w r7, [r4, #42] ; 0x2a thl->aaddrlen = 4; 80360d0: 8725 strh r5, [r4, #56] ; 0x38 snmp_asn1_enc_length_cnt(thl->aaddrlen, &thl->aaddrlenlen); 80360d2: f7fc fd22 bl 8032b1a tot_len += 1 + thl->aaddrlen + thl->aaddrlenlen; 80360d6: f894 202b ldrb.w r2, [r4, #43] ; 0x2b snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); 80360da: 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; 80360dc: 9203 str r2, [sp, #12] snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); 80360de: 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; 80360e2: f8b4 a038 ldrh.w sl, [r4, #56] ; 0x38 snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); 80360e6: f104 023a add.w r2, r4, #58 ; 0x3a 80360ea: f7fc fd4b bl 8032b84 snmp_asn1_enc_length_cnt(thl->eidlen, &thl->eidlenlen); 80360ee: 8f60 ldrh r0, [r4, #58] ; 0x3a 80360f0: f104 012c add.w r1, r4, #44 ; 0x2c 80360f4: f7fc fd11 bl 8032b1a 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; 80360f8: f8dd c004 ldr.w ip, [sp, #4] 80360fc: 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; 80360fe: 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; 8036100: 4463 add r3, ip 8036102: 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; 8036104: 449b add fp, r3 8036106: 44da add sl, fp 8036108: 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; 803610c: 44d1 add r9, sl 803610e: 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; 8036110: 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; 8036112: 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; 8036116: 19df adds r7, r3, r7 8036118: f894 302c ldrb.w r3, [r4, #44] ; 0x2c 803611c: 18ff adds r7, r7, r3 803611e: fa16 f687 uxtah r6, r6, r7 8036122: b2b6 uxth r6, r6 thl->pdulen = tot_len; snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); 8036124: 4630 mov r0, r6 8036126: f104 012d add.w r1, r4, #45 ; 0x2d tot_len += 1 + thl->pdulenlen; thl->comlen = sizeof(snmp_publiccommunity) - 1; 803612a: 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; 803612c: 87a6 strh r6, [r4, #60] ; 0x3c snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); 803612e: f7fc fcf4 bl 8032b1a tot_len += 1 + thl->pdulenlen; thl->comlen = sizeof(snmp_publiccommunity) - 1; snmp_asn1_enc_length_cnt(thl->comlen, &thl->comlenlen); 8036132: 4638 mov r0, r7 8036134: 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; 8036138: f894 a02d ldrb.w sl, [r4, #45] ; 0x2d thl->comlen = sizeof(snmp_publiccommunity) - 1; 803613c: 87e7 strh r7, [r4, #62] ; 0x3e snmp_asn1_enc_length_cnt(thl->comlen, &thl->comlenlen); 803613e: f7fc fcec bl 8032b1a tot_len += 1 + thl->comlenlen + thl->comlen; snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); 8036142: 4b86 ldr r3, [pc, #536] ; (803635c ) 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; 8036144: f894 902e ldrb.w r9, [r4, #46] ; 0x2e snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); 8036148: 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; 803614c: f8b4 b03e ldrh.w fp, [r4, #62] ; 0x3e snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); 8036150: 4640 mov r0, r8 8036152: f104 0140 add.w r1, r4, #64 ; 0x40 8036156: f7fc fd00 bl 8032b5a snmp_asn1_enc_length_cnt(thl->verlen, &thl->verlenlen); 803615a: f8b4 0040 ldrh.w r0, [r4, #64] ; 0x40 803615e: f104 012f add.w r1, r4, #47 ; 0x2f 8036162: f7fc fcda bl 8032b1a 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; 8036166: f8b4 3040 ldrh.w r3, [r4, #64] ; 0x40 803616a: 449b add fp, r3 803616c: 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; 8036170: 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; 8036174: 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; 8036176: 44d1 add r9, sl 8036178: 4499 add r9, r3 803617a: fa16 f689 uxtah r6, r6, r9 803617e: b2b6 uxth r6, r6 thl->seqlen = tot_len; snmp_asn1_enc_length_cnt(thl->seqlen, &thl->seqlenlen); 8036180: 4630 mov r0, r6 8036182: 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; 8036186: f8a4 6042 strh.w r6, [r4, #66] ; 0x42 snmp_asn1_enc_length_cnt(thl->seqlen, &thl->seqlenlen); 803618a: f7fc fcc6 bl 8032b1a tot_len += 1 + thl->seqlenlen; 803618e: f894 3030 ldrb.w r3, [r4, #48] ; 0x30 8036192: 3301 adds r3, #1 8036194: 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); 8036196: 2000 movs r0, #0 8036198: b289 uxth r1, r1 803619a: 2203 movs r2, #3 803619c: f7f9 f9f9 bl 802f592 if (p != NULL) 80361a0: 4606 mov r6, r0 80361a2: 2800 cmp r0, #0 80361a4: f000 80f3 beq.w 803638e 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)); 80361a8: 2100 movs r1, #0 80361aa: 2230 movs r2, #48 ; 0x30 80361ac: f7fc fd02 bl 8032bb4 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.seqlen); 80361b0: 2101 movs r1, #1 80361b2: f8b4 2042 ldrh.w r2, [r4, #66] ; 0x42 80361b6: 4630 mov r0, r6 80361b8: f7fc fd10 bl 8032bdc ofs += m_trap->thl.seqlenlen; 80361bc: f894 9030 ldrb.w r9, [r4, #48] ; 0x30 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 80361c0: 2202 movs r2, #2 80361c2: f109 0101 add.w r1, r9, #1 80361c6: 4630 mov r0, r6 ofs += 1; 80361c8: 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)); 80361cc: f7fc fcf2 bl 8032bb4 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.verlen); 80361d0: 4649 mov r1, r9 80361d2: f8b4 2040 ldrh.w r2, [r4, #64] ; 0x40 80361d6: 4630 mov r0, r6 80361d8: f7fc fd00 bl 8032bdc ofs += m_trap->thl.verlenlen; 80361dc: f894 302f ldrb.w r3, [r4, #47] ; 0x2f snmp_asn1_enc_s32t(p, ofs, m_trap->thl.verlen, snmp_version); 80361e0: 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; 80361e4: 4499 add r9, r3 snmp_asn1_enc_s32t(p, ofs, m_trap->thl.verlen, snmp_version); 80361e6: 4649 mov r1, r9 80361e8: 4643 mov r3, r8 80361ea: 4630 mov r0, r6 80361ec: f7fc fd7e bl 8032cec ofs += m_trap->thl.verlen; 80361f0: f8b4 3040 ldrh.w r3, [r4, #64] ; 0x40 80361f4: 4499 add r9, r3 80361f6: fa1f f989 uxth.w r9, r9 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); 80361fa: 462a mov r2, r5 ofs += 1; 80361fc: 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)); 8036200: 4649 mov r1, r9 ofs += 1; 8036202: 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)); 8036204: 4630 mov r0, r6 8036206: f7fc fcd5 bl 8032bb4 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.comlen); 803620a: 4629 mov r1, r5 803620c: 8fe2 ldrh r2, [r4, #62] ; 0x3e 803620e: 4630 mov r0, r6 8036210: f7fc fce4 bl 8032bdc ofs += m_trap->thl.comlenlen; 8036214: f894 302e ldrb.w r3, [r4, #46] ; 0x2e snmp_asn1_enc_raw(p, ofs, m_trap->thl.comlen, (u8_t *)&snmp_publiccommunity[0]); 8036218: 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; 803621a: 18ed adds r5, r5, r3 803621c: b2ad uxth r5, r5 snmp_asn1_enc_raw(p, ofs, m_trap->thl.comlen, (u8_t *)&snmp_publiccommunity[0]); 803621e: 4629 mov r1, r5 8036220: 4b4f ldr r3, [pc, #316] ; (8036360 ) 8036222: 4630 mov r0, r6 8036224: f7fc fe02 bl 8032e2c ofs += m_trap->thl.comlen; 8036228: 8fe3 ldrh r3, [r4, #62] ; 0x3e 803622a: 18ed adds r5, r5, r3 803622c: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_TRAP)); 803622e: 4629 mov r1, r5 ofs += 1; 8036230: 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)); 8036232: 22a4 movs r2, #164 ; 0xa4 ofs += 1; 8036234: 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)); 8036236: 4630 mov r0, r6 8036238: f7fc fcbc bl 8032bb4 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.pdulen); 803623c: 4629 mov r1, r5 803623e: 8fa2 ldrh r2, [r4, #60] ; 0x3c 8036240: 4630 mov r0, r6 8036242: f7fc fccb bl 8032bdc ofs += m_trap->thl.pdulenlen; 8036246: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 803624a: 18ed adds r5, r5, r3 803624c: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); 803624e: 4629 mov r1, r5 ofs += 1; 8036250: 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)); 8036252: 463a mov r2, r7 ofs += 1; 8036254: 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)); 8036256: 4630 mov r0, r6 8036258: f7fc fcac bl 8032bb4 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.eidlen); 803625c: 4629 mov r1, r5 803625e: 8f62 ldrh r2, [r4, #58] ; 0x3a 8036260: 4630 mov r0, r6 8036262: f7fc fcbb bl 8032bdc ofs += m_trap->thl.eidlenlen; 8036266: f894 302c ldrb.w r3, [r4, #44] ; 0x2c 803626a: 18ed adds r5, r5, r3 snmp_asn1_enc_oid(p, ofs, m_trap->enterprise->len, &m_trap->enterprise->id[0]); 803626c: 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; 803626e: b2ad uxth r5, r5 snmp_asn1_enc_oid(p, ofs, m_trap->enterprise->len, &m_trap->enterprise->id[0]); 8036270: 4629 mov r1, r5 8036272: f813 2b04 ldrb.w r2, [r3], #4 8036276: 4630 mov r0, r6 8036278: f7fc fd65 bl 8032d46 ofs += m_trap->thl.eidlen; 803627c: 8f63 ldrh r3, [r4, #58] ; 0x3a 803627e: 18ed adds r5, r5, r3 8036280: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR)); 8036282: 4629 mov r1, r5 ofs += 1; 8036284: 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)); 8036286: 2240 movs r2, #64 ; 0x40 ofs += 1; 8036288: 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)); 803628a: 4630 mov r0, r6 803628c: f7fc fc92 bl 8032bb4 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.aaddrlen); 8036290: 4629 mov r1, r5 8036292: 8f22 ldrh r2, [r4, #56] ; 0x38 8036294: 4630 mov r0, r6 8036296: f7fc fca1 bl 8032bdc ofs += m_trap->thl.aaddrlenlen; 803629a: f894 302b ldrb.w r3, [r4, #43] ; 0x2b snmp_asn1_enc_raw(p, ofs, m_trap->thl.aaddrlen, &m_trap->sip_raw[0]); 803629e: 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; 80362a0: 18ed adds r5, r5, r3 80362a2: b2ad uxth r5, r5 snmp_asn1_enc_raw(p, ofs, m_trap->thl.aaddrlen, &m_trap->sip_raw[0]); 80362a4: 4629 mov r1, r5 80362a6: f104 030c add.w r3, r4, #12 80362aa: 4630 mov r0, r6 80362ac: f7fc fdbe bl 8032e2c ofs += m_trap->thl.aaddrlen; 80362b0: 8f23 ldrh r3, [r4, #56] ; 0x38 80362b2: 18ed adds r5, r5, r3 80362b4: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 80362b6: 4629 mov r1, r5 ofs += 1; 80362b8: 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)); 80362ba: 2202 movs r2, #2 ofs += 1; 80362bc: 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)); 80362be: 4630 mov r0, r6 80362c0: f7fc fc78 bl 8032bb4 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.gtrplen); 80362c4: 4629 mov r1, r5 80362c6: 8ee2 ldrh r2, [r4, #54] ; 0x36 80362c8: 4630 mov r0, r6 80362ca: f7fc fc87 bl 8032bdc ofs += m_trap->thl.gtrplenlen; 80362ce: f894 302a ldrb.w r3, [r4, #42] ; 0x2a snmp_asn1_enc_u32t(p, ofs, m_trap->thl.gtrplen, m_trap->gen_trap); 80362d2: 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; 80362d4: 18ed adds r5, r5, r3 80362d6: b2ad uxth r5, r5 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.gtrplen, m_trap->gen_trap); 80362d8: 4629 mov r1, r5 80362da: 6923 ldr r3, [r4, #16] 80362dc: 4630 mov r0, r6 80362de: f7fc fcc5 bl 8032c6c ofs += m_trap->thl.gtrplen; 80362e2: 8ee3 ldrh r3, [r4, #54] ; 0x36 80362e4: 18ed adds r5, r5, r3 80362e6: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 80362e8: 4629 mov r1, r5 ofs += 1; 80362ea: 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)); 80362ec: 2202 movs r2, #2 ofs += 1; 80362ee: 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)); 80362f0: 4630 mov r0, r6 80362f2: f7fc fc5f bl 8032bb4 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.strplen); 80362f6: 4629 mov r1, r5 80362f8: 8ea2 ldrh r2, [r4, #52] ; 0x34 80362fa: 4630 mov r0, r6 80362fc: f7fc fc6e bl 8032bdc ofs += m_trap->thl.strplenlen; 8036300: f894 3029 ldrb.w r3, [r4, #41] ; 0x29 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.strplen, m_trap->spc_trap); 8036304: 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; 8036306: 18ed adds r5, r5, r3 8036308: b2ad uxth r5, r5 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.strplen, m_trap->spc_trap); 803630a: 4629 mov r1, r5 803630c: 6963 ldr r3, [r4, #20] 803630e: 4630 mov r0, r6 8036310: f7fc fcac bl 8032c6c ofs += m_trap->thl.strplen; 8036314: 8ea3 ldrh r3, [r4, #52] ; 0x34 8036316: 18ed adds r5, r5, r3 8036318: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS)); 803631a: 4629 mov r1, r5 ofs += 1; 803631c: 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)); 803631e: 2243 movs r2, #67 ; 0x43 ofs += 1; 8036320: 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)); 8036322: 4630 mov r0, r6 8036324: f7fc fc46 bl 8032bb4 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.tslen); 8036328: 4629 mov r1, r5 803632a: 8e62 ldrh r2, [r4, #50] ; 0x32 803632c: 4630 mov r0, r6 803632e: f7fc fc55 bl 8032bdc ofs += m_trap->thl.tslenlen; 8036332: f894 3028 ldrb.w r3, [r4, #40] ; 0x28 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.tslen, m_trap->ts); 8036336: 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; 8036338: 18ed adds r5, r5, r3 803633a: b2ad uxth r5, r5 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.tslen, m_trap->ts); 803633c: 4629 mov r1, r5 803633e: 69a3 ldr r3, [r4, #24] 8036340: 4630 mov r0, r6 8036342: f7fc fc93 bl 8032c6c ofs += m_trap->thl.tslen; 8036346: 8e63 ldrh r3, [r4, #50] ; 0x32 8036348: 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); 803634a: 4631 mov r1, r6 803634c: e00a b.n 8036364 803634e: bf00 nop 8036350: 2000f830 .word 0x2000f830 8036354: 2000f818 .word 0x2000f818 8036358: 2000f834 .word 0x2000f834 803635c: 08044908 .word 0x08044908 8036360: 0804490c .word 0x0804490c 8036364: b292 uxth r2, r2 8036366: f104 001c add.w r0, r4, #28 803636a: f7ff fcb1 bl 8035cd0 snmp_inc_snmpouttraps(); 803636e: f7fe f855 bl 803441c snmp_inc_snmpoutpkts(); 8036372: f7fd ffab bl 80342cc /** send to the TRAP destination */ udp_sendto(trap_msg.pcb, p, &trap_msg.dip, SNMP_TRAP_PORT); 8036376: 4622 mov r2, r4 8036378: 4631 mov r1, r6 803637a: f852 0b04 ldr.w r0, [r2], #4 803637e: 23a2 movs r3, #162 ; 0xa2 8036380: f7fb fdbb bl 8031efa pbuf_free(p); 8036384: 4630 mov r0, r6 8036386: f7f9 f8b7 bl 802f4f8 { return ERR_MEM; } } } return ERR_OK; 803638a: 2000 movs r0, #0 803638c: e000 b.n 8036390 pbuf_free(p); } else { return ERR_MEM; 803638e: 20ff movs r0, #255 ; 0xff } } } return ERR_OK; } 8036390: b240 sxtb r0, r0 8036392: b005 add sp, #20 8036394: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 08036398 : snmp_send_trap(SNMP_GENTRAP_COLDSTART, NULL, 0); } void snmp_authfail_trap(void) { 8036398: b507 push {r0, r1, r2, lr} u8_t enable; snmp_get_snmpenableauthentraps(&enable); 803639a: f10d 0007 add.w r0, sp, #7 803639e: f7fe f84b bl 8034438 if (enable == 1) 80363a2: f89d 3007 ldrb.w r3, [sp, #7] 80363a6: 2b01 cmp r3, #1 80363a8: d109 bne.n 80363be { trap_msg.outvb.head = NULL; 80363aa: 2100 movs r1, #0 80363ac: 4b04 ldr r3, [pc, #16] ; (80363c0 ) trap_msg.outvb.tail = NULL; trap_msg.outvb.count = 0; snmp_send_trap(SNMP_GENTRAP_AUTHFAIL, NULL, 0); 80363ae: 2004 movs r0, #4 80363b0: 460a mov r2, r1 { u8_t enable; snmp_get_snmpenableauthentraps(&enable); if (enable == 1) { trap_msg.outvb.head = NULL; 80363b2: 61d9 str r1, [r3, #28] trap_msg.outvb.tail = NULL; 80363b4: 6219 str r1, [r3, #32] trap_msg.outvb.count = 0; 80363b6: f883 1024 strb.w r1, [r3, #36] ; 0x24 snmp_send_trap(SNMP_GENTRAP_AUTHFAIL, NULL, 0); 80363ba: f7ff fe23 bl 8036004 } } 80363be: bd0e pop {r1, r2, r3, pc} 80363c0: 2000f818 .word 0x2000f818 080363c4 : * @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) { 80363c4: b5f8 push {r3, r4, r5, r6, r7, lr} struct eth_hdr *ethhdr = (struct eth_hdr *)p->payload; 80363c6: 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) { 80363c8: 4606 mov r6, r0 80363ca: 460d mov r5, r1 80363cc: 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); 80363ce: 4619 mov r1, r3 80363d0: 2206 movs r2, #6 80363d2: 4620 mov r0, r4 80363d4: f7eb fc2a bl 8021c2c ETHADDR16_COPY(ðhdr->src, src); 80363d8: 4639 mov r1, r7 80363da: 1da0 adds r0, r4, #6 80363dc: 2206 movs r2, #6 80363de: f7eb fc25 bl 8021c2c ethhdr->type = PP_HTONS(ETHTYPE_IP); 80363e2: 2308 movs r3, #8 80363e4: 7323 strb r3, [r4, #12] 80363e6: 2300 movs r3, #0 80363e8: 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); 80363ea: 69b3 ldr r3, [r6, #24] 80363ec: 4630 mov r0, r6 80363ee: 4629 mov r1, r5 80363f0: 4798 blx r3 } 80363f2: bdf8 pop {r3, r4, r5, r6, r7, pc} 080363f4 : #endif /* ARP_QUEUEING */ /** Clean up ARP table entries */ static void etharp_free_entry(int i) { 80363f4: b570 push {r4, r5, r6, lr} /* remove from SNMP ARP index tree */ snmp_delete_arpidx_tree(arp_table[i].netif, &arp_table[i].ipaddr); 80363f6: 4d0b ldr r5, [pc, #44] ; (8036424 ) 80363f8: 2414 movs r4, #20 80363fa: 4344 muls r4, r0 80363fc: 1929 adds r1, r5, r4 #endif /* ARP_QUEUEING */ /** Clean up ARP table entries */ static void etharp_free_entry(int i) { 80363fe: 4606 mov r6, r0 /* remove from SNMP ARP index tree */ snmp_delete_arpidx_tree(arp_table[i].netif, &arp_table[i].ipaddr); 8036400: 3104 adds r1, #4 8036402: 6848 ldr r0, [r1, #4] 8036404: f7fd fc56 bl 8033cb4 /* and empty packet queue */ if (arp_table[i].q != NULL) { 8036408: 5928 ldr r0, [r5, r4] 803640a: b118 cbz r0, 8036414 /* 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); 803640c: f7f9 f874 bl 802f4f8 arp_table[i].q = NULL; 8036410: 2300 movs r3, #0 8036412: 512b str r3, [r5, r4] } /* recycle entry for re-use */ arp_table[i].state = ETHARP_STATE_EMPTY; 8036414: 2314 movs r3, #20 8036416: fb03 5506 mla r5, r3, r6, r5 803641a: 2300 movs r3, #0 803641c: 74ab strb r3, [r5, #18] 803641e: 3510 adds r5, #16 8036420: bd70 pop {r4, r5, r6, pc} 8036422: bf00 nop 8036424: 2000c704 .word 0x2000c704 08036428 : * @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) { 8036428: 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; 803642c: 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; 803642e: 240a movs r4, #10 8036430: 4a35 ldr r2, [pc, #212] ; (8036508 ) * @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) { 8036432: 9101 str r1, [sp, #4] 8036434: 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; 8036436: 46a8 mov r8, r5 8036438: 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) { 803643a: 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; 803643c: 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; 803643e: 46a4 mov ip, r4 8036440: 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)) { 8036442: 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; 8036444: 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)) { 8036448: d104 bne.n 8036454 803644a: f1b9 0f00 cmp.w r9, #0 803644e: d104 bne.n 803645a LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_find_entry: found empty entry %"U16_F"\n", (u16_t)i)); /* remember first empty entry */ empty = i; 8036450: b2df uxtb r7, r3 8036452: e023 b.n 803649c } else if (state != ETHARP_STATE_EMPTY) { 8036454: f1b9 0f00 cmp.w r9, #0 8036458: d020 beq.n 803649c 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)) { 803645a: b12e cbz r6, 8036468 803645c: 6830 ldr r0, [r6, #0] 803645e: 6851 ldr r1, [r2, #4] 8036460: 4288 cmp r0, r1 8036462: d101 bne.n 8036468 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; 8036464: 4618 mov r0, r3 8036466: e04b b.n 8036500 } /* pending entry? */ if (state == ETHARP_STATE_PENDING) { 8036468: f1b9 0f01 cmp.w r9, #1 803646c: d10e bne.n 803648c /* pending with queued packets? */ if (arp_table[i].q != NULL) { 803646e: 6810 ldr r0, [r2, #0] if (arp_table[i].ctime >= age_queue) { 8036470: 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) { 8036474: b120 cbz r0, 8036480 if (arp_table[i].ctime >= age_queue) { 8036476: 45a9 cmp r9, r5 8036478: d310 bcc.n 803649c old_queue = i; 803647a: b2dc uxtb r4, r3 803647c: 464d mov r5, r9 803647e: e00d b.n 803649c age_queue = arp_table[i].ctime; } } else /* pending without queued packets? */ { if (arp_table[i].ctime >= age_pending) { 8036480: 45d1 cmp r9, sl 8036482: d30b bcc.n 803649c old_pending = i; 8036484: fa5f fb83 uxtb.w fp, r3 8036488: 46ca mov sl, r9 803648a: e007 b.n 803649c age_pending = arp_table[i].ctime; } } /* stable entry? */ } else if (state >= ETHARP_STATE_STABLE) { 803648c: d906 bls.n 803649c /* 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) { 803648e: f892 9013 ldrb.w r9, [r2, #19] 8036492: 45c1 cmp r9, r8 old_stable = i; 8036494: bf24 itt cs 8036496: fa5f fc83 uxtbcs.w ip, r3 803649a: 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) { 803649c: 3301 adds r3, #1 803649e: b2db uxtb r3, r3 80364a0: 3214 adds r2, #20 80364a2: 2b0a cmp r3, #10 80364a4: d1cd bne.n 8036442 } } /* { we have no match } => try to create a new entry */ /* don't create new entry, only search? */ if (((flags & ETHARP_FLAG_FIND_ONLY) != 0) || 80364a6: 9a01 ldr r2, [sp, #4] 80364a8: f002 0302 and.w r3, r2, #2 80364ac: b2db uxtb r3, r3 80364ae: bb33 cbnz r3, 80364fe 80364b0: 2f0a cmp r7, #10 80364b2: d102 bne.n 80364ba /* or no empty entry found and not allowed to recycle? */ ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) { 80364b4: 07d3 lsls r3, r2, #31 80364b6: d402 bmi.n 80364be 80364b8: e021 b.n 80364fe * { ETHARP_FLAG_TRY_HARD is set at this point } */ /* 1) empty entry available? */ if (empty < ARP_TABLE_SIZE) { i = empty; 80364ba: b2fc uxtb r4, r7 80364bc: e011 b.n 80364e2 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) { 80364be: f1bc 0f0a cmp.w ip, #10 80364c2: d002 beq.n 80364ca /* recycle oldest stable*/ i = old_stable; 80364c4: fa5f f48c uxtb.w r4, ip 80364c8: e008 b.n 80364dc 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) { 80364ca: f1bb 0f0a cmp.w fp, #10 80364ce: d002 beq.n 80364d6 /* recycle oldest pending */ i = old_pending; 80364d0: fa5f f48b uxtb.w r4, fp 80364d4: e002 b.n 80364dc 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) { 80364d6: 2c0a cmp r4, #10 80364d8: d011 beq.n 80364fe /* recycle oldest pending (queued packets are free in etharp_free_entry) */ i = old_queue; 80364da: 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); 80364dc: 4620 mov r0, r4 80364de: f7ff ff89 bl 80363f4 80364e2: 4b09 ldr r3, [pc, #36] ; (8036508 ) 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) { 80364e4: b126 cbz r6, 80364f0 /* set IP address */ ip_addr_copy(arp_table[i].ipaddr, *ipaddr); 80364e6: 2214 movs r2, #20 80364e8: 6831 ldr r1, [r6, #0] 80364ea: fb02 3204 mla r2, r2, r4, r3 80364ee: 6051 str r1, [r2, #4] } arp_table[i].ctime = 0; 80364f0: 2214 movs r2, #20 80364f2: fb02 3304 mla r3, r2, r4, r3 80364f6: 2200 movs r2, #0 80364f8: 74da strb r2, [r3, #19] return (err_t)i; 80364fa: 4620 mov r0, r4 80364fc: e000 b.n 8036500 /* 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; 80364fe: 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; } 8036500: b240 sxtb r0, r0 8036502: e8bd 8ffe ldmia.w sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8036506: bf00 nop 8036508: 2000c704 .word 0x2000c704 0803650c : * 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) { 803650c: b570 push {r4, r5, r6, lr} 803650e: 4c0d ldr r4, [pc, #52] ; (8036544 ) 8036510: 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; 8036512: 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 8036514: 7ca3 ldrb r3, [r4, #18] 8036516: b183 cbz r3, 803653a #if ETHARP_SUPPORT_STATIC_ENTRIES && (state != ETHARP_STATE_STATIC) #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ ) { arp_table[i].ctime++; 8036518: 7ce2 ldrb r2, [r4, #19] 803651a: 3201 adds r2, #1 803651c: b2d2 uxtb r2, r2 if ((arp_table[i].ctime >= ARP_MAXAGE) || 803651e: 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++; 8036520: 74e2 strb r2, [r4, #19] if ((arp_table[i].ctime >= ARP_MAXAGE) || 8036522: d803 bhi.n 803652c 8036524: 2b01 cmp r3, #1 8036526: d105 bne.n 8036534 ((arp_table[i].state == ETHARP_STATE_PENDING) && 8036528: 2a01 cmp r2, #1 803652a: d906 bls.n 803653a (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); 803652c: 4628 mov r0, r5 803652e: f7ff ff61 bl 80363f4 8036532: e002 b.n 803653a } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING) { 8036534: 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; 8036536: bf08 it eq 8036538: 74a6 strbeq r6, [r4, #18] 803653a: 3501 adds r5, #1 803653c: 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) { 803653e: 2d0a cmp r5, #10 8036540: d1e8 bne.n 8036514 /* resend an ARP query here? */ } #endif /* ARP_QUEUEING */ } } } 8036542: bd70 pop {r4, r5, r6, pc} 8036544: 2000c704 .word 0x2000c704 08036548 : * Remove all ARP table entries of the specified netif. * * @param netif points to a network interface */ void etharp_cleanup_netif(struct netif *netif) { 8036548: b570 push {r4, r5, r6, lr} 803654a: 4d08 ldr r5, [pc, #32] ; (803656c ) 803654c: 4606 mov r6, r0 803654e: 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)) { 8036550: 7cab ldrb r3, [r5, #18] 8036552: b12b cbz r3, 8036560 8036554: 68ab ldr r3, [r5, #8] 8036556: 42b3 cmp r3, r6 8036558: d102 bne.n 8036560 etharp_free_entry(i); 803655a: 4620 mov r0, r4 803655c: f7ff ff4a bl 80363f4 8036560: 3401 adds r4, #1 8036562: 3514 adds r5, #20 */ void etharp_cleanup_netif(struct netif *netif) { u8_t i; for (i = 0; i < ARP_TABLE_SIZE; ++i) { 8036564: 2c0a cmp r4, #10 8036566: d1f3 bne.n 8036550 u8_t state = arp_table[i].state; if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) { etharp_free_entry(i); } } } 8036568: bd70 pop {r4, r5, r6, pc} 803656a: bf00 nop 803656c: 2000c704 .word 0x2000c704 08036570 : * @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) { 8036570: 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); 8036572: 4608 mov r0, r1 8036574: 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) { 8036576: 4616 mov r6, r2 8036578: 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); 803657a: f7ff ff55 bl 8036428 if((i >= 0) && (arp_table[i].state >= ETHARP_STATE_STABLE)) { 803657e: 2800 cmp r0, #0 8036580: db0c blt.n 803659c 8036582: 2414 movs r4, #20 8036584: 4d07 ldr r5, [pc, #28] ; (80365a4 ) 8036586: 4344 muls r4, r0 8036588: 1929 adds r1, r5, r4 803658a: 7c8b ldrb r3, [r1, #18] 803658c: 2b01 cmp r3, #1 803658e: d905 bls.n 803659c *eth_ret = &arp_table[i].ethaddr; 8036590: 460c mov r4, r1 8036592: 340c adds r4, #12 *ip_ret = &arp_table[i].ipaddr; 8036594: 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; 8036596: 6034 str r4, [r6, #0] *ip_ret = &arp_table[i].ipaddr; 8036598: 6039 str r1, [r7, #0] return i; 803659a: e000 b.n 803659e } return -1; 803659c: 20ff movs r0, #255 ; 0xff } 803659e: b240 sxtb r0, r0 80365a0: bdf8 pop {r3, r4, r5, r6, r7, pc} 80365a2: bf00 nop 80365a4: 2000c704 .word 0x2000c704 080365a8 : * 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) { 80365a8: 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); 80365ac: 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) { 80365ae: 4606 mov r6, r0 80365b0: 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, 80365b2: f100 0727 add.w r7, r0, #39 ; 0x27 80365b6: 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); 80365ba: 212a movs r1, #42 ; 0x2a 80365bc: 2003 movs r0, #3 80365be: f7f8 ffe8 bl 802f592 /* could allocate a pbuf for an ARP request? */ if (p == NULL) { 80365c2: 4605 mov r5, r0 80365c4: 2800 cmp r0, #0 80365c6: d03c beq.n 8036642 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; 80365c8: 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); 80365ca: 2001 movs r0, #1 80365cc: f7f7 fe56 bl 802e27c * '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); 80365d0: 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); 80365d2: 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); 80365d4: 2206 movs r2, #6 80365d6: f104 0016 add.w r0, r4, #22 80365da: f7eb fb27 bl 8021c2c ETHADDR16_COPY(&hdr->dhwaddr, hwdst_addr); 80365de: 2206 movs r2, #6 80365e0: f104 0020 add.w r0, r4, #32 80365e4: 4919 ldr r1, [pc, #100] ; (803664c ) 80365e6: f7eb fb21 bl 8021c2c /* Write the Ethernet MAC-Addresses */ #if LWIP_AUTOIP ETHADDR16_COPY(ðhdr->dest, ethdst_hwaddr); #else /* LWIP_AUTOIP */ ETHADDR16_COPY(ðhdr->dest, ethdst_addr); 80365ea: 2206 movs r2, #6 80365ec: 4620 mov r0, r4 80365ee: 4918 ldr r1, [pc, #96] ; (8036650 ) 80365f0: f7eb fb1c bl 8021c2c #endif /* LWIP_AUTOIP */ ETHADDR16_COPY(ðhdr->src, ethsrc_addr); 80365f4: 1da0 adds r0, r4, #6 80365f6: 4639 mov r1, r7 80365f8: 2206 movs r2, #6 80365fa: f7eb fb17 bl 8021c2c /* Copy struct ip_addr2 to aligned ip_addr, to support compilers without * structure packing. */ IPADDR2_COPY(&hdr->sipaddr, ipsrc_addr); 80365fe: 4649 mov r1, r9 8036600: 2204 movs r2, #4 8036602: f104 001c add.w r0, r4, #28 8036606: f7eb fb11 bl 8021c2c IPADDR2_COPY(&hdr->dipaddr, ipdst_addr); 803660a: 4641 mov r1, r8 803660c: 2204 movs r2, #4 803660e: f104 0026 add.w r0, r4, #38 ; 0x26 8036612: f7eb fb0b bl 8021c2c hdr->hwtype = PP_HTONS(HWTYPE_ETHERNET); 8036616: 2300 movs r3, #0 8036618: 2201 movs r2, #1 803661a: 73a3 strb r3, [r4, #14] 803661c: 73e2 strb r2, [r4, #15] hdr->proto = PP_HTONS(ETHTYPE_IP); 803661e: 7463 strb r3, [r4, #17] 8036620: 2208 movs r2, #8 /* set hwlen and protolen */ hdr->hwlen = ETHARP_HWADDR_LEN; 8036622: 2306 movs r3, #6 hdr->protolen = sizeof(ip_addr_t); 8036624: 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); 8036626: 7422 strb r2, [r4, #16] /* set hwlen and protolen */ hdr->hwlen = ETHARP_HWADDR_LEN; hdr->protolen = sizeof(ip_addr_t); 8036628: 74e1 strb r1, [r4, #19] ethhdr->type = PP_HTONS(ETHTYPE_ARP); 803662a: 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; 803662c: 74a3 strb r3, [r4, #18] hdr->protolen = sizeof(ip_addr_t); ethhdr->type = PP_HTONS(ETHTYPE_ARP); 803662e: 7363 strb r3, [r4, #13] /* send ARP query */ result = netif->linkoutput(netif, p); 8036630: 69b3 ldr r3, [r6, #24] 8036632: 4630 mov r0, r6 8036634: 4629 mov r1, r5 8036636: 4798 blx r3 8036638: 4604 mov r4, r0 ETHARP_STATS_INC(etharp.xmit); /* free ARP query packet */ pbuf_free(p); 803663a: 4628 mov r0, r5 803663c: f7f8 ff5c bl 802f4f8 8036640: e000 b.n 8036644 /* 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; 8036642: 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); } 8036644: b260 sxtb r0, r4 8036646: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 803664a: bf00 nop 803664c: 08044919 .word 0x08044919 8036650: 08044913 .word 0x08044913 08036654 : * - 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) { 8036654: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8036658: 4607 mov r7, r0 803665a: 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) || 803665c: 6808 ldr r0, [r1, #0] 803665e: 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) { 8036660: 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) || 8036662: f7fb fde3 bl 803222c 8036666: 2800 cmp r0, #0 8036668: d157 bne.n 803671a ip_addr_ismulticast(ipaddr) || 803666a: 6833 ldr r3, [r6, #0] 803666c: 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) || 8036670: 2ae0 cmp r2, #224 ; 0xe0 8036672: d052 beq.n 803671a ip_addr_ismulticast(ipaddr) || ip_addr_isany(ipaddr)) { 8036674: 2b00 cmp r3, #0 8036676: d050 beq.n 803671a 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); 8036678: 2101 movs r1, #1 803667a: 4630 mov r0, r6 803667c: f7ff fed4 bl 8036428 /* could not find or create entry? */ if (i < 0) { 8036680: 1e04 subs r4, r0, #0 8036682: db4f blt.n 8036724 } return (err_t)i; } /* mark a fresh entry as pending (we just sent a request) */ if (arp_table[i].state == ETHARP_STATE_EMPTY) { 8036684: 4931 ldr r1, [pc, #196] ; (803674c ) 8036686: 2214 movs r2, #20 8036688: fb02 1304 mla r3, r2, r4, r1 803668c: 3310 adds r3, #16 803668e: 7898 ldrb r0, [r3, #2] 8036690: b908 cbnz r0, 8036696 arp_table[i].state = ETHARP_STATE_PENDING; 8036692: 2001 movs r0, #1 8036694: 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)) { 8036696: fb02 1204 mla r2, r2, r4, r1 803669a: 7c93 ldrb r3, [r2, #18] 803669c: 2b01 cmp r3, #1 803669e: d000 beq.n 80366a2 80366a0: b935 cbnz r5, 80366b0 /* try to resolve it; send out ARP request */ result = etharp_request(netif, ipaddr); 80366a2: 4638 mov r0, r7 80366a4: 4631 mov r1, r6 80366a6: f7ff ff7f bl 80365a8 80366aa: 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) { 80366ac: b90d cbnz r5, 80366b2 80366ae: e036 b.n 803671e */ 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; 80366b0: 22ff movs r2, #255 ; 0xff } /* packet given? */ LWIP_ASSERT("q != NULL", q != NULL); /* stable entry? */ if (arp_table[i].state >= ETHARP_STATE_STABLE) { 80366b2: 2314 movs r3, #20 80366b4: 4925 ldr r1, [pc, #148] ; (803674c ) 80366b6: 4363 muls r3, r4 80366b8: 18c8 adds r0, r1, r3 80366ba: 7c80 ldrb r0, [r0, #18] 80366bc: 2801 cmp r0, #1 80366be: d90b bls.n 80366d8 /* we have a valid IP->Ethernet address mapping */ ETHARP_SET_HINT(netif, i); 80366c0: 4a23 ldr r2, [pc, #140] ; (8036750 ) /* send the packet */ result = etharp_send_ip(netif, q, srcaddr, &(arp_table[i].ethaddr)); 80366c2: 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); 80366c4: 7014 strb r4, [r2, #0] /* send the packet */ result = etharp_send_ip(netif, q, srcaddr, &(arp_table[i].ethaddr)); 80366c6: 4638 mov r0, r7 80366c8: 4629 mov r1, r5 80366ca: f107 0227 add.w r2, r7, #39 ; 0x27 80366ce: 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; } 80366d0: 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)); 80366d4: f7ff be76 b.w 80363c4 /* pending entry? (either just created or already pending */ } else if (arp_table[i].state == ETHARP_STATE_PENDING) { 80366d8: d123 bne.n 8036722 80366da: 462b mov r3, r5 80366dc: e003 b.n 80366e6 * 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) { 80366de: 7b1a ldrb r2, [r3, #12] 80366e0: 2a01 cmp r2, #1 80366e2: d128 bne.n 8036736 copy_needed = 1; break; } p = p->next; 80366e4: 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) { 80366e6: 2b00 cmp r3, #0 80366e8: d1f9 bne.n 80366de 80366ea: e01e b.n 803672a } 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) { 80366ec: 4629 mov r1, r5 80366ee: f7f9 f807 bl 802f700 80366f2: b120 cbz r0, 80366fe pbuf_free(p); 80366f4: 4630 mov r0, r6 80366f6: f7f8 feff bl 802f4f8 80366fa: e024 b.n 8036746 /* referencing the old pbuf is enough */ p = q; pbuf_ref(p); } /* packet could be taken over? */ if (p != NULL) { 80366fc: 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) { 80366fe: 2314 movs r3, #20 8036700: 4a12 ldr r2, [pc, #72] ; (803674c ) 8036702: fb03 f104 mul.w r1, r3, r4 8036706: 4615 mov r5, r2 8036708: 5850 ldr r0, [r2, r1] 803670a: 461f mov r7, r3 803670c: b108 cbz r0, 8036712 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); 803670e: f7f8 fef3 bl 802f4f8 } arp_table[i].q = p; 8036712: 437c muls r4, r7 8036714: 512e str r6, [r5, r4] result = ERR_OK; 8036716: 2400 movs r4, #0 8036718: e004 b.n 8036724 /* 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; 803671a: 24f2 movs r4, #242 ; 0xf2 803671c: e002 b.n 8036724 /* 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; 803671e: 4604 mov r4, r0 8036720: e000 b.n 8036724 /* 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) { 8036722: 4614 mov r4, r2 8036724: b260 sxtb r0, r4 8036726: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} } } } else { /* referencing the old pbuf is enough */ p = q; pbuf_ref(p); 803672a: 4628 mov r0, r5 803672c: f7f8 ffc1 bl 802f6b2 } /* packet could be taken over? */ if (p != NULL) { 8036730: 2d00 cmp r5, #0 8036732: d1e3 bne.n 80366fc 8036734: e007 b.n 8036746 } p = p->next; } if(copy_needed) { /* copy the whole packet into new pbufs */ p = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM); 8036736: 2003 movs r0, #3 8036738: 8919 ldrh r1, [r3, #8] 803673a: 2200 movs r2, #0 803673c: f7f8 ff29 bl 802f592 if(p != NULL) { 8036740: 4606 mov r6, r0 8036742: 2800 cmp r0, #0 8036744: d1d2 bne.n 80366ec 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; 8036746: 24ff movs r4, #255 ; 0xff 8036748: e7ec b.n 8036724 803674a: bf00 nop 803674c: 2000c704 .word 0x2000c704 8036750: 2000c700 .word 0x2000c700 08036754 : /** 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) { 8036754: 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) && 8036758: 4b10 ldr r3, [pc, #64] ; (803679c ) /** 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) { 803675a: 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) && 803675c: 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) { 803675e: 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) && 8036760: 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) { 8036764: 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) && 8036766: 7c8a ldrb r2, [r1, #18] 8036768: 2a02 cmp r2, #2 803676a: f101 0410 add.w r4, r1, #16 803676e: d108 bne.n 8036782 8036770: 7cca ldrb r2, [r1, #19] 8036772: 2ae3 cmp r2, #227 ; 0xe3 8036774: d905 bls.n 8036782 (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED)) { if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) { 8036776: 3104 adds r1, #4 8036778: f7ff ff16 bl 80365a8 803677c: b908 cbnz r0, 8036782 arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING; 803677e: 2303 movs r3, #3 8036780: 70a3 strb r3, [r4, #2] } } return etharp_send_ip(netif, q, (struct eth_addr*)(netif->hwaddr), 8036782: 4b06 ldr r3, [pc, #24] ; (803679c ) 8036784: 2214 movs r2, #20 8036786: fb02 3305 mla r3, r2, r5, r3 803678a: 4638 mov r0, r7 803678c: 4631 mov r1, r6 803678e: f107 0227 add.w r2, r7, #39 ; 0x27 8036792: 330c adds r3, #12 &arp_table[arp_idx].ethaddr); } 8036794: 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), 8036798: f7ff be14 b.w 80363c4 803679c: 2000c704 .word 0x2000c704 080367a0 : * - 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) { 80367a0: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} 80367a2: 4604 mov r4, r0 80367a4: 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) { 80367a6: 4608 mov r0, r1 80367a8: 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) { 80367aa: 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) { 80367ac: f7f8 fe79 bl 802f4a2 80367b0: 2800 cmp r0, #0 80367b2: d163 bne.n 803687c /* 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)) { 80367b4: 6828 ldr r0, [r5, #0] 80367b6: 4621 mov r1, r4 80367b8: f7fb fd38 bl 803222c 80367bc: 2800 cmp r0, #0 80367be: d155 bne.n 803686c /* broadcast on Ethernet also */ dest = (struct eth_addr *)ðbroadcast; /* multicast destination IP address? */ } else if (ip_addr_ismulticast(ipaddr)) { 80367c0: 682b ldr r3, [r5, #0] 80367c2: f003 02f0 and.w r2, r3, #240 ; 0xf0 80367c6: 2ae0 cmp r2, #224 ; 0xe0 80367c8: d114 bne.n 80367f4 /* Hash IP multicast address to MAC address.*/ mcastaddr.addr[0] = LL_MULTICAST_ADDR_0; 80367ca: 2301 movs r3, #1 80367cc: f88d 3000 strb.w r3, [sp] mcastaddr.addr[1] = LL_MULTICAST_ADDR_1; mcastaddr.addr[2] = LL_MULTICAST_ADDR_2; 80367d0: 235e movs r3, #94 ; 0x5e 80367d2: f88d 3002 strb.w r3, [sp, #2] mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f; 80367d6: 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; 80367d8: f88d 0001 strb.w r0, [sp, #1] mcastaddr.addr[2] = LL_MULTICAST_ADDR_2; mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f; 80367dc: f003 037f and.w r3, r3, #127 ; 0x7f 80367e0: f88d 3003 strb.w r3, [sp, #3] mcastaddr.addr[4] = ip4_addr3(ipaddr); 80367e4: 78ab ldrb r3, [r5, #2] 80367e6: f88d 3004 strb.w r3, [sp, #4] mcastaddr.addr[5] = ip4_addr4(ipaddr); 80367ea: 78eb ldrb r3, [r5, #3] 80367ec: f88d 3005 strb.w r3, [sp, #5] /* destination Ethernet address is multicast */ dest = &mcastaddr; 80367f0: 466b mov r3, sp 80367f2: e03c b.n 803686e /* 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)) && 80367f4: 6862 ldr r2, [r4, #4] 80367f6: ea83 0102 eor.w r1, r3, r2 80367fa: 68a2 ldr r2, [r4, #8] 80367fc: 4211 tst r1, r2 80367fe: d009 beq.n 8036814 !ip_addr_islinklocal(ipaddr)) { 8036800: 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)) && 8036802: f64f 62a9 movw r2, #65193 ; 0xfea9 8036806: 4293 cmp r3, r2 8036808: d004 beq.n 8036814 router for forwarding". */ if (!ip_addr_islinklocal(&iphdr->src)) #endif /* LWIP_AUTOIP */ { /* interface has default gateway? */ if (!ip_addr_isany(&netif->gw)) { 803680a: 68e3 ldr r3, [r4, #12] 803680c: f104 010c add.w r1, r4, #12 8036810: b90b cbnz r3, 8036816 8036812: e035 b.n 8036880 /* 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)) && 8036814: 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) && 8036816: 4b1c ldr r3, [pc, #112] ; (8036888 ) 8036818: 781a ldrb r2, [r3, #0] 803681a: 4b1c ldr r3, [pc, #112] ; (803688c ) 803681c: 2014 movs r0, #20 803681e: fb00 3302 mla r3, r0, r2, r3 8036822: 7c98 ldrb r0, [r3, #18] 8036824: 2801 cmp r0, #1 8036826: d904 bls.n 8036832 8036828: 6808 ldr r0, [r1, #0] 803682a: 685b ldr r3, [r3, #4] 803682c: 4298 cmp r0, r3 803682e: d100 bne.n 8036832 8036830: e00d b.n 803684e 8036832: 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) 8036834: 4f15 ldr r7, [pc, #84] ; (803688c ) 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) && 8036836: 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) 8036838: 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) && 803683a: 7c85 ldrb r5, [r0, #18] 803683c: 2d01 cmp r5, #1 803683e: d90b bls.n 8036858 8036840: 680d ldr r5, [r1, #0] 8036842: 6840 ldr r0, [r0, #4] 8036844: 4285 cmp r5, r0 8036846: d107 bne.n 8036858 (ip_addr_cmp(dst_addr, &arp_table[i].ipaddr))) { /* found an existing, stable entry */ ETHARP_SET_HINT(netif, i); 8036848: 4b0f ldr r3, [pc, #60] ; (8036888 ) 803684a: b2d2 uxtb r2, r2 803684c: 701a strb r2, [r3, #0] return etharp_output_to_arp_index(netif, q, i); 803684e: 4620 mov r0, r4 8036850: 4631 mov r1, r6 8036852: f7ff ff7f bl 8036754 8036856: e014 b.n 8036882 8036858: 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++) { 803685a: 3201 adds r2, #1 803685c: 2bc8 cmp r3, #200 ; 0xc8 803685e: b2d2 uxtb r2, r2 8036860: d1ea bne.n 8036838 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); 8036862: 4620 mov r0, r4 8036864: 4632 mov r2, r6 8036866: f7ff fef5 bl 8036654 803686a: e00a b.n 8036882 * 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; 803686c: 4b08 ldr r3, [pc, #32] ; (8036890 ) } /* 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); 803686e: 4620 mov r0, r4 8036870: 4631 mov r1, r6 8036872: f104 0227 add.w r2, r4, #39 ; 0x27 8036876: f7ff fda5 bl 80363c4 803687a: e002 b.n 8036882 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; 803687c: 20fe movs r0, #254 ; 0xfe 803687e: e000 b.n 8036882 /* 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; 8036880: 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); } 8036882: b240 sxtb r0, r0 8036884: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 8036886: bf00 nop 8036888: 2000c700 .word 0x2000c700 803688c: 2000c704 .word 0x2000c704 8036890: 08044913 .word 0x08044913 08036894 : * @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) { 8036894: 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) { 8036898: 8943 ldrh r3, [r0, #10] 803689a: 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) { 803689c: b087 sub sp, #28 803689e: 4604 mov r4, r0 80368a0: 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) { 80368a2: f240 80ed bls.w 8036a80 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; 80368a6: 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) { 80368a8: 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; 80368aa: 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) { 80368ac: 07da lsls r2, r3, #31 80368ae: d513 bpl.n 80368d8 /* this might be a multicast or broadcast packet */ if (ethhdr->dest.addr[0] == LL_MULTICAST_ADDR_0) { 80368b0: 2b01 cmp r3, #1 80368b2: d108 bne.n 80368c6 if ((ethhdr->dest.addr[1] == LL_MULTICAST_ADDR_1) && 80368b4: 7843 ldrb r3, [r0, #1] 80368b6: b97b cbnz r3, 80368d8 80368b8: 7883 ldrb r3, [r0, #2] 80368ba: 2b5e cmp r3, #94 ; 0x5e 80368bc: d10c bne.n 80368d8 (ethhdr->dest.addr[2] == LL_MULTICAST_ADDR_2)) { /* mark the pbuf as link-layer multicast */ p->flags |= PBUF_FLAG_LLMCAST; 80368be: 7b63 ldrb r3, [r4, #13] 80368c0: f043 0310 orr.w r3, r3, #16 80368c4: e007 b.n 80368d6 } } else if (eth_addr_cmp(ðhdr->dest, ðbroadcast)) { 80368c6: 4972 ldr r1, [pc, #456] ; (8036a90 ) 80368c8: 2206 movs r2, #6 80368ca: f7eb f97d bl 8021bc8 80368ce: b918 cbnz r0, 80368d8 /* mark the pbuf as link-layer broadcast */ p->flags |= PBUF_FLAG_LLBCAST; 80368d0: 7b63 ldrb r3, [r4, #13] 80368d2: f043 0308 orr.w r3, r3, #8 80368d6: 7363 strb r3, [r4, #13] } } switch (type) { 80368d8: 2e08 cmp r6, #8 80368da: d004 beq.n 80368e6 80368dc: f5b6 6fc1 cmp.w r6, #1544 ; 0x608 80368e0: f040 80ce bne.w 8036a80 80368e4: e014 b.n 8036910 #if LWIP_ARP /* IP packet? */ case PP_HTONS(ETHTYPE_IP): if (!(netif->flags & NETIF_FLAG_ETHARP)) { 80368e6: f895 302d ldrb.w r3, [r5, #45] ; 0x2d 80368ea: f003 0320 and.w r3, r3, #32 80368ee: b2db uxtb r3, r3 80368f0: 2b00 cmp r3, #0 80368f2: f000 80c5 beq.w 8036a80 #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)) { 80368f6: 4620 mov r0, r4 80368f8: f06f 010d mvn.w r1, #13 80368fc: f7f8 fdd1 bl 802f4a2 8036900: 2800 cmp r0, #0 8036902: f040 80bd bne.w 8036a80 LWIP_ASSERT("Can't move over header in packet", 0); goto free_and_return; } else { /* pass to IP layer */ ip_input(p, netif); 8036906: 4620 mov r0, r4 8036908: 4629 mov r1, r5 803690a: f7fb fda3 bl 8032454 } break; 803690e: e0ba b.n 8036a86 case PP_HTONS(ETHTYPE_ARP): if (!(netif->flags & NETIF_FLAG_ETHARP)) { 8036910: f895 302d ldrb.w r3, [r5, #45] ; 0x2d 8036914: f003 0320 and.w r3, r3, #32 8036918: b2db uxtb r3, r3 803691a: 2b00 cmp r3, #0 803691c: f000 80b0 beq.w 8036a80 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) { 8036920: 8963 ldrh r3, [r4, #10] 8036922: 2b29 cmp r3, #41 ; 0x29 8036924: d800 bhi.n 8036928 8036926: e0ab b.n 8036a80 ETHARP_STATS_INC(etharp.drop); pbuf_free(p); return; } ethhdr = (struct eth_hdr *)p->payload; 8036928: 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)) || 803692a: 89f3 ldrh r3, [r6, #14] 803692c: f5b3 7f80 cmp.w r3, #256 ; 0x100 8036930: f040 80a6 bne.w 8036a80 8036934: 7cb3 ldrb r3, [r6, #18] 8036936: 2b06 cmp r3, #6 8036938: f040 80a2 bne.w 8036a80 (hdr->hwlen != ETHARP_HWADDR_LEN) || 803693c: 7cf7 ldrb r7, [r6, #19] 803693e: 2f04 cmp r7, #4 8036940: f040 809e bne.w 8036a80 (hdr->protolen != sizeof(ip_addr_t)) || 8036944: 8a33 ldrh r3, [r6, #16] 8036946: 2b08 cmp r3, #8 8036948: f040 809a bne.w 8036a80 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); 803694c: f106 0a1c add.w sl, r6, #28 8036950: 4651 mov r1, sl 8036952: 463a mov r2, r7 8036954: a804 add r0, sp, #16 8036956: f7eb f969 bl 8021c2c IPADDR2_COPY(&dipaddr, &hdr->dipaddr); 803695a: f106 0226 add.w r2, r6, #38 ; 0x26 803695e: 9203 str r2, [sp, #12] 8036960: 4611 mov r1, r2 8036962: a805 add r0, sp, #20 8036964: 463a mov r2, r7 8036966: f7eb f961 bl 8021c2c /* this interface is not configured? */ if (ip_addr_isany(&netif->ip_addr)) { 803696a: 686b ldr r3, [r5, #4] 803696c: b12b cbz r3, 803697a for_us = 0; } else { /* ARP packet directed to us? */ for_us = (u8_t)ip_addr_cmp(&dipaddr, &(netif->ip_addr)); 803696e: 9a05 ldr r2, [sp, #20] 8036970: 1ad1 subs r1, r2, r3 8036972: 424a negs r2, r1 8036974: 414a adcs r2, r1 8036976: 9201 str r2, [sp, #4] 8036978: e000 b.n 803697c 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; 803697a: 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), 803697c: 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) || 803697e: 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), 8036980: f106 0716 add.w r7, r6, #22 8036984: 2b00 cmp r3, #0 8036986: bf0c ite eq 8036988: f04f 0802 moveq.w r8, #2 803698c: 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); 8036990: 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) || 8036994: 2800 cmp r0, #0 8036996: d03d beq.n 8036a14 ip_addr_isbroadcast(ipaddr, netif) || 8036998: 4629 mov r1, r5 803699a: f7fb fc47 bl 803222c 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) || 803699e: 9002 str r0, [sp, #8] 80369a0: 2800 cmp r0, #0 80369a2: d137 bne.n 8036a14 ip_addr_isbroadcast(ipaddr, netif) || ip_addr_ismulticast(ipaddr)) { 80369a4: 9a04 ldr r2, [sp, #16] 80369a6: 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) || 80369aa: 2ae0 cmp r2, #224 ; 0xe0 80369ac: d032 beq.n 8036a14 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); 80369ae: a804 add r0, sp, #16 80369b0: 4641 mov r1, r8 80369b2: f7ff fd39 bl 8036428 /* bail out if no entry could be found */ if (i < 0) { 80369b6: 2800 cmp r0, #0 80369b8: db2c blt.n 8036a14 arp_table[i].state = ETHARP_STATE_STATIC; } else #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ { /* mark it stable */ arp_table[i].state = ETHARP_STATE_STABLE; 80369ba: 4b36 ldr r3, [pc, #216] ; (8036a94 ) 80369bc: f04f 0814 mov.w r8, #20 80369c0: fb08 f800 mul.w r8, r8, r0 80369c4: eb03 0108 add.w r1, r3, r8 80369c8: 2202 movs r2, #2 80369ca: 748a strb r2, [r1, #18] } /* record network interface */ arp_table[i].netif = netif; 80369cc: 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; 80369ce: 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); 80369d2: 4628 mov r0, r5 80369d4: 3104 adds r1, #4 80369d6: 9300 str r3, [sp, #0] 80369d8: f7fd f90a bl 8033bf0 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); 80369dc: 9b00 ldr r3, [sp, #0] 80369de: eb03 0008 add.w r0, r3, r8 80369e2: 2206 movs r2, #6 80369e4: 300c adds r0, #12 80369e6: 4639 mov r1, r7 80369e8: f7eb f920 bl 8021c2c /* reset time stamp */ arp_table[i].ctime = 0; 80369ec: 9a02 ldr r2, [sp, #8] 80369ee: 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) { 80369f2: 9b00 ldr r3, [sp, #0] 80369f4: f853 b008 ldr.w fp, [r3, r8] 80369f8: f1bb 0f00 cmp.w fp, #0 80369fc: d00a beq.n 8036a14 struct pbuf *p = arp_table[i].q; arp_table[i].q = NULL; 80369fe: 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); 8036a02: 4628 mov r0, r5 8036a04: 4659 mov r1, fp 8036a06: 464a mov r2, r9 8036a08: 463b mov r3, r7 8036a0a: f7ff fcdb bl 80363c4 /* free the queued IP packet */ pbuf_free(p); 8036a0e: 4658 mov r0, fp 8036a10: f7f8 fd72 bl 802f4f8 -> 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) { 8036a14: 8ab3 ldrh r3, [r6, #20] 8036a16: f5b3 7f80 cmp.w r3, #256 ; 0x100 8036a1a: d003 beq.n 8036a24 8036a1c: f5b3 7f00 cmp.w r3, #512 ; 0x200 8036a20: d12e bne.n 8036a80 8036a22: e029 b.n 8036a78 * 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) { 8036a24: 9b01 ldr r3, [sp, #4] 8036a26: b35b cbz r3, 8036a80 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); 8036a28: 2002 movs r0, #2 8036a2a: f7f7 fc27 bl 802e27c 8036a2e: 82b0 strh r0, [r6, #20] IPADDR2_COPY(&hdr->dipaddr, &hdr->sipaddr); 8036a30: 4651 mov r1, sl 8036a32: 2204 movs r2, #4 8036a34: 9803 ldr r0, [sp, #12] 8036a36: f7eb f8f9 bl 8021c2c IPADDR2_COPY(&hdr->sipaddr, &netif->ip_addr); 8036a3a: 1d29 adds r1, r5, #4 8036a3c: 2204 movs r2, #4 8036a3e: 4650 mov r0, sl 8036a40: f7eb f8f4 bl 8021c2c * '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); 8036a44: 4639 mov r1, r7 8036a46: 2206 movs r2, #6 8036a48: f106 0020 add.w r0, r6, #32 8036a4c: f7eb f8ee bl 8021c2c #if LWIP_AUTOIP ETHADDR16_COPY(ðhdr->dest, ethdst_hwaddr); #else /* LWIP_AUTOIP */ ETHADDR16_COPY(ðhdr->dest, &hdr->shwaddr); 8036a50: 4639 mov r1, r7 8036a52: 2206 movs r2, #6 8036a54: 4630 mov r0, r6 8036a56: f7eb f8e9 bl 8021c2c #endif /* LWIP_AUTOIP */ ETHADDR16_COPY(&hdr->shwaddr, ethaddr); 8036a5a: 4649 mov r1, r9 8036a5c: 2206 movs r2, #6 8036a5e: 4638 mov r0, r7 8036a60: f7eb f8e4 bl 8021c2c ETHADDR16_COPY(ðhdr->src, ethaddr); 8036a64: 4649 mov r1, r9 8036a66: 1db0 adds r0, r6, #6 8036a68: 2206 movs r2, #6 8036a6a: f7eb f8df bl 8021c2c /* 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); 8036a6e: 69ab ldr r3, [r5, #24] 8036a70: 4628 mov r0, r5 8036a72: 4621 mov r1, r4 8036a74: 4798 blx r3 8036a76: e003 b.n 8036a80 #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); 8036a78: 4628 mov r0, r5 8036a7a: a904 add r1, sp, #16 8036a7c: f7f8 f8d4 bl 802ec28 /* 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); 8036a80: 4620 mov r0, r4 8036a82: f7f8 fd39 bl 802f4f8 return ERR_OK; } 8036a86: 2000 movs r0, #0 8036a88: b007 add sp, #28 8036a8a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8036a8e: bf00 nop 8036a90: 08044913 .word 0x08044913 8036a94: 2000c704 .word 0x2000c704 08036a98 : return ERR_OK; } static void arp_timer(void *arg) { 8036a98: b508 push {r3, lr} etharp_tmr(); 8036a9a: f7ff fd37 bl 803650c sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 8036a9e: 4904 ldr r1, [pc, #16] ; (8036ab0 ) 8036aa0: f241 3088 movw r0, #5000 ; 0x1388 8036aa4: 2200 movs r2, #0 } 8036aa6: e8bd 4008 ldmia.w sp!, {r3, lr} static void arp_timer(void *arg) { etharp_tmr(); sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 8036aaa: f7fa bfab b.w 8031a04 8036aae: bf00 nop 8036ab0: 08036a99 .word 0x08036a99 08036ab4 : } } */ void ethernetif_input(void * pvParameters) { 8036ab4: 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) 8036ab8: f8df 80c4 ldr.w r8, [pc, #196] ; 8036b80 } } */ void ethernetif_input(void * pvParameters) { 8036abc: b085 sub sp, #20 struct pbuf *p; for( ;; ) { if(xSemaphoreTake(s_xSemaphore, emacBLOCK_TIME_WAITING_FOR_INPUT)==pdTRUE) 8036abe: 2100 movs r1, #0 8036ac0: 2264 movs r2, #100 ; 0x64 8036ac2: f8d8 0000 ldr.w r0, [r8] 8036ac6: 460b mov r3, r1 8036ac8: f7f4 f8a9 bl 802ac1e 8036acc: 2801 cmp r0, #1 8036ace: d1f6 bne.n 8036abe } } /* Release descriptors to DMA */ /* Check if received frame with multiple DMA buffer segments */ if (DMA_RX_FRAME_infos->Seg_Count > 1) 8036ad0: f8df a0b0 ldr.w sl, [pc, #176] ; 8036b84 /* 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) 8036ad4: f8df 90b0 ldr.w r9, [pc, #176] ; 8036b88 __IO ETH_DMADESCTypeDef *DMARxNextDesc; p = NULL; /* Get received frame */ frame = ETH_Get_Received_Frame_interrupt(); 8036ad8: a801 add r0, sp, #4 8036ada: f001 fa25 bl 8037f28 8036ade: 9e03 ldr r6, [sp, #12] /* check that frame has no error */ if ((frame.descriptor->Status & ETH_DMARxDesc_ES) == (uint32_t)RESET) 8036ae0: 6837 ldr r7, [r6, #0] 8036ae2: f417 4700 ands.w r7, r7, #32768 ; 0x8000 8036ae6: d001 beq.n 8036aec uint32_t l=0,i =0; FrameTypeDef frame; u8 *buffer; __IO ETH_DMADESCTypeDef *DMARxNextDesc; p = NULL; 8036ae8: 2400 movs r4, #0 8036aea: e016 b.n 8036b1a /* 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); 8036aec: 2003 movs r0, #3 8036aee: 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; 8036af2: 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); 8036af6: 4602 mov r2, r0 8036af8: f7f8 fd4b bl 802f592 /* Copy received frame from ethernet driver buffer to stack buffer */ if (p != NULL) 8036afc: 4604 mov r4, r0 8036afe: 2800 cmp r0, #0 8036b00: d0f2 beq.n 8036ae8 8036b02: 4605 mov r5, r0 { for (q = p; q != NULL; q = q->next) { memcpy((u8_t*)q->payload, (u8_t*)&buffer[l], q->len); 8036b04: 6868 ldr r0, [r5, #4] 8036b06: 896a ldrh r2, [r5, #10] 8036b08: eb0b 0107 add.w r1, fp, r7 8036b0c: f7eb f88e bl 8021c2c l = l + q->len; 8036b10: 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) 8036b12: 682d ldr r5, [r5, #0] { memcpy((u8_t*)q->payload, (u8_t*)&buffer[l], q->len); l = l + q->len; 8036b14: 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) 8036b16: 2d00 cmp r5, #0 8036b18: d1f4 bne.n 8036b04 } } /* Release descriptors to DMA */ /* Check if received frame with multiple DMA buffer segments */ if (DMA_RX_FRAME_infos->Seg_Count > 1) 8036b1a: f8da 3000 ldr.w r3, [sl] 8036b1e: 689a ldr r2, [r3, #8] 8036b20: 2a01 cmp r2, #1 { DMARxNextDesc = DMA_RX_FRAME_infos->FS_Rx_Desc; 8036b22: bf88 it hi 8036b24: 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; 8036b26: f04f 4000 mov.w r0, #2147483648 ; 0x80000000 uint32_t l=0,i =0; FrameTypeDef frame; u8 *buffer; __IO ETH_DMADESCTypeDef *DMARxNextDesc; p = NULL; 8036b2a: 2200 movs r2, #0 8036b2c: e002 b.n 8036b34 } /* Set Own bit in Rx descriptors: gives the buffers back to DMA */ for (i=0; iSeg_Count; i++) { DMARxNextDesc->Status = ETH_DMARxDesc_OWN; 8036b2e: 6030 str r0, [r6, #0] DMARxNextDesc = (ETH_DMADESCTypeDef *)(DMARxNextDesc->Buffer2NextDescAddr); 8036b30: 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++) 8036b32: 3201 adds r2, #1 8036b34: 6899 ldr r1, [r3, #8] 8036b36: 428a cmp r2, r1 8036b38: d3f9 bcc.n 8036b2e DMARxNextDesc->Status = ETH_DMARxDesc_OWN; DMARxNextDesc = (ETH_DMADESCTypeDef *)(DMARxNextDesc->Buffer2NextDescAddr); } /* Clear Segment_Count */ DMA_RX_FRAME_infos->Seg_Count =0; 8036b3a: 2200 movs r2, #0 8036b3c: 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) 8036b3e: f8d9 3000 ldr.w r3, [r9] 8036b42: 061b lsls r3, r3, #24 8036b44: d504 bpl.n 8036b50 { /* Clear RBUS ETHERNET DMA flag */ ETH->DMASR = ETH_DMASR_RBUS; 8036b46: 2380 movs r3, #128 ; 0x80 8036b48: f8c9 3000 str.w r3, [r9] /* Resume DMA reception */ ETH->DMARPDR = 0; 8036b4c: 4b0a ldr r3, [pc, #40] ; (8036b78 ) 8036b4e: 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) 8036b50: 2c00 cmp r4, #0 8036b52: d0b4 beq.n 8036abe { if (ERR_OK != s_pxNetIf->input( p, s_pxNetIf)) 8036b54: 4b09 ldr r3, [pc, #36] ; (8036b7c ) 8036b56: 6819 ldr r1, [r3, #0] 8036b58: 4620 mov r0, r4 8036b5a: 690b ldr r3, [r1, #16] 8036b5c: 4798 blx r3 8036b5e: 4601 mov r1, r0 8036b60: b118 cbz r0, 8036b6a { pbuf_free(p); 8036b62: 4620 mov r0, r4 8036b64: f7f8 fcc8 bl 802f4f8 8036b68: e7a9 b.n 8036abe p=NULL; } else { xSemaphoreTake(s_xSemaphore, 0); 8036b6a: f8d8 0000 ldr.w r0, [r8] 8036b6e: 460a mov r2, r1 8036b70: 460b mov r3, r1 8036b72: f7f4 f854 bl 802ac1e goto GET_NEXT_FRAGMENT; 8036b76: e7af b.n 8036ad8 8036b78: 40029008 .word 0x40029008 8036b7c: 2000c7cc .word 0x2000c7cc 8036b80: 2000c7d0 .word 0x2000c7d0 8036b84: 200119d0 .word 0x200119d0 8036b88: 40029014 .word 0x40029014 08036b8c : * 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) { 8036b8c: b570 push {r4, r5, r6, lr} static SemaphoreHandle_t xTxSemaphore = NULL; struct pbuf *q; uint32_t l = 0; u8 *buffer ; if (xTxSemaphore == NULL) 8036b8e: 4e19 ldr r6, [pc, #100] ; (8036bf4 ) 8036b90: 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) { 8036b92: 460c mov r4, r1 static SemaphoreHandle_t xTxSemaphore = NULL; struct pbuf *q; uint32_t l = 0; u8 *buffer ; if (xTxSemaphore == NULL) 8036b94: b95d cbnz r5, 8036bae { vSemaphoreCreateBinary (xTxSemaphore); 8036b96: 2001 movs r0, #1 8036b98: 4629 mov r1, r5 8036b9a: 2203 movs r2, #3 8036b9c: f7f3 fec2 bl 802a924 8036ba0: 6030 str r0, [r6, #0] 8036ba2: b120 cbz r0, 8036bae 8036ba4: 4629 mov r1, r5 8036ba6: 462a mov r2, r5 8036ba8: 462b mov r3, r5 8036baa: f7f3 fef8 bl 802a99e } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) 8036bae: 4b11 ldr r3, [pc, #68] ; (8036bf4 ) 8036bb0: 2100 movs r1, #0 8036bb2: 6818 ldr r0, [r3, #0] 8036bb4: 22fa movs r2, #250 ; 0xfa 8036bb6: 460b mov r3, r1 8036bb8: f7f4 f831 bl 802ac1e 8036bbc: b1c0 cbz r0, 8036bf0 { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); 8036bbe: 4b0e ldr r3, [pc, #56] ; (8036bf8 ) 8036bc0: 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; 8036bc2: 2500 movs r5, #0 vSemaphoreCreateBinary (xTxSemaphore); } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); 8036bc4: 689e ldr r6, [r3, #8] 8036bc6: e007 b.n 8036bd8 for(q = p; q != NULL; q = q->next) { memcpy((u8_t*)&buffer[l], q->payload, q->len); 8036bc8: 1970 adds r0, r6, r5 8036bca: 6861 ldr r1, [r4, #4] 8036bcc: 8962 ldrh r2, [r4, #10] 8036bce: f7eb f82d bl 8021c2c l = l + q->len; 8036bd2: 8963 ldrh r3, [r4, #10] } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); for(q = p; q != NULL; q = q->next) 8036bd4: 6824 ldr r4, [r4, #0] { memcpy((u8_t*)&buffer[l], q->payload, q->len); l = l + q->len; 8036bd6: 18ed adds r5, r5, r3 } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); for(q = p; q != NULL; q = q->next) 8036bd8: 2c00 cmp r4, #0 8036bda: d1f5 bne.n 8036bc8 { memcpy((u8_t*)&buffer[l], q->payload, q->len); l = l + q->len; } ETH_Prepare_Transmit_Descriptors(l); 8036bdc: b2a8 uxth r0, r5 8036bde: f001 f9f3 bl 8037fc8 xSemaphoreGive(xTxSemaphore); 8036be2: 4b04 ldr r3, [pc, #16] ; (8036bf4 ) 8036be4: 4621 mov r1, r4 8036be6: 6818 ldr r0, [r3, #0] 8036be8: 4622 mov r2, r4 8036bea: 4623 mov r3, r4 8036bec: f7f3 fed7 bl 802a99e } return ERR_OK; } 8036bf0: 2000 movs r0, #0 8036bf2: bd70 pop {r4, r5, r6, pc} 8036bf4: 2000c7d4 .word 0x2000c7d4 8036bf8: 2000fb64 .word 0x2000fb64 08036bfc : #if LWIP_NETIF_HOSTNAME /* Initialize interface hostname */ netif->hostname = "lwip"; #endif /* LWIP_NETIF_HOSTNAME */ netif->name[0] = IFNAME0; 8036bfc: 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) { 8036bfe: b530 push {r4, r5, lr} #if LWIP_NETIF_HOSTNAME /* Initialize interface hostname */ netif->hostname = "lwip"; #endif /* LWIP_NETIF_HOSTNAME */ netif->name[0] = IFNAME0; 8036c00: f880 302e strb.w r3, [r0, #46] ; 0x2e netif->name[1] = IFNAME1; 8036c04: 2374 movs r3, #116 ; 0x74 8036c06: f880 302f strb.w r3, [r0, #47] ; 0x2f netif->output = etharp_output; 8036c0a: 4b37 ldr r3, [pc, #220] ; (8036ce8 ) 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) 8036c0c: 4d37 ldr r5, [pc, #220] ; (8036cec ) #endif /* LWIP_NETIF_HOSTNAME */ netif->name[0] = IFNAME0; netif->name[1] = IFNAME1; netif->output = etharp_output; 8036c0e: 6143 str r3, [r0, #20] netif->linkoutput = low_level_output; 8036c10: 4b37 ldr r3, [pc, #220] ; (8036cf0 ) * @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) { 8036c12: b087 sub sp, #28 netif->name[0] = IFNAME0; netif->name[1] = IFNAME1; netif->output = etharp_output; netif->linkoutput = low_level_output; 8036c14: 6183 str r3, [r0, #24] { uint8_t mac[6]; uint32_t i; /* set netif MAC hardware address length */ netif->hwaddr_len = ETHARP_HWADDR_LEN; 8036c16: 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) { 8036c18: 4604 mov r4, r0 { uint8_t mac[6]; uint32_t i; /* set netif MAC hardware address length */ netif->hwaddr_len = ETHARP_HWADDR_LEN; 8036c1a: f880 3026 strb.w r3, [r0, #38] ; 0x26 /* set netif MAC hardware address */ SETTINGS_GetMac(mac); 8036c1e: a804 add r0, sp, #16 8036c20: f7f2 f824 bl 8028c6c netif->hwaddr[0] = mac[0]; 8036c24: 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) 8036c28: 6829 ldr r1, [r5, #0] /* set netif MAC hardware address */ SETTINGS_GetMac(mac); netif->hwaddr[0] = mac[0]; 8036c2a: f884 3027 strb.w r3, [r4, #39] ; 0x27 netif->hwaddr[1] = mac[1]; 8036c2e: f89d 3011 ldrb.w r3, [sp, #17] 8036c32: f884 3028 strb.w r3, [r4, #40] ; 0x28 netif->hwaddr[2] = mac[2]; 8036c36: f89d 3012 ldrb.w r3, [sp, #18] 8036c3a: f884 3029 strb.w r3, [r4, #41] ; 0x29 netif->hwaddr[3] = mac[3]; 8036c3e: f89d 3013 ldrb.w r3, [sp, #19] 8036c42: f884 302a strb.w r3, [r4, #42] ; 0x2a netif->hwaddr[4] = mac[4]; 8036c46: f89d 3014 ldrb.w r3, [sp, #20] 8036c4a: f884 302b strb.w r3, [r4, #43] ; 0x2b netif->hwaddr[5] = mac[5]; 8036c4e: f89d 3015 ldrb.w r3, [sp, #21] 8036c52: f884 302c strb.w r3, [r4, #44] ; 0x2c /* set netif maximum transfer unit */ netif->mtu = 1500; 8036c56: f240 53dc movw r3, #1500 ; 0x5dc 8036c5a: 84a3 strh r3, [r4, #36] ; 0x24 /* Accept broadcast address and ARP traffic */ netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP; 8036c5c: 2322 movs r3, #34 ; 0x22 8036c5e: f884 302d strb.w r3, [r4, #45] ; 0x2d s_pxNetIf =netif; 8036c62: 4b24 ldr r3, [pc, #144] ; (8036cf4 ) 8036c64: 601c str r4, [r3, #0] /* create binary semaphore used for informing ethernetif of frame reception */ if (s_xSemaphore == NULL) 8036c66: b919 cbnz r1, 8036c70 { s_xSemaphore= xSemaphoreCreateCounting(20,0); 8036c68: 2014 movs r0, #20 8036c6a: f7f3 fe82 bl 802a972 8036c6e: 6028 str r0, [r5, #0] } /* initialize MAC address in ethernet MAC */ ETH_MACAddressConfig(ETH_MAC_Address0, netif->hwaddr); 8036c70: f104 0127 add.w r1, r4, #39 ; 0x27 8036c74: 2000 movs r0, #0 8036c76: f001 f93f bl 8037ef8 /* Initialize Tx Descriptors list: Chain Mode */ ETH_DMATxDescChainInit(DMATxDscrTab, &Tx_Buff[0][0], ETH_TXBUFNB); 8036c7a: 481f ldr r0, [pc, #124] ; (8036cf8 ) 8036c7c: 491f ldr r1, [pc, #124] ; (8036cfc ) /* 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); 8036c80: 2205 movs r2, #5 8036c82: f001 fa27 bl 80380d4 /* Initialize Rx Descriptors list: Chain Mode */ ETH_DMARxDescChainInit(DMARxDscrTab, &Rx_Buff[0][0], ETH_RXBUFNB); 8036c86: 481e ldr r0, [pc, #120] ; (8036d00 ) 8036c88: 491e ldr r1, [pc, #120] ; (8036d04 ) 8036c8a: 2205 movs r2, #5 8036c8c: f001 f9f6 bl 803807c /* 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, 8036cb8: 2400 movs r4, #0 8036cba: 2304 movs r3, #4 8036cbc: 2296 movs r2, #150 ; 0x96 8036cbe: e88d 0018 stmia.w sp, {r3, r4} 8036cc2: 4911 ldr r1, [pc, #68] ; (8036d08 ) 8036cc4: 9402 str r4, [sp, #8] 8036cc6: 4623 mov r3, r4 8036cc8: 9403 str r4, [sp, #12] 8036cca: 4810 ldr r0, [pc, #64] ; (8036d0c ) 8036ccc: f7f4 f8b0 bl 802ae30 netifINTERFACE_TASK_PRIORITY,NULL); /* Enable MAC and DMA transmission and reception */ ETH_Start(); 8036cd0: f001 fa7c bl 80381cc /* initialize the hardware */ low_level_init(netif); etharp_init(); sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 8036cd4: f241 3088 movw r0, #5000 ; 0x1388 8036cd8: 490d ldr r1, [pc, #52] ; (8036d10 ) 8036cda: 4622 mov r2, r4 8036cdc: f7fa fe92 bl 8031a04 return ERR_OK; } 8036ce0: 4620 mov r0, r4 8036ce2: b007 add sp, #28 8036ce4: bd30 pop {r4, r5, pc} 8036ce6: bf00 nop 8036ce8: 080367a1 .word 0x080367a1 8036cec: 2000c7d0 .word 0x2000c7d0 8036cf0: 08036b8d .word 0x08036b8d 8036cf4: 2000c7cc .word 0x2000c7cc 8036cf8: 2000fb68 .word 0x2000fb68 8036cfc: 20011a74 .word 0x20011a74 8036d00: 200119d4 .word 0x200119d4 8036d04: 2000fc08 .word 0x2000fc08 8036d08: 0804491f .word 0x0804491f 8036d0c: 08036ab5 .word 0x08036ab5 8036d10: 08036a99 .word 0x08036a99 08036d14 : * 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 ) { 8036d14: b510 push {r4, lr} err_t xReturn = ERR_MEM; *pxMailBox = xQueueCreate( iSize, sizeof( void * ) ); 8036d16: 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 ) { 8036d18: 4604 mov r4, r0 err_t xReturn = ERR_MEM; *pxMailBox = xQueueCreate( iSize, sizeof( void * ) ); 8036d1a: 4608 mov r0, r1 8036d1c: 2104 movs r1, #4 8036d1e: f7f3 fe01 bl 802a924 8036d22: 6020 str r0, [r4, #0] xReturn = ERR_OK; SYS_STATS_INC_USED( mbox ); } return xReturn; } 8036d24: 2800 cmp r0, #0 8036d26: bf14 ite ne 8036d28: 2000 movne r0, #0 8036d2a: f06f 0000 mvneq.w r0, #0 8036d2e: bd10 pop {r4, pc} 08036d30 : * Outputs: * err_t -- ERR_OK if message posted, else ERR_MEM * if not. *---------------------------------------------------------------------------*/ err_t sys_mbox_trypost( sys_mbox_t *pxMailBox, void *pxMessageToPost ) { 8036d30: b51f push {r0, r1, r2, r3, r4, lr} err_t xReturn; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if( xInsideISR != pdFALSE ) 8036d32: 4a0b ldr r2, [pc, #44] ; (8036d60 ) * Outputs: * err_t -- ERR_OK if message posted, else ERR_MEM * if not. *---------------------------------------------------------------------------*/ err_t sys_mbox_trypost( sys_mbox_t *pxMailBox, void *pxMessageToPost ) { 8036d34: 9101 str r1, [sp, #4] err_t xReturn; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if( xInsideISR != pdFALSE ) 8036d36: 6812 ldr r2, [r2, #0] { xReturn = xQueueSendFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken ); 8036d38: 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; 8036d3a: 2300 movs r3, #0 8036d3c: 9303 str r3, [sp, #12] if( xInsideISR != pdFALSE ) { xReturn = xQueueSendFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken ); 8036d3e: 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 ) 8036d40: b11a cbz r2, 8036d4a { xReturn = xQueueSendFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken ); 8036d42: aa03 add r2, sp, #12 8036d44: f7f3 feef bl 802ab26 8036d48: e002 b.n 8036d50 } else { xReturn = xQueueSend( *pxMailBox, &pxMessageToPost, ( TickType_t ) 0 ); 8036d4a: 4613 mov r3, r2 8036d4c: f7f3 fe27 bl 802a99e 8036d50: b2c0 uxtb r0, r0 xReturn = ERR_MEM; SYS_STATS_INC( mbox.err ); } return xReturn; } 8036d52: 3801 subs r0, #1 8036d54: bf18 it ne 8036d56: f06f 0000 mvnne.w r0, #0 8036d5a: b005 add sp, #20 8036d5c: bd00 pop {pc} 8036d5e: bf00 nop 8036d60: 2000c7d8 .word 0x2000c7d8 08036d64 : * 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 ) { 8036d64: e92d 41f3 stmdb sp!, {r0, r1, r4, r5, r6, r7, r8, lr} 8036d68: 4607 mov r7, r0 8036d6a: 460c mov r4, r1 8036d6c: 4690 mov r8, r2 void *pvDummy; TickType_t xStartTime, xEndTime, xElapsed; unsigned long ulReturn; xStartTime = xTaskGetTickCount(); 8036d6e: f7f4 f9c7 bl 802b100 8036d72: 4605 mov r5, r0 if( NULL == ppvBuffer ) 8036d74: b904 cbnz r4, 8036d78 { ppvBuffer = &pvDummy; 8036d76: ac01 add r4, sp, #4 } if( ulTimeOut != 0UL ) 8036d78: f1b8 0f00 cmp.w r8, #0 8036d7c: d015 beq.n 8036daa { configASSERT( xInsideISR == ( portBASE_TYPE ) 0 ); 8036d7e: 4b13 ldr r3, [pc, #76] ; (8036dcc ) 8036d80: 681e ldr r6, [r3, #0] 8036d82: b116 cbz r6, 8036d8a 8036d84: f7f4 feda bl 802bb3c 8036d88: e7fe b.n 8036d88 if( pdTRUE == xQueueReceive( *pxMailBox, &( *ppvBuffer ), ulTimeOut/ portTICK_PERIOD_MS ) ) 8036d8a: 6838 ldr r0, [r7, #0] 8036d8c: 4621 mov r1, r4 8036d8e: 4642 mov r2, r8 8036d90: 4633 mov r3, r6 8036d92: f7f3 ff44 bl 802ac1e 8036d96: 2801 cmp r0, #1 8036d98: d103 bne.n 8036da2 { xEndTime = xTaskGetTickCount(); 8036d9a: f7f4 f9b1 bl 802b100 xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS; 8036d9e: 1b40 subs r0, r0, r5 8036da0: e011 b.n 8036dc6 ulReturn = xElapsed; } else { /* Timed out. */ *ppvBuffer = NULL; 8036da2: 6026 str r6, [r4, #0] ulReturn = SYS_ARCH_TIMEOUT; 8036da4: f04f 30ff mov.w r0, #4294967295 8036da8: e00d b.n 8036dc6 } } else { while( pdTRUE != xQueueReceive( *pxMailBox, &( *ppvBuffer ), portMAX_DELAY ) ); 8036daa: 2300 movs r3, #0 8036dac: 6838 ldr r0, [r7, #0] 8036dae: 4621 mov r1, r4 8036db0: f04f 32ff mov.w r2, #4294967295 8036db4: f7f3 ff33 bl 802ac1e 8036db8: 2801 cmp r0, #1 8036dba: d1f6 bne.n 8036daa xEndTime = xTaskGetTickCount(); 8036dbc: f7f4 f9a0 bl 802b100 xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS; if( xElapsed == 0UL ) 8036dc0: 1b40 subs r0, r0, r5 8036dc2: bf08 it eq 8036dc4: 2001 moveq r0, #1 ulReturn = xElapsed; } return ulReturn; } 8036dc6: e8bd 81fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, pc} 8036dca: bf00 nop 8036dcc: 2000c7d8 .word 0x2000c7d8 08036dd0 : /** 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 ) { 8036dd0: b510 push {r4, lr} 8036dd2: 4604 mov r4, r0 err_t xReturn = ERR_MEM; *pxMutex = xSemaphoreCreateMutex(); 8036dd4: 2001 movs r0, #1 8036dd6: f7f3 fe7c bl 802aad2 8036dda: 6020 str r0, [r4, #0] { SYS_STATS_INC( mutex.err ); } return xReturn; } 8036ddc: 2800 cmp r0, #0 8036dde: bf14 ite ne 8036de0: 2000 movne r0, #0 8036de2: f06f 0000 mvneq.w r0, #0 8036de6: bd10 pop {r4, pc} 08036de8 : /** Lock a mutex * @param mutex the mutex to lock */ void sys_mutex_lock( sys_mutex_t *pxMutex ) { 8036de8: b510 push {r4, lr} 8036dea: 4604 mov r4, r0 while( xSemaphoreTake( *pxMutex, portMAX_DELAY ) != pdPASS ); 8036dec: 2100 movs r1, #0 8036dee: 6820 ldr r0, [r4, #0] 8036df0: f04f 32ff mov.w r2, #4294967295 8036df4: 460b mov r3, r1 8036df6: f7f3 ff12 bl 802ac1e 8036dfa: 2801 cmp r0, #1 8036dfc: d1f6 bne.n 8036dec } 8036dfe: bd10 pop {r4, pc} 08036e00 : /** Unlock a mutex * @param mutex the mutex to unlock */ void sys_mutex_unlock(sys_mutex_t *pxMutex ) { xSemaphoreGive( *pxMutex ); 8036e00: 2100 movs r1, #0 8036e02: 6800 ldr r0, [r0, #0] 8036e04: 460a mov r2, r1 8036e06: 460b mov r3, r1 8036e08: f7f3 bdc9 b.w 802a99e 08036e0c : *---------------------------------------------------------------------------* * Description: * Initialize sys arch *---------------------------------------------------------------------------*/ void sys_init(void) { 8036e0c: 4770 bx lr 08036e0e : } u32_t sys_now(void) { return xTaskGetTickCount(); 8036e0e: f7f4 b977 b.w 802b100 08036e12 : * 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 ) { 8036e12: b570 push {r4, r5, r6, lr} 8036e14: b086 sub sp, #24 8036e16: 4606 mov r6, r0 TaskHandle_t xCreatedTask; portBASE_TYPE xResult; sys_thread_t xReturn; xResult = xTaskCreate( pxThread, pcName, iStackSize, pvArg, iPriority, &xCreatedTask ); 8036e18: 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 ) { 8036e1a: 4615 mov r5, r2 TaskHandle_t xCreatedTask; portBASE_TYPE xResult; sys_thread_t xReturn; xResult = xTaskCreate( pxThread, pcName, iStackSize, pvArg, iPriority, &xCreatedTask ); 8036e1c: 9400 str r4, [sp, #0] 8036e1e: aa05 add r2, sp, #20 8036e20: 2400 movs r4, #0 8036e22: 9201 str r2, [sp, #4] 8036e24: 9402 str r4, [sp, #8] 8036e26: b29a uxth r2, r3 8036e28: 9403 str r4, [sp, #12] 8036e2a: 4608 mov r0, r1 8036e2c: 462b mov r3, r5 8036e2e: 4631 mov r1, r6 8036e30: f7f3 fffe bl 802ae30 if( xResult == pdPASS ) 8036e34: 2801 cmp r0, #1 { xReturn = xCreatedTask; 8036e36: bf0c ite eq 8036e38: 9805 ldreq r0, [sp, #20] } else { xReturn = NULL; 8036e3a: 4620 movne r0, r4 } return xReturn; } 8036e3c: b006 add sp, #24 8036e3e: bd70 pop {r4, r5, r6, pc} 08036e40 : * operating system. * Outputs: * sys_prot_t -- Previous protection level (not used here) *---------------------------------------------------------------------------*/ sys_prot_t sys_arch_protect( void ) { 8036e40: b508 push {r3, lr} if( xInsideISR == pdFALSE ) 8036e42: 4b03 ldr r3, [pc, #12] ; (8036e50 ) 8036e44: 681b ldr r3, [r3, #0] 8036e46: b90b cbnz r3, 8036e4c { taskENTER_CRITICAL(); 8036e48: f7f4 fe80 bl 802bb4c } return ( sys_prot_t ) 1; } 8036e4c: 2001 movs r0, #1 8036e4e: bd08 pop {r3, pc} 8036e50: 2000c7d8 .word 0x2000c7d8 08036e54 : * sys_prot_t -- Previous protection level (not used here) *---------------------------------------------------------------------------*/ void sys_arch_unprotect( sys_prot_t xValue ) { (void) xValue; if( xInsideISR == pdFALSE ) 8036e54: 4b02 ldr r3, [pc, #8] ; (8036e60 ) 8036e56: 681b ldr r3, [r3, #0] 8036e58: b90b cbnz r3, 8036e5e { taskEXIT_CRITICAL(); 8036e5a: f7f4 bea3 b.w 802bba4 8036e5e: 4770 bx lr 8036e60: 2000c7d8 .word 0x2000c7d8 08036e64 : * ЕÑли флаг не уÑтанавливаетÑÑ Ð² положенное времÑ, то ÑбраÑываетÑÑ * флаг sSettings.sFlags.netsettingsChanged, ÑохранÑетÑÑ Ð²ÑÑ Ñтруктура * наÑтроек в памÑти и контроллер перезагружаетÑÑ. */ void vTaskWebReinit(void * pvParameters) { 8036e64: b538 push {r3, r4, r5, lr} static uint16_t timeCounter = 0; for (;;) { /* Контроль времени работы задачи */ if (timeCounter++ > TIME_COUNTER_10_MIN) 8036e66: 4c1b ldr r4, [pc, #108] ; (8036ed4 ) if (fConfirmWebParams) { fConfirmWebParams = false; /* СохранÑем временные Ñетевые наÑтройки в поÑтоÑнные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 8036e68: 4d1b ldr r5, [pc, #108] ; (8036ed8 ) static uint16_t timeCounter = 0; for (;;) { /* Контроль времени работы задачи */ if (timeCounter++ > TIME_COUNTER_10_MIN) 8036e6a: 8823 ldrh r3, [r4, #0] 8036e6c: 1c5a adds r2, r3, #1 8036e6e: f5b3 7f16 cmp.w r3, #600 ; 0x258 8036e72: 8022 strh r2, [r4, #0] 8036e74: d90a bls.n 8036e8c { SetWebReinitFlag(false); 8036e76: 2000 movs r0, #0 8036e78: f7f1 fabe bl 80283f8 HTTP_SaveSettings(); 8036e7c: f7f7 f92c bl 802e0d8 vTaskDelay(1010); 8036e80: f240 30f2 movw r0, #1010 ; 0x3f2 8036e84: f7f4 fa6e bl 802b364 Reboot(); 8036e88: f7f2 fb06 bl 8029498 } if (fConfirmWebParams) 8036e8c: 4b13 ldr r3, [pc, #76] ; (8036edc ) 8036e8e: 781a ldrb r2, [r3, #0] 8036e90: b1d2 cbz r2, 8036ec8 { fConfirmWebParams = false; 8036e92: 2200 movs r2, #0 /* СохранÑем временные Ñетевые наÑтройки в поÑтоÑнные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 8036e94: 4812 ldr r0, [pc, #72] ; (8036ee0 ) Reboot(); } if (fConfirmWebParams) { fConfirmWebParams = false; 8036e96: 701a strb r2, [r3, #0] /* СохранÑем временные Ñетевые наÑтройки в поÑтоÑнные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 8036e98: f895 3063 ldrb.w r3, [r5, #99] ; 0x63 strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 8036e9c: f100 0131 add.w r1, r0, #49 ; 0x31 if (fConfirmWebParams) { fConfirmWebParams = false; /* СохранÑем временные Ñетевые наÑтройки в поÑтоÑнные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 8036ea0: f885 3032 strb.w r3, [r5, #50] ; 0x32 strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 8036ea4: f7eb f8f6 bl 8022094 strcpy(sSettings.sWebParams.gate, sSettings.sWebTempParams.gate); 8036ea8: 480e ldr r0, [pc, #56] ; (8036ee4 ) 8036eaa: f100 0131 add.w r1, r0, #49 ; 0x31 8036eae: f7eb f8f1 bl 8022094 strcpy(sSettings.sWebParams.mask, sSettings.sWebTempParams.mask); 8036eb2: 480d ldr r0, [pc, #52] ; (8036ee8 ) 8036eb4: f100 0131 add.w r1, r0, #49 ; 0x31 8036eb8: f7eb f8ec bl 8022094 HTTP_SaveSettings(); 8036ebc: f7f7 f90c bl 802e0d8 vTaskDelete(xHandleWebReinit); 8036ec0: 4b0a ldr r3, [pc, #40] ; (8036eec ) 8036ec2: 6818 ldr r0, [r3, #0] 8036ec4: f7f4 f88c bl 802afe0 } vTaskDelay(1000); 8036ec8: f44f 707a mov.w r0, #1000 ; 0x3e8 8036ecc: f7f4 fa4a bl 802b364 } 8036ed0: e7cb b.n 8036e6a 8036ed2: bf00 nop 8036ed4: 2000c7e8 .word 0x2000c7e8 8036ed8: 2000cba0 .word 0x2000cba0 8036edc: 20000b18 .word 0x20000b18 8036ee0: 2000cba2 .word 0x2000cba2 8036ee4: 2000cbb2 .word 0x2000cbb2 8036ee8: 2000cbc2 .word 0x2000cbc2 8036eec: 2000c7e0 .word 0x2000c7e0 08036ef0 : * @brief LwIP_DHCP_Process_Handle * @param None * @retval None */ void LwIP_DHCP_task(void * pvParameters) { 8036ef0: b530 push {r4, r5, lr} DHCP_state = DHCP_TIMEOUT; /* Stop DHCP */ dhcp_stop(&xnetif); if (sSettings.sFlags.netsettingsChanged == true) 8036ef2: 4d48 ldr r5, [pc, #288] ; (8037014 ) * @brief LwIP_DHCP_Process_Handle * @param None * @retval None */ void LwIP_DHCP_task(void * pvParameters) { 8036ef4: b085 sub sp, #20 struct ip_addr ipaddr; struct ip_addr netmask; struct ip_addr gw; uint8_t DHCP_state; DHCP_state = DHCP_START; 8036ef6: 2400 movs r4, #0 for (;;) { switch (DHCP_state) 8036ef8: b11c cbz r4, 8036f02 8036efa: 2c01 cmp r4, #1 8036efc: f040 8085 bne.w 803700a 8036f00: e004 b.n 8036f0c { case DHCP_START: { dhcp_start(&xnetif); 8036f02: 4845 ldr r0, [pc, #276] ; (8037018 ) 8036f04: f7f7 fffc bl 802ef00 DHCP_state = DHCP_WAIT_ADDRESS; 8036f08: 2401 movs r4, #1 //PRINT_USART("\n\rLooking for DHCP server please wait...\n\r"); } break; 8036f0a: e07e b.n 803700a case DHCP_WAIT_ADDRESS: { /* Read the new IP address */ ipaddr = xnetif.ip_addr; 8036f0c: 4842 ldr r0, [pc, #264] ; (8037018 ) netmask = xnetif.netmask; 8036f0e: 6882 ldr r2, [r0, #8] break; case DHCP_WAIT_ADDRESS: { /* Read the new IP address */ ipaddr = xnetif.ip_addr; 8036f10: 6843 ldr r3, [r0, #4] netmask = xnetif.netmask; 8036f12: 9202 str r2, [sp, #8] gw = xnetif.gw; 8036f14: 68c2 ldr r2, [r0, #12] break; case DHCP_WAIT_ADDRESS: { /* Read the new IP address */ ipaddr = xnetif.ip_addr; 8036f16: 9301 str r3, [sp, #4] netmask = xnetif.netmask; gw = xnetif.gw; 8036f18: 9203 str r2, [sp, #12] if (ipaddr.addr != 0) 8036f1a: 2b00 cmp r3, #0 8036f1c: d045 beq.n 8036faa { DHCP_state = DHCP_ADDRESS_ASSIGNED; dhcp_stop(&xnetif); 8036f1e: f7f7 ffd7 bl 802eed0 /* Сохранение полученных Ñетевый параметров */ /* ЕÑли наÑтройки изменили, то ÑохранÑем во временные наÑтройки */ if (sSettings.sFlags.netsettingsChanged == true) 8036f22: f895 3120 ldrb.w r3, [r5, #288] ; 0x120 { sprintf(sSettings.sWebTempParams.ip, "%s", ipaddr_ntoa(&ipaddr)); 8036f26: a801 add r0, sp, #4 DHCP_state = DHCP_ADDRESS_ASSIGNED; dhcp_stop(&xnetif); /* Сохранение полученных Ñетевый параметров */ /* ЕÑли наÑтройки изменили, то ÑохранÑем во временные наÑтройки */ if (sSettings.sFlags.netsettingsChanged == true) 8036f28: b103 cbz r3, 8036f2c 8036f2a: e01b b.n 8036f64 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)); 8036f2c: f7fb fa68 bl 8032400 8036f30: 493a ldr r1, [pc, #232] ; (803701c ) 8036f32: 4602 mov r2, r0 8036f34: 483a ldr r0, [pc, #232] ; (8037020 ) 8036f36: f7f0 fdf3 bl 8027b20 sprintf(sSettings.sWebParams.mask, "%s", ipaddr_ntoa(&netmask)); 8036f3a: a802 add r0, sp, #8 8036f3c: f7fb fa60 bl 8032400 8036f40: 4936 ldr r1, [pc, #216] ; (803701c ) 8036f42: 4602 mov r2, r0 8036f44: 4837 ldr r0, [pc, #220] ; (8037024 ) 8036f46: f7f0 fdeb bl 8027b20 sprintf(sSettings.sWebParams.gate, "%s", ipaddr_ntoa(&gw)); 8036f4a: a803 add r0, sp, #12 8036f4c: f7fb fa58 bl 8032400 8036f50: 4932 ldr r1, [pc, #200] ; (803701c ) 8036f52: 4602 mov r2, r0 8036f54: 4834 ldr r0, [pc, #208] ; (8037028 ) 8036f56: f7f0 fde3 bl 8027b20 /* ОбновлÑем временные наÑтройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; 8036f5a: f895 3032 ldrb.w r3, [r5, #50] ; 0x32 sprintf(sSettings.sWebTempParams.ip, "%s", ipaddr_ntoa(&ipaddr)); 8036f5e: 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; 8036f60: f885 3063 strb.w r3, [r5, #99] ; 0x63 sprintf(sSettings.sWebTempParams.ip, "%s", ipaddr_ntoa(&ipaddr)); 8036f64: f7fb fa4c bl 8032400 8036f68: 492c ldr r1, [pc, #176] ; (803701c ) 8036f6a: 4602 mov r2, r0 8036f6c: 482f ldr r0, [pc, #188] ; (803702c ) 8036f6e: f7f0 fdd7 bl 8027b20 sprintf(sSettings.sWebTempParams.mask, "%s", ipaddr_ntoa(&netmask)); 8036f72: a802 add r0, sp, #8 8036f74: f7fb fa44 bl 8032400 8036f78: 4928 ldr r1, [pc, #160] ; (803701c ) 8036f7a: 4602 mov r2, r0 8036f7c: 482c ldr r0, [pc, #176] ; (8037030 ) 8036f7e: f7f0 fdcf bl 8027b20 sprintf(sSettings.sWebTempParams.gate, "%s", ipaddr_ntoa(&gw)); 8036f82: a803 add r0, sp, #12 8036f84: f7fb fa3c bl 8032400 8036f88: 4924 ldr r1, [pc, #144] ; (803701c ) 8036f8a: 4602 mov r2, r0 8036f8c: 4829 ldr r0, [pc, #164] ; (8037034 ) 8036f8e: f7f0 fdc7 bl 8027b20 PRINT_USART("Gateway: "); PRINT_USART(ipaddr_ntoa(&gw)); PRINT_USART("\n\r"); vTaskDelay(50); 8036f92: 2032 movs r0, #50 ; 0x32 8036f94: f7f4 f9e6 bl 802b364 /* УÑтановлен динамичеÑкий IP, можно отправить трап о перезагрузке уÑтройÑтва */ SNMP_SendUserTrap(DEVICE_REBOOTED); 8036f98: 2004 movs r0, #4 8036f9a: f000 fad9 bl 8037550 vTaskDelete(xHandleDHCP); 8036f9e: 4b26 ldr r3, [pc, #152] ; (8037038 ) 8036fa0: 6818 ldr r0, [r3, #0] 8036fa2: f7f4 f81d bl 802afe0 netmask = xnetif.netmask; gw = xnetif.gw; if (ipaddr.addr != 0) { DHCP_state = DHCP_ADDRESS_ASSIGNED; 8036fa6: 2402 movs r4, #2 8036fa8: e02f b.n 803700a vTaskDelete(xHandleDHCP); } else { /* DHCP timeout */ if (xnetif.dhcp->tries > MAX_DHCP_TRIES) 8036faa: 6a03 ldr r3, [r0, #32] 8036fac: 7b5b ldrb r3, [r3, #13] 8036fae: 2b03 cmp r3, #3 8036fb0: d92b bls.n 803700a { DHCP_state = DHCP_TIMEOUT; /* Stop DHCP */ dhcp_stop(&xnetif); 8036fb2: f7f7 ff8d bl 802eed0 if (sSettings.sFlags.netsettingsChanged == true) 8036fb6: f895 3120 ldrb.w r3, [r5, #288] ; 0x120 8036fba: b14b cbz r3, 8036fd0 { ipaddr.addr = ipaddr_addr(sSettings.sWebTempParams.ip); 8036fbc: 481b ldr r0, [pc, #108] ; (803702c ) 8036fbe: f7fb f9cc bl 803235a 8036fc2: 9001 str r0, [sp, #4] netmask.addr = ipaddr_addr(sSettings.sWebTempParams.mask); 8036fc4: 481a ldr r0, [pc, #104] ; (8037030 ) 8036fc6: f7fb f9c8 bl 803235a 8036fca: 9002 str r0, [sp, #8] gw.addr = ipaddr_addr(sSettings.sWebTempParams.gate); 8036fcc: 4819 ldr r0, [pc, #100] ; (8037034 ) 8036fce: e008 b.n 8036fe2 } else { ipaddr.addr = ipaddr_addr(sSettings.sWebParams.ip); 8036fd0: 4813 ldr r0, [pc, #76] ; (8037020 ) 8036fd2: f7fb f9c2 bl 803235a 8036fd6: 9001 str r0, [sp, #4] netmask.addr = ipaddr_addr(sSettings.sWebParams.mask); 8036fd8: 4812 ldr r0, [pc, #72] ; (8037024 ) 8036fda: f7fb f9be bl 803235a 8036fde: 9002 str r0, [sp, #8] gw.addr = ipaddr_addr(sSettings.sWebParams.gate); 8036fe0: 4811 ldr r0, [pc, #68] ; (8037028 ) 8036fe2: f7fb f9ba bl 803235a } /* Static address used */ netif_set_addr(&xnetif, &ipaddr , &netmask, &gw); 8036fe6: a901 add r1, sp, #4 8036fe8: aa02 add r2, sp, #8 8036fea: 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); 8036fec: 9003 str r0, [sp, #12] } /* Static address used */ netif_set_addr(&xnetif, &ipaddr , &netmask, &gw); 8036fee: 480a ldr r0, [pc, #40] ; (8037018 ) 8036ff0: f7f8 f9de bl 802f3b0 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); 8036ff4: 2032 movs r0, #50 ; 0x32 8036ff6: f7f4 f9b5 bl 802b364 /* УÑтановлен ÑтатичеÑкий IP, можно отправить трап о перезагрузке уÑтройÑтва */ SNMP_SendUserTrap(DEVICE_REBOOTED); 8036ffa: 2004 movs r0, #4 8036ffc: f000 faa8 bl 8037550 vTaskDelete(xHandleDHCP); 8037000: 4b0d ldr r3, [pc, #52] ; (8037038 ) 8037002: 6818 ldr r0, [r3, #0] 8037004: f7f3 ffec bl 802afe0 else { /* DHCP timeout */ if (xnetif.dhcp->tries > MAX_DHCP_TRIES) { DHCP_state = DHCP_TIMEOUT; 8037008: 2403 movs r4, #3 break; default: break; } vTaskDelay(250); 803700a: 20fa movs r0, #250 ; 0xfa 803700c: f7f4 f9aa bl 802b364 } 8037010: e772 b.n 8036ef8 8037012: bf00 nop 8037014: 2000cba0 .word 0x2000cba0 8037018: 2000f85c .word 0x2000f85c 803701c: 0804288f .word 0x0804288f 8037020: 2000cba2 .word 0x2000cba2 8037024: 2000cbc2 .word 0x2000cbc2 8037028: 2000cbb2 .word 0x2000cbb2 803702c: 2000cbd3 .word 0x2000cbd3 8037030: 2000cbf3 .word 0x2000cbf3 8037034: 2000cbe3 .word 0x2000cbe3 8037038: 2000c7e4 .word 0x2000c7e4 0803703c : TaskHandle_t xHandleWebReinit = NULL; bool dhcp = false; void LwIP_Init(void) { 803703c: b530 push {r4, r5, lr} struct ip_addr ipaddr; struct ip_addr netmask; struct ip_addr gw; char str[20]; tcpip_init( NULL, NULL ); 803703e: 2000 movs r0, #0 /* ЕÑли наÑтройки изменили, то иÑпользуем временные параметры */ if (sSettings.sFlags.netsettingsChanged == true) 8037040: 4c50 ldr r4, [pc, #320] ; (8037184 ) TaskHandle_t xHandleWebReinit = NULL; bool dhcp = false; void LwIP_Init(void) { 8037042: b08d sub sp, #52 ; 0x34 struct ip_addr ipaddr; struct ip_addr netmask; struct ip_addr gw; char str[20]; tcpip_init( NULL, NULL ); 8037044: 4601 mov r1, r0 8037046: f7f7 f8f7 bl 802e238 /* ЕÑли наÑтройки изменили, то иÑпользуем временные параметры */ if (sSettings.sFlags.netsettingsChanged == true) 803704a: f894 3120 ldrb.w r3, [r4, #288] ; 0x120 803704e: 2b00 cmp r3, #0 8037050: d032 beq.n 80370b8 { if (sSettings.sWebTempParams.dhcpEnable) 8037052: f894 5063 ldrb.w r5, [r4, #99] ; 0x63 8037056: b12d cbz r5, 8037064 { ipaddr.addr = 0; 8037058: 2300 movs r3, #0 803705a: 9304 str r3, [sp, #16] netmask.addr = 0; 803705c: 9305 str r3, [sp, #20] gw.addr = 0; 803705e: 9306 str r3, [sp, #24] netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 8037060: 9300 str r3, [sp, #0] 8037062: e015 b.n 8037090 netif_set_default(&xnetif); netif_set_up(&xnetif); } else { ipaddr.addr = ipaddr_addr(sSettings.sWebTempParams.ip); 8037064: f104 0033 add.w r0, r4, #51 ; 0x33 8037068: f7fb f977 bl 803235a 803706c: 9004 str r0, [sp, #16] netmask.addr = ipaddr_addr(sSettings.sWebTempParams.mask); 803706e: f104 0053 add.w r0, r4, #83 ; 0x53 8037072: f7fb f972 bl 803235a 8037076: 9005 str r0, [sp, #20] gw.addr = ipaddr_addr(sSettings.sWebTempParams.gate); 8037078: f104 0043 add.w r0, r4, #67 ; 0x43 803707c: f7fb f96d bl 803235a sprintf(str, " %s\n\r", sSettings.sWebTempParams.ip); 8037080: 4941 ldr r1, [pc, #260] ; (8037188 ) } else { ipaddr.addr = ipaddr_addr(sSettings.sWebTempParams.ip); netmask.addr = ipaddr_addr(sSettings.sWebTempParams.mask); gw.addr = ipaddr_addr(sSettings.sWebTempParams.gate); 8037082: 9006 str r0, [sp, #24] sprintf(str, " %s\n\r", sSettings.sWebTempParams.ip); 8037084: f104 0233 add.w r2, r4, #51 ; 0x33 8037088: a807 add r0, sp, #28 803708a: f7f0 fd49 bl 8027b20 PRINT_USART("\n\rStatic IP address \n\r"); PRINT_USART(str); netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 803708e: 9500 str r5, [sp, #0] 8037090: 4b3e ldr r3, [pc, #248] ; (803718c ) 8037092: 483f ldr r0, [pc, #252] ; (8037190 ) 8037094: 9301 str r3, [sp, #4] 8037096: 4b3f ldr r3, [pc, #252] ; (8037194 ) 8037098: a904 add r1, sp, #16 803709a: aa05 add r2, sp, #20 803709c: 9302 str r3, [sp, #8] 803709e: ab06 add r3, sp, #24 80370a0: f7f8 f994 bl 802f3cc netif_set_default(&xnetif); 80370a4: 483a ldr r0, [pc, #232] ; (8037190 ) 80370a6: f7f8 f9b9 bl 802f41c netif_set_up(&xnetif); 80370aa: 4839 ldr r0, [pc, #228] ; (8037190 ) 80370ac: f7f8 f9c6 bl 802f43c } if (sSettings.sWebTempParams.dhcpEnable) { 80370b0: 4b34 ldr r3, [pc, #208] ; (8037184 ) 80370b2: f893 3063 ldrb.w r3, [r3, #99] ; 0x63 80370b6: e043 b.n 8037140 } } /* ÐаÑтройки не менÑлиÑÑŒ, иÑпользуем обычне наÑтройки из флеш памÑти */ else { if (sSettings.sWebParams.dhcpEnable) 80370b8: f894 5032 ldrb.w r5, [r4, #50] ; 0x32 80370bc: b125 cbz r5, 80370c8 { ipaddr.addr = 0; 80370be: 9304 str r3, [sp, #16] netmask.addr = 0; 80370c0: 9305 str r3, [sp, #20] gw.addr = 0; 80370c2: 9306 str r3, [sp, #24] netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 80370c4: 9300 str r3, [sp, #0] 80370c6: e028 b.n 803711a netif_set_default(&xnetif); netif_set_up(&xnetif); } else { ipaddr.addr = ipaddr_addr(sSettings.sWebParams.ip); 80370c8: 1ca0 adds r0, r4, #2 80370ca: f7fb f946 bl 803235a 80370ce: 9004 str r0, [sp, #16] netmask.addr = ipaddr_addr(sSettings.sWebParams.mask); 80370d0: f104 0022 add.w r0, r4, #34 ; 0x22 80370d4: f7fb f941 bl 803235a 80370d8: 9005 str r0, [sp, #20] gw.addr = ipaddr_addr(sSettings.sWebParams.gate); 80370da: f104 0012 add.w r0, r4, #18 80370de: f7fb f93c bl 803235a /* ОбновлÑем временные наÑтройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; 80370e2: 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); 80370e6: 9006 str r0, [sp, #24] /* ОбновлÑем временные наÑтройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; strcpy(sSettings.sWebTempParams.ip, sSettings.sWebParams.ip); 80370e8: 1ca1 adds r1, r4, #2 80370ea: 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; 80370ee: f884 3063 strb.w r3, [r4, #99] ; 0x63 strcpy(sSettings.sWebTempParams.ip, sSettings.sWebParams.ip); 80370f2: f7ea ffcf bl 8022094 strcpy(sSettings.sWebTempParams.mask, sSettings.sWebParams.mask); 80370f6: f104 0122 add.w r1, r4, #34 ; 0x22 80370fa: f104 0053 add.w r0, r4, #83 ; 0x53 80370fe: f7ea ffc9 bl 8022094 strcpy(sSettings.sWebTempParams.gate, sSettings.sWebParams.gate); 8037102: f104 0112 add.w r1, r4, #18 8037106: f104 0043 add.w r0, r4, #67 ; 0x43 803710a: f7ea ffc3 bl 8022094 sprintf(str, " %s\n\r", sSettings.sWebParams.ip); 803710e: a807 add r0, sp, #28 8037110: 491d ldr r1, [pc, #116] ; (8037188 ) 8037112: 1ca2 adds r2, r4, #2 8037114: f7f0 fd04 bl 8027b20 PRINT_USART("\n\rStatic IP address \n\r"); PRINT_USART(str); netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 8037118: 9500 str r5, [sp, #0] 803711a: 4b1c ldr r3, [pc, #112] ; (803718c ) 803711c: 481c ldr r0, [pc, #112] ; (8037190 ) 803711e: 9301 str r3, [sp, #4] 8037120: 4b1c ldr r3, [pc, #112] ; (8037194 ) 8037122: a904 add r1, sp, #16 8037124: aa05 add r2, sp, #20 8037126: 9302 str r3, [sp, #8] 8037128: ab06 add r3, sp, #24 803712a: f7f8 f94f bl 802f3cc netif_set_default(&xnetif); 803712e: 4818 ldr r0, [pc, #96] ; (8037190 ) 8037130: f7f8 f974 bl 802f41c netif_set_up(&xnetif); 8037134: 4816 ldr r0, [pc, #88] ; (8037190 ) 8037136: f7f8 f981 bl 802f43c } if (sSettings.sWebParams.dhcpEnable) { 803713a: 4b12 ldr r3, [pc, #72] ; (8037184 ) 803713c: f893 3032 ldrb.w r3, [r3, #50] ; 0x32 8037140: b17b cbz r3, 8037162 xTaskCreate(LwIP_DHCP_task, "DHCPClient", configMINIMAL_STACK_SIZE * 2, NULL, 8037142: 2302 movs r3, #2 8037144: 9300 str r3, [sp, #0] 8037146: 4b14 ldr r3, [pc, #80] ; (8037198 ) 8037148: 4814 ldr r0, [pc, #80] ; (803719c ) 803714a: 9301 str r3, [sp, #4] 803714c: 2300 movs r3, #0 803714e: 9302 str r3, [sp, #8] 8037150: 9303 str r3, [sp, #12] 8037152: f44f 7280 mov.w r2, #256 ; 0x100 8037156: 4912 ldr r1, [pc, #72] ; (80371a0 ) 8037158: f7f3 fe6a bl 802ae30 tskIDLE_PRIORITY + 2, &xHandleDHCP); dhcp = true; 803715c: 4b11 ldr r3, [pc, #68] ; (80371a4 ) 803715e: 2201 movs r2, #1 8037160: 701a strb r2, [r3, #0] } } /* ЕÑли наÑтройки изменилиÑÑŒ, запуÑкаем задачу по отÑчету времени реакции пользователÑ*/ if (sSettings.sFlags.netsettingsChanged == true) 8037162: 4b08 ldr r3, [pc, #32] ; (8037184 ) 8037164: f893 3120 ldrb.w r3, [r3, #288] ; 0x120 8037168: b153 cbz r3, 8037180 xTaskCreate(vTaskWebReinit, "webReinit", configMINIMAL_STACK_SIZE, NULL, 803716a: 4a0f ldr r2, [pc, #60] ; (80371a8 ) 803716c: 480f ldr r0, [pc, #60] ; (80371ac ) 803716e: 9201 str r2, [sp, #4] 8037170: 2300 movs r3, #0 8037172: 9300 str r3, [sp, #0] 8037174: 9302 str r3, [sp, #8] 8037176: 9303 str r3, [sp, #12] 8037178: 490d ldr r1, [pc, #52] ; (80371b0 ) 803717a: 2280 movs r2, #128 ; 0x80 803717c: f7f3 fe58 bl 802ae30 tskIDLE_PRIORITY, &xHandleWebReinit); } 8037180: b00d add sp, #52 ; 0x34 8037182: bd30 pop {r4, r5, pc} 8037184: 2000cba0 .word 0x2000cba0 8037188: 08044926 .word 0x08044926 803718c: 08036bfd .word 0x08036bfd 8037190: 2000f85c .word 0x2000f85c 8037194: 0802e1f9 .word 0x0802e1f9 8037198: 2000c7e4 .word 0x2000c7e4 803719c: 08036ef1 .word 0x08036ef1 80371a0: 0804492c .word 0x0804492c 80371a4: 2000c7dc .word 0x2000c7dc 80371a8: 2000c7e0 .word 0x2000c7e0 80371ac: 08036e65 .word 0x08036e65 80371b0: 08044937 .word 0x08044937 080371b4 : /** * @brief Возвращает true еÑли Ñетевые параметры изменилиÑÑŒ */ bool GetStateWebReinit(void) { 80371b4: b510 push {r4, lr} /* Ð¡Ñ‚Ð°Ñ‚ÑƒÑ dhcp изменилÑÑ? */ if (sSettings.sWebParams.dhcpEnable != sSettings.sWebTempParams.dhcpEnable) 80371b6: 4c12 ldr r4, [pc, #72] ; (8037200 ) 80371b8: f894 2032 ldrb.w r2, [r4, #50] ; 0x32 80371bc: f894 3063 ldrb.w r3, [r4, #99] ; 0x63 80371c0: 429a cmp r2, r3 80371c2: d004 beq.n 80371ce { /* Включили dhcp */ if (sSettings.sWebTempParams.dhcpEnable == 1) { /* УÑтанавилваем флаг */ SetWebReinitFlag(true); 80371c4: 2001 movs r0, #1 80371c6: f7f1 f917 bl 80283f8 return true; 80371ca: 2001 movs r0, #1 80371cc: bd10 pop {r4, pc} return true; } } /* ИзменилÑÑ IP? */ if (strstr(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip) == 0) 80371ce: 1ca0 adds r0, r4, #2 80371d0: f104 0133 add.w r1, r4, #51 ; 0x33 80371d4: f7eb fa3c bl 8022650 80371d8: 2800 cmp r0, #0 80371da: d0f3 beq.n 80371c4 SetWebReinitFlag(true); return true; } /* ИзменилÑÑ ÑˆÐ»ÑŽÐ·? */ if (strstr(sSettings.sWebParams.gate, sSettings.sWebTempParams.gate) == 0) 80371dc: f104 0012 add.w r0, r4, #18 80371e0: f104 0143 add.w r1, r4, #67 ; 0x43 80371e4: f7eb fa34 bl 8022650 80371e8: 2800 cmp r0, #0 80371ea: d0eb beq.n 80371c4 SetWebReinitFlag(true); return true; } /* ИзменилаÑÑŒ маÑка? */ if (strstr(sSettings.sWebParams.mask, sSettings.sWebTempParams.mask) == 0) 80371ec: f104 0022 add.w r0, r4, #34 ; 0x22 80371f0: f104 0153 add.w r1, r4, #83 ; 0x53 80371f4: f7eb fa2c bl 8022650 80371f8: 2800 cmp r0, #0 80371fa: d0e3 beq.n 80371c4 /* УÑтанавилваем флаг */ SetWebReinitFlag(true); return true; } return false; 80371fc: 2000 movs r0, #0 } 80371fe: bd10 pop {r4, pc} 8037200: 2000cba0 .word 0x2000cba0 08037204 : \param len - длина переменной в байтах \param value - указатель на значение переменной \return нет ------------------------------------------------------------------------------*/ static void signals_set_value (struct obj_def *od, u16_t len, void *value) { 8037204: b530 push {r4, r5, lr} 8037206: 4605 mov r5, r0 8037208: b087 sub sp, #28 803720a: 4614 mov r4, r2 uint32_t val; char *val_string; char str[20]; int8_t res = 0; memset(str, 0, 20); 803720c: a801 add r0, sp, #4 803720e: 2100 movs r1, #0 8037210: 2214 movs r2, #20 8037212: f7ea fdc5 bl 8021da0 id = od->id_inst_ptr[0]; 8037216: 68ab ldr r3, [r5, #8] switch (id) 8037218: 781b ldrb r3, [r3, #0] 803721a: 3b02 subs r3, #2 803721c: 2b06 cmp r3, #6 803721e: f200 8081 bhi.w 8037324 8037222: e8df f003 tbb [pc, r3] 8037226: 0a04 .short 0x0a04 8037228: 3e27117f .word 0x3e27117f 803722c: 60 .byte 0x60 803722d: 00 .byte 0x00 { case 2: /* RestoreSignal */ val = *((s32_t*)value); if (val == 1) { 803722e: 6823 ldr r3, [r4, #0] 8037230: 2b01 cmp r3, #1 8037232: d177 bne.n 8037324 HTTP_ResetSettings(); 8037234: f7f6 ff3c bl 802e0b0 8037238: e074 b.n 8037324 } break; case 3: /* RebootSignal */ val = *((s32_t*)value); if (val == 1) 803723a: 6823 ldr r3, [r4, #0] 803723c: 2b01 cmp r3, #1 803723e: d171 bne.n 8037324 HTTP_StartResetTask(false); 8037240: 2000 movs r0, #0 8037242: f7f6 ff7f bl 802e144 8037246: e06d b.n 8037324 break; case 5: /* DO1 */ if(sSettings.sInOuts.ro_type_source[0] == SNMP_SET){ 8037248: 4b37 ldr r3, [pc, #220] ; (8037328 ) 803724a: f893 3374 ldrb.w r3, [r3, #884] ; 0x374 803724e: 2b03 cmp r3, #3 8037250: d168 bne.n 8037324 val_string = (char*)value; SetROStr(val_string, 0); 8037252: 2100 movs r1, #0 8037254: 4620 mov r0, r4 8037256: f7f1 faa9 bl 80287ac if(val_string[0] == 0x31) 803725a: 7823 ldrb r3, [r4, #0] 803725c: 2b31 cmp r3, #49 ; 0x31 strcat(str, "Замкнуто"); 803725e: bf0c ite eq 8037260: 4932 ldreq r1, [pc, #200] ; (803732c ) else strcat(str, "Разомкнуто"); 8037262: 4933 ldrne r1, [pc, #204] ; (8037330 ) 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, "Замкнуто"); 8037264: a801 add r0, sp, #4 else strcat(str, "Разомкнуто"); 8037266: f7ea fe01 bl 8021e6c SNMP_SendUserTrap(DO0_TOGGLED); 803726a: 2007 movs r0, #7 803726c: f000 f970 bl 8037550 log_event_data(LOG_DO0_STATE, str); 8037270: 2009 movs r0, #9 8037272: e014 b.n 803729e } break; case 6: /* DO2 */ if(sSettings.sInOuts.ro_type_source[1] == SNMP_SET){ 8037274: 4b2c ldr r3, [pc, #176] ; (8037328 ) 8037276: f893 3375 ldrb.w r3, [r3, #885] ; 0x375 803727a: 2b03 cmp r3, #3 803727c: d152 bne.n 8037324 val_string = (char*)value; SetROStr(val_string, 1); 803727e: 2101 movs r1, #1 8037280: 4620 mov r0, r4 8037282: f7f1 fa93 bl 80287ac if(val_string[0] == 0x31) 8037286: 7823 ldrb r3, [r4, #0] 8037288: 2b31 cmp r3, #49 ; 0x31 strcat(str, "Замкнуто"); 803728a: bf0c ite eq 803728c: 4927 ldreq r1, [pc, #156] ; (803732c ) else strcat(str, "Разомкнуто"); 803728e: 4928 ldrne r1, [pc, #160] ; (8037330 ) 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, "Замкнуто"); 8037290: a801 add r0, sp, #4 else strcat(str, "Разомкнуто"); 8037292: f7ea fdeb bl 8021e6c SNMP_SendUserTrap(DO1_TOGGLED); 8037296: 2008 movs r0, #8 8037298: f000 f95a bl 8037550 log_event_data(LOG_DO1_STATE, str); 803729c: 200a movs r0, #10 803729e: a901 add r1, sp, #4 80372a0: e03e b.n 8037320 } break; case 7: /* BatTest */ val =*((s32_t*)value); 80372a2: 6823 ldr r3, [r4, #0] if(val == 0){ 80372a4: b93b cbnz r3, 80372b6 res = ups_metac_service_pdu(ups_cancel_test); 80372a6: 2008 movs r0, #8 80372a8: f7f2 f8a8 bl 80293fc if(res == 1){ 80372ac: b240 sxtb r0, r0 80372ae: 2801 cmp r0, #1 80372b0: d138 bne.n 8037324 log_event_data(LOG_TEST_UPS, "ÐдминиÑтратор(ОÑтанов)"); 80372b2: 2006 movs r0, #6 80372b4: e028 b.n 8037308 } } else if(val > 0 && val < 100){ 80372b6: 1e5a subs r2, r3, #1 80372b8: 2a62 cmp r2, #98 ; 0x62 80372ba: d80a bhi.n 80372d2 TimeParam = val; 80372bc: 4a1d ldr r2, [pc, #116] ; (8037334 ) res = ups_metac_service_pdu(ups_test_time); 80372be: 2003 movs r0, #3 if(res == 1){ log_event_data(LOG_TEST_UPS, "ÐдминиÑтратор(ОÑтанов)"); } } else if(val > 0 && val < 100){ TimeParam = val; 80372c0: 8013 strh r3, [r2, #0] res = ups_metac_service_pdu(ups_test_time); 80372c2: f7f2 f89b bl 80293fc if(res == 1){ 80372c6: b240 sxtb r0, r0 80372c8: 2801 cmp r0, #1 80372ca: d12b bne.n 8037324 log_event_data(LOG_TEST_UPS, "ÐдминиÑтратор (Запущен)"); 80372cc: 2006 movs r0, #6 80372ce: 491a ldr r1, [pc, #104] ; (8037338 ) 80372d0: e026 b.n 8037320 } } else if(val == 100){ 80372d2: 2b64 cmp r3, #100 ; 0x64 80372d4: d101 bne.n 80372da res = ups_metac_service_pdu(ups_test_10sec); 80372d6: 2001 movs r0, #1 80372d8: e7f3 b.n 80372c2 if(res == 1){ log_event_data(LOG_TEST_UPS, "ÐдминиÑтратор (Запущен)"); } } else if(val == 999){ 80372da: f240 32e7 movw r2, #999 ; 0x3e7 80372de: 4293 cmp r3, r2 80372e0: d120 bne.n 8037324 res = ups_metac_service_pdu(ups_test_low_bat); 80372e2: 2002 movs r0, #2 80372e4: e7ed b.n 80372c2 } } break; case 8: /* Shutdown UPS */ val_string = (char*)value; float shtdn_val = atof(val_string); 80372e6: 4620 mov r0, r4 80372e8: f7ea fc36 bl 8021b58 80372ec: f7e9 fc4a bl 8020b84 <__aeabi_d2f> if(shtdn_val == 0){ 80372f0: 2100 movs r1, #0 } } break; case 8: /* Shutdown UPS */ val_string = (char*)value; float shtdn_val = atof(val_string); 80372f2: 4604 mov r4, r0 if(shtdn_val == 0){ 80372f4: f7e9 ff38 bl 8021168 <__aeabi_fcmpeq> 80372f8: b140 cbz r0, 803730c res = ups_metac_service_pdu(ups_cancel_shut_down); 80372fa: 2007 movs r0, #7 80372fc: f7f2 f87e bl 80293fc if(res == 1) 8037300: b240 sxtb r0, r0 8037302: 2801 cmp r0, #1 8037304: d10e bne.n 8037324 log_event_data(LOG_SHUTDOWN_UPS, "ÐдминиÑтратор(ОÑтанов)"); 8037306: 2007 movs r0, #7 8037308: 490c ldr r1, [pc, #48] ; (803733c ) 803730a: e009 b.n 8037320 } else{ TimeParamFloat = shtdn_val; 803730c: 4b0c ldr r3, [pc, #48] ; (8037340 ) res = ups_metac_service_pdu(ups_shutdown); 803730e: 2005 movs r0, #5 res = ups_metac_service_pdu(ups_cancel_shut_down); if(res == 1) log_event_data(LOG_SHUTDOWN_UPS, "ÐдминиÑтратор(ОÑтанов)"); } else{ TimeParamFloat = shtdn_val; 8037310: 601c str r4, [r3, #0] res = ups_metac_service_pdu(ups_shutdown); 8037312: f7f2 f873 bl 80293fc if(res == 1) 8037316: b240 sxtb r0, r0 8037318: 2801 cmp r0, #1 803731a: d103 bne.n 8037324 log_event_data(LOG_SHUTDOWN_UPS, "ÐдминиÑтратор"); 803731c: 4909 ldr r1, [pc, #36] ; (8037344 ) 803731e: 2007 movs r0, #7 8037320: f7f2 fdaa bl 8029e78 break; default : break; }; } 8037324: b007 add sp, #28 8037326: bd30 pop {r4, r5, pc} 8037328: 2000cba0 .word 0x2000cba0 803732c: 08038b19 .word 0x08038b19 8037330: 08038b2a .word 0x08038b2a 8037334: 20000b54 .word 0x20000b54 8037338: 080424d0 .word 0x080424d0 803733c: 0804244d .word 0x0804244d 8037340: 20000b50 .word 0x20000b50 8037344: 08038a86 .word 0x08038a86 08037348 : char *val_string; int32_t val; LWIP_UNUSED_ARG(value); set_ok = 0; id = od->id_inst_ptr[0]; 8037348: 6883 ldr r3, [r0, #8] switch (id) 803734a: 781b ldrb r3, [r3, #0] 803734c: 3b02 subs r3, #2 \param value - указатель на значение переменной \return 0 - некорректное значение 1 - корректное значение ------------------------------------------------------------------------------*/ static u8_t signals_set_test (struct obj_def *od, u16_t len, void *value) { 803734e: b510 push {r4, lr} LWIP_UNUSED_ARG(value); set_ok = 0; id = od->id_inst_ptr[0]; switch (id) 8037350: 2b06 cmp r3, #6 8037352: d838 bhi.n 80373c6 8037354: e8df f003 tbb [pc, r3] 8037358: 06370404 .word 0x06370404 803735c: 2112 .short 0x2112 803735e: 29 .byte 0x29 803735f: 00 .byte 0x00 u8_t id, set_ok; char *val_string; int32_t val; LWIP_UNUSED_ARG(value); set_ok = 0; 8037360: 2904 cmp r1, #4 8037362: e016 b.n 8037392 { set_ok = 1; } break; case 5: /* DO1 */ if ( len <= 1 ) 8037364: 2901 cmp r1, #1 8037366: d900 bls.n 803736a 8037368: e02d b.n 80373c6 { val_string = (char*)value; if(atoi(val_string) <= 1){ 803736a: 4610 mov r0, r2 803736c: f7ea fbf8 bl 8021b60 8037370: 2801 cmp r0, #1 8037372: dc28 bgt.n 80373c6 if(sSettings.sInOuts.ro_type_source[0] == SNMP_SET) 8037374: 4b16 ldr r3, [pc, #88] ; (80373d0 ) 8037376: f893 0374 ldrb.w r0, [r3, #884] ; 0x374 803737a: e009 b.n 8037390 set_ok = 1; } } break; case 6: /* DO2 */ if ( len <= 1 ) 803737c: 2901 cmp r1, #1 803737e: d822 bhi.n 80373c6 { val_string = (char*)value; if(atoi(val_string) <= 1){ 8037380: 4610 mov r0, r2 8037382: f7ea fbed bl 8021b60 8037386: 2801 cmp r0, #1 8037388: dc1d bgt.n 80373c6 if(sSettings.sInOuts.ro_type_source[1] == SNMP_SET) 803738a: 4b11 ldr r3, [pc, #68] ; (80373d0 ) 803738c: f893 0375 ldrb.w r0, [r3, #885] ; 0x375 u8_t id, set_ok; char *val_string; int32_t val; LWIP_UNUSED_ARG(value); set_ok = 0; 8037390: 2803 cmp r0, #3 8037392: bf14 ite ne 8037394: 2000 movne r0, #0 8037396: 2001 moveq r0, #1 8037398: bd10 pop {r4, pc} set_ok = 1; } } break; case 7: /* BatTest */ val = *((s32_t*)value); 803739a: 6813 ldr r3, [r2, #0] if((val >= 0 && val <= 100) || val == 999){ 803739c: 2b64 cmp r3, #100 ; 0x64 803739e: d914 bls.n 80373ca 80373a0: f240 32e7 movw r2, #999 ; 0x3e7 80373a4: 4293 cmp r3, r2 80373a6: d10e bne.n 80373c6 80373a8: e00f b.n 80373ca set_ok = 1; } break; case 8: /* Shutdown UPS */ if ( len <= 3 ) 80373aa: 2903 cmp r1, #3 80373ac: d80b bhi.n 80373c6 { val_string = (char*)value; if(atof(val_string) <= 10){ 80373ae: 4610 mov r0, r2 80373b0: f7ea fbd2 bl 8021b58 80373b4: 2200 movs r2, #0 80373b6: 4b07 ldr r3, [pc, #28] ; (80373d4 ) 80373b8: 2401 movs r4, #1 80373ba: f7e9 fb7d bl 8020ab8 <__aeabi_dcmple> 80373be: b900 cbnz r0, 80373c2 80373c0: 4604 mov r4, r0 u8_t id, set_ok; char *val_string; int32_t val; LWIP_UNUSED_ARG(value); set_ok = 0; 80373c2: b2e0 uxtb r0, r4 80373c4: bd10 pop {r4, pc} 80373c6: 2000 movs r0, #0 80373c8: bd10 pop {r4, pc} } break; case 7: /* BatTest */ val = *((s32_t*)value); if((val >= 0 && val <= 100) || val == 999){ set_ok = 1; 80373ca: 2001 movs r0, #1 } break; }; return set_ok; } 80373cc: bd10 pop {r4, pc} 80373ce: bf00 nop 80373d0: 2000cba0 .word 0x2000cba0 80373d4: 40240000 .word 0x40240000 080373d8 : \param len - длина переменной в байтах \param value - указатель на значение переменной \return нет ------------------------------------------------------------------------------*/ static void signals_get_value (struct obj_def *od, u16_t len, void *value) { 80373d8: 4613 mov r3, r2 u8_t id; id = od->id_inst_ptr[0]; 80373da: 6882 ldr r2, [r0, #8] switch (id) 80373dc: 7812 ldrb r2, [r2, #0] 80373de: 3a01 subs r2, #1 \param len - длина переменной в байтах \param value - указатель на значение переменной \return нет ------------------------------------------------------------------------------*/ static void signals_get_value (struct obj_def *od, u16_t len, void *value) { 80373e0: b510 push {r4, lr} 80373e2: 460c mov r4, r1 u8_t id; id = od->id_inst_ptr[0]; switch (id) 80373e4: 2a11 cmp r2, #17 80373e6: d814 bhi.n 8037412 80373e8: e8df f002 tbb [pc, r2] 80373ec: 0c09090c .word 0x0c09090c 80373f0: 09090c0c .word 0x09090c0c 80373f4: 0c0c0c0c .word 0x0c0c0c0c 80373f8: 0c0c0c0c .word 0x0c0c0c0c 80373fc: 0c0c .short 0x0c0c break; case 7: /* BatTest */ *((s32_t*)value) = 0; break; case 8: /* Shutdown UPS */ *((s32_t*)value) = 0; 80373fe: 2200 movs r2, #0 8037400: 601a str r2, [r3, #0] break; 8037402: 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); 8037404: 4903 ldr r1, [pc, #12] ; (8037414 ) 8037406: 4618 mov r0, r3 8037408: 4622 mov r2, r4 break; default : break; }; } 803740a: 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); 803740e: f7fc ba51 b.w 80338b4 8037412: bd10 pop {r4, pc} 8037414: 2000f9a8 .word 0x2000f9a8 08037418 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8037418: 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) { 803741a: b538 push {r3, r4, r5, lr} 803741c: 4614 mov r4, r2 u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 803741e: f040 8081 bne.w 8037524 { od->id_inst_len = ident_len; 8037422: 2302 movs r3, #2 8037424: 7193 strb r3, [r2, #6] { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 8037426: 1f0a subs r2, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8037428: 60a2 str r2, [r4, #8] id = ident[0]; switch (id) 803742a: f811 2c04 ldrb.w r2, [r1, #-4] 803742e: 3a01 subs r2, #1 8037430: 2a11 cmp r2, #17 8037432: d877 bhi.n 8037524 8037434: e8df f002 tbb [pc, r2] 8037438: 0f242409 .word 0x0f242409 803743c: 2a241a15 .word 0x2a241a15 8037440: 453f3932 .word 0x453f3932 8037444: 5d57514b .word 0x5d57514b 8037448: 6963 .short 0x6963 { case 1: /* FWVersion */ GetVersionStr(paramStr, ¶mLength); 803744a: 4d38 ldr r5, [pc, #224] ; (803752c ) 803744c: 4838 ldr r0, [pc, #224] ; (8037530 ) 803744e: 4629 mov r1, r5 8037450: f7f0 fdc0 bl 8027fd4 8037454: e05e b.n 8037514 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); 8037456: 4d35 ldr r5, [pc, #212] ; (803752c ) 8037458: 4835 ldr r0, [pc, #212] ; (8037530 ) 803745a: 4629 mov r1, r5 803745c: f7f0 fe26 bl 80280ac 8037460: e058 b.n 8037514 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); 8037462: 4d32 ldr r5, [pc, #200] ; (803752c ) 8037464: 4832 ldr r0, [pc, #200] ; (8037530 ) 8037466: 4629 mov r1, r5 8037468: 2200 movs r2, #0 803746a: e003 b.n 8037474 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); 803746c: 4d2f ldr r5, [pc, #188] ; (803752c ) 803746e: 4830 ldr r0, [pc, #192] ; (8037530 ) 8037470: 4629 mov r1, r5 8037472: 2201 movs r2, #1 8037474: f7f0 fd2c bl 8027ed0 od->instance = MIB_OBJECT_SCALAR; 8037478: 2301 movs r3, #1 803747a: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_WRITE; 803747c: 2303 movs r3, #3 803747e: e04b b.n 8037518 od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 7: /* BatTest*/ od->instance = MIB_OBJECT_SCALAR; 8037480: 2201 movs r2, #1 od->access = MIB_OBJECT_WRITE_ONLY; 8037482: 7063 strb r3, [r4, #1] od->asn_type = SNMP_ASN1_INTEG; 8037484: 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; 8037486: 7022 strb r2, [r4, #0] od->access = MIB_OBJECT_WRITE_ONLY; od->asn_type = SNMP_ASN1_INTEG; od->v_len = sizeof(s32_t); 8037488: 2304 movs r3, #4 803748a: e049 b.n 8037520 break; case 8: /* Shutdown UPS*/ od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_WRITE_ONLY; 803748c: 7063 strb r3, [r4, #1] od->asn_type = SNMP_ASN1_OC_STR; 803748e: 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; 8037490: 2201 movs r2, #1 od->access = MIB_OBJECT_WRITE_ONLY; od->asn_type = SNMP_ASN1_OC_STR; 8037492: 70a3 strb r3, [r4, #2] od->v_len = paramLength; 8037494: 4b25 ldr r3, [pc, #148] ; (803752c ) od->asn_type = SNMP_ASN1_INTEG; od->v_len = sizeof(s32_t); break; case 8: /* Shutdown UPS*/ od->instance = MIB_OBJECT_SCALAR; 8037496: 7022 strb r2, [r4, #0] od->access = MIB_OBJECT_WRITE_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; 8037498: 781b ldrb r3, [r3, #0] 803749a: e041 b.n 8037520 break; case 9: /* DIO*/ GetDINStatusStr(paramStr, ¶mLength, 0); 803749c: 4d23 ldr r5, [pc, #140] ; (803752c ) 803749e: 4824 ldr r0, [pc, #144] ; (8037530 ) 80374a0: 4629 mov r1, r5 80374a2: 2200 movs r2, #0 80374a4: f7f0 fcda bl 8027e5c 80374a8: e034 b.n 8037514 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 10: /* IntTemp */ GetInternalTempStr(paramStr, ¶mLength); 80374aa: 4d20 ldr r5, [pc, #128] ; (803752c ) 80374ac: 4820 ldr r0, [pc, #128] ; (8037530 ) 80374ae: 4629 mov r1, r5 80374b0: f7f0 fbd0 bl 8027c54 80374b4: e02e b.n 8037514 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 11: /* InFreq */ GetInputFreqStr(paramStr, ¶mLength); 80374b6: 4d1d ldr r5, [pc, #116] ; (803752c ) 80374b8: 481d ldr r0, [pc, #116] ; (8037530 ) 80374ba: 4629 mov r1, r5 80374bc: f7f0 fb3c bl 8027b38 80374c0: e028 b.n 8037514 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 12: /* InVoltVAC */ GetInputVoltageStr(paramStr, ¶mLength); 80374c2: 4d1a ldr r5, [pc, #104] ; (803752c ) 80374c4: 481a ldr r0, [pc, #104] ; (8037530 ) 80374c6: 4629 mov r1, r5 80374c8: f7f0 fb62 bl 8027b90 80374cc: e022 b.n 8037514 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 13: /* OutVoltVAC */ GetOutputVoltageStr(paramStr, ¶mLength); 80374ce: 4d17 ldr r5, [pc, #92] ; (803752c ) 80374d0: 4817 ldr r0, [pc, #92] ; (8037530 ) 80374d2: 4629 mov r1, r5 80374d4: f7f0 fb72 bl 8027bbc 80374d8: e01c b.n 8037514 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 14: /* Power */ GetPowerStr(paramStr, ¶mLength); 80374da: 4d14 ldr r5, [pc, #80] ; (803752c ) 80374dc: 4814 ldr r0, [pc, #80] ; (8037530 ) 80374de: 4629 mov r1, r5 80374e0: f7f0 fb82 bl 8027be8 80374e4: e016 b.n 8037514 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 15: /* BatCap */ GetBatCapacityStr(paramStr, ¶mLength); 80374e6: 4d11 ldr r5, [pc, #68] ; (803752c ) 80374e8: 4811 ldr r0, [pc, #68] ; (8037530 ) 80374ea: 4629 mov r1, r5 80374ec: f7f0 fb8e bl 8027c0c 80374f0: e010 b.n 8037514 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 16: /* BatTime */ GetRuntimeStr(paramStr, ¶mLength); 80374f2: 4d0e ldr r5, [pc, #56] ; (803752c ) 80374f4: 480e ldr r0, [pc, #56] ; (8037530 ) 80374f6: 4629 mov r1, r5 80374f8: f7f0 fb9a bl 8027c30 80374fc: e00a b.n 8037514 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 17: /* ConnectMonitor */ GetConnectMonitorStr(paramStr, ¶mLength); 80374fe: 4d0b ldr r5, [pc, #44] ; (803752c ) 8037500: 480b ldr r0, [pc, #44] ; (8037530 ) 8037502: 4629 mov r1, r5 8037504: f7f0 fbce bl 8027ca4 8037508: e004 b.n 8037514 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 18: /* Alarms */ GetAlarmStr(paramStr, ¶mLength); 803750a: 4d08 ldr r5, [pc, #32] ; (803752c ) 803750c: 4808 ldr r0, [pc, #32] ; (8037530 ) 803750e: 4629 mov r1, r5 8037510: f7f0 fbe0 bl 8027cd4 od->instance = MIB_OBJECT_SCALAR; 8037514: 2301 movs r3, #1 8037516: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8037518: 7063 strb r3, [r4, #1] od->asn_type = SNMP_ASN1_OC_STR; 803751a: 2304 movs r3, #4 803751c: 70a3 strb r3, [r4, #2] od->v_len = paramLength; 803751e: 782b ldrb r3, [r5, #0] 8037520: 80a3 strh r3, [r4, #4] break; 8037522: bd38 pop {r3, r4, r5, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("planar_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8037524: 2300 movs r3, #0 8037526: 7023 strb r3, [r4, #0] 8037528: bd38 pop {r3, r4, r5, pc} 803752a: bf00 nop 803752c: 2000c7ea .word 0x2000c7ea 8037530: 2000f9a8 .word 0x2000f9a8 08037534 : /** * @brief СиÑтемный тик SNMP. ТаÑк должен вызыватьÑÑ Ñ Ñ‡Ð°Ñтотой 100Гц. * @retval */ void SNMP_SysUpTimeTask(void *arg) { 8037534: b513 push {r0, r1, r4, lr} TickType_t xLastWakeTime; const TickType_t xFrequency = 10; xLastWakeTime = xTaskGetTickCount(); 8037536: f7f3 fde3 bl 802b100 803753a: ac02 add r4, sp, #8 803753c: f844 0d04 str.w r0, [r4, #-4]! while(1) { vTaskDelayUntil( &xLastWakeTime, xFrequency ); 8037540: 4620 mov r0, r4 8037542: 210a movs r1, #10 8037544: f7f3 ff40 bl 802b3c8 snmp_inc_sysuptime(); 8037548: f7fc fad2 bl 8033af0 803754c: e7f8 b.n 8037540 803754e: 0000 movs r0, r0 08037550 : * FIFO буфера. * ЕÑли в наÑтройках трапа отправка отключена, то трап игнорируетÑÑ. * @retval */ void SNMP_SendUserTrap(uint8_t trapName) { 8037550: b51f push {r0, r1, r2, r3, r4, lr} uint16_t availableSpace; uint8_t dummyTrap; if (traps[trapName].trapEnable) 8037552: 4b0d ldr r3, [pc, #52] ; (8037588 ) * FIFO буфера. * ЕÑли в наÑтройках трапа отправка отключена, то трап игнорируетÑÑ. * @retval */ void SNMP_SendUserTrap(uint8_t trapName) { 8037554: f88d 0007 strb.w r0, [sp, #7] uint16_t availableSpace; uint8_t dummyTrap; if (traps[trapName].trapEnable) 8037558: eb03 00c0 add.w r0, r3, r0, lsl #3 803755c: 78c3 ldrb r3, [r0, #3] 803755e: b193 cbz r3, 8037586 { availableSpace = uxQueueSpacesAvailable(SNMP_TrapQueue); 8037560: 4c0a ldr r4, [pc, #40] ; (803758c ) 8037562: 6820 ldr r0, [r4, #0] 8037564: f7f3 fbfe bl 802ad64 if (availableSpace == 0) 8037568: b282 uxth r2, r0 803756a: b92a cbnz r2, 8037578 xQueueReceive(SNMP_TrapQueue, &dummyTrap, 0); 803756c: 6820 ldr r0, [r4, #0] 803756e: f10d 010f add.w r1, sp, #15 8037572: 4613 mov r3, r2 8037574: f7f3 fb53 bl 802ac1e xQueueSend(SNMP_TrapQueue, &trapName, 0); 8037578: 2200 movs r2, #0 803757a: 6820 ldr r0, [r4, #0] 803757c: f10d 0107 add.w r1, sp, #7 8037580: 4613 mov r3, r2 8037582: f7f3 fa0c bl 802a99e } } 8037586: bd1f pop {r0, r1, r2, r3, r4, pc} 8037588: 2000faac .word 0x2000faac 803758c: 2000faa8 .word 0x2000faa8 08037590 : * @brief УÑтановить SNMP Descriptor * @retval */ // TODO void SNMP_SetObjDescr(void) { 8037590: b538 push {r3, r4, r5, lr} static uint8_t len; strcpy(sSettings.sSnmp.sysDescr, sSettings.sSnmp.sysName); 8037592: 4c19 ldr r4, [pc, #100] ; (80375f8 ) strcat(sSettings.sSnmp.sysDescr, " "); 8037594: 4d19 ldr r5, [pc, #100] ; (80375fc ) // TODO void SNMP_SetObjDescr(void) { static uint8_t len; strcpy(sSettings.sSnmp.sysDescr, sSettings.sSnmp.sysName); 8037596: f104 01fa add.w r1, r4, #250 ; 0xfa 803759a: 4620 mov r0, r4 803759c: f7ea fd7a bl 8022094 strcat(sSettings.sSnmp.sysDescr, " "); 80375a0: 4629 mov r1, r5 80375a2: 4620 mov r0, r4 80375a4: f7ea fc62 bl 8021e6c strcat(sSettings.sSnmp.sysDescr, VERSION); 80375a8: 4620 mov r0, r4 80375aa: 4915 ldr r1, [pc, #84] ; (8037600 ) 80375ac: f7ea fc5e bl 8021e6c strcat(sSettings.sSnmp.sysDescr, " "); 80375b0: 4629 mov r1, r5 80375b2: 4620 mov r0, r4 80375b4: f7ea fc5a bl 8021e6c strcat(sSettings.sSnmp.sysDescr, sSettings.sSnmp.sysContact); 80375b8: f104 01c8 add.w r1, r4, #200 ; 0xc8 80375bc: 4620 mov r0, r4 80375be: f7ea fc55 bl 8021e6c strcat(sSettings.sSnmp.sysDescr, " "); 80375c2: 4629 mov r1, r5 80375c4: 4620 mov r0, r4 80375c6: f7ea fc51 bl 8021e6c strcat(sSettings.sSnmp.sysDescr, sSettings.sInfo.serialNumber); 80375ca: f1a4 0193 sub.w r1, r4, #147 ; 0x93 80375ce: 4620 mov r0, r4 80375d0: f7ea fc4c bl 8021e6c strcat(sSettings.sSnmp.sysDescr, " "); 80375d4: 4629 mov r1, r5 80375d6: 4620 mov r0, r4 80375d8: f7ea fc48 bl 8021e6c strcat(sSettings.sSnmp.sysDescr, UPS.model); 80375dc: 4909 ldr r1, [pc, #36] ; (8037604 ) 80375de: 4620 mov r0, r4 80375e0: f7ea fc44 bl 8021e6c len = strlen(sSettings.sSnmp.sysDescr); 80375e4: 4620 mov r0, r4 80375e6: f7ea fdb3 bl 8022150 80375ea: 4907 ldr r1, [pc, #28] ; (8037608 ) 80375ec: 7008 strb r0, [r1, #0] snmp_set_sysdesr((u8_t*)sSettings.sSnmp.sysDescr, &len); 80375ee: 4620 mov r0, r4 } 80375f0: 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); 80375f4: f7fc ba68 b.w 8033ac8 80375f8: 2000ccd1 .word 0x2000ccd1 80375fc: 08038ac0 .word 0x08038ac0 8037600: 08038994 .word 0x08038994 8037604: 2000cf79 .word 0x2000cf79 8037608: 2000c7f4 .word 0x2000c7f4 0803760c : /** * @brief УÑтановить SNMP Community Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ */ void SNMP_SetReadCommunity(char *comm) { 803760c: 4601 mov r1, r0 strcpy(sSettings.sSnmp.readCommunity, comm); 803760e: 4801 ldr r0, [pc, #4] ; (8037614 ) 8037610: f7ea bd40 b.w 8022094 8037614: 2000cd71 .word 0x2000cd71 08037618 : /** * @brief УÑтановить SNMP Community Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи */ void SNMP_SetWriteCommunity(char *comm) { 8037618: 4601 mov r1, r0 strcpy(sSettings.sSnmp.writeCommunity, comm); 803761a: 4801 ldr r0, [pc, #4] ; (8037620 ) 803761c: f7ea bd3a b.w 8022094 8037620: 2000cd85 .word 0x2000cd85 08037624 : /** * @brief УÑтановить SNMP SysContact * @retval */ void SNMP_SetSysContact(char *con) { 8037624: b510 push {r4, lr} 8037626: 4604 mov r4, r0 static uint8_t len; len = strlen(con); 8037628: f7ea fd92 bl 8022150 803762c: 4903 ldr r1, [pc, #12] ; (803763c ) 803762e: 7008 strb r0, [r1, #0] snmp_set_syscontact((u8_t*)con, &len); 8037630: 4620 mov r0, r4 } 8037632: 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); 8037636: f7fc baab b.w 8033b90 803763a: bf00 nop 803763c: 2000c7eb .word 0x2000c7eb 08037640 : /** * @brief УÑтановить SNMP SysName * @retval */ void SNMP_SetSysName(char *name) { 8037640: b510 push {r4, lr} 8037642: 4604 mov r4, r0 static uint8_t len; len = strlen(name); 8037644: f7ea fd84 bl 8022150 8037648: 4903 ldr r1, [pc, #12] ; (8037658 ) 803764a: 7008 strb r0, [r1, #0] snmp_set_sysname((u8_t*)name, &len); 803764c: 4620 mov r0, r4 } 803764e: 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); 8037652: f7fc baa7 b.w 8033ba4 8037656: bf00 nop 8037658: 2000c7ed .word 0x2000c7ed 0803765c : /** * @brief УÑтановить SNMP SysLocation * @retval */ void SNMP_SetSysLocation(char *loc) { 803765c: b510 push {r4, lr} 803765e: 4604 mov r4, r0 static uint8_t len; len = strlen(loc); 8037660: f7ea fd76 bl 8022150 8037664: 4903 ldr r1, [pc, #12] ; (8037674 ) 8037666: 7008 strb r0, [r1, #0] snmp_set_syslocation((u8_t*)loc, &len); 8037668: 4620 mov r0, r4 } 803766a: 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); 803766e: f7fc baa3 b.w 8033bb8 8037672: bf00 nop 8037674: 2000c7ec .word 0x2000c7ec 08037678 : /** * @brief УÑтановить SNMP SysManagerIP * @retval */ void SNMP_SetManagerIP(char *ip) { 8037678: b510 push {r4, lr} static ip_addr_t trap_addr; ipaddr_aton(ip, &trap_addr); 803767a: 4c05 ldr r4, [pc, #20] ; (8037690 ) 803767c: 4621 mov r1, r4 803767e: f7fa fdee bl 803225e snmp_trap_dst_ip_set(0, &trap_addr); 8037682: 2000 movs r0, #0 8037684: 4621 mov r1, r4 } 8037686: 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); 803768a: f7fe bba5 b.w 8035dd8 803768e: bf00 nop 8037690: 2000c7f0 .word 0x2000c7f0 08037694 : /** * @brief ТеÑтовый таÑк Ð´Ð»Ñ Ð¿Ñ€Ð¾Ð²ÐµÑ€ÐºÐ¸ отправки трапов * @retval */ void snmp_trap_tread(void *arg) { 8037694: b537 push {r0, r1, r2, r4, r5, lr} uint8_t trapName; while(1) { if (xQueueReceive(SNMP_TrapQueue, &trapName, 0) == pdTRUE) 8037696: 4d1c ldr r5, [pc, #112] ; (8037708 ) { SNMP_SetManagerIP(sSettings.sSnmp.managerIP); SNMP_SendVarbindTrap(&traps[trapName]); 8037698: 4c1c ldr r4, [pc, #112] ; (803770c ) { uint8_t trapName; while(1) { if (xQueueReceive(SNMP_TrapQueue, &trapName, 0) == pdTRUE) 803769a: 2200 movs r2, #0 803769c: 6828 ldr r0, [r5, #0] 803769e: f10d 0107 add.w r1, sp, #7 80376a2: 4613 mov r3, r2 80376a4: f7f3 fabb bl 802ac1e 80376a8: 2801 cmp r0, #1 80376aa: d1f6 bne.n 803769a { SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 80376ac: 4818 ldr r0, [pc, #96] ; (8037710 ) 80376ae: f7ff ffe3 bl 8037678 SNMP_SendVarbindTrap(&traps[trapName]); 80376b2: f89d 0007 ldrb.w r0, [sp, #7] 80376b6: eb04 00c0 add.w r0, r4, r0, lsl #3 80376ba: f000 fa41 bl 8037b40 SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); 80376be: 4815 ldr r0, [pc, #84] ; (8037714 ) 80376c0: f7ff ffda bl 8037678 SNMP_SendVarbindTrap(&traps[trapName]); 80376c4: f89d 0007 ldrb.w r0, [sp, #7] 80376c8: eb04 00c0 add.w r0, r4, r0, lsl #3 80376cc: f000 fa38 bl 8037b40 SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); 80376d0: 4811 ldr r0, [pc, #68] ; (8037718 ) 80376d2: f7ff ffd1 bl 8037678 SNMP_SendVarbindTrap(&traps[trapName]); 80376d6: f89d 0007 ldrb.w r0, [sp, #7] 80376da: eb04 00c0 add.w r0, r4, r0, lsl #3 80376de: f000 fa2f bl 8037b40 SNMP_SetManagerIP(sSettings.sSnmp.managerIP4); 80376e2: 480e ldr r0, [pc, #56] ; (803771c ) 80376e4: f7ff ffc8 bl 8037678 SNMP_SendVarbindTrap(&traps[trapName]); 80376e8: f89d 0007 ldrb.w r0, [sp, #7] 80376ec: eb04 00c0 add.w r0, r4, r0, lsl #3 80376f0: f000 fa26 bl 8037b40 SNMP_SetManagerIP(sSettings.sSnmp.managerIP5); 80376f4: 480a ldr r0, [pc, #40] ; (8037720 ) 80376f6: f7ff ffbf bl 8037678 SNMP_SendVarbindTrap(&traps[trapName]); 80376fa: f89d 0007 ldrb.w r0, [sp, #7] 80376fe: eb04 00c0 add.w r0, r4, r0, lsl #3 8037702: f000 fa1d bl 8037b40 8037706: e7c8 b.n 803769a 8037708: 2000faa8 .word 0x2000faa8 803770c: 2000faac .word 0x2000faac 8037710: 2000ce4d .word 0x2000ce4d 8037714: 2000ce61 .word 0x2000ce61 8037718: 2000ce75 .word 0x2000ce75 803771c: 2000ce89 .word 0x2000ce89 8037720: 2000ce9d .word 0x2000ce9d 08037724 : */ 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); 8037724: 4801 ldr r0, [pc, #4] ; (803772c ) 8037726: f7fc b9d9 b.w 8033adc 803772a: bf00 nop 803772c: 20000a30 .word 0x20000a30 08037730 : /** * @brief Вкл/выкл трапы * @retval */ void SNMP_SetTrapOnOff(uint8_t state) { 8037730: 4601 mov r1, r0 snmp_trap_dst_enable(0, (u8_t)state); 8037732: 2000 movs r0, #0 8037734: f7fe bb4a b.w 8035dcc 08037738 : /** * @brief Ð˜Ð½Ð¸Ñ†Ð¸Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ SNMP агента * @retval */ void SNMP_AgentInit(void) { 8037738: b510 push {r4, lr} SNMP_SetObjDescr(); SNMP_SetReadCommunity(sSettings.sSnmp.readCommunity); 803773a: 4c16 ldr r4, [pc, #88] ; (8037794 ) * @brief Ð˜Ð½Ð¸Ñ†Ð¸Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ SNMP агента * @retval */ void SNMP_AgentInit(void) { SNMP_SetObjDescr(); 803773c: f7ff ff28 bl 8037590 SNMP_SetReadCommunity(sSettings.sSnmp.readCommunity); 8037740: 4620 mov r0, r4 8037742: f7ff ff63 bl 803760c SNMP_SetWriteCommunity(sSettings.sSnmp.writeCommunity); 8037746: f104 0014 add.w r0, r4, #20 803774a: f7ff ff65 bl 8037618 SNMP_SetSysContact(sSettings.sSnmp.sysContact); 803774e: f104 0028 add.w r0, r4, #40 ; 0x28 8037752: f7ff ff67 bl 8037624 SNMP_SetSysName(sSettings.sSnmp.sysName); 8037756: f104 005a add.w r0, r4, #90 ; 0x5a 803775a: f7ff ff71 bl 8037640 SNMP_SetSysLocation(sSettings.sSnmp.sysLocation); 803775e: f104 006e add.w r0, r4, #110 ; 0x6e 8037762: f7ff ff7b bl 803765c SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 8037766: f104 00dc add.w r0, r4, #220 ; 0xdc 803776a: f7ff ff85 bl 8037678 SNMP_SetObjID(); 803776e: f7ff ffd9 bl 8037724 SNMP_SetTrapOnOff(1); 8037772: 2001 movs r0, #1 8037774: f7ff ffdc bl 8037730 SNMP_InitTrapsBase(); 8037778: f000 f926 bl 80379c8 snmp_init(); 803777c: f7fd fa04 bl 8034b88 udp_init(); 8037780: f7fa fa44 bl 8031c0c SNMP_TrapQueue = xQueueCreate(SNMP_TRAP_QUEUE_SIZE, sizeof(uint8_t)); 8037784: 2064 movs r0, #100 ; 0x64 8037786: 2101 movs r1, #1 8037788: 2200 movs r2, #0 803778a: f7f3 f8cb bl 802a924 803778e: 4b02 ldr r3, [pc, #8] ; (8037798 ) 8037790: 6018 str r0, [r3, #0] 8037792: bd10 pop {r4, pc} 8037794: 2000cd71 .word 0x2000cd71 8037798: 2000faa8 .word 0x2000faa8 0803779c : * @retval */ void SNMP_Init(void) { //SETTINGS_SetSnmpDef(); SNMP_AgentInit(); 803779c: f7ff bfcc b.w 8037738 080377a0 : SNTP_Enable(sSettings.sSNTP.sntpEnable); } static void recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, struct ip_addr *addr, u16_t port) { 80377a0: b570 push {r4, r5, r6, lr} 80377a2: 4616 mov r6, r2 time_t t; int utcSec = 0; TM_RTC_t data; if (p->len == sizeof(struct sntp_packet)) 80377a4: 8952 ldrh r2, [r2, #10] 80377a6: 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) { 80377a8: b094 sub sp, #80 ; 0x50 time_t t; int utcSec = 0; TM_RTC_t data; if (p->len == sizeof(struct sntp_packet)) 80377aa: d149 bne.n 8037840 { int i; struct sntp_packet aligned; //myassert(p->len == p->tot_len); /* don't accept chained pbuf */ memcpy(&aligned, p->payload, sizeof(aligned)); 80377ac: a808 add r0, sp, #32 80377ae: 6871 ldr r1, [r6, #4] 80377b0: f7ea fa3c bl 8021c2c i = (aligned.status >> 3) & 7; 80377b4: f89d 3020 ldrb.w r3, [sp, #32] if ((i < 1) || (i > 4)) /* SNTP version 1..4 */ 80377b8: f3c3 02c2 ubfx r2, r3, #3, #3 80377bc: 3a01 subs r2, #1 80377be: 2a03 cmp r2, #3 80377c0: d83e bhi.n 8037840 goto out; i = aligned.status & 7; if ((i != 4) && (i != 5)) /* mode 4 or 5: server or broadcast */ 80377c2: f003 0307 and.w r3, r3, #7 80377c6: 3b04 subs r3, #4 80377c8: 2b01 cmp r3, #1 80377ca: d839 bhi.n 8037840 goto out; if (aligned.xmt == 0) 80377cc: e9dd 4512 ldrd r4, r5, [sp, #72] ; 0x48 80377d0: ea54 0305 orrs.w r3, r4, r5 80377d4: d034 beq.n 8037840 goto out; utcSec = (int)(3600.0*sSettings.sSNTP.timeZone); 80377d6: 4b20 ldr r3, [pc, #128] ; (8037858 ) 80377d8: f8d3 0370 ldr.w r0, [r3, #880] ; 0x370 80377dc: f7e8 fe9c bl 8020518 <__aeabi_f2d> 80377e0: a31b add r3, pc, #108 ; (adr r3, 8037850 ) 80377e2: e9d3 2300 ldrd r2, r3, [r3] 80377e6: f7e8 feeb bl 80205c0 <__aeabi_dmul> 80377ea: f7e9 f983 bl 8020af4 <__aeabi_d2iz> 80377ee: 4605 mov r5, r0 t = (ntohl(aligned.xmt) - 2208988800 + utcSec ); 80377f0: 4620 mov r0, r4 80377f2: f7f6 fd4f bl 802e294 80377f6: 4b19 ldr r3, [pc, #100] ; (803785c ) 80377f8: 18eb adds r3, r5, r3 TM_RTC_SetDataTimeUnix((uint32_t)t); 80377fa: 1818 adds r0, r3, r0 80377fc: f7ef f904 bl 8026a08 /* Сохраним Ð²Ñ€ÐµÐ¼Ñ Ð¿Ð¾Ñледней Ñинхронизации */ TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8037800: a804 add r0, sp, #16 8037802: 2100 movs r1, #0 8037804: f7ee ffe2 bl 80267cc memset(sSettings.sSNTP.data, 0, sizeof(sSettings.sSNTP.data)); 8037808: 2100 movs r1, #0 803780a: 221e movs r2, #30 803780c: 4814 ldr r0, [pc, #80] ; (8037860 ) 803780e: f7ea fac7 bl 8021da0 sprintf(sSettings.sSNTP.data, "%02d.%02d.%02d %02d:%02d:%02d", 8037812: f89d 1019 ldrb.w r1, [sp, #25] 8037816: f89d 2017 ldrb.w r2, [sp, #23] 803781a: 9100 str r1, [sp, #0] 803781c: f89d 1015 ldrb.w r1, [sp, #21] 8037820: f89d 3018 ldrb.w r3, [sp, #24] 8037824: 9101 str r1, [sp, #4] 8037826: f89d 1014 ldrb.w r1, [sp, #20] 803782a: 480d ldr r0, [pc, #52] ; (8037860 ) 803782c: 9102 str r1, [sp, #8] 803782e: f89d 1010 ldrb.w r1, [sp, #16] 8037832: 9103 str r1, [sp, #12] 8037834: 490b ldr r1, [pc, #44] ; (8037864 ) 8037836: f7f0 f973 bl 8027b20 data.date, data.month, data.year, data.hours, data.minutes, data.seconds); timeout = VALID_TIMEOUT; 803783a: 4a0b ldr r2, [pc, #44] ; (8037868 ) 803783c: 4b0b ldr r3, [pc, #44] ; (803786c ) 803783e: 601a str r2, [r3, #0] } out: pbuf_free(p); 8037840: 4630 mov r0, r6 8037842: f7f7 fe59 bl 802f4f8 } 8037846: b014 add sp, #80 ; 0x50 8037848: bd70 pop {r4, r5, r6, pc} 803784a: bf00 nop 803784c: f3af 8000 nop.w 8037850: 00000000 .word 0x00000000 8037854: 40ac2000 .word 0x40ac2000 8037858: 2000cba0 .word 0x2000cba0 803785c: 7c558180 .word 0x7c558180 8037860: 2000cef1 .word 0x2000cef1 8037864: 08044ac0 .word 0x08044ac0 8037868: 01b77400 .word 0x01b77400 803786c: 2000c800 .word 0x2000c800 08037870 : void SNTP_Enable(bool enable) { 8037870: b538 push {r3, r4, r5, lr} if (enable) 8037872: 4605 mov r5, r0 8037874: 4c0f ldr r4, [pc, #60] ; (80378b4 ) 8037876: b1b8 cbz r0, 80378a8 { if (upcb == 0) 8037878: 6825 ldr r5, [r4, #0] 803787a: b9d5 cbnz r5, 80378b2 { err_t ret; upcb = udp_new(); 803787c: f7fa fba4 bl 8031fc8 8037880: 6020 str r0, [r4, #0] if (upcb != 0) 8037882: b1b0 cbz r0, 80378b2 { ret = udp_bind(upcb, IP_ADDR_ANY, port); 8037884: 227b movs r2, #123 ; 0x7b 8037886: 490c ldr r1, [pc, #48] ; (80378b8 ) 8037888: f7fa fa86 bl 8031d98 if (ret != ERR_OK) 803788c: 4602 mov r2, r0 { udp_remove(upcb); 803788e: 6820 ldr r0, [r4, #0] upcb = udp_new(); if (upcb != 0) { ret = udp_bind(upcb, IP_ADDR_ANY, port); if (ret != ERR_OK) 8037890: b11a cbz r2, 803789a { udp_remove(upcb); 8037892: f7fa fb7d bl 8031f90 upcb = 0; 8037896: 6025 str r5, [r4, #0] 8037898: e002 b.n 80378a0 } else { udp_recv(upcb, recv, 0); 803789a: 4908 ldr r1, [pc, #32] ; (80378bc ) 803789c: f7fa fb74 bl 8031f88 } timeout = 0; 80378a0: 4b07 ldr r3, [pc, #28] ; (80378c0 ) 80378a2: 2200 movs r2, #0 80378a4: 601a str r2, [r3, #0] 80378a6: bd38 pop {r3, r4, r5, pc} } } } else if (upcb != 0) 80378a8: 6820 ldr r0, [r4, #0] 80378aa: b110 cbz r0, 80378b2 { udp_remove(upcb); 80378ac: f7fa fb70 bl 8031f90 upcb = 0; 80378b0: 6025 str r5, [r4, #0] 80378b2: bd38 pop {r3, r4, r5, pc} 80378b4: 2000c7fc .word 0x2000c7fc 80378b8: 08043fe4 .word 0x08043fe4 80378bc: 080377a1 .word 0x080377a1 80378c0: 2000c800 .word 0x2000c800 080378c4 : { return upcb != 0; } void SNTP_SetServerAddr(char *addr) { 80378c4: b508 push {r3, lr} server.addr = ipaddr_addr(addr); 80378c6: f7fa fd48 bl 803235a 80378ca: 4b01 ldr r3, [pc, #4] ; (80378d0 ) 80378cc: 6018 str r0, [r3, #0] 80378ce: bd08 pop {r3, pc} 80378d0: 2000c7f8 .word 0x2000c7f8 080378d4 : /** * @brief Ð˜Ð½Ð¸Ñ†Ð¸Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ SNTP. * @retval */ void SNTP_Init(void) { 80378d4: b508 push {r3, lr} SNTP_SetServerAddr(sSettings.sSNTP.ip); 80378d6: 4805 ldr r0, [pc, #20] ; (80378ec ) 80378d8: f7ff fff4 bl 80378c4 SNTP_Enable(sSettings.sSNTP.sntpEnable); 80378dc: 4b04 ldr r3, [pc, #16] ; (80378f0 ) 80378de: f893 0340 ldrb.w r0, [r3, #832] ; 0x340 } 80378e2: e8bd 4008 ldmia.w sp!, {r3, lr} void SNTP_Init(void) { SNTP_SetServerAddr(sSettings.sSNTP.ip); SNTP_Enable(sSettings.sSNTP.sntpEnable); 80378e6: f7ff bfc3 b.w 8037870 80378ea: bf00 nop 80378ec: 2000cee1 .word 0x2000cee1 80378f0: 2000cba0 .word 0x2000cba0 080378f4 : pbuf_free(psend); } } void SNTP_Poll(void) { 80378f4: b530 push {r4, r5, lr} if (upcb) 80378f6: 4d15 ldr r5, [pc, #84] ; (803794c ) 80378f8: 682b ldr r3, [r5, #0] pbuf_free(psend); } } void SNTP_Poll(void) { 80378fa: b08d sub sp, #52 ; 0x34 if (upcb) 80378fc: b31b cbz r3, 8037946 static void send_request(void) { struct sntp_packet packet; struct pbuf* psend; memset(&packet, 0, sizeof(packet)); 80378fe: 2100 movs r1, #0 8037900: 2230 movs r2, #48 ; 0x30 8037902: 4668 mov r0, sp 8037904: f7ea fa4c bl 8021da0 packet.status = (3 << 3) /* SNTP vesion 3 */ | (3 << 0); /* Mode: client */ 8037908: 231b movs r3, #27 psend = pbuf_alloc(PBUF_RAW, sizeof(packet), PBUF_REF); 803790a: 2003 movs r0, #3 803790c: 2130 movs r1, #48 ; 0x30 803790e: 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 */ 8037910: f88d 3000 strb.w r3, [sp] psend = pbuf_alloc(PBUF_RAW, sizeof(packet), PBUF_REF); 8037914: f7f7 fe3d bl 802f592 if (psend != 0) 8037918: 4604 mov r4, r0 803791a: b1a0 cbz r0, 8037946 { psend->payload = &packet; 803791c: ab00 add r3, sp, #0 803791e: 6043 str r3, [r0, #4] timeout = (udp_sendto(upcb, psend, &server, port) == ERR_OK) ? SENT_TIMEOUT : SENDFAIL_TIMEOUT; 8037920: 4621 mov r1, r4 8037922: 4a0b ldr r2, [pc, #44] ; (8037950 ) 8037924: 6828 ldr r0, [r5, #0] 8037926: 237b movs r3, #123 ; 0x7b 8037928: f7fa fae7 bl 8031efa 803792c: f64e 2360 movw r3, #60000 ; 0xea60 8037930: f241 3288 movw r2, #5000 ; 0x1388 8037934: 4907 ldr r1, [pc, #28] ; (8037954 ) 8037936: 2800 cmp r0, #0 8037938: bf14 ite ne 803793a: 4610 movne r0, r2 803793c: 4618 moveq r0, r3 803793e: 6008 str r0, [r1, #0] pbuf_free(psend); 8037940: 4620 mov r0, r4 8037942: f7f7 fdd9 bl 802f4f8 void SNTP_Poll(void) { if (upcb) send_request(); } 8037946: b00d add sp, #52 ; 0x34 8037948: bd30 pop {r4, r5, pc} 803794a: bf00 nop 803794c: 2000c7fc .word 0x2000c7fc 8037950: 2000c7f8 .word 0x2000c7f8 8037954: 2000c800 .word 0x2000c800 08037958 : * @brief ПериодичеÑÐºÐ°Ñ ÑÐ¸Ð½Ñ…Ñ€Ð¾Ð½Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð²Ñ€ÐµÐ¼ÐµÐ½Ð¸. * ВыполнÑетÑÑ Ñ€Ð°Ð· в Ñутки Ñ 0 чаÑов. * @retval */ void vTaskPeriodicSynchro(void *arg) { 8037958: b530 push {r4, r5, lr} static uint8_t fSinhro = 0; for (;;) { vTaskDelay(10000); if (sSettings.sSNTP.sntpEnable) 803795a: 4d0f ldr r5, [pc, #60] ; (8037998 ) fSinhro = 1; //printf("Periodic time sinhro\n\r"); } if (data.hours > 1) fSinhro = 0; 803795c: 4c0f ldr r4, [pc, #60] ; (803799c ) * @brief ПериодичеÑÐºÐ°Ñ ÑÐ¸Ð½Ñ…Ñ€Ð¾Ð½Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð²Ñ€ÐµÐ¼ÐµÐ½Ð¸. * ВыполнÑетÑÑ Ñ€Ð°Ð· в Ñутки Ñ 0 чаÑов. * @retval */ void vTaskPeriodicSynchro(void *arg) { 803795e: b085 sub sp, #20 static uint8_t fSinhro = 0; for (;;) { vTaskDelay(10000); 8037960: f242 7010 movw r0, #10000 ; 0x2710 8037964: f7f3 fcfe bl 802b364 if (sSettings.sSNTP.sntpEnable) 8037968: f895 3340 ldrb.w r3, [r5, #832] ; 0x340 803796c: 2b00 cmp r3, #0 803796e: d0f7 beq.n 8037960 { TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8037970: 4668 mov r0, sp 8037972: 2100 movs r1, #0 8037974: f7ee ff2a bl 80267cc /* ЕÑли пришло Ð²Ñ€ÐµÐ¼Ñ Ñинхронизации */ if ((data.hours == 0) && (fSinhro == 0)) 8037978: f89d 3005 ldrb.w r3, [sp, #5] 803797c: b92b cbnz r3, 803798a 803797e: 7823 ldrb r3, [r4, #0] 8037980: b91b cbnz r3, 803798a { SNTP_Poll(); 8037982: f7ff ffb7 bl 80378f4 fSinhro = 1; 8037986: 2301 movs r3, #1 8037988: 7023 strb r3, [r4, #0] //printf("Periodic time sinhro\n\r"); } if (data.hours > 1) 803798a: f89d 3005 ldrb.w r3, [sp, #5] 803798e: 2b01 cmp r3, #1 8037990: d9e6 bls.n 8037960 fSinhro = 0; 8037992: 2300 movs r3, #0 8037994: 7023 strb r3, [r4, #0] 8037996: e7e3 b.n 8037960 8037998: 2000cba0 .word 0x2000cba0 803799c: 2000c7f5 .word 0x2000c7f5 080379a0 : /** * @brief Ð¡Ð¸Ð½Ñ…Ñ€Ð¾Ð½Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð²Ñ€ÐµÐ¼ÐµÐ½Ð¸ единоразово при включении контроллера * @retval */ void vTaskOnceSynchro(void *arg) { 80379a0: b538 push {r3, r4, r5, lr} for (;;) { if (sSettings.sSNTP.sntpEnable) 80379a2: 4d07 ldr r5, [pc, #28] ; (80379c0 ) 80379a4: 4c07 ldr r4, [pc, #28] ; (80379c4 ) 80379a6: f895 3340 ldrb.w r3, [r5, #832] ; 0x340 80379aa: b12b cbz r3, 80379b8 { vTaskDelay(7000); 80379ac: f641 3058 movw r0, #7000 ; 0x1b58 80379b0: f7f3 fcd8 bl 802b364 SNTP_Poll(); 80379b4: f7ff ff9e bl 80378f4 //printf("Once time sinhro\n\r"); vTaskDelete(xHandleSntpOnceSinhro); } else vTaskDelete(xHandleSntpOnceSinhro); 80379b8: 6820 ldr r0, [r4, #0] 80379ba: f7f3 fb11 bl 802afe0 80379be: e7f2 b.n 80379a6 80379c0: 2000cba0 .word 0x2000cba0 80379c4: 20000b0c .word 0x20000b0c 080379c8 : * @retval */ void SNMP_InitTrapsBase(void) { /* 1. FWVersionUpdate */ // + traps[FW_VERSION_UPDATE].trapId = FW_VERSION_UPDATE; 80379c8: 4b53 ldr r3, [pc, #332] ; (8037b18 ) traps[FW_VERSION_UPDATE].varbindId = 1; traps[FW_VERSION_UPDATE].trapEnable = true; traps[FW_VERSION_UPDATE].handle = GetVersionStr; /* FWVersion */ 80379ca: 4954 ldr r1, [pc, #336] ; (8037b1c ) /* 2. FWVersionUpdated */ // + traps[FW_VERSION_UPDATED].trapId = FW_VERSION_UPDATED; 80379cc: 2002 movs r0, #2 /** * @brief Ð˜Ð½Ð¸Ñ†Ð¸Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð±Ð°Ð·Ñ‹ трапов * @retval */ void SNMP_InitTrapsBase(void) { 80379ce: 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; 80379d0: 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; 80379d2: 2003 movs r0, #3 80379d4: 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; 80379d6: 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; 80379d8: 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; 80379da: 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; 80379de: 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 */ 80379e0: 4d4f ldr r5, [pc, #316] ; (8037b20 ) 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; 80379e2: 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; 80379e6: 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; 80379ea: 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; 80379ee: 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 */ 80379f2: 4c4c ldr r4, [pc, #304] ; (8037b24 ) /* 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 */ 80379f4: 484c ldr r0, [pc, #304] ; (8037b28 ) { /* 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 */ 80379f6: 60d9 str r1, [r3, #12] * @retval */ void SNMP_InitTrapsBase(void) { /* 1. FWVersionUpdate */ // + traps[FW_VERSION_UPDATE].trapId = FW_VERSION_UPDATE; 80379f8: 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 */ 80379fa: 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 */ 80379fc: 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 */ 80379fe: 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 */ 8037a00: 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; 8037a02: 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 */ 8037a04: 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 */ 8037a06: 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; 8037a08: 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; 8037a0a: 2408 movs r4, #8 traps[DO1_TOGGLED].varbindId = 6; traps[DO1_TOGGLED].trapEnable = true; traps[DO1_TOGGLED].handle = GetDOUT1StatusStr; /* State DO1 */ 8037a0c: 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 */ 8037a0e: 4847 ldr r0, [pc, #284] ; (8037b2c ) 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; 8037a10: 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; 8037a14: 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; 8037a18: 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; 8037a1c: f883 4041 strb.w r4, [r3, #65] ; 0x41 * @retval */ void SNMP_InitTrapsBase(void) { /* 1. FWVersionUpdate */ // + traps[FW_VERSION_UPDATE].trapId = FW_VERSION_UPDATE; 8037a20: 725a strb r2, [r3, #9] traps[FW_VERSION_UPDATE].varbindId = 1; 8037a22: 729a strb r2, [r3, #10] traps[FW_VERSION_UPDATE].trapEnable = true; 8037a24: 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; 8037a26: 749a strb r2, [r3, #18] traps[FW_VERSION_UPDATED].trapEnable = true; 8037a28: 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; 8037a2a: 769a strb r2, [r3, #26] traps[DEVICE_RESTORED].trapEnable = true; 8037a2c: 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; 8037a2e: f883 2022 strb.w r2, [r3, #34] ; 0x22 traps[DEVICE_REBOOTED].trapEnable = true; 8037a32: 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; 8037a36: 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; 8037a3a: 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; 8037a3e: 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; 8037a42: 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; 8037a46: f883 1049 strb.w r1, [r3, #73] ; 0x49 traps[BATTERY_TEMPERATURE_NORM].varbindId = 10; 8037a4a: 210a movs r1, #10 8037a4c: f883 104a strb.w r1, [r3, #74] ; 0x4a traps[BATTERY_TEMPERATURE_NORM].trapEnable = true; traps[BATTERY_TEMPERATURE_NORM].handle = GetInternalTempStr; /* BatteryTemperature */ 8037a50: 64d8 str r0, [r3, #76] ; 0x4c /* 10. BatteryTemperatureAlarm */ // + traps[BATTERY_TEMPERATURE_ALARM].trapId = BATTERY_TEMPERATURE_ALARM; 8037a52: f883 1051 strb.w r1, [r3, #81] ; 0x51 traps[BATTERY_TEMPERATURE_ALARM].varbindId = 10; 8037a56: f883 1052 strb.w r1, [r3, #82] ; 0x52 traps[BATTERY_TEMPERATURE_ALARM].trapEnable = true; traps[BATTERY_TEMPERATURE_ALARM].handle = GetInternalTempStr; /* BatteryTemperature */ 8037a5a: 6558 str r0, [r3, #84] ; 0x54 /* 11. LineAlarm */ // + traps[LINE_ALARM].trapId = LINE_ALARM; 8037a5c: 210b movs r1, #11 traps[LINE_ALARM].varbindId = 12; traps[LINE_ALARM].trapEnable = true; traps[LINE_ALARM].handle = GetInputVoltageStr; /* LineAlarm */ 8037a5e: 4834 ldr r0, [pc, #208] ; (8037b30 ) 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; 8037a60: f883 1059 strb.w r1, [r3, #89] ; 0x59 traps[LINE_ALARM].varbindId = 12; 8037a64: 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; 8037a66: 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 */ 8037a68: 4d32 ldr r5, [pc, #200] ; (8037b34 ) 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; 8037a6a: f883 105a strb.w r1, [r3, #90] ; 0x5a traps[LINE_ALARM].trapEnable = true; traps[LINE_ALARM].handle = GetInputVoltageStr; /* LineAlarm */ 8037a6e: 65d8 str r0, [r3, #92] ; 0x5c /* 12. LineNorm */ // + traps[LINE_NORM].trapId = LINE_NORM; 8037a70: f883 1061 strb.w r1, [r3, #97] ; 0x61 traps[LINE_NORM].varbindId = 12; 8037a74: f883 1062 strb.w r1, [r3, #98] ; 0x62 traps[LINE_NORM].trapEnable = true; traps[LINE_NORM].handle = GetInputVoltageStr; /* LineNorm */ 8037a78: 6658 str r0, [r3, #100] ; 0x64 /* 13. LowBatAlarm */ // + traps[LOW_BAT_ALARM].trapId = LOW_BAT_ALARM; 8037a7a: 210d movs r1, #13 traps[LOW_BAT_ALARM].varbindId = 15; traps[LOW_BAT_ALARM].trapEnable = true; traps[LOW_BAT_ALARM].handle = GetBatCapacityStr; /* LowBatAlarm */ 8037a7c: 482e ldr r0, [pc, #184] ; (8037b38 ) 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; 8037a7e: 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; 8037a82: 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; 8037a86: 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; 8037a88: 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; 8037a8c: 2610 movs r6, #16 traps[POWER_NORM].varbindId = 14; 8037a8e: 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; 8037a92: 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 */ 8037a94: 67dd str r5, [r3, #124] ; 0x7c /* 16. PowerNorm */ // + traps[POWER_NORM].trapId = POWER_NORM; 8037a96: f883 6081 strb.w r6, [r3, #129] ; 0x81 traps[POWER_NORM].varbindId = 14; traps[POWER_NORM].trapEnable = true; traps[POWER_NORM].handle = GetPowerStr; /* PowerNorm */ 8037a9a: f8c3 5084 str.w r5, [r3, #132] ; 0x84 /* 17. ConnectMonitorAlarm */ // traps[CONNECT_MONITOR_ALARM].trapId = CONNECT_MONITOR_ALARM; 8037a9e: f883 4089 strb.w r4, [r3, #137] ; 0x89 traps[CONNECT_MONITOR_ALARM].varbindId = 17; 8037aa2: f883 408a strb.w r4, [r3, #138] ; 0x8a traps[CONNECT_MONITOR_ALARM].trapEnable = true; traps[CONNECT_MONITOR_ALARM].handle = GetConnectMonitorStr;//GetConnectMonitorStr; /* ConnectMonitor */ 8037aa6: 4d25 ldr r5, [pc, #148] ; (8037b3c ) 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; 8037aa8: 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; 8037aac: 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; 8037ab0: 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; 8037ab4: 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; 8037ab8: f883 106a strb.w r1, [r3, #106] ; 0x6a traps[LOW_BAT_ALARM].trapEnable = true; 8037abc: f883 206b strb.w r2, [r3, #107] ; 0x6b traps[LOW_BAT_ALARM].handle = GetBatCapacityStr; /* LowBatAlarm */ 8037ac0: 66d8 str r0, [r3, #108] ; 0x6c /* 14. LowBatNorm */ // + traps[LOW_BAT_NORM].trapId = LOW_BAT_NORM; traps[LOW_BAT_NORM].varbindId = 15; 8037ac2: f883 1072 strb.w r1, [r3, #114] ; 0x72 traps[LOW_BAT_NORM].trapEnable = true; 8037ac6: f883 2073 strb.w r2, [r3, #115] ; 0x73 traps[LOW_BAT_NORM].handle = GetBatCapacityStr; /* LowBatNorm */ 8037aca: 6758 str r0, [r3, #116] ; 0x74 /* 15. PowerAlarm */ // + traps[POWER_ALARM].trapId = POWER_ALARM; 8037acc: f883 1079 strb.w r1, [r3, #121] ; 0x79 traps[POWER_ALARM].varbindId = 14; traps[POWER_ALARM].trapEnable = true; 8037ad0: 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; 8037ad4: 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; 8037ad8: 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; 8037adc: 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; 8037ae0: 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; 8037ae2: 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; 8037ae4: 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; 8037ae8: 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 */ 8037aea: f8c3 508c str.w r5, [r3, #140] ; 0x8c /* 18. ConnectMonitorNorm */ // traps[CONNECT_MONITOR_NORM].trapId = CONNECT_MONITOR_NORM; 8037aee: f883 6091 strb.w r6, [r3, #145] ; 0x91 traps[CONNECT_MONITOR_NORM].varbindId = 17; traps[CONNECT_MONITOR_NORM].trapEnable = true; 8037af2: f883 2093 strb.w r2, [r3, #147] ; 0x93 traps[CONNECT_MONITOR_NORM].handle = GetConnectMonitorStr;//GetConnectMonitorStr; /* ConnectMonitor */ 8037af6: f8c3 5094 str.w r5, [r3, #148] ; 0x94 /* 19. BatteryConnectAlarm */ // + traps[BATTERY_CONNECT_ALARM].trapId = BATTERY_CONNECT_ALARM; traps[BATTERY_CONNECT_ALARM].varbindId = 15; 8037afa: f883 109a strb.w r1, [r3, #154] ; 0x9a traps[BATTERY_CONNECT_ALARM].trapEnable = true; 8037afe: f883 209b strb.w r2, [r3, #155] ; 0x9b traps[BATTERY_CONNECT_ALARM].handle = GetBatCapacityStr; /* LowBatAlarm */ 8037b02: f8c3 009c str.w r0, [r3, #156] ; 0x9c /* 20. BatteryConnectNorm */ // + traps[BATTERY_CONNECT_NORM].trapId = BATTERY_CONNECT_NORM; 8037b06: f883 40a1 strb.w r4, [r3, #161] ; 0xa1 traps[BATTERY_CONNECT_NORM].varbindId = 15; 8037b0a: f883 10a2 strb.w r1, [r3, #162] ; 0xa2 traps[BATTERY_CONNECT_NORM].trapEnable = true; 8037b0e: f883 20a3 strb.w r2, [r3, #163] ; 0xa3 traps[BATTERY_CONNECT_NORM].handle = GetBatCapacityStr; /* LowBatNorm */ 8037b12: f8c3 00a4 str.w r0, [r3, #164] ; 0xa4 8037b16: bd70 pop {r4, r5, r6, pc} 8037b18: 2000faac .word 0x2000faac 8037b1c: 08027fd5 .word 0x08027fd5 8037b20: 08027e85 .word 0x08027e85 8037b24: 08027ef9 .word 0x08027ef9 8037b28: 08027f1d .word 0x08027f1d 8037b2c: 08027c55 .word 0x08027c55 8037b30: 08027b91 .word 0x08027b91 8037b34: 08027be9 .word 0x08027be9 8037b38: 08027c0d .word 0x08027c0d 8037b3c: 08027ca5 .word 0x08027ca5 08037b40 : /** * @brief Отправка трапа Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð¾Ð¹, зарегиÑтрированного в базе. * @retval */ bool SNMP_SendVarbindTrap(TRAP_t *trap) { 8037b40: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} char msg[255]; uint8_t len = 0; 8037b44: 2500 movs r5, #0 /** * @brief Отправка трапа Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð¾Ð¹, зарегиÑтрированного в базе. * @retval */ bool SNMP_SendVarbindTrap(TRAP_t *trap) { 8037b46: f5ad 7d07 sub.w sp, sp, #540 ; 0x21c 8037b4a: 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}}; 8037b4c: 4629 mov r1, r5 8037b4e: 2284 movs r2, #132 ; 0x84 8037b50: a804 add r0, sp, #16 * @retval */ bool SNMP_SendVarbindTrap(TRAP_t *trap) { char msg[255]; uint8_t len = 0; 8037b52: 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}}; 8037b56: f7ea f923 bl 8021da0 8037b5a: 2202 movs r2, #2 8037b5c: 2401 movs r4, #1 8037b5e: 2603 movs r6, #3 8037b60: 230b movs r3, #11 8037b62: f04f 0804 mov.w r8, #4 8037b66: 2706 movs r7, #6 8037b68: f24a 3b18 movw fp, #41752 ; 0xa318 8037b6c: f240 3a8f movw sl, #911 ; 0x38f 8037b70: 920e str r2, [sp, #56] ; 0x38 struct snmp_obj_id varObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 1, 1}}; 8037b72: 4629 mov r1, r5 8037b74: 2284 movs r2, #132 ; 0x84 8037b76: 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}}; 8037b78: f88d 3010 strb.w r3, [sp, #16] 8037b7c: 9606 str r6, [sp, #24] 8037b7e: 960d str r6, [sp, #52] ; 0x34 struct snmp_obj_id varObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 1, 1}}; 8037b80: 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}}; 8037b82: 9405 str r4, [sp, #20] 8037b84: 9707 str r7, [sp, #28] 8037b86: 9408 str r4, [sp, #32] 8037b88: f8cd 8024 str.w r8, [sp, #36] ; 0x24 8037b8c: 940a str r4, [sp, #40] ; 0x28 8037b8e: f8cd b02c str.w fp, [sp, #44] ; 0x2c 8037b92: 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}}; 8037b96: f7ea f903 bl 8021da0 8037b9a: 9b01 ldr r3, [sp, #4] 8037b9c: 9627 str r6, [sp, #156] ; 0x9c 8037b9e: f88d 3094 strb.w r3, [sp, #148] ; 0x94 trapObjId.id[trapObjId.len - 1] = trap->trapId; 8037ba2: 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}}; 8037ba6: 962e str r6, [sp, #184] ; 0xb8 trapObjId.id[trapObjId.len - 1] = trap->trapId; 8037ba8: 930f str r3, [sp, #60] ; 0x3c varObjId.id[varObjId.len - 1] = trap->varbindId; 8037baa: 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}}; 8037bae: 9426 str r4, [sp, #152] ; 0x98 trapObjId.id[trapObjId.len - 1] = trap->trapId; varObjId.id[varObjId.len - 1] = trap->varbindId; 8037bb0: 9330 str r3, [sp, #192] ; 0xc0 trap->handle(msg, &len); 8037bb2: a846 add r0, sp, #280 ; 0x118 8037bb4: 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}}; 8037bb8: 9728 str r7, [sp, #160] ; 0xa0 trapObjId.id[trapObjId.len - 1] = trap->trapId; varObjId.id[varObjId.len - 1] = trap->varbindId; trap->handle(msg, &len); 8037bba: 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}}; 8037bbe: 9429 str r4, [sp, #164] ; 0xa4 8037bc0: f8cd 80a8 str.w r8, [sp, #168] ; 0xa8 8037bc4: 942b str r4, [sp, #172] ; 0xac 8037bc6: f8cd b0b0 str.w fp, [sp, #176] ; 0xb0 8037bca: f8cd a0b4 str.w sl, [sp, #180] ; 0xb4 8037bce: 942f str r4, [sp, #188] ; 0xbc trapObjId.id[trapObjId.len - 1] = trap->trapId; varObjId.id[varObjId.len - 1] = trap->varbindId; trap->handle(msg, &len); 8037bd0: 4798 blx r3 vb = snmp_varbind_alloc(&varObjId, SNMP_ASN1_OC_STR, len); 8037bd2: a825 add r0, sp, #148 ; 0x94 8037bd4: 4641 mov r1, r8 8037bd6: f89d 200f ldrb.w r2, [sp, #15] 8037bda: f7fc fff9 bl 8034bd0 if(vb != NULL ) { 8037bde: 4606 mov r6, r0 8037be0: b198 cbz r0, 8037c0a memcpy(vb->value, msg, len); 8037be2: f89d 200f ldrb.w r2, [sp, #15] 8037be6: 6940 ldr r0, [r0, #20] 8037be8: a946 add r1, sp, #280 ; 0x118 8037bea: f7ea f81f bl 8021c2c snmp_varbind_tail_add(&trap_msg.outvb, vb); 8037bee: 4809 ldr r0, [pc, #36] ; (8037c14 ) 8037bf0: 4631 mov r1, r6 8037bf2: f7fd f899 bl 8034d28 snmp_send_trap(SNMP_GENTRAP_ENTERPRISESPC, &trapObjId, 0); 8037bf6: a904 add r1, sp, #16 8037bf8: 462a mov r2, r5 8037bfa: 4638 mov r0, r7 8037bfc: f7fe fa02 bl 8036004 snmp_varbind_list_free(&trap_msg.outvb); 8037c00: 4804 ldr r0, [pc, #16] ; (8037c14 ) 8037c02: f7fd f838 bl 8034c76 return true; 8037c06: 4620 mov r0, r4 8037c08: e7ff b.n 8037c0a } else { return false; } } 8037c0a: f50d 7d07 add.w sp, sp, #540 ; 0x21c 8037c0e: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8037c12: bf00 nop 8037c14: 2000f834 .word 0x2000f834 08037c18 : * @brief ETH_BSP_Config * @param None * @retval None */ void ETH_BSP_Config(void) { 8037c18: 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 8037c1a: 2007 movs r0, #7 * @brief ETH_BSP_Config * @param None * @retval None */ void ETH_BSP_Config(void) { 8037c1c: b0b4 sub sp, #208 ; 0xd0 { volatile uint32_t i; GPIO_InitTypeDef GPIO_InitStructure; /* Enable GPIOs clocks */ RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB 8037c1e: 2101 movs r1, #1 8037c20: f7ed fee4 bl 80259ec | RCC_AHB1Periph_GPIOC, ENABLE); /* Enable SYSCFG clock */ RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE); 8037c24: 2101 movs r1, #1 8037c26: f44f 4080 mov.w r0, #16384 ; 0x4000 8037c2a: f7ed ff03 bl 8025a34 /* MII/RMII Media interface selection --------------------------------------*/ SYSCFG_ETH_MediaInterfaceConfig(SYSCFG_ETH_MediaInterface_RMII); 8037c2e: 2001 movs r0, #1 8037c30: f7ee f8f4 bl 8025e1c ETH_RST_PIN -------> PE2 - замена на PE13 */ /* Configure PA1,PA2 and PA7 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_7; 8037c34: 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; 8037c36: 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; 8037c38: 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; 8037c3a: 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); 8037c3c: 4864 ldr r0, [pc, #400] ; (8037dd0 ) */ /* 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; 8037c3e: 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; 8037c42: 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); 8037c44: 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; 8037c46: f88d 3011 strb.w r3, [sp, #17] GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; 8037c4a: f88d 4012 strb.w r4, [sp, #18] GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ; 8037c4e: f88d 4013 strb.w r4, [sp, #19] GPIO_Init(GPIOA, &GPIO_InitStructure); 8037c52: f7ed fdeb bl 802582c GPIO_PinAFConfig(GPIOA, GPIO_PinSource1, GPIO_AF_ETH); 8037c56: 2101 movs r1, #1 8037c58: 220b movs r2, #11 8037c5a: 485d ldr r0, [pc, #372] ; (8037dd0 ) 8037c5c: f7ed fe2f bl 80258be GPIO_PinAFConfig(GPIOA, GPIO_PinSource2, GPIO_AF_ETH); 8037c60: 220b movs r2, #11 8037c62: 485b ldr r0, [pc, #364] ; (8037dd0 ) 8037c64: 4629 mov r1, r5 8037c66: f7ed fe2a bl 80258be GPIO_PinAFConfig(GPIOA, GPIO_PinSource7, GPIO_AF_ETH); 8037c6a: 220b movs r2, #11 8037c6c: 2107 movs r1, #7 8037c6e: 4858 ldr r0, [pc, #352] ; (8037dd0 ) 8037c70: f7ed fe25 bl 80258be /* Configure PB10,PB11,PB12 and PB13 */ GPIO_InitStructure.GPIO_Pin = /* GPIO_Pin_10 | */ GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_13; 8037c74: f44f 5360 mov.w r3, #14336 ; 0x3800 GPIO_Init(GPIOB, &GPIO_InitStructure); 8037c78: 4856 ldr r0, [pc, #344] ; (8037dd4 ) 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; 8037c7a: 9303 str r3, [sp, #12] GPIO_Init(GPIOB, &GPIO_InitStructure); 8037c7c: a903 add r1, sp, #12 8037c7e: f7ed fdd5 bl 802582c //GPIO_PinAFConfig(GPIOB, GPIO_PinSource10, GPIO_AF_ETH); GPIO_PinAFConfig(GPIOB, GPIO_PinSource11, GPIO_AF_ETH); 8037c82: 210b movs r1, #11 8037c84: 460a mov r2, r1 8037c86: 4853 ldr r0, [pc, #332] ; (8037dd4 ) 8037c88: f7ed fe19 bl 80258be GPIO_PinAFConfig(GPIOB, GPIO_PinSource12, GPIO_AF_ETH); 8037c8c: 210c movs r1, #12 8037c8e: 220b movs r2, #11 8037c90: 4850 ldr r0, [pc, #320] ; (8037dd4 ) 8037c92: f7ed fe14 bl 80258be GPIO_PinAFConfig(GPIOB, GPIO_PinSource13, GPIO_AF_ETH); 8037c96: 220b movs r2, #11 8037c98: 210d movs r1, #13 8037c9a: 484e ldr r0, [pc, #312] ; (8037dd4 ) 8037c9c: f7ed fe0f bl 80258be /* Configure PC1, PC4 and PC5 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_4 | GPIO_Pin_5; 8037ca0: 2332 movs r3, #50 ; 0x32 GPIO_Init(GPIOC, &GPIO_InitStructure); 8037ca2: 484d ldr r0, [pc, #308] ; (8037dd8 ) 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; 8037ca4: 9303 str r3, [sp, #12] GPIO_Init(GPIOC, &GPIO_InitStructure); 8037ca6: a903 add r1, sp, #12 8037ca8: f7ed fdc0 bl 802582c GPIO_PinAFConfig(GPIOC, GPIO_PinSource1, GPIO_AF_ETH); 8037cac: 484a ldr r0, [pc, #296] ; (8037dd8 ) 8037cae: 2101 movs r1, #1 8037cb0: 220b movs r2, #11 8037cb2: f7ed fe04 bl 80258be GPIO_PinAFConfig(GPIOC, GPIO_PinSource4, GPIO_AF_ETH); 8037cb6: 4848 ldr r0, [pc, #288] ; (8037dd8 ) 8037cb8: 2104 movs r1, #4 8037cba: 220b movs r2, #11 8037cbc: f7ed fdff bl 80258be GPIO_PinAFConfig(GPIOC, GPIO_PinSource5, GPIO_AF_ETH); 8037cc0: 220b movs r2, #11 8037cc2: 4845 ldr r0, [pc, #276] ; (8037dd8 ) 8037cc4: 2105 movs r1, #5 8037cc6: f7ed fdfa bl 80258be /* Configure the PHY RST pin */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13; 8037cca: f44f 5600 mov.w r6, #8192 ; 0x2000 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; 8037cce: 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); 8037cd0: 4842 ldr r0, [pc, #264] ; (8037ddc ) 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; 8037cd2: 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); 8037cd6: 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; 8037cd8: 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; 8037cdc: 9603 str r6, [sp, #12] GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; 8037cde: f88d 4012 strb.w r4, [sp, #18] GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; 8037ce2: f88d 5011 strb.w r5, [sp, #17] GPIO_Init(GPIOE, &GPIO_InitStructure); 8037ce6: f7ed fda1 bl 802582c GPIO_ResetBits(GPIOE, GPIO_Pin_13); 8037cea: 483c ldr r0, [pc, #240] ; (8037ddc ) 8037cec: 4631 mov r1, r6 8037cee: f7ed fde4 bl 80258ba for (i = 0; i < 20000; i++); 8037cf2: 9401 str r4, [sp, #4] 8037cf4: f644 631f movw r3, #19999 ; 0x4e1f 8037cf8: e002 b.n 8037d00 8037cfa: 9a01 ldr r2, [sp, #4] 8037cfc: 3201 adds r2, #1 8037cfe: 9201 str r2, [sp, #4] 8037d00: 9a01 ldr r2, [sp, #4] 8037d02: 429a cmp r2, r3 8037d04: d9f9 bls.n 8037cfa GPIO_SetBits(GPIOE, GPIO_Pin_13); 8037d06: 4835 ldr r0, [pc, #212] ; (8037ddc ) 8037d08: f44f 5100 mov.w r1, #8192 ; 0x2000 8037d0c: f7ed fdd3 bl 80258b6 for (i = 0; i < 20000; i++); 8037d10: 2300 movs r3, #0 8037d12: 9301 str r3, [sp, #4] 8037d14: f644 631f movw r3, #19999 ; 0x4e1f 8037d18: e002 b.n 8037d20 8037d1a: 9a01 ldr r2, [sp, #4] 8037d1c: 3201 adds r2, #1 8037d1e: 9201 str r2, [sp, #4] 8037d20: 9a01 ldr r2, [sp, #4] 8037d22: 429a cmp r2, r3 8037d24: d9f9 bls.n 8037d1a static void ETH_MACDMA_Config(void) { ETH_InitTypeDef ETH_InitStructure; /* Enable ETHERNET clock */ RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_ETH_MAC | RCC_AHB1Periph_ETH_MAC_Tx | 8037d26: f04f 6060 mov.w r0, #234881024 ; 0xe000000 8037d2a: 2101 movs r1, #1 8037d2c: f7ed fe5e bl 80259ec RCC_AHB1Periph_ETH_MAC_Rx, ENABLE); /* Reset ETHERNET on AHB Bus */ ETH_DeInit(); 8037d30: f000 f868 bl 8037e04 /* Software reset */ ETH_SoftwareReset(); 8037d34: f000 f9fe bl 8038134 /* Wait for software reset */ while (ETH_GetSoftwareResetStatus() == SET); 8037d38: f000 fa04 bl 8038144 8037d3c: 2801 cmp r0, #1 8037d3e: d0fb beq.n 8037d38 /* ETHERNET Configuration --------------------------------------------------*/ /* Call ETH_StructInit if you don't like to configure all ETH_InitStructure parameter */ ETH_StructInit(Ð_InitStructure); 8037d40: a805 add r0, sp, #20 8037d42: f000 f86c bl 8037e1e //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; 8037d46: f44f 7300 mov.w r3, #512 ; 0x200 8037d4a: 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; 8037d4c: f04f 7300 mov.w r3, #33554432 ; 0x2000000 8037d50: 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; 8037d52: 932e str r3, [sp, #184] ; 0xb8 ETH_InitStructure.ETH_FixedBurst = ETH_FixedBurst_Enable; 8037d54: f44f 3380 mov.w r3, #65536 ; 0x10000 8037d58: 932f str r3, [sp, #188] ; 0xbc ETH_InitStructure.ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; 8037d5a: 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; 8037d5e: 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; 8037d60: 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; 8037d64: 9330 str r3, [sp, #192] ; 0xc0 ETH_InitStructure.ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; 8037d66: 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; 8037d6a: 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; 8037d6c: 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; 8037d6e: 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; 8037d70: 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; 8037d72: f44f 4380 mov.w r3, #16384 ; 0x4000 /* Configure Ethernet */ EthInitStatus = ETH_Init(Ð_InitStructure, LAN8720_PHY_ADDRESS); 8037d76: 4629 mov r1, r5 8037d78: 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; 8037d7a: 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; 8037d7c: 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; 8037d7e: 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; 8037d80: 940c str r4, [sp, #48] ; 0x30 ETH_InitStructure.ETH_RetryTransmission = ETH_RetryTransmission_Disable; ETH_InitStructure.ETH_AutomaticPadCRCStrip = ETH_AutomaticPadCRCStrip_Disable; 8037d82: 9410 str r4, [sp, #64] ; 0x40 ETH_InitStructure.ETH_ReceiveAll = ETH_ReceiveAll_Disable; 8037d84: 9413 str r4, [sp, #76] ; 0x4c ETH_InitStructure.ETH_BroadcastFramesReception = ETH_BroadcastFramesReception_Enable; 8037d86: 9416 str r4, [sp, #88] ; 0x58 ETH_InitStructure.ETH_PromiscuousMode = ETH_PromiscuousMode_Disable; 8037d88: 9418 str r4, [sp, #96] ; 0x60 ETH_InitStructure.ETH_MulticastFramesFilter = ETH_MulticastFramesFilter_Perfect; 8037d8a: 9419 str r4, [sp, #100] ; 0x64 ETH_InitStructure.ETH_UnicastFramesFilter = ETH_UnicastFramesFilter_Perfect; 8037d8c: 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; 8037d8e: 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; 8037d90: 942a str r4, [sp, #168] ; 0xa8 ETH_InitStructure.ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; 8037d92: 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); 8037d94: f000 fa80 bl 8038298 8037d98: 4e11 ldr r6, [pc, #68] ; (8037de0 ) /* Enable the Ethernet Rx Interrupt */ ETH_DMAITConfig(ETH_DMA_IT_NIS | ETH_DMA_IT_R, ENABLE); 8037d9a: 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); 8037d9c: 6030 str r0, [r6, #0] /* Enable the Ethernet Rx Interrupt */ ETH_DMAITConfig(ETH_DMA_IT_NIS | ETH_DMA_IT_R, ENABLE); 8037d9e: 4811 ldr r0, [pc, #68] ; (8037de4 ) 8037da0: f000 f9e2 bl 8038168 void ETH_NVIC_Config(void) { NVIC_InitTypeDef NVIC_InitStructure; /* 2 bit for pre-emption priority, 2 bits for subpriority */ NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); 8037da4: f44f 7040 mov.w r0, #768 ; 0x300 8037da8: f7ed fbc0 bl 802552c /* Enable the Ethernet global Interrupt */ NVIC_InitStructure.NVIC_IRQChannel = ETH_IRQn; 8037dac: 233d movs r3, #61 ; 0x3d 8037dae: 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); 8037db2: 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; 8037db4: 2305 movs r3, #5 8037db6: f88d 3009 strb.w r3, [sp, #9] NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; 8037dba: f88d 400a strb.w r4, [sp, #10] NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; 8037dbe: f88d 500b strb.w r5, [sp, #11] NVIC_Init(&NVIC_InitStructure); 8037dc2: f7ed fbbd bl 8025540 /* Configure the Ethernet MAC/DMA */ ETH_MACDMA_Config(); ETH_NVIC_Config(); if (EthInitStatus == 0) { 8037dc6: 6833 ldr r3, [r6, #0] 8037dc8: b903 cbnz r3, 8037dcc 8037dca: e7fe b.n 8037dca // LCD_DisplayStringLine(Line5, (uint8_t*)" Ethernet Init "); // LCD_DisplayStringLine(Line6, (uint8_t*)" failed "); // STM_EVAL_LEDOn(LED5); while(1); } } 8037dcc: b034 add sp, #208 ; 0xd0 8037dce: bd70 pop {r4, r5, r6, pc} 8037dd0: 40020000 .word 0x40020000 8037dd4: 40020400 .word 0x40020400 8037dd8: 40020800 .word 0x40020800 8037ddc: 40021000 .word 0x40021000 8037de0: 2000c804 .word 0x2000c804 8037de4: 00010040 .word 0x00010040 08037de8 : * @brief Inserts a delay time. * @param nCount: specifies the delay time length. * @retval None */ static void ETH_Delay(__IO uint32_t nCount) { 8037de8: b084 sub sp, #16 __IO uint32_t index = 0; 8037dea: 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) { 8037dec: 9001 str r0, [sp, #4] __IO uint32_t index = 0; 8037dee: 9303 str r3, [sp, #12] for(index = nCount; index != 0; index--) 8037df0: 9b01 ldr r3, [sp, #4] 8037df2: e001 b.n 8037df8 8037df4: 9b03 ldr r3, [sp, #12] 8037df6: 3b01 subs r3, #1 8037df8: 9303 str r3, [sp, #12] 8037dfa: 9b03 ldr r3, [sp, #12] 8037dfc: 2b00 cmp r3, #0 8037dfe: d1f9 bne.n 8037df4 { } } 8037e00: b004 add sp, #16 8037e02: 4770 bx lr 08037e04 : * @brief Deinitializes the ETHERNET peripheral registers to their default reset values. * @param None * @retval None */ void ETH_DeInit(void) { 8037e04: b508 push {r3, lr} RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_ETH_MAC, ENABLE); 8037e06: 2101 movs r1, #1 8037e08: f04f 7000 mov.w r0, #33554432 ; 0x2000000 8037e0c: f7ed fe1e bl 8025a4c RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_ETH_MAC, DISABLE); 8037e10: f04f 7000 mov.w r0, #33554432 ; 0x2000000 8037e14: 2100 movs r1, #0 } 8037e16: 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); 8037e1a: f7ed be17 b.w 8025a4c 08037e1e : /* 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; 8037e1e: f44f 4280 mov.w r2, #16384 ; 0x4000 8037e22: 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; 8037e24: f44f 6200 mov.w r2, #2048 ; 0x800 8037e28: 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; 8037e2a: 2240 movs r2, #64 ; 0x40 8037e2c: 6402 str r2, [r0, #64] ; 0x40 /* Disable reception of Broadcast frames */ ETH_InitStruct->ETH_BroadcastFramesReception = ETH_BroadcastFramesReception_Disable; 8037e2e: 2220 movs r2, #32 8037e30: 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; 8037e32: 2280 movs r2, #128 ; 0x80 { /* ETH_InitStruct members default value */ /*------------------------ MAC Configuration ---------------------------*/ /* PHY Auto-negotiation enabled */ ETH_InitStruct->ETH_AutoNegotiation = ETH_AutoNegotiation_Enable; 8037e34: 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; 8037e36: 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; 8037e38: 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; 8037e3c: 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; 8037e3e: 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; 8037e42: 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; 8037e44: 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; 8037e48: 6043 str r3, [r0, #4] /* MAC Jabber enabled in Half-duplex mode */ ETH_InitStruct->ETH_Jabber = ETH_Jabber_Enable; 8037e4a: 6083 str r3, [r0, #8] /* Ethernet interframe gap set to 96 bits */ ETH_InitStruct->ETH_InterFrameGap = ETH_InterFrameGap_96Bit; 8037e4c: 60c3 str r3, [r0, #12] /* Carrier Sense Enabled in Half-Duplex mode */ ETH_InitStruct->ETH_CarrierSense = ETH_CarrierSense_Enable; 8037e4e: 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; 8037e50: 6183 str r3, [r0, #24] /* MAC MII loopback disabled */ ETH_InitStruct->ETH_LoopbackMode = ETH_LoopbackMode_Disable; 8037e52: 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; 8037e54: 6243 str r3, [r0, #36] ; 0x24 /* Retry Transmission enabled for half-duplex mode */ ETH_InitStruct->ETH_RetryTransmission = ETH_RetryTransmission_Enable; 8037e56: 6283 str r3, [r0, #40] ; 0x28 /* Automatic PAD/CRC strip disabled*/ ETH_InitStruct->ETH_AutomaticPadCRCStrip = ETH_AutomaticPadCRCStrip_Disable; 8037e58: 62c3 str r3, [r0, #44] ; 0x2c /* half-duplex mode retransmission Backoff time_limit = 10 slot times*/ ETH_InitStruct->ETH_BackOffLimit = ETH_BackOffLimit_10; 8037e5a: 6303 str r3, [r0, #48] ; 0x30 /* half-duplex mode Deferral check disabled */ ETH_InitStruct->ETH_DeferralCheck = ETH_DeferralCheck_Disable; 8037e5c: 6343 str r3, [r0, #52] ; 0x34 /* Receive all frames disabled */ ETH_InitStruct->ETH_ReceiveAll = ETH_ReceiveAll_Disable; 8037e5e: 6383 str r3, [r0, #56] ; 0x38 /* Source address filtering (on the optional MAC addresses) disabled */ ETH_InitStruct->ETH_SourceAddrFilter = ETH_SourceAddrFilter_Disable; 8037e60: 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; 8037e62: 6483 str r3, [r0, #72] ; 0x48 /* Promiscuous address filtering mode disabled */ ETH_InitStruct->ETH_PromiscuousMode = ETH_PromiscuousMode_Disable; 8037e64: 64c3 str r3, [r0, #76] ; 0x4c /* Perfect address filtering for multicast addresses */ ETH_InitStruct->ETH_MulticastFramesFilter = ETH_MulticastFramesFilter_Perfect; 8037e66: 6503 str r3, [r0, #80] ; 0x50 /* Perfect address filtering for unicast addresses */ ETH_InitStruct->ETH_UnicastFramesFilter = ETH_UnicastFramesFilter_Perfect; 8037e68: 6543 str r3, [r0, #84] ; 0x54 /* Initialize hash table high and low regs */ ETH_InitStruct->ETH_HashTableHigh = 0x0; 8037e6a: 6583 str r3, [r0, #88] ; 0x58 ETH_InitStruct->ETH_HashTableLow = 0x0; 8037e6c: 65c3 str r3, [r0, #92] ; 0x5c /* Flow control config (flow control disabled)*/ ETH_InitStruct->ETH_PauseTime = 0x0; 8037e6e: 6603 str r3, [r0, #96] ; 0x60 ETH_InitStruct->ETH_ZeroQuantaPause = ETH_ZeroQuantaPause_Disable; ETH_InitStruct->ETH_PauseLowThreshold = ETH_PauseLowThreshold_Minus4; 8037e70: 6683 str r3, [r0, #104] ; 0x68 ETH_InitStruct->ETH_UnicastPauseFrameDetect = ETH_UnicastPauseFrameDetect_Disable; 8037e72: 66c3 str r3, [r0, #108] ; 0x6c ETH_InitStruct->ETH_ReceiveFlowControl = ETH_ReceiveFlowControl_Disable; 8037e74: 6703 str r3, [r0, #112] ; 0x70 ETH_InitStruct->ETH_TransmitFlowControl = ETH_TransmitFlowControl_Disable; 8037e76: 6743 str r3, [r0, #116] ; 0x74 /* VLANtag config (VLAN field not checked) */ ETH_InitStruct->ETH_VLANTagComparison = ETH_VLANTagComparison_16Bit; 8037e78: 6783 str r3, [r0, #120] ; 0x78 ETH_InitStruct->ETH_VLANTagIdentifier = 0x0; 8037e7a: 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; 8037e7c: 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; 8037e80: 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; 8037e84: f44f 3280 mov.w r2, #65536 ; 0x10000 8037e88: 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; 8037e8c: 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; 8037e90: 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; 8037e94: f8c0 20ac str.w r2, [r0, #172] ; 0xac ETH_InitStruct->ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; 8037e98: 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; 8037e9c: f8c0 3088 str.w r3, [r0, #136] ; 0x88 /* Store and forward mode enabled for transmit */ ETH_InitStruct->ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable; 8037ea0: 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; 8037ea4: f8c0 3090 str.w r3, [r0, #144] ; 0x90 /* Disable forwarding frames with errors (short frames, CRC,...)*/ ETH_InitStruct->ETH_ForwardErrorFrames = ETH_ForwardErrorFrames_Disable; 8037ea8: f8c0 3094 str.w r3, [r0, #148] ; 0x94 /* Disable undersized good frames */ ETH_InitStruct->ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; 8037eac: 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; 8037eb0: 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; 8037eb4: 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; 8037eb8: f8c0 20b0 str.w r2, [r0, #176] ; 0xb0 /* DMA Ring mode skip length = 0 */ ETH_InitStruct->ETH_DescriptorSkipLength = 0x0; 8037ebc: 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; 8037ec0: f8c0 30b8 str.w r3, [r0, #184] ; 0xb8 8037ec4: 4770 bx lr 8037ec6: 0000 movs r0, r0 08037ec8 : * @param NewState: new state of the MAC transmission. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_MACTransmissionCmd(FunctionalState NewState) { 8037ec8: 4b04 ldr r3, [pc, #16] ; (8037edc ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the MAC transmission */ ETH->MACCR |= ETH_MACCR_TE; 8037eca: 681a ldr r2, [r3, #0] void ETH_MACTransmissionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8037ecc: b110 cbz r0, 8037ed4 { /* Enable the MAC transmission */ ETH->MACCR |= ETH_MACCR_TE; 8037ece: f042 0208 orr.w r2, r2, #8 8037ed2: e001 b.n 8037ed8 } else { /* Disable the MAC transmission */ ETH->MACCR &= ~ETH_MACCR_TE; 8037ed4: f022 0208 bic.w r2, r2, #8 8037ed8: 601a str r2, [r3, #0] 8037eda: 4770 bx lr 8037edc: 40028000 .word 0x40028000 08037ee0 : * @param NewState: new state of the MAC reception. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_MACReceptionCmd(FunctionalState NewState) { 8037ee0: 4b04 ldr r3, [pc, #16] ; (8037ef4 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the MAC reception */ ETH->MACCR |= ETH_MACCR_RE; 8037ee2: 681a ldr r2, [r3, #0] void ETH_MACReceptionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8037ee4: b110 cbz r0, 8037eec { /* Enable the MAC reception */ ETH->MACCR |= ETH_MACCR_RE; 8037ee6: f042 0204 orr.w r2, r2, #4 8037eea: e001 b.n 8037ef0 } else { /* Disable the MAC reception */ ETH->MACCR &= ~ETH_MACCR_RE; 8037eec: f022 0204 bic.w r2, r2, #4 8037ef0: 601a str r2, [r3, #0] 8037ef2: 4770 bx lr 8037ef4: 40028000 .word 0x40028000 08037ef8 : 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]; 8037ef8: 790b ldrb r3, [r1, #4] 8037efa: 794a ldrb r2, [r1, #5] 8037efc: 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; 8037f00: 4b07 ldr r3, [pc, #28] ; (8037f20 ) 8037f02: 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]; 8037f04: 788a ldrb r2, [r1, #2] 8037f06: 78cb ldrb r3, [r1, #3] 8037f08: 0412 lsls r2, r2, #16 8037f0a: ea42 6203 orr.w r2, r2, r3, lsl #24 8037f0e: 780b ldrb r3, [r1, #0] 8037f10: 431a orrs r2, r3 8037f12: 784b ldrb r3, [r1, #1] 8037f14: 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; 8037f18: 4b02 ldr r3, [pc, #8] ; (8037f24 ) 8037f1a: 50c2 str r2, [r0, r3] 8037f1c: 4770 bx lr 8037f1e: bf00 nop 8037f20: 40028040 .word 0x40028040 8037f24: 40028044 .word 0x40028044 08037f28 : * the receive frame (should be used with interrupt mode only) * @param None * @retval Structure of type FrameTypeDef */ FrameTypeDef ETH_Get_Received_Frame_interrupt(void) { 8037f28: b537 push {r0, r1, r2, r4, r5, lr} FrameTypeDef frame={0,0,0}; __IO uint32_t descriptor_scan_counter = 0; 8037f2a: 2300 movs r3, #0 8037f2c: 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; 8037f2e: 4b24 ldr r3, [pc, #144] ; (8037fc0 ) 8037f30: 681a ldr r2, [r3, #0] 8037f32: 4b24 ldr r3, [pc, #144] ; (8037fc4 ) DMA_RX_FRAME_infos->Seg_Count = 1; 8037f34: 2401 movs r4, #1 8037f36: 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)&& 8037f38: e033 b.n 8037fa2 (descriptor_scan_counterStatus & ETH_DMARxDesc_FS) != (uint32_t)RESET)&& 8037f40: 6819 ldr r1, [r3, #0] 8037f42: 0589 lsls r1, r1, #22 8037f44: d505 bpl.n 8037f52 ((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)) 8037f46: 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)&& 8037f48: 05c9 lsls r1, r1, #23 8037f4a: d402 bmi.n 8037f52 ((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)) { DMA_RX_FRAME_infos->FS_Rx_Desc = DMARxDescToGet; 8037f4c: 6013 str r3, [r2, #0] DMA_RX_FRAME_infos->Seg_Count = 1; 8037f4e: 6094 str r4, [r2, #8] 8037f50: e009 b.n 8037f66 DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); } /* check if intermediate segment */ else if (((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)&& 8037f52: 6819 ldr r1, [r3, #0] 8037f54: 05c9 lsls r1, r1, #23 8037f56: d408 bmi.n 8037f6a ((DMARxDescToGet->Status & ETH_DMARxDesc_FS) == (uint32_t)RESET)) 8037f58: 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)&& 8037f5a: 0589 lsls r1, r1, #22 8037f5c: d500 bpl.n 8037f60 8037f5e: e004 b.n 8037f6a ((DMARxDescToGet->Status & ETH_DMARxDesc_FS) == (uint32_t)RESET)) { (DMA_RX_FRAME_infos->Seg_Count) ++; 8037f60: 6891 ldr r1, [r2, #8] 8037f62: 3101 adds r1, #1 8037f64: 6091 str r1, [r2, #8] DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); 8037f66: 68db ldr r3, [r3, #12] 8037f68: e01b b.n 8037fa2 8037f6a: 4a16 ldr r2, [pc, #88] ; (8037fc4 ) 8037f6c: 6013 str r3, [r2, #0] /* should be last segment */ else { /* last segment */ DMA_RX_FRAME_infos->LS_Rx_Desc = DMARxDescToGet; 8037f6e: 4a14 ldr r2, [pc, #80] ; (8037fc0 ) 8037f70: 6812 ldr r2, [r2, #0] 8037f72: 6053 str r3, [r2, #4] (DMA_RX_FRAME_infos->Seg_Count)++; 8037f74: 6891 ldr r1, [r2, #8] 8037f76: 3101 adds r1, #1 8037f78: 6091 str r1, [r2, #8] /* first segment is last segment */ if ((DMA_RX_FRAME_infos->Seg_Count)==1) 8037f7a: 6891 ldr r1, [r2, #8] 8037f7c: 2901 cmp r1, #1 DMA_RX_FRAME_infos->FS_Rx_Desc = DMARxDescToGet; 8037f7e: bf08 it eq 8037f80: 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; 8037f82: 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) 8037f84: 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; 8037f86: f3c1 410d ubfx r1, r1, #16, #14 8037f8a: 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) 8037f8c: 2c01 cmp r4, #1 { frame.buffer =(DMA_RX_FRAME_infos->FS_Rx_Desc)->Buffer1Addr; 8037f8e: bf8a itet hi 8037f90: 6812 ldrhi r2, [r2, #0] } else { frame.buffer = DMARxDescToGet->Buffer1Addr; 8037f92: 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; 8037f94: 6892 ldrhi r2, [r2, #8] } frame.descriptor = DMARxDescToGet; /* Update the ETHERNET DMA global Rx descriptor with next Rx descriptor */ DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); 8037f96: 4c0b ldr r4, [pc, #44] ; (8037fc4 ) 8037f98: 68dd ldr r5, [r3, #12] /* Return Frame */ return (frame); 8037f9a: 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); 8037f9e: 6025 str r5, [r4, #0] 8037fa0: e007 b.n 8037fb2 { 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)&& 8037fa2: 6819 ldr r1, [r3, #0] 8037fa4: 2900 cmp r1, #0 8037fa6: da06 bge.n 8037fb6 8037fa8: 4a06 ldr r2, [pc, #24] ; (8037fc4 ) 8037faa: 6013 str r3, [r2, #0] /* Return Frame */ return (frame); } } return (frame); 8037fac: 2300 movs r3, #0 8037fae: 6003 str r3, [r0, #0] 8037fb0: 6043 str r3, [r0, #4] 8037fb2: 6083 str r3, [r0, #8] 8037fb4: e003 b.n 8037fbe 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)&& 8037fb8: 2904 cmp r1, #4 8037fba: d9be bls.n 8037f3a 8037fbc: e7f4 b.n 8037fa8 /* Return Frame */ return (frame); } } return (frame); } 8037fbe: bd3e pop {r1, r2, r3, r4, r5, pc} 8037fc0: 200119d0 .word 0x200119d0 8037fc4: 2000fb60 .word 0x2000fb60 08037fc8 : { 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) 8037fc8: 4b29 ldr r3, [pc, #164] ; (8038070 ) 8037fca: 681b ldr r3, [r3, #0] 8037fcc: 681a ldr r2, [r3, #0] 8037fce: 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) { 8037fd0: 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) 8037fd2: db48 blt.n 8038066 return ETH_ERROR; } DMATxNextDesc = DMATxDescToSet; if (FrameLength > ETH_TX_BUF_SIZE) 8037fd4: f240 52f4 movw r2, #1524 ; 0x5f4 8037fd8: 4290 cmp r0, r2 8037fda: d917 bls.n 803800c { buf_count = FrameLength/ETH_TX_BUF_SIZE; 8037fdc: fbb0 f4f2 udiv r4, r0, r2 if (FrameLength%ETH_TX_BUF_SIZE) buf_count++; 8037fe0: fb02 0214 mls r2, r2, r4, r0 8037fe4: b292 uxth r2, r2 DMATxNextDesc = DMATxDescToSet; if (FrameLength > ETH_TX_BUF_SIZE) { buf_count = FrameLength/ETH_TX_BUF_SIZE; 8037fe6: b2a1 uxth r1, r4 if (FrameLength%ETH_TX_BUF_SIZE) buf_count++; 8037fe8: b10a cbz r2, 8037fee 8037fea: 3101 adds r1, #1 8037fec: e001 b.n 8037ff2 } else buf_count =1; if (buf_count ==1) 8037fee: 2901 cmp r1, #1 8037ff0: d00c beq.n 803800c if (i== (buf_count-1)) { /* Setting the last segment bit */ DMATxNextDesc->Status |= ETH_DMATxDesc_LS; size = FrameLength - (buf_count-1)*ETH_TX_BUF_SIZE; 8037ff2: 4d20 ldr r5, [pc, #128] ; (8038074 ) 8037ff4: f200 50f4 addw r0, r0, #1524 ; 0x5f4 8037ff8: fb05 0501 mla r5, r5, r1, r0 DMATxNextDesc->ControlBufferSize = (size & ETH_DMATxDesc_TBS1); 8037ffc: 04ed lsls r5, r5, #19 8037ffe: 0ced lsrs r5, r5, #19 8038000: 461a mov r2, r3 8038002: 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); 8038004: f240 56f4 movw r6, #1524 ; 0x5f4 if (i== (buf_count-1)) 8038008: 1e4f subs r7, r1, #1 803800a: e00c b.n 8038026 else buf_count =1; if (buf_count ==1) { /*set LAST and FIRST segment */ DMATxDescToSet->Status |=ETH_DMATxDesc_FS|ETH_DMATxDesc_LS; 803800c: 681a ldr r2, [r3, #0] /* Set frame size */ DMATxDescToSet->ControlBufferSize = (FrameLength& ETH_DMATxDesc_TBS1); 803800e: 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; 8038010: f042 5240 orr.w r2, r2, #805306368 ; 0x30000000 /* Set frame size */ DMATxDescToSet->ControlBufferSize = (FrameLength& ETH_DMATxDesc_TBS1); 8038014: 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; 8038016: 601a str r2, [r3, #0] /* Set frame size */ DMATxDescToSet->ControlBufferSize = (FrameLength& ETH_DMATxDesc_TBS1); 8038018: 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; 803801a: 681a ldr r2, [r3, #0] 803801c: f042 4200 orr.w r2, r2, #2147483648 ; 0x80000000 8038020: 601a str r2, [r3, #0] DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); 8038022: 68da ldr r2, [r3, #12] 8038024: e014 b.n 8038050 } else { for (i=0; i< buf_count; i++) { if (i==0) 8038026: b918 cbnz r0, 8038030 { /* Setting the first segment bit */ DMATxDescToSet->Status |= ETH_DMATxDesc_FS; 8038028: 681c ldr r4, [r3, #0] 803802a: f044 5480 orr.w r4, r4, #268435456 ; 0x10000000 803802e: 601c str r4, [r3, #0] } /* Program size */ DMATxNextDesc->ControlBufferSize = (ETH_TX_BUF_SIZE & ETH_DMATxDesc_TBS1); if (i== (buf_count-1)) 8038030: 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); 8038032: 6056 str r6, [r2, #4] if (i== (buf_count-1)) 8038034: d104 bne.n 8038040 { /* Setting the last segment bit */ DMATxNextDesc->Status |= ETH_DMATxDesc_LS; 8038036: 6814 ldr r4, [r2, #0] 8038038: f044 5400 orr.w r4, r4, #536870912 ; 0x20000000 803803c: 6014 str r4, [r2, #0] size = FrameLength - (buf_count-1)*ETH_TX_BUF_SIZE; DMATxNextDesc->ControlBufferSize = (size & ETH_DMATxDesc_TBS1); 803803e: 6055 str r5, [r2, #4] } /*give back descriptor to DMA */ DMATxNextDesc->Status |= ETH_DMATxDesc_OWN; 8038040: 6814 ldr r4, [r2, #0] DMATxDescToSet->Status |= ETH_DMATxDesc_OWN; DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); } else { for (i=0; i< buf_count; i++) 8038042: 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; 8038044: f044 4400 orr.w r4, r4, #2147483648 ; 0x80000000 8038048: 6014 str r4, [r2, #0] DMATxDescToSet->Status |= ETH_DMATxDesc_OWN; DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); } else { for (i=0; i< buf_count; i++) 803804a: 4288 cmp r0, r1 } /*give back descriptor to DMA */ DMATxNextDesc->Status |= ETH_DMATxDesc_OWN; DMATxNextDesc = (ETH_DMADESCTypeDef *)(DMATxNextDesc->Buffer2NextDescAddr); 803804c: 68d2 ldr r2, [r2, #12] DMATxDescToSet->Status |= ETH_DMATxDesc_OWN; DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); } else { for (i=0; i< buf_count; i++) 803804e: d3ea bcc.n 8038026 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 ; 8038050: 4b07 ldr r3, [pc, #28] ; (8038070 ) 8038052: 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) 8038054: 4b08 ldr r3, [pc, #32] ; (8038078 ) 8038056: 695a ldr r2, [r3, #20] 8038058: 0750 lsls r0, r2, #29 803805a: d506 bpl.n 803806a { /* Clear TBUS ETHERNET DMA flag */ ETH->DMASR = ETH_DMASR_TBUS; 803805c: 2204 movs r2, #4 803805e: 615a str r2, [r3, #20] /* Resume DMA transmission*/ ETH->DMATPDR = 0; 8038060: 2200 movs r2, #0 8038062: 605a str r2, [r3, #4] 8038064: e001 b.n 803806a /* 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; 8038066: 2000 movs r0, #0 8038068: bdf0 pop {r4, r5, r6, r7, pc} /* Resume DMA transmission*/ ETH->DMATPDR = 0; } /* Return SUCCESS */ return ETH_SUCCESS; 803806a: 2001 movs r0, #1 } 803806c: bdf0 pop {r4, r5, r6, r7, pc} 803806e: bf00 nop 8038070: 2000fb64 .word 0x2000fb64 8038074: fffffa0c .word 0xfffffa0c 8038078: 40029000 .word 0x40029000 0803807c : { uint32_t i = 0; ETH_DMADESCTypeDef *DMARxDesc; /* Set the DMARxDescToGet pointer with the first one of the DMARxDescTab list */ DMARxDescToGet = DMARxDescTab; 803807c: 4b11 ldr r3, [pc, #68] ; (80380c4 ) * @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) { 803807e: 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; 8038080: 6018 str r0, [r3, #0] /* Fill each DMARxDesc descriptor with the right values */ for(i=0; i < RxBuffCount; i++) 8038082: 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) 8038084: 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; 8038088: 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; 803808c: 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)) 8038090: 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++) 8038092: e00f b.n 80380b4 /* 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); 8038094: 42bc cmp r4, r7 8038096: bf2c ite cs 8038098: 4684 movcs ip, r0 803809a: 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]); 803809c: 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; 80380a0: 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; 80380a4: 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); 80380a8: 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++) 80380ac: 3401 adds r4, #1 80380ae: 3320 adds r3, #32 80380b0: f201 51f4 addw r1, r1, #1524 ; 0x5f4 80380b4: 4294 cmp r4, r2 80380b6: d1ed bne.n 8038094 DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab); } } /* Set Receive Descriptor List Address Register */ ETH->DMARDLAR = (uint32_t) DMARxDescTab; 80380b8: 4b03 ldr r3, [pc, #12] ; (80380c8 ) DMA_RX_FRAME_infos = &RX_Frame_Descriptor; 80380ba: 4a04 ldr r2, [pc, #16] ; (80380cc ) DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab); } } /* Set Receive Descriptor List Address Register */ ETH->DMARDLAR = (uint32_t) DMARxDescTab; 80380bc: 60d8 str r0, [r3, #12] DMA_RX_FRAME_infos = &RX_Frame_Descriptor; 80380be: 4b04 ldr r3, [pc, #16] ; (80380d0 ) 80380c0: 601a str r2, [r3, #0] 80380c2: bdf0 pop {r4, r5, r6, r7, pc} 80380c4: 2000fb60 .word 0x2000fb60 80380c8: 40029000 .word 0x40029000 80380cc: 2000fb54 .word 0x2000fb54 80380d0: 200119d0 .word 0x200119d0 080380d4 : { uint32_t i = 0; ETH_DMADESCTypeDef *DMATxDesc; /* Set the DMATxDescToSet pointer with the first one of the DMATxDescTab list */ DMATxDescToSet = DMATxDescTab; 80380d4: 4b0e ldr r3, [pc, #56] ; (8038110 ) * @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) { 80380d6: 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; 80380d8: 6018 str r0, [r3, #0] /* Fill each DMATxDesc descriptor with the right values */ for(i=0; i < TxBuffCount; i++) 80380da: 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) 80380dc: 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; 80380e0: 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)) 80380e4: 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++) 80380e6: e00d b.n 8038104 /* 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); 80380e8: 42b4 cmp r4, r6 80380ea: bf2c ite cs 80380ec: 4607 movcs r7, r0 80380ee: 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]); 80380f0: 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; 80380f4: 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); 80380f8: 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++) 80380fc: 3401 adds r4, #1 80380fe: 3320 adds r3, #32 8038100: f201 51f4 addw r1, r1, #1524 ; 0x5f4 8038104: 4294 cmp r4, r2 8038106: d1ef bne.n 80380e8 DMATxDesc->Buffer2NextDescAddr = (uint32_t) DMATxDescTab; } } /* Set Transmit Desciptor List Address Register */ ETH->DMATDLAR = (uint32_t) DMATxDescTab; 8038108: 4b02 ldr r3, [pc, #8] ; (8038114 ) 803810a: 6118 str r0, [r3, #16] 803810c: bdf0 pop {r4, r5, r6, r7, pc} 803810e: bf00 nop 8038110: 2000fb64 .word 0x2000fb64 8038114: 40029000 .word 0x40029000 08038118 : { /* 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; 8038118: 6803 ldr r3, [r0, #0] 803811a: 4319 orrs r1, r3 803811c: 6001 str r1, [r0, #0] 803811e: 4770 bx lr 08038120 : * @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) { 8038120: 6843 ldr r3, [r0, #4] /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8038122: b111 cbz r1, 803812a { /* Enable the DMA Rx Desc receive interrupt */ DMARxDesc->ControlBufferSize &=(~(uint32_t)ETH_DMARxDesc_DIC); 8038124: f023 4300 bic.w r3, r3, #2147483648 ; 0x80000000 8038128: e001 b.n 803812e } else { /* Disable the DMA Rx Desc receive interrupt */ DMARxDesc->ControlBufferSize |= ETH_DMARxDesc_DIC; 803812a: f043 4300 orr.w r3, r3, #2147483648 ; 0x80000000 803812e: 6043 str r3, [r0, #4] 8038130: 4770 bx lr 8038132: 0000 movs r0, r0 08038134 : */ 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; 8038134: 4b02 ldr r3, [pc, #8] ; (8038140 ) 8038136: 681a ldr r2, [r3, #0] 8038138: f042 0201 orr.w r2, r2, #1 803813c: 601a str r2, [r3, #0] 803813e: 4770 bx lr 8038140: 40029000 .word 0x40029000 08038144 : * @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) 8038144: 4b02 ldr r3, [pc, #8] ; (8038150 ) 8038146: 6818 ldr r0, [r3, #0] else { bitstatus = RESET; } return bitstatus; } 8038148: f000 0001 and.w r0, r0, #1 803814c: 4770 bx lr 803814e: bf00 nop 8038150: 40029000 .word 0x40029000 08038154 : 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) 8038154: 4b03 ldr r3, [pc, #12] ; (8038164 ) 8038156: 695b ldr r3, [r3, #20] 8038158: 4218 tst r0, r3 else { bitstatus = RESET; } return bitstatus; } 803815a: bf0c ite eq 803815c: 2000 moveq r0, #0 803815e: 2001 movne r0, #1 8038160: 4770 bx lr 8038162: bf00 nop 8038164: 40029000 .word 0x40029000 08038168 : * @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) { 8038168: 4b04 ldr r3, [pc, #16] ; (803817c ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the selected ETHERNET DMA interrupts */ ETH->DMAIER |= ETH_DMA_IT; 803816a: 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) 803816c: b109 cbz r1, 8038172 { /* Enable the selected ETHERNET DMA interrupts */ ETH->DMAIER |= ETH_DMA_IT; 803816e: 4310 orrs r0, r2 8038170: e001 b.n 8038176 } else { /* Disable the selected ETHERNET DMA interrupts */ ETH->DMAIER &=(~(uint32_t)ETH_DMA_IT); 8038172: ea22 0000 bic.w r0, r2, r0 8038176: 61d8 str r0, [r3, #28] 8038178: 4770 bx lr 803817a: bf00 nop 803817c: 40029000 .word 0x40029000 08038180 : { /* 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; 8038180: 4b01 ldr r3, [pc, #4] ; (8038188 ) 8038182: 6158 str r0, [r3, #20] 8038184: 4770 bx lr 8038186: bf00 nop 8038188: 40029000 .word 0x40029000 0803818c : * @retval None */ void ETH_FlushTransmitFIFO(void) { /* Set the Flush Transmit FIFO bit */ ETH->DMAOMR |= ETH_DMAOMR_FTF; 803818c: 4b02 ldr r3, [pc, #8] ; (8038198 ) 803818e: 699a ldr r2, [r3, #24] 8038190: f442 1280 orr.w r2, r2, #1048576 ; 0x100000 8038194: 619a str r2, [r3, #24] 8038196: 4770 bx lr 8038198: 40029000 .word 0x40029000 0803819c : * @param NewState: new state of the DMA transmission. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_DMATransmissionCmd(FunctionalState NewState) { 803819c: 4b04 ldr r3, [pc, #16] ; (80381b0 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the DMA transmission */ ETH->DMAOMR |= ETH_DMAOMR_ST; 803819e: 699a ldr r2, [r3, #24] void ETH_DMATransmissionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 80381a0: b110 cbz r0, 80381a8 { /* Enable the DMA transmission */ ETH->DMAOMR |= ETH_DMAOMR_ST; 80381a2: f442 5200 orr.w r2, r2, #8192 ; 0x2000 80381a6: e001 b.n 80381ac } else { /* Disable the DMA transmission */ ETH->DMAOMR &= ~ETH_DMAOMR_ST; 80381a8: f422 5200 bic.w r2, r2, #8192 ; 0x2000 80381ac: 619a str r2, [r3, #24] 80381ae: 4770 bx lr 80381b0: 40029000 .word 0x40029000 080381b4 : * @param NewState: new state of the DMA reception. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_DMAReceptionCmd(FunctionalState NewState) { 80381b4: 4b04 ldr r3, [pc, #16] ; (80381c8 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the DMA reception */ ETH->DMAOMR |= ETH_DMAOMR_SR; 80381b6: 699a ldr r2, [r3, #24] void ETH_DMAReceptionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 80381b8: b110 cbz r0, 80381c0 { /* Enable the DMA reception */ ETH->DMAOMR |= ETH_DMAOMR_SR; 80381ba: f042 0202 orr.w r2, r2, #2 80381be: e001 b.n 80381c4 } else { /* Disable the DMA reception */ ETH->DMAOMR &= ~ETH_DMAOMR_SR; 80381c0: f022 0202 bic.w r2, r2, #2 80381c4: 619a str r2, [r3, #24] 80381c6: 4770 bx lr 80381c8: 40029000 .word 0x40029000 080381cc : * @brief Enables ENET MAC and DMA reception/transmission * @param None * @retval None */ void ETH_Start(void) { 80381cc: b508 push {r3, lr} /* Enable transmit state machine of the MAC for transmission on the MII */ ETH_MACTransmissionCmd(ENABLE); 80381ce: 2001 movs r0, #1 80381d0: f7ff fe7a bl 8037ec8 /* Flush Transmit FIFO */ ETH_FlushTransmitFIFO(); 80381d4: f7ff ffda bl 803818c /* Enable receive state machine of the MAC for reception from the MII */ ETH_MACReceptionCmd(ENABLE); 80381d8: 2001 movs r0, #1 80381da: f7ff fe81 bl 8037ee0 /* Start DMA transmission */ ETH_DMATransmissionCmd(ENABLE); 80381de: 2001 movs r0, #1 80381e0: f7ff ffdc bl 803819c /* Start DMA reception */ ETH_DMAReceptionCmd(ENABLE); 80381e4: 2001 movs r0, #1 } 80381e6: e8bd 4008 ldmia.w sp!, {r3, lr} ETH_MACReceptionCmd(ENABLE); /* Start DMA transmission */ ETH_DMATransmissionCmd(ENABLE); /* Start DMA reception */ ETH_DMAReceptionCmd(ENABLE); 80381ea: f7ff bfe3 b.w 80381b4 80381ee: 0000 movs r0, r0 080381f0 : * @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) { 80381f0: b082 sub sp, #8 uint32_t tmpreg = 0; __IO uint32_t timeout = 0; 80381f2: 2300 movs r3, #0 80381f4: 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; 80381f6: 4b11 ldr r3, [pc, #68] ; (803823c ) 80381f8: 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 */ 80381fa: 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; 80381fc: 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 */ 8038200: 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 */ 8038202: ea42 4210 orr.w r2, r2, r0, lsr #16 tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */ 8038206: f401 61f8 and.w r1, r1, #1984 ; 0x7c0 tmpreg &= ~ETH_MACMIIAR_MW; /* Set the read mode */ 803820a: 430a orrs r2, r1 tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ 803820c: f042 0201 orr.w r2, r2, #1 /* Write the result value into the MII Address register */ ETH->MACMIIAR = tmpreg; 8038210: 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)); 8038212: 4a0b ldr r2, [pc, #44] ; (8038240 ) /* Write the result value into the MII Address register */ ETH->MACMIIAR = tmpreg; /* Check for the Busy flag */ do { timeout++; 8038214: 9901 ldr r1, [sp, #4] 8038216: 3101 adds r1, #1 8038218: 9101 str r1, [sp, #4] tmpreg = ETH->MACMIIAR; 803821a: 6919 ldr r1, [r3, #16] } while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_READ_TO)); 803821c: 07c9 lsls r1, r1, #31 803821e: d502 bpl.n 8038226 8038220: 9901 ldr r1, [sp, #4] 8038222: 4291 cmp r1, r2 8038224: d9f6 bls.n 8038214 /* Return ERROR in case of timeout */ if(timeout == PHY_READ_TO) 8038226: 4b07 ldr r3, [pc, #28] ; (8038244 ) 8038228: 9a01 ldr r2, [sp, #4] 803822a: 429a cmp r2, r3 { return (uint16_t)ETH_ERROR; } /* Return data register value */ return (uint16_t)(ETH->MACMIIDR); 803822c: bf1d ittte ne 803822e: 4b03 ldrne r3, [pc, #12] ; (803823c ) 8038230: 6958 ldrne r0, [r3, #20] 8038232: 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; 8038234: 2000 moveq r0, #0 } /* Return data register value */ return (uint16_t)(ETH->MACMIIDR); } 8038236: b002 add sp, #8 8038238: 4770 bx lr 803823a: bf00 nop 803823c: 40028000 .word 0x40028000 8038240: 0004fffe .word 0x0004fffe 8038244: 0004ffff .word 0x0004ffff 08038248 : * @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) { 8038248: b513 push {r0, r1, r4, lr} uint32_t tmpreg = 0; __IO uint32_t timeout = 0; 803824a: 2300 movs r3, #0 803824c: 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; 803824e: 4b0f ldr r3, [pc, #60] ; (803828c ) 8038250: 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; 8038252: 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; 8038254: 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 */ 8038258: f044 0403 orr.w r4, r4, #3 803825c: 06c0 lsls r0, r0, #27 tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */ 803825e: 0189 lsls r1, r1, #6 8038260: ea44 4410 orr.w r4, r4, r0, lsr #16 8038264: 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 */ 8038268: 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)); 803826a: 4a09 ldr r2, [pc, #36] ; (8038290 ) 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; 803826c: 611c str r4, [r3, #16] /* Check for the Busy flag */ do { timeout++; 803826e: 9901 ldr r1, [sp, #4] 8038270: 3101 adds r1, #1 8038272: 9101 str r1, [sp, #4] tmpreg = ETH->MACMIIAR; 8038274: 6919 ldr r1, [r3, #16] } while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_WRITE_TO)); 8038276: 07c8 lsls r0, r1, #31 8038278: d502 bpl.n 8038280 803827a: 9901 ldr r1, [sp, #4] 803827c: 4291 cmp r1, r2 803827e: d9f6 bls.n 803826e /* Return ERROR in case of timeout */ if(timeout == PHY_WRITE_TO) 8038280: 9801 ldr r0, [sp, #4] return ETH_ERROR; } /* Return SUCCESS */ return ETH_SUCCESS; } 8038282: 4b04 ldr r3, [pc, #16] ; (8038294 ) 8038284: 1ac0 subs r0, r0, r3 8038286: bf18 it ne 8038288: 2001 movne r0, #1 803828a: bd1c pop {r2, r3, r4, pc} 803828c: 40028000 .word 0x40028000 8038290: 0004fffe .word 0x0004fffe 8038294: 0004ffff .word 0x0004ffff 08038298 : * @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) { 8038298: b5f0 push {r4, r5, r6, r7, lr} 803829a: b087 sub sp, #28 uint32_t RegValue = 0, tmpreg = 0; __IO uint32_t i = 0; 803829c: 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; 803829e: 4f90 ldr r7, [pc, #576] ; (80384e0 ) * 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; 80382a0: 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) { 80382a2: 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; 80382a4: 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); 80382a6: 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) { 80382a8: 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; 80382aa: 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); 80382ac: f7ed fb3a bl 8025924 hclk = rcc_clocks.HCLK_Frequency; 80382b0: 9b03 ldr r3, [sp, #12] /* Set CR bits depending on hclk value */ if((hclk >= 20000000)&&(hclk < 35000000)) 80382b2: 4a8c ldr r2, [pc, #560] ; (80384e4 ) 80382b4: 498c ldr r1, [pc, #560] ; (80384e8 ) 80382b6: 189a adds r2, r3, r2 80382b8: 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; 80382ba: 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)) 80382be: d802 bhi.n 80382c6 { /* CSR Clock Range between 20-35 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div16; 80382c0: f045 0508 orr.w r5, r5, #8 80382c4: e015 b.n 80382f2 } else if((hclk >= 35000000)&&(hclk < 60000000)) 80382c6: 4a89 ldr r2, [pc, #548] ; (80384ec ) 80382c8: 4989 ldr r1, [pc, #548] ; (80384f0 ) 80382ca: 189a adds r2, r3, r2 80382cc: 428a cmp r2, r1 80382ce: d802 bhi.n 80382d6 { /* CSR Clock Range between 35-60 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div26; 80382d0: f045 050c orr.w r5, r5, #12 80382d4: e00d b.n 80382f2 } else if((hclk >= 60000000)&&(hclk < 100000000)) 80382d6: 4a87 ldr r2, [pc, #540] ; (80384f4 ) 80382d8: 4987 ldr r1, [pc, #540] ; (80384f8 ) 80382da: 189a adds r2, r3, r2 80382dc: 428a cmp r2, r1 80382de: d908 bls.n 80382f2 { /* CSR Clock Range between 60-100 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div42; } else if((hclk >= 100000000)&&(hclk < 150000000)) 80382e0: 4a86 ldr r2, [pc, #536] ; (80384fc ) 80382e2: 189a adds r2, r3, r2 80382e4: 4b86 ldr r3, [pc, #536] ; (8038500 ) 80382e6: 429a cmp r2, r3 { /* CSR Clock Range between 100-150 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div62; 80382e8: bf94 ite ls 80382ea: 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; 80382ee: f045 0510 orrhi.w r5, r5, #16 } /* Write to ETHERNET MAC MIIAR: Configure the ETHERNET CSR Clock Range */ ETH->MACMIIAR = (uint32_t)tmpreg; 80382f2: 613d str r5, [r7, #16] /*-------------------- PHY initialization and configuration ----------------*/ /* Put the PHY in reset mode */ if(!(ETH_WritePHYRegister(PHYAddress, PHY_BCR, PHY_Reset))) 80382f4: 4630 mov r0, r6 80382f6: 2100 movs r1, #0 80382f8: f44f 4200 mov.w r2, #32768 ; 0x8000 80382fc: f7ff ffa4 bl 8038248 8038300: b908 cbnz r0, 8038306 { /* Return ERROR in case of write timeout */ return ETH_ERROR; 8038302: 2000 movs r0, #0 8038304: e0e9 b.n 80384da } /* Delay to assure PHY reset */ _eth_delay_(PHY_RESET_DELAY); 8038306: 487f ldr r0, [pc, #508] ; (8038504 ) 8038308: f7ff fd6e bl 8037de8 if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) 803830c: 6821 ldr r1, [r4, #0] 803830e: 2900 cmp r1, #0 8038310: d050 beq.n 80383b4 { /* We wait for linked status... */ do { timeout++; } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 8038312: 4d7d ldr r5, [pc, #500] ; (8038508 ) if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) { /* We wait for linked status... */ do { timeout++; 8038314: 9b01 ldr r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 8038316: 4630 mov r0, r6 if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) { /* We wait for linked status... */ do { timeout++; 8038318: 3301 adds r3, #1 } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 803831a: 2101 movs r1, #1 if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) { /* We wait for linked status... */ do { timeout++; 803831c: 9301 str r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 803831e: f7ff ff67 bl 80381f0 8038322: f000 0004 and.w r0, r0, #4 8038326: b280 uxth r0, r0 8038328: b910 cbnz r0, 8038330 803832a: 9b01 ldr r3, [sp, #4] 803832c: 42ab cmp r3, r5 803832e: d9f1 bls.n 8038314 /* Return ERROR in case of timeout */ if(timeout == PHY_READ_TO) 8038330: 9a01 ldr r2, [sp, #4] 8038332: 4b76 ldr r3, [pc, #472] ; (803850c ) 8038334: 429a cmp r2, r3 8038336: d0e4 beq.n 8038302 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 8038338: 2100 movs r1, #0 /* Enable Auto-Negotiation */ if(!(ETH_WritePHYRegister(PHYAddress, PHY_BCR, PHY_AutoNegotiation))) 803833a: 4630 mov r0, r6 803833c: f44f 5280 mov.w r2, #4096 ; 0x1000 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 8038340: 9101 str r1, [sp, #4] /* Enable Auto-Negotiation */ if(!(ETH_WritePHYRegister(PHYAddress, PHY_BCR, PHY_AutoNegotiation))) 8038342: f7ff ff81 bl 8038248 8038346: 2800 cmp r0, #0 8038348: d0db beq.n 8038302 /* 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)); 803834a: 4d6f ldr r5, [pc, #444] ; (8038508 ) } /* Wait until the auto-negotiation will be completed */ do { timeout++; 803834c: 9b01 ldr r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_AutoNego_Complete) && (timeout < (uint32_t)PHY_READ_TO)); 803834e: 4630 mov r0, r6 } /* Wait until the auto-negotiation will be completed */ do { timeout++; 8038350: 3301 adds r3, #1 } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_AutoNego_Complete) && (timeout < (uint32_t)PHY_READ_TO)); 8038352: 2101 movs r1, #1 } /* Wait until the auto-negotiation will be completed */ do { timeout++; 8038354: 9301 str r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_AutoNego_Complete) && (timeout < (uint32_t)PHY_READ_TO)); 8038356: f7ff ff4b bl 80381f0 803835a: f000 0020 and.w r0, r0, #32 803835e: b280 uxth r0, r0 8038360: b910 cbnz r0, 8038368 8038362: 9b01 ldr r3, [sp, #4] 8038364: 42ab cmp r3, r5 8038366: d9f1 bls.n 803834c /* Return ERROR in case of timeout */ if(timeout == PHY_READ_TO) 8038368: 9a01 ldr r2, [sp, #4] 803836a: 4b68 ldr r3, [pc, #416] ; (803850c ) 803836c: 429a cmp r2, r3 803836e: d0c8 beq.n 8038302 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 8038370: 2500 movs r5, #0 /* Read the result of the auto-negotiation */ RegValue = ETH_ReadPHYRegister(PHYAddress, PHY_SR); 8038372: 211f movs r1, #31 8038374: 4630 mov r0, r6 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 8038376: 9501 str r5, [sp, #4] /* Read the result of the auto-negotiation */ RegValue = ETH_ReadPHYRegister(PHYAddress, PHY_SR); 8038378: f7ff ff3a bl 80381f0 switch (RegValue & PHY_DUPLEX_SPEED_STATUS_MASK) 803837c: f000 001c and.w r0, r0, #28 8038380: 2808 cmp r0, #8 8038382: d00b beq.n 803839c 8038384: d802 bhi.n 803838c 8038386: 2804 cmp r0, #4 8038388: d123 bne.n 80383d2 803838a: e010 b.n 80383ae 803838c: 280e cmp r0, #14 803838e: d00a beq.n 80383a6 8038390: 2812 cmp r0, #18 8038392: d11e bne.n 80383d2 { case PHY_100BTX_FULL: ETH_InitStruct->ETH_Mode = ETH_Mode_FullDuplex; 8038394: f44f 6300 mov.w r3, #2048 ; 0x800 8038398: 6223 str r3, [r4, #32] 803839a: e000 b.n 803839e ETH_InitStruct->ETH_Speed = ETH_Speed_100M; break; case PHY_100BTX_HALF: ETH_InitStruct->ETH_Mode = ETH_Mode_HalfDuplex; 803839c: 6225 str r5, [r4, #32] ETH_InitStruct->ETH_Speed = ETH_Speed_100M; 803839e: f44f 4380 mov.w r3, #16384 ; 0x4000 80383a2: 6163 str r3, [r4, #20] break; 80383a4: e015 b.n 80383d2 case PHY_10M_FULL: ETH_InitStruct->ETH_Mode = ETH_Mode_FullDuplex; 80383a6: f44f 6300 mov.w r3, #2048 ; 0x800 80383aa: 6223 str r3, [r4, #32] 80383ac: e000 b.n 80383b0 ETH_InitStruct->ETH_Speed = ETH_Speed_10M; break; case PHY_10M_HALF: ETH_InitStruct->ETH_Mode = ETH_Mode_HalfDuplex; 80383ae: 6225 str r5, [r4, #32] ETH_InitStruct->ETH_Speed = ETH_Speed_10M; 80383b0: 6165 str r5, [r4, #20] break; 80383b2: e00e b.n 80383d2 break; } } else { if(!ETH_WritePHYRegister(PHYAddress, PHY_BCR, ((uint16_t)(ETH_InitStruct->ETH_Mode >> 3) | 80383b4: 6a22 ldr r2, [r4, #32] (uint16_t)(ETH_InitStruct->ETH_Speed >> 1)))) 80383b6: 6963 ldr r3, [r4, #20] break; } } else { if(!ETH_WritePHYRegister(PHYAddress, PHY_BCR, ((uint16_t)(ETH_InitStruct->ETH_Mode >> 3) | 80383b8: 08d2 lsrs r2, r2, #3 80383ba: ea42 0253 orr.w r2, r2, r3, lsr #1 80383be: 4630 mov r0, r6 80383c0: b292 uxth r2, r2 80383c2: f7ff ff41 bl 8038248 80383c6: 2800 cmp r0, #0 80383c8: d09b beq.n 8038302 { /* Return ERROR in case of write timeout */ return ETH_ERROR; } /* Delay to assure PHY configuration */ _eth_delay_(PHY_CONFIG_DELAY); 80383ca: f06f 407f mvn.w r0, #4278190080 ; 0xff000000 80383ce: f7ff fd0b bl 8037de8 } /*------------------------ ETHERNET MACCR Configuration --------------------*/ /* Get the ETHERNET MACCR value */ tmpreg = ETH->MACCR; 80383d2: 4b43 ldr r3, [pc, #268] ; (80384e0 ) /* Clear WD, PCE, PS, TE and RE bits */ tmpreg &= MACCR_CLEAR_MASK; 80383d4: 4a4e ldr r2, [pc, #312] ; (8038510 ) _eth_delay_(PHY_CONFIG_DELAY); } /*------------------------ ETHERNET MACCR Configuration --------------------*/ /* Get the ETHERNET MACCR value */ tmpreg = ETH->MACCR; 80383d6: 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 | 80383d8: 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; 80383da: 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 | 80383dc: 6861 ldr r1, [r4, #4] 80383de: 4308 orrs r0, r1 ETH_InitStruct->ETH_Jabber | 80383e0: 68e1 ldr r1, [r4, #12] 80383e2: 4308 orrs r0, r1 ETH_InitStruct->ETH_InterFrameGap | 80383e4: 6921 ldr r1, [r4, #16] 80383e6: 4308 orrs r0, r1 ETH_InitStruct->ETH_CarrierSense | 80383e8: 6961 ldr r1, [r4, #20] 80383ea: 4308 orrs r0, r1 ETH_InitStruct->ETH_Speed | 80383ec: 69a1 ldr r1, [r4, #24] 80383ee: 4308 orrs r0, r1 ETH_InitStruct->ETH_ReceiveOwn | 80383f0: 69e1 ldr r1, [r4, #28] 80383f2: 4308 orrs r0, r1 ETH_InitStruct->ETH_LoopbackMode | 80383f4: 6a21 ldr r1, [r4, #32] 80383f6: 4308 orrs r0, r1 ETH_InitStruct->ETH_Mode | 80383f8: 6a61 ldr r1, [r4, #36] ; 0x24 80383fa: 4308 orrs r0, r1 ETH_InitStruct->ETH_ChecksumOffload | 80383fc: 6aa1 ldr r1, [r4, #40] ; 0x28 80383fe: 4308 orrs r0, r1 ETH_InitStruct->ETH_RetryTransmission | 8038400: 6ae1 ldr r1, [r4, #44] ; 0x2c 8038402: 4308 orrs r0, r1 ETH_InitStruct->ETH_AutomaticPadCRCStrip | 8038404: 6b21 ldr r1, [r4, #48] ; 0x30 8038406: 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 | 8038408: 6b61 ldr r1, [r4, #52] ; 0x34 803840a: 4301 orrs r1, r0 803840c: 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; 803840e: 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 | 8038410: 6ba2 ldr r2, [r4, #56] ; 0x38 8038412: 6be1 ldr r1, [r4, #60] ; 0x3c 8038414: 4311 orrs r1, r2 ETH_InitStruct->ETH_SourceAddrFilter | 8038416: 6c22 ldr r2, [r4, #64] ; 0x40 8038418: 4311 orrs r1, r2 ETH_InitStruct->ETH_PassControlFrames | 803841a: 6c62 ldr r2, [r4, #68] ; 0x44 803841c: 4311 orrs r1, r2 ETH_InitStruct->ETH_BroadcastFramesReception | 803841e: 6ca2 ldr r2, [r4, #72] ; 0x48 8038420: 4311 orrs r1, r2 ETH_InitStruct->ETH_DestinationAddrFilter | 8038422: 6ce2 ldr r2, [r4, #76] ; 0x4c 8038424: 4311 orrs r1, r2 ETH_InitStruct->ETH_PromiscuousMode | 8038426: 6d22 ldr r2, [r4, #80] ; 0x50 8038428: 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 | 803842a: 6d62 ldr r2, [r4, #84] ; 0x54 803842c: 430a orrs r2, r1 803842e: 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; 8038430: 6da2 ldr r2, [r4, #88] ; 0x58 8038432: 609a str r2, [r3, #8] /* Write to ETHERNET MACHTLR */ ETH->MACHTLR = (uint32_t)ETH_InitStruct->ETH_HashTableLow; 8038434: 6de2 ldr r2, [r4, #92] ; 0x5c 8038436: 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) | 8038438: 6e62 ldr r2, [r4, #100] ; 0x64 803843a: 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; 803843c: 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) | 803843e: 4311 orrs r1, r2 ETH_InitStruct->ETH_ZeroQuantaPause | 8038440: 6ee2 ldr r2, [r4, #108] ; 0x6c 8038442: 4311 orrs r1, r2 ETH_InitStruct->ETH_PauseLowThreshold | 8038444: 6f22 ldr r2, [r4, #112] ; 0x70 8038446: 4311 orrs r1, r2 ETH_InitStruct->ETH_UnicastPauseFrameDetect | 8038448: 6f62 ldr r2, [r4, #116] ; 0x74 803844a: 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; 803844c: f64f 7241 movw r2, #65345 ; 0xff41 8038450: 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) | 8038452: 430a orrs r2, r1 8038454: 6e21 ldr r1, [r4, #96] ; 0x60 8038456: 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; 803845a: 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 | 803845c: 6fe1 ldr r1, [r4, #124] ; 0x7c 803845e: 6fa2 ldr r2, [r4, #120] ; 0x78 8038460: 430a orrs r2, r1 8038462: 61da str r2, [r3, #28] ETH_InitStruct->ETH_VLANTagIdentifier); /*-------------------------------- DMA Config ------------------------------*/ /*----------------------- ETHERNET DMAOMR Configuration --------------------*/ /* Get the ETHERNET DMAOMR value */ tmpreg = ETH->DMAOMR; 8038464: f503 5380 add.w r3, r3, #4096 ; 0x1000 /* Clear xx bits */ tmpreg &= DMAOMR_CLEAR_MASK; 8038468: 4a2a ldr r2, [pc, #168] ; (8038514 ) ETH_InitStruct->ETH_VLANTagIdentifier); /*-------------------------------- DMA Config ------------------------------*/ /*----------------------- ETHERNET DMAOMR Configuration --------------------*/ /* Get the ETHERNET DMAOMR value */ tmpreg = ETH->DMAOMR; 803846a: 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 | 803846c: 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; 8038470: 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 | 8038472: f8d4 1080 ldr.w r1, [r4, #128] ; 0x80 8038476: 4308 orrs r0, r1 ETH_InitStruct->ETH_ReceiveStoreForward | 8038478: f8d4 1088 ldr.w r1, [r4, #136] ; 0x88 803847c: 4308 orrs r0, r1 ETH_InitStruct->ETH_FlushReceivedFrame | 803847e: f8d4 108c ldr.w r1, [r4, #140] ; 0x8c 8038482: 4308 orrs r0, r1 ETH_InitStruct->ETH_TransmitStoreForward | 8038484: f8d4 1090 ldr.w r1, [r4, #144] ; 0x90 8038488: 4308 orrs r0, r1 ETH_InitStruct->ETH_TransmitThresholdControl | 803848a: f8d4 1094 ldr.w r1, [r4, #148] ; 0x94 803848e: 4308 orrs r0, r1 ETH_InitStruct->ETH_ForwardErrorFrames | 8038490: f8d4 1098 ldr.w r1, [r4, #152] ; 0x98 8038494: 4308 orrs r0, r1 ETH_InitStruct->ETH_ForwardUndersizedGoodFrames | 8038496: f8d4 109c ldr.w r1, [r4, #156] ; 0x9c 803849a: 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 | 803849c: f8d4 10a0 ldr.w r1, [r4, #160] ; 0xa0 80384a0: 4301 orrs r1, r0 80384a2: 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; 80384a4: 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 | 80384a6: f8d4 20a8 ldr.w r2, [r4, #168] ; 0xa8 80384aa: f8d4 10a4 ldr.w r1, [r4, #164] ; 0xa4 80384ae: 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 */ 80384b0: 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 | 80384b4: 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 */ 80384b8: 4311 orrs r1, r2 ETH_InitStruct->ETH_TxDMABurstLength | 80384ba: f8d4 20b0 ldr.w r2, [r4, #176] ; 0xb0 80384be: 4311 orrs r1, r2 (ETH_InitStruct->ETH_DescriptorSkipLength << 2) | 80384c0: f8d4 20b8 ldr.w r2, [r4, #184] ; 0xb8 80384c4: 430a orrs r2, r1 80384c6: 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 | 80384ca: ea42 0281 orr.w r2, r2, r1, lsl #2 80384ce: 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; 80384d0: 681a ldr r2, [r3, #0] 80384d2: f042 0280 orr.w r2, r2, #128 ; 0x80 80384d6: 601a str r2, [r3, #0] #endif /* USE_ENHANCED_DMA_DESCRIPTORS */ /* Return Ethernet configuration success */ return ETH_SUCCESS; 80384d8: 2001 movs r0, #1 } 80384da: b007 add sp, #28 80384dc: bdf0 pop {r4, r5, r6, r7, pc} 80384de: bf00 nop 80384e0: 40028000 .word 0x40028000 80384e4: feced300 .word 0xfeced300 80384e8: 00e4e1bf .word 0x00e4e1bf 80384ec: fde9f140 .word 0xfde9f140 80384f0: 017d783f .word 0x017d783f 80384f4: fc6c7900 .word 0xfc6c7900 80384f8: 026259ff .word 0x026259ff 80384fc: fa0a1f00 .word 0xfa0a1f00 8038500: 02faf07f .word 0x02faf07f 8038504: 000fffff .word 0x000fffff 8038508: 0004fffe .word 0x0004fffe 803850c: 0004ffff .word 0x0004ffff 8038510: ff20810f .word 0xff20810f 8038514: f8de3f23 .word 0xf8de3f23 08038518 <_sbrk>: extern char _ebss; // Defined by the linker extern char __bss_end__; static char *heap_end; char *prev_heap_end; if (heap_end == 0) { 8038518: 4b0a ldr r3, [pc, #40] ; (8038544 <_sbrk+0x2c>) 803851a: 681a ldr r2, [r3, #0] 803851c: b90a cbnz r2, 8038522 <_sbrk+0xa> //heap_end = &_ebss; heap_end = &__bss_end__; 803851e: 4a0a ldr r2, [pc, #40] ; (8038548 <_sbrk+0x30>) 8038520: 601a str r2, [r3, #0] } prev_heap_end = heap_end; 8038522: 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) ); 8038524: f3ef 8208 mrs r2, MSP char * stack = (char*) __get_MSP(); if (heap_end + incr > stack) 8038528: 1818 adds r0, r3, r0 803852a: 4290 cmp r0, r2 803852c: d905 bls.n 803853a <_sbrk+0x22> { _write (STDERR_FILENO, "Heap and stack collision\n", 25); errno = ENOMEM; 803852e: 4b07 ldr r3, [pc, #28] ; (803854c <_sbrk+0x34>) 8038530: 220c movs r2, #12 8038532: 601a str r2, [r3, #0] return (caddr_t) -1; 8038534: f04f 33ff mov.w r3, #4294967295 8038538: e001 b.n 803853e <_sbrk+0x26> //abort (); } heap_end += incr; 803853a: 4a02 ldr r2, [pc, #8] ; (8038544 <_sbrk+0x2c>) 803853c: 6010 str r0, [r2, #0] return (caddr_t) prev_heap_end; } 803853e: 4618 mov r0, r3 8038540: 4770 bx lr 8038542: bf00 nop 8038544: 2000c808 .word 0x2000c808 8038548: 2001393c .word 0x2001393c 803854c: 20013838 .word 0x20013838 08038550 : .weak Reset_Handler .type Reset_Handler, %function Reset_Handler: /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 8038550: 2100 movs r1, #0 b LoopCopyDataInit 8038552: f000 b804 b.w 803855e 08038556 : CopyDataInit: ldr r3, =_sidata 8038556: 4b0d ldr r3, [pc, #52] ; (803858c ) ldr r3, [r3, r1] 8038558: 585b ldr r3, [r3, r1] str r3, [r0, r1] 803855a: 5043 str r3, [r0, r1] adds r1, r1, #4 803855c: 3104 adds r1, #4 0803855e : LoopCopyDataInit: ldr r0, =_sdata 803855e: 480c ldr r0, [pc, #48] ; (8038590 ) ldr r3, =_edata 8038560: 4b0c ldr r3, [pc, #48] ; (8038594 ) adds r2, r0, r1 8038562: 1842 adds r2, r0, r1 cmp r2, r3 8038564: 429a cmp r2, r3 bcc CopyDataInit 8038566: f4ff aff6 bcc.w 8038556 ldr r2, =_sbss 803856a: 4a0b ldr r2, [pc, #44] ; (8038598 ) b LoopFillZerobss 803856c: f000 b803 b.w 8038576 08038570 : /* Zero fill the bss segment. */ FillZerobss: movs r3, #0 8038570: 2300 movs r3, #0 str r3, [r2], #4 8038572: f842 3b04 str.w r3, [r2], #4 08038576 : LoopFillZerobss: ldr r3, = _ebss 8038576: 4b09 ldr r3, [pc, #36] ; (803859c ) cmp r2, r3 8038578: 429a cmp r2, r3 bcc FillZerobss 803857a: f4ff aff9 bcc.w 8038570 /* Call the clock system intitialization function.*/ bl SystemInit 803857e: f7ed fda3 bl 80260c8 /* Call static constructors */ bl __libc_init_array 8038582: f7e9 faf5 bl 8021b70 <__libc_init_array> /* Call the application's entry point.*/ bl main 8038586: f7ee fe5d bl 8027244
bx lr 803858a: 4770 bx lr /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 b LoopCopyDataInit CopyDataInit: ldr r3, =_sidata 803858c: 08044b5c .word 0x08044b5c ldr r3, [r3, r1] str r3, [r0, r1] adds r1, r1, #4 LoopCopyDataInit: ldr r0, =_sdata 8038590: 20000000 .word 0x20000000 ldr r3, =_edata 8038594: 20000ab4 .word 0x20000ab4 adds r2, r0, r1 cmp r2, r3 bcc CopyDataInit ldr r2, =_sbss 8038598: 20000ab4 .word 0x20000ab4 FillZerobss: movs r3, #0 str r3, [r2], #4 LoopFillZerobss: ldr r3, = _ebss 803859c: 2001393c .word 0x2001393c 080385a0 : * @retval None */ .section .text.Default_Handler,"ax",%progbits Default_Handler: Infinite_Loop: b Infinite_Loop 80385a0: f7ff bffe b.w 80385a0 080385a4 <_ctype_>: 80385a4: 2000 2020 2020 2020 2020 2828 2828 2028 . ((((( 80385b4: 2020 2020 2020 2020 2020 2020 2020 2020 80385c4: 8820 1010 1010 1010 1010 1010 1010 1010 ............... 80385d4: 0410 0404 0404 0404 0404 1004 1010 1010 ................ 80385e4: 1010 4141 4141 4141 0101 0101 0101 0101 ..AAAAAA........ 80385f4: 0101 0101 0101 0101 0101 0101 1010 1010 ................ 8038604: 1010 4242 4242 4242 0202 0202 0202 0202 ..BBBBBB........ 8038614: 0202 0202 0202 0202 0202 0202 1010 1010 ................ 8038624: 0020 0000 0000 0000 0000 0000 0000 0000 ............... 8038634: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8038644: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8038654: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8038664: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8038674: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8038684: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8038694: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80386a4: 0000 0000 .... 080386a8 : 80386a8: 89bc 97d8 d2b2 3c9c a733 d5a8 f623 3949 .......<3...#.I9 80386b8: a73d 44f4 0ffd 32a5 979d cf8c ba08 255b =..D...2......[% 80386c8: 6f43 64ac 0628 0e18 Co.d(... 080386d0 : 80386d0: 0005 0000 0019 0000 007d 0000 0000 0000 ........}....... 080386e0 <__mprec_tens>: 80386e0: 0000 0000 0000 3ff0 0000 0000 0000 4024 .......?......$@ 80386f0: 0000 0000 0000 4059 0000 0000 4000 408f ......Y@.....@.@ 8038700: 0000 0000 8800 40c3 0000 0000 6a00 40f8 .......@.....j.@ 8038710: 0000 0000 8480 412e 0000 0000 12d0 4163 .......A......cA 8038720: 0000 0000 d784 4197 0000 0000 cd65 41cd .......A....e..A 8038730: 0000 2000 a05f 4202 0000 e800 4876 4237 ... _..B....vH7B 8038740: 0000 a200 1a94 426d 0000 e540 309c 42a2 ......mB..@..0.B 8038750: 0000 1e90 bcc4 42d6 0000 2634 6bf5 430c .......B..4&.k.C 8038760: 8000 37e0 c379 4341 a000 85d8 3457 4376 ...7y.AC....W4vC 8038770: c800 674e c16d 43ab 3d00 6091 58e4 43e1 ..Ngm..C.=.`.X.C 8038780: 8c40 78b5 af1d 4415 ef50 d6e2 1ae4 444b @..x...DP.....KD 8038790: d592 064d f0cf 4480 4af6 c7e1 2d02 44b5 ..M....D.J...-.D 80387a0: 9db4 79d9 7843 44ea ...yCx.D 080387a8 <__mprec_tinytens>: 80387a8: 89bc 97d8 d2b2 3c9c a733 d5a8 f623 3949 .......<3...#.I9 80387b8: a73d 44f4 0ffd 32a5 979d cf8c ba08 255b =..D...2......[% 80387c8: 6f43 64ac 0628 0ac8 Co.d(... 080387d0 <__mprec_bigtens>: 80387d0: 8000 37e0 c379 4341 6e17 b505 b8b5 4693 ...7y.AC.n.....F 80387e0: f9f5 e93f 4f03 4d38 1d32 f930 7748 5a82 ..?..O8M2.0.Hw.Z 80387f0: bf3c 7f73 4fdd 7515 a1d0 b1d0 80d1 bed0 <.s..O.u........ 8038800: 81d1 d020 20ba b7d0 b0d0 b2d0 bed0 b4d0 .. .. .......... 8038810: 81d1 bad0 bed0 bcd0 83d1 4c00 4445 425f ...........LED_B 8038820: 696c 6b6e 4200 7475 6f74 736e 5500 5350 link.Buttons.UPS 8038830: 4d5f 6e6f 7469 726f 7300 6d6e 5370 7379 _Monitor.snmpSys 8038840: 7055 6954 656d 7300 6d6e 5470 6172 5470 UpTime.snmpTrapT 8038850: 7365 0074 6e73 7074 6e4f 6563 6953 686e est.sntpOnceSinh 8038860: 6f72 7300 746e 5070 7265 6f69 6964 5363 ro.sntpPeriodicS 8038870: 6e69 7268 006f 6e49 7469 6154 6b73 4800 inhro.InitTask.H 8038880: 7261 4664 7561 746c 0a3a 000d 0d0a 6552 ardFault:.....Re 8038890: 6967 7473 7265 3a73 0d0a 5300 2050 2020 gisters:...SP 80388a0: 2020 2020 2020 3020 2578 3830 786c 0d0a 0x%08lx.. 80388b0: 5200 2030 2020 2020 2020 2020 3020 2578 .R0 0x% 80388c0: 3830 786c 0d0a 5200 2031 2020 2020 2020 08lx...R1 80388d0: 2020 3020 2578 3830 786c 0d0a 5200 2032 0x%08lx...R2 80388e0: 2020 2020 2020 2020 3020 2578 3830 786c 0x%08lx 80388f0: 0d0a 5200 2033 2020 2020 2020 2020 3020 ...R3 0 8038900: 2578 3830 786c 0d0a 5200 3231 2020 2020 x%08lx...R12 8038910: 2020 2020 3020 2578 3830 786c 0d0a 4c00 0x%08lx...L 8038920: 2052 2020 2020 2020 2020 3020 2578 3830 R 0x%08 8038930: 786c 0d0a 5000 2043 2020 2020 2020 2020 lx...PC 8038940: 3020 2578 3830 786c 0d0a 5000 5253 2020 0x%08lx...PSR 8038950: 2020 2020 2020 3020 2578 3830 786c 0d0a 0x%08lx.. 8038960: 2500 2e30 6631 2500 0064 3025 6934 252d .%0.1f.%d.%04i-% 8038970: 3230 2d69 3025 6932 2500 2064 b4d0 bdd0 02i-%02i.%d .... 8038980: 202e 6425 d120 2e87 2520 2064 bcd0 b8d0 . %d ... %d .... 8038990: bdd0 002e 2e31 0030 6146 736c 0065 7274 ....1.0.False.tr 80389a0: 6575 6600 6c61 6573 6f00 006e 302d 2d31 ue.false.on.-01- 80389b0: 3025 6932 253a 3230 0069 3025 6932 252d %02i:%02i.%02i-% 80389c0: 3230 2d69 3025 6932 302d 2d31 3100 3239 02i-%02i-01-.192 80389d0: 312e 3836 312e 382e 3100 3239 312e 3836 .168.1.8.192.168 80389e0: 312e 312e 3200 3535 322e 3535 322e 3535 .1.1.255.255.255 80389f0: 302e 3100 3239 312e 3836 312e 322e 7000 .0.192.168.1.2.p 8038a00: 6275 696c 0063 5442 3736 3230 3000 302e ublic.BT6702.0.0 8038a10: 302e 302e 3000 2e39 3031 322e 3130 0035 .0.0.09.10.2015. 8038a20: 4345 342d 2d43 4434 302d 2d30 3030 302d EC-4C-4D-00-00-0 8038a30: 0041 4e4b 302d 2d33 3030 3030 0033 6461 A.KN-03-00003.ad 8038a40: 696d 006e 3231 3433 0035 7375 7265 3100 min.12345.user.1 8038a50: 3332 0034 3838 312e 3734 322e 3435 322e 234.88.147.254.2 8038a60: 3533 6e00 6e6f 0065 3231 2e37 2e30 2e30 35.none.127.0.0. 8038a70: 0031 a3d0 81d1 bfd0 b5d0 88d1 bdd0 bed0 1............... 8038a80: 5400 4f32 004b 90d0 b4d0 bcd0 b8d0 bdd0 .T2OK........... 8038a90: b8d0 81d1 82d1 80d1 b0d0 82d1 bed0 80d1 ................ 8038aa0: 2500 3073 6625 000d 7325 252e 0d66 2500 .%s0%f..%s.%f..% 8038ab0: 2573 0d66 2500 2e73 6425 7325 6425 000d s%f..%s.%d%s%d.. 8038ac0: 0020 5452 504d 4920 0049 4341 004b 434e .RTMP II.ACK.NC 8038ad0: 004b 6572 7571 7365 5f74 6174 6b73 5100 K.request_task.Q 8038ae0: 0d31 5400 0d4c 5400 5100 000d 0053 0052 1..TL..T.Q..S.R. 8038af0: 0d43 4300 0d54 4900 000d 0d46 5100 0d32 C..CT..I..F..Q2. 8038b00: d000 d090 d0b2 d1b0 d080 d1b8 008f 9dd0 ................ 8038b10: bed0 80d1 bcd0 b0d0 d000 d097 d0b0 d0bc ................ 8038b20: d0ba d1bd d183 d082 00be a0d0 b0d0 b7d0 ................ 8038b30: bed0 bcd0 bad0 bdd0 83d1 82d1 bed0 6c00 ...............l 8038b40: 676f 745f 7361 006b 3025 6932 252e 3230 og_task.%02i.%02 8038b50: 2e69 3025 6932 2520 3230 3a69 3025 6932 i.%02i %02i:%02i 8038b60: 253a 3230 0069 2c22 3b00 d000 d09f d1b5 :%02i.",.;...... 8038b70: d080 d0b5 d0b7 d0b0 d1b3 d180 d083 d0b7 ................ 8038b80: d0ba 20b0 bad0 bed0 bdd0 82d1 80d1 bed0 ... ............ 8038b90: bbd0 bbd0 b5d0 80d1 b0d0 d000 d0a1 d1b1 ................ 8038ba0: d080 d1be 2081 bdd0 b0d0 81d1 82d1 80d1 ..... .......... 8038bb0: bed0 b5d0 bad0 d000 d09e d0b1 d0bd d0be ................ 8038bc0: d0b2 d0bb d0b5 d0bd d0b8 20b5 9fd0 9ed0 ........... .... 8038bd0: d000 d0a1 d0bc d0b5 d0bd 20b0 bfd0 b0d0 ........... .... 8038be0: 80d1 bed0 bbd0 8fd1 d000 d0a1 d1be d185 ................ 8038bf0: d080 d0b0 d0bd d0b5 d0bd d0b8 20b5 bdd0 ............. .. 8038c00: b0d0 81d1 82d1 80d1 bed0 b5d0 bad0 d000 ................ 8038c10: d090 d1b2 d082 d1be d080 d0b8 d0b7 d1b0 ................ 8038c20: d086 d1b8 008f a2d0 b5d0 81d1 82d1 d020 .............. . 8038c30: d098 d091 009f 9ed0 82d1 bad0 bbd0 202e ............... 8038c40: bdd0 b0d0 b3d0 80d1 83d1 b7d0 bad0 b8d0 ................ 8038c50: d020 d098 d091 009f 90d0 b2d0 b0d0 80d1 ............... 8038c60: b8d0 8fd1 d020 d0b4 d1b8 d081 d1ba 2e80 .... ........... 8038c70: d020 d1b2 d085 d0be d0b4 20b0 0031 a1d0 .......... 1... 8038c80: bed0 81d1 82d1 bed0 8fd1 bdd0 b8d0 b5d0 ................ 8038c90: d020 d1b2 d18b d085 d0be d0b4 20b0 0031 ............ 1. 8038ca0: a1d0 bed0 81d1 82d1 bed0 8fd1 bdd0 b8d0 ................ 8038cb0: b5d0 d020 d1b2 d18b d085 d0be d0b4 20b0 .. ............ 8038cc0: 0032 90d0 b2d0 b0d0 80d1 b8d0 8fd1 d120 2............. . 8038cd0: d082 d0b5 d0bc d0bf d1b5 d080 d1b0 d182 ................ 8038ce0: d183 d180 008b 90d0 b2d0 b0d0 80d1 b8d0 ................ 8038cf0: 8fd1 d020 d1b2 2e85 d020 d0bd d0b0 d1bf .. ..... ....... 8038d00: d180 d08f d0b6 d0b5 d0bd d1b8 008f 9dd0 ................ 8038d10: b8d0 b7d0 bad0 b8d0 b9d0 d020 d0b7 d1b0 .......... ..... 8038d20: d180 d08f 20b4 90d0 9ad0 91d0 d000 d090 ..... .......... 8038d30: d0b2 d1b0 d080 d1b8 208f bdd0 b0d0 b3d0 ......... ...... 8038d40: 80d1 83d1 b7d0 bad0 b8d0 d000 d090 d0b2 ................ 8038d50: d1b0 d080 d1b8 208f 81d1 b2d0 8fd1 b7d0 ....... ........ 8038d60: b8d0 d120 2081 98d0 91d0 9fd0 d000 d090 .. .. .......... 8038d70: d0b2 d1b0 d080 d1b8 208f bed0 82d1 bad0 ......... ...... 8038d80: bbd0 8ed1 87d1 b5d0 bdd0 b8d0 8fd1 d020 .............. . 8038d90: d090 d09a 0091 6972 676e 7366 615f 7070 ......ringfs_app 8038da0: 6e65 3a64 6320 726f 7572 7470 6465 6620 end: corrupted f 8038db0: 6c69 7365 7379 6574 0d6d 000a 4449 454c ilesystem...IDLE 8038dc0: 0900 6325 2509 0975 7525 2509 0d75 000a ..%c.%u.%u.%u... 8038dd0: 6d54 2072 7653 0063 Tmr Svc. 08038dd8 : 8038dd8: 722f 746f 6b65 702e 676e 0000 5448 5054 /rotek.png..HTTP 8038de8: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 8038df8: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 8038e08: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 8038e18: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 8038e28: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 8038e38: 6e65 2d74 654c 676e 6874 203a 3935 3935 ent-Length: 5959 8038e48: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 8038e58: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 8038e68: 3a65 6920 616d 6567 702f 676e 0a0d 6143 e: image/png..Ca 8038e78: 6863 2d65 6f43 746e 6f72 3a6c 7020 6972 che-Control: pri 8038e88: 6176 6574 202c 616d 2d78 6761 3d65 3638 vate, max-age=86 8038e98: 3034 0d30 0d0a 890a 4e50 0d47 1a0a 000a 400.....PNG..... 8038ea8: 0000 490d 4448 0052 0100 0057 0000 08ae ...IHDR...W..... 8038eb8: 0006 0000 db82 7d4e 0000 0e17 4449 5441 ......N}....IDAT 8038ec8: da78 9ded ac7d 672c c059 a1cf 7a80 3285 x...}.,gY....z.2 8038ed8: 4b45 1014 4db6 a62d ae0a b68a 52d8 45c7 EK...M-......R.E 8038ee8: 4131 1b2d 1045 0b7a 7a53 bc69 6060 634d 1A-.E.z.Szi.``Mc 8038ef8: d894 c326 6c55 d2ac c6c5 285e 2c91 951f ..&.Ul....^(.,.. 8038f08: 4a92 885d 4ad5 dd02 6a3f 9352 1ba2 36ac .J]..J..?jR....6 8038f18: a246 011b 6d69 e76b 72d2 71fb 7729 df7d F...imk..r.q)w}. 8038f28: 7793 9c75 cece 9fbc b333 7e7b fc7f 6f72 .wu.....3.{~..ro 8038f38: 39ce fb3b bf39 e67d 9e79 79f7 9677 e5cb .9;.9.}.y..yw... 8038f48: 000e f800 1785 0001 b900 0002 5720 0000 ............ W.. 8038f58: 0ae4 0000 15c8 0000 02b9 2000 0057 4000 ........... W..@ 8038f68: 00ae c800 0015 b900 0002 7200 0005 ae40 ...........r..@. 8038f78: 0000 15c8 0000 2b90 0000 0572 4000 00ae .......+..r..@.. 8038f88: 8000 015c 9000 002b 7200 0005 e400 000a ..\...+..r...... 8038f98: 5c80 0001 2b90 0000 5720 0000 0ae4 8000 .\...+.. W...... 8038fa8: 015c 0000 02b9 2000 0057 e400 000a c800 \...... W....... 8038fb8: 0015 b900 0002 5720 0000 eae4 c19f 5f6b ...... W......k_ 8038fc8: 96b7 8fdd bede 440d 3882 9a47 ff23 def3 .......D.8G.#... 8038fd8: 3c96 d6df ed38 377d 7e56 009e c824 3375 .<..8.}7V~..$.u3 8038fe8: dae5 8c17 1304 5cc1 b4b0 de40 aa6e 138e .......\..@.n... 8038ff8: 4d23 0ae4 75c8 ca3f 4655 89a5 6192 2966 #M...u?.UF...af) 8039008: 3ad3 7532 44fc 1fdd 4522 80ae b75c ae56 .:2u.D.."E..\.V. 8039018: 8ab1 974e 202d 3b45 a644 15c8 eb90 c936 ..N.- E;D.....6. 8039028: 4655 8b8f a496 645a 3441 5c8b b901 ba6e UF....ZdA4.\..n. 8039038: bb5c d524 b4b2 08c1 22b9 4057 9bae d724 \.$......"W@..$. 8039048: a1d8 5530 2cc5 2450 231b e457 c801 cbb5 ..0U.,P$.#W..... 8039058: 9572 da97 0763 cdd1 edd5 1557 48ff 5db3 r...c.....W..H.] 8039068: 512b 9bb7 e63b 2364 0ae4 5c80 26bb bed7 +Q..;.d#...\.&.. 8039078: 0a45 5320 ae05 47a1 45b1 78ea 8b13 844e E. S...G.E.x..N. 8039088: 3f6c bd16 2b90 d720 caee 6475 7971 54df l?...+ ...udqy.T 8039098: 2951 48b1 8c27 2b91 7200 5b6d 13ae a943 Q).H'..+.rm[..C. 80390a8: 95b6 ecdf 3c59 08d6 02b9 d720 e5a6 191a ....Y<.... ..... 80390b8: 38e4 1d67 1a2a 0cf5 d922 7ef9 2c10 0572 .8g.*..."..~.,r. 80390c8: dae4 b91d 8aea b5d5 a9dd 9857 1023 9c7b ..........W.#.{. 80390d8: 302b ccd4 cec9 7db7 017e 0572 dae4 b90d +0.....}~.r..... 80390e8: 8aea 6675 a521 caa1 ce77 722c 63b8 c28b ..uf!...w.,r.c.. 80390f8: a458 04ba 75f6 8b04 015c b6b9 572f b15d X....u..\.../W]. 8039108: 86a6 9d42 faee ea5f 189a bd16 adf6 9160 ..B..._.......`. 8039118: 202b 4d57 06b9 ec14 53d4 532b d2a4 a105 + WM.....S+S.... 8039128: 6f57 4a65 3af4 ec52 a46b e609 15c8 2b90 WoeJ.:R.k......+ 8039138: f572 58cd 6443 8efd 892e 34cd 69a3 c11d r..XCd.....4.i.. 8039148: 904e 202b e457 8bea 07a1 f6b1 2d03 f55f N.+ W........-_. 8039158: d4bd 4755 09b0 0572 8ae4 7d5c 59e4 4733 ..UG..r...\}.Y3G 8039168: 8eb1 bb76 b435 7525 6c14 4db6 041d 15c8 ..v.5.%u.l.M.... 8039178: ab90 5c81 0a3d 2eb6 1acf 88d7 6279 9059 ...\=.......ybY. 8039188: 6b4a 0be6 e6ac 8c0a 872c d76e 122d 13a8 Jk......,.n.-... 8039198: 0cec 02b9 4572 a1ae 01d2 4f23 0c8b 4bf2 ....rE....#O...K 80391a8: 5d62 af1f e749 5d41 4007 f0e2 91fc 202b b]..I.A].@....+ 80391b8: e457 56ba 8b8e e89a 87d2 2758 2e01 4db1 W..V......X'...M 80391c8: ba96 09d6 5c76 1e93 9088 202b 7dd7 5726 ....v\....+ .}&W 80391d8: c147 35a6 a185 51c8 f3ac 9606 eac4 752e G..5...Q.......u 80391e8: 13ad 7cec bb9b 9007 202b e6d7 5ae4 c457 ...|....+ ...ZW. 80391f8: 1d8a b472 8ba6 9a0c da9a af35 bfc9 dd56 ..r.......5...V. 8039208: 87b6 015c eeb9 b933 0a5a b536 074c 01a4 ..\...3.Z.6.L... 8039218: a5e6 9e46 0ae6 f6b8 8eb0 35b7 457a 80ae ..F........5zE.. 8039228: 9b5c 6b91 d45d abda dad8 c7c5 8322 2155 \..k].......".U! 8039238: 6749 b5d8 f6e9 3ad9 1d82 7e7a 905d 202b Ig.....:..z~].+ 8039248: 6dd7 ab95 60a1 8b13 f9cb e2ba 8e97 2358 .m...`........X# 8039258: fc75 376c 52ec 9d57 d61e 22c8 f732 ea91 u.l7.RW...."2... 8039268: 0d58 f1ad 58c5 ae3d 2ab4 afda 6b91 8824 X....X=..*...k$. 8039278: a905 2c60 8198 9277 6bc2 323e bdbc 07ae ..`,..w..k>2.... 8039288: de5c 1ebf 7572 ec17 22c2 ab3a 074b 1ac4 \...ru...":.K... 8039298: 542d 52b6 19b5 5873 d827 4589 baf4 20f0 -T.R..sX'..E... 80392a8: a6d7 a956 f38d 65ef 5c89 7523 cf82 4b05 ..V....e.\#u...K 80392b8: ce08 f0a8 cffa 6e0c 2bab 89d7 63e5 04cb .......n.+...c.. 80392c8: 227d 7757 f6b9 842d 73d3 85ec 049d 4892 }"Ww..-..s.....H 80392d8: 22dd c481 48b2 5a95 14a4 5f5c 50fb d7c8 ."...H.Z..\_.P.. 80392e8: ca3e b5c9 70e7 8212 713d 5ce1 0ccd 3b6e >....p..=q.\..n; 80392f8: 280e c5d6 ac4a d5c8 b05d 4555 be9b 36c5 .(..J...].UE...6 8039308: 332f 8b8f 6c0c 9377 2c8d 1b3b be6c 5c4c /3...lw..,;.l.L\ 8039318: 5b0a ddc3 e696 082d c6b9 24ea 7445 90ed .[....-....$Et.. 8039328: 473f 8e7b 6f51 0af1 f6c4 63ea 6eae ce4f ?G{.Qo.....c.nO. 8039338: 93d5 1760 6d86 914a fae5 26fb aac4 5823 ..`..mJ....&..#X 8039348: 22db b4d5 39e2 e887 0e2b 77ca e07c cb33 ."...9..+..w|.3. 8039358: 5f0b 3177 6b92 4587 fce1 1d8c 5ea3 621f ._w1.k.E.....^.b 8039368: 169d 8ac5 dd5c dae4 b8b3 1fb4 1659 7478 ....\.......Y.xt 8039378: a897 3aae 7a01 8f25 6875 0ab8 a6cb 7607 ...:.z%.uh.....v 8039388: 916c b052 185d dd31 716d cd98 bf99 07fd l.R.].1.mq...... 8039398: ae88 8a1d d339 f0d4 91f6 b167 e84e 7016 ....9.....g.N..p 80393a8: ab6c 9430 cf4c d230 aaad 8fb8 fd76 892e l.0.L.0.....v... 80393b8: 348d cd66 6dd6 bd97 8c30 a344 5d00 8b03 .4f..m..0.D..].. 80393c8: e536 8cfa bd3f d10d 43b5 90ea 5d1f 9c94 6...?....C...].. 80393d8: 7ddb 9cc3 6ead 018a 3ab9 7608 5862 ef05 .}...n...:.vbX.. 80393e8: 885b a7ac 06d1 5b65 8a14 3a35 fa0e 8b1e [.....e[..5:.... 80393f8: 3354 d3cf 5ab2 c51f a3f8 de87 ec85 679a T3...Z.........g 8039408: 3858 e72f 510e 8baf 1358 5cfa ca3d 20b5 X8/..Q..X..\=.. 8039418: 45d8 915d f0a6 a9f7 a445 f13b c8b4 f7c0 .E].....E.;..... 8039428: c098 a2c8 5548 fcf5 be6d 9018 feeb 5fa4 ....HU..m......_ 8039438: 2738 a36d d8de ac52 c959 4063 beae 7ae4 8'm...R.Y.c@...z 8039448: fae0 4ee9 d4dd 57fd e9bc 45ad cf21 f2ea ...N...W...E!... 8039458: 059b d719 6cb5 1af9 52e2 d827 61be 73ce .....l...R'..a.s 8039468: 2161 d344 892f a2c4 accd 508a cd72 9537 a!D./......Pr.7. 8039478: 102f f7a3 814e 65be 99b4 68f8 42b5 feae /...N..e...h.B.. 8039488: dae5 7213 891d 9c76 a4a5 144c eff2 72f2 ...r..v...L....r 8039498: 2715 4ee1 ce5d dcf1 2e4b 8937 7d74 720f .'.N]...K.7.t}.r 80394a8: 5919 a244 8255 0c8b dda3 7038 80a7 61af .YD.U.....8p...a 80394b8: 3a35 cd72 8454 5654 8938 241d 6b1b 5a92 5:r.T.TV8..$.k.Z 80394c8: 0de4 0363 ab4c b1e8 f267 e7af 22d0 b5ea ..c.L...g....".. 80394d8: eb15 cd7c 8a7b 2b5c 845e 87fc 5532 881f ..|.{.\+^...2U.. 80394e8: b455 9b61 598f b90a ab66 88e3 7093 ab26 U.a..Y..f....p&. 80394f8: dfcb d577 f7fb 2c84 795b 62f2 8f91 2563 ..w....,[y.b..c% 8039508: 9cd7 8d60 5f8a f43f dff6 79da afe5 dc1c ..`.._?....y.... 8039518: c9f9 5e37 23ba 6bee 95e7 bfaf ef64 1e98 ..7^.#.k....d... 8039528: 440a 4599 c4b7 593a 9e66 2cbe 8666 6b51 .D.E..:Yf..,f.Qk 8039538: e388 7f2e cde2 56bf 0276 6af6 ba4e 52c8 .......Vv..jN..R 8039548: b1b0 49e6 3a9d 8244 1a3b dd8f f8a5 9be4 ...I.:D.;....... 8039558: e2d4 78f1 b56b ae42 27ff 9ed7 d6fa bb1a ...xk.B..'...... 8039568: d38a f217 14e4 9412 258f 2215 564c 1c97 .........%."LV.. 8039578: e235 8b4a 7d42 a5f9 bebf ae56 1fa2 e773 5.J.B}....V...s. 8039588: 5ffc f64d e67e a970 f7dd cb24 2799 9ab9 ._M.~.p...$..'.. 8039598: fd2c 849d ab92 6443 fb13 4cae 98e7 563a ,.....Cd...L..:V 80395a8: 7dcf ee3e b038 675c 9c0d 13a7 b706 cbd4 .}>.8.\g........ 80395b8: dd35 bc94 9092 5ce4 ba46 5fa7 e1fd 96bd 5......\F.._.... 80395c8: b29f 97e2 a894 5ca9 166b 4444 7d16 a6bb .......\k.DD.}.. 80395d8: 9cb2 8c5a 3465 9c79 e2ae 6ed6 92ef 8def ..Z.e4y....n.... 80395e8: 914d b2c3 6dca 0512 0c2e b223 9190 1462 M....m....#...b. 80395f8: ae58 f3a1 c9d8 a980 db58 d725 08b2 ecf7 X.......X.%..... 8039608: 8e2b 9dec 52d0 e72e 3c1d 2d64 9ad7 7608 +....R..... ..\.. 8039688: d542 5738 4ac0 bf2d f351 9fb7 28f8 5982 B.8W.J-.Q....(.Y 8039698: 10a6 4216 e3ae 6895 e575 26ba 9045 806e ...B...hu..&E.n. 80396a8: 275c 9116 3aeb 3646 68cb 850b 91ac c9e5 \'...:F6.h...... 80396b8: 0717 ab90 2569 34dc d195 eb76 7155 6b86 ....i%.4..v.Uq.k 80396c8: c8c8 4235 0dae 62b7 d019 2753 fc90 a7c0 ..5B...b..S'.... 80396d8: 70aa 0f35 5a2d d119 810a b6f6 ae58 36b3 .p5.-Z......X..6 80396e8: 0e17 d214 4b01 ee8d 2680 3ae5 841e 14eb .....K...&.:.... 80396f8: b7e8 d620 c799 bae7 341c e9dc 5c80 621b .. ......4...\.b 8039708: b425 07dc 1135 dbd2 5ceb 3108 4961 5cca %...5....\.1aI.\ 8039718: 2076 c954 44b5 33b0 82c3 1b53 ed72 5892 v T..D.3..S.r..X 8039728: 0ee7 099f 28d3 e473 b2f9 167d 8d38 fa11 .....(s...}.8... 8039738: 3cf2 8a74 39c2 457a edae 75c8 290f f93d ...6 80397b8: 5791 145d ba15 7fc1 82da e35c f38a edaf .W].......\..... 80397c8: 1a82 0d72 d724 62b4 b91d a8f7 1577 cad9 ..r.$..b....w... 80397d8: aa7c bc8f caad c6ff b905 2d8e cb06 ee84 |..........-.... 80397e8: 6d8b 407d 5cb6 b74d 6a26 6d75 3792 c2f9 .m}@.\M.&jum.7.. 80397f8: 0c5c 6fda 6ff0 3663 d442 a742 8b00 5a08 \..o.oc6B.B....Z 8039808: 6b96 586c 8824 7894 b927 84ee 50c8 7bae .klX$..x'....P.{ 8039818: 009d d2ea f7be 8b8a 1b2f 4929 16ba 620c ......../.)I...b 8039828: 8dcb 6304 de8b 9b52 c37d 1f5a 2d90 d823 ...c..R.}.Z..-#. 8039838: 8235 95b5 30eb 09c0 ba1e bfc1 1ded da07 5....0.......... 8039848: 514c 90f4 736b ed72 445b d904 0f9a f690 LQ..ksr.[D...... 8039858: 59e5 ae4e 423b 7bae d3b9 6895 225d 1fda .YN.;B.{...h]".. 8039868: cb7f 4ce1 15e6 c50d 3a67 b042 a1e7 7fd1 ...L....g:B..... 8039878: 56de ab31 dbd0 2aea d357 fc66 e7a1 6663 .V1....*W.f...cf 8039888: 3b81 4c1b c187 d194 b00f e081 32dc 9f02 .;.L.........2.. 8039898: d720 0b66 a65a b879 a7a9 fa0f 391e eeb9 .f.Z.y......9.. 80398a8: 3ffd 8b97 6d4a e12f 7e64 30b1 a654 09aa .?..Jm/.d~.0T... 80398b8: 6e7f 9c58 1c4a fd1b 1f5b 2d90 dcbe 2c7c .nX.J...[..-..|, 80398c8: 348f 17cd 0166 b872 e9a6 d0ab b3fd cca6 .4..f.r......... 80398d8: c52d 391a c54c 21ea e6d7 3ae4 5c33 9daf -..9L..!...:3\.. 80398e8: 4458 2326 bc75 d551 9b9b eb93 bbff bcf4 XD&#u.Q......... 80398f8: f5e0 b66f 422a b9c8 6a06 c1a6 3578 a620 ..o.*B...j..x5 . 8039908: 55d0 b7d0 cb58 363f 3b4c 2eb8 1d7b 1c56 .U..X.?6L;..{.V. 8039918: 3527 fe1c c7b2 0ecb a6ff 6a8f 34f2 d450 '5.........j.4P. 8039928: b214 1e0a 7fb2 67d6 a360 1afb 1236 22bd .......g`...6.." 8039938: 7b57 86c6 4691 1964 2c49 690a b184 646e W{...Fd.I,.i..nd 8039948: e420 8f9a 8d66 0e3a 9464 2226 54d9 faae ...f.:.d.&".T.. 8039958: 912a c4eb 8262 c2d6 6871 e98b ec80 c6be *...b...qh...... 8039968: 5792 4dd7 b309 11c0 6ea0 64c4 343b a77a .W.M.....n.d;4z. 8039978: 5103 cfb1 9c94 14ae 26d3 57a2 6ae4 d0cf .Q.......&.W.j.. 8039988: ef22 b53a e378 15fa ff09 d14a b92a 4f16 ".:.x.....J.*..O 8039998: a36e 6d6f a139 2e4b cdad b5c9 772a f0ba n.om9.K.....*w.. 80399a8: 53b8 136e b203 8ea7 3572 6969 d9b2 69af .Sn.....r5ii...i 80399b8: 0832 2053 cd33 6715 0683 ebaa 9e81 7f6b 2.S 3..g......k. 80399c8: a04d 8593 5e8e ab91 913d 65c5 6257 8df9 M....^..=..eWb.. 80399d8: 175f acf1 630a df5a a2ac 3580 8934 d446 _....cZ....54.F. 80399e8: b20a e554 2746 b79e ef14 b6ed 2037 48db ..T.F'......7 .H 80399f8: 15d8 badb 45d4 a382 91c0 9752 6406 7977 .....E....R..dwy 8039a08: 185b cb1f 6367 dae4 0acc 99ad 1145 6162 [...gc......E.ba 8039a18: 1559 189e 965c 3525 cd72 8157 0667 ec51 Y...\.%5r.W.g.Q. 8039a28: a2a2 a0ab 7b6a 85f0 be63 d435 ec80 d778 ....j{..c.5...x. 8039a38: 9edf 9359 89c2 b7d7 52b9 6cb0 eff2 80d2 ..Y......R.l.... 8039a48: 2eec f731 5858 4e34 207b 3757 1646 ad79 ..1.XX4N{ W7F.y. 8039a58: 61c4 b33d 8449 a992 e76f 855e ad5c 2b24 .a=.I...o.^.\.$+ 8039a68: abb7 2831 c564 5b16 bb8a 0a76 21a4 1ae4 ..1(d..[..v..!.. 8039a78: 0662 8584 5c14 e7ab 07a1 7764 ba89 3ae7 b....\....dw...: 8039a88: 1909 22bd 70d7 81a9 6599 3af4 c8d5 6539 ...".p...e.:..9e 8039a98: 1f16 58b2 4a33 8ad1 64b4 9714 25db 2aa1 ...X3J...d...%.* 8039aa8: 9d6a faec f5d9 c435 6c80 e5a3 0db4 2109 j.....5..l.....! 8039ab8: 68b3 09fb ecb9 9375 9ae5 fc0e c716 a28c .h....u......... 8039ac8: e457 ceea e2d4 ae1b 292e d63f fa90 32c4 W........)?....2 8039ad8: d222 14a9 3a27 9702 9c91 01da b477 1ada "...':......w... 8039ae8: a07c 3dbf dcf8 df70 df2c b203 728d f2ae |..=..p.,....r.. 8039af8: a48b b121 03f6 b65f 0e9b 4ec8 5836 f1ae ..!..._....N6X.. 8039b08: 6fc0 8427 b1d1 6b91 a5d8 33b0 3c87 8e99 .o'....k...3.<.. 8039b18: 7b04 b24a 91a6 42ec 1073 5688 22d4 6ea7 .{J....Bs..V.".n 8039b28: 96c9 12ad 4eb9 862c b8c1 ceae 42ca d16c .....N,......Bl. 8039b38: bf2d 3a44 d628 1a26 7bfc 2c1b 5ed7 9cc0 -.D:(.&..{.,.^.. 8039b48: 0cf2 36b9 7233 6170 0df1 d3a7 620e 0972 ...63rpa.....br. 8039b58: 1c37 dfac 36d9 edcb 30c0 5c34 de57 f9d3 7....6...04\W... 8039b68: 9776 5b2d e3ab f46a 6691 6286 e935 3573 v.-[..j..f.b5.s5 8039b78: 0d99 ed3b 5c88 0e17 9aab 7642 b40a bdb9 ..;..\....Bv.... 8039b88: c84b 014e 435f 6269 1ae4 ae5e 6589 5675 K.N._Cib..^..euV 8039b98: 5be7 3273 bf08 a68b bcae bab3 b1d9 1252 .[s2..........R. 8039ba8: be2f daf2 d6ba d4a9 ae42 edba e358 00dd /.......B...X... 8039bb8: 1abb 9404 d4eb fdf1 a26d dfc1 47a6 6db7 ........m....G.m 8039bc8: 0d66 3ea4 c866 99b5 d961 cb0b 3408 ccd1 f..>f...a....4.. 8039bd8: f695 203b 48d8 3fa3 1330 9d72 44d6 91ad ..; .H.?0.r..D.. 8039be8: 5ca5 8d23 3368 2109 35d7 5b83 a35c a1d5 .\#.h3.!.5.[\... 8039bf8: f787 a9a4 ff06 4b7e 0763 1a9b 9d74 8ef9 ......~Kc...t... 8039c08: 915e 336b d7b9 5cba 6e97 7343 301a cd8a ^.k3...\.nCs.0.. 8039c18: 58e7 35a7 aaf9 aeda ef82 723d 75d4 5645 .X.5......=r.uEV 8039c28: 0b5d 64d5 1e4d de36 b40d 971f e8a7 316d ]..dM.6.......m1 8039c38: b0f0 736d 9d43 6502 919f 8a91 bad8 da2e ..msC..e........ 8039c48: a0d1 ae99 0588 6d72 b226 399b 9114 ab74 ......rm&..9..t. 8039c58: 99ff c967 1546 07b3 eeaa 36a7 3d8a 8afb ..g.F......6.=.. 8039c68: ae23 021d 229d 9727 c5b9 3809 b1f6 057b #...."'....8..{. 8039c78: 0e6c d5c8 f6ff 992f 0f43 c8eb 5f22 5897 l...../.C..."_.X 8039c88: 768a d9a8 5069 f977 995a 958b 0c63 a32d .v..iPw.Z...c.-. 8039c98: 2eca b5ca e5f8 ab12 2cf7 435d 91dc 397c .........,]C..|9 8039ca8: d720 d8ad 30a0 cc75 0d7b 2f2d e73f 9db9 ....0u.{.-/?... 8039cb8: 860e c325 d387 375c cd81 4fe5 26bf 9dfa ..%...\7...O.&.. 8039cc8: 08d5 3c76 df28 7671 e553 800a 5b5c fdd8 ..v<(.qvS...\[.. 8039cd8: 4eb5 8960 0446 ef3c ee48 a4ca b698 8bf6 .N`.F.<.H....... 8039ce8: bce5 8783 ad8a c85a 9015 722b cab5 6663 ......Z...+r..cf 8039cf8: f703 0245 a0e9 16dd 9b18 4802 f15c f798 ..E........H\... 8039d08: 8b04 015c 22b9 90d7 03dd f2ba 39ea 980c ..\..".......9.. 8039d18: d970 b2f1 f9a7 8cd8 6f22 d8b9 a1c0 0b15 p......."o...... 8039d28: 02b9 4572 daae ac3d bdba 3d87 3395 150d ..rE..=....=.3.. 8039d38: 66c9 5206 77cd ac37 e45b 3550 c0ff dfa8 .f.R.w7.[.P5.... 8039d48: b912 7202 ae45 fdb6 7373 49c3 8948 14ea ...rE...ss.IH... 8039d58: 21f0 d35a 838e e2b2 5555 365e 16dd 22c1 .!Z.....UU^6..." 8039d68: 400c ddae ab92 0f6e 666b f8d1 5abc 3339 .@....n.kf...Z93 8039d78: f752 d551 bddc 2f9a c930 09b5 5cf9 9b02 R.Q..../0....\.. 8039d88: cc59 ddb0 c128 0c22 ae40 93dd e9ab 024e Y...(.".@.....N. 8039d98: 8ebd 507d 037a 69fd 89f7 fae1 64f4 0453 ..}Pz..i.....dS. 8039da8: 308b b900 5376 a6ae 2203 1dc6 4068 0c8f .0..vS..."..h@.. 8039db8: 163b 1ac6 7651 3ae6 1463 02b9 4572 d6ae ;...Qv.:c...rE.. 8039dc8: a883 3507 b55b 1034 9aa9 81b6 0625 9ec7 ...5[.4.....%... 8039dd8: 98fb 8a65 015c 22b9 b2d7 ce08 9174 d4c0 ..e.\.."....t... 8039de8: c0f3 aa8f b125 67a1 4691 cf25 617f a913 ....%..g.F%..a.. 8039df8: 5723 ae40 d5c8 7c66 badf 7668 da25 87be #W@...f|..hv%... 8039e08: 3508 d819 66ed 3ae0 b48b b04c f3b6 9146 .5...f.:..L...F. 8039e18: 202b e457 bf6a 6029 174d b8c0 ae62 ac40 + W.j.)`M...b.@. 8039e28: 9e7e 2f9f d2e0 e5c6 166b 9969 c760 c72e ~../....k.i.`... 8039e38: ae44 5c80 6b91 96d7 b6ba ee31 9d70 8760 D..\.k....1.p.`. 8039e48: 5e21 e463 c80a 7f75 d5ca 3aa6 c5df b125 !^c...u....:..%. 8039e58: 043e 859b 94e8 ae40 5c80 aff7 8b5c 5d92 >.....@..\..\..] 8039e68: 2474 6d52 5ba2 df21 35a6 7221 e405 5c8a t$Rm.[!..5!r...\ 8039e78: 3343 6834 f7e0 69b9 d25e 73c2 bbed 5ce6 C34h...i^..s...\ 8039e88: 2b91 5720 6ae4 cd13 5aae 7ca5 b447 750b .+ W.j...Z.|G..u 8039e98: 64dc c5b0 f393 2b91 5720 aae4 db2b 0ed5 .d.....+ W..+... 8039ea8: 7503 0573 12f2 a99d 74c8 59d5 dbd0 1f2f .us......t.Y../. 8039eb8: e476 c80a 0015 9000 002b 7200 0005 ae40 v.......+..r..@. 8039ec8: 0000 5c80 0001 2b90 0000 0572 0000 0ae4 ...\...+..r..... 8039ed8: 8000 015c 9000 002b 2000 0057 e400 000a ..\...+.. W..... 8039ee8: 5c80 0001 b900 0002 5720 0000 0ae4 0000 .\...... W...... 8039ef8: 15c8 0000 02b9 2000 0057 4000 00ae c800 ....... W..@.... 8039f08: 0015 b900 0002 7200 0005 ae40 0000 15c8 .......r..@..... 8039f18: 0000 2b90 0000 0572 4000 00ae fb00 ae5c ...+..r..@....\. 8039f28: f63f 6685 ca79 1883 db0e 3781 001f 6b90 ?..fy......7...k 8039f38: b940 75b6 9aff 3f92 cb76 ad45 89c3 d002 @..u...?v.E..... 8039f48: b96d 761e eb90 0433 0917 283e 82f8 41e0 m..v..3...>(...A 8039f58: 49c1 23c1 7f82 dc13 7822 e087 0d79 f5cb .I.#...."x..y... 8039f68: 824d 3af3 d72c 0b97 412e 00ae 2bdb 8bd7 M..:,....A...+.. 8039f78: 9905 5c85 2e9f 4cb8 9ff0 a582 2706 d704 ...\...L.....'.. 8039f88: be0b 01bb 1eb9 7c10 7045 60a7 83b7 dd72 .......|Ep.`..r. 8039f98: dc15 f821 e09a c859 6015 e4fb 103a 213c ..!...Y..`..:...\?.F.:r.[ 803a288: 0a70 0572 2308 a4d7 9044 ac7f d621 9577 p.r..#..D...!.w. 803a298: eedc 6a4b 9665 c8e9 7cc1 7ae4 8543 de8c ..Kje....|.zC... 803a2a8: 905d 3dd7 bfaa 4ab5 7160 e661 8980 0f5c ]..=...J`qa...\. 803a2b8: f455 eab4 75c8 eea9 943f 2f5c b5c8 d95e U....u..?.\/..^. 803a2c8: 55c8 1872 02b9 9184 6cab fffa 495c d4fb .Ur......l..\I.. 803a2d8: 2a6b 7924 e091 92c9 0245 5967 73ce e7cd k*$y....E.gY.s.. 803a2e8: 6f5c 235b b7a2 a417 eff5 456a 9d56 df20 \o[#......jEV. . 803a2f8: 996a 3d73 7055 079f ceb9 8a4b 3e6c 2ae4 j.s=Up....K.l>.* 803a308: 0317 55dc 4d21 b95d 2fde 9088 402b 8298 ...U!M]../..+@.. 803a318: 19d6 8782 b20b 4fbc 3df0 c31a 9658 572a .......O.=..X.*W 803a328: ae7b b0c3 7cec c0b7 3531 35bf a12f 8583 {....|..15.5/... 803a338: a725 0472 59e1 c59a 8fa8 6ee5 9377 5c81 %.r..Y.....nw..\ 803a348: a9af bc99 2ba5 65d7 12e5 7b5e 26b9 c215 .....+.e..^{.&.. 803a358: 9134 e4ab e45a 100a 5bae 6de0 9725 b7f9 4...Z....[.m%... 803a368: c8a9 f576 cf37 7c13 f0a5 4f37 48aa 65d6 ..v.7..|..7O.H.e 803a378: 8227 3eaa d7d7 9e0a fdcc 01ee 4795 6dd5 '..>.........G.m 803a388: fffc 45ba eb9f 0bf7 f71e d728 52ff b091 ...E......(..R.. 803a398: b92f 5b3e af70 b947 109e 04bc 02b9 9184 /.>[p.G......... 803a3a8: 94ab 5fe8 0897 a476 7f7e 64a0 cb18 1653 ..._..v.~..d..S. 803a3b8: 3809 f36c b652 eb42 8555 5909 6252 1ae7 .8l.R.B.U..YRb.. 803a3c8: fe34 5717 3d68 5357 53ae 998d 26b1 9572 4..Wh=WS.S...&r. 803a3d8: a1fc b947 5d5e 4b23 b953 6e4a ae45 e100 ..G.^]#KS.JnE... 803a3e8: 1116 5f3c 50f0 9e41 0b8f 447e 5370 5889 ..<_.PA...~DpS.X 803a3f8: f3af 87b8 a0d6 3664 f1c0 d4c2 9fa9 1036 ......d6......6. 803a408: 4beb ab0a 74b3 0b67 4abc 2073 a9b7 1f5c .K...tg..Js ..\. 803a418: 1157 abb1 cf5c f350 7d59 55cb 6af2 0ae4 W...\.P.Y}.U.j.. 803a428: 6e10 d685 4b1b fa24 4988 ab2f 06c3 7f85 .n...K$..I/..... 803a438: 46b5 324c fd7a 0379 cab1 b4bd a5fe dfd0 .FL2z.y......... 803a448: 02fa b90d c2ca ddd3 729a e995 9b89 2715 .........r.....' 803a458: 6f34 69f3 720f 94fd 28a6 a84f ae19 0792 4o.i.r...(O..... 803a468: 6f34 8f73 e9e0 15c8 dc20 d7f2 28b2 cf35 4os..... ....(5. 803a478: aabc d597 ae41 2e2f 73cc ed5d f040 0306 ....A./..s].@... 803a488: feb1 daa0 70b4 9a59 ad6b eb96 cb61 656d .....pY.k...a.me 803a498: f84c 0719 c6b9 929a e174 c89d 2015 5c9c L.......t.... .\ 803a4a8: 134f 797c 588d 4165 85eb b701 2ed6 89db O.|y.XeA........ 803a4b8: e640 cf40 28d6 fd5e c39e 044e c872 fdcb @.@..(^...N.r... 803a4c8: 9206 57bc e4f5 50de 78f2 b8ab 6d5b 68bc ...W...P.x..[m.h 803a4d8: d72a d453 563c 495d 213e 41b8 af71 edc1 *.S.!.Aq... 803a4e8: 141e 177c 0572 3708 65b8 3250 f03e d511 ..|.r..7.eP2>... 803a4f8: b58a 5013 abae b43d 978e b044 0bb7 54ae ...P..=...D....T 803a508: 3fbf ed5f 25a5 cda3 af8f 7bc9 6f5e 87b0 .?_..%.....{^o.. 803a518: b5d6 1186 69a8 35ce 61cf b90b 321e 408c .....i.5.a...2.@ 803a528: 726d 2bae 43ae 00ae a761 bd62 b6cf cae5 mr.+.C..a.b..... 803a538: ae51 be92 eec3 8faf ee18 fafe 0603 d379 Q.............y. 803a548: dcfc 33d6 0f15 de1b 01f6 2915 caeb 54f5 ...3.......)...T 803a558: ecd5 226f 87c8 6705 ee2a bc32 1cad 7dae ..o"...g*.2....} 803a568: 720e 0805 5727 6339 1fe0 5c95 f0af 9e31 .r..'W9c...\..1. 803a578: 40d0 3bae f2ea f2f9 90c2 2aea a84e f568 .@.;.......*N.h. 803a588: ed74 fd35 dd4f a65e c629 7206 a3fd 7206 t.5.O.^.)..r...r 803a598: 45ad 8b3e 015c cec2 7d73 bad9 81f1 c80d .E>.\...s}...... 803a5a8: 3f35 fb14 9522 94df 5a83 541e fa82 5a86 5?.."....Z.T...Z 803a5b8: fb06 8217 a877 012e 21b3 76d5 bfbb c3fa ....w....!.v.... 803a5c8: b0df 60ec a270 9800 3ff3 637f aecb 24e6 ...`p....?.c...$ 803a5d8: 24ed 0000 0000 4549 444e 42ae 8260 .$....IEND.B`. 0803a5e6 : 803a5e6: 722f 6c6f 2e65 736a 0000 0000 5448 5054 /role.js....HTTP 803a5f6: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 803a606: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 803a616: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 803a626: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 803a636: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 803a646: 6e65 2d74 654c 676e 6874 203a 3332 3934 ent-Length: 2349 803a656: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 803a666: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 803a676: 3a65 6120 7070 696c 6163 6974 6e6f 782f e: application/x 803a686: 6a2d 7661 7361 7263 7069 0d74 430a 6e6f -javascript..Con 803a696: 6574 746e 452d 636e 646f 6e69 3a67 6720 tent-Encoding: g 803a6a6: 697a 0d70 430a 6361 6568 432d 6e6f 7274 zip..Cache-Contr 803a6b6: 6c6f 203a 7270 7669 7461 2c65 6d20 7861 ol: private, max 803a6c6: 612d 6567 383d 3436 3030 0a0d 0a0d 8b1f -age=86400...... 803a6d6: 0008 0000 0000 0a04 58b5 8eef c6db 7f11 .........X...... 803a6e6: de15 b8c6 2d23 2d1e a939 8b0b 13c7 677c ....#-.-9.....|g 803a6f6: 7637 b3e0 9c83 a68a 1838 72c6 2577 47d1 7v......8..rw%.G 803a706: 5971 a972 7ab3 a027 d035 2d4f b410 8a9f qYr..z'.5.O-.... 803a716: 687e 37d0 8b48 0818 26d0 a0cf a37b 76fe ~h.7H....&..{..v 803a726: 8a49 ce94 8db2 8502 44ed 9ddc 9d99 3f9d I........D.....? 803a736: 99bf 51d9 3091 c915 62c4 a099 9c4a e116 ...Q.0...b..J... 803a746: 3a33 c68b af54 ced9 8ce5 1666 b80d c564 3:..T.....f...d. 803a756: 2454 2bca 1e89 42c5 d97f 4784 e233 d4f8 T$.+...B...G3... 803a766: 3163 f3cd 7467 022a 1792 4261 c467 8cd7 c1..gt*...aBg... 803a776: 56e1 22c6 5f06 e6d8 9303 7f85 cd21 35f6 .V."._......!..5 803a786: 4bbf 9a3d 22a6 c7e1 2893 76e6 18e8 2c81 .K=.."...(.v..., 803a796: db38 4aa6 111c 7dc7 e6df 9f0b 759d 785f 8..J...}.....u_x 803a7a6: 9251 ec88 f0f1 69e4 77b0 ad40 2649 0146 Q......i.w@.I&F. 803a7b6: 4499 92b9 dcd9 a89b 4c69 970e 58ff b4fe .D......iL...X.. 803a7c6: e7fc 1ff5 dfaf 7f2c feb8 5ac6 0dfe 3f9f ......,....Z...? 803a7d6: bf5e feb9 fe1d 6fff 79fc 5f8b 1ddf a1dc ^......o.y._.... 803a7e6: 7b87 3b2e bdeb 625b e691 6f2f bd4a 3dfe .{.;..[b../oJ..= 803a7f6: fe64 fd74 f2cd e5c7 cb0f d6b7 aff2 3fcb d.t............? 803a806: bf2f 252d 3b91 e46b 7041 2511 5e5c b178 /.-%.;k.Ap.%\^x. 803a816: c664 5e15 d54a 8124 0785 16e6 832d b853 d..^J.$.....-.S. 803a826: 266f 9f48 b9dc e871 2976 bbbb d1b6 a6fd o&H...q.v)...... 803a836: c71c d70d af2c bb8f d6b9 dac3 bb2d f672 ....,.......-.r. 803a846: 3888 2c6b 59d4 ea8c baa8 5365 32e7 aa13 .8k,.Y....eS.2.. 803a856: 12c8 e56b b19d 5550 1d08 9fcd 5070 f434 ..k...PU....pP4. 803a866: 170c 8f3e 4892 3e69 0b16 3d9a 9449 66c8 ..>..Hi>...=I..f 803a876: b634 3455 b215 8e50 0acb 6bb8 ac7a 4129 4.U4..P....kz.)A 803a886: 56e5 41eb d42e b68a e245 c4f6 ada7 6203 .V.A....E......b 803a896: 7e39 285e 7644 54a5 292c faff e9e4 c943 9~^(Dv.T,)....C. 803a8a6: 826c 1c3d b1e0 3471 9d20 1813 cbdc bc28 l.=...q4 .....(. 803a8b6: b530 971d fe7c 4868 fadc 605a 22e7 4a16 0...|.hH..Z`.".J 803a8c6: 4b1c 1e79 9b09 3264 3a16 d6fe 2316 a58e .Ky...d2.:...#.. 803a8d6: 3f4d 1196 0777 4547 1949 0b70 ddc7 35e9 M?..w.GEI.p....5 803a8e6: 6816 4429 d0dd 2e65 b32f f850 0ea2 e80a .h)D..e./.P..... 803a8f6: 58fb f4a9 f12b 429b 6ae4 8890 6b0b a97d .X..+..B.j...k}. 803a906: 97af 93aa 981f f8f8 79fa 4af8 a430 49ec .........y.J0..I 803a916: 32c4 cb99 f291 cb34 f870 7425 9e14 aa44 .2....4.p.%t..D. 803a926: a1d9 dd4b ae9d 84fe 2b29 8fe1 e505 b322 ..K.....)+....". 803a936: b1c9 1b84 b512 9c3f 82a7 04b8 19b9 6547 ......?.......Ge 803a946: de64 9579 04cb acd9 7e13 43e4 0254 e120 d.y......~.CT. . 803a956: 5cf3 4d01 84d8 6326 b411 f6cc 1059 cf08 .\.M..&c....Y... 803a966: 9c10 026a e1c4 0b08 b89a ddc8 ddbb 106e ..j...........n. 803a976: 068c 7a76 9fc1 c7e4 cb32 b1a0 cf21 9953 ..vz....2...!.S. 803a986: 62e4 5e28 972b c2d4 1048 2828 4723 db16 .b(^+...H.((#G.. 803a996: 65dd 003a b9e3 1c2d cfa7 0b40 2077 c675 .e:...-...@.w u. 803a9a6: 7936 6594 2332 b38e b730 b84a 5bcd 40b1 6y.e2#..0.J..[.@ 803a9b6: 3f39 9995 b509 cc91 0dec 6ac8 34a2 9a3f 9?.........j.4?. 803a9c6: d71f 8708 07a0 0d0b bf8d d059 d9f5 e841 ..........Y...A. 803a9d6: 22c5 ab19 cf89 1d3a 3c27 2f63 083c 347e ."....:.'.W.>.?....4 803ab46: 4016 a465 ad3c e5bd e8a1 32a4 9db5 2e01 .@e.<......2.... 803ab56: 2031 fc7d 9777 bcf8 b244 ad12 8745 84bc 1 }.w...D...E... 803ab66: ecbd d8da 634e 8361 2073 2f7e e956 a340 ....Nca.s ~/V.@. 803ab76: f0ae 5981 1d7c d0b3 ad11 1661 d81d d022 ...Y|.....a...". 803ab86: 4126 ce99 6172 f26b b306 3e50 604b ae42 &A..rak...P>K`B. 803ab96: 8802 8ac0 06be ab8e cc91 1362 cec1 499f ..........b....I 803aba6: 8d15 a8e6 442c 8565 55c0 a09b 8927 0850 ....,De..U..'.P. 803abb6: 0513 e77f 4b2f 454c 1969 c818 597b a06f ..../KLEi...{Yo. 803abc6: 41b3 3b8e 8dfd 1455 2854 0284 5bd6 c917 .A.;..U.T(...[.. 803abd6: 2cc5 6262 945f 38f8 3f28 9a5f 5acf dad2 .,bb_..8(?_..Z.. 803abe6: 255a 51a7 ea1a 497d 3a33 51d5 5ce0 6056 Z%.Q..}I3:.Q.\V` 803abf6: 5f84 461a 6eac 4abf ea94 da2e c96f 3534 ._.F.n.J....o.45 803ac06: 6318 def5 39b1 cbcd bbbd f737 94c4 f146 .c...9....7...F. 803ac16: 39a2 0b98 4d16 3c69 4794 4251 b9b3 c006 .9...Mi<.GQB.... 803ac26: 30f2 1e9b 221e 90c5 551e dc6e d96d 3438 .0..."...Un.m.84 803ac36: 43c4 b0f9 6ee4 2cb8 32e3 0e74 48b8 819b .C...n.,.2t..H.. 803ac46: fa85 bd04 4b8a 50e9 8160 666e e33c c12c .....K.P`.nf<.,. 803ac56: bd07 d77e 30af 1d82 841c 7e8d cb34 dce8 ..~..0.....~4... 803ac66: 9ef0 5cd0 2877 3b86 6a0c 8481 5d85 a1d2 ...\w(.;.j...].. 803ac76: 2a2e 6b2d f62f 62f4 a9cf 6e85 bc2a ed79 .*-k/..b...n*.y. 803ac86: 8af0 9a21 3156 c264 2aa7 47c9 75f2 b6a9 ..!.V1d..*.G.u.. 803ac96: d941 6008 9ae4 325f a5d5 0f23 41c2 bfd8 A..`.._2..#..A.. 803aca6: b85c 2a64 9cf2 058e 1289 bdab 757f b765 \.d*.........ue. 803acb6: bd3f 2c8a 1b20 f467 c7ad 8e22 f5a5 992b ?.., .g..."...+. 803acc6: 7cc5 2507 848b 2663 d463 0fdb ac08 02c8 .|.%..c&c....... 803acd6: 49f2 7bb7 feff 7bbd 559a b8a1 147f 8af3 .I.{...{.U...... 803ace6: ec10 11a3 4f7a e497 7913 a1f1 3533 a04d ....zO...y..35M. 803acf6: 1bbb 6452 87f1 4188 ec12 9cf4 2b45 cb05 ..Rd...A....E+.. 803ad06: ef0e aaea a4b5 bbfb 2bab eed2 b6e5 dc77 .........+....w. 803ad16: ea30 5b87 c741 a07d c783 334b a4a9 6eee 0..[A.}...K3...n 803ad26: 8a90 bc5c 3e7e f702 9d96 8ea0 d280 61e3 ..\.~>.........a 803ad36: 5e10 755d 9557 6aaf ea22 e4fe f430 4b9d .^]uW..j"...0..K 803ad46: 38d4 deed 10b3 ae65 73a9 dfa1 84e9 7955 .8....e..s....Uy 803ad56: efdb ca2d ae7e ad6a 1ddb 7377 739e 1f59 ..-.~.j...ws.sY. 803ad66: d16d 9d26 5eec 90f7 480e 0317 7109 b43a m.&..^...H...q:. 803ad76: d009 4310 dd5c 5374 d43b ac58 a02b 38ed ...C\.tS;.X.+..8 803ad86: e21d f421 a5cb f413 1399 e9db caf4 4355 ..!...........UC 803ad96: 8bf6 8e22 8d7f 0049 c4cb 515a 963e 9645 .."...I...ZQ>.E. 803ada6: ee1b 6afe 24ed d04a 6d42 9eae b40a 5c84 ...j.$J.Bm.....\ 803adb6: 2eaf 1e4c 19d7 ab56 a75f 7728 5045 0ad7 ..L...V._.(wEP.. 803adc6: a29f 5d35 4b95 dae8 581e cdd0 f661 e508 ..5].K...X..a... 803add6: d46b 5ca0 d1cd ca6b b294 cd48 a003 0a2c k..\..k...H...,. 803ade6: 2d76 a804 d06f 2cbe a8eb b7e6 ac1b 3a71 v-..o..,......q: 803adf6: c4f7 b767 5d79 7e92 132b 7cf1 0234 4398 ..g.y].~+..|4..C 803ae06: e04d d882 68e7 5bc4 f692 6b59 ddbc cfae M....h.[..Yk.... 803ae16: 6a47 4cdd a6c1 2d34 b616 57e3 29e1 3d13 Gj.L..4-...W.).= 803ae26: b481 8cdd 5980 f20b ed9d be51 0bbb 63cf .....Y....Q....c 803ae36: 95bf b425 1350 e034 0406 2f5b 9b09 d057 ..%.P.4...[/..W. 803ae46: 3f43 e50a 17d6 3303 b3df dbad cd14 f31b C?.....3........ 803ae56: e1ca 15ea d19d 659c aa51 33fa 7119 ebbb .......eQ..3.q.. 803ae66: c4f8 ad65 9fc9 ff2c f182 0ffe e798 b7bf ..e...,......... 803ae76: d26c 2969 e85b 1b11 4b71 cd1c 1321 b6d3 l.i)[...qK..!... 803ae86: 99a3 33d6 0623 4063 3569 1224 b57c e786 ...3#.c@i5$.|... 803ae96: 7272 8bd4 bf28 57ab b80b f36c 6319 70b1 rr..(..W..l..c.p 803aea6: 5037 2d74 23d9 61b5 9df8 255b 4716 d9dc 7Pt-.#.a..[%.G.. 803aeb6: 5ddd 6543 680d ac37 e5ba 067d 1b7a 88de .]Ce.h7...}.z... 803aec6: a143 da96 e989 f639 2475 a363 e50c b290 C.....9.u$c..... 803aed6: 71f3 0b26 bd3c 2c68 192f caab 55e1 bdc8 .q&.<.h,/....U.. 803aee6: 3622 bd88 b24e 67c2 b8d3 776d 5a68 dbb6 "6..N..g..mwhZ.. 803aef6: a7a1 aa19 72f1 525d 7755 d86e ad70 7998 .....r]RUwn.p..y 803af06: eac0 3eba f2af c375 980c 94ab 9919 fb58 ...>..u.......X. 803af16: a1f2 2c4a dbfc 7ae7 cd46 a3f6 2664 2532 ..J,...zF...d&2% 803af26: 76b8 5b7c b225 56fc 0a07 6e5e 65fe 7e9e .v|[%..V..^n.e.~ 803af36: c7be d0ab eb9b 693f 6432 6b6b a9c6 05a2 ......?i2dkk.... 803af46: 71d3 846b 23df 359d 41af 0edb 73d9 f0f7 .qk..#.5.A...s.. 803af56: b09c 5ae7 ca45 8101 6a29 83b0 5fe0 158f ...ZE...)j..._.. 803af66: 2ce6 a42a ba06 ba98 31ed 309a 1f11 db99 .,*......1.0.... 803af76: 7794 70c6 e5b0 6e69 6775 aefe 5f3b 2cd0 .w.p..inug..;_., 803af86: 3741 bad9 6eb4 3568 4d92 8669 8997 62a7 A7...nh5.Mi....b 803af96: 02a4 b3f2 7114 37c1 f1ac 5877 3fe2 b7cb .....q.7..wX.?.. 803afa6: c378 4efa fe6f 360f af28 cbf1 b68f 4604 x..No..6(......F 803afb6: d5f6 432d e7c9 e4c8 ae1c 123a ef98 ca04 ..-C......:..... 803afc6: fade d326 860f 24cf b917 b979 e11a e2fd ..&....$..y..... 803afd6: 6249 6937 bce4 0537 9b4d 91bb 2d83 0ade Ib7i..7.M....-.. 803afe6: 9ac5 7f15 f0fd 4c4c 4ce5 6f94 7896 5ad6 ......LL.L.o.x.Z 803aff6: fff8 8b05 d809 5f38 0015 2f00 ......8_... 0803b001 : 803b001: 732f 7465 6974 676e 2e73 7468 6c6d 0000 /settings.html.. 803b011: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 803b021: 530a 7265 6576 3a72 6c20 4977 2f50 2e31 .Server: lwIP/1. 803b031: 2e33 2031 6828 7474 3a70 2f2f 6173 6176 3.1 (http://sava 803b041: 6e6e 6861 6e2e 6e6f 6e67 2e75 726f 2f67 nnah.nongnu.org/ 803b051: 7270 6a6f 6365 7374 6c2f 6977 2970 0a0d projects/lwip).. 803b061: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 803b071: 3434 3738 0a0d 6f43 6e6e 6365 6974 6e6f 4487..Connection 803b081: 203a 6c43 736f 0d65 430a 6e6f 6574 746e : Close..Content 803b091: 742d 7079 3a65 7420 7865 2f74 7468 6c6d -type: text/html 803b0a1: 0a0d 6f43 746e 6e65 2d74 6e45 6f63 6964 ..Content-Encodi 803b0b1: 676e 203a 7a67 7069 0a0d 0a0d 8b1f 0008 ng: gzip........ 803b0c1: 0000 0000 0a04 5bdd 736b d51b fe19 cb2b .......[ks....+. 803b0d1: 3286 d8f2 2d92 205f 2c71 da75 6524 5332 .2...-_ q,u.$e2S 803b0e1: 8788 0538 793e d2d6 5ada ed22 d58a 4eca ..8.>y...Z"....N 803b0f1: c99a 2e4c d2d0 8521 8424 50c2 0848 7ebd ..L...!.$..PH..~ 803b101: 35a1 e6e4 f95c ab0b d47f 79e7 d9cf a49b .5..\......y.... 803b111: e595 7ce0 87e9 bb38 3dab 7de7 7bce df7f ...|..8..=.}.{.. 803b121: 7673 a5e9 27a3 ac8e bbbc cc7c 0468 66ad sv...'....|.h..f 803b131: 8975 8d7f e5a6 546e 134c b677 af55 b52e u.....nTL.w.U... 803b141: c0ec 6a32 cb0d d8ef c541 06ec c5eb f883 ..2j....A....... 803b151: 9e4d 8236 5da0 dfb4 3aef 159b 9df3 a9e2 M.6..]...:...... 803b161: 155f 788f b6ad 3815 4d6b 34db 9e6a d81b _..x...8kM.4j... 803b171: 862e 3f1c b156 1beb 3476 b5c8 765a dcc5 ...?V...v4..Zv.. 803b181: ec74 b6ad 07e7 f7a9 9cb6 d07a d4a8 4ded t.........z....M 803b191: 66a7 e517 ca66 9d71 b1c0 c59a cd4e da6a .f..f.q.....N.j. 803b1a1: f295 cb54 e33a bab4 f8ad dbbe 7db1 b1b9 ..T.:........}.. 803b1b1: b240 0332 8112 3413 6aed 4df8 ddb8 d8bb @.2....4.j.M.... 803b1c1: d4bb 10bb 0b3e 861f c28f a59d f569 52cb ....>.......i..R 803b1d1: 71d3 1b4f df0d af5e 2d98 71cb b54b c74e .qO...^..-.qK.N. 803b1e1: 7c34 59bb 3b31 d9c1 dda6 d869 8076 3a79 4|.Y1;....i.v.y: 803b1f1: df35 0769 7046 0db6 81b0 267d 7e98 dacf 5.i.Fp....}&.~.. 803b201: d4b4 d353 f8e8 8ab5 7be9 bb4d 5ef4 2f07 ..S......{M..^./ 803b211: ab4f b8e7 2c50 f35b 67ea 4bab 6775 70d3 O...P,[..g.Kug.p 803b221: 15ea e6b3 dd75 b8a0 5be5 bc6d 799a f758 ....u....[m..yX. 803b231: 5cb6 6b3c c357 80af a9f3 fbc6 7c38 de1c .\.. 803b2c1: 1aee 8fe1 bca4 7143 e5e0 bd27 06cb 8516 ......Cq..'..... 803b2d1: 16d7 4205 6ec7 b5da 50c0 d14a 36f4 771c ...B.n...PJ..6.w 803b2e1: d795 5aa6 0648 29d1 1b08 d2ea c004 498a ...ZH..).......I 803b2f1: 456c 18aa 00a4 5e30 289b 4d8d d9ab bc85 lE....0^.(.M.... 803b301: 6acc bd78 71f7 83f8 66f0 7487 f009 a819 .jx..q...f.t.... 803b311: 015e 9f07 3f85 2c02 00c1 d2c5 1ab4 3fda ^....?.,.......? 803b321: 3505 accb 6ff2 1bde bd56 40e5 f27a f25f .5...o..V..@z._. 803b331: b4ce 505a 6975 57cd 1cff ddb7 640d 5e35 ..ZPui.W.....d5^ 803b341: deb3 aade 5a9b daa7 9f11 ae87 68c8 ad37 .....Z.......h7. 803b351: dd9a 10c0 afdb e198 4a77 bd72 853f e13b ........wJr.?.;. 803b361: 34c3 afb3 0cc4 de11 3341 df9d 0183 33b3 .4......A3.....3 803b371: 9710 a675 bb69 301b b329 aafc 39a9 0c4c ..u.i..0)....9L. 803b381: 0c20 0d8e 73e2 9161 89cf 1bef 1532 ff1c ....sa.....2... 803b391: d859 7f48 3634 6edf 16db 865c cab2 713d Y.H.46.n..\...=q 803b3a1: 96f0 bc20 3e14 9683 2342 577a a5a8 07fb .. ..>..B#zW.... 803b3b1: 2dfa ac85 ad9f e80a 375a 3c08 ab57 d374 .-......Z7.. 803b411: eccc a3ed 8985 97a9 59ca 3f82 5f81 30db .........Y.?._.0 803b421: e118 d419 9a66 1786 8e79 7fc4 c268 b5ae ....f...y...h... 803b431: 66b9 d0f9 fe35 ac57 ebdb b756 e349 db96 .f..5.W...V.I... 803b441: e775 5d8c 062f e45e 3306 8a63 9cf4 3934 u..]/.^..3c...49 803b451: c87a 92ea 5da5 e3b4 edd6 2533 a586 7178 z....]....3%..xq 803b461: 7450 408f 2cac 688a 01c4 e7c5 ed96 8b76 Pt.@.,.h......v. 803b471: 1c0e 7e84 dbb5 988c 3403 2211 aa5c 79b7 ...~.....4."\..y 803b481: 4551 1868 b84a de1a e712 4db6 d3ee f747 QEh.J......M..G. 803b491: 563e f9d4 7a7e 020c e064 1bb8 2c9d 3a5e >V..~z..d....,^: 803b4a1: 4dd0 bf44 3161 6b89 9fe8 71c5 3dd7 4335 .MD.a1.k...q.=5C 803b4b1: fc35 4112 03e1 d9d1 8027 07f0 0148 6b0e 5..A....'...H..k 803b4c1: a0d8 d386 3c09 6cff ee34 bd2f 90cb 1c1b .....<.l4./..... 803b4d1: f873 7938 ba7f 088b 203f c632 36a5 ab1d s.8y....? 2..6.. 803b4e1: 550a b312 8bc1 7946 6028 5e3c 2b02 2ef9 .U....Fy(`<^.+.. 803b4f1: d2d4 23a9 7bd8 716e 3bcd 3643 7e73 1989 ...#.{nq.;C6s~.. 803b501: 99fc d017 28a5 c47c a9bc 386d 2849 3e59 .....(|...m8I(Y> 803b511: 7271 2305 a0a3 5818 786b a30f 6ab4 7ba8 qr.#...Xkx...j.{ 803b521: 82f5 4dd0 439e f462 6962 1ff6 b8e8 76ad ...M.Cb.bi.....v 803b531: 0462 ef8a d62b 599a f93d 1be6 09cb 321f b...+..Y=......2 803b541: 1c63 ebd7 9a22 b785 b1c1 e10f 115d 1e29 c...".......].). 803b551: 2fc1 1620 7983 208f 1ced 1f59 ed70 8b60 ./ ..y. ..Y.p.`. 803b561: a8e3 f012 f4ce 127e 1865 7706 94d5 8803 ......~.e..w.... 803b571: 4c2b f473 1704 c0c4 e62e f440 7aad c1d7 +Ls.......@..z.. 803b581: c362 a0ab 3da2 1318 5181 70fa 0dc0 0ac0 b....=...Q.p.... 803b591: 4186 0d66 d24f d36a 06a7 5594 7196 3ae0 .Af.O.j....U.q.: 803b5a1: 05f2 445b 89b7 c07c ea65 1146 ee69 c7f3 ..[D..|.e.F.i... 803b5b1: d8a6 942b 623d 9c6e 6449 625e 6422 1074 ..+.=bn.Id^b"dt. 803b5c1: 19e0 379c af7c 67db 35fb 69af 3930 2d59 ...7|..g.5.i09Y- 803b5d1: 7aaf abeb 14b3 b5a8 3766 280d d30f d733 .z......f7.(..3. 803b5e1: 2782 be3c eb1c c0c3 c2eb 727e f98f 1952 .'<.......~r..R. 803b5f1: c4b6 19d1 03b0 3243 937e 5d89 3b3c 3635 ......C2~..]<;56 803b601: 294e c544 0853 8254 3c92 2c88 1869 d9de N)D.S.T..<.,i... 803b611: ca78 ea01 c019 2fb3 300e f420 2621 9573 x....../.0 .!&s. 803b621: 0ff1 3c83 2637 b9e4 0717 1019 20fa 8dcf ...<7&....... .. 803b631: 3c84 263f f9e4 0717 1019 20fa 8fcf bc84 .2&...o.G.be.. 803b6b1: 20b1 c1bc 11aa 1841 0c21 ef71 8aa9 bab0 . ....A.!.q..... 803b6c1: 64ac 6e5c a3cc 67de 1fe5 214d 5837 a053 .d\n...g..M!7XS. 803b6d1: f0ca 2500 d058 8b88 156b d1d0 6808 c7a8 ...%X...k....h.. 803b6e1: 1037 1f19 594a f48a bc36 7ea7 e698 bc20 7...JY..6..~.. . 803b6f1: ad22 408f f215 4f32 8abd 12f8 1fa0 7fc2 "..@..2O........ 803b701: aa99 eeb5 6320 1861 0b95 ff1d c132 bfa4 .... ca.....2... 803b711: 2cb8 3233 cf23 6c78 c320 16bb 4ade c7ca .,32#.xl ....J.. 803b721: 1d6c 9f0b d4cd 58c5 8e41 bc96 9713 0298 l......XA....... 803b731: 0347 4856 85a7 9103 4fa3 3689 6e66 681c G.VH.....O.6fn.h 803b741: 3147 5bfe 0670 083d 4e74 a662 ac7f f9aa G1.[p.=.tNb..... 803b751: 607d 97fb f2c2 e867 3c5c db05 3d1f db37 }`....g.\<...=7. 803b761: 4f7d 5db3 c62e fb65 d057 7626 7604 73a4 }O.]..e.W.&v.v.s 803b771: ed02 1e42 8e85 4b05 661c 926e 0f60 08ef ..B....K.fn.`... 803b781: 1840 e148 41d9 de79 1019 44cf 279c ad8f @.H..Ay....D.'.. 803b791: 948c d6a6 a437 4307 cdf5 10f7 a9dd 726f ....7..C......or 803b7a1: fff1 f0b4 6d69 5970 1e35 cde6 fb24 994e ....impY5...$.N. 803b7b1: 733d 5dd2 d99c 89ae 7efa b4b9 d9b4 bcb1 =s.].....~...... 803b7c1: 7546 6684 4ea8 2374 a6e7 6922 9335 4a8d Fu.f.Nt#.."i5..J 803b7d1: ce31 4a5a e887 a37a d6d6 459e 50ae 4bbc 1.ZJ..z....E.P.K 803b7e1: 0ea5 834f 93fb 1581 85d8 b409 5002 b29f ..O..........P.. 803b7f1: 75b7 2a19 5aad c71b 8b97 e8d0 e2bb 2f38 .u.*.Z........8/ 803b801: 728a 6eb3 f940 b6ca a257 68f9 ea8a 4334 .r.n@...W..h..4C 803b811: 38b1 0e15 b69d af55 28a3 dad4 c315 dc8f .8....U..(...... 803b821: 9647 4802 cdc7 ed56 b750 b9e3 ecd3 b888 G..H..V.P....... 803b831: 4d10 5993 2efe 78c9 4904 43c5 177d bab9 .M.Y...x.I.C}... 803b841: f414 ad8d 61b1 047f 7dae 52c2 df6a 12c1 .....a...}.Rj... 803b851: 0284 ab8a 2021 565b 74e7 cc3e 6bf0 4a48 ....! [V.t>..kHJ 803b861: 937c 5bea c5de 430d 2260 fdb0 aa62 a1c2 |..[...C`"..b... 803b871: ca90 8475 6d35 ea74 249a 58a5 a5d4 a46b ..u.5mt..$.X..k. 803b881: e31b 12a5 d0ac 2aa2 3317 c90d f63b 2b56 .......*.3..;.V+ 803b891: 36b2 1518 aec2 b3c2 d7b3 7e8d db33 d4bc .6.........~3... 803b8a1: 007f e1d0 07ec 0431 fbfa e47b f329 d508 ......1...{.)... 803b8b1: d3a3 c59d 61a8 b5a7 6a3f e9a7 967e c469 .....a..?j..~.i. 803b8c1: b45d 2b35 b158 413b dce1 d77a 2dad f2be ].5+X.;A..z..-.. 803b8d1: d77e 0e0b 11a3 56d3 e757 9c61 dae8 f1b1 ~......VW.a..... 803b8e1: adbd 8dba 370c 6e06 a9ef 4b87 8ad3 ba12 .....7.n...K.... 803b8f1: fb79 bf47 74ee 5bb8 61b3 40a7 017c 3f00 y.G..t.[.a.@|..? 803b901: 4ad1 47c3 f229 c46c 333f 85c0 f0ed ba01 .J.G).l.?3...... 803b911: 9f5a 16e2 f096 2002 4e05 a34b e299 e2e5 Z...... .NK..... 803b921: 05cb 2d85 ef00 9356 271f d24a 14ea 0db6 ...-..V..'J..... 803b931: 1c47 4ba3 2217 ec23 6e28 a47f 5d57 2380 G..K."#.(n..W].# 803b941: 09dc 4e9f abec ebd1 6d26 db39 4778 9ddf ...N....&m9.xG.. 803b951: 1326 33af 0576 4989 f50d bbb0 f769 ed90 &..3v..I....i... 803b961: e7a2 6350 5342 6511 3555 c3de 1be1 313a ..PcBS.eU5....:1 803b971: f7d7 a6a8 1f9c 79db df45 f35e 763c 6ea3 .......yE.^..4...&..o.|.s8 803bac1: 3ded d7d3 2791 6d95 489c c6bd b4ca 36ff .=...'.m.H.....6 803bad1: 6f90 ad32 46e3 1196 18ee 41d8 0d92 2421 .o2..F.....A..!$ 803bae1: 08be 838f 50e1 eded 2dec a715 5274 dc56 .....P...-..tRV. 803baf1: 6a0d 0c23 5fe2 d952 08f0 0e06 88e6 477b .j#.._R.......{G 803bb01: 8e72 2f9d c1ed 9ed2 dfb5 a298 9bae b636 r../..........6. 803bb11: 874c 174d 425b 769b 8bc1 aefe b15b 5b3c L.M.[B.v....[.<[ 803bb21: 11c2 c2a1 6feb 18ac 5eb8 999c 3099 efc2 .....o...^...0.. 803bb31: 0ba5 0dc5 5624 8fc8 0ca6 1328 415a d9e0 ....$V....(.ZA.. 803bb41: fc7d 4dd5 a4b0 935b cfed cb15 d4e5 658c }..M..[........e 803bb51: a335 fc24 32e0 68d6 90a0 41db 7e1d f7b9 5.$..2.h...A.~.. 803bb61: f0e7 a621 8dbe 9f29 07e0 3c64 7bc3 c54c ..!...)...d<.{L. 803bb71: 4cf2 c26a 3519 67e1 4518 0f48 b029 719c .Lj..5.g.EH.)..q 803bb81: 9287 8761 a8d4 52ab 48f6 9911 ea3b 3260 ..a....R.H..;.`2 803bb91: a0ea f51a da1d 3c03 03b6 4056 5045 b0b5 .......<..V@EP.. 803bba1: c064 f21d ad28 e839 1596 90b0 877f 4557 d...(.9.......WE 803bbb1: be9f 4be2 07f8 431d 9d42 ee83 84b5 6bce ...K...CB......k 803bbc1: 9ad1 1ca4 d9fb bf33 cc9a aafc f99a 549f ......3........T 803bbd1: ee6d 03d2 cf14 30fb 1c1f 3d0b f3e4 d435 m......0...=..5. 803bbe1: 9b80 58c0 ee71 165a 8a12 8a0b 75e2 2504 ...Xq.Z......u.% 803bbf1: 78d6 a5aa 3e39 6bb5 7640 a307 1d50 f682 .x..9>.k@v..P... 803bc01: 415f 0d17 5c9a f3ba dd09 4579 2af7 3e46 _A...\....yE.*F> 803bc11: 1916 9ba5 033a d3f4 1212 56f5 d43b bbc8 ....:......V;... 803bc21: 177b ee85 5176 14c2 308c 7c47 2573 3f04 {...vQ...0G|s%.? 803bc31: 3665 8b73 b473 6f9a 577a 7e90 807c e429 e6s.s..ozW.~|.). 803bc41: 9934 b74e 8eef 2198 bc36 0539 9afe e808 4.N....!6.9..... 803bc51: 1601 98fd 574d b900 6626 7102 2ef5 b116 ....MW..&f.q.... 803bc61: fdd5 8e90 104a 80de 5229 605b e492 4915 ....J...)R[`...I 803bc71: 12e6 594a 36b8 dbf0 079c 5163 51f1 3017 ..JY.6....cQ.Q.0 803bc81: 0e75 20db dc8a d369 ae66 cf99 6483 45c8 u.. ..i.f....d.E 803bc91: 1e68 6652 0e88 1680 1b5d 99e5 37b9 2fc2 h.Rf....]....7./ 803bca1: 8200 84de 08ea d04a deb5 18c7 2b9c d8ef ......J......+.. 803bcb1: 800f 52db 8b0b c18d d8d2 fead 8c5c 19f1 ...R........\... 803bcc1: dd0f 0489 5e71 2b01 5fc4 e3b9 3b51 8ccc ....q^.+._..Q;.. 803bcd1: 485a 813d e802 d17b 0016 a5ce ac9a 5273 ZH=...{.......sR 803bce1: 337b 09c8 e692 3c84 772e 0405 7b58 38e2 {3.....<.w..X{.8 803bcf1: 4822 01de 3b91 c2bc 7453 a4ac 08e1 8777 "H...;..St....w. 803bd01: 753b 6660 bc27 c79f 44d1 934e 4e5a 915f ;u`f'....DN.ZN_. 803bd11: e18d 428f 8e80 f297 3fe2 769c d4e4 fe78 ...B.....?.v..x. 803bd21: e81f 6681 d5c0 07de 4c78 cd43 ca5d 6c5c ...f....xLC.].\l 803bd31: 932f e55a a6be 304c c944 be87 29f8 784f /.Z...L0D....)Ox 803bd41: fb50 fde9 0599 c4e3 fe25 01de 6bb1 36b2 P.......%....k.6 803bd51: 3578 fd21 ef7d 3142 96fc 1a8a 2ae6 6279 x5!.}.B1.....*yb 803bd61: 2025 5628 53c2 e07b 660f a904 4e3c 7624 % (V.S{..f.....AM@ 803bda1: 3b42 a0e4 0e29 0d0a ff37 e1c4 6a4d f787 B;..)...7...Mj.. 803bdb1: f939 39ae 1146 5c25 dec3 100e c830 bb11 9..9F.%\....0... 803bdc1: 1de2 9008 ac03 051f 76e5 23ef 178c 9d27 .........v.#..'. 803bdd1: 324f b946 50a0 57d2 c13e d894 c293 c424 O2F..P.W>.....$. 803bde1: df4c 858e d3c3 ff2b 2919 f2a0 e26a c8a0 L.....+..)..j... 803bdf1: 5a43 2e5d 1637 af4a 08a5 2fcd d6c0 9688 CZ].7.J..../.... 803be01: ecc7 1ca8 dc08 0879 b893 a933 0ee3 2de2 ......y...3....- 803be11: 3187 02d1 0a42 0d0f f0c8 a09e fe45 f1af .1..B.......E... 803be21: bae7 2498 4e44 10ea 0d49 8da4 fc31 2f32 ...$DN..I...1.2/ 803be31: 87f9 23dc 926b 99e9 509d a80a f286 206d ...#k....P....m 803be41: ef89 3a93 43be 31d5 420c 24c3 58d2 9510 ...:.C.1.B.$.X.. 803be51: adba 0d2c b253 7849 bf01 067d b0a2 f90e ..,.S.Ix..}..... 803be61: 277b 098f d249 a931 8e93 6aff c091 30cc {'..I.1....j...0 803be71: 77c9 8e44 9fa9 9ae1 2655 b13a bab8 1d09 .wD.....U&:..... 803be81: ec11 14f2 7924 1734 921a 9acb 7143 01f8 ....$y4.....Cq.. 803be91: d119 abd9 76f0 ec14 2636 8987 2262 1bf0 .....v..6&..b".. 803bea1: 7053 371f d0d7 a952 64d5 a759 d756 1265 Sp.7..R..dY.V.e. 803beb1: 0706 a3e4 882a f20b 486c 9f17 fecb da84 ....*...lH...... 803bec1: 10e4 24ef eb21 2c33 ca09 c79e 549f 3876 ...$!.3,.....Tv8 803bed1: d659 94fe 7a6a ff07 5b00 7084 3c1b ca52 Y...jz...[.p.es 803c041: 3e16 f7bf 0321 2c08 e939 c0b1 ee31 88d5 .>..!..,9...1... 803c051: d976 4e80 34a3 6c0d 49b3 96e3 7ec7 55d4 v..N.4.l.I...~.U 803c061: 97ac 46e9 fa4e 6dba 27c8 1546 3e53 5a6e ...FN..m.'F.S>nZ 803c071: cf2c fccc 6302 d9c6 6bf9 4efb f2cb 8ecf ,....c...k.N.... 803c081: c838 beaf f800 8e0d 76b0 29d4 ec7e 80b6 8........v.)~... 803c091: ac27 9929 cbaa 80b9 75b8 e63f 4e3e 87ff '.)......u?.>N.. 803c0a1: f408 6ab3 073f 55ae c73a 903f 6ced e8df ...j?..U:.?..l.. 803c0b1: 434d 55f5 3b11 5533 5bdd 569a 9307 f8c6 MC.U.;3U.[.V.... 803c0c1: 4a9c c6be 7eca 354e 5472 e8f5 6fbb beae .J...~N5rT...o.. 803c0d1: ec7d a5d7 9c15 2f1a 5101 5db7 e738 17d4 }....../.Q.]8... 803c0e1: b44d e4c9 f914 be14 39de 79e2 1da7 b3bb M........9.y.... 803c0f1: d2f8 f9cc c389 fc9b 2134 1472 e3bf 42a7 ........4!r....B 803c101: f187 1ca2 7fd9 d8fd d80a 72f6 d641 f7a7 ...........rA... 803c111: 2693 b04a f959 825a bbbb c23c 985c 8738 .&J.Y.Z...<.\.8. 803c121: 0a2f 1dd6 55bf 5530 04fa b2e6 c477 1ff2 /....U0U....w... 803c131: 35cd 97c9 f7a4 a0c0 350e 57e5 f85c 89fc .5.......5.W\... 803c141: bb09 3d84 7684 b124 e712 2075 0446 2d97 ...=.v$...u F..- 803c151: 5faa 139a bcaf 6852 567a 9dfd 7e37 d47b ._....RhzV..7~{. 803c161: 15ab f5cc 55ad a405 23c4 53f3 2026 139a .....U...#.S& .. 803c171: e253 963c a9f9 c4c6 e279 ef4d 0ddf cc05 S.<.....y.M..... 803c181: 9277 d00f 6026 f8d7 adca 9d04 bb85 5b3d w...&`........=[ 803c191: d731 5e9a b4ed cc99 1cb4 967d f394 22a6 1..^......}...." 803c1a1: f03a 4b11 e92e 2fc1 f4b8 2f2e d2be 5522 :..K.../.../.."U 803c1b1: 51fd f654 fea1 6912 43d8 09fd f650 51a7 .QT....i.C..P..Q 803c1c1: 740b 9c3d 1a0c 7d67 a2f2 2f2c f1d1 cba1 .t=...g}..,/.... 803c1d1: b48a c0c1 9be9 5b73 42f8 dbc5 812a f28b ......s[.B..*... 803c1e1: 4429 7d49 0859 97e7 14fe 7ce4 52b9 b0d9 )DI}Y......|.R.. 803c1f1: 2383 1faf e02f 1bc3 26fc 8522 71c0 02b9 .#../....&"..q.. 803c201: 882f 104f f60a d954 539e 4d32 99ed 050e /.O...T..S2M.... 803c211: 3d40 47c6 6a5e 50a7 3aa6 109c a9b0 e347 @=.G^j.P.:....G. 803c221: 9d0b 21aa 219f c8e6 4a7b cb78 0a37 cd2f ...!.!..{Jx.7./. 803c231: e740 a70e 763f 37e4 ffa3 1103 a13e 43e5 @...?v.7....>..C 803c241: 003a 2f00 :.. 0803c244 : 803c244: 6c2f 676f 6e69 682e 6d74 006c 5448 5054 /login.html.HTTP 803c254: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 803c264: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 803c274: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 803c284: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 803c294: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 803c2a4: 6e65 2d74 654c 676e 6874 203a 3835 0d37 ent-Length: 587. 803c2b4: 430a 6e6f 656e 7463 6f69 3a6e 4320 6f6c .Connection: Clo 803c2c4: 6573 0a0d 6f43 746e 6e65 2d74 7974 6570 se..Content-type 803c2d4: 203a 6574 7478 682f 6d74 0d6c 430a 6e6f : text/html..Con 803c2e4: 6574 746e 452d 636e 646f 6e69 3a67 6720 tent-Encoding: g 803c2f4: 697a 0d70 0d0a 1f0a 088b 0000 0000 0400 zip............. 803c304: 7d0a cd54 d46e 1030 157e 2463 754e 7bb7 .}T.n.0.~.c$Nu.{ 803c314: a841 91c4 e950 1381 401c a382 cc93 5c6e A...P....@....n\ 803c324: db1c 93d8 eeec e2ad 09c0 c409 2415 015e .............$^. 803c334: 03d1 8845 433e 8df6 2718 6ddb a423 e21e ..E.>C...'.m#... 803c344: d8f5 e333 67ef d9b4 a7bd 4fcf be5e 7179 ..3..g.....O^.yq 803c354: 6aca 4c6c a59e 1995 9765 7392 408a 7955 .jlL....e..s.@Uy 803c364: 00d6 562a 2ad6 4044 5bc9 885c 7447 9c37 ..*V.*D@.[\.Gt7. 803c374: 88d6 c05e 56bb 9277 16bf 9eaf 1388 78d7 ..^..Vw........x 803c384: ba85 c030 e959 822c 92a5 a767 aa12 5c25 ..0.Y.,...g...%\ 803c394: 5917 80d5 9de4 9586 0177 e56f 74ad b585 .Y......w.o..t.. 803c3a4: a0ac 25d3 2188 d038 a356 4656 52c4 9019 ...%.!8.V.VF.R.. 803c3b4: 83f3 ad46 d375 fb36 8db8 8610 d140 f293 ..F.u.6.....@... 803c3c4: 9e88 8d40 f206 5bfe d57f edff b72f fbef ..@....[..../... 803c3d4: edab 7f79 fb49 6c8b de36 4665 b7db 0eac ..y.I..l6.eF.... 803c3e4: 90b0 51bc 1eda 3196 1672 48c0 711e 2063 ...Q...1r..H.qc 803c3f4: 00d6 9d48 1962 47b4 1b86 704f d611 3b38 ..H.b..G..Op..8; 803c404: 9d53 4f1a 8b39 94a1 383c 8703 9167 6792 S..O9...<8..g..g 803c414: 39e3 466d 0ad1 6d57 acf2 1dd2 8d2b 518a .9mF..Wm....+..Q 803c424: ab72 42ba 3605 88fe 160a 35aa 1d78 f42e r..B.6.....5x... 803c434: 2a1a ce81 a753 6aff ea44 6108 cabc b533 .*..S..jD..a..3. 803c444: 7e83 949f 5b1b b71b 0974 a282 aa8f eba7 .~...[..t....... 803c454: 76ad a0ab a7bc 4c46 9257 dcef baa1 9e7a .v....FLW.....z. 803c464: 9ff7 9ffb a97b f57e b63f 481f 4fba 65c4 ....{.~.?..H.O.e 803c474: c13e 95e3 c305 f586 c19a f014 9578 d3b8 >...........x... 803c484: c2f9 8685 12a9 b3b5 1392 a4c6 52f4 4673 .............RsF 803c494: 5393 423b 5de0 ee4c 39ef 2b68 0952 1a55 .S;B.]L..9h+R.U. 803c4a4: d055 143b eaec de78 257f 2f3f 8f92 0fc7 U.;...x..%?/.... 803c4b4: 116c e3fd 366c e524 b699 bdbe d26d 63be l...l6$.....m..c 803c4c4: 25ea 4b12 8932 d093 e869 1406 ff23 96dd .%.K2...i...#... 803c4d4: ca06 5d80 dcd2 f9f1 7243 0d35 1a40 408b ...]....Cr5.@..@ 803c4e4: 4570 cbd0 8f1a fcd9 afc8 a8a7 593c a04a pE..........hB...S. 803c524: 2a25 17fd f802 cc9b 24bd b30a ca24 3e74 %*.......$..$.t> 803c534: 1376 ce33 6ceb 17f8 07f8 a233 8ac5 0415 v.3..l....3..... 803c544: 0000 .. 0803c546 : 803c546: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 803c556: 0000 .. 0803c558 : 803c558: 3c18 0804 efd2 0803 efde 0803 04e3 0000 .<.............. 803c568: 0001 0000 .... 0803c56c : 803c56c: bbef 00bf .... 0803c570 : 803c570: 6d2f 6961 2e6e 736a 0000 0000 5448 5054 /main.js....HTTP 803c580: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 803c590: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 803c5a0: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 803c5b0: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 803c5c0: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 803c5d0: 6e65 2d74 654c 676e 6874 203a 3031 3136 ent-Length: 1061 803c5e0: 0d31 430a 6e6f 656e 7463 6f69 3a6e 4320 1..Connection: C 803c5f0: 6f6c 6573 0a0d 6f43 746e 6e65 2d74 7974 lose..Content-ty 803c600: 6570 203a 7061 6c70 6369 7461 6f69 2f6e pe: application/ 803c610: 2d78 616a 6176 6373 6972 7470 0a0d 6f43 x-javascript..Co 803c620: 746e 6e65 2d74 6e45 6f63 6964 676e 203a ntent-Encoding: 803c630: 7a67 7069 0a0d 6143 6863 2d65 6f43 746e gzip..Cache-Cont 803c640: 6f72 3a6c 7020 6972 6176 6574 202c 616d rol: private, ma 803c650: 2d78 6761 3d65 3638 3034 0d30 0d0a 1f0a x-age=86400..... 803c660: 088b 0000 0000 0400 ed0a 097d 1b73 9647 ..........}.s.G. 803c670: 5fe6 d629 2978 2cc0 b880 0178 212a 4a28 ._).x).,..x.*!(J 803c680: 35b6 6ba1 da24 599e cd8a 0ba8 8940 0a00 .5.k$..Y....@... 803c690: 1542 c948 2324 eedc 99e9 688e 78c7 77a3 B.H.$#.....h.x.w 803c6a0: 7763 6363 f67b 05f8 8f6e ad35 d5f1 f311 cwcc{...n.5..... 803c6b0: c00b 347f 7bdf 5999 0595 1480 bb65 3d3d ...4.{.Y....e.== 803c6c0: 1331 9121 9995 af2f 2f97 be5f 932b c99d 1.!.../../_.+... 803c6d0: 4bd0 68c2 bc68 7055 278a 20e3 8c99 8687 .K.hh.Up.'. .... 803c6e0: 791f 4193 4c30 ddca b920 0fdd f3e8 8be6 .y.A0L.. ....... 803c6f0: 3e3b ce20 0a3a e3be c1f8 619d b54c 729c ;> .:......aL..r 803c700: bc9c 07e8 68e5 78e4 f261 aec2 2958 5b94 .....h.xa...X).[ 803c710: 9e28 391c c363 47b3 38ce de0e 47e9 524e (..9c..G.8...GNR 803c720: 8198 b62f 4ec2 e0a1 d8ad 4ae5 78bd baa3 ../..N.....J.x.. 803c730: 2f64 e655 f4db d45a 6f8c 871f 3f43 2e3a d/U...Z..o..C?:. 803c740: 838f 9367 4e20 19de 833b 60a0 94ca 6c59 ..g. N..;..`..Yl 803c750: 05f9 78b7 5676 c6d0 3be9 f389 8f0e 4315 ...xvV...;.....C 803c760: 44e9 02e3 e3b5 7bd8 678e 9ef9 0e15 3a0f .D.....{.g.....: 803c770: 6da8 9345 7c44 8e8c 96c7 24eb 9e07 4233 .mE.D|.....$..3B 803c780: 30e1 1f18 c124 4460 4959 0838 41fa b127 .0..$.`DYI8..A'. 803c790: 87e2 71d1 b630 9be2 0bc8 2fc6 2df6 aed7 ...q0....../.-.. 803c7a0: dcb4 4eeb 1fb9 bb0c af49 aee5 14ac ec53 ...N....I.....S. 803c7b0: b9ec dafb de60 bddb d777 071b 124e de10 ....`...w...N... 803c7c0: 2468 9dae 5b22 dc14 b892 d4c7 84ba 42f8 h$.."[.........B 803c7d0: f2d1 6166 9ae4 4c14 3c3f a4c2 5669 995e ..fa...L?<..iV^. 803c7e0: 4b47 d81d cb4e 772b 71c2 ec9c c2f4 dfbe GK..N.+w.q...... 803c7f0: ba2a 6765 0a34 3e86 0127 9599 5b15 c572 *.eg4..>'....[r. 803c800: d9dd 2d85 9638 bf3b 150a ad4b 1f9d a3c6 ...-8.;...K..... 803c810: f3be 76c2 4f4f b74d 791f 6687 e8b6 5c9e ...vOOM..y.f...\ 803c820: f774 8bb5 d2ee afa2 b85d eee8 1755 9bdd t.......]...U... 803c830: 7459 6460 81f0 0fd3 f8b1 6da0 1c39 c8cc Yt`d.......m9... 803c840: a2c2 815b b1d5 56ba 0acf a7ad a1d6 b7d5 ..[....V........ 803c850: 2d06 7ec7 888b f1c8 bc0f 3068 0c98 c441 .-.~......h0..A. 803c860: 1166 8acb e3dc 9871 b904 8f6c 07b2 d0ce f.....q...l..... 803c870: 06e9 3be3 010f e7e7 6a32 09c8 3972 e475 ...;....2j..r9u. 803c880: 7274 0d39 74e4 3973 c86b 51e9 384e 7c72 tr9..ts9k..QN8r| 803c890: 8c7f 4854 eea9 be31 0a9e f8c8 df10 f487 ..TH..1......... 803c8a0: 8e3d e20f 7c60 1014 5f58 8c66 71a2 e482 =...`|..X_f..q.. 803c8b0: 2640 030f 80cc 37b1 76c4 ab52 ba8c cf7e @&.....7.vR...~. 803c8c0: 991b b2c5 0bd7 c3bc 3fc0 2d3d 3448 7705 .........?=-H4.w 803c8d0: 521e 41c7 171c 967a dc69 5879 7e9a fd3e .R.A..z.i.yX.~>. 803c8e0: fcf2 e9e3 f3cb 1b9f bfe7 ff38 f9f9 4827 ..........8...'H 803c8f0: 377c 27fd 9afa 317e dcfd a22c 1a32 16af |7.'..~1..,.2... 803c900: f9ad c226 26f9 357e fafd effc bfa6 4d7f ..&..&~5.......M 803c910: a7c5 3996 dcfd fe98 e9ef e7e7 9f3f 457e ...9........?.~E 803c920: 7f9f a740 225f 12f1 bedd 3aca 5a2d 1102 ..@._".....:-Z.. 803c930: d0c1 fb71 9f81 694d 7979 94c1 e70e f3c6 ..q...Miyy...... 803c940: fb68 9dd6 1ff7 dc1b c7f0 cf98 cc4b d16e h...........K.n. 803c950: ee9c 064f 306e f42e c0d1 fff4 bf4c ff3b ..O.n0......L.;. 803c960: fcf8 e313 75aa fbb7 9ea3 0433 1d27 5e87 .....u....3.'..^ 803c970: 4061 fc2d 9a2f 818c 11c9 5f32 7f4d c407 a@-./.....2_M... 803c980: 827e 3a49 079e bfc4 ddae 8845 a8f6 ffd5 ~.I:......E..... 803c990: a3c7 39e7 8f18 dfef 687b 3354 a53c 938b ...9....{hT3<... 803c9a0: 8c1b 9963 408f c6ee 464e 73ee 99ab e0ab ..c..@..NF.s.... 803c9b0: e65a b487 2e13 91ad 9091 70bf d858 731a Z..........pX..s 803c9c0: 64bd 8275 7585 79b0 a92e 59d3 0758 ebdb .du..u.y...YX... 803c9d0: 3a92 85dd b075 d301 c33a 198c 93ce f336 .:..u...:.....6. 803c9e0: 7145 cda4 ee70 2b94 43f7 3dec 58c9 be75 Eq..p..+.C.=.Xu. 803c9f0: 4e6c 3b7f 397d 03fd 1a51 ee28 3615 a7c4 lN.;}9..Q.(..6.. 803ca00: 6fd3 dfa7 b419 a62b e25f b7ff 8ae6 62bb .o....+._......b 803ca10: 992e ead6 0acf b5b5 4abd 6d69 b4ff 5f86 .........Jim..._ 803ca20: 7d8d d8fc 3fda abdd f754 fcdb 3fc9 c5da .}...?..T....?.. 803ca30: e527 1d7f b7b8 cb56 8e09 9c5f 47e4 7f4e '.....V..._..GN. 803ca40: 1412 4bdb 6695 1b01 2912 73c9 6e4b 1cf4 ...K.f...).sKn.. 803ca50: 329b f077 2d14 8b70 dc79 2dca 13f6 b621 .2w..-p.y..-..!. 803ca60: ded4 e27b f797 0a57 66ed 6a50 f13f 8a57 ..{...W..fPj?.W. 803ca70: 1fed 3675 6db9 c573 e139 5908 19fd a92d ..u6.ms.9..Y..-. 803ca80: fa53 bb68 9ff4 57f7 5ade 4c5d e03f d340 S.h....W.Z]L?.@. 803ca90: a7af 0d2f 13a6 fa63 920d 48ff 919c 18f8 ../...c....H.... 803caa0: 0b38 81f3 647f f2f6 01a9 02ce 9060 57d8 8....d......`..W 803cab0: 6244 535f 682e 5bee 7e40 df85 0d2f 3ee2 Db_S.h.[@~../..> 803cac0: fcf8 fce2 c6d7 95f4 fe71 d337 e757 0d7f ........q.7.W... 803cad0: f6f6 d36b 7ff2 c584 278d 20ee de4c 39c1 ..k......'. L..9 803cae0: e31c f5f8 21a2 8e84 c141 fe9c dd06 5fa1 .....!..A......_ 803caf0: 70c1 625f 4838 2dfe d50d ff38 d825 862b .p_b8H.-..8.%.+. 803cb00: ff88 1c18 92ed 9857 4020 eb28 53fc 1f03 ......W. @(..S.. 803cb10: 1438 31d4 9344 9b68 7045 907b 30dd 9519 8..1D.h.Ep{..0.. 803cb20: 21c2 b5ce 4934 63e7 0748 345d 0922 de20 .!..4I.cH.]4". . 803cb30: efab 520b f3a5 0531 d497 cd6b 0b8a 006d ...R..1...k...m. 803cb40: 1e51 68f8 4c59 50a4 2e6c 6f22 f721 592a Q..hYL.Pl."o!.*Y 803cb50: 0a48 1a42 f389 fb31 c3f0 405b aa01 d17b H.B...1...[@..{. 803cb60: 9864 8e94 0ec7 6c0d 5561 d43a 0a18 ee32 d......laU:...2. 803cb70: 42f0 14a0 9742 b973 1dab 379c 40dd 2874 .B..B.s....7.@t( 803cb80: 5ce4 506a 3a64 7c71 8d1c f7fd 1a81 ccb4 .\jPd:q|........ 803cb90: 56fb 3888 df51 1d1f 09d3 f22a be58 0619 .V.8Q.....*.X... 803cba0: 7ac7 8b1e 2238 1c6f 208c a6bf c1d0 e53c .z..8"o.. ....<. 803cbb0: 6c56 76db 30a5 7a7c 294a 972f 65f2 edaa Vl.v.0|zJ)/..e.. 803cbc0: 83f4 0271 609a 3eaa 8cff 1856 4f2b 90cc ..q..`.>..V.+O.. 803cbd0: fd0e 29af 0449 64b2 9b16 92de fb6d c2ed ...)I..d....m... 803cbe0: 0d6c 26c8 fa80 888e fa78 c90d 9f0a 6c83 l..&....x......l 803cbf0: 8b78 9250 e39a f18d 9505 8710 ff3d f3bb x.P.........=... 803cc00: d04f a11c 3f39 db6b 2934 3f33 5ced 7e66 O...9?k.4)3?.\f~ 803cc10: 28de 362a 134d 7373 69d2 b980 3c1b df92 .(*6M.ss.i...<.. 803cc20: 8731 56ff 2ec8 03b4 4f7f e443 f80d 7692 1..V.....OC....v 803cc30: 81a4 7ca1 f34d cec5 d224 31e7 03ff 52ed ...|M...$..1...R 803cc40: f19a d877 d898 800a fa21 bec7 79f8 1b7e ..w.....!....y~. 803cc50: 93a4 ff3c 3094 8813 eacd f682 a7e5 7d97 ..<..0.........} 803cc60: c5fa 3436 ff2e ef2f 85dd a15a 0128 5b0b ..64../...Z.(..[ 803cc70: baf6 7b61 4a02 4218 b27f 15cd c567 265c ..a{.J.B....g.\& 803cc80: 8084 9046 19c2 4cb4 1098 8829 0f18 3c1f ..F....L..)....< 803cc90: cdde 7be4 b310 8758 17a4 d0c6 e2c4 3611 ...{..X........6 803cca0: b058 3c1b 8a4f 5496 a0cf b010 8de4 ea52 X....b 803ccf0: 469b f42f 60fd 0828 1926 aca5 2ae6 e830 .F/..`(.&....*0. 803cd00: 3b78 c649 3ba1 0a81 f508 162d abd2 7d95 x;I..;....-....} 803cd10: 7132 1ca6 652a 8268 5dbf 0e36 7109 1e85 2q..*eh..]6..q.. 803cd20: 0bb8 284c 5f89 f290 083f 9d2e 0ea2 0978 ..L(._..?.....x. 803cd30: a026 cd6a 63b4 9583 8df5 e478 0f0c 07aa &.j..c....x..... 803cd40: e751 c6a0 2318 bd38 9b19 6d39 2709 3244 Q....#8...9m.'D2 803cd50: fa8e 320c a43f 4dc5 dc11 9a6b bd92 838d ...2?..M..k..... 803cd60: 7441 2c14 3cc2 42e3 7436 1409 97c8 83d8 At.,.<.B6t...... 803cd70: ed5a c23c 8f16 052e cd7e 7510 4bb8 c046 Z.<.....~..u.KF. 803cd80: 69ec 9cee 259b 058b 4cd8 0969 f19b 2c42 .i...%...Li...B, 803cd90: 86bc 1624 f0cf ca22 3058 7988 98ea 48d9 ..$...".X0.y...H 803cda0: 64b3 5331 4f3c 0b12 7400 cf44 cb14 afe6 .d1S.L6.}#. 803cf10: b45c f242 2be1 ed69 3d13 19fb 2e86 381a \.B..+i..=.....8 803cf20: d5cc 37af cccb da68 0c4f b5d2 7f07 ca0a ...7..h.O....... 803cf30: cc36 4b4f f7ce a3b2 0d08 0ef5 0708 f2e4 6.OK............ 803cf40: 68a3 afda 9620 d50b a85b 9fdf 4d09 967b .h.. ...[....M{. 803cf50: 4936 264d 237b 13e5 671b ff95 6a7b f0ca 6IM&{#...g..{j.. 803cf60: fd34 e3f9 f707 edc9 7960 2562 56fd eeea 4.......`yb%.V.. 803cf70: 0281 5ef3 8c92 091e 4faf ca1b 9189 6acf ...^.....O.....j 803cf80: 9652 1e3c 21b7 1ed3 7f05 c0f9 0a7d be91 R.<..!......}... 803cf90: de60 bd0b 1471 9d47 4ca4 7655 1f77 b8e2 `...q.G..LUvw... 803cfa0: 61f4 0817 0586 ddf3 d0db 1c6b 1b0b b29c .a........k..... 803cfb0: e486 7802 d311 2871 6674 3b5b c5b2 0c3e ...x..q(tf[;..>. 803cfc0: 0d5a a228 b060 6400 83ae d953 0641 9a55 Z.(.`..d..S.A.U. 803cfd0: 56c4 02ad c275 1769 9b02 5326 9f66 8157 .V..u.i...&Sf.W. 803cfe0: 75c0 c91d 042d 6845 10b4 8a13 e867 8636 .u..-.Eh....g.6. 803cff0: 4667 e457 2327 5612 7046 a82f 6fdd 1dab gFW.'#.VFp/..o.. 803d000: 068e 1e93 6ca9 b8e5 7a1f a141 956a 8ad6 .....l...zA.j... 803d010: f8ad 4c38 1ebc 1d49 139e 2607 5318 0e12 ..8L..I....&.S.. 803d020: b1bb c4d9 2ed7 6444 b6f8 2a0a 1313 0966 ......Dd...*..f. 803d030: e5a0 0a62 2d87 00ae 2e2d c689 cc2f d626 ..b..-..-.../.&. 803d040: 21e0 4b75 c432 3c64 f706 51a0 0e28 1702 .!uK2.d<...Q(... 803d050: 428b 0187 9dc8 ef77 82a4 980e 9093 e068 .B....w.......h. 803d060: 4144 a44f 425d 7635 1b80 7ecf 8263 be84 DAO.]B5v...~c... 803d070: 0a4b 77f4 9df8 7e19 a284 05f8 c5a9 97c8 K..w...~........ 803d080: ac06 0645 a2a1 3185 51b8 03f4 0107 4636 ..E....1.Q....6F 803d090: 811e ac97 fe9f cc03 bf62 97c0 ce18 6702 ........b......g 803d0a0: 77c8 1fd8 58e8 dcac 9b0f a93d c2ff a1a4 .w...X....=..... 803d0b0: 4f66 f12a e777 02bf fc43 fa62 f9d5 162f fO*.w...C.b.../. 803d0c0: 633a 7fb8 5daf 9570 347f 3bbf f87e 7186 :c...]p..4.;~..q 803d0d0: 37e7 2b8c 9729 4f76 28f3 7d0a 92a3 c811 .7.+).vO.(.}.... 803d0e0: df76 b981 334f 167f e59c f5ea 6eeb c6f1 v...O3.......n.. 803d0f0: 370d b6e5 3819 e688 080e de05 f264 923a .7...8......d.:. 803d100: 5a2b 5b13 934d 9c3d b982 319b e7b4 1761 +Z.[M.=....1..a. 803d110: 95e4 8140 3a8f db86 8b86 e9b5 b182 5a57 ..@..:........WZ 803d120: 75fe 6965 f96a c270 79f2 5c10 3ce8 2b25 .ueij.p..y.\.<%+ 803d130: a07d c3f5 d823 f6f3 fdfc 72fd 0de8 ec2d }...#......r..-. 803d140: 7632 936b 0e47 de5d ef85 36d7 95ab 73d1 2vk.G.]....6...s 803d150: 4513 9849 03f4 af5b 39c2 f238 7631 eadd .EI...[..98.1v.. 803d160: e81d 06fb c10c c419 028f 9cf8 1ee3 b7b6 ................ 803d170: 7ae2 7d26 d1c4 ed90 e632 3dca f36c d8f2 .z&}....2..=l... 803d180: a781 007b aff7 75da 76e9 57b3 f29c c0e4 ..{....u.v.W.... 803d190: 1421 37c3 c48c 2640 7b7c 1f6f 47ce e8fc !..7..@&|{o..G.. 803d1a0: 62d8 5c05 8d6b 8d5c d12a 29c0 bea3 c837 .b.\k.\.*..)..7. 803d1b0: a8e3 7512 3872 04aa 93a4 69a7 9d62 8e9c ...ur8.....ib... 803d1c0: a4aa 6c56 3981 ef6c 2780 6a64 ce45 bfb3 ..Vl.9l..'djE... 803d1d0: 53bd 815c ea4b ac37 33c8 40a0 4c22 d101 .S\.K.7..3.@"L.. 803d1e0: 6d38 a367 ded8 bbbe e8fd c1de dba3 9ab7 8mg............. 803d1f0: ebe2 47dd 6fb7 27df e989 25d6 dfad 5bd2 ...G.o.'...%...[ 803d200: c067 6d37 3a5d 2ffc 809e e004 fc59 4857 g.7m]:./....Y.WH 803d210: 343f aca4 9bd2 a776 0ae2 ee2e 414f 3ae4 ?4....v.....OA.: 803d220: 9954 f6a8 3da6 8022 e2e1 50ce fd48 27fc T....="....PH..' 803d230: 959e 9c80 df6f 2ab3 2c97 68cf f910 2674 ....o..*.,.h..t& 803d240: eb64 69df 379b 905f d0b1 9a6c a337 4e28 d..i.7_...l.7.(N 803d250: 688c dc6c 509c 4048 edb7 4797 9013 19ba .hl..PH@...G.... 803d260: 873c 6c79 0e10 2cd9 b308 caa5 c21f eecc <.yl...,........ 803d270: c2c0 f566 5052 c70f d41d e6c2 d270 5bef ..f.RP......p..[ 803d280: 9a61 f71d ac26 ab5e 4112 9e93 0755 3f4d a...&.^..A..U.M? 803d290: 136d 6c30 a2a1 b4b3 0cd1 ada6 66ca c207 m.0l.........f.. 803d2a0: 3cbd 8b4d d029 4103 771d a823 62b1 8704 ..I\ 803d3f0: 6f26 364a 9646 4c66 7309 c100 c1de 240a &oJ6F.fL.s.....$ 803d400: 9570 c0ec 0dde 1b01 a47e 1096 5c6c f708 p.......~...l\.. 803d410: 80dd d78e b205 edb7 c510 4010 843f 355b ...........@?.[5 803d420: 0547 62a2 ca9c be48 0e11 a90d 5d42 fc2c G..b..H.....B],. 803d430: 3824 2025 ec25 145d 90c3 21c0 7d68 c2ef $8% %.]....!h}.. 803d440: 56fd af67 2902 028a 38e8 8d24 aaa4 2232 .Vg..)...8$...2" 803d450: 42c6 6428 b32d f7b8 c1de edc3 db47 20f7 .B(d-.......G.. 803d460: 30a8 6f9c bd9b 5e03 03ec 0573 5a11 0939 .0.o...^..s..Z9. 803d470: 408a d630 2abd 641a e0c0 9808 4063 7991 .@0..*.d....c@.y 803d480: 2f49 3fb7 7db8 177f d132 834c 6e55 a6b0 I/.?.}..2.L.Un.. 803d490: 241a 8b85 16d9 de75 a3d9 4bfc bcda bdb5 .$....u....K.... 803d4a0: 7b7b cef7 dbbd cdf3 d0d6 d62c 6669 67b9 {{........,.if.g 803d4b0: c1a4 6e2b 772b b6f1 6fca af15 381f b563 ..+n+w...o...8c. 803d4c0: 7059 c2ba 4703 6d3f a68d c1f5 5cc0 116c Yp...G?m.....\l. 803d4d0: 9f51 0465 66ca 84df 50bc aa20 91d4 8c3d Q.e..f...P ...=. 803d4e0: 0186 6373 689c a644 8239 76bb 57bd 31bd ..sc.hD.9..v.W.1 803d4f0: effd 52d8 431f c153 134e d64e 9ddf 1aff ...R.CS.N.N..... 803d500: 9ba6 d357 ba7f 8abe ebf2 4d08 d834 6623 ..W........M4.#f 803d510: 6e83 4187 e0df 259f e83f 9338 627e 03ce .n.A...%?.8.~b.. 803d520: 7a94 aa50 b449 31bf 7bfd 7756 077e fd8e .zP.I..1.{Vw~... 803d530: f5f9 3455 e374 c8fa b660 9b65 77b4 b04a ..U4t...`.e..wJ. 803d540: 758f 4d87 c3c3 82c8 0b71 fe15 861b adf1 .u.M....q....... 803d550: d2d8 f606 27fd f9d8 f4e0 916c 02fa f05f .....'....l..._. 803d560: 96fa afaf 6e8e c688 e9ae 7a5b 3d06 caa9 .....n....[z.=.. 803d570: e7cd 4c31 17f7 c329 2bad 8032 cc34 11d3 ..1L..)..+2.4... 803d580: 1bfb 0561 811c d1ea 952e 2b26 aef6 f467 ..a.......&+..g. 803d590: c9ef c200 81de 7422 70e4 6100 388f a288 ......"t.p.a.8.. 803d5a0: 0f54 aed1 9d1a 7bba e2de a61d 38ab 40f3 T......{.....8.@ 803d5b0: 8372 2e74 296d f8a3 b90b 9890 7c5e 7df6 r.t.m)......^|.} 803d5c0: 5229 b2e3 2c43 43f1 bab0 afab 7385 5f5d )R..C,.C.....s]_ 803d5d0: 9d2e 6a4d 96ac 4382 159c 6abb 5c65 eb5c ..Mj...C...je\\. 803d5e0: 3474 8e0e acde 0453 f32a 53d1 a8ba f449 t4....S.*..S..I. 803d5f0: fef3 c7c3 a8dc 607e 464c 81f1 baa4 38ff ......~`LF.....8 803d600: 4434 3970 6e3c e83f f9b8 07fe f7d5 39af 4Dp9 803d670: aa1a 810f d92f e505 a55e b10b ef52 9588 ..../...^...R... 803d680: f562 b67f 0697 b2f7 7aa6 ba81 96a2 f284 b........z...... 803d690: d2ae cdc7 9d6d 6616 5fdb f6e3 55d7 74fb ....m..f._...U.t 803d6a0: 40fb 81ce aef2 fed2 edee 0f7b 0279 d2ac .@........{.y... 803d6b0: b6cd cebf 6fed f6a8 e185 f65a b940 0f69 .....o....Z.@.i. 803d6c0: 44b3 78fc 7b77 fdf7 f3c7 cf42 3706 a9b8 .D.xw{....B..7.. 803d6d0: d41a 28e4 bbca b9b0 12c5 26d4 fb1a 9353 ...(.......&..S. 803d6e0: 34a0 cd86 fc12 487f 2451 e592 a8a4 2805 .4.....HQ$.....( 803d6f0: faba 9de9 524a 2b5a 9c17 6f8c 4d20 8ca5 ....JRZ+...o M.. 803d700: 1335 32a7 9a0e 5409 bf19 1e43 c9df 1de8 5..2...T..C..... 803d710: dc64 7909 2b7c 77a3 7290 6413 d5f1 de8c d..y|+.w.r.d.... 803d720: dc81 c8fa 1be0 3d1a b736 2760 8321 69af .......=6.`'!..i 803d730: 0ef4 cdd2 2c85 a8be 1801 b70a 9822 f09c .....,......"... 803d740: 31a6 59bd 6d11 ecf6 c5d0 d7b9 d356 bef8 .1.Y.m......V... 803d750: e12e 525d 8e6f 7793 3db5 fafc 8a7a f737 ..]Ro..w.=..z.7. 803d760: 56ae 9e6b 86dd ab57 e798 4fa1 56af cf29 .Vk...W....O.V). 803d770: 0f18 4ab5 48b3 bc57 7fae 8c09 6060 863f ...J.HW.....``?. 803d780: ac40 7dd1 c19e f268 0929 4ac5 949a 0141 @..}..h.)..J..A. 803d790: 76e2 65d5 ca3a cb1b aac5 7207 2a4d 83b7 .v.e:......rM*.. 803d7a0: a241 2ab1 72b8 33d7 b1d2 9faa 786b 7492 A..*.r.3....kx.t 803d7b0: 0f36 c0fc 4183 7c99 4a1b 7235 ee29 c3d6 6....A.|.J5r)... 803d7c0: 422d d2e1 ef49 91d5 c74b ac43 2c26 e34f -B..I...K.C.&,O. 803d7d0: d41d 4ed9 300a 7ab5 aa37 8db5 7e36 6a56 ...N.0.z7...6~Vj 803d7e0: 480d f8f8 86b5 e380 67b6 2b57 f5d5 b566 .H.......gW+..f. 803d7f0: a15a 7b24 ab22 7a95 910d 2b52 63f6 2176 Z.${"..z..R+.cv! 803d800: 3b95 68e3 23b0 2adb a578 c6cd dc26 28b2 .;.h.#.*x...&..( 803d810: 3d16 eb70 55ca 5da5 1b8f 21c4 b2d4 ac71 .=p..U.]...!..q. 803d820: 2bdd 4e53 a1b7 1473 1d76 52f8 14cb bb5a .+SN..s.v..R..Z. 803d830: 85dd 8a7a 6b08 3407 a084 07d2 b81d 1fa2 ..z..k.4........ 803d840: b9df a46d 4377 c04a ae11 2dcf 55a8 381e ..m.wCJ....-.U.8 803d850: d1e4 dd5d 871d 3408 ca4d 8f6f 9e8f 2a60 ..]....4M.o...`* 803d860: ca4f 7cab 62d3 9aa9 0e2d deee 77b9 c429 O..|.b..-....w). 803d870: 3a56 c3ce 5ef8 86e4 707d 0789 0b8f 7950 V:...^..}p....Py 803d880: cb32 ee18 4952 17cb 4359 b917 4511 f4b4 2...RI..YC...E.. 803d890: 2ff9 d7a1 3a93 becd 8a7f c669 d527 7b25 ./...:....i.'.%{ 803d8a0: 27da aeb0 01fd df19 72c1 86c6 182b 106b .'.......r..+.k. 803d8b0: ef52 c451 ee0d c21a 4c67 1cf6 eb4d e282 R.Q.....gL..M... 803d8c0: 4e6a 9eff ba3d c39f 49b3 cef1 ead0 19e1 jN..=....I...... 803d8d0: 0bb0 191d 6e07 ef91 16fe 5b14 44f0 753b .....n.....[.D;u 803d8e0: 975f eaa1 7c52 dbb5 9b76 ba5d 4a88 0510 _...R|..v.]..J.. 803d8f0: 7e48 9ee0 be9c d307 7c04 5968 7bc6 64d1 H~.......|hY.{.d 803d900: cb8c b206 1c34 c422 9296 4154 245c d9ec ....4."...TA\$.. 803d910: 81f3 6003 a6e6 5774 fb2b a614 1e56 a345 ...`..tW+...V.E. 803d920: b142 b08d b6e8 a4d9 68e0 d5b3 3dd3 21a0 B........h...=.! 803d930: 855a afa1 8e90 069c 7648 0298 99ac dd70 Z.......Hv....p. 803d940: 7f29 5c3f 3694 0add c970 0298 c124 b32e ).?\.6..p...$... 803d950: 0828 1735 dbfe c32b 78df 4c9b 775c 98e1 (.5...+..x.L\w.. 803d960: 600f 2b41 1498 9d44 c00b a3ce 961c 6131 .`A+..D.......1a 803d970: 3dd5 fd0e 87a4 939d ce2f 88af 881d 4be2 .=....../......K 803d980: a122 68ce d112 7a90 15b5 c01b 8e79 ba6b "..h...z....y.k. 803d990: e01c 7360 b7e0 dc38 4304 4570 9a96 5d37 ..`s..8..CpE..7] 803d9a0: cde8 93ed 3222 dda4 232b 41f7 d8fc 0a39 ...."2..+#.A..9. 803d9b0: 8c1e 201f e314 7026 7c54 442d 6e01 f85e ... ..&pT|-D.n^. 803d9c0: fb6c 7071 6122 8c39 d703 3992 184f df52 l.qp"a9....9O.R. 803d9d0: 747f 2cb7 d2ae 088a a410 2971 6418 81ea .t.,......q).d.. 803d9e0: 2f16 68b2 2cc2 eadb 3994 129e 43d7 3605 ./.h.,...9...C.6 803d9f0: f36d 8c28 6c43 5c26 6d07 98aa 4eef 4299 m.(.Cl&\.m...N.B 803da00: 193c 7e33 3ca6 91ba 22ff 626f ba84 6083 <.3~.<..."ob...` 803da10: d0ed 843b 3b41 94ed 04c1 c5de dc5d 9c0e ..;.A;......]... 803da20: 67c3 eb8c 38d1 02ea 717d 6f86 c470 974b .g...8..}q.op.K. 803da30: 0f91 e263 60fe 5890 c0a8 755f 49ca 3894 ..c..`.X.._u.I.8 803da40: b7fd 95ab c80a 9d9e fa7c 9cc6 92a1 d7d7 ........|....... 803da50: 91a7 46cd b0a7 f1fd d241 5503 8062 d658 ...F....A..Ub.X. 803da60: 5cfa bcf8 8922 da74 3562 ebd2 2c71 014a .\..".t.b5..q,J. 803da70: 6edf 5c99 c2f8 67a4 6e5a db16 1b3e ec3f .n.\...gZn..>.?. 803da80: d6b2 e2a8 0198 61c9 766e 381a 888d 49b0 .......anv.8...I 803da90: 6c80 07b1 ce06 1bb8 770e 91a3 d672 6993 .l.......w..r..i 803daa0: 828a ee59 cce3 2f00 6b06 6e4e 3806 026c ..Y..../.kNn.8l. 803dab0: 1390 2f39 279e 438f 0fb7 a3cb 2320 9303 ..9/.'.C.... #.. 803dac0: a9c2 baae 8a2b 88e9 315b fe2a 95ba 536b ....+...[1*...kS 803dad0: 515f 89ba b6ac 818c ceed 12ce dd44 fb60 _Q..........D.`. 803dae0: 72a4 caae 2126 db57 02d5 e89f bb5a 2c5c .r..&!W.....Z.\, 803daf0: 0aa7 bf17 70ba ea4c 8511 e91f 9277 a853 .....pL.....w.S. 803db00: 017c ce81 5fdd 614e 4a67 3808 84ed 44fc |...._NagJ.8...D 803db10: c902 cf5a 1cb5 2e08 ce66 d483 2073 458d ..Z.....f...s .E 803db20: 8d20 081c 5dae b7ce 46b2 c220 2721 2106 ....]...F .!'.! 803db30: 715c 2b94 6e9c 2e69 2292 1b37 6030 14e1 \q.+.ni.."7.0`.. 803db40: dca3 5a34 cd58 6444 1150 0807 ecab 31ee ..4ZX.DdP......1 803db50: c965 6078 4995 ca49 47ce e344 a730 2a0c e.x`.II..GD.0..* 803db60: 43d0 5568 34a5 024f f0c8 ad5e 7298 6154 .ChU.4O...^..rTa 803db70: e776 cd0a 7852 b1ed 8b2f 1c44 56ac 190d v...Rx../.D..V.. 803db80: 68b2 983e eb94 6cca ca02 c047 69a2 20ca .h>....l..G..i. 803db90: 5742 1797 e496 b81d e2f4 ba8a 8723 8273 BW..........#.s. 803dba0: 84fb 70d4 6805 93b0 8037 4f86 a185 f8ff ...p.h..7..O.... 803dbb0: e1cc 2e02 cc00 18a4 d100 39a9 f6c3 eea4 ...........9.... 803dbc0: 90fe 21ec 016e ebb1 02e3 b568 692a e131 ...!n.....h.*i1. 803dbd0: 4d3c e5a0 998b 0ccd cea0 d479 a9c5 a1b4 {,n& 803dc30: 63e4 2da5 e22d a2db c86e 45d9 b997 1bd0 .c.--...n..E.... 803dc40: 522a 9e24 109c be0a e78f e73a cb62 cab9 *R$.......:.b... 803dc50: 6132 8dfa ccdd cfba 8609 8a03 9123 2807 2a..........#..( 803dc60: 530b 1c92 36e9 f361 cce4 f3d2 6a10 0836 .S...6a......j6. 803dc70: 9796 794d 63a1 0549 2dbe 9980 bacb b5b1 ..My.cI..-...... 803dc80: 9455 4d77 d8d4 df35 769a 8efb fa44 5f29 U.wM..5..v..D.)_ 803dc90: fc41 d202 4bff fd19 f78b 5816 87c8 c646 A....K.....X..F. 803dca0: 1961 3418 599f 122d 1038 7862 970b 110a a..4.Y-.8.bx.... 803dcb0: 3dfd 3d77 c790 84a1 5dc1 b01c 8ef2 5ce4 .=w=.....].....\ 803dcc0: 08be 39b1 38b3 565a f644 0c51 4e40 244b ...9.8ZVD.Q.@NK$ 803dcd0: 91d5 5c1e d079 5ce9 b182 d1cb 74e3 28e0 ...\y..\.....t.( 803dce0: 5e5c e1ce f387 a080 881f 5c22 84f9 8346 \^........"\..F. 803dcf0: 2db7 6010 a320 81a5 c835 9710 288f 6689 .-.` ...5....(.f 803dd00: 9386 3f44 58ca d510 3f30 121a b18c 6486 ..D?.X..0?.....d 803dd10: 1867 2a11 fa7f a445 f110 0377 663c 4993 g..*..E...w.w.x...|'"..pt.) 803dd60: 5de4 84ef a8f3 7730 0345 921c 54d3 c2a0 .]....0wE....T.. 803dd70: 35b8 174e 88bf caef 5f7b 3104 6973 9503 .5N.....{_.1si.. 803dd80: 0e65 d215 a5f2 9cc3 3ce9 a657 1780 8a61 e........... 803de20: ca2f 29ba 1ac2 5339 cb7e e086 da5f c649 /..)..9S~..._.I. 803de30: 1dfd 6171 4aca cf83 f36c 3acf b59d 5aca ..qa.J..l..:...Z 803de40: a105 1c5a fbaa b757 deef f07d 6521 1c57 ..Z...W...}.!eW. 803de50: 81bf 10f0 cd91 bb71 adc8 3dd7 02af 8a60 ......q....=..`. 803de60: b13f 7864 2c0f ef11 701d 0184 e47c 1def ?.dx.,...p..|... 803de70: 30a8 bb02 4966 36ab a400 f809 4003 db28 .0..fI.6.....@(. 803de80: ca33 e7e5 5d8e 0057 c376 a362 bdaf 9166 3....]W.v.b...f. 803de90: d71d b75e 9184 ded6 c8b0 6b12 5a6f f4ca ..^........koZ.. 803dea0: 9f65 0f6c 31fd d202 4a9b 0311 91db 60a7 e.l..1...J.....` 803deb0: 7d66 4d48 ca74 26d8 ad2b 0886 b98f 77d9 f}HMt..&+......w 803dec0: c3bc 889b 7b54 66f1 646d b8f5 d819 dee0 ....T{.fmd...... 803ded0: 7eac b0f8 c887 d39b 6f10 e131 e447 2b73 .~.......o1.G.s+ 803dee0: 8fb0 9d8c 6b37 ab87 f718 61c2 2dc8 c87c ....7k.....a.-|. 803def0: a68f 6fc5 c6d6 db9d 92c2 2dc8 c338 9845 ...o.......-8.E. 803df00: 1850 4b2f 15dc 8a10 e69b b865 65c8 5db3 P./K......e..e.] 803df10: 0352 a1e3 20e6 68e4 2771 cce6 ec42 ff54 R.... .hq'..B.T. 803df20: 5e05 12bb 347a efdb 4e38 1430 6577 466f .^..z4..8N0.weoF 803df30: a1cf 10f0 494c 98c1 09d6 c244 f118 8823 ....LI....D...#. 803df40: fcbc e40d 7a1a 8145 99cc 8ab8 a566 2f2f .....zE.....f.// 803df50: cfe8 c88b 9b53 98a2 91e8 97a9 86f4 f9c3 ....S........... 803df60: c92f 99ec 37bd 72f2 95fa a078 f660 0675 /....7.r..x.`.u. 803df70: 1504 9402 0c62 44bf f15d 09ac 6e5e a180 ....b..D]...^n.. 803df80: d3f4 31b2 9ffd 08dc 0304 2544 10d1 a3c4 ...1......D%.... 803df90: 5f2b 7052 7512 ee27 fcb9 e48a 7a06 e585 +_Rp.u'......z.. 803dfa0: 7a0b e5b3 92a5 0023 ad5d 1bd0 f42f 0b68 .z....#.].../.h. 803dfb0: 942a 2361 72e9 7d18 b693 d8a6 646d 5569 *.a#.r.}....mdiU 803dfc0: f579 dd7a 26b4 7ee3 c713 3f08 22b7 d74e y.z..&.~...?."N. 803dfd0: 17b8 371d 5b25 0985 4942 b8c4 0f6c fd79 ...7%[..BI..l.y. 803dfe0: 0d7a 3eb6 9811 c079 9981 518b 0f9c bcdd z..>..y....Q.... 803dff0: c10c d598 e717 4d9f 8f7f 4bc8 ce3c d901 .......M...K<... 803e000: 984d 318f ba01 481e 40eb 614f 62e0 6121 M..1...H.@Oa.b!a 803e010: 2f06 651d 0a53 3ec0 6bea a5a6 a94f e9d3 ./.eS..>.k..O... 803e020: 1898 ade0 babf f07f ede1 b69b 7dfc 7a7a .............}zz 803e030: d672 df92 b665 da94 3827 9baf c1a9 d669 r...e...'8....i. 803e040: da80 194e 5b01 61c9 3c44 6df1 7e3c 54b6 ..N..[.aD<.m<~.T 803e050: 5e85 0b3c 890c af16 15c4 b2cf 22dd eb4d .^<.........."M. 803e060: 4d00 c712 71eb e08f 43e6 95d8 5771 cced .M...q...C..qW.. 803e070: f612 ac9f 917b 99ce 2f70 c11d f802 064b ....{...p/....K. 803e080: 07e1 070b eb71 bdc1 d130 9cc6 3cb2 9587 ....q...0....<.. 803e090: 490a 0100 95d9 e931 4604 20b2 8bc1 ea57 .I....1..F. ..W. 803e0a0: a213 3c46 a4f6 ae8d 0808 faf2 f600 8896 ..F<............ 803e0b0: 63d7 7cc8 7e96 2ab4 031d 6f96 407a e852 .c.|.~.*...oz@R. 803e0c0: c09d 3c2e d415 ee16 8d97 8e1e 3cf1 bc24 ...<.........<$. 803e0d0: f023 709b 3363 7a79 906b 9c7a 17a1 6ff4 #..pc3yzk.z....o 803e0e0: 5c4e 25c4 fae2 352d 4672 5b71 3cbb dcec N\.%..-5rFq[.<.. 803e0f0: 712c eefb 80f8 5d71 1466 4740 3a90 9a8b ,q....q]f.@G.:.. 803e100: 729a 90e2 a5bb 843c 48f4 22da 0a04 c917 .r....<..H.".... 803e110: 594c b1c7 7e0a a8a3 ec4a fb12 5c04 eb45 LY...~..J....\E. 803e120: ee8d 8a26 0407 1985 af03 b608 9894 5e9f ..&............^ 803e130: 2248 5367 b797 7911 ac2c 192e 77fd 3c71 H"gS...y,....wq< 803e140: d817 c16b c55f 5a95 6de3 edef 0af5 a3fd ..k._..Z.m...... 803e150: f90b 32f0 6177 7dbc def7 f0ae 914d 211b ...2wa.}....M..! 803e160: 66a5 a38f 6daf 21b8 72e0 8608 2ee4 ff7b .f...m.!.r....{. 803e170: 1dd1 dd3c 7786 b057 3042 af6e 7a14 b36d ..<..wW.B0n..zm. 803e180: 0465 47cf b421 402e f0f5 0d36 7d72 a5ca e..G!..@..6.r}.. 803e190: 833b f2c8 5645 5940 57b8 84e4 6a43 644d ;...EV@Y.W..CjMd 803e1a0: 06e2 0b47 4ac6 1e04 8807 378e d241 b5c0 ..G..J.....7A... 803e1b0: 6f36 37cd 7b97 928c 2607 26dd adab f127 6o.7.{...&.&..'. 803e1c0: 176a c6c3 2c3d 1d0a 1be1 5058 5c83 529b j...=,....XP.\.R 803e1d0: 7896 4814 c279 2e78 a545 0a9a 6017 4e7e .x.Hy.x.E....`~N 803e1e0: 86f2 72a3 adfe 6154 10ff 6bef d316 d5b7 ...r..Ta...k.... 803e1f0: eae8 6e06 0650 6d7d e2a8 28fa 4248 20ac ...nP.}m...(HB. 803e200: 65f9 1140 9258 e8c5 b82c 8a1a 815c 2f0d .e@.X...,...\../ 803e210: 2287 338f ec35 f6ee 9626 a951 fe96 19dc .".35...&.Q..... 803e220: 3696 462a d2a5 7fa4 0355 078b 65cc f424 .6*F....U....e$. 803e230: 127e 41f6 8ae9 28a2 3609 e135 3d47 0373 ~..A...(.65.G=s. 803e240: 0696 f166 a78c 0b08 cb75 273d 707e a43c ..f.....u.='~p<. 803e250: 034d f573 f80b 968e 9797 841c 6278 f426 M.s.........xb&. 803e260: 26cb 358f e9d6 ad2d 74a5 a7c7 c553 e5e4 .&.5..-..t..S... 803e270: 568e b7cf cc66 bcb4 b8eb b79a 4b01 5eac .V..f........K.^ 803e280: 7576 5140 ac27 432a 1246 8c68 55b1 84b2 vu@Q'.*CF.h..U.. 803e290: 4f30 6cb8 4743 a328 a01f 4b54 9e9d a6aa 0O.lCG(...TK.... 803e2a0: 7720 5b29 f0c6 a1c0 b96b 11d8 8e00 d4b2 w)[....k....... 803e2b0: c005 5c90 0112 5f48 4033 15a4 f7f5 2bc8 ...\..H_3@.....+ 803e2c0: cfb0 277e 1870 2a82 4e50 2cf1 45e5 b200 ..~'p..*PN.,.E.. 803e2d0: 3fd1 b2b1 8e08 f211 9c35 d8c8 be7a 83d9 .?......5...z... 803e2e0: bc22 ab14 4287 9e93 a8ec a653 2b4c ff06 "....B....S.L+.. 803e2f0: 5aad e640 2031 957f 9816 bd01 0cab 2842 .Z@.1 ........B( 803e300: 031c 8972 be0b dc45 3263 56ca 2e48 5c34 ..r...E.c2.VH.4\ 803e310: 7b51 64fb f021 9569 8e6f 63a3 8ea8 278f Q{.d!.i.o..c...' 803e320: b223 630d a7e3 f07e ed0e 1b24 8f1c e2df #..c..~...$..... 803e330: f78d 083a 2439 7817 8bd9 3263 b2d1 ff01 ..:.9$.x..c2.... 803e340: 5d31 7c51 0bdc e640 005c 1747 6d00 de0f 1]Q|..@.\.G..m.. 803e350: 1c15 d26c 66e9 3bcd 9510 ddb3 2741 9ec1 ..l..f.;....A'.. 803e360: dfb3 d072 b934 fd33 2502 dae9 dc03 b33f ..r.4.3..%....?. 803e370: d3c3 22e7 7cf1 b101 2f2d 282f 6f88 d8be ...".|..-//(.o.. 803e380: ba75 8cf4 ec12 1359 c578 e13b 6f10 a677 u.....Y.x.;..ow. 803e390: ad26 1194 fbe8 f675 3e7c 4d3d d65b 63ce &.....u.|>=M[..c 803e3a0: 18e5 1687 1fa6 ea83 c41e 93ec d6af 8ad0 ................ 803e3b0: 6d70 e89b dbc8 46b7 e4f8 c5d3 b18d acd3 pm.....F........ 803e3c0: 3867 910c e384 8930 73de 7b70 294d c5ee g8....0..sp{M).. 803e3d0: 40d6 f114 f701 e20e fe07 8262 62cb 6792 .@........b..b.g 803e3e0: 66a3 eda4 cc12 4fa1 905d 2562 0568 536d .f.....O].b%h.mS 803e3f0: d0f0 3da0 f668 7ddb c1a6 d6f4 98c6 c1d6 ...=h..}........ 803e400: ed1e f78d 635b 04ac a3a8 614b e010 f0dc ....[c....Ka.... 803e410: cd10 078e c8d7 2286 878f 6487 a440 5bd4 ......."...d@..[ 803e420: 7e5e db66 741d f38c 5907 b588 e0f4 26a8 ^~f..t...Y.....& 803e430: 3987 9b62 a7b0 2fc7 7a4e f7a8 0156 2eae .9b..../Nz..V... 803e440: d008 3108 b188 9f43 4b82 b53d 8201 0efa ...1..C..K=..... 803e450: b3b5 eb03 5c6c 7bc0 bc9c 0365 35d0 acbd ....l\.{..e..5.. 803e460: 15a7 85e1 5158 10f4 fd91 eafc 2c1e e239 ....XQ.......,9. 803e470: b8c6 487d 092d 43e2 ac0b eb84 2e3e bc0b ..}H-..C....>... 803e480: 5245 ca4e b025 b848 0f06 7531 1c87 81a6 ERN.%.H...1u.... 803e490: f05f 2770 05df 1601 90ba 8aaf 2167 4466 _.p'........g!fD 803e4a0: 70b6 43b8 74c5 22c2 7471 1531 b77c 870b .p.C.t."qt1.|... 803e4b0: cbcb b887 040a ec40 3029 1da4 1831 7434 ......@.)0..1.4t 803e4c0: f248 4807 d168 f49c 9992 6129 d525 c284 H..Hh.....)a%... 803e4d0: 7362 ed09 453f 5a8f da4b 9e68 eae2 86b7 bs..?E.ZK.h..... 803e4e0: bd29 8255 8aca b605 a6b4 1451 3311 ee64 ).U.......Q..3d. 803e4f0: 4e25 625d d922 932e 0417 e858 0460 6cb8 %N]b".....X.`..l 803e500: 5c5a 8a0a 0f49 c37c 0da0 9b7b 53ee cc15 Z\..I.|...{..S.. 803e510: 91fb 8b01 3d00 61f9 f470 fc08 4699 c682 .....=.ap....F.. 803e520: c482 d5c0 0eec 271e 11f2 40d8 876c 6862 .......'...@l.bh 803e530: 93b2 7b01 7192 bb43 5612 c77c 8a85 4b8c ...{.qC..V|....K 803e540: e68c 6f04 8171 f4b0 fbe7 7616 6b2a 3018 ...oq......v*k.0 803e550: 062b 1ba2 c23a 20e0 bd96 a753 558a 1440 +...:.. ..S..U@. 803e560: 8f80 d729 e4b7 d007 48e2 d0ec 2088 8243 ..)......H... C. 803e570: 2f47 4b36 cb81 08ee 080a 33b0 f6c4 5705 G/6K.......3...W 803e580: e9ec 0fa7 8668 f1c0 82b0 084e b81d e5b2 ....h.....N..... 803e590: e682 4208 866c fadc 68b5 cc9b 34ac 9110 ...Bl....h...4.. 803e5a0: 78a3 7bb9 3a42 6727 41d6 829b 3101 5af6 .x.{B:'g.A...1.Z 803e5b0: 8062 f9c9 fb7c c0c5 8ab6 10bc a067 570f b...|.......g..W 803e5c0: d24d 0c23 0d95 bcb6 a7d0 5b41 70d8 7014 M.#.......A[.p.p 803e5d0: eb48 4ea5 74b3 88f4 e8de 98e5 3d0c a120 H..N.t.......= . 803e5e0: ba94 ad0e 4518 a46e ad87 06c2 a509 14ae .....En......... 803e5f0: c190 bca7 f119 e49e c84d 96ea b286 ff0c ........M....... 803e600: e4a4 d09c e8d1 120b 2b14 5680 9ee4 e22c .........+.V..,. 803e610: 93d0 702e 1c66 fc78 bf37 f41d 94c2 88ab ...pf.x.7....... 803e620: 70cd ee26 09fe 98fe 0975 3857 acdb d849 .p&.....u.W8..I. 803e630: ebc6 a091 f818 8e9d 760f cf41 8682 d203 .........vA..... 803e640: 70e0 5f41 28dc 90b3 0ea9 3a34 7d35 5675 .pA_.(....4:5}uV 803e650: fcb2 a949 f979 09b3 9147 4ba2 410e fc83 ..I.y...G..K.A.. 803e660: 1409 8789 1635 9d8a 2d6a d884 6299 1b5d ....5...j-...b]. 803e670: 9835 4096 4614 7ccd d17b 41d0 88ca 59aa 5..@.F.|{..A...Y 803e680: f434 0f2e bbbd eadf 138a f680 bf9e a5d7 4............... 803e690: 6a28 4011 b106 8699 427d a499 340f 0349 (j.@....}B...4I. 803e6a0: 1dc5 f2bf 28d3 6bc4 8426 7e06 e3d7 002c .....(.k&..~..,. 803e6b0: 0f4b af68 fc58 23b6 c9c1 06e0 99ac 87a8 K.h.X..#........ 803e6c0: e237 8531 ad0c 35d8 157c 9e9a 3b13 e9c3 7.1....5|....;.. 803e6d0: 3aff 48c9 7493 0b1c 4b47 d038 c110 2191 .:.H.t..GK8....! 803e6e0: cc32 952e cabe a404 0e70 0ce5 82a9 d5d2 2.......p....... 803e6f0: 7f56 24f6 395e ffc5 56b7 8abb 105d e155 V..$^9...V..].U. 803e700: 798d 73bc 5ae2 94ac 6b88 e1dd 8147 3968 .y.s.Z...k..G.h9 803e710: 4feb 49b1 f57b 8c49 f436 b826 b717 3698 .O.I{.I.6.&....6 803e720: 0f45 1366 51a7 5cc7 08d6 391d 7abc 2b1e E.f..Q.\...9.z.+ 803e730: 8f6f ee82 e7ed 82a3 e4f9 0b89 adec 6ff0 o..............o 803e740: cccb ecbd 9f2c e640 6e5b 3ec4 1953 9d44 ....,.@.[n.>S.D. 803e750: 5937 bce3 b487 9413 58d2 3d23 45e8 4462 7Y.......X#=.EbD 803e760: c2cb 6cad 148a 68c6 1db5 d334 06a6 dd8e ...l...h..4..... 803e770: 8339 bd21 19fd 880c 46d3 076a 19fa b590 9.!......Fj..... 803e780: cd2f 7c1e 2062 32a0 6fb5 7b80 58e4 7a78 /..|b .2.o.{.Xxz 803e790: a87c bdb5 9ca8 7354 dd28 8bf8 6f01 4f67 |.....Ts(....ogO 803e7a0: c87a 2b37 24e8 a1cb 641c a84a 9467 0243 z.7+.$...dJ.g.C. 803e7b0: 699a 1d53 2e1b 6d05 7057 54db 1aee 04f9 .iS....mWp.T.... 803e7c0: a52a 78b3 0822 f20b 01b9 cfca 238e 7356 *..x"........#Vs 803e7d0: 8917 3972 141c 304f 0466 4a21 8a0b 0592 ..r9..O0f.!J.... 803e7e0: c45b 70a0 d330 4a89 a14f 6338 f20f fa93 [..p0..JO.8c.... 803e7f0: b74a 052c c279 799d 41e2 119b ea40 1eed J.,.y..y.A..@... 803e800: 3238 f704 d65a 57b8 c980 7b78 7ec1 102b 82..Z..W..x{.~+. 803e810: 002c 1c12 0a52 86d2 decd 11c7 97ca 7d9e ,...R..........} 803e820: 885c 1855 6fa7 9ec9 934c 95a7 af0a 5cda \.U..o..L......\ 803e830: 6ef0 6eab ca0b 84cd 54e2 fc29 0a0d d40e .n.n.....T)..... 803e840: 1528 fab0 d467 4da1 f073 8ada 5637 ba40 (...g..Ms...7V@. 803e850: f4cd 1711 7b9f 0f7b d727 3b95 95c2 c967 .....{{.'..;..g. 803e860: 7978 0043 306b 8812 14cf 6437 b18d 1466 xyC.k0....7d..f. 803e870: ad1c 6c83 baab 36f4 b562 cd7d 0634 1f81 ...l...6b.}.4... 803e880: 883a 60e1 91cf ac69 78de bc32 bcd6 f266 :..`..i..x2...f. 803e890: 56ef 32aa 9b70 6b85 864f 11d7 75f1 e068 .V.2p..kO....uh. 803e8a0: 5a7d 2154 2a1d 1d26 6f0a 02bb b607 0d79 }ZT!.*&..o....y. 803e8b0: e22f 6592 1b2f a3c1 3f49 74b8 3300 dffd /..e/...I?.t.3.. 803e8c0: d6b8 6f34 8b98 e5fa 8cde f42c 156d 1cea ..4o......,.m... 803e8d0: f43a 11e8 ebde 5cab 637a 059e 44e3 f254 :......\zc...DT. 803e8e0: e1b2 8292 a69e afe8 a46d 5709 01c5 0c2b ........m..W..+. 803e8f0: 9e9f edba ec02 31c1 bdcc 63e5 3c67 0524 .......1...cg<$. 803e900: 5e87 d1ec 8883 09a9 e159 db69 e685 581a .^......Y.i....X 803e910: f524 cf56 a9d4 1c7f 87b8 2261 df9f 1eda $.V.......a".... 803e920: 9086 6130 e3c7 bebf 52c2 fc80 2c03 2533 ..0a.....R...,3% 803e930: 5b1d 862c e374 1bd9 9beb c0f4 ec19 5d82 .[,.t..........] 803e940: a97b e3e0 62c1 7c32 3f41 c60f bd38 7c11 {....b2|A?..8..| 803e950: 05e6 a5ed 736a 42a9 b941 9c38 56c8 9f06 ....js.BA.8..V.. 803e960: 1199 86c6 901b 0b3c 8413 210f 70ca bc0c ......<....!.p.. 803e970: 1635 c1e3 709d 3242 9e27 e2aa 06bf ef93 5....pB2'....... 803e980: f0de 9851 0044 2776 965d 20b7 c297 60fb ..Q.D.v'].. ...` 803e990: 23ac b103 10ca a172 2cf5 432f ea5f 8229 .#....r..,/C_.). 803e9a0: 2204 e8b2 fa3d 377b b927 acfb dffa d1bf ."..=.{7'....... 803e9b0: 82fe d90b c0f9 8f7a 6471 367a ddbf 7033 ......z.qdz6..3p 803e9c0: 179e ad9e d754 a741 e9aa 3e6c 43fa 4ea0 ....T.A...l>.C.N 803e9d0: 99e1 844d 95e6 4070 aba7 c9d8 63d6 3c7b ..M...p@.....c{< 803e9e0: 5e76 1664 fc0c 96ed 423e a019 d8f1 1ece v^d.....>B...... 803e9f0: 00e2 de79 4ae6 7fb4 ea7a 0dec 6965 01d6 ..y..J..z...ei.. 803ea00: 44e8 abae a078 9e89 d84b 5773 fb46 67e0 .D..x...K.sWF..g 803ea10: c9f2 22a6 a752 81a7 a985 83b7 21e6 941e ..."R........!.. 803ea20: c6ce cdd1 1693 621f ce4a 5bf2 75de 9265 .......bJ..[.ue. 803ea30: 796b 5b82 6da1 d3a8 24fb c8e0 294f c88f ky.[.m...$..O).. 803ea40: f841 504c fe6c 3990 d3b3 381b 76a3 0861 A.LPl..9...8.va. 803ea50: dc97 9b28 5604 4041 99ef 6c3b c617 20a1 ..(..VA@..;l... 803ea60: 243e 9a41 f9fb 980a 7cb5 c5ed c9c1 911d >$A......|...... 803ea70: 832d dfee 6100 aec2 f02c 6785 f0d8 0dd0 -....a..,..g.... 803ea80: 09ac 753c d9bf a3c7 d934 e9d4 2675 c639 ..d.k+z....! 803ec80: dc38 ba8f ae37 6621 4f11 f1c7 40b3 f12f 8...7.!f.O...@/. 803ec90: 3bd7 9ee0 e726 7d30 eb88 af39 3fce 0883 .;..&.0}..9..?.. 803eca0: 7b97 eaa6 23a7 4d91 432c b1ad 0479 129c .{...#.M,C..y... 803ecb0: d746 30b1 0346 6cc8 01ac bded 6d52 fd6d F..0F..l....Rmm. 803ecc0: a959 0eb6 692a a1ac 5688 5f13 2547 a706 Y...*i...V._G%.. 803ecd0: 4e02 5c27 23d8 8260 0345 4fc8 a5b8 068f .N'\.#`.E..O.... 803ece0: 1075 6554 bd6d aa5f 1a6d 0810 7440 4dd4 u.Tem._.m...@t.M 803ecf0: 82ad 12b5 e11d b663 ac2b 7520 4046 8ee8 ......c.+. uF@.. 803ed00: 96aa 5544 72ee 7383 4693 c183 447a a2c9 ..DU.r.s.F..zD.. 803ed10: 645b c770 4000 73db 834b 9c77 ae16 7fcb [dp..@.sK.w..... 803ed20: 8381 5f9a e5a0 1085 d52a b64f b502 2dad ..._....*.O....- 803ed30: b363 ef5a 1a97 9ab5 ff81 cfc0 c096 4d2a c.Z...........*M 803ed40: a045 081d 6ad8 7fd0 942a 80ff c63b 1f7d E....j..*...;.}. 803ed50: 1cdb ae08 e33d 4c12 309b 0bc7 afd0 3636 ....=..L.0....66 803ed60: ebb0 4037 6bb2 fb20 45b5 1510 1670 8bae ..7@.k ..E..p... 803ed70: e8ce ad1f 5c88 6ab7 6aa3 d66c db79 bbff .....\.j.jl.y... 803ed80: ccdd eb1c 90b4 7e66 9b8b 1f6d a053 b609 ......f~..m.S... 803ed90: 7aae eea8 a327 f599 86f5 b9b1 4eb5 7d4c .z..'........NL} 803eda0: bd6d 8eb4 b50d 89b5 4375 0d6e 8feb 06ff m.......uCn..... 803edb0: 41be 9b2f 7ac6 7e95 8401 0972 ff82 b7d3 .A/..z.~..r..... 803edc0: a128 dde5 19ac b49b ead1 b00d dafc be3a (.............:. 803edd0: 1b6a 6795 b00d 9ace 05b1 0ace 9026 d66c j..g........&.l. 803ede0: a5b1 2ad6 90cf a8d5 17a1 b6a4 03f0 49f4 ...*...........I 803edf0: 773c 9f13 4acf 6ee8 ed03 55af 5391 acdd : 803efd2: 692f 646e 7865 682e 6d74 006c 5448 5054 /index.html.HTTP 803efe2: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 803eff2: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 803f002: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 803f012: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 803f022: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 803f032: 6e65 2d74 654c 676e 6874 203a 3031 3937 ent-Length: 1079 803f042: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 803f052: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 803f062: 3a65 7420 7865 2f74 7468 6c6d 0a0d 6f43 e: text/html..Co 803f072: 746e 6e65 2d74 6e45 6f63 6964 676e 203a ntent-Encoding: 803f082: 7a67 7069 0a0d 0a0d 8b1f 0008 0000 0000 gzip............ 803f092: 0a04 56bd 6f5d 44e3 fd14 832b 6979 baa5 ...V]o.D..+.yi.. 803f0a2: fba1 2084 54b6 8bba 4fb4 10ac f620 9a29 ... .T...O.. .). 803f0b2: 93d8 1678 ed7f 9278 6fb4 60fd 5161 8291 ..x...x..o.`aQ.. 803f0c2: a010 e17d 17f3 8174 9a40 dda6 30bf 47fe ..}...t.@....0.G 803f0d2: 3b9c bb8e 3521 5961 7d89 93b0 e7b1 7bde .;..!5aY.}.....{ 803f0e2: b9ee 5ee7 fb4f dbb5 edef 707d deff 161d ...^O.....}p.... 803f0f2: 24e9 dbf6 6774 4f31 9efb 60e3 7825 b7e8 .$..tg1O...`%x.. 803f102: a113 0b39 ae22 a10a 673d 7ba0 9bee 6778 ..9."...=g.{..xg 803f112: 469f e75a 78ae 9038 cf43 d8f9 70fd ddd7 .FZ..x8.C....p.. 803f122: 92cb 6b9c 8dd9 c385 2c82 22d5 c985 3bdd ...k.....,."...; 803f132: 089e a2fb 4a36 2279 673c c528 cf28 5e94 ....6Jy"...Vc...nN.. 803f422: fc2b 9a94 7ece 5783 0387 a0e5 2265 b13a +....~.W....e":. 803f432: d9e8 b581 273a 07fe 4045 3f09 e923 d047 ....:'..E@.?#.G. 803f442: ea2c c20e 0c41 d78d c599 8f58 f0d7 5655 ,...A.....X...UV 803f452: 1bfe ccb4 0011 3580 2140 9e45 8913 7e76 .......5@!E...v~ 803f462: f435 284f d677 fd55 7027 817f 76cb e564 5.O(w.U.'p...vd. 803f472: 3169 d8a8 834e 9537 acbd 5bb7 de8d 356e i1..N.7....[..n5 803f482: 6b61 e3aa cba2 d3ab 0bd2 b81c 79ec efed ak...........y.. 803f492: ae07 56b5 c87e 7f35 c717 bba7 c6e9 56e6 ...V~.5........V 803f4a2: 15ce 8a4f 05f7 7c86 6d11 be6c ae8d 67b1 ..O....|.ml....g 803f4b2: b43c 3d8f fefc 4905 2b6e 0ce6 000b 2f00 <..=...In+..... 0803f4c1 : 803f4c1: 662f 7661 6369 6e6f 692e 6f63 0000 0000 /favicon.ico.... 803f4d1: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 803f4e1: 530a 7265 6576 3a72 6c20 4977 2f50 2e31 .Server: lwIP/1. 803f4f1: 2e33 2031 6828 7474 3a70 2f2f 6173 6176 3.1 (http://sava 803f501: 6e6e 6861 6e2e 6e6f 6e67 2e75 726f 2f67 nnah.nongnu.org/ 803f511: 7270 6a6f 6365 7374 6c2f 6977 2970 0a0d projects/lwip).. 803f521: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 803f531: 3131 3035 0a0d 6f43 6e6e 6365 6974 6e6f 1150..Connection 803f541: 203a 6c43 736f 0d65 430a 6e6f 6574 746e : Close..Content 803f551: 742d 7079 3a65 6920 616d 6567 782f 692d -type: image/x-i 803f561: 6f63 0d6e 430a 6361 6568 432d 6e6f 7274 con..Cache-Contr 803f571: 6c6f 203a 7270 7669 7461 2c65 6d20 7861 ol: private, max 803f581: 612d 6567 383d 3436 3030 0a0d 0a0d 0000 -age=86400...... 803f591: 0001 0001 1010 0000 0000 0020 0468 0000 .......... .h... 803f5a1: 0016 0000 0028 0000 0010 0000 0020 0000 ....(....... ... 803f5b1: 0001 0020 0000 0000 0440 0000 0000 0000 .. .....@....... 803f5c1: 0000 0000 0000 0000 0000 0000 ffff 01ff ................ 803f5d1: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803f5e1: ffff 01ff ffff 01ff d2d2 ffd2 d2d2 ffd2 ................ 803f5f1: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803f601: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803f611: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803f621: 8d8d ff8d 8484 ff84 8989 ff89 8989 ff89 ................ 803f631: 8484 ff84 8d8d ff8d ffff 01ff ffff 01ff ................ 803f641: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803f651: ffff 01ff ffff 01ff a4a4 ffa4 8484 ff84 ................ 803f661: aeae ffae ffff 01ff ffff 01ff ffff 01ff ................ 803f671: ffff 01ff aeae ffae 8484 ff84 a4a4 ffa4 ................ 803f681: ffff 01ff ffff 01ff 8181 ff81 ffff 01ff ................ 803f691: ffff 01ff a0a0 ffa0 9a9a ff9a ffff 01ff ................ 803f6a1: c7c7 ffc7 8f8f ff8f 8585 ff85 8585 ff85 ................ 803f6b1: 8f8f ff8f caca ffca ffff 01ff d5d5 ffd5 ................ 803f6c1: ffff 01ff 7777 ff77 ffff 01ff ffff 01ff ....www......... 803f6d1: d5d5 ffd5 8484 ff84 ffff 01ff a8a8 ffa8 ................ 803f6e1: 8c8c ff8c bbbb ffbb ffff 01ff ffff 01ff ................ 803f6f1: baba ffba afaf ffaf ffff 01ff ffff 01ff ................ 803f701: 6465 ff5b ffff 01ff ffff 01ff ffff 01ff ed[............. 803f711: 9898 ff98 b0b0 ffb0 d5d5 ffd5 8484 ff84 ................ 803f721: dada ffda 9595 ff95 8484 ff84 9d9d ff9d ................ 803f731: d7d7 ffd7 ffff 01ff 9898 ff97 7a7b ff73 ............{zs. 803f741: cedb ff79 c0d2 ff55 ffff 01ff ffff 01ff ..y...U......... 803f751: 9393 ff93 ffff 01ff a4a4 ffa4 bebe ffbe ................ 803f761: bdbd ffbd d1d1 ffd1 ffff 01ff ffff 01ff ................ 803f771: b4b5 ffae 5f5f ff5d 979d ff6b c0d2 ff55 ....__]...k...U. 803f781: ffff 01ff b5c9 ff35 ffff 01ff ffff 01ff ......5......... 803f791: f0f0 fff0 ffff 01ff f1f1 fff1 ffff 01ff ................ 803f7a1: d5d5 ffd5 cfd0 ffce 8585 ff85 6060 ff60 ............```. 803f7b1: 9194 ff85 b5ca ff37 ffff 01ff b9cc ff41 ......7.......A. 803f7c1: ffff 01ff b4c9 ff33 ffff 01ff 6262 ff62 ......3.....bbb. 803f7d1: 5d5e ff5c 5c5c ff5c 5d5e ff5c 6161 ff60 ^]\.\\\.^]\.aa`. 803f7e1: 6567 ff5b 8486 ff7b ffff 01ff ffff 01ff ge[...{......... 803f7f1: ffff 01ff b5ca ff37 ffff 01ff b9cc ff41 ......7.......A. 803f801: ffff 01ff b4c9 ff33 ffff 01ff ffff 01ff ......3......... 803f811: b5c9 ff35 ffff 01ff c0d2 ff55 ffff 01ff ..5.......U..... 803f821: c4d4 ff5e c3d4 ff5c ffff 01ff ffff 01ff ..^...\......... 803f831: c3d4 ff5c c4d4 ff5e cedb ff79 c0d2 ff55 ..\...^...y...U. 803f841: ffff 01ff b5c9 ff35 ffff 01ff ffff 01ff ......5......... 803f851: c0d1 ff54 cfdc ff7d ffff 01ff b4c9 ff33 ..T...}.......3. 803f861: ffff 01ff bed0 ff50 b4c9 ff33 b4c9 ff33 ......P...3...3. 803f871: c0d2 ff55 ffff 01ff b4c9 ff33 ffff 01ff ..U.......3..... 803f881: cedb ff79 c0d2 ff55 ffff 01ff ffff 01ff ..y...U......... 803f891: ffff 01ff b4c9 ff33 ffff 01ff cad9 ff6f ......3.......o. 803f8a1: b9cc ff41 d6e1 ff8f ffff 01ff ffff 01ff ..A............. 803f8b1: d5e0 ff8c b9cc ff40 cedb ff79 ffff 01ff ......@...y..... 803f8c1: b4c9 ff33 ffff 01ff ffff 01ff ffff 01ff ..3............. 803f8d1: ffff 01ff c5d5 ff62 c1d2 ff58 ffff 01ff ......b...X..... 803f8e1: ffff 01ff bbce ff46 b5c9 ff35 b5c9 ff35 ......F...5...5. 803f8f1: bbce ff46 ffff 01ff ffff 01ff c0d2 ff55 ..F...........U. 803f901: c5d5 ff62 ffff 01ff ffff 01ff ffff 01ff ..b............. 803f911: ffff 01ff ffff 01ff c8d7 ff69 b4c9 ff33 ..........i...3. 803f921: cedb ff79 ffff 01ff ffff 01ff ffff 01ff ..y............. 803f931: ffff 01ff cedb ff79 b4c9 ff33 c8d7 ff69 ......y...3...i. 803f941: ffff 01ff ffff 01ff ffff 01ff ffff 0dff ................ 803f951: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803f961: b9cd ff42 b4c9 ff33 b7cb ff3b b7cb ff3b ..B...3...;...;. 803f971: b4c9 ff33 b9cd ff42 ffff 01ff ffff 01ff ..3...B......... 803f981: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803f991: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803f9a1: ffff 01ff ffff 01ff e4eb ffb5 e4eb ffb5 ................ 803f9b1: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803f9c1: ffff 01ff ffff 01ff ffff 01ff 0000 ffff ................ 803f9d1: 0000 ffff 0000 ffff 0000 ffff 0000 ffff ................ 803f9e1: 0000 ffff 0000 ffff 0000 ffff 0000 ffff ................ 803f9f1: 0000 ffff 0000 ffff 0000 ffff 0000 ffff ................ 803fa01: 0000 ffff 0000 ffff 0000 ffff ............ 0803fa0d : 803fa0d: 6d2f 6961 2e6e 7363 0073 0000 5448 5054 /main.css...HTTP 803fa1d: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 803fa2d: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 803fa3d: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 803fa4d: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 803fa5d: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 803fa6d: 6e65 2d74 654c 676e 6874 203a 3031 3435 ent-Length: 1054 803fa7d: 0d35 430a 6e6f 656e 7463 6f69 3a6e 4320 5..Connection: C 803fa8d: 6f6c 6573 0a0d 6f43 746e 6e65 2d74 7974 lose..Content-ty 803fa9d: 6570 203a 6574 7478 632f 7373 0a0d 6f43 pe: text/css..Co 803faad: 746e 6e65 2d74 6e45 6f63 6964 676e 203a ntent-Encoding: 803fabd: 7a67 7069 0a0d 6143 6863 2d65 6f43 746e gzip..Cache-Cont 803facd: 6f72 3a6c 7020 6972 6176 6574 202c 616d rol: private, ma 803fadd: 2d78 6761 3d65 3638 3034 0d30 0d0a 1f0a x-age=86400..... 803faed: 088b 0000 0000 0400 d50a 6b7d 238f 7239 ..........}k.#9r 803fafd: 5fe0 a791 e7d0 6dae a349 bd57 d854 79c2 ._.....mI.W.T..y 803fb0d: f6c6 80f9 c05b bd80 da9f 418d 994a ca55 ....[......AJ.U. 803fb1d: 496d 4829 eeaa d1aa 3fe9 0718 3818 70e0 mI)H.....?...8.p 803fb2d: ec7e f01f e95f e49f 9278 2641 a533 ef6a ~..._...x.A&3.j. 803fb3d: bb87 9dad 2519 119f 88c1 3060 2418 fc7f .....%....`0.$.. 803fb4d: 9fcd d675 76d5 2d95 5fcb fe8b b77c 7ceb ..u..v.-._..|..| 803fb5d: f719 fd07 e751 767f f77e ffdf f3be ca3f ....Q..v~.....?. 803fb6d: b179 15de f5f0 ee54 65fb a3f5 db2b cdf9 y.....T..e..+... 803fb7d: fd8f f565 7554 edb3 9cbe 8b2f b66e f32b ..e.Tu..../.n.+. 803fb8d: 9ba2 fb17 5cac baee e58f 3cd3 ecdb 6acb .....\.....<...j 803fb9d: 3f8d b79f f745 aab1 c5f6 bbb6 b228 ff1c .?..E.......(... 803fbad: b4f3 9ead dd37 5655 bbae 62ab dcfd 675d ....7.UV...b..]g 803fbbd: ba5f 62bb 354e cf76 55ab 7db6 e43d 6ee5 _..bN5v..U.}=..n 803fbcd: ccb3 a75e 65b3 ff35 ec7c 36ef 7ae5 bd56 ..^..e5.|..6.zV. 803fbdd: 2efc 7edb e6ee eb8f 63c3 deb5 76f7 d7fb ...~.....c...v.. 803fbed: 3165 f72d c080 d8fc 5687 d966 bbb6 9e7b e1-......Vf...{. 803fbfd: 3fc1 c39b daa6 d895 74e2 2c5b 7db3 a5f9 .?.......t[,.}.. 803fc0d: 12a0 cb0f 21f2 f6eb d937 58ba 10f6 729e .....!..7..X...r 803fc1d: d4fd efed d9b3 78b2 e3d8 c3f7 0b7e fa3f .......x....~.?. 803fc2d: c59b 5961 01ec dee8 936e a1cd b4d0 183f ..aY....n.....?. 803fc3d: ab15 3f63 3003 14bf fedd bf6c 3fee f356 ..c?.0....l..?V. 803fc4d: 1de7 9cfd 9f9a ea8b 200b e089 6750 e59a ......... ..Pg.. 803fc5d: 29be b0ff 5e2f bdf6 98bc 5b57 0e00 5ca0 .)../^....W[...\ 803fc6d: 6b57 b086 bcfb 7844 f8a0 b0ee 772c 258a Wk....Dx....,w.% 803fc7d: 23e7 7e19 5eaa 44ba f80f 29d1 9bd7 7de7 .#.~.^.D...)...} 803fc8d: fe97 71fd baff 7e29 2bbb edb2 f17c d0e9 ...q..)~.+..|... 803fc9d: 5afb 3ecc fb97 b65e 40d9 b64a 179e c5d2 .Z.>..^..@J..... 803fcad: cb2c 189f c3fe 45d7 2fb9 4108 fccc cdba ,......E./.A.... 803fcbd: 4736 89c0 aa86 634f cd34 711e fadc 3832 6G....Oc4..q..28 803fccd: 1807 6ceb 9d3b fb55 b1c5 3d5c 9775 53c5 ...l;.U...\=u..S 803fcdd: ceb1 b30f 0b6a 3ac3 1c1d bbf9 cfbb fbbb ....j..:........ 803fced: 61c5 e593 5c48 5e48 57ec 1e4b c7b0 556c .a..H\H^.WK...lU 803fcfd: 5f2e 7fa7 2db1 65b3 6ff7 e58a 0297 27f8 ._...-.e.o.....' 803fd0d: eeeb f5b2 b7ae b62b e3e5 82bd e44d 01d9 ......+.....M... 803fd1d: f65f fcb2 cf0f fdbb 3874 bc18 efbb 76ad _.......t8.....v 803fd2d: 64bd 71ce e556 07af 9c60 72a7 1d3d cfdc .d.qV...`..r=... 803fd3d: f9b2 4467 9d60 e6f7 b2d5 4eda fe2f f6ea ..gD`......N/... 803fd4d: 7eaf ebfa bde1 8d7c e3c7 1c7b c7a5 f565 .~....|...{...e. 803fd5d: f7b5 dd3a b7cd 72d5 bf79 ca28 05a7 74f7 ..:....ry.(....t 803fd6d: 9ecc b2f3 ceea f5b3 6c97 ddd7 ab6c 6da7 .........l..l..m 803fd7d: dbb1 bf75 9b00 8e57 cb35 b2f5 175c e23d ..u...W.5...\.=. 803fd8d: 7bd0 0d68 5971 80f6 9f19 d3d6 b659 302b .{h.qY......Y.+0 803fd9d: 1b97 ea02 dfee 9c7f cf03 4742 4fbb ae97 ..........BG.O.. 803fdad: 1c09 ed55 7077 b8fc f328 58bc ea7f 8bee ..U.wp..(..X.... 803fdbd: 3015 beff ca08 b31d 0d43 3daf 2c8c e830 .0......C..=.,0. 803fdcd: 58b6 8fef 54d9 3378 329b 558b 7bcf 0104 .X...Tx3.2.U.{.. 803fddd: 2046 cd9b 1fb6 e5f7 597e 927c ead1 20c1 F ......~Y|.... 803fded: abee 74d5 79b8 e4e9 b3f0 8fc8 6eb3 d9b5 ...t.y.......n.. 803fdfd: 68b3 00ee f5ce 8f13 57d9 caa6 00cd 7206 .h.......W.....r 803fe0d: 24a8 5fee 14df ceab 9ee0 10c5 6986 c28a .$._.........i.. 803fe1d: f401 7cff 1210 060f 1876 17a6 8f8f e383 ...|....v....... 803fe2d: 540e 708d 0e02 f4ed f076 a8ee eae2 ba5b .T.p....v.....[. 803fe3d: 7ab9 4f77 9584 18f1 d234 c516 5f7c a66d .zwO....4...|_m. 803fe4d: febd f415 2d0e 7201 5584 3faf 94a2 4f2f .....-.r.U.?../O 803fe5d: f944 16e9 fa98 a0f2 3e23 3265 591f 2939 D.......#>e2.Y9) 803fe6d: 434a 6840 d832 1cbc db17 eb83 d959 5411 JC@h2.......Y..T 803fe7d: 0f4f 4640 c67e 0451 0372 5f01 1f80 5fab O.@F~.Q.r.._..._ 803fe8d: 47f1 2f2a 7c9d 80dc 443a 8616 cb31 443c .G*/.|..:D..1. 803fecd: 909d c520 e5a7 017a b772 c117 2f90 c969 .. ...z.r..../i. 803fedd: f783 dca5 a095 b521 6007 686d 5592 7118 ......!..`mh.U.q 803feed: 23e0 22cc 5ea2 cd54 e935 1458 d254 39b1 .#.".^T.5.X.T..9 803fefd: d8e8 e6b4 f6ed 1551 8a6d 076d 8e18 ddc4 ......Q.m.m..... 803ff0d: f277 e98c 1073 852e 9505 6b0b d641 4c7f w...s......kA..L 803ff1d: 4f84 054c 024e 2dd1 41f6 b00a aaca 27dc .OL.N..-.A.....' 803ff2d: 2495 bfd7 3f9f 776f 37a0 5536 a309 95bd .$...?ow.76U.... 803ff3d: 3ece a4c2 3384 fe45 6ba9 75ba 0789 94a9 .>...3E..k.u.... 803ff4d: 8f17 f3d9 7f72 5a34 be79 e628 819f 0223 ....r.4Zy.(...#. 803ff5d: b628 fb30 1e54 c308 ac30 9351 662c d2b2 (.0.T...0.Q.,f.. 803ff6d: bc15 35de affd 579f 62b3 69fb 553a 2e86 ...5...W.b.i:U.. 803ff7d: 6bd7 db9a 75ca b2cf 130d 56ac 341a 5849 .k...u.....V.4IX 803ff8d: 255a f884 f4d6 cf13 063e ffc4 dc9c 89b8 Z%......>....... 803ff9d: ccc1 c867 8f1a b165 2dcc 05a5 8f02 2729 ..g...e..-....)' 803ffad: 40f4 cf95 ca61 23af 54db cfc1 2dcd e973 .@..a..#.T...-s. 803ffbd: dd7e 8d23 53d9 fff5 8680 a701 e4e9 12e9 ~.#..S.......... 803ffcd: 8592 0566 0f08 c7cf 7dbd 2d55 84c1 15b1 ..f......}U-.... 803ffdd: 4935 d18b fc0c be58 1968 edf7 800a 8354 5I....X.h.....T. 803ffed: 0561 f5c3 7cb8 732e 2e57 ae4a af15 9c15 a....|.sW.J..... 803fffd: 916a 0c1c 6aa5 fe5b 2d8a 3b2c 6bb9 96b2 j....j[..-,;.k.. 804000d: 15ae 1b50 2ad8 5360 4240 5060 15b4 66d1 ..P..*`S@B`P...f 804001d: 5556 d30e db29 0a23 905d 05a6 e541 3e68 VU..).#.]...A.h> 804002d: 34fe 40c9 344c 9600 66d9 9857 4122 5472 .4.@L4...fW."ArT 804003d: 6d9c a8d4 24b0 4586 32c3 dbae f64d c604 .m...$.E.2..M... 804004d: 1890 fc4e f5a1 ead8 0d44 f3e8 0ed1 14a5 ..N.....D....... 804005d: b42d bead 2e6a e4fe 6764 9008 0aa5 9ada -...j...dg...... 804006d: a0e6 0fe9 1f9d f798 7cc1 9526 e2ac e46d .........|&...m. 804007d: 28ce 788c 32ba c959 6a0a ca0d 0914 b9fc .(.x.2Y..j...... 804008d: 5e99 364d 7f2f ae56 d536 9f76 f7ad a4f7 .^M6/.V.6.v..... 804009d: d99e d9e4 f5a2 ff74 ccb5 0bf7 d6b6 12c4 ......t......... 80400ad: 7c78 3c7c 7aea ec00 5342 5963 ee3c 8fb5 x||<.z..BScY<... 80400bd: 3e87 4522 ab9c 63a6 5a8f b684 5260 cbce .>"E...c.Z..`R.. 80400cd: 0f2f e6b4 7038 a307 d5c9 45e6 a72d fc5b /...8p.....E-.[. 80400dd: f32d 951a 92e6 5ade 3e9a 976f b7ef d860 -......Z.>o...`. 80400ed: ee7e d66f 974f 1e9d e854 86f4 eff8 d575 ~.o.O...T.....u. 80400fd: 16db 2260 9007 fccb da8f 29cd df1e ce1a ..`".......).... 804010d: 05f6 01d8 f320 0162 7378 66d3 bd55 9d74 .... .b.xs.fU.t. 804011d: ea64 8fb1 13d6 8f58 ecab 5d0f 1bf7 4856 d.....X....]..VH 804012d: 1bfc 76ac 55f9 767d c0cc a796 fc50 d3da ...v.U}v....P... 804013d: 0863 2463 30f4 d434 1c14 11c5 0014 37e3 c.c$.04........7 804014d: 4fdb 0c79 6fa8 d968 1683 6c93 e9d0 8cdd .Oy..oh....l.... 804015d: 7a03 b2f9 904c 0de1 dab4 bdb9 d181 f032 .z..L.........2. 804016d: 34b7 bbd9 0ac2 d3df f66c b687 c766 d5df .4......l...f... 804017d: 502c adb8 21d1 f7d0 b04d 2a82 3d02 5873 ,P...!..M..*.=sX 804018d: 0cc1 17eb 4816 ce1b b580 591f a609 5d4f .....H.....Y..O] 804019d: 80ab dcc0 3c93 b22e 341c a0c0 4683 f23a .....<...4...F:. 80401ad: f6ea 9669 1fbd f174 3faf 8cba ea5b cb68 ..i...t..?..[.h. 80401bd: 5833 e414 876a c78f d937 a6ec acbd a259 3X..j...7.....Y. 80401cd: 6aa2 c814 f6c2 4d64 32a1 0d9d a387 7b9b .j....dM.2.....{ 80401dd: 02c3 619c 23d7 4e0a 1cdc 002a ee85 a6e6 ...a.#.N..*..... 80401ed: 3419 13a0 a02d 1561 ab0c a52c b161 5b12 .4..-.a...,.a..[ 80401fd: 82f5 b331 3036 008a 17a9 773f ab7b 3114 ..1.60....?w{..1 804020d: 3d63 b07e 2f9c 01a3 91ff 5664 6a63 3b25 c=~../....dVcj%; 804021d: 31c2 0d34 1955 b14e 48bc a24d ba1a 04d7 .14.U.N..HM..... 804022d: 6b5d 22a1 aa43 0538 c287 cb07 ee55 a60c ]k."C.8.....U... 804023d: 5a01 0cbc d5ee c1f7 4c0b 02aa 783d 4297 .Z.......L..=x.B 804024d: b7dd aae1 bb88 a184 c87d a7b4 04e9 8265 ........}.....e. 804025d: a375 89e6 432b 6287 9a32 5e3c 804d 70f1 u...+C.b2.<^M..p 804026d: af31 80b0 e922 aaec 9965 2e77 c306 386c 1..."...e.w...l8 804027d: 142b df27 6760 0b7c 2d68 d24b cfb9 0f7b +.'.`g|.h-K...{. 804028d: 365b 9a83 3860 a3de 21c2 b07a 1f3e 2b01 [6..`8...!z.>..+ 804029d: b23b ccc6 c0c1 5b49 bf00 165f 6ff6 e861 ;.....I[.._..oa. 80402ad: 719d c11b cb49 6cd8 28b7 fbf2 7b5f 3ae5 .q..I..l.(.._{.: 80402bd: 5e2f c7a0 91d1 4b66 1458 4a12 c8ea 7581 /^....fKX..J...u 80402cd: 2729 cb38 5760 12c0 961a eddb 2cfc 9873 )'8.`W.......,s. 80402dd: 9492 1986 5750 9498 9864 5224 dc42 30cd ....PW..d.$RB..0 80402ed: 6998 c7f1 3b1f ecab 67a5 c252 1ff1 9b11 .i...;...gR..... 80402fd: b550 bd87 2e5f b5b9 4b92 cbf2 3427 7892 P..._....K..'4.x 804030d: e551 b94a 5f24 b9ca 60b7 912a 5de6 f792 Q.J.$_...`*..].. 804031d: 20d7 81fc f5c4 a327 abdb e19b 1c64 c3af . ....'.....d... 804032d: e057 58ad d102 9a98 ca34 5d9e 3cf2 263f W..X....4..]..A.h. 80403dd: 25e5 39ea 1338 5cf5 8e9e 3927 ace5 8400 .%.98..\..'9.... 80403ed: 18d8 f53f ad39 5e89 7d12 6c03 e3a0 4e0a ..?.9..^.}.l...N 80403fd: 72be 4663 ba75 2fde d57a 0f63 c8dd abef .rcFu../z.c..... 804040d: bf3c b14c ddc5 fc23 0b69 66e4 c474 0b14 <.L...#.i..ft... 804041d: 66a1 5c13 5e3c 1fe1 e32b 480e c7d4 32f9 .f.\<^..+..H...2 804042d: eddb f37e f85b fbd9 e7e4 dd8b c41e ee7b ..~.[.........{. 804043d: 3266 1a46 3cca d6af ab62 0f92 199c 9f77 f2F..<..b.....w. 804044d: ad07 2574 1175 9ea4 bb6a a700 db2f ec02 ..t%u...j.../... 804045d: a75d 1c46 a03e 702d c01b 57ac 3f60 fc04 ].F.>.-p...W`?.. 804046d: aa20 ffdd e7e2 c69f 5b3f a727 dfb3 1f6e .......?['...n. 804047d: efe1 bd3e 207f f87d 6f41 8374 6c8d 68d7 ..>.. }.Aot..l.h 804048d: d429 a7a7 ec0b ba08 2a02 93a1 205b 39a2 )........*..[ .9 804049d: dc53 13b6 db70 90b2 32c3 b767 d6a9 d83b S...p....2g...;. 80404ad: b0bd 6946 307f e77c e17d 57e0 4f40 7fe4 ..Fi.0|.}..W@O.. 80404bd: 155d 9979 c075 5e2f eb14 580e 9d93 7ef7 ].y.u./^...X...~ 80404cd: baca 06b9 ff13 50f2 b56f 4671 85c3 ef96 .......Po.qF.... 80404dd: 55e3 affc cde4 9f57 ecac a0e5 1f83 0021 .U....W.......!. 80404ed: 2d0f 5af8 ec7b 0798 4dcb 8866 c906 98f0 .-.Z{....Mf..... 80404fd: 883d 0b42 d467 0904 a0a4 6c1d 1499 9d0d =.B.g......l.... 804050d: 85ea 689c bad7 d87c f93b 5277 56d9 ada8 ...h..|.;.wR.V.. 804051d: c725 6d1c b92d 8b42 3ee4 f10e 1d59 a717 %..m-.B..>..Y... 804052d: 6513 706e 46f3 514b 244b 593b 1235 75cc .enp.FKQK$;Y5..u 804053d: 6a62 de2e d35a f393 6bbb b9be 474f fcd3 bj..Z....k..OG.. 804054d: 7dad 9aba 9f41 013a 9db3 175f 6144 14b0 .}..A.:..._.Da.. 804055d: f2bd 2829 b149 de5b e848 55b7 7434 cefe ..)(I.[.H..U4t.. 804056d: 8b8a 8237 68ea 56f5 5d1c db45 d2a3 1798 ..7..h.V.]E..... 804057d: cd17 5ea2 b227 db01 865b c8e7 5041 59b1 ...^'...[...AP.Y 804058d: 4d90 428f a0e4 b362 9f70 a8a8 0276 e314 .M.B..b.p...v... 804059d: e305 b611 c0b2 0e0d 1cbb d9a4 0f59 740f ............Y..t 80405ad: e261 9816 31b8 164a 0a11 f93d 0f22 9ea1 a....1J...=."... 80405bd: 95c4 6a47 2192 047f f1ed 3ae2 2d8b b313 ..Gj.!.....:.-.. 80405cd: f7d2 322e 09dc 736b 0c5a 2eaf 8401 85d3 ...2..ksZ....... 80405dd: bc04 6d1e ca59 124e ffb8 3770 379c 1928 ...mY.N...p7.7(. 80405ed: 07fc c7d9 e987 5c8f b6bc 8448 629a 2e4c .......\..H..bL. 80405fd: 9800 745a 4715 d30b 4d0e 4c50 251b 1a6a ..Zt.G...MPL.%j. 804060d: 60d3 55a2 9128 a12d 87c9 be7e 36ad b1e0 .`.U(.-...~..6.. 804061d: 7759 2fdc 2458 3d3e 8041 0084 f16a e461 Yw./X$>=A...j.a. 804062d: fa1e 29b4 141a 3490 a71f d540 cfe2 3d44 ...)...4..@...D= 804063d: 824a 3345 a943 799b 6fb6 0aa5 18ad d722 J.E3C..y.o....". 804064d: a289 bc83 6c5a 0453 6ef2 a14e 9883 421f ....ZlS..nN....B 804065d: d4b9 900a ccd8 4b8e 0cc7 0f63 0fc2 6e56 .......K..c...Vn 804066d: d978 9e3b cb1a 1d5a 7995 38b1 2980 b595 x.;...Z..y.8.).. 804067d: b87b f6a9 73bc 6e1c b6bb bd3a a4d6 3ccd {....s.n..:....< 804068d: 2403 bc5b 2db5 9505 ee29 d529 39c3 a141 .$[..-..).)..9A. 804069d: c705 88aa 7a26 d815 6b67 64f2 0264 bc5c ....&z..gk.dd.\. 80406ad: aeae ef77 cef3 c4c1 6e97 496b 50f1 a39d ..w......nkI.P.. 80406bd: f2f0 0d77 28e4 423b 21d6 63c4 022e a1f4 ..w..(;B.!.c.... 80406cd: 9c45 a0eb 7599 c2bd b486 3db3 a639 11a8 E....u.....=9... 80406dd: d415 d781 da26 332f 8abe 03a2 17ca 1b3c ....&./3......<. 80406ed: d108 82c0 aca6 1bb2 82c7 354c db97 b860 ..........L5..`. 80406fd: e4a9 fd2a 1efd 444c 2f4c d440 4752 5eb7 ..*...LDL/@.RG.^ 804070d: b898 7162 53a4 73eb 969f 6d53 dba0 6809 ..bq.S.s..Sm...h 804071d: abd0 9377 1b8c a0d4 2011 2ce8 c0f8 b8f6 ..w...... .,.... 804072d: 8e43 dbc7 98e4 5d2e 8221 075b cb05 3986 C......]!.[....9 804073d: 8aa6 642d a098 4cb6 2d10 0d44 4db3 e56a ..-d...L.-D..Mj. 804074d: 3c17 f667 83b3 a25e d637 5370 8932 23b9 ... T.. 804087d: bbf8 0bec b8b4 1b5f 8138 0336 6ac5 e054 ......_.8.6..jT. 804088d: 91df 00a2 a37a ff2e 6c77 dbf6 7cdc bb23 ....z...wl...|#. 804089d: b448 824b 0331 91bd 04c4 6e4c 49de b1fd H.K.1.....Ln.I.. 80408ad: 8ca4 c021 5b90 349a 84b7 1973 cc0f d268 ..!..[.4..s...h. 80408bd: 409f 0e05 740f ecbb 0a48 c433 c615 ef03 .@...t..H.3..... 80408cd: 515f 15b4 2539 1582 5193 7f0e 22f7 aa43 _Q..9%...Q..."C. 80408dd: c515 48db 4018 b34c 08a3 caaf 564e 5e3f ...H.@L.....NV?^ 80408ed: b860 af74 ac04 e803 fc04 642b dd31 1d27 `.t.......+d1.'. 80408fd: 07e0 373b 3ba9 3123 dd53 a3cb da70 79ea ..;7.;#1S...p..y 804090d: e8be c0e1 1041 2af2 975b 679b 970c d6ae ....A..*[..g.... 804091d: 6db0 94d7 0613 b9c7 dfe5 8433 42f0 2f18 .m........3..B./ 804092d: a206 3f10 7070 2244 d775 25ab 09c6 cd10 ...?ppD"u..%.... 804093d: de4a 8365 57b1 d354 c98b 0264 94de 7819 J.e..WT...d....x 804094d: 330d f8d8 d542 dbc2 665f 555e 9816 e3bc .3..B..._f^U.... 804095d: 613d 520e 1761 d52e d72d d58f bac9 0aea =a.Ra...-....... 804096d: d6ad d7cb 66ce d10b 0780 d7d9 6896 87db .....f.......h.. 804097d: 25e7 cc6d 9382 7e12 c306 0c72 272a a99d .%m....~..r.*'.. 804098d: e99d 35cd b86c 37a9 82d5 e8d3 8e17 44f6 ...5l..7.......D 804099d: 2a31 efd7 0e92 10fb 9b98 13e2 ac1b bc7c 1*............|. 80409ad: 2f98 f5b2 f153 e0b7 ff86 bc0a 85d7 886f ./..S.........o. 80409bd: fc4f 26fd 4d87 4c50 5eec 316c 1f1c 0abc O..&.MPL.^l1.... 80409cd: dddb d5cf 021a bb65 cf17 881b c917 0eff ......e......... 80409dd: e282 ad61 a3bb dbb8 e0e1 179d dd0c 3dd2 ..a............= 80409ed: 974d 177b ef9a 88b6 becd 5bae 6264 30cc M.{........[db.0 80409fd: 4206 e390 8401 f754 6504 da23 01ab 60da .B....T..e#....` 8040a0d: fa36 0af5 c522 2efd c830 6c29 e32a 3fee 6..."...0.)l*..? 8040a1d: 2def d1bb 965a c1d6 be2e bf7d 201d 4542 .-..Z.....}.. BE 8040a2d: dcaa e781 3ada 6fb5 822d f32f 6d37 402f .....:.o-./.7m/@ 8040a3d: 3f5c 1040 2302 a39a 74ee 28b8 e28a aa98 \?@..#...t.(.... 8040a4d: 3961 d13c 3609 b10f 8e02 830f 9761 39be a9<..6......a..9 8040a5d: c15a 0cf2 4b04 7aab bd45 6dc6 e898 8c01 Z....K.zE..m.... 8040a6d: 368d 1ae9 6039 b225 c1b8 d53f 41e6 0130 .6..9`%...?..A0. 8040a7d: 032b a1a5 0b6f a4c7 8e95 fef1 d9cd 37d4 +...o..........7 8040a8d: 19b8 a4cc 9d67 65d1 8632 7368 6d05 a1d0 ....g..e2.hs.m.. 8040a9d: f240 c623 d270 8eb1 8e5e b262 8885 dc02 @.#.p...^.b..... 8040aad: 2e73 7b72 23fa d3ce 7be8 000a b415 f2c2 s.r{.#...{...... 8040abd: f01c 9413 1d43 6e94 c83d ea09 1680 d302 ....C..n=....... 8040acd: 35e2 5b68 82d2 bb72 f9e7 0e1c a42d 8f9b .5h[..r.....-... 8040add: 8333 5f9a edb3 b71a 925f c768 b699 85a6 3.._...._.h..... 8040aed: a5c9 9b57 ed62 637d 11e2 2a63 d485 f6ed ..W.b.}c..c*.... 8040afd: 8a5b f132 8ada 1404 2b6b c428 2b6a 9312 [.2.....k+(.j+.. 8040b0d: ada7 4c6c 5c10 686c c2ac 8943 73e7 aa38 ..lL.\lh..C..s8. 8040b1d: 371a 3f12 2745 8c77 d431 5183 927d 3a43 .7.?E'w.1..Q}.C: 8040b2d: b317 2fe5 e58f 6612 e016 9544 db11 adae .../...f..D..... 8040b3d: d627 862a ca59 1dbe 564d 7cc1 4103 7968 '.*.Y...MV.|.Ahy 8040b4d: 05f1 740e 36f1 4eb0 7e3b 2f6b 85cc 19d8 ...t.6.N;~k/.... 8040b5d: fc88 e4b9 886c 85fd 4f7d 09b2 a03a d67d ....l...}O..:.}. 8040b6d: 0ef9 0a5c 6485 c06a cae9 b0f7 5f29 a620 ..\..dj.....)_ . 8040b7d: 8e95 4d35 3087 81b3 0136 b749 f406 4c1d ..5M.0..6.I....L 8040b8d: 2779 3964 fd08 78c1 3046 9e97 50f1 4694 y'd9...xF0...P.F 8040b9d: 8f9e 4661 93b0 e70f cc52 4d5a e1bf b7a6 ..aF....R.ZM.... 8040bad: b508 9a1f 32ee 159b 34f6 ff4a 740e 1845 .....2...4J..tE. 8040bbd: c57a 7b67 ac94 1ec1 cf28 6cda aa7f 2ab5 z.g{....(..l...* 8040bcd: 9dff e988 4d11 b81d 513a 38be 9578 0433 .....M..:Q.8x.3. 8040bdd: eee8 3f43 9cbc f1ab b85b 4041 a8ce 993f ..C?....[.A@..?. 8040bed: a400 7df5 5869 d451 744f 04e9 8c6a f9cb ...}iXQ.Ot..j... 8040bfd: ae7c 1a7a 420f 2cc9 8e42 e333 52b8 6b50 |.z..B.,B.3..RPk 8040c0d: 1c2c e3c6 c7f5 0b00 4cf6 bf71 e1f2 43b1 ,........Lq....C 8040c1d: 20e4 ac57 0052 ce1d f909 5ff9 e68f 9025 . W.R......_..%. 8040c2d: 0d49 4284 757d 6575 59cc 495d 6b7a 9c81 I..B}uue.Y]Izk.. 8040c3d: b080 90b8 0a18 57c4 6490 21a3 4395 9b8e .......W.d.!.C.. 8040c4d: 0d44 c199 5553 559c 080f 1caa dd98 128d D...SU.U........ 8040c5d: 6662 1df6 de8e ea44 e8db c1cd ec0d 4084 bf....D........@ 8040c6d: 37b5 3f14 e45e 8068 b2fd 5d80 0a90 480e .7.?^.h....]...H 8040c7d: 233a 11ca 1651 0331 0913 528c 5762 2401 :#..Q.1....RbW.$ 8040c8d: ec05 30b4 1527 cd58 51c8 5803 eb6f 67ec ...0'.X..Q.Xo..g 8040c9d: b853 5452 b492 e49b 63f8 9d8b d965 c881 S.RT.....c..e... 8040cad: 1f3d 8c5e 0cea 35d9 b301 69da a423 6886 =.^....5...i#..h 8040cbd: 6bb2 3088 beb8 aa39 1412 1a69 d2e8 5106 .k.0..9...i....Q 8040ccd: c872 0b3b c712 046f 0942 1761 5314 0da9 r.;...o.B.a..S.. 8040cdd: 0d0f e1ca 0c01 593b 0e31 be61 c09b 0750 ......;Y1.a...P. 8040ced: c793 ca29 67f7 933e b4d9 617e 5182 226d ..)..g>...~a.Qm" 8040cfd: bd78 4a53 f7ae c9c5 1771 ca9c 432d bc48 x.SJ....q...-CH. 8040d0d: f6b4 70b7 f59a 08a0 088f a761 3060 f96c ...p......a.`0l. 8040d1d: 2acd d866 4ebf 986a 87ff 8c17 3d75 7767 .*f..Nj.....u=gw 8040d2d: 5528 ddfc 90e6 531b 28a2 9f8f 0275 cd83 (U.....S.(..u... 8040d3d: 7fba 6c6f 4bed bca6 ca77 03c6 567b ba13 ..ol.K..w...{V.. 8040d4d: e841 05b6 3043 015a 8820 8de2 cbc5 0c00 A...C0Z. ....... 8040d5d: bf3f 477c 074b 11a1 e6fa 4d48 06ea f394 ?.|GK.....HM.... 8040d6d: 8aed 2c77 34cc 65e2 e949 c509 3494 35bb ..w,.4.eI....4.5 8040d7d: 4a42 1293 0120 3124 af74 0ed7 470a 3d04 BJ.. .$1t....G.= 8040d8d: da51 a7d0 3e0d 894b 76e4 1092 c822 7433 Q....>K..v..".3t 8040d9d: bde8 88ec 0114 6ea4 eba4 7230 878a 0988 .......n..0r.... 8040dad: d714 a33e 151e 9b39 8845 cdc3 5c28 e0d6 ..>...9.E...(\.. 8040dbd: 6b68 420f 3f84 8833 3b2f 9825 884e 0b44 hk.B.?3./;%.N.D. 8040dcd: 4dd1 f870 0f4b 4bc9 9e8a 0036 988a d14c .Mp.K..K..6...L. 8040ddd: f580 5314 7f9c f41e 335c 5b9f ecee e517 ...S....\3.[.... 8040ded: 5efa 74d3 a61e 815e 618f 4315 0ab3 58bb .^.t..^..a.C...X 8040dfd: ea71 9290 e910 08f8 f3f3 47b4 9111 2c11 q..........G..., 8040e0d: e61e d8f0 f903 b198 b9ac 4005 7700 0d50 ...........@.wP. 8040e1d: 3f9c 312c e3b9 1a09 2200 05b0 a386 2a30 .?,1....."....0* 8040e2d: ed42 a686 4cb2 3d5d 4a75 f063 bf51 c13e B....L]=uJc.Q.>. 8040e3d: 0b8d 091c 93e2 4268 a987 4e97 f6b2 2f8a ......hB...N.../ 8040e4d: cc60 60ef e164 b9e0 f1f8 1180 1c20 8e1b `..`d....... ... 8040e5d: 43c2 3cf4 3aac f360 9a7f 372d ec8b b8bd .C.<.:`...-7.... 8040e6d: 7f3a 0d7b 2a00 0d61 d452 fc46 eead fed1 :.{..*a.R.F..... 8040e7d: 15f5 848b 852c 320f 1bb9 538b d052 233c ....,..2...SR.<# 8040e8d: cd5d 35d7 2400 fe9d d778 e029 2f90 40ac ]..5.$..x.)../.@ 8040e9d: 307b 415e 9643 baf6 3234 a35c c149 2a8c {0^AC...42\.I..* 8040ead: 1830 7256 64c5 3e96 f2b9 e00c 3e77 b52a 0.Vr.d.>....w>*. 8040ebd: 8b3d fc6b 3993 1348 1cb3 42ff 75e0 58a0 =.k..9H....B.u.X 8040ecd: d474 a04d 49a9 5cdc e7a6 854a afbe 2979 t.M..I.\..J...y) 8040edd: 7d6c 5b66 6345 08a5 9e34 0273 7d20 0a72 l}f[Ec..4.s. }r. 8040eed: 934a ef5b 67cd e0a6 b934 55ad d219 fe06 J.[..g..4..U.... 8040efd: 8a56 f134 e6bf ec2b 9a27 8611 513a b14a V.4...+.'...:QJ. 8040f0d: 5539 d18c 553a f08a 2f4b 23ec 02c6 0989 9U..:U..K/.#.... 8040f1d: 2ab8 22de b743 8d69 5545 f577 fdc4 0ca1 .*."C.i.EUw..... 8040f2d: cb4d 44a6 3c69 1636 3bf5 f9ce 192c 65ce M..Di<6..;..,..e 8040f3d: 5e2d 2b28 298d 94c7 99a6 d6d1 93a4 28d2 -^(+.).........( 8040f4d: db05 1f81 3081 b066 2444 b1d7 e34a e7e8 .....0f.D$..J... 8040f5d: dbab d85b b035 abc0 30f8 4ba3 4edb 946e ..[.5....0.K.Nn. 8040f6d: 9257 1255 ba48 ca8a c917 568a c509 f23d W.U.H......V..=. 8040f7d: 136c e340 a3a5 3921 a505 94af d300 a667 l.@...!9......g. 8040f8d: 34e0 f5b9 31f1 ed99 28d2 3588 a34a 2e22 .4...1...(.5J.". 8040f9d: 68f3 6893 b168 0176 5292 cd8a c689 fe84 .h.hh.v..R...... 8040fad: 4aa7 4935 9ca3 0c3a 2b79 1821 4c91 b56a .J5I..:.y+!..Lj. 8040fbd: a09a dba1 f2ce 7389 2aba 738b 75db 4e81 .......s.*.s.u.N 8040fcd: 6f2c 8a74 3125 6b3d 154e b9d2 534e e4cc ,ot.%1=kN...NS.. 8040fdd: eb33 e10c 94f2 49f8 1254 ef2c 9e2b f22b 3......IT.,.+.+. 8040fed: 86ae 2612 b8ad 95ce d77d 2b5c 0eca 66ad ...&....}.\+...f 8040ffd: 20fb a126 e0d5 a5c6 249b d38c 8118 7b6c . &......$....l{ 804100d: 54d0 b53f e8c2 491a 7ac8 29bd 9187 83d1 .T?....I.z.).... 804101d: 5289 432d faed 684b d72b d792 6914 7cd4 .R-C..Kh+....i.| 804102d: 2b7e a66e 0b58 be44 2b54 a676 79d8 9d8d ~+n.X.D.T+v..y.. 804103d: e3a5 ca1c 94a7 2b9d 18a8 509f be41 433c .......+...PA.. 804182d: 8f04 2945 ca82 8188 c34f 8e30 e2c2 394e ..E)....O.0...N9 804183d: 9b9a d01f 0f86 5297 21ee d383 bda6 92d7 .......R.!...... 804184d: 863e 8eb3 05c9 fc1a 9f8c 2d3f 1df7 36c6 >.........?-...6 804185d: 51b4 ab5b 12a2 7fc6 63e2 21c3 fe85 b7bf .Q[......c.!.... 804186d: edff c370 6da3 a0f8 7822 e6b1 a2c5 825a ..p..m.."x....Z. 804187d: 50ab cde7 3bbb ce58 c5c8 704b 37a2 84a8 .P...;X...Kp.7.. 804188d: 5287 09d9 ae93 1518 4f37 c1e0 0cd5 9d0d .R......7O...... 804189d: ead5 1f40 0bc5 7798 b1b9 c595 3336 51de ..@....w....63.Q 80418ad: 10e5 6330 882d 811f e58d c0dd 1d30 80de ..0c-.......0... 80418bd: 71cc 4c9e db1f 4db2 bbd4 1bc5 9a62 6268 .q.L...M....b.hb 80418cd: 4c3a 45b9 8683 87eb 8ec0 4aa8 7df1 00ca :L.E.......J.}.. 80418dd: 83d8 3fa8 115a 3e80 dc49 af11 8f9c b1c6 ...?Z..>I....... 80418ed: e5cc 32f6 c188 21e5 43d4 dd78 bed0 155c ...2...!.Cx...\. 80418fd: 783d 37e3 7e5b ba0a 86eb e145 cbcd a2fd =x.7[~....E..... 804190d: 04b5 d636 005a 0a7b 200b f838 ab3f c625 ..6.Z.{.. 8.?.%. 804191d: d778 f784 cada cdba 44af 199c aaa8 6d89 x........D.....m 804192d: 330e a183 d45e 4709 2a0d 3bb4 92dc 5830 .3..^..G.*.;..0X 804193d: f204 bd87 831d 3ba6 d85f 72e8 535d 2dc2 .......;_..r]S.- 804194d: fa22 d653 5690 6be3 9416 35e2 69a7 1281 ".S..V.k...5.i.. 804195d: 2334 9751 3df3 6eb6 6d45 03f0 fd02 9dc3 4#Q..=.nEm...... 804196d: c822 d5de e410 0e0f 813a 03e0 7203 8d30 ".......:....r0. 804197d: 0be0 9e6c 0222 1489 2f97 450f e68d 74c1 ..l."..../.E...t 804198d: e0d0 5284 4832 1e6b 64a8 0267 76a2 206d ...R2Hk..dg..vm 804199d: cf75 1133 34aa 3bdd a4fc dbb8 f4a4 e2e3 u.3..4.;........ 80419ad: 8292 aec1 2797 c782 5385 ab32 48e8 6d7b .....'...S2..H{m 80419bd: 1445 54c1 e619 f608 3451 b7e6 5034 a5e7 E..T....Q4..4P.. 80419cd: 2b44 90a6 9d82 f878 61d4 35dd 99e5 8d01 D+....x..a.5.... 80419dd: 32fe ae79 64ad 974d 2beb baeb 1cde 3d70 .2y..dM..+....p= 80419ed: 4a06 ee86 2b8f 56e7 50fa d5fe a2ec 1aad .J...+.V.P...... 80419fd: 0cf4 998a d7a1 6174 7092 0888 00f8 e76e ......ta.p....n. 8041a0d: fbe0 e075 68ad 4338 f7cb c1e9 6355 dc15 ..u..h8C....Uc.. 8041a1d: f6a2 364a c254 616a 82af ff75 c15c 1d73 ..J6T.ja..u.\.s. 8041a2d: 4c60 af3e 39f7 64ba 364f 50ca dac0 d695 `L>..9.dO6.P.... 8041a3d: b4aa 8e44 7e0d ab68 5787 1d5e 6154 11b1 ..D..~h..W^.Ta.. 8041a4d: afa7 c3a3 a25b ec70 1d97 ecbc 1182 1523 ....[.p.......#. 8041a5d: ead7 c981 adeb 993c acf8 0265 9e76 405e ......<...e.v.^@ 8041a6d: 1501 0687 8689 9d7e 634c 13d7 4ae8 394d ......~.Lc...JM9 8041a7d: 687c e74f 7a51 4f74 efd6 b16d d624 6a7e |hO.QztO..m.$.~j 8041a8d: 8d74 0018 ee47 1235 ef7e 4524 10e7 8f6e t...G.5.~.$E..n. 8041a9d: dc3c 789e 6d77 d62d 780b 13a6 7a5e 7fdc <..xwm-..x..^z.. 8041aad: 96a9 21fb 9cdc bfe7 c146 38d7 9af8 a21c ...!....F..8.... 8041abd: 9550 7861 f9e4 704f 5f45 c07a e13d 9661 P.ax..OpE_z.=.a. 8041acd: 6797 e4b8 3bf2 0a1c 32b8 7853 b95b 198a .g...;...2Sx[... 8041add: 4c77 4a17 06a6 d709 327a 6d46 d051 1d6f wL.J....z2FmQ.o. 8041aed: ff23 bb42 518c 677c 7461 a121 332c 340c #.B..Q|gat!.,3.4 8041afd: f1ec 8f00 5f22 651c 5004 194c ee7c e53b ...."_.e.PL.|.;. 8041b0d: c242 8865 4fb9 e74a 272d 36eb 2f93 529b B.e..OJ.-'.6./.R 8041b1d: 5439 10be 8b67 2c35 6168 8aab 2904 764d 9T..g.5,ha...)Mv 8041b2d: 2682 4318 7781 222a a587 0448 bdef ff59 .&.C.w*"..H...Y. 8041b3d: bd0c a4ad bcb9 35be c5d9 fe15 d805 883c .......5......<. 8041b4d: 088b 13df 4830 64fa f2b9 2140 69e3 da0f ....0H.d..@!.i.. 8041b5d: dc54 6f70 8bdc 3a83 ff28 887a 017f 9a20 T.po...:(.z... . 8041b6d: 3705 6b12 68ba 3518 1314 9ecb add4 0307 .7.k.h.5........ 8041b7d: 7fbc 3dc0 ceb5 4c0f b6e8 5343 f3f9 6e9b ...=...L..CS...n 8041b8d: 4ea0 3fa7 1b07 df78 244a 7329 2590 8c20 .N.?..x.J$)s.% . 8041b9d: e2aa 4f4c 59ff 2ef2 734b 09ab 6edc aba6 ..LO.Y..Ks...n.. 8041bad: 8a46 8021 c2f5 82b2 602d 19b8 bb7a 7612 F.!.....-`..z..v 8041bbd: f153 9153 95a3 f336 0df0 0786 0af8 f8d6 S.S...6......... 8041bcd: 4b73 6efb 0143 26eb 49c1 38c3 1a0e 8f6f sK.nC..&.I.8..o. 8041bdd: d7d3 f50a b8da 3083 484e 701b dae6 8225 .......0NH.p..%. 8041bed: 9fed 26a3 008c b386 d927 7f82 7c02 ca70 ...&....'....|p. 8041bfd: f8f2 5344 15b4 29b7 f5dd 43a6 2ee0 4a05 ..DS...)...C...J 8041c0d: 0083 48a3 c58f f01b 4c75 19b0 ec78 6bf6 ...H....uL..x..k 8041c1d: 6eef a300 6fa6 de3a 86f1 3c00 50d7 553d .n...o:....<.P=U 8041c2d: ca4d 5bc3 f2b7 19ee 04aa c59a 1e75 0fa5 M..[........u... 8041c3d: a9d3 3997 19be 2135 3444 c7b5 4292 4689 ...9..5!D4...B.F 8041c4d: e81c f8db 6849 866f a454 f17b ef15 f3d9 ....Iho.T.{..... 8041c5d: a137 80aa fde0 8ab6 6e39 f8d4 ac3a 4504 7.......9n..:..E 8041c6d: bb03 6787 7cc8 64b2 fb57 8d89 b0e8 0dbe ...g.|.dW....... 8041c7d: 887c 1355 8ec8 a7b9 41e6 06ae 2276 e324 |.U......A..v"$. 8041c8d: 16a7 dc84 16fe f802 4a3d ddcf fd4d 1a3d ........=J..M.=. 8041c9d: c8ef ef3c 4ce9 97ef 09da 7fa1 e777 086e ..<..L......w.n. 8041cad: bf7e fb72 7749 30b7 c12b 89b5 69ff 78f2 ~.r.Iw.0+....i.x 8041cbd: 40fe 9bff 4ff1 26b1 130d 5963 cbe0 d1ad .@...O.&..cY.... 8041ccd: d169 2f9b f9cb 2ee7 fb6e e875 ebc6 8913 i../....n.u..... 8041cdd: 7d32 5b44 e296 1b71 fedc 3adc c9bd 9834 2}D[..q....:..4. 8041ced: 53d3 e4ae bafe 2a80 5d70 b973 2321 edda .S.....*p]s.!#.. 8041cfd: b8c6 a985 cb4a 7070 2b8d 9535 d1c1 9a0d ....J.pp.+5..... 8041d0d: ca91 c4ad b184 18fc 6891 19b6 111d 43bd .........h.....C 8041d1d: e810 99b1 cb4a 5408 1930 f2d6 e762 ba27 ....J..T0...b.'. 8041d2d: 1d0c 7d3e 7a10 1055 ff28 03b4 73e5 3a69 ..>}.zU.(....si: 8041d3d: 7cd7 fcb3 6a14 99f4 5a5a 1b00 c960 7cd2 .|...j..ZZ..`..| 8041d4d: a2ac 54b9 6c3d 5f9f 7220 8d22 663e 72f3 ...T=l._ r".>f.r 8041d5d: 8438 780d a5e6 4f74 9d40 1ee5 f06f 274f 8..x..tO@...o.O' 8041d6d: b577 bc61 583d f0cc f34f 6d71 4fc7 08f3 w.a.=X..O.qm.O.. 8041d7d: d080 6d0c 3a31 ee10 0404 0247 4ab0 60b6 ...m1:....G..J.` 8041d8d: c350 6803 00cc 2df2 943b 6e75 9350 9d97 P..h...-;.unP... 8041d9d: ac32 dd3c 81c5 22ee 6633 bac6 4edf 211e 2.<...."3f...N.! 8041dad: 6324 78f6 5bb1 5f54 b6e1 1cc5 eef6 05f9 $c.x.[T_........ 8041dbd: 6d02 7adc 621f 5548 8929 06de 29b3 112e .m.z.bHU)....).. 8041dcd: aeef a0fe 51e4 6f55 c8aa 0708 3b58 f45a .....QUo....X;Z. 8041ddd: 4871 b21b 7388 f21a 4f80 1c82 b1f0 46ca qH...s...O.....F 8041ded: e76f 0707 722c 94a6 9402 99e8 deb1 8d10 o...,r.......... 8041dfd: e240 91a3 245b b2b0 2ce5 21d1 5350 03f9 @...[$...,.!PS.. 8041e0d: b6dd 54b5 6cbb abe4 48af 7115 b22f 0ea9 ...T.l...H.q/... 8041e1d: 8bd3 b132 4407 e728 ecd9 cc5e cf08 f5db ..2..D(...^..... 8041e2d: ccde e225 fd32 bbd4 d4b0 8ba2 f1cd 7106 ..%.2..........q 8041e3d: 1469 9671 006e 9012 4c50 6d50 c689 025b i.q.n...PLPm..[. 8041e4d: 6a57 d24f b01b d6c5 01db b109 c925 9865 WjO.........%.e. 8041e5d: 009a ade0 a25a ba65 2675 8e9c c7aa 3086 ....Z.e.u&.....0 8041e6d: 9445 7243 7e9a 4870 9855 7704 2e19 ebd1 E.Cr.~pHU..w.... 8041e7d: a066 8c83 7b08 aa3f 2c01 2a82 6442 2dc8 f....{?..,.*Bd.- 8041e8d: 4003 346b 48be 24e0 b418 a481 838c 2df5 .@k4.H.$.......- 8041e9d: 88b2 8d21 0c8c fb62 46a8 12e8 eb45 9ac8 ..!...b..F..E... 8041ead: 46e4 0d54 821c 4328 f4c1 d115 5832 f732 .FT...(C....2X2. 8041ebd: f4b4 b16f dbe4 0379 96a7 1053 fc0f 4316 ..o...y...S....C 8041ecd: a990 fa26 7c18 4658 81c5 a00e 6417 6df9 ..&..|XF.....d.m 8041edd: 0d11 91fe 9878 ceb7 d2d8 d088 4797 ca7a ....x........Gz. 8041eed: 9baf 8c50 b16d 3bb3 22ef 304c 08dd c40c ..P.m..;."L0.... 8041efd: 6ec7 9dba a85e 8153 c079 224f 96da 7698 .n..^.S.y.O"...v 8041f0d: 501c 87bb 01c6 bd61 b072 df87 cc41 253b .P....a.r...A.;% 8041f1d: 05c4 04f8 cb46 e3f5 4b58 1469 a7c2 9fe2 ....F...XKi..... 8041f2d: 49bc 1781 1cc5 4a0b d990 dd38 b400 fbe6 .I.....J..8..... 8041f3d: a865 336b faf5 48fd 2ed3 4d4c c1b4 8864 e.k3...H..LM..d. 8041f4d: 49a0 f275 9cb8 0c88 adce 235a cf98 ac69 .Iu.......Z#..i. 8041f5d: 2422 41d4 4ef1 0f58 4f92 c1ab b264 1ea2 "$.A.NX..O..d... 8041f6d: 4e7c 2a0d d593 895c 4ae1 a938 a429 8917 |N.*..\..J8.)... 8041f7d: 78db c310 588e 035b 6fc2 456d f614 32d6 .x...X[..omE...2 8041f8d: 448c 916b 40a6 f9a1 ff10 5e74 4112 ebd2 .Dk..@....t^.A.. 8041f9d: 9e0b 3fb6 37fd 7fb3 43e8 491a 9fe6 c5b6 ...?.7...C.I.... 8041fad: 702b 9652 f13f d0bb 0cde e671 fa33 a258 +pR.?.....q.3.X. 8041fbd: 5900 538c 8eb6 9beb 20c1 6cdc d2b7 f35c .Y.S..... .l..\. 8041fcd: a74b 258f 8604 eb34 7a23 8acc 9b60 ab16 K..%..4.#z..`... 8041fdd: fecd a0f5 1836 622e ff89 2621 4085 b677 ....6..b..!&.@w. 8041fed: f7a0 d26f 0d74 0e6a 00c2 88b1 209c 2fd1 ..o.t.j...... ./ 8041ffd: a526 39d1 6504 76ec 970b 4231 dea7 536e &..9.e.v..1B..nS 804200d: a6c0 8501 ea06 788b c0a8 c979 fa4c 035b .......x..y.L.[. 804201d: cc85 f19d 8863 bc1b d03c 7093 ff7d 7432 ....c...<..p}.2t 804202d: 128f 11f0 c6b8 7a1c 7d98 28be f997 b87b .......z.}.(..{. 804203d: df4f 53db 8974 3f27 5eab f06b ebf4 c650 O..St.'?.^k...P. 804204d: 35fc 133e 28b3 1242 9cfb 7e86 f6e0 d855 .5>..(B....~..U. 804205d: 0ec3 0587 5576 1719 2c19 ae44 b69e dde0 ....vU...,D..... 804206d: 5d57 d1a2 1bcb 91e7 3a60 c02b 564f 3e80 W]......`:+.OV.> 804207d: bb66 cff5 fdbf b7e3 05ff fcff b7eb fdff f............... 804208d: dfed bcff d011 d0dc 7471 6f59 5fe4 81a8 ........qtYo._.. 804209d: a67f ff7f dbf1 7d3f e3fb 4d79 138d fd4d ......?}..yM..M. 80420ad: 542b 3fff fedf bce9 2606 0689 edfe 3fdb +T.?.....&.....? 80420bd: fb7f 6fb7 847f ff7f b7fb 0bff 9d68 d4d9 ...o........h... 80420cd: f2f0 2e2c 9d1a 6c57 5e7c c9b1 aea5 78df ..,...Wl|^.....x 80420dd: 0031 399b 8d67 50c1 3ef1 6613 b119 4ab3 1..9g..P.>.f...J 80420ed: 41bb ab39 1fb4 a701 9c45 017f b7ad 3229 .A9.....E.....)2 80420fd: 6aa7 7143 a3c1 8bbc c0f2 6d2b bf81 3aad .jCq......+m...: 804210d: 419c 4af4 1133 811a 3ada a241 6c05 0b63 .A.J3....:A..lc. 804211d: 3af0 eeaf 39df 1775 5b99 b000 1a31 9a8c .:...9u..[..1... 804212d: b5d3 7a8b 8ccd b3c4 041b 087d d441 e8d1 ...z......}.A... 804213d: 0212 7822 85b7 d41d 9d4d f053 6f1e aa45 .."x....M.S..oE. 804214d: 4758 61f1 2d6a 0d91 1a15 3074 b979 a818 XG.aj-....t0y... 804215d: 7f66 110c 31f9 955b d7cb 2ee9 ef5b bde0 f....1[.....[... 804216d: 6db1 5189 e563 f8b2 bd3d 9550 4d20 eb1c .m.Qc...=.P. M.. 804217d: 4a6c efb3 b05c 55f3 f0dd 9ae3 2064 06cb lJ..\..U....d .. 804218d: 048d 0480 6f45 22e0 c070 925b 3aba 7079 ....Eo."p.[..:yp 804219d: bc69 b428 1405 28cd 821c 5dde 57ec eb4b i.(....(...].WK. 80421ad: 97c7 f4c8 6b60 80bc d1d0 1f60 3d5d ead3 ....`k....`.]=.. 80421bd: caa4 9b36 db22 eb66 3179 fae5 2191 ac7f ..6.".f.y1...!.. 80421cd: 1836 e7d2 a6ed 2ac0 b9c0 ab96 1c49 d916 6......*....I... 80421dd: 1023 b00b b62e 470c 5d3d 1f25 c248 057c #......G=]%.H.|. 80421ed: fc11 63b4 041f ae3f 5761 5b23 0672 1ed1 ...c..?.aW#[r... 80421fd: e29e 155a 26dc 136f 76b8 d4d0 6f20 f19d ..Z..&o..v.. o.. 804220d: 253d 44ce 6dc5 65d9 428d eb02 dd2b d497 =%.D.m.e.B..+... 804221d: e7d8 e388 98d4 6f60 3991 48c2 0828 6c64 ......`o.9.H(.dl 804222d: 8d0f 2bd0 dbab c4e1 a1d4 8dbc 0f60 3b43 ...+........`.C; 804223d: 8716 e07b 7560 a402 4faf 0729 b491 3a0d ..{.`u...O)....: 804224d: 1ac8 6274 cd4b 582f caac ca6e bc18 9662 ..tbK./X..n...b. 804225d: e9c1 8350 5607 b57b f2e8 a005 a491 c11f ..P..V{......... 804226d: 9848 bba3 df02 8373 cb83 f960 52d6 45e8 H.....s...`..R.E 804227d: b56e 746c 86e5 cb98 9ae8 c84e 8b34 d45b n.lt......N.4.[. 804228d: 1871 6ed1 cab1 ef5d 7795 dc36 8bf7 201c q..n..]..w6.... 804229d: 7270 7ec4 b8cb 8635 9e86 dd71 5fed fc97 pr.~..5...q.._.. 80422ad: 1238 46af ca39 9501 6bb3 3fa3 43c6 705f 8..F9....k.?.C_p 80422bd: 78ef faa0 f4a6 5a92 877f d9ef b3c1 4a89 .x.....Z.......J 80422cd: 2f76 c7cb 9d3e e4a9 79a5 3e57 0b22 87e3 v/..>....yW>"... 80422dd: ee1f 5795 44c8 3a91 5f87 6aab 8535 4478 ...W.D.:._.j5.xD 80422ed: af50 e6a1 5316 e090 4663 0e99 e1df 305b P....S..cF....[0 80422fd: e0ef 0aff ef31 c08f 2ee0 ba26 a4b6 c313 ....1.....&..... 804230d: 6ae8 65ff 4bf4 f8f5 be8b 496c 26e7 5c20 .j.e.K....lI.& \ 804231d: d218 3687 727d 4efb cd0d b87a f3bd 4f85 ...6}r.N..z....O 804232d: 4764 a101 c034 06c0 6f89 4f10 25ff 957b dG..4....o.O.%{. 804233d: 6352 56ec d59f e034 9810 7e9a dd7d 421f Rc.V..4....~}..B 804234d: b368 5769 c673 fea3 fae8 b02d d07a c0e0 h.iWs.....-.z... 804235d: 0799 3f4d e0ea 1100 dcb9 2104 289d b8a2 ..M?.......!.(.. 804236d: 854f 4988 97aa 8b2e 3e97 74d8 e933 9003 O..I.....>.t3... 804237d: 3ba6 98cd f5dc 9a47 0341 19a0 71a3 4dff .;....G.A....q.M 804238d: e043 9ad1 b458 83f4 d2d0 3a8f e0c8 c33e C...X......:..>. 804239d: fe55 d903 f4dc e5e0 5e02 ec89 aaef a52d U........^....-. 80423ad: b86b 9353 c6db be1f 7317 b680 4856 c093 k.S......s..VH.. 80423bd: d133 03b0 0185 60b7 28c8 b3ab 331e 189e 3......`.(...3.. 80423cd: 6b33 af8b 83ae 4e2f 96b3 77bd 0156 1487 3k..../N...wV... 80423dd: f689 c3d0 c834 f633 624a e689 af8d 37fa ....4.3.Jb.....7 80423ed: a9f3 3fa8 6298 c221 a00f aafc 8ea7 21fa ...?.b!........! 80423fd: 0fc8 d6ba f489 0e96 0d3d 38d8 733e 57e0 ........=..8>s.W 804240d: f736 26a1 5527 1ff4 d92c ab43 a31b 0000 6..&'U..,.C..... 804241d: 5825 3f00 6600 6e75 0063 7322 6f74 2270 %X.?.func."stop" 804242d: d000 d0a2 d1b5 d181 2082 bed0 81d1 82d1 ......... ...... 804243d: b0d0 bdd0 bed0 b2d0 bbd0 b5d0 bdd0 0021 ..............!. 804244d: 90d0 b4d0 bcd0 b8d0 bdd0 b8d0 81d1 82d1 ................ 804245d: 80d1 b0d0 82d1 bed0 80d1 d028 d19e d181 ..........(..... 804246d: d082 d0b0 d0bd d0be 29b2 d000 d0a2 d1b5 .........)...... 804247d: d181 2082 bdd0 b5d0 d120 d083 d0b4 d0b0 ... .... ....... 804248d: d0bb d1be d181 208c bed0 81d1 82d1 b0d0 ....... ........ 804249d: bdd0 bed0 b2d0 b8d0 82d1 8cd1 0021 6422 ............!."d 80424ad: 7369 6863 7261 6567 0022 a2d0 b5d0 81d1 ischarge"....... 80424bd: 82d1 d020 d0b7 d0b0 d1bf d183 d089 d0b5 .. ............. 80424cd: 21bd d000 d090 d0b4 d0bc d0b8 d0bd d1b8 .!.............. 80424dd: d181 d182 d080 d1b0 d082 d1be 2080 d028 ............. (. 80424ed: d097 d0b0 d1bf d183 d089 d0b5 29bd d000 .............).. 80424fd: d0a2 d1b5 d181 2082 bdd0 b5d0 d120 d083 ....... .... ... 804250d: d0b4 d0b0 d0bb d1be d181 208c b7d0 b0d0 ........... .... 804251d: bfd0 83d1 81d1 82d1 b8d0 82d1 8cd1 0021 ..............!. 804252d: 7422 6d69 2265 2200 6163 636e 6c65 0022 "time"."cancel". 804253d: 92d0 8bd1 bad0 bbd0 8ed1 87d1 b5d0 bdd0 ................ 804254d: b8d0 b5d0 d020 d098 d091 209f bed0 82d1 .... ...... .... 804255d: bcd0 b5d0 bdd0 b5d0 bdd0 bed0 0021 92d0 ............!... 804256d: 8bd1 bad0 bbd0 8ed1 87d1 b5d0 bdd0 b8d0 ................ 804257d: b5d0 d020 d098 d091 209f bdd0 b5d0 d120 .. ...... .... . 804258d: d083 d0b4 d0b0 d0bb d1be d181 208c bed0 ............. .. 804259d: 82d1 bcd0 b5d0 bdd0 b8d0 82d1 8cd1 0021 ..............!. 80425ad: 6f22 6666 0022 6661 6574 0072 6f74 d000 "off".after.to.. 80425bd: d09f d1b5 d080 d0b5 d0b7 d0b0 d1b3 d180 ................ 80425cd: d083 d0b7 d0ba 20b0 98d0 91d0 9fd0 0021 ....... ......!. 80425dd: 9ed0 82d1 bcd0 b5d0 bdd0 b0d0 d020 d0bf ............ ... 80425ed: d1b5 d080 d0b5 d0b7 d0b0 d1b3 d180 d083 ................ 80425fd: d0b7 d0ba 20b8 98d0 91d0 9fd0 0021 5448 ..... ......!.HT 804260d: 5054 312f 302e 3220 3030 4f20 0d4b 430a TP/1.0 200 OK..C 804261d: 6e6f 6574 746e 542d 7079 3a65 6574 7478 ontent-Type:text 804262d: 682f 6d74 0d6c 530a 7465 432d 6f6f 696b /html..Set-Cooki 804263d: 3a65 7520 616e 656d 003d 0a0d 6553 2d74 e: uname=...Set- 804264d: 6f43 6b6f 6569 203a 6469 003d 0a0d 6553 Cookie: id=...Se 804265d: 2d74 6f43 6b6f 6569 203a 6f72 656c 303d t-Cookie: role=0 804266d: 0d00 530a 7465 432d 6f6f 696b 3a65 6120 ...Set-Cookie: a 804267d: 7475 3d68 0030 213c 4f44 5443 5059 2045 uth=0.< 80426dd: 682f 6165 3e64 2f3c 7468 6c6d 0d3e 0d0a /head>... 80426ed: 000a 0026 6f6c 6967 3d6e 7000 7361 7773 ..&.login=.passw 80426fd: 726f 3d64 0d00 530a 7465 432d 6f6f 696b ord=...Set-Cooki 804270d: 3a65 7220 6c6f 3d65 d000 d09f d0be d1bb e: role=........ 804271d: d08c d0b7 d0be d0b2 d1b0 d082 d0b5 d1bb ................ 804272d: 008c 776f 656e 3d72 7300 7379 6f4c 6163 ..owner=.sysLoca 804273d: 6974 6e6f 003d 6f63 6d6d 6e65 3d74 7200 tion=.comment=.r 804274d: 6165 5f64 6f63 6d6d 6e75 7469 3d79 7700 ead_community=.w 804275d: 6972 6574 635f 6d6f 756d 696e 7974 003d rite_community=. 804276d: 616d 616e 6567 4972 3d50 6d00 6e61 6761 managerIP=.manag 804277d: 7265 5049 3d32 6d00 6e61 6761 7265 5049 erIP2=.managerIP 804278d: 3d33 6d00 6e61 6761 7265 5049 3d34 6d00 3=.managerIP4=.m 804279d: 6e61 6761 7265 5049 3d35 6400 6368 3d70 anagerIP5=.dhcp= 80427ad: 6900 6170 6464 3d72 6700 3d77 6d00 7361 .ipaddr=.gw=.mas 80427bd: 3d6b 6100 7475 3d68 7200 5f73 6e65 6261 k=.auth=.rs_enab 80427cd: 656c 3d64 7200 5f73 6573 7672 7265 003d led=.rs_server=. 80427dd: 7372 705f 726f 3d74 7200 5f73 7770 3d64 rs_port=.rs_pwd= 80427ed: 7200 5f73 656b 3d79 6400 3169 003d 6f72 .rs_key=.di1=.ro 80427fd: 3d31 7200 326f 003d 746e 3d70 6e00 7074 1=.ro2=.ntp=.ntp 804280d: 6573 7672 7069 003d 6974 656d 003d 7475 servip=.time=.ut 804281d: 3d63 4800 5454 0050 7270 646f 7461 3d65 c=.HTTP.prodate= 804282d: 4800 5454 2f50 2e31 2030 3032 2030 4b4f .HTTP/1.0 200 OK 804283d: 0a0d 6f43 746e 6e65 2d74 7954 6570 743a ..Content-Type:t 804284d: 7865 2f74 7468 6c6d 0a0d 0a0d 7254 6575 ext/html....True 804285d: 7000 6761 3d65 6100 6c6c 4800 5454 2f50 .page=.all.HTTP/ 804286d: 2e31 2031 3032 2030 4b4f 0a0d 6f43 746e 1.1 200 OK..Cont 804287d: 6e65 2d74 654c 676e 6874 253a 756c 0a0d ent-Length:%lu.. 804288d: 0a0d 7325 7500 6573 6e72 6d61 3d65 6f00 ..%s.username=.o 804289d: 646c 6170 7373 003d 656e 7077 7361 3d73 ldpass=.newpass= 80428ad: d000 d09f d1b0 d080 d0be d1bb 208c 83d1 ............. .. 80428bd: 81d1 bfd0 b5d0 88d1 bdd0 bed0 d020 d0b8 ............ ... 80428cd: d0b7 d0bc d0b5 d1bd d091 00bd 92d0 b2d0 ................ 80428dd: b5d0 b4d0 b5d0 bdd0 8bd1 d020 d0bd d0b5 .......... ..... 80428ed: d0ba d1be d180 d080 d0b5 d1ba d082 d1bd ................ 80428fd: d08b 20b5 b4d0 b0d0 bdd0 bdd0 8bd1 b5d0 ... ............ 804290d: 0021 92d0 b2d0 b5d0 b4d0 91d1 bdd0 d020 !............. . 804291d: d0bd d0b5 d0b2 d1b5 d080 d1bd d08b 20b9 ............... 804292d: bfd0 b0d0 80d1 bed0 bbd0 8cd1 0021 4547 ............!.GE 804293d: 2054 6d2f 6961 2e6e 7363 0073 4547 2054 T /main.css.GET 804294d: 722f 746f 6b65 702e 676e 4700 5445 2f20 /rotek.png.GET / 804295d: 6166 6976 6f63 2e6e 6369 006f 4547 2054 favicon.ico.GET 804296d: 722f 6c6f 2e65 736a 5000 534f 2054 6c2f /role.js.POST /l 804297d: 676f 6e69 632e 6967 2f00 6f6c 6967 2e6e ogin.cgi./login. 804298d: 7468 6c6d 5400 6f6f 6c20 6e6f 2067 4f50 html.Too long PO 804299d: 5453 7220 7165 6575 7473 0d21 000a 4547 ST request!...GE 80429ad: 2054 6d2f 6961 2e6e 736a 4700 5445 2f20 T /main.js.GET / 80429bd: 6573 7474 6e69 7367 682e 6d74 006c 692f settings.html./i 80429cd: 646e 7865 682e 6d74 006c 4547 2054 692f ndex.html.GET /i 80429dd: 666e 2e6f 7468 6c6d 4700 5445 2f20 6968 nfo.html.GET /hi 80429ed: 7473 726f 2e79 7468 6c6d 4700 5445 2f20 story.html.GET / 80429fd: 7075 5f73 6968 7473 726f 2e79 7468 6c6d ups_history.html 8042a0d: 4700 5445 2f20 6567 4a74 6f73 2e6e 6763 .GET /getJson.cg 8042a1d: 0069 4547 2054 732f 7465 6974 676e 2e73 i.GET /settings. 8042a2d: 6763 0069 4f50 5453 2f20 6573 7474 6e69 cgi.POST /settin 8042a3d: 7367 632e 6967 4800 5454 2f50 2e31 2031 gs.cgi.HTTP/1.1 8042a4d: 3032 2030 4b4f 0a0d 3c00 4421 434f 5954 200 OK........GET /inf 8042acd: 2e6f 6763 0069 4f50 5453 2f20 6e69 6f66 o.cgi.POST /info 8042add: 632e 6967 3c00 4421 434f 5954 4550 6820 .cgi. 8042afd: 683c 6165 3e64 6d3c 7465 2061 7468 7074 ..... 8042b4d: 4547 2054 682f 7369 6f74 7972 632e 6967 GET /history.cgi 8042b5d: 4700 5445 2f20 7075 5f73 6968 7473 726f .GET /ups_histor 8042b6d: 2e79 6763 0069 4f50 5453 2f20 6162 5f74 y.cgi.POST /bat_ 8042b7d: 6574 7473 632e 6967 5000 534f 2054 752f test.cgi.POST /u 8042b8d: 7370 705f 776f 7265 632e 6967 4700 5445 ps_power.cgi.GET 8042b9d: 2f20 6572 6573 2e74 6763 0069 4547 2054 /reset.cgi.GET 8042bad: 722f 6265 6f6f 2e74 6763 0069 4547 2054 /reboot.cgi.GET 8042bbd: 632f 6e6f 6966 6d72 632e 6967 4700 5445 /confirm.cgi.GET 8042bcd: 2f20 7766 755f 6470 7461 2e65 6763 0069 /fw_update.cgi. 8042bdd: 4f50 5453 2f20 6863 6e61 6567 7770 2e64 POST /changepwd. 8042bed: 6763 0069 4547 2054 732f 7465 7250 646f cgi.GET /setProd 8042bfd: 7461 2e65 6763 0069 0000 2c00 ate.cgi.... 08042c08 : 8042c08: 3c2c 0804 8dd8 0803 8de4 0803 1802 0000 ,<.............. 8042c18: 0001 0000 .... 08042c1c : 8042c1c: 3bc8 0804 365c 0804 3670 0804 0541 0000 .;..\6..p6..A... 8042c2c: 0001 0000 .... 08042c30 : 8042c30: 692f 666e 2e6f 7468 6c6d 0000 5448 5054 /info.html..HTTP 8042c40: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 8042c50: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 8042c60: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 8042c70: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 8042c80: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 8042c90: 6e65 2d74 654c 676e 6874 203a 3031 3839 ent-Length: 1098 8042ca0: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 8042cb0: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 8042cc0: 3a65 7420 7865 2f74 7468 6c6d 0a0d 6f43 e: text/html..Co 8042cd0: 746e 6e65 2d74 6e45 6f63 6964 676e 203a ntent-Encoding: 8042ce0: 7a67 7069 0a0d 0a0d 8b1f 0008 0000 0000 gzip............ 8042cf0: 0a04 569d 6edd 36db 7e14 5615 69bb 2881 ...V.n.6.~.V.i.( 8042d00: 766e 6035 8096 2b22 0286 1aeb 1da0 5eb0 nv5`.."+.......^ 8042d10: b40d db44 256c 9352 c728 4bbe adb2 68bb ..D.l%R.(..K...h 8042d20: 0e81 30c1 4114 aed7 827b 6b74 b4b6 d389 ...0.A..{.tk.... 8042d30: a057 68de 21df 272d 9c5e e7ec 3642 c88f W..h.!-'^...B6.. 8042d40: f7f3 ef9d aa1c e57b 3b93 f7eb 6fee 64dc ......{..;...o.d 8042d50: 9343 7167 7e97 c659 20d5 020a 8248 71a7 C.gq.~Y.. ..H..q 8042d60: 1737 b386 c864 4acb 2898 4da8 fc3f 7b08 7...d..J.(.M?..{ 8042d70: edee 98d0 1422 d75f 1472 5f05 5f86 08dc ...."._.r.._._.. 8042d80: 75d7 705e 7b23 0899 a258 1195 2a0a 6eb7 .u^p#{..X....*.n 8042d90: 2246 881d 4956 5cf1 c144 8a48 42cd e697 F"..VI.\D.H..B.. 8042da0: b9cc 994d 619a 8a94 4c91 e844 1584 a4a9 ..M..a...LD..... 8042db0: 3c91 ab0b 6784 5a22 c95b 58f9 75e6 973e .<...g"Z[..X.u>. 8042dc0: 4aeb 4e94 70e0 5d19 0b87 4d23 6226 ccfb .J.N.p.]..#M&b.. 8042dd0: 9b4e ed6f b349 8f65 7eed c8f3 361e bb4f N.o.I.e..~...6O. 8042de0: bf1d cdd7 7aa4 86c8 e8a5 4147 a5ce 4d5a .....z....GA..ZM 8042df0: 2aaa a560 a2c8 32a0 4c93 4354 0c21 552c .*`....2.LTC!.,U 8042e00: 2949 c30b a4cc b840 8c46 e74d 1f01 ff71 I)....@.F.M...q. 8042e10: 6036 9955 4144 33a9 fab1 c2a0 8ee1 8f7f 6`U.DA.3........ 8042e20: 0785 a7ad 49d3 4ddc 88e5 1925 aaaf 5028 .....I.M..%...(P 8042e30: d47c 25e3 7ff3 2a61 bcfa 4cce f62b 58e5 |..%..a*...L+..X 8042e40: a1a4 05d1 9d2c 09d3 a2c9 fd28 dc56 b3e5 ....,.....(.V... 8042e50: a5d0 c54a 9578 060a bd08 4c8f 340f c2c5 ..J.x......L.4.. 8042e60: c0f1 fb4c 6adb 107c 9930 6722 eaa1 a250 ..L..j|.0."g..P. 8042e70: b33a 75a3 ead6 b823 2236 fd2c 5a69 80c4 :..u..#.6",.iZ.. 8042e80: a96c d8e3 04be 5bba 1f76 1f28 3b34 56cd l......[v.(.4;.V 8042e90: d8f3 a77b 67f3 4075 231d a0d5 f1f2 f6c6 ..{..gu@.#...... 8042ea0: a867 936d 3d82 6fb1 3bed b87b 4d5c beaa g.m..=.o.;{.\M.. 8042eb0: 4c5e 2791 8e46 a540 05e5 c4a6 eeff 287a ^L.'F.@.......z( 8042ec0: a32b 49cb f9eb e6a7 781b 229d a3e4 9f53 +..I.....x."..S. 8042ed0: 1a9d f7dc 9d90 7f81 e4b3 0145 1de0 336a ..........E...j3 8042ee0: 0336 e18b 05da b1de 05d1 8498 88f1 3267 6.............g2 8042ef0: 2345 1568 f4f6 8098 0f26 5d7d 6ee6 eefb E#h.....&.}].n.. 8042f00: b7e7 2837 80b7 3e51 455a cb81 1934 80c8 ..7(..Q>ZE..4... 8042f10: b1a1 1a86 3626 dcee 07bd 4345 6ecc e40b ....&6....EC.n.. 8042f20: 5985 735c 9912 e85e e18c 27b0 299f 8969 .Y\s..^....'.)i. 8042f30: cc06 82aa f8c3 c087 0f6b 4f48 8867 d91f ........k.HOg... 8042f40: 9423 0b6b 310d 6444 1a74 d72b c6eb d6f3 #.k..1Ddt.+..... 8042f50: 4819 af5b 2b4a 3481 474a bb42 f80b ec0e .H[.J+.4JGB..... 8042f60: f371 b994 bfc2 9346 50ed 0dd9 8546 aa59 q.....F..P..F.Y. 8042f70: 52e3 0bae 7323 019a a0ee ea73 c4bd 39f6 .R..#s....s....9 8042f80: 7b42 9b03 cd47 b993 4719 9d54 6c8a c6a9 B{..G....GT..l.. 8042f90: a08f 8ecf 67dd bdf6 d063 fda1 fed3 4646 .....g..c.....FF 8042fa0: 5388 ed58 982f 4a29 528d 772c 4bbd 3438 .SX./.)J.R,w.K84 8042fb0: 34db 181e fcb8 4162 bfb1 1239 8565 2cf2 .4....bA..9.e.., 8042fc0: e18b 8df6 0675 bd12 3421 ed9a bd05 279c ....u...!4.....' 8042fd0: 4d3c 61a9 e7cf 8afa da1c 9043 da7e b63c ... 8043020: 0060 6b07 69d7 9e90 fd8f 6539 800a ec4f `..k.i....9e..O. 8043030: 3c7b 7847 40fe 5318 7364 cff0 5461 ea93 {..o.K.b....s 8043120: daf5 67c7 09bf e3e8 2fea 307b 75b5 096c ...g...../{0.ul. 8043130: 0000 .. 08043132 : 8043132: 682f 7369 6f74 7972 682e 6d74 006c 0000 /history.html... 8043142: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 8043152: 530a 7265 6576 3a72 6c20 4977 2f50 2e31 .Server: lwIP/1. 8043162: 2e33 2031 6828 7474 3a70 2f2f 6173 6176 3.1 (http://sava 8043172: 6e6e 6861 6e2e 6e6f 6e67 2e75 726f 2f67 nnah.nongnu.org/ 8043182: 7270 6a6f 6365 7374 6c2f 6977 2970 0a0d projects/lwip).. 8043192: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 80431a2: 3031 3339 0a0d 6f43 6e6e 6365 6974 6e6f 1093..Connection 80431b2: 203a 6c43 736f 0d65 430a 6e6f 6574 746e : Close..Content 80431c2: 742d 7079 3a65 7420 7865 2f74 7468 6c6d -type: text/html 80431d2: 0a0d 6f43 746e 6e65 2d74 6e45 6f63 6964 ..Content-Encodi 80431e2: 676e 203a 7a67 7069 0a0d 0a0d 8b1f 0008 ng: gzip........ 80431f2: 0000 0000 0a04 568d 8f5f 44db ff10 5b2a .......V_..D..*[ 8043202: 9d53 2962 2e4e 05e2 d891 0a15 a87d a084 S.b)N.......}... 8043212: 2952 a782 dad3 d89e 5bdb baef 6bbb 02e7 R).......[...k.. 8043222: 4487 e05b 48a5 7895 bc40 c420 3837 4e90 .D[..H.x@. .78.N 8043232: d2ba 7deb e706 311b b5eb 8f83 c746 4a29 ...}...1....F.)J 8043242: dff6 cecc 6fcc 337e c59b 8f9d 5b3f fe7e .....o~3....?[~. 8043252: c3d5 24fb 0537 168f 97f6 2a70 d0b2 70f3 ...$7.....p*...p 8043262: 3405 168d 1805 924a 2a9c 260d 2af4 0ab3 .4....J..*.&.*.. 8043272: c03e 76b3 3737 0ca6 69e0 eac5 fbd0 7832 >..v77...i....2x 8043282: 51fc 94b0 4945 8b0d 7839 9124 80c2 9540 .Q..EI..9x$...@. 8043292: f707 4843 e833 0495 202d 6af4 eb06 2a52 ..CH3...- .j..R* 80432a2: 9033 b35b e4d4 0a61 4b35 6820 6317 9826 3.[...a.5K h.c&. 80432b2: 9461 3a07 1ca1 d9c2 a0b8 ac27 8aa8 badd a..:......'..... 80432c2: a0d2 05da 9345 21e1 309a 70cc 9a88 b65f ....E..!.0.p.._. 80432d2: b62f 35df 9b6f e6b3 d90d 6b3e 9aae b73f /..5o.....>k..?. 80432e2: b72f 9bcf e68b 6935 c6fe dbe5 73ed bf3c /.....5i.....s<. 80432f2: de6a e7e0 671c 8b67 d3a9 705c 8e26 ae49 j....gg...\p&.I. 8043302: 1560 057a 6265 6892 11ed 3c05 b4f4 70d9 `.z.eb.h...<...p 8043312: 39d0 4180 3a3b ac51 c434 4a6c c60c 89c0 .9.A;:Q.4.lJ.... 8043322: 3e99 35a1 bb75 d11e 092a 253d 4c39 689e .>.5u...*.=%9L.h 8043332: 9e14 7dba 389c 6348 6e99 45a2 6aca 7092 ...}.8Hc.n.E.j.p 8043342: 75aa 09e8 c75a 1154 0437 ac29 c568 bf4d .u..Z.T.7.).h.M. 8043352: b15c 4813 2303 bc4b 1de9 c09d 08de 1dca \..H.#K......... 8043362: 0b45 b9da 44ce 270a 9b13 044e d9d8 32e0 E....D.'..N....2 8043372: d693 8a17 bc5f ffa6 35ed f3de 4b08 6631 ...._....5...K1f 8043382: 5510 30c0 9d77 c568 7d7b ae74 08f7 4ea7 .U.0w.h.{}t....N 8043392: 4eda 8422 af6c a8e1 bdf9 b339 36d8 8897 .N".l.....9..6.. 80433a2: e231 7dbd ace9 f95b 0ea1 cb12 9130 e769 1..}..[.....0.i. 80433b2: d46f 86fc cf6a 04ba c6bd 5d74 57ec 6263 o...j.....t].Wcb 80433c2: 7b25 5f95 a331 37df 6857 12ed 7f95 2e6c %{._1..7Wh....l. 80433d2: afb6 2bf6 4ce5 a91b d736 a1a1 6189 1235 ...+.L..6....a5. 80433e2: 4874 7f9b a7d5 5615 8386 006c a5bf f237 tH.....V..l...7. 80433f2: a103 716f 55d3 608c 10ac 2e8d 89d7 6a02 ..oq.U.`.......j 8043402: 51e0 7f15 6b4a 6196 4851 f231 03e7 b42a .Q..Jk.aQH1...*. 8043412: 1839 b85c b456 fb2c baeb c1e2 f2eb 35d9 9.\.V.,........5 8043422: 6eb7 66cb 1b54 c592 02d8 1409 52e8 dd0a .n.fT........R.. 8043432: bac6 b768 df5a d9db 278e bf6e a6f3 22e7 ..h.Z....'n...." 8043442: 623a 771c b28d 9ed3 6514 a88e 31fd afa8 :b.w.....e...1.. 8043452: 2c73 7ca4 849f 28cd e826 1615 45e5 5fb3 s,.|...(&....E._ 8043462: 67ea df4c 7379 5369 ef67 5a98 3853 bb6b .gL.ysiSg..ZS8k. 8043472: b190 d335 db7a f065 a528 a286 d35b c4f6 ..5.z.e.(...[... 8043482: 368e 1c44 b877 3a5a 1c5b 0eb1 116d a85a .6D.w.Z:[...m.Z. 8043492: 16ed a9a6 c7cb e42e 88d8 5320 b2b2 1615 .......... S.... 80434a2: c657 d148 87c7 c427 769e e925 2911 ce12 W.H...'..v%..).. 80434b2: e392 cbd0 3cc0 19a4 668c 2a3e 92e9 420a .....<...f>*...B 80434c2: a315 ce41 14d2 b604 5504 a121 0f4e 7d38 ..A......U!.N.8} 80434d2: 495a 769b 4094 dce7 11ed b5b9 5299 dd41 ZI.v.@.......RA. 80434e2: b9da 0cc9 515a 1dea c323 97fc 6334 25a2 ....ZQ..#...4c.% 80434f2: 7a21 44cb 0d59 975b 7063 2952 fd85 251a !z.DY.[.cpR)...% 8043502: 79b1 f66b f635 99b5 1d17 5888 f397 1ba9 .yk.5......X.... 8043512: 9c5c 4416 c52b c159 15b0 ee1e 6b82 bf91 \..D+.Y......k.. 8043522: 7e2d 7b02 ffe6 a607 05f6 7b76 faf4 9524 -~.{......v{..$. 8043532: f5f6 207a e8cc e8ee f300 e661 ff3b d2dd ..z ......a.;... 8043542: d89f be16 2f74 7f96 d423 4daa e9e8 e82e ....t/..#..M.... 8043552: a32e ef1d 47f6 2a5f 5056 09b5 a898 1941 .....G_*VP....A. 8043562: 1d48 29e0 3497 ea3d 3ce8 5660 65cc 09fc H..).4=..<`V.e.. 8043572: 751e f6ae 2b1d d8c9 eb3d 4876 7739 8f5e .u...+..=.vH9w^. 8043582: b0dd d013 b775 706f c26b 5dd2 361c 3163 ....u.opk..].6c1 8043592: b23f ba31 dd72 d0fe 65f6 452c b36c 913f ?.1.r....e,El.?. 80435a2: 2fe6 7cb2 45f4 521f 285f b1a8 9c62 6123 ./.|.E.R_(..b.#a 80435b2: f7ba 7ae2 fda8 fb66 dd96 39e2 5f6c ebd3 ...z..f....9l_.. 80435c2: e1cf 5a8d 9f51 99bc be3f f23b f486 27f4 ...ZQ...?.;....' 80435d2: 1c52 06c3 036b cf1f 2555 7db0 7763 ff05 R...k...U%.}cw.. 80435e2: 381b 1d3d b841 d7c6 ae4f 5027 9d23 79fd .8=.A...O.'P#..y 80435f2: 1f6d 10d6 a826 94b0 4a29 64c0 b39d 9f24 m...&...)J.d..$. 8043602: 302b 1295 ecde 2f7d c50c 51bd 6e6f 95c0 +0....}/...Qon.. 8043612: 18ff 29ad c0af c7f7 6677 87fe 64b5 3929 ...)....wf...d)9 8043622: 76fc d0d8 bfdb ff50 1100 94f1 524b 0009 .v....P.....KR.. 8043632: 4800 . 08043633 : 8043633: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 8043643: 0d0a 000a 0400 ..... 08043648 : 8043648: 3c04 0804 fa0d 0803 fa19 0803 2a04 0000 .<...........*.. 8043658: 0001 0000 .... 0804365c : 804365c: 752f 7370 685f 7369 6f74 7972 682e 6d74 /ups_history.htm 804366c: 006c 0000 5448 5054 312f 312e 3220 3030 l...HTTP/1.1 200 804367c: 4f20 0d4b 530a 7265 6576 3a72 6c20 4977 OK..Server: lwI 804368c: 2f50 2e31 2e33 2031 6828 7474 3a70 2f2f P/1.3.1 (http:// 804369c: 6173 6176 6e6e 6861 6e2e 6e6f 6e67 2e75 savannah.nongnu. 80436ac: 726f 2f67 7270 6a6f 6365 7374 6c2f 6977 org/projects/lwi 80436bc: 2970 0a0d 6f43 746e 6e65 2d74 654c 676e p)..Content-Leng 80436cc: 6874 203a 3131 3337 0a0d 6f43 6e6e 6365 th: 1173..Connec 80436dc: 6974 6e6f 203a 6c43 736f 0d65 430a 6e6f tion: Close..Con 80436ec: 6574 746e 742d 7079 3a65 7420 7865 2f74 tent-type: text/ 80436fc: 7468 6c6d 0a0d 6f43 746e 6e65 2d74 6e45 html..Content-En 804370c: 6f63 6964 676e 203a 7a67 7069 0a0d 0a0d coding: gzip.... 804371c: 8b1f 0008 0000 0000 0a04 568d 6edd 44dc ...........V.n.D 804372c: 7e14 d715 d154 8a5a 59bd 41b8 ed64 850a .~..T.Z..Y.Ad... 804373c: 545e 1042 1429 55c1 b634 aecf 99a7 bb1d ^TB.)..U4....... 804374c: b1e3 5b37 9482 14a4 8a2e 9a54 540b a121 ..7[......T..T!. 804375c: 3caa 0441 28aa 6d3f 615f 46fc 999c 17b1 ...h 80437ac: ba1d f95f 3f77 77f6 59f2 2441 198d 4eb8 .._.w?.w.YA$...N 80437bc: 7392 1c09 ee59 0edc 9d21 c742 c9c4 420c .s..Y...!.B....B 80437cc: a6b7 2f30 2172 747b 9a73 2cca a14c 09a6 ..0/r!{ts..,L... 80437dc: 66f8 49b3 9539 3094 4cbf 8308 b470 2339 .f.I9..0.L..p.9# 80437ec: 7487 cd56 fb96 04aa 3661 5504 5b86 42a8 .tV.....a6.U.[.B 80437fc: c952 5220 373f 9b0f f563 9d5a 7fab e69c R. R?7..c.Z..... 804380c: bd44 4e69 539a 7ffc 4782 9aaf 8e27 a67a D.iN.S...G..'.z. 804381c: aa9e e3e7 a5a1 331e 0fca 4c9c 24c0 6774 .......3...L.$tg 804382c: f284 2920 d74b c011 b742 0b94 6506 2006 .. )K...B....e. 804383c: 7651 0899 485a 2e47 740a c240 1ca1 23de Qv..ZHG..t@....# 804384c: b135 aea7 8a53 7424 ce45 b820 2257 d0f1 5...S.$tE. .W".. 804385c: e39e 86c2 ce31 45d3 4e34 ed69 8c24 6594 ....1..E4Ni.$..e 804386c: 72e8 c752 3844 e3f6 30a7 1521 dd93 4276 .rR.D8...0!...vB 804387c: 210f 65f5 a05e 4ba4 be3c 0896 5ec2 6345 .!.e^..K<....^Ec 804388c: 9ad2 794e 870a 4e81 0621 ead5 f960 d734 ..Ny...N!...`.4. 804389c: 10b6 a1fc ee98 e3bf cf78 6875 3e8a af03 ........x.uh.>.. 80438ac: 8a7c 6af9 2b49 f1d6 71a3 459d b4b8 7ad4 |..jI+...q.E...z 80438bc: 6111 56c8 8e2a 73d4 8e75 3f91 ff57 97aa .a.V*..su..?W... 80438cc: 69cd dc73 b63c 35da 9f7d c107 2924 969f .is.<..5}...$).. 80438dc: ded6 fd48 6c8a 2398 7d64 fea3 7f52 57ab ..H..l.#d}..R..W 80438ec: d9ab 9f28 1de4 33cb baf5 0ef9 7a93 ba8c ..(....3.....z.. 80438fc: 9bce 75ef 5762 5533 b945 d19f e652 7162 ...ubW3UE...R.bq 804390c: 3c31 9124 46b4 f660 f2e1 88bf 8561 6115 1<$..F`.....a..a 804391c: d6c3 814b 3586 0462 6fc3 5762 3156 6406 ..K..5b..obWV1.d 804392c: 1182 f369 089d 1220 aaf6 33f8 d352 1629 ..i... ....3R.). 804393c: ce43 de07 0f76 260e 3d0f 7381 8a41 13a2 C...v..&.=.sA... 804394c: 16d7 8a0d 46cb cc17 0eba 48c5 07da d489 .....F.....H.... 804395c: e0c5 280b 9c8b c697 b1bf 3239 9af6 12d5 ...(......92.... 804396c: f61f b5bc c3a0 2a20 1697 52b3 65e8 8607 ...... *...R.e.. 804397c: 7b22 431f d675 0a3c 531c 6f59 e39b 4b00 "{.Cu.<..SYo...K 804398c: bb28 834c 54c9 d6fa 39d0 77ea 5964 784d (.L..T...9.wdYMx 804399c: 3cd6 535e 1fdc a508 ea87 444f f9c6 a255 .<^S......OD..U. 80439ac: aed0 07e6 230b c544 55e9 ef84 f718 fa93 .....#D..U...... 80439bc: 3d45 2d5d 37f2 12f5 f5a1 8116 808c 6c46 E=]-.7........Fl 80439cc: 96ea 8572 17f6 9f5a 3921 2d59 0ceb 5179 ..r...Z.!9Y-..yQ 80439dc: 869a 8ea8 50d8 1687 a657 4ac3 1bdd 764c .....P..W..J..Lv 80439ec: 945a a7ee 1244 c34c dcd0 afe8 294e 977e Z...D.L.....N)~. 80439fc: d1d8 ab65 82b1 46fd 1b37 270d 847d 6c50 ..e....F7..'}.Pl 8043a0c: b731 714c b92c 153f a579 493b 495c f399 1.Lq,.?.y.;I\I.. 8043a1c: 9f2e e378 dbe8 f5b6 4eb8 13ce 9346 d083 ..x......N..F... 8043a2c: 829d bbbc b7bb a64b 1830 c879 1657 3b84 ......K.0.y.W..; 8043a3c: 5044 67e2 4d34 6381 13f7 d615 d1cd 2306 DP.g4M.c.......# 8043a4c: abf7 a35c 291b 3ed0 20ab d672 54d6 a808 ..\..).>. r..T.. 8043a5c: 553b 69d7 4542 5c42 d3d2 7d47 a641 9b94 ;U.iBEB\..G}A... 8043a6c: 4372 2983 aa2f a37e b5b6 549a e042 4244 rC.)/.~....TB.DB 8043a7c: 1c4a 254f 807d 7c5d 46e4 3c1b 8b2e a1ed J.O%}.]|.F.<.... 8043a8c: 58fd 7557 3528 a315 8a33 7f8d e96b 899f .XWu(5..3...k... 8043a9c: baff e451 2138 f2d6 ac4d 6df2 18fd b2f6 ..Q.8!..M..m.... 8043aac: e855 7d29 cb87 cdc1 06c1 4626 2f6e b0bd U.)}......&Fn/.. 8043abc: 2f5b 63d0 c76b 664e daef 0b80 d993 a5a3 [/.ck.Nf........ 8043acc: 6deb 5b6a ae0c 418e e821 888c 4f85 0d79 .mj[...A!....Oy. 8043adc: 4242 c36a b29e a49c 035d a1ee 662c fc79 BBj.....]...,fy. 8043aec: 5e29 a6b5 bbf6 3274 b7a5 e9b4 6121 5acc )^....t2....!a.Z 8043afc: 69be 173f ca88 bdba 5893 0137 974d e8fe .i?......X7.M... 8043b0c: c5fc 5f6c 8afb eb1d 7605 4783 74ba f0cd ..l_.....v.G.t.. 8043b1c: 6d3f c47e e48e ecec d97d d6b9 0f15 4c72 ?m~.....}.....rL 8043b2c: 6328 9f08 5676 745e 3bb9 7334 8d7c 80a7 (c..vV^t.;4s|... 8043b3c: 4979 7c5c 5c0a 15cb f2f5 f238 6f36 dc0e yI\|.\....8.6o.. 8043b4c: 5e3e 20bd 07e7 c0b0 c17a c3b7 e2a4 b938 >^. ....z.....8. 8043b5c: b070 f780 1c0d 0d1d 9c20 f0e3 e7cf d401 p....... ....... 8043b6c: 6f88 bb6f efd6 108a 6402 c9d8 a453 6080 .oo......d..S..` 8043b7c: d19e db24 2016 c12b d1dd 6e07 f218 835b ..$.. +....n..[. 8043b8c: c69e 721e d1de 135b 8156 6de7 18de 1f79 ...r..[.V..m..y. 8043b9c: 39d5 9d4d 6fad e3fb 3ccc ff1c 2503 ce74 .9M..o...<...%t. 8043bac: 4891 000a 0000 0000 .H...... 08043bb4 : 8043bb4: 0000 0000 f4c1 0803 f4d1 0803 053c 0000 ............<... 8043bc4: 0001 0000 .... 08043bc8 : 8043bc8: 2c08 0804 b001 0803 b011 0803 1233 0000 .,..........3... 8043bd8: 0001 0000 .... 08043bdc : 8043bdc: 3648 0804 c570 0803 c57c 0803 2a56 0000 H6..p...|...V*.. 8043bec: 0001 0000 .... 08043bf0 : 8043bf0: c558 0803 2c30 0804 2c3c 0804 04f6 0000 X...0,..<,...... 8043c00: 0001 0000 .... 08043c04 : 8043c04: 3bf0 0804 c244 0803 c250 0803 02f6 0000 .;..D...P....... 8043c14: 0001 0000 .... 08043c18 : 8043c18: 3bb4 0804 3132 0804 3142 0804 04f1 0000 .;..21..B1...... 8043c28: 0001 0000 .... 08043c2c : 8043c2c: 3bdc 0804 a5e6 0803 a5f2 0803 0a0f 0000 .;.............. 8043c3c: 0001 0000 5448 5054 312f 302e 3220 3030 ....HTTP/1.0 200 8043c4c: 4f20 0d4b 430a 6e6f 6574 746e 542d 7079 OK..Content-Typ 8043c5c: 3a65 6574 7478 682f 6d74 0d6c 0d0a 000a e:text/html..... 8043c6c: 227b 4341 3a22 0022 2c22 4422 2243 223a {"AC":".","DC":" 8043c7c: 2200 222c 6e69 665f 6572 2271 223a 2200 .","in_freq":"." 8043c8c: 222c 756f 5f74 7266 7165 3a22 0022 2c22 ,"out_freq":".", 8043c9c: 7022 7277 3a22 0022 2c22 6222 7461 635f "pwr":".","bat_c 8043cac: 7061 3a22 0022 2c22 6922 6e6e 7265 745f ap":".","inner_t 8043cbc: 6d65 2270 223a 2200 222c 6162 5f74 6974 emp":".","bat_ti 8043ccc: 656d 6c5f 6665 2274 223a 2200 222c 6964 me_left":".","di 8043cdc: 2231 223a 2200 222c 6f72 2231 223a 2200 1":".","ro1":"." 8043cec: 222c 6f72 2232 223a 2200 222c 5f6d 6c61 ,"ro2":".","m_al 8043cfc: 7261 226d 223a 2200 222c 5f75 6c61 7261 arm":".","u_alar 8043d0c: 226d 223a 2200 222c 656e 7374 7465 6974 m":".","netsetti 8043d1c: 676e 5f73 6863 6e61 6567 2264 223a 2200 ngs_changed":"." 8043d2c: 007d 227b 6572 6461 635f 6d6f 756d 696e }.{"read_communi 8043d3c: 7974 3a22 0022 2c22 7722 6972 6574 635f ty":".","write_c 8043d4c: 6d6f 756d 696e 7974 3a22 0022 2c22 6d22 ommunity":".","m 8043d5c: 6e61 6761 7265 5049 3a22 0022 2c22 6d22 anagerIP":".","m 8043d6c: 6e61 6761 7265 5049 2232 223a 2200 222c anagerIP2":"."," 8043d7c: 616d 616e 6567 4972 3350 3a22 0022 2c22 managerIP3":".", 8043d8c: 6d22 6e61 6761 7265 5049 2234 223a 2200 "managerIP4":"." 8043d9c: 222c 616d 616e 6567 4972 3550 3a22 0022 ,"managerIP5":". 8043dac: 2c22 6922 6170 6464 2272 223a 2200 222c ","ipaddr":"."," 8043dbc: 7767 3a22 0022 2c22 6d22 7361 226b 223a gw":".","mask":" 8043dcc: 2200 222c 6864 7063 3a22 2c00 6122 7475 .","dhcp":.,"aut 8043ddc: 2268 003a 222c 7372 735f 7265 6576 2272 h":.,"rs_server" 8043dec: 223a 2200 222c 7372 705f 726f 2274 223a :".","rs_port":" 8043dfc: 2200 222c 7372 705f 6477 3a22 0022 2c22 .","rs_pwd":".", 8043e0c: 7222 5f73 656b 2279 223a 2200 222c 7372 "rs_key":".","rs 8043e1c: 655f 616e 6c62 6465 3a22 2c00 6422 7461 _enabled":.,"dat 8043e2c: 2265 223a 2200 222c 6974 656d 3a22 0022 e":".","time":". 8043e3c: 2c22 6e22 7074 3a22 0022 2c22 6e22 7074 ","ntp":".","ntp 8043e4c: 6573 7672 7069 3a22 0022 2c22 7522 6374 servip":".","utc 8043e5c: 3a22 0022 2c22 7522 6d74 3a22 0022 2c22 ":".","utm":".", 8043e6c: 6c22 7361 7374 6e79 7463 6d69 2265 223a "lastsynctime":" 8043e7c: 7b00 7522 7470 6d69 2265 223a 2200 222c .{"uptime":"."," 8043e8c: 6f6d 6564 226c 223a 2200 222c 7270 646f model":".","prod 8043e9c: 7461 2265 223a 2200 222c 7766 6576 7372 ate":".","fwvers 8043eac: 6f69 226e 223a 2200 222c 616d 6163 6464 ion":".","macadd 8043ebc: 2272 223a 2200 222c 6573 6e72 226f 223a r":".","serno":" 8043ecc: 2200 222c 776f 656e 2272 223a 2200 222c .","owner":"."," 8043edc: 7973 4c73 636f 7461 6f69 226e 223a 2200 sysLocation":"." 8043eec: 222c 6f63 6d6d 6e65 2274 223a 2200 222c ,"comment":"."," 8043efc: 7075 5f73 6f6d 6564 226c 223a 2200 222c ups_model":"."," 8043f0c: 7075 5f73 7766 6576 7372 6f69 226e 223a ups_fwversion":" 8043f1c: 4800 5454 2f50 2e31 2031 3032 2030 4b4f .HTTP/1.1 200 OK 8043f2c: 0a0d 6f43 746e 6e65 2d74 7954 6570 743a ..Content-Type:t 8043f3c: 7865 2f74 7468 6c6d 0a0d 0a0d 7b00 7022 ext/html.....{"p 8043f4c: 6761 2265 203a 005b 6925 5d00 222c 6170 age": [.%i.],"pa 8043f5c: 6567 2273 223a 5200 6265 6f6f 5474 7361 ges":".RebootTas 8043f6c: 006b 6374 6970 5f70 6874 6572 6461 0000 k.tcpip_thread.. 08043f7c : 8043f7c: 0004 0006 000c 0005 0019 0010 0006 0008 ................ 8043f8c: 0014 000a 001e 0032 0005 0009 0032 0019 ......2.....2... 08043f9c : 8043f9c: 001c 0020 0094 001c 0010 0010 002c 0014 .. .........,... 8043fac: 0014 0010 0020 0010 0024 0080 0010 0614 .... ...$....... 08043fbc : 8043fbc: f6b4 2000 f6bc 2000 f6ac 2000 f6c0 2000 ... ... ... ... 08043fcc : 8043fcc: 0201 0403 0605 0707 0707 0707 0307 ............. 08043fd9 : 8043fd9: 0603 180c 6030 ff78 ....0`x 08043fe0 : 8043fe0: ffff ffff .... 08043fe4 : 8043fe4: 0000 0000 .... 08043fe8 : 8043fe8: 0000 0000 .... 08043fec : 8043fec: 383d 0803 32f1 0803 3881 0803 3405 0803 =8...2...8...4.. 8043ffc: 0001 0000 .... 08044000 : 8044000: 0774 2000 0774 2000 t.. t.. 08044008 : 8044008: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 8044018: 0002 0001 4138 0804 4260 0804 ....8A..`B.. 08044024 : 8044024: 4830 0804 43f8 0804 073c 2000 48d4 0804 0H...C..<.. .H.. 8044034: 41f8 0804 43c8 0804 4624 0804 4194 0804 .A...C..$F...A.. 08044044 : 8044044: 07a4 2000 07a4 2000 07a4 2000 07a4 2000 ... ... ... ... 8044054: 07a4 2000 07a4 2000 07a4 2000 07a4 2000 ... ... ... ... 8044064: 07a4 2000 07a4 2000 07a4 2000 07a4 2000 ... ... ... ... 8044074: 07a4 2000 ... 08044078 : 8044078: 0002 0000 0000 0000 0000 0000 0000 0000 ................ 8044088: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8044098: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80440a8: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80440b8: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80440c8: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80440d8: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80440e8: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80440f8: 0000 0000 .... 080440fc : 80440fc: 5146 4e44 752d 6b6e 0000 0000 FQDN-unk.... 08044108 : 8044108: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 08044118 : 8044118: 2f45 0803 2f65 0803 2e93 0803 2e97 0803 E/..e/.......... 8044128: 0001 0000 .... 0804412c : 804412c: 0000 0000 .... 08044130 : 8044130: 0001 0000 0002 0000 ........ 08044138 : 8044138: 0001 0000 .... 0804413c : 804413c: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 804414c: 0002 0001 482c 0804 4620 0804 ....,H.. F.. 08044158 : 8044158: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8044168: 0005 0000 0006 0000 0007 0000 000b 0000 ................ 08044178 : 8044178: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 8044188: 0002 0008 4158 0804 4024 0804 ....XA..$@.. 08044194 : 8044194: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 80441a4: 0002 001c 4718 0804 45b0 0804 .....G...E.. 080441b0 : 80441b0: 37b1 0803 31e9 0803 2e93 0803 2e97 0803 .7...1.......... 80441c0: 0001 0000 .... 080441c4 : 80441c4: 4304 0804 4304 0804 4304 0804 4304 0804 .C...C...C...C.. 80441d4: 4304 0804 4304 0804 4304 0804 .C...C...C.. 080441e0 : 80441e0: 0002 0000 .... 080441e4 : 80441e4: 424c 0804 424c 0804 424c 0804 424c 0804 LB..LB..LB..LB.. 80441f4: 0758 2000 X.. 080441f8 : 80441f8: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 8044208: 0002 001a 44c4 0804 4354 0804 .....D..TC.. 08044214 : 8044214: 36c5 0803 2f79 0803 3039 0803 2e97 0803 .6..y/..90...... 8044224: 0001 0000 .... 08044228 : 8044228: 0001 0000 0002 0000 ........ 08044230 : 8044230: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 8044240: 0002 0004 4108 0804 43e8 0804 .....A...C.. 0804424c : 804424c: 328d 0803 32b9 0803 2e93 0803 2e97 0803 .2...2.......... 804425c: 0001 0000 .... 08044260 : 8044260: 42e8 0804 .B.. 08044264 : 8044264: 0002 0000 0000 0000 0000 0000 0000 0000 ................ 8044274: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8044284: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8044294: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80442a4: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80442b4: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80442c4: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80442d4: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80442e4: 0000 0000 .... 080442e8 : 80442e8: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 80442f8: 0002 0003 4448 0804 4540 0804 ....HD..@E.. 08044304 : 8044304: 2e99 0803 3b1d 0803 3629 0803 38c9 0803 .....;..)6...8.. 8044314: 0001 0000 .... 08044318 : 8044318: 41b0 0804 41b0 0804 41b0 0804 41b0 0804 .A...A...A...A.. 8044328: 41b0 0804 41b0 0804 41b0 0804 41b0 0804 .A...A...A...A.. 8044338: 41b0 0804 41b0 0804 41b0 0804 41b0 0804 .A...A...A...A.. 8044348: 08a4 2000 41b0 0804 41b0 0804 ... .A...A.. 08044354 : 8044354: 47fc 0804 47fc 0804 47fc 0804 47fc 0804 .G...G...G...G.. 8044364: 47fc 0804 47fc 0804 47fc 0804 47fc 0804 .G...G...G...G.. 8044374: 47fc 0804 47fc 0804 47fc 0804 47fc 0804 .G...G...G...G.. 8044384: 47fc 0804 47fc 0804 47fc 0804 47fc 0804 .G...G...G...G.. 8044394: 47fc 0804 47fc 0804 47fc 0804 47fc 0804 .G...G...G...G.. 80443a4: 47fc 0804 47fc 0804 47fc 0804 47fc 0804 .G...G...G...G.. 80443b4: 47fc 0804 47fc 0804 .G...G.. 080443bc : 80443bc: 0004 0000 .... 080443c0 : 80443c0: 4118 0804 0944 2000 .A..D.. 080443c8 : 80443c8: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 80443d8: 0002 000f 4574 0804 4318 0804 ....tE...C.. 080443e4 : 80443e4: 0000 0000 .... 080443e8 : 80443e8: 0a08 2000 0a08 2000 0a08 2000 0a08 2000 ... ... ... ... 080443f8 : 80443f8: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 8044408: 0002 0002 4130 0804 43c0 0804 ....0A...C.. 08044414 : 8044414: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8044424: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 8044434: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 8044444: 000d 0000 .... 08044448 : 8044448: 0001 0000 0002 0000 0003 0000 ............ 08044454 : 8044454: 08cc 2000 08cc 2000 08cc 2000 08cc 2000 ... ... ... ... 8044464: 08cc 2000 ... 08044468 : 8044468: 4214 0804 4214 0804 4214 0804 4214 0804 .B...B...B...B.. 8044478: 4214 0804 4214 0804 4214 0804 4214 0804 .B...B...B...B.. 8044488: 4214 0804 4214 0804 4214 0804 4214 0804 .B...B...B...B.. 8044498: 4214 0804 4214 0804 4214 0804 4214 0804 .B...B...B...B.. 80444a8: 4214 0804 4214 0804 4214 0804 08f8 2000 .B...B...B..... 80444b8: 0960 2000 0720 2000 4214 0804 `.. .. .B.. 080444c4 : 80444c4: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 80444d4: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 80444e4: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 80444f4: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 8044504: 0011 0000 0012 0000 0013 0000 0014 0000 ................ 8044514: 0015 0000 0016 0000 0017 0000 0018 0000 ................ 8044524: 0019 0000 001a 0000 ........ 0804452c : 804452c: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 804453c: 0005 0000 .... 08044540 : 8044540: 0918 2000 0918 2000 0918 2000 ... ... ... 0804454c : 804454c: 0874 2000 0874 2000 0874 2000 0874 2000 t.. t.. t.. t.. 804455c: 0874 2000 t.. 08044560 : 8044560: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8044570: 0005 0000 .... 08044574 : 8044574: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8044584: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 8044594: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 80445a4: 000d 0000 000e 0000 000f 0000 ............ 080445b0 : 80445b0: 3fec 0804 3fec 0804 3fec 0804 3fec 0804 .?...?...?...?.. 80445c0: 3fec 0804 3fec 0804 3fec 0804 3fec 0804 .?...?...?...?.. 80445d0: 3fec 0804 3fec 0804 3fec 0804 3fec 0804 .?...?...?...?.. 80445e0: 3fec 0804 3fec 0804 3fec 0804 3fec 0804 .?...?...?...?.. 80445f0: 3fec 0804 3fec 0804 3fec 0804 3fec 0804 .?...?...?...?.. 8044600: 3fec 0804 3fec 0804 3fec 0804 3fec 0804 .?...?...?...?.. 8044610: 3fec 0804 3fec 0804 3fec 0804 3fec 0804 .?...?...?...?.. 08044620 : 8044620: 4178 0804 xA.. 08044624 : 8044624: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 8044634: 0002 0005 452c 0804 41e4 0804 ....,E...A.. 08044640 : 8044640: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 8044650: 0002 000d 4414 0804 4044 0804 .....D..D@.. 0804465c : 804465c: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 804466c: 0002 0016 47a4 0804 487c 0804 .....G..|H.. 08044678 : 8044678: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 8044688: 0002 0002 4228 0804 4000 0804 ....(B...@.. 08044694 : 8044694: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 80446a4: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 80446b4: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 80446c4: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 80446d4: 0011 0000 0012 0000 0013 0000 0014 0000 ................ 80446e4: 0015 0000 0016 0000 0017 0000 ............ 080446f0 : 80446f0: 776c 5049 0800 lwIP. 080446f5 : 80446f5: 0008 8b00 ... 080446f8 : 80446f8: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 8044708: 0002 0005 4868 0804 4454 0804 ....hH..TD.. 08044714 : 8044714: 0000 0000 .... 08044718 : 8044718: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8044728: 0005 0000 0006 0000 0008 0000 0009 0000 ................ 8044738: 000a 0000 000b 0000 000c 0000 000d 0000 ................ 8044748: 000e 0000 000f 0000 0010 0000 0011 0000 ................ 8044758: 0012 0000 0013 0000 0014 0000 0015 0000 ................ 8044768: 0016 0000 0018 0000 0019 0000 001a 0000 ................ 8044778: 001b 0000 001c 0000 001d 0000 001e 0000 ................ 08044788 : 8044788: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8044798: 0005 0000 0006 0000 0007 0000 ............ 080447a4 : 80447a4: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 80447b4: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 80447c4: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 80447d4: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 80447e4: 0011 0000 0012 0000 0013 0000 0014 0000 ................ 80447f4: 0015 0000 0016 0000 ........ 080447fc : 80447fc: 30c1 0803 30ed 0803 2e93 0803 2e97 0803 .0...0.......... 804480c: 0001 0000 .... 08044810 : 8044810: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 8044820: 0002 0002 08ec 2000 48f0 0804 ....... .H.. 0804482c : 804482c: 0001 0000 .... 08044830 : 8044830: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 8044840: 0002 0007 4788 0804 41c4 0804 .....G...A.. 0804484c : 804484c: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 804485c: 0002 0005 4560 0804 454c 0804 ....`E..LE.. 08044868 : 8044868: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8044878: 0005 0000 .... 0804487c : 804487c: 07cc 2000 07cc 2000 07cc 2000 07cc 2000 ... ... ... ... 804488c: 07cc 2000 07cc 2000 07cc 2000 07cc 2000 ... ... ... ... 804489c: 07cc 2000 07cc 2000 07cc 2000 07cc 2000 ... ... ... ... 80448ac: 07cc 2000 07cc 2000 07cc 2000 07cc 2000 ... ... ... ... 80448bc: 07cc 2000 07cc 2000 07cc 2000 07cc 2000 ... ... ... ... 80448cc: 07cc 2000 07cc 2000 ... ... 080448d4 : 80448d4: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 80448e4: 0002 0017 4694 0804 4468 0804 .....F..hD.. 080448f0 : 80448f0: 413c 0804 49dc 0804 : 80448f8: 0001 0000 0003 0000 0006 0000 0001 0000 ................ 08044908 : 8044908: 0000 0000 .... 0804490c : 804490c: 7570 6c62 6369 ff00 public. 08044913 : 8044913: ffff ffff ffff ...... 08044919 : 8044919: 0000 0000 0000 7445 5f68 6669 2000 7325 ......Eth_if. %s 8044929: 0d0a 4400 4348 4350 696c 6e65 0074 6577 ...DHCPClient.we 8044939: 5262 6965 696e 0074 6552 6e69 7469 6557 bReinit.ReinitWe 8044949: 0062 1800 b.. 0804494c : 804494c: a318 0000 .... 08044950 : 8044950: 0001 0000 .... 08044954 : 8044954: 49a4 0804 .I.. 08044958 : 8044958: 4a40 0804 @J.. 0804495c : 804495c: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 804496c: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 804497c: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 804498c: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 804499c: 0011 0000 0012 0000 ........ 080449a4 : 80449a4: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 80449b4: 0002 0001 4950 0804 4ab8 0804 ....PI...J.. 080449c0 : 80449c0: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 80449d0: 0002 0001 4abc 0804 4958 0804 .....J..XI.. 080449dc : 80449dc: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 80449ec: 0002 0001 4a5c 0804 4a64 0804 ....\J..dJ.. 080449f8 : 80449f8: 4aa4 0804 4aa4 0804 4aa4 0804 4aa4 0804 .J...J...J...J.. 8044a08: 4aa4 0804 4aa4 0804 4aa4 0804 4aa4 0804 .J...J...J...J.. 8044a18: 4aa4 0804 4aa4 0804 4aa4 0804 4aa4 0804 .J...J...J...J.. 8044a28: 4aa4 0804 4aa4 0804 4aa4 0804 4aa4 0804 .J...J...J...J.. 8044a38: 4aa4 0804 4aa4 0804 .J...J.. 08044a40 : 8044a40: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 8044a50: 0002 0001 4a60 0804 4954 0804 ....`J..TI.. 08044a5c : 8044a5c: 0001 0000 .... 08044a60 : 8044a60: 0003 0000 .... 08044a64 : 8044a64: 4a68 0804 hJ.. 08044a68 : 8044a68: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 8044a78: 0002 0001 494c 0804 4a84 0804 ....LI...J.. 08044a84 : 8044a84: 49c0 0804 .I.. 08044a88 : 8044a88: 2e8b 0803 2e91 0803 2e93 0803 2e97 0803 ................ 8044a98: 0002 0012 495c 0804 49f8 0804 ....\I...I.. 08044aa4 : 8044aa4: 7419 0803 73d9 0803 7349 0803 7205 0803 .t...s..Is...r.. 8044ab4: 0001 0000 .... 08044ab8 : 8044ab8: 4a88 0804 .J.. 08044abc : 8044abc: 038f 0000 3025 6432 252e 3230 2e64 3025 ....%02d.%02d.%0 8044acc: 6432 2520 3230 3a64 3025 6432 253a 3230 2d %02d:%02d:%02 8044adc: 0064 6425 252e 2e64 6425 2520 3a64 6425 d.%d.%d.%d %d:%d 8044aec: 253a 2064 0d0a 0000 666e 0000 6e69 7469 :%d ....nf..init 8044afc: 0079 0000 6e61 0000 4241 4443 4645 0000 y...an..ABCDEF.. 8044b0c: 6261 6463 6665 0000 3130 3332 3534 3736 abcdef..01234567 8044b1c: 3938 0000 0043 0000 4f50 4953 0058 0000 89..C...POSIX... 8044b2c: 0000 0000 002e 0000 ........ 08044b34 <_init>: 8044b34: b5f8 push {r3, r4, r5, r6, r7, lr} 8044b36: bf00 nop 8044b38: bcf8 pop {r3, r4, r5, r6, r7} 8044b3a: bc08 pop {r3} 8044b3c: 469e mov lr, r3 8044b3e: 4770 bx lr 08044b40 <_fini>: 8044b40: b5f8 push {r3, r4, r5, r6, r7, lr} 8044b42: bf00 nop 8044b44: bcf8 pop {r3, r4, r5, r6, r7} 8044b46: bc08 pop {r3} 8044b48: 469e mov lr, r3 8044b4a: 4770 bx lr